From c6b89f032cac15f8472350c9dfae67972a80ea16 Mon Sep 17 00:00:00 2001 From: wcork Date: Thu, 31 Mar 2022 22:02:41 -0700 Subject: [PATCH 1/6] Update to support AI2022 AI SDK 2022 Update Windows Plugins. --- BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h | 1 + BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.rc | Bin 5032 -> 3160 bytes .../BloksAIPlugin/BloksAIPlugin.vcxproj | 406 +- .../BloksAIPlugin/BloksAIPluginSuites.cpp | 2 +- BloksAIPlugin/BloksAIPlugin/plugin.pipl | Bin 0 -> 116 bytes BloksAIPlugin/Release/BloksAIPlugin.aip | Bin 30208 -> 28160 bytes .../Vendor/common/includes/AppContext.hpp | 66 +- .../Vendor/common/includes/ArtMatcher.hpp | 108 +- .../Vendor/common/includes/CASFault.hpp | 122 +- .../common/includes/FlashUIController.h | 116 +- .../Vendor/common/includes/HtmlUIController.h | 116 +- .../Vendor/common/includes/IllustratorSDK.h | 180 +- .../common/includes/IllustratorSDKDebug.pch | 46 +- .../common/includes/IllustratorSDKRelease.pch | 40 +- .../Vendor/common/includes/Plugin.hpp | 327 +- .../Vendor/common/includes/PluginStd.h | 62 +- .../common/includes/SDKAboutPluginsHelper.h | 208 +- BloksAIPlugin/Vendor/common/includes/SDKDef.h | 112 +- .../Vendor/common/includes/SDKErrors.h | 256 +- .../Vendor/common/includes/SDKPlugPlug.h | 662 +- .../Vendor/common/includes/Suites.hpp | 154 +- .../Vendor/common/includes/legacy/About.h | 74 +- .../common/includes/legacy/reportError.h | 82 +- .../common/includes/legacy/stringUtils.h | 82 +- BloksAIPlugin/Vendor/common/includes/pragma.h | 46 +- .../Vendor/common/mac/AIPluginCommon.xcconfig | 38 + .../Vendor/common/mac/AIPluginDebug.xcconfig | 10 + .../common/mac/AIPluginRelease.xcconfig | 10 + BloksAIPlugin/Vendor/common/mac/Info.plist | 68 +- BloksAIPlugin/Vendor/common/mac/PiPL.r | 532 +- BloksAIPlugin/Vendor/common/mac/Plugin.r | 198 +- .../Vendor/common/source/AppContext.cpp | 78 +- .../Vendor/common/source/ArtMatcher.cpp | 286 +- .../common/source/FlashUIController.cpp | 76 +- .../Vendor/common/source/HtmlUIController.cpp | 76 +- .../Vendor/common/source/IllustratorSDK.cpp | 32 +- BloksAIPlugin/Vendor/common/source/Main.cpp | 252 +- BloksAIPlugin/Vendor/common/source/Plugin.cpp | 1725 +- .../common/source/SDKAboutPluginsHelper.cpp | 258 +- .../Vendor/common/source/SDKErrors.cpp | 170 +- .../Vendor/common/source/SDKPlugPlug.cpp | 388 +- BloksAIPlugin/Vendor/common/source/Suites.cpp | 374 +- .../Vendor/common/source/legacy/About.cpp | 202 +- .../common/source/legacy/reportError.cpp | 512 +- .../Vendor/common/source/legacy/shellMain.cpp | 514 +- .../common/source/legacy/stringUtils.cpp | 418 +- .../Vendor/common/win/PluginMain.def | 2 +- .../Vendor/common/win/VersionInfo.rc | 124 +- BloksAIPlugin/Vendor/common/win/pragma.h | 40 +- .../Vendor/illustratorapi/ate/ATEDOM.xml | 26584 +++++++------- .../Vendor/illustratorapi/ate/ATEException.h | 80 +- .../Vendor/illustratorapi/ate/ATESuites.h | 9096 ++--- .../illustratorapi/ate/ATETextSuitesDeclare.h | 218 +- .../illustratorapi/ate/ATETextSuitesExtern.h | 236 +- .../ate/ATETextSuitesImplement.h | 217 +- .../ate/ATETextSuitesImportHelper.h | 440 +- .../Vendor/illustratorapi/ate/ATETypes.h | 2264 +- .../Vendor/illustratorapi/ate/ATETypesDef.h | 256 +- .../Vendor/illustratorapi/ate/IText.cpp | 29175 ++++++++-------- .../Vendor/illustratorapi/ate/IText.h | 21651 ++++++------ .../illustratorapi/ate/IThrowException.cpp | 59 +- .../illustratorapi/ate/IThrowException.h | 63 +- .../ate/SloTextdomTypes/SloTextdomTypes.h | 52 - .../illustratorapi/ate/legacy/ATE25Suites.h | 2184 +- .../ate/legacy/ATE25TextSuitesDeclare.h | 58 +- .../ate/legacy/ATE25TextSuitesExtern.h | 74 +- .../ate/legacy/ATE25TextSuitesImportHelper.h | 96 +- .../ate/slotextdomtypes/SloTextdomTypes.h | 52 + .../illustratorapi/illustrator/ADMStdTypes.h | 399 +- .../illustratorapi/illustrator/AIAGMTypes.h | 272 +- .../illustrator/AIATECurrTextFeatures.h | 320 +- .../illustratorapi/illustrator/AIATEPaint.h | 510 +- .../illustrator/AIATETextUtil.h | 482 +- .../illustrator/AIActionManager.h | 1569 +- .../illustratorapi/illustrator/AIAnnotator.h | 712 +- .../illustrator/AIAnnotatorDrawer.h | 918 +- .../illustrator/AIApplication.h | 190 +- .../illustratorapi/illustrator/AIArray.h | 832 +- .../Vendor/illustratorapi/illustrator/AIArt.h | 2585 +- .../illustrator/AIArtConverter.h | 386 +- .../illustratorapi/illustrator/AIArtSet.h | 500 +- .../illustrator/AIArtSetGenerator.h | 102 + .../illustratorapi/illustrator/AIArtStyle.h | 1247 +- .../illustrator/AIArtStyleParser.h | 1860 +- .../illustratorapi/illustrator/AIArtboard.h | 553 +- .../illustrator/AIArtboardRange.h | 307 +- .../illustratorapi/illustrator/AIAssert.cpp | 80 + .../illustratorapi/illustrator/AIAssert.hpp | 94 + .../illustratorapi/illustrator/AIAssertion.h | 54 + .../illustratorapi/illustrator/AIAssetMgmt.h | 478 +- .../illustrator/AIAutoCoordinateSystem.h | 177 +- .../illustratorapi/illustrator/AIBasicTypes.h | 181 +- .../illustrator/AIBasicUtilities.h | 70 +- .../illustrator/AIBeautifulStrokes.h | 2552 +- .../illustratorapi/illustrator/AIBlock.h | 224 +- .../Vendor/illustratorapi/illustrator/AICMS.h | 150 +- .../illustratorapi/illustrator/AICSXS.h | 50 +- .../illustrator/AICSXSExtension.h | 278 +- .../illustrator/AICharacterEncoding.h | 534 +- .../illustratorapi/illustrator/AIClipboard.h | 570 +- .../illustrator/AICloudDocument.h | 106 + .../illustratorapi/illustrator/AIColor.h | 1316 +- .../illustrator/AIColorConversion.h | 504 +- .../illustrator/AIColorHarmony.h | 388 +- .../illustratorapi/illustrator/AIColorSpace.h | 590 +- .../illustrator/AICommandManager.h | 454 +- .../illustratorapi/illustrator/AIContext.h | 415 +- .../illustratorapi/illustrator/AIContract.hpp | 151 + .../illustratorapi/illustrator/AIControlBar.h | 440 +- .../illustrator/AICountedObject.h | 224 +- .../illustratorapi/illustrator/AICursorSnap.h | 771 +- .../illustrator/AICurveFittingSuite.h | 360 +- .../illustrator/AICustomColor.h | 488 +- .../illustratorapi/illustrator/AIDataFilter.h | 630 +- .../illustratorapi/illustrator/AIDeviceInfo.h | 160 +- .../illustratorapi/illustrator/AIDictionary.h | 1118 +- .../illustrator/AIDictionaryKeyHelper.hpp | 152 + .../illustratorapi/illustrator/AIDocument.h | 1934 +- .../illustrator/AIDocumentBasicTypes.h | 183 + .../illustrator/AIDocumentList.h | 752 +- .../illustrator/AIDocumentView.h | 1134 +- .../illustratorapi/illustrator/AIDrawArt.h | 1004 +- .../illustrator/AIDxfDwgPrefs.h | 536 +- .../illustrator/AIDynamicSymbol.h | 148 +- .../illustratorapi/illustrator/AIEntry.h | 1428 +- .../illustratorapi/illustrator/AIEnvelope.h | 766 +- .../illustratorapi/illustrator/AIEraserTool.h | 49 + .../illustratorapi/illustrator/AIErrorCodes.h | 111 + .../illustrator/AIErrorHandler.h | 423 + .../illustratorapi/illustrator/AIEvent.h | 252 +- .../illustratorapi/illustrator/AIExpand.h | 326 +- .../illustratorapi/illustrator/AIExternDef.h | 38 + .../illustrator/AIFOConversion.h | 789 +- .../illustrator/AIFXGFileFormat.h | 1242 +- .../illustratorapi/illustrator/AIFileFormat.h | 1987 +- .../illustratorapi/illustrator/AIFilePath.h | 720 +- .../illustratorapi/illustrator/AIFilter.h | 524 +- .../illustratorapi/illustrator/AIFixedMath.h | 424 +- .../illustratorapi/illustrator/AIFlashPrefs.h | 267 - .../illustratorapi/illustrator/AIFolders.h | 837 +- .../illustratorapi/illustrator/AIFont.h | 1977 +- .../illustrator/AIForeignObject.h | 342 +- .../illustratorapi/illustrator/AIGeometry.h | 1016 +- .../illustrator/AIGlobalUnicodeString.h | 47 + .../illustratorapi/illustrator/AIGradient.h | 942 +- .../illustratorapi/illustrator/AIGrid.h | 388 +- .../illustratorapi/illustrator/AIGroup.h | 300 +- .../illustrator/AIHTMLConversion.h | 382 +- .../illustratorapi/illustrator/AIHardSoft.h | 431 +- .../illustrator/AIHeaderBegin.h | 106 +- .../illustratorapi/illustrator/AIHeaderEnd.h | 90 +- .../illustratorapi/illustrator/AIHitTest.h | 764 +- .../illustrator/AIImageOptimization.h | 800 +- .../illustrator/AIIsolationMode.h | 532 +- .../illustratorapi/illustrator/AILayer.h | 952 +- .../illustratorapi/illustrator/AILayerList.h | 732 +- .../illustrator/AILegacyTextConversion.h | 204 +- .../illustratorapi/illustrator/AILimits.h | 91 + .../illustratorapi/illustrator/AILiveEdit.h | 190 + .../illustrator/AILiveEditConstants.h | 50 + .../illustratorapi/illustrator/AILiveEffect.h | 1769 +- .../illustratorapi/illustrator/AIMask.h | 1154 +- .../illustrator/AIMaskFlattener.h | 684 +- .../illustrator/AIMatchingArt.h | 499 +- .../illustratorapi/illustrator/AIMdMemory.h | 250 +- .../illustratorapi/illustrator/AIMenu.h | 1520 +- .../illustrator/AIMenuCommandNotifiers.h | 2049 +- .../illustrator/AIMenuCommandString.h | 4181 +-- .../illustratorapi/illustrator/AIMenuGroups.h | 487 +- .../illustratorapi/illustrator/AIMesh.h | 2990 +- .../illustrator/AIModalParent.h | 162 +- .../illustratorapi/illustrator/AINameSpace.h | 456 +- .../illustratorapi/illustrator/AINotifier.h | 392 +- .../illustratorapi/illustrator/AIObjectSet.h | 687 +- .../illustrator/AIOverrideColorConversion.h | 1113 +- .../illustratorapi/illustrator/AIPSDKeys.h | 58 + .../illustratorapi/illustrator/AIPaintStyle.h | 836 +- .../illustratorapi/illustrator/AIPanel.h | 1279 +- .../illustratorapi/illustrator/AIPath.h | 875 +- .../illustrator/AIPathConstruction.h | 420 +- .../illustrator/AIPathInterpolate.h | 932 +- .../illustratorapi/illustrator/AIPathStyle.h | 1402 +- .../illustratorapi/illustrator/AIPathfinder.h | 878 +- .../illustratorapi/illustrator/AIPattern.h | 548 +- .../illustrator/AIPerspectiveGrid.h | 460 +- .../illustrator/AIPerspectiveTransform.h | 474 +- .../illustrator/AIPhotoshopPrefs.h | 542 +- .../illustratorapi/illustrator/AIPlaced.h | 886 +- .../illustrator/AIPlacedTypes.h | 56 + .../illustrator/AIPlanarObject.h | 588 +- .../illustrator/AIPlatformMemory.h | 206 +- .../illustratorapi/illustrator/AIPlugin.h | 350 +- .../illustrator/AIPluginGroup.h | 3555 +- .../illustrator/AIPluginNames.h | 615 +- .../illustratorapi/illustrator/AIPragma.h | 66 +- .../illustratorapi/illustrator/AIPreference.h | 953 +- .../illustrator/AIPreferenceKeys.h | 1774 +- .../illustratorapi/illustrator/AIRandom.h | 228 +- .../illustrator/AIRandomBellCurve.h | 232 +- .../illustratorapi/illustrator/AIRaster.h | 1671 +- .../illustrator/AIRasterExport.h | 80 + .../illustrator/AIRasterTypes.h | 93 + .../illustratorapi/illustrator/AIRasterize.h | 877 +- .../illustratorapi/illustrator/AIRealBezier.h | 426 +- .../illustratorapi/illustrator/AIRealMath.h | 1432 +- .../illustratorapi/illustrator/AIRepeat.h | 364 + .../illustratorapi/illustrator/AIRuntime.h | 657 +- .../illustrator/AISFWUtilities.h | 188 +- .../illustratorapi/illustrator/AISVGFilter.h | 412 +- .../illustratorapi/illustrator/AISVGTypes.h | 364 +- .../illustrator/AIScriptMessage.h | 182 +- .../illustrator/AISelectionContextManager.h | 364 + .../illustrator/AIShapeConstruction.h | 759 +- .../illustratorapi/illustrator/AISliceTypes.h | 252 +- .../illustratorapi/illustrator/AISlicing.h | 1611 +- .../illustrator/AISmoothShadingStyle.h | 148 + .../illustrator/AIStringFormatUtils.h | 388 +- .../illustratorapi/illustrator/AIStringPool.h | 216 +- .../illustrator/AISwatchLibraries.h | 931 +- .../illustratorapi/illustrator/AISwatchList.h | 1344 +- .../illustratorapi/illustrator/AISymbol.h | 2107 +- .../illustratorapi/illustrator/AITIFFKeys.h | 52 + .../illustratorapi/illustrator/AITabletData.h | 392 +- .../Vendor/illustratorapi/illustrator/AITag.h | 332 +- .../illustratorapi/illustrator/AITextFrame.h | 1042 +- .../illustratorapi/illustrator/AITimer.h | 390 +- .../illustratorapi/illustrator/AITool.h | 2318 +- .../illustratorapi/illustrator/AIToolNames.h | 335 +- .../illustratorapi/illustrator/AIToolbox.h | 545 +- .../illustrator/AITransformAgain.h | 288 +- .../illustrator/AITransformArt.h | 306 +- .../illustrator/AITransformTypes.h | 316 +- .../illustratorapi/illustrator/AITypes.h | 1210 +- .../Vendor/illustratorapi/illustrator/AIUID.h | 1000 +- .../illustratorapi/illustrator/AIUITheme.h | 307 +- .../Vendor/illustratorapi/illustrator/AIURL.h | 134 +- .../illustratorapi/illustrator/AIUUID.h | 92 + .../illustratorapi/illustrator/AIUndo.h | 440 +- .../illustrator/AIUnicodeString.h | 1003 +- .../illustratorapi/illustrator/AIUser.h | 1746 +- .../illustratorapi/illustrator/AIVectorize.h | 882 +- .../illustratorapi/illustrator/AIWinDef.h | 74 +- .../illustratorapi/illustrator/AIWorkspace.h | 630 +- .../illustratorapi/illustrator/AIXMLElement.h | 1252 +- .../illustrator/AIXMLNameUtil.h | 240 +- .../illustratorapi/illustrator/ASConfig.h | 483 +- .../illustratorapi/illustrator/ASHelp.h | 418 +- .../illustratorapi/illustrator/ASMemory.cpp | 260 +- .../illustratorapi/illustrator/ASPragma.h | 66 +- .../illustratorapi/illustrator/ASTypes.h | 702 +- .../illustrator/ASUserInteraction.h | 562 +- .../illustratorapi/illustrator/AutoSuite.h | 675 +- .../illustrator/IAIArtMatcher.cpp | 271 + .../illustrator/IAIArtMatcher.hpp | 313 + .../illustratorapi/illustrator/IAIArtSet.cpp | 391 + .../illustratorapi/illustrator/IAIArtSet.hpp | 356 + .../illustrator/IAIArtboards.cpp | 622 +- .../illustrator/IAIArtboards.hpp | 876 +- .../illustrator/IAIAutoBuffer.cpp | 145 +- .../illustrator/IAIAutoBuffer.h | 531 +- .../illustrator/IAICharacterEncoding.h | 456 +- .../illustrator/IAIColorSpace.cpp | 603 +- .../illustrator/IAIColorSpace.hpp | 740 +- .../illustrator/IAIColorSpace.inl | 108 +- .../illustratorapi/illustrator/IAICopyScope.h | 322 +- .../illustrator/IAIDataFilter.cpp | 519 + .../illustrator/IAIDataFilter.hpp | 371 + .../illustrator/IAIDictionary.cpp | 1734 + .../illustrator/IAIDictionary.hpp | 678 + .../illustrator/IAIDocumentUtils.cpp | 148 + .../illustrator/IAIDocumentUtils.hpp | 163 + .../illustrator/IAIFilePath.cpp | 865 +- .../illustrator/IAIFilePath.hpp | 961 +- .../illustrator/IAIGlobalUnicodeString.cpp | 72 + .../illustrator/IAIGlobalUnicodeString.hpp | 114 + .../illustrator/IAILiteralString.h | 164 + .../illustratorapi/illustrator/IAILiveEdit.h | 146 + .../illustratorapi/illustrator/IAILocale.h | 336 +- .../illustratorapi/illustrator/IAIPaint.h | 518 +- .../illustratorapi/illustrator/IAIPoint.h | 257 +- .../illustratorapi/illustrator/IAIRect.h | 490 +- .../illustratorapi/illustrator/IAIRef.h | 554 +- .../illustrator/IAIRefAutoSuite.cpp | 68 +- .../illustratorapi/illustrator/IAIRepeat.cpp | 33 + .../illustratorapi/illustrator/IAIRepeat.hpp | 26 + .../illustrator/IAIScopedCache.hpp | 251 + .../illustrator/IAIStringFormatUtils.cpp | 460 +- .../illustrator/IAIStringFormatUtils.h | 355 +- .../illustrator/IAIStringUtils.h | 63 + .../illustratorapi/illustrator/IAIUUID.h | 73 + .../illustrator/IAIUnicodeString.cpp | 990 +- .../illustrator/IAIUnicodeString.h | 2800 +- .../illustrator/IAIUnicodeString.inl | 419 +- .../illustratorapi/illustrator/IASFixed.hpp | 1274 +- .../illustrator/IASRealPoint.hpp | 370 +- .../illustrator/IASRealRect.hpp | 2024 +- .../illustratorapi/illustrator/IASTypes.hpp | 88 +- .../illustrator/SloTextdomTypes.h | 36 +- .../illustrator/VTableSupport.hpp | 228 +- .../illustrator/actions/AIDocumentAction.h | 482 +- .../illustrator/actions/AIEnvelopeAction.h | 392 +- .../illustrator/actions/AILivePaintAction.h | 118 +- .../illustrator/actions/AINativeAction.h | 356 +- .../illustrator/actions/AIObjectAction.h | 702 +- .../illustrator/actions/AIPDFFormatAction.h | 684 +- .../illustrator/actions/AISVGAction.h | 346 +- .../illustrator/actions/AISliceAction.h | 230 +- .../illustrator/actions/AITextAction.h | 602 +- .../illustrator/actions/AITracingAction.h | 114 +- .../illustrator/config/AIAssertConfig.h | 51 + .../illustrator/config/AIConfig.h | 33 + .../config/compiler/AIConfigClang.h | 73 + .../config/compiler/AIConfigMSVC.h | 45 + .../illustrator/legacy/AI100Art.h | 141 - .../legacy/AI100CharacterEncoding.h | 70 - .../illustrator/legacy/AI100Document.h | 144 - .../illustrator/legacy/AI100DrawArt.h | 106 - .../illustrator/legacy/AI100Folders.h | 60 - .../illustrator/legacy/AI100Group.h | 71 - .../illustrator/legacy/AI100Mask.h | 126 - .../illustrator/legacy/AI100MaskFlattener.h | 138 - .../illustrator/legacy/AI100MatchingArt.h | 95 - .../illustrator/legacy/AI100PathInterpolate.h | 111 - .../illustrator/legacy/AI100Slicing.h | 414 - .../illustrator/legacy/AI100Symbol.h | 304 - .../illustrator/legacy/AI100UID.h | 107 - .../illustrator/legacy/AI100User.h | 121 - .../illustrator/legacy/AI110Array.h | 283 - .../illustrator/legacy/AI110Color.h | 82 - .../illustrator/legacy/AI110DrawArt.h | 88 - .../illustrator/legacy/AI110Folders.h | 219 - .../illustrator/legacy/AI110ForeignObject.h | 116 - .../illustrator/legacy/AI110MaskFlattener.h | 72 - .../illustrator/legacy/AI110Path.h | 259 - .../illustrator/legacy/AI110PluginGroup.h | 103 - .../illustrator/legacy/AI110RealBezier.h | 88 - .../illustrator/legacy/AI110Runtime.h | 184 - .../illustrator/legacy/AI110UID.h | 270 - .../illustrator/legacy/AI120ArtStyleParser.h | 156 - .../illustrator/legacy/AI120Context.h | 106 - .../legacy/AI120ImageOptimization.h | 95 - .../illustrator/legacy/AI120Path.h | 190 - .../illustrator/legacy/AI120PathStyle.h | 307 - .../illustrator/legacy/AI120PlanarObject.h | 80 - .../illustrator/legacy/AI120Runtime.h | 76 - .../illustrator/legacy/AI120Symbol.h | 358 - .../illustrator/legacy/AI130Color.h | 69 - .../illustrator/legacy/AI130CropArea.h | 173 - .../illustrator/legacy/AI130DrawArt.h | 76 - .../illustrator/legacy/AI130Path.h | 140 - .../illustrator/legacy/AI130Runtime.h | 222 - .../illustrator/legacy/AI140AnnotatorDrawer.h | 198 - .../illustrator/legacy/AI140ArtStyleParser.h | 241 - .../illustrator/legacy/AI140Context.h | 152 - .../illustrator/legacy/AI140DrawArt.h | 216 - .../illustrator/legacy/AI140FXGFileFormat.h | 407 - .../illustrator/legacy/AI140Font.h | 688 - .../illustrator/legacy/AI140HardSoft.h | 155 - .../legacy/AI140ImageOptimization.h | 230 - .../illustrator/legacy/AI140Path.h | 143 - .../illustrator/legacy/AI140SFWUtilities.h | 84 - .../illustrator/legacy/AI140Symbol.h | 692 - .../illustrator/legacy/AI140TextFrame.h | 327 - .../illustrator/legacy/AI140User.h | 496 - .../legacy/AI150BeautifulStrokes.h | 826 - .../illustrator/legacy/AI150Block.h | 111 - .../illustrator/legacy/AI170Envelope.h | 238 - .../illustrator/legacy/AI170Tool.h | 471 - .../illustrator/legacy/AI170User.h | 698 - .../illustrator/legacy/AI180CSXSExtension.h | 101 - .../illustrator/legacy/AI180Document.h | 618 - .../illustrator/legacy/AI180DocumentList.h | 186 - .../illustrator/legacy/AI180DocumentView.h | 378 - .../legacy/AI180ShapeConstruction.h | 335 - .../illustrator/legacy/AI180Tool.h | 473 - .../illustrator/legacy/AI181Document.h | 622 - .../illustrator/legacy/AI190CSXSExtension.h | 110 - .../illustrator/legacy/AI190PaintStyle.h | 223 - .../illustrator/legacy/AI190Placed.h | 343 - .../illustrator/legacy/AI190SwatchLibraries.h | 441 - .../illustrator/legacy/AI190Tool.h | 385 - .../illustrator/legacy/AI191CursorSnap.h | 321 - .../illustrator/legacy/AI191HitTest.h | 285 - .../legacy/AI191ShapeConstruction.h | 347 - .../illustrator/legacy/AI192Art.h | 838 - .../illustrator/legacy/AI192Clipboard.h | 143 - .../illustrator/legacy/AI192FileFormat.h | 385 - .../illustrator/legacy/AI192Geometry.h | 64 - .../illustrator/legacy/AI192IsolationMode.h | 160 - .../illustrator/legacy/AI192Undo.h | 197 - .../illustrator/legacy/AI192User.h | 503 - .../illustrator/legacy/AI5xAPISupport.h | 64 - .../illustrator/legacy/AI60Basic.h | 68 - .../illustrator/legacy/AI60Plugin.h | 153 - .../illustrator/legacy/AI60Property.h | 76 - .../illustrator/legacy/AI60Suite.h | 107 - .../illustrator/legacy/AI70Color.h | 131 - .../illustrator/legacy/AI90Art.h | 137 - .../illustrator/legacy/AI90ArtStyleParser.h | 168 - .../illustrator/legacy/AI90Context.h | 70 - .../illustrator/legacy/AI90DataFilter.h | 87 - .../illustrator/legacy/AI90Document.h | 127 - .../illustrator/legacy/AI90Geometry.h | 99 - .../illustrator/legacy/AI90Mask.h | 185 - .../illustrator/legacy/AI90MatchingArt.h | 71 - .../illustrator/legacy/AI90Menu.h | 207 - .../illustrator/legacy/AI90Mesh.h | 97 - .../illustrator/legacy/AI90Pathfinder.h | 75 - .../illustrator/legacy/AI90Placed.h | 73 - .../illustrator/legacy/AI90PluginGroup.h | 110 - .../illustrator/legacy/AI90Tool.h | 93 - .../illustrator/legacy/AICropArea.h | 183 - .../illustrator/legacy/AICropAreaRange.h | 53 - .../illustrator/legacy/AS120UserInteraction.h | 78 - .../legacy/actions/AI11PDFFormatAction.h | 261 - .../Vendor/illustratorapi/pica_sp/SPAccess.h | 883 +- .../Vendor/illustratorapi/pica_sp/SPAdapts.h | 820 +- .../Vendor/illustratorapi/pica_sp/SPBasic.h | 399 +- .../Vendor/illustratorapi/pica_sp/SPBckDbg.h | 246 +- .../Vendor/illustratorapi/pica_sp/SPBlocks.h | 238 +- .../Vendor/illustratorapi/pica_sp/SPCaches.h | 268 +- .../Vendor/illustratorapi/pica_sp/SPConfig.h | 176 +- .../illustratorapi/pica_sp/SPErrorCodes.h | 333 +- .../Vendor/illustratorapi/pica_sp/SPErrors.h | 68 +- .../Vendor/illustratorapi/pica_sp/SPFiles.h | 670 +- .../Vendor/illustratorapi/pica_sp/SPFilesV3.h | 200 - .../illustratorapi/pica_sp/SPHeaderBegin.h | 98 +- .../illustratorapi/pica_sp/SPHeaderEnd.h | 80 +- .../Vendor/illustratorapi/pica_sp/SPHost.h | 358 +- .../Vendor/illustratorapi/pica_sp/SPInterf.h | 368 +- .../Vendor/illustratorapi/pica_sp/SPMData.h | 152 +- .../Vendor/illustratorapi/pica_sp/SPPiPL.h | 682 +- .../Vendor/illustratorapi/pica_sp/SPPlugs.h | 834 +- .../Vendor/illustratorapi/pica_sp/SPProps.h | 640 +- .../Vendor/illustratorapi/pica_sp/SPRuntme.h | 958 +- .../illustratorapi/pica_sp/SPRuntmeV6.h | 188 + .../Vendor/illustratorapi/pica_sp/SPSTSPrp.h | 104 +- .../Vendor/illustratorapi/pica_sp/SPStrngs.h | 272 +- .../Vendor/illustratorapi/pica_sp/SPSuites.h | 592 +- .../Vendor/illustratorapi/pica_sp/SPTypes.h | 346 +- .../Vendor/tools/pipl/create_pipl.py | 60 + .../Vendor/tools/pipl/pipl_gen/__init__.py | 19 + .../Vendor/tools/pipl/pipl_gen/__init__.pyc | Bin 0 -> 272 bytes .../__pycache__/__init__.cpython-310.pyc | Bin 0 -> 252 bytes .../__pycache__/pipl_gen.cpython-310.pyc | Bin 0 -> 4541 bytes .../Vendor/tools/pipl/pipl_gen/pipl_gen.py | 216 + .../Vendor/tools/pipl/pipl_gen/pipl_gen.pyc | Bin 0 -> 6499 bytes .../tools/pipl/pipl_gen/template_plugin.json | 34 + BloksAIPlugin/x64/Release/BloksAIPlugin.aip | Bin 34304 -> 29696 bytes 449 files changed, 139859 insertions(+), 146660 deletions(-) create mode 100644 BloksAIPlugin/BloksAIPlugin/plugin.pipl create mode 100644 BloksAIPlugin/Vendor/common/mac/AIPluginCommon.xcconfig create mode 100644 BloksAIPlugin/Vendor/common/mac/AIPluginDebug.xcconfig create mode 100644 BloksAIPlugin/Vendor/common/mac/AIPluginRelease.xcconfig delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/ate/SloTextdomTypes/SloTextdomTypes.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/ate/slotextdomtypes/SloTextdomTypes.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtSetGenerator.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.cpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssertion.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AICloudDocument.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContract.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDictionaryKeyHelper.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentBasicTypes.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEraserTool.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIErrorCodes.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIErrorHandler.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExternDef.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFlashPrefs.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGlobalUnicodeString.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AILimits.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEdit.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEditConstants.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPSDKeys.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlacedTypes.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterExport.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterTypes.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRepeat.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AISelectionContextManager.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AISmoothShadingStyle.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AITIFFKeys.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUUID.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtMatcher.cpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtMatcher.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtSet.cpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtSet.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDataFilter.cpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDataFilter.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDictionary.cpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDictionary.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDocumentUtils.cpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDocumentUtils.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.cpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiteralString.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiveEdit.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.cpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIScopedCache.hpp create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringUtils.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUUID.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIAssertConfig.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIConfig.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigClang.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigMSVC.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Art.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100CharacterEncoding.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Document.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100DrawArt.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Folders.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Group.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Mask.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MaskFlattener.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MatchingArt.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100PathInterpolate.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Slicing.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Symbol.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100UID.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100User.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Array.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Color.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110DrawArt.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Folders.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110ForeignObject.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110MaskFlattener.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Path.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110PluginGroup.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110RealBezier.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Runtime.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110UID.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ArtStyleParser.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Context.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ImageOptimization.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Path.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PathStyle.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PlanarObject.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Runtime.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Symbol.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Color.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130CropArea.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130DrawArt.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Path.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Runtime.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140AnnotatorDrawer.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ArtStyleParser.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Context.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140DrawArt.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140FXGFileFormat.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Font.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140HardSoft.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ImageOptimization.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Path.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140SFWUtilities.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Symbol.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140TextFrame.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140User.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150BeautifulStrokes.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150Block.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Envelope.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Tool.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170User.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180CSXSExtension.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Document.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentList.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentView.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180ShapeConstruction.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Tool.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI181Document.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190CSXSExtension.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190PaintStyle.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190Placed.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190SwatchLibraries.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190Tool.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191CursorSnap.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191HitTest.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191ShapeConstruction.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Art.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Clipboard.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192FileFormat.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Geometry.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192IsolationMode.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Undo.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192User.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI5xAPISupport.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Basic.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Plugin.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Property.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Suite.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI70Color.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Art.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90ArtStyleParser.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Context.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90DataFilter.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Document.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Geometry.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mask.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90MatchingArt.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Menu.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mesh.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Pathfinder.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Placed.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90PluginGroup.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Tool.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropArea.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropAreaRange.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AS120UserInteraction.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/actions/AI11PDFFormatAction.h delete mode 100644 BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPFilesV3.h create mode 100644 BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPRuntmeV6.h create mode 100644 BloksAIPlugin/Vendor/tools/pipl/create_pipl.py create mode 100644 BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.py create mode 100644 BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.pyc create mode 100644 BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/__init__.cpython-310.pyc create mode 100644 BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/pipl_gen.cpython-310.pyc create mode 100644 BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.py create mode 100644 BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.pyc create mode 100644 BloksAIPlugin/Vendor/tools/pipl/pipl_gen/template_plugin.json diff --git a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h index 1828b02..b417aef 100644 --- a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h +++ b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h @@ -1,6 +1,7 @@ #ifndef __BloksAIPlugin_h__ #define __BloksAIPlugin_h__ +#include "IllustratorSDK.h" #include "Plugin.hpp" #include "BloksAIPluginID.h" diff --git a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.rc b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.rc index bc3132d96898fa93607ee93a4e40f541724f7e73..55233062eabe8c248143ede157772a2e4272efb5 100644 GIT binary patch delta 94 zcmZ3XenVnI9qVL1=6REQ7`Z$H7(5vQ7gUcvw-p~7z6#$n46DI%w literal 5032 zcmd6rUvFAR5XI-YQoqA3ej#ZZha`&9hdyAS7VdmYLTsn4(AEBBcXsCNnb}?b`g7NIEwMuz*_lmkVl&dv=JcJ=H?tdiZ!Wo7Md zDPlYXrHNf({~UCL!x2`$A#Y=K13QIBi~gsi;*NZM4?a7-VO}2p?L#bT6xeYCR$|f+ zyYI)1hpo9gpj8BamuOD*0H9%tB zeuY)Rr~3HMG2Yc+drZ0SJpI`oA*J?@ zPC`9_&06KyJ-o-*BXsD|-^c4)XwpW%Hl-rcD`&j$2}}qqP<)YpTo3_%XI|3|n5%em z?i}xc(Up&=5Fsw{stfR}BQ-lJ#Ghj9>H4S?+q$mhKJ5;z4)YJ)s;{jYwGGxrd1d;i zSXf2ZNA`hqMjAN!(n-kec%MrBuJXO(P_q~I#J>bBN3LlC3T?1xpl6SI9m`Yn)w+9> z!49>O#rMR%ETq(2`mR0XmmavyNK^YnuGn9NM-$pw>m#)}N$i{u`^A-qi@3j(n`Y!) zppi}u#ho#8qrNA;#tiKz^sh>Jj`p%SXw_xD){|ay_FUZ1X(WlOa|5n*pWpO+&+``g zE@jF-#TD7s2C;Q=E_}|&^RegJrKOzff^G-Mm4?5NwEG9n$pQ7E4V#fG$}QJ1k5h3@ z>NcK(lA=j*y?|5SZRvX6^1Qy$z9uYG6j~?m-@-j0{>e3(dajsvd)yUI@+{lF9eA2! zd2#ptFQh*^s$V>R>G_L0A^qAJ{)~Ic8+%D?l5Z+f|2KHoSSK4Bil}YodA{14l}&21)0; zZq*uD7F%x@*~I!7*%IPUh)3n#f9)1$qubS;_CAYdJa@No-{U#F{#>tQSP;*hBDeA! zh_?UaJC=ZXymwR!d#f`uvFD@@Fh;kzaDR(?qI*=ca8Jtj=~Xp!u9V+`bxS$nzH|UH zgQV@c<7TzdEkx~Du6yak-&HErz;E4~DA{n+DSv+kf0x`m(t2IpZmg_sZnCQ{uT{hB&?XUyO)jR*UVbOT+bi9~1R;C%BF0{0$InbNm1R diff --git a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.vcxproj b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.vcxproj index 8e3ca16..575729e 100644 --- a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.vcxproj +++ b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.vcxproj @@ -1,195 +1,213 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {7A544664-F702-4E4A-ACB6-5F33F3040056} - Win32Proj - BloksAIPlugin - 8.1 - - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - false - v140 - true - Unicode - - - DynamicLibrary - true - v140 - Unicode - - - DynamicLibrary - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - .aip - - - true - .aip - - - false - .aip - - - false - .aip - - - - - - Level4 - Disabled - WIN32;_DEBUG;_WINDOWS;_USRDLL;BLOKSAIPLUGIN_EXPORTS;%(PreprocessorDefinitions) - - - ..\Vendor\illustratorapi\ate;..\Vendor\illustratorapi\adm;..\Vendor\illustratorapi\illustrator;..\Vendor\illustratorapi\illustrator\legacy;..\Vendor\illustratorapi\pica_sp;..\Vendor\common\includes; - 8Bytes - - - Windows - true - ..\Vendor\common\win\PluginMain.def - $(OutDir)$(TargetName)$(TargetExt) - - - - - - - Level4 - Disabled - _DEBUG;_WINDOWS;_USRDLL;BLOKSAIPLUGIN_EXPORTS;%(PreprocessorDefinitions) - - - ..\Vendor\illustratorapi\ate;..\Vendor\illustratorapi\adm;..\Vendor\illustratorapi\illustrator;..\Vendor\illustratorapi\illustrator\legacy;..\Vendor\illustratorapi\pica_sp;..\Vendor\common\includes; - 8Bytes - - - Windows - true - ..\Vendor\common\win\PluginMain.def - $(OutDir)$(TargetName)$(TargetExt) - - - - - Level4 - - - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;_USRDLL;BLOKSAIPLUGIN_EXPORTS;%(PreprocessorDefinitions) - - - ..\Vendor\illustratorapi\ate;..\Vendor\illustratorapi\adm;..\Vendor\illustratorapi\illustrator;..\Vendor\illustratorapi\illustrator\legacy;..\Vendor\illustratorapi\pica_sp;..\Vendor\common\includes; - 8Bytes - - - Windows - true - true - true - ..\Vendor\common\win\PluginMain.def - $(OutDir)$(TargetName)$(TargetExt) - - - - - Level4 - - - MaxSpeed - true - true - NDEBUG;_WINDOWS;_USRDLL;BLOKSAIPLUGIN_EXPORTS;%(PreprocessorDefinitions) - - - ..\Vendor\illustratorapi\ate;..\Vendor\illustratorapi\adm;..\Vendor\illustratorapi\illustrator;..\Vendor\illustratorapi\illustrator\legacy;..\Vendor\illustratorapi\pica_sp;..\Vendor\common\includes; - 8Bytes - - - Windows - true - true - true - ..\Vendor\common\win\PluginMain.def - $(OutDir)$(TargetName)$(TargetExt) - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + {7A544664-F702-4E4A-ACB6-5F33F3040056} + Win32Proj + BloksAIPlugin + 10.0 + + + + DynamicLibrary + true + v143 + Unicode + + + DynamicLibrary + false + v143 + true + Unicode + + + DynamicLibrary + false + v143 + NotSet + + + DynamicLibrary + false + v143 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + .aip + + + true + .aip + + + false + .aip + + + true + .aip + + + + + + Level4 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;BLOKSAIPLUGIN_EXPORTS;%(PreprocessorDefinitions) + + + ..\Vendor\illustratorapi\ate;..\Vendor\illustratorapi\adm;..\Vendor\illustratorapi\illustrator;..\Vendor\illustratorapi\illustrator\legacy;..\Vendor\illustratorapi\pica_sp;..\Vendor\common\includes; + 8Bytes + + + Windows + true + ..\Vendor\common\win\PluginMain.def + $(OutDir)$(TargetName)$(TargetExt) + + + + + NotUsing + Level4 + Disabled + _DEBUG;_WINDOWS;WIN_ENV;%(PreprocessorDefinitions) + + + ..\Vendor\illustratorapi\ate;..\Vendor\illustratorapi\adm;..\Vendor\illustratorapi\illustrator;..\Vendor\illustratorapi\illustrator\actions;..\Vendor\illustratorapi\pica_sp;..\Vendor\illustratorapi\illustrator\legacy;..\Vendor\common\includes;%(AdditionalIncludeDirectories) + 8Bytes + ProgramDatabase + true + true + false + IllustratorSDK.h + true + CompileAsCpp + /std:c++14 /Zc:sizedDealloc- %(AdditionalOptions) + true + MultiThreadedDebugDLL + + + Windows + true + ..\Vendor\common\win\PluginMain.def + $(OutDir)$(TargetName)$(TargetExt) + true + false + + + + %(PreprocessorDefinitions) + + + + + Level4 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;BLOKSAIPLUGIN_EXPORTS;%(PreprocessorDefinitions) + + + ..\Vendor\illustratorapi\ate;..\Vendor\illustratorapi\adm;..\Vendor\illustratorapi\illustrator;..\Vendor\illustratorapi\illustrator\legacy;..\Vendor\illustratorapi\pica_sp;..\Vendor\common\includes; + 8Bytes + + + Windows + true + true + true + ..\Vendor\common\win\PluginMain.def + $(OutDir)$(TargetName)$(TargetExt) + + + + + Level4 + + + MaxSpeed + true + true + NDEBUG;_WINDOWS;WIN_ENV;%(PreprocessorDefinitions) + + + ..\Vendor\illustratorapi\ate;..\Vendor\illustratorapi\adm;..\Vendor\illustratorapi\illustrator;..\Vendor\illustratorapi\illustrator\legacy;..\Vendor\illustratorapi\pica_sp;..\Vendor\common\includes; + 8Bytes + false + + + Windows + true + true + true + ..\Vendor\common\win\PluginMain.def + $(OutDir)$(TargetName)$(TargetExt) + true + false + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BloksAIPlugin/BloksAIPlugin/BloksAIPluginSuites.cpp b/BloksAIPlugin/BloksAIPlugin/BloksAIPluginSuites.cpp index e398875..02f359d 100644 --- a/BloksAIPlugin/BloksAIPlugin/BloksAIPluginSuites.cpp +++ b/BloksAIPlugin/BloksAIPlugin/BloksAIPluginSuites.cpp @@ -15,5 +15,5 @@ ImportSuite gImportSuites[] = kSPBlocksSuite, kSPBlocksSuiteVersion, &sSPBlocks, kAIUnicodeStringSuite, kAIUnicodeStringVersion, &sAIUnicodeString, kAIStringFormatUtilsSuite, kAIStringFormatUtilsSuiteVersion, &sAIStringFormatUtils, - nil, 0, nil + nullptr, 0, nullptr }; diff --git a/BloksAIPlugin/BloksAIPlugin/plugin.pipl b/BloksAIPlugin/BloksAIPlugin/plugin.pipl new file mode 100644 index 0000000000000000000000000000000000000000..7edbe13463e19d6bfd107ca99532117ec3c23502 GIT binary patch literal 116 zcmZQzU|?i`02W6VC)dofqGA{yNHc-N$}23)pke|6Ii=~DdA^C6c@Pnhe0FAD3QSLM afU6@&tROQl7pBK4CqKK`(G#K-CMf(U~HB17iImsA_v z0psL4E$Q0U{jKS0w7aHBTeGzZCix|USizJe)Vf)=x-GxdCYQjrv~dmDrJ3LNIrrXS zKxon3KlZbq-VgVlbDr~@=RD^*&w0){&pAWk6V2Qtj^h+~BN2{kK}b(F`~K;VGLGYB z%zk|acjk_F=d{GFcy~^TtJ}bdx1Av5zC!WiOq)>>;MME*EsS-(T zL3oC;8_)-!chl3%aUBU9H@Jc0>Tk*%2AGkbJ)C63J7UwL;){LG-9ErJW#U8pW#g6j zMvOgLj@z=>Q(5jSM}N-($bt9Ec=PbaJlQC{SVZGyfmg;TwPkAz5~A507hde~dMXfS zZEZk=>a4^Y^JEh}kF(YdL~1(+88896VvrEc=D4LJA%96tR03=G{+fuZeg&tgJWgdC z#})OQM*kB>$bP-@1VN5p^KqJ{uy1N4mCsg2x&r4FeBt%V;B?Ad&;MpqTW8Dzdd2)E z&Dnw?PE)#8e}m6e@n2D%=m8DhuB>W)R+Dk3|GvgczPp}v#AOu4`DX;e@qyO(#!LQd z`fy*um%@RLxTdhW>8BVnyj^v69SBXh&_XKYRk#KmoW@mvgz)bexBOt>ys{~xZu}2$ z?BW0p?ox(!sa&F&RXc43)E~07ART63b1EKaljw|CYY~HY`?X5z4;T(Y04}(a+TP7}G ze|l5I_li_)GC#n-&rhN1^bv5=bi?;8Wb^#J#Fbwa@heLss})k^$oVA{;OzB@*2eo) zO<{lGS#C8n=fVUvz<+-+|9+5lWsr5FDBMVr79#FT3cSra)OR0iLMb?mI1K#2{x6ml z7tT>PWke#8vd#K1WEIuua~v0qQ=~=X=QP9FozVBdwZVvAQ^SE=O{7Tp1*q`KNWCI( zF|H_*^fGnV#Rz%~T3ygO#&`+YHI5<(j4xCQ-$&uVdDSojpbxQ?^1pANOlo>6&iBA6 zg1o-AiRjYwV|egFCr0_4_f39!ia_r(71KD4gn%&I*t#502St_EX3}AlFEU7*UPNj zK~|1Nxx>{ZmP6(k<3gyNTgi|^Q!`1O!2&~zmaZC z2BvR$3kCdc7);+hBBg~YM|9&*_!?0VIS5#rs3aFsu+aY|!1>^8zqM%=;Ke15RsOA2 zfv+ez--fCx_3TFCf|Iycu`*2;ebf*w&{2B|)jk_7pyI6lB7Rg8{C6_J1eG;M48afPTV?55exEAzq-t$xu{c-3h=f+gVZNQ5-x&6P{>bkwUw9`SR9K*m zo6aeRHBcXpF=iks>f`jn=z5@NOojZMpVDq0AhQ{96!3oK>txsY3#d<-F%|RsMa=I7 zaT$+E^ZU8@#*3ro_v2_MU#NOrN%p<<+2oA-Q0xkdt&7WeVz}6q5ykvpCd&7B&~@q$Tp&CCM}2Vv+gg2=Xq=M>&Iloz!*`_ZXi{j zFnL)Y@@_?ZG5U})7B4L;sD%?1?o;X*eONFSy|X2(Z4++Pc~Ww}CTQ2lt7tVwd#F%T z6xk^mV{u01^EDQ>Z1LYA%2?BxcKp<4%ONWAegu{v77xSuwdk zCupDN$fmEkfeq`ZgN3#aShuRUvkPv89se*vT4;~iKJ#r7JUAY~g4-l`Xgq@JZj)g1 zcmykNli=a;2-e>w!6V}l+3id1S@ZoARR)D$>G779P+F3Rs|Pk7C%AqXRp{)T&(x*ho8iH?}nXrF%(4q*0LD?)>!^l)ImOQUiN6OmA&D)iJ~{0ZKBZ-*%kg{ zobHU}3jea`1#e+TFR|7_bOhhz7EdI%xX>HhjJ_%SJ@7)W&gR=kNJpeV{>W>CaMHmE zrw^~?KYu-|q%hy|fltLJHkFien(U@a{sH)A9f))OQphYR?4T1Q1>eE{!txp&SNR_d zyiJEyobP^~omKtKBz91B_qP`UYWc<9*-tAh9iEx|2SJ7({5lo2WgNT%4pb5c7h^bB6|fEXh?RWi(uGUI#&a$L)g-zc&?xdz)6vg^=?Mh&eVO4& znNbHY%cBlhKhl562PJ22f>4A$8SUQe)Q3m<-&;uQVnC25J8W6F7DI4la^Q2NXEC3z z2&oETZ@K-S(;2zvF5WQ|Xr24Wxj=X*FgSacnLk(L5cb~1bOYxh`Op%MyJ1(xwdW_3 zx4kNuukcN)nN=#R6_KP9nn=OeZHEO5g}r-4sM4g7%@Hy)$I*yZ|?lgP#l{I4I!PH(AxVm zkpkeCg~zbM4D9PyhV0$yTzj`8l7#yS8osbU2p9Eb>PPBC1HYzQ>O}sW)Q$Iy?8cpw z#qKCtExdwW#sLByZ3)C%yS-oRMte87PDr!22p}s0UTNNtoC?akZ{1j;JaI3!x zo*_tZ$n{>LM%}LfZ?03+MUkHemnlYIJ49@%srMv4t}yT-O9&AsU^r}&g*jhDR05~( ztFG=S77d$WtT+)1`&_PXo$GoO3z`svbp>4l7HJgsrMWZ^msley0ub*OyYI&$7JMLF zpGx=#F$IqgB;Uo2mPMB&iwh&{m2?W$Nq#VP5QE-3EgXUdNxkY2KE=s&>|j8g?ET6_ z>cK_)5?kR`E#fC($FdTy~@;`XBiMrT!Amxe|+F zj@4oc&y!Bm(i7QIZzz-M5bdveZ8(&#aI{ZW;aI6k{Q+)*C<9>y#`YGBA3E9-kG(rP`Q?h1lTccm zli6EALoAQNVp)_ZVI>q~jbVaSrNU+CZ7hiq8i(?z3-zPc97Qlk#kaP{b)o|4+_t3! z@fdmhx%zNYU-_r%3*{)<niLwZWcKN<-Oui7v=Y7`@4NIQH}QcaFieTaCc00Q|*&atTj{agh z*?btEkv3=sq)d|=F3c2$gN1KaAqW+|StQQa!F^qrvB+A17@Gqd$OvI_E_@RT3#*~S zs9NYK3Kez-_u)^F<|W}s=eCuGgY33-wNRK8=5Z8Inf2{mh7&NW6}b3qgw$(Xckj z=ih(oJ{*mZyX49L4ov>iY&X2R2h~{pFTxfdhv@w0{HnxY;gF?u*CPH`)R=gFcF4d5 zmucuGQnAp*_7*Cb(4gYWG=`buSIOCMC*f)JGi-A>5O{CO{x1lya|W(HM4o<&;*-LC zR{m!#6#dyJkDRk~jLMuHQcSfBsFx0e^5bk&O8v~=quVBhZEQI^H&ig!(xE=^4ZwDuZVCj+2K1;K34Y6--%K;wNq!x_oCEI%vZ;f6T2G~IzU&| z#LHH$LApzsydD-mz?Q56YKKr@1G(XKk`b77YxMIn`K=G&N^l5Vw$;}as|vo*z*{nXd~4Yw%1!2#mD zhus()oAVB^eX*BrQd#zss;HYnXyq+d^Bk(7USd-%Bx-JOv4nB>%r zM^L%kYqB&f`$<35O-;AX*x>JA2JHR289zhE5X7)4DGyU6+~pXLsbMu5W{3uZKmQh` zv|VK8l*mjsg5EkzA-E+gDu87=T_yF$we>DSOMCNRhRMdl&7^`7(-qq!Ga{}#6kIrx zq(KytN<^@!4S4(eQ!w6Y?u{fR1BA{_sEJ?y?n5UUJe(#teJ_2JcGLHMAAODW^tILE zTXiVu2n(hkV!{0`79>=%VBQuMEZT_R=+_gP5%6~IL?a6oCk`SE*_9^_Q@ZIY=9cz^ zt|vJtR2+AlGEW>rsy(3rUt+vHp^@cc5GOQCu^Pp??P0FH;V{xP!HH>}i6gioVG!xo z9*&=mUqNUn?YfQ@3O$&lFH*~~D$gEXWsbKhhx`K0Ax?M#6|C=5ww%er+IsW_u#4hq z14Mx?oP$8uGvRLPJ&c|LnD#!*tHl+O8q+4|edMfPFDC;p6;og4%Mb=-DIN#JjB;J>RpN90M z;#0hqc)3V54uA#v{lW<(MDX)imPEmaqTn~s#|#{Z#QEnp-SE#Xb`X^lfHz%{HR^SA z*7{;vj|w#?ihINffyg9(fk=AkFlnDr1m!U%`fz`+pT~uLoy(X_b_;*>69!=)#2GlB z+{QZv{f%L1-7F{!ic;RFzz73tY#`iC7wg^=>BuU9jk$`(Phg)a&YvJ0MdibF{Q$gU zVkVT{dui`duHg9AK)I5`=2{EN?Qyh?CG#O|s_DlDt`vDw{Uh``t&ju#i2>(zY~`*8 zoP#toEr2>=Eugnwhxa#+bciH ze&a3riJ;|upQ7nK|APYA7QVyszJJQuRmkj{0qE4}cP`_&)*j8YjvzCHpZ%;1KNPCx zG@BXI)abhcHWCu&zXRfpBrQa(7$MYV*D)wgBuNKI8;c79)M|ZO%PGLyg#GWK!U9D= znG!5e2p?1Rl!`}+h_h`$fpt=c`n8%5)iHm@i$5fuF{8Htl zr7E0er~>B}SU&K7Lf5L>_;Y=qmkJwD9ju?W@;I5Qx6Yti-l6DISh{@Rk$-1E{mKm3 zj)AoB=C;#uo7;qk#R5}=^AH+$NL*bULmLHmwUZ8^i0NsBJ<8 zpzx0~jJ0BXim(!qzJCLeJWI>=& z3ga(4#|rpVt~b#Jp_jmIf(9-acs3h*kR*nFN#NdYd`V|;tKC24LP84)#0h&a$c49% z111$|VNiTUOiV?&zo&A2y{F^YEYn~+iz1v)L1{XM!YM*R;EOo_R$&?tA%_PsARZ7o zSx-gL61A&?7<)`i`W{IO_v!E}nc#HdH#j}azUSGO5QEb@*|!Vd3kg(T9OS>LttLU} zfmAzdl&)+tLn~>pVuENX#DrOu4(eE%Y&vd5u)l>8^fOQYinG&TGOE%KqL(%POeoG- z%6p{MQ6&5b27)FC-~7Pt6mIVv$vB>l>zmEn`*}`(alaX4!|KDWd@C6R2_Y>!+Hg|8 zO@&&3mb!t2dk2ojNTr^UBwmSmjckP3(krQ+C? z5`HiA?n5<`1ab_tD^fbq_7Gdk;3P#jgARl#2{s)c5~9d4MA})sw0h#RhiV+b zre>CVia2=~oS+1lX}6zB!ml;k?Jv`89kic`BpEQ)ad@;Y^4XP;{Z!CCD7N6fE3i{v zz+X>m$dG*yCX5!5P#hJeU?mz2332N&aR%mHCMmWRm%g=bE2nvbK9*0tGuQH&F#S{U zV*zn4{^!62h2>LEFJ@c9-9otZ`E$4~=W@6LBSuum@p&nlU~P&fg!hpi`F9a8r1-gH z&?!Xx*ia2g`an&w4~V~@r2eCU5itpM=%k20F*sQ?`lYU%Oe{WV1uf9evhZ^yXf=(- zdEL~kKz~YLIyvv-YNpCdWOXBnFW?-2s|7shFNXGAEmpt4f4ZSLI3>7C5nQFj@xWRY zZ@j~Pg@BeI>v(Asbp0T>lxg3J!?bnQTK4&d>gyogWhBjRdP6Gea?1R(VgI-1O zab>Vr<`GywJkh3j`Pj6ZJ8X;`DWSbDM+$8CQpLD7(fJ50G!16@8oS)!F%BS zxFC!4O%?%s;kBA6>)-%Ow_o3@(_f6OSFDdO972`+rk>B*I0(ZxBk+E_L}L=aY2Y{s zBG3`vo{ri+>;yL_!50M`u;xAGEU=#FV zC@_$9YQHb*MFj-spVES#b%Ey>;~`|p~6fGRw{uwRs0wdJ| zcQpbS)Qf0fEn}k+-xvpLb2DF(q6{rn@sADZJA}93q-b$r9QO8M?E^e^(Sm0`HiYT; zl)3N3?agq>X9ZXn6y8rB4n}4dkvT+UPKsorH4c}0Yyd@85@HJ>enmvYZ!vlY&xyXp z&KTr=AkQJ>YlOTqN>${~KHv~SSZIFL09FyBqm8kv$5An#nQ38hn5%D4+^x!iu)Gb956n6J9sr z@gg2ycskIk=>6`8RCP;C)h(zx+#3S?rm9b)>ZEAZ(}<)Fo0MKNNRATOZ{aOyIYOCV zLMGbum*;=B1g>u5xPH7};Qa$OOq%T+mx9-fw*+q;-bTFt2k#lYU3fpj`vGmP@Z9GT z!xn@u;O)j+k9RZP0=&=SRn&6ahY0@z<>>iNHOD=Lw+=5o3qZ??_;tK3c>f+RRs~!$ z!bZH8@Y0hkg)X5gmVI!yc5Dpb8wr&$(X`CjEH)Zp1d~127 zw!9Yqf}-44?XCk}OkQkt#SZOq%&DHL@(L%xi+$xDpTC|fcKLmk?p-K}ok6XCTQy?y zyxN@ldM!h7R%%zeebrUfP7jx}oZz+9VqG`qi{*y%CDOwLP{(K*W8r|;oQevk*9-jB z`1cy+mDmB)iDAxGx8DaiaB|BlT&yj`_aglN7Kh)njR44Vc--|)kFVNEG;%7Q^jCYF zM9W$3brKJ;ZDR2~43A`}EiA7q--hOLd2a9_ij~R~VwFPSGB@Ea*RH9@{}Q445YMl! zg>c3AGN(`LD93-8aRS8ZU#=BJt6k=CL*~F2>(tsSt9@Rnyi=R+_UtG}H zjMk&gS)OXpQC^ALT}vSq)~>221{sYKPkF_5ZLZ(rb+f)Ibo;$dZJyYQYeo$!~}jSXK>z0;|+S5+~>z>7(X zyvGV@RQ@tILud43%P}3Uch^GjH_3P;UcKL^E!k5q^-pYGaYcFUh|;6#&UM%Agzji_ z-L-Cywz!^+m{B-6l{J2^ghE|Ra)_;?puDaUl@vNjBav59y@RO-#dB+`>$kegJf8W@D41L z@Fe^$qzT60624sSc0-xoe+x~tm+pSri}P2nF3HcyTai;*vT9XfLGkL6$L$5VCCdwP zA1_%^LcbiY%%4;IWJS&#$7*k-y?(pbzH(KbV^v9UHLdIM(150Q)vnsbm9@3e^a@xj z`);4J&dbbk6fWAY;T*YqPGzNir?bwtqS}i>qK?RUtDQUCJDnr58$e_w>(}q9D>o*fkm|K9>w7n7g(ThE0Z$ZQfo7 zE2DMpu5dDQ1b%>Lk4bWe!C$r>I)<0cSsqXM9&Md-m$uefx6Oyym*c!XPj%fktp0H<#ABw|jGzQ(w^(%xppNx??5MBByn^w*jWouiWeOn8Ct|rA*skIE4^v5b-L}|ioMUxKb+~uzfT@b=Lxy&# zvx@A zUF<;ruBn%GcKM3p5~^eDGFYbp+h5O$j)N0RmnJ%q^4RobTyd(y=#&Hly<^iIAQhsh z#^*_<;qW*m0o8k)eiGH6t`qnqERvNZDwOjA;sV4Y3lC!zT~o1L9$FYfYwD^i@E_^0 z)?!0LwAz46X>rA%UE`~+l?xH`c*5*^dmnQ5T*la&isE!oG=hp`|3<)WBQXT}V-@R+ zsZai2cjPQthj&XE-eR$ooJaf8M7%A?!>{z%Bj-&=>L3btBCm5)-V71-mcEHtlOM)> zDHkG9oJ9I%2}b#H9=!i-dzlTu=rY~FzaB$JF0&BjI{>FphQ-pMJQ+@59`I6NS7jLS zV?f#}!6;wOi=`7=hVsv#zr!d);aK>T*M+xMqATN2cobz$kC8`xb}$B?csqqO;max% z%M+skolxSH>xqqbjZ>~*lpYaYER6hQ{V{wHUqdlzB)NW+F@p|;luu7AZo9>X1b z{x@Sod_yAicOl~02(<`Hvv4|qw-a=fkKtc3;{A8LgLwZF?-zJ;ALqEo@xp)0{c0-5 zQJr^#nO_3-6`}?D_aj_goLAiX&U14YYTnL&^}_?zJKtF7p*H1ZY{Y(|&Rga5Y-ICA z>{p(rHcC4xF;9jruCLq*3fMPGFU4o$U6xyd|09LARoKAbJe>VY#>Kg-OH$V5<`A9BBVlwWf$JUtTh8#V zj)XD1o)Ity!@D*T#_)s@uo8yXKN8091^{cG27aagONqTaR|5Hq=@i;3a4x8ow&j~xhQN=6`aly87wZmyIq8$7r+)?6l zD{~b9AkKU2e|M(nQVAyv*kBxR=>K`9=tMp#W7P9N!e7rE1sah|K#FiciaQOL>xfJ# zL3w01nxW+~?$vQ{i5}s8^>Gn59%&`~pc1JOflQafE&13o1h@W~GCGtYV#LpMg!O*{ zpYVu&y;Np*Onq{_RA&R=6cX<;{8mHahuS;@eu$O|K3N3ON0tu(h;}ps5yGcei!#{= z<;Q3kmSxE(dNK}`BYFc;8~+nwww#IZ2k^Ja^~s@}E!SHK+A{w>#0lOwsy^bM9=O*T z?_E+Tr(HQ>d*$@#{KZR$xp6$u2 z>k7+hqeb>fepD{R94Hq9%K$7Ju#GXWA;1a%>xhA+)j%eIg=1hPfV~XZ!)X|IFb4K2U_QXcdj7Zg#5*RDw`4{2R!_NS&svUqB_6I*>|8706v6fgHvR{3 z`5vcJ!r&gauU=_ip-*ED7w&8ES!L@)=Ruj%<8gbky}ruq?DaY8982@EpWq6MOLHA? znTpsNuB&Tn?fCP#9GRi8koAtQ&aC2_TsUW8v zG>{0FxIFG%F&>Y3GG(|R%c|?D+%lcATI}1QKim%I4zCk2BUdI?R)*atoQ57l88(wU z;LI=0UA<;y$?`&bv=v_`A4y#Ws+}&I2~8!gSXLS;4BDz#Z1R164@N+{u?{SvZm7{-lm6dz8?PTpGYSrNDsc4q7 zZfCW}UAF^X0**6@bx0U+i0-cTmHEoI)}p2ql9sc=?{k)o$ha5v5gx~t*Hp3soFb zujoi-+>C&)%`M1T4ew#L#Awu=}}<8xE${aZZi9>fwfxB z!MQU0$k>XUyruT)o$N@Ma!~^pPq1CP&Eg&y+ibDl#I-3QQU3Pox=M=UQ4~AuIRt}m ze1{0)G$Z;=0$Q_n@2J({9FxwWZ1YnW>*i~nb?_x)GPKQKQI#qB>#p)G!V)E;+`D7( z&eZu@Od-`(SS6Ll)&^2qt<~qjG3jzFevp=gJ3aHY{%Y}hfo*v(Z->;^-)=FNJxF~m*Bra0H zKk5{z3sTck8&m%=H9oCA?ReV%OZzx2RbQ@uN&k_4P=BA{NyA?oUNv+WE*pMp;EXEc zGUEZ`H;u0ve`>s9{LuKZQDwT@^pL60w8rE#1x<%dCrvM!)-Bnysf2Et-OZA^l=^9^I_>ea%Cx^r zJDqku?Mm8*Y4h}{`p5OF^-cOi`XA|A_3uE=H}v-yOol>3vB7Qly5X4NMZ^1s9z(Ao z&N#(*k8z%Hweg_w1JgZA9#~>t@*VRV<{M^Z`orn_(@&&dNbgR+mL8vxn4!(6$k>zd z)r>&K^BFH>{6j`-#)XWZX8b1OlZ@YGY_Zf?{Fc3zZ(07$@(0Td>pxguwobFnv}tYg zZ7XblYkR@=kG8Y6f3+>hd^9sRb3hnZM1vk@-dD)U3O+lC!>?wIC}kYiZW%tgTtwv-V~k%KBl}Z?m{;7+J`P*S)4Y zultSe6Wyd#WolCDTFB`esYfBBpQQe4>e955w7c~VeU1Km`qTRJkj202ztB%J%rR^* zR2uw-{e}?q?{5s>HOw-GjXlOYO?jpo(;ic^>073wrWZ`7(CcSR7fru3{l?U1`lD&e z68Dn5OO7r1(UPale`kKte9rt+bC>zo=FiMSW_9|U^vv{z^rrN`f#hCJUz4#pqYAQm zIpfC}Z)N;E<7&nCoH{F2mug5gr*1J;8ePU(W4+O5+-=-zY%n&Ww+|Vcjfag#j7N>fj33gb zSthM1#k9b*(4;dNOlFhSlnn_Mm=-KqxTIrA=aQ}^LrXZb!mKo_%o=l|IoUkRtTm^Y z7nm2Cb!LOvY_^)S&3PEdE6fgaiFuuQqj`(D((E$Vn(NIz^KSEAbA!3je9(Nz+-yE< zK4LyGfNC5@SfGmm5*%{-HNKC>gUllo%|{6h#1r=3X)r}d=u zr>XRbdaXVi8tBvS)i+{H9@Zb#pVYssKcjyW`q-(ztnbka`dNmB2D4$EVT+;Oa2O-> zl%d-&Xiyku8MVd*MxD`Yv>Ho{>x|T!wdlix=)WWAHL=gmqo;b%O9MuQiTv}~;2~M3 z)ureb>U27@u0ZF|mFPC=w&+~CTAdFTuR+(SJEUvY9nl@tozZpa`gMt^3sdt_w=iEk Jir@0{{{c0mIJf`+ literal 30208 zcmeHw4OCRuwf{i}7N42)GXLK`_ugSZ zNYwY<`mg_6y~}&gJ^Spv&p!L?v(LHv9L9pj_ObDdF%|A`n6WmbbY=197d&DZn=fj1qKl9#SptjXbaA@8cMY@_k}*!HXmTWT#N_FM{Skm#v8wM;IhzD zS?()m?9Vd*+KBsJ-1)ept}Il&P(ow#V^PqAo7z%^JL<|}EVOWQRduCTmUSNr3C|sc zgx4(mTj=q6D)4@Y$`9ct*=le{U0EE@RoehWt|RD*sd3jwA>lQPvBkq7f6FNvSS|F| zgx$wiGHvByf;kVXnwZw~D`%_YO6BteIeev=XrKi>}?fcszQ@E#ZXbXTVUnQ#e->6P{+eisF{A??GUGNr)596@~qpuwPvocB+JqvJH=~ zZ-1@8QE;E|JF)F48@@a3Rchk0K$&(+h*U!b^$@?n`K~g~Q>p4WcI5d9OlI2iV8YZw|^6D}0r1rI?TZd3)%#uSF9pWeu{fwSSj=@~7dg#1&Z z^lz&}>nwz_gaWnr6A%YZYa-Qmfj|1WM7Z1$m+NBMqcOhOM^%1piFj%uV`MsKHmrYL z#oT%{t3+JE$<;EDWRB3g88F=Yq3d9tx;0PZlo)pG<_dvM!qdA*)YF=d-CEKSu8!S_ z@|$p`V|P*ns>2&)I(E-MLLRDP_uNS7eEE$FhWarc`iI8Du70ZUu!@h0pktt@q;zO( z2$#{=U`zjJP+?q2*qP#P+Qqar8u3%!S`>*W>Tp~~mDInJgii5Ucv4}oZ=8wXXn#1! z`?w|SpY}2toRk&XFP#F7FsqHEt9o9IZftqa_n`1*&~aVdJrmAQQ!4(uRLzi5K=v$= zeV0UPeNuCnfvz;{RS8+^Xy~e2LjKy))|LSjyAMLSPVr&9)-d-8WF)xrum(g#!-xcS z;7=#>3p>;Bx=?zxg}K%PuafR#{CBo;)jJPg$3PEnRZFC5Qz*(+U`z=G1Ex2`7iffj zKxV-E8~UE(jQF3DQd!r-v@EO0_ptD$tWEK0=n*=Ql_z6g9B}EatZe0-re;Jq89P(eAciH-xcl;iel^oOSYA8;=Orfa34OrWG z^kdPpcUzL+W#5CBT^nOrLtggOI5^to_oBS)rJJF&B`dOeq8e_>P^w&B1 z*(h{i$8lq9kFHZ1FJ(jhSBL>}V-H>v;yWAzYb0F3`Lr65*+5lPveh4O|mrd2EO*x`B}RULjt16W%WDOd4T{us;ox zT0hmI1uvSC3S%tJA!QApk`h|JJryD-{AP^Ck57BTnVX%jzDf-mxRnO^jBR{EyjhVy z#L{kr{Xb3vK*LTB@*cQZQP?Y+IvWH}%z72cOjV4Rmd}`s%D)-rhD0@gAjo-->-nN@=)VpNler?d9RaRXI za4M|@+QRTw?pxHd_d7}MTF6Vh+4Yovy3`e5J%D*A-cCc&Z=+7lq9)(ms?0x$xL}^k z2OCHNpBGskPQoaQtPdRnqiSRMt!TqvMAEIhdFc{bu3=3Y8KBEY6~TQgA|$jNr4GR$ zZ6vZ&3A5O(J09m~aDek^xif<-)Qo+k)PrA zdUH#mgqGF`QT@4XG@d61ZmmDfWR)&pfoy*)ggt>I&$e)>}8p?>@zk z?jyG_D$69!^41wPkHv8AZ8F?57Q?jLWVm-MhPk)NkOEz!>d<+c4EK-4aNTV(JTMkR z_iZvfI0nPECNO+b-L7no#4-u8;jg<5!yIN8zikB$sgO9K@4ek;Nxv=qoo5^43o=hK^9KMdJx=UB3YNS4=cc0n@4uxl)a zUAM`wdkltcJz#i~v6O_C<)ka61I~}d@*=UkS#NobxL`#%$Qvg4!&}yW&lsYdR3n~y zJNmyc2E(=)V0e@2it=Z@W3i)8+R;Y65-Q`V6tDWicw=1HnMHw49zYb7=;QrE(MOe9 ziojN4Z(vy1aYVFbc(hT8cYf=O;$@emaIzf!_nVct^7Bc&I_dKpilCtK1O%1Mm?sfZ z4$0BbAdiwOa{J?XV7YJV$Y}CI*#Eejw~4;wMSZ-~rhQT+L!s2Zcsb}RwBM*;isBAk z6i>Z4h#(+>e5O#TaP6hc;(|QuJ3ft&*fPJ0X|r11_74PXEpzeC{3THE^d26^R|%cM zyVe&eYVUtA@EXPJnQx}>42A5!HU1fj*Wd9E6sxzsyJOZW zP~wB>u>|$q%kktwIpnME;ANitGEwarC#0G}R~_n@ zs$iUNQq7D~@zp!I+0Z7I6n2l)Cyj^og^~Dspg-%dYV^&HYl3+YDr$9f)v%fbcO!bx zc{mX|>2Q#bWm3?eRHzF&LJ6fI_n@E9PgEtm<7jhsI8N+G3&c~iA+EF~(%~Rq%32-W zXAn(tVsi|8yy0$PfK-0fHwVyhft}sVHx($(!vm;25@dH=N9)<8$1#slA*50elI5L_ zgcd)xS6UsvcGeI|4K_C=4k?77Z4M=TGlby!{8x)tWapqN)!0?hp3$WN^kiYH;!uEd?PS7C284RGseV9$h8)C}o%OA*V1?h5Fr1 z)JNgp1ed6y=_ig!k01rRqz1kF04T$Yh?Mq>B2{a~B&Ge}OK;%eJ{}>ZaT6h(GA1eF zsO-|$iL@(13N!N0RT``vlN2F&*7ulOjL;=U(@h(b?hc}x4TUF;-RaYT6WH0stq;aU zmLBPkGb0=!-`MJ+4FY*%OCDj^SQ<8D=Y!`cLw14?XF9u~DyYWh3P$aQh!es1#0n2v zt#+95Q(NQ0(+{Fw$A|26Xv1T?dTN$Wh6&l%t*1P4W?pCDn#wC@0@vihKJ6HPWDy6=AL8qeipF*n|MvKkPc;TFwfN@ZU&EH6CySl0l(@v-9 zY)KWipIi1q9@Eu?7tff^f*v!74pp_h?VGtOoYFD_??{r6aF;B(AC1u2a@M~guPX3a zyysV@tLbLmkjyqps`d#^wdpK4B(B1acUXS|;RAW74Rxh!cspBFJn?r*a#dwXJF&tk zMdmg-G*uN7OHvmJzfWj+2!p4@bhT8D-$Z1$NwSB1bJ7!h_m3vNw0o%TAg92n6$vfx z;7w}Di;nX1)CP!VBzD(^uS_Tz94r6~js_$vYV6IDe zaiyv%eWlvBEaAl^aYZGj_aH%QO3OB?H&kUk<<$#$a7w<10%^>DkCWF)`y;8c1;7KS zs=`auIe{~pDr=d_)4k#GGPxd_Pld~vn_BZ!I8rbd+bEcw7`E}@z2UVtZlp5>Lnji1 zrK+|a@ZRVR$0_iT=s_&ef})aBsA#^$WUDC=3*pY9Sw!Yqdif%HoRpaQdGxK>s*V_v zTCRD-azo6*%6=((6XI z9o*UGQ3-K<V$%;uRFy>kQ7r(j8M>xmEX?5&hu&%6(;03LahZornlvp zAM%RS+N$8{9`Sy@j_I)u_^iVwj8CuO0LhJOJf+&Rm@`@(Jx+MjKY|068&T_w*FY;2 zoDW>X$|D;`c0%G$2+|SNUu7GlGZ|B9dt&(1#qAdQDlCK+midv7(jp`pP^WGN~cMZJVBYIU5K=JVj{ z^MznTmL)Xp!4r#5C=BOh&ib~(%skFWZxy2JqC3n3Y-s+54tsR)W;;xeYK4OSNcZ%J zQ$RbyaQVW*OPdY6cc5>6UPQQz(?I#cibSH8jltUENtLp9!X)1j^0ck0#n$$%_eJ60 z+}6Av;oMuF7L|zfi6tE;q0=Y3!syzkwoY;%gkuO#&xKn{e=^Z~cX+E-I9DpR!@4lv zY~f!Rj|fxx7GM(pIQXQN1GKb$DT6IyHs=RaFe1+4D+~}Cc)~f5PH9zTI*STL15UPK zeXo#CCDN*(W}9$EKHNgI1fZqC@Y61`|HLUh;TqNJO+q6Bp%~x2<3rAp((rU2cgC8& zDX0%x3C2tQ1X#f(^z9T}k~oTWOy<(l@{7KXOd&KRPX16D(l@q&ONAUQrk_dfV_Ze~ zs7%rV@Ckn8Jmn!nvxTZLxR?1|&C8!^Y5l zvaEdvHx&(9wKecn{)zD=xg+l69r2N(%@G};fgc>|2;|-Yi>cHRt*T|tRpJX+<9<$G zNaRs{p&9nEADPeKAWDTNwbpCHnvPJE&;jkd{=}T%iXl6B8|qEW=V$(48StEC(0pP( z*$EbA%VceFuR8CqMXfXPiHUD2dbm|pqiRrz*9g#JB7A!|u!_RBYzu(&V1lH;VEffo}{=@Pd zH1hJjbO_j`jm*ZZta(S%Z=hsxjc&zC+1=m?@iodt=Vm~_U8zlU7~9b#Lr6(>Ih zGy!K!*NgayfIpilYj+A9#5v?AL#u^F;`i`51Tz>m@jU&PFZ5&J8N4_6WTIl@o8`Os-8VE9=p0qN_psxmkZa#9MnY74K<=0rEmnI=C?SA$w2Hr4WH7wLL(jj<)Ffj-84ne z)v-Gz@|G5Pv&nDa>D}D#VLPX6Lwgy{7Dm=!&{qi#`U;oD*{DhRrfTJkrGuXC^QhQ; zg*=*aZj-*f-L1Sz8Asy=jvkL;IJvF6Nf;R?ZB!gx>uwTL##whG&hUs7(FJK%+-`2 zOUH!8YnXvyIUUasCSA09F!l-8Ve1Gi^Q6U{G=89BAxn$TRO>FXFu#=)9`xg1PjrjK zKlD*sdSN!r)EOh&bLnLOt-HuH{qx3P@g1;0zi4r$9SzAs(pPESMP@T5iCZEmmPmFG ziNU&ytjJ$EMlEKEq*)?4!IJ?Hz$BuLAl-iv%aDixpbwP(7-k7)WNld|tD2bhWB<61 z+dsav0NgJ96gu5TNJnW81d4Ve=xIA_c`BS}2n9Q0WGV*S1IYPUCq^|>vBWV=< zU}zMLdMX$*78Dq8U1#DtRI#>C-L`)*=ByE0C^UZ%N8pN&5FXF1zw{3n6adqQH}}so zAc1cpeSyD;lC^7P*LgkLRo!!@g0fsIFf{4gorztgNVHov_u=&sbvT+qr@rR1*2I@ zXKrh>?g1av^aPgkHB3}tGFXcMbi65asTXA8RY(?>Qi5m$`m7KK!~XZhN}_15(YUqPBM@CEIZS9R zp{G>%JD`>M&r?pk2pRS`E)FSU99PE6)Ut0v`oIHRLyCZ3f`AyC=!V(Eey!;&1^G`2 zr^H98YO#fP^F{GPXpdK}r^-cY$xbY;{R!!Is`e@Bkt^WE>kY^FCI-Uee6cvE-)BHK zm*S;Jf z!TXaL}9Ud{9+AuE;WJI=UU(Ke?)%;(k{H-cTIc-oG>QG z8$<1thslSOym}0lC^%JpDr>h7!$$~GI8`{NHoX8h19)acbC5aix zJH_wfiSg|tUgF;)b3CRU-sVj(Z4Rx4Q)(A~1SlL2$M~M~9xr|qFMWRkvMAt9+>Hk^ zXr1^GdK(od@qXrZP>|>(BRWDozB)1NpAq&aiT8qHExfb%636#x+{bAQKR{pz`vzZs zHqSiuWS1*9gpEI z8r?!$%@`fAfzM+6JH!mB?uTKv4@&iaiwK|(aOx{{zd|DI2I!NXwfBTR3-#q5RyAS1 z^j|3r^v-&XB(Bk|#r{cW_&1%VSSkxTt^^%}_`9nYUU=a(qL%<50ql4TpnQ4NUK1tYko&{P)S@^mt6)EUYpGW;(ko4V*&>`{CwjG|LFakXVBH zdH+2O1TaZxA}vqAjyRdtGm-+E?4)z%i)-4cVSaS3THFhCN}G|cT`Mb^Ye|4cNJD`? z(q#IZ&H(d3_X62^@L?#Y)sE-~P`0{sk1e_U5m z`r3+r&w3e-G#s{e_$IfU@lE)o`+3%c)n65&eppt`-AL=4K@)Yy_3-p$WDWG9lV13` zZu$&DDi~;WTsIZ;n+mR*I<0T|<4>*x?>=qIIsDn;smW89Fm|d}JE=3s*E65Ig+FF( zVp^#exi!L{O$*q`{Xt=9YIyp5@WmWP?#$f{6@;hj0cq#&;uUCmZF^e};O%1Y3}%3Q zRY0u@=BvaH(Quv{hg^HxT*N`CPo$M$Q3=+Dcfs1xJFy6&yz!9fYAau{xw~LVCC;F^ z7d*vplO-W!*0L7{5p3N<&u=!<^Sd-v1b@DRp1<6NXVu9*T=$zWePP6}y;LVsIf9Z>p z0XwhYxC4Z_2r;LQFUIY=Wz=2#x_noC3WFBnJlL{3Zl? z9yv_f3v}XS4w1ubG4uE9o+qepTA))W!QrhKhhZm@J~J@Fai_;70*z+MuJ8ku8!^}) zSi_&i{ORP+b^KY&pF8+-8-MQQ&prIv%%3Ot^EiLL!k@?Z^C*8F;m2y6uDqgO!p!2qzk37Z(nh;o9zRl9WbH82@o z<)i(e`w7uqC%R)1I!Ru~fK$9@bYVHAmniifPLP1;Ll218V9VISrA>0tvq)4qK_A$b`Kv+Lkuto}Z z0cb6R=EjHerDmW-IFJd|P*EopRig+x`rGwi(?H@j#*%TT;=b@z#{PUaWBM8*EH}};l7UYZop39{yOe$xYyubj=LXs6>hqEWIpGR&X!>x%dqaL zm`iTqqL>)P%DT2N?P~}|5ouN()9Ou3tHYgG%d{8rr1wqbmAdj;{QOM0uezZgKaVrA z%;PEFuB&%Fp{sS(Z}z!~SCLb<6f?A^s=UI*^S*MA&)>+3+ z;MHX}HtLE9#Z{?W(cr7Ds&;u;_ELh^R!jBXSdKcfD=J)GFL^6ITFoujIXGX}4yyd-MBO z2R-WV#F%$Z!~HOP#dN0C-odmXq)mxTJ201N8y{lYeeHd?-7BA{U07LL8_6$+mvU_Lx$3>#l}6x_ z-x?}W=(8&;9a~-XzU9?k5J|S7l&x~rHEeYaFILLPD9U{mZe9v`2GM_qp!0~&lzWzZ zpyU?4k-mmaDSj^+279L;Q;UGe4&l#ei1^$Jlwb|Dm2hYZgnaUrdUzL|Yg>hjyCKN4 z19MHIJlA-Ap6dF|I$uMBuC}3mGpnxOT3%aSsgvO_?rQE`7uPmy@n$b2d1>0<}8!nj&pUtNJ;mBc!T4;RTZ11{&KRe^4`uew$t zqE3psl;3`&7=wVj7=x&|L_$!?=zA;?cQ49%N0d>xsS(6iPUd?NBssVo4ZX{h`J@aDot(mP$G zqcr4maTmkp2u3(c_0hbd=?JeIc)loJ6qIR3e*Xx5gh%zz70oZ2mg) zy-66-b3SMej8aB=XarorCE4~NPxzzhoOmd>lx_r`3N}OOX!um7;8R_R$cx~i=oR5o zhF^zd_(eR1znWzDr7woRUS#--F@{s!3@51>PU|w9sAD)a!?5SiRu$zI{eIr0)=STv zTCp#rfB(=g=cW_y9LqXdJ9*b}C%+EgFuC|`(RHgD%In~**JW2WY;vv3aX8muHkB3v z-gTq<#&yG{ymj)2$#Cex#>!1n%jP1Xo32^7m*f;Lr&b@X5R-N|(rxl%hP!zd*f zK2kSgJOIA1ntt3gna7MV?ik|rY@uFXQH2kIi%LFcRdMo~oNN?f6JExVV2=^3e;8~j z#~T<9<9Jtw!JHg#a5#+PT^|N3=6I|ew#*id1+;rwV^3aEbq#D4OCgplOn6zK)c5 zQeAf<-S;_kgh%y+WSUMn?Us4{PR{>9&VPWEWbBvID{}d#a{0JIsqP6#iLX}9-zDeo zmGckC`T26*BX@ zt}md~u9D<<2r0=1v&WxNOY^A?DP@&Q>0io|ekdgvT}n!I(oJ#`EI*2e0$T%E7Rr>X z#x^|Pj)TaGp7uu3EBKTuvNS>Ntf+#oAqJ<&rld+S(a^mgJc&Qac?9nSJ29dj8c%d# z`+&EzTTYd{Cs)#qlE*<_j;G}R^f~4K=0Kf@2@?Nb%jr75q;oe?^;WFIQFcOJk0|Y+ zHKl6=-G1PcUXLJEXp!Y>CrYDf4}eyYuO~|0SC%sEo45&|)(O#clPG%;UtM2N zP9Lk}uazs8JpV?}MZt~%mIYXI6zmmvUngLU@a1a;;>BGXvG$9?%K+>&V45hr4S@9k z))|HOBw+giYm0&%0<0OZ(XRjPG4rG2DH^l9dXuNzv%QqD?~X%A7Eyr;1YPjyiFn=j zV)8sLmyE%dIaaN3EH@c>K!*wAGRxK=G+xF-<5^x`WmeYO>@{m1W6x0u!p~(5Rb?Iu zEJO;Oi*vIcV_&0kDO6tO@^~6NBgzYkN^+bC;!5@0&&tZcybOU1EFUS7JX?lD;wfd7 zh$eU%wzK?y#9TnJo$f*?+Oxf^4i;O6 zAWXv+R~f!FH&c-Np&Kzgh_-m@BN#D^7#F)e4No|R0zD7N68R8f1<$GmMb@%f#AfIx z_92j*aAS0J; z^)}-3*jL5$tjvdKYHA9zGHMNll*$^FczaoW1DB>AfgEZEEqr92WnPxVs?hJWf-6H1 zxE5O*Zgw}T<2{YktXTUePcN1bnwu`^tRfn`$9h1}pQ(;jJ>c zq{?3}?Ls7zCS4VNpGzr{h-N_+kFN|S1V-#G(NW=Uwnbb^QXAFMt~GnX;hP zu)wfDw!s@PDyti!5k{1g-lL00)`0&fV;mCaIgF@mrsTvT z@Hb}h1RB-Y?eIXSG`MMCm&X<>qe%g=y75cBa;CwP=PHL)xDb=_QdcZc75ZJC?N01x z(cVjag)654ZNRvgcq8|vm265B6eGe_UI`$3hoD8<5t6K4#&E*GOxLB;bVbt_Dsb-h1#)b!qXABy!P#e#$J&%r1%e$*e3E4IeSl+*n3?uw`&m zWzxhVO(}@)MDdma=U|L08eW={pS`Nc=gBIs=7rH^4n99g1<~-x+#^>MT{dhbBvnUM z{y)9$K<%lxm*QTIdj)Q%oMP(d`SnPPaj(WrANG&qrnMpc($e3q|2-O@6Q73=8PVZR zLbK9%lq9-+F{~+r+ecG0l)eJS0e}MzH^A}tMI(X0j9~=dhc}9s)FD+a-C@Rdk`t0I z{COs9)5&dLOFt2B8HDMBrq#{^q+BUwnC##i4yY%%z zWp(xVB*8^x!$v3pnJsf$U9ArL*|aZdpJQ04pQCftW4{4Q0sEZQ#d! zN9VH7+3xbr$;_BM(N^yDy6QI7Zr6c9z1Kbmiz$m2CobyBy$kB9D?AO}hAQ6zEafca z-nxZb4RdsuK&z{;Vl9cT4XkuJo6m#o@}*cN%G_pu0XNfZP6tXa7ChMN-Y(|>@wmS1 zM=h>Or>A-=X4=gzZ=^7~*umFIX!de!qt)UJ3!e5l<=&-y1?-ul^H)p9Ozd;2%4@x@ zIl4z8d~A=5U5o9JVKUhsi8K!6wnr4bA;Wv%Z;$^`4Pb_)aTuqcroUgmM!#8qSZ^}y zH~i5s)%dva`^IC&SB!U>=9-+Qqo!Wdb<>2D=_$^X-6{K1?l&(s?>E0?j!Df+ElJ&$ z`m@w<>dHk=FZ!oNe_ga7Es%C9Eg`)u{afj6>EkSmEp?VdmI2Eg>o#kbb-Znj?U?O- zTbg~Zz1^Oa;m&BwP-m{o{6?mj$#jUjLLRGrul`^33k^>hx()XkJ;q-dV@#_|&zn9q zEl>Gw%AZp*&0jbF$~+4-|2Xw}YQdsIi+;OkUfPbdt7)qAt?9edkEUNuud{5oG+X|| z@~K5-)mZPc-fLZ8O|e?7ORdMOaklBUM{HJGwrzv0-u4sQIop5OlI)M!tL)#ghwSg# z|JBYi?#{4g6lZMBcrN2-866pyGA3uv%lxOzGnv21?9J@Ugphi~9+BLmH|cZrh582l z*Y!WuzpQ^<-=TkB|B;>O9`cPr(8{m zHP12UrLIbKr~ZBF3#p%`-jQ~9+M8*q>9+LJ^!4d~m;Mjwt1N3QCoESjYU@_(UhDU* zuUX%-cG&*K_OWf6eV)C-{;d5Q_73}J_VF3&jM*7;GUjLGWh~2ZX4GUfWcV_=GyahA zK}LT@T;`pbb27^^D>IuiSr+0uaK4Y|Q}k}M^gH?==+EhY%iF0n%raOEIffO6)ds)e zt7zvlhE~Hj4Bs{!HXJql)bI<#FAb*+U54|93kDHwziPN{h%;)9I-}m0Wn5}pXRI|o zXZ*FX(e!=OPfce`zcY!ZKbhiECZ!~$xKf@@*_-n1lw&EUQo<=y&3)#3Q~jx}sozLF zni@(yliHp7VQSJM^P=x8+K~2K+8@#`qyM$(x^x3{QJd~f-<~d{e-pMa-tw@;Xjx`y zfgK*RylgpbdCS7AYU@nvLsm0vBHLPEZL}V?F1Ky5`E9#x->@C9y=rT>iMGqODfY+h z8|_~EF8e|IKiX3>GBcKBd@bX<8AmeS&3Hd!Amh^vRpwopvoq&rF3e2Hv}9&w=4CF= zT$Q;da|3i&li8TLHFHPi)0ulRzm~Z_^V^w+GJll$dgfc1ACe6@rM1;0{cL@@{xSWR z^}F=@^*`3Xt^d8gSO1~@s{TLqD#IkhG{fBnodNTY!ECTW*N++s4QmYB4KEu$fG+15 zmt%}PZTyz;1noF%#2-zfuX^=bL!u$cFvE~+m}{7C&>K<=X@=znr=i%8WzIF{o0prN z=3?_2^E&fJbEVmBt~EEBedcZE9p)x;vw4qsuX!KF_yO}l^C9yQ^HK9L^KtVDbDQ}U zbI5$!+-dGIcbm_fd(0Qiz2=K%(cEtyFkdkbny;H#sw!2Ts!7$RCZ;B(&PdgzCa1DR zszv)2?O$|YQD=HrdUyKy^q%w!>AmR})5Y}u^nvs%>4WLl)0stOQCln zS&}VtE%PmUONu4UVzXpfaxM9mm>RQ8_Aa);nv@SF|RTv8|NF-jBAV=jg7|r#)HNq@USP~V^15q zjOUFPj2Dgl#w*6_MwLlpN;J)YN0@I)G1*M{Cb!9F+HX2&I$}C*>NfS5E}HsH`jp(1 z;*`pi#*}?2hf+?%JM^Te&2xF*I?=DxtF`FMJ?KZN7muRvsKn~nh0QnQ R8aDF1FOdK3`u|J={}&Z_^)CPb diff --git a/BloksAIPlugin/Vendor/common/includes/AppContext.hpp b/BloksAIPlugin/Vendor/common/includes/AppContext.hpp index 21ff490..a8ae18d 100644 --- a/BloksAIPlugin/Vendor/common/includes/AppContext.hpp +++ b/BloksAIPlugin/Vendor/common/includes/AppContext.hpp @@ -1,33 +1,33 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/AppContext.hpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __AppContext_hpp__ -#define __AppContext_hpp__ - -#ifndef __SPAccess__ -#include "SPAccess.h" -#endif - -class AppContext -{ -protected: - void *fAppContext; - -public: - AppContext(SPPluginRef plugin); - ~AppContext(); -}; - -#endif +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __AppContext_hpp__ +#define __AppContext_hpp__ + +#ifndef __SPAccess__ +#include "SPAccess.h" +#endif + +class AppContext +{ +protected: + void *fAppContext; + +public: + AppContext(SPPluginRef plugin); + ~AppContext(); +}; + +#endif diff --git a/BloksAIPlugin/Vendor/common/includes/ArtMatcher.hpp b/BloksAIPlugin/Vendor/common/includes/ArtMatcher.hpp index 9f30522..d5f9ee0 100644 --- a/BloksAIPlugin/Vendor/common/includes/ArtMatcher.hpp +++ b/BloksAIPlugin/Vendor/common/includes/ArtMatcher.hpp @@ -1,54 +1,54 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/ArtMatcher.hpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef _ARTMATCHER_HPP_ -#define _ARTMATCHER_HPP_ - -#include "AIArt.h" -#include "AIMatchingArt.h" - -class ArtMatcher -{ -public: - ArtMatcher(ai::int16 iNumSpecs, AIBoolean matchArtInDictionaries = false); - virtual ~ArtMatcher(void); - // - ASErr SetSpec(ai::int16 iX, ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr); - // - ASErr GetMatchingArt(void); - ai::int32 GetNumMatches(void); - AIArtHandle GetMatchedArt(ai::int32 iX); - void ClearMatchedArt(ai::int32 iX); // to enable multi-pass algorithms to filter out some of the matches - // - enum eArtMatcherErrors - { - AM_OK = kNoErr, - AM_InvalidIndex, - AM_InvalidSuite, - AM_NumErrs - }; - // -private: - ai::int16 m_iNumSpecs; - AIMatchingArtSpec *m_pSpecs; - AIBoolean m_MatchArtInDictionaries; - - // - ai::int32 m_lNumMatches; - AIArtHandle **m_hMatches; -}; - -#endif // _ARTMATCHER_HPP_ - +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef _ARTMATCHER_HPP_ +#define _ARTMATCHER_HPP_ + +#include "AIArt.h" +#include "AIMatchingArt.h" + +class ArtMatcher +{ +public: + ArtMatcher(ai::int16 iNumSpecs, AIBoolean matchArtInDictionaries = false); + virtual ~ArtMatcher(void); + // + ASErr SetSpec(ai::int16 iX, ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr); + // + ASErr GetMatchingArt(void); + ai::int32 GetNumMatches(void); + AIArtHandle GetMatchedArt(ai::int32 iX); + void ClearMatchedArt(ai::int32 iX); // to enable multi-pass algorithms to filter out some of the matches + // + enum eArtMatcherErrors + { + AM_OK = kNoErr, + AM_InvalidIndex, + AM_InvalidSuite, + AM_NumErrs + }; + // +private: + ai::int16 m_iNumSpecs; + AIMatchingArtSpec *m_pSpecs; + AIBoolean m_MatchArtInDictionaries; + + // + ai::int32 m_lNumMatches; + AIArtHandle **m_hMatches; +}; + +#endif // _ARTMATCHER_HPP_ + diff --git a/BloksAIPlugin/Vendor/common/includes/CASFault.hpp b/BloksAIPlugin/Vendor/common/includes/CASFault.hpp index fc612e2..0d28619 100644 --- a/BloksAIPlugin/Vendor/common/includes/CASFault.hpp +++ b/BloksAIPlugin/Vendor/common/includes/CASFault.hpp @@ -1,61 +1,61 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/CASFault.hpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef _CASFAULT_HPP_ -#define _CASFAULT_HPP_ - -//////////////////////////////////////////////////////////////////////// -// -// A very simple exception class which allows Illustrator error codes to be -// returned as exceptions. -// -// Example of use: -// -// ASErr -// Foo(void) -// { -// ASErr result = kNoErr; -// ... -// try -// { -// ... -// throw CASFault(kBadParameterErr); -// ... -// } -// catch (CASFault &f) // catch by (C++) reference -// { -// // assigns the ASErr field -// result = f; -// } -// -// return result; -// } -// -//////////////////////////////////////////////////////////////////////// - -class CASFault { -public: - CASFault (ASErr id) : fId(id) - {} - - operator ASErr() const - {return fId;} - -protected: - ASErr fId; -}; - -#endif // _CASFAULT_HPP_ - +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef _CASFAULT_HPP_ +#define _CASFAULT_HPP_ + +//////////////////////////////////////////////////////////////////////// +// +// A very simple exception class which allows Illustrator error codes to be +// returned as exceptions. +// +// Example of use: +// +// ASErr +// Foo(void) +// { +// ASErr result = kNoErr; +// ... +// try +// { +// ... +// throw CASFault(kBadParameterErr); +// ... +// } +// catch (CASFault &f) // catch by (C++) reference +// { +// // assigns the ASErr field +// result = f; +// } +// +// return result; +// } +// +//////////////////////////////////////////////////////////////////////// + +class CASFault { +public: + CASFault (ASErr id) : fId(id) + {} + + operator ASErr() const + {return fId;} + +protected: + ASErr fId; +}; + +#endif // _CASFAULT_HPP_ + diff --git a/BloksAIPlugin/Vendor/common/includes/FlashUIController.h b/BloksAIPlugin/Vendor/common/includes/FlashUIController.h index f27530b..93f350d 100644 --- a/BloksAIPlugin/Vendor/common/includes/FlashUIController.h +++ b/BloksAIPlugin/Vendor/common/includes/FlashUIController.h @@ -1,58 +1,58 @@ -//======================================================================================== -// -// $File: //ai/ai16/devtech/sdk/public/samplecode/common/includes/FlashUIController.h $ -// -// $Revision: #1 $ -// -// Copyright 2011 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __FLASHUICONTROLLER_H__ -#define __FLASHUICONTROLLER_H__ - -#include "SDKPlugPlug.h" -#include "IllustratorSDK.h" -#include "Suites.hpp" - -class FlashUIController -{ -public: - - FlashUIController(const char* extensionId); - - virtual ~FlashUIController(void); - - virtual PlugPlugErrorCode LoadExtension(); - - virtual PlugPlugErrorCode UnloadExtension(); - - /** Registers the events this plug-in will listen for with PlugPlug. - @return error code if error found, or success otherwise. - */ - virtual csxs::event::EventErrorCode RegisterCSXSEventListeners() = 0; - - /** Removes the previously added event listeners from PlugPlug. - @return error code if error found, or success otherwise. - */ - virtual csxs::event::EventErrorCode RemoveEventListeners() = 0; - - virtual ASErr SendData() = 0; - - virtual void ParseData(const char* eventData) = 0; - -protected: - - SDKPlugPlug fPPLib; - -private: - - const char* fExtensionId; -}; - -#endif +//======================================================================================== +// +// $File: //ai/ai16/devtech/sdk/public/samplecode/common/includes/FlashUIController.h $ +// +// $Revision: #1 $ +// +// Copyright 2011 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __FLASHUICONTROLLER_H__ +#define __FLASHUICONTROLLER_H__ + +#include "SDKPlugPlug.h" +#include "IllustratorSDK.h" +#include "Suites.hpp" + +class FlashUIController +{ +public: + + FlashUIController(const char* extensionId); + + virtual ~FlashUIController(void); + + virtual PlugPlugErrorCode LoadExtension(); + + virtual PlugPlugErrorCode UnloadExtension(); + + /** Registers the events this plug-in will listen for with PlugPlug. + @return error code if error found, or success otherwise. + */ + virtual csxs::event::EventErrorCode RegisterCSXSEventListeners() = 0; + + /** Removes the previously added event listeners from PlugPlug. + @return error code if error found, or success otherwise. + */ + virtual csxs::event::EventErrorCode RemoveEventListeners() = 0; + + virtual ASErr SendData() = 0; + + virtual void ParseData(const char* eventData) = 0; + +protected: + + SDKPlugPlug fPPLib; + +private: + + const char* fExtensionId; +}; + +#endif diff --git a/BloksAIPlugin/Vendor/common/includes/HtmlUIController.h b/BloksAIPlugin/Vendor/common/includes/HtmlUIController.h index cc51c12..6952774 100644 --- a/BloksAIPlugin/Vendor/common/includes/HtmlUIController.h +++ b/BloksAIPlugin/Vendor/common/includes/HtmlUIController.h @@ -1,58 +1,58 @@ -//======================================================================================== -// -// $File: //ai/ai16/devtech/sdk/public/samplecode/common/includes/HtmlUIController.h $ -// -// $Revision: #1 $ -// -// Copyright 2011 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __HTMLUICONTROLLER_H__ -#define __HTMLUICONTROLLER_H__ - -#include "SDKPlugPlug.h" -#include "IllustratorSDK.h" -#include "Suites.hpp" - -class HtmlUIController -{ -public: - - HtmlUIController(const char* extensionId); - - virtual ~HtmlUIController(void); - - virtual PlugPlugErrorCode LoadExtension(); - - virtual PlugPlugErrorCode UnloadExtension(); - - /** Registers the events this plug-in will listen for with PlugPlug. - @return error code if error found, or success otherwise. - */ - virtual csxs::event::EventErrorCode RegisterCSXSEventListeners() = 0; - - /** Removes the previously added event listeners from PlugPlug. - @return error code if error found, or success otherwise. - */ - virtual csxs::event::EventErrorCode RemoveEventListeners() = 0; - - virtual ASErr SendData() = 0; - - virtual void ParseData(const char* eventData) = 0; - -protected: - - SDKPlugPlug htmlPPLib; - -private: - - const char* htmlExtensionId; -}; - -#endif +//======================================================================================== +// +// $File: //ai/ai16/devtech/sdk/public/samplecode/common/includes/HtmlUIController.h $ +// +// $Revision: #1 $ +// +// Copyright 2011 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __HTMLUICONTROLLER_H__ +#define __HTMLUICONTROLLER_H__ + +#include "SDKPlugPlug.h" +#include "IllustratorSDK.h" +#include "Suites.hpp" + +class HtmlUIController +{ +public: + + HtmlUIController(const char* extensionId); + + virtual ~HtmlUIController(void); + + virtual PlugPlugErrorCode LoadExtension(); + + virtual PlugPlugErrorCode UnloadExtension(); + + /** Registers the events this plug-in will listen for with PlugPlug. + @return error code if error found, or success otherwise. + */ + virtual csxs::event::EventErrorCode RegisterCSXSEventListeners() = 0; + + /** Removes the previously added event listeners from PlugPlug. + @return error code if error found, or success otherwise. + */ + virtual csxs::event::EventErrorCode RemoveEventListeners() = 0; + + virtual ASErr SendData() = 0; + + virtual void ParseData(const char* eventData) = 0; + +protected: + + SDKPlugPlug htmlPPLib; + +private: + + const char* htmlExtensionId; +}; + +#endif diff --git a/BloksAIPlugin/Vendor/common/includes/IllustratorSDK.h b/BloksAIPlugin/Vendor/common/includes/IllustratorSDK.h index f76547e..4a4f928 100644 --- a/BloksAIPlugin/Vendor/common/includes/IllustratorSDK.h +++ b/BloksAIPlugin/Vendor/common/includes/IllustratorSDK.h @@ -1,90 +1,90 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/IllustratorSDK.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __IllustratorSDK__ -#define __IllustratorSDK__ - -#include "SPConfig.h" - -// std library -#include -#include -#include -#include -#include -#include -#include - -// several methods are now deprecated on windows xp but not mactel or ppc, the following define statements determine which method -// name to use on which platform - -#ifdef MAC_ENV - #include -#endif - -#ifdef WIN_ENV - #include "windows.h" - #include - //The following defines were added to keep the methods cross platform after they were deprecated on Windows. - #define strcpy strcpy_s - #define sprintf sprintf_s - #define strncpy strncpy_s - #define strcat strcat_s - #define _strdate _strdate_s - #define fopen fopen_s - #define _strtime _strtime_s -#endif - -using namespace std; - - -// sweet pea headers -#include "SPTypes.h" -#include "SPBlocks.h" - -// illustrator headers -#include "AITypes.h" -#include "AIArt.h" -#include "AIArtSet.h" -#include "AICSXSExtension.h" -#include "AIDictionary.h" -#include "AIDocument.h" -#include "AIHardSoft.h" -#include "AILayer.h" -#include "AILegacyTextConversion.h" -#include "AIMatchingArt.h" -#include "AIMdMemory.h" -#include "AIMenu.h" -#include "AIMenuGroups.h" -#include "AINotifier.h" -#include "AIPath.h" -#include "AIPathStyle.h" -#include "AIPlugin.h" -#include "AIPreference.h" -#include "AITextFrame.h" -#include "AITimer.h" -#include "AITool.h" -#include "AIRuntime.h" -#include "AIUndo.h" -#include "AIUser.h" - -// ATE text API -#include "IText.h" - -// SDK common headers -#include "Suites.hpp" -#include "Plugin.hpp" - -#endif // __IllustratorSDK__ +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __IllustratorSDK__ +#define __IllustratorSDK__ + +#include "SPConfig.h" + +// std library +#include +#include +#include +#include +#include +#include +#include + +// several methods are now deprecated on windows xp but not mactel or ppc, the following define statements determine which method +// name to use on which platform + +#ifdef MAC_ENV + #include +#endif + +#ifdef WIN_ENV + #include "windows.h" + #include + //The following defines were added to keep the methods cross platform after they were deprecated on Windows. + #define strcpy strcpy_s + #define sprintf sprintf_s + #define strncpy strncpy_s + #define strcat strcat_s + #define _strdate _strdate_s + #define fopen fopen_s + #define _strtime _strtime_s +#endif + +using namespace std; + + +// sweet pea headers +#include "SPTypes.h" +#include "SPBlocks.h" + +// illustrator headers +#include "AITypes.h" +#include "AIArt.h" +#include "AIArtSet.h" +#include "AICSXSExtension.h" +#include "AIDictionary.h" +#include "AIDocument.h" +#include "AIHardSoft.h" +#include "AILayer.h" +#include "AILegacyTextConversion.h" +#include "AIMatchingArt.h" +#include "AIMdMemory.h" +#include "AIMenu.h" +#include "AIMenuGroups.h" +#include "AINotifier.h" +#include "AIPath.h" +#include "AIPathStyle.h" +#include "AIPlugin.h" +#include "AIPreference.h" +#include "AITextFrame.h" +#include "AITimer.h" +#include "AITool.h" +#include "AIRuntime.h" +#include "AIUndo.h" +#include "AIUser.h" + +// ATE text API +#include "IText.h" + +// SDK common headers +#include "Suites.hpp" +#include "Plugin.hpp" + +#endif // __IllustratorSDK__ diff --git a/BloksAIPlugin/Vendor/common/includes/IllustratorSDKDebug.pch b/BloksAIPlugin/Vendor/common/includes/IllustratorSDKDebug.pch index 1136836..003ae84 100644 --- a/BloksAIPlugin/Vendor/common/includes/IllustratorSDKDebug.pch +++ b/BloksAIPlugin/Vendor/common/includes/IllustratorSDKDebug.pch @@ -1,23 +1,23 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/IllustratorSDKDebug.pch $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -// Debug configuration prefix header for pre-compiled headers on Macintosh - -/* Turn on debugging */ -#define DEBUG 1 -#define _DEBUG 1 -#include "PluginStd.h" -#include "IllustratorSDK.h" - +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +// Debug configuration prefix header for pre-compiled headers on Macintosh + +/* Turn on debugging */ +#define DEBUG 1 +#define _DEBUG 1 +#include "PluginStd.h" +#include "IllustratorSDK.h" + diff --git a/BloksAIPlugin/Vendor/common/includes/IllustratorSDKRelease.pch b/BloksAIPlugin/Vendor/common/includes/IllustratorSDKRelease.pch index 04f4394..4284fe1 100644 --- a/BloksAIPlugin/Vendor/common/includes/IllustratorSDKRelease.pch +++ b/BloksAIPlugin/Vendor/common/includes/IllustratorSDKRelease.pch @@ -1,20 +1,20 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/IllustratorSDKRelease.pch $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -// Release configuration prefix header for pre-compiled headers on Macintosh - -#include "PluginStd.h" -#include "IllustratorSDK.h" - +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +// Release configuration prefix header for pre-compiled headers on Macintosh + +#include "PluginStd.h" +#include "IllustratorSDK.h" + diff --git a/BloksAIPlugin/Vendor/common/includes/Plugin.hpp b/BloksAIPlugin/Vendor/common/includes/Plugin.hpp index d4ecad6..47d1eb4 100644 --- a/BloksAIPlugin/Vendor/common/includes/Plugin.hpp +++ b/BloksAIPlugin/Vendor/common/includes/Plugin.hpp @@ -1,162 +1,165 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/Plugin.hpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __Plugin_hpp__ -#define __Plugin_hpp__ - -#include - -#include "AIActionManager.h" -#include "AIClipboard.h" -#include "AIFilter.h" -#include "AIFileFormat.h" -#include "AILiveEffect.h" -#include "AIMenu.h" -#include "AIMask.h" -#include "AINotifier.h" -#include "AIPluginGroup.h" -#include "AITool.h" -#include "AITimer.h" -#include "AIWorkspace.h" -#include "VTableSupport.hpp" - -#include "Suites.hpp" - -#define kMaxStringLength 256 - -#define kCppPluginStrID 16600 - -#define iAboutBoxPluginName 1 -#define iAboutBoxAuthor 2 - -#define kUnhandledMsgErr '!MSG' // This isn't really an error - -// Tell Xcode to export the following symbols -#if defined(__GNUC__) -#pragma GCC visibility push(default) -#endif - -// Plug-in entry point -extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message); - -// Tell Xcode to return to default visibility for symbols -#if defined(__GNUC__) -#pragma GCC visibility pop -#endif - -class Plugin -{ -protected: - SPPluginRef fPluginRef; - char fPluginName[kMaxStringLength]; - Suites *fSuites; - int fLockCount; - SPAccessRef fPluginAccess; - ASErr fLastError; - long fErrorTimeout; - ASBoolean fSupressDuplicateErrors; - time_t fLastErrorTime; - -public: - Plugin(SPPluginRef pluginRef); - Plugin() {} - virtual ~Plugin(); - void *operator new(size_t size); - void operator delete(void *pMem); - - ASBoolean SuitesAcquired() { return fSuites != nil; } - virtual void ReportError(ASErr error, char *caller, char *selector, void *message); - static void DefaultError(SPPluginRef ref, ASErr error); - static ASBoolean FilterError(ASErr error); - - SPPluginRef GetPluginRef() { return fPluginRef; } - - virtual ASErr LockPlugin(ASBoolean lock); - static ASBoolean IsReloadMsg(char *caller, char *selector); - - virtual ASErr StartupPlugin(SPInterfaceMessage *message); - virtual ASErr PostStartupPlugin(); - virtual ASErr ShutdownPlugin(SPInterfaceMessage *message); - virtual ASErr UnloadPlugin(SPInterfaceMessage *message); - virtual ASErr ReloadPlugin(SPInterfaceMessage *message); - virtual ASErr AcquireProperty(SPPropertiesMessage *message); - virtual ASErr ReleaseProperty(SPPropertiesMessage *message); - virtual void GetPluginName(char *name, unsigned int maxlen); - - virtual ASBoolean Purge(); - virtual ASErr Message(char *caller, char *selector, void *message); - virtual ASErr SetGlobal(Plugin *plugin); - - virtual ASErr AllocateSuiteTables(); - virtual ASErr FillSuiteTables(); - virtual ASErr EmptySuiteTables(); - - virtual ASErr AcquireOptionalSuites(); - - virtual ASErr Notify(AINotifierMessage *message); - - virtual ASErr GoAction(DoActionMessage *message); - - virtual ASErr GoMenuItem(AIMenuMessage *message); - virtual ASErr UpdateMenuItem(AIMenuMessage *message); - - virtual ASErr GetFilterParameters(AIFilterMessage *message); - virtual ASErr GoFilter(AIFilterMessage *message); - - virtual ASErr PluginGroupNotify(AIPluginGroupMessage *message); - virtual ASErr PluginGroupUpdate(AIPluginGroupMessage *message); - - virtual ASErr GetFileFormatParameters(AIFileFormatMessage *message); - virtual ASErr GoFileFormat(AIFileFormatMessage *message); - virtual ASErr CheckFileFormat(AIFileFormatMessage *message); - virtual ASErr FileFormatUpdate(AIUpdateFileFormatMessage *message); - virtual ASErr SetFileFormatParameters(DoActionMessage *message); - - virtual ASErr EditTool(AIToolMessage *message); - virtual ASErr TrackToolCursor(AIToolMessage *message); - virtual ASErr ToolMouseDown(AIToolMessage *message); - virtual ASErr ToolMouseDrag(AIToolMessage *message); - virtual ASErr ToolMouseUp(AIToolMessage *message); - virtual ASErr SelectTool(AIToolMessage *message); - virtual ASErr DeselectTool(AIToolMessage *message); - virtual ASErr ReselectTool(AIToolMessage *message); - virtual ASErr DecreaseDiameter(AIToolMessage *message); - virtual ASErr IncreaseDiameter(AIToolMessage *message); - - virtual ASErr EditLiveEffectParameters(AILiveEffectEditParamMessage * message); - virtual ASErr GoLiveEffect(AILiveEffectGoMessage * message); - virtual ASErr LiveEffectInterpolate(AILiveEffectInterpParamMessage * message); - virtual ASErr LiveEffectGetInputType(AILiveEffectInputTypeMessage * message); - virtual ASErr LiveEffectConvertColorSpace(AILiveEffectConvertColorMessage * message); - virtual ASErr LiveEffectScaleParameters(AILiveEffectScaleParamMessage * message); - virtual ASErr LiveEffectAdjustColors(AILiveEffectAdjustColorsMessage * message); - virtual ASErr LiveEffectHandleMerge(AILiveEffectHandleMergeMessage * message); - - virtual ASErr GoTimer(AITimerMessage * message); - - virtual ASErr GoClipboard( AIClipboardMessage *message ); - virtual ASErr CanCopyClipboard( AIClipboardMessage *message ); - virtual ASErr CloneClipboard( AIClipboardMessage *message ); - virtual ASErr DisposeClipboard( AIClipboardMessage *message ); - - virtual ASErr WorkspaceWrite( AIWorkspaceMessage *message ); - virtual ASErr WorkspaceRestore( AIWorkspaceMessage *message ); - virtual ASErr WorkspaceDefault( AIWorkspaceMessage *message ); - -private: - static char *FindMsg(SPPluginRef ref, ASErr error, char *buf, int len); -}; - -#endif +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __Plugin_hpp__ +#define __Plugin_hpp__ + +#include + +#include "AIActionManager.h" +#include "AIClipboard.h" +#include "AIFilter.h" +#include "AIFileFormat.h" +#include "AILiveEffect.h" +#include "AIMenu.h" +#include "AIMask.h" +#include "AINotifier.h" +#include "AIPluginGroup.h" +#include "AITool.h" +#include "AITimer.h" +#include "AIWorkspace.h" +#include "VTableSupport.hpp" + +#include "Suites.hpp" + +#define kMaxStringLength 256 + +#define kCppPluginStrID 16600 + +#define iAboutBoxPluginName 1 +#define iAboutBoxAuthor 2 + +#define kUnhandledMsgErr '!MSG' // This isn't really an error + +// Tell Xcode to export the following symbols +#if defined(__GNUC__) +#pragma GCC visibility push(default) +#endif + +// Plug-in entry point +extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message); + +// Tell Xcode to return to default visibility for symbols +#if defined(__GNUC__) +#pragma GCC visibility pop +#endif + + +class Plugin +{ +protected: + SPPluginRef fPluginRef; + char fPluginName[kMaxStringLength]; + Suites *fSuites; + int fLockCount; + SPAccessRef fPluginAccess; + ASErr fLastError; + long fErrorTimeout; + ASBoolean fSupressDuplicateErrors; + time_t fLastErrorTime; + AINotifierHandle fApplicationStartedNotifier{}; + AINotifierHandle fApplicationShutdownNotifer{}; +public: + Plugin(SPPluginRef pluginRef); + Plugin() {} + virtual ~Plugin(); + void *operator new(size_t size); + void operator delete(void *pMem); + + ASBoolean SuitesAcquired() { return fSuites != nullptr; } + virtual void ReportError(ASErr error, char *caller, char *selector, void *message); + static void DefaultError(SPPluginRef ref, ASErr error); + static ASBoolean FilterError(ASErr error); + + SPPluginRef GetPluginRef() { return fPluginRef; } + + virtual ASErr LockPlugin(ASBoolean lock); + static ASBoolean IsReloadMsg(char *caller, char *selector); + + virtual ASErr StartupPlugin(SPInterfaceMessage *message); + virtual ASErr PostStartupPlugin(); + virtual ASErr PreShutdownPlugin(); + virtual ASErr ShutdownPlugin(SPInterfaceMessage *message); + virtual ASErr UnloadPlugin(SPInterfaceMessage *message); + virtual ASErr ReloadPlugin(SPInterfaceMessage *message); + virtual ASErr AcquireProperty(SPPropertiesMessage *message); + virtual ASErr ReleaseProperty(SPPropertiesMessage *message); + virtual void GetPluginName(char *name, unsigned int maxlen); + + virtual ASBoolean Purge(); + virtual ASErr Message(char *caller, char *selector, void *message); + virtual ASErr SetGlobal(Plugin *plugin); + + virtual ASErr AllocateSuiteTables(); + virtual ASErr FillSuiteTables(); + virtual ASErr EmptySuiteTables(); + + virtual ASErr AcquireOptionalSuites(); + + virtual ASErr Notify(AINotifierMessage *message); + + virtual ASErr GoAction(DoActionMessage *message); + + virtual ASErr GoMenuItem(AIMenuMessage *message); + virtual ASErr UpdateMenuItem(AIMenuMessage *message); + + virtual ASErr GetFilterParameters(AIFilterMessage *message); + virtual ASErr GoFilter(AIFilterMessage *message); + + virtual ASErr PluginGroupNotify(AIPluginGroupMessage *message); + virtual ASErr PluginGroupUpdate(AIPluginGroupMessage *message); + + virtual ASErr GetFileFormatParameters(AIFileFormatMessage *message); + virtual ASErr GoFileFormat(AIFileFormatMessage *message); + virtual ASErr CheckFileFormat(AIFileFormatMessage *message); + virtual ASErr FileFormatUpdate(AIUpdateFileFormatMessage *message); + virtual ASErr SetFileFormatParameters(DoActionMessage *message); + + virtual ASErr EditTool(AIToolMessage *message); + virtual ASErr TrackToolCursor(AIToolMessage *message); + virtual ASErr ToolMouseDown(AIToolMessage *message); + virtual ASErr ToolMouseDrag(AIToolMessage *message); + virtual ASErr ToolMouseUp(AIToolMessage *message); + virtual ASErr SelectTool(AIToolMessage *message); + virtual ASErr DeselectTool(AIToolMessage *message); + virtual ASErr ReselectTool(AIToolMessage *message); + virtual ASErr DecreaseDiameter(AIToolMessage *message); + virtual ASErr IncreaseDiameter(AIToolMessage *message); + + virtual ASErr EditLiveEffectParameters(AILiveEffectEditParamMessage * message); + virtual ASErr GoLiveEffect(AILiveEffectGoMessage * message); + virtual ASErr LiveEffectInterpolate(AILiveEffectInterpParamMessage * message); + virtual ASErr LiveEffectGetInputType(AILiveEffectInputTypeMessage * message); + virtual ASErr LiveEffectConvertColorSpace(AILiveEffectConvertColorMessage * message); + virtual ASErr LiveEffectScaleParameters(AILiveEffectScaleParamMessage * message); + virtual ASErr LiveEffectAdjustColors(AILiveEffectAdjustColorsMessage * message); + virtual ASErr LiveEffectHandleMerge(AILiveEffectHandleMergeMessage * message); + + virtual ASErr GoTimer(AITimerMessage * message); + + virtual ASErr GoClipboard( AIClipboardMessage *message ); + virtual ASErr CanCopyClipboard( AIClipboardMessage *message ); + virtual ASErr CloneClipboard( AIClipboardMessage *message ); + virtual ASErr DisposeClipboard( AIClipboardMessage *message ); + + virtual ASErr WorkspaceWrite( AIWorkspaceMessage *message ); + virtual ASErr WorkspaceRestore( AIWorkspaceMessage *message ); + virtual ASErr WorkspaceDefault( AIWorkspaceMessage *message ); + +private: + static char *FindMsg(SPPluginRef ref, ASErr error, char *buf, int len); +}; + +#endif diff --git a/BloksAIPlugin/Vendor/common/includes/PluginStd.h b/BloksAIPlugin/Vendor/common/includes/PluginStd.h index 055349b..e06b33f 100644 --- a/BloksAIPlugin/Vendor/common/includes/PluginStd.h +++ b/BloksAIPlugin/Vendor/common/includes/PluginStd.h @@ -1,31 +1,31 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/PluginStd.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -// Common prefix header for Macintosh - -//This let's us use p2cstr, c2pstr, C2PStr, and P2CStr. -//These functions have been deprecated. We'll hopefully remove this in the future. -//dmaclach -#define OLDP2C 1 - -// Let things know we're working on the Mac side -#define MAC_ENV 1 - -#ifndef macintosh -#define macintosh 1 -#endif - -#define Platform_Carbon 1 - +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +// Common prefix header for Macintosh + +//This let's us use p2cstr, c2pstr, C2PStr, and P2CStr. +//These functions have been deprecated. We'll hopefully remove this in the future. +//dmaclach +#define OLDP2C 1 + +// Let things know we're working on the Mac side +#define MAC_ENV 1 + +#ifndef macintosh +#define macintosh 1 +#endif + +#define Platform_Carbon 1 + diff --git a/BloksAIPlugin/Vendor/common/includes/SDKAboutPluginsHelper.h b/BloksAIPlugin/Vendor/common/includes/SDKAboutPluginsHelper.h index 45b360d..3effd0d 100644 --- a/BloksAIPlugin/Vendor/common/includes/SDKAboutPluginsHelper.h +++ b/BloksAIPlugin/Vendor/common/includes/SDKAboutPluginsHelper.h @@ -1,104 +1,104 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/SDKAboutPluginsHelper.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __SDKAboutPluginsHelper_H__ -#define __SDKAboutPluginsHelper_H__ - -/** Helps plug-ins that want to display company contact information and copyright in - an about box. Each third party company creates an about plug-ins menu group under - Illustrator's about group (see kAboutMenuGroup). A separate menu item is added - under the company's about plug-ins menu group: -
-		About MyCompany Plug-ins	>	MyPlugin1Name...
-									>	MyPlugin2Name...
-	
- - For example, SDK sample plug-ins add the "About SDK Plug-ins" menu group. On the - Macintosh the group is displayed under the Illustrator menu: -
-		Illustrator	>	About SDK Plug-ins	>	TextTest...
-											>	Tutorial...
-	
- - On Windows the group is displayed under the Help menu: -
-		Help	>	About SDK Plug-ins	>	TextTest...
-										>	Tutorial...
-	
- - When a menu item is used the plug-in receives a menu message and displays - plug-in specific information containing contact details and copyright. - - To reduce coupling with plug-ins that want to use this helper - the suites it requires are acquired and released locally by this - class. That way there's no stuff for client code to set up before - using the helper. - - @see kAboutMenuGroup - @see AIMenuSuite, ADMBasicSuite10 -*/ -class SDKAboutPluginsHelper { -public: - - /** Constructor - no special initialization in here. - */ - SDKAboutPluginsHelper(); - - /** Destructor - no special termination in here. - */ - virtual ~SDKAboutPluginsHelper(); - - /** Adds a menu group for the given company under Illustrator's about group - (if the group does not already exist) and adds a menu item for the given plug-in. - @param message IN startup message. - @param companyMenuGroupName IN identifier for your company's about plug-ins menu group. - @param companyName IN name of your company's about plug-ins menu group for display. - @param pluginName IN name of your plug-in for display. - @param menuItemHandle OUT passed in the call back when the menu item is used. - @return kNoErr on success, other AIErr otherwise. - */ - AIErr AddAboutPluginsMenuItem(SPInterfaceMessage* message, - const char* companyMenuGroupName, - const ai::UnicodeString& companyName, - const char* pluginName, - AIMenuItemHandle* menuItemHandle); - - /** Pops about box for the plug-in. - @see ADMBasicSuite10::MessageAlert - @param message menu message (kCallerAIMenu / kSelectorAIGoMenuItem) the plug-in is responding to. - @param title window title for the about box. - @param description information about the plug-in. - */ - void PopAboutBox(AIMenuMessage* message, const char* title, const char* description); - -private: - /** Checks whether the given group name already exists. - @param targetGroupName IN group name to check. - @param groupAlreadyMade OUT true if group exists, false otherwise. - @return kNoErr on success, other AIErr otherwise. - */ - AIErr GroupExists(const char* targetGroupName, bool& groupAlreadyMade); - -private: - /** Menu suite. - */ - AIMenuSuite* fAIMenu; - - /** UIUtils suite. - */ - AIUserSuite* fAIUser; -}; - -#endif // __SDKAboutPluginsHelper_H__ +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __SDKAboutPluginsHelper_H__ +#define __SDKAboutPluginsHelper_H__ + +/** Helps plug-ins that want to display company contact information and copyright in + an about box. Each third party company creates an about plug-ins menu group under + Illustrator's about group (see kAboutMenuGroup). A separate menu item is added + under the company's about plug-ins menu group: +
+		About MyCompany Plug-ins	>	MyPlugin1Name...
+									>	MyPlugin2Name...
+	
+ + For example, SDK sample plug-ins add the "About SDK Plug-ins" menu group. On the + Macintosh the group is displayed under the Illustrator menu: +
+		Illustrator	>	About SDK Plug-ins	>	TextTest...
+											>	Tutorial...
+	
+ + On Windows the group is displayed under the Help menu: +
+		Help	>	About SDK Plug-ins	>	TextTest...
+										>	Tutorial...
+	
+ + When a menu item is used the plug-in receives a menu message and displays + plug-in specific information containing contact details and copyright. + + To reduce coupling with plug-ins that want to use this helper + the suites it requires are acquired and released locally by this + class. That way there's no stuff for client code to set up before + using the helper. + + @see kAboutMenuGroup + @see AIMenuSuite, ADMBasicSuite10 +*/ +class SDKAboutPluginsHelper { +public: + + /** Constructor - no special initialization in here. + */ + SDKAboutPluginsHelper(); + + /** Destructor - no special termination in here. + */ + virtual ~SDKAboutPluginsHelper(); + + /** Adds a menu group for the given company under Illustrator's about group + (if the group does not already exist) and adds a menu item for the given plug-in. + @param message IN startup message. + @param companyMenuGroupName IN identifier for your company's about plug-ins menu group. + @param companyName IN name of your company's about plug-ins menu group for display. + @param pluginName IN name of your plug-in for display. + @param menuItemHandle OUT passed in the call back when the menu item is used. + @return kNoErr on success, other AIErr otherwise. + */ + AIErr AddAboutPluginsMenuItem(SPInterfaceMessage* message, + const char* companyMenuGroupName, + const ai::UnicodeString& companyName, + const char* pluginName, + AIMenuItemHandle* menuItemHandle); + + /** Pops about box for the plug-in. + @see ADMBasicSuite10::MessageAlert + @param message menu message (kCallerAIMenu / kSelectorAIGoMenuItem) the plug-in is responding to. + @param title window title for the about box. + @param description information about the plug-in. + */ + void PopAboutBox(AIMenuMessage* message, const char* title, const char* description); + +private: + /** Checks whether the given group name already exists. + @param targetGroupName IN group name to check. + @param groupAlreadyMade OUT true if group exists, false otherwise. + @return kNoErr on success, other AIErr otherwise. + */ + AIErr GroupExists(const char* targetGroupName, bool& groupAlreadyMade); + +private: + /** Menu suite. + */ + AIMenuSuite* fAIMenu; + + /** UIUtils suite. + */ + AIUserSuite* fAIUser; +}; + +#endif // __SDKAboutPluginsHelper_H__ diff --git a/BloksAIPlugin/Vendor/common/includes/SDKDef.h b/BloksAIPlugin/Vendor/common/includes/SDKDef.h index 71af416..94a99b4 100644 --- a/BloksAIPlugin/Vendor/common/includes/SDKDef.h +++ b/BloksAIPlugin/Vendor/common/includes/SDKDef.h @@ -1,56 +1,56 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/SDKDef.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __SDKDef_h__ -#define __SDKDef_h__ - -/* -// VersionInfo: -// Version information for SDK plug-ins. -// This file is parsed by rez, plc as well as C++ compilers. -// It must only contain preprocessor definitions. -*/ -#ifndef __PLIST__ -#define __STRING__(x) SDKDef_InternalMacroToString(x) -#define SDKDef_InternalMacroToString(x) #x -#endif -#define kSDKDefBuildNumber 0 - -#define kSDKDefAIMajorVersionNum 18 -#define kSDKDefAIMinorVersionNum 0 -#define kSDKDefAIRevisionVersionNum 0 -//eg "15.0.0.0" -#define kSDKDefAIShortVersionString __STRING__(kSDKDefAIMajorVersionNum) "." __STRING__(kSDKDefAIMinorVersionNum) "." __STRING__(kSDKDefAIRevisionVersionNum) "." __STRING__(kSDKDefBuildNumber) -#define kSDKDefAIFullCompanyName "Adobe Systems Incorporated" -#define kSDKDefAIFullProductName "Adobe Illustrator" -//Mac specific for Plists -#define kSDKDefAIBundlePrefix com.adobe.illustrator - -#define kSDKDefCopyrightString "Copyright 1987-2014 Adobe Systems Incorporated. All rights reserved." -#define kSDKDefFileDescriptionString "Adobe Illustrator SDK Plug-in" -//eg "15.0" -#define kSDKDefProductVersionString __STRING__(kSDKDefAIMajorVersionNum) "." __STRING__(kSDKDefAIMinorVersionNum) -#define kSDKDefAboutPluginString "An Adobe Illustrator SDK plugin http://partners.adobe.com" - - -/* About Plug-ins menu -*/ -// Group name and ui display string for About Plug-ins menu for SDK sample plug-ins - third parties should add their own group. -#define kSDKDefAboutSDKCompanyPluginsGroupName "SDKAboutPluginsGroupName" -#define kSDKDefAboutSDKCompanyPluginsGroupNameString "About SDK Plug-ins" - -// About box description for SDK plug-ins -#define kSDKDefAboutSDKCompanyPluginsAlertString "An Adobe Illustrator SDK sample\nhttp://www.adobe.com/devnet/\nCopyright 1987-2014 Adobe Systems Incorporated. All rights reserved." -#endif //__SDKDef_h__ +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __SDKDef_h__ +#define __SDKDef_h__ + +/* +// VersionInfo: +// Version information for SDK plug-ins. +// This file is parsed by rez, plc as well as C++ compilers. +// It must only contain preprocessor definitions. +*/ +#ifndef __PLIST__ +#define __STRING__(x) SDKDef_InternalMacroToString(x) +#define SDKDef_InternalMacroToString(x) #x +#endif +#define kSDKDefBuildNumber 0 + +#define kSDKDefAIMajorVersionNum 25 +#define kSDKDefAIMinorVersionNum 3 +#define kSDKDefAIRevisionVersionNum 0 +//eg "15.0.0.0" +#define kSDKDefAIShortVersionString __STRING__(kSDKDefAIMajorVersionNum) "." __STRING__(kSDKDefAIMinorVersionNum) "." __STRING__(kSDKDefAIRevisionVersionNum) "." __STRING__(kSDKDefBuildNumber) +#define kSDKDefAIFullCompanyName "Adobe Systems Incorporated" +#define kSDKDefAIFullProductName "Adobe Illustrator" +//Mac specific for Plists +#define kSDKDefAIBundlePrefix com.adobe.illustrator + +#define kSDKDefCopyrightString "Copyright © 1987-2021 by Adobe Inc. All rights reserved." +#define kSDKDefFileDescriptionString "Adobe Illustrator SDK Plug-in" +//eg "15.0" +#define kSDKDefProductVersionString __STRING__(kSDKDefAIMajorVersionNum) "." __STRING__(kSDKDefAIMinorVersionNum) +#define kSDKDefAboutPluginString "An Adobe Illustrator SDK plugin http://partners.adobe.com" + + +/* About Plug-ins menu +*/ +// Group name and ui display string for About Plug-ins menu for SDK sample plug-ins - third parties should add their own group. +#define kSDKDefAboutSDKCompanyPluginsGroupName "SDKAboutPluginsGroupName" +#define kSDKDefAboutSDKCompanyPluginsGroupNameString "About SDK Plug-ins" + +// About box description for SDK plug-ins +#define kSDKDefAboutSDKCompanyPluginsAlertString "An Adobe Illustrator SDK sample\nhttp://www.adobe.com/devnet/\nCopyright © 1987-2021 by Adobe Inc. All rights reserved." +#endif //__SDKDef_h__ diff --git a/BloksAIPlugin/Vendor/common/includes/SDKErrors.h b/BloksAIPlugin/Vendor/common/includes/SDKErrors.h index 132d484..5356d4d 100644 --- a/BloksAIPlugin/Vendor/common/includes/SDKErrors.h +++ b/BloksAIPlugin/Vendor/common/includes/SDKErrors.h @@ -1,128 +1,128 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/SDKErrors.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __SDKErrors_h__ -#define __SDKErrors_h__ - -namespace aisdk -{ - /** Throws exception if the given error code is non zero. - @param err IN error code. - */ - inline void check_ai_error(AIErr err) - { if (err) throw ai::Error(err); } - - /** Throws exception if the given pointer is nil. - @param p IN void pointer. - @param err IN error code. - */ - inline void check_allocation(void *p, AIErr err = kOutOfMemoryErr) - { if (!p) throw ai::Error(err); } - - /** Throws exception if the given condition is false. - @param condition IN condition to check. - @param err IN error code. - */ - inline void check_precondition(bool condition, AIErr err = kBadParameterErr) - { if (!condition) throw ai::Error(err); } - - /** Throws exception if the given assertion is false. - @param assertion IN assertion to check. - @param err IN error code. - */ - inline void check_assertion(bool assertion, AIErr err = kCantHappenErr) - { if (!assertion) throw ai::Error(err); } - - /** Reports an error in an ADM alert. - @param err IN error code. - */ - void report_error(ASErr err); - - #ifdef DEBUG - - /** Reports an assert in an ADM alert then throws exception. - @param message IN message to display in alert. - @param file IN file assert originated from. - @param line IN line assert originated from in file. - @param throwException IN true to throw an exception, false if not. - @see SDK_ASSERT - @see check_assertion - */ - void report_assert(const char* message, const char* file, int line, bool throwException); - - /** Returns a printf style formatted string from variable argument list - - designed to be called to format message for SDK_ASSERT_MSG or SDK_ASSERT_MSG_NOTHROW, - for example: - - SDK_ASSERT_MSG(false, aisdk::format_args("My message=%s: %d", str, num)); - - @param str IN string of argument. - @param ... IN - */ - char* format_args(const char *str, ...); - - #endif // DEBUG - - #ifdef DEBUG - - /** SDK_ASSERT macro. - Reports an assert with no message and throws an exception. - */ - #define SDK_ASSERT(x) if (!(x)) aisdk::report_assert("",__FILE__, __LINE__, true) - - /** SDK_ASSERT_MSG macro. - Reports an assert with a message and throws an exception. - */ - #define SDK_ASSERT_MSG(x, msg) if (!(x)) aisdk::report_assert(msg,__FILE__, __LINE__, true) - - /** SDK_ASSERT_NOTHROW macro. - Reports an assert with no message, does not throw an exception. - */ - #define SDK_ASSERT_NOTHROW(x) if (!(x)) aisdk::report_assert("",__FILE__, __LINE__, false) - - /** SDK_ASSERT_MSG_NOTHROW macro. - Reports an assert with a message, does not throw an exception. - */ - #define SDK_ASSERT_MSG_NOTHROW(x, msg) if (!(x)) aisdk::report_assert(msg,__FILE__, __LINE__, false) - - #else // Release - - /** SDK_ASSERT macro. - Reports an assert with no message and throws an exception. - */ - #define SDK_ASSERT(x) aisdk::check_assertion(x) - - /** SDK_ASSERT_MSG macro. - Reports an assert with a message and throws an exception. - */ - #define SDK_ASSERT_MSG(x, msg) aisdk::check_assertion(x) - - /** SDK_ASSERT_NOTHROW macro. - Reports an assert with no message, does not throw an exception. - */ - #define SDK_ASSERT_NOTHROW(x) - - /** SDK_ASSERT_MSG_NOTHROW macro. - Reports an assert with a message, does not throw an exception. - */ - #define SDK_ASSERT_MSG_NOTHROW(x, msg) - - #endif - -} // end namespace aisdk - -#endif //__SDKErrors_h__ - -// End SDKErrors.h +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __SDKErrors_h__ +#define __SDKErrors_h__ + +namespace aisdk +{ + /** Throws exception if the given error code is non zero. + @param err IN error code. + */ + inline void check_ai_error(AIErr err) + { if (err) throw ai::Error(err); } + + /** Throws exception if the given pointer is nullptr. + @param p IN void pointer. + @param err IN error code. + */ + inline void check_allocation(void *p, AIErr err = kOutOfMemoryErr) + { if (!p) throw ai::Error(err); } + + /** Throws exception if the given condition is false. + @param condition IN condition to check. + @param err IN error code. + */ + inline void check_precondition(bool condition, AIErr err = kBadParameterErr) + { if (!condition) throw ai::Error(err); } + + /** Throws exception if the given assertion is false. + @param assertion IN assertion to check. + @param err IN error code. + */ + inline void check_assertion(bool assertion, AIErr err = kCantHappenErr) + { if (!assertion) throw ai::Error(err); } + + /** Reports an error in an ADM alert. + @param err IN error code. + */ + void report_error(ASErr err); + + #ifdef DEBUG + + /** Reports an assert in an ADM alert then throws exception. + @param message IN message to display in alert. + @param file IN file assert originated from. + @param line IN line assert originated from in file. + @param throwException IN true to throw an exception, false if not. + @see SDK_ASSERT + @see check_assertion + */ + void report_assert(const char* message, const char* file, int line, bool throwException); + + /** Returns a printf style formatted string from variable argument list - + designed to be called to format message for SDK_ASSERT_MSG or SDK_ASSERT_MSG_NOTHROW, + for example: + + SDK_ASSERT_MSG(false, aisdk::format_args("My message=%s: %d", str, num)); + + @param str IN string of argument. + @param ... IN + */ + char* format_args(const char *str, ...); + + #endif // DEBUG + + #ifdef DEBUG + + /** SDK_ASSERT macro. + Reports an assert with no message and throws an exception. + */ + #define SDK_ASSERT(x) if (!(x)) aisdk::report_assert("",__FILE__, __LINE__, true) + + /** SDK_ASSERT_MSG macro. + Reports an assert with a message and throws an exception. + */ + #define SDK_ASSERT_MSG(x, msg) if (!(x)) aisdk::report_assert(msg,__FILE__, __LINE__, true) + + /** SDK_ASSERT_NOTHROW macro. + Reports an assert with no message, does not throw an exception. + */ + #define SDK_ASSERT_NOTHROW(x) if (!(x)) aisdk::report_assert("",__FILE__, __LINE__, false) + + /** SDK_ASSERT_MSG_NOTHROW macro. + Reports an assert with a message, does not throw an exception. + */ + #define SDK_ASSERT_MSG_NOTHROW(x, msg) if (!(x)) aisdk::report_assert(msg,__FILE__, __LINE__, false) + + #else // Release + + /** SDK_ASSERT macro. + Reports an assert with no message and throws an exception. + */ + #define SDK_ASSERT(x) aisdk::check_assertion(x) + + /** SDK_ASSERT_MSG macro. + Reports an assert with a message and throws an exception. + */ + #define SDK_ASSERT_MSG(x, msg) aisdk::check_assertion(x) + + /** SDK_ASSERT_NOTHROW macro. + Reports an assert with no message, does not throw an exception. + */ + #define SDK_ASSERT_NOTHROW(x) + + /** SDK_ASSERT_MSG_NOTHROW macro. + Reports an assert with a message, does not throw an exception. + */ + #define SDK_ASSERT_MSG_NOTHROW(x, msg) + + #endif + +} // end namespace aisdk + +#endif //__SDKErrors_h__ + +// End SDKErrors.h diff --git a/BloksAIPlugin/Vendor/common/includes/SDKPlugPlug.h b/BloksAIPlugin/Vendor/common/includes/SDKPlugPlug.h index 783ce83..5679597 100644 --- a/BloksAIPlugin/Vendor/common/includes/SDKPlugPlug.h +++ b/BloksAIPlugin/Vendor/common/includes/SDKPlugPlug.h @@ -1,331 +1,331 @@ -//======================================================================================== -// -// $File: //ai/ai15/devtech/sdk/public/samplecode/common/includes/SDKPlugPlug.h $ -// -// $Revision: #1 $ -// -// Copyright 2010 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __SDKPLUGPLUG_H__ -#define __SDKPLUGPLUG_H__ - -#pragma once - -#include "AITypes.h" -#include "AIFolders.h" - -#ifdef WIN_ENV -#include -#else - -#endif - -//----------------------------------------------------------------------------- -// Event -//----------------------------------------------------------------------------- - -namespace csxs -{ -namespace event -{ - /** - * @brief Definition of possible scopes for events. - **/ - enum EventScope - { - /** - * @brief This scope refers to events which will be dispatched to all available - * applications and all native listeners. - **/ - kEventScope_Global = 0, - - /** - * @brief This scope refers to events which will be dispatched only within the application - * from where the event was dispatched. - **/ - kEventScope_Application = 1, - - /** - * @brief This ensures 32 bit int allocation and shouldn't be used in any other matter. - **/ - kEventScope_LastValue = 0x7FFFFFFF - }; - - /** @brief Error codes for event related operations. **/ - enum EventErrorCode - { - /** @brief Success. **/ - kEventErrorCode_Success = 0, - - /** @brief The operation which was executed did fail. **/ - kEventErrorCode_OperationFailed, - - /** @brief Unknown failure. **/ - kEventErrorCode_Unknown, - - /** @brief This ensures 32 bit int allocation and shouldn't be used in any other matter. **/ - kEventErrorCode_LastValue = 0x7FFFFFFF - }; - - /** - * @brief Contains the information about an event which was dispatched. - **/ - struct Event - { - /** @brief The type of the event. **/ - const char* type; - - /** @brief The scope of the event. **/ - EventScope scope; - - /** @brief The appId of the event. **/ - const char* appId; - - /** @brief The extensionId of the event or NULL if not thrown by an extension. **/ - const char* extensionId; - - /** @brief The event specific data. **/ - const char* data; - }; - - /** - * @brief A function pointer to a call back function which can be registered for events. - * @param event The event which was dispatched. - * @param context The context which was registered with the event listener or NULL. - **/ - typedef void (*EventListenerFn) (const Event* const event, void* const context); -} -} - - -//----------------------------------------------------------------------------- -// PlugPlug -//----------------------------------------------------------------------------- - -/*! -\brief The error values returned from PlugPlug and Housing Plug-in calls. - -These names are meant to be self-explanatory. Note that true error codes are all non-zero values; a return value of zero is actually a success status. -*/ -typedef enum PlugPlugErrorCode -{ - PlugPlugErrorCode_success = 0, //!< = 0 - - //!Callback-related errors - PlugPlugErrorCode_registerExtCallbackNotFound, - PlugPlugErrorCode_extensionEventCallbackNotFound, - PlugPlugErrorCode_setMenuCallbackNotFound, - PlugPlugErrorCode_allocateEvalScriptEngineCallbackNotFound, - PlugPlugErrorCode_disposeEvalScriptEngineCallbackNotFound, - PlugPlugErrorCode_evalScriptCallbackNotFound, - PlugPlugErrorCode_requestStateChangeCallbackNotFound, - PlugPlugErrorCode_requestLoadExtensionCallbackNotFound, - PlugPlugErrorCode_evalScriptCallbackFailed, - PlugPlugErrorCode_AMTRequestCallbackNotFound, - PlugPlugErrorCode_allocatePlayerCallbackNotFound, - PlugPlugErrorCode_disposePlayerCallbackNotFound, - - //!API-related errors - PlugPlugErrorCode_extensionRegistrationFailed, - PlugPlugErrorCode_multipleSetupCallsNotAllowed, - PlugPlugErrorCode_extensionNotFound, - PlugPlugErrorCode_extensionMenuCreationFailed, - PlugPlugErrorCode_invalidParam, - PlugPlugErrorCode_unexpectedValue, - PlugPlugErrorCode_scriptFileLoadFailure, - PlugPlugErrorCode_engineAllocationFailure, - PlugPlugErrorCode_extensionNotLoaded, - PlugPlugErrorCode_invalidApplicationName, - PlugPlugErrorCode_noExtensionFound, - PlugPlugErrorCode_invalidManifestFile, - PlugPlugErrorCode_stageManagerNotFound, - - //!Window-related errors - PlugPlugErrorCode_modalDialogCantInvokeAnotherWindow, - PlugPlugErrorCode_cantInvokeAnOpenExtension, - - //!Script Engine errors - PlugPlugErrorCode_engineUsedForMultipleIDs, - PlugPlugErrorCode_engineRefcountIncreased, - PlugPlugErrorCode_engineRefcountDecreased, - - //!Miscellaneous errors - PlugPlugErrorCode_internalError, - PlugPlugErrorCode_systemError, - PlugPlugErrorCode_unknown, - - // If not able to allocate player to Extention - PlugPlugErrorCode_PlayerAllocationFailed, - - // error code for flash panels - PlugPlugErrorCode_needToClosePreviousFlashPanels, - - // codes for AMT call - PlugPlugErrorCode_AMTMoreData, /*!< AMT call result has more data. */ - - // streaming - PlugPlugErrorCode_streamWriteCallbackNotFound, - PlugPlugErrorCode_streamCloseCallbackNotFound, - - //last value - PlugPlugErrorCode_lastValue = 0x7FFFFFFF //ensures 32 bit int allocation -} PlugPlugErrorCode; - - -/*! - With PlugPlug version 1.0, - this method tells PlugPlug to prepare to load an extension. - - When the Housing Plug-in wants to create a window and load an extension into it, - it must first invoke this API to notify PlugPlug so that PlugPlug can make any necessary preparations, - such as starting the CSI. - After calling PlugPlugLoadExtension, the Housing plug-in will create the window and - loads the swf inside it. After that, Housing plug-in needs to send "PlugPlugOpen" - event for the extension by calling PlugPlug.NotifyStateChange() API for the extension, - passing in the geometry at which the extension was created. - When PlugPlug receives "PlugPlugOpen" event, only then it will consider the extension to be loaded, - otherwise PlugPlug will not consider it loaded and all the calls for this extension - will return "PlugPlugErrorCode_extensionNotLoaded" error. - In case the Housing plug-in fails to create the window or fails to load the SWF and - wants to close extension, it needs to call PlugPlugUnloadExtension() API. - - - With version 2.0, - PlugPlug is delegating the loading of an extension to the StageManager. - - A prerequisite for this to work is that the StageManager has been loaded - into its own hidden APE stage. - Therefore, before calling PlugPlugLoadExtension() the host application must - load the StageManager SWF by calling APEPlayerLoadSwf() of the APE API. - The StageManager has been registered with the host application like any other extension. - Hence, the path to the StageManager SWF is known to the host application. - - On calling PlugPlugLoadExtension(), the StageManager create a new window for the extension in ActionScript. - It is setting window properties in accordance with the values specified in the extension manifest. - "Opening" this window in ActionScript results in the host application receiving a new_stage event. - The host application then creates a window and APE stage with the properties passed on in the event. - Once the window is created, APE attaches the contents of the ActionScript window to the newly created APE stage. - The ActionScript window contains an instance of the AS3 class SWFLoader which loads the extension SWF. - - \param[in] inExtensionID the extension to be loaded, previously registered by PlugPlug. - \return a success or failure code. If the return indicates an error, then PlugPlug is signalling the host that the load will fail, and the host application must \e not attempt it. (This may happen, for example, if a user tries to load more concurrent extensions than the host supports.) When an error occurs, PlugPlug may attempt to use scripting to give the user feedback about the problem. - */ -typedef PlugPlugErrorCode (*PlugPlugLoadExtensionFn)(const char* inExtensionID); - - -/*! - \brief Tell PlugPlug to prepare to unload an extension. - - When the Housing Plug-in wants to tear down a window that has an extension running in it, it must first invoke this API to notify PlugPlug so that PlugPlug can prepare to stop execution of the extension (perhaps by destroying the associated script engine). - \param[in] inExtensionID the extension to be stopped. - \return a success or failure code. If the return indicates an error, then PlugPlug is signalling the host that the unload will likely produce an error of some kind. The host application is still free to tear the window down. In such cases, PlugPlug may attempt to use scripting to warn the user about the problem. - */ -typedef PlugPlugErrorCode (*PlugPlugUnloadExtensionFn)(const char* inExtensionID); - - - -/** - * @brief Adds the given eventListener to the list of listener for the given type. - * - * @param type The type of events to register for. Must not be NULL. - * @param eventListener The event listener to add. - * @param context A user specific context pointer or NULL. - * @return The error code for this operation. - * - * If the eventListener is registered multiple times it will be notified multiple times. - * Does nothing if eventListener is NULL. - * - * @since 2.0 - **/ -typedef csxs::event::EventErrorCode (*PlugPlugAddEventListenerFn)(const char* type, - const csxs::event::EventListenerFn eventListener, - void* const context); - -/** - * @brief Removes the given eventListener from the list of listener for the given type. - * - * @param type The type of events to register for. Must not be NULL. - * @param eventListener The event listener to remove. - * @param context The user specific context pointer the event listener was registered with or NULL. - * @return The error code for this operation. - * - * If the eventListener was registered multiple times all entries will be removed. - * Does nothing if eventListener is NULL. - * - * @since 2.0 - **/ -typedef csxs::event::EventErrorCode (*PlugPlugRemoveEventListenerFn)(const char* type, - const csxs::event::EventListenerFn, - void* const context); - -/** - * @brief Dispatches the given event. - * - * @param The event to dispatch. - * @return The error code for this operation. - * - * This method will notify all event listeners which have registered for the type of the - * event plus all event listeners which have registered for all events. The order in - * which the listeners are notified is undeterministic. - * If an exception is thrown by any of the notified event listener it will be silently - * caught and ignored. - * - * @since 2.0 - **/ -typedef csxs::event::EventErrorCode (*PlugPlugDispatchEventFn)(const csxs::event::Event* const event); - - -//----------------------------------------------------------------------------- -// wraper -//----------------------------------------------------------------------------- - -class SDKPlugPlug -{ -public: - SDKPlugPlug(); - ~SDKPlugPlug(); - - AIErr Load(AIFoldersSuite* sAIFolders); - AIErr Unload(); - - PlugPlugErrorCode LoadExtension(const char* inExtensionID); - PlugPlugErrorCode UnloadExtension(const char* inExtensionID); - - //Adds the given eventListener to the list of listener for the given type. - csxs::event::EventErrorCode AddEventListener(const char* type, - const csxs::event::EventListenerFn eventListener, - void* const context); - //Removes the given eventListener from the list of listener for the given type. - csxs::event::EventErrorCode RemoveEventListener(const char* type, - const csxs::event::EventListenerFn, - void* const context); - //Dispatches the given event. - csxs::event::EventErrorCode DispatchEvent(const csxs::event::Event* const event); - -private: - - bool isPlugPlugLoaded(); - -private: - -#ifdef WIN_ENV - HMODULE fhModule; -#else - CFBundleRef fhModule; -#endif - - PlugPlugLoadExtensionFn pFnLoadExtension; - PlugPlugUnloadExtensionFn pFnUnloadExtension; - PlugPlugAddEventListenerFn pFnAddEventListener; - PlugPlugRemoveEventListenerFn pFnRemoveEventListener; - PlugPlugDispatchEventFn pFnDispatchEvent; -}; - -#endif // SDKPlugPlug.h +//======================================================================================== +// +// $File: //ai/ai15/devtech/sdk/public/samplecode/common/includes/SDKPlugPlug.h $ +// +// $Revision: #1 $ +// +// Copyright 2010 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __SDKPLUGPLUG_H__ +#define __SDKPLUGPLUG_H__ + +#pragma once + +#include "AITypes.h" +#include "AIFolders.h" + +#ifdef WIN_ENV +#include +#else + +#endif + +//----------------------------------------------------------------------------- +// Event +//----------------------------------------------------------------------------- + +namespace csxs +{ +namespace event +{ + /** + * @brief Definition of possible scopes for events. + **/ + enum EventScope + { + /** + * @brief This scope refers to events which will be dispatched to all available + * applications and all native listeners. + **/ + kEventScope_Global = 0, + + /** + * @brief This scope refers to events which will be dispatched only within the application + * from where the event was dispatched. + **/ + kEventScope_Application = 1, + + /** + * @brief This ensures 32 bit int allocation and shouldn't be used in any other matter. + **/ + kEventScope_LastValue = 0x7FFFFFFF + }; + + /** @brief Error codes for event related operations. **/ + enum EventErrorCode + { + /** @brief Success. **/ + kEventErrorCode_Success = 0, + + /** @brief The operation which was executed did fail. **/ + kEventErrorCode_OperationFailed, + + /** @brief Unknown failure. **/ + kEventErrorCode_Unknown, + + /** @brief This ensures 32 bit int allocation and shouldn't be used in any other matter. **/ + kEventErrorCode_LastValue = 0x7FFFFFFF + }; + + /** + * @brief Contains the information about an event which was dispatched. + **/ + struct Event + { + /** @brief The type of the event. **/ + const char* type; + + /** @brief The scope of the event. **/ + EventScope scope; + + /** @brief The appId of the event. **/ + const char* appId; + + /** @brief The extensionId of the event or NULL if not thrown by an extension. **/ + const char* extensionId; + + /** @brief The event specific data. **/ + const char* data; + }; + + /** + * @brief A function pointer to a call back function which can be registered for events. + * @param event The event which was dispatched. + * @param context The context which was registered with the event listener or NULL. + **/ + typedef void (*EventListenerFn) (const Event* const event, void* const context); +} +} + + +//----------------------------------------------------------------------------- +// PlugPlug +//----------------------------------------------------------------------------- + +/*! +\brief The error values returned from PlugPlug and Housing Plug-in calls. + +These names are meant to be self-explanatory. Note that true error codes are all non-zero values; a return value of zero is actually a success status. +*/ +typedef enum PlugPlugErrorCode +{ + PlugPlugErrorCode_success = 0, //!< = 0 + + //!Callback-related errors + PlugPlugErrorCode_registerExtCallbackNotFound, + PlugPlugErrorCode_extensionEventCallbackNotFound, + PlugPlugErrorCode_setMenuCallbackNotFound, + PlugPlugErrorCode_allocateEvalScriptEngineCallbackNotFound, + PlugPlugErrorCode_disposeEvalScriptEngineCallbackNotFound, + PlugPlugErrorCode_evalScriptCallbackNotFound, + PlugPlugErrorCode_requestStateChangeCallbackNotFound, + PlugPlugErrorCode_requestLoadExtensionCallbackNotFound, + PlugPlugErrorCode_evalScriptCallbackFailed, + PlugPlugErrorCode_AMTRequestCallbackNotFound, + PlugPlugErrorCode_allocatePlayerCallbackNotFound, + PlugPlugErrorCode_disposePlayerCallbackNotFound, + + //!API-related errors + PlugPlugErrorCode_extensionRegistrationFailed, + PlugPlugErrorCode_multipleSetupCallsNotAllowed, + PlugPlugErrorCode_extensionNotFound, + PlugPlugErrorCode_extensionMenuCreationFailed, + PlugPlugErrorCode_invalidParam, + PlugPlugErrorCode_unexpectedValue, + PlugPlugErrorCode_scriptFileLoadFailure, + PlugPlugErrorCode_engineAllocationFailure, + PlugPlugErrorCode_extensionNotLoaded, + PlugPlugErrorCode_invalidApplicationName, + PlugPlugErrorCode_noExtensionFound, + PlugPlugErrorCode_invalidManifestFile, + PlugPlugErrorCode_stageManagerNotFound, + + //!Window-related errors + PlugPlugErrorCode_modalDialogCantInvokeAnotherWindow, + PlugPlugErrorCode_cantInvokeAnOpenExtension, + + //!Script Engine errors + PlugPlugErrorCode_engineUsedForMultipleIDs, + PlugPlugErrorCode_engineRefcountIncreased, + PlugPlugErrorCode_engineRefcountDecreased, + + //!Miscellaneous errors + PlugPlugErrorCode_internalError, + PlugPlugErrorCode_systemError, + PlugPlugErrorCode_unknown, + + // If not able to allocate player to Extention + PlugPlugErrorCode_PlayerAllocationFailed, + + // error code for flash panels + PlugPlugErrorCode_needToClosePreviousFlashPanels, + + // codes for AMT call + PlugPlugErrorCode_AMTMoreData, /*!< AMT call result has more data. */ + + // streaming + PlugPlugErrorCode_streamWriteCallbackNotFound, + PlugPlugErrorCode_streamCloseCallbackNotFound, + + //last value + PlugPlugErrorCode_lastValue = 0x7FFFFFFF //ensures 32 bit int allocation +} PlugPlugErrorCode; + + +/*! + With PlugPlug version 1.0, + this method tells PlugPlug to prepare to load an extension. + + When the Housing Plug-in wants to create a window and load an extension into it, + it must first invoke this API to notify PlugPlug so that PlugPlug can make any necessary preparations, + such as starting the CSI. + After calling PlugPlugLoadExtension, the Housing plug-in will create the window and + loads the swf inside it. After that, Housing plug-in needs to send "PlugPlugOpen" + event for the extension by calling PlugPlug.NotifyStateChange() API for the extension, + passing in the geometry at which the extension was created. + When PlugPlug receives "PlugPlugOpen" event, only then it will consider the extension to be loaded, + otherwise PlugPlug will not consider it loaded and all the calls for this extension + will return "PlugPlugErrorCode_extensionNotLoaded" error. + In case the Housing plug-in fails to create the window or fails to load the SWF and + wants to close extension, it needs to call PlugPlugUnloadExtension() API. + + + With version 2.0, + PlugPlug is delegating the loading of an extension to the StageManager. + + A prerequisite for this to work is that the StageManager has been loaded + into its own hidden APE stage. + Therefore, before calling PlugPlugLoadExtension() the host application must + load the StageManager SWF by calling APEPlayerLoadSwf() of the APE API. + The StageManager has been registered with the host application like any other extension. + Hence, the path to the StageManager SWF is known to the host application. + + On calling PlugPlugLoadExtension(), the StageManager create a new window for the extension in ActionScript. + It is setting window properties in accordance with the values specified in the extension manifest. + "Opening" this window in ActionScript results in the host application receiving a new_stage event. + The host application then creates a window and APE stage with the properties passed on in the event. + Once the window is created, APE attaches the contents of the ActionScript window to the newly created APE stage. + The ActionScript window contains an instance of the AS3 class SWFLoader which loads the extension SWF. + + \param[in] inExtensionID the extension to be loaded, previously registered by PlugPlug. + \return a success or failure code. If the return indicates an error, then PlugPlug is signalling the host that the load will fail, and the host application must \e not attempt it. (This may happen, for example, if a user tries to load more concurrent extensions than the host supports.) When an error occurs, PlugPlug may attempt to use scripting to give the user feedback about the problem. + */ +typedef PlugPlugErrorCode (*PlugPlugLoadExtensionFn)(const char* inExtensionID); + + +/*! + \brief Tell PlugPlug to prepare to unload an extension. + + When the Housing Plug-in wants to tear down a window that has an extension running in it, it must first invoke this API to notify PlugPlug so that PlugPlug can prepare to stop execution of the extension (perhaps by destroying the associated script engine). + \param[in] inExtensionID the extension to be stopped. + \return a success or failure code. If the return indicates an error, then PlugPlug is signalling the host that the unload will likely produce an error of some kind. The host application is still free to tear the window down. In such cases, PlugPlug may attempt to use scripting to warn the user about the problem. + */ +typedef PlugPlugErrorCode (*PlugPlugUnloadExtensionFn)(const char* inExtensionID); + + + +/** + * @brief Adds the given eventListener to the list of listener for the given type. + * + * @param type The type of events to register for. Must not be NULL. + * @param eventListener The event listener to add. + * @param context A user specific context pointer or NULL. + * @return The error code for this operation. + * + * If the eventListener is registered multiple times it will be notified multiple times. + * Does nothing if eventListener is NULL. + * + * @since 2.0 + **/ +typedef csxs::event::EventErrorCode (*PlugPlugAddEventListenerFn)(const char* type, + const csxs::event::EventListenerFn eventListener, + void* const context); + +/** + * @brief Removes the given eventListener from the list of listener for the given type. + * + * @param type The type of events to register for. Must not be NULL. + * @param eventListener The event listener to remove. + * @param context The user specific context pointer the event listener was registered with or NULL. + * @return The error code for this operation. + * + * If the eventListener was registered multiple times all entries will be removed. + * Does nothing if eventListener is NULL. + * + * @since 2.0 + **/ +typedef csxs::event::EventErrorCode (*PlugPlugRemoveEventListenerFn)(const char* type, + const csxs::event::EventListenerFn, + void* const context); + +/** + * @brief Dispatches the given event. + * + * @param The event to dispatch. + * @return The error code for this operation. + * + * This method will notify all event listeners which have registered for the type of the + * event plus all event listeners which have registered for all events. The order in + * which the listeners are notified is undeterministic. + * If an exception is thrown by any of the notified event listener it will be silently + * caught and ignored. + * + * @since 2.0 + **/ +typedef csxs::event::EventErrorCode (*PlugPlugDispatchEventFn)(const csxs::event::Event* const event); + + +//----------------------------------------------------------------------------- +// wraper +//----------------------------------------------------------------------------- + +class SDKPlugPlug +{ +public: + SDKPlugPlug(); + ~SDKPlugPlug(); + + AIErr Load(AIFoldersSuite* sAIFolders); + AIErr Unload(); + + PlugPlugErrorCode LoadExtension(const char* inExtensionID); + PlugPlugErrorCode UnloadExtension(const char* inExtensionID); + + //Adds the given eventListener to the list of listener for the given type. + csxs::event::EventErrorCode AddEventListener(const char* type, + const csxs::event::EventListenerFn eventListener, + void* const context); + //Removes the given eventListener from the list of listener for the given type. + csxs::event::EventErrorCode RemoveEventListener(const char* type, + const csxs::event::EventListenerFn, + void* const context); + //Dispatches the given event. + csxs::event::EventErrorCode DispatchEvent(const csxs::event::Event* const event); + +private: + + bool isPlugPlugLoaded(); + +private: + +#ifdef WIN_ENV + HMODULE fhModule; +#else + CFBundleRef fhModule; +#endif + + PlugPlugLoadExtensionFn pFnLoadExtension; + PlugPlugUnloadExtensionFn pFnUnloadExtension; + PlugPlugAddEventListenerFn pFnAddEventListener; + PlugPlugRemoveEventListenerFn pFnRemoveEventListener; + PlugPlugDispatchEventFn pFnDispatchEvent; +}; + +#endif // SDKPlugPlug.h diff --git a/BloksAIPlugin/Vendor/common/includes/Suites.hpp b/BloksAIPlugin/Vendor/common/includes/Suites.hpp index 5d0f905..4ee45ff 100644 --- a/BloksAIPlugin/Vendor/common/includes/Suites.hpp +++ b/BloksAIPlugin/Vendor/common/includes/Suites.hpp @@ -1,77 +1,77 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/Suites.hpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __Suites_hpp__ -#define __Suites_hpp__ - -#include "ASTypes.h" - -#include "SPAccess.h" -#include "SPPlugs.h" -#include "AINotifier.h" -#include "AIContext.h" -#include "AIUser.h" -#include "AIFolders.h" - -// Suites acquired by the Suites class -extern "C" SPAccessSuite *sSPAccess; -extern "C" SPPluginsSuite *sSPPlugins; -extern "C" AINotifierSuite *sAINotifier; -extern "C" AIAppContextSuite *sAIAppContext; -extern "C" AIUserSuite* sAIUser; -extern "C" AIFilePathSuite* sAIFilePath; -extern "C" AIFoldersSuite* sAIFolders; -/* - A dumb "acquire all these suites when I instantiate a Suites object and - release them when it's destroyed" class. -*/ - -struct ImportSuite -{ - const char *name; - int version; - void *suite; -}; -const ASInt32 kStartOptionalSuites = 'OPTS'; -const ASInt32 kEndAllSuites = 0; - -// The fAcquiredCount field is not necessarily maintained across unload/reloads; -// in fact it probably isn't. Whenever we first create a Suites object after -// being loaded or reloaded, it's important to call InitializeRefCount on it. - -class Suites -{ -public: - Suites(); - ~Suites(); - ASErr Error() { return fError; } - - void InitializeRefCount() { fAcquiredCount = 1; } - void acquire_Optional_Suites(); - -private: - static ASUInt16 fAcquiredCount; - ASErr fError; - ASUInt16 fOptionalSuitesTotalCount; - ASUInt16 fRequiredSuitesCount; - ASUInt16 fOptionalSuitesAcquiredCount; - - ASErr AcquireSuites(); - ASErr ReleaseSuites(); - ASErr AcquireSuite(ImportSuite *suite); - ASErr ReleaseSuite(ImportSuite *suite); -}; - -#endif +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __Suites_hpp__ +#define __Suites_hpp__ + +#include "ASTypes.h" + +#include "SPAccess.h" +#include "SPPlugs.h" +#include "AINotifier.h" +#include "AIContext.h" +#include "AIUser.h" +#include "AIFolders.h" + +// Suites acquired by the Suites class +extern "C" SPAccessSuite *sSPAccess; +extern "C" SPPluginsSuite *sSPPlugins; +extern "C" AINotifierSuite *sAINotifier; +extern "C" AIAppContextSuite *sAIAppContext; +extern "C" AIUserSuite* sAIUser; +extern "C" AIFilePathSuite* sAIFilePath; +extern "C" AIFoldersSuite* sAIFolders; +/* + A dumb "acquire all these suites when I instantiate a Suites object and + release them when it's destroyed" class. +*/ + +struct ImportSuite +{ + const char *name; + int version; + void *suite; +}; +const ASInt32 kStartOptionalSuites = 'OPTS'; +const ASInt32 kEndAllSuites = 0; + +// The fAcquiredCount field is not necessarily maintained across unload/reloads; +// in fact it probably isn't. Whenever we first create a Suites object after +// being loaded or reloaded, it's important to call InitializeRefCount on it. + +class Suites +{ +public: + Suites(); + ~Suites(); + ASErr Error() { return fError; } + + void InitializeRefCount() { fAcquiredCount = 1; } + void acquire_Optional_Suites(); + +private: + static ASUInt16 fAcquiredCount; + ASErr fError; + ASUInt16 fOptionalSuitesTotalCount; + ASUInt16 fRequiredSuitesCount; + ASUInt16 fOptionalSuitesAcquiredCount; + + ASErr AcquireSuites(); + ASErr ReleaseSuites(); + ASErr AcquireSuite(ImportSuite *suite); + ASErr ReleaseSuite(ImportSuite *suite); +}; + +#endif diff --git a/BloksAIPlugin/Vendor/common/includes/legacy/About.h b/BloksAIPlugin/Vendor/common/includes/legacy/About.h index 47d2572..cee2467 100644 --- a/BloksAIPlugin/Vendor/common/includes/legacy/About.h +++ b/BloksAIPlugin/Vendor/common/includes/legacy/About.h @@ -1,37 +1,37 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/legacy/About.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - - -#include "SPInterf.h" - - -/**----------------------------------------------------------------------------- - ** - ** Types - ** - **/ - - -#define kBadSelectionErr '!sel' - - -/**----------------------------------------------------------------------------- - ** - ** Functions - ** - **/ -typedef AIErr FXErr; - -extern AIErr goAbout( SPInterfaceMessage *message ); +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + + +#include "SPInterf.h" + + +/**----------------------------------------------------------------------------- + ** + ** Types + ** + **/ + + +#define kBadSelectionErr '!sel' + + +/**----------------------------------------------------------------------------- + ** + ** Functions + ** + **/ +typedef AIErr FXErr; + +extern AIErr goAbout( SPInterfaceMessage *message ); diff --git a/BloksAIPlugin/Vendor/common/includes/legacy/reportError.h b/BloksAIPlugin/Vendor/common/includes/legacy/reportError.h index 44580d0..b8937ea 100644 --- a/BloksAIPlugin/Vendor/common/includes/legacy/reportError.h +++ b/BloksAIPlugin/Vendor/common/includes/legacy/reportError.h @@ -1,41 +1,41 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/legacy/reportError.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "SPInterf.h" - - -/**----------------------------------------------------------------------------- - ** - ** Types - ** - **/ - - -#define kBadSelectionErr '!sel' - - -/**----------------------------------------------------------------------------- - ** - ** Functions - ** - **/ -//typedef AIErr FXErr; - -// string stuff -extern void AIErrToCString( AIErr error_to_report, char *errorText ); -extern void CStringToAIErr( char *errorText, AIErr *error_to_report ); - -// ui stuff -extern void report_error( SPInterfaceMessage *message, AIErr error_to_report ); +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "SPInterf.h" + + +/**----------------------------------------------------------------------------- + ** + ** Types + ** + **/ + + +#define kBadSelectionErr '!sel' + + +/**----------------------------------------------------------------------------- + ** + ** Functions + ** + **/ +//typedef AIErr FXErr; + +// string stuff +extern void AIErrToCString( AIErr error_to_report, char *errorText ); +extern void CStringToAIErr( char *errorText, AIErr *error_to_report ); + +// ui stuff +extern void report_error( SPInterfaceMessage *message, AIErr error_to_report ); diff --git a/BloksAIPlugin/Vendor/common/includes/legacy/stringUtils.h b/BloksAIPlugin/Vendor/common/includes/legacy/stringUtils.h index 2d03d83..18a67df 100644 --- a/BloksAIPlugin/Vendor/common/includes/legacy/stringUtils.h +++ b/BloksAIPlugin/Vendor/common/includes/legacy/stringUtils.h @@ -1,41 +1,41 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/legacy/stringUtils.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __PSTRING__ -#define __PSTRING__ - -#ifdef __cplusplus -extern "C" { -#endif - -unsigned char *SUctopstr( char *s ); -char *SUptocstr( unsigned char *p ); -unsigned char *SUpstrcpy( unsigned char *dst, const unsigned char *src ); -unsigned long SUstrlen(char* s); - -void SUpstrcat( unsigned char *dst, unsigned char *src ); -void SUpstrinsert( unsigned char *dst, unsigned char *src ); - -char *SUsafestrncpy(char *dst, const char *src, int dstsize); -char *SUsafestrncat(char *dst, const char *src, int dstsize); - -void SUpasToPostscriptStr( unsigned char dst, unsigned char src ); - -#ifdef __cplusplus -} -#endif - - -#endif +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __PSTRING__ +#define __PSTRING__ + +#ifdef __cplusplus +extern "C" { +#endif + +unsigned char *SUctopstr( char *s ); +char *SUptocstr( unsigned char *p ); +unsigned char *SUpstrcpy( unsigned char *dst, const unsigned char *src ); +unsigned long SUstrlen(char* s); + +void SUpstrcat( unsigned char *dst, unsigned char *src ); +void SUpstrinsert( unsigned char *dst, unsigned char *src ); + +char *SUsafestrncpy(char *dst, const char *src, int dstsize); +char *SUsafestrncat(char *dst, const char *src, int dstsize); + +void SUpasToPostscriptStr( unsigned char dst, unsigned char src ); + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/BloksAIPlugin/Vendor/common/includes/pragma.h b/BloksAIPlugin/Vendor/common/includes/pragma.h index b9c2cee..8419d90 100644 --- a/BloksAIPlugin/Vendor/common/includes/pragma.h +++ b/BloksAIPlugin/Vendor/common/includes/pragma.h @@ -1,23 +1,23 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/includes/pragma.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#pragma warning (disable: 4290) // C++ exception specification ignored except - // to indicate a function is not __declspec(nothrow) - -#pragma warning (disable: 4800) // Ignore "'AIBool8' : forcing value to bool 'true' or - // 'false' (performance warning)" warning - -#pragma warning (disable: 4996) // Disable warning for deprecation of sprintf, strncpy etc. - // which are still used in C++ framework files from core. +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#pragma warning (disable: 4290) // C++ exception specification ignored except + // to indicate a function is not __declspec(nothrow) + +#pragma warning (disable: 4800) // Ignore "'AIBool8' : forcing value to bool 'true' or + // 'false' (performance warning)" warning + +#pragma warning (disable: 4996) // Disable warning for deprecation of sprintf, strncpy etc. + // which are still used in C++ framework files from core. diff --git a/BloksAIPlugin/Vendor/common/mac/AIPluginCommon.xcconfig b/BloksAIPlugin/Vendor/common/mac/AIPluginCommon.xcconfig new file mode 100644 index 0000000..619a862 --- /dev/null +++ b/BloksAIPlugin/Vendor/common/mac/AIPluginCommon.xcconfig @@ -0,0 +1,38 @@ +ALWAYS_SEARCH_USER_PATHS = NO +ARCHS = $(ARCHS_STANDARD) +CLANG_CXX_LANGUAGE_STANDARD = c++14 +CLANG_CXX_LIBRARY = libc++ +CONFIGURATION_BUILD_DIR = ./../output/mac/$(AI_CONFIGURATION) +CONFIGURATION_TEMP_DIR = $(PROJECT_TEMP_DIR)/Default +DSTROOT = /tmp/$(PRODUCT_NAME).dst +EXPORTED_SYMBOLS_FILE = +FRAMEWORK_SEARCH_PATHS = +LIBRARY_SEARCH_PATHS = +GCC_DEBUGGING_SYMBOLS = full +GCC_GENERATE_DEBUGGING_SYMBOLS = YES +GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp +GCC_PRECOMPILE_PREFIX_HEADER = YES +GCC_PREFIX_HEADER = ../common/includes/IllustratorSDK$(AI_CONFIGURATION).pch +GCC_VERSION=com.apple.compilers.llvm.clang.1_0 +GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO +GCC_WARN_UNKNOWN_PRAGMAS = YES +GCC_WARN_UNUSED_VARIABLE = YES +GENERATE_PKGINFO_FILE = YES +HEADER_SEARCH_PATHS = ../../illustratorapi/ate ../../illustratorapi/illustrator ../../illustratorapi/illustrator/actions ../../illustratorapi/pica_sp /Developer/Headers/FlatCarbon ../common/includes Source +INFOPLIST_FILE = ../common/mac/Info.plist +INFOPLIST_PREFIX_HEADER = ../common/includes/SDKDef.h +INFOPLIST_PREPROCESS = YES +MACOSX_DEPLOYMENT_TARGET[arch=arm64] = 11.0 +MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.15 +OBJROOT = $(PROJECT_DIR)/build +ONLY_LINK_ESSENTIAL_SYMBOLS = YES +PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO +PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES +PRODUCT_BUNDLE_IDENTIFIER = com.adobe.illustrator.plugins.$(PRODUCT_NAME) +PRODUCT_NAME = $(PROJECT_NAME) +REZ_SEARCH_PATHS = Resources/raw Resources/Mac ../common/mac +SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES +SDKROOT = macosx +SHARED_PRECOMPS_DIR = ./../output/mac/sharedprecompiledheaders/$(AI_CONFIGURATION) +SYMROOT = ../output/mac/$(AI_CONFIGURATION) +WRAPPER_EXTENSION = aip diff --git a/BloksAIPlugin/Vendor/common/mac/AIPluginDebug.xcconfig b/BloksAIPlugin/Vendor/common/mac/AIPluginDebug.xcconfig new file mode 100644 index 0000000..402e7bb --- /dev/null +++ b/BloksAIPlugin/Vendor/common/mac/AIPluginDebug.xcconfig @@ -0,0 +1,10 @@ +AI_CONFIGURATION = debug +DEAD_CODE_STRIPPING = NO +DEBUG_INFORMATION_FORMAT = dwarf +DEPLOYMENT_POSTPROCESSING = NO +GCC_ENABLE_FIX_AND_CONTINUE = YES +GCC_OPTIMIZATION_LEVEL = 0 +GCC_SYMBOLS_PRIVATE_EXTERN = YES +LLVM_LTO = NO +SEPARATE_STRIP = NO +STRIP_INSTALLED_PRODUCT = NO diff --git a/BloksAIPlugin/Vendor/common/mac/AIPluginRelease.xcconfig b/BloksAIPlugin/Vendor/common/mac/AIPluginRelease.xcconfig new file mode 100644 index 0000000..c581e19 --- /dev/null +++ b/BloksAIPlugin/Vendor/common/mac/AIPluginRelease.xcconfig @@ -0,0 +1,10 @@ +AI_CONFIGURATION = release +DEAD_CODE_STRIPPING = YES +DEBUG_INFORMATION_FORMAT = dwarf-with-dsym +DEPLOYMENT_POSTPROCESSING = YES +GCC_ENABLE_FIX_AND_CONTINUE = NO +GCC_OPTIMIZATION_LEVEL = z +GCC_SYMBOLS_PRIVATE_EXTERN = NO +LLVM_LTO = YES +SEPARATE_STRIP = YES +STRIP_INSTALLED_PRODUCT = YES diff --git a/BloksAIPlugin/Vendor/common/mac/Info.plist b/BloksAIPlugin/Vendor/common/mac/Info.plist index 665316c..03537db 100644 --- a/BloksAIPlugin/Vendor/common/mac/Info.plist +++ b/BloksAIPlugin/Vendor/common/mac/Info.plist @@ -1,34 +1,34 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - $(PROJECTNAME) - CFBundleExecutable - $(PROJECTNAME) - CFBundleGetInfoHTML - $(PROJECTNAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString - CFBundleGetInfoString - $(PROJECTNAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString - CFBundleIdentifier - kSDKDefAIBundlePrefix.plugins.$(PROJECTNAME) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PROJECTNAME) - CFBundlePackageType - ARPI - CFBundleShortVersionString - $(PROJECTNAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber - CFBundleSignature - ART5 - CFBundleVersion - kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber - CSResourcesFileMapped - - LSRequiresCarbon - - - + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + $(PRODUCT_NAME) + CFBundleExecutable + $(PRODUCT_NAME) + CFBundleGetInfoHTML + $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString + CFBundleGetInfoString + $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString + CFBundleIdentifier + kSDKDefAIBundlePrefix.plugins.$(PRODUCT_NAME) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + ARPI + CFBundleShortVersionString + $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber + CFBundleSignature + ART5 + CFBundleVersion + kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber + CSResourcesFileMapped + + LSRequiresCarbon + + + diff --git a/BloksAIPlugin/Vendor/common/mac/PiPL.r b/BloksAIPlugin/Vendor/common/mac/PiPL.r index 2329600..103f8c8 100644 --- a/BloksAIPlugin/Vendor/common/mac/PiPL.r +++ b/BloksAIPlugin/Vendor/common/mac/PiPL.r @@ -1,266 +1,266 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/mac/PiPL.r $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#ifndef __PIPL_r__ // Only include this once. -#define __PIPL_r__ - - -//------------------------------------------------------------------------------- -// Definitions -- Version and include information -//------------------------------------------------------------------------------- - -// Version of Plug In Properties Template described in this file: -#ifndef kPIPropertiesVersion - #define kPIPropertiesVersion 0 -#endif - -//------------------------------------------------------------------------------- -// PiPL resource template -//------------------------------------------------------------------------------- - -type 'PiPL' - { - longint = kPIPropertiesVersion; - longint = $$CountOf(properties); - array properties - { - switch - { - //------------------------------------------------------------------- - // Illustrator/SweetPea PiPL properties - //------------------------------------------------------------------- - - case ADBEKind: - longint = 'ADBE'; // SweetPea/Illustrator host. - key longint = 'kind'; - longint = 0; // Index. - longint = 4; // Length. - literal longint PIPiPLTypes; // Version. - - case InterfaceVersion: - longint = 'ADBE'; // SweetPea/Illustrator host. - key longint = 'ivrs'; - longint = 0; // Index. - longint = 4; // Length. - longint; // Version. - - case ADBECodeCarbon: - longint = 'ADBE'; - key longint = 'ppcb'; - longint = 0; - #if DeRez - fill long; - #else - longint = (ADBEppcbEnd[$$ArrayIndex(properties)] - ADBEppcbStart[$$ArrayIndex(properties)]) / 8; - #endif - ADBEppcbStart: - longint; - longint; - pstring; - ADBEppcbEnd: - align long; - - case ADBECodeMachO: - longint = 'ADBE'; - key longint = 'mach'; - longint = 0; - #if DeRez - fill long; - #else - longint = (ADBEmachEnd[$$ArrayIndex(properties)] - ADBEmachStart[$$ArrayIndex(properties)]) / 8; - #endif - ADBEmachStart: - pstring; - ADBEmachEnd: - align long; - - case ADBECodeMacIntel32: - longint = 'ADBE'; - key longint = 'mi32'; - longint = 0; - #if DeRez - fill long; - #else - longint = (ADBEmi32End[$$ArrayIndex(properties)] - ADBEmi32Start[$$ArrayIndex(properties)]) / 8; - #endif - ADBEmi32Start: - pstring; - ADBEmi32End: - align long; - - case SP_STSP: - longint = 'ADBE'; // SweetPea/Illustrator host. - key longint = 'StsP'; - longint = 0; // Index. - longint = 4; // Length. - longint; - - case InternalName: - longint = 'ADBE'; // SweetPea/Illustrator host. - key longint = 'pinm'; - longint = 0; // Index. - #if DeRez - fill long; - #else - longint = (plugInNameEnd[$$ArrayIndex(properties)] - - plugInNameStart[$$ArrayIndex(properties)]) / 8; - #endif - plugInNameStart: - cstring; - plugInNameEnd: - align long; - - case BuildVersion: - longint = 'ADBE'; // SweetPea/Illustrator host. - key longint = 'bvrs'; - longint = 0; // Index. - longint = 4; // Length. - longint; // Version. - - case ADBEVersion: - longint = 'ADBE'; - key longint = 'vers'; - longint = 0; - longint = 4; - longint; - - case ADBECategory: - longint = 'ADBE'; - key longint = 'catg'; - longint = 0; - #if DeRez - fill long; - #else - longint = (ADBEcatgEnd[$$ArrayIndex(properties)] - ADBEcatgStart[$$ArrayIndex(properties)]) / 8; - #endif - ADBEcatgStart: - pstring - // Use Help category to put automation plug-ins in the "Help" menu: - PSHelpMenu = "**Help**", - - // Use Hidden category to keep plug-ins out of menus. - // WARNING: The only way to access a hidden plug-in is - // by calling it by its event ID from the Play callback! - PSHidden = "**Hidden**", - - // Use Copyright-Checker category to detect copyrights on first-opened files: - PSCopyrightChecker = "**Copyright-Checker**"; - - ADBEcatgEnd: - align long; - - case ADBEName: - longint = 'ADBE'; - key longint = 'name'; - longint = 0; - #if DeRez - fill long; - #else - longint = (ADBEnameEnd[$$ArrayIndex(properties)] - ADBEnameStart[$$ArrayIndex(properties)]) / 8; - #endif - ADBEnameStart: - pstring; - ADBEnameEnd: - align long; - - case AdapterVersion: - longint = 'ADBE'; // SweetPea/Illustrator host. - key longint = 'adpt'; - longint = 0; // Index. - longint = 4; // Length. - longint; // Version. - - case Imports: - longint = 'ADBE'; // SweetPea/Illustrator host. - key longint = 'impt'; - longint = 0; // Index. - #if DeRez - fill long; - #else - longint = (importsEnd[$$ArrayIndex(properties)] - - importsStart[$$ArrayIndex(properties)]) / 8; - #endif - importsStart: - longint = $$CountOf(ImportSuites); - wide array ImportSuites - { - isuitesStart: - // Length (including this long): - #if DeRez - fill long; - #else - longint = ((isuitesEnd[$$ArrayIndex(properties), $$ArrayIndex(ImportSuites)] - - isuitesStart[$$ArrayIndex(properties), $$ArrayIndex(ImportSuites)]) / 8); - #endif - - cstring; - align long; - longint; // Suite version. - isuitesEnd: - }; - importsEnd: - - case Exports: - longint = 'ADBE'; // SweetPea/Illustrator host. - key longint = 'expt'; - longint = 0; // Index. - #if DeRez - fill long; - #else - longint = (exportsEnd[$$ArrayIndex(properties)] - - exportsStart[$$ArrayIndex(properties)]) / 8; - #endif - exportsStart: - longint = $$CountOf(ExportSuites); - wide array ExportSuites - { - esuitesStart: - // Length (including this long): - #if DeRez - fill long; - #else - longint = ((esuitesEnd[$$ArrayIndex(properties), $$ArrayIndex(ExportSuites)] - - esuitesStart[$$ArrayIndex(properties), $$ArrayIndex(ExportSuites)]) / 8); - #endif - - cstring; - align long; - longint; // Suite version. - esuitesEnd: - }; - exportsEnd: - - - case Messages: - longint = 'ADBE'; // SweetPea/Illustrator host - key longint = 'AcpM'; - longint = 0; // Index. - longint = 4; // Length. - fill bit[28]; // Reserved. - - boolean startupRequired, noStartupRequired; - boolean doesNotPurgeCache, purgeCache; - boolean shutdownRequired, noShutdownRequired; // Default is to give shutdown msg. - boolean doNotAcceptProperty, acceptProperty; - - }; - }; - }; - -#undef PIPiPLTypes - -//------------------------------------------------------------------------------- - -#endif // PIPL.r +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#ifndef __PIPL_r__ // Only include this once. +#define __PIPL_r__ + + +//------------------------------------------------------------------------------- +// Definitions -- Version and include information +//------------------------------------------------------------------------------- + +// Version of Plug In Properties Template described in this file: +#ifndef kPIPropertiesVersion + #define kPIPropertiesVersion 0 +#endif + +//------------------------------------------------------------------------------- +// PiPL resource template +//------------------------------------------------------------------------------- + +type 'PiPL' + { + longint = kPIPropertiesVersion; + longint = $$CountOf(properties); + array properties + { + switch + { + //------------------------------------------------------------------- + // Illustrator/SweetPea PiPL properties + //------------------------------------------------------------------- + + case ADBEKind: + longint = 'ADBE'; // SweetPea/Illustrator host. + key longint = 'kind'; + longint = 0; // Index. + longint = 4; // Length. + literal longint PIPiPLTypes; // Version. + + case InterfaceVersion: + longint = 'ADBE'; // SweetPea/Illustrator host. + key longint = 'ivrs'; + longint = 0; // Index. + longint = 4; // Length. + longint; // Version. + + case ADBECodeCarbon: + longint = 'ADBE'; + key longint = 'ppcb'; + longint = 0; + #if DeRez + fill long; + #else + longint = (ADBEppcbEnd[$$ArrayIndex(properties)] - ADBEppcbStart[$$ArrayIndex(properties)]) / 8; + #endif + ADBEppcbStart: + longint; + longint; + pstring; + ADBEppcbEnd: + align long; + + case ADBECodeMachO: + longint = 'ADBE'; + key longint = 'mach'; + longint = 0; + #if DeRez + fill long; + #else + longint = (ADBEmachEnd[$$ArrayIndex(properties)] - ADBEmachStart[$$ArrayIndex(properties)]) / 8; + #endif + ADBEmachStart: + pstring; + ADBEmachEnd: + align long; + + case ADBECodeMacIntel32: + longint = 'ADBE'; + key longint = 'mi32'; + longint = 0; + #if DeRez + fill long; + #else + longint = (ADBEmi32End[$$ArrayIndex(properties)] - ADBEmi32Start[$$ArrayIndex(properties)]) / 8; + #endif + ADBEmi32Start: + pstring; + ADBEmi32End: + align long; + + case SP_STSP: + longint = 'ADBE'; // SweetPea/Illustrator host. + key longint = 'StsP'; + longint = 0; // Index. + longint = 4; // Length. + longint; + + case InternalName: + longint = 'ADBE'; // SweetPea/Illustrator host. + key longint = 'pinm'; + longint = 0; // Index. + #if DeRez + fill long; + #else + longint = (plugInNameEnd[$$ArrayIndex(properties)] - + plugInNameStart[$$ArrayIndex(properties)]) / 8; + #endif + plugInNameStart: + cstring; + plugInNameEnd: + align long; + + case BuildVersion: + longint = 'ADBE'; // SweetPea/Illustrator host. + key longint = 'bvrs'; + longint = 0; // Index. + longint = 4; // Length. + longint; // Version. + + case ADBEVersion: + longint = 'ADBE'; + key longint = 'vers'; + longint = 0; + longint = 4; + longint; + + case ADBECategory: + longint = 'ADBE'; + key longint = 'catg'; + longint = 0; + #if DeRez + fill long; + #else + longint = (ADBEcatgEnd[$$ArrayIndex(properties)] - ADBEcatgStart[$$ArrayIndex(properties)]) / 8; + #endif + ADBEcatgStart: + pstring + // Use Help category to put automation plug-ins in the "Help" menu: + PSHelpMenu = "**Help**", + + // Use Hidden category to keep plug-ins out of menus. + // WARNING: The only way to access a hidden plug-in is + // by calling it by its event ID from the Play callback! + PSHidden = "**Hidden**", + + // Use Copyright-Checker category to detect copyrights on first-opened files: + PSCopyrightChecker = "**Copyright-Checker**"; + + ADBEcatgEnd: + align long; + + case ADBEName: + longint = 'ADBE'; + key longint = 'name'; + longint = 0; + #if DeRez + fill long; + #else + longint = (ADBEnameEnd[$$ArrayIndex(properties)] - ADBEnameStart[$$ArrayIndex(properties)]) / 8; + #endif + ADBEnameStart: + pstring; + ADBEnameEnd: + align long; + + case AdapterVersion: + longint = 'ADBE'; // SweetPea/Illustrator host. + key longint = 'adpt'; + longint = 0; // Index. + longint = 4; // Length. + longint; // Version. + + case Imports: + longint = 'ADBE'; // SweetPea/Illustrator host. + key longint = 'impt'; + longint = 0; // Index. + #if DeRez + fill long; + #else + longint = (importsEnd[$$ArrayIndex(properties)] - + importsStart[$$ArrayIndex(properties)]) / 8; + #endif + importsStart: + longint = $$CountOf(ImportSuites); + wide array ImportSuites + { + isuitesStart: + // Length (including this long): + #if DeRez + fill long; + #else + longint = ((isuitesEnd[$$ArrayIndex(properties), $$ArrayIndex(ImportSuites)] - + isuitesStart[$$ArrayIndex(properties), $$ArrayIndex(ImportSuites)]) / 8); + #endif + + cstring; + align long; + longint; // Suite version. + isuitesEnd: + }; + importsEnd: + + case Exports: + longint = 'ADBE'; // SweetPea/Illustrator host. + key longint = 'expt'; + longint = 0; // Index. + #if DeRez + fill long; + #else + longint = (exportsEnd[$$ArrayIndex(properties)] - + exportsStart[$$ArrayIndex(properties)]) / 8; + #endif + exportsStart: + longint = $$CountOf(ExportSuites); + wide array ExportSuites + { + esuitesStart: + // Length (including this long): + #if DeRez + fill long; + #else + longint = ((esuitesEnd[$$ArrayIndex(properties), $$ArrayIndex(ExportSuites)] - + esuitesStart[$$ArrayIndex(properties), $$ArrayIndex(ExportSuites)]) / 8); + #endif + + cstring; + align long; + longint; // Suite version. + esuitesEnd: + }; + exportsEnd: + + + case Messages: + longint = 'ADBE'; // SweetPea/Illustrator host + key longint = 'AcpM'; + longint = 0; // Index. + longint = 4; // Length. + fill bit[28]; // Reserved. + + boolean startupRequired, noStartupRequired; + boolean doesNotPurgeCache, purgeCache; + boolean shutdownRequired, noShutdownRequired; // Default is to give shutdown msg. + boolean doNotAcceptProperty, acceptProperty; + + }; + }; + }; + +#undef PIPiPLTypes + +//------------------------------------------------------------------------------- + +#endif // PIPL.r diff --git a/BloksAIPlugin/Vendor/common/mac/Plugin.r b/BloksAIPlugin/Vendor/common/mac/Plugin.r index 2df71c7..232fb3e 100644 --- a/BloksAIPlugin/Vendor/common/mac/Plugin.r +++ b/BloksAIPlugin/Vendor/common/mac/Plugin.r @@ -1,99 +1,99 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/mac/Plugin.r $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -// This resource file handles PIPL resources for the Illustrator SDK projects. - -#include "PiPL.r" - -//This defines the name of the plug-in, this is left blank otherwise this file would be project specific -#ifndef PIPL_PLUGIN_NAME -#error Need to define plugin name -//#define PIPL_PLUGIN_NAME "" -#endif - -//Define this if your plugin exports any suites. This will guarantee them being earlier in the load order -#ifndef PIPL_EXPORT -#define PIPL_EXPORT 0 -#else -// There is no need to define suites, just turning on the export flag is enough, however, -// if you do define exported suites, the list should like the one below: -// The first entry is the suite name, the second is the suite version. - #ifndef PIPL_EXPORTED_SUITES - #define PIPL_EXPORTED_SUITES { "Exported Suite", 1 } - #endif -#endif - -#ifndef PIPL_MESSAGE -#define PIPL_MESSAGE 0 -//Define PIPL_MESSAGES to a List of the Messages you want from PiPL.r if you want to be able to use messages -//#define PIPL_MESSAGES startupRequired,purgeCache,shutdownRequired,acceptProperty -#endif - -//If you are an adaptor plugin, define this -#ifndef PIPL_ADAPTOR -#define PIPL_ADAPTOR 0 -#endif - -#define TARGET ADBECodeCarbon -#ifndef PPC_PIPL_ENTRY -#define PPC_PIPL_ENTRY 0,0,"" -#endif -#define TARGET1 ADBECodeMachO -#ifndef PIPL_ENTRY -#define PIPL_ENTRY "" -#endif -#define TARGET2 ADBECodeMacIntel32 -#ifndef PIPL_ENTRY -#define PIPL_ENTRY "" -#endif - -resource 'PiPL' (16000, PIPL_PLUGIN_NAME " PiPL", purgeable) -{ - { - ADBEKind {'SPEA'}, - InterfaceVersion { 2 }, - TARGET - { - PPC_PIPL_ENTRY - }, - TARGET1 - { - PIPL_ENTRY - }, - TARGET2 - { - PIPL_ENTRY - }, - #if PIPL_EXPORT - Exports - { - PIPL_EXPORTED_SUITES - }, - #endif - #if PIPL_MESSAGE - Messages - { - PIPL_MESSAGES - }, - #endif - #if PIPL_ADAPTOR - AdapterVersion { 2 } - #endif - InternalName - { - PIPL_PLUGIN_NAME - } - } -}; +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +// This resource file handles PIPL resources for the Illustrator SDK projects. + +#include "PiPL.r" + +//This defines the name of the plug-in, this is left blank otherwise this file would be project specific +#ifndef PIPL_PLUGIN_NAME +#error Need to define plugin name +//#define PIPL_PLUGIN_NAME "" +#endif + +//Define this if your plugin exports any suites. This will guarantee them being earlier in the load order +#ifndef PIPL_EXPORT +#define PIPL_EXPORT 0 +#else +// There is no need to define suites, just turning on the export flag is enough, however, +// if you do define exported suites, the list should like the one below: +// The first entry is the suite name, the second is the suite version. + #ifndef PIPL_EXPORTED_SUITES + #define PIPL_EXPORTED_SUITES { "Exported Suite", 1 } + #endif +#endif + +#ifndef PIPL_MESSAGE +#define PIPL_MESSAGE 0 +//Define PIPL_MESSAGES to a List of the Messages you want from PiPL.r if you want to be able to use messages +//#define PIPL_MESSAGES startupRequired,purgeCache,shutdownRequired,acceptProperty +#endif + +//If you are an adaptor plugin, define this +#ifndef PIPL_ADAPTOR +#define PIPL_ADAPTOR 0 +#endif + +#define TARGET ADBECodeCarbon +#ifndef PPC_PIPL_ENTRY +#define PPC_PIPL_ENTRY 0,0,"" +#endif +#define TARGET1 ADBECodeMachO +#ifndef PIPL_ENTRY +#define PIPL_ENTRY "" +#endif +#define TARGET2 ADBECodeMacIntel32 +#ifndef PIPL_ENTRY +#define PIPL_ENTRY "" +#endif + +resource 'PiPL' (16000, PIPL_PLUGIN_NAME " PiPL", purgeable) +{ + { + ADBEKind {'SPEA'}, + InterfaceVersion { 2 }, + TARGET + { + PPC_PIPL_ENTRY + }, + TARGET1 + { + PIPL_ENTRY + }, + TARGET2 + { + PIPL_ENTRY + }, + #if PIPL_EXPORT + Exports + { + PIPL_EXPORTED_SUITES + }, + #endif + #if PIPL_MESSAGE + Messages + { + PIPL_MESSAGES + }, + #endif + #if PIPL_ADAPTOR + AdapterVersion { 2 } + #endif + InternalName + { + PIPL_PLUGIN_NAME + } + } +}; diff --git a/BloksAIPlugin/Vendor/common/source/AppContext.cpp b/BloksAIPlugin/Vendor/common/source/AppContext.cpp index 0a81618..8439df0 100644 --- a/BloksAIPlugin/Vendor/common/source/AppContext.cpp +++ b/BloksAIPlugin/Vendor/common/source/AppContext.cpp @@ -1,39 +1,39 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/AppContext.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -/* - NOTE: this file was yanked out of the PaintStyle plugin and stuck in the GlobLists - experimental plugin. If this code is ever stuck into the real PlugInDev tree, this - file should be shared with the corresponding file in PaintStyle. - THERE IS NO GLOBLISTS SPECIFIC CODE HERE -*/ - -#include "AIContext.h" -#include "AppContext.hpp" - -extern "C" AIAppContextSuite *sAIAppContext; - -AppContext::AppContext(SPPluginRef pluginRef) -{ - fAppContext = nil; - if (sAIAppContext) - sAIAppContext->PushAppContext(pluginRef, (AIAppContextHandle *)&fAppContext); -} - -AppContext::~AppContext() -{ - if (sAIAppContext) - sAIAppContext->PopAppContext((AIAppContextHandle)fAppContext); -} +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +/* + NOTE: this file was yanked out of the PaintStyle plugin and stuck in the GlobLists + experimental plugin. If this code is ever stuck into the real PlugInDev tree, this + file should be shared with the corresponding file in PaintStyle. + THERE IS NO GLOBLISTS SPECIFIC CODE HERE +*/ + +#include "AIContext.h" +#include "AppContext.hpp" + +extern "C" AIAppContextSuite *sAIAppContext; + +AppContext::AppContext(SPPluginRef pluginRef) +{ + fAppContext = nullptr; + if (sAIAppContext) + sAIAppContext->PushAppContext(pluginRef, (AIAppContextHandle *)&fAppContext); +} + +AppContext::~AppContext() +{ + if (sAIAppContext) + sAIAppContext->PopAppContext((AIAppContextHandle)fAppContext); +} diff --git a/BloksAIPlugin/Vendor/common/source/ArtMatcher.cpp b/BloksAIPlugin/Vendor/common/source/ArtMatcher.cpp index 5f3e16a..e5b745b 100644 --- a/BloksAIPlugin/Vendor/common/source/ArtMatcher.cpp +++ b/BloksAIPlugin/Vendor/common/source/ArtMatcher.cpp @@ -1,143 +1,143 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/ArtMatcher.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "ArtMatcher.hpp" -#include "AIMdMemory.h" -#include "SPBasic.h" - -#include - -// these need to be declared by client -extern "C" AIMatchingArtSuite *sAIMatchingArt; -extern "C" SPBasicSuite *sSPBasic; - -ArtMatcher::ArtMatcher(ai::int16 iNumSpecs, AIBoolean matchArtInDictionaries) -{ - if (iNumSpecs > 0) - { - m_pSpecs = new(std::nothrow) AIMatchingArtSpec[iNumSpecs]; - } - else - { - m_pSpecs = NULL; - } - - if (m_pSpecs == NULL) - { - m_iNumSpecs = 0; - } - else - { - m_iNumSpecs = iNumSpecs; - } - - m_MatchArtInDictionaries = matchArtInDictionaries; - m_lNumMatches = 0; - m_hMatches = NULL; -} - -ArtMatcher::~ArtMatcher(void) -{ - delete [] m_pSpecs; - - if (m_hMatches != NULL && sSPBasic != NULL) - { - AIMdMemorySuite *sAIMdMemory = NULL; - - sSPBasic->AcquireSuite(kAIMdMemorySuite, kAIMdMemorySuiteVersion, (const void **) &sAIMdMemory); - - if (sAIMdMemory != NULL) - { - sAIMdMemory->MdMemoryDisposeHandle((AIMdMemoryHandle) (m_hMatches)); - sSPBasic->ReleaseSuite(kAIMdMemorySuite, kAIMdMemorySuiteVersion); - } - } -} - -ASErr ArtMatcher::SetSpec(ai::int16 iX, ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr) -{ - ASErr result = kNoErr; - - if (m_MatchArtInDictionaries) - lWhichAttr |= kMatchDictionaryArt; - - if (0 <= iX && iX < m_iNumSpecs) - { - AIMatchingArtSpec *pSpec = m_pSpecs + iX; - - pSpec->type = shType; - pSpec->whichAttr = lWhichAttr; - pSpec->attr = lAttr; - } - else - { - result = AM_InvalidIndex; - } - - return result; -} - -ASErr ArtMatcher::GetMatchingArt(void) -{ - ASErr result = kNoErr; - - m_lNumMatches = 0; - - if (sAIMatchingArt == NULL) - { - result = AM_InvalidSuite; - goto ex; - } - - // Check for if the spec is equivalent to GetSelectedArt, so that we can benefit from the selection caching - if ( m_iNumSpecs == 1 && !m_MatchArtInDictionaries - && m_pSpecs[0].type == kAnyArt && m_pSpecs[0].whichAttr == kArtSelected - && m_pSpecs[0].attr == kArtSelected ) - { - result = sAIMatchingArt->GetSelectedArt(&m_hMatches, &m_lNumMatches); - } - else - { - result = sAIMatchingArt->GetMatchingArt(m_pSpecs, m_iNumSpecs, &m_hMatches, &m_lNumMatches); - } - -ex: - return result; -} - -ai::int32 ArtMatcher::GetNumMatches(void) -{ - return m_lNumMatches; -} - -AIArtHandle ArtMatcher::GetMatchedArt(ai::int32 iX) -{ - AIArtHandle matchedArt = NULL; - - if (0 <= iX && iX < m_lNumMatches) - { - matchedArt = (*m_hMatches)[iX]; - } - - return matchedArt; -} - -void ArtMatcher::ClearMatchedArt(ai::int32 iX) -{ - if (0 <= iX && iX < m_lNumMatches) - { - (*m_hMatches)[iX] = NULL; - } -} +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "ArtMatcher.hpp" +#include "AIMdMemory.h" +#include "SPBasic.h" + +#include + +// these need to be declared by client +extern "C" AIMatchingArtSuite *sAIMatchingArt; +extern "C" SPBasicSuite *sSPBasic; + +ArtMatcher::ArtMatcher(ai::int16 iNumSpecs, AIBoolean matchArtInDictionaries) +{ + if (iNumSpecs > 0) + { + m_pSpecs = new(std::nothrow) AIMatchingArtSpec[iNumSpecs]; + } + else + { + m_pSpecs = NULL; + } + + if (m_pSpecs == NULL) + { + m_iNumSpecs = 0; + } + else + { + m_iNumSpecs = iNumSpecs; + } + + m_MatchArtInDictionaries = matchArtInDictionaries; + m_lNumMatches = 0; + m_hMatches = NULL; +} + +ArtMatcher::~ArtMatcher(void) +{ + delete [] m_pSpecs; + + if (m_hMatches != NULL && sSPBasic != NULL) + { + AIMdMemorySuite *sAIMdMemory = NULL; + + sSPBasic->AcquireSuite(kAIMdMemorySuite, kAIMdMemorySuiteVersion, (const void **) &sAIMdMemory); + + if (sAIMdMemory != NULL) + { + sAIMdMemory->MdMemoryDisposeHandle((AIMdMemoryHandle) (m_hMatches)); + sSPBasic->ReleaseSuite(kAIMdMemorySuite, kAIMdMemorySuiteVersion); + } + } +} + +ASErr ArtMatcher::SetSpec(ai::int16 iX, ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr) +{ + ASErr result = kNoErr; + + if (m_MatchArtInDictionaries) + lWhichAttr |= kMatchDictionaryArt; + + if (0 <= iX && iX < m_iNumSpecs) + { + AIMatchingArtSpec *pSpec = m_pSpecs + iX; + + pSpec->type = shType; + pSpec->whichAttr = lWhichAttr; + pSpec->attr = lAttr; + } + else + { + result = AM_InvalidIndex; + } + + return result; +} + +ASErr ArtMatcher::GetMatchingArt(void) +{ + ASErr result = kNoErr; + + m_lNumMatches = 0; + + if (sAIMatchingArt == NULL) + { + result = AM_InvalidSuite; + goto ex; + } + + // Check for if the spec is equivalent to GetSelectedArt, so that we can benefit from the selection caching + if ( m_iNumSpecs == 1 && !m_MatchArtInDictionaries + && m_pSpecs[0].type == kAnyArt && m_pSpecs[0].whichAttr == kArtSelected + && m_pSpecs[0].attr == kArtSelected ) + { + result = sAIMatchingArt->GetSelectedArt(&m_hMatches, &m_lNumMatches); + } + else + { + result = sAIMatchingArt->GetMatchingArt(m_pSpecs, m_iNumSpecs, &m_hMatches, &m_lNumMatches); + } + +ex: + return result; +} + +ai::int32 ArtMatcher::GetNumMatches(void) +{ + return m_lNumMatches; +} + +AIArtHandle ArtMatcher::GetMatchedArt(ai::int32 iX) +{ + AIArtHandle matchedArt = NULL; + + if (0 <= iX && iX < m_lNumMatches) + { + matchedArt = (*m_hMatches)[iX]; + } + + return matchedArt; +} + +void ArtMatcher::ClearMatchedArt(ai::int32 iX) +{ + if (0 <= iX && iX < m_lNumMatches) + { + (*m_hMatches)[iX] = NULL; + } +} diff --git a/BloksAIPlugin/Vendor/common/source/FlashUIController.cpp b/BloksAIPlugin/Vendor/common/source/FlashUIController.cpp index cf479f8..7b34061 100644 --- a/BloksAIPlugin/Vendor/common/source/FlashUIController.cpp +++ b/BloksAIPlugin/Vendor/common/source/FlashUIController.cpp @@ -1,38 +1,38 @@ -//======================================================================================== -// -// $File: //ai/ai16/devtech/sdk/public/samplecode/common/source/FlashUIController.cpp $ -// -// $Revision: #1 $ -// -// Copyright 2011 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "IllustratorSDK.h" -#include "FlashUIController.h" - -FlashUIController::FlashUIController(const char* extensionId) -: fExtensionId(extensionId) -{ - fPPLib.Load(sAIFolders); -} - -FlashUIController::~FlashUIController(void) -{ - fPPLib.Unload(); -} - -PlugPlugErrorCode FlashUIController::LoadExtension() -{ - return fPPLib.LoadExtension(fExtensionId); -} - -PlugPlugErrorCode FlashUIController::UnloadExtension() -{ - return fPPLib.UnloadExtension(fExtensionId); -} +//======================================================================================== +// +// $File: //ai/ai16/devtech/sdk/public/samplecode/common/source/FlashUIController.cpp $ +// +// $Revision: #1 $ +// +// Copyright 2011 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "IllustratorSDK.h" +#include "FlashUIController.h" + +FlashUIController::FlashUIController(const char* extensionId) +: fExtensionId(extensionId) +{ + fPPLib.Load(sAIFolders); +} + +FlashUIController::~FlashUIController(void) +{ + fPPLib.Unload(); +} + +PlugPlugErrorCode FlashUIController::LoadExtension() +{ + return fPPLib.LoadExtension(fExtensionId); +} + +PlugPlugErrorCode FlashUIController::UnloadExtension() +{ + return fPPLib.UnloadExtension(fExtensionId); +} diff --git a/BloksAIPlugin/Vendor/common/source/HtmlUIController.cpp b/BloksAIPlugin/Vendor/common/source/HtmlUIController.cpp index 9f7e97e..6e20a6c 100644 --- a/BloksAIPlugin/Vendor/common/source/HtmlUIController.cpp +++ b/BloksAIPlugin/Vendor/common/source/HtmlUIController.cpp @@ -1,38 +1,38 @@ -//======================================================================================== -// -// $File: //ai/ai16/devtech/sdk/public/samplecode/common/source/HtmlUIController.cpp $ -// -// $Revision: #1 $ -// -// Copyright 2011 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "IllustratorSDK.h" -#include "HtmlUIController.h" - -HtmlUIController::HtmlUIController(const char* extensionId) -: htmlExtensionId(extensionId) -{ - htmlPPLib.Load(sAIFolders); -} - -HtmlUIController::~HtmlUIController(void) -{ - htmlPPLib.Unload(); -} - -PlugPlugErrorCode HtmlUIController::LoadExtension() -{ - return htmlPPLib.LoadExtension(htmlExtensionId); -} - -PlugPlugErrorCode HtmlUIController::UnloadExtension() -{ - return htmlPPLib.UnloadExtension(htmlExtensionId); -} +//======================================================================================== +// +// $File: //ai/ai16/devtech/sdk/public/samplecode/common/source/HtmlUIController.cpp $ +// +// $Revision: #1 $ +// +// Copyright 2011 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "IllustratorSDK.h" +#include "HtmlUIController.h" + +HtmlUIController::HtmlUIController(const char* extensionId) +: htmlExtensionId(extensionId) +{ + htmlPPLib.Load(sAIFolders); +} + +HtmlUIController::~HtmlUIController(void) +{ + htmlPPLib.Unload(); +} + +PlugPlugErrorCode HtmlUIController::LoadExtension() +{ + return htmlPPLib.LoadExtension(htmlExtensionId); +} + +PlugPlugErrorCode HtmlUIController::UnloadExtension() +{ + return htmlPPLib.UnloadExtension(htmlExtensionId); +} diff --git a/BloksAIPlugin/Vendor/common/source/IllustratorSDK.cpp b/BloksAIPlugin/Vendor/common/source/IllustratorSDK.cpp index 24621c3..31dc795 100644 --- a/BloksAIPlugin/Vendor/common/source/IllustratorSDK.cpp +++ b/BloksAIPlugin/Vendor/common/source/IllustratorSDK.cpp @@ -1,16 +1,16 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/IllustratorSDK.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "IllustratorSDK.h" +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "IllustratorSDK.h" diff --git a/BloksAIPlugin/Vendor/common/source/Main.cpp b/BloksAIPlugin/Vendor/common/source/Main.cpp index 2e05976..00d4266 100644 --- a/BloksAIPlugin/Vendor/common/source/Main.cpp +++ b/BloksAIPlugin/Vendor/common/source/Main.cpp @@ -1,126 +1,126 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/Main.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "Plugin.hpp" - -#include -#include - -#ifndef NDEBUG -#ifdef MAC_ENV - -#else -#include -#endif -#endif - -extern "C" -{ - SPBasicSuite *sSPBasic; -} - -extern Plugin *AllocatePlugin(SPPluginRef pluginRef); -extern void FixupReload(Plugin *plugin); - - -extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message) -{ - ASErr error = kNoErr; - SPMessageData *msgData = (SPMessageData *)message; - - Plugin *plugin = (Plugin *)msgData->globals; - - sSPBasic = msgData->basic; - - if (strcmp(caller, kSPInterfaceCaller) == 0) - { - if (strcmp( selector, kSPInterfaceStartupSelector) == 0) - { - plugin = AllocatePlugin(msgData->self); - if (plugin) - { - msgData->globals = (void *)plugin; - error = plugin->StartupPlugin((SPInterfaceMessage *)message); - - if (error != kNoErr) - { - // Make sure to delete in case startup failed - delete plugin; - plugin = nil; - msgData->globals = nil; - } - } - else - { - error = kOutOfMemoryErr; - } - } - else if (strcmp(selector, kSPInterfaceShutdownSelector) == 0) - { - if (plugin) - { - error = plugin->ShutdownPlugin((SPInterfaceMessage *)message); - delete plugin; - plugin = nil; - msgData->globals = nil; - } - } - } - - if (plugin) - { - if (Plugin::IsReloadMsg(caller, selector)) - { - // Call this before calling any virtual functions (like Message) - FixupReload(plugin); - error = plugin->ReloadPlugin((SPInterfaceMessage *)message); - } - else - { - // If a load or reload failed because the suites could not be acquired, we released - // any partially acquired suites and returned an error. However, SuitePea still might - // call us, so protect against this situation. - if (plugin->SuitesAcquired()) - error = plugin->Message(caller, selector, message); - else - error = kNoErr; - } - - if (error == kUnhandledMsgErr) - { - error = kNoErr; -#ifndef NDEBUG -#ifdef MAC_ENV - fprintf(stderr, "Warning: Unhandled plugin message: caller \"%s\" selector \"%s\"\n", caller, selector); -#else - char buf[1024]; - - sprintf(buf+1, "Warning: Unhandled plugin message: caller \"%s\" selector \"%s\"\n", caller, selector); - OutputDebugStringA(buf+1); -#endif -#endif - } - } - - if (error) - { - if (plugin) - plugin->ReportError(error, caller, selector, message); - else - Plugin::DefaultError(msgData->self, error); - } - - return error; -} +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "Plugin.hpp" + +#include +#include + +#ifndef NDEBUG +#ifdef MAC_ENV + +#else +#include +#endif +#endif + +extern "C" +{ + SPBasicSuite *sSPBasic; +} + +extern Plugin *AllocatePlugin(SPPluginRef pluginRef); +extern void FixupReload(Plugin *plugin); + + +extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message) +{ + ASErr error = kNoErr; + SPMessageData *msgData = (SPMessageData *)message; + + Plugin *plugin = (Plugin *)msgData->globals; + + sSPBasic = msgData->basic; + + if (strcmp(caller, kSPInterfaceCaller) == 0) + { + if (strcmp( selector, kSPInterfaceStartupSelector) == 0) + { + plugin = AllocatePlugin(msgData->self); + if (plugin) + { + msgData->globals = (void *)plugin; + error = plugin->StartupPlugin((SPInterfaceMessage *)message); + + if (error != kNoErr) + { + // Make sure to delete in case startup failed + delete plugin; + plugin = nullptr; + msgData->globals = nullptr; + } + } + else + { + error = kOutOfMemoryErr; + } + } + else if (strcmp(selector, kSPInterfaceShutdownSelector) == 0) + { + if (plugin) + { + error = plugin->ShutdownPlugin((SPInterfaceMessage *)message); + delete plugin; + plugin = nullptr; + msgData->globals = nullptr; + } + } + } + + if (plugin) + { + if (Plugin::IsReloadMsg(caller, selector)) + { + // Call this before calling any virtual functions (like Message) + FixupReload(plugin); + error = plugin->ReloadPlugin((SPInterfaceMessage *)message); + } + else + { + // If a load or reload failed because the suites could not be acquired, we released + // any partially acquired suites and returned an error. However, SuitePea still might + // call us, so protect against this situation. + if (plugin->SuitesAcquired()) + error = plugin->Message(caller, selector, message); + else + error = kNoErr; + } + + if (error == kUnhandledMsgErr) + { + error = kNoErr; +#ifndef NDEBUG +#ifdef MAC_ENV + fprintf(stderr, "Warning: Unhandled plugin message: caller \"%s\" selector \"%s\"\n", caller, selector); +#else + char buf[1024]; + + sprintf(buf+1, "Warning: Unhandled plugin message: caller \"%s\" selector \"%s\"\n", caller, selector); + OutputDebugStringA(buf+1); +#endif +#endif + } + } + + if (error) + { + if (plugin) + plugin->ReportError(error, caller, selector, message); + else + Plugin::DefaultError(msgData->self, error); + } + + return error; +} diff --git a/BloksAIPlugin/Vendor/common/source/Plugin.cpp b/BloksAIPlugin/Vendor/common/source/Plugin.cpp index a44cd76..41f377a 100644 --- a/BloksAIPlugin/Vendor/common/source/Plugin.cpp +++ b/BloksAIPlugin/Vendor/common/source/Plugin.cpp @@ -1,855 +1,870 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/Plugin.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "Plugin.hpp" - -//AI includes -#include "AIRuntime.h" -#include "AppContext.hpp" - -//standard includes -#include -#include -#include -#include - -//SP suites -extern "C" SPBasicSuite *sSPBasic; - -void DeallocCharBuffer( void *buffer ); - -//------------ - -Plugin::Plugin(SPPluginRef pluginRef) -{ - fPluginRef = pluginRef; - fSuites = NULL; - strncpy(fPluginName, "Plugin", kMaxStringLength); - fLockCount = 0; - fPluginAccess = nil; - fLastError = kNoErr; - fSupressDuplicateErrors = true; - fErrorTimeout = 5; // seconds - fLastErrorTime = 0; -} - - -Plugin::~Plugin() -{ -} - -void *Plugin::operator new(size_t size) -{ - return (Plugin *) ::new(std::nothrow) char[size]; -} - -void Plugin::operator delete(void *pMem) -{ - char *theMem = (char*)pMem; - ::delete [] theMem; -} - -ASErr Plugin::StartupPlugin(SPInterfaceMessage *message) -{ - ASErr error = kNoErr; - - if (!error) - error = SetGlobal(this); - - fSuites = new(std::nothrow) Suites; - - if (!fSuites) - error = kOutOfMemoryErr; - else - { - error = fSuites->Error(); - fSuites->InitializeRefCount(); - } - - if (error) - { - if (fSuites) - delete fSuites; - fSuites = nil; - } - - if (!error) - { - if(!error) - error = sSPPlugins->SetPluginName( message->d.self, fPluginName ); - - if (!error) - { - char notifierName[kMaxStringLength]; - - sprintf(notifierName, "%s App Started Notifier", fPluginName); - error = sAINotifier->AddNotifier(message->d.self, notifierName, kAIApplicationStartedNotifier, NULL); - } - } - - - if (!error) - error = AllocateSuiteTables(); - - if (!error) - FillSuiteTables(); - - if(!error) - error = Plugin::LockPlugin(true); - - return error; -} - -ASErr Plugin::ShutdownPlugin(SPInterfaceMessage * /*message*/) -{ - ASErr error = kNoErr; - - if(fSuites) { - delete fSuites; - fSuites = nil; - } - - SetGlobal(nil); - - return error; -} - -ASErr Plugin::LockPlugin(ASBoolean lock) -{ - if (lock) - { - fLockCount++; - if (fLockCount == 1) - sSPAccess->AcquirePlugin(fPluginRef, &fPluginAccess ); - } - else - { - fLockCount--; - if (fLockCount == 0) - { - sSPAccess->ReleasePlugin( fPluginAccess ); - fPluginAccess = nil; - } - else if (fLockCount < 0) - fLockCount = 0; // Shouldn't happen, but... - } - - return kNoErr; -} - -void Plugin::GetPluginName(char *name, unsigned int maxlen) -{ - strncpy(name, fPluginName, maxlen); - - if(maxlen < strlen(fPluginName)) - { - name[maxlen] = 0; - } -} - -ASBoolean Plugin::Purge() -{ - return false; -} - -ASBoolean Plugin::IsReloadMsg(char *caller, char *selector) -{ - return (strcmp(caller, kSPAccessCaller ) == 0 && - strcmp( selector, kSPAccessReloadSelector) == 0); -} - -ASErr Plugin::Message(char *caller, char *selector, void *message) -{ - ASErr error = kUnhandledMsgErr; - - // Acquire any missing optional suites. - AcquireOptionalSuites(); - - /* Sweet Pea messages */ - - if (strcmp(caller, kSPAccessCaller ) == 0) - { - if (strcmp( selector, kSPAccessUnloadSelector) == 0) - error = UnloadPlugin((SPInterfaceMessage *)message); - - else if (strcmp( selector, kSPAccessReloadSelector) == 0) - error = ReloadPlugin((SPInterfaceMessage *)message); - } - else if (strcmp(caller, kSPInterfaceCaller) == 0) - { - if (strcmp(selector, kSPInterfaceAboutSelector) == 0) - error = kNoErr; - - else if (strcmp(selector, kSPInterfaceStartupSelector) == 0) - error = kNoErr; - } - else if (strcmp(caller, kSPCacheCaller) == 0) - { - if (strcmp(selector, kSPPluginPurgeCachesSelector) == 0) - { - if (Purge()) - error = kSPPluginCachesFlushResponse; - else - error = kSPPluginCouldntFlushResponse; - } - } - else if (strcmp( caller, kSPPropertiesCaller ) == 0) - { - if (strcmp( selector, kSPPropertiesAcquireSelector ) == 0) - { - error = AcquireProperty((SPPropertiesMessage *) message); - } - else if (strcmp( selector, kSPPropertiesReleaseSelector ) == 0) - { - error = ReleaseProperty((SPPropertiesMessage *) message); - } - } - - /* Some common AI messages */ - - else if (strcmp(caller, kCallerAINotify) == 0) - { - AppContext appContext(((SPInterfaceMessage *)message)->d.self); - - // Ideally we would rely upon the caller to envelop our Notify method. - // But since we won't work right if he doesn't, do this ourselves - - AINotifierMessage *msg = (AINotifierMessage *)message; - - if (strcmp(msg->type, kAIApplicationStartedNotifier) == 0) - error = PostStartupPlugin(); - - if (!error || error == kUnhandledMsgErr) - { - if (strcmp( selector, kSelectorAINotify ) == 0) - error = Notify(msg); - } - } - else if (strcmp(caller, kActionCaller) == 0) - { - if (strcmp( selector, kDoActionSelector ) == 0) - { - error = GoAction((DoActionMessage *)message); - } - } - else if (strcmp(caller, kCallerAIMenu) == 0) - { - if (strcmp( selector, kSelectorAIGoMenuItem ) == 0) - { - error = GoMenuItem((AIMenuMessage *)message); - } - else if (strcmp( selector, kSelectorAIUpdateMenuItem ) == 0) - { - error = UpdateMenuItem((AIMenuMessage *)message); - } - } - else if (strcmp(caller, kCallerAIFilter) == 0) - { - if (strcmp( selector, kSelectorAIGetFilterParameters ) == 0) - { - error = GetFilterParameters((AIFilterMessage *)message); - } - else if (strcmp( selector, kSelectorAIGoFilter ) == 0) - { - error = GoFilter((AIFilterMessage *)message); - } - } - else if (strcmp(caller, kCallerAIPluginGroup) == 0) - { - if (strcmp( selector, kSelectorAINotifyEdits ) == 0) - { - error = PluginGroupNotify((AIPluginGroupMessage *)message); - } - else if (strcmp( selector, kSelectorAIUpdateArt ) == 0) - { - error = PluginGroupUpdate((AIPluginGroupMessage *)message); - } - } - else if (strcmp(caller, kCallerAIFileFormat) == 0) - { - if (strcmp( selector, kSelectorAIGetFileFormatParameters ) == 0) - { - error = GetFileFormatParameters((AIFileFormatMessage *)message); - } - else if (strcmp( selector, kSelectorAIGoFileFormat ) == 0) - { - error = GoFileFormat((AIFileFormatMessage *)message); - } - else if (strcmp( selector, kSelectorAICheckFileFormat ) == 0) - { - error = CheckFileFormat((AIFileFormatMessage *)message); - } - else if ( strcmp( selector, kSelectorAIUpdateFileFormat ) == 0 ) - { - error = FileFormatUpdate( (AIUpdateFileFormatMessage *)message ); - } - else if (!strcmp( selector, kDoActionSelector)) - { - error = SetFileFormatParameters( (DoActionMessage *) message ); - } - } - else if (strcmp(caller, kCallerAITool) == 0) - { - if (strcmp( selector, kSelectorAIEditToolOptions ) == 0) - { - error = EditTool((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAITrackToolCursor ) == 0) - { - error = TrackToolCursor((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAIToolMouseDown ) == 0) - { - error = ToolMouseDown((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAIToolMouseDrag ) == 0) - { - error = ToolMouseDrag((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAIToolMouseUp ) == 0) - { - error = ToolMouseUp((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAISelectTool ) == 0) - { - error = SelectTool((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAIDeselectTool ) == 0) - { - error = DeselectTool((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAIReselectTool ) == 0) - { - error = ReselectTool((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAIToolDecreaseDiameter ) == 0) - { - error = DecreaseDiameter((AIToolMessage *)message); - } - else if (strcmp( selector, kSelectorAIToolIncreaseDiameter ) == 0) - { - error = IncreaseDiameter((AIToolMessage *)message); - } - - - } else if (strcmp(caller, kCallerAILiveEffect ) == 0) - { - if (strcmp( selector, kSelectorAIEditLiveEffectParameters ) == 0) - { - error = EditLiveEffectParameters((AILiveEffectEditParamMessage *)message); - } - else if (strcmp( selector, kSelectorAIGoLiveEffect ) == 0) - { - error = GoLiveEffect((AILiveEffectGoMessage *)message); - } - else if (strcmp( selector, kSelectorAILiveEffectInterpolate ) == 0) - { - error = LiveEffectInterpolate((AILiveEffectInterpParamMessage *)message); - } - else if (strcmp( selector, kSelectorAILiveEffectInputType ) == 0) - { - error = LiveEffectGetInputType((AILiveEffectInputTypeMessage *)message); - } - else if (strcmp( selector, kSelectorAILiveEffectScaleParameters ) == 0) - { - error = LiveEffectScaleParameters((AILiveEffectScaleParamMessage *)message); - } - else if (strcmp( selector, kSelectorAILiveEffectConverColorSpace ) == 0) - { - error = LiveEffectConvertColorSpace((AILiveEffectConvertColorMessage *)message); - } - else if (strcmp( selector, kSelectorAILiveEffectAdjustColors ) == 0) - { - error = LiveEffectAdjustColors((AILiveEffectAdjustColorsMessage *)message); - } - else if (strcmp( selector, kSelectorAILiveEffectHandleMerge ) == 0) - { - error = LiveEffectHandleMerge((AILiveEffectHandleMergeMessage *)message); - } - } else if (strcmp(caller, kCallerAITimer ) == 0) - { - if (strcmp( selector, kSelectorAIGoTimer ) == 0) - { - error = GoTimer((AITimerMessage *)message); - } - } - else if (strcmp(caller, kCallerAIClipboard ) == 0) - { - if ( strcmp( selector, kSelectorAIGoClipboard ) == 0 ) - error = GoClipboard( (AIClipboardMessage *) message ); - - else if ( strcmp( selector, kSelectorAICanCopyClipboard ) == 0 ) - error = CanCopyClipboard( (AIClipboardMessage *) message ); - - else if ( strcmp( selector, kSelectorAICloneClipboard ) == 0 ) - error = CloneClipboard( (AIClipboardMessage *) message ); - - else if ( strcmp( selector, kSelectorAIDisposeClipboard ) == 0 ) - error = DisposeClipboard( (AIClipboardMessage *) message ); - } - else if (strcmp(caller, kAIWorkspaceCaller ) == 0) - { - if ( strcmp( selector, kAIWSWriteSelector ) == 0 ) - error = WorkspaceWrite( (AIWorkspaceMessage *) message ); - - else if ( strcmp( selector, kAIWSRestoreSelector ) == 0 ) - error = WorkspaceRestore( (AIWorkspaceMessage *) message ); - - else if ( strcmp( selector, kAIWSDefaultSelector ) == 0 ) - error = WorkspaceDefault( (AIWorkspaceMessage *) message ); - } - return error; -} - -ASErr Plugin::UnloadPlugin(SPInterfaceMessage * /*message*/) -{ - ASErr error = kNoErr; - - EmptySuiteTables(); - - SetGlobal(nil); - - if (fSuites) { - delete fSuites; - fSuites = nil; - } - - return error; -} - - -ASErr Plugin::ReloadPlugin(SPInterfaceMessage * /*message*/) -{ - ASErr error = kNoErr; - - if (!error) - error = SetGlobal(this); - - // fSuites should always be nil here, but check just to be sure - if (!fSuites) - fSuites = new(std::nothrow) Suites; - - if(!fSuites) - error = kOutOfMemoryErr; - else - { - error = fSuites->Error(); - fSuites->InitializeRefCount(); - } - - if (error) - { - if (fSuites) - delete fSuites; - fSuites = nil; - } - - if (!error) - FillSuiteTables(); - - return error; -} - - -void Plugin::ReportError(ASErr error, char * /*caller*/, char * /*selector*/, void * /*message*/) -{ - if (FilterError(error)) - return; - - time_t now = time(nil); - - if (error == fLastError && fSupressDuplicateErrors && - now < fLastErrorTime + fErrorTimeout) - return; - - fLastError = error; - fLastErrorTime = now; - DefaultError(GetPluginRef(), error); -} - - -void Plugin::DefaultError(SPPluginRef ref, ASErr error) -{ - if (FilterError(error)) - return; - - ASBoolean gotBasic = false; - if (sAIUser == nil) { - if (sSPBasic == nil) - return; - ASErr err = sSPBasic->AcquireSuite(kAIUserSuite, - kAIUserSuiteVersion, (const void **) &sAIUser); - if (err || sAIUser == nil) - return; - gotBasic = true; - } - - char msg[128]; - char *m; - m = FindMsg(ref, error, msg, sizeof(msg)); - if (m == nil) - goto release; - - char mbuf[128]; - - if (strlen(m) < 120) { - char errString[10]; - if (error < 16385) { // Then probably a plain ol' number - sprintf(errString, "%d", error); - - } else { // Yucky 4-byte string - int i; - for (i = 3; i >= 0; i--) { - errString[i] = (char) ((unsigned long) error) & 0xff; - error = ((unsigned long) error) >> 8; - } - errString[4] = '\0'; - } - sprintf(mbuf, m, errString); - m = mbuf; - } - sAIUser->ErrorAlert(ai::UnicodeString(m)); -release: - if (gotBasic) { - sSPBasic->ReleaseSuite(kAIUserSuite, kAIUserSuiteVersion); - sAIUser = nil; - } -} - -char *Plugin::FindMsg(SPPluginRef ref, ASErr error, char *buf, int len) -{ - //int n = 1; - //ASErr err; - /*while (1) { - char code[10]; - err = sADMBasic->GetIndexString(ref, - 16050, n, code, sizeof(code)); - // If we got an error, back off and use the last string, which should be - // the default message - if (err || code[0] == '\0') { - if (n == 1) - return nil; // no error strings found - else { - n--; - goto getString; - } - } - - if (code[0] == '-' || (code[0] >= '0' && code[0] <= '9')) { - // This is a number, so see if it matches - int c = atoi(code); - if (c == error) { - n++; - goto getString; - } - - } else { - // non numeric 4 byte err code. (e.g.) '!sel'. - int c, i; - c = 0; - - for (i = 0; i < 4; i++) - c = (c << 8) + code[i]; - - if (c == error) { - n++; - goto getString; - } - } - - n += 2; - } - -getString: - err = sADMBasic->GetIndexString(ref, 16050, n, buf, len); - if (err || buf[0] == '\0') - return nil; - else - return buf;*/ - return nil; -} - - -ASBoolean Plugin::FilterError(ASErr error) -{ - static const ASErr errors[] = { - kUnknownFormatErr, - kRefusePluginGroupReply, - kWantsAfterMsgPluginGroupReply, - kMarkValidPluginGroupReply, - kDontCarePluginGroupReply, - kDestroyPluginGroupReply, - kCheckPluginGroupReply, - kCustomHitPluginGroupReply, - kToolCantTrackCursorErr, - kSPPluginCachesFlushResponse, - kSPSuiteNotFoundError, - kSPCantAcquirePluginError, - kDidSymbolReplacement, - kSkipEditGroupReply, - kIterationCanQuitReply, - kCanceledErr, - 361, - 0 - }; - - int i; - for (i = 0; errors[i] != 0 && errors[i] != error; i++) {} - return errors[i] != 0; -} - -/* Stubbies */ - -ASErr Plugin::AllocateSuiteTables() -{ - return kNoErr; -} - -ASErr Plugin::FillSuiteTables() -{ - return kNoErr; -} - -ASErr Plugin::EmptySuiteTables() -{ - return kNoErr; -} - -ASErr Plugin::AcquireOptionalSuites() -{ - if(fSuites) - fSuites->acquire_Optional_Suites(); - return kNoErr; -} - -ASErr Plugin::PostStartupPlugin() -{ - return kNoErr; -} - -ASErr Plugin::SetGlobal(Plugin * /*plugin*/) -{ - return kNoErr; -} - -ASErr Plugin::AcquireProperty(SPPropertiesMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::ReleaseProperty(SPPropertiesMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::Notify(AINotifierMessage * /*message*/) -{ - return kNoErr; -} - -ASErr Plugin::GoAction(DoActionMessage * /*message*/) -{ - return kNoErr; -} - -ASErr Plugin::GoMenuItem(AIMenuMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::UpdateMenuItem(AIMenuMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::GetFilterParameters(AIFilterMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::GoFilter(AIFilterMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::PluginGroupNotify(AIPluginGroupMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::PluginGroupUpdate(AIPluginGroupMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::GetFileFormatParameters(AIFileFormatMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::GoFileFormat(AIFileFormatMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::CheckFileFormat(AIFileFormatMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::FileFormatUpdate(AIUpdateFileFormatMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::SetFileFormatParameters(DoActionMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::EditTool(AIToolMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::TrackToolCursor(AIToolMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::ToolMouseDown(AIToolMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::ToolMouseDrag(AIToolMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::ToolMouseUp(AIToolMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::SelectTool(AIToolMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::DeselectTool(AIToolMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::ReselectTool(AIToolMessage * /*message*/) -{ - return kNoErr; -} - -ASErr Plugin::DecreaseDiameter(AIToolMessage * /*message*/) -{ - return kNoErr; -} - -ASErr Plugin::IncreaseDiameter(AIToolMessage * /*message*/) -{ - return kNoErr; -} - -ASErr Plugin::EditLiveEffectParameters(AILiveEffectEditParamMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::GoLiveEffect(AILiveEffectGoMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::LiveEffectInterpolate(AILiveEffectInterpParamMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::LiveEffectGetInputType(AILiveEffectInputTypeMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::LiveEffectConvertColorSpace(AILiveEffectConvertColorMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::LiveEffectScaleParameters(AILiveEffectScaleParamMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::LiveEffectAdjustColors(AILiveEffectAdjustColorsMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::LiveEffectHandleMerge(AILiveEffectHandleMergeMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::GoTimer(AITimerMessage * /*message*/) -{ - return kUnhandledMsgErr; -} - - -ASErr Plugin::GoClipboard(AIClipboardMessage * /* message*/) -{ - return kUnhandledMsgErr; -} - - -ASErr Plugin::CanCopyClipboard(AIClipboardMessage * /* message*/) -{ - return kUnhandledMsgErr; -} - - -ASErr Plugin::CloneClipboard(AIClipboardMessage * /* message*/) -{ - return kUnhandledMsgErr; -} - - -ASErr Plugin::DisposeClipboard(AIClipboardMessage * /* message*/) -{ - return kUnhandledMsgErr; -} - - -ASErr Plugin::WorkspaceWrite(AIWorkspaceMessage * /* message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::WorkspaceRestore(AIWorkspaceMessage * /* message*/) -{ - return kUnhandledMsgErr; -} - -ASErr Plugin::WorkspaceDefault(AIWorkspaceMessage * /* message*/) -{ - return kUnhandledMsgErr; -} +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "Plugin.hpp" + +//AI includes +#include "AIRuntime.h" +#include "AppContext.hpp" + +//standard includes +#include +#include +#include +#include + +//SP suites +extern "C" SPBasicSuite *sSPBasic; + +void DeallocCharBuffer( void *buffer ); + +//------------ + +Plugin::Plugin(SPPluginRef pluginRef) +{ + fPluginRef = pluginRef; + fSuites = NULL; + strncpy(fPluginName, "Plugin", kMaxStringLength); + fLockCount = 0; + fPluginAccess = nullptr; + fLastError = kNoErr; + fSupressDuplicateErrors = true; + fErrorTimeout = 5; // seconds + fLastErrorTime = 0; +} + + +Plugin::~Plugin() +{ +} + +void *Plugin::operator new(size_t size) +{ + return (Plugin *) ::new(std::nothrow) char[size]; +} + +void Plugin::operator delete(void *pMem) +{ + char *theMem = (char*)pMem; + ::delete [] theMem; +} + +ASErr Plugin::StartupPlugin(SPInterfaceMessage *message) +{ + ASErr error = kNoErr; + + if (!error) + error = SetGlobal(this); + + fSuites = new(std::nothrow) Suites; + + if (!fSuites) + error = kOutOfMemoryErr; + else + { + error = fSuites->Error(); + fSuites->InitializeRefCount(); + } + + if (error) + { + if (fSuites) + delete fSuites; + fSuites = nullptr; + } + + if (!error) + { + if(!error) + error = sSPPlugins->SetPluginName( message->d.self, fPluginName ); + + if (!error) + { + char notifierName[kMaxStringLength]; + + sprintf(notifierName, "%s App Started Notifier", fPluginName); + error = sAINotifier->AddNotifier(message->d.self, notifierName, kAIApplicationStartedNotifier, &fApplicationStartedNotifier); + } + + if (!error) + { + char notifierName[kMaxStringLength]; + + sprintf(notifierName, "%s Application Shutdown Notifier", fPluginName); + error = sAINotifier->AddNotifier(message->d.self, notifierName, kAIApplicationShutdownNotifier, &fApplicationShutdownNotifer); + } + } + + + if (!error) + error = AllocateSuiteTables(); + + if (!error) + FillSuiteTables(); + + if(!error) + error = Plugin::LockPlugin(true); + + return error; +} + +ASErr Plugin::ShutdownPlugin(SPInterfaceMessage * /*message*/) +{ + ASErr error = kNoErr; + + if(fSuites) { + delete fSuites; + fSuites = nullptr; + } + + SetGlobal(nullptr); + + return error; +} + +ASErr Plugin::LockPlugin(ASBoolean lock) +{ + if (lock) + { + fLockCount++; + if (fLockCount == 1) + sSPAccess->AcquirePlugin(fPluginRef, &fPluginAccess ); + } + else + { + fLockCount--; + if (fLockCount == 0) + { + sSPAccess->ReleasePlugin( fPluginAccess ); + fPluginAccess = nullptr; + } + else if (fLockCount < 0) + fLockCount = 0; // Shouldn't happen, but... + } + + return kNoErr; +} + +void Plugin::GetPluginName(char *name, unsigned int maxlen) +{ + strncpy(name, fPluginName, maxlen); + + if(maxlen < strlen(fPluginName)) + { + name[maxlen] = 0; + } +} + +ASBoolean Plugin::Purge() +{ + return false; +} + +ASBoolean Plugin::IsReloadMsg(char *caller, char *selector) +{ + return (strcmp(caller, kSPAccessCaller ) == 0 && + strcmp( selector, kSPAccessReloadSelector) == 0); +} + +ASErr Plugin::Message(char *caller, char *selector, void *message) +{ + ASErr error = kUnhandledMsgErr; + + // Acquire any missing optional suites. + AcquireOptionalSuites(); + + /* Sweet Pea messages */ + + if (strcmp(caller, kSPAccessCaller ) == 0) + { + if (strcmp( selector, kSPAccessUnloadSelector) == 0) + error = UnloadPlugin((SPInterfaceMessage *)message); + + else if (strcmp( selector, kSPAccessReloadSelector) == 0) + error = ReloadPlugin((SPInterfaceMessage *)message); + } + else if (strcmp(caller, kSPInterfaceCaller) == 0) + { + if (strcmp(selector, kSPInterfaceAboutSelector) == 0) + error = kNoErr; + + else if (strcmp(selector, kSPInterfaceStartupSelector) == 0) + error = kNoErr; + } + else if (strcmp(caller, kSPCacheCaller) == 0) + { + if (strcmp(selector, kSPPluginPurgeCachesSelector) == 0) + { + if (Purge()) + error = kSPPluginCachesFlushResponse; + else + error = kSPPluginCouldntFlushResponse; + } + } + else if (strcmp( caller, kSPPropertiesCaller ) == 0) + { + if (strcmp( selector, kSPPropertiesAcquireSelector ) == 0) + { + error = AcquireProperty((SPPropertiesMessage *) message); + } + else if (strcmp( selector, kSPPropertiesReleaseSelector ) == 0) + { + error = ReleaseProperty((SPPropertiesMessage *) message); + } + } + + /* Some common AI messages */ + + else if (strcmp(caller, kCallerAINotify) == 0) + { + AppContext appContext(((SPInterfaceMessage *)message)->d.self); + + // Ideally we would rely upon the caller to envelop our Notify method. + // But since we won't work right if he doesn't, do this ourselves + + AINotifierMessage *msg = (AINotifierMessage *)message; + + if (msg->notifier == fApplicationStartedNotifier) + error = PostStartupPlugin(); + else if (msg->notifier == fApplicationShutdownNotifer) + error = PreShutdownPlugin(); + + if (!error || error == kUnhandledMsgErr) + { + if (strcmp( selector, kSelectorAINotify ) == 0) + error = Notify(msg); + } + } + else if (strcmp(caller, kActionCaller) == 0) + { + if (strcmp( selector, kDoActionSelector ) == 0) + { + error = GoAction((DoActionMessage *)message); + } + } + else if (strcmp(caller, kCallerAIMenu) == 0) + { + if (strcmp( selector, kSelectorAIGoMenuItem ) == 0) + { + error = GoMenuItem((AIMenuMessage *)message); + } + else if (strcmp( selector, kSelectorAIUpdateMenuItem ) == 0) + { + error = UpdateMenuItem((AIMenuMessage *)message); + } + } + else if (strcmp(caller, kCallerAIFilter) == 0) + { + if (strcmp( selector, kSelectorAIGetFilterParameters ) == 0) + { + error = GetFilterParameters((AIFilterMessage *)message); + } + else if (strcmp( selector, kSelectorAIGoFilter ) == 0) + { + error = GoFilter((AIFilterMessage *)message); + } + } + else if (strcmp(caller, kCallerAIPluginGroup) == 0) + { + if (strcmp( selector, kSelectorAINotifyEdits ) == 0) + { + error = PluginGroupNotify((AIPluginGroupMessage *)message); + } + else if (strcmp( selector, kSelectorAIUpdateArt ) == 0) + { + error = PluginGroupUpdate((AIPluginGroupMessage *)message); + } + } + else if (strcmp(caller, kCallerAIFileFormat) == 0) + { + if (strcmp( selector, kSelectorAIGetFileFormatParameters ) == 0) + { + error = GetFileFormatParameters((AIFileFormatMessage *)message); + } + else if (strcmp( selector, kSelectorAIGoFileFormat ) == 0) + { + error = GoFileFormat((AIFileFormatMessage *)message); + } + else if (strcmp( selector, kSelectorAICheckFileFormat ) == 0) + { + error = CheckFileFormat((AIFileFormatMessage *)message); + } + else if ( strcmp( selector, kSelectorAIUpdateFileFormat ) == 0 ) + { + error = FileFormatUpdate( (AIUpdateFileFormatMessage *)message ); + } + else if (!strcmp( selector, kDoActionSelector)) + { + error = SetFileFormatParameters( (DoActionMessage *) message ); + } + } + else if (strcmp(caller, kCallerAITool) == 0) + { + if (strcmp( selector, kSelectorAIEditToolOptions ) == 0) + { + error = EditTool((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAITrackToolCursor ) == 0) + { + error = TrackToolCursor((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAIToolMouseDown ) == 0) + { + error = ToolMouseDown((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAIToolMouseDrag ) == 0) + { + error = ToolMouseDrag((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAIToolMouseUp ) == 0) + { + error = ToolMouseUp((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAISelectTool ) == 0) + { + error = SelectTool((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAIDeselectTool ) == 0) + { + error = DeselectTool((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAIReselectTool ) == 0) + { + error = ReselectTool((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAIToolDecreaseDiameter ) == 0) + { + error = DecreaseDiameter((AIToolMessage *)message); + } + else if (strcmp( selector, kSelectorAIToolIncreaseDiameter ) == 0) + { + error = IncreaseDiameter((AIToolMessage *)message); + } + + + } else if (strcmp(caller, kCallerAILiveEffect ) == 0) + { + if (strcmp( selector, kSelectorAIEditLiveEffectParameters ) == 0) + { + error = EditLiveEffectParameters((AILiveEffectEditParamMessage *)message); + } + else if (strcmp( selector, kSelectorAIGoLiveEffect ) == 0) + { + error = GoLiveEffect((AILiveEffectGoMessage *)message); + } + else if (strcmp( selector, kSelectorAILiveEffectInterpolate ) == 0) + { + error = LiveEffectInterpolate((AILiveEffectInterpParamMessage *)message); + } + else if (strcmp( selector, kSelectorAILiveEffectInputType ) == 0) + { + error = LiveEffectGetInputType((AILiveEffectInputTypeMessage *)message); + } + else if (strcmp( selector, kSelectorAILiveEffectScaleParameters ) == 0) + { + error = LiveEffectScaleParameters((AILiveEffectScaleParamMessage *)message); + } + else if (strcmp( selector, kSelectorAILiveEffectConverColorSpace ) == 0) + { + error = LiveEffectConvertColorSpace((AILiveEffectConvertColorMessage *)message); + } + else if (strcmp( selector, kSelectorAILiveEffectAdjustColors ) == 0) + { + error = LiveEffectAdjustColors((AILiveEffectAdjustColorsMessage *)message); + } + else if (strcmp( selector, kSelectorAILiveEffectHandleMerge ) == 0) + { + error = LiveEffectHandleMerge((AILiveEffectHandleMergeMessage *)message); + } + } else if (strcmp(caller, kCallerAITimer ) == 0) + { + if (strcmp( selector, kSelectorAIGoTimer ) == 0) + { + error = GoTimer((AITimerMessage *)message); + } + } + else if (strcmp(caller, kCallerAIClipboard ) == 0) + { + if ( strcmp( selector, kSelectorAIGoClipboard ) == 0 ) + error = GoClipboard( (AIClipboardMessage *) message ); + + else if ( strcmp( selector, kSelectorAICanCopyClipboard ) == 0 ) + error = CanCopyClipboard( (AIClipboardMessage *) message ); + + else if ( strcmp( selector, kSelectorAICloneClipboard ) == 0 ) + error = CloneClipboard( (AIClipboardMessage *) message ); + + else if ( strcmp( selector, kSelectorAIDisposeClipboard ) == 0 ) + error = DisposeClipboard( (AIClipboardMessage *) message ); + } + else if (strcmp(caller, kAIWorkspaceCaller ) == 0) + { + if ( strcmp( selector, kAIWSWriteSelector ) == 0 ) + error = WorkspaceWrite( (AIWorkspaceMessage *) message ); + + else if ( strcmp( selector, kAIWSRestoreSelector ) == 0 ) + error = WorkspaceRestore( (AIWorkspaceMessage *) message ); + + else if ( strcmp( selector, kAIWSDefaultSelector ) == 0 ) + error = WorkspaceDefault( (AIWorkspaceMessage *) message ); + } + return error; +} + +ASErr Plugin::UnloadPlugin(SPInterfaceMessage * /*message*/) +{ + ASErr error = kNoErr; + + EmptySuiteTables(); + + SetGlobal(nullptr); + + if (fSuites) { + delete fSuites; + fSuites = nullptr; + } + + return error; +} + + +ASErr Plugin::ReloadPlugin(SPInterfaceMessage * /*message*/) +{ + ASErr error = kNoErr; + + if (!error) + error = SetGlobal(this); + + // fSuites should always be nullptr here, but check just to be sure + if (!fSuites) + fSuites = new(std::nothrow) Suites; + + if(!fSuites) + error = kOutOfMemoryErr; + else + { + error = fSuites->Error(); + fSuites->InitializeRefCount(); + } + + if (error) + { + if (fSuites) + delete fSuites; + fSuites = nullptr; + } + + if (!error) + FillSuiteTables(); + + return error; +} + + +void Plugin::ReportError(ASErr error, char * /*caller*/, char * /*selector*/, void * /*message*/) +{ + if (FilterError(error)) + return; + + time_t now = time(nullptr); + + if (error == fLastError && fSupressDuplicateErrors && + now < fLastErrorTime + fErrorTimeout) + return; + + fLastError = error; + fLastErrorTime = now; + DefaultError(GetPluginRef(), error); +} + + +void Plugin::DefaultError(SPPluginRef ref, ASErr error) +{ + if (FilterError(error)) + return; + + ASBoolean gotBasic = false; + if (sAIUser == nullptr) { + if (sSPBasic == nullptr) + return; + ASErr err = sSPBasic->AcquireSuite(kAIUserSuite, + kAIUserSuiteVersion, (const void **) &sAIUser); + if (err || sAIUser == nullptr) + return; + gotBasic = true; + } + + char msg[128]; + char *m; + m = FindMsg(ref, error, msg, sizeof(msg)); + if (m == nullptr) + goto release; + + char mbuf[128]; + + if (strlen(m) < 120) { + char errString[10]; + if (error < 16385) { // Then probably a plain ol' number + sprintf(errString, "%d", error); + + } else { // Yucky 4-byte string + int i; + for (i = 3; i >= 0; i--) { + errString[i] = (char) ((unsigned long) error) & 0xff; + error = ((unsigned long) error) >> 8; + } + errString[4] = '\0'; + } + sprintf(mbuf, m, errString); + m = mbuf; + } + sAIUser->ErrorAlert(ai::UnicodeString(m)); +release: + if (gotBasic) { + sSPBasic->ReleaseSuite(kAIUserSuite, kAIUserSuiteVersion); + sAIUser = nullptr; + } +} + +char *Plugin::FindMsg(SPPluginRef /*ref*/, ASErr /*error*/, char * /*buf*/, int /*len*/) +{ + //int n = 1; + //ASErr err; + /*while (1) { + char code[10]; + err = sADMBasic->GetIndexString(ref, + 16050, n, code, sizeof(code)); + // If we got an error, back off and use the last string, which should be + // the default message + if (err || code[0] == '\0') { + if (n == 1) + return nullptr; // no error strings found + else { + n--; + goto getString; + } + } + + if (code[0] == '-' || (code[0] >= '0' && code[0] <= '9')) { + // This is a number, so see if it matches + int c = atoi(code); + if (c == error) { + n++; + goto getString; + } + + } else { + // non numeric 4 byte err code. (e.g.) '!sel'. + int c, i; + c = 0; + + for (i = 0; i < 4; i++) + c = (c << 8) + code[i]; + + if (c == error) { + n++; + goto getString; + } + } + + n += 2; + } + +getString: + err = sADMBasic->GetIndexString(ref, 16050, n, buf, len); + if (err || buf[0] == '\0') + return nullptr; + else + return buf;*/ + return nullptr; +} + + +ASBoolean Plugin::FilterError(ASErr error) +{ + static const ASErr errors[] = { + kUnknownFormatErr, + kRefusePluginGroupReply, + kWantsAfterMsgPluginGroupReply, + kMarkValidPluginGroupReply, + kDontCarePluginGroupReply, + kDestroyPluginGroupReply, + kCheckPluginGroupReply, + kCustomHitPluginGroupReply, + kToolCantTrackCursorErr, + kSPPluginCachesFlushResponse, + kSPSuiteNotFoundError, + kSPCantAcquirePluginError, + kDidSymbolReplacement, + kSkipEditGroupReply, + kIterationCanQuitReply, + kCanceledErr, + 361, + 0 + }; + + int i; + for (i = 0; errors[i] != 0 && errors[i] != error; i++) {} + return errors[i] != 0; +} + +/* Stubbies */ + +ASErr Plugin::AllocateSuiteTables() +{ + return kNoErr; +} + +ASErr Plugin::FillSuiteTables() +{ + return kNoErr; +} + +ASErr Plugin::EmptySuiteTables() +{ + return kNoErr; +} + +ASErr Plugin::AcquireOptionalSuites() +{ + if(fSuites) + fSuites->acquire_Optional_Suites(); + return kNoErr; +} + +ASErr Plugin::PostStartupPlugin() +{ + return kNoErr; +} + +ASErr Plugin::PreShutdownPlugin() +{ + return kNoErr; +} + +ASErr Plugin::SetGlobal(Plugin * /*plugin*/) +{ + return kNoErr; +} + +ASErr Plugin::AcquireProperty(SPPropertiesMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::ReleaseProperty(SPPropertiesMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::Notify(AINotifierMessage * /*message*/) +{ + return kNoErr; +} + +ASErr Plugin::GoAction(DoActionMessage * /*message*/) +{ + return kNoErr; +} + +ASErr Plugin::GoMenuItem(AIMenuMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::UpdateMenuItem(AIMenuMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::GetFilterParameters(AIFilterMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::GoFilter(AIFilterMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::PluginGroupNotify(AIPluginGroupMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::PluginGroupUpdate(AIPluginGroupMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::GetFileFormatParameters(AIFileFormatMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::GoFileFormat(AIFileFormatMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::CheckFileFormat(AIFileFormatMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::FileFormatUpdate(AIUpdateFileFormatMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::SetFileFormatParameters(DoActionMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::EditTool(AIToolMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::TrackToolCursor(AIToolMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::ToolMouseDown(AIToolMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::ToolMouseDrag(AIToolMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::ToolMouseUp(AIToolMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::SelectTool(AIToolMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::DeselectTool(AIToolMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::ReselectTool(AIToolMessage * /*message*/) +{ + return kNoErr; +} + +ASErr Plugin::DecreaseDiameter(AIToolMessage * /*message*/) +{ + return kNoErr; +} + +ASErr Plugin::IncreaseDiameter(AIToolMessage * /*message*/) +{ + return kNoErr; +} + +ASErr Plugin::EditLiveEffectParameters(AILiveEffectEditParamMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::GoLiveEffect(AILiveEffectGoMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::LiveEffectInterpolate(AILiveEffectInterpParamMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::LiveEffectGetInputType(AILiveEffectInputTypeMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::LiveEffectConvertColorSpace(AILiveEffectConvertColorMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::LiveEffectScaleParameters(AILiveEffectScaleParamMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::LiveEffectAdjustColors(AILiveEffectAdjustColorsMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::LiveEffectHandleMerge(AILiveEffectHandleMergeMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::GoTimer(AITimerMessage * /*message*/) +{ + return kUnhandledMsgErr; +} + + +ASErr Plugin::GoClipboard(AIClipboardMessage * /* message*/) +{ + return kUnhandledMsgErr; +} + + +ASErr Plugin::CanCopyClipboard(AIClipboardMessage * /* message*/) +{ + return kUnhandledMsgErr; +} + + +ASErr Plugin::CloneClipboard(AIClipboardMessage * /* message*/) +{ + return kUnhandledMsgErr; +} + + +ASErr Plugin::DisposeClipboard(AIClipboardMessage * /* message*/) +{ + return kUnhandledMsgErr; +} + + +ASErr Plugin::WorkspaceWrite(AIWorkspaceMessage * /* message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::WorkspaceRestore(AIWorkspaceMessage * /* message*/) +{ + return kUnhandledMsgErr; +} + +ASErr Plugin::WorkspaceDefault(AIWorkspaceMessage * /* message*/) +{ + return kUnhandledMsgErr; +} diff --git a/BloksAIPlugin/Vendor/common/source/SDKAboutPluginsHelper.cpp b/BloksAIPlugin/Vendor/common/source/SDKAboutPluginsHelper.cpp index cc0aa91..c33fe9b 100644 --- a/BloksAIPlugin/Vendor/common/source/SDKAboutPluginsHelper.cpp +++ b/BloksAIPlugin/Vendor/common/source/SDKAboutPluginsHelper.cpp @@ -1,129 +1,129 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/SDKAboutPluginsHelper.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "IllustratorSDK.h" -#include "SDKDef.h" -#include "SDKAboutPluginsHelper.h" - -/* -*/ -SDKAboutPluginsHelper::SDKAboutPluginsHelper() : fAIMenu(nil), fAIUser(nil) -{ -} - -/* -*/ -SDKAboutPluginsHelper::~SDKAboutPluginsHelper() -{ -} - -/* -*/ -AIErr SDKAboutPluginsHelper::AddAboutPluginsMenuItem(SPInterfaceMessage* message, - const char* companyMenuGroupName, - const ai::UnicodeString& companyName, - const char* pluginName, - AIMenuItemHandle* menuItemHandle) -{ - AIErr error = kNoErr; - - if (fAIMenu == nil) { - error = message->d.basic->AcquireSuite( kAIMenuSuite, kAIMenuSuiteVersion, (const void **) &fAIMenu ); - } - - if (!error && fAIMenu != nil) { - // Add an about plug-ins menu group for the given company under Illustrator's about group. - bool exists = false; - error = this->GroupExists(companyMenuGroupName, exists); - if (!error && !exists) { - AIPlatformAddMenuItemDataUS companyRootMenuData; - companyRootMenuData.groupName = kAboutMenuGroup; - companyRootMenuData.itemText = companyName; - AIMenuItemHandle companyRootMenuItemHandle = nil; - error = fAIMenu->AddMenuItem(message->d.self, NULL, &companyRootMenuData, kMenuItemNoOptions, &companyRootMenuItemHandle); - if (!error) { - AIMenuGroup companyRootMenuGroup = nil; - error = fAIMenu->AddMenuGroupAsSubMenu(companyMenuGroupName, kMenuGroupSortedAlphabeticallyOption, companyRootMenuItemHandle, &companyRootMenuGroup); - } - } - } - - if (!error && fAIMenu != nil) { - // Add menu item for this plug-in under the company's about plug-ins menu group. - AIPlatformAddMenuItemDataUS aboutPluginMenuData; - aboutPluginMenuData.groupName = companyMenuGroupName; - aboutPluginMenuData.itemText = ai::UnicodeString(pluginName); - AIMenuItemHandle aboutPluginMenuItemHandle = nil; - error = fAIMenu->AddMenuItem(message->d.self, NULL, &aboutPluginMenuData, kMenuItemNoOptions, &aboutPluginMenuItemHandle); - if (!error) { - *menuItemHandle = aboutPluginMenuItemHandle; - } - } - - if (fAIMenu != nil) { - message->d.basic->ReleaseSuite( kAIMenuSuite, kAIMenuSuiteVersion ); - fAIMenu = nil; - } - - return error; -} - -/* -*/ -void SDKAboutPluginsHelper::PopAboutBox(AIMenuMessage* message, const char* title, const char* description) -{ - AIErr error = kNoErr; - if (fAIUser == nil) { - error = message->d.basic->AcquireSuite(kAIUserSuite, kAIUserSuiteVersion, (const void **) &fAIUser); - } - if (!error && fAIUser != nil) { - // Pop an about box for this plug-in. - ai::UnicodeString displayText(title); - displayText.append(ai::UnicodeString("\n\n")); - displayText.append(ai::UnicodeString(description)); - fAIUser->MessageAlert(displayText); - } - if (fAIUser != nil) { - message->d.basic->ReleaseSuite(kAIUserSuite, kAIUserSuiteVersion); - fAIUser = nil; - } -} - -/* -*/ -AIErr SDKAboutPluginsHelper::GroupExists(const char* targetGroupName, bool& groupAlreadyMade) -{ - AIErr error = kNoErr; - groupAlreadyMade = false; - ai::int32 count = 0; - AIMenuGroup dummyGroup = nil; - error = fAIMenu->CountMenuGroups( &count ); - if ( error ) return error; - for (ai::int32 i = 0; i < count; i++) { - error = fAIMenu->GetNthMenuGroup( i, &dummyGroup ); - if ( error ) return error; - const char* name; - error = fAIMenu->GetMenuGroupName( dummyGroup, &name ); - if ( error ) return error; - if ( std::strcmp(name, targetGroupName ) == 0 ) - { - groupAlreadyMade = true; - break; - } - } - return error; -} - -// End SDKAboutPluginsHelper.cpp +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "IllustratorSDK.h" +#include "SDKDef.h" +#include "SDKAboutPluginsHelper.h" + +/* +*/ +SDKAboutPluginsHelper::SDKAboutPluginsHelper() : fAIMenu(nullptr), fAIUser(nullptr) +{ +} + +/* +*/ +SDKAboutPluginsHelper::~SDKAboutPluginsHelper() +{ +} + +/* +*/ +AIErr SDKAboutPluginsHelper::AddAboutPluginsMenuItem(SPInterfaceMessage* message, + const char* companyMenuGroupName, + const ai::UnicodeString& companyName, + const char* pluginName, + AIMenuItemHandle* menuItemHandle) +{ + AIErr error = kNoErr; + + if (fAIMenu == nullptr) { + error = message->d.basic->AcquireSuite( kAIMenuSuite, kAIMenuSuiteVersion, (const void **) &fAIMenu ); + } + + if (!error && fAIMenu != nullptr) { + // Add an about plug-ins menu group for the given company under Illustrator's about group. + bool exists = false; + error = this->GroupExists(companyMenuGroupName, exists); + if (!error && !exists) { + AIPlatformAddMenuItemDataUS companyRootMenuData; + companyRootMenuData.groupName = kAboutMenuGroup; + companyRootMenuData.itemText = companyName; + AIMenuItemHandle companyRootMenuItemHandle = nullptr; + error = fAIMenu->AddMenuItem(message->d.self, NULL, &companyRootMenuData, kMenuItemNoOptions, &companyRootMenuItemHandle); + if (!error) { + AIMenuGroup companyRootMenuGroup = nullptr; + error = fAIMenu->AddMenuGroupAsSubMenu(companyMenuGroupName, kMenuGroupSortedAlphabeticallyOption, companyRootMenuItemHandle, &companyRootMenuGroup); + } + } + } + + if (!error && fAIMenu != nullptr) { + // Add menu item for this plug-in under the company's about plug-ins menu group. + AIPlatformAddMenuItemDataUS aboutPluginMenuData; + aboutPluginMenuData.groupName = companyMenuGroupName; + aboutPluginMenuData.itemText = ai::UnicodeString(pluginName); + AIMenuItemHandle aboutPluginMenuItemHandle = nullptr; + error = fAIMenu->AddMenuItem(message->d.self, NULL, &aboutPluginMenuData, kMenuItemNoOptions, &aboutPluginMenuItemHandle); + if (!error) { + *menuItemHandle = aboutPluginMenuItemHandle; + } + } + + if (fAIMenu != nullptr) { + message->d.basic->ReleaseSuite( kAIMenuSuite, kAIMenuSuiteVersion ); + fAIMenu = nullptr; + } + + return error; +} + +/* +*/ +void SDKAboutPluginsHelper::PopAboutBox(AIMenuMessage* message, const char* title, const char* description) +{ + AIErr error = kNoErr; + if (fAIUser == nullptr) { + error = message->d.basic->AcquireSuite(kAIUserSuite, kAIUserSuiteVersion, (const void **) &fAIUser); + } + if (!error && fAIUser != nullptr) { + // Pop an about box for this plug-in. + ai::UnicodeString displayText(title); + displayText.append(ai::UnicodeString("\n\n")); + displayText.append(ai::UnicodeString(description)); + fAIUser->MessageAlert(displayText); + } + if (fAIUser != nullptr) { + message->d.basic->ReleaseSuite(kAIUserSuite, kAIUserSuiteVersion); + fAIUser = nullptr; + } +} + +/* +*/ +AIErr SDKAboutPluginsHelper::GroupExists(const char* targetGroupName, bool& groupAlreadyMade) +{ + AIErr error = kNoErr; + groupAlreadyMade = false; + ai::int32 count = 0; + AIMenuGroup dummyGroup = nullptr; + error = fAIMenu->CountMenuGroups( &count ); + if ( error ) return error; + for (ai::int32 i = 0; i < count; i++) { + error = fAIMenu->GetNthMenuGroup( i, &dummyGroup ); + if ( error ) return error; + const char* name; + error = fAIMenu->GetMenuGroupName( dummyGroup, &name ); + if ( error ) return error; + if ( std::strcmp(name, targetGroupName ) == 0 ) + { + groupAlreadyMade = true; + break; + } + } + return error; +} + +// End SDKAboutPluginsHelper.cpp diff --git a/BloksAIPlugin/Vendor/common/source/SDKErrors.cpp b/BloksAIPlugin/Vendor/common/source/SDKErrors.cpp index b8d46a8..4b98bc1 100644 --- a/BloksAIPlugin/Vendor/common/source/SDKErrors.cpp +++ b/BloksAIPlugin/Vendor/common/source/SDKErrors.cpp @@ -1,85 +1,85 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/SDKErrors.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "IllustratorSDK.h" - -#include "SDKErrors.h" - -void aisdk::report_error(ASErr err) -{ - if (sAIUser) { - char errbuf[5]; - *(reinterpret_cast(errbuf)) = err; - errbuf [4] = '\0'; - char buf[1024]; - #ifdef MAC_ENV - snprintf ( buf, sizeof(buf), "Unexpected internal error=%x, %s", err, errbuf); - #endif - #ifdef WIN_ENV - char tmpbuf[5]; - *(reinterpret_cast(tmpbuf)) = err; - tmpbuf [4] = '\0'; - errbuf[0] = tmpbuf[3]; - errbuf[1] = tmpbuf[2]; - errbuf[2] = tmpbuf[1]; - errbuf[3] = tmpbuf[0]; - _snprintf ( buf, sizeof(buf), "Unexpected internal error=%x, %s", err, errbuf); - #endif - sAIUser->ErrorAlert(ai::UnicodeString(buf)); - } -} - -#ifdef DEBUG -void aisdk::report_assert(const char* message, const char* file, int line, bool throwException) -{ - - if (sAIUser) { - char buf[1024]; - #ifdef MAC_ENV - snprintf ( buf, sizeof(buf), "SDK_ASSERT %s\nFile=%s\nLine=%d", message, file, line); - #endif - #ifdef WIN_ENV - _snprintf ( buf, sizeof(buf), "SDK_ASSERT %s\nFile=%s\nLine=%d", message, file, line); - #endif - sAIUser->ErrorAlert(ai::UnicodeString(buf)); - } - - if (throwException) { - check_assertion(false); // throw assert exception - } -} -#endif - -#ifdef DEBUG -char* aisdk::format_args(const char *str, ...) -{ - static char buf[1024]; - - va_list args; - va_start(args, str); - #ifdef MAC_ENV - vsnprintf(buf, sizeof(buf) - 1, str, args); - #endif - #ifdef WIN_ENV - _vsnprintf(buf, sizeof(buf) - 1, str, args); - #endif - - va_end(args); - - return buf; -} -#endif - -// End SDKErrors.cpp +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "IllustratorSDK.h" + +#include "SDKErrors.h" + +void aisdk::report_error(ASErr err) +{ + if (sAIUser) { + char errbuf[5]; + *(reinterpret_cast(errbuf)) = err; + errbuf [4] = '\0'; + char buf[1024]; + #ifdef MAC_ENV + snprintf ( buf, sizeof(buf), "Unexpected internal error=%x, %s", err, errbuf); + #endif + #ifdef WIN_ENV + char tmpbuf[5]; + *(reinterpret_cast(tmpbuf)) = err; + tmpbuf [4] = '\0'; + errbuf[0] = tmpbuf[3]; + errbuf[1] = tmpbuf[2]; + errbuf[2] = tmpbuf[1]; + errbuf[3] = tmpbuf[0]; + _snprintf ( buf, sizeof(buf), "Unexpected internal error=%x, %s", err, errbuf); + #endif + sAIUser->ErrorAlert(ai::UnicodeString(buf)); + } +} + +#ifdef DEBUG +void aisdk::report_assert(const char* message, const char* file, int line, bool throwException) +{ + + if (sAIUser) { + char buf[1024]; + #ifdef MAC_ENV + snprintf ( buf, sizeof(buf), "SDK_ASSERT %s\nFile=%s\nLine=%d", message, file, line); + #endif + #ifdef WIN_ENV + _snprintf ( buf, sizeof(buf), "SDK_ASSERT %s\nFile=%s\nLine=%d", message, file, line); + #endif + sAIUser->ErrorAlert(ai::UnicodeString(buf)); + } + + if (throwException) { + check_assertion(false); // throw assert exception + } +} +#endif + +#ifdef DEBUG +char* aisdk::format_args(const char *str, ...) +{ + static char buf[1024]; + + va_list args; + va_start(args, str); + #ifdef MAC_ENV + vsnprintf(buf, sizeof(buf) - 1, str, args); + #endif + #ifdef WIN_ENV + _vsnprintf(buf, sizeof(buf) - 1, str, args); + #endif + + va_end(args); + + return buf; +} +#endif + +// End SDKErrors.cpp diff --git a/BloksAIPlugin/Vendor/common/source/SDKPlugPlug.cpp b/BloksAIPlugin/Vendor/common/source/SDKPlugPlug.cpp index 715e656..fb9cde1 100644 --- a/BloksAIPlugin/Vendor/common/source/SDKPlugPlug.cpp +++ b/BloksAIPlugin/Vendor/common/source/SDKPlugPlug.cpp @@ -1,194 +1,194 @@ -//======================================================================================== -// -// $File: //ai/ai15/devtech/sdk/public/samplecode/common/source/SDKPlugPlug.cpp $ -// -// $Revision: #1 $ -// -// Copyright 2010 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "SDKPlugPlug.h" -#include "IAIUnicodeString.h" - - -SDKPlugPlug::SDKPlugPlug() : - fhModule (NULL), - pFnLoadExtension (NULL), - pFnUnloadExtension (NULL), - pFnAddEventListener (NULL), - pFnRemoveEventListener (NULL), - pFnDispatchEvent (NULL) -{ -} - - -SDKPlugPlug::~SDKPlugPlug() -{ -} - - -AIErr SDKPlugPlug::Load(AIFoldersSuite* sAIFolders) -{ - AIErr err = kNoErr; - - do { - -#ifdef WIN_ENV - AIFolderType folderType = kAIApplicationFolderType; - ai::UnicodeString libName("PlugPlugOwl.dll"); -#else - AIFolderType folderType = kAIContentsFolderType; - ai::UnicodeString libName("/Frameworks/PlugPlugOwl.framework"); -#endif - - ai::FilePath path; - err = sAIFolders->FindFolder(folderType, false, path); - if(err) { break; } - - path.AddComponent(libName); - if(!path.Exists(false)) { err = kCantHappenErr; break; } - -#ifdef WIN_ENV - fhModule = LoadLibraryW(path.GetFullPath().as_WCHARStr().as_LPCWSTR()); - if(!fhModule) { err = kCantHappenErr; break; } - - pFnLoadExtension = (PlugPlugLoadExtensionFn) GetProcAddress(fhModule, "PlugPlugLoadExtension"); - if(!pFnLoadExtension) { err = kCantHappenErr; break; } - - pFnUnloadExtension = (PlugPlugUnloadExtensionFn) GetProcAddress(fhModule, "PlugPlugUnloadExtension"); - if(!pFnUnloadExtension) { err = kCantHappenErr; break; } - - pFnAddEventListener = (PlugPlugAddEventListenerFn) GetProcAddress(fhModule, "PlugPlugAddEventListener"); - if(!pFnAddEventListener) { err = kCantHappenErr; break; } - - pFnRemoveEventListener = (PlugPlugRemoveEventListenerFn) GetProcAddress(fhModule, "PlugPlugRemoveEventListener"); - if(!pFnRemoveEventListener) { err = kCantHappenErr; break; } - - pFnDispatchEvent = (PlugPlugDispatchEventFn) GetProcAddress(fhModule, "PlugPlugDispatchEvent"); - if(!pFnDispatchEvent) { err = kCantHappenErr; break; } -#else - fhModule = CFBundleCreate( kCFAllocatorDefault, path.GetAsCFURL()); - if(!fhModule) { err = kCantHappenErr; break; } - - CFStringRef entryName = CFSTR("PlugPlugLoadExtension"); - pFnLoadExtension = (PlugPlugLoadExtensionFn) CFBundleGetFunctionPointerForName(fhModule, entryName); - if(!pFnLoadExtension) { err = kCantHappenErr; break; } - - entryName = CFSTR("PlugPlugUnloadExtension"); - pFnUnloadExtension = (PlugPlugUnloadExtensionFn) CFBundleGetFunctionPointerForName(fhModule, entryName); - if(!pFnUnloadExtension) { err = kCantHappenErr; break; } - - entryName = CFSTR("PlugPlugAddEventListener"); - pFnAddEventListener = (PlugPlugAddEventListenerFn) CFBundleGetFunctionPointerForName(fhModule, entryName); - if(!pFnAddEventListener) { err = kCantHappenErr; break; } - - entryName = CFSTR("PlugPlugRemoveEventListener"); - pFnRemoveEventListener = (PlugPlugRemoveEventListenerFn) CFBundleGetFunctionPointerForName(fhModule, entryName); - if(!pFnRemoveEventListener) { err = kCantHappenErr; break; } - - entryName = CFSTR("PlugPlugDispatchEvent"); - pFnDispatchEvent = (PlugPlugDispatchEventFn) CFBundleGetFunctionPointerForName(fhModule, entryName); - if(!pFnDispatchEvent) { err = kCantHappenErr; break; } -#endif - - } - while (false); - - return err; -} - - -AIErr SDKPlugPlug::Unload() -{ - AIErr err = kNoErr; - - if (fhModule) - { -#ifdef WIN_ENV - if (!FreeLibrary(fhModule)) - err = kCantHappenErr; -#else - CFRelease(fhModule); -#endif - fhModule = NULL; - } - - return err; -} - -PlugPlugErrorCode SDKPlugPlug::LoadExtension(const char* inExtensionID) -{ - PlugPlugErrorCode err = PlugPlugErrorCode_success; - - if(pFnLoadExtension) - err = (*pFnLoadExtension)(inExtensionID); - - return err; -} - - -PlugPlugErrorCode SDKPlugPlug::UnloadExtension(const char* inExtensionID) -{ - PlugPlugErrorCode err = PlugPlugErrorCode_success; - - if(pFnUnloadExtension) - err = (*pFnUnloadExtension)(inExtensionID); - - return err; -} - - -csxs::event::EventErrorCode -SDKPlugPlug::AddEventListener(const char* type, - const csxs::event::EventListenerFn eventListener, - void* const context) -{ - csxs::event::EventErrorCode err = csxs::event::kEventErrorCode_OperationFailed; - - if(pFnAddEventListener) - err = (*pFnAddEventListener)(type, eventListener, context); - - return err; -} - -csxs::event::EventErrorCode -SDKPlugPlug::RemoveEventListener(const char* type, - const csxs::event::EventListenerFn eventListener, - void* const context) -{ - csxs::event::EventErrorCode err = csxs::event::kEventErrorCode_OperationFailed; - if(isPlugPlugLoaded()) - { - if(pFnRemoveEventListener) - err = (*pFnRemoveEventListener)(type, eventListener, context); - } - return err; -} - - -csxs::event::EventErrorCode -SDKPlugPlug::DispatchEvent(const csxs::event::Event* const event) -{ - csxs::event::EventErrorCode err = csxs::event::kEventErrorCode_OperationFailed; - - if(pFnRemoveEventListener) - err = (*pFnDispatchEvent)(event); - - return err; -} - - -bool SDKPlugPlug::isPlugPlugLoaded() -{ -#ifdef WIN_ENV - return true; -#else - return CFBundleIsExecutableLoaded(fhModule); -#endif -} +//======================================================================================== +// +// $File: //ai/ai15/devtech/sdk/public/samplecode/common/source/SDKPlugPlug.cpp $ +// +// $Revision: #1 $ +// +// Copyright 2010 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "SDKPlugPlug.h" +#include "IAIUnicodeString.h" + + +SDKPlugPlug::SDKPlugPlug() : + fhModule (NULL), + pFnLoadExtension (NULL), + pFnUnloadExtension (NULL), + pFnAddEventListener (NULL), + pFnRemoveEventListener (NULL), + pFnDispatchEvent (NULL) +{ +} + + +SDKPlugPlug::~SDKPlugPlug() +{ +} + + +AIErr SDKPlugPlug::Load(AIFoldersSuite* sAIFolders) +{ + AIErr err = kNoErr; + + do { + +#ifdef WIN_ENV + AIFolderType folderType = kAIApplicationFolderType; + ai::UnicodeString libName("PlugPlugOwl.dll"); +#else + AIFolderType folderType = kAIContentsFolderType; + ai::UnicodeString libName("/Frameworks/PlugPlugOwl.framework"); +#endif + + ai::FilePath path; + err = sAIFolders->FindFolder(folderType, false, path); + if(err) { break; } + + path.AddComponent(libName); + if(!path.Exists(false)) { err = kCantHappenErr; break; } + +#ifdef WIN_ENV + fhModule = LoadLibraryW(path.GetFullPath().as_WCHARStr().as_LPCWSTR()); + if(!fhModule) { err = kCantHappenErr; break; } + + pFnLoadExtension = (PlugPlugLoadExtensionFn) GetProcAddress(fhModule, "PlugPlugLoadExtension"); + if(!pFnLoadExtension) { err = kCantHappenErr; break; } + + pFnUnloadExtension = (PlugPlugUnloadExtensionFn) GetProcAddress(fhModule, "PlugPlugUnloadExtension"); + if(!pFnUnloadExtension) { err = kCantHappenErr; break; } + + pFnAddEventListener = (PlugPlugAddEventListenerFn) GetProcAddress(fhModule, "PlugPlugAddEventListener"); + if(!pFnAddEventListener) { err = kCantHappenErr; break; } + + pFnRemoveEventListener = (PlugPlugRemoveEventListenerFn) GetProcAddress(fhModule, "PlugPlugRemoveEventListener"); + if(!pFnRemoveEventListener) { err = kCantHappenErr; break; } + + pFnDispatchEvent = (PlugPlugDispatchEventFn) GetProcAddress(fhModule, "PlugPlugDispatchEvent"); + if(!pFnDispatchEvent) { err = kCantHappenErr; break; } +#else + fhModule = CFBundleCreate( kCFAllocatorDefault, path.GetAsCFURL()); + if(!fhModule) { err = kCantHappenErr; break; } + + CFStringRef entryName = CFSTR("PlugPlugLoadExtension"); + pFnLoadExtension = (PlugPlugLoadExtensionFn) CFBundleGetFunctionPointerForName(fhModule, entryName); + if(!pFnLoadExtension) { err = kCantHappenErr; break; } + + entryName = CFSTR("PlugPlugUnloadExtension"); + pFnUnloadExtension = (PlugPlugUnloadExtensionFn) CFBundleGetFunctionPointerForName(fhModule, entryName); + if(!pFnUnloadExtension) { err = kCantHappenErr; break; } + + entryName = CFSTR("PlugPlugAddEventListener"); + pFnAddEventListener = (PlugPlugAddEventListenerFn) CFBundleGetFunctionPointerForName(fhModule, entryName); + if(!pFnAddEventListener) { err = kCantHappenErr; break; } + + entryName = CFSTR("PlugPlugRemoveEventListener"); + pFnRemoveEventListener = (PlugPlugRemoveEventListenerFn) CFBundleGetFunctionPointerForName(fhModule, entryName); + if(!pFnRemoveEventListener) { err = kCantHappenErr; break; } + + entryName = CFSTR("PlugPlugDispatchEvent"); + pFnDispatchEvent = (PlugPlugDispatchEventFn) CFBundleGetFunctionPointerForName(fhModule, entryName); + if(!pFnDispatchEvent) { err = kCantHappenErr; break; } +#endif + + } + while (false); + + return err; +} + + +AIErr SDKPlugPlug::Unload() +{ + AIErr err = kNoErr; + + if (fhModule) + { +#ifdef WIN_ENV + if (!FreeLibrary(fhModule)) + err = kCantHappenErr; +#else + CFRelease(fhModule); +#endif + fhModule = NULL; + } + + return err; +} + +PlugPlugErrorCode SDKPlugPlug::LoadExtension(const char* inExtensionID) +{ + PlugPlugErrorCode err = PlugPlugErrorCode_success; + + if(pFnLoadExtension) + err = (*pFnLoadExtension)(inExtensionID); + + return err; +} + + +PlugPlugErrorCode SDKPlugPlug::UnloadExtension(const char* inExtensionID) +{ + PlugPlugErrorCode err = PlugPlugErrorCode_success; + + if(pFnUnloadExtension) + err = (*pFnUnloadExtension)(inExtensionID); + + return err; +} + + +csxs::event::EventErrorCode +SDKPlugPlug::AddEventListener(const char* type, + const csxs::event::EventListenerFn eventListener, + void* const context) +{ + csxs::event::EventErrorCode err = csxs::event::kEventErrorCode_OperationFailed; + + if(pFnAddEventListener) + err = (*pFnAddEventListener)(type, eventListener, context); + + return err; +} + +csxs::event::EventErrorCode +SDKPlugPlug::RemoveEventListener(const char* type, + const csxs::event::EventListenerFn eventListener, + void* const context) +{ + csxs::event::EventErrorCode err = csxs::event::kEventErrorCode_OperationFailed; + if(isPlugPlugLoaded()) + { + if(pFnRemoveEventListener) + err = (*pFnRemoveEventListener)(type, eventListener, context); + } + return err; +} + + +csxs::event::EventErrorCode +SDKPlugPlug::DispatchEvent(const csxs::event::Event* const event) +{ + csxs::event::EventErrorCode err = csxs::event::kEventErrorCode_OperationFailed; + + if(pFnRemoveEventListener) + err = (*pFnDispatchEvent)(event); + + return err; +} + + +bool SDKPlugPlug::isPlugPlugLoaded() +{ +#ifdef WIN_ENV + return true; +#else + return CFBundleIsExecutableLoaded(fhModule); +#endif +} diff --git a/BloksAIPlugin/Vendor/common/source/Suites.cpp b/BloksAIPlugin/Vendor/common/source/Suites.cpp index abde1dc..771d63b 100644 --- a/BloksAIPlugin/Vendor/common/source/Suites.cpp +++ b/BloksAIPlugin/Vendor/common/source/Suites.cpp @@ -1,187 +1,187 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/Suites.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "Suites.hpp" - -#include "SPBlocks.h" -#include "SPInterf.h" -#include "SPRuntme.h" -#include "SPSuites.h" - -#include -#include - -extern "C" { - SPAccessSuite *sSPAccess; - SPPluginsSuite *sSPPlugins; - AINotifierSuite *sAINotifier; - AIAppContextSuite *sAIAppContext; - AIUserSuite *sAIUser; - AIFilePathSuite *sAIFilePath; - AIFoldersSuite *sAIFolders; -} - -extern "C" SPBasicSuite *sSPBasic; - -// These are the suites we always acquire because we need them -static ImportSuite gBasicSuites[] = -{ - kSPAccessSuite, kSPAccessSuiteVersion, &sSPAccess, - kSPPluginsSuite, kSPPluginsSuiteVersion, &sSPPlugins, - kAINotifierSuite, kAINotifierSuiteVersion, &sAINotifier, - kAIAppContextSuite, kAIAppContextSuiteVersion, &sAIAppContext, - kAIUserSuite, kAIUserSuiteVersion, &sAIUser, - kAIFilePathSuite, kAIFilePathSuiteVersion, &sAIFilePath, - kAIFoldersSuite, kAIFoldersSuiteVersion, &sAIFolders, -}; - - -extern ImportSuite gImportSuites[]; - -ASUInt16 Suites::fAcquiredCount = 0; - -Suites::Suites() -: fOptionalSuitesTotalCount(0), - fOptionalSuitesAcquiredCount(0), - fRequiredSuitesCount(0) -{ - fError = AcquireSuites(); - ASUInt16 i = 0; - while( (gImportSuites[i++].name != nil)) - { ++fRequiredSuitesCount; } // Skip all required suites. - - if(gImportSuites[i - 1].version == kStartOptionalSuites) - { - while(gImportSuites[i++].name != nil) - { - ++fOptionalSuitesTotalCount; - } - } - if(kNoErr == fError) - acquire_Optional_Suites(); -} - -Suites::~Suites() -{ - ReleaseSuites(); -} - -ASErr Suites::AcquireSuites() -{ - ASErr result = kNoErr; - ASUInt16 i; - - if (fAcquiredCount == 0) - { - for (i = 0; i < sizeof(gBasicSuites)/sizeof(gBasicSuites[0]); ++i) - { - result = AcquireSuite(gBasicSuites+i); - if (result) - goto error; - } - for (i = 0; gImportSuites[i].name != nil; ++i) - { - result = AcquireSuite(gImportSuites+i); - if (result) - goto error; - } - } - fAcquiredCount++; - -error: - return result; -} - -ASErr Suites::AcquireSuite(ImportSuite *suite) -{ - ASErr result = kNoErr; - - if (suite->suite != nil) { - result = sSPBasic->AcquireSuite(suite->name, - suite->version, - (const void **)suite->suite); - } - return result; -} - -ASErr Suites::ReleaseSuites() -{ - ASErr result = kNoErr; - ASUInt16 i; - - fAcquiredCount--; - - if (fAcquiredCount == 0) - { - for (i = 0; i < sizeof(gBasicSuites)/sizeof(gBasicSuites[0]); ++i) - { - result = ReleaseSuite(gBasicSuites+i); - if ( result ) - goto error; - } - for (i = 0; gImportSuites[i].name != nil; ++i) - { - result = ReleaseSuite(gImportSuites+i); - if (result) - goto error; - } - if(gImportSuites[i++].version == kStartOptionalSuites) - { - for (; fOptionalSuitesAcquiredCount && (gImportSuites[i].name != nil); ++i) - { - result = ReleaseSuite(gImportSuites+i); - if (result) - goto error; - else - --fOptionalSuitesAcquiredCount; - } - } - } - -error: - return result; -} - -ASErr Suites::ReleaseSuite(ImportSuite *suite) -{ - ASErr result = kNoErr; - - if (suite->suite != nil) { - void **s = (void **) suite->suite; - if (*s != nil) { - result = sSPBasic->ReleaseSuite(suite->name, suite->version); - *s = nil; - } - } - return result; -} - -void Suites::acquire_Optional_Suites() -{ - if(fOptionalSuitesAcquiredCount != fOptionalSuitesTotalCount) - { - ImportSuite* optionalSuites = gImportSuites + fRequiredSuitesCount + 1; - for(ASUInt16 i = 0; (i < fOptionalSuitesTotalCount) && optionalSuites->suite; ++i) - { - int** suitePtr = static_cast(optionalSuites->suite); - if( *suitePtr == nil) - { - if( kNoErr == AcquireSuite(optionalSuites)) - ++fOptionalSuitesAcquiredCount; - } - ++optionalSuites; - } - } -} +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "Suites.hpp" + +#include "SPBlocks.h" +#include "SPInterf.h" +#include "SPRuntme.h" +#include "SPSuites.h" + +#include +#include + +extern "C" { + SPAccessSuite *sSPAccess; + SPPluginsSuite *sSPPlugins; + AINotifierSuite *sAINotifier; + AIAppContextSuite *sAIAppContext; + AIUserSuite *sAIUser; + AIFilePathSuite *sAIFilePath; + AIFoldersSuite *sAIFolders; +} + +extern "C" SPBasicSuite *sSPBasic; + +// These are the suites we always acquire because we need them +static ImportSuite gBasicSuites[] = +{ + kSPAccessSuite, kSPAccessSuiteVersion, &sSPAccess, + kSPPluginsSuite, kSPPluginsSuiteVersion, &sSPPlugins, + kAINotifierSuite, kAINotifierSuiteVersion, &sAINotifier, + kAIAppContextSuite, kAIAppContextSuiteVersion, &sAIAppContext, + kAIUserSuite, kAIUserSuiteVersion, &sAIUser, + kAIFilePathSuite, kAIFilePathSuiteVersion, &sAIFilePath, + kAIFoldersSuite, kAIFoldersSuiteVersion, &sAIFolders, +}; + + +extern ImportSuite gImportSuites[]; + +ASUInt16 Suites::fAcquiredCount = 0; + +Suites::Suites() +: fOptionalSuitesTotalCount(0), + fOptionalSuitesAcquiredCount(0), + fRequiredSuitesCount(0) +{ + fError = AcquireSuites(); + ASUInt16 i = 0; + while( (gImportSuites[i++].name != nullptr)) + { ++fRequiredSuitesCount; } // Skip all required suites. + + if(gImportSuites[i - 1].version == kStartOptionalSuites) + { + while(gImportSuites[i++].name != nullptr) + { + ++fOptionalSuitesTotalCount; + } + } + if(kNoErr == fError) + acquire_Optional_Suites(); +} + +Suites::~Suites() +{ + ReleaseSuites(); +} + +ASErr Suites::AcquireSuites() +{ + ASErr result = kNoErr; + ASUInt16 i; + + if (fAcquiredCount == 0) + { + for (i = 0; i < sizeof(gBasicSuites)/sizeof(gBasicSuites[0]); ++i) + { + result = AcquireSuite(gBasicSuites+i); + if (result) + goto error; + } + for (i = 0; gImportSuites[i].name != nullptr; ++i) + { + result = AcquireSuite(gImportSuites+i); + if (result) + goto error; + } + } + fAcquiredCount++; + +error: + return result; +} + +ASErr Suites::AcquireSuite(ImportSuite *suite) +{ + ASErr result = kNoErr; + + if (suite->suite != nullptr) { + result = sSPBasic->AcquireSuite(suite->name, + suite->version, + (const void **)suite->suite); + } + return result; +} + +ASErr Suites::ReleaseSuites() +{ + ASErr result = kNoErr; + ASUInt16 i; + + fAcquiredCount--; + + if (fAcquiredCount == 0) + { + for (i = 0; i < sizeof(gBasicSuites)/sizeof(gBasicSuites[0]); ++i) + { + result = ReleaseSuite(gBasicSuites+i); + if ( result ) + goto error; + } + for (i = 0; gImportSuites[i].name != nullptr; ++i) + { + result = ReleaseSuite(gImportSuites+i); + if (result) + goto error; + } + if(gImportSuites[i++].version == kStartOptionalSuites) + { + for (; fOptionalSuitesAcquiredCount && (gImportSuites[i].name != nullptr); ++i) + { + result = ReleaseSuite(gImportSuites+i); + if (result) + goto error; + else + --fOptionalSuitesAcquiredCount; + } + } + } + +error: + return result; +} + +ASErr Suites::ReleaseSuite(ImportSuite *suite) +{ + ASErr result = kNoErr; + + if (suite->suite != nullptr) { + void **s = (void **) suite->suite; + if (*s != nullptr) { + result = sSPBasic->ReleaseSuite(suite->name, suite->version); + *s = nullptr; + } + } + return result; +} + +void Suites::acquire_Optional_Suites() +{ + if(fOptionalSuitesAcquiredCount != fOptionalSuitesTotalCount) + { + ImportSuite* optionalSuites = gImportSuites + fRequiredSuitesCount + 1; + for(ASUInt16 i = 0; (i < fOptionalSuitesTotalCount) && optionalSuites->suite; ++i) + { + int** suitePtr = static_cast(optionalSuites->suite); + if( *suitePtr == nullptr) + { + if( kNoErr == AcquireSuite(optionalSuites)) + ++fOptionalSuitesAcquiredCount; + } + ++optionalSuites; + } + } +} diff --git a/BloksAIPlugin/Vendor/common/source/legacy/About.cpp b/BloksAIPlugin/Vendor/common/source/legacy/About.cpp index 5870b04..acba37e 100644 --- a/BloksAIPlugin/Vendor/common/source/legacy/About.cpp +++ b/BloksAIPlugin/Vendor/common/source/legacy/About.cpp @@ -1,101 +1,101 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/legacy/About.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1997 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -/** - This file provides two simple dialog interfaces used by the plug-in shell. - One does a simple about message. The other displays an error dialog based - on a string list in the file shellSupport.rsrc. - - **/ - -/**----------------------------------------------------------------------------- - ** - ** Headers - ** - **/ -#include "IllustratorSDK.h" - -#include "common.h" - -#include "about.h" -#include "plugin.h" // for dialog constants -#include "reportError.h" -#include "stringUtils.h" - - -/**----------------------------------------------------------------------------- - ** - ** Private Functions - ** - **/ - -ASErr ASAPI AboutPluginInitProc(ADMDialogRef dialog); -void ASAPI AboutDlgOKButtonProc(ADMItemRef item, ADMNotifierRef notifier); - - -/******************************************************************************* - ** - ** UI Functions - ** - **/ - - -AIErr goAbout( SPInterfaceMessage *message ) -{ - AIErr error; - - - // Initialize the dialog - error = sADMDialog->Modal(message->d.self, "About Dialog", kAboutDLOG, kADMModalDialogStyle, - AboutPluginInitProc, NULL, 0); - if (error) goto errorTag; - - return kNoErr; - -errorTag: - return error; - -} - - - - - -/******************************************************************************* - ** - ** About Private Functions - ** - **/ - - -ASErr ASAPI AboutPluginInitProc(ADMDialogRef dialog) -{ - // Call the default Init first to create the modal dialog and items. - // By default OK is assumed to be item 1 - sADMItem->SetNotifyProc(sADMDialog->GetItem(dialog, kDlgOKButton), AboutDlgOKButtonProc); - - return kNoErr; -} - -void ASAPI AboutDlgOKButtonProc(ADMItemRef item, ADMNotifierRef notifier) -{ - // This is here more by way of example, since there really isn't any - // other reason to be overriding this handler. The SetNotifyProc( ) call - // above could be removed entirely. - // Call the default Notify so the dialog knows the OK button was hit. - sADMItem->DefaultNotify(item, notifier); -} - - +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1997 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +/** + This file provides two simple dialog interfaces used by the plug-in shell. + One does a simple about message. The other displays an error dialog based + on a string list in the file shellSupport.rsrc. + + **/ + +/**----------------------------------------------------------------------------- + ** + ** Headers + ** + **/ +#include "IllustratorSDK.h" + +#include "common.h" + +#include "about.h" +#include "plugin.h" // for dialog constants +#include "reportError.h" +#include "stringUtils.h" + + +/**----------------------------------------------------------------------------- + ** + ** Private Functions + ** + **/ + +ASErr ASAPI AboutPluginInitProc(ADMDialogRef dialog); +void ASAPI AboutDlgOKButtonProc(ADMItemRef item, ADMNotifierRef notifier); + + +/******************************************************************************* + ** + ** UI Functions + ** + **/ + + +AIErr goAbout( SPInterfaceMessage *message ) +{ + AIErr error; + + + // Initialize the dialog + error = sADMDialog->Modal(message->d.self, "About Dialog", kAboutDLOG, kADMModalDialogStyle, + AboutPluginInitProc, NULL, 0); + if (error) goto errorTag; + + return kNoErr; + +errorTag: + return error; + +} + + + + + +/******************************************************************************* + ** + ** About Private Functions + ** + **/ + + +ASErr ASAPI AboutPluginInitProc(ADMDialogRef dialog) +{ + // Call the default Init first to create the modal dialog and items. + // By default OK is assumed to be item 1 + sADMItem->SetNotifyProc(sADMDialog->GetItem(dialog, kDlgOKButton), AboutDlgOKButtonProc); + + return kNoErr; +} + +void ASAPI AboutDlgOKButtonProc(ADMItemRef item, ADMNotifierRef notifier) +{ + // This is here more by way of example, since there really isn't any + // other reason to be overriding this handler. The SetNotifyProc( ) call + // above could be removed entirely. + // Call the default Notify so the dialog knows the OK button was hit. + sADMItem->DefaultNotify(item, notifier); +} + + diff --git a/BloksAIPlugin/Vendor/common/source/legacy/reportError.cpp b/BloksAIPlugin/Vendor/common/source/legacy/reportError.cpp index c7e12a2..2443832 100644 --- a/BloksAIPlugin/Vendor/common/source/legacy/reportError.cpp +++ b/BloksAIPlugin/Vendor/common/source/legacy/reportError.cpp @@ -1,256 +1,256 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/legacy/reportError.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -/** - - This file provides two simple dialog interfaces used by the plug-in shell. - One does a simple about message. The other displays an error dialog based - on a string list in the file shellSupport.rsrc. - - **/ - -/**----------------------------------------------------------------------------- - ** - ** Headers - ** - **/ -#include "IllustratorSDK.h" - -#include "common.h" - -#include "reportError.h" -#include "plugin.h" // for dialog constants -#include "stringUtils.h" - -/**----------------------------------------------------------------------------- - ** - ** Types - ** - **/ - -// strings for error dialog -typedef struct { - unsigned char err_msg[256]; - unsigned char error_text[16]; -} ErrorStrings; - - - -/**----------------------------------------------------------------------------- - ** - ** Private Functions - ** - **/ - -static AIErr PString2AIErr(unsigned char* err_code); -static void AIErr2PString(AIErr err_code, unsigned char* err_string); - -static AIErr errorMessage( SPInterfaceMessage *message, ErrorStrings *errors ); - -ASErr ASAPI ErrorDialogInitProc(ADMDialogRef dialog); -void ASAPI ErrorDialogOKButtonProc(ADMItemRef item, ADMNotifierRef notifier); - -/******************************************************************************* - ** - ** UI Functions - ** - **/ - - -void report_error( SPInterfaceMessage *message, AIErr error_to_report ) -{ - ASBoolean bFound = FALSE; - short nIndex; - int hi; - long number; - AIErr error = kNoErr; - unsigned char ch; - char err_code[255]; - ErrorStrings errors; - - if ( error_to_report == kNoErr || error_to_report == kCanceledErr ) - return; - - if (NULL == sADMBasic || NULL == sADMDialog) - goto errorTag; - - // - // Loop through the system error strings until we find a matching error code - // The next string is the err msg we want to use. - // The Last string is "". The 2nd last is the default string to use is no match found - // - nIndex = 1; - do { - sADMBasic->GetIndexString( message->d.self, kErrorStrings, nIndex, err_code, 255 ); - - if (!err_code[0]) // first null string means no more errors - break; - - // NOTE: resultString is CString; - ch = err_code[0]; - if ( ch == '-' || (ch >= '0' && ch <= '9') ) - CStringToAIErr( (char *)err_code, &number); - else { // non numeric 4 byte err code. (e.g.) '!sel'. - SUctopstr( (char*)err_code ); - number = PString2AIErr((unsigned char*)err_code); - } - - if ( number == error_to_report ) { - bFound = TRUE; - break; - } - else - nIndex+=2; - } while ( !err_code[0] || !bFound ); // last string is length 0 - - - if(bFound) // Found the matching error code, get the err_msg - error = sADMBasic->GetIndexString( message->d.self, kErrorStrings, (short)(nIndex+1), (char*)errors.err_msg, sizeof(errors.err_msg) ); - else // No match. Use the 2nd last error msg as default - error = sADMBasic->GetIndexString( message->d.self, kErrorStrings, (short)(nIndex-1), (char*)errors.err_msg, sizeof(errors.err_msg) ); - if ( error ) - goto errorTag; - - - hi = (short)(error_to_report >> 16); - if ( hi == 0xFFFF || hi == 0x0000 ) - AIErrToCString( error_to_report, (char*)errors.error_text ); - else { - AIErr2PString(error_to_report, errors.error_text); - SUptocstr( errors.error_text ); - } - - errorMessage( message, &errors ); - - return; - -errorTag: - - return; -} - - - - - - - - -/******************************************************************************* - ** - ** Error Private Functions - ** - **/ -static AIErr errorMessage( SPInterfaceMessage *message, ErrorStrings *errors ) -{ - AIErr error = kNoErr; - - // Initialize the dialog - if (!sADMDialog) - goto errorTag; - sADMDialog->Modal(message->d.self, "Error Dialog", kErrorDialogID, kADMModalDialogStyle, - ErrorDialogInitProc, (void*)errors, 0); - - return kNoErr; - -errorTag: - return error; - -} - - -ASErr ASAPI ErrorDialogInitProc(ADMDialogRef dialog) -{ - ASErr error = kNoErr; - ErrorStrings *errors; - ADMItemRef textItem; - - sADMItem->SetNotifyProc(sADMDialog->GetItem(dialog, kDlgOKButton), ErrorDialogOKButtonProc); - - // now set upt the error strings - errors = (ErrorStrings*)sADMDialog->GetUserData(dialog); - - textItem = sADMDialog->GetItem(dialog, kErrorMessageText); - sADMItem->SetText( textItem, (char*)errors->err_msg); - - textItem = sADMDialog->GetItem(dialog, kErrorCodeText); - sADMItem->SetText( textItem, (char*)errors->error_text); - - return error; -} - -void ASAPI ErrorDialogOKButtonProc(ADMItemRef item, ADMNotifierRef notifier) -{ - // This is here more by way of example, since there really isn't any - // other reason to be overriding this handler. The SetNotifyProc( ) call - // above could be removed entirely. - // Call the default Notify so the dialog knows the OK button was hit. - sADMItem->DefaultNotify(item, notifier); -} - - - - -/******************************************************************************* - ** - ** Useful String Functions - ** - **/ - -void AIErrToCString( AIErr error_to_report, char *errorText ) { - error_to_report = (AIErr) _ShortToAIReal( error_to_report ); - sAIUser->AIRealToString ( (float) error_to_report, 0, (unsigned char *)errorText ); - SUptocstr( (unsigned char*)errorText ); - return; -} - - -void CStringToAIErr( char *errorText, AIErr *error_to_report ) { - AIReal tempErr; - - SUctopstr( (char *)errorText ); - sAIUser->StringToAIReal( (unsigned char *)errorText, &tempErr ); - *error_to_report = _AIRealTruncToShort( tempErr ); - - return; -} - -static AIErr PString2AIErr(unsigned char* err_string) -{ // non numeric 4 byte err code. (e.g.) '!sel'. - AIErr err_code; - char *tmpPtr = (char *)&err_code; - int j; - - // err_code = *(long *)(err_string + 1); // NOTE: can't do this on intel machine. - // The hi-low byte problem. - -// for( j = 4; j >0 ; j--, tmpPtr++) - for( j = 1; j < 5; j++, tmpPtr++) - *tmpPtr = err_string[j]; - - return err_code; -} - -static void AIErr2PString(AIErr err_code, unsigned char* err_string) -{ - char *tmpPtr = (char *)&err_code; - int j; - - err_string[0] = 4; - -// for( j = 4; j >0 ; j--, tmpPtr++) - for( j = 1; j < 5; j++, tmpPtr++) - err_string[j] = *tmpPtr; -} +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +/** + + This file provides two simple dialog interfaces used by the plug-in shell. + One does a simple about message. The other displays an error dialog based + on a string list in the file shellSupport.rsrc. + + **/ + +/**----------------------------------------------------------------------------- + ** + ** Headers + ** + **/ +#include "IllustratorSDK.h" + +#include "common.h" + +#include "reportError.h" +#include "plugin.h" // for dialog constants +#include "stringUtils.h" + +/**----------------------------------------------------------------------------- + ** + ** Types + ** + **/ + +// strings for error dialog +typedef struct { + unsigned char err_msg[256]; + unsigned char error_text[16]; +} ErrorStrings; + + + +/**----------------------------------------------------------------------------- + ** + ** Private Functions + ** + **/ + +static AIErr PString2AIErr(unsigned char* err_code); +static void AIErr2PString(AIErr err_code, unsigned char* err_string); + +static AIErr errorMessage( SPInterfaceMessage *message, ErrorStrings *errors ); + +ASErr ASAPI ErrorDialogInitProc(ADMDialogRef dialog); +void ASAPI ErrorDialogOKButtonProc(ADMItemRef item, ADMNotifierRef notifier); + +/******************************************************************************* + ** + ** UI Functions + ** + **/ + + +void report_error( SPInterfaceMessage *message, AIErr error_to_report ) +{ + ASBoolean bFound = FALSE; + short nIndex; + int hi; + long number; + AIErr error = kNoErr; + unsigned char ch; + char err_code[255]; + ErrorStrings errors; + + if ( error_to_report == kNoErr || error_to_report == kCanceledErr ) + return; + + if (NULL == sADMBasic || NULL == sADMDialog) + goto errorTag; + + // + // Loop through the system error strings until we find a matching error code + // The next string is the err msg we want to use. + // The Last string is "". The 2nd last is the default string to use is no match found + // + nIndex = 1; + do { + sADMBasic->GetIndexString( message->d.self, kErrorStrings, nIndex, err_code, 255 ); + + if (!err_code[0]) // first null string means no more errors + break; + + // NOTE: resultString is CString; + ch = err_code[0]; + if ( ch == '-' || (ch >= '0' && ch <= '9') ) + CStringToAIErr( (char *)err_code, &number); + else { // non numeric 4 byte err code. (e.g.) '!sel'. + SUctopstr( (char*)err_code ); + number = PString2AIErr((unsigned char*)err_code); + } + + if ( number == error_to_report ) { + bFound = TRUE; + break; + } + else + nIndex+=2; + } while ( !err_code[0] || !bFound ); // last string is length 0 + + + if(bFound) // Found the matching error code, get the err_msg + error = sADMBasic->GetIndexString( message->d.self, kErrorStrings, (short)(nIndex+1), (char*)errors.err_msg, sizeof(errors.err_msg) ); + else // No match. Use the 2nd last error msg as default + error = sADMBasic->GetIndexString( message->d.self, kErrorStrings, (short)(nIndex-1), (char*)errors.err_msg, sizeof(errors.err_msg) ); + if ( error ) + goto errorTag; + + + hi = (short)(error_to_report >> 16); + if ( hi == 0xFFFF || hi == 0x0000 ) + AIErrToCString( error_to_report, (char*)errors.error_text ); + else { + AIErr2PString(error_to_report, errors.error_text); + SUptocstr( errors.error_text ); + } + + errorMessage( message, &errors ); + + return; + +errorTag: + + return; +} + + + + + + + + +/******************************************************************************* + ** + ** Error Private Functions + ** + **/ +static AIErr errorMessage( SPInterfaceMessage *message, ErrorStrings *errors ) +{ + AIErr error = kNoErr; + + // Initialize the dialog + if (!sADMDialog) + goto errorTag; + sADMDialog->Modal(message->d.self, "Error Dialog", kErrorDialogID, kADMModalDialogStyle, + ErrorDialogInitProc, (void*)errors, 0); + + return kNoErr; + +errorTag: + return error; + +} + + +ASErr ASAPI ErrorDialogInitProc(ADMDialogRef dialog) +{ + ASErr error = kNoErr; + ErrorStrings *errors; + ADMItemRef textItem; + + sADMItem->SetNotifyProc(sADMDialog->GetItem(dialog, kDlgOKButton), ErrorDialogOKButtonProc); + + // now set upt the error strings + errors = (ErrorStrings*)sADMDialog->GetUserData(dialog); + + textItem = sADMDialog->GetItem(dialog, kErrorMessageText); + sADMItem->SetText( textItem, (char*)errors->err_msg); + + textItem = sADMDialog->GetItem(dialog, kErrorCodeText); + sADMItem->SetText( textItem, (char*)errors->error_text); + + return error; +} + +void ASAPI ErrorDialogOKButtonProc(ADMItemRef item, ADMNotifierRef notifier) +{ + // This is here more by way of example, since there really isn't any + // other reason to be overriding this handler. The SetNotifyProc( ) call + // above could be removed entirely. + // Call the default Notify so the dialog knows the OK button was hit. + sADMItem->DefaultNotify(item, notifier); +} + + + + +/******************************************************************************* + ** + ** Useful String Functions + ** + **/ + +void AIErrToCString( AIErr error_to_report, char *errorText ) { + error_to_report = (AIErr) _ShortToAIReal( error_to_report ); + sAIUser->AIRealToString ( (float) error_to_report, 0, (unsigned char *)errorText ); + SUptocstr( (unsigned char*)errorText ); + return; +} + + +void CStringToAIErr( char *errorText, AIErr *error_to_report ) { + AIReal tempErr; + + SUctopstr( (char *)errorText ); + sAIUser->StringToAIReal( (unsigned char *)errorText, &tempErr ); + *error_to_report = _AIRealTruncToShort( tempErr ); + + return; +} + +static AIErr PString2AIErr(unsigned char* err_string) +{ // non numeric 4 byte err code. (e.g.) '!sel'. + AIErr err_code; + char *tmpPtr = (char *)&err_code; + int j; + + // err_code = *(long *)(err_string + 1); // NOTE: can't do this on intel machine. + // The hi-low byte problem. + +// for( j = 4; j >0 ; j--, tmpPtr++) + for( j = 1; j < 5; j++, tmpPtr++) + *tmpPtr = err_string[j]; + + return err_code; +} + +static void AIErr2PString(AIErr err_code, unsigned char* err_string) +{ + char *tmpPtr = (char *)&err_code; + int j; + + err_string[0] = 4; + +// for( j = 4; j >0 ; j--, tmpPtr++) + for( j = 1; j < 5; j++, tmpPtr++) + err_string[j] = *tmpPtr; +} diff --git a/BloksAIPlugin/Vendor/common/source/legacy/shellMain.cpp b/BloksAIPlugin/Vendor/common/source/legacy/shellMain.cpp index 7c84a1a..79f4478 100644 --- a/BloksAIPlugin/Vendor/common/source/legacy/shellMain.cpp +++ b/BloksAIPlugin/Vendor/common/source/legacy/shellMain.cpp @@ -1,257 +1,257 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/legacy/shellMain.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - - -/**----------------------------------------------------------------------------- - ** - ** Imports - ** - **/ -#include "IllustratorSDK.h" - -#include "common.h" -#include "about.h" -#include "reportError.h" -#include "pluginHandler.h" - -/**----------------------------------------------------------------------------- - ** - ** Variables - ** - **/ - -#include "suites.h" - - -// general globals -Globals * g; -short gAcquireCount; -SPAccessRef gSelfAccess; -extern "C" { SPBasicSuite * sSPBasic = NULL; } - -/**----------------------------------------------------------------------------- - ** - ** Forward Functions - ** - **/ - -static AIErr StartupPlugin( SPInterfaceMessage *message ); -static AIErr UnloadPlugin( SPAccessMessage *message ); -static AIErr ReloadPlugin( SPAccessMessage *message ); -static AIErr ShutdownPlugin( SPInterfaceMessage *message ); -static AIErr AboutPlugin( SPInterfaceMessage *message ); - - -/******************************************************************************* - ** - ** Exported Functions - ** - **/ - -// Tell Xcode to export the following symbols -#if defined(__GNUC__) -#pragma GCC visibility push(default) -#endif - -// Plug-in entry point -extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message); - -// Tell Xcode to return to default visibility for symbols -#if defined(__GNUC__) -#pragma GCC visibility pop -#endif - -extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message) -{ - AIErr error = kNoErr; - - // This is just an easy way of not having to cast message to ( SPMessageData* ) - // everytime we use IsEqual() - sSPBasic = ( ( SPMessageData* )message)->basic; - - // standard caller/selectors - - // if these do anything other than restore globals, you may need to move them - // into the aquire/releaseSuites block - if ( sSPBasic->IsEqual( caller, kSPAccessCaller ) ) { - if ( sSPBasic->IsEqual( selector, kSPAccessUnloadSelector ) ) - error = UnloadPlugin( (SPAccessMessage*) message ); - - else if ( sSPBasic->IsEqual( selector, kSPAccessReloadSelector ) ) - error = ReloadPlugin( (SPAccessMessage*) message ); - } - - else { - // we need suites for the following routines, so acquire all of them now - error = acquireSuites( ((SPInterfaceMessage*)message)->d.basic ); - if ( error ) - goto error; - - if ( sSPBasic->IsEqual( caller, kSPInterfaceCaller ) ) { - if ( sSPBasic->IsEqual( selector, kSPInterfaceStartupSelector ) ) - error = StartupPlugin( (SPInterfaceMessage*) message ); - - else if ( sSPBasic->IsEqual( selector, kSPInterfaceAboutSelector ) ) - error = AboutPlugin( (SPInterfaceMessage*) message ); - - else if ( sSPBasic->IsEqual( selector, kSPInterfaceShutdownSelector ) ) - error = ShutdownPlugin( (SPInterfaceMessage*) message ); - - } else - error = handlePluginCaller( caller, selector, message ); - -error: - if ( (error) && (error != kSPSuiteNotFoundError) && (error != 1)) - report_error( (SPInterfaceMessage*) message, error ); - - releaseSuites( ((SPInterfaceMessage*)message)->d.basic ); - } - - return error; - -} - - -static AIErr StartupPlugin ( SPInterfaceMessage *message ) { - - AIErr error = kNoErr; - - // Better to use SPBasicSuite for memory allocation (as opposed to alternatives such as SPBlocksSuite). - error = message->d.basic->AllocateBlock( sizeof(Globals), (void **) &g ); - if ( error ) - goto error; - - error = pluginStartup( message ); - -error: - return error; - -} - - -static AIErr UnloadPlugin( SPAccessMessage *message ) { - - if ( message->d.globals ) - unloadPluginSuiteFunctions( message ); - - message->d.globals = g; - return kNoErr; - -} - - -static AIErr ReloadPlugin( SPAccessMessage *message ) { - - AIErr error = kNoErr; - - if ( message->d.globals ) - error = reloadPluginSuiteFunctions( message ); - - g = (Globals*) message->d.globals; - gAcquireCount = 0; - return error; - -} - - -static AIErr ShutdownPlugin( SPInterfaceMessage *message ) { - - AIErr error = kNoErr; - - pluginShutdown( message ); - - message->d.basic->FreeBlock(g); - g = NULL; - message->d.globals = NULL; - return error; - -} - - -static AIErr AboutPlugin( SPInterfaceMessage *message ) { - - goAbout( message ); - return kNoErr; - -} - - - - - - -/**----------------------------------------------------------------------------- - ** - ** Suite Functions - ** - **/ - -// Acquire all of the suites in the imports array -extern AIErr acquireSuites( SPBasicSuite *sBasic ) { - - AIErr error = kNoErr; - long i; - - if ( !gAcquireCount ) { // suites have never been acquired, so get them - for ( i = 0; i < sizeof(imports)/sizeof(imports[0]); ++i ) { - if ( imports[i].suite != NULL ) { - error = sBasic->AcquireSuite( imports[i].name, imports[i].version, (const void**)imports[i].suite ); - if ( error && sADMBasic != NULL) - { - char message[256]; - sprintf(message, "Error: %d, suite: %s, version: %d!", error, imports[i].name, imports[i].version ); - sADMBasic->MessageAlert( message ); - goto error; - } - } - } - } - - -error: - gAcquireCount += 1; - return error; - - -} - - -extern AIErr releaseSuites( SPBasicSuite *sBasic ) { - - AIErr error = kNoErr; - long i; - - if ( gAcquireCount == 1 ) { // only release the suites on the last release, otherwise they are still in use - for ( i = 0; i < sizeof(imports)/sizeof(imports[0]); ++i ) { - - void **procs = imports[i].suite; - - if ( procs != NULL ) { // && *procs != NULL ) { - error = sBasic->ReleaseSuite( imports[i].name, imports[i].version ); - if ( error ) - goto error; - *procs = NULL; - } - - } - } - - -error: - gAcquireCount--; - return error; - - -} +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + + +/**----------------------------------------------------------------------------- + ** + ** Imports + ** + **/ +#include "IllustratorSDK.h" + +#include "common.h" +#include "about.h" +#include "reportError.h" +#include "pluginHandler.h" + +/**----------------------------------------------------------------------------- + ** + ** Variables + ** + **/ + +#include "suites.h" + + +// general globals +Globals * g; +short gAcquireCount; +SPAccessRef gSelfAccess; +extern "C" { SPBasicSuite * sSPBasic = NULL; } + +/**----------------------------------------------------------------------------- + ** + ** Forward Functions + ** + **/ + +static AIErr StartupPlugin( SPInterfaceMessage *message ); +static AIErr UnloadPlugin( SPAccessMessage *message ); +static AIErr ReloadPlugin( SPAccessMessage *message ); +static AIErr ShutdownPlugin( SPInterfaceMessage *message ); +static AIErr AboutPlugin( SPInterfaceMessage *message ); + + +/******************************************************************************* + ** + ** Exported Functions + ** + **/ + +// Tell Xcode to export the following symbols +#if defined(__GNUC__) +#pragma GCC visibility push(default) +#endif + +// Plug-in entry point +extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message); + +// Tell Xcode to return to default visibility for symbols +#if defined(__GNUC__) +#pragma GCC visibility pop +#endif + +extern "C" ASAPI ASErr PluginMain(char* caller, char* selector, void* message) +{ + AIErr error = kNoErr; + + // This is just an easy way of not having to cast message to ( SPMessageData* ) + // everytime we use IsEqual() + sSPBasic = ( ( SPMessageData* )message)->basic; + + // standard caller/selectors + + // if these do anything other than restore globals, you may need to move them + // into the aquire/releaseSuites block + if ( sSPBasic->IsEqual( caller, kSPAccessCaller ) ) { + if ( sSPBasic->IsEqual( selector, kSPAccessUnloadSelector ) ) + error = UnloadPlugin( (SPAccessMessage*) message ); + + else if ( sSPBasic->IsEqual( selector, kSPAccessReloadSelector ) ) + error = ReloadPlugin( (SPAccessMessage*) message ); + } + + else { + // we need suites for the following routines, so acquire all of them now + error = acquireSuites( ((SPInterfaceMessage*)message)->d.basic ); + if ( error ) + goto error; + + if ( sSPBasic->IsEqual( caller, kSPInterfaceCaller ) ) { + if ( sSPBasic->IsEqual( selector, kSPInterfaceStartupSelector ) ) + error = StartupPlugin( (SPInterfaceMessage*) message ); + + else if ( sSPBasic->IsEqual( selector, kSPInterfaceAboutSelector ) ) + error = AboutPlugin( (SPInterfaceMessage*) message ); + + else if ( sSPBasic->IsEqual( selector, kSPInterfaceShutdownSelector ) ) + error = ShutdownPlugin( (SPInterfaceMessage*) message ); + + } else + error = handlePluginCaller( caller, selector, message ); + +error: + if ( (error) && (error != kSPSuiteNotFoundError) && (error != 1)) + report_error( (SPInterfaceMessage*) message, error ); + + releaseSuites( ((SPInterfaceMessage*)message)->d.basic ); + } + + return error; + +} + + +static AIErr StartupPlugin ( SPInterfaceMessage *message ) { + + AIErr error = kNoErr; + + // Better to use SPBasicSuite for memory allocation (as opposed to alternatives such as SPBlocksSuite). + error = message->d.basic->AllocateBlock( sizeof(Globals), (void **) &g ); + if ( error ) + goto error; + + error = pluginStartup( message ); + +error: + return error; + +} + + +static AIErr UnloadPlugin( SPAccessMessage *message ) { + + if ( message->d.globals ) + unloadPluginSuiteFunctions( message ); + + message->d.globals = g; + return kNoErr; + +} + + +static AIErr ReloadPlugin( SPAccessMessage *message ) { + + AIErr error = kNoErr; + + if ( message->d.globals ) + error = reloadPluginSuiteFunctions( message ); + + g = (Globals*) message->d.globals; + gAcquireCount = 0; + return error; + +} + + +static AIErr ShutdownPlugin( SPInterfaceMessage *message ) { + + AIErr error = kNoErr; + + pluginShutdown( message ); + + message->d.basic->FreeBlock(g); + g = NULL; + message->d.globals = NULL; + return error; + +} + + +static AIErr AboutPlugin( SPInterfaceMessage *message ) { + + goAbout( message ); + return kNoErr; + +} + + + + + + +/**----------------------------------------------------------------------------- + ** + ** Suite Functions + ** + **/ + +// Acquire all of the suites in the imports array +extern AIErr acquireSuites( SPBasicSuite *sBasic ) { + + AIErr error = kNoErr; + long i; + + if ( !gAcquireCount ) { // suites have never been acquired, so get them + for ( i = 0; i < sizeof(imports)/sizeof(imports[0]); ++i ) { + if ( imports[i].suite != NULL ) { + error = sBasic->AcquireSuite( imports[i].name, imports[i].version, (const void**)imports[i].suite ); + if ( error && sADMBasic != NULL) + { + char message[256]; + sprintf(message, "Error: %d, suite: %s, version: %d!", error, imports[i].name, imports[i].version ); + sADMBasic->MessageAlert( message ); + goto error; + } + } + } + } + + +error: + gAcquireCount += 1; + return error; + + +} + + +extern AIErr releaseSuites( SPBasicSuite *sBasic ) { + + AIErr error = kNoErr; + long i; + + if ( gAcquireCount == 1 ) { // only release the suites on the last release, otherwise they are still in use + for ( i = 0; i < sizeof(imports)/sizeof(imports[0]); ++i ) { + + void **procs = imports[i].suite; + + if ( procs != NULL ) { // && *procs != NULL ) { + error = sBasic->ReleaseSuite( imports[i].name, imports[i].version ); + if ( error ) + goto error; + *procs = NULL; + } + + } + } + + +error: + gAcquireCount--; + return error; + + +} diff --git a/BloksAIPlugin/Vendor/common/source/legacy/stringUtils.cpp b/BloksAIPlugin/Vendor/common/source/legacy/stringUtils.cpp index edd7f99..58f71a3 100644 --- a/BloksAIPlugin/Vendor/common/source/legacy/stringUtils.cpp +++ b/BloksAIPlugin/Vendor/common/source/legacy/stringUtils.cpp @@ -1,209 +1,209 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/source/legacy/stringUtils.cpp $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "IllustratorSDK.h" -/* -#include -#include -#include "SPConfig.h" - -#ifdef MAC_ENV -#include "Memory.h" -#else -#include -#endif - -*/ - -#include "stringUtils.h" - -static char *strPS( register char *a, register char *b); -unsigned long SUstrlen(char *s); -char *SUstrncat(char *d, char *s, unsigned long size); -void SUmemmove(void *d, void *s, unsigned long len); - - -unsigned long SUstrlen(char *s) -{ - int lenCount = 0; - char *strLoc = s; - - while (*strLoc != 0) - { - lenCount++; - strLoc++; - } - - return lenCount; -} - - -char *SUstrncat(char *d, char *s, unsigned long size) -{ - char * src = s; - char * dst = d; - unsigned long charsToCopy = size; - - while (*dst) // advance to end of the destination - dst++; - - while (charsToCopy) - { - *dst = *src; - - dst++; - src++; - - if (!*src) // if next char to copy would be NULL, then break - { - break; - } - - charsToCopy--; - } - - *dst = 0; - - return d; -} - - - -void SUmemmove(void *d, void *s, unsigned long len) -{ -#ifdef MAC_ENV - BlockMove(s, d, (Size)len); -#else - memmove(d,s,len); -#endif -} - - -unsigned char *SUctopstr(char *s) -{ - register int len = SUstrlen(s); - - if (len > 255) - return NULL; - - SUmemmove(s + 1, s, len); - s[0] = (unsigned char) len; - - return (unsigned char *) s; -} - -char *SUptocstr(unsigned char *p) -{ - register int len = p[0]; - - SUmemmove(p, p + 1, len); - p[len] = '\0'; - - return (char *) p; -} - -unsigned char *SUpstrcpy(unsigned char *dst, const unsigned char *src) -{ - register int len = src[0]; - - dst[0] = len; - SUmemmove(dst + 1, (void*)(src + 1), len); - - return dst; -} - - - - -/* - * pstrcat - add string 'src' to end of string 'dst' - */ -void SUpstrcat(unsigned char *dst, unsigned char *src) -{ - /* copy string in */ - SUmemmove( dst + *dst + 1, src + 1, *src ); - /* adjust length byte */ - *dst += *src; -} - -/* - * pstrinsert - insert string 'src' at beginning of string 'dst' - */ -void SUpstrinsert(unsigned char *dst, unsigned char *src) -{ - /* make room for new string */ - SUmemmove( dst + *src + 1, dst + 1, *dst ); - /* copy new string in */ - SUmemmove( dst+1, src + 1, *src ); - /* adjust length byte */ - *dst += *src; -} - - - - -char *SUsafestrncpy(char *dst, const char *src, int dstsize) -{ - // strncpy would always write dstsize bytes, even if the source is (much) smaller - // strncat doesn't have that quality, and guarantees null-termination to boot - dst[0] = '\0'; - return SUstrncat(dst, (char*)src, dstsize-1); -} - -char *SUsafestrncat(char *dst, const char *src, int dstsize) -{ - // Avoid searching the destination for a null byte twice - int dstlen = SUstrlen(dst); - return SUstrncat(dst+dstlen, (char*)src, dstsize - dstlen - 1); -} - - - - - -/* Converts strings to Postscript string format - (i.e. bracketed by parens and with appropriate special character codes -*/ -void SUpasToPostscriptStr( unsigned char dst, unsigned char src) { - SUctopstr(strPS((char *) dst, (char *) SUptocstr((unsigned char *) src))); - SUctopstr((char *) src); - } - -static char *strPS( register char *a, register char *b) { - char *a0 = a; - register unsigned char c; - - *a++ = '('; - for (; (c = (unsigned char) *b++) != 0 ; ) - { - if (c == '\\' || c == '(' || c == ')') - { - *a++ = '\\'; - *a++ = c; - } - else if (c >= 0x20 && c <= 0x7e) - *a++ = c; - else - { - *a++ = '\\'; - *a++ = ((c >> 6) & 0x7) + '0'; - *a++ = ((c >> 3) & 0x7) + '0'; - *a++ = (c & 0x7) + '0'; - } - } - *a++ = ')'; - *a++ = '\0'; - return a0; - } +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "IllustratorSDK.h" +/* +#include +#include +#include "SPConfig.h" + +#ifdef MAC_ENV +#include "Memory.h" +#else +#include +#endif + +*/ + +#include "stringUtils.h" + +static char *strPS( register char *a, register char *b); +unsigned long SUstrlen(char *s); +char *SUstrncat(char *d, char *s, unsigned long size); +void SUmemmove(void *d, void *s, unsigned long len); + + +unsigned long SUstrlen(char *s) +{ + int lenCount = 0; + char *strLoc = s; + + while (*strLoc != 0) + { + lenCount++; + strLoc++; + } + + return lenCount; +} + + +char *SUstrncat(char *d, char *s, unsigned long size) +{ + char * src = s; + char * dst = d; + unsigned long charsToCopy = size; + + while (*dst) // advance to end of the destination + dst++; + + while (charsToCopy) + { + *dst = *src; + + dst++; + src++; + + if (!*src) // if next char to copy would be NULL, then break + { + break; + } + + charsToCopy--; + } + + *dst = 0; + + return d; +} + + + +void SUmemmove(void *d, void *s, unsigned long len) +{ +#ifdef MAC_ENV + BlockMove(s, d, (Size)len); +#else + memmove(d,s,len); +#endif +} + + +unsigned char *SUctopstr(char *s) +{ + register int len = SUstrlen(s); + + if (len > 255) + return NULL; + + SUmemmove(s + 1, s, len); + s[0] = (unsigned char) len; + + return (unsigned char *) s; +} + +char *SUptocstr(unsigned char *p) +{ + register int len = p[0]; + + SUmemmove(p, p + 1, len); + p[len] = '\0'; + + return (char *) p; +} + +unsigned char *SUpstrcpy(unsigned char *dst, const unsigned char *src) +{ + register int len = src[0]; + + dst[0] = len; + SUmemmove(dst + 1, (void*)(src + 1), len); + + return dst; +} + + + + +/* + * pstrcat - add string 'src' to end of string 'dst' + */ +void SUpstrcat(unsigned char *dst, unsigned char *src) +{ + /* copy string in */ + SUmemmove( dst + *dst + 1, src + 1, *src ); + /* adjust length byte */ + *dst += *src; +} + +/* + * pstrinsert - insert string 'src' at beginning of string 'dst' + */ +void SUpstrinsert(unsigned char *dst, unsigned char *src) +{ + /* make room for new string */ + SUmemmove( dst + *src + 1, dst + 1, *dst ); + /* copy new string in */ + SUmemmove( dst+1, src + 1, *src ); + /* adjust length byte */ + *dst += *src; +} + + + + +char *SUsafestrncpy(char *dst, const char *src, int dstsize) +{ + // strncpy would always write dstsize bytes, even if the source is (much) smaller + // strncat doesn't have that quality, and guarantees null-termination to boot + dst[0] = '\0'; + return SUstrncat(dst, (char*)src, dstsize-1); +} + +char *SUsafestrncat(char *dst, const char *src, int dstsize) +{ + // Avoid searching the destination for a null byte twice + int dstlen = SUstrlen(dst); + return SUstrncat(dst+dstlen, (char*)src, dstsize - dstlen - 1); +} + + + + + +/* Converts strings to Postscript string format + (i.e. bracketed by parens and with appropriate special character codes +*/ +void SUpasToPostscriptStr( unsigned char dst, unsigned char src) { + SUctopstr(strPS((char *) dst, (char *) SUptocstr((unsigned char *) src))); + SUctopstr((char *) src); + } + +static char *strPS( register char *a, register char *b) { + char *a0 = a; + register unsigned char c; + + *a++ = '('; + for (; (c = (unsigned char) *b++) != 0 ; ) + { + if (c == '\\' || c == '(' || c == ')') + { + *a++ = '\\'; + *a++ = c; + } + else if (c >= 0x20 && c <= 0x7e) + *a++ = c; + else + { + *a++ = '\\'; + *a++ = ((c >> 6) & 0x7) + '0'; + *a++ = ((c >> 3) & 0x7) + '0'; + *a++ = (c & 0x7) + '0'; + } + } + *a++ = ')'; + *a++ = '\0'; + return a0; + } diff --git a/BloksAIPlugin/Vendor/common/win/PluginMain.def b/BloksAIPlugin/Vendor/common/win/PluginMain.def index 2abcb69..1cb11c5 100644 --- a/BloksAIPlugin/Vendor/common/win/PluginMain.def +++ b/BloksAIPlugin/Vendor/common/win/PluginMain.def @@ -1 +1 @@ -EXPORTS PluginMain +EXPORTS PluginMain diff --git a/BloksAIPlugin/Vendor/common/win/VersionInfo.rc b/BloksAIPlugin/Vendor/common/win/VersionInfo.rc index 740a7ff..de1997b 100644 --- a/BloksAIPlugin/Vendor/common/win/VersionInfo.rc +++ b/BloksAIPlugin/Vendor/common/win/VersionInfo.rc @@ -1,62 +1,62 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/win/VersionInfo.rc $ -// -// $Revision: #1 $ -// -// Copyright 2006 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#include "SDKDef.h" - -// Define kYourSDKPluginName before including this file to set the plug-in name for the version resource. -#ifndef kMySDKPluginName -#define kMySDKPluginName "MySDKPluginName" -#endif - -///////////////////////////////////////////////////////////////////////////// -// -// VersionInfo -// -1 VERSIONINFO - FILEVERSION kSDKDefAIMajorVersionNum, kSDKDefAIMinorVersionNum, kSDKDefAIRevisionVersionNum, kSDKDefBuildNumber - PRODUCTVERSION kSDKDefAIMajorVersionNum, kSDKDefAIMinorVersionNum, kSDKDefAIRevisionVersionNum, kSDKDefBuildNumber - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS__WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual - BEGIN - VALUE "CompanyName", kSDKDefAIFullCompanyName, "\0" - VALUE "FileDescription", kSDKDefFileDescriptionString, "\0" - VALUE "FileVersion", kSDKDefProductVersionString, "\0" - VALUE "InternalName", kMySDKPluginName, "\0" - VALUE "LegalCopyright", kSDKDefCopyrightString, "\0" - VALUE "OriginalFilename", kMySDKPluginName ".aip", "\0" - VALUE "ProductName", kSDKDefAIFullProductName, "\0" - VALUE "ProductVersion", kSDKDefProductVersionString, "\0" - VALUE "Copyright", kSDKDefCopyrightString, "\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 0x04E4 - END -END -///////////////////////////////////////////////////////////////////////////// - - +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 2006 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#include "SDKDef.h" + +// Define kYourSDKPluginName before including this file to set the plug-in name for the version resource. +#ifndef kMySDKPluginName +#define kMySDKPluginName "MySDKPluginName" +#endif + +///////////////////////////////////////////////////////////////////////////// +// +// VersionInfo +// +1 VERSIONINFO + FILEVERSION kSDKDefAIMajorVersionNum, kSDKDefAIMinorVersionNum, kSDKDefAIRevisionVersionNum, kSDKDefBuildNumber + PRODUCTVERSION kSDKDefAIMajorVersionNum, kSDKDefAIMinorVersionNum, kSDKDefAIRevisionVersionNum, kSDKDefBuildNumber + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_DLL + FILESUBTYPE VFT2_UNKNOWN +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904E4" // Lang=US English, CharSet=Windows Multilingual + BEGIN + VALUE "CompanyName", kSDKDefAIFullCompanyName, "\0" + VALUE "FileDescription", kSDKDefFileDescriptionString, "\0" + VALUE "FileVersion", kSDKDefProductVersionString, "\0" + VALUE "InternalName", kMySDKPluginName, "\0" + VALUE "LegalCopyright", kSDKDefCopyrightString, "\0" + VALUE "OriginalFilename", kMySDKPluginName ".aip", "\0" + VALUE "ProductName", kSDKDefAIFullProductName, "\0" + VALUE "ProductVersion", kSDKDefProductVersionString, "\0" + VALUE "Copyright", kSDKDefCopyrightString, "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04E4 + END +END +///////////////////////////////////////////////////////////////////////////// + + diff --git a/BloksAIPlugin/Vendor/common/win/pragma.h b/BloksAIPlugin/Vendor/common/win/pragma.h index fddb4ec..6e27722 100644 --- a/BloksAIPlugin/Vendor/common/win/pragma.h +++ b/BloksAIPlugin/Vendor/common/win/pragma.h @@ -1,20 +1,20 @@ -//======================================================================================== -// -// $File: //ai_stream/rel_20_0/devtech/sdk/public/samplecode/common/win/pragma.h $ -// -// $Revision: #1 $ -// -// Copyright 1987 Adobe Systems Incorporated. All rights reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance -// with the terms of the Adobe license agreement accompanying it. If you have received -// this file from a source other than Adobe, then your use, modification, or -// distribution of it requires the prior written permission of Adobe. -// -//======================================================================================== - -#pragma warning (disable: 4290) // C++ exception specification ignored except - // to indicate a function is not __declspec(nothrow) - -#pragma warning (disable: 4800) // Ignore "'AIBool8' : forcing value to bool 'true' or - // 'false' (performance warning)" warning +//======================================================================================== +// +// $File$ +// +// $Revision$ +// +// Copyright 1987 Adobe Systems Incorporated. All rights reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance +// with the terms of the Adobe license agreement accompanying it. If you have received +// this file from a source other than Adobe, then your use, modification, or +// distribution of it requires the prior written permission of Adobe. +// +//======================================================================================== + +#pragma warning (disable: 4290) // C++ exception specification ignored except + // to indicate a function is not __declspec(nothrow) + +#pragma warning (disable: 4800) // Ignore "'AIBool8' : forcing value to bool 'true' or + // 'false' (performance warning)" warning diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATEDOM.xml b/BloksAIPlugin/Vendor/illustratorapi/ate/ATEDOM.xml index 0fa795c..4a792af 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATEDOM.xml +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATEDOM.xml @@ -1,13293 +1,13291 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATEException.h b/BloksAIPlugin/Vendor/illustratorapi/ate/ATEException.h index 030102d..c909193 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATEException.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATEException.h @@ -1,40 +1,40 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: Exception.h - - Notes: define ATE exception class. - - ---------------------------------------------------------------------------------- */ -#ifndef __Exception__ -#define __Exception__ -#include -#include "ATETypes.h" //for error values. - -namespace ATE -{ - -class Exception : public std::exception -{ -public: - Exception(ATEErr errorCode) - :error(errorCode) - { - } -// error code - ATEErr error; -}; - - -}// namespace ATE - -#endif //__Exception__ +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: Exception.h + + Notes: define ATE exception class. + + ---------------------------------------------------------------------------------- */ +#ifndef __Exception__ +#define __Exception__ +#include +#include "ATETypes.h" //for error values. + +namespace ATE +{ + +class Exception : public std::exception +{ +public: + Exception(ATEErr errorCode) + :error(errorCode) + { + } +// error code + ATEErr error; +}; + + +}// namespace ATE + +#endif //__Exception__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATESuites.h b/BloksAIPlugin/Vendor/illustratorapi/ate/ATESuites.h index 0cebf67..64f632e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATESuites.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATESuites.h @@ -1,3901 +1,5195 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATESuites.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ -#ifndef __ATESuites__ -#define __ATESuites__ - -#include "SloTextdomTypes.h" -#include "ATETypes.h" -#include "ATETypesDef.h" -#ifdef __cplusplus -namespace ATE -{ -extern "C" { -#endif - -#ifdef MAC_ENV - #if defined (__MWERKS__) - #pragma options align=power_gcc - #elif defined (__GNUC__) - #pragma options align=power - #endif -#endif - -#ifdef WIN_ENV - #pragma pack(push, 4) -#endif - -////////////////////////////////////////////// -// --ApplicationPaintSuite-- -////////////////////////////////////////////// -#define kApplicationPaintSuite "ATE ApplicationPaint Suite" -#define kApplicationPaintSuiteVersion1 1 -#define kApplicationPaintSuiteVersion kApplicationPaintSuiteVersion1 - -typedef struct ApplicationPaintSuite{ - - // Reference count maintenance. - void (*AddRef) ( ApplicationPaintRef applicationpaint); - void (*Release) ( ApplicationPaintRef applicationpaint); - ATEBool8 (*IsNull) ( ApplicationPaintRef applicationpaint); - - -}ApplicationPaintSuite; - -////////////////////////////////////////////// -// --CompFontSuite-- -////////////////////////////////////////////// -#define kCompFontSuite "ATE CompFont Suite" -#define kCompFontSuiteVersion1 1 -#define kCompFontSuiteVersion kCompFontSuiteVersion1 - -typedef struct CompFontSuite{ - - // Reference count maintenance. - void (*AddRef) ( CompFontRef compfont); - void (*Release) ( CompFontRef compfont); - ATEBool8 (*IsNull) ( CompFontRef compfont); - - ATEErr (*Initialize) ( TextResourcesRef pResources, CompFontRef* compfont); - // PROPERTIES - // ======================================================================= - ATEErr (*GetNativeName) ( CompFontRef compfont, ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength); - // The PostScript name will be automatically derived from the NativeName. - ATEErr (*SetNativeName) ( CompFontRef compfont, const ATETextDOM::Unicode* name); - ATEErr (*GetPostScriptName_AsUnicode) ( CompFontRef compfont, ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength); - ATEErr (*GetPostScriptName_AsChar) ( CompFontRef compfont, char* name, ATETextDOM::Int32 maxLength); - ATEErr (*SetFontDictionary) ( CompFontRef compfont, void* fontDictionary); - ATEErr (*GetFontDictionary) ( CompFontRef compfont, void** ret); - // METHODS - // ======================================================================= - ATEErr (*Duplicate) ( CompFontRef compfont, CompFontRef* ret); - // Has the resource been modified since it became editable? - ATEErr (*IsModified) ( CompFontRef compfont, ATEBool8* ret); - ATEErr (*IsEditable) ( CompFontRef compfont, ATEBool8* ret); - ATEErr (*IsCommitted) ( CompFontRef compfont, ATEBool8* ret); - // Is the font in a valid state, either editable or committed? - ATEErr (*VerifyState) ( CompFontRef compfont, ATEBool8* ret); - ATEErr (*IsATCFileLoaded) ( CompFontRef compfont, ATEBool8* ret); - ATEErr (*GetComponentCount) ( CompFontRef compfont, ATETextDOM::Int32* ret); - ATEErr (*GetComponent) ( CompFontRef compfont, ATETextDOM::Int32 index, CompFontComponentRef* ret); - ATEErr (*Find) ( CompFontRef compfont, CompFontComponentRef component, ATETextDOM::Int32* ret); - // Removes an existing component, returns true if successful - ATEErr (*RemoveComponent) ( CompFontRef compfont, ATETextDOM::Int32 index, ATEBool8* ret); - // Appends a new component, returns its new index if successful, - // -1 if unsuccessful - ATEErr (*AddComponent) ( CompFontRef compfont, CompFontComponentRef component, ATETextDOM::Int32* ret); - // Replaces an existing component, retuns true if successful - ATEErr (*ReplaceComponent) ( CompFontRef compfont, ATETextDOM::Int32 index, CompFontComponentRef component, ATEBool8* ret); - -}CompFontSuite; - -////////////////////////////////////////////// -// --CompFontClassSuite-- -////////////////////////////////////////////// -#define kCompFontClassSuite "ATE CompFontClass Suite" -#define kCompFontClassSuiteVersion1 1 -#define kCompFontClassSuiteVersion kCompFontClassSuiteVersion1 - -typedef struct CompFontClassSuite{ - - // Reference count maintenance. - void (*AddRef) ( CompFontClassRef compfontclass); - void (*Release) ( CompFontClassRef compfontclass); - ATEBool8 (*IsNull) ( CompFontClassRef compfontclass); - - ATEErr (*Initialize) ( CompFontClassRef* compfontclass); - // PROPERTIES - // ======================================================================= - ATEErr (*GetNativeName) ( CompFontClassRef compfontclass, ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength); - ATEErr (*SetNativeName) ( CompFontClassRef compfontclass, const ATETextDOM::Unicode* name); - // Returns number of integers written to buffer, including terminating 0. - // It will not write more than maxLength number of integers, including - // terminating 0. - ATEErr (*GetCodes) ( CompFontClassRef compfontclass, ATETextDOM::Unicode* codes, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - // Return character code count which does not include terminating null. - ATEErr (*SetCodes) ( CompFontClassRef compfontclass, const ATETextDOM::Unicode* codes, ATETextDOM::Int32* ret); - // METHODS - // ======================================================================= - ATEErr (*Duplicate) ( CompFontClassRef compfontclass, CompFontClassRef* ret); - ATEErr (*GetCharacterCount) ( CompFontClassRef compfontclass, ATETextDOM::Int32* ret); - ATEErr (*GetClassType) ( CompFontClassRef compfontclass, CompositeFontClassType* ret); - ATEErr (*IsCodeInClass) ( CompFontClassRef compfontclass, ATETextDOM::Unicode code, ATEBool8* ret); - // Predefined classes are never be editable. Cutom override classes - // are editable only if it is in an editable state. - ATEErr (*IsEditable) ( CompFontClassRef compfontclass, ATEBool8* ret); - ATEErr (*IsCustomOverride) ( CompFontClassRef compfontclass, ATEBool8* ret); - // Has the resource been modified since it became editable? - ATEErr (*IsModified) ( CompFontClassRef compfontclass, ATEBool8* ret); - // Is the font in a valid state, either editable or committed? - ATEErr (*VerifyState) ( CompFontClassRef compfontclass, ATEBool8* ret); - -}CompFontClassSuite; - -////////////////////////////////////////////// -// --CompFontClassSetSuite-- -////////////////////////////////////////////// -#define kCompFontClassSetSuite "ATE CompFontClassSet Suite" -#define kCompFontClassSetSuiteVersion1 1 -#define kCompFontClassSetSuiteVersion kCompFontClassSetSuiteVersion1 - -typedef struct CompFontClassSetSuite{ - - // Reference count maintenance. - void (*AddRef) ( CompFontClassSetRef compfontclassset); - void (*Release) ( CompFontClassSetRef compfontclassset); - ATEBool8 (*IsNull) ( CompFontClassSetRef compfontclassset); - - // ======================================================================= - // PROPERTIES - // ======================================================================= - ATEErr (*GetSize) ( CompFontClassSetRef compfontclassset, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( CompFontClassSetRef compfontclassset, CompFontClassRef* ret); - ATEErr (*GetLast) ( CompFontClassSetRef compfontclassset, CompFontClassRef* ret); - // ======================================================================= - // METHODS - // ======================================================================= - ATEErr (*Item) ( CompFontClassSetRef compfontclassset, ATETextDOM::Int32 nIndex, CompFontClassRef* ret); - // Returns a valid index if found, else return -1 - ATEErr (*Find) ( CompFontClassSetRef compfontclassset, CompFontClassRef compFontClass, ATETextDOM::Int32* ret); - // Returns a valid index if found, else return -1 - ATEErr (*FindPredefined) ( CompFontClassSetRef compfontclassset, CompositeFontClassType predefinedType, ATETextDOM::Int32* ret); - // ======================================================================= - // PROTECTED AND PRIVATE METHODS - // ======================================================================= - -}CompFontClassSetSuite; - -////////////////////////////////////////////// -// --CompFontComponentSuite-- -////////////////////////////////////////////// -#define kCompFontComponentSuite "ATE CompFontComponent Suite" -#define kCompFontComponentSuiteVersion1 1 -#define kCompFontComponentSuiteVersion kCompFontComponentSuiteVersion1 - -typedef struct CompFontComponentSuite{ - - // Reference count maintenance. - void (*AddRef) ( CompFontComponentRef compfontcomponent); - void (*Release) ( CompFontComponentRef compfontcomponent); - ATEBool8 (*IsNull) ( CompFontComponentRef compfontcomponent); - - ATEErr (*Initialize) ( TextResourcesRef pResources, CompFontComponentRef* compfontcomponent); - // PROPERTIES - // ======================================================================= - ATEErr (*GetClass) ( CompFontComponentRef compfontcomponent, CompFontClassRef* ret); - ATEErr (*SetClass) ( CompFontComponentRef compfontcomponent, CompFontClassRef charClass); - ATEErr (*GetFont) ( CompFontComponentRef compfontcomponent, FontRef* ret); - ATEErr (*SetFont) ( CompFontComponentRef compfontcomponent, FontRef font); - ATEErr (*GetSize) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float* ret); - ATEErr (*SetSize) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float size); - ATEErr (*GetBaseline) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float* ret); - ATEErr (*SetBaseline) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float baseline); - ATEErr (*GetHorizontalScale) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float* ret); - ATEErr (*SetHorizontalScale) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float horizontalScale); - ATEErr (*GetVerticalScale) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float* ret); - ATEErr (*SetVerticalScale) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float verticalScale); - ATEErr (*GetCenterGlyph) ( CompFontComponentRef compfontcomponent, ATEBool8* ret); - ATEErr (*SetCenterGlyph) ( CompFontComponentRef compfontcomponent, ATEBool8 centerglyph); - // METHODS - // ======================================================================= - ATEErr (*IsModified) ( CompFontComponentRef compfontcomponent, ATEBool8* ret); - -}CompFontComponentSuite; - -////////////////////////////////////////////// -// --CompFontSetSuite-- -////////////////////////////////////////////// -#define kCompFontSetSuite "ATE CompFontSet Suite" -#define kCompFontSetSuiteVersion1 1 -#define kCompFontSetSuiteVersion kCompFontSetSuiteVersion1 - -typedef struct CompFontSetSuite{ - - // Reference count maintenance. - void (*AddRef) ( CompFontSetRef compfontset); - void (*Release) ( CompFontSetRef compfontset); - ATEBool8 (*IsNull) ( CompFontSetRef compfontset); - - // ======================================================================= - // PROPERTIES - // ======================================================================= - ATEErr (*GetSize) ( CompFontSetRef compfontset, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( CompFontSetRef compfontset, CompFontRef* ret); - ATEErr (*GetLast) ( CompFontSetRef compfontset, CompFontRef* ret); - // ======================================================================= - // METHODS - // ======================================================================= - ATEErr (*Item) ( CompFontSetRef compfontset, ATETextDOM::Int32 nIndex, CompFontRef* ret); - // Returns a valid index if found, else return -1 - ATEErr (*Find) ( CompFontSetRef compfontset, CompFontRef font, ATETextDOM::Int32* ret); - // Removes an existing composite font, returns true if successful - ATEErr (*Remove) ( CompFontSetRef compfontset, ATETextDOM::Int32 nIndex, ATEBool8* ret); - // Appends a new composite font, returns its new index if successful, - // -1 if unsuccessful - ATEErr (*Add) ( CompFontSetRef compfontset, CompFontRef font, ATETextDOM::Int32* ret); - // Replaces an existing composite font, returns true if successful - ATEErr (*Replace) ( CompFontSetRef compfontset, ATETextDOM::Int32 nIndex, CompFontRef newFont, ATEBool8* ret); - // Updates composite font set to reflect what is currently in the - // document font resource's font set. This may invalidate any old - // indices the client may be holding on to. - ATEErr (*Update) ( CompFontSetRef compfontset); - // ======================================================================= - // PROTECTED AND PRIVATE METHODS - // ======================================================================= - -}CompFontSetSuite; - -////////////////////////////////////////////// -// --GlyphRunSuite-- -////////////////////////////////////////////// -#define kGlyphRunSuite "ATE GlyphRun Suite" -#define kGlyphRunSuiteVersion1 1 -#define kGlyphRunSuiteVersion kGlyphRunSuiteVersion1 - -typedef struct GlyphRunSuite{ - - // Reference count maintenance. - void (*AddRef) ( GlyphRunRef glyphrun); - void (*Release) ( GlyphRunRef glyphrun); - ATEBool8 (*IsNull) ( GlyphRunRef glyphrun); - - // METHODS - // ======================================================================= - ///This API will return ITextLine, parent of this IGlyphRun. - ATEErr (*GetTextLine) ( GlyphRunRef glyphrun, TextLineRef* ret); - /** return the size of glyphs in this run. - This API will return the size of the glyphs in this run. The size of the glyphs - might be different from GetCharacterCount() due to factors like ligature, hyphenation etc... - If you want the count of glyphs, then use GetGlyphIDs().GetSize(). - */ - ATEErr (*GetSize) ( GlyphRunRef glyphrun, ATETextDOM::Int32* ret); - /** return the size of characters in this run. - This API will return the size of characters in this run. You can use this API before calling - IGlyphRun::GetContents(xxx , SloTextdom::Int32 maxLength) to know the size of maxLength needed. - The size of the glyphs IGlyphRun::GetSize() might be different from the return of GetCharacterCount() due to factors like ligature, hyphenation etc... - */ - ATEErr (*GetCharacterCount) ( GlyphRunRef glyphrun, ATETextDOM::Int32* ret); - ATEErr (*GetOrigins) ( GlyphRunRef glyphrun, ArrayRealPointRef* ret); - ATEErr (*GetGlyphIDs) ( GlyphRunRef glyphrun, ArrayGlyphIDRef* ret); - /** Return transformation matrix of this run. - The matrix returned spesify the full transformation of the given run. You need to transform the origin by IGlyphRun::GetOrigins() and - concat with ITextFrame::GetMatrix() in order to get the location of the glyphs. - */ - ATEErr (*GetMatrix) ( GlyphRunRef glyphrun, ATETextDOM::FloatMatrix* ret); - /** return character feature of this run. - Use this to get access to Font, FontSize, HorizontalScale - VerticalScale, Tracking, BaselineShift, FillColor , StrokeColor ,fBlend - Fill , Stroke , FillFirst , FillOverPrint , StrokeOverPrint , FillBackgroundColor, FillBackground - LineCap , LineJoin , LineWidth , MiterLimit , LineDashOffset , - LineDashArray and that is it, the rest of CharFeatures members are not defined. - */ - ATEErr (*GetCharFeatures) ( GlyphRunRef glyphrun, CharFeaturesRef* ret); - ///Glyph orientation in that run. - ATEErr (*GetGlyphOrientation) ( GlyphRunRef glyphrun, GlyphOrientation* ret); - ATEErr (*GetAscent) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - ATEErr (*GetDescent) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - /// This is the tracking that is computed by the layout engine. i.e the space between each character. - ATEErr (*GetTracking) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - /// width of the space glyph in that font - ATEErr (*GetSpaceGlyphWidth) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - /// distance of baseline in that font - ATEErr (*GetDistanceToBaseline) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - /// underline position in that font - ATEErr (*GetUnderlinePosition) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - /// underline thickness in that font - ATEErr (*GetUnderlineThickness) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - /// Maximum Cap height in that font - ATEErr (*GetMaxCapHeight) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - /// Minimum Cap height in that font - ATEErr (*GetMinCapHeight) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); - /// Component font for the run if using a composite font, other wise the same font as in - /// character feature. - ATEErr (*GetFlattenedFont) ( GlyphRunRef glyphrun, FontRef* ret); - /// Note: size of glyphrun may be different from size of characters. - ATEErr (*GetContents_AsUnicode) ( GlyphRunRef glyphrun, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetContents_AsChar) ( GlyphRunRef glyphrun, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - -}GlyphRunSuite; - -////////////////////////////////////////////// -// --GlyphRunsIteratorSuite-- -////////////////////////////////////////////// -#define kGlyphRunsIteratorSuite "ATE GlyphRunsIterator Suite" -#define kGlyphRunsIteratorSuiteVersion1 1 -#define kGlyphRunsIteratorSuiteVersion kGlyphRunsIteratorSuiteVersion1 - -typedef struct GlyphRunsIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( GlyphRunsIteratorRef glyphrunsiterator); - void (*Release) ( GlyphRunsIteratorRef glyphrunsiterator); - ATEBool8 (*IsNull) ( GlyphRunsIteratorRef glyphrunsiterator); - - // METHODS - // ===================================================================== - ATEErr (*IsNotDone) ( GlyphRunsIteratorRef glyphrunsiterator, ATEBool8* ret); - ATEErr (*IsDone) ( GlyphRunsIteratorRef glyphrunsiterator, ATEBool8* ret); - ATEErr (*Next) ( GlyphRunsIteratorRef glyphrunsiterator); - ATEErr (*Item) ( GlyphRunsIteratorRef glyphrunsiterator, GlyphRunRef* ret); - -}GlyphRunsIteratorSuite; - -////////////////////////////////////////////// -// --MojiKumiSuite-- -////////////////////////////////////////////// -#define kMojiKumiSuite "ATE MojiKumi Suite" -#define kMojiKumiSuiteVersion1 1 -#define kMojiKumiSuiteVersion kMojiKumiSuiteVersion1 - -typedef struct MojiKumiSuite{ - - // Reference count maintenance. - void (*AddRef) ( MojiKumiRef mojikumi); - void (*Release) ( MojiKumiRef mojikumi); - ATEBool8 (*IsNull) ( MojiKumiRef mojikumi); - - ATEErr (*Initialize) ( MojiKumiRef* mojikumi); - // PROPERTIES - // ======================================================================= - ATEErr (*GetName) ( MojiKumiRef mojikumi, ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetNameSize) ( MojiKumiRef mojikumi, ATETextDOM::Int32* ret); - ATEErr (*SetName) ( MojiKumiRef mojikumi, const ATETextDOM::Unicode * name); - ATEErr (*MatchesPredefinedResourceTag) ( MojiKumiRef mojikumi, ATE::MojikumiTablePredefinedTag tag, ATEBool8* ret); - ATEErr (*GetEntry) ( MojiKumiRef mojikumi, ATETextDOM::Int32 index, ATETextDOM::Float * minExpansion, ATETextDOM::Float * maxExpansion, ATETextDOM::Float * desiredExpansion); - ATEErr (*SetEntry) ( MojiKumiRef mojikumi, ATETextDOM::Int32 index, ATETextDOM::Float minExpansion, ATETextDOM::Float maxExpansion, ATETextDOM::Float desiredExpansion); - // METHODS - // ======================================================================= - ATEErr (*IsEqual) ( MojiKumiRef mojikumi, MojiKumiRef rhsMojiKumi, ATEBool8* ret); - ATEErr (*IsEquivalent) ( MojiKumiRef mojikumi, MojiKumiRef rhsMojiKumi, ATEBool8* ret); - ATEErr (*IsModified) ( MojiKumiRef mojikumi, ATEBool8* ret); - ATEErr (*IsPredefined) ( MojiKumiRef mojikumi, ATEBool8* ret); - ATEErr (*Duplicate) ( MojiKumiRef mojikumi, MojiKumiRef* ret); - -}MojiKumiSuite; - -////////////////////////////////////////////// -// --MojiKumiSetSuite-- -////////////////////////////////////////////// -#define kMojiKumiSetSuite "ATE MojiKumiSet Suite" -#define kMojiKumiSetSuiteVersion1 1 -#define kMojiKumiSetSuiteVersion kMojiKumiSetSuiteVersion1 - -typedef struct MojiKumiSetSuite{ - - // Reference count maintenance. - void (*AddRef) ( MojiKumiSetRef mojikumiset); - void (*Release) ( MojiKumiSetRef mojikumiset); - ATEBool8 (*IsNull) ( MojiKumiSetRef mojikumiset); - - // PROPERTIES - // ======================================================================= - ATEErr (*GetSize) ( MojiKumiSetRef mojikumiset, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( MojiKumiSetRef mojikumiset, MojiKumiRef* ret); - ATEErr (*GetLast) ( MojiKumiSetRef mojikumiset, MojiKumiRef* ret); - // METHODS - // ======================================================================= - ATEErr (*Item) ( MojiKumiSetRef mojikumiset, ATETextDOM::Int32 nIndex, MojiKumiRef* ret); - /// Returns a valid index if found, else return -1 - /// This will search for mojikumi with the same name and data - ATEErr (*Find_AsMojiKumi) ( MojiKumiSetRef mojikumiset, const MojiKumiRef mojiKumi, ATETextDOM::Int32* ret); - /// Returns a valid index if found, else return -1 - /// Search by name only - ATEErr (*Find_AsUnicode) ( MojiKumiSetRef mojikumiset, const ATETextDOM::Unicode* name, ATETextDOM::Int32* ret); - /// Returns a valid index if found, else return -1 - /// If kUserDefinedMojikumiTableTag is requested for search, it will return the - /// first user defined mojikumi it finds. - ATEErr (*Find_ByPredefinedMojikumiTag) ( MojiKumiSetRef mojikumiset, MojikumiTablePredefinedTag tag, ATETextDOM::Int32* ret); - /// Removes an existing mojikumi, returns true if successful - ATEErr (*Remove) ( MojiKumiSetRef mojikumiset, ATETextDOM::Int32 nIndex, ATEBool8* ret); - /// Appends a new mojikumi, returns its new index if successful, - /// -1 if unsuccessful - /// If the mojikumi being added already exists in the set, it will - /// return its current index. - ATEErr (*Add) ( MojiKumiSetRef mojikumiset, MojiKumiRef mojiKumi, ATETextDOM::Int32* ret); - /// Replaces an existing mojikumi at the given index with the - /// given moji kumi. Returns true if successful - ATEErr (*Replace) ( MojiKumiSetRef mojikumiset, ATETextDOM::Int32 nIndex, MojiKumiRef mojiKumi, ATEBool8* ret); - /// Creates an empty new mojikumi with the specified name - /// and appends it to the new set. - /// It will return its new index via the nIndex parameter. - /// If the creation of mojiKumi was unsuccessful, it will - /// return an null AutoMojiKumi and nIndex will be -1. - ATEErr (*CreateNewMojiKumi) ( MojiKumiSetRef mojikumiset, const ATETextDOM::Unicode* name, ATETextDOM::Int32* nIndex, MojiKumiRef* ret); - -}MojiKumiSetSuite; - -////////////////////////////////////////////// -// --TextFrameSuite-- -////////////////////////////////////////////// -#define kTextFrameSuite "ATE TextFrame Suite" -#if SLO_COMPLEXSCRIPT -#define kTextFrameSuiteVersion101 101 -#define kTextFrameSuiteVersion kTextFrameSuiteVersion101 -#else -#define kTextFrameSuiteVersion1 1 -#define kTextFrameSuiteVersion kTextFrameSuiteVersion1 -#endif - -typedef struct TextFrameSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextFrameRef textframe); - void (*Release) ( TextFrameRef textframe); - ATEBool8 (*IsNull) ( TextFrameRef textframe); - - // METHODS - // ===================================================================== - /// Get the parent story - ATEErr (*GetStory) ( TextFrameRef textframe, StoryRef* ret); - /** Get the text range of this frame, - If this frame is the last frame in this story then:- - 1. If bIncludeOverflow is true, then the range returned is including the overflown text. - 2. If bIncludeOverflow is false, then the range returned will not include the overflown text. - */ - ATEErr (*GetTextRange) ( TextFrameRef textframe, ATEBool8 bIncludeOverflow, TextRangeRef* ret); - ATEErr (*GetTextLinesIterator) ( TextFrameRef textframe, TextLinesIteratorRef* ret); - ATEErr (*IsEqual) ( TextFrameRef textframe, const TextFrameRef anotherFrame, ATEBool8* ret); - ATEErr (*GetType) ( TextFrameRef textframe, FrameType* ret); - ATEErr (*GetLineOrientation) ( TextFrameRef textframe, LineOrientation* ret); - /** Check if this frame is selected. To set the selection, you have to use application specific - API for that. In Illustrator case, you can use AIArtSuite to set the selection. - */ - ATEErr (*GetSelected) ( TextFrameRef textframe, ATEBool8* ret); - ATEErr (*GetMatrix) ( TextFrameRef textframe, ATETextDOM::FloatMatrix* ret); - ATEErr (*GetRowCount) ( TextFrameRef textframe, ATETextDOM::Int32* ret); - ATEErr (*GetColumnCount) ( TextFrameRef textframe, ATETextDOM::Int32* ret); - ATEErr (*GetRowMajorOrder) ( TextFrameRef textframe, ATEBool8* ret); - ATEErr (*GetRowGutter) ( TextFrameRef textframe, ATETextDOM::Float* ret); - ATEErr (*GetColumnGutter) ( TextFrameRef textframe, ATETextDOM::Float* ret); - ATEErr (*GetSpacing) ( TextFrameRef textframe, ATETextDOM::Float* ret); - ATEErr (*GetOpticalAlignment) ( TextFrameRef textframe, ATEBool8* ret); - ATEErr (*SetRowCount) ( TextFrameRef textframe, ATETextDOM::Int32 rowCount); - ATEErr (*SetColumnCount) ( TextFrameRef textframe, ATETextDOM::Int32 columnCount); - ATEErr (*SetRowMajorOrder) ( TextFrameRef textframe, ATEBool8 isRowMajor); - ATEErr (*SetRowGutter) ( TextFrameRef textframe, ATETextDOM::Float gutter); - ATEErr (*SetColumnGutter) ( TextFrameRef textframe, ATETextDOM::Float gutter); - ATEErr (*SetSpacing) ( TextFrameRef textframe, ATETextDOM::Float spacing); - ATEErr (*SetOpticalAlignment) ( TextFrameRef textframe, ATEBool8 isActive); - ATEErr (*SetLineOrientation) ( TextFrameRef textframe, LineOrientation lineOrientation); -#if SLO_COMPLEXSCRIPT - ATEErr (*GetStoryDirection) ( TextFrameRef textframe, ParagraphDirection* ret); - ATEErr (*SetStoryDirection) ( TextFrameRef textframe, ParagraphDirection direction); - ATEErr (*FullReflow) ( TextFrameRef textframe); -#endif -}TextFrameSuite; - -////////////////////////////////////////////// -// --TextFramesIteratorSuite-- -////////////////////////////////////////////// -#define kTextFramesIteratorSuite "ATE TextFramesIterator Suite" -#define kTextFramesIteratorSuiteVersion1 1 -#define kTextFramesIteratorSuiteVersion kTextFramesIteratorSuiteVersion1 - -typedef struct TextFramesIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextFramesIteratorRef textframesiterator); - void (*Release) ( TextFramesIteratorRef textframesiterator); - ATEBool8 (*IsNull) ( TextFramesIteratorRef textframesiterator); - - ATEErr (*Initialize) ( const TextRangeRef range, TextFramesIteratorRef* textframesiterator); - // METHODS - // ===================================================================== - ATEErr (*IsNotDone) ( TextFramesIteratorRef textframesiterator, ATEBool8* ret); - ATEErr (*IsDone) ( TextFramesIteratorRef textframesiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( TextFramesIteratorRef textframesiterator, ATEBool8* ret); - ATEErr (*Next) ( TextFramesIteratorRef textframesiterator); - ATEErr (*Previous) ( TextFramesIteratorRef textframesiterator); - ATEErr (*Item) ( TextFramesIteratorRef textframesiterator, TextFrameRef* ret); - -}TextFramesIteratorSuite; - -////////////////////////////////////////////// -// --TextLineSuite-- -////////////////////////////////////////////// -#define kTextLineSuite "ATE TextLine Suite" -#define kTextLineSuiteVersion1 1 -#define kTextLineSuiteVersion2 2 -#define kTextLineSuiteVersion kTextLineSuiteVersion2 - -typedef struct TextLineSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextLineRef textline); - void (*Release) ( TextLineRef textline); - ATEBool8 (*IsNull) ( TextLineRef textline); - - // METHODS - // ======================================================================= - ATEErr (*GetGlyphRunsIterator) ( TextLineRef textline, GlyphRunsIteratorRef* ret); - ATEErr (*GetTextFrame) ( TextLineRef textline, TextFrameRef* ret); - ATEErr (*GetTextRange) ( TextLineRef textline, TextRangeRef* ret); - ATEErr (*GetBaselines) ( TextLineRef textline, ArrayLineRef* ret); - ATEErr (*GetVisualGlyphRunsIterator) ( TextLineRef textline, GlyphRunsIteratorRef* ret); -}TextLineSuite; - -typedef struct TextLine1Suite{ - - // Reference count maintenance. - void (*AddRef) ( TextLineRef textline); - void (*Release) ( TextLineRef textline); - ATEBool8 (*IsNull) ( TextLineRef textline); - - // METHODS - // ======================================================================= - ATEErr (*GetGlyphRunsIterator) ( TextLineRef textline, GlyphRunsIteratorRef* ret); - ATEErr (*GetTextFrame) ( TextLineRef textline, TextFrameRef* ret); - ATEErr (*GetTextRange) ( TextLineRef textline, TextRangeRef* ret); - ATEErr (*GetBaselines) ( TextLineRef textline, ArrayLineRef* ret); -}TextLine1Suite; - -////////////////////////////////////////////// -// --TextLinesIteratorSuite-- -////////////////////////////////////////////// -#define kTextLinesIteratorSuite "ATE TextLinesIterator Suite" -#define kTextLinesIteratorSuiteVersion1 1 -#define kTextLinesIteratorSuiteVersion kTextLinesIteratorSuiteVersion1 - -typedef struct TextLinesIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextLinesIteratorRef textlinesiterator); - void (*Release) ( TextLinesIteratorRef textlinesiterator); - ATEBool8 (*IsNull) ( TextLinesIteratorRef textlinesiterator); - - // METHODS - // ======================================================================= - ATEErr (*IsNotDone) ( TextLinesIteratorRef textlinesiterator, ATEBool8* ret); - ATEErr (*IsDone) ( TextLinesIteratorRef textlinesiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( TextLinesIteratorRef textlinesiterator, ATEBool8* ret); - ATEErr (*Next) ( TextLinesIteratorRef textlinesiterator); - ATEErr (*Previous) ( TextLinesIteratorRef textlinesiterator); - ATEErr (*Item) ( TextLinesIteratorRef textlinesiterator, TextLineRef* ret); - -}TextLinesIteratorSuite; - -////////////////////////////////////////////// -// --TextResourcesSuite-- -////////////////////////////////////////////// -#define kTextResourcesSuite "ATE TextResources Suite" -#define kTextResourcesSuiteVersion1 1 -#define kTextResourcesSuiteVersion kTextResourcesSuiteVersion1 - -typedef struct TextResourcesSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextResourcesRef textresources); - void (*Release) ( TextResourcesRef textresources); - ATEBool8 (*IsNull) ( TextResourcesRef textresources); - - ATEErr (*GetTextResources) ( TextResourcesRef textresources, TextResourcesRef* ret); - -}TextResourcesSuite; - -////////////////////////////////////////////// -// --ApplicationTextResourcesSuite-- -////////////////////////////////////////////// -#define kApplicationTextResourcesSuite "ATE ApplicationTextResources Suite" -#define kApplicationTextResourcesSuiteVersion1 1 -#define kApplicationTextResourcesSuiteVersion kApplicationTextResourcesSuiteVersion1 - -typedef struct ApplicationTextResourcesSuite{ - - // Reference count maintenance. - void (*AddRef) ( ApplicationTextResourcesRef applicationtextresources); - void (*Release) ( ApplicationTextResourcesRef applicationtextresources); - ATEBool8 (*IsNull) ( ApplicationTextResourcesRef applicationtextresources); - - // From parent class... - ATEErr (*GetTextResources) ( ApplicationTextResourcesRef applicationtextresources, TextResourcesRef* ret); - // PROPERTIES - // ======================================================================= - ATEErr (*GetKinsokuSet) ( ApplicationTextResourcesRef applicationtextresources, KinsokuSetRef* ret); - ATEErr (*GetMojiKumiSet) ( ApplicationTextResourcesRef applicationtextresources, MojiKumiSetRef* ret); - ATEErr (*GetCompFontClassSet) ( ApplicationTextResourcesRef applicationtextresources, CompFontClassSetRef* ret); - ATEErr (*GetCompFontSet) ( ApplicationTextResourcesRef applicationtextresources, CompFontSetRef* ret); - -}ApplicationTextResourcesSuite; - -////////////////////////////////////////////// -// --DocumentTextResourcesSuite-- -////////////////////////////////////////////// -#define kDocumentTextResourcesSuite "ATE DocumentTextResources Suite" -#define kDocumentTextResourcesSuiteVersion101 101 -#define kDocumentTextResourcesSuiteVersion kDocumentTextResourcesSuiteVersion101 - -typedef struct DocumentTextResourcesSuite{ - - // Reference count maintenance. - void (*AddRef) ( DocumentTextResourcesRef documenttextresources); - void (*Release) ( DocumentTextResourcesRef documenttextresources); - ATEBool8 (*IsNull) ( DocumentTextResourcesRef documenttextresources); - - // From parent class... - ATEErr (*GetKinsokuSet) ( DocumentTextResourcesRef documenttextresources, KinsokuSetRef* ret); - ATEErr (*GetMojiKumiSet) ( DocumentTextResourcesRef documenttextresources, MojiKumiSetRef* ret); - ATEErr (*GetCompFontClassSet) ( DocumentTextResourcesRef documenttextresources, CompFontClassSetRef* ret); - ATEErr (*GetCompFontSet) ( DocumentTextResourcesRef documenttextresources, CompFontSetRef* ret); - ATEErr (*GetTextResources) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef* ret); - ATEErr (*GetFind) ( DocumentTextResourcesRef documenttextresources, FindRef* ret); - ATEErr (*GetSpell) ( DocumentTextResourcesRef documenttextresources, SpellRef* ret); - ATEErr (*GetGlyphAndAlternates) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); - ATEErr (*GetAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); - ATEErr (*InsertAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ATETextDOM::Int32 otFeatureCount, const ATETextDOM::Int32* otFeatureIndexArray, ATEBool8 leaveSelected); - ATEErr (*GetAlternatesAvailableThroughoutSelection) ( DocumentTextResourcesRef documenttextresources, ArrayIntegerRef* ret); - ATEErr (*GetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, ATEBool8* isFeature, JapaneseAlternateFeature* ret); - ATEErr (*SetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, JapaneseAlternateFeature feature); - ATEErr (*GetCharStylesInDocument) ( DocumentTextResourcesRef documenttextresources, CharStylesRef* ret); - ATEErr (*GetParaStylesInDocument) ( DocumentTextResourcesRef documenttextresources, ParaStylesRef* ret); - /// Returns a named style corresponding to pName. If no matching - /// style can be found or *pName == L'\0' then a null object is returned. - ATEErr (*GetCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharStyleRef* ret); - ATEErr (*GetParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaStyleRef* ret); - ATEErr (*GetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); - ATEErr (*GetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources, ParaStyleRef* ret); - ATEErr (*ResetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources); - ATEErr (*ResetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources); - /// Routines to add new named styles to the document. If an existing - /// style already corresponds to pName or *pName == L'\0' then the - /// document is unchanged and a null object is returned. - ATEErr (*CreateCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharStyleRef* ret); - ATEErr (*CreateParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaStyleRef* ret); - ATEErr (*CreateCharStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharFeaturesRef pFeatures, CharStyleRef* ret); - ATEErr (*CreateParaStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaFeaturesRef pFeatures, ParaStyleRef* ret); - /// Removes a style from the document. Exact details will be provided - /// later. - /// - /// If no matching style in the document corresponds to pName or - /// *pName == L'\0' then the document is unchanged and false is returned. - ATEErr (*RemoveCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ATEBool8* ret); - ATEErr (*RemoveParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ATEBool8* ret); - /// Imports named styles from pSrcResources into current resource. - ATEErr (*ImportCharStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); - ATEErr (*ImportParaStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); - ATEErr (*SetUseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8 smartQuotesAreOn); - ATEErr (*SetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); - ATEErr (*SetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); - ATEErr (*UseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); - ATEErr (*GetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); - ATEErr (*GetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); - /// The library stores an internal set of insertion attributes either from - /// the last selection or from the last attribute change to text. This set - /// of insertion attributes comprises the local overrides (CharFeatures) - /// and the named style (CharStyle) - ATEErr (*GetInsertionCharFeatures) ( DocumentTextResourcesRef documenttextresources, CharFeaturesRef* ret); - ATEErr (*GetInsertionCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); - ATEErr (*SetInsertionFeaturesAndStyle) ( DocumentTextResourcesRef documenttextresources, const CharFeaturesRef pFeatures, const ATETextDOM::Unicode* pStyleName); - /// Get superscript size - ATEErr (*GetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); - /// Set superscript size - ATEErr (*SetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); - /// Get superscript position - ATEErr (*GetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); - /// Set superscript position - ATEErr (*SetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); - /// Get subscript size - ATEErr (*GetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); - /// Set subscript size - ATEErr (*SetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); - /// Get subscript position - ATEErr (*GetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); - /// Set subscript position - ATEErr (*SetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); - /// Get SmallCap size - ATEErr (*GetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); - /// Set SmallCap size - ATEErr (*SetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); - /// Get ShowHiddenCharacters - ATEErr (*GetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); - /// Set ShowHiddenCharacters - ATEErr (*SetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); - /// Get Greeking Size - ATEErr (*GetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Int32* ret); - /// Set Greeking Size - ATEErr (*SetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Int32 value); - /// Get HighlightSubstituteFonts - ATEErr (*GetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); - /// Set HighlightSubstituteFonts - ATEErr (*SetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); - /// Get HighlightAlternateGlyphs - ATEErr (*GetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); - /// Set HighlightAlternateGlyphs - ATEErr (*SetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); - -}DocumentTextResourcesSuite; - -////////////////////////////////////////////// -// --VersionInfoSuite-- -////////////////////////////////////////////// -#define kVersionInfoSuite "ATE VersionInfo Suite" -#define kVersionInfoSuiteVersion1 1 -#define kVersionInfoSuiteVersion kVersionInfoSuiteVersion1 - -typedef struct VersionInfoSuite{ - - // Reference count maintenance. - void (*AddRef) ( VersionInfoRef versioninfo); - void (*Release) ( VersionInfoRef versioninfo); - ATEBool8 (*IsNull) ( VersionInfoRef versioninfo); - - ATEErr (*Initialize) ( VersionInfoRef* versioninfo); - /// Return major version. - ATEErr (*GetMajorVersion) ( VersionInfoRef versioninfo, int* ret); - /// Return minor version. - ATEErr (*GetMinorVersion) ( VersionInfoRef versioninfo, int* ret); - /// Return sub minor version. - ATEErr (*GetSubMinorVersion) ( VersionInfoRef versioninfo, int* ret); - /// maxLength is the size of versionString in ASUTF16 units. - /// return is number of characters in versionString. - /// Here is usage:- - /// ASUTF16 versionString[256]; - /// GetVersionAsUTF16(versionString , 256); - ATEErr (*GetVersionAsUTF16) ( VersionInfoRef versioninfo, ASUTF16* versionString, int maxLength, int* ret); - -}VersionInfoSuite; - -////////////////////////////////////////////// -// --ArrayApplicationPaintRefSuite-- -////////////////////////////////////////////// -#define kArrayApplicationPaintRefSuite "ATE ArrayApplicationPaintRef Suite" -#define kArrayApplicationPaintRefSuiteVersion1 1 -#define kArrayApplicationPaintRefSuiteVersion kArrayApplicationPaintRefSuiteVersion1 - -typedef struct ArrayApplicationPaintRefSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayApplicationPaintRefRef arrayapplicationpaintref); - void (*Release) ( ArrayApplicationPaintRefRef arrayapplicationpaintref); - ATEBool8 (*IsNull) ( ArrayApplicationPaintRefRef arrayapplicationpaintref); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayApplicationPaintRefRef arrayapplicationpaintref, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayApplicationPaintRefRef arrayapplicationpaintref, ApplicationPaintRef* ret); - ATEErr (*GetLast) ( ArrayApplicationPaintRefRef arrayapplicationpaintref, ApplicationPaintRef* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayApplicationPaintRefRef arrayapplicationpaintref, ATETextDOM::Int32 index, ApplicationPaintRef* ret); - -}ArrayApplicationPaintRefSuite; - -////////////////////////////////////////////// -// --ArrayRealSuite-- -////////////////////////////////////////////// -#define kArrayRealSuite "ATE ArrayReal Suite" -#define kArrayRealSuiteVersion1 1 -#define kArrayRealSuiteVersion kArrayRealSuiteVersion1 - -typedef struct ArrayRealSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayRealRef arrayreal); - void (*Release) ( ArrayRealRef arrayreal); - ATEBool8 (*IsNull) ( ArrayRealRef arrayreal); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayRealRef arrayreal, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayRealRef arrayreal, ATETextDOM::Float* ret); - ATEErr (*GetLast) ( ArrayRealRef arrayreal, ATETextDOM::Float* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayRealRef arrayreal, ATETextDOM::Int32 index, ATETextDOM::Float* ret); - -}ArrayRealSuite; - -////////////////////////////////////////////// -// --ArrayBoolSuite-- -////////////////////////////////////////////// -#define kArrayBoolSuite "ATE ArrayBool Suite" -#define kArrayBoolSuiteVersion1 1 -#define kArrayBoolSuiteVersion kArrayBoolSuiteVersion1 - -typedef struct ArrayBoolSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayBoolRef arraybool); - void (*Release) ( ArrayBoolRef arraybool); - ATEBool8 (*IsNull) ( ArrayBoolRef arraybool); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayBoolRef arraybool, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayBoolRef arraybool, ATEBool8* ret); - ATEErr (*GetLast) ( ArrayBoolRef arraybool, ATEBool8* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayBoolRef arraybool, ATETextDOM::Int32 index, ATEBool8* ret); - -}ArrayBoolSuite; - -////////////////////////////////////////////// -// --ArrayIntegerSuite-- -////////////////////////////////////////////// -#define kArrayIntegerSuite "ATE ArrayInteger Suite" -#define kArrayIntegerSuiteVersion1 1 -#define kArrayIntegerSuiteVersion kArrayIntegerSuiteVersion1 - -typedef struct ArrayIntegerSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayIntegerRef arrayinteger); - void (*Release) ( ArrayIntegerRef arrayinteger); - ATEBool8 (*IsNull) ( ArrayIntegerRef arrayinteger); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayIntegerRef arrayinteger, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayIntegerRef arrayinteger, ATETextDOM::Int32* ret); - ATEErr (*GetLast) ( ArrayIntegerRef arrayinteger, ATETextDOM::Int32* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayIntegerRef arrayinteger, ATETextDOM::Int32 index, ATETextDOM::Int32* ret); - -}ArrayIntegerSuite; - -////////////////////////////////////////////// -// --ArrayLineCapTypeSuite-- -////////////////////////////////////////////// -#define kArrayLineCapTypeSuite "ATE ArrayLineCapType Suite" -#define kArrayLineCapTypeSuiteVersion1 1 -#define kArrayLineCapTypeSuiteVersion kArrayLineCapTypeSuiteVersion1 - -typedef struct ArrayLineCapTypeSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayLineCapTypeRef arraylinecaptype); - void (*Release) ( ArrayLineCapTypeRef arraylinecaptype); - ATEBool8 (*IsNull) ( ArrayLineCapTypeRef arraylinecaptype); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayLineCapTypeRef arraylinecaptype, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayLineCapTypeRef arraylinecaptype, LineCapType* ret); - ATEErr (*GetLast) ( ArrayLineCapTypeRef arraylinecaptype, LineCapType* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayLineCapTypeRef arraylinecaptype, ATETextDOM::Int32 index, LineCapType* ret); - -}ArrayLineCapTypeSuite; - -////////////////////////////////////////////// -// --ArrayFigureStyleSuite-- -////////////////////////////////////////////// -#define kArrayFigureStyleSuite "ATE ArrayFigureStyle Suite" -#define kArrayFigureStyleSuiteVersion1 1 -#define kArrayFigureStyleSuiteVersion kArrayFigureStyleSuiteVersion1 - -typedef struct ArrayFigureStyleSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayFigureStyleRef arrayfigurestyle); - void (*Release) ( ArrayFigureStyleRef arrayfigurestyle); - ATEBool8 (*IsNull) ( ArrayFigureStyleRef arrayfigurestyle); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayFigureStyleRef arrayfigurestyle, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayFigureStyleRef arrayfigurestyle, FigureStyle* ret); - ATEErr (*GetLast) ( ArrayFigureStyleRef arrayfigurestyle, FigureStyle* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayFigureStyleRef arrayfigurestyle, ATETextDOM::Int32 index, FigureStyle* ret); - -}ArrayFigureStyleSuite; - -////////////////////////////////////////////// -// --ArrayLineJoinTypeSuite-- -////////////////////////////////////////////// -#define kArrayLineJoinTypeSuite "ATE ArrayLineJoinType Suite" -#define kArrayLineJoinTypeSuiteVersion1 1 -#define kArrayLineJoinTypeSuiteVersion kArrayLineJoinTypeSuiteVersion1 - -typedef struct ArrayLineJoinTypeSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayLineJoinTypeRef arraylinejointype); - void (*Release) ( ArrayLineJoinTypeRef arraylinejointype); - ATEBool8 (*IsNull) ( ArrayLineJoinTypeRef arraylinejointype); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayLineJoinTypeRef arraylinejointype, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayLineJoinTypeRef arraylinejointype, LineJoinType* ret); - ATEErr (*GetLast) ( ArrayLineJoinTypeRef arraylinejointype, LineJoinType* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayLineJoinTypeRef arraylinejointype, ATETextDOM::Int32 index, LineJoinType* ret); - -}ArrayLineJoinTypeSuite; - -////////////////////////////////////////////// -// --ArrayWariChuJustificationSuite-- -////////////////////////////////////////////// -#define kArrayWariChuJustificationSuite "ATE ArrayWariChuJustification Suite" -#define kArrayWariChuJustificationSuiteVersion1 1 -#define kArrayWariChuJustificationSuiteVersion kArrayWariChuJustificationSuiteVersion1 - -typedef struct ArrayWariChuJustificationSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayWariChuJustificationRef arraywarichujustification); - void (*Release) ( ArrayWariChuJustificationRef arraywarichujustification); - ATEBool8 (*IsNull) ( ArrayWariChuJustificationRef arraywarichujustification); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayWariChuJustificationRef arraywarichujustification, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayWariChuJustificationRef arraywarichujustification, WariChuJustification* ret); - ATEErr (*GetLast) ( ArrayWariChuJustificationRef arraywarichujustification, WariChuJustification* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayWariChuJustificationRef arraywarichujustification, ATETextDOM::Int32 index, WariChuJustification* ret); - -}ArrayWariChuJustificationSuite; - -////////////////////////////////////////////// -// --ArrayStyleRunAlignmentSuite-- -////////////////////////////////////////////// -#define kArrayStyleRunAlignmentSuite "ATE ArrayStyleRunAlignment Suite" -#define kArrayStyleRunAlignmentSuiteVersion1 1 -#define kArrayStyleRunAlignmentSuiteVersion kArrayStyleRunAlignmentSuiteVersion1 - -typedef struct ArrayStyleRunAlignmentSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayStyleRunAlignmentRef arraystylerunalignment); - void (*Release) ( ArrayStyleRunAlignmentRef arraystylerunalignment); - ATEBool8 (*IsNull) ( ArrayStyleRunAlignmentRef arraystylerunalignment); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayStyleRunAlignmentRef arraystylerunalignment, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayStyleRunAlignmentRef arraystylerunalignment, StyleRunAlignment* ret); - ATEErr (*GetLast) ( ArrayStyleRunAlignmentRef arraystylerunalignment, StyleRunAlignment* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayStyleRunAlignmentRef arraystylerunalignment, ATETextDOM::Int32 index, StyleRunAlignment* ret); - -}ArrayStyleRunAlignmentSuite; - -////////////////////////////////////////////// -// --ArrayAutoKernTypeSuite-- -////////////////////////////////////////////// -#define kArrayAutoKernTypeSuite "ATE ArrayAutoKernType Suite" -#define kArrayAutoKernTypeSuiteVersion1 1 -#define kArrayAutoKernTypeSuiteVersion kArrayAutoKernTypeSuiteVersion1 - -typedef struct ArrayAutoKernTypeSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayAutoKernTypeRef arrayautokerntype); - void (*Release) ( ArrayAutoKernTypeRef arrayautokerntype); - ATEBool8 (*IsNull) ( ArrayAutoKernTypeRef arrayautokerntype); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayAutoKernTypeRef arrayautokerntype, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayAutoKernTypeRef arrayautokerntype, AutoKernType* ret); - ATEErr (*GetLast) ( ArrayAutoKernTypeRef arrayautokerntype, AutoKernType* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayAutoKernTypeRef arrayautokerntype, ATETextDOM::Int32 index, AutoKernType* ret); - -}ArrayAutoKernTypeSuite; - -////////////////////////////////////////////// -// --ArrayBaselineDirectionSuite-- -////////////////////////////////////////////// -#define kArrayBaselineDirectionSuite "ATE ArrayBaselineDirection Suite" -#define kArrayBaselineDirectionSuiteVersion1 1 -#define kArrayBaselineDirectionSuiteVersion kArrayBaselineDirectionSuiteVersion1 - -typedef struct ArrayBaselineDirectionSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayBaselineDirectionRef arraybaselinedirection); - void (*Release) ( ArrayBaselineDirectionRef arraybaselinedirection); - ATEBool8 (*IsNull) ( ArrayBaselineDirectionRef arraybaselinedirection); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayBaselineDirectionRef arraybaselinedirection, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayBaselineDirectionRef arraybaselinedirection, BaselineDirection* ret); - ATEErr (*GetLast) ( ArrayBaselineDirectionRef arraybaselinedirection, BaselineDirection* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayBaselineDirectionRef arraybaselinedirection, ATETextDOM::Int32 index, BaselineDirection* ret); - -}ArrayBaselineDirectionSuite; - -////////////////////////////////////////////// -// --ArrayLanguageSuite-- -////////////////////////////////////////////// -#define kArrayLanguageSuite "ATE ArrayLanguage Suite" -#define kArrayLanguageSuiteVersion1 1 -#define kArrayLanguageSuiteVersion kArrayLanguageSuiteVersion1 - -typedef struct ArrayLanguageSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayLanguageRef arraylanguage); - void (*Release) ( ArrayLanguageRef arraylanguage); - ATEBool8 (*IsNull) ( ArrayLanguageRef arraylanguage); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayLanguageRef arraylanguage, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayLanguageRef arraylanguage, Language* ret); - ATEErr (*GetLast) ( ArrayLanguageRef arraylanguage, Language* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayLanguageRef arraylanguage, ATETextDOM::Int32 index, Language* ret); - -}ArrayLanguageSuite; - -////////////////////////////////////////////// -// --ArrayFontCapsOptionSuite-- -////////////////////////////////////////////// -#define kArrayFontCapsOptionSuite "ATE ArrayFontCapsOption Suite" -#define kArrayFontCapsOptionSuiteVersion1 1 -#define kArrayFontCapsOptionSuiteVersion kArrayFontCapsOptionSuiteVersion1 - -typedef struct ArrayFontCapsOptionSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayFontCapsOptionRef arrayfontcapsoption); - void (*Release) ( ArrayFontCapsOptionRef arrayfontcapsoption); - ATEBool8 (*IsNull) ( ArrayFontCapsOptionRef arrayfontcapsoption); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayFontCapsOptionRef arrayfontcapsoption, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayFontCapsOptionRef arrayfontcapsoption, FontCapsOption* ret); - ATEErr (*GetLast) ( ArrayFontCapsOptionRef arrayfontcapsoption, FontCapsOption* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayFontCapsOptionRef arrayfontcapsoption, ATETextDOM::Int32 index, FontCapsOption* ret); - -}ArrayFontCapsOptionSuite; - -////////////////////////////////////////////// -// --ArrayFontBaselineOptionSuite-- -////////////////////////////////////////////// -#define kArrayFontBaselineOptionSuite "ATE ArrayFontBaselineOption Suite" -#define kArrayFontBaselineOptionSuiteVersion1 1 -#define kArrayFontBaselineOptionSuiteVersion kArrayFontBaselineOptionSuiteVersion1 - -typedef struct ArrayFontBaselineOptionSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayFontBaselineOptionRef arrayfontbaselineoption); - void (*Release) ( ArrayFontBaselineOptionRef arrayfontbaselineoption); - ATEBool8 (*IsNull) ( ArrayFontBaselineOptionRef arrayfontbaselineoption); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayFontBaselineOptionRef arrayfontbaselineoption, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayFontBaselineOptionRef arrayfontbaselineoption, FontBaselineOption* ret); - ATEErr (*GetLast) ( ArrayFontBaselineOptionRef arrayfontbaselineoption, FontBaselineOption* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayFontBaselineOptionRef arrayfontbaselineoption, ATETextDOM::Int32 index, FontBaselineOption* ret); - -}ArrayFontBaselineOptionSuite; - -////////////////////////////////////////////// -// --ArrayFontOpenTypePositionOptionSuite-- -////////////////////////////////////////////// -#define kArrayFontOpenTypePositionOptionSuite "ATE ArrayFontOpenTypePositionOption Suite" -#define kArrayFontOpenTypePositionOptionSuiteVersion1 1 -#define kArrayFontOpenTypePositionOptionSuiteVersion kArrayFontOpenTypePositionOptionSuiteVersion1 - -typedef struct ArrayFontOpenTypePositionOptionSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption); - void (*Release) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption); - ATEBool8 (*IsNull) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption, FontOpenTypePositionOption* ret); - ATEErr (*GetLast) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption, FontOpenTypePositionOption* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption, ATETextDOM::Int32 index, FontOpenTypePositionOption* ret); - -}ArrayFontOpenTypePositionOptionSuite; - -////////////////////////////////////////////// -// --ArrayUnderlinePositionSuite-- -////////////////////////////////////////////// -#define kArrayUnderlinePositionSuite "ATE ArrayUnderlinePosition Suite" -#define kArrayUnderlinePositionSuiteVersion1 1 -#define kArrayUnderlinePositionSuiteVersion kArrayUnderlinePositionSuiteVersion1 - -typedef struct ArrayUnderlinePositionSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayUnderlinePositionRef arrayunderlineposition); - void (*Release) ( ArrayUnderlinePositionRef arrayunderlineposition); - ATEBool8 (*IsNull) ( ArrayUnderlinePositionRef arrayunderlineposition); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayUnderlinePositionRef arrayunderlineposition, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayUnderlinePositionRef arrayunderlineposition, UnderlinePosition* ret); - ATEErr (*GetLast) ( ArrayUnderlinePositionRef arrayunderlineposition, UnderlinePosition* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayUnderlinePositionRef arrayunderlineposition, ATETextDOM::Int32 index, UnderlinePosition* ret); - -}ArrayUnderlinePositionSuite; - -////////////////////////////////////////////// -// --ArrayStrikethroughPositionSuite-- -////////////////////////////////////////////// -#define kArrayStrikethroughPositionSuite "ATE ArrayStrikethroughPosition Suite" -#define kArrayStrikethroughPositionSuiteVersion1 1 -#define kArrayStrikethroughPositionSuiteVersion kArrayStrikethroughPositionSuiteVersion1 - -typedef struct ArrayStrikethroughPositionSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayStrikethroughPositionRef arraystrikethroughposition); - void (*Release) ( ArrayStrikethroughPositionRef arraystrikethroughposition); - ATEBool8 (*IsNull) ( ArrayStrikethroughPositionRef arraystrikethroughposition); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayStrikethroughPositionRef arraystrikethroughposition, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayStrikethroughPositionRef arraystrikethroughposition, StrikethroughPosition* ret); - ATEErr (*GetLast) ( ArrayStrikethroughPositionRef arraystrikethroughposition, StrikethroughPosition* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayStrikethroughPositionRef arraystrikethroughposition, ATETextDOM::Int32 index, StrikethroughPosition* ret); - -}ArrayStrikethroughPositionSuite; - -////////////////////////////////////////////// -// --ArrayParagraphJustificationSuite-- -////////////////////////////////////////////// -#define kArrayParagraphJustificationSuite "ATE ArrayParagraphJustification Suite" -#define kArrayParagraphJustificationSuiteVersion1 1 -#define kArrayParagraphJustificationSuiteVersion kArrayParagraphJustificationSuiteVersion1 - -typedef struct ArrayParagraphJustificationSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayParagraphJustificationRef arrayparagraphjustification); - void (*Release) ( ArrayParagraphJustificationRef arrayparagraphjustification); - ATEBool8 (*IsNull) ( ArrayParagraphJustificationRef arrayparagraphjustification); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayParagraphJustificationRef arrayparagraphjustification, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayParagraphJustificationRef arrayparagraphjustification, ParagraphJustification* ret); - ATEErr (*GetLast) ( ArrayParagraphJustificationRef arrayparagraphjustification, ParagraphJustification* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayParagraphJustificationRef arrayparagraphjustification, ATETextDOM::Int32 index, ParagraphJustification* ret); - -}ArrayParagraphJustificationSuite; - -////////////////////////////////////////////// -// --ArrayArrayRealSuite-- -////////////////////////////////////////////// -#define kArrayArrayRealSuite "ATE ArrayArrayReal Suite" -#define kArrayArrayRealSuiteVersion1 1 -#define kArrayArrayRealSuiteVersion kArrayArrayRealSuiteVersion1 - -typedef struct ArrayArrayRealSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayArrayRealRef arrayarrayreal); - void (*Release) ( ArrayArrayRealRef arrayarrayreal); - ATEBool8 (*IsNull) ( ArrayArrayRealRef arrayarrayreal); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayArrayRealRef arrayarrayreal, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayArrayRealRef arrayarrayreal, ArrayRealRef* ret); - ATEErr (*GetLast) ( ArrayArrayRealRef arrayarrayreal, ArrayRealRef* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayArrayRealRef arrayarrayreal, ATETextDOM::Int32 index, ArrayRealRef* ret); - -}ArrayArrayRealSuite; - -////////////////////////////////////////////// -// --ArrayBurasagariTypeSuite-- -////////////////////////////////////////////// -#define kArrayBurasagariTypeSuite "ATE ArrayBurasagariType Suite" -#define kArrayBurasagariTypeSuiteVersion1 1 -#define kArrayBurasagariTypeSuiteVersion kArrayBurasagariTypeSuiteVersion1 - -typedef struct ArrayBurasagariTypeSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayBurasagariTypeRef arrayburasagaritype); - void (*Release) ( ArrayBurasagariTypeRef arrayburasagaritype); - ATEBool8 (*IsNull) ( ArrayBurasagariTypeRef arrayburasagaritype); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayBurasagariTypeRef arrayburasagaritype, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayBurasagariTypeRef arrayburasagaritype, BurasagariType* ret); - ATEErr (*GetLast) ( ArrayBurasagariTypeRef arrayburasagaritype, BurasagariType* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayBurasagariTypeRef arrayburasagaritype, ATETextDOM::Int32 index, BurasagariType* ret); - -}ArrayBurasagariTypeSuite; - -////////////////////////////////////////////// -// --ArrayPreferredKinsokuOrderSuite-- -////////////////////////////////////////////// -#define kArrayPreferredKinsokuOrderSuite "ATE ArrayPreferredKinsokuOrder Suite" -#define kArrayPreferredKinsokuOrderSuiteVersion1 1 -#define kArrayPreferredKinsokuOrderSuiteVersion kArrayPreferredKinsokuOrderSuiteVersion1 - -typedef struct ArrayPreferredKinsokuOrderSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder); - void (*Release) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder); - ATEBool8 (*IsNull) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder, PreferredKinsokuOrder* ret); - ATEErr (*GetLast) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder, PreferredKinsokuOrder* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder, ATETextDOM::Int32 index, PreferredKinsokuOrder* ret); - -}ArrayPreferredKinsokuOrderSuite; - -////////////////////////////////////////////// -// --ArrayKinsokuRefSuite-- -////////////////////////////////////////////// -#define kArrayKinsokuRefSuite "ATE ArrayKinsokuRef Suite" -#define kArrayKinsokuRefSuiteVersion1 1 -#define kArrayKinsokuRefSuiteVersion kArrayKinsokuRefSuiteVersion1 - -typedef struct ArrayKinsokuRefSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayKinsokuRefRef arraykinsokuref); - void (*Release) ( ArrayKinsokuRefRef arraykinsokuref); - ATEBool8 (*IsNull) ( ArrayKinsokuRefRef arraykinsokuref); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayKinsokuRefRef arraykinsokuref, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayKinsokuRefRef arraykinsokuref, KinsokuRef* ret); - ATEErr (*GetLast) ( ArrayKinsokuRefRef arraykinsokuref, KinsokuRef* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayKinsokuRefRef arraykinsokuref, ATETextDOM::Int32 index, KinsokuRef* ret); - -}ArrayKinsokuRefSuite; - -////////////////////////////////////////////// -// --ArrayMojiKumiRefSuite-- -////////////////////////////////////////////// -#define kArrayMojiKumiRefSuite "ATE ArrayMojiKumiRef Suite" -#define kArrayMojiKumiRefSuiteVersion1 1 -#define kArrayMojiKumiRefSuiteVersion kArrayMojiKumiRefSuiteVersion1 - -typedef struct ArrayMojiKumiRefSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayMojiKumiRefRef arraymojikumiref); - void (*Release) ( ArrayMojiKumiRefRef arraymojikumiref); - ATEBool8 (*IsNull) ( ArrayMojiKumiRefRef arraymojikumiref); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayMojiKumiRefRef arraymojikumiref, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayMojiKumiRefRef arraymojikumiref, MojiKumiRef* ret); - ATEErr (*GetLast) ( ArrayMojiKumiRefRef arraymojikumiref, MojiKumiRef* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayMojiKumiRefRef arraymojikumiref, ATETextDOM::Int32 index, MojiKumiRef* ret); - -}ArrayMojiKumiRefSuite; - -////////////////////////////////////////////// -// --ArrayMojiKumiSetRefSuite-- -////////////////////////////////////////////// -#define kArrayMojiKumiSetRefSuite "ATE ArrayMojiKumiSetRef Suite" -#define kArrayMojiKumiSetRefSuiteVersion1 1 -#define kArrayMojiKumiSetRefSuiteVersion kArrayMojiKumiSetRefSuiteVersion1 - -typedef struct ArrayMojiKumiSetRefSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayMojiKumiSetRefRef arraymojikumisetref); - void (*Release) ( ArrayMojiKumiSetRefRef arraymojikumisetref); - ATEBool8 (*IsNull) ( ArrayMojiKumiSetRefRef arraymojikumisetref); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayMojiKumiSetRefRef arraymojikumisetref, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayMojiKumiSetRefRef arraymojikumisetref, MojiKumiSetRef* ret); - ATEErr (*GetLast) ( ArrayMojiKumiSetRefRef arraymojikumisetref, MojiKumiSetRef* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayMojiKumiSetRefRef arraymojikumisetref, ATETextDOM::Int32 index, MojiKumiSetRef* ret); - -}ArrayMojiKumiSetRefSuite; - -////////////////////////////////////////////// -// --ArrayTabStopsRefSuite-- -////////////////////////////////////////////// -#define kArrayTabStopsRefSuite "ATE ArrayTabStopsRef Suite" -#define kArrayTabStopsRefSuiteVersion1 1 -#define kArrayTabStopsRefSuiteVersion kArrayTabStopsRefSuiteVersion1 - -typedef struct ArrayTabStopsRefSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayTabStopsRefRef arraytabstopsref); - void (*Release) ( ArrayTabStopsRefRef arraytabstopsref); - ATEBool8 (*IsNull) ( ArrayTabStopsRefRef arraytabstopsref); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayTabStopsRefRef arraytabstopsref, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayTabStopsRefRef arraytabstopsref, TabStopsRef* ret); - ATEErr (*GetLast) ( ArrayTabStopsRefRef arraytabstopsref, TabStopsRef* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayTabStopsRefRef arraytabstopsref, ATETextDOM::Int32 index, TabStopsRef* ret); - -}ArrayTabStopsRefSuite; - -////////////////////////////////////////////// -// --ArrayLeadingTypeSuite-- -////////////////////////////////////////////// -#define kArrayLeadingTypeSuite "ATE ArrayLeadingType Suite" -#define kArrayLeadingTypeSuiteVersion1 1 -#define kArrayLeadingTypeSuiteVersion kArrayLeadingTypeSuiteVersion1 - -typedef struct ArrayLeadingTypeSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayLeadingTypeRef arrayleadingtype); - void (*Release) ( ArrayLeadingTypeRef arrayleadingtype); - ATEBool8 (*IsNull) ( ArrayLeadingTypeRef arrayleadingtype); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayLeadingTypeRef arrayleadingtype, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayLeadingTypeRef arrayleadingtype, LeadingType* ret); - ATEErr (*GetLast) ( ArrayLeadingTypeRef arrayleadingtype, LeadingType* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayLeadingTypeRef arrayleadingtype, ATETextDOM::Int32 index, LeadingType* ret); - -}ArrayLeadingTypeSuite; - -////////////////////////////////////////////// -// --ArrayFontRefSuite-- -////////////////////////////////////////////// -#define kArrayFontRefSuite "ATE ArrayFontRef Suite" -#define kArrayFontRefSuiteVersion1 1 -#define kArrayFontRefSuiteVersion kArrayFontRefSuiteVersion1 - -typedef struct ArrayFontRefSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayFontRefRef arrayfontref); - void (*Release) ( ArrayFontRefRef arrayfontref); - ATEBool8 (*IsNull) ( ArrayFontRefRef arrayfontref); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayFontRefRef arrayfontref, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayFontRefRef arrayfontref, FontRef* ret); - ATEErr (*GetLast) ( ArrayFontRefRef arrayfontref, FontRef* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayFontRefRef arrayfontref, ATETextDOM::Int32 index, FontRef* ret); - -}ArrayFontRefSuite; - -////////////////////////////////////////////// -// --ArrayGlyphIDSuite-- -////////////////////////////////////////////// -#define kArrayGlyphIDSuite "ATE ArrayGlyphID Suite" -#define kArrayGlyphIDSuiteVersion1 1 -#define kArrayGlyphIDSuiteVersion kArrayGlyphIDSuiteVersion1 - -typedef struct ArrayGlyphIDSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayGlyphIDRef arrayglyphid); - void (*Release) ( ArrayGlyphIDRef arrayglyphid); - ATEBool8 (*IsNull) ( ArrayGlyphIDRef arrayglyphid); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayGlyphIDRef arrayglyphid, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayGlyphIDRef arrayglyphid, ATEGlyphID* ret); - ATEErr (*GetLast) ( ArrayGlyphIDRef arrayglyphid, ATEGlyphID* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayGlyphIDRef arrayglyphid, ATETextDOM::Int32 index, ATEGlyphID* ret); - -}ArrayGlyphIDSuite; - -////////////////////////////////////////////// -// --ArrayRealPointSuite-- -////////////////////////////////////////////// -#define kArrayRealPointSuite "ATE ArrayRealPoint Suite" -#define kArrayRealPointSuiteVersion1 1 -#define kArrayRealPointSuiteVersion kArrayRealPointSuiteVersion1 - -typedef struct ArrayRealPointSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayRealPointRef arrayrealpoint); - void (*Release) ( ArrayRealPointRef arrayrealpoint); - ATEBool8 (*IsNull) ( ArrayRealPointRef arrayrealpoint); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayRealPointRef arrayrealpoint, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayRealPointRef arrayrealpoint, ATETextDOM::FloatPoint* ret); - ATEErr (*GetLast) ( ArrayRealPointRef arrayrealpoint, ATETextDOM::FloatPoint* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayRealPointRef arrayrealpoint, ATETextDOM::Int32 index, ATETextDOM::FloatPoint* ret); - -}ArrayRealPointSuite; - -////////////////////////////////////////////// -// --ArrayRealMatrixSuite-- -////////////////////////////////////////////// -#define kArrayRealMatrixSuite "ATE ArrayRealMatrix Suite" -#define kArrayRealMatrixSuiteVersion1 1 -#define kArrayRealMatrixSuiteVersion kArrayRealMatrixSuiteVersion1 - -typedef struct ArrayRealMatrixSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayRealMatrixRef arrayrealmatrix); - void (*Release) ( ArrayRealMatrixRef arrayrealmatrix); - ATEBool8 (*IsNull) ( ArrayRealMatrixRef arrayrealmatrix); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayRealMatrixRef arrayrealmatrix, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayRealMatrixRef arrayrealmatrix, ATETextDOM::FloatMatrix* ret); - ATEErr (*GetLast) ( ArrayRealMatrixRef arrayrealmatrix, ATETextDOM::FloatMatrix* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayRealMatrixRef arrayrealmatrix, ATETextDOM::Int32 index, ATETextDOM::FloatMatrix* ret); - -}ArrayRealMatrixSuite; - -#if SLO_COMPLEXSCRIPT -////////////////////////////////////////////// -// --ArrayParagraphDirectionSuite-- -////////////////////////////////////////////// -#define kArrayParagraphDirectionSuite "ATE ArrayParagraphDirection Suite" -#define kArrayParagraphDirectionSuiteVersion1 1 -#define kArrayParagraphDirectionSuiteVersion kArrayParagraphDirectionSuiteVersion1 - -typedef struct ArrayParagraphDirectionSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayParagraphDirectionRef arrayparagraphdirection); - void (*Release) ( ArrayParagraphDirectionRef arrayparagraphdirection); - ATEBool8 (*IsNull) ( ArrayParagraphDirectionRef arrayparagraphdirection); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayParagraphDirectionRef arrayparagraphdirection, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayParagraphDirectionRef arrayparagraphdirection, ParagraphDirection* ret); - ATEErr (*GetLast) ( ArrayParagraphDirectionRef arrayparagraphdirection, ParagraphDirection* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayParagraphDirectionRef arrayparagraphdirection, ATETextDOM::Int32 index, ParagraphDirection* ret); - -}ArrayParagraphDirectionSuite; - -////////////////////////////////////////////// -// --ArrayJustificationMethodSuite-- -////////////////////////////////////////////// -#define kArrayJustificationMethodSuite "ATE ArrayJustificationMethod Suite" -#define kArrayJustificationMethodSuiteVersion1 1 -#define kArrayJustificationMethodSuiteVersion kArrayJustificationMethodSuiteVersion1 - -typedef struct ArrayJustificationMethodSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayJustificationMethodRef arrayjustificationmethod); - void (*Release) ( ArrayJustificationMethodRef arrayjustificationmethod); - ATEBool8 (*IsNull) ( ArrayJustificationMethodRef arrayjustificationmethod); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayJustificationMethodRef arrayjustificationmethod, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayJustificationMethodRef arrayjustificationmethod, JustificationMethod* ret); - ATEErr (*GetLast) ( ArrayJustificationMethodRef arrayjustificationmethod, JustificationMethod* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayJustificationMethodRef arrayjustificationmethod, ATETextDOM::Int32 index, JustificationMethod* ret); - -}ArrayJustificationMethodSuite; - -////////////////////////////////////////////// -// --ArrayKashidaWidthSuite-- -////////////////////////////////////////////// -#define kArrayKashidaWidthSuite "ATE ArrayKashidaWidth Suite" -#define kArrayKashidaWidthSuiteVersion1 1 -#define kArrayKashidaWidthSuiteVersion kArrayKashidaWidthSuiteVersion1 - -typedef struct ArrayKashidaWidthSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayKashidaWidthRef arraykashidawidth); - void (*Release) ( ArrayKashidaWidthRef arraykashidawidth); - ATEBool8 (*IsNull) ( ArrayKashidaWidthRef arraykashidawidth); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayKashidaWidthRef arraykashidawidth, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayKashidaWidthRef arraykashidawidth, KashidaWidth* ret); - ATEErr (*GetLast) ( ArrayKashidaWidthRef arraykashidawidth, KashidaWidth* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayKashidaWidthRef arraykashidawidth, ATETextDOM::Int32 index, KashidaWidth* ret); - -}ArrayKashidaWidthSuite; - -////////////////////////////////////////////// -// --ArrayKashidasSuite-- -////////////////////////////////////////////// -#define kArrayKashidasSuite "ATE ArrayKashidas Suite" -#define kArrayKashidasSuiteVersion1 1 -#define kArrayKashidasSuiteVersion kArrayKashidasSuiteVersion1 - -typedef struct ArrayKashidasSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayKashidasRef arraykashidas); - void (*Release) ( ArrayKashidasRef arraykashidas); - ATEBool8 (*IsNull) ( ArrayKashidasRef arraykashidas); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayKashidasRef arraykashidas, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayKashidasRef arraykashidas, Kashidas* ret); - ATEErr (*GetLast) ( ArrayKashidasRef arraykashidas, Kashidas* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayKashidasRef arraykashidas, ATETextDOM::Int32 index, Kashidas* ret); - -}ArrayKashidasSuite; - -////////////////////////////////////////////// -// --ArrayDirOverrideSuite-- -////////////////////////////////////////////// -#define kArrayDirOverrideSuite "ATE ArrayDirOverride Suite" -#define kArrayDirOverrideSuiteVersion1 1 -#define kArrayDirOverrideSuiteVersion kArrayDirOverrideSuiteVersion1 - -typedef struct ArrayDirOverrideSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayDirOverrideRef arraydiroverride); - void (*Release) ( ArrayDirOverrideRef arraydiroverride); - ATEBool8 (*IsNull) ( ArrayDirOverrideRef arraydiroverride); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayDirOverrideRef arraydiroverride, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayDirOverrideRef arraydiroverride, DirOverride* ret); - ATEErr (*GetLast) ( ArrayDirOverrideRef arraydiroverride, DirOverride* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayDirOverrideRef arraydiroverride, ATETextDOM::Int32 index, DirOverride* ret); - -}ArrayDirOverrideSuite; - -////////////////////////////////////////////// -// --ArrayDigitSetSuite-- -////////////////////////////////////////////// -#define kArrayDigitSetSuite "ATE ArrayDigitSet Suite" -#define kArrayDigitSetSuiteVersion1 1 -#define kArrayDigitSetSuiteVersion kArrayDigitSetSuiteVersion1 - -typedef struct ArrayDigitSetSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayDigitSetRef arraydigitset); - void (*Release) ( ArrayDigitSetRef arraydigitset); - ATEBool8 (*IsNull) ( ArrayDigitSetRef arraydigitset); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayDigitSetRef arraydigitset, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayDigitSetRef arraydigitset, DigitSet* ret); - ATEErr (*GetLast) ( ArrayDigitSetRef arraydigitset, DigitSet* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayDigitSetRef arraydigitset, ATETextDOM::Int32 index, DigitSet* ret); - -}ArrayDigitSetSuite; - -////////////////////////////////////////////// -// --ArrayDiacVPosSuite-- -////////////////////////////////////////////// -#define kArrayDiacVPosSuite "ATE ArrayDiacVPos Suite" -#define kArrayDiacVPosSuiteVersion1 1 -#define kArrayDiacVPosSuiteVersion kArrayDiacVPosSuiteVersion1 - -typedef struct ArrayDiacVPosSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayDiacVPosRef arraydiacvpos); - void (*Release) ( ArrayDiacVPosRef arraydiacvpos); - ATEBool8 (*IsNull) ( ArrayDiacVPosRef arraydiacvpos); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayDiacVPosRef arraydiacvpos, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayDiacVPosRef arraydiacvpos, DiacVPos* ret); - ATEErr (*GetLast) ( ArrayDiacVPosRef arraydiacvpos, DiacVPos* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayDiacVPosRef arraydiacvpos, ATETextDOM::Int32 index, DiacVPos* ret); - -}ArrayDiacVPosSuite; -#endif - -////////////////////////////////////////////// -// --CharFeaturesSuite-- -////////////////////////////////////////////// -#define kCharFeaturesSuite "ATE CharFeatures Suite" -#if SLO_COMPLEXSCRIPT -#define kCharFeaturesSuiteVersion101 101 -#define kCharFeaturesSuiteVersion kCharFeaturesSuiteVersion101 -#else -#define kCharFeaturesSuiteVersion1 1 -#define kCharFeaturesSuiteVersion kCharFeaturesSuiteVersion1 -#endif - -typedef struct CharFeaturesSuite{ - - // Reference count maintenance. - void (*AddRef) ( CharFeaturesRef charfeatures); - void (*Release) ( CharFeaturesRef charfeatures); - ATEBool8 (*IsNull) ( CharFeaturesRef charfeatures); - - // CharFeatures is a complete Set of character attributes that - // can be applied to text (except for kerning). They can be used to - // describe or Set the (1) local character attributes of text (a.k.a. - // the local overrides or (2) attributes of a named character style. - // - // Often, a given CharFeatures instance will only partially define - // each of its attributes. The validity of an attribute is - // determined by an associated boolean. Calls to "Get" methods - // return an "isAssigned" boolean that reflects the validity of - // the returned argument. Calls to "Set" methods always Set the - // associated boolean to indicate validity. Calls to "clear" - // methods always invalidate that boolean/attribute pair. - // - // A character's attribute is determined by an inheritance model. - // At the top is the "Normal" style which fully defines all - // attributes. These can be overriden by a named style or a local - // override, where an attribute is valid. - // - // A given attribute value of a character is determined by starting - // with the local override for that attribute if it is defined. If - // not, then the attribute comes from the corresponding named style - // (if it exists and) if it is defined. If all else fails, the - // default value comes from the "Normal" character style. - // - // Default constructor creates a "blank" CharFeatures instance where - // all attributes are undefined (invalid). - ATEErr (*Initialize) ( CharFeaturesRef* charfeatures); - ATEErr (*Clone) ( CharFeaturesRef charfeatures, CharFeaturesRef* ret); - ATEErr (*GetFont) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontRef* ret); - ATEErr (*GetFontSize) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetHorizontalScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetVerticalScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetAutoLeading) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetLeading) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetTracking) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetBaselineShift) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetCharacterRotation) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - /** Kern type information is only available for CharStyle instances. - Use Story::GetKern( ) to obtain kern type information for a TextRange. - */ - ATEErr (*GetAutoKernType) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, AutoKernType* ret); - ATEErr (*GetFontCapsOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontCapsOption* ret); - ATEErr (*GetFontBaselineOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontBaselineOption* ret); - ATEErr (*GetFontOpenTypePositionOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontOpenTypePositionOption* ret); - ATEErr (*GetStrikethroughPosition) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, StrikethroughPosition* ret); - ATEErr (*GetUnderlinePosition) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, UnderlinePosition* ret); - ATEErr (*GetUnderlineOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - // ------------------------------------------------------------------ - // OpenType features - // ------------------------------------------------------------------ - ATEErr (*GetLigature) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetDiscretionaryLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetContextualLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetAlternateLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetOldStyle) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetFractions) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetOrdinals) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetSwash) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetTitling) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetConnectionForms) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetStylisticAlternates) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetOrnaments) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetFigureStyle) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FigureStyle* ret); - // ------------------------------------------------------------------ - // Japanese OpenType feature support - // ------------------------------------------------------------------ - ATEErr (*GetProportionalMetrics) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetKana) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetRuby) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetItalics) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetBaselineDirection) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, BaselineDirection* ret); - ATEErr (*GetLanguage) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, Language* ret); - ATEErr (*GetJapaneseAlternateFeature) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, JapaneseAlternateFeature* ret); - ATEErr (*GetTsume) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetStyleRunAlignment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, StyleRunAlignment* ret); - // ------------------------------------------------------------------ - // WariChu Setings - // ------------------------------------------------------------------ - ATEErr (*GetWariChuEnabled) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetWariChuLineCount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetWariChuLineGap) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetWariChuScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetWariChuSize) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetWariChuWidowAmount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetWariChuOrphanAmount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetWariChuJustification) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, WariChuJustification* ret); - ATEErr (*GetTCYUpDownAdjustment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetLeftAki) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetRightAki) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetNoBreak) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetFillColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); - ATEErr (*GetStrokeColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); - ATEErr (*GetFill) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetStroke) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetFillFirst) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetFillOverPrint) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetStrokeOverPrint) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetLineCap) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineCapType* ret); - ATEErr (*GetLineJoin) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineJoinType* ret); - ATEErr (*GetLineWidth) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetMiterLimit) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetLineDashOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetLineDashArray) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ArrayRealRef* ret); -#if SLO_COMPLEXSCRIPT - // ------------------------------------------------------------------ - // Complex Script Setings - // ------------------------------------------------------------------ - ATEErr (*GetKashidas) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, Kashidas* ret); - ATEErr (*GetDirOverride) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, DirOverride* ret); - ATEErr (*GetDigitSet) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, DigitSet* ret); - ATEErr (*GetDiacVPos) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, DiacVPos* ret); - ATEErr (*GetDiacXOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetDiacYOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetAutoMydfb) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetMarkYDistFromBaseline) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetOverlapSwash) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetJustificationAlternates) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetStretchedAlternates) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -#endif - // SET PROPERTIES - // ====================================================================== - ATEErr (*SetFont) ( CharFeaturesRef charfeatures, FontRef newVal); - /** Set font size - This function will throw kOutOfRange error if (newVal > 1296 || newVal < 0.1) - */ - ATEErr (*SetFontSize) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - /** Set Horizontal Scale - This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) - If newVal is 1, this means 100% in the character palatte. - */ - ATEErr (*SetHorizontalScale) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - /** Set Vertical Scale - This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) - If newVal is 1, this means 100% in the character palatte. - */ - ATEErr (*SetVerticalScale) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetAutoLeading) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetLeading) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetTracking) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetBaselineShift) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetCharacterRotation) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetAutoKernType) ( CharFeaturesRef charfeatures, AutoKernType newVal); - ATEErr (*SetFontCapsOption) ( CharFeaturesRef charfeatures, FontCapsOption newVal); - ATEErr (*SetFontBaselineOption) ( CharFeaturesRef charfeatures, FontBaselineOption newVal); - ATEErr (*SetFontOpenTypePositionOption) ( CharFeaturesRef charfeatures, FontOpenTypePositionOption newVal); - ATEErr (*SetStrikethroughPosition) ( CharFeaturesRef charfeatures, StrikethroughPosition newVal); - ATEErr (*SetUnderlinePosition) ( CharFeaturesRef charfeatures, UnderlinePosition newVal); - ATEErr (*SetUnderlineOffset) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - // ------------------------------------------------------------------ - // OpenType features - // ------------------------------------------------------------------ - ATEErr (*SetLigature) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetDiscretionaryLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetContextualLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetAlternateLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetOldStyle) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetFractions) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetOrdinals) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetSwash) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetTitling) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetConnectionForms) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetStylisticAlternates) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetOrnaments) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetFigureStyle) ( CharFeaturesRef charfeatures, FigureStyle newVal); - // ------------------------------------------------------------------ - // Japanese OpenType feature support - // ------------------------------------------------------------------ - ATEErr (*SetProportionalMetrics) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetKana) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetItalics) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetRuby) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetBaselineDirection) ( CharFeaturesRef charfeatures, BaselineDirection newVal); - ATEErr (*SetLanguage) ( CharFeaturesRef charfeatures, Language newVal); - ATEErr (*SetJapaneseAlternateFeature) ( CharFeaturesRef charfeatures, JapaneseAlternateFeature newVal); - ATEErr (*SetTsume) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetStyleRunAlignment) ( CharFeaturesRef charfeatures, StyleRunAlignment newVal); - // ------------------------------------------------------------------ - // WariChu Setings - // ------------------------------------------------------------------ - ATEErr (*SetWariChuEnabled) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetWariChuLineCount) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetWariChuLineGap) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetWariChuScale) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetWariChuSize) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetWariChuWidowAmount) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetWariChuOrphanAmount) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetWariChuJustification) ( CharFeaturesRef charfeatures, WariChuJustification newVal); - ATEErr (*SetTCYUpDownAdjustment) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetLeftAki) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetRightAki) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetNoBreak) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetFillColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); - ATEErr (*SetStrokeColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); - ATEErr (*SetFill) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetStroke) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetFillFirst) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetFillOverPrint) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetStrokeOverPrint) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetLineCap) ( CharFeaturesRef charfeatures, LineCapType newVal); - ATEErr (*SetLineJoin) ( CharFeaturesRef charfeatures, LineJoinType newVal); - ATEErr (*SetLineWidth) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetMiterLimit) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetLineDashOffset) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetLineDashArray) ( CharFeaturesRef charfeatures, ArrayRealRef newVal); -#if SLO_COMPLEXSCRIPT - // ------------------------------------------------------------------ - // Complex Script Setings - // ------------------------------------------------------------------ - ATEErr (*SetKashidas) ( CharFeaturesRef charfeatures, Kashidas newVal); - ATEErr (*SetDirOverride) ( CharFeaturesRef charfeatures, DirOverride newVal); - ATEErr (*SetDigitSet) ( CharFeaturesRef charfeatures, DigitSet newVal); - ATEErr (*SetDiacVPos) ( CharFeaturesRef charfeatures, DiacVPos newVal); - ATEErr (*SetDiacXOffset) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetDiacYOffset) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetAutoMydfb) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetMarkYDistFromBaseline) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); - ATEErr (*SetOverlapSwash) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetJustificationAlternates) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetStretchedAlternates) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -#endif - // CLEAR PROPERTIES - // ====================================================================== - ATEErr (*ClearFont) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFontSize) ( CharFeaturesRef charfeatures); - ATEErr (*ClearHorizontalScale) ( CharFeaturesRef charfeatures); - ATEErr (*ClearVerticalScale) ( CharFeaturesRef charfeatures); - ATEErr (*ClearAutoLeading) ( CharFeaturesRef charfeatures); - ATEErr (*ClearLeading) ( CharFeaturesRef charfeatures); - ATEErr (*ClearTracking) ( CharFeaturesRef charfeatures); - ATEErr (*ClearBaselineShift) ( CharFeaturesRef charfeatures); - ATEErr (*ClearCharacterRotation) ( CharFeaturesRef charfeatures); - ATEErr (*ClearAutoKernType) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFontCapsOption) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFontBaselineOption) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFontOpenTypePositionOption) ( CharFeaturesRef charfeatures); - ATEErr (*ClearStrikethroughPosition) ( CharFeaturesRef charfeatures); - ATEErr (*ClearUnderlinePosition) ( CharFeaturesRef charfeatures); - ATEErr (*ClearUnderlineOffset) ( CharFeaturesRef charfeatures); - // ------------------------------------------------------------------ - // OpenType features - // ------------------------------------------------------------------ - ATEErr (*ClearLigature) ( CharFeaturesRef charfeatures); - ATEErr (*ClearDiscretionaryLigatures) ( CharFeaturesRef charfeatures); - ATEErr (*ClearContextualLigatures) ( CharFeaturesRef charfeatures); - ATEErr (*ClearAlternateLigatures) ( CharFeaturesRef charfeatures); - ATEErr (*ClearOldStyle) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFractions) ( CharFeaturesRef charfeatures); - ATEErr (*ClearOrdinals) ( CharFeaturesRef charfeatures); - ATEErr (*ClearSwash) ( CharFeaturesRef charfeatures); - ATEErr (*ClearTitling) ( CharFeaturesRef charfeatures); - ATEErr (*ClearConnectionForms) ( CharFeaturesRef charfeatures); - ATEErr (*ClearStylisticAlternates) ( CharFeaturesRef charfeatures); - ATEErr (*ClearOrnaments) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFigureStyle) ( CharFeaturesRef charfeatures); - // ------------------------------------------------------------------ - // Japanese OpenType feature support - // ------------------------------------------------------------------ - ATEErr (*ClearProportionalMetrics) ( CharFeaturesRef charfeatures); - ATEErr (*ClearKana) ( CharFeaturesRef charfeatures); - ATEErr (*ClearItalics) ( CharFeaturesRef charfeatures); - ATEErr (*ClearRuby) ( CharFeaturesRef charfeatures); - ATEErr (*ClearBaselineDirection) ( CharFeaturesRef charfeatures); - ATEErr (*ClearLanguage) ( CharFeaturesRef charfeatures); - ATEErr (*ClearJapaneseAlternateFeature) ( CharFeaturesRef charfeatures); - ATEErr (*ClearTsume) ( CharFeaturesRef charfeatures); - ATEErr (*ClearStyleRunAlignment) ( CharFeaturesRef charfeatures); - // ------------------------------------------------------------------ - // WariChu Setings - // ------------------------------------------------------------------ - ATEErr (*ClearWariChuEnabled) ( CharFeaturesRef charfeatures); - ATEErr (*ClearWariChuLineCount) ( CharFeaturesRef charfeatures); - ATEErr (*ClearWariChuLineGap) ( CharFeaturesRef charfeatures); - ATEErr (*ClearWariChuSubLineAmount) ( CharFeaturesRef charfeatures); - ATEErr (*ClearWariChuWidowAmount) ( CharFeaturesRef charfeatures); - ATEErr (*ClearWariChuOrphanAmount) ( CharFeaturesRef charfeatures); - ATEErr (*ClearWariChuJustification) ( CharFeaturesRef charfeatures); - ATEErr (*ClearTCYUpDownAdjustment) ( CharFeaturesRef charfeatures); - ATEErr (*ClearTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures); - ATEErr (*ClearLeftAki) ( CharFeaturesRef charfeatures); - ATEErr (*ClearRightAki) ( CharFeaturesRef charfeatures); - ATEErr (*ClearNoBreak) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFillColor) ( CharFeaturesRef charfeatures); - ATEErr (*ClearStrokeColor) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFill) ( CharFeaturesRef charfeatures); - ATEErr (*ClearStroke) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFillFirst) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFillOverPrint) ( CharFeaturesRef charfeatures); - ATEErr (*ClearStrokeOverPrint) ( CharFeaturesRef charfeatures); - ATEErr (*ClearLineCap) ( CharFeaturesRef charfeatures); - ATEErr (*ClearLineJoin) ( CharFeaturesRef charfeatures); - ATEErr (*ClearLineWidth) ( CharFeaturesRef charfeatures); - ATEErr (*ClearMiterLimit) ( CharFeaturesRef charfeatures); - ATEErr (*ClearLineDashOffset) ( CharFeaturesRef charfeatures); - ATEErr (*ClearLineDashArray) ( CharFeaturesRef charfeatures); -#if SLO_COMPLEXSCRIPT - // ------------------------------------------------------------------ - // Complex Script Setings - // ------------------------------------------------------------------ - ATEErr (*ClearKashidas) ( CharFeaturesRef charfeatures); - ATEErr (*ClearDirOverride) ( CharFeaturesRef charfeatures); - ATEErr (*ClearDigitSet) ( CharFeaturesRef charfeatures); - ATEErr (*ClearDiacVPos) ( CharFeaturesRef charfeatures); - ATEErr (*ClearDiacXOffset) ( CharFeaturesRef charfeatures); - ATEErr (*ClearDiacYOffset) ( CharFeaturesRef charfeatures); - ATEErr (*ClearAutoMydfb) ( CharFeaturesRef charfeatures); - ATEErr (*ClearMarkYDistFromBaseline) ( CharFeaturesRef charfeatures); - ATEErr (*ClearOverlapSwash) ( CharFeaturesRef charfeatures); - ATEErr (*ClearJustificationAlternates) ( CharFeaturesRef charfeatures); - ATEErr (*ClearStretchedAlternates) ( CharFeaturesRef charfeatures); -#endif - // ALGEBRA METHODS - // Methods return true if changes were made. - // ====================================================================== - // Intersection of 2 Features is the intersection of each attribute - // on the lhs with the corresponding attribute on the rhs. - // Attribute intersections are defined by the following truth table: - // - // ______________________________________________________________________ - // this.attribute | rhs.attribute || Action/Result - // ====================================================================== - // assigned | assigned || [Case 1] If values are equal - // | || ACTION: nothing - // | || RESULT: value preserved - // | || [Case 2] If values are not equal - // | || ACTION: if (*this.attribute != *rhs.attribute) - // | || this.attribute.Clear(); - // | || RESULT: unassigned - // ---------------------------------------------------------------------- - // assigned | unassigned || ACTION: this.attribute.Clear() - // | || RESULT: unassigned - // ---------------------------------------------------------------------- - // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) - // | || RESULT: unassigned - // ---------------------------------------------------------------------- - // unassigned | unassigned || ACTION: nothing (both are equal) - // | || RESULT: unassigned - // ______________________________________________________________________ - // - ATEErr (*IntersectFeatures) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); - // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. - ATEErr (*ReplaceOrAddFeatures) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); - // Unassigns each attribute whose value equals value of corresponding attribute in rhs - ATEErr (*UnassignEachIfEqual) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); - // True if all are not assigned; false otherwise - ATEErr (*IsEachNotAssigned) ( CharFeaturesRef charfeatures, ATEBool8* ret); - // True if all are assigned; false otherwise - ATEErr (*IsEachAssigned) ( CharFeaturesRef charfeatures, ATEBool8* ret); - // ACCESSORS DESIGNED FOR CLIENT APPLICATION CORE - // ====================================================================== - // ------------------------------------------------------------------ - // Visibility Feature - // ------------------------------------------------------------------ - ATEErr (*GetFillVisible) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetStrokeVisible) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*SetFillVisible) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*SetStrokeVisible) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*ClearFillVisible) ( CharFeaturesRef charfeatures); - ATEErr (*ClearStrokeVisible) ( CharFeaturesRef charfeatures); - // ------------------------------------------------------------------ - // Text Background Color Feature - // ------------------------------------------------------------------ - ATEErr (*GetFillBackgroundColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); - ATEErr (*GetFillBackground) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*SetFillBackgroundColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); - ATEErr (*SetFillBackground) ( CharFeaturesRef charfeatures, ATEBool8 newVal); - ATEErr (*ClearFillBackgroundColor) ( CharFeaturesRef charfeatures); - ATEErr (*ClearFillBackground) ( CharFeaturesRef charfeatures); -}CharFeaturesSuite; - -////////////////////////////////////////////// -// --CharInspectorSuite-- -////////////////////////////////////////////// -#define kCharInspectorSuite "ATE CharInspector Suite" -#if SLO_COMPLEXSCRIPT -#define kCharInspectorSuiteVersion101 101 -#define kCharInspectorSuiteVersion kCharInspectorSuiteVersion101 -#else -#define kCharInspectorSuiteVersion1 1 -#define kCharInspectorSuiteVersion kCharInspectorSuiteVersion1 -#endif - -typedef struct CharInspectorSuite{ - - // Reference count maintenance. - void (*AddRef) ( CharInspectorRef charinspector); - void (*Release) ( CharInspectorRef charinspector); - ATEBool8 (*IsNull) ( CharInspectorRef charinspector); - - ATEErr (*Initialize) ( CharInspectorRef* charinspector); - ATEErr (*GetFont) ( CharInspectorRef charinspector, ArrayFontRefRef* ret); - ATEErr (*GetFontSize) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetHorizontalScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetVerticalScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetSyntheticBold) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetSyntheticItalic) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetAutoLeading) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetLeading) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetTracking) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); - ATEErr (*GetBaselineShift) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetCharacterRotation) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetFontCapsOption) ( CharInspectorRef charinspector, ArrayFontCapsOptionRef* ret); - ATEErr (*GetFontBaselineOption) ( CharInspectorRef charinspector, ArrayFontBaselineOptionRef* ret); - ATEErr (*GetFontOpenTypePositionOption) ( CharInspectorRef charinspector, ArrayFontOpenTypePositionOptionRef* ret); - ATEErr (*GetStrikethroughPosition) ( CharInspectorRef charinspector, ArrayStrikethroughPositionRef* ret); - ATEErr (*GetUnderlinePosition) ( CharInspectorRef charinspector, ArrayUnderlinePositionRef* ret); - ATEErr (*GetUnderlineOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); - // ------------------------------------------------------------------ - // OpenType features - // ------------------------------------------------------------------ - ATEErr (*GetLigature) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetDiscretionaryLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetContextualLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetAlternateLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetOldStyle) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetFractions) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetOrdinals) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetSwash) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetTitling) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetConnectionForms) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetStylisticAlternates) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetOrnaments) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetFigureStyle) ( CharInspectorRef charinspector, ArrayFigureStyleRef* ret); - // ------------------------------------------------------------------ - // Japanese OpenType feature support - // ------------------------------------------------------------------ - ATEErr (*GetProportionalMetrics) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetKana) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetItalics) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetRuby) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetBaselineDirection) ( CharInspectorRef charinspector, ArrayBaselineDirectionRef* ret); - ATEErr (*GetLanguage) ( CharInspectorRef charinspector, ArrayLanguageRef* ret); - ATEErr (*GetTsume) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetStyleRunAlignment) ( CharInspectorRef charinspector, ArrayStyleRunAlignmentRef* ret); - // ------------------------------------------------------------------ - // WariChu Setings - // ------------------------------------------------------------------ - ATEErr (*GetWariChuLineCount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); - ATEErr (*GetWariChuLineGap) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); - ATEErr (*GetWariChuScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetWariChuSize) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetWariChuWidowAmount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); - ATEErr (*GetWariChuOrphanAmount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); - ATEErr (*GetWariChuJustification) ( CharInspectorRef charinspector, ArrayWariChuJustificationRef* ret); - ATEErr (*GetWariChuEnabled) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetTCYUpDownAdjustment) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); - ATEErr (*GetTCYLeftRightAdjustment) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); - ATEErr (*GetLeftAki) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetRightAki) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetNoBreak) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetFillColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); - ATEErr (*GetStrokeColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); - ATEErr (*GetFill) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetStroke) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetFillFirst) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetFillOverPrint) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetStrokeOverPrint) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetLineCap) ( CharInspectorRef charinspector, ArrayLineCapTypeRef* ret); - ATEErr (*GetLineJoin) ( CharInspectorRef charinspector, ArrayLineJoinTypeRef* ret); - ATEErr (*GetLineWidth) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetMiterLimit) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetLineDashOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetLineDashArray) ( CharInspectorRef charinspector, ArrayArrayRealRef* ret); -#if SLO_COMPLEXSCRIPT - // ------------------------------------------------------------------ - // Complex Script Setings - // ------------------------------------------------------------------ - ATEErr (*GetKashidas) ( CharInspectorRef charinspector, ArrayKashidasRef* ret); - ATEErr (*GetDirOverride) ( CharInspectorRef charinspector, ArrayDirOverrideRef* ret); - ATEErr (*GetDigitSet) ( CharInspectorRef charinspector, ArrayDigitSetRef* ret); - ATEErr (*GetDiacVPos) ( CharInspectorRef charinspector, ArrayDiacVPosRef* ret); - ATEErr (*GetDiacXOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetDiacYOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetAutoMydfb) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetMarkYDistFromBaseline) ( CharInspectorRef charinspector, ArrayRealRef* ret); - ATEErr (*GetOverlapSwash) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetJustificationAlternates) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetStretchedAlternates) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -#endif - // ------------------------------------------------------------------ - // Visibility Feature - // ------------------------------------------------------------------ - ATEErr (*GetFillVisible) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - ATEErr (*GetStrokeVisible) ( CharInspectorRef charinspector, ArrayBoolRef* ret); - // ------------------------------------------------------------------ - // Text Background Color Feature - // ------------------------------------------------------------------ - ATEErr (*GetFillBackgroundColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); - ATEErr (*GetFillBackground) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -}CharInspectorSuite; - -////////////////////////////////////////////// -// --CharStyleSuite-- -////////////////////////////////////////////// -#define kCharStyleSuite "ATE CharStyle Suite" -#define kCharStyleSuiteVersion1 1 -#define kCharStyleSuiteVersion kCharStyleSuiteVersion1 - -typedef struct CharStyleSuite{ - - // Reference count maintenance. - void (*AddRef) ( CharStyleRef charstyle); - void (*Release) ( CharStyleRef charstyle); - ATEBool8 (*IsNull) ( CharStyleRef charstyle); - - /// Name of style is set in pName up to maxLength characters. - /// Length of actual name is returned; 0 if error occurred. - ATEErr (*GetName) ( CharStyleRef charstyle, ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - /// Sets name of style to null-terminated pName. If existing style of - /// same name exists or *pName == L'\0' then false is returned. - ATEErr (*SetName) ( CharStyleRef charstyle, const ATETextDOM::Unicode* pName, ATEBool8* ret); - /// Parent style returned. For Normal style, a null object is returned. - ATEErr (*GetParent) ( CharStyleRef charstyle, CharStyleRef* ret); - /// Parent style set. Returns false if attempting to set the parent - /// of Normal style, true otherwise. - ATEErr (*SetParent) ( CharStyleRef charstyle, const CharStyleRef pStyle, ATEBool8* ret); - /// Returns whether style has parent. Always false for normal style. - ATEErr (*HasParent) ( CharStyleRef charstyle, ATEBool8* ret); - /// Returns features for style. - ATEErr (*GetFeatures) ( CharStyleRef charstyle, CharFeaturesRef* ret); - /// The style's feature attributes are all assigned to those of pFeatures. - /// For Normal style, this has same effect as ReplaceOrAddFeatures. - ATEErr (*SetFeatures) ( CharStyleRef charstyle, CharFeaturesRef pFeatures); - /// The style's feature attributes are replaced by any corresponding ones - /// in pFeatures that contain valid values (i.e. the attribute is assigned). - ATEErr (*ReplaceOrAddFeatures) ( CharStyleRef charstyle, CharFeaturesRef pFeatures); - ATEErr (*IsEqual) ( CharStyleRef charstyle, const CharStyleRef pStyle, ATEBool8* ret); - -}CharStyleSuite; - -////////////////////////////////////////////// -// --CharStylesSuite-- -////////////////////////////////////////////// -#define kCharStylesSuite "ATE CharStyles Suite" -#define kCharStylesSuiteVersion1 1 -#define kCharStylesSuiteVersion kCharStylesSuiteVersion1 - -typedef struct CharStylesSuite{ - - // Reference count maintenance. - void (*AddRef) ( CharStylesRef charstyles); - void (*Release) ( CharStylesRef charstyles); - ATEBool8 (*IsNull) ( CharStylesRef charstyles); - - ATEErr (*IsEmpty) ( CharStylesRef charstyles, ATEBool8* ret); - ATEErr (*GetSize) ( CharStylesRef charstyles, ATETextDOM::Int32* ret); - ATEErr (*ShowAllStyles) ( CharStylesRef charstyles); - ATEErr (*ShowOnlyUnreferencedStyles) ( CharStylesRef charstyles); - ATEErr (*ShowOnlyStylesReferencedIn) ( CharStylesRef charstyles, TextRangeRef pRange); - // Reorders position of style - ATEErr (*MoveStyleTo) ( CharStylesRef charstyles, CharStyleRef pStyle, ATETextDOM::Int32 position); - -}CharStylesSuite; - -////////////////////////////////////////////// -// --CharStylesIteratorSuite-- -////////////////////////////////////////////// -#define kCharStylesIteratorSuite "ATE CharStylesIterator Suite" -#define kCharStylesIteratorSuiteVersion1 1 -#define kCharStylesIteratorSuiteVersion kCharStylesIteratorSuiteVersion1 - -typedef struct CharStylesIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( CharStylesIteratorRef charstylesiterator); - void (*Release) ( CharStylesIteratorRef charstylesiterator); - ATEBool8 (*IsNull) ( CharStylesIteratorRef charstylesiterator); - - ATEErr (*Initialize) ( CharStylesRef pStyles, Direction direction, CharStylesIteratorRef* charstylesiterator); - ATEErr (*IsNotDone) ( CharStylesIteratorRef charstylesiterator, ATEBool8* ret); - ATEErr (*IsDone) ( CharStylesIteratorRef charstylesiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( CharStylesIteratorRef charstylesiterator, ATEBool8* ret); - ATEErr (*MoveToFirst) ( CharStylesIteratorRef charstylesiterator); - ATEErr (*MoveToLast) ( CharStylesIteratorRef charstylesiterator); - ATEErr (*Next) ( CharStylesIteratorRef charstylesiterator); - ATEErr (*Previous) ( CharStylesIteratorRef charstylesiterator); - ATEErr (*Item) ( CharStylesIteratorRef charstylesiterator, CharStyleRef* ret); - -}CharStylesIteratorSuite; - -////////////////////////////////////////////// -// --FindSuite-- -////////////////////////////////////////////// -#define kFindSuite "ATE Find Suite" -#if SLO_COMPLEXSCRIPT -#define kFindSuiteVersion101 101 -#define kFindSuiteVersion kFindSuiteVersion101 -#else -#define kFindSuiteVersion1 1 -#define kFindSuiteVersion kFindSuiteVersion1 -#endif - -typedef struct FindSuite{ - - // Reference count maintenance. - void (*AddRef) ( FindRef find); - void (*Release) ( FindRef find); - ATEBool8 (*IsNull) ( FindRef find); - - // Options - // ======================================================================== - ATEErr (*GetSearchDirection) ( FindRef find, Direction* ret); - ATEErr (*GetIgnoreCase) ( FindRef find, ATEBool8* ret); - ATEErr (*GetWholeWord) ( FindRef find, ATEBool8* ret); - ATEErr (*GetWrap) ( FindRef find, ATEBool8* ret); - ATEErr (*GetFindWordsOutOfBounds) ( FindRef find, ATEBool8* ret); - ATEErr (*SetSearchDirection) ( FindRef find, Direction newValue); - ATEErr (*SetIgnoreCase) ( FindRef find, ATEBool8 newValue); - ATEErr (*SetWholeWord) ( FindRef find, ATEBool8 newValue); - ATEErr (*SetWrap) ( FindRef find, ATEBool8 newValue); - ATEErr (*SetFindWordsOutOfBounds) ( FindRef find, ATEBool8 newValue); - // Control scope of search to be entire document or Story. - // By default, the entire document is searched. - ATEErr (*GetSearchScope) ( FindRef find, SearchScope* ret); - ATEErr (*SetSearchScope) ( FindRef find, SearchScope searchScope); - // If called, search is done only within specified TextRange - ATEErr (*SetSearchRange) ( FindRef find, TextRangeRef pRange); - ATEErr (*SetSearchChars) ( FindRef find, ATETextDOM::Unicode* pSearchChars); - ATEErr (*GetSearchChars) ( FindRef find, ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length); - ATEErr (*SetReplaceChars) ( FindRef find, ATETextDOM::Unicode* pSearchChars); - ATEErr (*GetReplaceChars) ( FindRef find, ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length); - // Temporary way to reset the engine for modeless operation - ATEErr (*Reset) ( FindRef find); - // Methods - // ======================================================================== - // Searches current user selection. - // Returns false if the search failed - ATEErr (*FindMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8* ret); - // Skips the current user selection. - // Returns false if the search failed - ATEErr (*FindNextMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8* ret); - ATEErr (*ReplaceMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8 findNext, ATEBool8* ret); - // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and - // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. - ATEErr (*FindAndReplaceAllMatches) ( FindRef find, ATETextDOM::Int32* pReplaceCount, ATEBool8* ret); - // Use these to implement ReplaceAll. - // Start by saving off the settings with GetPreReplaceAllSettings( ) - // (also note what text object you're currently working with so you can restore that - // via SetSearchRange( ) when you're finished. - ATEErr (*GetPreReplaceAllSettings) ( FindRef find, ATETextDOM::Int32* pCurrentPoint, ATETextDOM::Int32* pStartPoint); - // Implement a loop to go through all the text objects you want to replace all with. - // Use FindMatch( ), FindNextMatch( ), and ReplaceMatch( ) to replace all. - // Keep track of how many ReplaceMatch( ) calls were made for reporting back to the user - // When finished, restore the correct text object and range using SetSearchRange( ) - // and restore the positions using RestorePreReplaceAllSettings( ) - ATEErr (*RestorePreReplaceAllSettings) ( FindRef find, const ATETextDOM::Int32 currentPoint, const ATETextDOM::Int32 startPoint); -#if SLO_COMPLEXSCRIPT - ATEErr (*GetIgnoreAccents) ( FindRef find, ATEBool8* ret); - ATEErr (*GetIgnoreKashidas) ( FindRef find, ATEBool8* ret); - ATEErr (*SetIgnoreAccents) ( FindRef find, ATEBool8 newValue); - ATEErr (*SetIgnoreKashidas) ( FindRef find, ATEBool8 newValue); -#endif -}FindSuite; - -////////////////////////////////////////////// -// --FontSuite-- -////////////////////////////////////////////// -#define kFontSuite "ATE Font Suite" -#define kFontSuiteVersion1 1 -#define kFontSuiteVersion kFontSuiteVersion1 - -typedef struct FontSuite{ - - // Reference count maintenance. - void (*AddRef) ( FontRef font); - void (*Release) ( FontRef font); - ATEBool8 (*IsNull) ( FontRef font); - - // METHODS - // ======================================================================== - ATEErr (*IsCoolTypeTechnology) ( FontRef font, ATEBool8* ret); - /// if this font has its roman glyphs sideway by default. - ATEErr (*IsVerticalRomanGlyphsOnSideByDefault) ( FontRef font, ATEBool8 withItalics, StyleRunAlignment characterAlignment, ATEBool8* ret); - ATEErr (*GetCTFontDict) ( FontRef font, void** ret); - -}FontSuite; - -////////////////////////////////////////////// -// --GlyphSuite-- -////////////////////////////////////////////// -#define kGlyphSuite "ATE Glyph Suite" -#define kGlyphSuiteVersion1 1 -#define kGlyphSuiteVersion kGlyphSuiteVersion1 - -typedef struct GlyphSuite{ - - // Reference count maintenance. - void (*AddRef) ( GlyphRef glyph); - void (*Release) ( GlyphRef glyph); - ATEBool8 (*IsNull) ( GlyphRef glyph); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetGlyphID) ( GlyphRef glyph, ATEGlyphID* ret); - ATEErr (*GetAlternateGlyphs) ( GlyphRef glyph, GlyphsRef* ret); - ATEErr (*GetOTFeatures) ( GlyphRef glyph, char** otFeatures, ATETextDOM::Int32* otFeatureCount, ATETextDOM::Int32** otFeatureIndex); - // RealMatrix GetTransformation(); - // ======================================================================== - // METHODS - // ======================================================================== - // ============================================================================= - // PROTECTED AND PRIVATE - // ============================================================================= - -}GlyphSuite; - -////////////////////////////////////////////// -// --GlyphsSuite-- -////////////////////////////////////////////// -#define kGlyphsSuite "ATE Glyphs Suite" -#define kGlyphsSuiteVersion1 1 -#define kGlyphsSuiteVersion kGlyphsSuiteVersion1 - -typedef struct GlyphsSuite{ - - // Reference count maintenance. - void (*AddRef) ( GlyphsRef glyphs); - void (*Release) ( GlyphsRef glyphs); - ATEBool8 (*IsNull) ( GlyphsRef glyphs); - - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( GlyphsRef glyphs, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( GlyphsRef glyphs, GlyphRef* ret); - ATEErr (*GetLast) ( GlyphsRef glyphs, GlyphRef* ret); - // navigation objects. - ATEErr (*GetTextRanges) ( GlyphsRef glyphs, TextRangesRef* ret); - ATEErr (*GetTextSelection) ( GlyphsRef glyphs, TextRangesRef* ret); - ATEErr (*GetParagraphsIterator) ( GlyphsRef glyphs, ParagraphsIteratorRef* ret); - ATEErr (*GetTextRunsIterator) ( GlyphsRef glyphs, TextRunsIteratorRef* ret); - ATEErr (*GetWordsIterator) ( GlyphsRef glyphs, WordsIteratorRef* ret); - // METHODS - // ======================================================================== - ATEErr (*Add) ( GlyphsRef glyphs, const GlyphRef glyph); - ATEErr (*Item) ( GlyphsRef glyphs, ATETextDOM::Int32 nIndex, GlyphRef* ret); - ATEErr (*RemoveAll) ( GlyphsRef glyphs); - ATEErr (*Remove) ( GlyphsRef glyphs, ATETextDOM::Int32 nIndex); - // PROTECTED AND PRIVATE - // ======================================================================== - -}GlyphsSuite; - -////////////////////////////////////////////// -// --GlyphsIteratorSuite-- -////////////////////////////////////////////// -#define kGlyphsIteratorSuite "ATE GlyphsIterator Suite" -#define kGlyphsIteratorSuiteVersion1 1 -#define kGlyphsIteratorSuiteVersion kGlyphsIteratorSuiteVersion1 - -typedef struct GlyphsIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( GlyphsIteratorRef glyphsiterator); - void (*Release) ( GlyphsIteratorRef glyphsiterator); - ATEBool8 (*IsNull) ( GlyphsIteratorRef glyphsiterator); - - ATEErr (*Initialize) ( GlyphsRef glyphs, Direction direction, GlyphsIteratorRef* glyphsiterator); - ATEErr (*IsNotDone) ( GlyphsIteratorRef glyphsiterator, ATEBool8* ret); - ATEErr (*IsDone) ( GlyphsIteratorRef glyphsiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( GlyphsIteratorRef glyphsiterator, ATEBool8* ret); - ATEErr (*GetFirst) ( GlyphsIteratorRef glyphsiterator, GlyphRef* ret); - ATEErr (*GetLast) ( GlyphsIteratorRef glyphsiterator, GlyphRef* ret); - ATEErr (*GetNext) ( GlyphsIteratorRef glyphsiterator, GlyphRef* ret); - ATEErr (*Item) ( GlyphsIteratorRef glyphsiterator, GlyphRef* ret); - ATEErr (*Next) ( GlyphsIteratorRef glyphsiterator); - ATEErr (*Previous) ( GlyphsIteratorRef glyphsiterator); - -}GlyphsIteratorSuite; - -////////////////////////////////////////////// -// --KinsokuSuite-- -////////////////////////////////////////////// -#define kKinsokuSuite "ATE Kinsoku Suite" -#define kKinsokuSuiteVersion1 1 -#define kKinsokuSuiteVersion kKinsokuSuiteVersion1 - -typedef struct KinsokuSuite{ - - // Reference count maintenance. - void (*AddRef) ( KinsokuRef kinsoku); - void (*Release) ( KinsokuRef kinsoku); - ATEBool8 (*IsNull) ( KinsokuRef kinsoku); - - /// Constructs an empty Kinsoku - ATEErr (*Initialize) ( KinsokuRef* kinsoku); - // PROPERTIES - // ======================================================================= - ATEErr (*GetName) ( KinsokuRef kinsoku, ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetNameSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); - ATEErr (*SetName) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* name); - ATEErr (*MatchesPredefinedResourceTag) ( KinsokuRef kinsoku, ATE::KinsokuPredefinedTag tag, ATEBool8* ret); - ATEErr (*GetNoStartCharSet) ( KinsokuRef kinsoku, ATETextDOM::Unicode* noStartCharSet, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetNoStartCharSetSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); - ATEErr (*SetNoStartCharSet) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* noStartCharSet); - ATEErr (*GetNoEndCharSet) ( KinsokuRef kinsoku, ATETextDOM::Unicode* noEndCharSet, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetNoEndCharSetSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); - ATEErr (*SetNoEndCharSet) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* noEndCharSet); - ATEErr (*GetNoBreakCharSet) ( KinsokuRef kinsoku, ATETextDOM::Unicode* noBreakCharSet, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetNoBreakCharSetSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); - ATEErr (*SetNoBreakCharSet) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* noBreakCharSet); - ATEErr (*GetHangingCharSet) ( KinsokuRef kinsoku, ATETextDOM::Unicode* hangingCharSet, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetHangingCharSetSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); - ATEErr (*SetHangingCharSet) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* hangingCharSet); - // METHODS - // ======================================================================= - ATEErr (*IsNoStartChar) ( KinsokuRef kinsoku, ATETextDOM::Unicode character, ATEBool8* ret); - ATEErr (*IsNoEndChar) ( KinsokuRef kinsoku, ATETextDOM::Unicode character, ATEBool8* ret); - ATEErr (*IsNoBreakChar) ( KinsokuRef kinsoku, ATETextDOM::Unicode character, ATEBool8* ret); - ATEErr (*IsHangingChar) ( KinsokuRef kinsoku, ATETextDOM::Unicode character, ATEBool8* ret); - /// Does a shallow equivalency test - ATEErr (*IsEqual) ( KinsokuRef kinsoku, KinsokuRef rhsKinsoku, ATEBool8* ret); - /// Does a deep equivalency test - ATEErr (*IsEquivalent) ( KinsokuRef kinsoku, KinsokuRef rhsKinsoku, ATEBool8* ret); - /// Has the resource been modified since it became editable? - ATEErr (*IsModified) ( KinsokuRef kinsoku, ATEBool8* ret); - /// Is it a predefined or user defined kinsoku? - ATEErr (*IsPredefined) ( KinsokuRef kinsoku, ATEBool8* ret); - ATEErr (*Duplicate) ( KinsokuRef kinsoku, KinsokuRef* ret); - -}KinsokuSuite; - -////////////////////////////////////////////// -// --KinsokuSetSuite-- -////////////////////////////////////////////// -#define kKinsokuSetSuite "ATE KinsokuSet Suite" -#define kKinsokuSetSuiteVersion1 1 -#define kKinsokuSetSuiteVersion kKinsokuSetSuiteVersion1 - -typedef struct KinsokuSetSuite{ - - // Reference count maintenance. - void (*AddRef) ( KinsokuSetRef kinsokuset); - void (*Release) ( KinsokuSetRef kinsokuset); - ATEBool8 (*IsNull) ( KinsokuSetRef kinsokuset); - - // PROPERTIES - // ======================================================================= - ATEErr (*GetSize) ( KinsokuSetRef kinsokuset, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( KinsokuSetRef kinsokuset, KinsokuRef* ret); - ATEErr (*GetLast) ( KinsokuSetRef kinsokuset, KinsokuRef* ret); - // METHODS - // ======================================================================= - ATEErr (*Item) ( KinsokuSetRef kinsokuset, ATETextDOM::Int32 nIndex, KinsokuRef* ret); - /// Returns a valid index if found, else return -1 - /// This will search for kinsoku with the same name and data - ATEErr (*Find_ByKinsoku) ( KinsokuSetRef kinsokuset, KinsokuRef kinsoku, ATETextDOM::Int32* ret); - /// Returns a valid index if found, else return -1 - /// Search by name only - ATEErr (*Find_ByName) ( KinsokuSetRef kinsokuset, const ATETextDOM::Unicode* name, ATETextDOM::Int32* ret); - /// Returns a valid index if found, else return -1 - /// If kUserDefinedKinsokuTag is requested for search, it will return the - /// first user defined kinsoku it finds. - ATEErr (*Find_ByPredefinedKinsokuTag) ( KinsokuSetRef kinsokuset, KinsokuPredefinedTag tag, ATETextDOM::Int32* ret); - /// Removes an existing kinsoku, returns true if successful - ATEErr (*Remove) ( KinsokuSetRef kinsokuset, ATETextDOM::Int32 nIndex, ATEBool8* ret); - /// Appends a new kinsoku, returns its new index if successful, - /// -1 if unsuccessful - /// If the kinsoku being added already exists in the set, it will - /// return its current index. - ATEErr (*Add) ( KinsokuSetRef kinsokuset, KinsokuRef kinsoku, ATETextDOM::Int32* ret); - /// Replaces an existing kinsoku at the given index with the - /// given kinsoku. Returns true if successful - ATEErr (*Replace) ( KinsokuSetRef kinsokuset, ATETextDOM::Int32 nIndex, KinsokuRef kinsoku, ATEBool8* ret); - -}KinsokuSetSuite; - -////////////////////////////////////////////// -// --ParaFeaturesSuite-- -////////////////////////////////////////////// -#define kParaFeaturesSuite "ATE ParaFeatures Suite" -#if SLO_COMPLEXSCRIPT -#define kParaFeaturesSuiteVersion101 101 -#define kParaFeaturesSuiteVersion kParaFeaturesSuiteVersion101 -#else -#define kParaFeaturesSuiteVersion1 1 -#define kParaFeaturesSuiteVersion kParaFeaturesSuiteVersion1 -#endif - -typedef struct ParaFeaturesSuite{ - - // Reference count maintenance. - void (*AddRef) ( ParaFeaturesRef parafeatures); - void (*Release) ( ParaFeaturesRef parafeatures); - ATEBool8 (*IsNull) ( ParaFeaturesRef parafeatures); - - // ParaFeatures is a complete Set of paragraph attributes that - // can be applied to text (except for kerning). They can be used to - // describe or Set the (1) local paragraph attributes of text (a.k.a. - // the local overrides or (2) attributes of a named paragraph style. - // - // Often, a given ParaFeatures instance will only partially define - // each of its attributes. The validity of an attribute is - // determined by an associated boolean. Calls to "Get" methods - // return an "isAssigned" boolean that reflects the validity of - // the returned argument. Calls to "Set" methods always Set the - // associated boolean to indicate validity. Calls to "Clear" - // methods always invalidate that boolean/attribute pair. - // - // A paragraph's attribute is determined by an inheritance model. - // At the top is the "Normal" style which fully defines all - // attributes. These can be overriden by a named style or a local - // override, where an attribute is valid. - // - // A given attribute value of a paragraph is determined by starting - // with the local override for that attribute if it is defined. If - // not, then the attribute comes from the corresponding named style - // (if it exists and) if it is defined. If all else fails, the - // default value comes from the "Normal" paragraph style. - // - // Default constructor creates a "blank" ParaFeatures instance where - // all attributes are undefined (invalid). - ATEErr (*Initialize) ( ParaFeaturesRef* parafeatures); - ATEErr (*Clone) ( ParaFeaturesRef parafeatures, ParaFeaturesRef* ret); - // ------------------------------------------------------------------ - // Justification - // ------------------------------------------------------------------ - ATEErr (*GetJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); - ATEErr (*GetFirstLineIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetStartIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetEndIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetSpaceBefore) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetSpaceAfter) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - // ------------------------------------------------------------------ - // Hyphenation - // ------------------------------------------------------------------ - ATEErr (*GetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetPreHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetPostHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetHyphenationZone) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetHyphenationPreference) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - // ------------------------------------------------------------------ - // Justification Features - // ------------------------------------------------------------------ - ATEErr (*GetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetMinWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetSingleWordJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); - ATEErr (*GetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - ATEErr (*GetLeadingType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, LeadingType* ret); - ATEErr (*GetTabStops) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, TabStopsRef* ret); - ATEErr (*GetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); - // ------------------------------------------------------------------ - // Japanese Features - // ------------------------------------------------------------------ - ATEErr (*GetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetAutoTCY) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); - ATEErr (*GetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetBurasagariType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, BurasagariType* ret); - ATEErr (*GetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, PreferredKinsokuOrder* ret); - ATEErr (*GetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); - /// This will return a null object if Kinsoku is not used (ie None set) - ATEErr (*GetKinsoku) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, KinsokuRef* ret); - /// This will return a null object if Mojikumi is not used (ie None set) - ATEErr (*GetMojiKumi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, MojiKumiRef* ret); - // Other - ATEErr (*GetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); - ATEErr (*GetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, CharFeaturesRef* ret); -#if SLO_COMPLEXSCRIPT - // ------------------------------------------------------------------ - // Complex Script - // ------------------------------------------------------------------ - ATEErr (*GetParagraphDirection) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::ParagraphDirection* ret); - ATEErr (*GetJustificationMethod) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::JustificationMethod* ret); - ATEErr (*GetKashidaWidth) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::KashidaWidth* ret); -#endif - // SET PROPERTIES - // ====================================================================== - // ------------------------------------------------------------------ - // Justification - // ------------------------------------------------------------------ - ATEErr (*SetJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); - ATEErr (*SetFirstLineIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetStartIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetEndIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetSpaceBefore) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetSpaceAfter) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - // ------------------------------------------------------------------ - // Hyphenation - // ------------------------------------------------------------------ - ATEErr (*SetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); - ATEErr (*SetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetPreHyphenSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetPostHyphenSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetHyphenationZone) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); - ATEErr (*SetHyphenationPreference) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - // ------------------------------------------------------------------ - // Justification Features - // ------------------------------------------------------------------ - ATEErr (*SetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetMinWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetSingleWordJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); - ATEErr (*SetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - ATEErr (*SetLeadingType) ( ParaFeaturesRef parafeatures, LeadingType newVal); - ATEErr (*SetTabStops) ( ParaFeaturesRef parafeatures, TabStopsRef newVal); - ATEErr (*SetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); - // ------------------------------------------------------------------ - // Japanese Features - // ------------------------------------------------------------------ - ATEErr (*SetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); - ATEErr (*SetAutoTCY) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); - ATEErr (*SetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); - ATEErr (*SetBurasagariType) ( ParaFeaturesRef parafeatures, BurasagariType newVal); - ATEErr (*SetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, PreferredKinsokuOrder newVal); - ATEErr (*SetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); - ATEErr (*SetKinsoku) ( ParaFeaturesRef parafeatures, KinsokuRef newVal); - ATEErr (*SetMojiKumi) ( ParaFeaturesRef parafeatures, MojiKumiRef newVal); - // Other - ATEErr (*SetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); - ATEErr (*SetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, CharFeaturesRef newVal); -#if SLO_COMPLEXSCRIPT - // ------------------------------------------------------------------ - // Complex Script - // ------------------------------------------------------------------ - ATEErr (*SetParagraphDirection) ( ParaFeaturesRef parafeatures, ATE::ParagraphDirection newVal); - ATEErr (*SetJustificationMethod) ( ParaFeaturesRef parafeatures, ATE::JustificationMethod newVal); - ATEErr (*SetKashidaWidth) ( ParaFeaturesRef parafeatures, ATE::KashidaWidth newVal); -#endif - // CLEAR PROPERTIES - // ====================================================================== - // ------------------------------------------------------------------ - // Justification - // ------------------------------------------------------------------ - ATEErr (*ClearJustification) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearFirstLineIndent) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearStartIndent) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearEndIndent) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearSpaceBefore) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearSpaceAfter) ( ParaFeaturesRef parafeatures); - // ------------------------------------------------------------------ - // Hyphenation - // ------------------------------------------------------------------ - ATEErr (*ClearAutoHyphenate) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearHyphenatedWordSize) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearPreHyphenSize) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearPostHyphenSize) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearHyphenationZone) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearHyphenateCapitalized) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearHyphenationPreference) ( ParaFeaturesRef parafeatures); - // ------------------------------------------------------------------ - // Justification Features - // ------------------------------------------------------------------ - ATEErr (*ClearWordSpacing) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearLetterSpacing) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearGlyphScaling) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearSingleWordJustification) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearAutoLeadingPercentage) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearLeadingType) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearTabStops) ( ParaFeaturesRef parafeatures); - // ------------------------------------------------------------------ - // Japanese Features - // ------------------------------------------------------------------ - ATEErr (*ClearHangingRoman) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearAutoTCY) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearBunriKinshi) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearBurasagariType) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearKinsoku) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearMojiKumi) ( ParaFeaturesRef parafeatures); - // Other - ATEErr (*ClearEveryLineComposer) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearDefaultCharFeatures) ( ParaFeaturesRef parafeatures); -#if SLO_COMPLEXSCRIPT - // ------------------------------------------------------------------ - // Complex Script - // ------------------------------------------------------------------ - ATEErr (*ClearParagraphDirection) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearJustificationMethod) ( ParaFeaturesRef parafeatures); - ATEErr (*ClearKashidaWidth) ( ParaFeaturesRef parafeatures); -#endif - // ALGEBRA METHODS - // Methods return true if changes were made. - // ====================================================================== - // Intersection of 2 Features is the intersection of each attribute - // on the lhs with the corresponding attribute on the rhs. - // Attribute intersections are defined by the following truth table: - // - // ______________________________________________________________________ - // this.attribute | rhs.attribute || Action/Result - // ====================================================================== - // assigned | assigned || [Case 1] If values are equal - // | || ACTION: nothing - // | || RESULT: value preserved - // | || [Case 2] If values are not equal - // | || ACTION: if (*this.attribute != *rhs.attribute) - // | || this.attribute.Clear(); - // | || RESULT: unassigned - // ---------------------------------------------------------------------- - // assigned | unassigned || ACTION: this.attribute.Clear() - // | || RESULT: unassigned - // ---------------------------------------------------------------------- - // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) - // | || RESULT: unassigned - // ---------------------------------------------------------------------- - // unassigned | unassigned || ACTION: nothing (both are equal) - // | || RESULT: unassigned - // ______________________________________________________________________ - // - ATEErr (*IntersectFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); - // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. - ATEErr (*ReplaceOrAddFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); - // Unassigns each attribute whose value equals value of corresponding attribute in rhs - ATEErr (*UnassignEachIfEqual) ( ParaFeaturesRef parafeatures, const ParaFeaturesRef rhs, ATEBool8* ret); - // True if all are not assigned; false otherwise - ATEErr (*IsEachNotAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); - // True if all are assigned; false otherwise - ATEErr (*IsEachAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); - // Composer Engine - ATEErr (*GetComposerEngine) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::ComposerEngine* ret); - ATEErr (*SetComposerEngine) ( ParaFeaturesRef parafeatures, ATE::ComposerEngine newVal); - ATEErr (*ClearComposerEngine) ( ParaFeaturesRef parafeatures); - // PRIVATE AND PROTECTED - // ====================================================================== - -}ParaFeaturesSuite; - -////////////////////////////////////////////// -// --ParagraphSuite-- -////////////////////////////////////////////// -#define kParagraphSuite "ATE Paragraph Suite" -#define kParagraphSuiteVersion1 1 -#define kParagraphSuiteVersion kParagraphSuiteVersion1 - -typedef struct ParagraphSuite{ - - // Reference count maintenance. - void (*AddRef) ( ParagraphRef paragraph); - void (*Release) ( ParagraphRef paragraph); - ATEBool8 (*IsNull) ( ParagraphRef paragraph); - - // PROPERTIES - // ======================================================================== - ATEErr (*GetLength) ( ParagraphRef paragraph, ATETextDOM::Int32* ret); - // navigation objects. - ATEErr (*GetStory) ( ParagraphRef paragraph, StoryRef* ret); - ATEErr (*GetTextRange) ( ParagraphRef paragraph, TextRangeRef* ret); - ATEErr (*GetTextRanges) ( ParagraphRef paragraph, TextRangesRef* ret); - ATEErr (*GetTextSelection) ( ParagraphRef paragraph, TextRangesRef* ret); - ATEErr (*GetWordsIterator) ( ParagraphRef paragraph, WordsIteratorRef* ret); - // METHODS - // ======================================================================== - ATEErr (*GetNext) ( ParagraphRef paragraph, ParagraphRef* ret); - ATEErr (*GetPrev) ( ParagraphRef paragraph, ParagraphRef* ret); - ATEErr (*GetContents_AsUnicode) ( ParagraphRef paragraph, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::ATETextDomErr* ret); - ATEErr (*GetContents_AsChar) ( ParagraphRef paragraph, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::ATETextDomErr* ret); - -}ParagraphSuite; - -////////////////////////////////////////////// -// --ParagraphsIteratorSuite-- -////////////////////////////////////////////// -#define kParagraphsIteratorSuite "ATE ParagraphsIterator Suite" -#define kParagraphsIteratorSuiteVersion1 1 -#define kParagraphsIteratorSuiteVersion kParagraphsIteratorSuiteVersion1 - -typedef struct ParagraphsIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( ParagraphsIteratorRef paragraphsiterator); - void (*Release) ( ParagraphsIteratorRef paragraphsiterator); - ATEBool8 (*IsNull) ( ParagraphsIteratorRef paragraphsiterator); - - ATEErr (*Initialize) ( TextRangesRef ranges, Direction direction, ParagraphsIteratorRef* paragraphsiterator); - ATEErr (*IsDone) ( ParagraphsIteratorRef paragraphsiterator, ATEBool8* ret); - ATEErr (*IsNotDone) ( ParagraphsIteratorRef paragraphsiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( ParagraphsIteratorRef paragraphsiterator, ATEBool8* ret); - ATEErr (*MoveToFirst) ( ParagraphsIteratorRef paragraphsiterator); - ATEErr (*MoveToLast) ( ParagraphsIteratorRef paragraphsiterator); - ATEErr (*Next) ( ParagraphsIteratorRef paragraphsiterator); - ATEErr (*Item) ( ParagraphsIteratorRef paragraphsiterator, ParagraphRef* ret); - -}ParagraphsIteratorSuite; - -////////////////////////////////////////////// -// --ParaInspectorSuite-- -////////////////////////////////////////////// -#define kParaInspectorSuite "ATE ParaInspector Suite" -#if SLO_COMPLEXSCRIPT -#define kParaInspectorSuiteVersion101 101 -#define kParaInspectorSuiteVersion kParaInspectorSuiteVersion101 -#else -#define kParaInspectorSuiteVersion1 1 -#define kParaInspectorSuiteVersion kParaInspectorSuiteVersion1 -#endif - -typedef struct ParaInspectorSuite{ - - // Reference count maintenance. - void (*AddRef) ( ParaInspectorRef parainspector); - void (*Release) ( ParaInspectorRef parainspector); - ATEBool8 (*IsNull) ( ParaInspectorRef parainspector); - - ATEErr (*Initialize) ( ParaInspectorRef* parainspector); - // ------------------------------------------------------------------ - // Justification - // ------------------------------------------------------------------ - ATEErr (*GetJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); - ATEErr (*GetFirstLineIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetStartIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetEndIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetSpaceBefore) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetSpaceAfter) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - // ------------------------------------------------------------------ - // Hyphenation - // ------------------------------------------------------------------ - ATEErr (*GetAutoHyphenate) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); - ATEErr (*GetHyphenatedWordSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); - ATEErr (*GetPreHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); - ATEErr (*GetPostHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); - ATEErr (*GetConsecutiveHyphenLimit) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); - ATEErr (*GetHyphenationZone) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetHyphenateCapitalized) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); - ATEErr (*GetHyphenationPreference) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - // ------------------------------------------------------------------ - // Justification Features - // ------------------------------------------------------------------ - ATEErr (*GetDesiredWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetMaxWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetMinWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetDesiredLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetMaxLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetMinLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetDesiredGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetMaxGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetMinGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetSingleWordJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); - ATEErr (*GetAutoLeadingPercentage) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - ATEErr (*GetLeadingType) ( ParaInspectorRef parainspector, ArrayLeadingTypeRef* ret); - ATEErr (*GetTabStops) ( ParaInspectorRef parainspector, ArrayTabStopsRefRef* ret); - ATEErr (*GetDefaultTabWidth) ( ParaInspectorRef parainspector, ArrayRealRef* ret); - // ------------------------------------------------------------------ - // Japanese Features - // ------------------------------------------------------------------ - ATEErr (*GetHangingRoman) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); - ATEErr (*GetAutoTCY) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); - ATEErr (*GetBunriKinshi) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); - ATEErr (*GetBurasagariType) ( ParaInspectorRef parainspector, ArrayBurasagariTypeRef* ret); - ATEErr (*GetPreferredKinsokuOrder) ( ParaInspectorRef parainspector, ArrayPreferredKinsokuOrderRef* ret); - ATEErr (*GetKurikaeshiMojiShori) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); - ATEErr (*GetKinsoku) ( ParaInspectorRef parainspector, ArrayKinsokuRefRef* ret); - ATEErr (*GetMojiKumi) ( ParaInspectorRef parainspector, ArrayMojiKumiRefRef* ret); - // Other - ATEErr (*GetEveryLineComposer) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); -#if SLO_COMPLEXSCRIPT - // ------------------------------------------------------------------ - // Complex Script - // ------------------------------------------------------------------ - ATEErr (*GetParagraphDirection) ( ParaInspectorRef parainspector, ArrayParagraphDirectionRef* ret); - ATEErr (*GetJustificationMethod) ( ParaInspectorRef parainspector, ArrayJustificationMethodRef* ret); - ATEErr (*GetKashidaWidth) ( ParaInspectorRef parainspector, ArrayKashidaWidthRef* ret); -#endif - ATEErr (*GetComposerEngine) ( ParaInspectorRef parainspector, ArrayComposerEngineRef* ret); -}ParaInspectorSuite; - -////////////////////////////////////////////// -// --ParaStyleSuite-- -////////////////////////////////////////////// -#define kParaStyleSuite "ATE ParaStyle Suite" -#define kParaStyleSuiteVersion1 1 -#define kParaStyleSuiteVersion kParaStyleSuiteVersion1 - -typedef struct ParaStyleSuite{ - - // Reference count maintenance. - void (*AddRef) ( ParaStyleRef parastyle); - void (*Release) ( ParaStyleRef parastyle); - ATEBool8 (*IsNull) ( ParaStyleRef parastyle); - - /// Name of style is set in pName up to maxLength characters. - /// Length of actual name is returned; 0 if error occurred. - ATEErr (*GetName) ( ParaStyleRef parastyle, ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - /// Sets name of style to null-terminated pName. If existing style of - /// same name exists or *pName == L'\0' then false is returned. - ATEErr (*SetName) ( ParaStyleRef parastyle, const ATETextDOM::Unicode* pName, ATEBool8* ret); - /// Parent style returned. For Normal style, a null object is returned. - ATEErr (*GetParent) ( ParaStyleRef parastyle, ParaStyleRef* ret); - /// Parent style set. Returns false if attempting to set the parent - /// of Normal style, true otherwise. - ATEErr (*SetParent) ( ParaStyleRef parastyle, const ParaStyleRef pStyle, ATEBool8* ret); - /// Returns whether style has parent. Always false for normal style. - ATEErr (*HasParent) ( ParaStyleRef parastyle, ATEBool8* ret); - /// Returns features for style. - ATEErr (*GetFeatures) ( ParaStyleRef parastyle, ParaFeaturesRef* ret); - /// The style's feature attributes are assigned to pFeatures. - /// For Normal style, this has same effect as ReplaceOrAddFeatures. - ATEErr (*SetFeatures) ( ParaStyleRef parastyle, ParaFeaturesRef pFeatures); - /// The style's feature attributes are replaced by any corresponding ones - /// in pFeatures that contain valid values (i.e. the attribute is assigned). - ATEErr (*ReplaceOrAddFeatures) ( ParaStyleRef parastyle, ParaFeaturesRef pFeatures); - ATEErr (*IsEqual) ( ParaStyleRef parastyle, const ParaStyleRef pStyle, ATEBool8* ret); - -}ParaStyleSuite; - -////////////////////////////////////////////// -// --ParaStylesSuite-- -////////////////////////////////////////////// -#define kParaStylesSuite "ATE ParaStyles Suite" -#define kParaStylesSuiteVersion1 1 -#define kParaStylesSuiteVersion kParaStylesSuiteVersion1 - -typedef struct ParaStylesSuite{ - - // Reference count maintenance. - void (*AddRef) ( ParaStylesRef parastyles); - void (*Release) ( ParaStylesRef parastyles); - ATEBool8 (*IsNull) ( ParaStylesRef parastyles); - - ATEErr (*IsEmpty) ( ParaStylesRef parastyles, ATEBool8* ret); - ATEErr (*GetSize) ( ParaStylesRef parastyles, ATETextDOM::Int32* ret); - ATEErr (*ShowAllStyles) ( ParaStylesRef parastyles); - ATEErr (*ShowOnlyUnreferencedStyles) ( ParaStylesRef parastyles); - ATEErr (*ShowOnlyStylesReferencedIn) ( ParaStylesRef parastyles, TextRangeRef pRange); - // Reorders position of style - ATEErr (*MoveStyleTo) ( ParaStylesRef parastyles, ParaStyleRef pStyle, ATETextDOM::Int32 position); - -}ParaStylesSuite; - -////////////////////////////////////////////// -// --ParaStylesIteratorSuite-- -////////////////////////////////////////////// -#define kParaStylesIteratorSuite "ATE ParaStylesIterator Suite" -#define kParaStylesIteratorSuiteVersion1 1 -#define kParaStylesIteratorSuiteVersion kParaStylesIteratorSuiteVersion1 - -typedef struct ParaStylesIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( ParaStylesIteratorRef parastylesiterator); - void (*Release) ( ParaStylesIteratorRef parastylesiterator); - ATEBool8 (*IsNull) ( ParaStylesIteratorRef parastylesiterator); - - ATEErr (*Initialize) ( ParaStylesRef paraStyles, Direction direction, ParaStylesIteratorRef* parastylesiterator); - ATEErr (*IsNotDone) ( ParaStylesIteratorRef parastylesiterator, ATEBool8* ret); - ATEErr (*IsDone) ( ParaStylesIteratorRef parastylesiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( ParaStylesIteratorRef parastylesiterator, ATEBool8* ret); - ATEErr (*MoveToFirst) ( ParaStylesIteratorRef parastylesiterator); - ATEErr (*MoveToLast) ( ParaStylesIteratorRef parastylesiterator); - ATEErr (*Next) ( ParaStylesIteratorRef parastylesiterator); - ATEErr (*Previous) ( ParaStylesIteratorRef parastylesiterator); - ATEErr (*Item) ( ParaStylesIteratorRef parastylesiterator, ParaStyleRef* ret); - -}ParaStylesIteratorSuite; - -////////////////////////////////////////////// -// --SpellSuite-- -////////////////////////////////////////////// -#define kSpellSuite "ATE Spell Suite" -#if SLO_COMPLEXSCRIPT -#define kSpellSuiteVersion101 101 -#define kSpellSuiteVersion kSpellSuiteVersion101 -#else -#define kSpellSuiteVersion1 1 -#define kSpellSuiteVersion kSpellSuiteVersion1 -#endif - -typedef struct SpellSuite{ - - // Reference count maintenance. - void (*AddRef) ( SpellRef spell); - void (*Release) ( SpellRef spell); - ATEBool8 (*IsNull) ( SpellRef spell); - - // Options - // ======================================================================== - ATEErr (*Initialize) ( SpellRef spell ); - ATEErr (*IsInitialized) ( SpellRef spell, ATEBool8* ret); - ATEErr (*GetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8* ret); - ATEErr (*GetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8* ret); - ATEErr (*GetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8* ret); - ATEErr (*GetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8* ret); - ATEErr (*GetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8* ret); - ATEErr (*SetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8 newValue); - ATEErr (*SetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8 newValue); - ATEErr (*SetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8 newValue); - ATEErr (*SetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8 newValue); - ATEErr (*SetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8 newValue); - // Control scope of search to be entire document or Story. - // By default, the entire document is searched. - ATEErr (*GetSearchScope) ( SpellRef spell, SearchScope* ret); - ATEErr (*SetSearchScope) ( SpellRef spell, SearchScope searchScope); - // If called, search is done only within specified TextRange - ATEErr (*SetSearchRange) ( SpellRef spell, const TextRangeRef pRange, const ATEBool8 resetEndOfSentence, const ATEBool8 resetCurPos); - // Temporary way to reset the engine for modeless operation - ATEErr (*Reset) ( SpellRef spell); - // Use this if the user changes the text significantly enough that you need to reset, - // but are fairly certain that the text hasn't been changed before the resumePoint. - ATEErr (*ResumeFrom) ( SpellRef spell, const ATETextDOM::Int32 resumePoint); - // Use this to resume from the current insertion point. - ATEErr (*ResumeFromInsertionPoint) ( SpellRef spell); - // Methods - // ======================================================================== - // Searches from start for unknown words and return the first one it finds. - // Returns true if it found an unknown word, false if it searched to the end - // and didn't find any unknown words. - ATEErr (*FindOneMisspelledWord) ( SpellRef spell, SpellCheckingResult* pResult, TextRangeRef pRange, Language* pLanguage, ATEBool8* ret); - // Calling FindOneMisspelledWord( ) will fill up an internal list of suggested - // corrections. Use these calls to get the contents of that word list: - // - // This will return the size of the buffer required to hold the contents of the word list. - ATEErr (*GetWordListSize) ( SpellRef spell, ATETextDOM::Int32* ret); - // - // This will fill up pWordListBuffer with the contents of the list. - // sizeOfBuffer is the size of pWordListBuffer (used to prevent overflow) - // pNumberOfWords is the number of words in the buffer. The words are all null-terminated. - ATEErr (*GetWordListContents) ( SpellRef spell, ATETextDOM::Unicode* pWordListBuffer, ATETextDOM::Int32 sizeOfBuffer, ATETextDOM::Int32* pNumberOfWords); - ATEErr (*Replace) ( SpellRef spell, TextRangeRef pRange, const ATETextDOM::Unicode* pCorrection ); - // Use this to add an entry to a pair dictionary, binding the selected word to rCorrection. - ATEErr (*AddSelectedToReplaceAllDict) ( SpellRef spell, const ATETextDOM::Unicode* pCorrection); - // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and - // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. - ATEErr (*DoReplaceAll) ( SpellRef spell, ATEBool8* ret); - // Use these to implement ReplaceAll. - // Start by saving off the settings with GetPreReplaceAllSettings( ) - // (also note what text object you're currently working with so you can restore that - // via SetSearchRange( ) when you're finished. - ATEErr (*GetPreReplaceAllSettings) ( SpellRef spell, ATETextDOM::Int32* pCurrentPoint, ATEBool8* pFoundSentenceEnd); - // Implement a loop to go through all the text objects you want to replace all with. - // Use this to find all instances of the target word in the current text object. - // Keep calling it until it returns false, making sure to set firstTimeInThisObject as needed. - // It will return the text range to select and call ReplaceSelected( ) with. - ATEErr (*FindReplaceAllWord) ( SpellRef spell, TextRangeRef pRange, const ATEBool8 firstTimeInThisObject, ATEBool8* ret); - // When finished, restore the correct text object and range using SetSearchRange( ) - // and restore the positions using RestorePreReplaceAllSettings( ) - // Order is important here - do notcall RestorePreReplaceAllSettings( ) first, - // as SetSearchRange( ) will reset the foundSentenceEnd flag. - ATEErr (*RestorePreReplaceAllSettings) ( SpellRef spell, const ATETextDOM::Int32 currentPoint, const ATEBool8 foundSentenceEnd); - // The pair dictionary is not automatically cleared. Call this when you want it cleared. - ATEErr (*ClearPairDictionary) ( SpellRef spell); - // Use this for adding words as they're found. - ATEErr (*AddSelectedToUserDict) ( SpellRef spell); - // User dictionary access and maintenance - used to manage the dictionary at any time. - // - // Calling GetUserDictionaryContents( ) will fill up the same internal list as FindAndSelectOneMisspelledWord( ) - // Use GetWordListSize( ) and GetWordListContents( ) just like with the suggestion list. - ATEErr (*GetUserDictionaryContents) ( SpellRef spell); - // now makes sure that there are no spaces (multiple words) - // Return value reflects success in adding legit word. - ATEErr (*AddToUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord, ATEBool8* ret); - ATEErr (*DeleteFromUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord); - ATEErr (*WordExistsInUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord, ATEBool8* ret); - // The ignore list is used for storing "ignore all" words. - ATEErr (*AddSelectedToIgnoreList) ( SpellRef spell); - // The ignore list is not automatically cleared. Call this when you want it cleared. - ATEErr (*ClearIgnoreList) ( SpellRef spell); - ATEErr (*GetLanguageOfLastMissingDictionary) ( SpellRef spell, Language* ret); - ATEErr (*GetSpellingDictionaryPath) (SpellRef spell, ATETextDOM::Unicode* path, ATETextDOM::Int32 *ret); -#if SLO_COMPLEXSCRIPT - //Complex Script - ATEErr (*GetStrictAlef) ( SpellRef spell, ATEBool8* ret); - ATEErr (*GetStrictYeh) ( SpellRef spell, ATEBool8* ret); - ATEErr (*SetStrictAlef) ( SpellRef spell, ATEBool8 newValue); - ATEErr (*SetStrictYeh) ( SpellRef spell, ATEBool8 newValue); -#endif -}SpellSuite; - -////////////////////////////////////////////// -// --StoriesSuite-- -////////////////////////////////////////////// -#define kStoriesSuite "ATE Stories Suite" -#define kStoriesSuiteVersion1 1 -#define kStoriesSuiteVersion kStoriesSuiteVersion1 - -typedef struct StoriesSuite{ - - // Reference count maintenance. - void (*AddRef) ( StoriesRef stories); - void (*Release) ( StoriesRef stories); - ATEBool8 (*IsNull) ( StoriesRef stories); - - ATEErr (*GetSize) ( StoriesRef stories, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( StoriesRef stories, StoryRef* ret); - ATEErr (*GetLast) ( StoriesRef stories, StoryRef* ret); - /// Only one story might have the focus. It is the one being edited by keyboard input. - /// The current focused story might lose focus if multiselection happens outside the focused story, or - /// a mouse click happens that makes the story lose focus ( like tool bar action ). - ATEErr (*HasFocus) ( StoriesRef stories, ATEBool8* ret); - /// Return the focused story, the one being edited. If there is no text being edited, it will return - /// a Null object, you can check the return using .IsNull() method. - ATEErr (*GetFocus) ( StoriesRef stories, StoryRef* ret); - /// changing focus will deselect everything in the document. - ATEErr (*SetFocus) ( StoriesRef stories, const StoryRef story); - ATEErr (*LoseFocus) ( StoriesRef stories); - // navigation objects. - ATEErr (*GetTextRanges) ( StoriesRef stories, TextRangesRef* ret); - ATEErr (*GetTextSelection) ( StoriesRef stories, TextRangesRef* ret); - ATEErr (*GetParagraphsIterator) ( StoriesRef stories, ParagraphsIteratorRef* ret); - ATEErr (*GetWordsIterator) ( StoriesRef stories, WordsIteratorRef* ret); - ATEErr (*GetTextRunsIterator) ( StoriesRef stories, TextRunsIteratorRef* ret); - ATEErr (*GetDocumentTextResources) ( StoriesRef stories, DocumentTextResourcesRef* ret); - // METHODS - // ======================================================================== - ATEErr (*Item) ( StoriesRef stories, ATETextDOM::Int32 nIndex, StoryRef* ret); - /* Suspend reflow calculation. This will speed up ITextRange::InsertXXX() call or any call that - causes a reflow to happen.*/ - ATEErr (*SuspendReflow) ( StoriesRef stories); - /// Resume reflow calculation. Make sure to match each SuspendReflow with ResumeReflow. - ATEErr (*ResumeReflow) ( StoriesRef stories); - // DOCUMENT METHODS - // ======================================================================== - -}StoriesSuite; - -////////////////////////////////////////////// -// --StorySuite-- -////////////////////////////////////////////// -#define kStorySuite "ATE Story Suite" -#define kStorySuiteVersion1 1 -#define kStorySuiteVersion kStorySuiteVersion1 - -typedef struct StorySuite{ - - // Reference count maintenance. - void (*AddRef) ( StoryRef story); - void (*Release) ( StoryRef story); - ATEBool8 (*IsNull) ( StoryRef story); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - /// Get the index of this story from the stories array. - ATEErr (*GetIndex) ( StoryRef story, ATETextDOM::Int32* ret); - /// Get how many characters in this story. - ATEErr (*GetSize) ( StoryRef story, ATETextDOM::Int32* ret); - /// navigation objects. - ATEErr (*GetStories) ( StoryRef story, StoriesRef* ret); - /// return the text range of this story (0, GetSize()). - ATEErr (*GetTextRange_ForThisStory) ( StoryRef story, TextRangeRef* ret); - ATEErr (*GetTextSelection) ( StoryRef story, TextRangesRef* ret); - ATEErr (*GetParagraphsIterator) ( StoryRef story, ParagraphsIteratorRef* ret); - ATEErr (*GetWordsIterator) ( StoryRef story, WordsIteratorRef* ret); - ATEErr (*GetTextRunsIterator) ( StoryRef story, TextRunsIteratorRef* ret); - ATEErr (*GetTextFramesIterator) ( StoryRef story, TextFramesIteratorRef* ret); - ATEErr (*GetFrame) ( StoryRef story, ATETextDOM::Int32 frameIndex, TextFrameRef* ret); - /// for auto or optical kerns - ATEErr (*SetKernForSelection) ( StoryRef story, const TextRangeRef textRange, AutoKernType autoKernType); - /// for manual kerns - ATEErr (*SetKernAtChar) ( StoryRef story, ATETextDOM::Int32 charIndex, ATETextDOM::Int32 value); - ATEErr (*GetKern) ( StoryRef story, const TextRangeRef textRange, AutoKernType* pAutoKernType, ATETextDOM::Int32* value); - ATEErr (*GetModelKernAtChar) ( StoryRef story, ATETextDOM::Int32 charIndex, ATETextDOM::Int32* pManualKernValue, AutoKernType* ret); - // ======================================================================== - // METHODS - // ======================================================================== - /** Get a text range from start to end. - This function might change start and end if they are invalid. - i.e, if either has negative values or exceeding Story.GetSize(). - */ - ATEErr (*GetTextRange) ( StoryRef story, ATETextDOM::Int32 start, ATETextDOM::Int32 end, TextRangeRef* ret); - ATEErr (*IsEqual) ( StoryRef story, const StoryRef anotherStory, ATEBool8* ret); - ATEErr (*Duplicate) ( StoryRef story, StoryRef* ret); - /** Suspend reflow calculation. This will speed up ITextRange::InsertXXX() call or any call that - causes a reflow to happen.*/ - ATEErr (*SuspendReflow) ( StoryRef story); - /** Resume reflow calculation. - Make sure to match each SuspendReflow with ResumeReflow. Or use IInhibitReflow instead of - SuspendReflow() and ResumeReflow(). - */ - ATEErr (*ResumeReflow) ( StoryRef story); - -}StorySuite; - -////////////////////////////////////////////// -// --TabStopSuite-- -////////////////////////////////////////////// -#define kTabStopSuite "ATE TabStop Suite" -#define kTabStopSuiteVersion1 1 -#define kTabStopSuiteVersion kTabStopSuiteVersion1 - -typedef struct TabStopSuite{ - - // Reference count maintenance. - void (*AddRef) ( TabStopRef tabstop); - void (*Release) ( TabStopRef tabstop); - ATEBool8 (*IsNull) ( TabStopRef tabstop); - - ATEErr (*Initialize) ( TabStopRef* tabstop); - // PROPERTIES - // ======================================================================= - ATEErr (*GetTabType) ( TabStopRef tabstop, TabType* ret); - ATEErr (*SetTabType) ( TabStopRef tabstop, TabType tabType); - ATEErr (*GetPosition) ( TabStopRef tabstop, ATETextDOM::Float* ret); - ATEErr (*SetPosition) ( TabStopRef tabstop, ATETextDOM::Float position); - ATEErr (*HasLeader) ( TabStopRef tabstop, ATEBool8* ret); - ATEErr (*GetLeader) ( TabStopRef tabstop, ATETextDOM::Unicode* leader, ATETextDOM::Int32 maxLength); - ATEErr (*SetLeader) ( TabStopRef tabstop, ATETextDOM::Unicode* leader); - ATEErr (*GetDecimalCharacter) ( TabStopRef tabstop, ATETextDOM::Unicode* ret); - ATEErr (*SetDecimalCharacter) ( TabStopRef tabstop, ATETextDOM::Unicode decimalChar); - -}TabStopSuite; - -////////////////////////////////////////////// -// --TabStopsSuite-- -////////////////////////////////////////////// -#define kTabStopsSuite "ATE TabStops Suite" -#define kTabStopsSuiteVersion1 1 -#define kTabStopsSuiteVersion kTabStopsSuiteVersion1 - -typedef struct TabStopsSuite{ - - // Reference count maintenance. - void (*AddRef) ( TabStopsRef tabstops); - void (*Release) ( TabStopsRef tabstops); - ATEBool8 (*IsNull) ( TabStopsRef tabstops); - - // TabStops is a container class that stores an array of TabStop - // instances. Often, a client will receive a TabStops object when - // asking about the tab stops of a selected paragraph. In other - // cases, they will wish to create their own Set of TabStops to - // apply to a paragraph. - // - // Creates empty container - ATEErr (*Initialize) ( TabStopsRef* tabstops); - // PROPERTIES - // ======================================================================= - // Number of TabStop instances in container - ATEErr (*GetSize) ( TabStopsRef tabstops, ATETextDOM::Int32* ret); - // Returns first TabStop in container - ATEErr (*GetFirst) ( TabStopsRef tabstops, TabStopRef* ret); - // Returns last TabStop in container - ATEErr (*GetLast) ( TabStopsRef tabstops, TabStopRef* ret); - // METHODS - // ======================================================================= - // Adds a TabStop or replaces an existing one in container. - ATEErr (*ReplaceOrAdd) ( TabStopsRef tabstops, const TabStopRef pTabStop); - // Requests TabStop by index. - ATEErr (*Item) ( TabStopsRef tabstops, ATETextDOM::Int32 nIndex, TabStopRef* ret); - // Removes TabStop by index. No op if bad index passed in. - ATEErr (*Remove) ( TabStopsRef tabstops, ATETextDOM::Int32 nIndex); - // Empties container - ATEErr (*RemoveAll) ( TabStopsRef tabstops); - // PROTECTED AND PRIVATE METHODS - // ======================================================================= - -}TabStopsSuite; - -////////////////////////////////////////////// -// --TabStopsIteratorSuite-- -////////////////////////////////////////////// -#define kTabStopsIteratorSuite "ATE TabStopsIterator Suite" -#define kTabStopsIteratorSuiteVersion1 1 -#define kTabStopsIteratorSuiteVersion kTabStopsIteratorSuiteVersion1 - -typedef struct TabStopsIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( TabStopsIteratorRef tabstopsiterator); - void (*Release) ( TabStopsIteratorRef tabstopsiterator); - ATEBool8 (*IsNull) ( TabStopsIteratorRef tabstopsiterator); - - ATEErr (*Initialize) ( TabStopsRef tabStops, Direction direction, TabStopsIteratorRef* tabstopsiterator); - ATEErr (*IsDone) ( TabStopsIteratorRef tabstopsiterator, ATEBool8* ret); - ATEErr (*IsNotDone) ( TabStopsIteratorRef tabstopsiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( TabStopsIteratorRef tabstopsiterator, ATEBool8* ret); - ATEErr (*MoveToFirst) ( TabStopsIteratorRef tabstopsiterator); - ATEErr (*MoveToLast) ( TabStopsIteratorRef tabstopsiterator); - ATEErr (*Next) ( TabStopsIteratorRef tabstopsiterator); - ATEErr (*Item) ( TabStopsIteratorRef tabstopsiterator, TabStopRef* ret); - -}TabStopsIteratorSuite; - -////////////////////////////////////////////// -// --TextRangeSuite-- -////////////////////////////////////////////// -#define kTextRangeSuite "ATE TextRange Suite" -#define kTextRangeSuiteVersion1 1 -#define kTextRangeSuiteVersion kTextRangeSuiteVersion1 - -typedef struct TextRangeSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextRangeRef textrange); - void (*Release) ( TextRangeRef textrange); - ATEBool8 (*IsNull) ( TextRangeRef textrange); - - // PROPERTIES - // ======================================================================== - ATEErr (*GetStart) ( TextRangeRef textrange, ATETextDOM::Int32* ret); - ATEErr (*SetStart) ( TextRangeRef textrange, ATETextDOM::Int32 start); - ATEErr (*GetEnd) ( TextRangeRef textrange, ATETextDOM::Int32* ret); - ATEErr (*SetEnd) ( TextRangeRef textrange, ATETextDOM::Int32 end); - ATEErr (*GetSize) ( TextRangeRef textrange, ATETextDOM::Int32* ret); - // NAVIGATION OBJECTS - // ======================================================================== - ATEErr (*GetStory) ( TextRangeRef textrange, StoryRef* ret); - ATEErr (*GetTextSelection) ( TextRangeRef textrange, TextRangesRef* ret); - ATEErr (*GetTextFramesIterator) ( TextRangeRef textrange, TextFramesIteratorRef* ret); - ATEErr (*GetParagraphsIterator) ( TextRangeRef textrange, ParagraphsIteratorRef* ret); - ATEErr (*GetWordsIterator) ( TextRangeRef textrange, WordsIteratorRef* ret); - ATEErr (*GetTextRunsIterator) ( TextRangeRef textrange, TextRunsIteratorRef* ret); - // ATTRIBUTE INSPECTION AND MODIFICATION - // ======================================================================== - /// The returned inspector object consolidates the fully-defined - /// set of attributes. Arrays for each attribute store unique values. - ATEErr (*GetCharInspector) ( TextRangeRef textrange, CharInspectorRef* ret); - /// The returned inspector object consolidates the fully-defined - /// set of attributes. Arrays for each attribute store unique values. - ATEErr (*GetParaInspector) ( TextRangeRef textrange, ParaInspectorRef* ret); - /// Returns list of named styles used in the TextRange - ATEErr (*GetNamedCharStyles) ( TextRangeRef textrange, CharStylesRef* ret); - /// Returns list of named styles used in the TextRange - ATEErr (*GetNamedParaStyles) ( TextRangeRef textrange, ParaStylesRef* ret); - /// Set the named style referred to by pName in the TextRange. Returns - /// false if style not found. - ATEErr (*SetNamedCharStyle) ( TextRangeRef textrange, const ATETextDOM::Unicode* pName, ATEBool8* ret); - /// Set the named style referred to by pName in the TextRange. Returns - /// false if style not found. - ATEErr (*SetNamedParaStyle) ( TextRangeRef textrange, const ATETextDOM::Unicode* pName, ATEBool8* ret); - /// Collapses attributes of named style into local overrides. Values in - /// the local override trump those of the named style which trumps values - /// in the parent (and so on) - ATEErr (*ClearNamedCharStyle) ( TextRangeRef textrange); - /// Collapses attributes of named style into local overrides. Values in - /// the local override trump those of the named style which trumps values - /// in the parent (and so on) - ATEErr (*ClearNamedParaStyle) ( TextRangeRef textrange); - /// Unique char features refer to the common "flattened" (or fully- - /// defined set of) attributes used in the TextRange. - /// - /// Hence, GetUniqueCharFeatures returns CharFeatures - /// objects that are the intersection of full attribute sets for each - /// text run. Only values that are the same across text runs are valid. - ATEErr (*GetUniqueCharFeatures) ( TextRangeRef textrange, CharFeaturesRef* ret); - /// Unique char features refer to the common "flattened" (or fully- - /// defined set of) attributes used in the TextRange. - /// - /// Hence, GetUniqueParaFeatures returns ParaFeatures - /// objects that are the intersection of full attribute sets for each - /// text run. Only values that are the same across text runs are valid. - ATEErr (*GetUniqueParaFeatures) ( TextRangeRef textrange, ParaFeaturesRef* ret); - /// If true, then local overrides are present. If false, then none exist. - ATEErr (*HasLocalCharFeatures) ( TextRangeRef textrange, ATEBool8* ret); - /// If true, then local overrides are present. If false, then none exist. - ATEErr (*HasLocalParaFeatures) ( TextRangeRef textrange, ATEBool8* ret); - /// Unique local char features refer to the common local overrides, - /// i.e. the overrides that are the same throughout all the text runs - /// in the TextRange. - /// - /// Hence, GetUniqueLocalCharFeatures returns CharFeatures - /// objects that are the intersection of the local overrides. Only values - /// that are the same (unique) across all text runs are valid. - /// - /// An empty CharFeatures (every attribute is "invalid") indicates - /// either the text range has no local overrides or that no common - /// attribute values existed for the local overrides. - ATEErr (*GetUniqueLocalCharFeatures) ( TextRangeRef textrange, CharFeaturesRef* ret); - /// Unique local char features refer to the common local overrides, - /// i.e. the overrides that are the same throughout all the text runs - /// in the TextRange. - /// - /// Hence, GetUniqueLocalParaFeatures returns ParaFeatures - /// objects that are the intersection of the local overrides. Only values - /// that are the same (unique) across all text runs are valid. - /// - /// An empty ParaFeatures (every attribute is "invalid") indicates - /// either the text range has no local overrides or that no common - /// attribute values existed for the local overrides. - ATEErr (*GetUniqueLocalParaFeatures) ( TextRangeRef textrange, ParaFeaturesRef* ret); - /// Local overrides are specified via CharFeatures. They typically - /// trump (hence the name override) the attribute values defined by the - /// text's associated named CharStyle (if one is attached) and the - /// default normal style. Clearing local overrides causes text to get its - /// attributes from an associated named style (if any) or the normal style. - /// - /// To completely replace the current set of overrides with a new set, - /// use SetLocalCharFeatures( ). - /// - /// To add additional overrides or to set existing overrides to different - /// values, use ReplaceOrAddLocalCharFeatures( ). - ATEErr (*SetLocalCharFeatures) ( TextRangeRef textrange, const CharFeaturesRef pFeatures); - ATEErr (*ReplaceOrAddLocalCharFeatures) ( TextRangeRef textrange, const CharFeaturesRef pFeatures); - ATEErr (*ClearLocalCharFeatures) ( TextRangeRef textrange); - /// Local overrides are specified via ParaFeatures. They typically - /// trump (hence the name override) the attribute values defined by the - /// text's associated named ParaStyle (if one is attached) and the - /// default normal style. Clearing local overrides causes text to get its - /// attributes from an associated named style (if any) or the normal style. - /// - /// To completely replace the current set of overrides with a new set, - /// use SetLocalParaFeatures( ). - /// - /// To add additional overrides or to set existing overrides to different - /// values, use ReplaceOrAddLocalPara}Features( ). - ATEErr (*SetLocalParaFeatures) ( TextRangeRef textrange, const ParaFeaturesRef pFeatures); - ATEErr (*ReplaceOrAddLocalParaFeatures) ( TextRangeRef textrange, const ParaFeaturesRef pFeatures); - ATEErr (*ClearLocalParaFeatures) ( TextRangeRef textrange); - // METHODS - // ======================================================================== - ATEErr (*SetStory) ( TextRangeRef textrange, const StoryRef story); - ATEErr (*SetRange) ( TextRangeRef textrange, ATETextDOM::Int32 start, ATETextDOM::Int32 end); - /// start and end of this range will change depending on direction - /// if direction = CollapseEnd, then end = start - /// if direction = CollapseStart, then start = end - ATEErr (*Collapse) ( TextRangeRef textrange, CollapseDirection direction); - /// Translate start and end by 'unit'. - /// a Move(3), will make this range start+3, end+3, pending story limits. i.e start and end will never be out of bounds. - /// The return of this method will be equal to 'unit' unless it is out of bounds, in that case, return is zero. - ATEErr (*Move) ( TextRangeRef textrange, ATETextDOM::Int32 unit, ATETextDOM::Int32* ret); - /// This method will make a copy of this range. - ATEErr (*Clone) ( TextRangeRef textrange, TextRangeRef* ret); - /// Insert 'text' before the start of the range. - ATEErr (*InsertBefore_AsUnicode) ( TextRangeRef textrange, const ATETextDOM::Unicode* text, ATETextDOM::Int32 length ); - /// Insert 'text' after the end of the range. - ATEErr (*InsertAfter_AsUnicode) ( TextRangeRef textrange, const ATETextDOM::Unicode* text, ATETextDOM::Int32 length ); - /// Insert 'anotherRange' before the start of the range. - ATEErr (*InsertBefore_AsTextRange) ( TextRangeRef textrange, const TextRangeRef anotherRange); - /// Insert 'anotherRange' after the end of the range. - ATEErr (*InsertAfter_AsTextRange) ( TextRangeRef textrange, const TextRangeRef anotherRange); - /** Gets the contents of this range as unicode. - Return value is number of characters. - */ - ATEErr (*GetContents_AsUnicode) ( TextRangeRef textrange, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - /** Gets the contents of this range as platform codes. Internally things are - stored in unicode, so a conversion will happen data might get lost. - Return value is number of characters. - */ - ATEErr (*GetContents_AsChar) ( TextRangeRef textrange, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetSingleGlyphInRange) ( TextRangeRef textrange, ATEGlyphID* pSingleGlyph, ATEBool8* ret); - /// This method will select this range. - /// if addToSelection is true, it will add this range to the current document selection. - /// if addToSelection is false, it will clear the selection from the document and only select this range. - ATEErr (*Select) ( TextRangeRef textrange, ATEBool8 addToSelection); - /// This method will remove this range from the selection. - /// Note, deselecting a range can cause defregmented selection, if this range is a sub range of the current selection. - ATEErr (*DeSelect) ( TextRangeRef textrange); - ATEErr (*ChangeCase) ( TextRangeRef textrange, CaseChangeType caseChangeType); - ATEErr (*FitHeadlines) ( TextRangeRef textrange); - /// This method will delete all the characters in that range. - ATEErr (*Remove) ( TextRangeRef textrange); - ATEErr (*IsEqual) ( TextRangeRef textrange, const TextRangeRef anotherRange, ATEBool8* ret); - /// This Range has to be of size equal to 1, any other size will throw error (kBadParameter) - ATEErr (*GetCharacterType) ( TextRangeRef textrange, ASCharType* ret); - -}TextRangeSuite; - -////////////////////////////////////////////// -// --TextRangesSuite-- -////////////////////////////////////////////// -#define kTextRangesSuite "ATE TextRanges Suite" -#define kTextRangesSuiteVersion1 1 -#define kTextRangesSuiteVersion kTextRangesSuiteVersion1 - -typedef struct TextRangesSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextRangesRef textranges); - void (*Release) ( TextRangesRef textranges); - ATEBool8 (*IsNull) ( TextRangesRef textranges); - - ATEErr (*Initialize) ( TextRangesRef* textranges); - // PROPERTIES - // ====================================================================== - ATEErr (*GetSize) ( TextRangesRef textranges, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( TextRangesRef textranges, TextRangeRef* ret); - ATEErr (*GetLast) ( TextRangesRef textranges, TextRangeRef* ret); - // navigation objects. - ATEErr (*GetTextSelection) ( TextRangesRef textranges, TextRangesRef* ret); - ATEErr (*GetParagraphsIterator) ( TextRangesRef textranges, ParagraphsIteratorRef* ret); - ATEErr (*GetWordsIterator) ( TextRangesRef textranges, WordsIteratorRef* ret); - ATEErr (*GetTextRunsIterator) ( TextRangesRef textranges, TextRunsIteratorRef* ret); - // ATTRIBUTE INSPECTION AND MODIFICATION - // ======================================================================== - /// The returned inspector object consolidates the fully-defined - /// set of attributes. Arrays for each attribute store unique values. - ATEErr (*GetCharInspector) ( TextRangesRef textranges, CharInspectorRef* ret); - ATEErr (*GetParaInspector) ( TextRangesRef textranges, ParaInspectorRef* ret); - /// Collapses attributes of named style into local overrides. Values in - /// the local override trump those of the named style which trumps values - /// in the parent (and so on) - ATEErr (*ClearNamedCharStyle) ( TextRangesRef textranges); - ATEErr (*ClearNamedParaStyle) ( TextRangesRef textranges); - /// Unique char features refer to the common "flattened" (or fully- - /// defined set of) attributes used across each TextRange in the - /// TextRanges object. - /// - /// Hence, GetUnique{Char,Para}Features returns {Char,Para}Features - /// objects that are the intersection of full attribute sets for each - /// text run. Only values that are the same across text runs are valid. - ATEErr (*GetUniqueCharFeatures) ( TextRangesRef textranges, CharFeaturesRef* ret); - ATEErr (*GetUniqueParaFeatures) ( TextRangesRef textranges, ParaFeaturesRef* ret); - /// If true, then local overrides are present. If false, then none exist. - ATEErr (*HasLocalCharFeatures) ( TextRangesRef textranges, ATEBool8* ret); - ATEErr (*HasLocalParaFeatures) ( TextRangesRef textranges, ATEBool8* ret); - /// Unique local char features refer to the common local overrides, - /// i.e. the overrides that are the same throughout each TextRange - /// in the TextRanges object. - /// - /// Hence, GetUniqueLocal{Char,Para}Features returns {Char,Para}Features - /// objects that are the intersection of the local overrides. Only values - /// that are the same (unique) for all text runs are valid. - /// - /// An empty {Char,Para}Features (every attribute is "invalid") indicates - /// either no local overrides exist in any of the TextRange objects - /// or that no common attribute values existed for the local overrides. - ATEErr (*GetUniqueLocalCharFeatures) ( TextRangesRef textranges, CharFeaturesRef* ret); - ATEErr (*GetUniqueLocalParaFeatures) ( TextRangesRef textranges, ParaFeaturesRef* ret); - /// Local overrides are specified via {Char,Para}Features. They typically - /// trump (hence the name override) the attribute values defined by the - /// text's associated named {Char,Para}Style (if one is attached) and the - /// default normal style. Clearing local overrides causes text to get its - /// attributes from an associated named style (if any) or the normal style. - /// - /// To completely replace the current set of overrides with a new set, - /// use SetLocal{Char,Para}Features( ). - /// - /// To add additional overrides or to set existing overrides to different - /// values, use ReplaceOrAddLocal{Char,Para}Features( ). - ATEErr (*SetLocalCharFeatures) ( TextRangesRef textranges, const CharFeaturesRef pFeatures); - ATEErr (*ReplaceOrAddLocalCharFeatures) ( TextRangesRef textranges, const CharFeaturesRef pFeatures); - ATEErr (*ClearLocalCharFeatures) ( TextRangesRef textranges); - ATEErr (*SetLocalParaFeatures) ( TextRangesRef textranges, const ParaFeaturesRef pFeatures); - ATEErr (*ReplaceOrAddLocalParaFeatures) ( TextRangesRef textranges, const ParaFeaturesRef pFeatures); - ATEErr (*ClearLocalParaFeatures) ( TextRangesRef textranges); - // METHODS - // ====================================================================== - /// This method will select those ranges. - /// if addToSelection is true, it will add those ranges to the current document selection. - /// if addToSelection is false, it will clear the selection from the document and only select those ranges. - ATEErr (*Select) ( TextRangesRef textranges, ATEBool8 addToSelection); - /// This method will remove those ranges from the selection. - /// Note, deselecting ranges can cause defregmented selection. - ATEErr (*DeSelect) ( TextRangesRef textranges); - ATEErr (*GetContents_AsUnicode) ( TextRangesRef textranges, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*GetContents_AsChar) ( TextRangesRef textranges, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); - ATEErr (*ChangeCase) ( TextRangesRef textranges, CaseChangeType caseChangeType); - ATEErr (*Add) ( TextRangesRef textranges, const TextRangeRef textRange); - ATEErr (*Item) ( TextRangesRef textranges, ATETextDOM::Int32 nIndex, TextRangeRef* ret); - ATEErr (*RemoveAll) ( TextRangesRef textranges); - ATEErr (*Remove) ( TextRangesRef textranges, ATETextDOM::Int32 nIndex); - -}TextRangesSuite; - -////////////////////////////////////////////// -// --TextRangesIteratorSuite-- -////////////////////////////////////////////// -#define kTextRangesIteratorSuite "ATE TextRangesIterator Suite" -#define kTextRangesIteratorSuiteVersion1 1 -#define kTextRangesIteratorSuiteVersion kTextRangesIteratorSuiteVersion1 - -typedef struct TextRangesIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextRangesIteratorRef textrangesiterator); - void (*Release) ( TextRangesIteratorRef textrangesiterator); - ATEBool8 (*IsNull) ( TextRangesIteratorRef textrangesiterator); - - ATEErr (*Initialize) ( TextRangesRef textRanges, Direction direction, TextRangesIteratorRef* textrangesiterator); - ATEErr (*Clone) ( TextRangesIteratorRef textrangesiterator, TextRangesIteratorRef* ret); - ATEErr (*IsNotDone) ( TextRangesIteratorRef textrangesiterator, ATEBool8* ret); - ATEErr (*IsDone) ( TextRangesIteratorRef textrangesiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( TextRangesIteratorRef textrangesiterator, ATEBool8* ret); - ATEErr (*MoveToFirst) ( TextRangesIteratorRef textrangesiterator); - ATEErr (*MoveToLast) ( TextRangesIteratorRef textrangesiterator); - ATEErr (*Next) ( TextRangesIteratorRef textrangesiterator); - ATEErr (*Item) ( TextRangesIteratorRef textrangesiterator, TextRangeRef* ret); - -}TextRangesIteratorSuite; - -////////////////////////////////////////////// -// --TextRunsIteratorSuite-- -////////////////////////////////////////////// -#define kTextRunsIteratorSuite "ATE TextRunsIterator Suite" -#define kTextRunsIteratorSuiteVersion1 1 -#define kTextRunsIteratorSuiteVersion kTextRunsIteratorSuiteVersion1 - -typedef struct TextRunsIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( TextRunsIteratorRef textrunsiterator); - void (*Release) ( TextRunsIteratorRef textrunsiterator); - ATEBool8 (*IsNull) ( TextRunsIteratorRef textrunsiterator); - - /// A TextRun is a range of text whose character attributes are the same. - /// Insertions and deletions into a story can invalidate the entire iterator. - ATEErr (*Initialize) ( const TextRangesRef ranges, Direction direction, TextRunsIteratorRef* textrunsiterator); - ATEErr (*IsNotDone) ( TextRunsIteratorRef textrunsiterator, ATEBool8* ret); - ATEErr (*IsDone) ( TextRunsIteratorRef textrunsiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( TextRunsIteratorRef textrunsiterator, ATEBool8* ret); - ATEErr (*MoveToFirst) ( TextRunsIteratorRef textrunsiterator); - ATEErr (*MoveToLast) ( TextRunsIteratorRef textrunsiterator); - /// The next run will be the one following (or preceding, depending on - /// the iterator's direction) the run returned by Item( ). Since Item( ) - /// is affected by attribute modifications to text, so is Next( ). - ATEErr (*Next) ( TextRunsIteratorRef textrunsiterator); - /// The range returned by Item( ) may differ from a preceding call if - /// character attributes are modified in the story that the run is a - /// part of. For forward iteration, the new run will begin at or - /// before the old run. Similar for backwards iteration. - ATEErr (*Item) ( TextRunsIteratorRef textrunsiterator, TextRangeRef* ret); - -}TextRunsIteratorSuite; - -////////////////////////////////////////////// -// --WordsIteratorSuite-- -////////////////////////////////////////////// -#define kWordsIteratorSuite "ATE WordsIterator Suite" -#define kWordsIteratorSuiteVersion1 1 -#define kWordsIteratorSuiteVersion kWordsIteratorSuiteVersion1 - -typedef struct WordsIteratorSuite{ - - // Reference count maintenance. - void (*AddRef) ( WordsIteratorRef wordsiterator); - void (*Release) ( WordsIteratorRef wordsiterator); - ATEBool8 (*IsNull) ( WordsIteratorRef wordsiterator); - - ATEErr (*Initialize) ( const TextRangesRef ranges, Direction direction, WordsIteratorRef* wordsiterator); - ATEErr (*IsNotDone) ( WordsIteratorRef wordsiterator, ATEBool8* ret); - ATEErr (*IsDone) ( WordsIteratorRef wordsiterator, ATEBool8* ret); - ATEErr (*IsEmpty) ( WordsIteratorRef wordsiterator, ATEBool8* ret); - ATEErr (*MoveToFirst) ( WordsIteratorRef wordsiterator); - ATEErr (*MoveToLast) ( WordsIteratorRef wordsiterator); - ATEErr (*Next) ( WordsIteratorRef wordsiterator); - // The next word corresponds to performing a control/command + arrow key - // action from the UI. Hence, each TextRange returned includes trailing - // characters. This also implies that (among other things) "..." is considered - // a word. - ATEErr (*Item) ( WordsIteratorRef wordsiterator, TextRangeRef* ret); - // NOTE: Trailing information is always for the current word - // returned by Item( ). It always gives you the counts for - // characters that come after (i.e. trailing) the word - // (regardless of the direction of iteration) - // - // The total number of trailing characters is given by GetTrailingCount( ) - ATEErr (*GetTrailingSpaceCount) ( WordsIteratorRef wordsiterator, ATETextDOM::Int32* ret); - ATEErr (*GetTrailingCount) ( WordsIteratorRef wordsiterator, ATETextDOM::Int32* ret); - ATEErr (*GetTrailingTerminatingPunctuationCount) ( WordsIteratorRef wordsiterator, ATETextDOM::Int32* ret); - -}WordsIteratorSuite; - - -////////////////////////////////////////////// -// --ArrayLineSuite -- -////////////////////////////////////////////// -#define kArrayLineSuite "ATE ArrayLine Suite" -#define kArrayLineSuiteVersion1 1 -#define kArrayLineSuiteVersion kArrayLineSuiteVersion1 - -typedef struct ArrayLineSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayLineRef arraylineref); - void (*Release) ( ArrayLineRef arraylineref); - ATEBool8 (*IsNull) ( ArrayLineRef arraylineref); - - ATEErr (*GetSize) ( ArrayLineRef arraylineref, ATETextDOM::Int32* ret); - ATEErr (*Item) ( ArrayLineRef arraylineref, ATETextDOM::Int32 index, ATETextDOM::FloatPoint* retstart, ATETextDOM::FloatPoint* retend); -}ArrayLineSuite; - -////////////////////////////////////////////// -// --ArrayComposerEngineSuite-- -////////////////////////////////////////////// -#define kArrayComposerEngineSuite "ATE ArrayComposerEngine Suite" -#define kArrayComposerEngineSuiteVersion1 1 -#define kArrayComposerEngineSuiteVersion kArrayComposerEngineSuiteVersion1 - -typedef struct ArrayComposerEngineSuite{ - - // Reference count maintenance. - void (*AddRef) ( ArrayComposerEngineRef arraycomposerengine); - void (*Release) ( ArrayComposerEngineRef arraycomposerengine); - ATEBool8 (*IsNull) ( ArrayComposerEngineRef arraycomposerengine); - - // ======================================================================== - // PROPERTIES - // ======================================================================== - ATEErr (*GetSize) ( ArrayComposerEngineRef arraycomposerengine, ATETextDOM::Int32* ret); - ATEErr (*GetFirst) ( ArrayComposerEngineRef arraycomposerengine, ComposerEngine* ret); - ATEErr (*GetLast) ( ArrayComposerEngineRef arraycomposerengine, ComposerEngine* ret); - // ======================================================================== - // METHODS - // ======================================================================== - ATEErr (*Item) ( ArrayComposerEngineRef arraycomposerengine, ATETextDOM::Int32 index, ComposerEngine* ret); - -}ArrayComposerEngineSuite; - -#ifdef MAC_ENV - #pragma options align=reset -#endif - -#ifdef WIN_ENV - #pragma pack(pop) -#endif - -#ifdef __cplusplus -}// namespace ATE -} -#endif - -#endif //__ATESuites__ - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATESuites.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ +#ifndef __ATESuites__ +#define __ATESuites__ + +#include "SloTextdomTypes.h" +#include "ATETypes.h" +#include "ATETypesDef.h" +#ifdef __cplusplus +namespace ATE +{ +extern "C" { +#endif + +#ifdef MAC_ENV + #if defined (__MWERKS__) + #pragma options align=power_gcc + #elif defined (__GNUC__) + #pragma options align=power + #endif +#endif + +#ifdef WIN_ENV + #pragma pack(push, 4) +#endif + +////////////////////////////////////////////// +// --ApplicationPaintSuite-- +////////////////////////////////////////////// +#define kApplicationPaintSuite "ATE ApplicationPaint Suite" +#define kApplicationPaintSuiteVersion1 1 +#define kApplicationPaintSuiteVersion kApplicationPaintSuiteVersion1 + +typedef struct ApplicationPaintSuite{ + + // Reference count maintenance. + void (*AddRef) ( ApplicationPaintRef applicationpaint); + void (*Release) ( ApplicationPaintRef applicationpaint); + ATEBool8 (*IsNull) ( ApplicationPaintRef applicationpaint); + + +}ApplicationPaintSuite; + +////////////////////////////////////////////// +// --CompFontSuite-- +////////////////////////////////////////////// +#define kCompFontSuite "ATE CompFont Suite" +#define kCompFontSuiteVersion1 1 +#define kCompFontSuiteVersion kCompFontSuiteVersion1 + +typedef struct CompFontSuite{ + + // Reference count maintenance. + void (*AddRef) ( CompFontRef compfont); + void (*Release) ( CompFontRef compfont); + ATEBool8 (*IsNull) ( CompFontRef compfont); + + ATEErr (*Initialize) ( TextResourcesRef pResources, CompFontRef* compfont); + // PROPERTIES + // ======================================================================= + ATEErr (*GetNativeName) ( CompFontRef compfont, ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength); + // The PostScript name will be automatically derived from the NativeName. + ATEErr (*SetNativeName) ( CompFontRef compfont, const ATETextDOM::Unicode* name); + ATEErr (*GetPostScriptName_AsUnicode) ( CompFontRef compfont, ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength); + ATEErr (*GetPostScriptName_AsChar) ( CompFontRef compfont, char* name, ATETextDOM::Int32 maxLength); + ATEErr (*SetFontDictionary) ( CompFontRef compfont, void* fontDictionary); + ATEErr (*GetFontDictionary) ( CompFontRef compfont, void** ret); + // METHODS + // ======================================================================= + ATEErr (*Duplicate) ( CompFontRef compfont, CompFontRef* ret); + // Has the resource been modified since it became editable? + ATEErr (*IsModified) ( CompFontRef compfont, ATEBool8* ret); + ATEErr (*IsEditable) ( CompFontRef compfont, ATEBool8* ret); + ATEErr (*IsCommitted) ( CompFontRef compfont, ATEBool8* ret); + // Is the font in a valid state, either editable or committed? + ATEErr (*VerifyState) ( CompFontRef compfont, ATEBool8* ret); + ATEErr (*IsATCFileLoaded) ( CompFontRef compfont, ATEBool8* ret); + ATEErr (*GetComponentCount) ( CompFontRef compfont, ATETextDOM::Int32* ret); + ATEErr (*GetComponent) ( CompFontRef compfont, ATETextDOM::Int32 index, CompFontComponentRef* ret); + ATEErr (*Find) ( CompFontRef compfont, CompFontComponentRef component, ATETextDOM::Int32* ret); + // Removes an existing component, returns true if successful + ATEErr (*RemoveComponent) ( CompFontRef compfont, ATETextDOM::Int32 index, ATEBool8* ret); + // Appends a new component, returns its new index if successful, + // -1 if unsuccessful + ATEErr (*AddComponent) ( CompFontRef compfont, CompFontComponentRef component, ATETextDOM::Int32* ret); + // Replaces an existing component, retuns true if successful + ATEErr (*ReplaceComponent) ( CompFontRef compfont, ATETextDOM::Int32 index, CompFontComponentRef component, ATEBool8* ret); + +}CompFontSuite; + +////////////////////////////////////////////// +// --CompFontClassSuite-- +////////////////////////////////////////////// +#define kCompFontClassSuite "ATE CompFontClass Suite" +#define kCompFontClassSuiteVersion1 1 +#define kCompFontClassSuiteVersion kCompFontClassSuiteVersion1 + +typedef struct CompFontClassSuite{ + + // Reference count maintenance. + void (*AddRef) ( CompFontClassRef compfontclass); + void (*Release) ( CompFontClassRef compfontclass); + ATEBool8 (*IsNull) ( CompFontClassRef compfontclass); + + ATEErr (*Initialize) ( CompFontClassRef* compfontclass); + // PROPERTIES + // ======================================================================= + ATEErr (*GetNativeName) ( CompFontClassRef compfontclass, ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength); + ATEErr (*SetNativeName) ( CompFontClassRef compfontclass, const ATETextDOM::Unicode* name); + // Returns number of integers written to buffer, including terminating 0. + // It will not write more than maxLength number of integers, including + // terminating 0. + ATEErr (*GetCodes) ( CompFontClassRef compfontclass, ATETextDOM::Unicode* codes, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + // Return character code count which does not include terminating null. + ATEErr (*SetCodes) ( CompFontClassRef compfontclass, const ATETextDOM::Unicode* codes, ATETextDOM::Int32* ret); + // METHODS + // ======================================================================= + ATEErr (*Duplicate) ( CompFontClassRef compfontclass, CompFontClassRef* ret); + ATEErr (*GetCharacterCount) ( CompFontClassRef compfontclass, ATETextDOM::Int32* ret); + ATEErr (*GetClassType) ( CompFontClassRef compfontclass, CompositeFontClassType* ret); + ATEErr (*IsCodeInClass) ( CompFontClassRef compfontclass, ATETextDOM::Unicode code, ATEBool8* ret); + // Predefined classes are never be editable. Cutom override classes + // are editable only if it is in an editable state. + ATEErr (*IsEditable) ( CompFontClassRef compfontclass, ATEBool8* ret); + ATEErr (*IsCustomOverride) ( CompFontClassRef compfontclass, ATEBool8* ret); + // Has the resource been modified since it became editable? + ATEErr (*IsModified) ( CompFontClassRef compfontclass, ATEBool8* ret); + // Is the font in a valid state, either editable or committed? + ATEErr (*VerifyState) ( CompFontClassRef compfontclass, ATEBool8* ret); + +}CompFontClassSuite; + +////////////////////////////////////////////// +// --CompFontClassSetSuite-- +////////////////////////////////////////////// +#define kCompFontClassSetSuite "ATE CompFontClassSet Suite" +#define kCompFontClassSetSuiteVersion1 1 +#define kCompFontClassSetSuiteVersion kCompFontClassSetSuiteVersion1 + +typedef struct CompFontClassSetSuite{ + + // Reference count maintenance. + void (*AddRef) ( CompFontClassSetRef compfontclassset); + void (*Release) ( CompFontClassSetRef compfontclassset); + ATEBool8 (*IsNull) ( CompFontClassSetRef compfontclassset); + + // ======================================================================= + // PROPERTIES + // ======================================================================= + ATEErr (*GetSize) ( CompFontClassSetRef compfontclassset, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( CompFontClassSetRef compfontclassset, CompFontClassRef* ret); + ATEErr (*GetLast) ( CompFontClassSetRef compfontclassset, CompFontClassRef* ret); + // ======================================================================= + // METHODS + // ======================================================================= + ATEErr (*Item) ( CompFontClassSetRef compfontclassset, ATETextDOM::Int32 nIndex, CompFontClassRef* ret); + // Returns a valid index if found, else return -1 + ATEErr (*Find) ( CompFontClassSetRef compfontclassset, CompFontClassRef compFontClass, ATETextDOM::Int32* ret); + // Returns a valid index if found, else return -1 + ATEErr (*FindPredefined) ( CompFontClassSetRef compfontclassset, CompositeFontClassType predefinedType, ATETextDOM::Int32* ret); + // ======================================================================= + // PROTECTED AND PRIVATE METHODS + // ======================================================================= + +}CompFontClassSetSuite; + +////////////////////////////////////////////// +// --CompFontComponentSuite-- +////////////////////////////////////////////// +#define kCompFontComponentSuite "ATE CompFontComponent Suite" +#define kCompFontComponentSuiteVersion1 1 +#define kCompFontComponentSuiteVersion kCompFontComponentSuiteVersion1 + +typedef struct CompFontComponentSuite{ + + // Reference count maintenance. + void (*AddRef) ( CompFontComponentRef compfontcomponent); + void (*Release) ( CompFontComponentRef compfontcomponent); + ATEBool8 (*IsNull) ( CompFontComponentRef compfontcomponent); + + ATEErr (*Initialize) ( TextResourcesRef pResources, CompFontComponentRef* compfontcomponent); + // PROPERTIES + // ======================================================================= + ATEErr (*GetClass) ( CompFontComponentRef compfontcomponent, CompFontClassRef* ret); + ATEErr (*SetClass) ( CompFontComponentRef compfontcomponent, CompFontClassRef charClass); + ATEErr (*GetFont) ( CompFontComponentRef compfontcomponent, FontRef* ret); + ATEErr (*SetFont) ( CompFontComponentRef compfontcomponent, FontRef font); + ATEErr (*GetSize) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float* ret); + ATEErr (*SetSize) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float size); + ATEErr (*GetBaseline) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float* ret); + ATEErr (*SetBaseline) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float baseline); + ATEErr (*GetHorizontalScale) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float* ret); + ATEErr (*SetHorizontalScale) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float horizontalScale); + ATEErr (*GetVerticalScale) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float* ret); + ATEErr (*SetVerticalScale) ( CompFontComponentRef compfontcomponent, ATETextDOM::Float verticalScale); + ATEErr (*GetCenterGlyph) ( CompFontComponentRef compfontcomponent, ATEBool8* ret); + ATEErr (*SetCenterGlyph) ( CompFontComponentRef compfontcomponent, ATEBool8 centerglyph); + // METHODS + // ======================================================================= + ATEErr (*IsModified) ( CompFontComponentRef compfontcomponent, ATEBool8* ret); + +}CompFontComponentSuite; + +////////////////////////////////////////////// +// --CompFontSetSuite-- +////////////////////////////////////////////// +#define kCompFontSetSuite "ATE CompFontSet Suite" +#define kCompFontSetSuiteVersion1 1 +#define kCompFontSetSuiteVersion kCompFontSetSuiteVersion1 + +typedef struct CompFontSetSuite{ + + // Reference count maintenance. + void (*AddRef) ( CompFontSetRef compfontset); + void (*Release) ( CompFontSetRef compfontset); + ATEBool8 (*IsNull) ( CompFontSetRef compfontset); + + // ======================================================================= + // PROPERTIES + // ======================================================================= + ATEErr (*GetSize) ( CompFontSetRef compfontset, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( CompFontSetRef compfontset, CompFontRef* ret); + ATEErr (*GetLast) ( CompFontSetRef compfontset, CompFontRef* ret); + // ======================================================================= + // METHODS + // ======================================================================= + ATEErr (*Item) ( CompFontSetRef compfontset, ATETextDOM::Int32 nIndex, CompFontRef* ret); + // Returns a valid index if found, else return -1 + ATEErr (*Find) ( CompFontSetRef compfontset, CompFontRef font, ATETextDOM::Int32* ret); + // Removes an existing composite font, returns true if successful + ATEErr (*Remove) ( CompFontSetRef compfontset, ATETextDOM::Int32 nIndex, ATEBool8* ret); + // Appends a new composite font, returns its new index if successful, + // -1 if unsuccessful + ATEErr (*Add) ( CompFontSetRef compfontset, CompFontRef font, ATETextDOM::Int32* ret); + // Replaces an existing composite font, returns true if successful + ATEErr (*Replace) ( CompFontSetRef compfontset, ATETextDOM::Int32 nIndex, CompFontRef newFont, ATEBool8* ret); + // Updates composite font set to reflect what is currently in the + // document font resource's font set. This may invalidate any old + // indices the client may be holding on to. + ATEErr (*Update) ( CompFontSetRef compfontset); + // ======================================================================= + // PROTECTED AND PRIVATE METHODS + // ======================================================================= + +}CompFontSetSuite; + +////////////////////////////////////////////// +// --GlyphRunSuite-- +////////////////////////////////////////////// +#define kGlyphRunSuite "ATE GlyphRun Suite" +#define kGlyphRunSuiteVersion1 1 +#define kGlyphRunSuiteVersion2 2 +#define kGlyphRunSuiteVersion kGlyphRunSuiteVersion2 + +typedef struct GlyphRunSuite{ + + // Reference count maintenance. + void (*AddRef) ( GlyphRunRef glyphrun); + void (*Release) ( GlyphRunRef glyphrun); + ATEBool8 (*IsNull) ( GlyphRunRef glyphrun); + + // METHODS + // ======================================================================= + ///This API will return ITextLine, parent of this IGlyphRun. + ATEErr (*GetTextLine) ( GlyphRunRef glyphrun, TextLineRef* ret); + /** return the size of glyphs in this run. + This API will return the size of the glyphs in this run. The size of the glyphs + might be different from GetCharacterCount() due to factors like ligature, hyphenation etc... + If you want the count of glyphs, then use GetGlyphIDs().GetSize(). + */ + ATEErr (*GetSize) ( GlyphRunRef glyphrun, ATETextDOM::Int32* ret); + /** return the size of characters in this run. + This API will return the size of characters in this run. You can use this API before calling + IGlyphRun::GetContents(xxx , SloTextdom::Int32 maxLength) to know the size of maxLength needed. + The size of the glyphs IGlyphRun::GetSize() might be different from the return of GetCharacterCount() due to factors like ligature, hyphenation etc... + */ + ATEErr (*GetCharacterCount) ( GlyphRunRef glyphrun, ATETextDOM::Int32* ret); + ATEErr (*GetOrigins) ( GlyphRunRef glyphrun, ArrayRealPointRef* ret); + ATEErr (*GetGlyphIDs) ( GlyphRunRef glyphrun, ArrayGlyphIDRef* ret); + /** Return transformation matrix of this run. + The matrix returned spesify the full transformation of the given run. You need to transform the origin by IGlyphRun::GetOrigins() and + concat with ITextFrame::GetMatrix() in order to get the location of the glyphs. + */ + ATEErr (*GetMatrix) ( GlyphRunRef glyphrun, ATETextDOM::FloatMatrix* ret); + /** return character feature of this run. + Use this to get access to Font, FontSize, HorizontalScale + VerticalScale, Tracking, BaselineShift, FillColor , StrokeColor ,fBlend + Fill , Stroke , FillFirst , FillOverPrint , StrokeOverPrint , FillBackgroundColor, FillBackground + LineCap , LineJoin , LineWidth , MiterLimit , LineDashOffset , + LineDashArray and that is it, the rest of CharFeatures members are not defined. + */ + ATEErr (*GetCharFeatures) ( GlyphRunRef glyphrun, CharFeaturesRef* ret); + ///Glyph orientation in that run. + ATEErr (*GetGlyphOrientation) ( GlyphRunRef glyphrun, GlyphOrientation* ret); + ATEErr (*GetAscent) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + ATEErr (*GetDescent) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// This is the tracking that is computed by the layout engine. i.e the space between each character. + ATEErr (*GetTracking) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// width of the space glyph in that font + ATEErr (*GetSpaceGlyphWidth) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// distance of baseline in that font + ATEErr (*GetDistanceToBaseline) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// underline position in that font + ATEErr (*GetUnderlinePosition) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// underline thickness in that font + ATEErr (*GetUnderlineThickness) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// Maximum Cap height in that font + ATEErr (*GetMaxCapHeight) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// Minimum Cap height in that font + ATEErr (*GetMinCapHeight) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// Component font for the run if using a composite font, other wise the same font as in + /// character feature. + ATEErr (*GetFlattenedFont) ( GlyphRunRef glyphrun, FontRef* ret); + /// Note: size of glyphrun may be different from size of characters. + ATEErr (*GetContents_AsUnicode) ( GlyphRunRef glyphrun, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetContents_AsChar) ( GlyphRunRef glyphrun, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + //Retrieves the character range of this glyphRun + ATEErr (*GetCharacterRange) ( GlyphRunRef glyphrun, TextRangeRef* ret); + +}GlyphRunSuite; + + +typedef struct GlyphRun1Suite{ + + // Reference count maintenance. + void (*AddRef) ( GlyphRunRef glyphrun); + void (*Release) ( GlyphRunRef glyphrun); + ATEBool8 (*IsNull) ( GlyphRunRef glyphrun); + + // METHODS + // ======================================================================= + ///This API will return ITextLine, parent of this IGlyphRun. + ATEErr (*GetTextLine) ( GlyphRunRef glyphrun, TextLineRef* ret); + /** return the size of glyphs in this run. + This API will return the size of the glyphs in this run. The size of the glyphs + might be different from GetCharacterCount() due to factors like ligature, hyphenation etc... + If you want the count of glyphs, then use GetGlyphIDs().GetSize(). + */ + ATEErr (*GetSize) ( GlyphRunRef glyphrun, ATETextDOM::Int32* ret); + /** return the size of characters in this run. + This API will return the size of characters in this run. You can use this API before calling + IGlyphRun::GetContents(xxx , SloTextdom::Int32 maxLength) to know the size of maxLength needed. + The size of the glyphs IGlyphRun::GetSize() might be different from the return of GetCharacterCount() due to factors like ligature, hyphenation etc... + */ + ATEErr (*GetCharacterCount) ( GlyphRunRef glyphrun, ATETextDOM::Int32* ret); + ATEErr (*GetOrigins) ( GlyphRunRef glyphrun, ArrayRealPointRef* ret); + ATEErr (*GetGlyphIDs) ( GlyphRunRef glyphrun, ArrayGlyphIDRef* ret); + /** Return transformation matrix of this run. + The matrix returned spesify the full transformation of the given run. You need to transform the origin by IGlyphRun::GetOrigins() and + concat with ITextFrame::GetMatrix() in order to get the location of the glyphs. + */ + ATEErr (*GetMatrix) ( GlyphRunRef glyphrun, ATETextDOM::FloatMatrix* ret); + /** return character feature of this run. + Use this to get access to Font, FontSize, HorizontalScale + VerticalScale, Tracking, BaselineShift, FillColor , StrokeColor ,fBlend + Fill , Stroke , FillFirst , FillOverPrint , StrokeOverPrint , FillBackgroundColor, FillBackground + LineCap , LineJoin , LineWidth , MiterLimit , LineDashOffset , + LineDashArray and that is it, the rest of CharFeatures members are not defined. + */ + ATEErr (*GetCharFeatures) ( GlyphRunRef glyphrun, CharFeaturesRef* ret); + ///Glyph orientation in that run. + ATEErr (*GetGlyphOrientation) ( GlyphRunRef glyphrun, GlyphOrientation* ret); + ATEErr (*GetAscent) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + ATEErr (*GetDescent) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// This is the tracking that is computed by the layout engine. i.e the space between each character. + ATEErr (*GetTracking) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// width of the space glyph in that font + ATEErr (*GetSpaceGlyphWidth) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// distance of baseline in that font + ATEErr (*GetDistanceToBaseline) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// underline position in that font + ATEErr (*GetUnderlinePosition) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// underline thickness in that font + ATEErr (*GetUnderlineThickness) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// Maximum Cap height in that font + ATEErr (*GetMaxCapHeight) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// Minimum Cap height in that font + ATEErr (*GetMinCapHeight) ( GlyphRunRef glyphrun, ATETextDOM::Float* ret); + /// Component font for the run if using a composite font, other wise the same font as in + /// character feature. + ATEErr (*GetFlattenedFont) ( GlyphRunRef glyphrun, FontRef* ret); + /// Note: size of glyphrun may be different from size of characters. + ATEErr (*GetContents_AsUnicode) ( GlyphRunRef glyphrun, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetContents_AsChar) ( GlyphRunRef glyphrun, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + +}GlyphRun1Suite; + +////////////////////////////////////////////// +// --GlyphRunsIteratorSuite-- +////////////////////////////////////////////// +#define kGlyphRunsIteratorSuite "ATE GlyphRunsIterator Suite" +#define kGlyphRunsIteratorSuiteVersion1 1 +#define kGlyphRunsIteratorSuiteVersion kGlyphRunsIteratorSuiteVersion1 + +typedef struct GlyphRunsIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( GlyphRunsIteratorRef glyphrunsiterator); + void (*Release) ( GlyphRunsIteratorRef glyphrunsiterator); + ATEBool8 (*IsNull) ( GlyphRunsIteratorRef glyphrunsiterator); + + // METHODS + // ===================================================================== + ATEErr (*IsNotDone) ( GlyphRunsIteratorRef glyphrunsiterator, ATEBool8* ret); + ATEErr (*IsDone) ( GlyphRunsIteratorRef glyphrunsiterator, ATEBool8* ret); + ATEErr (*Next) ( GlyphRunsIteratorRef glyphrunsiterator); + ATEErr (*Item) ( GlyphRunsIteratorRef glyphrunsiterator, GlyphRunRef* ret); + +}GlyphRunsIteratorSuite; + +////////////////////////////////////////////// +// --ListStyleSuite-- +////////////////////////////////////////////// +#define kListStyleSuite "ATE ListStyle Suite" +#define kListStyleSuiteVersion1 1 +#define kListStyleSuiteVersion kListStyleSuiteVersion1 + +typedef struct ListStyleSuite{ + + // Reference count maintenance. + void (*AddRef) ( ListStyleRef listStyle); + void (*Release) ( ListStyleRef listStyle); + ATEBool8 (*IsNull) ( ListStyleRef listStyle); + + ATEErr (*Initialize) ( ListStyleRef* listStyle); + // PROPERTIES + // ======================================================================= + ATEErr (*GetName) ( ListStyleRef listStyle, ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetNameSize) ( ListStyleRef listStyle, ATETextDOM::Int32* ret); + ATEErr (*SetName) ( ListStyleRef listStyle, const ATETextDOM::Unicode * name); + ATEErr (*MatchesPredefinedResourceTag) ( ListStyleRef listStyle, ATE::ListStylePredefinedTag tag, ATEBool8* ret); + // METHODS + // ======================================================================= + ATEErr (*IsEqual) ( ListStyleRef listStyle, ListStyleRef rhsListStyle, ATEBool8* ret); + ATEErr (*IsEquivalent) ( ListStyleRef listStyle, ListStyleRef rhsListStyle, ATEBool8* ret); + ATEErr (*IsModified) ( ListStyleRef listStyle, ATEBool8* ret); + ATEErr (*IsPredefined) ( ListStyleRef listStyle, ATEBool8* ret); + ATEErr (*GetNumberOfLevelStyles) ( ListStyleRef listStyle, ATETextDOM::Int32* ret); + ATEErr (*GetNthTierIndents) (ListStyleRef listStyle, + ATETextDOM::Int32 index, + ATETextDOM::Float emWidth, + ATETextDOM::Float * listIndent, + ATETextDOM::Float * textIndent, + ATETextDOM::Float * labelIndent); + ATEErr (*GetNthLevelLabelAlignment) ( ListStyleRef listStyle, ATETextDOM::Int32 index, + ATE::BNListAlignment& labelAlignment); + + ATEErr (*GetNthLevelLabelFont) ( ListStyleRef listStyle, ATETextDOM::Int32 index, FontRef* ret); + + ATEErr (*GetNthLevelSequenceGenerator) ( ListStyleRef listStyle, + ATETextDOM::Int32 index, + ATE::ListStylePredefinedTag& sequenceGeneratorType, + ATETextDOM::Unicode* prefix, + ATETextDOM::Unicode* postfix, + ATETextDOM::Unicode* bullet); + + ATEErr (*SetNthLevelIndentUnits)( ListStyleRef listStyle, ATETextDOM::Int32 index, ATE::IndentUnits units); + ATEErr (*SetNthLevelTextIndent)( ListStyleRef listStyle, ATETextDOM::Int32 index, ATETextDOM::Float indent); + ATEErr (*SetNthLevelLabelIndent) ( ListStyleRef listStyle, ATETextDOM::Int32 index, ATETextDOM::Float indent); + ATEErr (*SetNthLevelLabelAlignment)( ListStyleRef listStyle, ATETextDOM::Int32 index, ATE::BNListAlignment labelAlignment); + ATEErr (*SetNthLevelLabelFont)( ListStyleRef listStyle, ATETextDOM::Int32 index, FontRef font); + ATEErr (*SetNthLevelSequenceGenerator)( ListStyleRef listStyle, ATETextDOM::Int32 index, ATE::ListStylePredefinedTag sequenceGeneratorTag, const ATETextDOM::Unicode* prefix, const ATETextDOM::Unicode* postfix, const ATETextDOM::Unicode* bullet); + ATEErr (*InsertLevelAt) ( ListStyleRef listStyle, + ATETextDOM::Int32 index, + ATE::IndentUnits units, + ATETextDOM::Float textIndent, + ATETextDOM::Float labelIndent, + ATE::BNListAlignment labelAlignment, + FontRef font, + ATE::ListStylePredefinedTag sequenceGeneratorTag, + const ATETextDOM::Unicode* prefix, + const ATETextDOM::Unicode* postfix, + const ATETextDOM::Unicode* bullet); + + ATEErr (*EraseLevel) ( ListStyleRef listStyle, ATETextDOM::Int32 index); + ATEErr (*Duplicate) ( ListStyleRef listStyle, ListStyleRef* ret); + +}ListStyleSuite; + +////////////////////////////////////////////// +// --ListStyleSetSuite-- +////////////////////////////////////////////// +#define kListStyleSetSuite "ATE ListStyleSet Suite" +#define kListStyleSetSuiteVersion1 1 +#define kListStyleSetSuiteVersion kListStyleSetSuiteVersion1 + +typedef struct ListStyleSetSuite{ + + // Reference count maintenance. + void (*AddRef) ( ListStyleSetRef listStyleset); + void (*Release) ( ListStyleSetRef listStyleset); + ATEBool8 (*IsNull) ( ListStyleSetRef listStyleset); + + // PROPERTIES + // ======================================================================= + ATEErr (*GetSize) ( ListStyleSetRef listStyleset, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ListStyleSetRef listStyleset, ListStyleRef* ret); + ATEErr (*GetLast) ( ListStyleSetRef listStyleset, ListStyleRef* ret); + // METHODS + // ======================================================================= + ATEErr (*Item) ( ListStyleSetRef listStyleset, ATETextDOM::Int32 nIndex, ListStyleRef* ret); + /// Returns a valid index if found, else return -1 + /// This will search for ListStyle with the same name and data + ATEErr (*Find_AsListStyle) ( ListStyleSetRef listStyleset, const ListStyleRef listStyle, ATETextDOM::Int32* ret); + /// Returns a valid index if found, else return -1 + /// Search by name only + ATEErr (*Find_AsUnicode) ( ListStyleSetRef listStyleset, const ATETextDOM::Unicode* name, ATETextDOM::Int32* ret); + /// Returns a valid index if found, else return -1 + /// If kUserDefinedListStyleTag is requested for search, it will return the + /// first user defined ListStyle it finds. + ATEErr (*Find_ByPredefinedListStyleTag) ( ListStyleSetRef listStyleset, ListStylePredefinedTag tag, ATETextDOM::Int32* ret); + /// Removes an existing ListStyle, returns true if successful + ATEErr (*Remove) ( ListStyleSetRef listStyleset, ATETextDOM::Int32 nIndex, ATEBool8* ret); + /// Appends a new ListStyle, returns its new index if successful, + /// -1 if unsuccessful + /// If the ListStyle being added already exists in the set, it will + /// return its current index. + ATEErr (*Add) ( ListStyleSetRef listStyleset, ListStyleRef listStyle, ATETextDOM::Int32* ret); + /// Replaces an existing ListStyle at the given index with the + /// given moji kumi. Returns true if successful + ATEErr (*Replace) ( ListStyleSetRef listStyleset, ATETextDOM::Int32 nIndex, ListStyleRef listStyle, ATEBool8* ret); + +}ListStyleSetSuite; + +////////////////////////////////////////////// +// --MojiKumiSuite-- +////////////////////////////////////////////// +#define kMojiKumiSuite "ATE MojiKumi Suite" +#define kMojiKumiSuiteVersion1 1 +#define kMojiKumiSuiteVersion kMojiKumiSuiteVersion1 + +typedef struct MojiKumiSuite{ + + // Reference count maintenance. + void (*AddRef) ( MojiKumiRef mojikumi); + void (*Release) ( MojiKumiRef mojikumi); + ATEBool8 (*IsNull) ( MojiKumiRef mojikumi); + + ATEErr (*Initialize) ( MojiKumiRef* mojikumi); + // PROPERTIES + // ======================================================================= + ATEErr (*GetName) ( MojiKumiRef mojikumi, ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetNameSize) ( MojiKumiRef mojikumi, ATETextDOM::Int32* ret); + ATEErr (*SetName) ( MojiKumiRef mojikumi, const ATETextDOM::Unicode * name); + ATEErr (*MatchesPredefinedResourceTag) ( MojiKumiRef mojikumi, ATE::MojikumiTablePredefinedTag tag, ATEBool8* ret); + ATEErr (*GetEntry) ( MojiKumiRef mojikumi, ATETextDOM::Int32 index, ATETextDOM::Float * minExpansion, ATETextDOM::Float * maxExpansion, ATETextDOM::Float * desiredExpansion); + ATEErr (*SetEntry) ( MojiKumiRef mojikumi, ATETextDOM::Int32 index, ATETextDOM::Float minExpansion, ATETextDOM::Float maxExpansion, ATETextDOM::Float desiredExpansion); + // METHODS + // ======================================================================= + ATEErr (*IsEqual) ( MojiKumiRef mojikumi, MojiKumiRef rhsMojiKumi, ATEBool8* ret); + ATEErr (*IsEquivalent) ( MojiKumiRef mojikumi, MojiKumiRef rhsMojiKumi, ATEBool8* ret); + ATEErr (*IsModified) ( MojiKumiRef mojikumi, ATEBool8* ret); + ATEErr (*IsPredefined) ( MojiKumiRef mojikumi, ATEBool8* ret); + ATEErr (*Duplicate) ( MojiKumiRef mojikumi, MojiKumiRef* ret); + +}MojiKumiSuite; + +////////////////////////////////////////////// +// --MojiKumiSetSuite-- +////////////////////////////////////////////// +#define kMojiKumiSetSuite "ATE MojiKumiSet Suite" +#define kMojiKumiSetSuiteVersion1 1 +#define kMojiKumiSetSuiteVersion kMojiKumiSetSuiteVersion1 + +typedef struct MojiKumiSetSuite{ + + // Reference count maintenance. + void (*AddRef) ( MojiKumiSetRef mojikumiset); + void (*Release) ( MojiKumiSetRef mojikumiset); + ATEBool8 (*IsNull) ( MojiKumiSetRef mojikumiset); + + // PROPERTIES + // ======================================================================= + ATEErr (*GetSize) ( MojiKumiSetRef mojikumiset, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( MojiKumiSetRef mojikumiset, MojiKumiRef* ret); + ATEErr (*GetLast) ( MojiKumiSetRef mojikumiset, MojiKumiRef* ret); + // METHODS + // ======================================================================= + ATEErr (*Item) ( MojiKumiSetRef mojikumiset, ATETextDOM::Int32 nIndex, MojiKumiRef* ret); + /// Returns a valid index if found, else return -1 + /// This will search for mojikumi with the same name and data + ATEErr (*Find_AsMojiKumi) ( MojiKumiSetRef mojikumiset, const MojiKumiRef mojiKumi, ATETextDOM::Int32* ret); + /// Returns a valid index if found, else return -1 + /// Search by name only + ATEErr (*Find_AsUnicode) ( MojiKumiSetRef mojikumiset, const ATETextDOM::Unicode* name, ATETextDOM::Int32* ret); + /// Returns a valid index if found, else return -1 + /// If kUserDefinedMojikumiTableTag is requested for search, it will return the + /// first user defined mojikumi it finds. + ATEErr (*Find_ByPredefinedMojikumiTag) ( MojiKumiSetRef mojikumiset, MojikumiTablePredefinedTag tag, ATETextDOM::Int32* ret); + /// Removes an existing mojikumi, returns true if successful + ATEErr (*Remove) ( MojiKumiSetRef mojikumiset, ATETextDOM::Int32 nIndex, ATEBool8* ret); + /// Appends a new mojikumi, returns its new index if successful, + /// -1 if unsuccessful + /// If the mojikumi being added already exists in the set, it will + /// return its current index. + ATEErr (*Add) ( MojiKumiSetRef mojikumiset, MojiKumiRef mojiKumi, ATETextDOM::Int32* ret); + /// Replaces an existing mojikumi at the given index with the + /// given moji kumi. Returns true if successful + ATEErr (*Replace) ( MojiKumiSetRef mojikumiset, ATETextDOM::Int32 nIndex, MojiKumiRef mojiKumi, ATEBool8* ret); + /// Creates an empty new mojikumi with the specified name + /// and appends it to the new set. + /// It will return its new index via the nIndex parameter. + /// If the creation of mojiKumi was unsuccessful, it will + /// return an null AutoMojiKumi and nIndex will be -1. + ATEErr (*CreateNewMojiKumi) ( MojiKumiSetRef mojikumiset, const ATETextDOM::Unicode* name, ATETextDOM::Int32* nIndex, MojiKumiRef* ret); + +}MojiKumiSetSuite; + +////////////////////////////////////////////// +// --TextFrameSuite-- +////////////////////////////////////////////// +#define kTextFrameSuite "ATE TextFrame Suite" +#if SLO_COMPLEXSCRIPT +#define kTextFrameSuiteVersion101 101 +#define kTextFrameSuiteVersion kTextFrameSuiteVersion101 +#else +#define kTextFrameSuiteVersion1 1 +#define kTextFrameSuiteVersion kTextFrameSuiteVersion1 +#endif + +typedef struct TextFrameSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextFrameRef textframe); + void (*Release) ( TextFrameRef textframe); + ATEBool8 (*IsNull) ( TextFrameRef textframe); + + // METHODS + // ===================================================================== + /// Get the parent story + ATEErr (*GetStory) ( TextFrameRef textframe, StoryRef* ret); + /** Get the text range of this frame, + If this frame is the last frame in this story then:- + 1. If bIncludeOverflow is true, then the range returned is including the overflown text. + 2. If bIncludeOverflow is false, then the range returned will not include the overflown text. + */ + ATEErr (*GetTextRange) ( TextFrameRef textframe, ATEBool8 bIncludeOverflow, TextRangeRef* ret); + ATEErr (*GetTextLinesIterator) ( TextFrameRef textframe, TextLinesIteratorRef* ret); + ATEErr (*IsEqual) ( TextFrameRef textframe, const TextFrameRef anotherFrame, ATEBool8* ret); + ATEErr (*GetType) ( TextFrameRef textframe, FrameType* ret); + ATEErr (*GetLineOrientation) ( TextFrameRef textframe, LineOrientation* ret); + /** Check if this frame is selected. To set the selection, you have to use application specific + API for that. In Illustrator case, you can use AIArtSuite to set the selection. + */ + ATEErr (*GetSelected) ( TextFrameRef textframe, ATEBool8* ret); + ATEErr (*GetMatrix) ( TextFrameRef textframe, ATETextDOM::FloatMatrix* ret); + ATEErr (*GetRowCount) ( TextFrameRef textframe, ATETextDOM::Int32* ret); + ATEErr (*GetColumnCount) ( TextFrameRef textframe, ATETextDOM::Int32* ret); + ATEErr (*GetRowMajorOrder) ( TextFrameRef textframe, ATEBool8* ret); + ATEErr (*GetRowGutter) ( TextFrameRef textframe, ATETextDOM::Float* ret); + ATEErr (*GetColumnGutter) ( TextFrameRef textframe, ATETextDOM::Float* ret); + ATEErr (*GetSpacing) ( TextFrameRef textframe, ATETextDOM::Float* ret); + ATEErr (*GetOpticalAlignment) ( TextFrameRef textframe, ATEBool8* ret); + ATEErr (*SetRowCount) ( TextFrameRef textframe, ATETextDOM::Int32 rowCount); + ATEErr (*SetColumnCount) ( TextFrameRef textframe, ATETextDOM::Int32 columnCount); + ATEErr (*SetRowMajorOrder) ( TextFrameRef textframe, ATEBool8 isRowMajor); + ATEErr (*SetRowGutter) ( TextFrameRef textframe, ATETextDOM::Float gutter); + ATEErr (*SetColumnGutter) ( TextFrameRef textframe, ATETextDOM::Float gutter); + ATEErr (*SetSpacing) ( TextFrameRef textframe, ATETextDOM::Float spacing); + ATEErr (*SetOpticalAlignment) ( TextFrameRef textframe, ATEBool8 isActive); + ATEErr (*SetLineOrientation) ( TextFrameRef textframe, LineOrientation lineOrientation); +#if SLO_COMPLEXSCRIPT + ATEErr (*GetStoryDirection) ( TextFrameRef textframe, ParagraphDirection* ret); + ATEErr (*SetStoryDirection) ( TextFrameRef textframe, ParagraphDirection direction); + ATEErr (*FullReflow) ( TextFrameRef textframe); +#endif +}TextFrameSuite; + +////////////////////////////////////////////// +// --TextFramesIteratorSuite-- +////////////////////////////////////////////// +#define kTextFramesIteratorSuite "ATE TextFramesIterator Suite" +#define kTextFramesIteratorSuiteVersion1 1 +#define kTextFramesIteratorSuiteVersion kTextFramesIteratorSuiteVersion1 + +typedef struct TextFramesIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextFramesIteratorRef textframesiterator); + void (*Release) ( TextFramesIteratorRef textframesiterator); + ATEBool8 (*IsNull) ( TextFramesIteratorRef textframesiterator); + + ATEErr (*Initialize) ( const TextRangeRef range, TextFramesIteratorRef* textframesiterator); + // METHODS + // ===================================================================== + ATEErr (*IsNotDone) ( TextFramesIteratorRef textframesiterator, ATEBool8* ret); + ATEErr (*IsDone) ( TextFramesIteratorRef textframesiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( TextFramesIteratorRef textframesiterator, ATEBool8* ret); + ATEErr (*Next) ( TextFramesIteratorRef textframesiterator); + ATEErr (*Previous) ( TextFramesIteratorRef textframesiterator); + ATEErr (*Item) ( TextFramesIteratorRef textframesiterator, TextFrameRef* ret); + +}TextFramesIteratorSuite; + +////////////////////////////////////////////// +// --TextLineSuite-- +////////////////////////////////////////////// +#define kTextLineSuite "ATE TextLine Suite" +#define kTextLineSuiteVersion1 1 +#define kTextLineSuiteVersion2 2 +#define kTextLineSuiteVersion kTextLineSuiteVersion2 + +typedef struct TextLineSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextLineRef textline); + void (*Release) ( TextLineRef textline); + ATEBool8 (*IsNull) ( TextLineRef textline); + + // METHODS + // ======================================================================= + ATEErr (*GetGlyphRunsIterator) ( TextLineRef textline, GlyphRunsIteratorRef* ret); + ATEErr (*GetTextFrame) ( TextLineRef textline, TextFrameRef* ret); + ATEErr (*GetTextRange) ( TextLineRef textline, TextRangeRef* ret); + ATEErr (*GetBaselines) ( TextLineRef textline, ArrayLineRef* ret); + ATEErr (*GetVisualGlyphRunsIterator) ( TextLineRef textline, GlyphRunsIteratorRef* ret); +}TextLineSuite; + +typedef struct TextLine1Suite{ + + // Reference count maintenance. + void (*AddRef) ( TextLineRef textline); + void (*Release) ( TextLineRef textline); + ATEBool8 (*IsNull) ( TextLineRef textline); + + // METHODS + // ======================================================================= + ATEErr (*GetGlyphRunsIterator) ( TextLineRef textline, GlyphRunsIteratorRef* ret); + ATEErr (*GetTextFrame) ( TextLineRef textline, TextFrameRef* ret); + ATEErr (*GetTextRange) ( TextLineRef textline, TextRangeRef* ret); + ATEErr (*GetBaselines) ( TextLineRef textline, ArrayLineRef* ret); +}TextLine1Suite; + +////////////////////////////////////////////// +// --TextLinesIteratorSuite-- +////////////////////////////////////////////// +#define kTextLinesIteratorSuite "ATE TextLinesIterator Suite" +#define kTextLinesIteratorSuiteVersion1 1 +#define kTextLinesIteratorSuiteVersion kTextLinesIteratorSuiteVersion1 + +typedef struct TextLinesIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextLinesIteratorRef textlinesiterator); + void (*Release) ( TextLinesIteratorRef textlinesiterator); + ATEBool8 (*IsNull) ( TextLinesIteratorRef textlinesiterator); + + // METHODS + // ======================================================================= + ATEErr (*IsNotDone) ( TextLinesIteratorRef textlinesiterator, ATEBool8* ret); + ATEErr (*IsDone) ( TextLinesIteratorRef textlinesiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( TextLinesIteratorRef textlinesiterator, ATEBool8* ret); + ATEErr (*Next) ( TextLinesIteratorRef textlinesiterator); + ATEErr (*Previous) ( TextLinesIteratorRef textlinesiterator); + ATEErr (*Item) ( TextLinesIteratorRef textlinesiterator, TextLineRef* ret); + +}TextLinesIteratorSuite; + +////////////////////////////////////////////// +// --TextResourcesSuite-- +////////////////////////////////////////////// +#define kTextResourcesSuite "ATE TextResources Suite" +#define kTextResourcesSuiteVersion1 1 +#define kTextResourcesSuiteVersion kTextResourcesSuiteVersion1 + +typedef struct TextResourcesSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextResourcesRef textresources); + void (*Release) ( TextResourcesRef textresources); + ATEBool8 (*IsNull) ( TextResourcesRef textresources); + + ATEErr (*GetTextResources) ( TextResourcesRef textresources, TextResourcesRef* ret); + +}TextResourcesSuite; + +////////////////////////////////////////////// +// --ApplicationTextResourcesSuite-- +////////////////////////////////////////////// +#define kApplicationTextResourcesSuite "ATE ApplicationTextResources Suite" +#define kApplicationTextResourcesSuiteVersion1 1 +#define kApplicationTextResourcesSuiteVersion2 2 +#define kApplicationTextResourcesSuiteVersion kApplicationTextResourcesSuiteVersion2 + +typedef struct ApplicationTextResourcesSuite{ + + // Reference count maintenance. + void (*AddRef) ( ApplicationTextResourcesRef applicationtextresources); + void (*Release) ( ApplicationTextResourcesRef applicationtextresources); + ATEBool8 (*IsNull) ( ApplicationTextResourcesRef applicationtextresources); + + // From parent class... + ATEErr (*GetTextResources) ( ApplicationTextResourcesRef applicationtextresources, TextResourcesRef* ret); + // PROPERTIES + // ======================================================================= + ATEErr (*GetKinsokuSet) ( ApplicationTextResourcesRef applicationtextresources, KinsokuSetRef* ret); + ATEErr (*GetListStyleSet) ( ApplicationTextResourcesRef applicationtextresources, ListStyleSetRef* ret); + ATEErr (*GetMojiKumiSet) ( ApplicationTextResourcesRef applicationtextresources, MojiKumiSetRef* ret); + ATEErr (*GetCompFontClassSet) ( ApplicationTextResourcesRef applicationtextresources, CompFontClassSetRef* ret); + ATEErr (*GetCompFontSet) ( ApplicationTextResourcesRef applicationtextresources, CompFontSetRef* ret); + +}ApplicationTextResourcesSuite; + +typedef struct ApplicationTextResources1Suite{ + + // Reference count maintenance. + void (*AddRef) ( ApplicationTextResourcesRef applicationtextresources); + void (*Release) ( ApplicationTextResourcesRef applicationtextresources); + ATEBool8 (*IsNull) ( ApplicationTextResourcesRef applicationtextresources); + + // From parent class... + ATEErr (*GetTextResources) ( ApplicationTextResourcesRef applicationtextresources, TextResourcesRef* ret); + // PROPERTIES + // ======================================================================= + ATEErr (*GetKinsokuSet) ( ApplicationTextResourcesRef applicationtextresources, KinsokuSetRef* ret); + ATEErr (*GetMojiKumiSet) ( ApplicationTextResourcesRef applicationtextresources, MojiKumiSetRef* ret); + ATEErr (*GetCompFontClassSet) ( ApplicationTextResourcesRef applicationtextresources, CompFontClassSetRef* ret); + ATEErr (*GetCompFontSet) ( ApplicationTextResourcesRef applicationtextresources, CompFontSetRef* ret); + +}ApplicationTextResources1Suite; + + +////////////////////////////////////////////// +// --DocumentTextResourcesSuite-- +////////////////////////////////////////////// +#define kDocumentTextResourcesSuite "ATE DocumentTextResources Suite" +#define kDocumentTextResourcesSuiteVersion101 101 +#define kDocumentTextResourcesSuiteVersion102 102 +#define kDocumentTextResourcesSuiteVersion kDocumentTextResourcesSuiteVersion102 + +typedef struct DocumentTextResourcesSuite{ + + // Reference count maintenance. + void (*AddRef) ( DocumentTextResourcesRef documenttextresources); + void (*Release) ( DocumentTextResourcesRef documenttextresources); + ATEBool8 (*IsNull) ( DocumentTextResourcesRef documenttextresources); + + // From parent class... + ATEErr (*GetKinsokuSet) ( DocumentTextResourcesRef documenttextresources, KinsokuSetRef* ret); + ATEErr (*GetListStyleSet) ( DocumentTextResourcesRef documenttextresources, ListStyleSetRef* ret); + ATEErr (*GetMojiKumiSet) ( DocumentTextResourcesRef documenttextresources, MojiKumiSetRef* ret); + ATEErr (*GetCompFontClassSet) ( DocumentTextResourcesRef documenttextresources, CompFontClassSetRef* ret); + ATEErr (*GetCompFontSet) ( DocumentTextResourcesRef documenttextresources, CompFontSetRef* ret); + ATEErr (*GetTextResources) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef* ret); + ATEErr (*GetFind) ( DocumentTextResourcesRef documenttextresources, FindRef* ret); + ATEErr (*GetSpell) ( DocumentTextResourcesRef documenttextresources, SpellRef* ret); + ATEErr (*GetGlyphAndAlternates) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); + ATEErr (*GetAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); + ATEErr (*InsertAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ATETextDOM::Int32 otFeatureCount, const ATETextDOM::Int32* otFeatureIndexArray, ATEBool8 leaveSelected); + ATEErr (*GetAlternatesAvailableThroughoutSelection) ( DocumentTextResourcesRef documenttextresources, ArrayIntegerRef* ret); + ATEErr (*GetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, ATEBool8* isFeature, JapaneseAlternateFeature* ret); + ATEErr (*SetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, JapaneseAlternateFeature feature); + ATEErr (*GetCharStylesInDocument) ( DocumentTextResourcesRef documenttextresources, CharStylesRef* ret); + ATEErr (*GetParaStylesInDocument) ( DocumentTextResourcesRef documenttextresources, ParaStylesRef* ret); + /// Returns a named style corresponding to pName. If no matching + /// style can be found or *pName == L'\0' then a null object is returned. + ATEErr (*GetCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharStyleRef* ret); + ATEErr (*GetParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaStyleRef* ret); + ATEErr (*GetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); + ATEErr (*GetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources, ParaStyleRef* ret); + ATEErr (*ResetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources); + ATEErr (*ResetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources); + /// Routines to add new named styles to the document. If an existing + /// style already corresponds to pName or *pName == L'\0' then the + /// document is unchanged and a null object is returned. + ATEErr (*CreateCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharStyleRef* ret); + ATEErr (*CreateParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaStyleRef* ret); + ATEErr (*CreateCharStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharFeaturesRef pFeatures, CharStyleRef* ret); + ATEErr (*CreateParaStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaFeaturesRef pFeatures, ParaStyleRef* ret); + /// Removes a style from the document. Exact details will be provided + /// later. + /// + /// If no matching style in the document corresponds to pName or + /// *pName == L'\0' then the document is unchanged and false is returned. + ATEErr (*RemoveCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ATEBool8* ret); + ATEErr (*RemoveParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ATEBool8* ret); + /// Imports named styles from pSrcResources into current resource. + ATEErr (*ImportCharStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); + ATEErr (*ImportParaStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); + ATEErr (*SetUseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8 smartQuotesAreOn); + ATEErr (*SetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); + ATEErr (*SetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); + ATEErr (*UseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); + ATEErr (*GetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); + ATEErr (*GetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); + /// The library stores an internal set of insertion attributes either from + /// the last selection or from the last attribute change to text. This set + /// of insertion attributes comprises the local overrides (CharFeatures) + /// and the named style (CharStyle) + ATEErr (*GetInsertionCharFeatures) ( DocumentTextResourcesRef documenttextresources, CharFeaturesRef* ret); + ATEErr (*GetInsertionCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); + ATEErr (*SetInsertionFeaturesAndStyle) ( DocumentTextResourcesRef documenttextresources, const CharFeaturesRef pFeatures, const ATETextDOM::Unicode* pStyleName); + /// Get superscript size + ATEErr (*GetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set superscript size + ATEErr (*SetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get superscript position + ATEErr (*GetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set superscript position + ATEErr (*SetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get subscript size + ATEErr (*GetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set subscript size + ATEErr (*SetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get subscript position + ATEErr (*GetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set subscript position + ATEErr (*SetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get SmallCap size + ATEErr (*GetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set SmallCap size + ATEErr (*SetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get ShowHiddenCharacters + ATEErr (*GetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); + /// Set ShowHiddenCharacters + ATEErr (*SetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); + /// Get Greeking Size + ATEErr (*GetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Int32* ret); + /// Set Greeking Size + ATEErr (*SetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Int32 value); + /// Get HighlightSubstituteFonts + ATEErr (*GetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); + /// Set HighlightSubstituteFonts + ATEErr (*SetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); + /// Get HighlightAlternateGlyphs + ATEErr (*GetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); + /// Set HighlightAlternateGlyphs + ATEErr (*SetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); + +}DocumentTextResourcesSuite; + +typedef struct DocumentTextResources1Suite{ + + // Reference count maintenance. + void (*AddRef) ( DocumentTextResourcesRef documenttextresources); + void (*Release) ( DocumentTextResourcesRef documenttextresources); + ATEBool8 (*IsNull) ( DocumentTextResourcesRef documenttextresources); + + // From parent class... + ATEErr (*GetKinsokuSet) ( DocumentTextResourcesRef documenttextresources, KinsokuSetRef* ret); + ATEErr (*GetMojiKumiSet) ( DocumentTextResourcesRef documenttextresources, MojiKumiSetRef* ret); + ATEErr (*GetCompFontClassSet) ( DocumentTextResourcesRef documenttextresources, CompFontClassSetRef* ret); + ATEErr (*GetCompFontSet) ( DocumentTextResourcesRef documenttextresources, CompFontSetRef* ret); + ATEErr (*GetTextResources) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef* ret); + ATEErr (*GetFind) ( DocumentTextResourcesRef documenttextresources, FindRef* ret); + ATEErr (*GetSpell) ( DocumentTextResourcesRef documenttextresources, SpellRef* ret); + ATEErr (*GetGlyphAndAlternates) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); + ATEErr (*GetAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); + ATEErr (*InsertAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ATETextDOM::Int32 otFeatureCount, const ATETextDOM::Int32* otFeatureIndexArray, ATEBool8 leaveSelected); + ATEErr (*GetAlternatesAvailableThroughoutSelection) ( DocumentTextResourcesRef documenttextresources, ArrayIntegerRef* ret); + ATEErr (*GetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, ATEBool8* isFeature, JapaneseAlternateFeature* ret); + ATEErr (*SetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, JapaneseAlternateFeature feature); + ATEErr (*GetCharStylesInDocument) ( DocumentTextResourcesRef documenttextresources, CharStylesRef* ret); + ATEErr (*GetParaStylesInDocument) ( DocumentTextResourcesRef documenttextresources, ParaStylesRef* ret); + /// Returns a named style corresponding to pName. If no matching + /// style can be found or *pName == L'\0' then a null object is returned. + ATEErr (*GetCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharStyleRef* ret); + ATEErr (*GetParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaStyleRef* ret); + ATEErr (*GetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); + ATEErr (*GetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources, ParaStyleRef* ret); + ATEErr (*ResetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources); + ATEErr (*ResetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources); + /// Routines to add new named styles to the document. If an existing + /// style already corresponds to pName or *pName == L'\0' then the + /// document is unchanged and a null object is returned. + ATEErr (*CreateCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharStyleRef* ret); + ATEErr (*CreateParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaStyleRef* ret); + ATEErr (*CreateCharStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, CharFeaturesRef pFeatures, CharStyleRef* ret); + ATEErr (*CreateParaStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ParaFeaturesRef pFeatures, ParaStyleRef* ret); + /// Removes a style from the document. Exact details will be provided + /// later. + /// + /// If no matching style in the document corresponds to pName or + /// *pName == L'\0' then the document is unchanged and false is returned. + ATEErr (*RemoveCharStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ATEBool8* ret); + ATEErr (*RemoveParaStyle) ( DocumentTextResourcesRef documenttextresources, const ATETextDOM::Unicode* pName, ATEBool8* ret); + /// Imports named styles from pSrcResources into current resource. + ATEErr (*ImportCharStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); + ATEErr (*ImportParaStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); + ATEErr (*SetUseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8 smartQuotesAreOn); + ATEErr (*SetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); + ATEErr (*SetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); + ATEErr (*UseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); + ATEErr (*GetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); + ATEErr (*GetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); + /// The library stores an internal set of insertion attributes either from + /// the last selection or from the last attribute change to text. This set + /// of insertion attributes comprises the local overrides (CharFeatures) + /// and the named style (CharStyle) + ATEErr (*GetInsertionCharFeatures) ( DocumentTextResourcesRef documenttextresources, CharFeaturesRef* ret); + ATEErr (*GetInsertionCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); + ATEErr (*SetInsertionFeaturesAndStyle) ( DocumentTextResourcesRef documenttextresources, const CharFeaturesRef pFeatures, const ATETextDOM::Unicode* pStyleName); + /// Get superscript size + ATEErr (*GetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set superscript size + ATEErr (*SetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get superscript position + ATEErr (*GetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set superscript position + ATEErr (*SetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get subscript size + ATEErr (*GetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set subscript size + ATEErr (*SetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get subscript position + ATEErr (*GetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set subscript position + ATEErr (*SetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get SmallCap size + ATEErr (*GetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float* ret); + /// Set SmallCap size + ATEErr (*SetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Float value); + /// Get ShowHiddenCharacters + ATEErr (*GetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); + /// Set ShowHiddenCharacters + ATEErr (*SetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); + /// Get Greeking Size + ATEErr (*GetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Int32* ret); + /// Set Greeking Size + ATEErr (*SetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ATETextDOM::Int32 value); + /// Get HighlightSubstituteFonts + ATEErr (*GetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); + /// Set HighlightSubstituteFonts + ATEErr (*SetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); + /// Get HighlightAlternateGlyphs + ATEErr (*GetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); + /// Set HighlightAlternateGlyphs + ATEErr (*SetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); + +}DocumentTextResources1Suite; + +////////////////////////////////////////////// +// --VersionInfoSuite-- +////////////////////////////////////////////// +#define kVersionInfoSuite "ATE VersionInfo Suite" +#define kVersionInfoSuiteVersion1 1 +#define kVersionInfoSuiteVersion kVersionInfoSuiteVersion1 + +typedef struct VersionInfoSuite{ + + // Reference count maintenance. + void (*AddRef) ( VersionInfoRef versioninfo); + void (*Release) ( VersionInfoRef versioninfo); + ATEBool8 (*IsNull) ( VersionInfoRef versioninfo); + + ATEErr (*Initialize) ( VersionInfoRef* versioninfo); + /// Return major version. + ATEErr (*GetMajorVersion) ( VersionInfoRef versioninfo, int* ret); + /// Return minor version. + ATEErr (*GetMinorVersion) ( VersionInfoRef versioninfo, int* ret); + /// Return sub minor version. + ATEErr (*GetSubMinorVersion) ( VersionInfoRef versioninfo, int* ret); + /// maxLength is the size of versionString in ASUTF16 units. + /// return is number of characters in versionString. + /// Here is usage:- + /// ASUTF16 versionString[256]; + /// GetVersionAsUTF16(versionString , 256); + ATEErr (*GetVersionAsUTF16) ( VersionInfoRef versioninfo, ASUTF16* versionString, int maxLength, int* ret); + +}VersionInfoSuite; + +////////////////////////////////////////////// +// --ArrayApplicationPaintRefSuite-- +////////////////////////////////////////////// +#define kArrayApplicationPaintRefSuite "ATE ArrayApplicationPaintRef Suite" +#define kArrayApplicationPaintRefSuiteVersion1 1 +#define kArrayApplicationPaintRefSuiteVersion kArrayApplicationPaintRefSuiteVersion1 + +typedef struct ArrayApplicationPaintRefSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayApplicationPaintRefRef arrayapplicationpaintref); + void (*Release) ( ArrayApplicationPaintRefRef arrayapplicationpaintref); + ATEBool8 (*IsNull) ( ArrayApplicationPaintRefRef arrayapplicationpaintref); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayApplicationPaintRefRef arrayapplicationpaintref, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayApplicationPaintRefRef arrayapplicationpaintref, ApplicationPaintRef* ret); + ATEErr (*GetLast) ( ArrayApplicationPaintRefRef arrayapplicationpaintref, ApplicationPaintRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayApplicationPaintRefRef arrayapplicationpaintref, ATETextDOM::Int32 index, ApplicationPaintRef* ret); + +}ArrayApplicationPaintRefSuite; + +////////////////////////////////////////////// +// --ArrayRealSuite-- +////////////////////////////////////////////// +#define kArrayRealSuite "ATE ArrayReal Suite" +#define kArrayRealSuiteVersion1 1 +#define kArrayRealSuiteVersion kArrayRealSuiteVersion1 + +typedef struct ArrayRealSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayRealRef arrayreal); + void (*Release) ( ArrayRealRef arrayreal); + ATEBool8 (*IsNull) ( ArrayRealRef arrayreal); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayRealRef arrayreal, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayRealRef arrayreal, ATETextDOM::Float* ret); + ATEErr (*GetLast) ( ArrayRealRef arrayreal, ATETextDOM::Float* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayRealRef arrayreal, ATETextDOM::Int32 index, ATETextDOM::Float* ret); + +}ArrayRealSuite; + +////////////////////////////////////////////// +// --ArrayBoolSuite-- +////////////////////////////////////////////// +#define kArrayBoolSuite "ATE ArrayBool Suite" +#define kArrayBoolSuiteVersion1 1 +#define kArrayBoolSuiteVersion kArrayBoolSuiteVersion1 + +typedef struct ArrayBoolSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayBoolRef arraybool); + void (*Release) ( ArrayBoolRef arraybool); + ATEBool8 (*IsNull) ( ArrayBoolRef arraybool); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayBoolRef arraybool, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayBoolRef arraybool, ATEBool8* ret); + ATEErr (*GetLast) ( ArrayBoolRef arraybool, ATEBool8* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayBoolRef arraybool, ATETextDOM::Int32 index, ATEBool8* ret); + +}ArrayBoolSuite; + +////////////////////////////////////////////// +// --ArrayIntegerSuite-- +////////////////////////////////////////////// +#define kArrayIntegerSuite "ATE ArrayInteger Suite" +#define kArrayIntegerSuiteVersion1 1 +#define kArrayIntegerSuiteVersion kArrayIntegerSuiteVersion1 + +typedef struct ArrayIntegerSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayIntegerRef arrayinteger); + void (*Release) ( ArrayIntegerRef arrayinteger); + ATEBool8 (*IsNull) ( ArrayIntegerRef arrayinteger); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayIntegerRef arrayinteger, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayIntegerRef arrayinteger, ATETextDOM::Int32* ret); + ATEErr (*GetLast) ( ArrayIntegerRef arrayinteger, ATETextDOM::Int32* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayIntegerRef arrayinteger, ATETextDOM::Int32 index, ATETextDOM::Int32* ret); + +}ArrayIntegerSuite; + +////////////////////////////////////////////// +// --ArrayLineCapTypeSuite-- +////////////////////////////////////////////// +#define kArrayLineCapTypeSuite "ATE ArrayLineCapType Suite" +#define kArrayLineCapTypeSuiteVersion1 1 +#define kArrayLineCapTypeSuiteVersion kArrayLineCapTypeSuiteVersion1 + +typedef struct ArrayLineCapTypeSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayLineCapTypeRef arraylinecaptype); + void (*Release) ( ArrayLineCapTypeRef arraylinecaptype); + ATEBool8 (*IsNull) ( ArrayLineCapTypeRef arraylinecaptype); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayLineCapTypeRef arraylinecaptype, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayLineCapTypeRef arraylinecaptype, LineCapType* ret); + ATEErr (*GetLast) ( ArrayLineCapTypeRef arraylinecaptype, LineCapType* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayLineCapTypeRef arraylinecaptype, ATETextDOM::Int32 index, LineCapType* ret); + +}ArrayLineCapTypeSuite; + +////////////////////////////////////////////// +// --ArrayFigureStyleSuite-- +////////////////////////////////////////////// +#define kArrayFigureStyleSuite "ATE ArrayFigureStyle Suite" +#define kArrayFigureStyleSuiteVersion1 1 +#define kArrayFigureStyleSuiteVersion kArrayFigureStyleSuiteVersion1 + +typedef struct ArrayFigureStyleSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayFigureStyleRef arrayfigurestyle); + void (*Release) ( ArrayFigureStyleRef arrayfigurestyle); + ATEBool8 (*IsNull) ( ArrayFigureStyleRef arrayfigurestyle); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayFigureStyleRef arrayfigurestyle, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayFigureStyleRef arrayfigurestyle, FigureStyle* ret); + ATEErr (*GetLast) ( ArrayFigureStyleRef arrayfigurestyle, FigureStyle* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayFigureStyleRef arrayfigurestyle, ATETextDOM::Int32 index, FigureStyle* ret); + +}ArrayFigureStyleSuite; + +////////////////////////////////////////////// +// --ArrayLineJoinTypeSuite-- +////////////////////////////////////////////// +#define kArrayLineJoinTypeSuite "ATE ArrayLineJoinType Suite" +#define kArrayLineJoinTypeSuiteVersion1 1 +#define kArrayLineJoinTypeSuiteVersion kArrayLineJoinTypeSuiteVersion1 + +typedef struct ArrayLineJoinTypeSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayLineJoinTypeRef arraylinejointype); + void (*Release) ( ArrayLineJoinTypeRef arraylinejointype); + ATEBool8 (*IsNull) ( ArrayLineJoinTypeRef arraylinejointype); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayLineJoinTypeRef arraylinejointype, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayLineJoinTypeRef arraylinejointype, LineJoinType* ret); + ATEErr (*GetLast) ( ArrayLineJoinTypeRef arraylinejointype, LineJoinType* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayLineJoinTypeRef arraylinejointype, ATETextDOM::Int32 index, LineJoinType* ret); + +}ArrayLineJoinTypeSuite; + +////////////////////////////////////////////// +// --ArrayWariChuJustificationSuite-- +////////////////////////////////////////////// +#define kArrayWariChuJustificationSuite "ATE ArrayWariChuJustification Suite" +#define kArrayWariChuJustificationSuiteVersion1 1 +#define kArrayWariChuJustificationSuiteVersion kArrayWariChuJustificationSuiteVersion1 + +typedef struct ArrayWariChuJustificationSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayWariChuJustificationRef arraywarichujustification); + void (*Release) ( ArrayWariChuJustificationRef arraywarichujustification); + ATEBool8 (*IsNull) ( ArrayWariChuJustificationRef arraywarichujustification); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayWariChuJustificationRef arraywarichujustification, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayWariChuJustificationRef arraywarichujustification, WariChuJustification* ret); + ATEErr (*GetLast) ( ArrayWariChuJustificationRef arraywarichujustification, WariChuJustification* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayWariChuJustificationRef arraywarichujustification, ATETextDOM::Int32 index, WariChuJustification* ret); + +}ArrayWariChuJustificationSuite; + +////////////////////////////////////////////// +// --ArrayStyleRunAlignmentSuite-- +////////////////////////////////////////////// +#define kArrayStyleRunAlignmentSuite "ATE ArrayStyleRunAlignment Suite" +#define kArrayStyleRunAlignmentSuiteVersion1 1 +#define kArrayStyleRunAlignmentSuiteVersion kArrayStyleRunAlignmentSuiteVersion1 + +typedef struct ArrayStyleRunAlignmentSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayStyleRunAlignmentRef arraystylerunalignment); + void (*Release) ( ArrayStyleRunAlignmentRef arraystylerunalignment); + ATEBool8 (*IsNull) ( ArrayStyleRunAlignmentRef arraystylerunalignment); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayStyleRunAlignmentRef arraystylerunalignment, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayStyleRunAlignmentRef arraystylerunalignment, StyleRunAlignment* ret); + ATEErr (*GetLast) ( ArrayStyleRunAlignmentRef arraystylerunalignment, StyleRunAlignment* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayStyleRunAlignmentRef arraystylerunalignment, ATETextDOM::Int32 index, StyleRunAlignment* ret); + +}ArrayStyleRunAlignmentSuite; + +////////////////////////////////////////////// +// --ArrayAutoKernTypeSuite-- +////////////////////////////////////////////// +#define kArrayAutoKernTypeSuite "ATE ArrayAutoKernType Suite" +#define kArrayAutoKernTypeSuiteVersion1 1 +#define kArrayAutoKernTypeSuiteVersion kArrayAutoKernTypeSuiteVersion1 + +typedef struct ArrayAutoKernTypeSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayAutoKernTypeRef arrayautokerntype); + void (*Release) ( ArrayAutoKernTypeRef arrayautokerntype); + ATEBool8 (*IsNull) ( ArrayAutoKernTypeRef arrayautokerntype); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayAutoKernTypeRef arrayautokerntype, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayAutoKernTypeRef arrayautokerntype, AutoKernType* ret); + ATEErr (*GetLast) ( ArrayAutoKernTypeRef arrayautokerntype, AutoKernType* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayAutoKernTypeRef arrayautokerntype, ATETextDOM::Int32 index, AutoKernType* ret); + +}ArrayAutoKernTypeSuite; + +////////////////////////////////////////////// +// --ArrayBaselineDirectionSuite-- +////////////////////////////////////////////// +#define kArrayBaselineDirectionSuite "ATE ArrayBaselineDirection Suite" +#define kArrayBaselineDirectionSuiteVersion1 1 +#define kArrayBaselineDirectionSuiteVersion kArrayBaselineDirectionSuiteVersion1 + +typedef struct ArrayBaselineDirectionSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayBaselineDirectionRef arraybaselinedirection); + void (*Release) ( ArrayBaselineDirectionRef arraybaselinedirection); + ATEBool8 (*IsNull) ( ArrayBaselineDirectionRef arraybaselinedirection); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayBaselineDirectionRef arraybaselinedirection, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayBaselineDirectionRef arraybaselinedirection, BaselineDirection* ret); + ATEErr (*GetLast) ( ArrayBaselineDirectionRef arraybaselinedirection, BaselineDirection* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayBaselineDirectionRef arraybaselinedirection, ATETextDOM::Int32 index, BaselineDirection* ret); + +}ArrayBaselineDirectionSuite; + +////////////////////////////////////////////// +// --ArrayLanguageSuite-- +////////////////////////////////////////////// +#define kArrayLanguageSuite "ATE ArrayLanguage Suite" +#define kArrayLanguageSuiteVersion1 1 +#define kArrayLanguageSuiteVersion kArrayLanguageSuiteVersion1 + +typedef struct ArrayLanguageSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayLanguageRef arraylanguage); + void (*Release) ( ArrayLanguageRef arraylanguage); + ATEBool8 (*IsNull) ( ArrayLanguageRef arraylanguage); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayLanguageRef arraylanguage, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayLanguageRef arraylanguage, Language* ret); + ATEErr (*GetLast) ( ArrayLanguageRef arraylanguage, Language* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayLanguageRef arraylanguage, ATETextDOM::Int32 index, Language* ret); + +}ArrayLanguageSuite; + +////////////////////////////////////////////// +// --ArrayFontCapsOptionSuite-- +////////////////////////////////////////////// +#define kArrayFontCapsOptionSuite "ATE ArrayFontCapsOption Suite" +#define kArrayFontCapsOptionSuiteVersion1 1 +#define kArrayFontCapsOptionSuiteVersion kArrayFontCapsOptionSuiteVersion1 + +typedef struct ArrayFontCapsOptionSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayFontCapsOptionRef arrayfontcapsoption); + void (*Release) ( ArrayFontCapsOptionRef arrayfontcapsoption); + ATEBool8 (*IsNull) ( ArrayFontCapsOptionRef arrayfontcapsoption); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayFontCapsOptionRef arrayfontcapsoption, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayFontCapsOptionRef arrayfontcapsoption, FontCapsOption* ret); + ATEErr (*GetLast) ( ArrayFontCapsOptionRef arrayfontcapsoption, FontCapsOption* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayFontCapsOptionRef arrayfontcapsoption, ATETextDOM::Int32 index, FontCapsOption* ret); + +}ArrayFontCapsOptionSuite; + +////////////////////////////////////////////// +// --ArrayFontBaselineOptionSuite-- +////////////////////////////////////////////// +#define kArrayFontBaselineOptionSuite "ATE ArrayFontBaselineOption Suite" +#define kArrayFontBaselineOptionSuiteVersion1 1 +#define kArrayFontBaselineOptionSuiteVersion kArrayFontBaselineOptionSuiteVersion1 + +typedef struct ArrayFontBaselineOptionSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayFontBaselineOptionRef arrayfontbaselineoption); + void (*Release) ( ArrayFontBaselineOptionRef arrayfontbaselineoption); + ATEBool8 (*IsNull) ( ArrayFontBaselineOptionRef arrayfontbaselineoption); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayFontBaselineOptionRef arrayfontbaselineoption, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayFontBaselineOptionRef arrayfontbaselineoption, FontBaselineOption* ret); + ATEErr (*GetLast) ( ArrayFontBaselineOptionRef arrayfontbaselineoption, FontBaselineOption* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayFontBaselineOptionRef arrayfontbaselineoption, ATETextDOM::Int32 index, FontBaselineOption* ret); + +}ArrayFontBaselineOptionSuite; + +////////////////////////////////////////////// +// --ArrayFontOpenTypePositionOptionSuite-- +////////////////////////////////////////////// +#define kArrayFontOpenTypePositionOptionSuite "ATE ArrayFontOpenTypePositionOption Suite" +#define kArrayFontOpenTypePositionOptionSuiteVersion1 1 +#define kArrayFontOpenTypePositionOptionSuiteVersion kArrayFontOpenTypePositionOptionSuiteVersion1 + +typedef struct ArrayFontOpenTypePositionOptionSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption); + void (*Release) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption); + ATEBool8 (*IsNull) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption, FontOpenTypePositionOption* ret); + ATEErr (*GetLast) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption, FontOpenTypePositionOption* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption, ATETextDOM::Int32 index, FontOpenTypePositionOption* ret); + +}ArrayFontOpenTypePositionOptionSuite; + +////////////////////////////////////////////// +// --ArrayUnderlinePositionSuite-- +////////////////////////////////////////////// +#define kArrayUnderlinePositionSuite "ATE ArrayUnderlinePosition Suite" +#define kArrayUnderlinePositionSuiteVersion1 1 +#define kArrayUnderlinePositionSuiteVersion kArrayUnderlinePositionSuiteVersion1 + +typedef struct ArrayUnderlinePositionSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayUnderlinePositionRef arrayunderlineposition); + void (*Release) ( ArrayUnderlinePositionRef arrayunderlineposition); + ATEBool8 (*IsNull) ( ArrayUnderlinePositionRef arrayunderlineposition); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayUnderlinePositionRef arrayunderlineposition, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayUnderlinePositionRef arrayunderlineposition, UnderlinePosition* ret); + ATEErr (*GetLast) ( ArrayUnderlinePositionRef arrayunderlineposition, UnderlinePosition* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayUnderlinePositionRef arrayunderlineposition, ATETextDOM::Int32 index, UnderlinePosition* ret); + +}ArrayUnderlinePositionSuite; + +////////////////////////////////////////////// +// --ArrayStrikethroughPositionSuite-- +////////////////////////////////////////////// +#define kArrayStrikethroughPositionSuite "ATE ArrayStrikethroughPosition Suite" +#define kArrayStrikethroughPositionSuiteVersion1 1 +#define kArrayStrikethroughPositionSuiteVersion kArrayStrikethroughPositionSuiteVersion1 + +typedef struct ArrayStrikethroughPositionSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayStrikethroughPositionRef arraystrikethroughposition); + void (*Release) ( ArrayStrikethroughPositionRef arraystrikethroughposition); + ATEBool8 (*IsNull) ( ArrayStrikethroughPositionRef arraystrikethroughposition); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayStrikethroughPositionRef arraystrikethroughposition, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayStrikethroughPositionRef arraystrikethroughposition, StrikethroughPosition* ret); + ATEErr (*GetLast) ( ArrayStrikethroughPositionRef arraystrikethroughposition, StrikethroughPosition* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayStrikethroughPositionRef arraystrikethroughposition, ATETextDOM::Int32 index, StrikethroughPosition* ret); + +}ArrayStrikethroughPositionSuite; + +////////////////////////////////////////////// +// --ArrayParagraphJustificationSuite-- +////////////////////////////////////////////// +#define kArrayParagraphJustificationSuite "ATE ArrayParagraphJustification Suite" +#define kArrayParagraphJustificationSuiteVersion1 1 +#define kArrayParagraphJustificationSuiteVersion kArrayParagraphJustificationSuiteVersion1 + +typedef struct ArrayParagraphJustificationSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayParagraphJustificationRef arrayparagraphjustification); + void (*Release) ( ArrayParagraphJustificationRef arrayparagraphjustification); + ATEBool8 (*IsNull) ( ArrayParagraphJustificationRef arrayparagraphjustification); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayParagraphJustificationRef arrayparagraphjustification, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayParagraphJustificationRef arrayparagraphjustification, ParagraphJustification* ret); + ATEErr (*GetLast) ( ArrayParagraphJustificationRef arrayparagraphjustification, ParagraphJustification* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayParagraphJustificationRef arrayparagraphjustification, ATETextDOM::Int32 index, ParagraphJustification* ret); + +}ArrayParagraphJustificationSuite; + +////////////////////////////////////////////// +// --ArrayArrayRealSuite-- +////////////////////////////////////////////// +#define kArrayArrayRealSuite "ATE ArrayArrayReal Suite" +#define kArrayArrayRealSuiteVersion1 1 +#define kArrayArrayRealSuiteVersion kArrayArrayRealSuiteVersion1 + +typedef struct ArrayArrayRealSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayArrayRealRef arrayarrayreal); + void (*Release) ( ArrayArrayRealRef arrayarrayreal); + ATEBool8 (*IsNull) ( ArrayArrayRealRef arrayarrayreal); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayArrayRealRef arrayarrayreal, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayArrayRealRef arrayarrayreal, ArrayRealRef* ret); + ATEErr (*GetLast) ( ArrayArrayRealRef arrayarrayreal, ArrayRealRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayArrayRealRef arrayarrayreal, ATETextDOM::Int32 index, ArrayRealRef* ret); + +}ArrayArrayRealSuite; + +////////////////////////////////////////////// +// --ArrayBurasagariTypeSuite-- +////////////////////////////////////////////// +#define kArrayBurasagariTypeSuite "ATE ArrayBurasagariType Suite" +#define kArrayBurasagariTypeSuiteVersion1 1 +#define kArrayBurasagariTypeSuiteVersion kArrayBurasagariTypeSuiteVersion1 + +typedef struct ArrayBurasagariTypeSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayBurasagariTypeRef arrayburasagaritype); + void (*Release) ( ArrayBurasagariTypeRef arrayburasagaritype); + ATEBool8 (*IsNull) ( ArrayBurasagariTypeRef arrayburasagaritype); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayBurasagariTypeRef arrayburasagaritype, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayBurasagariTypeRef arrayburasagaritype, BurasagariType* ret); + ATEErr (*GetLast) ( ArrayBurasagariTypeRef arrayburasagaritype, BurasagariType* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayBurasagariTypeRef arrayburasagaritype, ATETextDOM::Int32 index, BurasagariType* ret); + +}ArrayBurasagariTypeSuite; + +////////////////////////////////////////////// +// --ArrayPreferredKinsokuOrderSuite-- +////////////////////////////////////////////// +#define kArrayPreferredKinsokuOrderSuite "ATE ArrayPreferredKinsokuOrder Suite" +#define kArrayPreferredKinsokuOrderSuiteVersion1 1 +#define kArrayPreferredKinsokuOrderSuiteVersion kArrayPreferredKinsokuOrderSuiteVersion1 + +typedef struct ArrayPreferredKinsokuOrderSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder); + void (*Release) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder); + ATEBool8 (*IsNull) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder, PreferredKinsokuOrder* ret); + ATEErr (*GetLast) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder, PreferredKinsokuOrder* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder, ATETextDOM::Int32 index, PreferredKinsokuOrder* ret); + +}ArrayPreferredKinsokuOrderSuite; + +////////////////////////////////////////////// +// --ArrayKinsokuRefSuite-- +////////////////////////////////////////////// +#define kArrayKinsokuRefSuite "ATE ArrayKinsokuRef Suite" +#define kArrayKinsokuRefSuiteVersion1 1 +#define kArrayKinsokuRefSuiteVersion kArrayKinsokuRefSuiteVersion1 + +typedef struct ArrayKinsokuRefSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayKinsokuRefRef arraykinsokuref); + void (*Release) ( ArrayKinsokuRefRef arraykinsokuref); + ATEBool8 (*IsNull) ( ArrayKinsokuRefRef arraykinsokuref); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayKinsokuRefRef arraykinsokuref, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayKinsokuRefRef arraykinsokuref, KinsokuRef* ret); + ATEErr (*GetLast) ( ArrayKinsokuRefRef arraykinsokuref, KinsokuRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayKinsokuRefRef arraykinsokuref, ATETextDOM::Int32 index, KinsokuRef* ret); + +}ArrayKinsokuRefSuite; + +////////////////////////////////////////////// +// --ArrayListStyleRefSuite-- +////////////////////////////////////////////// +#define kArrayListStyleRefSuite "ATE ArrayListStyleRef Suite" +#define kArrayListStyleRefSuiteVersion1 1 +#define kArrayListStyleRefSuiteVersion kArrayListStyleRefSuiteVersion1 + +typedef struct ArrayListStyleRefSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayListStyleRefRef arrayListStyleref); + void (*Release) ( ArrayListStyleRefRef arrayListStyleref); + ATEBool8 (*IsNull) ( ArrayListStyleRefRef arrayListStyleref); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayListStyleRefRef arrayListStyleref, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayListStyleRefRef arrayListStyleref, ListStyleRef* ret); + ATEErr (*GetLast) ( ArrayListStyleRefRef arrayListStyleref, ListStyleRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayListStyleRefRef arrayListStyleref, ATETextDOM::Int32 index, ListStyleRef* ret); + +}ArrayListStyleRefSuite; + +////////////////////////////////////////////// +// --ArrayListStyleSetRefSuite-- +////////////////////////////////////////////// +#define kArrayListStyleSetRefSuite "ATE ArrayListStyleSetRef Suite" +#define kArrayListStyleSetRefSuiteVersion1 1 +#define kArrayListStyleSetRefSuiteVersion kArrayListStyleSetRefSuiteVersion1 + +typedef struct ArrayListStyleSetRefSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayListStyleSetRefRef arrayListStylesetref); + void (*Release) ( ArrayListStyleSetRefRef arrayListStylesetref); + ATEBool8 (*IsNull) ( ArrayListStyleSetRefRef arrayListStylesetref); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayListStyleSetRefRef arrayListStylesetref, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayListStyleSetRefRef arrayListStylesetref, ListStyleSetRef* ret); + ATEErr (*GetLast) ( ArrayListStyleSetRefRef arrayListStylesetref, ListStyleSetRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayListStyleSetRefRef arrayListStylesetref, ATETextDOM::Int32 index, ListStyleSetRef* ret); + +}ArrayListStyleSetRefSuite; + + +////////////////////////////////////////////// +// --ArrayMojiKumiRefSuite-- +////////////////////////////////////////////// +#define kArrayMojiKumiRefSuite "ATE ArrayMojiKumiRef Suite" +#define kArrayMojiKumiRefSuiteVersion1 1 +#define kArrayMojiKumiRefSuiteVersion kArrayMojiKumiRefSuiteVersion1 + +typedef struct ArrayMojiKumiRefSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayMojiKumiRefRef arraymojikumiref); + void (*Release) ( ArrayMojiKumiRefRef arraymojikumiref); + ATEBool8 (*IsNull) ( ArrayMojiKumiRefRef arraymojikumiref); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayMojiKumiRefRef arraymojikumiref, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayMojiKumiRefRef arraymojikumiref, MojiKumiRef* ret); + ATEErr (*GetLast) ( ArrayMojiKumiRefRef arraymojikumiref, MojiKumiRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayMojiKumiRefRef arraymojikumiref, ATETextDOM::Int32 index, MojiKumiRef* ret); + +}ArrayMojiKumiRefSuite; + +////////////////////////////////////////////// +// --ArrayMojiKumiSetRefSuite-- +////////////////////////////////////////////// +#define kArrayMojiKumiSetRefSuite "ATE ArrayMojiKumiSetRef Suite" +#define kArrayMojiKumiSetRefSuiteVersion1 1 +#define kArrayMojiKumiSetRefSuiteVersion kArrayMojiKumiSetRefSuiteVersion1 + +typedef struct ArrayMojiKumiSetRefSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayMojiKumiSetRefRef arraymojikumisetref); + void (*Release) ( ArrayMojiKumiSetRefRef arraymojikumisetref); + ATEBool8 (*IsNull) ( ArrayMojiKumiSetRefRef arraymojikumisetref); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayMojiKumiSetRefRef arraymojikumisetref, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayMojiKumiSetRefRef arraymojikumisetref, MojiKumiSetRef* ret); + ATEErr (*GetLast) ( ArrayMojiKumiSetRefRef arraymojikumisetref, MojiKumiSetRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayMojiKumiSetRefRef arraymojikumisetref, ATETextDOM::Int32 index, MojiKumiSetRef* ret); + +}ArrayMojiKumiSetRefSuite; + +////////////////////////////////////////////// +// --ArrayTabStopsRefSuite-- +////////////////////////////////////////////// +#define kArrayTabStopsRefSuite "ATE ArrayTabStopsRef Suite" +#define kArrayTabStopsRefSuiteVersion1 1 +#define kArrayTabStopsRefSuiteVersion kArrayTabStopsRefSuiteVersion1 + +typedef struct ArrayTabStopsRefSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayTabStopsRefRef arraytabstopsref); + void (*Release) ( ArrayTabStopsRefRef arraytabstopsref); + ATEBool8 (*IsNull) ( ArrayTabStopsRefRef arraytabstopsref); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayTabStopsRefRef arraytabstopsref, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayTabStopsRefRef arraytabstopsref, TabStopsRef* ret); + ATEErr (*GetLast) ( ArrayTabStopsRefRef arraytabstopsref, TabStopsRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayTabStopsRefRef arraytabstopsref, ATETextDOM::Int32 index, TabStopsRef* ret); + +}ArrayTabStopsRefSuite; + +////////////////////////////////////////////// +// --ArrayLeadingTypeSuite-- +////////////////////////////////////////////// +#define kArrayLeadingTypeSuite "ATE ArrayLeadingType Suite" +#define kArrayLeadingTypeSuiteVersion1 1 +#define kArrayLeadingTypeSuiteVersion kArrayLeadingTypeSuiteVersion1 + +typedef struct ArrayLeadingTypeSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayLeadingTypeRef arrayleadingtype); + void (*Release) ( ArrayLeadingTypeRef arrayleadingtype); + ATEBool8 (*IsNull) ( ArrayLeadingTypeRef arrayleadingtype); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayLeadingTypeRef arrayleadingtype, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayLeadingTypeRef arrayleadingtype, LeadingType* ret); + ATEErr (*GetLast) ( ArrayLeadingTypeRef arrayleadingtype, LeadingType* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayLeadingTypeRef arrayleadingtype, ATETextDOM::Int32 index, LeadingType* ret); + +}ArrayLeadingTypeSuite; + +////////////////////////////////////////////// +// --ArrayFontRefSuite-- +////////////////////////////////////////////// +#define kArrayFontRefSuite "ATE ArrayFontRef Suite" +#define kArrayFontRefSuiteVersion1 1 +#define kArrayFontRefSuiteVersion kArrayFontRefSuiteVersion1 + +typedef struct ArrayFontRefSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayFontRefRef arrayfontref); + void (*Release) ( ArrayFontRefRef arrayfontref); + ATEBool8 (*IsNull) ( ArrayFontRefRef arrayfontref); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayFontRefRef arrayfontref, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayFontRefRef arrayfontref, FontRef* ret); + ATEErr (*GetLast) ( ArrayFontRefRef arrayfontref, FontRef* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayFontRefRef arrayfontref, ATETextDOM::Int32 index, FontRef* ret); + +}ArrayFontRefSuite; + +////////////////////////////////////////////// +// --ArrayGlyphIDSuite-- +////////////////////////////////////////////// +#define kArrayGlyphIDSuite "ATE ArrayGlyphID Suite" +#define kArrayGlyphIDSuiteVersion1 1 +#define kArrayGlyphIDSuiteVersion kArrayGlyphIDSuiteVersion1 + +typedef struct ArrayGlyphIDSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayGlyphIDRef arrayglyphid); + void (*Release) ( ArrayGlyphIDRef arrayglyphid); + ATEBool8 (*IsNull) ( ArrayGlyphIDRef arrayglyphid); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayGlyphIDRef arrayglyphid, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayGlyphIDRef arrayglyphid, ATEGlyphID* ret); + ATEErr (*GetLast) ( ArrayGlyphIDRef arrayglyphid, ATEGlyphID* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayGlyphIDRef arrayglyphid, ATETextDOM::Int32 index, ATEGlyphID* ret); + +}ArrayGlyphIDSuite; + +////////////////////////////////////////////// +// --ArrayRealPointSuite-- +////////////////////////////////////////////// +#define kArrayRealPointSuite "ATE ArrayRealPoint Suite" +#define kArrayRealPointSuiteVersion1 1 +#define kArrayRealPointSuiteVersion kArrayRealPointSuiteVersion1 + +typedef struct ArrayRealPointSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayRealPointRef arrayrealpoint); + void (*Release) ( ArrayRealPointRef arrayrealpoint); + ATEBool8 (*IsNull) ( ArrayRealPointRef arrayrealpoint); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayRealPointRef arrayrealpoint, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayRealPointRef arrayrealpoint, ATETextDOM::FloatPoint* ret); + ATEErr (*GetLast) ( ArrayRealPointRef arrayrealpoint, ATETextDOM::FloatPoint* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayRealPointRef arrayrealpoint, ATETextDOM::Int32 index, ATETextDOM::FloatPoint* ret); + +}ArrayRealPointSuite; + +////////////////////////////////////////////// +// --ArrayRealMatrixSuite-- +////////////////////////////////////////////// +#define kArrayRealMatrixSuite "ATE ArrayRealMatrix Suite" +#define kArrayRealMatrixSuiteVersion1 1 +#define kArrayRealMatrixSuiteVersion kArrayRealMatrixSuiteVersion1 + +typedef struct ArrayRealMatrixSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayRealMatrixRef arrayrealmatrix); + void (*Release) ( ArrayRealMatrixRef arrayrealmatrix); + ATEBool8 (*IsNull) ( ArrayRealMatrixRef arrayrealmatrix); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayRealMatrixRef arrayrealmatrix, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayRealMatrixRef arrayrealmatrix, ATETextDOM::FloatMatrix* ret); + ATEErr (*GetLast) ( ArrayRealMatrixRef arrayrealmatrix, ATETextDOM::FloatMatrix* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayRealMatrixRef arrayrealmatrix, ATETextDOM::Int32 index, ATETextDOM::FloatMatrix* ret); + +}ArrayRealMatrixSuite; + +#if SLO_COMPLEXSCRIPT +////////////////////////////////////////////// +// --ArrayParagraphDirectionSuite-- +////////////////////////////////////////////// +#define kArrayParagraphDirectionSuite "ATE ArrayParagraphDirection Suite" +#define kArrayParagraphDirectionSuiteVersion1 1 +#define kArrayParagraphDirectionSuiteVersion kArrayParagraphDirectionSuiteVersion1 + +typedef struct ArrayParagraphDirectionSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayParagraphDirectionRef arrayparagraphdirection); + void (*Release) ( ArrayParagraphDirectionRef arrayparagraphdirection); + ATEBool8 (*IsNull) ( ArrayParagraphDirectionRef arrayparagraphdirection); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayParagraphDirectionRef arrayparagraphdirection, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayParagraphDirectionRef arrayparagraphdirection, ParagraphDirection* ret); + ATEErr (*GetLast) ( ArrayParagraphDirectionRef arrayparagraphdirection, ParagraphDirection* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayParagraphDirectionRef arrayparagraphdirection, ATETextDOM::Int32 index, ParagraphDirection* ret); + +}ArrayParagraphDirectionSuite; + +////////////////////////////////////////////// +// --ArrayJustificationMethodSuite-- +////////////////////////////////////////////// +#define kArrayJustificationMethodSuite "ATE ArrayJustificationMethod Suite" +#define kArrayJustificationMethodSuiteVersion1 1 +#define kArrayJustificationMethodSuiteVersion kArrayJustificationMethodSuiteVersion1 + +typedef struct ArrayJustificationMethodSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayJustificationMethodRef arrayjustificationmethod); + void (*Release) ( ArrayJustificationMethodRef arrayjustificationmethod); + ATEBool8 (*IsNull) ( ArrayJustificationMethodRef arrayjustificationmethod); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayJustificationMethodRef arrayjustificationmethod, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayJustificationMethodRef arrayjustificationmethod, JustificationMethod* ret); + ATEErr (*GetLast) ( ArrayJustificationMethodRef arrayjustificationmethod, JustificationMethod* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayJustificationMethodRef arrayjustificationmethod, ATETextDOM::Int32 index, JustificationMethod* ret); + +}ArrayJustificationMethodSuite; + +////////////////////////////////////////////// +// --ArrayKashidaWidthSuite-- +////////////////////////////////////////////// +#define kArrayKashidaWidthSuite "ATE ArrayKashidaWidth Suite" +#define kArrayKashidaWidthSuiteVersion1 1 +#define kArrayKashidaWidthSuiteVersion kArrayKashidaWidthSuiteVersion1 + +typedef struct ArrayKashidaWidthSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayKashidaWidthRef arraykashidawidth); + void (*Release) ( ArrayKashidaWidthRef arraykashidawidth); + ATEBool8 (*IsNull) ( ArrayKashidaWidthRef arraykashidawidth); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayKashidaWidthRef arraykashidawidth, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayKashidaWidthRef arraykashidawidth, KashidaWidth* ret); + ATEErr (*GetLast) ( ArrayKashidaWidthRef arraykashidawidth, KashidaWidth* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayKashidaWidthRef arraykashidawidth, ATETextDOM::Int32 index, KashidaWidth* ret); + +}ArrayKashidaWidthSuite; + +////////////////////////////////////////////// +// --ArrayKashidasSuite-- +////////////////////////////////////////////// +#define kArrayKashidasSuite "ATE ArrayKashidas Suite" +#define kArrayKashidasSuiteVersion1 1 +#define kArrayKashidasSuiteVersion kArrayKashidasSuiteVersion1 + +typedef struct ArrayKashidasSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayKashidasRef arraykashidas); + void (*Release) ( ArrayKashidasRef arraykashidas); + ATEBool8 (*IsNull) ( ArrayKashidasRef arraykashidas); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayKashidasRef arraykashidas, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayKashidasRef arraykashidas, Kashidas* ret); + ATEErr (*GetLast) ( ArrayKashidasRef arraykashidas, Kashidas* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayKashidasRef arraykashidas, ATETextDOM::Int32 index, Kashidas* ret); + +}ArrayKashidasSuite; + +////////////////////////////////////////////// +// --ArrayDirOverrideSuite-- +////////////////////////////////////////////// +#define kArrayDirOverrideSuite "ATE ArrayDirOverride Suite" +#define kArrayDirOverrideSuiteVersion1 1 +#define kArrayDirOverrideSuiteVersion kArrayDirOverrideSuiteVersion1 + +typedef struct ArrayDirOverrideSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayDirOverrideRef arraydiroverride); + void (*Release) ( ArrayDirOverrideRef arraydiroverride); + ATEBool8 (*IsNull) ( ArrayDirOverrideRef arraydiroverride); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayDirOverrideRef arraydiroverride, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayDirOverrideRef arraydiroverride, DirOverride* ret); + ATEErr (*GetLast) ( ArrayDirOverrideRef arraydiroverride, DirOverride* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayDirOverrideRef arraydiroverride, ATETextDOM::Int32 index, DirOverride* ret); + +}ArrayDirOverrideSuite; + +////////////////////////////////////////////// +// --ArrayDigitSetSuite-- +////////////////////////////////////////////// +#define kArrayDigitSetSuite "ATE ArrayDigitSet Suite" +#define kArrayDigitSetSuiteVersion1 1 +#define kArrayDigitSetSuiteVersion kArrayDigitSetSuiteVersion1 + +typedef struct ArrayDigitSetSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayDigitSetRef arraydigitset); + void (*Release) ( ArrayDigitSetRef arraydigitset); + ATEBool8 (*IsNull) ( ArrayDigitSetRef arraydigitset); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayDigitSetRef arraydigitset, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayDigitSetRef arraydigitset, DigitSet* ret); + ATEErr (*GetLast) ( ArrayDigitSetRef arraydigitset, DigitSet* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayDigitSetRef arraydigitset, ATETextDOM::Int32 index, DigitSet* ret); + +}ArrayDigitSetSuite; + +////////////////////////////////////////////// +// --ArrayDiacVPosSuite-- +////////////////////////////////////////////// +#define kArrayDiacVPosSuite "ATE ArrayDiacVPos Suite" +#define kArrayDiacVPosSuiteVersion1 1 +#define kArrayDiacVPosSuiteVersion kArrayDiacVPosSuiteVersion1 + +typedef struct ArrayDiacVPosSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayDiacVPosRef arraydiacvpos); + void (*Release) ( ArrayDiacVPosRef arraydiacvpos); + ATEBool8 (*IsNull) ( ArrayDiacVPosRef arraydiacvpos); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayDiacVPosRef arraydiacvpos, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayDiacVPosRef arraydiacvpos, DiacVPos* ret); + ATEErr (*GetLast) ( ArrayDiacVPosRef arraydiacvpos, DiacVPos* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayDiacVPosRef arraydiacvpos, ATETextDOM::Int32 index, DiacVPos* ret); + +}ArrayDiacVPosSuite; +#endif + +////////////////////////////////////////////// +// --CharFeaturesSuite-- +////////////////////////////////////////////// +#define kCharFeaturesSuite "ATE CharFeatures Suite" +#if SLO_COMPLEXSCRIPT +#define kCharFeaturesSuiteVersion101 101 +#define kCharFeaturesSuiteVersion102 102 +#define kCharFeaturesSuiteVersion kCharFeaturesSuiteVersion102 +#else +#define kCharFeaturesSuiteVersion101 1 +#define kCharFeaturesSuiteVersion102 2 +#define kCharFeaturesSuiteVersion kCharFeaturesSuiteVersion102 +#endif + +typedef struct CharFeaturesSuite{ + + // Reference count maintenance. + void (*AddRef) ( CharFeaturesRef charfeatures); + void (*Release) ( CharFeaturesRef charfeatures); + ATEBool8 (*IsNull) ( CharFeaturesRef charfeatures); + + // CharFeatures is a complete Set of character attributes that + // can be applied to text (except for kerning). They can be used to + // describe or Set the (1) local character attributes of text (a.k.a. + // the local overrides or (2) attributes of a named character style. + // + // Often, a given CharFeatures instance will only partially define + // each of its attributes. The validity of an attribute is + // determined by an associated boolean. Calls to "Get" methods + // return an "isAssigned" boolean that reflects the validity of + // the returned argument. Calls to "Set" methods always Set the + // associated boolean to indicate validity. Calls to "clear" + // methods always invalidate that boolean/attribute pair. + // + // A character's attribute is determined by an inheritance model. + // At the top is the "Normal" style which fully defines all + // attributes. These can be overriden by a named style or a local + // override, where an attribute is valid. + // + // A given attribute value of a character is determined by starting + // with the local override for that attribute if it is defined. If + // not, then the attribute comes from the corresponding named style + // (if it exists and) if it is defined. If all else fails, the + // default value comes from the "Normal" character style. + // + // Default constructor creates a "blank" CharFeatures instance where + // all attributes are undefined (invalid). + ATEErr (*Initialize) ( CharFeaturesRef* charfeatures); + ATEErr (*Clone) ( CharFeaturesRef charfeatures, CharFeaturesRef* ret); + ATEErr (*GetFont) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontRef* ret); + ATEErr (*GetFontSize) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetHorizontalScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetVerticalScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetAutoLeading) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetLeading) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetTracking) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetBaselineShift) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetCharacterRotation) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + /** Kern type information is only available for CharStyle instances. + Use Story::GetKern( ) to obtain kern type information for a TextRange. + */ + ATEErr (*GetAutoKernType) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, AutoKernType* ret); + ATEErr (*GetFontCapsOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontCapsOption* ret); + ATEErr (*GetFontBaselineOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontBaselineOption* ret); + ATEErr (*GetFontOpenTypePositionOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontOpenTypePositionOption* ret); + ATEErr (*GetStrikethroughPosition) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, StrikethroughPosition* ret); + ATEErr (*GetUnderlinePosition) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, UnderlinePosition* ret); + ATEErr (*GetUnderlineOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + // ------------------------------------------------------------------ + // OpenType features + // ------------------------------------------------------------------ + ATEErr (*GetLigature) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetDiscretionaryLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetContextualLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetAlternateLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetOldStyle) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetFractions) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetOrdinals) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetSwash) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetTitling) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetConnectionForms) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetStylisticAlternates) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetStylisticSets) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetOrnaments) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetFigureStyle) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FigureStyle* ret); + // ------------------------------------------------------------------ + // Japanese OpenType feature support + // ------------------------------------------------------------------ + ATEErr (*GetProportionalMetrics) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetKana) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetRuby) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetItalics) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetBaselineDirection) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, BaselineDirection* ret); + ATEErr (*GetLanguage) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, Language* ret); + ATEErr (*GetJapaneseAlternateFeature) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, JapaneseAlternateFeature* ret); + ATEErr (*GetTsume) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetStyleRunAlignment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, StyleRunAlignment* ret); + // ------------------------------------------------------------------ + // WariChu Setings + // ------------------------------------------------------------------ + ATEErr (*GetWariChuEnabled) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetWariChuLineCount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetWariChuLineGap) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetWariChuScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetWariChuSize) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetWariChuWidowAmount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetWariChuOrphanAmount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetWariChuJustification) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, WariChuJustification* ret); + ATEErr (*GetTCYUpDownAdjustment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetLeftAki) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetRightAki) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetNoBreak) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetFillColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); + ATEErr (*GetStrokeColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); + ATEErr (*GetFill) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetStroke) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetFillFirst) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetFillOverPrint) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetStrokeOverPrint) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetLineCap) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineCapType* ret); + ATEErr (*GetLineJoin) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineJoinType* ret); + ATEErr (*GetLineWidth) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMiterLimit) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetLineDashOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetLineDashArray) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ArrayRealRef* ret); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script Setings + // ------------------------------------------------------------------ + ATEErr (*GetKashidas) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, Kashidas* ret); + ATEErr (*GetDirOverride) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, DirOverride* ret); + ATEErr (*GetDigitSet) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, DigitSet* ret); + ATEErr (*GetDiacVPos) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, DiacVPos* ret); + ATEErr (*GetDiacXOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetDiacYOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetAutoMydfb) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetMarkYDistFromBaseline) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetOverlapSwash) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetJustificationAlternates) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetStretchedAlternates) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +#endif + // SET PROPERTIES + // ====================================================================== + ATEErr (*SetFont) ( CharFeaturesRef charfeatures, FontRef newVal); + /** Set font size + This function will throw kOutOfRange error if (newVal > 1296 || newVal < 0.1) + */ + ATEErr (*SetFontSize) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + /** Set Horizontal Scale + This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) + If newVal is 1, this means 100% in the character palatte. + */ + ATEErr (*SetHorizontalScale) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + /** Set Vertical Scale + This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) + If newVal is 1, this means 100% in the character palatte. + */ + ATEErr (*SetVerticalScale) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetAutoLeading) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetLeading) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetTracking) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetBaselineShift) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetCharacterRotation) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetAutoKernType) ( CharFeaturesRef charfeatures, AutoKernType newVal); + ATEErr (*SetFontCapsOption) ( CharFeaturesRef charfeatures, FontCapsOption newVal); + ATEErr (*SetFontBaselineOption) ( CharFeaturesRef charfeatures, FontBaselineOption newVal); + ATEErr (*SetFontOpenTypePositionOption) ( CharFeaturesRef charfeatures, FontOpenTypePositionOption newVal); + ATEErr (*SetStrikethroughPosition) ( CharFeaturesRef charfeatures, StrikethroughPosition newVal); + ATEErr (*SetUnderlinePosition) ( CharFeaturesRef charfeatures, UnderlinePosition newVal); + ATEErr (*SetUnderlineOffset) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + // ------------------------------------------------------------------ + // OpenType features + // ------------------------------------------------------------------ + ATEErr (*SetLigature) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetDiscretionaryLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetContextualLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetAlternateLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetOldStyle) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetFractions) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetOrdinals) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetSwash) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetTitling) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetConnectionForms) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetStylisticAlternates) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetStylisticSets) (CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetOrnaments) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetFigureStyle) ( CharFeaturesRef charfeatures, FigureStyle newVal); + // ------------------------------------------------------------------ + // Japanese OpenType feature support + // ------------------------------------------------------------------ + ATEErr (*SetProportionalMetrics) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetKana) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetItalics) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetRuby) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetBaselineDirection) ( CharFeaturesRef charfeatures, BaselineDirection newVal); + ATEErr (*SetLanguage) ( CharFeaturesRef charfeatures, Language newVal); + ATEErr (*SetJapaneseAlternateFeature) ( CharFeaturesRef charfeatures, JapaneseAlternateFeature newVal); + ATEErr (*SetTsume) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetStyleRunAlignment) ( CharFeaturesRef charfeatures, StyleRunAlignment newVal); + // ------------------------------------------------------------------ + // WariChu Setings + // ------------------------------------------------------------------ + ATEErr (*SetWariChuEnabled) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetWariChuLineCount) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetWariChuLineGap) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetWariChuScale) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetWariChuSize) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetWariChuWidowAmount) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetWariChuOrphanAmount) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetWariChuJustification) ( CharFeaturesRef charfeatures, WariChuJustification newVal); + ATEErr (*SetTCYUpDownAdjustment) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetLeftAki) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetRightAki) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetNoBreak) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetFillColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); + ATEErr (*SetStrokeColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); + ATEErr (*SetFill) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetStroke) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetFillFirst) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetFillOverPrint) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetStrokeOverPrint) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetLineCap) ( CharFeaturesRef charfeatures, LineCapType newVal); + ATEErr (*SetLineJoin) ( CharFeaturesRef charfeatures, LineJoinType newVal); + ATEErr (*SetLineWidth) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetMiterLimit) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetLineDashOffset) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetLineDashArray) ( CharFeaturesRef charfeatures, ArrayRealRef newVal); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script Setings + // ------------------------------------------------------------------ + ATEErr (*SetKashidas) ( CharFeaturesRef charfeatures, Kashidas newVal); + ATEErr (*SetDirOverride) ( CharFeaturesRef charfeatures, DirOverride newVal); + ATEErr (*SetDigitSet) ( CharFeaturesRef charfeatures, DigitSet newVal); + ATEErr (*SetDiacVPos) ( CharFeaturesRef charfeatures, DiacVPos newVal); + ATEErr (*SetDiacXOffset) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetDiacYOffset) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetAutoMydfb) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetMarkYDistFromBaseline) ( CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr (*SetOverlapSwash) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetJustificationAlternates) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetStretchedAlternates) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +#endif + // CLEAR PROPERTIES + // ====================================================================== + ATEErr (*ClearFont) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFontSize) ( CharFeaturesRef charfeatures); + ATEErr (*ClearHorizontalScale) ( CharFeaturesRef charfeatures); + ATEErr (*ClearVerticalScale) ( CharFeaturesRef charfeatures); + ATEErr (*ClearAutoLeading) ( CharFeaturesRef charfeatures); + ATEErr (*ClearLeading) ( CharFeaturesRef charfeatures); + ATEErr (*ClearTracking) ( CharFeaturesRef charfeatures); + ATEErr (*ClearBaselineShift) ( CharFeaturesRef charfeatures); + ATEErr (*ClearCharacterRotation) ( CharFeaturesRef charfeatures); + ATEErr (*ClearAutoKernType) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFontCapsOption) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFontBaselineOption) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFontOpenTypePositionOption) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStrikethroughPosition) ( CharFeaturesRef charfeatures); + ATEErr (*ClearUnderlinePosition) ( CharFeaturesRef charfeatures); + ATEErr (*ClearUnderlineOffset) ( CharFeaturesRef charfeatures); + // ------------------------------------------------------------------ + // OpenType features + // ------------------------------------------------------------------ + ATEErr (*ClearLigature) ( CharFeaturesRef charfeatures); + ATEErr (*ClearDiscretionaryLigatures) ( CharFeaturesRef charfeatures); + ATEErr (*ClearContextualLigatures) ( CharFeaturesRef charfeatures); + ATEErr (*ClearAlternateLigatures) ( CharFeaturesRef charfeatures); + ATEErr (*ClearOldStyle) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFractions) ( CharFeaturesRef charfeatures); + ATEErr (*ClearOrdinals) ( CharFeaturesRef charfeatures); + ATEErr (*ClearSwash) ( CharFeaturesRef charfeatures); + ATEErr (*ClearTitling) ( CharFeaturesRef charfeatures); + ATEErr (*ClearConnectionForms) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStylisticAlternates) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStylisticSets) (CharFeaturesRef charfeatures); + ATEErr (*ClearOrnaments) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFigureStyle) ( CharFeaturesRef charfeatures); + // ------------------------------------------------------------------ + // Japanese OpenType feature support + // ------------------------------------------------------------------ + ATEErr (*ClearProportionalMetrics) ( CharFeaturesRef charfeatures); + ATEErr (*ClearKana) ( CharFeaturesRef charfeatures); + ATEErr (*ClearItalics) ( CharFeaturesRef charfeatures); + ATEErr (*ClearRuby) ( CharFeaturesRef charfeatures); + ATEErr (*ClearBaselineDirection) ( CharFeaturesRef charfeatures); + ATEErr (*ClearLanguage) ( CharFeaturesRef charfeatures); + ATEErr (*ClearJapaneseAlternateFeature) ( CharFeaturesRef charfeatures); + ATEErr (*ClearTsume) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStyleRunAlignment) ( CharFeaturesRef charfeatures); + // ------------------------------------------------------------------ + // WariChu Setings + // ------------------------------------------------------------------ + ATEErr (*ClearWariChuEnabled) ( CharFeaturesRef charfeatures); + ATEErr (*ClearWariChuLineCount) ( CharFeaturesRef charfeatures); + ATEErr (*ClearWariChuLineGap) ( CharFeaturesRef charfeatures); + ATEErr (*ClearWariChuSubLineAmount) ( CharFeaturesRef charfeatures); + ATEErr (*ClearWariChuWidowAmount) ( CharFeaturesRef charfeatures); + ATEErr (*ClearWariChuOrphanAmount) ( CharFeaturesRef charfeatures); + ATEErr (*ClearWariChuJustification) ( CharFeaturesRef charfeatures); + ATEErr (*ClearTCYUpDownAdjustment) ( CharFeaturesRef charfeatures); + ATEErr (*ClearTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures); + ATEErr (*ClearLeftAki) ( CharFeaturesRef charfeatures); + ATEErr (*ClearRightAki) ( CharFeaturesRef charfeatures); + ATEErr (*ClearNoBreak) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFillColor) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStrokeColor) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFill) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStroke) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFillFirst) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFillOverPrint) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStrokeOverPrint) ( CharFeaturesRef charfeatures); + ATEErr (*ClearLineCap) ( CharFeaturesRef charfeatures); + ATEErr (*ClearLineJoin) ( CharFeaturesRef charfeatures); + ATEErr (*ClearLineWidth) ( CharFeaturesRef charfeatures); + ATEErr (*ClearMiterLimit) ( CharFeaturesRef charfeatures); + ATEErr (*ClearLineDashOffset) ( CharFeaturesRef charfeatures); + ATEErr (*ClearLineDashArray) ( CharFeaturesRef charfeatures); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script Setings + // ------------------------------------------------------------------ + ATEErr (*ClearKashidas) ( CharFeaturesRef charfeatures); + ATEErr (*ClearDirOverride) ( CharFeaturesRef charfeatures); + ATEErr (*ClearDigitSet) ( CharFeaturesRef charfeatures); + ATEErr (*ClearDiacVPos) ( CharFeaturesRef charfeatures); + ATEErr (*ClearDiacXOffset) ( CharFeaturesRef charfeatures); + ATEErr (*ClearDiacYOffset) ( CharFeaturesRef charfeatures); + ATEErr (*ClearAutoMydfb) ( CharFeaturesRef charfeatures); + ATEErr (*ClearMarkYDistFromBaseline) ( CharFeaturesRef charfeatures); + ATEErr (*ClearOverlapSwash) ( CharFeaturesRef charfeatures); + ATEErr (*ClearJustificationAlternates) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStretchedAlternates) ( CharFeaturesRef charfeatures); +#endif + // ALGEBRA METHODS + // Methods return true if changes were made. + // ====================================================================== + // Intersection of 2 Features is the intersection of each attribute + // on the lhs with the corresponding attribute on the rhs. + // Attribute intersections are defined by the following truth table: + // + // ______________________________________________________________________ + // this.attribute | rhs.attribute || Action/Result + // ====================================================================== + // assigned | assigned || [Case 1] If values are equal + // | || ACTION: nothing + // | || RESULT: value preserved + // | || [Case 2] If values are not equal + // | || ACTION: if (*this.attribute != *rhs.attribute) + // | || this.attribute.Clear(); + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // assigned | unassigned || ACTION: this.attribute.Clear() + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // unassigned | unassigned || ACTION: nothing (both are equal) + // | || RESULT: unassigned + // ______________________________________________________________________ + // + ATEErr (*IntersectFeatures) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); + // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. + ATEErr (*ReplaceOrAddFeatures) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); + // Unassigns each attribute whose value equals value of corresponding attribute in rhs + ATEErr (*UnassignEachIfEqual) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); + // True if all are not assigned; false otherwise + ATEErr (*IsEachNotAssigned) ( CharFeaturesRef charfeatures, ATEBool8* ret); + // True if all are assigned; false otherwise + ATEErr (*IsEachAssigned) ( CharFeaturesRef charfeatures, ATEBool8* ret); + // ACCESSORS DESIGNED FOR CLIENT APPLICATION CORE + // ====================================================================== + // ------------------------------------------------------------------ + // Visibility Feature + // ------------------------------------------------------------------ + ATEErr (*GetFillVisible) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetStrokeVisible) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*SetFillVisible) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*SetStrokeVisible) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*ClearFillVisible) ( CharFeaturesRef charfeatures); + ATEErr (*ClearStrokeVisible) ( CharFeaturesRef charfeatures); + // ------------------------------------------------------------------ + // Text Background Color Feature + // ------------------------------------------------------------------ + ATEErr (*GetFillBackgroundColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); + ATEErr (*GetFillBackground) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*SetFillBackgroundColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); + ATEErr (*SetFillBackground) ( CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr (*ClearFillBackgroundColor) ( CharFeaturesRef charfeatures); + ATEErr (*ClearFillBackground) ( CharFeaturesRef charfeatures); +}CharFeaturesSuite; + +typedef struct CharFeatures1Suite { + + // Reference count maintenance. + void(*AddRef) (CharFeaturesRef charfeatures); + void(*Release) (CharFeaturesRef charfeatures); + ATEBool8(*IsNull) (CharFeaturesRef charfeatures); + + // CharFeatures is a complete Set of character attributes that + // can be applied to text (except for kerning). They can be used to + // describe or Set the (1) local character attributes of text (a.k.a. + // the local overrides or (2) attributes of a named character style. + // + // Often, a given CharFeatures instance will only partially define + // each of its attributes. The validity of an attribute is + // determined by an associated boolean. Calls to "Get" methods + // return an "isAssigned" boolean that reflects the validity of + // the returned argument. Calls to "Set" methods always Set the + // associated boolean to indicate validity. Calls to "clear" + // methods always invalidate that boolean/attribute pair. + // + // A character's attribute is determined by an inheritance model. + // At the top is the "Normal" style which fully defines all + // attributes. These can be overriden by a named style or a local + // override, where an attribute is valid. + // + // A given attribute value of a character is determined by starting + // with the local override for that attribute if it is defined. If + // not, then the attribute comes from the corresponding named style + // (if it exists and) if it is defined. If all else fails, the + // default value comes from the "Normal" character style. + // + // Default constructor creates a "blank" CharFeatures instance where + // all attributes are undefined (invalid). + ATEErr(*Initialize) (CharFeaturesRef* charfeatures); + ATEErr(*Clone) (CharFeaturesRef charfeatures, CharFeaturesRef* ret); + ATEErr(*GetFont) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontRef* ret); + ATEErr(*GetFontSize) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetHorizontalScale) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetVerticalScale) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetAutoLeading) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetLeading) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetTracking) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr(*GetBaselineShift) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetCharacterRotation) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + /** Kern type information is only available for CharStyle instances. + Use Story::GetKern( ) to obtain kern type information for a TextRange. + */ + ATEErr(*GetAutoKernType) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, AutoKernType* ret); + ATEErr(*GetFontCapsOption) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontCapsOption* ret); + ATEErr(*GetFontBaselineOption) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontBaselineOption* ret); + ATEErr(*GetFontOpenTypePositionOption) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontOpenTypePositionOption* ret); + ATEErr(*GetStrikethroughPosition) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, StrikethroughPosition* ret); + ATEErr(*GetUnderlinePosition) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, UnderlinePosition* ret); + ATEErr(*GetUnderlineOffset) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + // ------------------------------------------------------------------ + // OpenType features + // ------------------------------------------------------------------ + ATEErr(*GetLigature) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetDiscretionaryLigatures) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetContextualLigatures) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetAlternateLigatures) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetOldStyle) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetFractions) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetOrdinals) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetSwash) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetTitling) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetConnectionForms) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetStylisticAlternates) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetOrnaments) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetFigureStyle) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, FigureStyle* ret); + // ------------------------------------------------------------------ + // Japanese OpenType feature support + // ------------------------------------------------------------------ + ATEErr(*GetProportionalMetrics) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetKana) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetRuby) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetItalics) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetBaselineDirection) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, BaselineDirection* ret); + ATEErr(*GetLanguage) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, Language* ret); + ATEErr(*GetJapaneseAlternateFeature) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, JapaneseAlternateFeature* ret); + ATEErr(*GetTsume) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetStyleRunAlignment) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, StyleRunAlignment* ret); + // ------------------------------------------------------------------ + // WariChu Setings + // ------------------------------------------------------------------ + ATEErr(*GetWariChuEnabled) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetWariChuLineCount) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr(*GetWariChuLineGap) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr(*GetWariChuScale) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetWariChuSize) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetWariChuWidowAmount) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr(*GetWariChuOrphanAmount) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr(*GetWariChuJustification) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, WariChuJustification* ret); + ATEErr(*GetTCYUpDownAdjustment) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr(*GetTCYLeftRightAdjustment) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr(*GetLeftAki) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetRightAki) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetNoBreak) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetFillColor) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); + ATEErr(*GetStrokeColor) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); + ATEErr(*GetFill) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetStroke) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetFillFirst) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetFillOverPrint) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetStrokeOverPrint) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetLineCap) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineCapType* ret); + ATEErr(*GetLineJoin) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineJoinType* ret); + ATEErr(*GetLineWidth) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetMiterLimit) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetLineDashOffset) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetLineDashArray) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ArrayRealRef* ret); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script Setings + // ------------------------------------------------------------------ + ATEErr(*GetKashidas) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, Kashidas* ret); + ATEErr(*GetDirOverride) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, DirOverride* ret); + ATEErr(*GetDigitSet) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, DigitSet* ret); + ATEErr(*GetDiacVPos) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, DiacVPos* ret); + ATEErr(*GetDiacXOffset) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetDiacYOffset) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetAutoMydfb) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetMarkYDistFromBaseline) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr(*GetOverlapSwash) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetJustificationAlternates) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetStretchedAlternates) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +#endif + // SET PROPERTIES + // ====================================================================== + ATEErr(*SetFont) (CharFeaturesRef charfeatures, FontRef newVal); + /** Set font size + This function will throw kOutOfRange error if (newVal > 1296 || newVal < 0.1) + */ + ATEErr(*SetFontSize) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + /** Set Horizontal Scale + This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) + If newVal is 1, this means 100% in the character palatte. + */ + ATEErr(*SetHorizontalScale) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + /** Set Vertical Scale + This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) + If newVal is 1, this means 100% in the character palatte. + */ + ATEErr(*SetVerticalScale) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetAutoLeading) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetLeading) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetTracking) (CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr(*SetBaselineShift) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetCharacterRotation) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetAutoKernType) (CharFeaturesRef charfeatures, AutoKernType newVal); + ATEErr(*SetFontCapsOption) (CharFeaturesRef charfeatures, FontCapsOption newVal); + ATEErr(*SetFontBaselineOption) (CharFeaturesRef charfeatures, FontBaselineOption newVal); + ATEErr(*SetFontOpenTypePositionOption) (CharFeaturesRef charfeatures, FontOpenTypePositionOption newVal); + ATEErr(*SetStrikethroughPosition) (CharFeaturesRef charfeatures, StrikethroughPosition newVal); + ATEErr(*SetUnderlinePosition) (CharFeaturesRef charfeatures, UnderlinePosition newVal); + ATEErr(*SetUnderlineOffset) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + // ------------------------------------------------------------------ + // OpenType features + // ------------------------------------------------------------------ + ATEErr(*SetLigature) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetDiscretionaryLigatures) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetContextualLigatures) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetAlternateLigatures) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetOldStyle) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetFractions) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetOrdinals) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetSwash) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetTitling) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetConnectionForms) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetStylisticAlternates) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetOrnaments) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetFigureStyle) (CharFeaturesRef charfeatures, FigureStyle newVal); + // ------------------------------------------------------------------ + // Japanese OpenType feature support + // ------------------------------------------------------------------ + ATEErr(*SetProportionalMetrics) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetKana) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetItalics) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetRuby) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetBaselineDirection) (CharFeaturesRef charfeatures, BaselineDirection newVal); + ATEErr(*SetLanguage) (CharFeaturesRef charfeatures, Language newVal); + ATEErr(*SetJapaneseAlternateFeature) (CharFeaturesRef charfeatures, JapaneseAlternateFeature newVal); + ATEErr(*SetTsume) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetStyleRunAlignment) (CharFeaturesRef charfeatures, StyleRunAlignment newVal); + // ------------------------------------------------------------------ + // WariChu Setings + // ------------------------------------------------------------------ + ATEErr(*SetWariChuEnabled) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetWariChuLineCount) (CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr(*SetWariChuLineGap) (CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr(*SetWariChuScale) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetWariChuSize) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetWariChuWidowAmount) (CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr(*SetWariChuOrphanAmount) (CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr(*SetWariChuJustification) (CharFeaturesRef charfeatures, WariChuJustification newVal); + ATEErr(*SetTCYUpDownAdjustment) (CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr(*SetTCYLeftRightAdjustment) (CharFeaturesRef charfeatures, ATETextDOM::Int32 newVal); + ATEErr(*SetLeftAki) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetRightAki) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetNoBreak) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetFillColor) (CharFeaturesRef charfeatures, ApplicationPaintRef newVal); + ATEErr(*SetStrokeColor) (CharFeaturesRef charfeatures, ApplicationPaintRef newVal); + ATEErr(*SetFill) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetStroke) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetFillFirst) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetFillOverPrint) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetStrokeOverPrint) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetLineCap) (CharFeaturesRef charfeatures, LineCapType newVal); + ATEErr(*SetLineJoin) (CharFeaturesRef charfeatures, LineJoinType newVal); + ATEErr(*SetLineWidth) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetMiterLimit) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetLineDashOffset) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetLineDashArray) (CharFeaturesRef charfeatures, ArrayRealRef newVal); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script Setings + // ------------------------------------------------------------------ + ATEErr(*SetKashidas) (CharFeaturesRef charfeatures, Kashidas newVal); + ATEErr(*SetDirOverride) (CharFeaturesRef charfeatures, DirOverride newVal); + ATEErr(*SetDigitSet) (CharFeaturesRef charfeatures, DigitSet newVal); + ATEErr(*SetDiacVPos) (CharFeaturesRef charfeatures, DiacVPos newVal); + ATEErr(*SetDiacXOffset) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetDiacYOffset) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetAutoMydfb) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetMarkYDistFromBaseline) (CharFeaturesRef charfeatures, ATETextDOM::Float newVal); + ATEErr(*SetOverlapSwash) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetJustificationAlternates) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetStretchedAlternates) (CharFeaturesRef charfeatures, ATEBool8 newVal); +#endif + // CLEAR PROPERTIES + // ====================================================================== + ATEErr(*ClearFont) (CharFeaturesRef charfeatures); + ATEErr(*ClearFontSize) (CharFeaturesRef charfeatures); + ATEErr(*ClearHorizontalScale) (CharFeaturesRef charfeatures); + ATEErr(*ClearVerticalScale) (CharFeaturesRef charfeatures); + ATEErr(*ClearAutoLeading) (CharFeaturesRef charfeatures); + ATEErr(*ClearLeading) (CharFeaturesRef charfeatures); + ATEErr(*ClearTracking) (CharFeaturesRef charfeatures); + ATEErr(*ClearBaselineShift) (CharFeaturesRef charfeatures); + ATEErr(*ClearCharacterRotation) (CharFeaturesRef charfeatures); + ATEErr(*ClearAutoKernType) (CharFeaturesRef charfeatures); + ATEErr(*ClearFontCapsOption) (CharFeaturesRef charfeatures); + ATEErr(*ClearFontBaselineOption) (CharFeaturesRef charfeatures); + ATEErr(*ClearFontOpenTypePositionOption) (CharFeaturesRef charfeatures); + ATEErr(*ClearStrikethroughPosition) (CharFeaturesRef charfeatures); + ATEErr(*ClearUnderlinePosition) (CharFeaturesRef charfeatures); + ATEErr(*ClearUnderlineOffset) (CharFeaturesRef charfeatures); + // ------------------------------------------------------------------ + // OpenType features + // ------------------------------------------------------------------ + ATEErr(*ClearLigature) (CharFeaturesRef charfeatures); + ATEErr(*ClearDiscretionaryLigatures) (CharFeaturesRef charfeatures); + ATEErr(*ClearContextualLigatures) (CharFeaturesRef charfeatures); + ATEErr(*ClearAlternateLigatures) (CharFeaturesRef charfeatures); + ATEErr(*ClearOldStyle) (CharFeaturesRef charfeatures); + ATEErr(*ClearFractions) (CharFeaturesRef charfeatures); + ATEErr(*ClearOrdinals) (CharFeaturesRef charfeatures); + ATEErr(*ClearSwash) (CharFeaturesRef charfeatures); + ATEErr(*ClearTitling) (CharFeaturesRef charfeatures); + ATEErr(*ClearConnectionForms) (CharFeaturesRef charfeatures); + ATEErr(*ClearStylisticAlternates) (CharFeaturesRef charfeatures); + ATEErr(*ClearOrnaments) (CharFeaturesRef charfeatures); + ATEErr(*ClearFigureStyle) (CharFeaturesRef charfeatures); + // ------------------------------------------------------------------ + // Japanese OpenType feature support + // ------------------------------------------------------------------ + ATEErr(*ClearProportionalMetrics) (CharFeaturesRef charfeatures); + ATEErr(*ClearKana) (CharFeaturesRef charfeatures); + ATEErr(*ClearItalics) (CharFeaturesRef charfeatures); + ATEErr(*ClearRuby) (CharFeaturesRef charfeatures); + ATEErr(*ClearBaselineDirection) (CharFeaturesRef charfeatures); + ATEErr(*ClearLanguage) (CharFeaturesRef charfeatures); + ATEErr(*ClearJapaneseAlternateFeature) (CharFeaturesRef charfeatures); + ATEErr(*ClearTsume) (CharFeaturesRef charfeatures); + ATEErr(*ClearStyleRunAlignment) (CharFeaturesRef charfeatures); + // ------------------------------------------------------------------ + // WariChu Setings + // ------------------------------------------------------------------ + ATEErr(*ClearWariChuEnabled) (CharFeaturesRef charfeatures); + ATEErr(*ClearWariChuLineCount) (CharFeaturesRef charfeatures); + ATEErr(*ClearWariChuLineGap) (CharFeaturesRef charfeatures); + ATEErr(*ClearWariChuSubLineAmount) (CharFeaturesRef charfeatures); + ATEErr(*ClearWariChuWidowAmount) (CharFeaturesRef charfeatures); + ATEErr(*ClearWariChuOrphanAmount) (CharFeaturesRef charfeatures); + ATEErr(*ClearWariChuJustification) (CharFeaturesRef charfeatures); + ATEErr(*ClearTCYUpDownAdjustment) (CharFeaturesRef charfeatures); + ATEErr(*ClearTCYLeftRightAdjustment) (CharFeaturesRef charfeatures); + ATEErr(*ClearLeftAki) (CharFeaturesRef charfeatures); + ATEErr(*ClearRightAki) (CharFeaturesRef charfeatures); + ATEErr(*ClearNoBreak) (CharFeaturesRef charfeatures); + ATEErr(*ClearFillColor) (CharFeaturesRef charfeatures); + ATEErr(*ClearStrokeColor) (CharFeaturesRef charfeatures); + ATEErr(*ClearFill) (CharFeaturesRef charfeatures); + ATEErr(*ClearStroke) (CharFeaturesRef charfeatures); + ATEErr(*ClearFillFirst) (CharFeaturesRef charfeatures); + ATEErr(*ClearFillOverPrint) (CharFeaturesRef charfeatures); + ATEErr(*ClearStrokeOverPrint) (CharFeaturesRef charfeatures); + ATEErr(*ClearLineCap) (CharFeaturesRef charfeatures); + ATEErr(*ClearLineJoin) (CharFeaturesRef charfeatures); + ATEErr(*ClearLineWidth) (CharFeaturesRef charfeatures); + ATEErr(*ClearMiterLimit) (CharFeaturesRef charfeatures); + ATEErr(*ClearLineDashOffset) (CharFeaturesRef charfeatures); + ATEErr(*ClearLineDashArray) (CharFeaturesRef charfeatures); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script Setings + // ------------------------------------------------------------------ + ATEErr(*ClearKashidas) (CharFeaturesRef charfeatures); + ATEErr(*ClearDirOverride) (CharFeaturesRef charfeatures); + ATEErr(*ClearDigitSet) (CharFeaturesRef charfeatures); + ATEErr(*ClearDiacVPos) (CharFeaturesRef charfeatures); + ATEErr(*ClearDiacXOffset) (CharFeaturesRef charfeatures); + ATEErr(*ClearDiacYOffset) (CharFeaturesRef charfeatures); + ATEErr(*ClearAutoMydfb) (CharFeaturesRef charfeatures); + ATEErr(*ClearMarkYDistFromBaseline) (CharFeaturesRef charfeatures); + ATEErr(*ClearOverlapSwash) (CharFeaturesRef charfeatures); + ATEErr(*ClearJustificationAlternates) (CharFeaturesRef charfeatures); + ATEErr(*ClearStretchedAlternates) (CharFeaturesRef charfeatures); +#endif + // ALGEBRA METHODS + // Methods return true if changes were made. + // ====================================================================== + // Intersection of 2 Features is the intersection of each attribute + // on the lhs with the corresponding attribute on the rhs. + // Attribute intersections are defined by the following truth table: + // + // ______________________________________________________________________ + // this.attribute | rhs.attribute || Action/Result + // ====================================================================== + // assigned | assigned || [Case 1] If values are equal + // | || ACTION: nothing + // | || RESULT: value preserved + // | || [Case 2] If values are not equal + // | || ACTION: if (*this.attribute != *rhs.attribute) + // | || this.attribute.Clear(); + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // assigned | unassigned || ACTION: this.attribute.Clear() + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // unassigned | unassigned || ACTION: nothing (both are equal) + // | || RESULT: unassigned + // ______________________________________________________________________ + // + ATEErr(*IntersectFeatures) (CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); + // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. + ATEErr(*ReplaceOrAddFeatures) (CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); + // Unassigns each attribute whose value equals value of corresponding attribute in rhs + ATEErr(*UnassignEachIfEqual) (CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); + // True if all are not assigned; false otherwise + ATEErr(*IsEachNotAssigned) (CharFeaturesRef charfeatures, ATEBool8* ret); + // True if all are assigned; false otherwise + ATEErr(*IsEachAssigned) (CharFeaturesRef charfeatures, ATEBool8* ret); + // ACCESSORS DESIGNED FOR CLIENT APPLICATION CORE + // ====================================================================== + // ------------------------------------------------------------------ + // Visibility Feature + // ------------------------------------------------------------------ + ATEErr(*GetFillVisible) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*GetStrokeVisible) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*SetFillVisible) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*SetStrokeVisible) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*ClearFillVisible) (CharFeaturesRef charfeatures); + ATEErr(*ClearStrokeVisible) (CharFeaturesRef charfeatures); + // ------------------------------------------------------------------ + // Text Background Color Feature + // ------------------------------------------------------------------ + ATEErr(*GetFillBackgroundColor) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); + ATEErr(*GetFillBackground) (CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr(*SetFillBackgroundColor) (CharFeaturesRef charfeatures, ApplicationPaintRef newVal); + ATEErr(*SetFillBackground) (CharFeaturesRef charfeatures, ATEBool8 newVal); + ATEErr(*ClearFillBackgroundColor) (CharFeaturesRef charfeatures); + ATEErr(*ClearFillBackground) (CharFeaturesRef charfeatures); +}CharFeatures1Suite; + +////////////////////////////////////////////// +// --CharInspectorSuite-- +////////////////////////////////////////////// +#define kCharInspectorSuite "ATE CharInspector Suite" +#if SLO_COMPLEXSCRIPT +#define kCharInspectorSuiteVersion101 101 +#define kCharInspectorSuiteVersion102 102 +#define kCharInspectorSuiteVersion kCharInspectorSuiteVersion102 +#else +#define kCharInspectorSuiteVersion101 1 +#define kCharInspectorSuiteVersion102 2 +#define kCharInspectorSuiteVersion kCharInspectorSuiteVersion102 +#endif + +typedef struct CharInspectorSuite{ + + // Reference count maintenance. + void (*AddRef) ( CharInspectorRef charinspector); + void (*Release) ( CharInspectorRef charinspector); + ATEBool8 (*IsNull) ( CharInspectorRef charinspector); + + ATEErr (*Initialize) ( CharInspectorRef* charinspector); + ATEErr (*GetFont) ( CharInspectorRef charinspector, ArrayFontRefRef* ret); + ATEErr (*GetFontSize) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetHorizontalScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetVerticalScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetSyntheticBold) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetSyntheticItalic) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetAutoLeading) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetLeading) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetTracking) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr (*GetBaselineShift) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetCharacterRotation) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetFontCapsOption) ( CharInspectorRef charinspector, ArrayFontCapsOptionRef* ret); + ATEErr (*GetFontBaselineOption) ( CharInspectorRef charinspector, ArrayFontBaselineOptionRef* ret); + ATEErr (*GetFontOpenTypePositionOption) ( CharInspectorRef charinspector, ArrayFontOpenTypePositionOptionRef* ret); + ATEErr (*GetStrikethroughPosition) ( CharInspectorRef charinspector, ArrayStrikethroughPositionRef* ret); + ATEErr (*GetUnderlinePosition) ( CharInspectorRef charinspector, ArrayUnderlinePositionRef* ret); + ATEErr (*GetUnderlineOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); + // ------------------------------------------------------------------ + // OpenType features + // ------------------------------------------------------------------ + ATEErr (*GetLigature) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetDiscretionaryLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetContextualLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetAlternateLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetOldStyle) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetFractions) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetOrdinals) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetSwash) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetTitling) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetConnectionForms) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetStylisticAlternates) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetStylisticSets) (CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr (*GetOrnaments) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetFigureStyle) ( CharInspectorRef charinspector, ArrayFigureStyleRef* ret); + // ------------------------------------------------------------------ + // Japanese OpenType feature support + // ------------------------------------------------------------------ + ATEErr (*GetProportionalMetrics) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetKana) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetItalics) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetRuby) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetBaselineDirection) ( CharInspectorRef charinspector, ArrayBaselineDirectionRef* ret); + ATEErr (*GetLanguage) ( CharInspectorRef charinspector, ArrayLanguageRef* ret); + ATEErr (*GetTsume) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetStyleRunAlignment) ( CharInspectorRef charinspector, ArrayStyleRunAlignmentRef* ret); + // ------------------------------------------------------------------ + // WariChu Setings + // ------------------------------------------------------------------ + ATEErr (*GetWariChuLineCount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr (*GetWariChuLineGap) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr (*GetWariChuScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetWariChuSize) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetWariChuWidowAmount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr (*GetWariChuOrphanAmount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr (*GetWariChuJustification) ( CharInspectorRef charinspector, ArrayWariChuJustificationRef* ret); + ATEErr (*GetWariChuEnabled) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetTCYUpDownAdjustment) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr (*GetTCYLeftRightAdjustment) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr (*GetLeftAki) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetRightAki) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetNoBreak) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetFillColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); + ATEErr (*GetStrokeColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); + ATEErr (*GetFill) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetStroke) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetFillFirst) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetFillOverPrint) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetStrokeOverPrint) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetLineCap) ( CharInspectorRef charinspector, ArrayLineCapTypeRef* ret); + ATEErr (*GetLineJoin) ( CharInspectorRef charinspector, ArrayLineJoinTypeRef* ret); + ATEErr (*GetLineWidth) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetMiterLimit) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetLineDashOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetLineDashArray) ( CharInspectorRef charinspector, ArrayArrayRealRef* ret); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script Setings + // ------------------------------------------------------------------ + ATEErr (*GetKashidas) ( CharInspectorRef charinspector, ArrayKashidasRef* ret); + ATEErr (*GetDirOverride) ( CharInspectorRef charinspector, ArrayDirOverrideRef* ret); + ATEErr (*GetDigitSet) ( CharInspectorRef charinspector, ArrayDigitSetRef* ret); + ATEErr (*GetDiacVPos) ( CharInspectorRef charinspector, ArrayDiacVPosRef* ret); + ATEErr (*GetDiacXOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetDiacYOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetAutoMydfb) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetMarkYDistFromBaseline) ( CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr (*GetOverlapSwash) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetJustificationAlternates) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetStretchedAlternates) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +#endif + // ------------------------------------------------------------------ + // Visibility Feature + // ------------------------------------------------------------------ + ATEErr (*GetFillVisible) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr (*GetStrokeVisible) ( CharInspectorRef charinspector, ArrayBoolRef* ret); + // ------------------------------------------------------------------ + // Text Background Color Feature + // ------------------------------------------------------------------ + ATEErr (*GetFillBackgroundColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); + ATEErr (*GetFillBackground) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +}CharInspectorSuite; + +typedef struct CharInspector1Suite { + + // Reference count maintenance. + void(*AddRef) (CharInspectorRef charinspector); + void(*Release) (CharInspectorRef charinspector); + ATEBool8(*IsNull) (CharInspectorRef charinspector); + + ATEErr(*Initialize) (CharInspectorRef* charinspector); + ATEErr(*GetFont) (CharInspectorRef charinspector, ArrayFontRefRef* ret); + ATEErr(*GetFontSize) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetHorizontalScale) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetVerticalScale) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetSyntheticBold) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetSyntheticItalic) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetAutoLeading) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetLeading) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetTracking) (CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr(*GetBaselineShift) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetCharacterRotation) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetFontCapsOption) (CharInspectorRef charinspector, ArrayFontCapsOptionRef* ret); + ATEErr(*GetFontBaselineOption) (CharInspectorRef charinspector, ArrayFontBaselineOptionRef* ret); + ATEErr(*GetFontOpenTypePositionOption) (CharInspectorRef charinspector, ArrayFontOpenTypePositionOptionRef* ret); + ATEErr(*GetStrikethroughPosition) (CharInspectorRef charinspector, ArrayStrikethroughPositionRef* ret); + ATEErr(*GetUnderlinePosition) (CharInspectorRef charinspector, ArrayUnderlinePositionRef* ret); + ATEErr(*GetUnderlineOffset) (CharInspectorRef charinspector, ArrayRealRef* ret); + // ------------------------------------------------------------------ + // OpenType features + // ------------------------------------------------------------------ + ATEErr(*GetLigature) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetDiscretionaryLigatures) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetContextualLigatures) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetAlternateLigatures) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetOldStyle) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetFractions) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetOrdinals) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetSwash) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetTitling) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetConnectionForms) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetStylisticAlternates) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetOrnaments) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetFigureStyle) (CharInspectorRef charinspector, ArrayFigureStyleRef* ret); + // ------------------------------------------------------------------ + // Japanese OpenType feature support + // ------------------------------------------------------------------ + ATEErr(*GetProportionalMetrics) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetKana) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetItalics) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetRuby) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetBaselineDirection) (CharInspectorRef charinspector, ArrayBaselineDirectionRef* ret); + ATEErr(*GetLanguage) (CharInspectorRef charinspector, ArrayLanguageRef* ret); + ATEErr(*GetTsume) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetStyleRunAlignment) (CharInspectorRef charinspector, ArrayStyleRunAlignmentRef* ret); + // ------------------------------------------------------------------ + // WariChu Setings + // ------------------------------------------------------------------ + ATEErr(*GetWariChuLineCount) (CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr(*GetWariChuLineGap) (CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr(*GetWariChuScale) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetWariChuSize) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetWariChuWidowAmount) (CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr(*GetWariChuOrphanAmount) (CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr(*GetWariChuJustification) (CharInspectorRef charinspector, ArrayWariChuJustificationRef* ret); + ATEErr(*GetWariChuEnabled) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetTCYUpDownAdjustment) (CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr(*GetTCYLeftRightAdjustment) (CharInspectorRef charinspector, ArrayIntegerRef* ret); + ATEErr(*GetLeftAki) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetRightAki) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetNoBreak) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetFillColor) (CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); + ATEErr(*GetStrokeColor) (CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); + ATEErr(*GetFill) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetStroke) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetFillFirst) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetFillOverPrint) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetStrokeOverPrint) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetLineCap) (CharInspectorRef charinspector, ArrayLineCapTypeRef* ret); + ATEErr(*GetLineJoin) (CharInspectorRef charinspector, ArrayLineJoinTypeRef* ret); + ATEErr(*GetLineWidth) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetMiterLimit) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetLineDashOffset) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetLineDashArray) (CharInspectorRef charinspector, ArrayArrayRealRef* ret); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script Setings + // ------------------------------------------------------------------ + ATEErr(*GetKashidas) (CharInspectorRef charinspector, ArrayKashidasRef* ret); + ATEErr(*GetDirOverride) (CharInspectorRef charinspector, ArrayDirOverrideRef* ret); + ATEErr(*GetDigitSet) (CharInspectorRef charinspector, ArrayDigitSetRef* ret); + ATEErr(*GetDiacVPos) (CharInspectorRef charinspector, ArrayDiacVPosRef* ret); + ATEErr(*GetDiacXOffset) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetDiacYOffset) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetAutoMydfb) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetMarkYDistFromBaseline) (CharInspectorRef charinspector, ArrayRealRef* ret); + ATEErr(*GetOverlapSwash) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetJustificationAlternates) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetStretchedAlternates) (CharInspectorRef charinspector, ArrayBoolRef* ret); +#endif + // ------------------------------------------------------------------ + // Visibility Feature + // ------------------------------------------------------------------ + ATEErr(*GetFillVisible) (CharInspectorRef charinspector, ArrayBoolRef* ret); + ATEErr(*GetStrokeVisible) (CharInspectorRef charinspector, ArrayBoolRef* ret); + // ------------------------------------------------------------------ + // Text Background Color Feature + // ------------------------------------------------------------------ + ATEErr(*GetFillBackgroundColor) (CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); + ATEErr(*GetFillBackground) (CharInspectorRef charinspector, ArrayBoolRef* ret); +}CharInspector1Suite; + +////////////////////////////////////////////// +// --CharStyleSuite-- +////////////////////////////////////////////// +#define kCharStyleSuite "ATE CharStyle Suite" +#define kCharStyleSuiteVersion1 1 +#define kCharStyleSuiteVersion kCharStyleSuiteVersion1 + +typedef struct CharStyleSuite{ + + // Reference count maintenance. + void (*AddRef) ( CharStyleRef charstyle); + void (*Release) ( CharStyleRef charstyle); + ATEBool8 (*IsNull) ( CharStyleRef charstyle); + + /// Name of style is set in pName up to maxLength characters. + /// Length of actual name is returned; 0 if error occurred. + ATEErr (*GetName) ( CharStyleRef charstyle, ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + /// Sets name of style to null-terminated pName. If existing style of + /// same name exists or *pName == L'\0' then false is returned. + ATEErr (*SetName) ( CharStyleRef charstyle, const ATETextDOM::Unicode* pName, ATEBool8* ret); + /// Parent style returned. For Normal style, a null object is returned. + ATEErr (*GetParent) ( CharStyleRef charstyle, CharStyleRef* ret); + /// Parent style set. Returns false if attempting to set the parent + /// of Normal style, true otherwise. + ATEErr (*SetParent) ( CharStyleRef charstyle, const CharStyleRef pStyle, ATEBool8* ret); + /// Returns whether style has parent. Always false for normal style. + ATEErr (*HasParent) ( CharStyleRef charstyle, ATEBool8* ret); + /// Returns features for style. + ATEErr (*GetFeatures) ( CharStyleRef charstyle, CharFeaturesRef* ret); + /// The style's feature attributes are all assigned to those of pFeatures. + /// For Normal style, this has same effect as ReplaceOrAddFeatures. + ATEErr (*SetFeatures) ( CharStyleRef charstyle, CharFeaturesRef pFeatures); + /// The style's feature attributes are replaced by any corresponding ones + /// in pFeatures that contain valid values (i.e. the attribute is assigned). + ATEErr (*ReplaceOrAddFeatures) ( CharStyleRef charstyle, CharFeaturesRef pFeatures); + ATEErr (*IsEqual) ( CharStyleRef charstyle, const CharStyleRef pStyle, ATEBool8* ret); + +}CharStyleSuite; + +////////////////////////////////////////////// +// --CharStylesSuite-- +////////////////////////////////////////////// +#define kCharStylesSuite "ATE CharStyles Suite" +#define kCharStylesSuiteVersion1 1 +#define kCharStylesSuiteVersion kCharStylesSuiteVersion1 + +typedef struct CharStylesSuite{ + + // Reference count maintenance. + void (*AddRef) ( CharStylesRef charstyles); + void (*Release) ( CharStylesRef charstyles); + ATEBool8 (*IsNull) ( CharStylesRef charstyles); + + ATEErr (*IsEmpty) ( CharStylesRef charstyles, ATEBool8* ret); + ATEErr (*GetSize) ( CharStylesRef charstyles, ATETextDOM::Int32* ret); + ATEErr (*ShowAllStyles) ( CharStylesRef charstyles); + ATEErr (*ShowOnlyUnreferencedStyles) ( CharStylesRef charstyles); + ATEErr (*ShowOnlyStylesReferencedIn) ( CharStylesRef charstyles, TextRangeRef pRange); + // Reorders position of style + ATEErr (*MoveStyleTo) ( CharStylesRef charstyles, CharStyleRef pStyle, ATETextDOM::Int32 position); + +}CharStylesSuite; + +////////////////////////////////////////////// +// --CharStylesIteratorSuite-- +////////////////////////////////////////////// +#define kCharStylesIteratorSuite "ATE CharStylesIterator Suite" +#define kCharStylesIteratorSuiteVersion1 1 +#define kCharStylesIteratorSuiteVersion kCharStylesIteratorSuiteVersion1 + +typedef struct CharStylesIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( CharStylesIteratorRef charstylesiterator); + void (*Release) ( CharStylesIteratorRef charstylesiterator); + ATEBool8 (*IsNull) ( CharStylesIteratorRef charstylesiterator); + + ATEErr (*Initialize) ( CharStylesRef pStyles, Direction direction, CharStylesIteratorRef* charstylesiterator); + ATEErr (*IsNotDone) ( CharStylesIteratorRef charstylesiterator, ATEBool8* ret); + ATEErr (*IsDone) ( CharStylesIteratorRef charstylesiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( CharStylesIteratorRef charstylesiterator, ATEBool8* ret); + ATEErr (*MoveToFirst) ( CharStylesIteratorRef charstylesiterator); + ATEErr (*MoveToLast) ( CharStylesIteratorRef charstylesiterator); + ATEErr (*Next) ( CharStylesIteratorRef charstylesiterator); + ATEErr (*Previous) ( CharStylesIteratorRef charstylesiterator); + ATEErr (*Item) ( CharStylesIteratorRef charstylesiterator, CharStyleRef* ret); + +}CharStylesIteratorSuite; + +////////////////////////////////////////////// +// --FindSuite-- +////////////////////////////////////////////// +#define kFindSuite "ATE Find Suite" +#if SLO_COMPLEXSCRIPT +#define kFindSuiteVersion101 101 +#define kFindSuiteVersion kFindSuiteVersion101 +#else +#define kFindSuiteVersion1 1 +#define kFindSuiteVersion kFindSuiteVersion1 +#endif + +typedef struct FindSuite{ + + // Reference count maintenance. + void (*AddRef) ( FindRef find); + void (*Release) ( FindRef find); + ATEBool8 (*IsNull) ( FindRef find); + + // Options + // ======================================================================== + ATEErr (*GetSearchDirection) ( FindRef find, Direction* ret); + ATEErr (*GetIgnoreCase) ( FindRef find, ATEBool8* ret); + ATEErr (*GetWholeWord) ( FindRef find, ATEBool8* ret); + ATEErr (*GetWrap) ( FindRef find, ATEBool8* ret); + ATEErr (*GetFindWordsOutOfBounds) ( FindRef find, ATEBool8* ret); + ATEErr (*SetSearchDirection) ( FindRef find, Direction newValue); + ATEErr (*SetIgnoreCase) ( FindRef find, ATEBool8 newValue); + ATEErr (*SetWholeWord) ( FindRef find, ATEBool8 newValue); + ATEErr (*SetWrap) ( FindRef find, ATEBool8 newValue); + ATEErr (*SetFindWordsOutOfBounds) ( FindRef find, ATEBool8 newValue); + // Control scope of search to be entire document or Story. + // By default, the entire document is searched. + ATEErr (*GetSearchScope) ( FindRef find, SearchScope* ret); + ATEErr (*SetSearchScope) ( FindRef find, SearchScope searchScope); + // If called, search is done only within specified TextRange + ATEErr (*SetSearchRange) ( FindRef find, TextRangeRef pRange); + ATEErr (*SetSearchChars) ( FindRef find, ATETextDOM::Unicode* pSearchChars); + ATEErr (*GetSearchChars) ( FindRef find, ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length); + ATEErr (*SetReplaceChars) ( FindRef find, ATETextDOM::Unicode* pSearchChars); + ATEErr (*GetReplaceChars) ( FindRef find, ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length); + // Temporary way to reset the engine for modeless operation + ATEErr (*Reset) ( FindRef find); + // Methods + // ======================================================================== + // Searches current user selection. + // Returns false if the search failed + ATEErr (*FindMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8* ret); + // Skips the current user selection. + // Returns false if the search failed + ATEErr (*FindNextMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8* ret); + ATEErr (*ReplaceMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8 findNext, ATEBool8* ret); + // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and + // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. + ATEErr (*FindAndReplaceAllMatches) ( FindRef find, ATETextDOM::Int32* pReplaceCount, ATEBool8* ret); + // Use these to implement ReplaceAll. + // Start by saving off the settings with GetPreReplaceAllSettings( ) + // (also note what text object you're currently working with so you can restore that + // via SetSearchRange( ) when you're finished. + ATEErr (*GetPreReplaceAllSettings) ( FindRef find, ATETextDOM::Int32* pCurrentPoint, ATETextDOM::Int32* pStartPoint); + // Implement a loop to go through all the text objects you want to replace all with. + // Use FindMatch( ), FindNextMatch( ), and ReplaceMatch( ) to replace all. + // Keep track of how many ReplaceMatch( ) calls were made for reporting back to the user + // When finished, restore the correct text object and range using SetSearchRange( ) + // and restore the positions using RestorePreReplaceAllSettings( ) + ATEErr (*RestorePreReplaceAllSettings) ( FindRef find, const ATETextDOM::Int32 currentPoint, const ATETextDOM::Int32 startPoint); +#if SLO_COMPLEXSCRIPT + ATEErr (*GetIgnoreAccents) ( FindRef find, ATEBool8* ret); + ATEErr (*GetIgnoreKashidas) ( FindRef find, ATEBool8* ret); + ATEErr (*SetIgnoreAccents) ( FindRef find, ATEBool8 newValue); + ATEErr (*SetIgnoreKashidas) ( FindRef find, ATEBool8 newValue); +#endif +}FindSuite; + +////////////////////////////////////////////// +// --FontSuite-- +////////////////////////////////////////////// +#define kFontSuite "ATE Font Suite" +#define kFontSuiteVersion1 1 +#define kFontSuiteVersion kFontSuiteVersion1 + +typedef struct FontSuite{ + + // Reference count maintenance. + void (*AddRef) ( FontRef font); + void (*Release) ( FontRef font); + ATEBool8 (*IsNull) ( FontRef font); + + // METHODS + // ======================================================================== + ATEErr (*IsCoolTypeTechnology) ( FontRef font, ATEBool8* ret); + /// if this font has its roman glyphs sideway by default. + ATEErr (*IsVerticalRomanGlyphsOnSideByDefault) ( FontRef font, ATEBool8 withItalics, StyleRunAlignment characterAlignment, ATEBool8* ret); + ATEErr (*GetCTFontDict) ( FontRef font, void** ret); + +}FontSuite; + +////////////////////////////////////////////// +// --GlyphSuite-- +////////////////////////////////////////////// +#define kGlyphSuite "ATE Glyph Suite" +#define kGlyphSuiteVersion1 1 +#define kGlyphSuiteVersion kGlyphSuiteVersion1 + +typedef struct GlyphSuite{ + + // Reference count maintenance. + void (*AddRef) ( GlyphRef glyph); + void (*Release) ( GlyphRef glyph); + ATEBool8 (*IsNull) ( GlyphRef glyph); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetGlyphID) ( GlyphRef glyph, ATEGlyphID* ret); + ATEErr (*GetAlternateGlyphs) ( GlyphRef glyph, GlyphsRef* ret); + ATEErr (*GetOTFeatures) ( GlyphRef glyph, char** otFeatures, ATETextDOM::Int32* otFeatureCount, ATETextDOM::Int32** otFeatureIndex); + // RealMatrix GetTransformation(); + // ======================================================================== + // METHODS + // ======================================================================== + // ============================================================================= + // PROTECTED AND PRIVATE + // ============================================================================= + +}GlyphSuite; + +////////////////////////////////////////////// +// --GlyphsSuite-- +////////////////////////////////////////////// +#define kGlyphsSuite "ATE Glyphs Suite" +#define kGlyphsSuiteVersion1 1 +#define kGlyphsSuiteVersion kGlyphsSuiteVersion1 + +typedef struct GlyphsSuite{ + + // Reference count maintenance. + void (*AddRef) ( GlyphsRef glyphs); + void (*Release) ( GlyphsRef glyphs); + ATEBool8 (*IsNull) ( GlyphsRef glyphs); + + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( GlyphsRef glyphs, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( GlyphsRef glyphs, GlyphRef* ret); + ATEErr (*GetLast) ( GlyphsRef glyphs, GlyphRef* ret); + // navigation objects. + ATEErr (*GetTextRanges) ( GlyphsRef glyphs, TextRangesRef* ret); + ATEErr (*GetTextSelection) ( GlyphsRef glyphs, TextRangesRef* ret); + ATEErr (*GetParagraphsIterator) ( GlyphsRef glyphs, ParagraphsIteratorRef* ret); + ATEErr (*GetTextRunsIterator) ( GlyphsRef glyphs, TextRunsIteratorRef* ret); + ATEErr (*GetWordsIterator) ( GlyphsRef glyphs, WordsIteratorRef* ret); + // METHODS + // ======================================================================== + ATEErr (*Add) ( GlyphsRef glyphs, const GlyphRef glyph); + ATEErr (*Item) ( GlyphsRef glyphs, ATETextDOM::Int32 nIndex, GlyphRef* ret); + ATEErr (*RemoveAll) ( GlyphsRef glyphs); + ATEErr (*Remove) ( GlyphsRef glyphs, ATETextDOM::Int32 nIndex); + // PROTECTED AND PRIVATE + // ======================================================================== + +}GlyphsSuite; + +////////////////////////////////////////////// +// --GlyphsIteratorSuite-- +////////////////////////////////////////////// +#define kGlyphsIteratorSuite "ATE GlyphsIterator Suite" +#define kGlyphsIteratorSuiteVersion1 1 +#define kGlyphsIteratorSuiteVersion kGlyphsIteratorSuiteVersion1 + +typedef struct GlyphsIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( GlyphsIteratorRef glyphsiterator); + void (*Release) ( GlyphsIteratorRef glyphsiterator); + ATEBool8 (*IsNull) ( GlyphsIteratorRef glyphsiterator); + + ATEErr (*Initialize) ( GlyphsRef glyphs, Direction direction, GlyphsIteratorRef* glyphsiterator); + ATEErr (*IsNotDone) ( GlyphsIteratorRef glyphsiterator, ATEBool8* ret); + ATEErr (*IsDone) ( GlyphsIteratorRef glyphsiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( GlyphsIteratorRef glyphsiterator, ATEBool8* ret); + ATEErr (*GetFirst) ( GlyphsIteratorRef glyphsiterator, GlyphRef* ret); + ATEErr (*GetLast) ( GlyphsIteratorRef glyphsiterator, GlyphRef* ret); + ATEErr (*GetNext) ( GlyphsIteratorRef glyphsiterator, GlyphRef* ret); + ATEErr (*Item) ( GlyphsIteratorRef glyphsiterator, GlyphRef* ret); + ATEErr (*Next) ( GlyphsIteratorRef glyphsiterator); + ATEErr (*Previous) ( GlyphsIteratorRef glyphsiterator); + +}GlyphsIteratorSuite; + +////////////////////////////////////////////// +// --KinsokuSuite-- +////////////////////////////////////////////// +#define kKinsokuSuite "ATE Kinsoku Suite" +#define kKinsokuSuiteVersion1 1 +#define kKinsokuSuiteVersion kKinsokuSuiteVersion1 + +typedef struct KinsokuSuite{ + + // Reference count maintenance. + void (*AddRef) ( KinsokuRef kinsoku); + void (*Release) ( KinsokuRef kinsoku); + ATEBool8 (*IsNull) ( KinsokuRef kinsoku); + + /// Constructs an empty Kinsoku + ATEErr (*Initialize) ( KinsokuRef* kinsoku); + // PROPERTIES + // ======================================================================= + ATEErr (*GetName) ( KinsokuRef kinsoku, ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetNameSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); + ATEErr (*SetName) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* name); + ATEErr (*MatchesPredefinedResourceTag) ( KinsokuRef kinsoku, ATE::KinsokuPredefinedTag tag, ATEBool8* ret); + ATEErr (*GetNoStartCharSet) ( KinsokuRef kinsoku, ATETextDOM::Unicode* noStartCharSet, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetNoStartCharSetSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); + ATEErr (*SetNoStartCharSet) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* noStartCharSet); + ATEErr (*GetNoEndCharSet) ( KinsokuRef kinsoku, ATETextDOM::Unicode* noEndCharSet, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetNoEndCharSetSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); + ATEErr (*SetNoEndCharSet) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* noEndCharSet); + ATEErr (*GetNoBreakCharSet) ( KinsokuRef kinsoku, ATETextDOM::Unicode* noBreakCharSet, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetNoBreakCharSetSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); + ATEErr (*SetNoBreakCharSet) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* noBreakCharSet); + ATEErr (*GetHangingCharSet) ( KinsokuRef kinsoku, ATETextDOM::Unicode* hangingCharSet, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetHangingCharSetSize) ( KinsokuRef kinsoku, ATETextDOM::Int32* ret); + ATEErr (*SetHangingCharSet) ( KinsokuRef kinsoku, const ATETextDOM::Unicode* hangingCharSet); + // METHODS + // ======================================================================= + ATEErr (*IsNoStartChar) ( KinsokuRef kinsoku, ATETextDOM::Unicode character, ATEBool8* ret); + ATEErr (*IsNoEndChar) ( KinsokuRef kinsoku, ATETextDOM::Unicode character, ATEBool8* ret); + ATEErr (*IsNoBreakChar) ( KinsokuRef kinsoku, ATETextDOM::Unicode character, ATEBool8* ret); + ATEErr (*IsHangingChar) ( KinsokuRef kinsoku, ATETextDOM::Unicode character, ATEBool8* ret); + /// Does a shallow equivalency test + ATEErr (*IsEqual) ( KinsokuRef kinsoku, KinsokuRef rhsKinsoku, ATEBool8* ret); + /// Does a deep equivalency test + ATEErr (*IsEquivalent) ( KinsokuRef kinsoku, KinsokuRef rhsKinsoku, ATEBool8* ret); + /// Has the resource been modified since it became editable? + ATEErr (*IsModified) ( KinsokuRef kinsoku, ATEBool8* ret); + /// Is it a predefined or user defined kinsoku? + ATEErr (*IsPredefined) ( KinsokuRef kinsoku, ATEBool8* ret); + ATEErr (*Duplicate) ( KinsokuRef kinsoku, KinsokuRef* ret); + +}KinsokuSuite; + +////////////////////////////////////////////// +// --KinsokuSetSuite-- +////////////////////////////////////////////// +#define kKinsokuSetSuite "ATE KinsokuSet Suite" +#define kKinsokuSetSuiteVersion1 1 +#define kKinsokuSetSuiteVersion kKinsokuSetSuiteVersion1 + +typedef struct KinsokuSetSuite{ + + // Reference count maintenance. + void (*AddRef) ( KinsokuSetRef kinsokuset); + void (*Release) ( KinsokuSetRef kinsokuset); + ATEBool8 (*IsNull) ( KinsokuSetRef kinsokuset); + + // PROPERTIES + // ======================================================================= + ATEErr (*GetSize) ( KinsokuSetRef kinsokuset, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( KinsokuSetRef kinsokuset, KinsokuRef* ret); + ATEErr (*GetLast) ( KinsokuSetRef kinsokuset, KinsokuRef* ret); + // METHODS + // ======================================================================= + ATEErr (*Item) ( KinsokuSetRef kinsokuset, ATETextDOM::Int32 nIndex, KinsokuRef* ret); + /// Returns a valid index if found, else return -1 + /// This will search for kinsoku with the same name and data + ATEErr (*Find_ByKinsoku) ( KinsokuSetRef kinsokuset, KinsokuRef kinsoku, ATETextDOM::Int32* ret); + /// Returns a valid index if found, else return -1 + /// Search by name only + ATEErr (*Find_ByName) ( KinsokuSetRef kinsokuset, const ATETextDOM::Unicode* name, ATETextDOM::Int32* ret); + /// Returns a valid index if found, else return -1 + /// If kUserDefinedKinsokuTag is requested for search, it will return the + /// first user defined kinsoku it finds. + ATEErr (*Find_ByPredefinedKinsokuTag) ( KinsokuSetRef kinsokuset, KinsokuPredefinedTag tag, ATETextDOM::Int32* ret); + /// Removes an existing kinsoku, returns true if successful + ATEErr (*Remove) ( KinsokuSetRef kinsokuset, ATETextDOM::Int32 nIndex, ATEBool8* ret); + /// Appends a new kinsoku, returns its new index if successful, + /// -1 if unsuccessful + /// If the kinsoku being added already exists in the set, it will + /// return its current index. + ATEErr (*Add) ( KinsokuSetRef kinsokuset, KinsokuRef kinsoku, ATETextDOM::Int32* ret); + /// Replaces an existing kinsoku at the given index with the + /// given kinsoku. Returns true if successful + ATEErr (*Replace) ( KinsokuSetRef kinsokuset, ATETextDOM::Int32 nIndex, KinsokuRef kinsoku, ATEBool8* ret); + +}KinsokuSetSuite; + +////////////////////////////////////////////// +// --ParaFeaturesSuite-- +////////////////////////////////////////////// +#define kParaFeaturesSuite "ATE ParaFeatures Suite" +#if SLO_COMPLEXSCRIPT +#define kParaFeaturesSuiteVersion101 101 +#define kParaFeaturesSuiteVersion102 102 +#define kParaFeaturesSuiteVersion kParaFeaturesSuiteVersion102 +#else +#define kParaFeaturesSuiteVersion101 1 +#define kParaFeaturesSuiteVersion102 2 +#define kParaFeaturesSuiteVersion kParaFeaturesSuiteVersion102 +#endif + +typedef struct ParaFeaturesSuite{ + + // Reference count maintenance. + void (*AddRef) ( ParaFeaturesRef parafeatures); + void (*Release) ( ParaFeaturesRef parafeatures); + ATEBool8 (*IsNull) ( ParaFeaturesRef parafeatures); + + // ParaFeatures is a complete Set of paragraph attributes that + // can be applied to text (except for kerning). They can be used to + // describe or Set the (1) local paragraph attributes of text (a.k.a. + // the local overrides or (2) attributes of a named paragraph style. + // + // Often, a given ParaFeatures instance will only partially define + // each of its attributes. The validity of an attribute is + // determined by an associated boolean. Calls to "Get" methods + // return an "isAssigned" boolean that reflects the validity of + // the returned argument. Calls to "Set" methods always Set the + // associated boolean to indicate validity. Calls to "Clear" + // methods always invalidate that boolean/attribute pair. + // + // A paragraph's attribute is determined by an inheritance model. + // At the top is the "Normal" style which fully defines all + // attributes. These can be overriden by a named style or a local + // override, where an attribute is valid. + // + // A given attribute value of a paragraph is determined by starting + // with the local override for that attribute if it is defined. If + // not, then the attribute comes from the corresponding named style + // (if it exists and) if it is defined. If all else fails, the + // default value comes from the "Normal" paragraph style. + // + // Default constructor creates a "blank" ParaFeatures instance where + // all attributes are undefined (invalid). + ATEErr (*Initialize) ( ParaFeaturesRef* parafeatures); + ATEErr (*Clone) ( ParaFeaturesRef parafeatures, ParaFeaturesRef* ret); + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + ATEErr (*GetJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); + ATEErr (*GetFirstLineIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetStartIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetEndIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetSpaceBefore) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetSpaceAfter) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + ATEErr (*GetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetPreHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetPostHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetHyphenationZone) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetHyphenationPreference) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + ATEErr (*GetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMinWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetSingleWordJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); + ATEErr (*GetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetLeadingType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, LeadingType* ret); + ATEErr (*GetTabStops) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, TabStopsRef* ret); + ATEErr (*GetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + ATEErr (*GetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetAutoTCY) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetBurasagariType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, BurasagariType* ret); + ATEErr (*GetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, PreferredKinsokuOrder* ret); + ATEErr (*GetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + /// This will return a null object if Kinsoku is not used (ie None set) + ATEErr (*GetKinsoku) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, KinsokuRef* ret); + /// This will return a null object if Mojikumi is not used (ie None set) + ATEErr (*GetMojiKumi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, MojiKumiRef* ret); + /// This will return a null object if ListStyle is not used (ie None set) + ATEErr (*GetListStyle) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ListStyleRef* ret); + // Other + ATEErr (*GetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, CharFeaturesRef* ret); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script + // ------------------------------------------------------------------ + ATEErr (*GetParagraphDirection) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::ParagraphDirection* ret); + ATEErr (*GetJustificationMethod) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::JustificationMethod* ret); + ATEErr (*GetKashidaWidth) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::KashidaWidth* ret); +#endif + // SET PROPERTIES + // ====================================================================== + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + ATEErr (*SetJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); + ATEErr (*SetFirstLineIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetStartIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetEndIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetSpaceBefore) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetSpaceAfter) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + ATEErr (*SetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetPreHyphenSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetPostHyphenSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetHyphenationZone) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetHyphenationPreference) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + ATEErr (*SetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMinWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetSingleWordJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); + ATEErr (*SetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetLeadingType) ( ParaFeaturesRef parafeatures, LeadingType newVal); + ATEErr (*SetTabStops) ( ParaFeaturesRef parafeatures, TabStopsRef newVal); + ATEErr (*SetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + ATEErr (*SetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetAutoTCY) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetBurasagariType) ( ParaFeaturesRef parafeatures, BurasagariType newVal); + ATEErr (*SetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, PreferredKinsokuOrder newVal); + ATEErr (*SetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetKinsoku) ( ParaFeaturesRef parafeatures, KinsokuRef newVal); + ATEErr (*SetMojiKumi) ( ParaFeaturesRef parafeatures, MojiKumiRef newVal); + ATEErr (*SetListStyle) ( ParaFeaturesRef parafeatures, ListStyleRef newVal); + // Other + ATEErr (*SetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, CharFeaturesRef newVal); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script + // ------------------------------------------------------------------ + ATEErr (*SetParagraphDirection) ( ParaFeaturesRef parafeatures, ATE::ParagraphDirection newVal); + ATEErr (*SetJustificationMethod) ( ParaFeaturesRef parafeatures, ATE::JustificationMethod newVal); + ATEErr (*SetKashidaWidth) ( ParaFeaturesRef parafeatures, ATE::KashidaWidth newVal); +#endif + // CLEAR PROPERTIES + // ====================================================================== + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + ATEErr (*ClearJustification) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearFirstLineIndent) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearStartIndent) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearEndIndent) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearSpaceBefore) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearSpaceAfter) ( ParaFeaturesRef parafeatures); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + ATEErr (*ClearAutoHyphenate) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearHyphenatedWordSize) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearPreHyphenSize) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearPostHyphenSize) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearHyphenationZone) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearHyphenateCapitalized) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearHyphenationPreference) ( ParaFeaturesRef parafeatures); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + ATEErr (*ClearWordSpacing) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearLetterSpacing) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearGlyphScaling) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearSingleWordJustification) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearAutoLeadingPercentage) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearLeadingType) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearTabStops) ( ParaFeaturesRef parafeatures); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + ATEErr (*ClearHangingRoman) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearAutoTCY) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearBunriKinshi) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearBurasagariType) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearKinsoku) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearMojiKumi) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearListStyle) ( ParaFeaturesRef parafeatures); + // Other + ATEErr (*ClearEveryLineComposer) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearDefaultCharFeatures) ( ParaFeaturesRef parafeatures); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script + // ------------------------------------------------------------------ + ATEErr (*ClearParagraphDirection) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearJustificationMethod) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearKashidaWidth) ( ParaFeaturesRef parafeatures); +#endif + // ALGEBRA METHODS + // Methods return true if changes were made. + // ====================================================================== + // Intersection of 2 Features is the intersection of each attribute + // on the lhs with the corresponding attribute on the rhs. + // Attribute intersections are defined by the following truth table: + // + // ______________________________________________________________________ + // this.attribute | rhs.attribute || Action/Result + // ====================================================================== + // assigned | assigned || [Case 1] If values are equal + // | || ACTION: nothing + // | || RESULT: value preserved + // | || [Case 2] If values are not equal + // | || ACTION: if (*this.attribute != *rhs.attribute) + // | || this.attribute.Clear(); + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // assigned | unassigned || ACTION: this.attribute.Clear() + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // unassigned | unassigned || ACTION: nothing (both are equal) + // | || RESULT: unassigned + // ______________________________________________________________________ + // + ATEErr (*IntersectFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); + // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. + ATEErr (*ReplaceOrAddFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); + // Unassigns each attribute whose value equals value of corresponding attribute in rhs + ATEErr (*UnassignEachIfEqual) ( ParaFeaturesRef parafeatures, const ParaFeaturesRef rhs, ATEBool8* ret); + // True if all are not assigned; false otherwise + ATEErr (*IsEachNotAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); + // True if all are assigned; false otherwise + ATEErr (*IsEachAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); + // Composer Engine + ATEErr (*GetComposerEngine) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::ComposerEngine* ret); + ATEErr (*SetComposerEngine) ( ParaFeaturesRef parafeatures, ATE::ComposerEngine newVal); + ATEErr (*ClearComposerEngine) ( ParaFeaturesRef parafeatures); + // PRIVATE AND PROTECTED + // ====================================================================== + +}ParaFeaturesSuite; + +typedef struct ParaFeatures1Suite{ + + // Reference count maintenance. + void (*AddRef) ( ParaFeaturesRef parafeatures); + void (*Release) ( ParaFeaturesRef parafeatures); + ATEBool8 (*IsNull) ( ParaFeaturesRef parafeatures); + + // ParaFeatures is a complete Set of paragraph attributes that + // can be applied to text (except for kerning). They can be used to + // describe or Set the (1) local paragraph attributes of text (a.k.a. + // the local overrides or (2) attributes of a named paragraph style. + // + // Often, a given ParaFeatures instance will only partially define + // each of its attributes. The validity of an attribute is + // determined by an associated boolean. Calls to "Get" methods + // return an "isAssigned" boolean that reflects the validity of + // the returned argument. Calls to "Set" methods always Set the + // associated boolean to indicate validity. Calls to "Clear" + // methods always invalidate that boolean/attribute pair. + // + // A paragraph's attribute is determined by an inheritance model. + // At the top is the "Normal" style which fully defines all + // attributes. These can be overriden by a named style or a local + // override, where an attribute is valid. + // + // A given attribute value of a paragraph is determined by starting + // with the local override for that attribute if it is defined. If + // not, then the attribute comes from the corresponding named style + // (if it exists and) if it is defined. If all else fails, the + // default value comes from the "Normal" paragraph style. + // + // Default constructor creates a "blank" ParaFeatures instance where + // all attributes are undefined (invalid). + ATEErr (*Initialize) ( ParaFeaturesRef* parafeatures); + ATEErr (*Clone) ( ParaFeaturesRef parafeatures, ParaFeaturesRef* ret); + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + ATEErr (*GetJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); + ATEErr (*GetFirstLineIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetStartIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetEndIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetSpaceBefore) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetSpaceAfter) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + ATEErr (*GetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetPreHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetPostHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetHyphenationZone) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetHyphenationPreference) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + ATEErr (*GetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMinWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetSingleWordJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); + ATEErr (*GetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + ATEErr (*GetLeadingType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, LeadingType* ret); + ATEErr (*GetTabStops) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, TabStopsRef* ret); + ATEErr (*GetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Float* ret); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + ATEErr (*GetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetAutoTCY) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATETextDOM::Int32* ret); + ATEErr (*GetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetBurasagariType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, BurasagariType* ret); + ATEErr (*GetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, PreferredKinsokuOrder* ret); + ATEErr (*GetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + /// This will return a null object if Kinsoku is not used (ie None set) + ATEErr (*GetKinsoku) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, KinsokuRef* ret); + /// This will return a null object if Mojikumi is not used (ie None set) + ATEErr (*GetMojiKumi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, MojiKumiRef* ret); + // Other + ATEErr (*GetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); + ATEErr (*GetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, CharFeaturesRef* ret); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script + // ------------------------------------------------------------------ + ATEErr (*GetParagraphDirection) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::ParagraphDirection* ret); + ATEErr (*GetJustificationMethod) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::JustificationMethod* ret); + ATEErr (*GetKashidaWidth) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::KashidaWidth* ret); +#endif + // SET PROPERTIES + // ====================================================================== + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + ATEErr (*SetJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); + ATEErr (*SetFirstLineIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetStartIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetEndIndent) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetSpaceBefore) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetSpaceAfter) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + ATEErr (*SetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetPreHyphenSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetPostHyphenSize) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetHyphenationZone) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetHyphenationPreference) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + ATEErr (*SetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMinWordSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetSingleWordJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); + ATEErr (*SetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + ATEErr (*SetLeadingType) ( ParaFeaturesRef parafeatures, LeadingType newVal); + ATEErr (*SetTabStops) ( ParaFeaturesRef parafeatures, TabStopsRef newVal); + ATEErr (*SetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ATETextDOM::Float newVal); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + ATEErr (*SetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetAutoTCY) ( ParaFeaturesRef parafeatures, ATETextDOM::Int32 newVal); + ATEErr (*SetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetBurasagariType) ( ParaFeaturesRef parafeatures, BurasagariType newVal); + ATEErr (*SetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, PreferredKinsokuOrder newVal); + ATEErr (*SetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetKinsoku) ( ParaFeaturesRef parafeatures, KinsokuRef newVal); + ATEErr (*SetMojiKumi) ( ParaFeaturesRef parafeatures, MojiKumiRef newVal); + // Other + ATEErr (*SetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); + ATEErr (*SetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, CharFeaturesRef newVal); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script + // ------------------------------------------------------------------ + ATEErr (*SetParagraphDirection) ( ParaFeaturesRef parafeatures, ATE::ParagraphDirection newVal); + ATEErr (*SetJustificationMethod) ( ParaFeaturesRef parafeatures, ATE::JustificationMethod newVal); + ATEErr (*SetKashidaWidth) ( ParaFeaturesRef parafeatures, ATE::KashidaWidth newVal); +#endif + // CLEAR PROPERTIES + // ====================================================================== + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + ATEErr (*ClearJustification) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearFirstLineIndent) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearStartIndent) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearEndIndent) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearSpaceBefore) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearSpaceAfter) ( ParaFeaturesRef parafeatures); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + ATEErr (*ClearAutoHyphenate) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearHyphenatedWordSize) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearPreHyphenSize) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearPostHyphenSize) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearHyphenationZone) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearHyphenateCapitalized) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearHyphenationPreference) ( ParaFeaturesRef parafeatures); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + ATEErr (*ClearWordSpacing) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearLetterSpacing) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearGlyphScaling) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearSingleWordJustification) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearAutoLeadingPercentage) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearLeadingType) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearTabStops) ( ParaFeaturesRef parafeatures); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + ATEErr (*ClearHangingRoman) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearAutoTCY) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearBunriKinshi) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearBurasagariType) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearKinsoku) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearMojiKumi) ( ParaFeaturesRef parafeatures); + // Other + ATEErr (*ClearEveryLineComposer) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearDefaultCharFeatures) ( ParaFeaturesRef parafeatures); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script + // ------------------------------------------------------------------ + ATEErr (*ClearParagraphDirection) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearJustificationMethod) ( ParaFeaturesRef parafeatures); + ATEErr (*ClearKashidaWidth) ( ParaFeaturesRef parafeatures); +#endif + // ALGEBRA METHODS + // Methods return true if changes were made. + // ====================================================================== + // Intersection of 2 Features is the intersection of each attribute + // on the lhs with the corresponding attribute on the rhs. + // Attribute intersections are defined by the following truth table: + // + // ______________________________________________________________________ + // this.attribute | rhs.attribute || Action/Result + // ====================================================================== + // assigned | assigned || [Case 1] If values are equal + // | || ACTION: nothing + // | || RESULT: value preserved + // | || [Case 2] If values are not equal + // | || ACTION: if (*this.attribute != *rhs.attribute) + // | || this.attribute.Clear(); + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // assigned | unassigned || ACTION: this.attribute.Clear() + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) + // | || RESULT: unassigned + // ---------------------------------------------------------------------- + // unassigned | unassigned || ACTION: nothing (both are equal) + // | || RESULT: unassigned + // ______________________________________________________________________ + // + ATEErr (*IntersectFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); + // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. + ATEErr (*ReplaceOrAddFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); + // Unassigns each attribute whose value equals value of corresponding attribute in rhs + ATEErr (*UnassignEachIfEqual) ( ParaFeaturesRef parafeatures, const ParaFeaturesRef rhs, ATEBool8* ret); + // True if all are not assigned; false otherwise + ATEErr (*IsEachNotAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); + // True if all are assigned; false otherwise + ATEErr (*IsEachAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); + // Composer Engine + ATEErr (*GetComposerEngine) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATE::ComposerEngine* ret); + ATEErr (*SetComposerEngine) ( ParaFeaturesRef parafeatures, ATE::ComposerEngine newVal); + ATEErr (*ClearComposerEngine) ( ParaFeaturesRef parafeatures); + // PRIVATE AND PROTECTED + // ====================================================================== + +}ParaFeatures1Suite; + +////////////////////////////////////////////// +// --ParagraphSuite-- +////////////////////////////////////////////// +#define kParagraphSuite "ATE Paragraph Suite" +#define kParagraphSuiteVersion1 1 +#define kParagraphSuiteVersion kParagraphSuiteVersion1 + +typedef struct ParagraphSuite{ + + // Reference count maintenance. + void (*AddRef) ( ParagraphRef paragraph); + void (*Release) ( ParagraphRef paragraph); + ATEBool8 (*IsNull) ( ParagraphRef paragraph); + + // PROPERTIES + // ======================================================================== + ATEErr (*GetLength) ( ParagraphRef paragraph, ATETextDOM::Int32* ret); + // navigation objects. + ATEErr (*GetStory) ( ParagraphRef paragraph, StoryRef* ret); + ATEErr (*GetTextRange) ( ParagraphRef paragraph, TextRangeRef* ret); + ATEErr (*GetTextRanges) ( ParagraphRef paragraph, TextRangesRef* ret); + ATEErr (*GetTextSelection) ( ParagraphRef paragraph, TextRangesRef* ret); + ATEErr (*GetWordsIterator) ( ParagraphRef paragraph, WordsIteratorRef* ret); + // METHODS + // ======================================================================== + ATEErr (*GetNext) ( ParagraphRef paragraph, ParagraphRef* ret); + ATEErr (*GetPrev) ( ParagraphRef paragraph, ParagraphRef* ret); + ATEErr (*GetContents_AsUnicode) ( ParagraphRef paragraph, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::ATETextDomErr* ret); + ATEErr (*GetContents_AsChar) ( ParagraphRef paragraph, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::ATETextDomErr* ret); + +}ParagraphSuite; + +////////////////////////////////////////////// +// --ParagraphsIteratorSuite-- +////////////////////////////////////////////// +#define kParagraphsIteratorSuite "ATE ParagraphsIterator Suite" +#define kParagraphsIteratorSuiteVersion1 1 +#define kParagraphsIteratorSuiteVersion kParagraphsIteratorSuiteVersion1 + +typedef struct ParagraphsIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( ParagraphsIteratorRef paragraphsiterator); + void (*Release) ( ParagraphsIteratorRef paragraphsiterator); + ATEBool8 (*IsNull) ( ParagraphsIteratorRef paragraphsiterator); + + ATEErr (*Initialize) ( TextRangesRef ranges, Direction direction, ParagraphsIteratorRef* paragraphsiterator); + ATEErr (*IsDone) ( ParagraphsIteratorRef paragraphsiterator, ATEBool8* ret); + ATEErr (*IsNotDone) ( ParagraphsIteratorRef paragraphsiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( ParagraphsIteratorRef paragraphsiterator, ATEBool8* ret); + ATEErr (*MoveToFirst) ( ParagraphsIteratorRef paragraphsiterator); + ATEErr (*MoveToLast) ( ParagraphsIteratorRef paragraphsiterator); + ATEErr (*Next) ( ParagraphsIteratorRef paragraphsiterator); + ATEErr (*Item) ( ParagraphsIteratorRef paragraphsiterator, ParagraphRef* ret); + +}ParagraphsIteratorSuite; + +////////////////////////////////////////////// +// --ParaInspectorSuite-- +////////////////////////////////////////////// +#define kParaInspectorSuite "ATE ParaInspector Suite" +#if SLO_COMPLEXSCRIPT +#define kParaInspectorSuiteVersion101 101 +#define kParaInspectorSuiteVersion102 102 +#define kParaInspectorSuiteVersion kParaInspectorSuiteVersion102 +#else +#define kParaInspectorSuiteVersion101 1 +#define kParaInspectorSuiteVersion102 2 +#define kParaInspectorSuiteVersion kParaInspectorSuiteVersion102 +#endif + +typedef struct ParaInspectorSuite{ + + // Reference count maintenance. + void (*AddRef) ( ParaInspectorRef parainspector); + void (*Release) ( ParaInspectorRef parainspector); + ATEBool8 (*IsNull) ( ParaInspectorRef parainspector); + + ATEErr (*Initialize) ( ParaInspectorRef* parainspector); + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + ATEErr (*GetJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); + ATEErr (*GetFirstLineIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetStartIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetEndIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetSpaceBefore) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetSpaceAfter) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + ATEErr (*GetAutoHyphenate) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetHyphenatedWordSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetPreHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetPostHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetConsecutiveHyphenLimit) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetHyphenationZone) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetHyphenateCapitalized) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetHyphenationPreference) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + ATEErr (*GetDesiredWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMaxWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMinWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetDesiredLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMaxLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMinLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetDesiredGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMaxGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMinGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetSingleWordJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); + ATEErr (*GetAutoLeadingPercentage) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetLeadingType) ( ParaInspectorRef parainspector, ArrayLeadingTypeRef* ret); + ATEErr (*GetTabStops) ( ParaInspectorRef parainspector, ArrayTabStopsRefRef* ret); + ATEErr (*GetDefaultTabWidth) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + ATEErr (*GetHangingRoman) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetAutoTCY) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetBunriKinshi) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetBurasagariType) ( ParaInspectorRef parainspector, ArrayBurasagariTypeRef* ret); + ATEErr (*GetPreferredKinsokuOrder) ( ParaInspectorRef parainspector, ArrayPreferredKinsokuOrderRef* ret); + ATEErr (*GetKurikaeshiMojiShori) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetKinsoku) ( ParaInspectorRef parainspector, ArrayKinsokuRefRef* ret); + ATEErr (*GetMojiKumi) ( ParaInspectorRef parainspector, ArrayMojiKumiRefRef* ret); + ATEErr (*GetListStyle) ( ParaInspectorRef parainspector, ArrayListStyleRefRef* ret); + // Other + ATEErr (*GetEveryLineComposer) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script + // ------------------------------------------------------------------ + ATEErr (*GetParagraphDirection) ( ParaInspectorRef parainspector, ArrayParagraphDirectionRef* ret); + ATEErr (*GetJustificationMethod) ( ParaInspectorRef parainspector, ArrayJustificationMethodRef* ret); + ATEErr (*GetKashidaWidth) ( ParaInspectorRef parainspector, ArrayKashidaWidthRef* ret); +#endif + ATEErr (*GetComposerEngine) ( ParaInspectorRef parainspector, ArrayComposerEngineRef* ret); +}ParaInspectorSuite; + +typedef struct ParaInspector1Suite{ + + // Reference count maintenance. + void (*AddRef) ( ParaInspectorRef parainspector); + void (*Release) ( ParaInspectorRef parainspector); + ATEBool8 (*IsNull) ( ParaInspectorRef parainspector); + + ATEErr (*Initialize) ( ParaInspectorRef* parainspector); + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + ATEErr (*GetJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); + ATEErr (*GetFirstLineIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetStartIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetEndIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetSpaceBefore) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetSpaceAfter) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + ATEErr (*GetAutoHyphenate) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetHyphenatedWordSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetPreHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetPostHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetConsecutiveHyphenLimit) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetHyphenationZone) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetHyphenateCapitalized) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetHyphenationPreference) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + ATEErr (*GetDesiredWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMaxWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMinWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetDesiredLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMaxLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMinLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetDesiredGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMaxGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetMinGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetSingleWordJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); + ATEErr (*GetAutoLeadingPercentage) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + ATEErr (*GetLeadingType) ( ParaInspectorRef parainspector, ArrayLeadingTypeRef* ret); + ATEErr (*GetTabStops) ( ParaInspectorRef parainspector, ArrayTabStopsRefRef* ret); + ATEErr (*GetDefaultTabWidth) ( ParaInspectorRef parainspector, ArrayRealRef* ret); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + ATEErr (*GetHangingRoman) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetAutoTCY) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); + ATEErr (*GetBunriKinshi) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetBurasagariType) ( ParaInspectorRef parainspector, ArrayBurasagariTypeRef* ret); + ATEErr (*GetPreferredKinsokuOrder) ( ParaInspectorRef parainspector, ArrayPreferredKinsokuOrderRef* ret); + ATEErr (*GetKurikaeshiMojiShori) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); + ATEErr (*GetKinsoku) ( ParaInspectorRef parainspector, ArrayKinsokuRefRef* ret); + ATEErr (*GetMojiKumi) ( ParaInspectorRef parainspector, ArrayMojiKumiRefRef* ret); + // Other + ATEErr (*GetEveryLineComposer) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); +#if SLO_COMPLEXSCRIPT + // ------------------------------------------------------------------ + // Complex Script + // ------------------------------------------------------------------ + ATEErr (*GetParagraphDirection) ( ParaInspectorRef parainspector, ArrayParagraphDirectionRef* ret); + ATEErr (*GetJustificationMethod) ( ParaInspectorRef parainspector, ArrayJustificationMethodRef* ret); + ATEErr (*GetKashidaWidth) ( ParaInspectorRef parainspector, ArrayKashidaWidthRef* ret); +#endif + ATEErr (*GetComposerEngine) ( ParaInspectorRef parainspector, ArrayComposerEngineRef* ret); +}ParaInspector1Suite; + +////////////////////////////////////////////// +// --ParaStyleSuite-- +////////////////////////////////////////////// +#define kParaStyleSuite "ATE ParaStyle Suite" +#define kParaStyleSuiteVersion1 1 +#define kParaStyleSuiteVersion kParaStyleSuiteVersion1 + +typedef struct ParaStyleSuite{ + + // Reference count maintenance. + void (*AddRef) ( ParaStyleRef parastyle); + void (*Release) ( ParaStyleRef parastyle); + ATEBool8 (*IsNull) ( ParaStyleRef parastyle); + + /// Name of style is set in pName up to maxLength characters. + /// Length of actual name is returned; 0 if error occurred. + ATEErr (*GetName) ( ParaStyleRef parastyle, ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + /// Sets name of style to null-terminated pName. If existing style of + /// same name exists or *pName == L'\0' then false is returned. + ATEErr (*SetName) ( ParaStyleRef parastyle, const ATETextDOM::Unicode* pName, ATEBool8* ret); + /// Parent style returned. For Normal style, a null object is returned. + ATEErr (*GetParent) ( ParaStyleRef parastyle, ParaStyleRef* ret); + /// Parent style set. Returns false if attempting to set the parent + /// of Normal style, true otherwise. + ATEErr (*SetParent) ( ParaStyleRef parastyle, const ParaStyleRef pStyle, ATEBool8* ret); + /// Returns whether style has parent. Always false for normal style. + ATEErr (*HasParent) ( ParaStyleRef parastyle, ATEBool8* ret); + /// Returns features for style. + ATEErr (*GetFeatures) ( ParaStyleRef parastyle, ParaFeaturesRef* ret); + /// The style's feature attributes are assigned to pFeatures. + /// For Normal style, this has same effect as ReplaceOrAddFeatures. + ATEErr (*SetFeatures) ( ParaStyleRef parastyle, ParaFeaturesRef pFeatures); + /// The style's feature attributes are replaced by any corresponding ones + /// in pFeatures that contain valid values (i.e. the attribute is assigned). + ATEErr (*ReplaceOrAddFeatures) ( ParaStyleRef parastyle, ParaFeaturesRef pFeatures); + ATEErr (*IsEqual) ( ParaStyleRef parastyle, const ParaStyleRef pStyle, ATEBool8* ret); + +}ParaStyleSuite; + +////////////////////////////////////////////// +// --ParaStylesSuite-- +////////////////////////////////////////////// +#define kParaStylesSuite "ATE ParaStyles Suite" +#define kParaStylesSuiteVersion1 1 +#define kParaStylesSuiteVersion kParaStylesSuiteVersion1 + +typedef struct ParaStylesSuite{ + + // Reference count maintenance. + void (*AddRef) ( ParaStylesRef parastyles); + void (*Release) ( ParaStylesRef parastyles); + ATEBool8 (*IsNull) ( ParaStylesRef parastyles); + + ATEErr (*IsEmpty) ( ParaStylesRef parastyles, ATEBool8* ret); + ATEErr (*GetSize) ( ParaStylesRef parastyles, ATETextDOM::Int32* ret); + ATEErr (*ShowAllStyles) ( ParaStylesRef parastyles); + ATEErr (*ShowOnlyUnreferencedStyles) ( ParaStylesRef parastyles); + ATEErr (*ShowOnlyStylesReferencedIn) ( ParaStylesRef parastyles, TextRangeRef pRange); + // Reorders position of style + ATEErr (*MoveStyleTo) ( ParaStylesRef parastyles, ParaStyleRef pStyle, ATETextDOM::Int32 position); + +}ParaStylesSuite; + +////////////////////////////////////////////// +// --ParaStylesIteratorSuite-- +////////////////////////////////////////////// +#define kParaStylesIteratorSuite "ATE ParaStylesIterator Suite" +#define kParaStylesIteratorSuiteVersion1 1 +#define kParaStylesIteratorSuiteVersion kParaStylesIteratorSuiteVersion1 + +typedef struct ParaStylesIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( ParaStylesIteratorRef parastylesiterator); + void (*Release) ( ParaStylesIteratorRef parastylesiterator); + ATEBool8 (*IsNull) ( ParaStylesIteratorRef parastylesiterator); + + ATEErr (*Initialize) ( ParaStylesRef paraStyles, Direction direction, ParaStylesIteratorRef* parastylesiterator); + ATEErr (*IsNotDone) ( ParaStylesIteratorRef parastylesiterator, ATEBool8* ret); + ATEErr (*IsDone) ( ParaStylesIteratorRef parastylesiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( ParaStylesIteratorRef parastylesiterator, ATEBool8* ret); + ATEErr (*MoveToFirst) ( ParaStylesIteratorRef parastylesiterator); + ATEErr (*MoveToLast) ( ParaStylesIteratorRef parastylesiterator); + ATEErr (*Next) ( ParaStylesIteratorRef parastylesiterator); + ATEErr (*Previous) ( ParaStylesIteratorRef parastylesiterator); + ATEErr (*Item) ( ParaStylesIteratorRef parastylesiterator, ParaStyleRef* ret); + +}ParaStylesIteratorSuite; + +////////////////////////////////////////////// +// --SpellSuite-- +////////////////////////////////////////////// +#define kSpellSuite "ATE Spell Suite" +#if SLO_COMPLEXSCRIPT +#define kSpellSuiteVersion101 101 +#define kSpellSuiteVersion102 102 +#define kSpellSuiteVersion kSpellSuiteVersion102 +#else +#define kSpellSuiteVersion101 1 +#define kSpellSuiteVersion102 2 +#define kSpellSuiteVersion kSpellSuiteVersion102 +#endif + +typedef struct SpellSuite{ + + // Reference count maintenance. + void (*AddRef) ( SpellRef spell); + void (*Release) ( SpellRef spell); + ATEBool8 (*IsNull) ( SpellRef spell); + + // Options + // ======================================================================== + ATEErr (*Initialize) ( SpellRef spell ); + ATEErr (*IsInitialized) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8* ret); + ATEErr (*SetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8 newValue); + // Control scope of search to be entire document or Story. + // By default, the entire document is searched. + ATEErr (*GetSearchScope) ( SpellRef spell, SearchScope* ret); + ATEErr (*SetSearchScope) ( SpellRef spell, SearchScope searchScope); + // If called, search is done only within specified TextRange + ATEErr (*SetSearchRange) ( SpellRef spell, const TextRangeRef pRange, const ATEBool8 resetEndOfSentence, const ATEBool8 resetCurPos, ATEBool8 includeWordsOnSearchBoundary ); + // Temporary way to reset the engine for modeless operation + ATEErr (*Reset) ( SpellRef spell); + // Use this if the user changes the text significantly enough that you need to reset, + // but are fairly certain that the text hasn't been changed before the resumePoint. + ATEErr (*ResumeFrom) ( SpellRef spell, const ATETextDOM::Int32 resumePoint); + // Use this to resume from the current insertion point. + ATEErr (*ResumeFromInsertionPoint) ( SpellRef spell); + // Methods + // ======================================================================== + // Searches from start for unknown words and return the first one it finds. + // Returns true if it found an unknown word, false if it searched to the end + // and didn't find any unknown words. + ATEErr (*FindOneMisspelledWord) ( SpellRef spell, SpellCheckingResult* pResult, TextRangeRef pRange, Language* pLanguage, ATEBool8 populateSuggestionList, ATEBool8* ret); + // Calling FindOneMisspelledWord( ) will fill up an internal list of suggested + // corrections. Use these calls to get the contents of that word list: + // + // This will return the size of the buffer required to hold the contents of the word list. + ATEErr (*GetWordListSize) ( SpellRef spell, ATETextDOM::Int32* ret); + // + // This will fill up pWordListBuffer with the contents of the list. + // sizeOfBuffer is the size of pWordListBuffer (used to prevent overflow) + // pNumberOfWords is the number of words in the buffer. The words are all null-terminated. + ATEErr (*GetWordListContents) ( SpellRef spell, ATETextDOM::Unicode* pWordListBuffer, ATETextDOM::Int32 sizeOfBuffer, ATETextDOM::Int32* pNumberOfWords); + ATEErr (*Replace) ( SpellRef spell, TextRangeRef pRange, const ATETextDOM::Unicode* pCorrection ); + // Use this to add an entry to a pair dictionary, binding the selected word to rCorrection. + ATEErr (*AddSelectedToReplaceAllDict) ( SpellRef spell, const ATETextDOM::Unicode* pCorrection); + // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and + // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. + ATEErr (*DoReplaceAll) ( SpellRef spell, ATEBool8* ret); + // Use these to implement ReplaceAll. + // Start by saving off the settings with GetPreReplaceAllSettings( ) + // (also note what text object you're currently working with so you can restore that + // via SetSearchRange( ) when you're finished. + ATEErr (*GetPreReplaceAllSettings) ( SpellRef spell, ATETextDOM::Int32* pCurrentPoint, ATEBool8* pFoundSentenceEnd); + // Implement a loop to go through all the text objects you want to replace all with. + // Use this to find all instances of the target word in the current text object. + // Keep calling it until it returns false, making sure to set firstTimeInThisObject as needed. + // It will return the text range to select and call ReplaceSelected( ) with. + ATEErr (*FindReplaceAllWord) ( SpellRef spell, TextRangeRef pRange, const ATEBool8 firstTimeInThisObject, ATEBool8* ret); + // When finished, restore the correct text object and range using SetSearchRange( ) + // and restore the positions using RestorePreReplaceAllSettings( ) + // Order is important here - do notcall RestorePreReplaceAllSettings( ) first, + // as SetSearchRange( ) will reset the foundSentenceEnd flag. + ATEErr (*RestorePreReplaceAllSettings) ( SpellRef spell, const ATETextDOM::Int32 currentPoint, const ATEBool8 foundSentenceEnd); + // The pair dictionary is not automatically cleared. Call this when you want it cleared. + ATEErr (*ClearPairDictionary) ( SpellRef spell); + // Use this for adding words as they're found. + ATEErr (*AddSelectedToUserDict) ( SpellRef spell); + // User dictionary access and maintenance - used to manage the dictionary at any time. + // + // Calling GetUserDictionaryContents( ) will fill up the same internal list as FindAndSelectOneMisspelledWord( ) + // Use GetWordListSize( ) and GetWordListContents( ) just like with the suggestion list. + ATEErr (*GetUserDictionaryContents) ( SpellRef spell); + // now makes sure that there are no spaces (multiple words) + // Return value reflects success in adding legit word. + ATEErr (*AddToUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord, ATEBool8* ret); + ATEErr (*DeleteFromUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord); + ATEErr (*WordExistsInUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord, const ATE::CheckEquivalentFormsSetting checkEquivalentFormsSetting, ATEBool8* ret); + ATEErr (*WordExistsInIgnoreDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord, const ATE::CheckEquivalentFormsSetting checkEquivalentFormsSetting, ATEBool8* ret); + // The ignore list is used for storing "ignore all" words. + ATEErr (*AddSelectedToIgnoreList) ( SpellRef spell); + // The ignore list is not automatically cleared. Call this when you want it cleared. + ATEErr (*ClearIgnoreList) ( SpellRef spell); + ATEErr (*GetLanguageOfLastMissingDictionary) ( SpellRef spell, Language* ret); + ATEErr (*GetSpellingDictionaryPath) (SpellRef spell, ATETextDOM::Unicode* path, ATETextDOM::Int32 *ret); +#if SLO_COMPLEXSCRIPT + //Complex Script + ATEErr (*GetStrictAlef) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetStrictYeh) ( SpellRef spell, ATEBool8* ret); + ATEErr (*SetStrictAlef) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetStrictYeh) ( SpellRef spell, ATEBool8 newValue); +#endif +}SpellSuite; + + +typedef struct Spell1Suite{ + + // Reference count maintenance. + void (*AddRef) ( SpellRef spell); + void (*Release) ( SpellRef spell); + ATEBool8 (*IsNull) ( SpellRef spell); + + // Options + // ======================================================================== + ATEErr (*Initialize) ( SpellRef spell ); + ATEErr (*IsInitialized) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8* ret); + ATEErr (*SetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8 newValue); + // Control scope of search to be entire document or Story. + // By default, the entire document is searched. + ATEErr (*GetSearchScope) ( SpellRef spell, SearchScope* ret); + ATEErr (*SetSearchScope) ( SpellRef spell, SearchScope searchScope); + // If called, search is done only within specified TextRange + ATEErr (*SetSearchRange) ( SpellRef spell, const TextRangeRef pRange, const ATEBool8 resetEndOfSentence, const ATEBool8 resetCurPos); + // Temporary way to reset the engine for modeless operation + ATEErr (*Reset) ( SpellRef spell); + // Use this if the user changes the text significantly enough that you need to reset, + // but are fairly certain that the text hasn't been changed before the resumePoint. + ATEErr (*ResumeFrom) ( SpellRef spell, const ATETextDOM::Int32 resumePoint); + // Use this to resume from the current insertion point. + ATEErr (*ResumeFromInsertionPoint) ( SpellRef spell); + // Methods + // ======================================================================== + // Searches from start for unknown words and return the first one it finds. + // Returns true if it found an unknown word, false if it searched to the end + // and didn't find any unknown words. + ATEErr (*FindOneMisspelledWord) ( SpellRef spell, SpellCheckingResult* pResult, TextRangeRef pRange, Language* pLanguage, ATEBool8* ret); + // Calling FindOneMisspelledWord( ) will fill up an internal list of suggested + // corrections. Use these calls to get the contents of that word list: + // + // This will return the size of the buffer required to hold the contents of the word list. + ATEErr (*GetWordListSize) ( SpellRef spell, ATETextDOM::Int32* ret); + // + // This will fill up pWordListBuffer with the contents of the list. + // sizeOfBuffer is the size of pWordListBuffer (used to prevent overflow) + // pNumberOfWords is the number of words in the buffer. The words are all null-terminated. + ATEErr (*GetWordListContents) ( SpellRef spell, ATETextDOM::Unicode* pWordListBuffer, ATETextDOM::Int32 sizeOfBuffer, ATETextDOM::Int32* pNumberOfWords); + ATEErr (*Replace) ( SpellRef spell, TextRangeRef pRange, const ATETextDOM::Unicode* pCorrection ); + // Use this to add an entry to a pair dictionary, binding the selected word to rCorrection. + ATEErr (*AddSelectedToReplaceAllDict) ( SpellRef spell, const ATETextDOM::Unicode* pCorrection); + // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and + // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. + ATEErr (*DoReplaceAll) ( SpellRef spell, ATEBool8* ret); + // Use these to implement ReplaceAll. + // Start by saving off the settings with GetPreReplaceAllSettings( ) + // (also note what text object you're currently working with so you can restore that + // via SetSearchRange( ) when you're finished. + ATEErr (*GetPreReplaceAllSettings) ( SpellRef spell, ATETextDOM::Int32* pCurrentPoint, ATEBool8* pFoundSentenceEnd); + // Implement a loop to go through all the text objects you want to replace all with. + // Use this to find all instances of the target word in the current text object. + // Keep calling it until it returns false, making sure to set firstTimeInThisObject as needed. + // It will return the text range to select and call ReplaceSelected( ) with. + ATEErr (*FindReplaceAllWord) ( SpellRef spell, TextRangeRef pRange, const ATEBool8 firstTimeInThisObject, ATEBool8* ret); + // When finished, restore the correct text object and range using SetSearchRange( ) + // and restore the positions using RestorePreReplaceAllSettings( ) + // Order is important here - do notcall RestorePreReplaceAllSettings( ) first, + // as SetSearchRange( ) will reset the foundSentenceEnd flag. + ATEErr (*RestorePreReplaceAllSettings) ( SpellRef spell, const ATETextDOM::Int32 currentPoint, const ATEBool8 foundSentenceEnd); + // The pair dictionary is not automatically cleared. Call this when you want it cleared. + ATEErr (*ClearPairDictionary) ( SpellRef spell); + // Use this for adding words as they're found. + ATEErr (*AddSelectedToUserDict) ( SpellRef spell); + // User dictionary access and maintenance - used to manage the dictionary at any time. + // + // Calling GetUserDictionaryContents( ) will fill up the same internal list as FindAndSelectOneMisspelledWord( ) + // Use GetWordListSize( ) and GetWordListContents( ) just like with the suggestion list. + ATEErr (*GetUserDictionaryContents) ( SpellRef spell); + // now makes sure that there are no spaces (multiple words) + // Return value reflects success in adding legit word. + ATEErr (*AddToUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord, ATEBool8* ret); + ATEErr (*DeleteFromUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord); + ATEErr (*WordExistsInUserDictionary) ( SpellRef spell, const ATETextDOM::Unicode* pWord, ATEBool8* ret); + // The ignore list is used for storing "ignore all" words. + ATEErr (*AddSelectedToIgnoreList) ( SpellRef spell); + // The ignore list is not automatically cleared. Call this when you want it cleared. + ATEErr (*ClearIgnoreList) ( SpellRef spell); + ATEErr (*GetLanguageOfLastMissingDictionary) ( SpellRef spell, Language* ret); + ATEErr (*GetSpellingDictionaryPath) (SpellRef spell, ATETextDOM::Unicode* path, ATETextDOM::Int32 *ret); +#if SLO_COMPLEXSCRIPT + //Complex Script + ATEErr (*GetStrictAlef) ( SpellRef spell, ATEBool8* ret); + ATEErr (*GetStrictYeh) ( SpellRef spell, ATEBool8* ret); + ATEErr (*SetStrictAlef) ( SpellRef spell, ATEBool8 newValue); + ATEErr (*SetStrictYeh) ( SpellRef spell, ATEBool8 newValue); +#endif +}Spell1Suite; + +////////////////////////////////////////////// +// --StoriesSuite-- +////////////////////////////////////////////// +#define kStoriesSuite "ATE Stories Suite" +#define kStoriesSuiteVersion1 1 +#define kStoriesSuiteVersion kStoriesSuiteVersion1 + +typedef struct StoriesSuite{ + + // Reference count maintenance. + void (*AddRef) ( StoriesRef stories); + void (*Release) ( StoriesRef stories); + ATEBool8 (*IsNull) ( StoriesRef stories); + + ATEErr (*GetSize) ( StoriesRef stories, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( StoriesRef stories, StoryRef* ret); + ATEErr (*GetLast) ( StoriesRef stories, StoryRef* ret); + /// Only one story might have the focus. It is the one being edited by keyboard input. + /// The current focused story might lose focus if multiselection happens outside the focused story, or + /// a mouse click happens that makes the story lose focus ( like tool bar action ). + ATEErr (*HasFocus) ( StoriesRef stories, ATEBool8* ret); + /// Return the focused story, the one being edited. If there is no text being edited, it will return + /// a Null object, you can check the return using .IsNull() method. + ATEErr (*GetFocus) ( StoriesRef stories, StoryRef* ret); + /// changing focus will deselect everything in the document. + ATEErr (*SetFocus) ( StoriesRef stories, const StoryRef story); + ATEErr (*LoseFocus) ( StoriesRef stories); + // navigation objects. + ATEErr (*GetTextRanges) ( StoriesRef stories, TextRangesRef* ret); + ATEErr (*GetTextSelection) ( StoriesRef stories, TextRangesRef* ret); + ATEErr (*GetParagraphsIterator) ( StoriesRef stories, ParagraphsIteratorRef* ret); + ATEErr (*GetWordsIterator) ( StoriesRef stories, WordsIteratorRef* ret); + ATEErr (*GetTextRunsIterator) ( StoriesRef stories, TextRunsIteratorRef* ret); + ATEErr (*GetDocumentTextResources) ( StoriesRef stories, DocumentTextResourcesRef* ret); + // METHODS + // ======================================================================== + ATEErr (*Item) ( StoriesRef stories, ATETextDOM::Int32 nIndex, StoryRef* ret); + /* Suspend reflow calculation. This will speed up ITextRange::InsertXXX() call or any call that + causes a reflow to happen.*/ + ATEErr (*SuspendReflow) ( StoriesRef stories); + /// Resume reflow calculation. Make sure to match each SuspendReflow with ResumeReflow. + ATEErr (*ResumeReflow) ( StoriesRef stories); + // DOCUMENT METHODS + // ======================================================================== + +}StoriesSuite; + +////////////////////////////////////////////// +// --StorySuite-- +////////////////////////////////////////////// +#define kStorySuite "ATE Story Suite" +#define kStorySuiteVersion1 1 +#define kStorySuiteVersion kStorySuiteVersion1 + +typedef struct StorySuite{ + + // Reference count maintenance. + void (*AddRef) ( StoryRef story); + void (*Release) ( StoryRef story); + ATEBool8 (*IsNull) ( StoryRef story); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + /// Get the index of this story from the stories array. + ATEErr (*GetIndex) ( StoryRef story, ATETextDOM::Int32* ret); + /// Get how many characters in this story. + ATEErr (*GetSize) ( StoryRef story, ATETextDOM::Int32* ret); + /// navigation objects. + ATEErr (*GetStories) ( StoryRef story, StoriesRef* ret); + /// return the text range of this story (0, GetSize()). + ATEErr (*GetTextRange_ForThisStory) ( StoryRef story, TextRangeRef* ret); + ATEErr (*GetTextSelection) ( StoryRef story, TextRangesRef* ret); + ATEErr (*GetParagraphsIterator) ( StoryRef story, ParagraphsIteratorRef* ret); + ATEErr (*GetWordsIterator) ( StoryRef story, WordsIteratorRef* ret); + ATEErr (*GetTextRunsIterator) ( StoryRef story, TextRunsIteratorRef* ret); + ATEErr (*GetTextFramesIterator) ( StoryRef story, TextFramesIteratorRef* ret); + ATEErr (*GetFrame) ( StoryRef story, ATETextDOM::Int32 frameIndex, TextFrameRef* ret); + /// for auto or optical kerns + ATEErr (*SetKernForSelection) ( StoryRef story, const TextRangeRef textRange, AutoKernType autoKernType); + /// for manual kerns + ATEErr (*SetKernAtChar) ( StoryRef story, ATETextDOM::Int32 charIndex, ATETextDOM::Int32 value); + ATEErr (*GetKern) ( StoryRef story, const TextRangeRef textRange, AutoKernType* pAutoKernType, ATETextDOM::Int32* value); + ATEErr (*GetModelKernAtChar) ( StoryRef story, ATETextDOM::Int32 charIndex, ATETextDOM::Int32* pManualKernValue, AutoKernType* ret); + // ======================================================================== + // METHODS + // ======================================================================== + /** Get a text range from start to end. + This function might change start and end if they are invalid. + i.e, if either has negative values or exceeding Story.GetSize(). + */ + ATEErr (*GetTextRange) ( StoryRef story, ATETextDOM::Int32 start, ATETextDOM::Int32 end, TextRangeRef* ret); + ATEErr (*IsEqual) ( StoryRef story, const StoryRef anotherStory, ATEBool8* ret); + ATEErr (*Duplicate) ( StoryRef story, StoryRef* ret); + /** Suspend reflow calculation. This will speed up ITextRange::InsertXXX() call or any call that + causes a reflow to happen.*/ + ATEErr (*SuspendReflow) ( StoryRef story); + /** Resume reflow calculation. + Make sure to match each SuspendReflow with ResumeReflow. Or use IInhibitReflow instead of + SuspendReflow() and ResumeReflow(). + */ + ATEErr (*ResumeReflow) ( StoryRef story); + +}StorySuite; + +////////////////////////////////////////////// +// --TabStopSuite-- +////////////////////////////////////////////// +#define kTabStopSuite "ATE TabStop Suite" +#define kTabStopSuiteVersion1 1 +#define kTabStopSuiteVersion kTabStopSuiteVersion1 + +typedef struct TabStopSuite{ + + // Reference count maintenance. + void (*AddRef) ( TabStopRef tabstop); + void (*Release) ( TabStopRef tabstop); + ATEBool8 (*IsNull) ( TabStopRef tabstop); + + ATEErr (*Initialize) ( TabStopRef* tabstop); + // PROPERTIES + // ======================================================================= + ATEErr (*GetTabType) ( TabStopRef tabstop, TabType* ret); + ATEErr (*SetTabType) ( TabStopRef tabstop, TabType tabType); + ATEErr (*GetPosition) ( TabStopRef tabstop, ATETextDOM::Float* ret); + ATEErr (*SetPosition) ( TabStopRef tabstop, ATETextDOM::Float position); + ATEErr (*HasLeader) ( TabStopRef tabstop, ATEBool8* ret); + ATEErr (*GetLeader) ( TabStopRef tabstop, ATETextDOM::Unicode* leader, ATETextDOM::Int32 maxLength); + ATEErr (*SetLeader) ( TabStopRef tabstop, ATETextDOM::Unicode* leader); + ATEErr (*GetDecimalCharacter) ( TabStopRef tabstop, ATETextDOM::Unicode* ret); + ATEErr (*SetDecimalCharacter) ( TabStopRef tabstop, ATETextDOM::Unicode decimalChar); + +}TabStopSuite; + +////////////////////////////////////////////// +// --TabStopsSuite-- +////////////////////////////////////////////// +#define kTabStopsSuite "ATE TabStops Suite" +#define kTabStopsSuiteVersion1 1 +#define kTabStopsSuiteVersion kTabStopsSuiteVersion1 + +typedef struct TabStopsSuite{ + + // Reference count maintenance. + void (*AddRef) ( TabStopsRef tabstops); + void (*Release) ( TabStopsRef tabstops); + ATEBool8 (*IsNull) ( TabStopsRef tabstops); + + // TabStops is a container class that stores an array of TabStop + // instances. Often, a client will receive a TabStops object when + // asking about the tab stops of a selected paragraph. In other + // cases, they will wish to create their own Set of TabStops to + // apply to a paragraph. + // + // Creates empty container + ATEErr (*Initialize) ( TabStopsRef* tabstops); + // PROPERTIES + // ======================================================================= + // Number of TabStop instances in container + ATEErr (*GetSize) ( TabStopsRef tabstops, ATETextDOM::Int32* ret); + // Returns first TabStop in container + ATEErr (*GetFirst) ( TabStopsRef tabstops, TabStopRef* ret); + // Returns last TabStop in container + ATEErr (*GetLast) ( TabStopsRef tabstops, TabStopRef* ret); + // METHODS + // ======================================================================= + // Adds a TabStop or replaces an existing one in container. + ATEErr (*ReplaceOrAdd) ( TabStopsRef tabstops, const TabStopRef pTabStop); + // Requests TabStop by index. + ATEErr (*Item) ( TabStopsRef tabstops, ATETextDOM::Int32 nIndex, TabStopRef* ret); + // Removes TabStop by index. No op if bad index passed in. + ATEErr (*Remove) ( TabStopsRef tabstops, ATETextDOM::Int32 nIndex); + // Empties container + ATEErr (*RemoveAll) ( TabStopsRef tabstops); + // PROTECTED AND PRIVATE METHODS + // ======================================================================= + +}TabStopsSuite; + +////////////////////////////////////////////// +// --TabStopsIteratorSuite-- +////////////////////////////////////////////// +#define kTabStopsIteratorSuite "ATE TabStopsIterator Suite" +#define kTabStopsIteratorSuiteVersion1 1 +#define kTabStopsIteratorSuiteVersion kTabStopsIteratorSuiteVersion1 + +typedef struct TabStopsIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( TabStopsIteratorRef tabstopsiterator); + void (*Release) ( TabStopsIteratorRef tabstopsiterator); + ATEBool8 (*IsNull) ( TabStopsIteratorRef tabstopsiterator); + + ATEErr (*Initialize) ( TabStopsRef tabStops, Direction direction, TabStopsIteratorRef* tabstopsiterator); + ATEErr (*IsDone) ( TabStopsIteratorRef tabstopsiterator, ATEBool8* ret); + ATEErr (*IsNotDone) ( TabStopsIteratorRef tabstopsiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( TabStopsIteratorRef tabstopsiterator, ATEBool8* ret); + ATEErr (*MoveToFirst) ( TabStopsIteratorRef tabstopsiterator); + ATEErr (*MoveToLast) ( TabStopsIteratorRef tabstopsiterator); + ATEErr (*Next) ( TabStopsIteratorRef tabstopsiterator); + ATEErr (*Item) ( TabStopsIteratorRef tabstopsiterator, TabStopRef* ret); + +}TabStopsIteratorSuite; + +////////////////////////////////////////////// +// --TextRangeSuite-- +////////////////////////////////////////////// +#define kTextRangeSuite "ATE TextRange Suite" +#define kTextRangeSuiteVersion1 1 +#define kTextRangeSuiteVersion kTextRangeSuiteVersion1 + +typedef struct TextRangeSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextRangeRef textrange); + void (*Release) ( TextRangeRef textrange); + ATEBool8 (*IsNull) ( TextRangeRef textrange); + + // PROPERTIES + // ======================================================================== + ATEErr (*GetStart) ( TextRangeRef textrange, ATETextDOM::Int32* ret); + ATEErr (*SetStart) ( TextRangeRef textrange, ATETextDOM::Int32 start); + ATEErr (*GetEnd) ( TextRangeRef textrange, ATETextDOM::Int32* ret); + ATEErr (*SetEnd) ( TextRangeRef textrange, ATETextDOM::Int32 end); + ATEErr (*GetSize) ( TextRangeRef textrange, ATETextDOM::Int32* ret); + // NAVIGATION OBJECTS + // ======================================================================== + ATEErr (*GetStory) ( TextRangeRef textrange, StoryRef* ret); + ATEErr (*GetTextSelection) ( TextRangeRef textrange, TextRangesRef* ret); + ATEErr (*GetTextFramesIterator) ( TextRangeRef textrange, TextFramesIteratorRef* ret); + ATEErr (*GetParagraphsIterator) ( TextRangeRef textrange, ParagraphsIteratorRef* ret); + ATEErr (*GetWordsIterator) ( TextRangeRef textrange, WordsIteratorRef* ret); + ATEErr (*GetTextRunsIterator) ( TextRangeRef textrange, TextRunsIteratorRef* ret); + // ATTRIBUTE INSPECTION AND MODIFICATION + // ======================================================================== + /// The returned inspector object consolidates the fully-defined + /// set of attributes. Arrays for each attribute store unique values. + ATEErr (*GetCharInspector) ( TextRangeRef textrange, CharInspectorRef* ret); + /// The returned inspector object consolidates the fully-defined + /// set of attributes. Arrays for each attribute store unique values. + ATEErr (*GetParaInspector) ( TextRangeRef textrange, ParaInspectorRef* ret); + /// Returns list of named styles used in the TextRange + ATEErr (*GetNamedCharStyles) ( TextRangeRef textrange, CharStylesRef* ret); + /// Returns list of named styles used in the TextRange + ATEErr (*GetNamedParaStyles) ( TextRangeRef textrange, ParaStylesRef* ret); + /// Set the named style referred to by pName in the TextRange. Returns + /// false if style not found. + ATEErr (*SetNamedCharStyle) ( TextRangeRef textrange, const ATETextDOM::Unicode* pName, ATEBool8* ret); + /// Set the named style referred to by pName in the TextRange. Returns + /// false if style not found. + ATEErr (*SetNamedParaStyle) ( TextRangeRef textrange, const ATETextDOM::Unicode* pName, ATEBool8* ret); + /// Collapses attributes of named style into local overrides. Values in + /// the local override trump those of the named style which trumps values + /// in the parent (and so on) + ATEErr (*ClearNamedCharStyle) ( TextRangeRef textrange); + /// Collapses attributes of named style into local overrides. Values in + /// the local override trump those of the named style which trumps values + /// in the parent (and so on) + ATEErr (*ClearNamedParaStyle) ( TextRangeRef textrange); + /// Unique char features refer to the common "flattened" (or fully- + /// defined set of) attributes used in the TextRange. + /// + /// Hence, GetUniqueCharFeatures returns CharFeatures + /// objects that are the intersection of full attribute sets for each + /// text run. Only values that are the same across text runs are valid. + ATEErr (*GetUniqueCharFeatures) ( TextRangeRef textrange, CharFeaturesRef* ret); + /// Unique char features refer to the common "flattened" (or fully- + /// defined set of) attributes used in the TextRange. + /// + /// Hence, GetUniqueParaFeatures returns ParaFeatures + /// objects that are the intersection of full attribute sets for each + /// text run. Only values that are the same across text runs are valid. + ATEErr (*GetUniqueParaFeatures) ( TextRangeRef textrange, ParaFeaturesRef* ret); + /// If true, then local overrides are present. If false, then none exist. + ATEErr (*HasLocalCharFeatures) ( TextRangeRef textrange, ATEBool8* ret); + /// If true, then local overrides are present. If false, then none exist. + ATEErr (*HasLocalParaFeatures) ( TextRangeRef textrange, ATEBool8* ret); + /// Unique local char features refer to the common local overrides, + /// i.e. the overrides that are the same throughout all the text runs + /// in the TextRange. + /// + /// Hence, GetUniqueLocalCharFeatures returns CharFeatures + /// objects that are the intersection of the local overrides. Only values + /// that are the same (unique) across all text runs are valid. + /// + /// An empty CharFeatures (every attribute is "invalid") indicates + /// either the text range has no local overrides or that no common + /// attribute values existed for the local overrides. + ATEErr (*GetUniqueLocalCharFeatures) ( TextRangeRef textrange, CharFeaturesRef* ret); + /// Unique local char features refer to the common local overrides, + /// i.e. the overrides that are the same throughout all the text runs + /// in the TextRange. + /// + /// Hence, GetUniqueLocalParaFeatures returns ParaFeatures + /// objects that are the intersection of the local overrides. Only values + /// that are the same (unique) across all text runs are valid. + /// + /// An empty ParaFeatures (every attribute is "invalid") indicates + /// either the text range has no local overrides or that no common + /// attribute values existed for the local overrides. + ATEErr (*GetUniqueLocalParaFeatures) ( TextRangeRef textrange, ParaFeaturesRef* ret); + /// Local overrides are specified via CharFeatures. They typically + /// trump (hence the name override) the attribute values defined by the + /// text's associated named CharStyle (if one is attached) and the + /// default normal style. Clearing local overrides causes text to get its + /// attributes from an associated named style (if any) or the normal style. + /// + /// To completely replace the current set of overrides with a new set, + /// use SetLocalCharFeatures( ). + /// + /// To add additional overrides or to set existing overrides to different + /// values, use ReplaceOrAddLocalCharFeatures( ). + ATEErr (*SetLocalCharFeatures) ( TextRangeRef textrange, const CharFeaturesRef pFeatures); + ATEErr (*ReplaceOrAddLocalCharFeatures) ( TextRangeRef textrange, const CharFeaturesRef pFeatures); + ATEErr (*ClearLocalCharFeatures) ( TextRangeRef textrange); + /// Local overrides are specified via ParaFeatures. They typically + /// trump (hence the name override) the attribute values defined by the + /// text's associated named ParaStyle (if one is attached) and the + /// default normal style. Clearing local overrides causes text to get its + /// attributes from an associated named style (if any) or the normal style. + /// + /// To completely replace the current set of overrides with a new set, + /// use SetLocalParaFeatures( ). + /// + /// To add additional overrides or to set existing overrides to different + /// values, use ReplaceOrAddLocalPara}Features( ). + ATEErr (*SetLocalParaFeatures) ( TextRangeRef textrange, const ParaFeaturesRef pFeatures); + ATEErr (*ReplaceOrAddLocalParaFeatures) ( TextRangeRef textrange, const ParaFeaturesRef pFeatures); + ATEErr (*ClearLocalParaFeatures) ( TextRangeRef textrange); + // METHODS + // ======================================================================== + ATEErr (*SetStory) ( TextRangeRef textrange, const StoryRef story); + ATEErr (*SetRange) ( TextRangeRef textrange, ATETextDOM::Int32 start, ATETextDOM::Int32 end); + /// start and end of this range will change depending on direction + /// if direction = CollapseEnd, then end = start + /// if direction = CollapseStart, then start = end + ATEErr (*Collapse) ( TextRangeRef textrange, CollapseDirection direction); + /// Translate start and end by 'unit'. + /// a Move(3), will make this range start+3, end+3, pending story limits. i.e start and end will never be out of bounds. + /// The return of this method will be equal to 'unit' unless it is out of bounds, in that case, return is zero. + ATEErr (*Move) ( TextRangeRef textrange, ATETextDOM::Int32 unit, ATETextDOM::Int32* ret); + /// This method will make a copy of this range. + ATEErr (*Clone) ( TextRangeRef textrange, TextRangeRef* ret); + /// Insert 'text' before the start of the range. + ATEErr (*InsertBefore_AsUnicode) ( TextRangeRef textrange, const ATETextDOM::Unicode* text, ATETextDOM::Int32 length ); + /// Insert 'text' after the end of the range. + ATEErr (*InsertAfter_AsUnicode) ( TextRangeRef textrange, const ATETextDOM::Unicode* text, ATETextDOM::Int32 length ); + /// Insert 'anotherRange' before the start of the range. + ATEErr (*InsertBefore_AsTextRange) ( TextRangeRef textrange, const TextRangeRef anotherRange); + /// Insert 'anotherRange' after the end of the range. + ATEErr (*InsertAfter_AsTextRange) ( TextRangeRef textrange, const TextRangeRef anotherRange); + /** Gets the contents of this range as unicode. + Return value is number of characters. + */ + ATEErr (*GetContents_AsUnicode) ( TextRangeRef textrange, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + /** Gets the contents of this range as platform codes. Internally things are + stored in unicode, so a conversion will happen data might get lost. + Return value is number of characters. + */ + ATEErr (*GetContents_AsChar) ( TextRangeRef textrange, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetSingleGlyphInRange) ( TextRangeRef textrange, ATEGlyphID* pSingleGlyph, ATEBool8* ret); + /// This method will select this range. + /// if addToSelection is true, it will add this range to the current document selection. + /// if addToSelection is false, it will clear the selection from the document and only select this range. + ATEErr (*Select) ( TextRangeRef textrange, ATEBool8 addToSelection); + /// This method will remove this range from the selection. + /// Note, deselecting a range can cause defregmented selection, if this range is a sub range of the current selection. + ATEErr (*DeSelect) ( TextRangeRef textrange); + ATEErr (*ChangeCase) ( TextRangeRef textrange, CaseChangeType caseChangeType); + ATEErr (*FitHeadlines) ( TextRangeRef textrange); + /// This method will delete all the characters in that range. + ATEErr (*Remove) ( TextRangeRef textrange); + ATEErr (*IsEqual) ( TextRangeRef textrange, const TextRangeRef anotherRange, ATEBool8* ret); + /// This Range has to be of size equal to 1, any other size will throw error (kBadParameter) + ATEErr (*GetCharacterType) ( TextRangeRef textrange, ASCharType* ret); + +}TextRangeSuite; + +////////////////////////////////////////////// +// --TextRangesSuite-- +////////////////////////////////////////////// +#define kTextRangesSuite "ATE TextRanges Suite" +#define kTextRangesSuiteVersion1 1 +#define kTextRangesSuiteVersion kTextRangesSuiteVersion1 + +typedef struct TextRangesSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextRangesRef textranges); + void (*Release) ( TextRangesRef textranges); + ATEBool8 (*IsNull) ( TextRangesRef textranges); + + ATEErr (*Initialize) ( TextRangesRef* textranges); + // PROPERTIES + // ====================================================================== + ATEErr (*GetSize) ( TextRangesRef textranges, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( TextRangesRef textranges, TextRangeRef* ret); + ATEErr (*GetLast) ( TextRangesRef textranges, TextRangeRef* ret); + // navigation objects. + ATEErr (*GetTextSelection) ( TextRangesRef textranges, TextRangesRef* ret); + ATEErr (*GetParagraphsIterator) ( TextRangesRef textranges, ParagraphsIteratorRef* ret); + ATEErr (*GetWordsIterator) ( TextRangesRef textranges, WordsIteratorRef* ret); + ATEErr (*GetTextRunsIterator) ( TextRangesRef textranges, TextRunsIteratorRef* ret); + // ATTRIBUTE INSPECTION AND MODIFICATION + // ======================================================================== + /// The returned inspector object consolidates the fully-defined + /// set of attributes. Arrays for each attribute store unique values. + ATEErr (*GetCharInspector) ( TextRangesRef textranges, CharInspectorRef* ret); + ATEErr (*GetParaInspector) ( TextRangesRef textranges, ParaInspectorRef* ret); + /// Collapses attributes of named style into local overrides. Values in + /// the local override trump those of the named style which trumps values + /// in the parent (and so on) + ATEErr (*ClearNamedCharStyle) ( TextRangesRef textranges); + ATEErr (*ClearNamedParaStyle) ( TextRangesRef textranges); + /// Unique char features refer to the common "flattened" (or fully- + /// defined set of) attributes used across each TextRange in the + /// TextRanges object. + /// + /// Hence, GetUnique{Char,Para}Features returns {Char,Para}Features + /// objects that are the intersection of full attribute sets for each + /// text run. Only values that are the same across text runs are valid. + ATEErr (*GetUniqueCharFeatures) ( TextRangesRef textranges, CharFeaturesRef* ret); + ATEErr (*GetUniqueParaFeatures) ( TextRangesRef textranges, ParaFeaturesRef* ret); + /// If true, then local overrides are present. If false, then none exist. + ATEErr (*HasLocalCharFeatures) ( TextRangesRef textranges, ATEBool8* ret); + ATEErr (*HasLocalParaFeatures) ( TextRangesRef textranges, ATEBool8* ret); + /// Unique local char features refer to the common local overrides, + /// i.e. the overrides that are the same throughout each TextRange + /// in the TextRanges object. + /// + /// Hence, GetUniqueLocal{Char,Para}Features returns {Char,Para}Features + /// objects that are the intersection of the local overrides. Only values + /// that are the same (unique) for all text runs are valid. + /// + /// An empty {Char,Para}Features (every attribute is "invalid") indicates + /// either no local overrides exist in any of the TextRange objects + /// or that no common attribute values existed for the local overrides. + ATEErr (*GetUniqueLocalCharFeatures) ( TextRangesRef textranges, CharFeaturesRef* ret); + ATEErr (*GetUniqueLocalParaFeatures) ( TextRangesRef textranges, ParaFeaturesRef* ret); + /// Local overrides are specified via {Char,Para}Features. They typically + /// trump (hence the name override) the attribute values defined by the + /// text's associated named {Char,Para}Style (if one is attached) and the + /// default normal style. Clearing local overrides causes text to get its + /// attributes from an associated named style (if any) or the normal style. + /// + /// To completely replace the current set of overrides with a new set, + /// use SetLocal{Char,Para}Features( ). + /// + /// To add additional overrides or to set existing overrides to different + /// values, use ReplaceOrAddLocal{Char,Para}Features( ). + ATEErr (*SetLocalCharFeatures) ( TextRangesRef textranges, const CharFeaturesRef pFeatures); + ATEErr (*ReplaceOrAddLocalCharFeatures) ( TextRangesRef textranges, const CharFeaturesRef pFeatures); + ATEErr (*ClearLocalCharFeatures) ( TextRangesRef textranges); + ATEErr (*SetLocalParaFeatures) ( TextRangesRef textranges, const ParaFeaturesRef pFeatures); + ATEErr (*ReplaceOrAddLocalParaFeatures) ( TextRangesRef textranges, const ParaFeaturesRef pFeatures); + ATEErr (*ClearLocalParaFeatures) ( TextRangesRef textranges); + // METHODS + // ====================================================================== + /// This method will select those ranges. + /// if addToSelection is true, it will add those ranges to the current document selection. + /// if addToSelection is false, it will clear the selection from the document and only select those ranges. + ATEErr (*Select) ( TextRangesRef textranges, ATEBool8 addToSelection); + /// This method will remove those ranges from the selection. + /// Note, deselecting ranges can cause defregmented selection. + ATEErr (*DeSelect) ( TextRangesRef textranges); + ATEErr (*GetContents_AsUnicode) ( TextRangesRef textranges, ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*GetContents_AsChar) ( TextRangesRef textranges, char* text, ATETextDOM::Int32 maxLength, ATETextDOM::Int32* ret); + ATEErr (*ChangeCase) ( TextRangesRef textranges, CaseChangeType caseChangeType); + ATEErr (*Add) ( TextRangesRef textranges, const TextRangeRef textRange); + ATEErr (*Item) ( TextRangesRef textranges, ATETextDOM::Int32 nIndex, TextRangeRef* ret); + ATEErr (*RemoveAll) ( TextRangesRef textranges); + ATEErr (*Remove) ( TextRangesRef textranges, ATETextDOM::Int32 nIndex); + +}TextRangesSuite; + +////////////////////////////////////////////// +// --TextRangesIteratorSuite-- +////////////////////////////////////////////// +#define kTextRangesIteratorSuite "ATE TextRangesIterator Suite" +#define kTextRangesIteratorSuiteVersion1 1 +#define kTextRangesIteratorSuiteVersion kTextRangesIteratorSuiteVersion1 + +typedef struct TextRangesIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextRangesIteratorRef textrangesiterator); + void (*Release) ( TextRangesIteratorRef textrangesiterator); + ATEBool8 (*IsNull) ( TextRangesIteratorRef textrangesiterator); + + ATEErr (*Initialize) ( TextRangesRef textRanges, Direction direction, TextRangesIteratorRef* textrangesiterator); + ATEErr (*Clone) ( TextRangesIteratorRef textrangesiterator, TextRangesIteratorRef* ret); + ATEErr (*IsNotDone) ( TextRangesIteratorRef textrangesiterator, ATEBool8* ret); + ATEErr (*IsDone) ( TextRangesIteratorRef textrangesiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( TextRangesIteratorRef textrangesiterator, ATEBool8* ret); + ATEErr (*MoveToFirst) ( TextRangesIteratorRef textrangesiterator); + ATEErr (*MoveToLast) ( TextRangesIteratorRef textrangesiterator); + ATEErr (*Next) ( TextRangesIteratorRef textrangesiterator); + ATEErr (*Item) ( TextRangesIteratorRef textrangesiterator, TextRangeRef* ret); + +}TextRangesIteratorSuite; + +////////////////////////////////////////////// +// --TextRunsIteratorSuite-- +////////////////////////////////////////////// +#define kTextRunsIteratorSuite "ATE TextRunsIterator Suite" +#define kTextRunsIteratorSuiteVersion1 1 +#define kTextRunsIteratorSuiteVersion kTextRunsIteratorSuiteVersion1 + +typedef struct TextRunsIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( TextRunsIteratorRef textrunsiterator); + void (*Release) ( TextRunsIteratorRef textrunsiterator); + ATEBool8 (*IsNull) ( TextRunsIteratorRef textrunsiterator); + + /// A TextRun is a range of text whose character attributes are the same. + /// Insertions and deletions into a story can invalidate the entire iterator. + ATEErr (*Initialize) ( const TextRangesRef ranges, Direction direction, TextRunsIteratorRef* textrunsiterator); + ATEErr (*IsNotDone) ( TextRunsIteratorRef textrunsiterator, ATEBool8* ret); + ATEErr (*IsDone) ( TextRunsIteratorRef textrunsiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( TextRunsIteratorRef textrunsiterator, ATEBool8* ret); + ATEErr (*MoveToFirst) ( TextRunsIteratorRef textrunsiterator); + ATEErr (*MoveToLast) ( TextRunsIteratorRef textrunsiterator); + /// The next run will be the one following (or preceding, depending on + /// the iterator's direction) the run returned by Item( ). Since Item( ) + /// is affected by attribute modifications to text, so is Next( ). + ATEErr (*Next) ( TextRunsIteratorRef textrunsiterator); + /// The range returned by Item( ) may differ from a preceding call if + /// character attributes are modified in the story that the run is a + /// part of. For forward iteration, the new run will begin at or + /// before the old run. Similar for backwards iteration. + ATEErr (*Item) ( TextRunsIteratorRef textrunsiterator, TextRangeRef* ret); + +}TextRunsIteratorSuite; + +////////////////////////////////////////////// +// --WordsIteratorSuite-- +////////////////////////////////////////////// +#define kWordsIteratorSuite "ATE WordsIterator Suite" +#define kWordsIteratorSuiteVersion1 1 +#define kWordsIteratorSuiteVersion kWordsIteratorSuiteVersion1 + +typedef struct WordsIteratorSuite{ + + // Reference count maintenance. + void (*AddRef) ( WordsIteratorRef wordsiterator); + void (*Release) ( WordsIteratorRef wordsiterator); + ATEBool8 (*IsNull) ( WordsIteratorRef wordsiterator); + + ATEErr (*Initialize) ( const TextRangesRef ranges, Direction direction, WordsIteratorRef* wordsiterator); + ATEErr (*IsNotDone) ( WordsIteratorRef wordsiterator, ATEBool8* ret); + ATEErr (*IsDone) ( WordsIteratorRef wordsiterator, ATEBool8* ret); + ATEErr (*IsEmpty) ( WordsIteratorRef wordsiterator, ATEBool8* ret); + ATEErr (*MoveToFirst) ( WordsIteratorRef wordsiterator); + ATEErr (*MoveToLast) ( WordsIteratorRef wordsiterator); + ATEErr (*Next) ( WordsIteratorRef wordsiterator); + // The next word corresponds to performing a control/command + arrow key + // action from the UI. Hence, each TextRange returned includes trailing + // characters. This also implies that (among other things) "..." is considered + // a word. + ATEErr (*Item) ( WordsIteratorRef wordsiterator, TextRangeRef* ret); + // NOTE: Trailing information is always for the current word + // returned by Item( ). It always gives you the counts for + // characters that come after (i.e. trailing) the word + // (regardless of the direction of iteration) + // + // The total number of trailing characters is given by GetTrailingCount( ) + ATEErr (*GetTrailingSpaceCount) ( WordsIteratorRef wordsiterator, ATETextDOM::Int32* ret); + ATEErr (*GetTrailingCount) ( WordsIteratorRef wordsiterator, ATETextDOM::Int32* ret); + ATEErr (*GetTrailingTerminatingPunctuationCount) ( WordsIteratorRef wordsiterator, ATETextDOM::Int32* ret); + +}WordsIteratorSuite; + + +////////////////////////////////////////////// +// --ArrayLineSuite -- +////////////////////////////////////////////// +#define kArrayLineSuite "ATE ArrayLine Suite" +#define kArrayLineSuiteVersion1 1 +#define kArrayLineSuiteVersion kArrayLineSuiteVersion1 + +typedef struct ArrayLineSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayLineRef arraylineref); + void (*Release) ( ArrayLineRef arraylineref); + ATEBool8 (*IsNull) ( ArrayLineRef arraylineref); + + ATEErr (*GetSize) ( ArrayLineRef arraylineref, ATETextDOM::Int32* ret); + ATEErr (*Item) ( ArrayLineRef arraylineref, ATETextDOM::Int32 index, ATETextDOM::FloatPoint* retstart, ATETextDOM::FloatPoint* retend); +}ArrayLineSuite; + +////////////////////////////////////////////// +// --ArrayComposerEngineSuite-- +////////////////////////////////////////////// +#define kArrayComposerEngineSuite "ATE ArrayComposerEngine Suite" +#define kArrayComposerEngineSuiteVersion1 1 +#define kArrayComposerEngineSuiteVersion kArrayComposerEngineSuiteVersion1 + +typedef struct ArrayComposerEngineSuite{ + + // Reference count maintenance. + void (*AddRef) ( ArrayComposerEngineRef arraycomposerengine); + void (*Release) ( ArrayComposerEngineRef arraycomposerengine); + ATEBool8 (*IsNull) ( ArrayComposerEngineRef arraycomposerengine); + + // ======================================================================== + // PROPERTIES + // ======================================================================== + ATEErr (*GetSize) ( ArrayComposerEngineRef arraycomposerengine, ATETextDOM::Int32* ret); + ATEErr (*GetFirst) ( ArrayComposerEngineRef arraycomposerengine, ComposerEngine* ret); + ATEErr (*GetLast) ( ArrayComposerEngineRef arraycomposerengine, ComposerEngine* ret); + // ======================================================================== + // METHODS + // ======================================================================== + ATEErr (*Item) ( ArrayComposerEngineRef arraycomposerengine, ATETextDOM::Int32 index, ComposerEngine* ret); + +}ArrayComposerEngineSuite; + +#ifdef MAC_ENV + #pragma options align=reset +#endif + +#ifdef WIN_ENV + #pragma pack(pop) +#endif + +#ifdef __cplusplus +} // extern "C" +} // namespace ATE +#endif + +#endif //__ATESuites__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesDeclare.h b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesDeclare.h index d9cd978..36335e0 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesDeclare.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesDeclare.h @@ -1,107 +1,111 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATETextSuitesDeclare.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ - DECLARE_ATE_AUTOSUITE(ApplicationPaint) - DECLARE_ATE_AUTOSUITE(CompFont) - DECLARE_ATE_AUTOSUITE(CompFontClass) - DECLARE_ATE_AUTOSUITE(CompFontClassSet) - DECLARE_ATE_AUTOSUITE(CompFontComponent) - DECLARE_ATE_AUTOSUITE(CompFontSet) - DECLARE_ATE_AUTOSUITE(GlyphRun) - DECLARE_ATE_AUTOSUITE(GlyphRunsIterator) - DECLARE_ATE_AUTOSUITE(MojiKumi) - DECLARE_ATE_AUTOSUITE(MojiKumiSet) - DECLARE_ATE_AUTOSUITE(TextFrame) - DECLARE_ATE_AUTOSUITE(TextFramesIterator) - DECLARE_ATE_AUTOSUITE(TextLine) - DECLARE_ATE_AUTOSUITE(TextLinesIterator) - DECLARE_ATE_AUTOSUITE(TextResources) - DECLARE_ATE_AUTOSUITE(ApplicationTextResources) - DECLARE_ATE_AUTOSUITE(DocumentTextResources) - DECLARE_ATE_AUTOSUITE(VersionInfo) - DECLARE_ATE_AUTOSUITE(ArrayApplicationPaintRef) - DECLARE_ATE_AUTOSUITE(ArrayReal) - DECLARE_ATE_AUTOSUITE(ArrayBool) - DECLARE_ATE_AUTOSUITE(ArrayInteger) - DECLARE_ATE_AUTOSUITE(ArrayLineCapType) - DECLARE_ATE_AUTOSUITE(ArrayFigureStyle) - DECLARE_ATE_AUTOSUITE(ArrayLineJoinType) - DECLARE_ATE_AUTOSUITE(ArrayWariChuJustification) - DECLARE_ATE_AUTOSUITE(ArrayStyleRunAlignment) - DECLARE_ATE_AUTOSUITE(ArrayAutoKernType) - DECLARE_ATE_AUTOSUITE(ArrayBaselineDirection) - DECLARE_ATE_AUTOSUITE(ArrayLanguage) - DECLARE_ATE_AUTOSUITE(ArrayFontCapsOption) - DECLARE_ATE_AUTOSUITE(ArrayFontBaselineOption) - DECLARE_ATE_AUTOSUITE(ArrayFontOpenTypePositionOption) - DECLARE_ATE_AUTOSUITE(ArrayUnderlinePosition) - DECLARE_ATE_AUTOSUITE(ArrayStrikethroughPosition) - DECLARE_ATE_AUTOSUITE(ArrayParagraphJustification) - DECLARE_ATE_AUTOSUITE(ArrayArrayReal) - DECLARE_ATE_AUTOSUITE(ArrayBurasagariType) - DECLARE_ATE_AUTOSUITE(ArrayPreferredKinsokuOrder) - DECLARE_ATE_AUTOSUITE(ArrayKinsokuRef) - DECLARE_ATE_AUTOSUITE(ArrayMojiKumiRef) - DECLARE_ATE_AUTOSUITE(ArrayMojiKumiSetRef) - DECLARE_ATE_AUTOSUITE(ArrayTabStopsRef) - DECLARE_ATE_AUTOSUITE(ArrayLeadingType) - DECLARE_ATE_AUTOSUITE(ArrayFontRef) - DECLARE_ATE_AUTOSUITE(ArrayGlyphID) - DECLARE_ATE_AUTOSUITE(ArrayRealPoint) - DECLARE_ATE_AUTOSUITE(ArrayRealMatrix) -#if SLO_COMPLEXSCRIPT - DECLARE_ATE_AUTOSUITE(ArrayParagraphDirection) - DECLARE_ATE_AUTOSUITE(ArrayJustificationMethod) - DECLARE_ATE_AUTOSUITE(ArrayKashidaWidth) - DECLARE_ATE_AUTOSUITE(ArrayKashidas) - DECLARE_ATE_AUTOSUITE(ArrayDirOverride) - DECLARE_ATE_AUTOSUITE(ArrayDigitSet) - DECLARE_ATE_AUTOSUITE(ArrayDiacVPos) -#endif - DECLARE_ATE_AUTOSUITE(CharFeatures) - DECLARE_ATE_AUTOSUITE(CharInspector) - DECLARE_ATE_AUTOSUITE(CharStyle) - DECLARE_ATE_AUTOSUITE(CharStyles) - DECLARE_ATE_AUTOSUITE(CharStylesIterator) - DECLARE_ATE_AUTOSUITE(Find) - DECLARE_ATE_AUTOSUITE(Font) - DECLARE_ATE_AUTOSUITE(Glyph) - DECLARE_ATE_AUTOSUITE(Glyphs) - DECLARE_ATE_AUTOSUITE(GlyphsIterator) - DECLARE_ATE_AUTOSUITE(Kinsoku) - DECLARE_ATE_AUTOSUITE(KinsokuSet) - DECLARE_ATE_AUTOSUITE(ParaFeatures) - DECLARE_ATE_AUTOSUITE(Paragraph) - DECLARE_ATE_AUTOSUITE(ParagraphsIterator) - DECLARE_ATE_AUTOSUITE(ParaInspector) - DECLARE_ATE_AUTOSUITE(ParaStyle) - DECLARE_ATE_AUTOSUITE(ParaStyles) - DECLARE_ATE_AUTOSUITE(ParaStylesIterator) - DECLARE_ATE_AUTOSUITE(Spell) - DECLARE_ATE_AUTOSUITE(Stories) - DECLARE_ATE_AUTOSUITE(Story) - DECLARE_ATE_AUTOSUITE(TabStop) - DECLARE_ATE_AUTOSUITE(TabStops) - DECLARE_ATE_AUTOSUITE(TabStopsIterator) - DECLARE_ATE_AUTOSUITE(TextRange) - DECLARE_ATE_AUTOSUITE(TextRanges) - DECLARE_ATE_AUTOSUITE(TextRangesIterator) - DECLARE_ATE_AUTOSUITE(TextRunsIterator) - DECLARE_ATE_AUTOSUITE(WordsIterator) - DECLARE_ATE_AUTOSUITE(ArrayLine) - DECLARE_ATE_AUTOSUITE(ArrayComposerEngine) \ No newline at end of file +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATETextSuitesDeclare.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ + DECLARE_ATE_AUTOSUITE(ApplicationPaint) + DECLARE_ATE_AUTOSUITE(CompFont) + DECLARE_ATE_AUTOSUITE(CompFontClass) + DECLARE_ATE_AUTOSUITE(CompFontClassSet) + DECLARE_ATE_AUTOSUITE(CompFontComponent) + DECLARE_ATE_AUTOSUITE(CompFontSet) + DECLARE_ATE_AUTOSUITE(GlyphRun) + DECLARE_ATE_AUTOSUITE(GlyphRunsIterator) + DECLARE_ATE_AUTOSUITE(ListStyle) + DECLARE_ATE_AUTOSUITE(ListStyleSet) + DECLARE_ATE_AUTOSUITE(MojiKumi) + DECLARE_ATE_AUTOSUITE(MojiKumiSet) + DECLARE_ATE_AUTOSUITE(TextFrame) + DECLARE_ATE_AUTOSUITE(TextFramesIterator) + DECLARE_ATE_AUTOSUITE(TextLine) + DECLARE_ATE_AUTOSUITE(TextLinesIterator) + DECLARE_ATE_AUTOSUITE(TextResources) + DECLARE_ATE_AUTOSUITE(ApplicationTextResources) + DECLARE_ATE_AUTOSUITE(DocumentTextResources) + DECLARE_ATE_AUTOSUITE(VersionInfo) + DECLARE_ATE_AUTOSUITE(ArrayApplicationPaintRef) + DECLARE_ATE_AUTOSUITE(ArrayReal) + DECLARE_ATE_AUTOSUITE(ArrayBool) + DECLARE_ATE_AUTOSUITE(ArrayInteger) + DECLARE_ATE_AUTOSUITE(ArrayLineCapType) + DECLARE_ATE_AUTOSUITE(ArrayFigureStyle) + DECLARE_ATE_AUTOSUITE(ArrayLineJoinType) + DECLARE_ATE_AUTOSUITE(ArrayWariChuJustification) + DECLARE_ATE_AUTOSUITE(ArrayStyleRunAlignment) + DECLARE_ATE_AUTOSUITE(ArrayAutoKernType) + DECLARE_ATE_AUTOSUITE(ArrayBaselineDirection) + DECLARE_ATE_AUTOSUITE(ArrayLanguage) + DECLARE_ATE_AUTOSUITE(ArrayFontCapsOption) + DECLARE_ATE_AUTOSUITE(ArrayFontBaselineOption) + DECLARE_ATE_AUTOSUITE(ArrayFontOpenTypePositionOption) + DECLARE_ATE_AUTOSUITE(ArrayUnderlinePosition) + DECLARE_ATE_AUTOSUITE(ArrayStrikethroughPosition) + DECLARE_ATE_AUTOSUITE(ArrayParagraphJustification) + DECLARE_ATE_AUTOSUITE(ArrayArrayReal) + DECLARE_ATE_AUTOSUITE(ArrayBurasagariType) + DECLARE_ATE_AUTOSUITE(ArrayPreferredKinsokuOrder) + DECLARE_ATE_AUTOSUITE(ArrayKinsokuRef) + DECLARE_ATE_AUTOSUITE(ArrayListStyleRef) + DECLARE_ATE_AUTOSUITE(ArrayListStyleSetRef) + DECLARE_ATE_AUTOSUITE(ArrayMojiKumiRef) + DECLARE_ATE_AUTOSUITE(ArrayMojiKumiSetRef) + DECLARE_ATE_AUTOSUITE(ArrayTabStopsRef) + DECLARE_ATE_AUTOSUITE(ArrayLeadingType) + DECLARE_ATE_AUTOSUITE(ArrayFontRef) + DECLARE_ATE_AUTOSUITE(ArrayGlyphID) + DECLARE_ATE_AUTOSUITE(ArrayRealPoint) + DECLARE_ATE_AUTOSUITE(ArrayRealMatrix) +#if SLO_COMPLEXSCRIPT + DECLARE_ATE_AUTOSUITE(ArrayParagraphDirection) + DECLARE_ATE_AUTOSUITE(ArrayJustificationMethod) + DECLARE_ATE_AUTOSUITE(ArrayKashidaWidth) + DECLARE_ATE_AUTOSUITE(ArrayKashidas) + DECLARE_ATE_AUTOSUITE(ArrayDirOverride) + DECLARE_ATE_AUTOSUITE(ArrayDigitSet) + DECLARE_ATE_AUTOSUITE(ArrayDiacVPos) +#endif + DECLARE_ATE_AUTOSUITE(CharFeatures) + DECLARE_ATE_AUTOSUITE(CharInspector) + DECLARE_ATE_AUTOSUITE(CharStyle) + DECLARE_ATE_AUTOSUITE(CharStyles) + DECLARE_ATE_AUTOSUITE(CharStylesIterator) + DECLARE_ATE_AUTOSUITE(Find) + DECLARE_ATE_AUTOSUITE(Font) + DECLARE_ATE_AUTOSUITE(Glyph) + DECLARE_ATE_AUTOSUITE(Glyphs) + DECLARE_ATE_AUTOSUITE(GlyphsIterator) + DECLARE_ATE_AUTOSUITE(Kinsoku) + DECLARE_ATE_AUTOSUITE(KinsokuSet) + DECLARE_ATE_AUTOSUITE(ParaFeatures) + DECLARE_ATE_AUTOSUITE(Paragraph) + DECLARE_ATE_AUTOSUITE(ParagraphsIterator) + DECLARE_ATE_AUTOSUITE(ParaInspector) + DECLARE_ATE_AUTOSUITE(ParaStyle) + DECLARE_ATE_AUTOSUITE(ParaStyles) + DECLARE_ATE_AUTOSUITE(ParaStylesIterator) + DECLARE_ATE_AUTOSUITE(Spell) + DECLARE_ATE_AUTOSUITE(Stories) + DECLARE_ATE_AUTOSUITE(Story) + DECLARE_ATE_AUTOSUITE(TabStop) + DECLARE_ATE_AUTOSUITE(TabStops) + DECLARE_ATE_AUTOSUITE(TabStopsIterator) + DECLARE_ATE_AUTOSUITE(TextRange) + DECLARE_ATE_AUTOSUITE(TextRanges) + DECLARE_ATE_AUTOSUITE(TextRangesIterator) + DECLARE_ATE_AUTOSUITE(TextRunsIterator) + DECLARE_ATE_AUTOSUITE(WordsIterator) + DECLARE_ATE_AUTOSUITE(ArrayLine) + DECLARE_ATE_AUTOSUITE(ArrayComposerEngine) diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesExtern.h b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesExtern.h index 7158203..526cab0 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesExtern.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesExtern.h @@ -1,117 +1,119 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATETextSuitesExtern.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ -#ifndef __ATETextSuitesExtern__ -#define __ATETextSuitesExtern__ - -namespace ATE -{ -extern "C" ApplicationPaintSuite* sApplicationPaint; -extern "C" CompFontSuite* sCompFont; -extern "C" CompFontClassSuite* sCompFontClass; -extern "C" CompFontClassSetSuite* sCompFontClassSet; -extern "C" CompFontComponentSuite* sCompFontComponent; -extern "C" CompFontSetSuite* sCompFontSet; -extern "C" GlyphRunSuite* sGlyphRun; -extern "C" GlyphRunsIteratorSuite* sGlyphRunsIterator; -extern "C" MojiKumiSuite* sMojiKumi; -extern "C" MojiKumiSetSuite* sMojiKumiSet; -extern "C" TextFrameSuite* sTextFrame; -extern "C" TextFramesIteratorSuite* sTextFramesIterator; -extern "C" TextLineSuite* sTextLine; -extern "C" TextLinesIteratorSuite* sTextLinesIterator; -extern "C" TextResourcesSuite* sTextResources; -extern "C" ApplicationTextResourcesSuite* sApplicationTextResources; -extern "C" DocumentTextResourcesSuite* sDocumentTextResources; -extern "C" VersionInfoSuite* sVersionInfo; -extern "C" ArrayApplicationPaintRefSuite* sArrayApplicationPaintRef; -extern "C" ArrayRealSuite* sArrayReal; -extern "C" ArrayBoolSuite* sArrayBool; -extern "C" ArrayIntegerSuite* sArrayInteger; -extern "C" ArrayLineCapTypeSuite* sArrayLineCapType; -extern "C" ArrayFigureStyleSuite* sArrayFigureStyle; -extern "C" ArrayLineJoinTypeSuite* sArrayLineJoinType; -extern "C" ArrayWariChuJustificationSuite* sArrayWariChuJustification; -extern "C" ArrayStyleRunAlignmentSuite* sArrayStyleRunAlignment; -extern "C" ArrayAutoKernTypeSuite* sArrayAutoKernType; -extern "C" ArrayBaselineDirectionSuite* sArrayBaselineDirection; -extern "C" ArrayLanguageSuite* sArrayLanguage; -extern "C" ArrayFontCapsOptionSuite* sArrayFontCapsOption; -extern "C" ArrayFontBaselineOptionSuite* sArrayFontBaselineOption; -extern "C" ArrayFontOpenTypePositionOptionSuite* sArrayFontOpenTypePositionOption; -extern "C" ArrayUnderlinePositionSuite* sArrayUnderlinePosition; -extern "C" ArrayStrikethroughPositionSuite* sArrayStrikethroughPosition; -extern "C" ArrayParagraphJustificationSuite* sArrayParagraphJustification; -extern "C" ArrayArrayRealSuite* sArrayArrayReal; -extern "C" ArrayBurasagariTypeSuite* sArrayBurasagariType; -extern "C" ArrayPreferredKinsokuOrderSuite* sArrayPreferredKinsokuOrder; -extern "C" ArrayKinsokuRefSuite* sArrayKinsokuRef; -extern "C" ArrayMojiKumiRefSuite* sArrayMojiKumiRef; -extern "C" ArrayMojiKumiSetRefSuite* sArrayMojiKumiSetRef; -extern "C" ArrayTabStopsRefSuite* sArrayTabStopsRef; -extern "C" ArrayLeadingTypeSuite* sArrayLeadingType; -extern "C" ArrayFontRefSuite* sArrayFontRef; -extern "C" ArrayGlyphIDSuite* sArrayGlyphID; -extern "C" ArrayRealPointSuite* sArrayRealPoint; -extern "C" ArrayRealMatrixSuite* sArrayRealMatrix; -#if SLO_COMPLEXSCRIPT -extern "C" ArrayParagraphDirectionSuite* sArrayParagraphDirection; -extern "C" ArrayJustificationMethodSuite* sArrayJustificationMethod; -extern "C" ArrayKashidaWidthSuite* sArrayKashidaWidth; -extern "C" ArrayKashidasSuite* sArrayKashidas; -extern "C" ArrayDirOverrideSuite* sArrayDirOverride; -extern "C" ArrayDigitSetSuite* sArrayDigitSet; -extern "C" ArrayDiacVPosSuite* sArrayDiacVPos; -#endif -extern "C" CharFeaturesSuite* sCharFeatures; -extern "C" CharInspectorSuite* sCharInspector; -extern "C" CharStyleSuite* sCharStyle; -extern "C" CharStylesSuite* sCharStyles; -extern "C" CharStylesIteratorSuite* sCharStylesIterator; -extern "C" FindSuite* sFind; -extern "C" FontSuite* sFont; -extern "C" GlyphSuite* sGlyph; -extern "C" GlyphsSuite* sGlyphs; -extern "C" GlyphsIteratorSuite* sGlyphsIterator; -extern "C" KinsokuSuite* sKinsoku; -extern "C" KinsokuSetSuite* sKinsokuSet; -extern "C" ParaFeaturesSuite* sParaFeatures; -extern "C" ParagraphSuite* sParagraph; -extern "C" ParagraphsIteratorSuite* sParagraphsIterator; -extern "C" ParaInspectorSuite* sParaInspector; -extern "C" ParaStyleSuite* sParaStyle; -extern "C" ParaStylesSuite* sParaStyles; -extern "C" ParaStylesIteratorSuite* sParaStylesIterator; -extern "C" SpellSuite* sSpell; -extern "C" StoriesSuite* sStories; -extern "C" StorySuite* sStory; -extern "C" TabStopSuite* sTabStop; -extern "C" TabStopsSuite* sTabStops; -extern "C" TabStopsIteratorSuite* sTabStopsIterator; -extern "C" TextRangeSuite* sTextRange; -extern "C" TextRangesSuite* sTextRanges; -extern "C" TextRangesIteratorSuite* sTextRangesIterator; -extern "C" TextRunsIteratorSuite* sTextRunsIterator; -extern "C" WordsIteratorSuite* sWordsIterator; -extern "C" ArrayLineSuite* sArrayLine; -extern "C" ArrayComposerEngineSuite* sArrayComposerEngine; - -}// namespace ATE -#endif //__ATETextSuitesExtern__ - - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATETextSuitesExtern.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ +#ifndef __ATETextSuitesExtern__ +#define __ATETextSuitesExtern__ + +namespace ATE +{ +extern "C" ApplicationPaintSuite* sApplicationPaint; +extern "C" CompFontSuite* sCompFont; +extern "C" CompFontClassSuite* sCompFontClass; +extern "C" CompFontClassSetSuite* sCompFontClassSet; +extern "C" CompFontComponentSuite* sCompFontComponent; +extern "C" CompFontSetSuite* sCompFontSet; +extern "C" GlyphRunSuite* sGlyphRun; +extern "C" GlyphRunsIteratorSuite* sGlyphRunsIterator; +extern "C" ListStyleSuite* sListStyle; +extern "C" ListStyleSetSuite* sListStyleSet; +extern "C" MojiKumiSuite* sMojiKumi; +extern "C" MojiKumiSetSuite* sMojiKumiSet; +extern "C" TextFrameSuite* sTextFrame; +extern "C" TextFramesIteratorSuite* sTextFramesIterator; +extern "C" TextLineSuite* sTextLine; +extern "C" TextLinesIteratorSuite* sTextLinesIterator; +extern "C" TextResourcesSuite* sTextResources; +extern "C" ApplicationTextResourcesSuite* sApplicationTextResources; +extern "C" DocumentTextResourcesSuite* sDocumentTextResources; +extern "C" VersionInfoSuite* sVersionInfo; +extern "C" ArrayApplicationPaintRefSuite* sArrayApplicationPaintRef; +extern "C" ArrayRealSuite* sArrayReal; +extern "C" ArrayBoolSuite* sArrayBool; +extern "C" ArrayIntegerSuite* sArrayInteger; +extern "C" ArrayLineCapTypeSuite* sArrayLineCapType; +extern "C" ArrayFigureStyleSuite* sArrayFigureStyle; +extern "C" ArrayLineJoinTypeSuite* sArrayLineJoinType; +extern "C" ArrayWariChuJustificationSuite* sArrayWariChuJustification; +extern "C" ArrayStyleRunAlignmentSuite* sArrayStyleRunAlignment; +extern "C" ArrayAutoKernTypeSuite* sArrayAutoKernType; +extern "C" ArrayBaselineDirectionSuite* sArrayBaselineDirection; +extern "C" ArrayLanguageSuite* sArrayLanguage; +extern "C" ArrayFontCapsOptionSuite* sArrayFontCapsOption; +extern "C" ArrayFontBaselineOptionSuite* sArrayFontBaselineOption; +extern "C" ArrayFontOpenTypePositionOptionSuite* sArrayFontOpenTypePositionOption; +extern "C" ArrayUnderlinePositionSuite* sArrayUnderlinePosition; +extern "C" ArrayStrikethroughPositionSuite* sArrayStrikethroughPosition; +extern "C" ArrayParagraphJustificationSuite* sArrayParagraphJustification; +extern "C" ArrayArrayRealSuite* sArrayArrayReal; +extern "C" ArrayBurasagariTypeSuite* sArrayBurasagariType; +extern "C" ArrayPreferredKinsokuOrderSuite* sArrayPreferredKinsokuOrder; +extern "C" ArrayKinsokuRefSuite* sArrayKinsokuRef; +extern "C" ArrayListStyleRefSuite* sArrayListStyleRef; +extern "C" ArrayListStyleSetRefSuite* sArrayListStyleSetRef; +extern "C" ArrayMojiKumiRefSuite* sArrayMojiKumiRef; +extern "C" ArrayMojiKumiSetRefSuite* sArrayMojiKumiSetRef; +extern "C" ArrayTabStopsRefSuite* sArrayTabStopsRef; +extern "C" ArrayLeadingTypeSuite* sArrayLeadingType; +extern "C" ArrayFontRefSuite* sArrayFontRef; +extern "C" ArrayGlyphIDSuite* sArrayGlyphID; +extern "C" ArrayRealPointSuite* sArrayRealPoint; +extern "C" ArrayRealMatrixSuite* sArrayRealMatrix; +#if SLO_COMPLEXSCRIPT +extern "C" ArrayParagraphDirectionSuite* sArrayParagraphDirection; +extern "C" ArrayJustificationMethodSuite* sArrayJustificationMethod; +extern "C" ArrayKashidaWidthSuite* sArrayKashidaWidth; +extern "C" ArrayKashidasSuite* sArrayKashidas; +extern "C" ArrayDirOverrideSuite* sArrayDirOverride; +extern "C" ArrayDigitSetSuite* sArrayDigitSet; +extern "C" ArrayDiacVPosSuite* sArrayDiacVPos; +#endif +extern "C" CharFeaturesSuite* sCharFeatures; +extern "C" CharInspectorSuite* sCharInspector; +extern "C" CharStyleSuite* sCharStyle; +extern "C" CharStylesSuite* sCharStyles; +extern "C" CharStylesIteratorSuite* sCharStylesIterator; +extern "C" FindSuite* sFind; +extern "C" FontSuite* sFont; +extern "C" GlyphSuite* sGlyph; +extern "C" GlyphsSuite* sGlyphs; +extern "C" GlyphsIteratorSuite* sGlyphsIterator; +extern "C" KinsokuSuite* sKinsoku; +extern "C" KinsokuSetSuite* sKinsokuSet; +extern "C" ParaFeaturesSuite* sParaFeatures; +extern "C" ParagraphSuite* sParagraph; +extern "C" ParagraphsIteratorSuite* sParagraphsIterator; +extern "C" ParaInspectorSuite* sParaInspector; +extern "C" ParaStyleSuite* sParaStyle; +extern "C" ParaStylesSuite* sParaStyles; +extern "C" ParaStylesIteratorSuite* sParaStylesIterator; +extern "C" SpellSuite* sSpell; +extern "C" StoriesSuite* sStories; +extern "C" StorySuite* sStory; +extern "C" TabStopSuite* sTabStop; +extern "C" TabStopsSuite* sTabStops; +extern "C" TabStopsIteratorSuite* sTabStopsIterator; +extern "C" TextRangeSuite* sTextRange; +extern "C" TextRangesSuite* sTextRanges; +extern "C" TextRangesIteratorSuite* sTextRangesIterator; +extern "C" TextRunsIteratorSuite* sTextRunsIterator; +extern "C" WordsIteratorSuite* sWordsIterator; +extern "C" ArrayLineSuite* sArrayLine; +extern "C" ArrayComposerEngineSuite* sArrayComposerEngine; + +}// namespace ATE +#endif //__ATETextSuitesExtern__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesImplement.h b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesImplement.h index d30e5cc..4dce9fd 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesImplement.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesImplement.h @@ -1,107 +1,110 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATETextSuitesImplement.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ - IMPLEMENT_ATE_AUTOSUITE(ApplicationPaint) - IMPLEMENT_ATE_AUTOSUITE(CompFont) - IMPLEMENT_ATE_AUTOSUITE(CompFontClass) - IMPLEMENT_ATE_AUTOSUITE(CompFontClassSet) - IMPLEMENT_ATE_AUTOSUITE(CompFontComponent) - IMPLEMENT_ATE_AUTOSUITE(CompFontSet) - IMPLEMENT_ATE_AUTOSUITE(GlyphRun) - IMPLEMENT_ATE_AUTOSUITE(GlyphRunsIterator) - IMPLEMENT_ATE_AUTOSUITE(MojiKumi) - IMPLEMENT_ATE_AUTOSUITE(MojiKumiSet) - IMPLEMENT_ATE_AUTOSUITE(TextFrame) - IMPLEMENT_ATE_AUTOSUITE(TextFramesIterator) - IMPLEMENT_ATE_AUTOSUITE(TextLine) - IMPLEMENT_ATE_AUTOSUITE(TextLinesIterator) - IMPLEMENT_ATE_AUTOSUITE(TextResources) - IMPLEMENT_ATE_AUTOSUITE(ApplicationTextResources) - IMPLEMENT_ATE_AUTOSUITE(DocumentTextResources) - IMPLEMENT_ATE_AUTOSUITE(VersionInfo) - IMPLEMENT_ATE_AUTOSUITE(ArrayApplicationPaintRef) - IMPLEMENT_ATE_AUTOSUITE(ArrayReal) - IMPLEMENT_ATE_AUTOSUITE(ArrayBool) - IMPLEMENT_ATE_AUTOSUITE(ArrayInteger) - IMPLEMENT_ATE_AUTOSUITE(ArrayLineCapType) - IMPLEMENT_ATE_AUTOSUITE(ArrayFigureStyle) - IMPLEMENT_ATE_AUTOSUITE(ArrayLineJoinType) - IMPLEMENT_ATE_AUTOSUITE(ArrayWariChuJustification) - IMPLEMENT_ATE_AUTOSUITE(ArrayStyleRunAlignment) - IMPLEMENT_ATE_AUTOSUITE(ArrayAutoKernType) - IMPLEMENT_ATE_AUTOSUITE(ArrayBaselineDirection) - IMPLEMENT_ATE_AUTOSUITE(ArrayLanguage) - IMPLEMENT_ATE_AUTOSUITE(ArrayFontCapsOption) - IMPLEMENT_ATE_AUTOSUITE(ArrayFontBaselineOption) - IMPLEMENT_ATE_AUTOSUITE(ArrayFontOpenTypePositionOption) - IMPLEMENT_ATE_AUTOSUITE(ArrayUnderlinePosition) - IMPLEMENT_ATE_AUTOSUITE(ArrayStrikethroughPosition) - IMPLEMENT_ATE_AUTOSUITE(ArrayParagraphJustification) - IMPLEMENT_ATE_AUTOSUITE(ArrayArrayReal) - IMPLEMENT_ATE_AUTOSUITE(ArrayBurasagariType) - IMPLEMENT_ATE_AUTOSUITE(ArrayPreferredKinsokuOrder) - IMPLEMENT_ATE_AUTOSUITE(ArrayKinsokuRef) - IMPLEMENT_ATE_AUTOSUITE(ArrayMojiKumiRef) - IMPLEMENT_ATE_AUTOSUITE(ArrayMojiKumiSetRef) - IMPLEMENT_ATE_AUTOSUITE(ArrayTabStopsRef) - IMPLEMENT_ATE_AUTOSUITE(ArrayLeadingType) - IMPLEMENT_ATE_AUTOSUITE(ArrayFontRef) - IMPLEMENT_ATE_AUTOSUITE(ArrayGlyphID) - IMPLEMENT_ATE_AUTOSUITE(ArrayRealPoint) - IMPLEMENT_ATE_AUTOSUITE(ArrayRealMatrix) -#if SLO_COMPLEXSCRIPT - IMPLEMENT_ATE_AUTOSUITE(ArrayParagraphDirection) - IMPLEMENT_ATE_AUTOSUITE(ArrayJustificationMethod) - IMPLEMENT_ATE_AUTOSUITE(ArrayKashidaWidth) - IMPLEMENT_ATE_AUTOSUITE(ArrayKashidas) - IMPLEMENT_ATE_AUTOSUITE(ArrayDirOverride) - IMPLEMENT_ATE_AUTOSUITE(ArrayDigitSet) - IMPLEMENT_ATE_AUTOSUITE(ArrayDiacVPos) -#endif - IMPLEMENT_ATE_AUTOSUITE(CharFeatures) - IMPLEMENT_ATE_AUTOSUITE(CharInspector) - IMPLEMENT_ATE_AUTOSUITE(CharStyle) - IMPLEMENT_ATE_AUTOSUITE(CharStyles) - IMPLEMENT_ATE_AUTOSUITE(CharStylesIterator) - IMPLEMENT_ATE_AUTOSUITE(Find) - IMPLEMENT_ATE_AUTOSUITE(Font) - IMPLEMENT_ATE_AUTOSUITE(Glyph) - IMPLEMENT_ATE_AUTOSUITE(Glyphs) - IMPLEMENT_ATE_AUTOSUITE(GlyphsIterator) - IMPLEMENT_ATE_AUTOSUITE(Kinsoku) - IMPLEMENT_ATE_AUTOSUITE(KinsokuSet) - IMPLEMENT_ATE_AUTOSUITE(ParaFeatures) - IMPLEMENT_ATE_AUTOSUITE(Paragraph) - IMPLEMENT_ATE_AUTOSUITE(ParagraphsIterator) - IMPLEMENT_ATE_AUTOSUITE(ParaInspector) - IMPLEMENT_ATE_AUTOSUITE(ParaStyle) - IMPLEMENT_ATE_AUTOSUITE(ParaStyles) - IMPLEMENT_ATE_AUTOSUITE(ParaStylesIterator) - IMPLEMENT_ATE_AUTOSUITE(Spell) - IMPLEMENT_ATE_AUTOSUITE(Stories) - IMPLEMENT_ATE_AUTOSUITE(Story) - IMPLEMENT_ATE_AUTOSUITE(TabStop) - IMPLEMENT_ATE_AUTOSUITE(TabStops) - IMPLEMENT_ATE_AUTOSUITE(TabStopsIterator) - IMPLEMENT_ATE_AUTOSUITE(TextRange) - IMPLEMENT_ATE_AUTOSUITE(TextRanges) - IMPLEMENT_ATE_AUTOSUITE(TextRangesIterator) - IMPLEMENT_ATE_AUTOSUITE(TextRunsIterator) - IMPLEMENT_ATE_AUTOSUITE(WordsIterator) - - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATETextSuitesImplement.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ + IMPLEMENT_ATE_AUTOSUITE(ApplicationPaint) + IMPLEMENT_ATE_AUTOSUITE(CompFont) + IMPLEMENT_ATE_AUTOSUITE(CompFontClass) + IMPLEMENT_ATE_AUTOSUITE(CompFontClassSet) + IMPLEMENT_ATE_AUTOSUITE(CompFontComponent) + IMPLEMENT_ATE_AUTOSUITE(CompFontSet) + IMPLEMENT_ATE_AUTOSUITE(GlyphRun) + IMPLEMENT_ATE_AUTOSUITE(GlyphRunsIterator) + IMPLEMENT_ATE_AUTOSUITE(ListStyle) + IMPLEMENT_ATE_AUTOSUITE(ListStyleSet) + IMPLEMENT_ATE_AUTOSUITE(MojiKumi) + IMPLEMENT_ATE_AUTOSUITE(MojiKumiSet) + IMPLEMENT_ATE_AUTOSUITE(TextFrame) + IMPLEMENT_ATE_AUTOSUITE(TextFramesIterator) + IMPLEMENT_ATE_AUTOSUITE(TextLine) + IMPLEMENT_ATE_AUTOSUITE(TextLinesIterator) + IMPLEMENT_ATE_AUTOSUITE(TextResources) + IMPLEMENT_ATE_AUTOSUITE(ApplicationTextResources) + IMPLEMENT_ATE_AUTOSUITE(DocumentTextResources) + IMPLEMENT_ATE_AUTOSUITE(VersionInfo) + IMPLEMENT_ATE_AUTOSUITE(ArrayApplicationPaintRef) + IMPLEMENT_ATE_AUTOSUITE(ArrayReal) + IMPLEMENT_ATE_AUTOSUITE(ArrayBool) + IMPLEMENT_ATE_AUTOSUITE(ArrayInteger) + IMPLEMENT_ATE_AUTOSUITE(ArrayLineCapType) + IMPLEMENT_ATE_AUTOSUITE(ArrayFigureStyle) + IMPLEMENT_ATE_AUTOSUITE(ArrayLineJoinType) + IMPLEMENT_ATE_AUTOSUITE(ArrayWariChuJustification) + IMPLEMENT_ATE_AUTOSUITE(ArrayStyleRunAlignment) + IMPLEMENT_ATE_AUTOSUITE(ArrayAutoKernType) + IMPLEMENT_ATE_AUTOSUITE(ArrayBaselineDirection) + IMPLEMENT_ATE_AUTOSUITE(ArrayLanguage) + IMPLEMENT_ATE_AUTOSUITE(ArrayFontCapsOption) + IMPLEMENT_ATE_AUTOSUITE(ArrayFontBaselineOption) + IMPLEMENT_ATE_AUTOSUITE(ArrayFontOpenTypePositionOption) + IMPLEMENT_ATE_AUTOSUITE(ArrayUnderlinePosition) + IMPLEMENT_ATE_AUTOSUITE(ArrayStrikethroughPosition) + IMPLEMENT_ATE_AUTOSUITE(ArrayParagraphJustification) + IMPLEMENT_ATE_AUTOSUITE(ArrayArrayReal) + IMPLEMENT_ATE_AUTOSUITE(ArrayBurasagariType) + IMPLEMENT_ATE_AUTOSUITE(ArrayPreferredKinsokuOrder) + IMPLEMENT_ATE_AUTOSUITE(ArrayKinsokuRef) + IMPLEMENT_ATE_AUTOSUITE(ArrayListStyleRef) + IMPLEMENT_ATE_AUTOSUITE(ArrayListStyleSetRef) + IMPLEMENT_ATE_AUTOSUITE(ArrayMojiKumiRef) + IMPLEMENT_ATE_AUTOSUITE(ArrayMojiKumiSetRef) + IMPLEMENT_ATE_AUTOSUITE(ArrayTabStopsRef) + IMPLEMENT_ATE_AUTOSUITE(ArrayLeadingType) + IMPLEMENT_ATE_AUTOSUITE(ArrayFontRef) + IMPLEMENT_ATE_AUTOSUITE(ArrayGlyphID) + IMPLEMENT_ATE_AUTOSUITE(ArrayRealPoint) + IMPLEMENT_ATE_AUTOSUITE(ArrayRealMatrix) +#if SLO_COMPLEXSCRIPT + IMPLEMENT_ATE_AUTOSUITE(ArrayParagraphDirection) + IMPLEMENT_ATE_AUTOSUITE(ArrayJustificationMethod) + IMPLEMENT_ATE_AUTOSUITE(ArrayKashidaWidth) + IMPLEMENT_ATE_AUTOSUITE(ArrayKashidas) + IMPLEMENT_ATE_AUTOSUITE(ArrayDirOverride) + IMPLEMENT_ATE_AUTOSUITE(ArrayDigitSet) + IMPLEMENT_ATE_AUTOSUITE(ArrayDiacVPos) +#endif + IMPLEMENT_ATE_AUTOSUITE(CharFeatures) + IMPLEMENT_ATE_AUTOSUITE(CharInspector) + IMPLEMENT_ATE_AUTOSUITE(CharStyle) + IMPLEMENT_ATE_AUTOSUITE(CharStyles) + IMPLEMENT_ATE_AUTOSUITE(CharStylesIterator) + IMPLEMENT_ATE_AUTOSUITE(Find) + IMPLEMENT_ATE_AUTOSUITE(Font) + IMPLEMENT_ATE_AUTOSUITE(Glyph) + IMPLEMENT_ATE_AUTOSUITE(Glyphs) + IMPLEMENT_ATE_AUTOSUITE(GlyphsIterator) + IMPLEMENT_ATE_AUTOSUITE(Kinsoku) + IMPLEMENT_ATE_AUTOSUITE(KinsokuSet) + IMPLEMENT_ATE_AUTOSUITE(ParaFeatures) + IMPLEMENT_ATE_AUTOSUITE(Paragraph) + IMPLEMENT_ATE_AUTOSUITE(ParagraphsIterator) + IMPLEMENT_ATE_AUTOSUITE(ParaInspector) + IMPLEMENT_ATE_AUTOSUITE(ParaStyle) + IMPLEMENT_ATE_AUTOSUITE(ParaStyles) + IMPLEMENT_ATE_AUTOSUITE(ParaStylesIterator) + IMPLEMENT_ATE_AUTOSUITE(Spell) + IMPLEMENT_ATE_AUTOSUITE(Stories) + IMPLEMENT_ATE_AUTOSUITE(Story) + IMPLEMENT_ATE_AUTOSUITE(TabStop) + IMPLEMENT_ATE_AUTOSUITE(TabStops) + IMPLEMENT_ATE_AUTOSUITE(TabStopsIterator) + IMPLEMENT_ATE_AUTOSUITE(TextRange) + IMPLEMENT_ATE_AUTOSUITE(TextRanges) + IMPLEMENT_ATE_AUTOSUITE(TextRangesIterator) + IMPLEMENT_ATE_AUTOSUITE(TextRunsIterator) + IMPLEMENT_ATE_AUTOSUITE(WordsIterator) + IMPLEMENT_ATE_AUTOSUITE(ArrayLine) diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesImportHelper.h b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesImportHelper.h index 44d8b1f..d758398 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesImportHelper.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETextSuitesImportHelper.h @@ -1,217 +1,223 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATETextSuitesImportHelper.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ -#ifndef __ATETextSuitesImportHelper__ -#define __ATETextSuitesImportHelper__ - -#if SLO_COMPLEXSCRIPT - -#define EXTERN_TEXT_SUITES_COMPLEXSCRIPT\ - ATE::ArrayParagraphDirectionSuite* sArrayParagraphDirection;\ - ATE::ArrayJustificationMethodSuite* sArrayJustificationMethod;\ - ATE::ArrayKashidaWidthSuite* sArrayKashidaWidth;\ - ATE::ArrayKashidasSuite* sArrayKashidas;\ - ATE::ArrayDirOverrideSuite* sArrayDirOverride;\ - ATE::ArrayDigitSetSuite* sArrayDigitSet;\ - ATE::ArrayDiacVPosSuite* sArrayDiacVPos;\ - -#define IMPORT_TEXT_SUITES_COMPLEXSCRIPT\ - { kArrayParagraphDirectionSuite, kArrayParagraphDirectionSuiteVersion, &sArrayParagraphDirection },\ - { kArrayJustificationMethodSuite, kArrayJustificationMethodSuiteVersion, &sArrayJustificationMethod },\ - { kArrayKashidaWidthSuite, kArrayKashidaWidthSuiteVersion, &sArrayKashidaWidth },\ - { kArrayKashidasSuite, kArrayKashidasSuiteVersion, &sArrayKashidas },\ - { kArrayDirOverrideSuite, kArrayDirOverrideSuiteVersion, &sArrayDirOverride },\ - { kArrayDigitSetSuite, kArrayDigitSetSuiteVersion, &sArrayDigitSet },\ - { kArrayDiacVPosSuite, kArrayDiacVPosSuiteVersion, &sArrayDiacVPos },\ - -#else - -#define EXTERN_TEXT_SUITES_COMPLEXSCRIPT -#define IMPORT_TEXT_SUITES_COMPLEXSCRIPT - -#endif - -#define EXTERN_TEXT_SUITES\ - ATE::ApplicationPaintSuite* sApplicationPaint;\ - ATE::CompFontSuite* sCompFont;\ - ATE::CompFontClassSuite* sCompFontClass;\ - ATE::CompFontClassSetSuite* sCompFontClassSet;\ - ATE::CompFontComponentSuite* sCompFontComponent;\ - ATE::CompFontSetSuite* sCompFontSet;\ - ATE::GlyphRunSuite* sGlyphRun;\ - ATE::GlyphRunsIteratorSuite* sGlyphRunsIterator;\ - ATE::MojiKumiSuite* sMojiKumi;\ - ATE::MojiKumiSetSuite* sMojiKumiSet;\ - ATE::TextFrameSuite* sTextFrame;\ - ATE::TextFramesIteratorSuite* sTextFramesIterator;\ - ATE::TextLineSuite* sTextLine;\ - ATE::TextLinesIteratorSuite* sTextLinesIterator;\ - ATE::TextResourcesSuite* sTextResources;\ - ATE::ApplicationTextResourcesSuite* sApplicationTextResources;\ - ATE::DocumentTextResourcesSuite* sDocumentTextResources;\ - ATE::VersionInfoSuite* sVersionInfo;\ - ATE::ArrayApplicationPaintRefSuite* sArrayApplicationPaintRef;\ - ATE::ArrayRealSuite* sArrayReal;\ - ATE::ArrayBoolSuite* sArrayBool;\ - ATE::ArrayIntegerSuite* sArrayInteger;\ - ATE::ArrayLineCapTypeSuite* sArrayLineCapType;\ - ATE::ArrayFigureStyleSuite* sArrayFigureStyle;\ - ATE::ArrayLineJoinTypeSuite* sArrayLineJoinType;\ - ATE::ArrayWariChuJustificationSuite* sArrayWariChuJustification;\ - ATE::ArrayStyleRunAlignmentSuite* sArrayStyleRunAlignment;\ - ATE::ArrayAutoKernTypeSuite* sArrayAutoKernType;\ - ATE::ArrayBaselineDirectionSuite* sArrayBaselineDirection;\ - ATE::ArrayLanguageSuite* sArrayLanguage;\ - ATE::ArrayFontCapsOptionSuite* sArrayFontCapsOption;\ - ATE::ArrayFontBaselineOptionSuite* sArrayFontBaselineOption;\ - ATE::ArrayFontOpenTypePositionOptionSuite* sArrayFontOpenTypePositionOption;\ - ATE::ArrayUnderlinePositionSuite* sArrayUnderlinePosition;\ - ATE::ArrayStrikethroughPositionSuite* sArrayStrikethroughPosition;\ - ATE::ArrayParagraphJustificationSuite* sArrayParagraphJustification;\ - ATE::ArrayArrayRealSuite* sArrayArrayReal;\ - ATE::ArrayBurasagariTypeSuite* sArrayBurasagariType;\ - ATE::ArrayPreferredKinsokuOrderSuite* sArrayPreferredKinsokuOrder;\ - ATE::ArrayKinsokuRefSuite* sArrayKinsokuRef;\ - ATE::ArrayMojiKumiRefSuite* sArrayMojiKumiRef;\ - ATE::ArrayMojiKumiSetRefSuite* sArrayMojiKumiSetRef;\ - ATE::ArrayTabStopsRefSuite* sArrayTabStopsRef;\ - ATE::ArrayLeadingTypeSuite* sArrayLeadingType;\ - ATE::ArrayFontRefSuite* sArrayFontRef;\ - ATE::ArrayGlyphIDSuite* sArrayGlyphID;\ - ATE::ArrayRealPointSuite* sArrayRealPoint;\ - ATE::ArrayRealMatrixSuite* sArrayRealMatrix;\ - EXTERN_TEXT_SUITES_COMPLEXSCRIPT\ - ATE::CharFeaturesSuite* sCharFeatures;\ - ATE::CharInspectorSuite* sCharInspector;\ - ATE::CharStyleSuite* sCharStyle;\ - ATE::CharStylesSuite* sCharStyles;\ - ATE::CharStylesIteratorSuite* sCharStylesIterator;\ - ATE::FindSuite* sFind;\ - ATE::FontSuite* sFont;\ - ATE::GlyphSuite* sGlyph;\ - ATE::GlyphsSuite* sGlyphs;\ - ATE::GlyphsIteratorSuite* sGlyphsIterator;\ - ATE::KinsokuSuite* sKinsoku;\ - ATE::KinsokuSetSuite* sKinsokuSet;\ - ATE::ParaFeaturesSuite* sParaFeatures;\ - ATE::ParagraphSuite* sParagraph;\ - ATE::ParagraphsIteratorSuite* sParagraphsIterator;\ - ATE::ParaInspectorSuite* sParaInspector;\ - ATE::ParaStyleSuite* sParaStyle;\ - ATE::ParaStylesSuite* sParaStyles;\ - ATE::ParaStylesIteratorSuite* sParaStylesIterator;\ - ATE::SpellSuite* sSpell;\ - ATE::StoriesSuite* sStories;\ - ATE::StorySuite* sStory;\ - ATE::TabStopSuite* sTabStop;\ - ATE::TabStopsSuite* sTabStops;\ - ATE::TabStopsIteratorSuite* sTabStopsIterator;\ - ATE::TextRangeSuite* sTextRange;\ - ATE::TextRangesSuite* sTextRanges;\ - ATE::TextRangesIteratorSuite* sTextRangesIterator;\ - ATE::TextRunsIteratorSuite* sTextRunsIterator;\ - ATE::WordsIteratorSuite* sWordsIterator;\ - ATE::ArrayLineSuite* sArrayLine;\ - ATE::ArrayComposerEngineSuite* sArrayComposerEngine;\ - -#define IMPORT_TEXT_SUITES\ - { kApplicationPaintSuite, kApplicationPaintSuiteVersion, &sApplicationPaint } ,\ - { kCompFontSuite, kCompFontSuiteVersion, &sCompFont },\ - { kCompFontClassSuite, kCompFontClassSuiteVersion, &sCompFontClass },\ - { kCompFontClassSetSuite, kCompFontClassSetSuiteVersion, &sCompFontClassSet },\ - { kCompFontComponentSuite, kCompFontComponentSuiteVersion, &sCompFontComponent },\ - { kCompFontSetSuite, kCompFontSetSuiteVersion, &sCompFontSet },\ - { kGlyphRunSuite, kGlyphRunSuiteVersion, &sGlyphRun },\ - { kGlyphRunsIteratorSuite, kGlyphRunsIteratorSuiteVersion, &sGlyphRunsIterator },\ - { kMojiKumiSuite, kMojiKumiSuiteVersion, &sMojiKumi },\ - { kMojiKumiSetSuite, kMojiKumiSetSuiteVersion, &sMojiKumiSet },\ - { kTextFrameSuite, kTextFrameSuiteVersion, &sTextFrame },\ - { kTextFramesIteratorSuite, kTextFramesIteratorSuiteVersion, &sTextFramesIterator },\ - { kTextLineSuite, kTextLineSuiteVersion, &sTextLine },\ - { kTextLinesIteratorSuite, kTextLinesIteratorSuiteVersion, &sTextLinesIterator },\ - { kTextResourcesSuite, kTextResourcesSuiteVersion, &sTextResources },\ - { kApplicationTextResourcesSuite, kApplicationTextResourcesSuiteVersion, &sApplicationTextResources },\ - { kDocumentTextResourcesSuite, kDocumentTextResourcesSuiteVersion, &sDocumentTextResources },\ - { kVersionInfoSuite, kVersionInfoSuiteVersion, &sVersionInfo },\ - { kArrayApplicationPaintRefSuite, kArrayApplicationPaintRefSuiteVersion, &sArrayApplicationPaintRef },\ - { kArrayRealSuite, kArrayRealSuiteVersion, &sArrayReal },\ - { kArrayBoolSuite, kArrayBoolSuiteVersion, &sArrayBool },\ - { kArrayIntegerSuite, kArrayIntegerSuiteVersion, &sArrayInteger },\ - { kArrayLineCapTypeSuite, kArrayLineCapTypeSuiteVersion, &sArrayLineCapType },\ - { kArrayFigureStyleSuite, kArrayFigureStyleSuiteVersion, &sArrayFigureStyle },\ - { kArrayLineJoinTypeSuite, kArrayLineJoinTypeSuiteVersion, &sArrayLineJoinType },\ - { kArrayWariChuJustificationSuite, kArrayWariChuJustificationSuiteVersion, &sArrayWariChuJustification },\ - { kArrayStyleRunAlignmentSuite, kArrayStyleRunAlignmentSuiteVersion, &sArrayStyleRunAlignment },\ - { kArrayAutoKernTypeSuite, kArrayAutoKernTypeSuiteVersion, &sArrayAutoKernType },\ - { kArrayBaselineDirectionSuite, kArrayBaselineDirectionSuiteVersion, &sArrayBaselineDirection },\ - { kArrayLanguageSuite, kArrayLanguageSuiteVersion, &sArrayLanguage },\ - { kArrayFontCapsOptionSuite, kArrayFontCapsOptionSuiteVersion, &sArrayFontCapsOption },\ - { kArrayFontBaselineOptionSuite, kArrayFontBaselineOptionSuiteVersion, &sArrayFontBaselineOption },\ - { kArrayFontOpenTypePositionOptionSuite, kArrayFontOpenTypePositionOptionSuiteVersion, &sArrayFontOpenTypePositionOption },\ - { kArrayUnderlinePositionSuite, kArrayUnderlinePositionSuiteVersion, &sArrayUnderlinePosition },\ - { kArrayStrikethroughPositionSuite, kArrayStrikethroughPositionSuiteVersion, &sArrayStrikethroughPosition },\ - { kArrayParagraphJustificationSuite, kArrayParagraphJustificationSuiteVersion, &sArrayParagraphJustification },\ - { kArrayArrayRealSuite, kArrayArrayRealSuiteVersion, &sArrayArrayReal },\ - { kArrayBurasagariTypeSuite, kArrayBurasagariTypeSuiteVersion, &sArrayBurasagariType },\ - { kArrayPreferredKinsokuOrderSuite, kArrayPreferredKinsokuOrderSuiteVersion, &sArrayPreferredKinsokuOrder },\ - { kArrayKinsokuRefSuite, kArrayKinsokuRefSuiteVersion, &sArrayKinsokuRef },\ - { kArrayMojiKumiRefSuite, kArrayMojiKumiRefSuiteVersion, &sArrayMojiKumiRef },\ - { kArrayMojiKumiSetRefSuite, kArrayMojiKumiSetRefSuiteVersion, &sArrayMojiKumiSetRef },\ - { kArrayTabStopsRefSuite, kArrayTabStopsRefSuiteVersion, &sArrayTabStopsRef },\ - { kArrayLeadingTypeSuite, kArrayLeadingTypeSuiteVersion, &sArrayLeadingType },\ - { kArrayFontRefSuite, kArrayFontRefSuiteVersion, &sArrayFontRef },\ - { kArrayGlyphIDSuite, kArrayGlyphIDSuiteVersion, &sArrayGlyphID },\ - { kArrayRealPointSuite, kArrayRealPointSuiteVersion, &sArrayRealPoint },\ - { kArrayRealMatrixSuite, kArrayRealMatrixSuiteVersion, &sArrayRealMatrix },\ - IMPORT_TEXT_SUITES_COMPLEXSCRIPT\ - { kCharFeaturesSuite, kCharFeaturesSuiteVersion, &sCharFeatures },\ - { kCharInspectorSuite, kCharInspectorSuiteVersion, &sCharInspector },\ - { kCharStyleSuite, kCharStyleSuiteVersion, &sCharStyle },\ - { kCharStylesSuite, kCharStylesSuiteVersion, &sCharStyles },\ - { kCharStylesIteratorSuite, kCharStylesIteratorSuiteVersion, &sCharStylesIterator },\ - { kFindSuite, kFindSuiteVersion, &sFind },\ - { kFontSuite, kFontSuiteVersion, &sFont },\ - { kGlyphSuite, kGlyphSuiteVersion, &sGlyph },\ - { kGlyphsSuite, kGlyphsSuiteVersion, &sGlyphs },\ - { kGlyphsIteratorSuite, kGlyphsIteratorSuiteVersion, &sGlyphsIterator },\ - { kKinsokuSuite, kKinsokuSuiteVersion, &sKinsoku },\ - { kKinsokuSetSuite, kKinsokuSetSuiteVersion, &sKinsokuSet },\ - { kParaFeaturesSuite, kParaFeaturesSuiteVersion, &sParaFeatures },\ - { kParagraphSuite, kParagraphSuiteVersion, &sParagraph },\ - { kParagraphsIteratorSuite, kParagraphsIteratorSuiteVersion, &sParagraphsIterator },\ - { kParaInspectorSuite, kParaInspectorSuiteVersion, &sParaInspector },\ - { kParaStyleSuite, kParaStyleSuiteVersion, &sParaStyle },\ - { kParaStylesSuite, kParaStylesSuiteVersion, &sParaStyles },\ - { kParaStylesIteratorSuite, kParaStylesIteratorSuiteVersion, &sParaStylesIterator },\ - { kSpellSuite, kSpellSuiteVersion, &sSpell },\ - { kStoriesSuite, kStoriesSuiteVersion, &sStories },\ - { kStorySuite, kStorySuiteVersion, &sStory },\ - { kTabStopSuite, kTabStopSuiteVersion, &sTabStop },\ - { kTabStopsSuite, kTabStopsSuiteVersion, &sTabStops },\ - { kTabStopsIteratorSuite, kTabStopsIteratorSuiteVersion, &sTabStopsIterator },\ - { kTextRangeSuite, kTextRangeSuiteVersion, &sTextRange },\ - { kTextRangesSuite, kTextRangesSuiteVersion, &sTextRanges },\ - { kTextRangesIteratorSuite, kTextRangesIteratorSuiteVersion, &sTextRangesIterator },\ - { kTextRunsIteratorSuite, kTextRunsIteratorSuiteVersion, &sTextRunsIterator },\ - { kWordsIteratorSuite, kWordsIteratorSuiteVersion, &sWordsIterator },\ - { kArrayLineSuite, kArrayLineSuiteVersion, &sArrayLine },\ - { kArrayComposerEngineSuite, kArrayComposerEngineSuiteVersion, &sArrayComposerEngine },\ - -#endif //__ATETextSuitesImportHelper__ - - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATETextSuitesImportHelper.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ +#ifndef __ATETextSuitesImportHelper__ +#define __ATETextSuitesImportHelper__ + +#if SLO_COMPLEXSCRIPT + +#define EXTERN_TEXT_SUITES_COMPLEXSCRIPT\ + ATE::ArrayParagraphDirectionSuite* sArrayParagraphDirection;\ + ATE::ArrayJustificationMethodSuite* sArrayJustificationMethod;\ + ATE::ArrayKashidaWidthSuite* sArrayKashidaWidth;\ + ATE::ArrayKashidasSuite* sArrayKashidas;\ + ATE::ArrayDirOverrideSuite* sArrayDirOverride;\ + ATE::ArrayDigitSetSuite* sArrayDigitSet;\ + ATE::ArrayDiacVPosSuite* sArrayDiacVPos;\ + +#define IMPORT_TEXT_SUITES_COMPLEXSCRIPT\ + { kArrayParagraphDirectionSuite, kArrayParagraphDirectionSuiteVersion, &sArrayParagraphDirection },\ + { kArrayJustificationMethodSuite, kArrayJustificationMethodSuiteVersion, &sArrayJustificationMethod },\ + { kArrayKashidaWidthSuite, kArrayKashidaWidthSuiteVersion, &sArrayKashidaWidth },\ + { kArrayKashidasSuite, kArrayKashidasSuiteVersion, &sArrayKashidas },\ + { kArrayDirOverrideSuite, kArrayDirOverrideSuiteVersion, &sArrayDirOverride },\ + { kArrayDigitSetSuite, kArrayDigitSetSuiteVersion, &sArrayDigitSet },\ + { kArrayDiacVPosSuite, kArrayDiacVPosSuiteVersion, &sArrayDiacVPos },\ + +#else + +#define EXTERN_TEXT_SUITES_COMPLEXSCRIPT +#define IMPORT_TEXT_SUITES_COMPLEXSCRIPT + +#endif + +#define EXTERN_TEXT_SUITES\ + ATE::ApplicationPaintSuite* sApplicationPaint;\ + ATE::CompFontSuite* sCompFont;\ + ATE::CompFontClassSuite* sCompFontClass;\ + ATE::CompFontClassSetSuite* sCompFontClassSet;\ + ATE::CompFontComponentSuite* sCompFontComponent;\ + ATE::CompFontSetSuite* sCompFontSet;\ + ATE::GlyphRunSuite* sGlyphRun;\ + ATE::GlyphRunsIteratorSuite* sGlyphRunsIterator;\ + ATE::ListStyleSuite* sListStyle;\ + ATE::ListStyleSetSuite* sListStyleSet;\ + ATE::MojiKumiSuite* sMojiKumi;\ + ATE::MojiKumiSetSuite* sMojiKumiSet;\ + ATE::TextFrameSuite* sTextFrame;\ + ATE::TextFramesIteratorSuite* sTextFramesIterator;\ + ATE::TextLineSuite* sTextLine;\ + ATE::TextLinesIteratorSuite* sTextLinesIterator;\ + ATE::TextResourcesSuite* sTextResources;\ + ATE::ApplicationTextResourcesSuite* sApplicationTextResources;\ + ATE::DocumentTextResourcesSuite* sDocumentTextResources;\ + ATE::VersionInfoSuite* sVersionInfo;\ + ATE::ArrayApplicationPaintRefSuite* sArrayApplicationPaintRef;\ + ATE::ArrayRealSuite* sArrayReal;\ + ATE::ArrayBoolSuite* sArrayBool;\ + ATE::ArrayIntegerSuite* sArrayInteger;\ + ATE::ArrayLineCapTypeSuite* sArrayLineCapType;\ + ATE::ArrayFigureStyleSuite* sArrayFigureStyle;\ + ATE::ArrayLineJoinTypeSuite* sArrayLineJoinType;\ + ATE::ArrayWariChuJustificationSuite* sArrayWariChuJustification;\ + ATE::ArrayStyleRunAlignmentSuite* sArrayStyleRunAlignment;\ + ATE::ArrayAutoKernTypeSuite* sArrayAutoKernType;\ + ATE::ArrayBaselineDirectionSuite* sArrayBaselineDirection;\ + ATE::ArrayLanguageSuite* sArrayLanguage;\ + ATE::ArrayFontCapsOptionSuite* sArrayFontCapsOption;\ + ATE::ArrayFontBaselineOptionSuite* sArrayFontBaselineOption;\ + ATE::ArrayFontOpenTypePositionOptionSuite* sArrayFontOpenTypePositionOption;\ + ATE::ArrayUnderlinePositionSuite* sArrayUnderlinePosition;\ + ATE::ArrayStrikethroughPositionSuite* sArrayStrikethroughPosition;\ + ATE::ArrayParagraphJustificationSuite* sArrayParagraphJustification;\ + ATE::ArrayArrayRealSuite* sArrayArrayReal;\ + ATE::ArrayBurasagariTypeSuite* sArrayBurasagariType;\ + ATE::ArrayPreferredKinsokuOrderSuite* sArrayPreferredKinsokuOrder;\ + ATE::ArrayKinsokuRefSuite* sArrayKinsokuRef;\ + ATE::ArrayListStyleRefSuite* sArrayListStyleRef;\ + ATE::ArrayListStyleSetRefSuite* sArrayListStyleSetRef;\ + ATE::ArrayMojiKumiRefSuite* sArrayMojiKumiRef;\ + ATE::ArrayMojiKumiSetRefSuite* sArrayMojiKumiSetRef;\ + ATE::ArrayTabStopsRefSuite* sArrayTabStopsRef;\ + ATE::ArrayLeadingTypeSuite* sArrayLeadingType;\ + ATE::ArrayFontRefSuite* sArrayFontRef;\ + ATE::ArrayGlyphIDSuite* sArrayGlyphID;\ + ATE::ArrayRealPointSuite* sArrayRealPoint;\ + ATE::ArrayRealMatrixSuite* sArrayRealMatrix;\ + EXTERN_TEXT_SUITES_COMPLEXSCRIPT\ + ATE::CharFeaturesSuite* sCharFeatures;\ + ATE::CharInspectorSuite* sCharInspector;\ + ATE::CharStyleSuite* sCharStyle;\ + ATE::CharStylesSuite* sCharStyles;\ + ATE::CharStylesIteratorSuite* sCharStylesIterator;\ + ATE::FindSuite* sFind;\ + ATE::FontSuite* sFont;\ + ATE::GlyphSuite* sGlyph;\ + ATE::GlyphsSuite* sGlyphs;\ + ATE::GlyphsIteratorSuite* sGlyphsIterator;\ + ATE::KinsokuSuite* sKinsoku;\ + ATE::KinsokuSetSuite* sKinsokuSet;\ + ATE::ParaFeaturesSuite* sParaFeatures;\ + ATE::ParagraphSuite* sParagraph;\ + ATE::ParagraphsIteratorSuite* sParagraphsIterator;\ + ATE::ParaInspectorSuite* sParaInspector;\ + ATE::ParaStyleSuite* sParaStyle;\ + ATE::ParaStylesSuite* sParaStyles;\ + ATE::ParaStylesIteratorSuite* sParaStylesIterator;\ + ATE::SpellSuite* sSpell;\ + ATE::StoriesSuite* sStories;\ + ATE::StorySuite* sStory;\ + ATE::TabStopSuite* sTabStop;\ + ATE::TabStopsSuite* sTabStops;\ + ATE::TabStopsIteratorSuite* sTabStopsIterator;\ + ATE::TextRangeSuite* sTextRange;\ + ATE::TextRangesSuite* sTextRanges;\ + ATE::TextRangesIteratorSuite* sTextRangesIterator;\ + ATE::TextRunsIteratorSuite* sTextRunsIterator;\ + ATE::WordsIteratorSuite* sWordsIterator;\ + ATE::ArrayLineSuite* sArrayLine;\ + ATE::ArrayComposerEngineSuite* sArrayComposerEngine;\ + +#define IMPORT_TEXT_SUITES\ + { kApplicationPaintSuite, kApplicationPaintSuiteVersion, &sApplicationPaint } ,\ + { kCompFontSuite, kCompFontSuiteVersion, &sCompFont },\ + { kCompFontClassSuite, kCompFontClassSuiteVersion, &sCompFontClass },\ + { kCompFontClassSetSuite, kCompFontClassSetSuiteVersion, &sCompFontClassSet },\ + { kCompFontComponentSuite, kCompFontComponentSuiteVersion, &sCompFontComponent },\ + { kCompFontSetSuite, kCompFontSetSuiteVersion, &sCompFontSet },\ + { kGlyphRunSuite, kGlyphRunSuiteVersion, &sGlyphRun },\ + { kGlyphRunsIteratorSuite, kGlyphRunsIteratorSuiteVersion, &sGlyphRunsIterator },\ + { kListStyleSuite, kListStyleSuiteVersion, &sListStyle },\ + { kListStyleSetSuite, kListStyleSetSuiteVersion, &sListStyleSet },\ + { kMojiKumiSuite, kMojiKumiSuiteVersion, &sMojiKumi },\ + { kMojiKumiSetSuite, kMojiKumiSetSuiteVersion, &sMojiKumiSet },\ + { kTextFrameSuite, kTextFrameSuiteVersion, &sTextFrame },\ + { kTextFramesIteratorSuite, kTextFramesIteratorSuiteVersion, &sTextFramesIterator },\ + { kTextLineSuite, kTextLineSuiteVersion, &sTextLine },\ + { kTextLinesIteratorSuite, kTextLinesIteratorSuiteVersion, &sTextLinesIterator },\ + { kTextResourcesSuite, kTextResourcesSuiteVersion, &sTextResources },\ + { kApplicationTextResourcesSuite, kApplicationTextResourcesSuiteVersion, &sApplicationTextResources },\ + { kDocumentTextResourcesSuite, kDocumentTextResourcesSuiteVersion, &sDocumentTextResources },\ + { kVersionInfoSuite, kVersionInfoSuiteVersion, &sVersionInfo },\ + { kArrayApplicationPaintRefSuite, kArrayApplicationPaintRefSuiteVersion, &sArrayApplicationPaintRef },\ + { kArrayRealSuite, kArrayRealSuiteVersion, &sArrayReal },\ + { kArrayBoolSuite, kArrayBoolSuiteVersion, &sArrayBool },\ + { kArrayIntegerSuite, kArrayIntegerSuiteVersion, &sArrayInteger },\ + { kArrayLineCapTypeSuite, kArrayLineCapTypeSuiteVersion, &sArrayLineCapType },\ + { kArrayFigureStyleSuite, kArrayFigureStyleSuiteVersion, &sArrayFigureStyle },\ + { kArrayLineJoinTypeSuite, kArrayLineJoinTypeSuiteVersion, &sArrayLineJoinType },\ + { kArrayWariChuJustificationSuite, kArrayWariChuJustificationSuiteVersion, &sArrayWariChuJustification },\ + { kArrayStyleRunAlignmentSuite, kArrayStyleRunAlignmentSuiteVersion, &sArrayStyleRunAlignment },\ + { kArrayAutoKernTypeSuite, kArrayAutoKernTypeSuiteVersion, &sArrayAutoKernType },\ + { kArrayBaselineDirectionSuite, kArrayBaselineDirectionSuiteVersion, &sArrayBaselineDirection },\ + { kArrayLanguageSuite, kArrayLanguageSuiteVersion, &sArrayLanguage },\ + { kArrayFontCapsOptionSuite, kArrayFontCapsOptionSuiteVersion, &sArrayFontCapsOption },\ + { kArrayFontBaselineOptionSuite, kArrayFontBaselineOptionSuiteVersion, &sArrayFontBaselineOption },\ + { kArrayFontOpenTypePositionOptionSuite, kArrayFontOpenTypePositionOptionSuiteVersion, &sArrayFontOpenTypePositionOption },\ + { kArrayUnderlinePositionSuite, kArrayUnderlinePositionSuiteVersion, &sArrayUnderlinePosition },\ + { kArrayStrikethroughPositionSuite, kArrayStrikethroughPositionSuiteVersion, &sArrayStrikethroughPosition },\ + { kArrayParagraphJustificationSuite, kArrayParagraphJustificationSuiteVersion, &sArrayParagraphJustification },\ + { kArrayArrayRealSuite, kArrayArrayRealSuiteVersion, &sArrayArrayReal },\ + { kArrayBurasagariTypeSuite, kArrayBurasagariTypeSuiteVersion, &sArrayBurasagariType },\ + { kArrayPreferredKinsokuOrderSuite, kArrayPreferredKinsokuOrderSuiteVersion, &sArrayPreferredKinsokuOrder },\ + { kArrayKinsokuRefSuite, kArrayKinsokuRefSuiteVersion, &sArrayKinsokuRef },\ + { kArrayListStyleRefSuite, kArrayListStyleRefSuiteVersion, &sArrayListStyleRef },\ + { kArrayListStyleSetRefSuite, kArrayListStyleSetRefSuiteVersion, &sArrayListStyleSetRef },\ + { kArrayMojiKumiRefSuite, kArrayMojiKumiRefSuiteVersion, &sArrayMojiKumiRef },\ + { kArrayMojiKumiSetRefSuite, kArrayMojiKumiSetRefSuiteVersion, &sArrayMojiKumiSetRef },\ + { kArrayTabStopsRefSuite, kArrayTabStopsRefSuiteVersion, &sArrayTabStopsRef },\ + { kArrayLeadingTypeSuite, kArrayLeadingTypeSuiteVersion, &sArrayLeadingType },\ + { kArrayFontRefSuite, kArrayFontRefSuiteVersion, &sArrayFontRef },\ + { kArrayGlyphIDSuite, kArrayGlyphIDSuiteVersion, &sArrayGlyphID },\ + { kArrayRealPointSuite, kArrayRealPointSuiteVersion, &sArrayRealPoint },\ + { kArrayRealMatrixSuite, kArrayRealMatrixSuiteVersion, &sArrayRealMatrix },\ + IMPORT_TEXT_SUITES_COMPLEXSCRIPT\ + { kCharFeaturesSuite, kCharFeaturesSuiteVersion, &sCharFeatures },\ + { kCharInspectorSuite, kCharInspectorSuiteVersion, &sCharInspector },\ + { kCharStyleSuite, kCharStyleSuiteVersion, &sCharStyle },\ + { kCharStylesSuite, kCharStylesSuiteVersion, &sCharStyles },\ + { kCharStylesIteratorSuite, kCharStylesIteratorSuiteVersion, &sCharStylesIterator },\ + { kFindSuite, kFindSuiteVersion, &sFind },\ + { kFontSuite, kFontSuiteVersion, &sFont },\ + { kGlyphSuite, kGlyphSuiteVersion, &sGlyph },\ + { kGlyphsSuite, kGlyphsSuiteVersion, &sGlyphs },\ + { kGlyphsIteratorSuite, kGlyphsIteratorSuiteVersion, &sGlyphsIterator },\ + { kKinsokuSuite, kKinsokuSuiteVersion, &sKinsoku },\ + { kKinsokuSetSuite, kKinsokuSetSuiteVersion, &sKinsokuSet },\ + { kParaFeaturesSuite, kParaFeaturesSuiteVersion, &sParaFeatures },\ + { kParagraphSuite, kParagraphSuiteVersion, &sParagraph },\ + { kParagraphsIteratorSuite, kParagraphsIteratorSuiteVersion, &sParagraphsIterator },\ + { kParaInspectorSuite, kParaInspectorSuiteVersion, &sParaInspector },\ + { kParaStyleSuite, kParaStyleSuiteVersion, &sParaStyle },\ + { kParaStylesSuite, kParaStylesSuiteVersion, &sParaStyles },\ + { kParaStylesIteratorSuite, kParaStylesIteratorSuiteVersion, &sParaStylesIterator },\ + { kSpellSuite, kSpellSuiteVersion, &sSpell },\ + { kStoriesSuite, kStoriesSuiteVersion, &sStories },\ + { kStorySuite, kStorySuiteVersion, &sStory },\ + { kTabStopSuite, kTabStopSuiteVersion, &sTabStop },\ + { kTabStopsSuite, kTabStopsSuiteVersion, &sTabStops },\ + { kTabStopsIteratorSuite, kTabStopsIteratorSuiteVersion, &sTabStopsIterator },\ + { kTextRangeSuite, kTextRangeSuiteVersion, &sTextRange },\ + { kTextRangesSuite, kTextRangesSuiteVersion, &sTextRanges },\ + { kTextRangesIteratorSuite, kTextRangesIteratorSuiteVersion, &sTextRangesIterator },\ + { kTextRunsIteratorSuite, kTextRunsIteratorSuiteVersion, &sTextRunsIterator },\ + { kWordsIteratorSuite, kWordsIteratorSuiteVersion, &sWordsIterator },\ + { kArrayLineSuite, kArrayLineSuiteVersion, &sArrayLine },\ + { kArrayComposerEngineSuite, kArrayComposerEngineSuiteVersion, &sArrayComposerEngine },\ + +#endif //__ATETextSuitesImportHelper__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETypes.h b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETypes.h index d7e576c..ebe7774 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETypes.h @@ -1,1063 +1,1201 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - $File: ATETypes.h $ - - Author: - - $Author: micheleg $ - - $DateTime: 2006/01/02 16:27:31 $ - - $Revision: #2 $ - - $Change: 379550 $ - - Notes: - - ---------------------------------------------------------------------------------- */ -#ifndef __ATETypes__ -#define __ATETypes__ - -#ifdef __MWERKS__ - #if defined(__MC68K__) || defined(__POWERPC__) - #pragma enumsalwaysint on - #endif -#endif // __MWERKS__ - -// ---------------------------------------------------------------------------------- - -typedef unsigned short ASUTF16; - -#ifdef __cplusplus - -/** Defines bit operators for enum flags fields - - The type safety of bitflags can be strengthened by having an enum type - specify the set of flags and be the data type for the flags field. This - macro defines bit operators for such enums. - - The macro is intended only for use with enum types. Compile errors - will ensure against a client trying to pass in a class type or other - C++ data type as the macro parameter. -*/ - -#define ATE_ENUM_BIT_OPERATORS(E) \ - inline E operator| (E a, E b) \ - { \ - return E((int)a | (int)b); \ - } \ - inline E operator& (E a, E b) \ - { \ - return E((int)a & (int)b); \ - } \ - inline E operator^ (E a, E b) \ - { \ - return E((int)a ^ (int)b); \ - } \ - inline E operator~ (E a) \ - { \ - return E(~((int)a)); \ - } \ - inline E& operator|= (E& a, E b) \ - { \ - return a = a | b; \ - } \ - inline E& operator&= (E& a, E b) \ - { \ - return a = a & b; \ - } \ - inline E& operator^= (E& a, E b) \ - { \ - return a = a ^ b; \ - } - -// ---------------------------------------------------------------------------------- - -namespace ATE -{ -#endif - -typedef int ATEGlyphID; - -typedef unsigned char ATEBool8; - -// Some compilers complain of performance issues when converting -// between ATEBool8 (an integral value) and bool. These macros -// dodge these warnings but leave the code using them readable. -#define ATEBOOL8_IS_TRUE(value) (value) != 0 -#define ATEBOOL8PTR_IS_TRUE(value) (value) ? *(value) != 0 : false - -/** @ingroup Errors Adobe Text Engine (ATE) error codes. */ -enum ATEErr { - kNoError = 0, - kBadParameter, - kOutOfMemory, - kOutOfRange, - kNullPointer, - kInternalError, - kMissingSpellingDictionary, - kMissingHyphenationDictionary -}; -#ifndef __cplusplus -typedef enum ATEErr ATEErr; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) stream version constants */ -enum StreamVersion -{ - kStreamVersion1 = 1, // pre CS1 (ATE 1.0 ) - kStreamVersion2, // CS1 - (ATE 2.0) - kStreamVersion3, kStreamLastNonPersistedVersion = kStreamVersion3, // CS2 redux (shorter tag names) - (ATE V2.5) - kStreamCS2Redux = kStreamVersion3, - kStreamVersion4, kVerticalTextScaleChange = kStreamVersion4, // CS3 vertical text scale change (ATE 2.51) - kStreamVersion5, kComplexScriptSupport = kStreamVersion5, // CS4 complex script support (ATE 3.0) - kStreamVersion6, // CS5 (ATE 4.0) - kStreamVersion7, // CS6 hyperlink support (ATE 5.0) - kStreamVersion8, // CS7 (ATE 6.0) - // ^^^^^^^^^^^^ Add new versions above this comment ^^^^^^^^^^^^ - // This allows us to have the current version always equal the last. - kDontUseLastPlusOne, - kStreamCurrentVersion = kDontUseLastPlusOne - 1 -}; -#ifndef __cplusplus -typedef enum StreamVersion StreamVersion; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) stream formatting constants */ -enum StreamFormatting -{ - kEfficientPDFOutput, - kPrettyPDFOutput, - kBinaryPDFOutput -#if SLO_XML - ,kXMLUTF8Output -#endif -}; -#ifndef __cplusplus -typedef enum StreamFormatting StreamFormatting; -#endif - -// ---------------------------------------------------------------------------------- - -enum FeatureSet -{ - kLatinCJKFeatureSet, - kMEFeatureSet, - kIndicFeatureSet -}; - -#ifndef __cplusplus -typedef enum FeatureSet FeatureSet; -#endif - -// ---------------------------------------------------------------------------------- - -enum FontLockingAllowance -{ - kAllowFontLocking, - kDontAllowFontLocking, - kUseFontLockDocumentSetting -}; - -#ifndef __cplusplus -typedef enum FontLockingAllowance FontLockingAllowance; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) line cap type constants */ -enum LineCapType { - kButtCap = 0, - kRoundCap = 1, - kSquareCap = 2, - kNumLineCapTypes -}; -#ifndef __cplusplus -typedef enum LineCapType LineCapType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) character type constants */ -enum ASCharType { - /** Space character */ - kASSpaceChar = 0, - /** Punctuation character */ - kPunctuationChar, - /** Paragraph end character CR */ - kParagraphEndChar, - /** This character is anything but space, punctuation or paragraph end */ - kNormalChar -}; -#ifndef __cplusplus -typedef enum ASCharType ASCharType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) line-join type constants */ -enum LineJoinType { - /** A mitered join */ - kMiterJoin = 0, - /** A round join */ - kRoundJoin = 1, - /** A beveled join */ - kBevelJoin = 2, - kNumLineJoinTypes -}; -#ifndef __cplusplus -typedef enum LineJoinType LineJoinType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) paragraph justification type constants */ -enum ParagraphJustification -{ - kLeftJustify = 0, - kRightJustify, - kCenterJustify, - - kFullJustifyLastLineLeft, - kFullJustifyLastLineRight, - kFullJustifyLastLineCenter, - - kFullJustifyLastLineFull -}; -#ifndef __cplusplus -typedef enum ParagraphJustification ParagraphJustification; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) composer engine type constants - - kLatinCJKComposer: Original ATE US composer supporting Latin and CJK - kOptycaComposer: Optyca composer provided by WinSoft WRServices, supporting complex scripts - e.g. Hebrew, Arabic, Thai, Vietnames, Indic. - CJK is not supported by version 3.0 of WRServices -*/ -enum ComposerEngine -{ - kLatinCJKComposer = 0, - kOptycaComposer, - kAdornment -}; -#ifndef __cplusplus -typedef enum ComposerEngine ComposerEngine; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) paragraph direction type constants */ -enum ParagraphDirection -{ - kLeftToRight = 0, - kRightToLeft -}; -#ifndef __cplusplus -typedef enum ParagraphDirection ParagraphDirection; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) justification method type constants */ -enum JustificationMethod -{ - kJustifMethodDefault = 0, //corresponds to kLatinLike in WR - kJustifMethodArabic, //corresponds to kEvenKashidasStretched in WR - kJustifMethodNaskh, //corresponds to kTraditionalNaskh in WR - kJustifMethodNaskhTatweel, //corresponds to kTraditionalNaskhTatweel in WR - kJustifMethodNaskhKashida, //corresponds to kTraditionalNaskhKashida in WR - kJustifMethodNaskhTatweelFrac, //corresponds to kTraditionalNaskhTatweelFrac in WR - kJustifMethodNaskhKashidaFrac, //corresponds to kTraditionalNaskhKashidaFrac in WR - kJustifMethodAuto //ATE shall decide justification method on the basis of - //Kashida Width. Following Logic would be used: - //None : kLatinLike, - //Short : kTraditionalNaskhKashidaFrac, - //Medium : kTraditionalNaskhKashidaFrac, - //Long : kTraditionalNaskhKashidaFrac, - //Stylistic : kTraditionalNaskhKashida, -}; -#ifndef __cplusplus -typedef enum JustificationMethod JustificationMethod; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) digit set type constants */ -enum DigitSet -{ - kDefaultDigits = 0, - kArabicDigits, - kHindiDigits, - kFarsiDigits -}; -#ifndef __cplusplus -typedef enum DigitSet DigitSet; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) direction override type constants */ -enum DirOverride -{ - kDirOverrideDefault = 0, - kDirOverrideLTR, - kDirOverrideRTL -}; -#ifndef __cplusplus -typedef enum DirOverride DirOverride; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) diacritic vertical position type constants */ -enum DiacVPos -{ - kDiacVPosOff = 0, - kDiacVPosLoose, - kDiacVPosMedium, - kDiacVPosTight, - kDiacVPosOpenType -}; -#ifndef __cplusplus -typedef enum DiacPosition DiacPosition; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) kashida type constants */ -enum Kashidas -{ - kKashidaDefault = 0, - kKashidaOn = kKashidaDefault, - kKashidaOff -}; - -enum KashidaWidth -{ - kKashidaNone = 0, - kKashidaSmall, - kKashidaMedium, - kKashidaLong, - kKashidaStylistic -}; - -#ifndef __cplusplus -typedef enum Kashidas Kashidas; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) Wari Chu justification type constants */ -enum WariChuJustification -{ - kWariChuLeftJustify = 0, - kWariChuRightJustify, - kWariChuCenterJustify, - - kWariChuFullJustifyLastLineLeft, - kWariChuFullJustifyLastLineRight, - kWariChuFullJustifyLastLineCenter, - - kWariChuFullJustifyLastLineFull, - - kWariChuAutoJustify -}; -#ifndef __cplusplus -typedef enum WariChuJustification WariChuJustification; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) Kinsoku order constants */ -enum PreferredKinsokuOrder -{ - kPushIn = 0, - kPushOutFirst, - kPushOutOnly -}; -#ifndef __cplusplus -typedef enum PreferredKinsokuOrder PreferredKinsokuOrder; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) Burasagari type constants */ -enum BurasagariType -{ - kBurasagariNone = 0, - kBurasagariStandard, - kBurasagariStrong -}; -#ifndef __cplusplus -typedef enum BurasagariType BurasagariType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) leading type constants */ -enum LeadingType -{ - kRomanLeadingType = 0, - kJapaneseLeadingType = 1 -}; -#ifndef __cplusplus -typedef enum LeadingType LeadingType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) tab type constants */ -enum TabType -{ - kLeftTabType = 0, - kCenterTabType, - kRightTabType, - kDecimalTabType -}; -#ifndef __cplusplus -typedef enum TabType TabType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) kerning type constants */ -enum AutoKernType { kNoAutoKern, kMetricKern, kOpticalKern, kMetricRomanOnlyKern }; -#ifndef __cplusplus -typedef enum AutoKernType AutoKernType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) Japanese alternate feature type constants */ -enum JapaneseAlternateFeature -{ - kDefaultForm, - kTraditionalForm, - kExpertForm, - kJIS78Form, - kJIS83Form, - kHalfWidthForm, - kThirdWidthForm, - kQuarterWidthForm, - kFullWidthForm, - kProportionalWidthForm, - kJIS90Form, - kJIS04Form -}; -#ifndef __cplusplus -typedef enum JapaneseAlternateFeature JapaneseAlternateFeature; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) baseline direction constants */ -enum BaselineDirection -{ - kNeverUseMustBeKnown = 0, // we don't allow "unknown" like we used to - kBaselineWithStream = 1, // rotate roman glyphs to vertical orientation in vertical - kBaselineVerticalRotated = 2, // default baseline -- roman glyphs on side in vertical - kBaselineVerticalCrossStream = 3 // Tate-Chu-Yoko in vertical -}; -#ifndef __cplusplus -typedef enum BaselineDirection BaselineDirection; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) underline position constants */ -enum UnderlinePosition -{ - kUnderlineOff, - kUnderlineOn_RightInVertical, - kUnderlineOn_LeftInVertical -}; - -#ifndef __cplusplus -typedef enum UnderlinePosition UnderlinePosition; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) underline style constants */ -enum UnderlineStyle -{ - kUnderlineSolid, - kUnderlineDashed -}; - -#ifndef __cplusplus -typedef enum UnderlineStyle UnderlineStyle; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) strike-through position constants */ -enum StrikethroughPosition -{ - kStrikethroughOff, - kStrikethroughOn_XHeight, - kStrikethroughOn_EMBox -}; - -#ifndef __cplusplus -typedef enum StrikethroughPosition StrikethroughPosition; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) style-run alignment constants */ -enum StyleRunAlignment -{ - kAlignStylesByBottom = 0, - kAlignStylesByICFBottom = 1, - - kAlignStylesByRomanHorizontalCenterVertical = 2, - - kAlignStylesByCenterHorizontalRomanVertical = 3, - - kAlignStylesByICFTop = 4, - kAlignStylesByTop = 5 -}; -#ifndef __cplusplus -typedef enum StyleRunAlignment StyleRunAlignment; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) character case change constants */ -enum CaseChangeType -{ - kUppercase = 0, - kLowercase, - kTitleCase, - kSentenceCase -}; -#ifndef __cplusplus -typedef enum CaseChangeType CaseChangeType; -#endif - -// ---------------------------------------------------------------------------------- - -struct SLOToOTLanguage -{ - const char* fScript; - const char* fLanguage; -}; - -/** Adobe Text Engine (ATE) language constants */ -// NEW LANGUAGES MUST BE ADDED AT THE END OF THE LIST -// otherwise make appropriate corrections to LinguisticSettings::GetIndex() -enum Language -{ - kEnglishLanguage, - kFinnishLanguage, - kStandardFrenchLanguage, - kCanadianFrenchLanguage, - kGerman1996ReformLanguage, // [1996-2006] Previously kStandardGermanLanguage. See below for latest German. - kOldGermanLanguage, // As we moved from Proximity Hunspell the Old German language mapping changed to 1901 language. - kOldSwissGermanLanguage, // Pre 2006 Reform. Previously kSwissGermanLanguage. See below for latest Swiss German. - kItalianLanguage, - kBokmalNorwegianLanguage, - kNynorskNorwegianLanguage, - kStandardPortugueseLanguage, - kBrazillianPortugueseLanguage, - kSpanishLanguage, - kSwedishLanguage, - kUKEnglishLanguage, - kOldDutchLanguage, // Pre 2006 Reform. Previously kDutchLanguage. See below for latest Dutch. - kDanish, - kCatalan, - kRussian, - kUkranian, - kBulgarian, - kSerbian, - kCzech, - kPolish, - kRumanian, - kGreek, - kTurkish, - kIcelandic, - kHungarian, - kChineseLanguage, - kJapaneseLanguage, - kCroatian, - kHebrew, - kSlovenian, - kBelarussian, - kAlbanian, - kLithuanian, - kLatvian, - kSlovakian, - kArabic, - kEstonian, - kFarsi, - kGerman2006ReformLanguage, // Latest German. Should be the default as of 2006 - kDutch2005ReformLanguage, // Latest Dutch. Should be the default as of 2006 - kSwissGerman2006ReformLanguage, // Latest Swiss German. Should be the default as of 2006 - kCanadianEnglish, - kThai, - kVietnamese, - kLao, - kHindi, - kMarathi, - kBengaliIndia, - kPunjabi, - kGujarati, - kOriya, - kTamil, - kTelugu, - kKannada, - kMalayalam, - // Add all scripts supported by WRServices - kNumberOfLanguages, - kInvalidLanguage = 1000 // LILO need us to have an invalid language -}; - -//list of dictionary providers -enum DictionaryProvider -{ - kHunspellProvider, - kWinSoftProvider, - kWinSoftExtendedProvider, - kUserDictionaryOnlyProvider, - kProximityProvider, - kMaxNumProviders, - kInvalidProvider = 1000 -}; - -// -// DictionaryServiceType defines the types of services that are available from the dictionary provider -// -typedef ASUTF16 DictionaryServiceType; -enum -{ - kSpellingService, - kHyphenationService, - kInvalidService -}; - -#ifndef __cplusplus -typedef enum Language Language; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) synthetic font type constants */ -enum SyntheticFontType -{ - kNoSynthetic = 0, - kItalicSynthetic, - kBoldSynthetic, - kBoldItalicSynthetic -}; -#ifndef __cplusplus -typedef enum SyntheticFontType SyntheticFontType; -#endif - -/** Adobe Text Engine (ATE) figure style constants */ -enum FigureStyle -{ - kDefaultFigureStyle = 0, - kTabularLining, - kProportionalOldStyle, - kProportionalLining, - kTabularOldStyle -}; -#ifndef __cplusplus -typedef enum FigureStyle FigureStyle; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) font capitalization constants */ -enum FontCapsOption -{ - kFontNormalCaps = 0, - kFontSmallCaps, - kFontAllCaps, - kFontAllSmallCaps -}; -#ifndef __cplusplus -typedef enum FontCapsOption FontCapsOption; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) baseline option constants */ -enum FontBaselineOption -{ - kFontNormalBaseline = 0, - kFontFauxedSuperScript, - kFontFauxedSubScript -}; - -#ifndef __cplusplus -typedef enum FontBaselineOption FontBaselineOption; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) OpenType font position constants */ -enum FontOpenTypePositionOption -{ - kFontOTNormalPosition, - kFontOTSuperscriptPosition, - kFontOTSubscriptPosition, - kFontOTNumeratorPosition, - kFontOTDenominatorPosition -}; - -#ifndef __cplusplus -typedef enum FontOpenTypePositionOption FontOpenTypePositionOption; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) memory management constants */ -enum MakeEmptyMemoryHint -{ - kMakeEmptyAndFreeAllocations, - kMakeEmptyAndPreserveAllocations -}; - -#ifndef __cplusplus -typedef enum MakeEmptyMemoryHint MakeEmptyMemoryHint; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) direction constants */ -enum Direction { kForward = +1, kStationary = 0, kBackward = -1 }; -#ifndef __cplusplus -typedef enum Direction Direction; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) flattening options */ -enum FlattenWithParentStyles -{ - kDoNotFlattenWithParent = 0, - kFlattenWithParent = 1 -}; -#ifndef __cplusplus -typedef enum FlattenWithParentStyles FlattenWithParentStyles; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) search options */ -enum SearchScope -{ - kSearchEntireDocument = 0, - kSearchStory = 1 -}; -#ifndef __cplusplus -typedef enum SearchScope SearchScope; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) collapse direction options */ -enum CollapseDirection -{ - CollapseEnd, - CollapseStart -}; -#ifndef __cplusplus -typedef enum CollapseDirection CollapseDirection; -#endif - - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) Moji Kumi constants */ -enum -{ - kOpenParenthesis_MojiKumiCharacterClass = 1, - kCloseParenthesis_MojiKumiCharacterClass = 2, - kCantBeginLineCharacters_MojiKumiCharacterClass = 3, - kBreakingPunctuation_MojiKumiCharacterClass = 4, - kMiddlePunctuation_MojiKumiCharacterClass = 5, - kPeriods_MojiKumiCharacterClass = 6, - kComma_MojiKumiCharacterClass = 7, - kIndivisibleCharacters_MojiKumiCharacterClass = 8, - kPreAbbreviationSymbols_MojiKumiCharacterClass = 9, - kPostAbbreviationSymbols_MojiKumiCharacterClass = 10, - kJapaneseSpace_MojiKumiCharacterClass = 11, - kHiragana_MojiKumiCharacterClass = 12, - kDoubleByteNumber_MojiKumiCharacterClass = 13, - kOtherJapaneseCharacters_MojiKumiCharacterClass = 14, - kSingleByteNumber_MojiKumiCharacterClass = 15, - kRomanNonSpaceCharacters_MojiKumiCharacterClass = 16, - kTopOrEndOfLine_MojiKumiCharacterClass = 17, - kTopOfParagraph_MojiKumiCharacterClass = 18 -}; - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) composite font class constants */ -enum CompositeFontClassType -{ - kCompositeFontClassOverride = 0, - - // Following are predefined composite font class types - kCompositeFontClassBase, // Kanji class - kCompositeFontClassKana, // Full Width - kCompositeFontClassPunctuation, - kCompositeFontClassFWSymbolsAndAlphabetic, // Full Width - kCompositeFontClassHWSymbolsAndAlphabetic, // Half Width - kCompositeFontClassHWNumerals, // Half Width - kCompositeFontClassGaiji0, - kCompositeFontClassGaiji1, - kCompositeFontClassGaiji2, - kCompositeFontClassGaiji3, - kCompositeFontClassGaiji4, - kCompositeFontClassGaiji5, - kCompositeFontClassGaiji6, - kCompositeFontClassGaiji7, - kCompositeFontClassGaiji8, - kCompositeFontClassGaiji9, - kCompositeFontClassGaiji10, - kCompositeFontClassGaiji11, - - kEndOfCompositeFontClassType -}; -#ifndef __cplusplus -typedef enum CompositeFontClassType CompositeFontClassType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) Moji Kumi code-class constants */ -enum MojiKumiCodeClass -{ - kOpen = 1, - kClose, - kNoBegin, - kEndPunctuation, - kMiddlePunctuation, - kPeriodPunctuation, - kCommaPunctuation, - kNotSeparatePunctuation, - kSymbolsPrecedingNumbers, - kSymbolsFollowingNumbers, - kIdeographic, - kHiragana, - kDoubleByteNumbers, - kOtherJapaneseCharacters, - kSingleByteNumbers, - kRomanNonSpace, - kLineEdgeClass, - kParagraphStartClass, - - kEndOfCodeClasses -}; -#ifndef __cplusplus -typedef enum MojiKumiCodeClass MojiKumiCodeClass; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) class metric restrictions for a composite font component. */ -enum ClassMetricRestriction -{ - // class metric restrictions for a composite font component. - kClassMetricRestrictionNone = 0, - kClassMetricRestrictionSize = 1 << 0, - kClassMetricRestrictionBaseline = 1 << 1, - kClassMetricRestrictionHorizontalScale = 1 << 2, - kClassMetricRestrictionVerticalScale = 1 << 3, - kClassMetricRestrictionCenterGlyph = 1 << 4 -}; -#ifndef __cplusplus -typedef enum ClassMetricRestriction ClassMetricRestriction; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) line orientation options */ -enum LineOrientation -{ - kHorizontalLines = 0, - /** Not supported by Illustrator */ - kVerticalLeftToRight = 1, - kVerticalRightToLeft = 2 -}; -#ifndef __cplusplus -typedef enum LineOrientation LineOrientation; -#endif - - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) glyph orientation constants */ -enum GlyphOrientation -{ - /** Horizontal left to right. */ - kHorizontalGlyphs, - /** Standard vertical, straight from the font as vertical glyphs. */ - kVerticalGlyphs, - /** Horizontal glyphs rotated 90 degrees to be on side in vertical. */ - kHorizontalGlyphsRotated, - /** Not used; we are no longer setting this constant but it may exist in files. */ - kVerticalUprightRomanGlyphs -}; -#ifndef __cplusplus -typedef enum GlyphOrientation GlyphOrientation; -#endif - -/** Adobe Text Engine (ATE) frame type constants */ -enum FrameType -{ - kPointTextFrame = 0, - kInPathTextFrame = 1, - kOnPathTextFrame = 2 -}; -#ifndef __cplusplus -typedef enum FrameType FrameType; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) spell-checking result constants */ -enum SpellCheckingResult -{ - kNoProblems = 0, - kUnknownWord = 1, - kRepeatedWords = 2, - kUncappedStartOfSentence = 3, - kUncappedUnknownStartOfSentence = 4 -}; -#ifndef __cplusplus -typedef enum SpellCheckingResult SpellCheckingResult; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) Kinsoku predefined tag constants */ -enum KinsokuPredefinedTag -{ - kUserDefinedKinsokuTag = 0, - kPredefinedHardKinsokuTag = 1, - kPredefinedSoftKinsokuTag = 2 -}; -#ifndef __cplusplus -typedef enum KinsokuPredefinedTag KinsokuPredefinedTag; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) Moji Kumi predefined tag constants */ -enum MojikumiTablePredefinedTag -{ - kUserDefinedMojikumiTableTag = 0, - kPredefinedYakumonoHankakuMojikumiTableTag = 1, - kPredefinedYakumonoZenkakuMojikumiTableTag = 2, - kPredefinedGyomatsuYakumonoHankakuMojikumiTableTag = 3, - kPredefinedGyomatsuYakumonoZenkakuMojikumiTableTag = 4 -}; -#ifndef __cplusplus -typedef enum MojikumiTablePredefinedTag MojikumiTablePredefinedTag; -#endif - -// ---------------------------------------------------------------------------------- - -/** Adobe Text Engine (ATE) List Style predefined tag constants */ -enum ListStylePredefinedTag -{ - kUserDefinedListStyleTag = 0, - kPredefinedNumericListStyleTag = 1, - kPredefinedUppercaseAlphaListStyleTag = 2, - kPredefinedLowercaseAlphaListStyleTag = 3, - kPredefinedUppercaseRomanNumListStyleTag = 4, - kPredefinedLowercaseRomanNumListStyleTag = 5, - kPredefinedBulletListStyleTag = 6 -}; - -/** ATE Document policies regarding streaming data and predefined resources during Read/Write operation. - - This allows bitwise operation. For example, if one would like to write a document and omit both predefined data and - RenderedText, kOmitPredefinedData |kOmitRenderedText should be passed as a streaming policy to Document::Write. - - kAll:: stream in/out all data - - kOmitPredefinedData: do not stream out predefined data (only for Write operation) - This significantly reduces the size of the written data. However, fidelity between versions may suffer - if the omitted predefined data changes from version to version. - - Without specifying this flag, all predefined data will be streamed out; this provides maximum fidelity - but increases the file size. - - kOmitRenderedText: do not stream in/out RenderedText data - This reduces the size of the written data. Text will be recomposed and the view will be re-rendered - when streamed back in. This policy needs to be consistent across read and write. - - Without specifying this flag, all RenderedText data will be streamed out and the view will be maintained - when streamed back in, until before the text is recomposed. - - kOmitMostDocumentSettings: do not stream in/out document settings like smart quote settings for every language. - This reduces the size of the written data. However, if settings were changed by a user action, these changes - will be rolled back to the default state. Use this option only if your application does not allow user changes - to these settings. - -*/ - -enum StreamingPolicy -{ - kAll = 0, - kOmitPredefinedData = 1 << 0, - kOmitRenderedText = 1 << 1, - kOmitMostDocumentSettings = 1 << 2, - kOmitDictionaryProviders = 1 << 3 - /* WARNING: New policy value has to be a power of 2, to allow bitwise operation */ -}; - -//This mask shall be used in MundoNotifier::SelectionOwnedItemChanged() call back function -//to let the client know what has changed. -enum OwnedItemChangeIndicator -{ - /* WARNING: New OwnedItemChangeIndicator value has to be a power of 2, to allow bitwise operation */ - kNoneOwnedItem = 0, - kHyperlinkOwnedItem = 1 << 0, - //In future Add other items here,update kAll accordingly. - //kAllOwnedItems is bitwise OR of all the OwnedItemIndicator - kAllOwnedItems = kHyperlinkOwnedItem -}; - -#ifdef __cplusplus -ATE_ENUM_BIT_OPERATORS(StreamingPolicy) -#else -typedef enum StreamingPolicy StreamingPolicy; -#endif - -// ---------------------------------------------------------------------------------- - -#ifdef __cplusplus -} -#endif - -#ifdef __MWERKS__ - #if defined(__MC68K__) || defined(__POWERPC__) - #pragma enumsalwaysint reset - #endif -#endif // __MWERKS__ - -#endif //__ATETypes__ +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- */ + +#ifndef __ATETypes__ +#define __ATETypes__ + +#ifdef __MWERKS__ + #if defined(__MC68K__) || defined(__POWERPC__) + #pragma enumsalwaysint on + #endif +#endif // __MWERKS__ + +// ---------------------------------------------------------------------------------- + +typedef unsigned short ASUTF16; + +#ifdef __cplusplus + +/** Defines bit operators for enum flags fields + + The type safety of bitflags can be strengthened by having an enum type + specify the set of flags and be the data type for the flags field. This + macro defines bit operators for such enums. + + The macro is intended only for use with enum types. Compile errors + will ensure against a client trying to pass in a class type or other + C++ data type as the macro parameter. +*/ + +#define ATE_ENUM_BIT_OPERATORS(E) \ + inline E operator| (E a, E b) \ + { \ + return E((int)a | (int)b); \ + } \ + inline E operator& (E a, E b) \ + { \ + return E((int)a & (int)b); \ + } \ + inline E operator^ (E a, E b) \ + { \ + return E((int)a ^ (int)b); \ + } \ + inline E operator~ (E a) \ + { \ + return E(~((int)a)); \ + } \ + inline E& operator|= (E& a, E b) \ + { \ + return a = a | b; \ + } \ + inline E& operator&= (E& a, E b) \ + { \ + return a = a & b; \ + } \ + inline E& operator^= (E& a, E b) \ + { \ + return a = a ^ b; \ + } + +// ---------------------------------------------------------------------------------- + +namespace ATE +{ +#endif + +typedef int ATEGlyphID; + +typedef unsigned char ATEBool8; + +// Some compilers complain of performance issues when converting +// between ATEBool8 (an integral value) and bool. These macros +// dodge these warnings but leave the code using them readable. +#define ATEBOOL8_IS_TRUE(value) (value) != 0 +#define ATEBOOL8PTR_IS_TRUE(value) (value) ? *(value) != 0 : false + +/** @ingroup Errors Adobe Text Engine (ATE) error codes. */ +enum ATEErr { + kNoError = 0, + kBadParameter, + kOutOfMemory, + kOutOfRange, + kNullPointer, + kInternalError, + kMissingSpellingDictionary, + kMissingHyphenationDictionary +}; +#ifndef __cplusplus +typedef enum ATEErr ATEErr; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) stream version constants */ +enum StreamVersion +{ + kStreamVersion1 = 1, // pre CS1 (ATE 1.0 ) + kStreamVersion2, // CS1 - (ATE 2.0) + kStreamVersion3, kStreamLastNonPersistedVersion = kStreamVersion3, // CS2 redux (shorter tag names) - (ATE V2.5) + kStreamCS2Redux = kStreamVersion3, + kStreamVersion4, kVerticalTextScaleChange = kStreamVersion4, // CS3 vertical text scale change (ATE 2.51) + kStreamVersion5, kComplexScriptSupport = kStreamVersion5, // CS4 complex script support (ATE 3.0) + kStreamVersion6, // CS5 (ATE 4.0) + kStreamVersion7, // CS6 hyperlink support (ATE 5.0) + kStreamVersion8, // CS7 (ATE 6.0) + kStreamVersion9, + // ^^^^^^^^^^^^ Add new versions above this comment ^^^^^^^^^^^^ + // This allows us to have the current version always equal the last. + kDontUseLastPlusOne, + kStreamCurrentVersion = kDontUseLastPlusOne - 1 +}; +#ifndef __cplusplus +typedef enum StreamVersion StreamVersion; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) stream formatting constants */ +enum StreamFormatting +{ + kEfficientPDFOutput, + kPrettyPDFOutput, + kBinaryPDFOutput +#if SLO_XML + ,kXMLUTF8Output + ,kPrettyXMLUTF8Output +#endif +}; +#ifndef __cplusplus +typedef enum StreamFormatting StreamFormatting; +#endif + +// ---------------------------------------------------------------------------------- + +enum FeatureSet +{ + kLatinCJKFeatureSet, + kMEFeatureSet, + kIndicFeatureSet +}; + +#ifndef __cplusplus +typedef enum FeatureSet FeatureSet; +#endif + +// ---------------------------------------------------------------------------------- + +enum FontLockingAllowance +{ + kAllowFontLocking, + kDontAllowFontLocking, + kUseFontLockDocumentSetting +}; + +#ifndef __cplusplus +typedef enum FontLockingAllowance FontLockingAllowance; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) line cap type constants */ +enum LineCapType { + kButtCap = 0, + kRoundCap = 1, + kSquareCap = 2, + kNumLineCapTypes +}; +#ifndef __cplusplus +typedef enum LineCapType LineCapType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) character type constants */ +enum ASCharType { + /** Space character */ + kASSpaceChar = 0, + /** Punctuation character */ + kPunctuationChar, + /** Paragraph end character CR */ + kParagraphEndChar, + /** This character is anything but space, punctuation or paragraph end */ + kNormalChar +}; +#ifndef __cplusplus +typedef enum ASCharType ASCharType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) line-join type constants */ +enum LineJoinType { + /** A mitered join */ + kMiterJoin = 0, + /** A round join */ + kRoundJoin = 1, + /** A beveled join */ + kBevelJoin = 2, + kNumLineJoinTypes +}; +#ifndef __cplusplus +typedef enum LineJoinType LineJoinType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) paragraph justification type constants */ +enum ParagraphJustification +{ + kLeftJustify = 0, + kRightJustify, + kCenterJustify, + + kFullJustifyLastLineLeft, + kFullJustifyLastLineRight, + kFullJustifyLastLineCenter, + + kFullJustifyLastLineFull +}; +#ifndef __cplusplus +typedef enum ParagraphJustification ParagraphJustification; +#endif + + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) text vertical alignment type constants */ +enum FrameAlignment +{ + kTopAlignment = 0, + kCenterAlignment, + kBottomAlignment, + kJustifyAlignment +}; +#ifndef __cplusplus +typedef enum FrameAlignment FrameAlignment; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) text Frame Fitting Options */ + +enum FrameFitPolicy +{ + kDontAutoFit = 0, + + /*Changing the height of path for fitting*/ + kHeightExtensionWithCursorHeight = 1, + kHeightExtensionWithPreciseBounds, + kHeightExtensionWithBaseline, + +/*Below option can be added as well, but for the time being +are not supported as now*/ +#if 0 + /*Changing the height of path for fitting*/ + kWidthExtension, + /*Changing the height and width of path uniformly*/ + kUniformExtension, + /*Change the Font Size of text element for Fitting rather than changing the path*/ + kSizeExtension + /*we can also have a custom fitting policy which is controlled completely + by client of ATE*/ +#endif +}; + +#ifndef __cplusplus +typedef enum FrameFitPolicy FrameFitPolicy; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) composer engine type constants + + kLatinCJKComposer: Original ATE US composer supporting Latin and CJK + kOptycaComposer: Optyca composer provided by WinSoft WRServices, supporting complex scripts + e.g. Hebrew, Arabic, Thai, Vietnames, Indic. + CJK is not supported by version 3.0 of WRServices +*/ +enum ComposerEngine +{ + kLatinCJKComposer = 0, + kOptycaComposer, + kAdornment +}; +#ifndef __cplusplus +typedef enum ComposerEngine ComposerEngine; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) paragraph direction type constants */ +enum ParagraphDirection +{ + kLeftToRight = 0, + kRightToLeft +}; +#ifndef __cplusplus +typedef enum ParagraphDirection ParagraphDirection; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) justification method type constants */ +enum JustificationMethod +{ + kJustifMethodDefault = 0, //corresponds to kLatinLike in WR + kJustifMethodArabic, //corresponds to kEvenKashidasStretched in WR + kJustifMethodNaskh, //corresponds to kTraditionalNaskh in WR + kJustifMethodNaskhTatweel, //corresponds to kTraditionalNaskhTatweel in WR + kJustifMethodNaskhKashida, //corresponds to kTraditionalNaskhKashida in WR + kJustifMethodNaskhTatweelFrac, //corresponds to kTraditionalNaskhTatweelFrac in WR + kJustifMethodNaskhKashidaFrac, //corresponds to kTraditionalNaskhKashidaFrac in WR + kJustifMethodAuto //ATE shall decide justification method on the basis of + //Kashida Width. Following Logic would be used: + //None : kLatinLike, + //Short : kTraditionalNaskhKashidaFrac, + //Medium : kTraditionalNaskhKashidaFrac, + //Long : kTraditionalNaskhKashidaFrac, + //Stylistic : kTraditionalNaskhKashida, +}; +#ifndef __cplusplus +typedef enum JustificationMethod JustificationMethod; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) digit set type constants */ +enum DigitSet +{ + kDefaultDigits = 0, + kArabicDigits, + kHindiDigits, + kFarsiDigits, + kArabicDigitsRTL +}; +#ifndef __cplusplus +typedef enum DigitSet DigitSet; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) direction override type constants */ +enum DirOverride +{ + kDirOverrideDefault = 0, + kDirOverrideLTR, + kDirOverrideRTL +}; +#ifndef __cplusplus +typedef enum DirOverride DirOverride; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) diacritic vertical position type constants */ +enum DiacVPos +{ + kDiacVPosOff = 0, + kDiacVPosLoose, + kDiacVPosMedium, + kDiacVPosTight, + kDiacVPosOpenType +}; +#ifndef __cplusplus +typedef enum DiacPosition DiacPosition; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) kashida type constants */ +enum Kashidas +{ + kKashidaDefault = 0, + kKashidaOn = kKashidaDefault, + kKashidaOff +}; + +enum KashidaWidth +{ + kKashidaNone = 0, + kKashidaSmall, + kKashidaMedium, + kKashidaLong, + kKashidaStylistic +}; + +#ifndef __cplusplus +typedef enum Kashidas Kashidas; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Wari Chu justification type constants */ +enum WariChuJustification +{ + kWariChuLeftJustify = 0, + kWariChuRightJustify, + kWariChuCenterJustify, + + kWariChuFullJustifyLastLineLeft, + kWariChuFullJustifyLastLineRight, + kWariChuFullJustifyLastLineCenter, + + kWariChuFullJustifyLastLineFull, + + kWariChuAutoJustify +}; +#ifndef __cplusplus +typedef enum WariChuJustification WariChuJustification; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Kinsoku order constants */ +enum PreferredKinsokuOrder +{ + kPushIn = 0, + kPushOutFirst, + kPushOutOnly +}; +#ifndef __cplusplus +typedef enum PreferredKinsokuOrder PreferredKinsokuOrder; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Burasagari type constants */ +enum BurasagariType +{ + kBurasagariNone = 0, + kBurasagariStandard, + kBurasagariStrong +}; +#ifndef __cplusplus +typedef enum BurasagariType BurasagariType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) leading type constants */ +enum LeadingType +{ + kRomanLeadingType = 0, + kJapaneseLeadingType = 1 +}; +#ifndef __cplusplus +typedef enum LeadingType LeadingType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) tab type constants */ +enum TabType +{ + kLeftTabType = 0, + kCenterTabType, + kRightTabType, + kDecimalTabType +}; +#ifndef __cplusplus +typedef enum TabType TabType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) kerning type constants */ +enum AutoKernType { kNoAutoKern, kMetricKern, kOpticalKern, kMetricRomanOnlyKern }; +#ifndef __cplusplus +typedef enum AutoKernType AutoKernType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Japanese alternate feature type constants */ +enum JapaneseAlternateFeature +{ + kDefaultForm, + kTraditionalForm, + kExpertForm, + kJIS78Form, + kJIS83Form, + kHalfWidthForm, + kThirdWidthForm, + kQuarterWidthForm, + kFullWidthForm, + kProportionalWidthForm, + kJIS90Form, + kJIS04Form +}; +#ifndef __cplusplus +typedef enum JapaneseAlternateFeature JapaneseAlternateFeature; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) baseline direction constants */ +enum BaselineDirection +{ + kNeverUseMustBeKnown = 0, // we don't allow "unknown" like we used to + kBaselineWithStream = 1, // rotate roman glyphs to vertical orientation in vertical + kBaselineVerticalRotated = 2, // default baseline -- roman glyphs on side in vertical + kBaselineVerticalCrossStream = 3 // Tate-Chu-Yoko in vertical +}; +#ifndef __cplusplus +typedef enum BaselineDirection BaselineDirection; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Font Height Option Reference . +This is also being referred as setting the reference type which will +also guide how to evaluate reference font size value.*/ +enum FontSizeRefType +{ + kFontSizeRefDefault, //Embox + kFontSizeRef_CapHeight, + kFontSizeRef_XHeight, + kFontSizeRef_ICFBox +}; + +#ifndef __cplusplus +typedef enum FontSizeRefType FontSizeRefType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) underline position constants */ +enum UnderlinePosition +{ + kUnderlineOff, + kUnderlineOn_RightInVertical, + kUnderlineOn_LeftInVertical +}; + +#ifndef __cplusplus +typedef enum UnderlinePosition UnderlinePosition; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) underline style constants */ +enum UnderlineStyle +{ + kUnderlineSolid, + kUnderlineDashed +}; + +#ifndef __cplusplus +typedef enum UnderlineStyle UnderlineStyle; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) strike-through position constants */ +enum StrikethroughPosition +{ + kStrikethroughOff, + kStrikethroughOn_XHeight, + kStrikethroughOn_EMBox +}; + +#ifndef __cplusplus +typedef enum StrikethroughPosition StrikethroughPosition; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) style-run alignment constants */ +enum StyleRunAlignment +{ + kAlignStylesByBottom = 0, + kAlignStylesByICFBottom = 1, + + kAlignStylesByRomanHorizontalCenterVertical = 2, + + kAlignStylesByCenterHorizontalRomanVertical = 3, + + kAlignStylesByICFTop = 4, + kAlignStylesByTop = 5 +}; +#ifndef __cplusplus +typedef enum StyleRunAlignment StyleRunAlignment; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) character case change constants */ +enum CaseChangeType +{ + kUppercase = 0, + kLowercase, + kTitleCase, + kSentenceCase +}; +#ifndef __cplusplus +typedef enum CaseChangeType CaseChangeType; +#endif + +// ---------------------------------------------------------------------------------- + +struct SLOToOTLanguage +{ + const char* fScript; + const char* fLanguage; +}; + +/** Adobe Text Engine (ATE) language constants */ +// NEW LANGUAGES MUST BE ADDED AT THE END OF THE LIST +// otherwise make appropriate corrections to LinguisticSettings::GetIndex() +enum Language +{ + kEnglishLanguage, + kFinnishLanguage, + kStandardFrenchLanguage, + kCanadianFrenchLanguage, + kGerman1996ReformLanguage, // [1996-2006] Previously kStandardGermanLanguage. See below for latest German. + kOldGermanLanguage, // As we moved from Proximity Hunspell the Old German language mapping changed to 1901 language. + kOldSwissGermanLanguage, // Pre 2006 Reform. Previously kSwissGermanLanguage. See below for latest Swiss German. + kItalianLanguage, + kBokmalNorwegianLanguage, + kNynorskNorwegianLanguage, + kStandardPortugueseLanguage, + kBrazillianPortugueseLanguage, + kSpanishLanguage, + kSwedishLanguage, + kUKEnglishLanguage, + kOldDutchLanguage, // Pre 2006 Reform. Previously kDutchLanguage. See below for latest Dutch. + kDanish, + kCatalan, + kRussian, + kUkranian, + kBulgarian, + kSerbian, + kCzech, + kPolish, + kRumanian, + kGreek, + kTurkish, + kIcelandic, + kHungarian, + kChineseLanguage, + kJapaneseLanguage, + kCroatian, + kHebrew, + kSlovenian, + kBelarussian, + kAlbanian, + kLithuanian, + kLatvian, + kSlovakian, + kArabic, + kEstonian, + kFarsi, + kGerman2006ReformLanguage, // Latest German. Should be the default as of 2006 + kDutch2005ReformLanguage, // Latest Dutch. Should be the default as of 2006 + kSwissGerman2006ReformLanguage, // Latest Swiss German. Should be the default as of 2006 + kCanadianEnglish, + kThai, + kVietnamese, + kLao, + kHindi, + kMarathi, + kBengaliIndia, + kPunjabi, + kGujarati, + kOriya, + kTamil, + kTelugu, + kKannada, + kMalayalam, + + kBurmese, + kSinhalese, + kKhmer, + kIndonesian, + + // Add all scripts supported by WRServices + kNumberOfLanguages, + kInvalidLanguage = 1000 // LILO need us to have an invalid language +}; + +//list of dictionary providers +enum DictionaryProvider +{ + kHunspellProvider, + kWinSoftProvider, + kWinSoftExtendedProvider, + kUserDictionaryOnlyProvider, + kProximityProvider, + kMaxNumProviders, + kInvalidProvider = 1000 +}; + +// +// DictionaryServiceType defines the types of services that are available from the dictionary provider +// +typedef ASUTF16 DictionaryServiceType; +enum +{ + kSpellingService, + kHyphenationService, + kInvalidService +}; + +#ifndef __cplusplus +typedef enum Language Language; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) synthetic font type constants */ +enum SyntheticFontType +{ + kNoSynthetic = 0, + kItalicSynthetic, + kBoldSynthetic, + kBoldItalicSynthetic +}; +#ifndef __cplusplus +typedef enum SyntheticFontType SyntheticFontType; +#endif + +/** Adobe Text Engine (ATE) figure style constants */ +enum FigureStyle +{ + kDefaultFigureStyle = 0, + kTabularLining, + kProportionalOldStyle, + kProportionalLining, + kTabularOldStyle +}; +#ifndef __cplusplus +typedef enum FigureStyle FigureStyle; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) font capitalization constants */ +enum FontCapsOption +{ + kFontNormalCaps = 0, + kFontSmallCaps, + kFontAllCaps, + kFontAllSmallCaps +}; +#ifndef __cplusplus +typedef enum FontCapsOption FontCapsOption; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) baseline option constants */ +enum FontBaselineOption +{ + kFontNormalBaseline = 0, + kFontFauxedSuperScript, + kFontFauxedSubScript +}; + +#ifndef __cplusplus +typedef enum FontBaselineOption FontBaselineOption; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) OpenType font position constants */ +enum FontOpenTypePositionOption +{ + kFontOTNormalPosition, + kFontOTSuperscriptPosition, + kFontOTSubscriptPosition, + kFontOTNumeratorPosition, + kFontOTDenominatorPosition +}; + +#ifndef __cplusplus +typedef enum FontOpenTypePositionOption FontOpenTypePositionOption; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) memory management constants */ +enum MakeEmptyMemoryHint +{ + kMakeEmptyAndFreeAllocations, + kMakeEmptyAndPreserveAllocations +}; + +#ifndef __cplusplus +typedef enum MakeEmptyMemoryHint MakeEmptyMemoryHint; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) direction constants */ +enum Direction { kForward = +1, kStationary = 0, kBackward = -1 }; +#ifndef __cplusplus +typedef enum Direction Direction; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) flattening options */ +enum FlattenWithParentStyles +{ + kDoNotFlattenWithParent = 0, + kFlattenWithParent = 1 +}; +#ifndef __cplusplus +typedef enum FlattenWithParentStyles FlattenWithParentStyles; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) search options */ +enum SearchScope +{ + kSearchEntireDocument = 0, + kSearchStory = 1 +}; +#ifndef __cplusplus +typedef enum SearchScope SearchScope; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) collapse direction options */ +enum CollapseDirection +{ + CollapseEnd, + CollapseStart +}; +#ifndef __cplusplus +typedef enum CollapseDirection CollapseDirection; +#endif + + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Moji Kumi constants */ +enum +{ + kOpenParenthesis_MojiKumiCharacterClass = 1, + kCloseParenthesis_MojiKumiCharacterClass = 2, + kCantBeginLineCharacters_MojiKumiCharacterClass = 3, + kBreakingPunctuation_MojiKumiCharacterClass = 4, + kMiddlePunctuation_MojiKumiCharacterClass = 5, + kPeriods_MojiKumiCharacterClass = 6, + kComma_MojiKumiCharacterClass = 7, + kIndivisibleCharacters_MojiKumiCharacterClass = 8, + kPreAbbreviationSymbols_MojiKumiCharacterClass = 9, + kPostAbbreviationSymbols_MojiKumiCharacterClass = 10, + kJapaneseSpace_MojiKumiCharacterClass = 11, + kHiragana_MojiKumiCharacterClass = 12, + kDoubleByteNumber_MojiKumiCharacterClass = 13, + kOtherJapaneseCharacters_MojiKumiCharacterClass = 14, + kSingleByteNumber_MojiKumiCharacterClass = 15, + kRomanNonSpaceCharacters_MojiKumiCharacterClass = 16, + kTopOrEndOfLine_MojiKumiCharacterClass = 17, + kTopOfParagraph_MojiKumiCharacterClass = 18 +}; + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) composite font class constants */ +enum CompositeFontClassType +{ + kCompositeFontClassOverride = 0, + + // Following are predefined composite font class types + kCompositeFontClassBase, // Kanji class + kCompositeFontClassKana, // Full Width + kCompositeFontClassPunctuation, + kCompositeFontClassFWSymbolsAndAlphabetic, // Full Width + kCompositeFontClassHWSymbolsAndAlphabetic, // Half Width + kCompositeFontClassHWNumerals, // Half Width + kCompositeFontClassGaiji0, + kCompositeFontClassGaiji1, + kCompositeFontClassGaiji2, + kCompositeFontClassGaiji3, + kCompositeFontClassGaiji4, + kCompositeFontClassGaiji5, + kCompositeFontClassGaiji6, + kCompositeFontClassGaiji7, + kCompositeFontClassGaiji8, + kCompositeFontClassGaiji9, + kCompositeFontClassGaiji10, + kCompositeFontClassGaiji11, + + kEndOfCompositeFontClassType +}; +#ifndef __cplusplus +typedef enum CompositeFontClassType CompositeFontClassType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Moji Kumi code-class constants */ +enum MojiKumiCodeClass +{ + kOpen = 1, + kClose, + kNoBegin, + kEndPunctuation, + kMiddlePunctuation, + kPeriodPunctuation, + kCommaPunctuation, + kNotSeparatePunctuation, + kSymbolsPrecedingNumbers, + kSymbolsFollowingNumbers, + kIdeographic, + kHiragana, + kDoubleByteNumbers, + kOtherJapaneseCharacters, + kSingleByteNumbers, + kRomanNonSpace, + kLineEdgeClass, + kParagraphStartClass, + + kEndOfCodeClasses +}; +#ifndef __cplusplus +typedef enum MojiKumiCodeClass MojiKumiCodeClass; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) class metric restrictions for a composite font component. */ +enum ClassMetricRestriction +{ + // class metric restrictions for a composite font component. + kClassMetricRestrictionNone = 0, + kClassMetricRestrictionSize = 1 << 0, + kClassMetricRestrictionBaseline = 1 << 1, + kClassMetricRestrictionHorizontalScale = 1 << 2, + kClassMetricRestrictionVerticalScale = 1 << 3, + kClassMetricRestrictionCenterGlyph = 1 << 4 +}; +#ifndef __cplusplus +typedef enum ClassMetricRestriction ClassMetricRestriction; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) line orientation options */ +enum LineOrientation +{ + kHorizontalLines = 0, + /** Not supported by Illustrator */ + kVerticalLeftToRight = 1, + kVerticalRightToLeft = 2 +}; +#ifndef __cplusplus +typedef enum LineOrientation LineOrientation; +#endif + + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) glyph orientation constants */ +enum GlyphOrientation +{ + /** Horizontal left to right. */ + kHorizontalGlyphs, + /** Standard vertical, straight from the font as vertical glyphs. */ + kVerticalGlyphs, + /** Horizontal glyphs rotated 90 degrees to be on side in vertical. */ + kHorizontalGlyphsRotated, + /** Not used; we are no longer setting this constant but it may exist in files. */ + kVerticalUprightRomanGlyphs +}; +#ifndef __cplusplus +typedef enum GlyphOrientation GlyphOrientation; +#endif + +/** Adobe Text Engine (ATE) frame type constants */ +enum FrameType +{ + kPointTextFrame = 0, + kInPathTextFrame = 1, + kOnPathTextFrame = 2 +}; +#ifndef __cplusplus +typedef enum FrameType FrameType; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) spell-checking result constants */ +enum SpellCheckingResult +{ + kNoProblems = 0, + kUnknownWord = 1, + kRepeatedWords = 2, + kUncappedStartOfSentence = 3, + kUncappedUnknownStartOfSentence = 4 +}; +#ifndef __cplusplus +typedef enum SpellCheckingResult SpellCheckingResult; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Kinsoku predefined tag constants */ +enum KinsokuPredefinedTag +{ + kUserDefinedKinsokuTag = 0, + kPredefinedHardKinsokuTag = 1, + kPredefinedSoftKinsokuTag = 2 +}; +#ifndef __cplusplus +typedef enum KinsokuPredefinedTag KinsokuPredefinedTag; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) Moji Kumi predefined tag constants */ +enum MojikumiTablePredefinedTag +{ + kUserDefinedMojikumiTableTag = 0, + kPredefinedYakumonoHankakuMojikumiTableTag = 1, + kPredefinedYakumonoZenkakuMojikumiTableTag = 2, + kPredefinedGyomatsuYakumonoHankakuMojikumiTableTag = 3, + kPredefinedGyomatsuYakumonoZenkakuMojikumiTableTag = 4 +}; +#ifndef __cplusplus +typedef enum MojikumiTablePredefinedTag MojikumiTablePredefinedTag; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) List Style predefined tag constants */ +enum ListStylePredefinedTag +{ + kUserDefinedListStyleTag = 0, + kPredefinedNumericListStyleTag = 1, + kPredefinedUppercaseAlphaListStyleTag = 2, + kPredefinedLowercaseAlphaListStyleTag = 3, + kPredefinedUppercaseRomanNumListStyleTag = 4, + kPredefinedLowercaseRomanNumListStyleTag = 5, + kPredefinedBulletListStyleTag = 6 +}; + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) text list label alignment type constants */ +// ---------------------------------------------------------------------------------- +// [aburago 10-22-08] We use "start" and "end" here to emphasize logical alignment +// w.r.t. RTL placement +enum BNListAlignment +{ + kBN_AlignStart = 0, + kBN_AlignCenter, + kBN_AlignEnd +}; +#ifndef __cplusplus +typedef enum BNListAlignment BNListAlignment; +#endif + +// ---------------------------------------------------------------------------------- + +/** Adobe Text Engine (ATE) text list indent units */ +enum IndentUnits +{ + kEms = 0, + kPoints, +}; +#ifndef __cplusplus +typedef enum IndentUnits IndentUnits; +#endif + +/** ATE Document policies regarding streaming data and predefined resources during Read/Write operation. + + This allows bitwise operation. For example, if one would like to write a document and omit both predefined data and + RenderedText, kOmitPredefinedData |kOmitRenderedText should be passed as a streaming policy to Document::Write. + + kAll:: stream in/out all data + + kOmitPredefinedData: do not stream out predefined data (only for Write operation) + This significantly reduces the size of the written data. However, fidelity between versions may suffer + if the omitted predefined data changes from version to version. + + Without specifying this flag, all predefined data will be streamed out; this provides maximum fidelity + but increases the file size. + + kOmitRenderedText: do not stream in/out RenderedText data + This reduces the size of the written data. Text will be recomposed and the view will be re-rendered + when streamed back in. This policy needs to be consistent across read and write. + + Without specifying this flag, all RenderedText data will be streamed out and the view will be maintained + when streamed back in, until before the text is recomposed. + + kOmitMostDocumentSettings: do not stream in/out document settings like smart quote settings for every language. + This reduces the size of the written data. However, if settings were changed by a user action, these changes + will be rolled back to the default state. Use this option only if your application does not allow user changes + to these settings. + + kRefResourcesByUUID: By default, streamed objects and resources refer the resource by its index in resource set. + But by this policy, resources will be referred by their UUIDs instead of indexes. + + kIncludeOnlyGivenStream: Adding this policy will stream only the passed streamable object :both while reading and writing + + kIncludeOnlyResources : This will include only the Test Global resources in the streaming , omitting the text objects + + kOmitTextFrameAsResource : Till kStreamVersion8 , text frames were referred via resource ids from within the stream of + SLORenderedText. With policy ATE::kOmitTextFrameAsResource , text frames instead of being written as part of text + global resources , they will be embedded into the stream of the sloRenderedText itself in place of the frames resource ids. + + +*/ + +enum StreamingPolicy +{ + kAll = 0, + kOmitPredefinedData = 1 << 0, + kOmitRenderedText = 1 << 1, + kOmitMostDocumentSettings = 1 << 2, + kOmitDictionaryProviders = 1 << 3, + kOmitTextFrameAsResource = 1 << 4, + kIncludeOnlyGivenStream = 1 << 5, + kIncludeOnlyResources = 1 << 6, + kRefResourcesByUUID = 1 << 7 + /* WARNING: New policy value has to be a power of 2, to allow bitwise operation */ +}; + +//This mask shall be used in MundoNotifier::SelectionOwnedItemChanged() call back function +//to let the client know what has changed. +enum OwnedItemChangeIndicator +{ + /* WARNING: New OwnedItemChangeIndicator value has to be a power of 2, to allow bitwise operation */ + kNoneOwnedItem = 0, + kHyperlinkOwnedItem = 1 << 0, + //In future Add other items here,update kAll accordingly. + //kAllOwnedItems is bitwise OR of all the OwnedItemIndicator + kAllOwnedItems = kHyperlinkOwnedItem +}; + +/* To retrieve the text outlines for given range selectively determined by these policies */ +enum OutlineExtractionPolicy +{ + /* All the text outlines are retrieved - This is the default case */ + kExtractAll = 0, + + /* This policy will retrieve all the text outlines omitting the Glyph Outlines */ + kOmitGlyphs = 1 << 0, + + /* This policy will retrieve all the text outlines omitting the Underline Annotation Outlines */ + kOmitUnderlines = 1 << 1, + + /* This policy will retrieve all the text outlines omitting the StrikeThrough Annotation Outlines */ + kOmitStrikeThrough = 1 << 2, + + /* This policy will forcefully extract the Underline Annotation Outlines of the given range as if the + entire text has been underlined */ + kForceIncludeUnderlines = 1 << 3, + + /* This policy will retrieve the text annotation (underlines/StrikeThrough) in the form of Path Only. + (without stroke) It will not convert the annnotations paths to full polygons.*/ + kAnnotationNoStrokePath = 1 << 4 +}; + +// ---------------------------------------------------------------------------------- + +/* + SLOLilo enums + To retrieve or check word based on equivalent forms or Not */ +enum AddEquivalentFormsSetting { kDoNotAddEquivalentForms, kAddEquivalentForms }; +enum CheckEquivalentFormsSetting { kDoNotCheckEquivalentForms, kCheckEquivalentForms }; +enum AddOriginalWordSetting { kDoNotAddOriginalWord, kAddOriginalWord }; + +// ---------------------------------------------------------------------------------- + +#ifdef __cplusplus +ATE_ENUM_BIT_OPERATORS(StreamingPolicy) +ATE_ENUM_BIT_OPERATORS(OutlineExtractionPolicy) +#else +typedef enum StreamingPolicy StreamingPolicy; +typedef enum OutlineExtractionPolicy OutlineExtractionPolicy; +#endif + +// ---------------------------------------------------------------------------------- + +#ifdef __cplusplus +} +#endif + +#ifdef __MWERKS__ + #if defined(__MC68K__) || defined(__POWERPC__) + #pragma enumsalwaysint reset + #endif +#endif // __MWERKS__ + +#endif //__ATETypes__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETypesDef.h b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETypesDef.h index 9102c31..068de76 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/ATETypesDef.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/ATETypesDef.h @@ -1,126 +1,130 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATETypesDef.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ -#ifndef __ATETypesDef__ -#define __ATETypesDef__ - -#ifndef SLO_COMPLEXSCRIPT -#define SLO_COMPLEXSCRIPT 1 -#endif - -#ifdef __cplusplus -namespace ATE -{ -#endif - -typedef struct _ApplicationPaint* ApplicationPaintRef; -typedef struct _CompFont* CompFontRef; -typedef struct _CompFontClass* CompFontClassRef; -typedef struct _CompFontClassSet* CompFontClassSetRef; -typedef struct _CompFontComponent* CompFontComponentRef; -typedef struct _CompFontSet* CompFontSetRef; -typedef struct _GlyphRun* GlyphRunRef; -typedef struct _GlyphRunsIterator* GlyphRunsIteratorRef; -typedef struct _MojiKumi* MojiKumiRef; -typedef struct _MojiKumiSet* MojiKumiSetRef; -typedef struct _TextFrame* TextFrameRef; -typedef struct _TextFramesIterator* TextFramesIteratorRef; -typedef struct _TextLine* TextLineRef; -typedef struct _TextLinesIterator* TextLinesIteratorRef; -typedef struct _TextResources* TextResourcesRef; -typedef struct _ApplicationTextResources* ApplicationTextResourcesRef; -typedef struct _DocumentTextResources* DocumentTextResourcesRef; -typedef struct _VersionInfo* VersionInfoRef; -typedef struct _ArrayApplicationPaintRef* ArrayApplicationPaintRefRef; -typedef struct _ArrayReal* ArrayRealRef; -typedef struct _ArrayBool* ArrayBoolRef; -typedef struct _ArrayInteger* ArrayIntegerRef; -typedef struct _ArrayLineCapType* ArrayLineCapTypeRef; -typedef struct _ArrayFigureStyle* ArrayFigureStyleRef; -typedef struct _ArrayLineJoinType* ArrayLineJoinTypeRef; -typedef struct _ArrayWariChuJustification* ArrayWariChuJustificationRef; -typedef struct _ArrayStyleRunAlignment* ArrayStyleRunAlignmentRef; -typedef struct _ArrayAutoKernType* ArrayAutoKernTypeRef; -typedef struct _ArrayBaselineDirection* ArrayBaselineDirectionRef; -typedef struct _ArrayLanguage* ArrayLanguageRef; -typedef struct _ArrayFontCapsOption* ArrayFontCapsOptionRef; -typedef struct _ArrayFontBaselineOption* ArrayFontBaselineOptionRef; -typedef struct _ArrayFontOpenTypePositionOption* ArrayFontOpenTypePositionOptionRef; -typedef struct _ArrayUnderlinePosition* ArrayUnderlinePositionRef; -typedef struct _ArrayStrikethroughPosition* ArrayStrikethroughPositionRef; -typedef struct _ArrayParagraphJustification* ArrayParagraphJustificationRef; -typedef struct _ArrayArrayReal* ArrayArrayRealRef; -typedef struct _ArrayBurasagariType* ArrayBurasagariTypeRef; -typedef struct _ArrayPreferredKinsokuOrder* ArrayPreferredKinsokuOrderRef; -typedef struct _ArrayKinsokuRef* ArrayKinsokuRefRef; -typedef struct _ArrayMojiKumiRef* ArrayMojiKumiRefRef; -typedef struct _ArrayMojiKumiSetRef* ArrayMojiKumiSetRefRef; -typedef struct _ArrayTabStopsRef* ArrayTabStopsRefRef; -typedef struct _ArrayLeadingType* ArrayLeadingTypeRef; -typedef struct _ArrayFontRef* ArrayFontRefRef; -typedef struct _ArrayGlyphID* ArrayGlyphIDRef; -typedef struct _ArrayRealPoint* ArrayRealPointRef; -typedef struct _ArrayRealMatrix* ArrayRealMatrixRef; -#if SLO_COMPLEXSCRIPT -typedef struct _ArrayParagraphDirection* ArrayParagraphDirectionRef; -typedef struct _ArrayJustificationMethod* ArrayJustificationMethodRef; -typedef struct _ArrayKashidaWidth* ArrayKashidaWidthRef; -typedef struct _ArrayKashidas* ArrayKashidasRef; -typedef struct _ArrayDirOverride* ArrayDirOverrideRef; -typedef struct _ArrayDigitSet* ArrayDigitSetRef; -typedef struct _ArrayDiacVPos* ArrayDiacVPosRef; -#endif -typedef struct _CharFeatures* CharFeaturesRef; -typedef struct _CharInspector* CharInspectorRef; -typedef struct _CharStyle* CharStyleRef; -typedef struct _CharStyles* CharStylesRef; -typedef struct _CharStylesIterator* CharStylesIteratorRef; -typedef struct _Find* FindRef; -typedef struct _Font* FontRef; -typedef struct _Glyph* GlyphRef; -typedef struct _Glyphs* GlyphsRef; -typedef struct _GlyphsIterator* GlyphsIteratorRef; -typedef struct _Kinsoku* KinsokuRef; -typedef struct _KinsokuSet* KinsokuSetRef; -typedef struct _ParaFeatures* ParaFeaturesRef; -typedef struct _Paragraph* ParagraphRef; -typedef struct _ParagraphsIterator* ParagraphsIteratorRef; -typedef struct _ParaInspector* ParaInspectorRef; -typedef struct _ParaStyle* ParaStyleRef; -typedef struct _ParaStyles* ParaStylesRef; -typedef struct _ParaStylesIterator* ParaStylesIteratorRef; -typedef struct _Spell* SpellRef; -typedef struct _Stories* StoriesRef; -typedef struct _Story* StoryRef; -typedef struct _TabStop* TabStopRef; -typedef struct _TabStops* TabStopsRef; -typedef struct _TabStopsIterator* TabStopsIteratorRef; -typedef struct _TextRange* TextRangeRef; -typedef struct _TextRanges* TextRangesRef; -typedef struct _TextRangesIterator* TextRangesIteratorRef; -typedef struct _TextRunsIterator* TextRunsIteratorRef; -typedef struct _WordsIterator* WordsIteratorRef; -typedef struct _ArrayLine* ArrayLineRef; -typedef struct _ArrayComposerEngine* ArrayComposerEngineRef; - -#ifdef __cplusplus -}// namespace ATE -#endif - -#endif - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATETypesDef.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ +#ifndef __ATETypesDef__ +#define __ATETypesDef__ + +#ifndef SLO_COMPLEXSCRIPT +#define SLO_COMPLEXSCRIPT 1 +#endif + +#ifdef __cplusplus +namespace ATE +{ +#endif + +typedef struct _ApplicationPaint* ApplicationPaintRef; +typedef struct _CompFont* CompFontRef; +typedef struct _CompFontClass* CompFontClassRef; +typedef struct _CompFontClassSet* CompFontClassSetRef; +typedef struct _CompFontComponent* CompFontComponentRef; +typedef struct _CompFontSet* CompFontSetRef; +typedef struct _GlyphRun* GlyphRunRef; +typedef struct _GlyphRunsIterator* GlyphRunsIteratorRef; +typedef struct _ListStyle* ListStyleRef; +typedef struct _ListStyleSet* ListStyleSetRef; +typedef struct _MojiKumi* MojiKumiRef; +typedef struct _MojiKumiSet* MojiKumiSetRef; +typedef struct _TextFrame* TextFrameRef; +typedef struct _TextFramesIterator* TextFramesIteratorRef; +typedef struct _TextLine* TextLineRef; +typedef struct _TextLinesIterator* TextLinesIteratorRef; +typedef struct _TextResources* TextResourcesRef; +typedef struct _ApplicationTextResources* ApplicationTextResourcesRef; +typedef struct _DocumentTextResources* DocumentTextResourcesRef; +typedef struct _VersionInfo* VersionInfoRef; +typedef struct _ArrayApplicationPaintRef* ArrayApplicationPaintRefRef; +typedef struct _ArrayReal* ArrayRealRef; +typedef struct _ArrayBool* ArrayBoolRef; +typedef struct _ArrayInteger* ArrayIntegerRef; +typedef struct _ArrayLineCapType* ArrayLineCapTypeRef; +typedef struct _ArrayFigureStyle* ArrayFigureStyleRef; +typedef struct _ArrayLineJoinType* ArrayLineJoinTypeRef; +typedef struct _ArrayWariChuJustification* ArrayWariChuJustificationRef; +typedef struct _ArrayStyleRunAlignment* ArrayStyleRunAlignmentRef; +typedef struct _ArrayAutoKernType* ArrayAutoKernTypeRef; +typedef struct _ArrayBaselineDirection* ArrayBaselineDirectionRef; +typedef struct _ArrayLanguage* ArrayLanguageRef; +typedef struct _ArrayFontCapsOption* ArrayFontCapsOptionRef; +typedef struct _ArrayFontBaselineOption* ArrayFontBaselineOptionRef; +typedef struct _ArrayFontOpenTypePositionOption* ArrayFontOpenTypePositionOptionRef; +typedef struct _ArrayUnderlinePosition* ArrayUnderlinePositionRef; +typedef struct _ArrayStrikethroughPosition* ArrayStrikethroughPositionRef; +typedef struct _ArrayParagraphJustification* ArrayParagraphJustificationRef; +typedef struct _ArrayArrayReal* ArrayArrayRealRef; +typedef struct _ArrayBurasagariType* ArrayBurasagariTypeRef; +typedef struct _ArrayPreferredKinsokuOrder* ArrayPreferredKinsokuOrderRef; +typedef struct _ArrayKinsokuRef* ArrayKinsokuRefRef; +typedef struct _ArrayListStyleRef* ArrayListStyleRefRef; +typedef struct _ArrayListStyleSetRef* ArrayListStyleSetRefRef; +typedef struct _ArrayMojiKumiRef* ArrayMojiKumiRefRef; +typedef struct _ArrayMojiKumiSetRef* ArrayMojiKumiSetRefRef; +typedef struct _ArrayTabStopsRef* ArrayTabStopsRefRef; +typedef struct _ArrayLeadingType* ArrayLeadingTypeRef; +typedef struct _ArrayFontRef* ArrayFontRefRef; +typedef struct _ArrayGlyphID* ArrayGlyphIDRef; +typedef struct _ArrayRealPoint* ArrayRealPointRef; +typedef struct _ArrayFontSizeRefType* ArrayFontSizeRefTypeRef; +typedef struct _ArrayRealMatrix* ArrayRealMatrixRef; +#if SLO_COMPLEXSCRIPT +typedef struct _ArrayParagraphDirection* ArrayParagraphDirectionRef; +typedef struct _ArrayJustificationMethod* ArrayJustificationMethodRef; +typedef struct _ArrayKashidaWidth* ArrayKashidaWidthRef; +typedef struct _ArrayKashidas* ArrayKashidasRef; +typedef struct _ArrayDirOverride* ArrayDirOverrideRef; +typedef struct _ArrayDigitSet* ArrayDigitSetRef; +typedef struct _ArrayDiacVPos* ArrayDiacVPosRef; +#endif +typedef struct _CharFeatures* CharFeaturesRef; +typedef struct _CharInspector* CharInspectorRef; +typedef struct _CharStyle* CharStyleRef; +typedef struct _CharStyles* CharStylesRef; +typedef struct _CharStylesIterator* CharStylesIteratorRef; +typedef struct _Find* FindRef; +typedef struct _Font* FontRef; +typedef struct _Glyph* GlyphRef; +typedef struct _Glyphs* GlyphsRef; +typedef struct _GlyphsIterator* GlyphsIteratorRef; +typedef struct _Kinsoku* KinsokuRef; +typedef struct _KinsokuSet* KinsokuSetRef; +typedef struct _ParaFeatures* ParaFeaturesRef; +typedef struct _Paragraph* ParagraphRef; +typedef struct _ParagraphsIterator* ParagraphsIteratorRef; +typedef struct _ParaInspector* ParaInspectorRef; +typedef struct _ParaStyle* ParaStyleRef; +typedef struct _ParaStyles* ParaStylesRef; +typedef struct _ParaStylesIterator* ParaStylesIteratorRef; +typedef struct _Spell* SpellRef; +typedef struct _Stories* StoriesRef; +typedef struct _Story* StoryRef; +typedef struct _TabStop* TabStopRef; +typedef struct _TabStops* TabStopsRef; +typedef struct _TabStopsIterator* TabStopsIteratorRef; +typedef struct _TextRange* TextRangeRef; +typedef struct _TextRanges* TextRangesRef; +typedef struct _TextRangesIterator* TextRangesIteratorRef; +typedef struct _TextRunsIterator* TextRunsIteratorRef; +typedef struct _WordsIterator* WordsIteratorRef; +typedef struct _ArrayLine* ArrayLineRef; +typedef struct _ArrayComposerEngine* ArrayComposerEngineRef; + +#ifdef __cplusplus +} // namespace ATE +#endif + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/IText.cpp b/BloksAIPlugin/Vendor/illustratorapi/ate/IText.cpp index 4768ed0..a749f2a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/IText.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/IText.cpp @@ -1,14267 +1,14908 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: IText.cpp - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ -#include "IText.h" -#include "IThrowException.h" -#include "ATETextSuitesExtern.h" -#ifdef WIN_ENV -#pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) -#endif - -namespace ATE -{ -///////////////////////////////////////////////// -// UTILITY METHOD -//////////////////////////////////////////////// - -void ATEFloatMatrixToATERealMatrix( const ATETextDOM::FloatMatrix *f, ATETextDOM::RealMatrix *r ) -{ - if (f && r) - { - r->a = f->a; - r->b = f->b; - r->c = f->c; - r->d = f->d; - r->tx = f->tx; - r->ty = f->ty; - } -} - -void ATEFloatPointToATERealPoint ( const ATETextDOM::FloatPoint *f, ATETextDOM::RealPoint *r ) -{ - if (f && r) - { - r->h = f->h; - r->v = f->v; - } -} - -void SloFloatPointToAIFloatPoint ( const ATETextDOM::FloatPoint *f, ATETextDOM::FloatPoint *r ) -{ - if (f && r) - { - r->h = f->h; - r->v = f->v; - } -} - -////////////////////////////////////////////// -// --IApplicationPaint-- -////////////////////////////////////////////// - -IApplicationPaint::IApplicationPaint() -:fApplicationPaint(0) -{ -} - -IApplicationPaint::IApplicationPaint(ApplicationPaintRef applicationpaint) -:fApplicationPaint(applicationpaint) -{ -} - -IApplicationPaint::IApplicationPaint(const IApplicationPaint& src) -:fApplicationPaint(src.fApplicationPaint) -{ - sApplicationPaint->AddRef(fApplicationPaint); -} - -IApplicationPaint::~IApplicationPaint() -{ - sApplicationPaint->Release(fApplicationPaint); -} - -IApplicationPaint& IApplicationPaint::operator=(const IApplicationPaint& rhs) -{ - if (&rhs != this) - { - sApplicationPaint->Release(fApplicationPaint); - fApplicationPaint = rhs.fApplicationPaint; - sApplicationPaint->AddRef(fApplicationPaint); - } - return *this; -} - -bool IApplicationPaint::operator==(const IApplicationPaint& rhs) const -{ - return fApplicationPaint == rhs.fApplicationPaint; -} - -bool IApplicationPaint::operator!=(const IApplicationPaint& rhs) const -{ - return !(*this == rhs); -} - -ApplicationPaintRef IApplicationPaint::GetRef() const -{ - return fApplicationPaint; -} - -bool IApplicationPaint::IsNull() const -{ - return sApplicationPaint->IsNull(fApplicationPaint); -} - -////////////////////////////////////////////// -// --ICompFont-- -////////////////////////////////////////////// - -ICompFont::ICompFont() -:fCompFont(0) -{ -} - -ICompFont::ICompFont(CompFontRef compfont) -:fCompFont(compfont) -{ -} - -ICompFont::ICompFont(const ICompFont& src) -:fCompFont(src.fCompFont) -{ - sCompFont->AddRef(fCompFont); -} - -ICompFont::~ICompFont() -{ - sCompFont->Release(fCompFont); -} - -ICompFont& ICompFont::operator=(const ICompFont& rhs) -{ - if (&rhs != this) - { - sCompFont->Release(fCompFont); - fCompFont = rhs.fCompFont; - sCompFont->AddRef(fCompFont); - } - return *this; -} - -bool ICompFont::operator==(const ICompFont& rhs) const -{ - return fCompFont == rhs.fCompFont; -} - -bool ICompFont::operator!=(const ICompFont& rhs) const -{ - return !(*this == rhs); -} - -CompFontRef ICompFont::GetRef() const -{ - return fCompFont; -} - -bool ICompFont::IsNull() const -{ - return sCompFont->IsNull(fCompFont); -} - -ICompFont::ICompFont( ITextResources pResources) -{ - ATEErr error = sCompFont->Initialize(pResources.GetRef(), &fCompFont); - if(error) Throw_ATE_Exception(error); -} - -void ICompFont::GetNativeName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const -{ - ATEErr error = sCompFont->GetNativeName(fCompFont, name, maxLength); - if(error) Throw_ATE_Exception(error); -} - -void ICompFont::SetNativeName( const ATETextDOM::Unicode* name) -{ - ATEErr error = sCompFont->SetNativeName(fCompFont, name); - if(error) Throw_ATE_Exception(error); -} - -void ICompFont::GetPostScriptName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const -{ - ATEErr error = sCompFont->GetPostScriptName_AsUnicode(fCompFont, name, maxLength); - if(error) Throw_ATE_Exception(error); -} - -void ICompFont::GetPostScriptName( char* name, ATETextDOM::Int32 maxLength) const -{ - ATEErr error = sCompFont->GetPostScriptName_AsChar(fCompFont, name, maxLength); - if(error) Throw_ATE_Exception(error); -} - -void ICompFont::SetFontDictionary( void* fontDictionary) -{ - ATEErr error = sCompFont->SetFontDictionary(fCompFont, fontDictionary); - if(error) Throw_ATE_Exception(error); -} - -void* ICompFont::GetFontDictionary( ) const -{ - void* ret; - ATEErr error = sCompFont->GetFontDictionary(fCompFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICompFont ICompFont::Duplicate( ) const -{ - CompFontRef ret = 0; - ATEErr error = sCompFont->Duplicate(fCompFont, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFont(ret); -} - -bool ICompFont::IsModified( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFont->IsModified(fCompFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFont::IsEditable( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFont->IsEditable(fCompFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFont::IsCommitted( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFont->IsCommitted(fCompFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFont::VerifyState( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFont->VerifyState(fCompFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFont::IsATCFileLoaded( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFont->IsATCFileLoaded(fCompFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ICompFont::GetComponentCount( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFont->GetComponentCount(fCompFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICompFontComponent ICompFont::GetComponent( ATETextDOM::Int32 index) const -{ - CompFontComponentRef ret = 0; - ATEErr error = sCompFont->GetComponent(fCompFont, index, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontComponent(ret); -} - -ATETextDOM::Int32 ICompFont::Find( ICompFontComponent component) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFont->Find(fCompFont, component.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFont::RemoveComponent( ATETextDOM::Int32 index) -{ - ATEBool8 ret; - ATEErr error = sCompFont->RemoveComponent(fCompFont, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ICompFont::AddComponent( ICompFontComponent component) -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFont->AddComponent(fCompFont, component.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFont::ReplaceComponent( ATETextDOM::Int32 index, ICompFontComponent component) -{ - ATEBool8 ret; - ATEErr error = sCompFont->ReplaceComponent(fCompFont, index, component.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --ICompFontClass-- -////////////////////////////////////////////// - -ICompFontClass::ICompFontClass() -:fCompFontClass(0) -{ - ATEErr error = sCompFontClass->Initialize(&fCompFontClass); - if(error) Throw_ATE_Exception(error); -} - -ICompFontClass::ICompFontClass(CompFontClassRef compfontclass) -:fCompFontClass(compfontclass) -{ -} - -ICompFontClass::ICompFontClass(const ICompFontClass& src) -:fCompFontClass(src.fCompFontClass) -{ - sCompFontClass->AddRef(fCompFontClass); -} - -ICompFontClass::~ICompFontClass() -{ - sCompFontClass->Release(fCompFontClass); -} - -ICompFontClass& ICompFontClass::operator=(const ICompFontClass& rhs) -{ - if (&rhs != this) - { - sCompFontClass->Release(fCompFontClass); - fCompFontClass = rhs.fCompFontClass; - sCompFontClass->AddRef(fCompFontClass); - } - return *this; -} - -bool ICompFontClass::operator==(const ICompFontClass& rhs) const -{ - return fCompFontClass == rhs.fCompFontClass; -} - -bool ICompFontClass::operator!=(const ICompFontClass& rhs) const -{ - return !(*this == rhs); -} - -CompFontClassRef ICompFontClass::GetRef() const -{ - return fCompFontClass; -} - -bool ICompFontClass::IsNull() const -{ - return sCompFontClass->IsNull(fCompFontClass); -} - -void ICompFontClass::GetNativeName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const -{ - ATEErr error = sCompFontClass->GetNativeName(fCompFontClass, name, maxLength); - if(error) Throw_ATE_Exception(error); -} - -void ICompFontClass::SetNativeName( const ATETextDOM::Unicode* name) -{ - ATEErr error = sCompFontClass->SetNativeName(fCompFontClass, name); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 ICompFontClass::GetCodes( ATETextDOM::Unicode* codes, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontClass->GetCodes(fCompFontClass, codes, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ICompFontClass::SetCodes( const ATETextDOM::Unicode* codes) -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontClass->SetCodes(fCompFontClass, codes, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICompFontClass ICompFontClass::Duplicate( ) const -{ - CompFontClassRef ret = 0; - ATEErr error = sCompFontClass->Duplicate(fCompFontClass, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontClass(ret); -} - -ATETextDOM::Int32 ICompFontClass::GetCharacterCount( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontClass->GetCharacterCount(fCompFontClass, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -CompositeFontClassType ICompFontClass::GetClassType( ) const -{ - CompositeFontClassType ret; - ATEErr error = sCompFontClass->GetClassType(fCompFontClass, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFontClass::IsCodeInClass( ATETextDOM::Unicode code) const -{ - ATEBool8 ret; - ATEErr error = sCompFontClass->IsCodeInClass(fCompFontClass, code, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFontClass::IsEditable( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFontClass->IsEditable(fCompFontClass, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFontClass::IsCustomOverride( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFontClass->IsCustomOverride(fCompFontClass, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFontClass::IsModified( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFontClass->IsModified(fCompFontClass, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFontClass::VerifyState( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFontClass->VerifyState(fCompFontClass, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --ICompFontClassSet-- -////////////////////////////////////////////// - -ICompFontClassSet::ICompFontClassSet() -:fCompFontClassSet(0) -{ -} - -ICompFontClassSet::ICompFontClassSet(CompFontClassSetRef compfontclassset) -:fCompFontClassSet(compfontclassset) -{ -} - -ICompFontClassSet::ICompFontClassSet(const ICompFontClassSet& src) -:fCompFontClassSet(src.fCompFontClassSet) -{ - sCompFontClassSet->AddRef(fCompFontClassSet); -} - -ICompFontClassSet::~ICompFontClassSet() -{ - sCompFontClassSet->Release(fCompFontClassSet); -} - -ICompFontClassSet& ICompFontClassSet::operator=(const ICompFontClassSet& rhs) -{ - if (&rhs != this) - { - sCompFontClassSet->Release(fCompFontClassSet); - fCompFontClassSet = rhs.fCompFontClassSet; - sCompFontClassSet->AddRef(fCompFontClassSet); - } - return *this; -} - -bool ICompFontClassSet::operator==(const ICompFontClassSet& rhs) const -{ - return fCompFontClassSet == rhs.fCompFontClassSet; -} - -bool ICompFontClassSet::operator!=(const ICompFontClassSet& rhs) const -{ - return !(*this == rhs); -} - -CompFontClassSetRef ICompFontClassSet::GetRef() const -{ - return fCompFontClassSet; -} - -bool ICompFontClassSet::IsNull() const -{ - return sCompFontClassSet->IsNull(fCompFontClassSet); -} - -ATETextDOM::Int32 ICompFontClassSet::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontClassSet->GetSize(fCompFontClassSet, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICompFontClass ICompFontClassSet::GetFirst( ) const -{ - CompFontClassRef ret = 0; - ATEErr error = sCompFontClassSet->GetFirst(fCompFontClassSet, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontClass(ret); -} - -ICompFontClass ICompFontClassSet::GetLast( ) const -{ - CompFontClassRef ret = 0; - ATEErr error = sCompFontClassSet->GetLast(fCompFontClassSet, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontClass(ret); -} - -ICompFontClass ICompFontClassSet::Item( ATETextDOM::Int32 nIndex) const -{ - CompFontClassRef ret = 0; - ATEErr error = sCompFontClassSet->Item(fCompFontClassSet, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontClass(ret); -} - -ATETextDOM::Int32 ICompFontClassSet::Find( ICompFontClass compFontClass) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontClassSet->Find(fCompFontClassSet, compFontClass.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ICompFontClassSet::FindPredefined( CompositeFontClassType predefinedType) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontClassSet->FindPredefined(fCompFontClassSet, predefinedType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --ICompFontComponent-- -////////////////////////////////////////////// - -ICompFontComponent::ICompFontComponent() -:fCompFontComponent(0) -{ -} - -ICompFontComponent::ICompFontComponent(CompFontComponentRef compfontcomponent) -:fCompFontComponent(compfontcomponent) -{ -} - -ICompFontComponent::ICompFontComponent(const ICompFontComponent& src) -:fCompFontComponent(src.fCompFontComponent) -{ - sCompFontComponent->AddRef(fCompFontComponent); -} - -ICompFontComponent::~ICompFontComponent() -{ - sCompFontComponent->Release(fCompFontComponent); -} - -ICompFontComponent& ICompFontComponent::operator=(const ICompFontComponent& rhs) -{ - if (&rhs != this) - { - sCompFontComponent->Release(fCompFontComponent); - fCompFontComponent = rhs.fCompFontComponent; - sCompFontComponent->AddRef(fCompFontComponent); - } - return *this; -} - -bool ICompFontComponent::operator==(const ICompFontComponent& rhs) const -{ - return fCompFontComponent == rhs.fCompFontComponent; -} - -bool ICompFontComponent::operator!=(const ICompFontComponent& rhs) const -{ - return !(*this == rhs); -} - -CompFontComponentRef ICompFontComponent::GetRef() const -{ - return fCompFontComponent; -} - -bool ICompFontComponent::IsNull() const -{ - return sCompFontComponent->IsNull(fCompFontComponent); -} - -ICompFontComponent::ICompFontComponent( ITextResources pResources) -{ - ATEErr error = sCompFontComponent->Initialize(pResources.GetRef(), &fCompFontComponent); - if(error) Throw_ATE_Exception(error); -} - -ICompFontClass ICompFontComponent::GetClass( ) const -{ - CompFontClassRef ret = 0; - ATEErr error = sCompFontComponent->GetClass(fCompFontComponent, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontClass(ret); -} - -void ICompFontComponent::SetClass( ICompFontClass charClass) -{ - ATEErr error = sCompFontComponent->SetClass(fCompFontComponent, charClass.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -IFont ICompFontComponent::GetFont( ) const -{ - FontRef ret = 0; - ATEErr error = sCompFontComponent->GetFont(fCompFontComponent, &ret); - if(error) Throw_ATE_Exception(error); - return IFont(ret); -} - -void ICompFontComponent::SetFont( IFont font) -{ - ATEErr error = sCompFontComponent->SetFont(fCompFontComponent, font.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real ICompFontComponent::GetSize( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sCompFontComponent->GetSize(fCompFontComponent, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ICompFontComponent::SetSize( ATETextDOM::Real size) -{ - ATEErr error = sCompFontComponent->SetSize(fCompFontComponent, static_cast(size)); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real ICompFontComponent::GetBaseline( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sCompFontComponent->GetBaseline(fCompFontComponent, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ICompFontComponent::SetBaseline( ATETextDOM::Real baseline) -{ - ATEErr error = sCompFontComponent->SetBaseline(fCompFontComponent, static_cast(baseline)); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real ICompFontComponent::GetHorizontalScale( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sCompFontComponent->GetHorizontalScale(fCompFontComponent, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ICompFontComponent::SetHorizontalScale( ATETextDOM::Real horizontalScale) -{ - ATEErr error = sCompFontComponent->SetHorizontalScale(fCompFontComponent, static_cast(horizontalScale)); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real ICompFontComponent::GetVerticalScale( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sCompFontComponent->GetVerticalScale(fCompFontComponent, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ICompFontComponent::SetVerticalScale( ATETextDOM::Real verticalScale) -{ - ATEErr error = sCompFontComponent->SetVerticalScale(fCompFontComponent, static_cast(verticalScale)); - if(error) Throw_ATE_Exception(error); -} - -bool ICompFontComponent::GetCenterGlyph( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFontComponent->GetCenterGlyph(fCompFontComponent, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ICompFontComponent::SetCenterGlyph( bool centerglyph) -{ - ATEErr error = sCompFontComponent->SetCenterGlyph(fCompFontComponent, centerglyph); - if(error) Throw_ATE_Exception(error); -} - -bool ICompFontComponent::IsModified( ) const -{ - ATEBool8 ret; - ATEErr error = sCompFontComponent->IsModified(fCompFontComponent, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --ICompFontSet-- -////////////////////////////////////////////// - -ICompFontSet::ICompFontSet() -:fCompFontSet(0) -{ -} - -ICompFontSet::ICompFontSet(CompFontSetRef compfontset) -:fCompFontSet(compfontset) -{ -} - -ICompFontSet::ICompFontSet(const ICompFontSet& src) -:fCompFontSet(src.fCompFontSet) -{ - sCompFontSet->AddRef(fCompFontSet); -} - -ICompFontSet::~ICompFontSet() -{ - sCompFontSet->Release(fCompFontSet); -} - -ICompFontSet& ICompFontSet::operator=(const ICompFontSet& rhs) -{ - if (&rhs != this) - { - sCompFontSet->Release(fCompFontSet); - fCompFontSet = rhs.fCompFontSet; - sCompFontSet->AddRef(fCompFontSet); - } - return *this; -} - -bool ICompFontSet::operator==(const ICompFontSet& rhs) const -{ - return fCompFontSet == rhs.fCompFontSet; -} - -bool ICompFontSet::operator!=(const ICompFontSet& rhs) const -{ - return !(*this == rhs); -} - -CompFontSetRef ICompFontSet::GetRef() const -{ - return fCompFontSet; -} - -bool ICompFontSet::IsNull() const -{ - return sCompFontSet->IsNull(fCompFontSet); -} - -ATETextDOM::Int32 ICompFontSet::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontSet->GetSize(fCompFontSet, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICompFont ICompFontSet::GetFirst( ) const -{ - CompFontRef ret = 0; - ATEErr error = sCompFontSet->GetFirst(fCompFontSet, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFont(ret); -} - -ICompFont ICompFontSet::GetLast( ) const -{ - CompFontRef ret = 0; - ATEErr error = sCompFontSet->GetLast(fCompFontSet, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFont(ret); -} - -ICompFont ICompFontSet::Item( ATETextDOM::Int32 nIndex) const -{ - CompFontRef ret = 0; - ATEErr error = sCompFontSet->Item(fCompFontSet, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFont(ret); -} - -ATETextDOM::Int32 ICompFontSet::Find( ICompFont font) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontSet->Find(fCompFontSet, font.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFontSet::Remove( ATETextDOM::Int32 nIndex) -{ - ATEBool8 ret; - ATEErr error = sCompFontSet->Remove(fCompFontSet, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ICompFontSet::Add( ICompFont font) -{ - ATETextDOM::Int32 ret; - ATEErr error = sCompFontSet->Add(fCompFontSet, font.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICompFontSet::Replace( ATETextDOM::Int32 nIndex, ICompFont newFont) -{ - ATEBool8 ret; - ATEErr error = sCompFontSet->Replace(fCompFontSet, nIndex, newFont.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ICompFontSet::Update( ) const -{ - ATEErr error = sCompFontSet->Update(fCompFontSet); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IGlyphRun-- -////////////////////////////////////////////// - -IGlyphRun::IGlyphRun() -:fGlyphRun(0) -{ -} - -IGlyphRun::IGlyphRun(GlyphRunRef glyphrun) -:fGlyphRun(glyphrun) -{ -} - -IGlyphRun::IGlyphRun(const IGlyphRun& src) -:fGlyphRun(src.fGlyphRun) -{ - sGlyphRun->AddRef(fGlyphRun); -} - -IGlyphRun::~IGlyphRun() -{ - sGlyphRun->Release(fGlyphRun); -} - -IGlyphRun& IGlyphRun::operator=(const IGlyphRun& rhs) -{ - if (&rhs != this) - { - sGlyphRun->Release(fGlyphRun); - fGlyphRun = rhs.fGlyphRun; - sGlyphRun->AddRef(fGlyphRun); - } - return *this; -} - -bool IGlyphRun::operator==(const IGlyphRun& rhs) const -{ - return fGlyphRun == rhs.fGlyphRun; -} - -bool IGlyphRun::operator!=(const IGlyphRun& rhs) const -{ - return !(*this == rhs); -} - -GlyphRunRef IGlyphRun::GetRef() const -{ - return fGlyphRun; -} - -bool IGlyphRun::IsNull() const -{ - return sGlyphRun->IsNull(fGlyphRun); -} - -ITextLine IGlyphRun::GetTextLine( ) const -{ - TextLineRef ret = 0; - ATEErr error = sGlyphRun->GetTextLine(fGlyphRun, &ret); - if(error) Throw_ATE_Exception(error); - return ITextLine(ret); -} - -ATETextDOM::Int32 IGlyphRun::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sGlyphRun->GetSize(fGlyphRun, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IGlyphRun::GetCharacterCount( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sGlyphRun->GetCharacterCount(fGlyphRun, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IArrayRealPoint IGlyphRun::GetOrigins( ) const -{ - ArrayRealPointRef ret = 0; - ATEErr error = sGlyphRun->GetOrigins(fGlyphRun, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayRealPoint(ret); -} - -IArrayGlyphID IGlyphRun::GetGlyphIDs( ) const -{ - ArrayGlyphIDRef ret = 0; - ATEErr error = sGlyphRun->GetGlyphIDs(fGlyphRun, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayGlyphID(ret); -} - -ATETextDOM::RealMatrix IGlyphRun::GetMatrix( ) const -{ - ATETextDOM::RealMatrix ret; - ATETextDOM::FloatMatrix tempRet; - ATEErr error = sGlyphRun->GetMatrix(fGlyphRun, &tempRet); - ATEFloatMatrixToATERealMatrix(&tempRet,&ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICharFeatures IGlyphRun::GetCharFeatures( ) const -{ - CharFeaturesRef ret = 0; - ATEErr error = sGlyphRun->GetCharFeatures(fGlyphRun, &ret); - if(error) Throw_ATE_Exception(error); - return ICharFeatures(ret); -} - -GlyphOrientation IGlyphRun::GetGlyphOrientation( ) const -{ - GlyphOrientation ret; - ATEErr error = sGlyphRun->GetGlyphOrientation(fGlyphRun, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetAscent( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetAscent(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetDescent( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetDescent(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetTracking( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetTracking(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetSpaceGlyphWidth( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetSpaceGlyphWidth(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetDistanceToBaseline( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetDistanceToBaseline(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetUnderlinePosition( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetUnderlinePosition(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetUnderlineThickness( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetUnderlineThickness(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetMaxCapHeight( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetMaxCapHeight(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IGlyphRun::GetMinCapHeight( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sGlyphRun->GetMinCapHeight(fGlyphRun, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -IFont IGlyphRun::GetFlattenedFont( ) const -{ - FontRef ret = 0; - ATEErr error = sGlyphRun->GetFlattenedFont(fGlyphRun, &ret); - if(error) Throw_ATE_Exception(error); - return IFont(ret); -} - -ATETextDOM::Int32 IGlyphRun::GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sGlyphRun->GetContents_AsUnicode(fGlyphRun, text, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IGlyphRun::GetContents( char* text, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sGlyphRun->GetContents_AsChar(fGlyphRun, text, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IGlyphRunsIterator-- -////////////////////////////////////////////// - -IGlyphRunsIterator::IGlyphRunsIterator() -:fGlyphRunsIterator(0) -{ -} - -IGlyphRunsIterator::IGlyphRunsIterator(GlyphRunsIteratorRef glyphrunsiterator) -:fGlyphRunsIterator(glyphrunsiterator) -{ -} - -IGlyphRunsIterator::IGlyphRunsIterator(const IGlyphRunsIterator& src) -:fGlyphRunsIterator(src.fGlyphRunsIterator) -{ - sGlyphRunsIterator->AddRef(fGlyphRunsIterator); -} - -IGlyphRunsIterator::~IGlyphRunsIterator() -{ - sGlyphRunsIterator->Release(fGlyphRunsIterator); -} - -IGlyphRunsIterator& IGlyphRunsIterator::operator=(const IGlyphRunsIterator& rhs) -{ - if (&rhs != this) - { - sGlyphRunsIterator->Release(fGlyphRunsIterator); - fGlyphRunsIterator = rhs.fGlyphRunsIterator; - sGlyphRunsIterator->AddRef(fGlyphRunsIterator); - } - return *this; -} - -bool IGlyphRunsIterator::operator==(const IGlyphRunsIterator& rhs) const -{ - return fGlyphRunsIterator == rhs.fGlyphRunsIterator; -} - -bool IGlyphRunsIterator::operator!=(const IGlyphRunsIterator& rhs) const -{ - return !(*this == rhs); -} - -GlyphRunsIteratorRef IGlyphRunsIterator::GetRef() const -{ - return fGlyphRunsIterator; -} - -bool IGlyphRunsIterator::IsNull() const -{ - return sGlyphRunsIterator->IsNull(fGlyphRunsIterator); -} - -bool IGlyphRunsIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sGlyphRunsIterator->IsNotDone(fGlyphRunsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IGlyphRunsIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sGlyphRunsIterator->IsDone(fGlyphRunsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IGlyphRunsIterator::Next( ) -{ - ATEErr error = sGlyphRunsIterator->Next(fGlyphRunsIterator); - if(error) Throw_ATE_Exception(error); -} - -IGlyphRun IGlyphRunsIterator::Item( ) const -{ - GlyphRunRef ret = 0; - ATEErr error = sGlyphRunsIterator->Item(fGlyphRunsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyphRun(ret); -} - -////////////////////////////////////////////// -// --IMojiKumi-- -////////////////////////////////////////////// - -IMojiKumi::IMojiKumi() -:fMojiKumi(0) -{ - ATEErr error = sMojiKumi->Initialize(&fMojiKumi); - if(error) Throw_ATE_Exception(error); -} - -IMojiKumi::IMojiKumi(MojiKumiRef mojikumi) -:fMojiKumi(mojikumi) -{ -} - -IMojiKumi::IMojiKumi(const IMojiKumi& src) -:fMojiKumi(src.fMojiKumi) -{ - sMojiKumi->AddRef(fMojiKumi); -} - -IMojiKumi::~IMojiKumi() -{ - sMojiKumi->Release(fMojiKumi); -} - -IMojiKumi& IMojiKumi::operator=(const IMojiKumi& rhs) -{ - if (&rhs != this) - { - sMojiKumi->Release(fMojiKumi); - fMojiKumi = rhs.fMojiKumi; - sMojiKumi->AddRef(fMojiKumi); - } - return *this; -} - -bool IMojiKumi::operator==(const IMojiKumi& rhs) const -{ - ATEBool8 ret = false; - ATEErr error = sMojiKumi->IsEqual(fMojiKumi, rhs.fMojiKumi, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IMojiKumi::operator!=(const IMojiKumi& rhs) const -{ - return !(*this == rhs); -} - -MojiKumiRef IMojiKumi::GetRef() const -{ - return fMojiKumi; -} - -bool IMojiKumi::IsNull() const -{ - return sMojiKumi->IsNull(fMojiKumi); -} - -ATETextDOM::Int32 IMojiKumi::GetName( ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sMojiKumi->GetName(fMojiKumi, name, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IMojiKumi::GetNameSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sMojiKumi->GetNameSize(fMojiKumi, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IMojiKumi::SetName( const ATETextDOM::Unicode * name) -{ - ATEErr error = sMojiKumi->SetName(fMojiKumi, name); - if(error) Throw_ATE_Exception(error); -} - -bool IMojiKumi::MatchesPredefinedResourceTag( ATE::MojikumiTablePredefinedTag tag) const -{ - ATEBool8 ret; - ATEErr error = sMojiKumi->MatchesPredefinedResourceTag(fMojiKumi, tag, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IMojiKumi::GetEntry( ATETextDOM::Int32 index, ATETextDOM::Float * minExpansion, ATETextDOM::Float * maxExpansion, ATETextDOM::Float * desiredExpansion) const -{ - ATEErr error = sMojiKumi->GetEntry(fMojiKumi, index, minExpansion, maxExpansion, desiredExpansion); - if(error) Throw_ATE_Exception(error); -} - -void IMojiKumi::SetEntry( ATETextDOM::Int32 index, ATETextDOM::Real minExpansion, ATETextDOM::Real maxExpansion, ATETextDOM::Real desiredExpansion) -{ - ATEErr error = sMojiKumi->SetEntry(fMojiKumi, index, static_cast(minExpansion), static_cast(maxExpansion), static_cast(desiredExpansion)); - if(error) Throw_ATE_Exception(error); -} - -bool IMojiKumi::IsEquivalent( IMojiKumi rhsMojiKumi) const -{ - ATEBool8 ret; - ATEErr error = sMojiKumi->IsEquivalent(fMojiKumi, rhsMojiKumi.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IMojiKumi::IsModified( ) const -{ - ATEBool8 ret; - ATEErr error = sMojiKumi->IsModified(fMojiKumi, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IMojiKumi::IsPredefined( ) const -{ - ATEBool8 ret; - ATEErr error = sMojiKumi->IsPredefined(fMojiKumi, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IMojiKumi IMojiKumi::Duplicate( ) const -{ - MojiKumiRef ret = 0; - ATEErr error = sMojiKumi->Duplicate(fMojiKumi, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumi(ret); -} - -////////////////////////////////////////////// -// --IMojiKumiSet-- -////////////////////////////////////////////// - -IMojiKumiSet::IMojiKumiSet() -:fMojiKumiSet(0) -{ -} - -IMojiKumiSet::IMojiKumiSet(MojiKumiSetRef mojikumiset) -:fMojiKumiSet(mojikumiset) -{ -} - -IMojiKumiSet::IMojiKumiSet(const IMojiKumiSet& src) -:fMojiKumiSet(src.fMojiKumiSet) -{ - sMojiKumiSet->AddRef(fMojiKumiSet); -} - -IMojiKumiSet::~IMojiKumiSet() -{ - sMojiKumiSet->Release(fMojiKumiSet); -} - -IMojiKumiSet& IMojiKumiSet::operator=(const IMojiKumiSet& rhs) -{ - if (&rhs != this) - { - sMojiKumiSet->Release(fMojiKumiSet); - fMojiKumiSet = rhs.fMojiKumiSet; - sMojiKumiSet->AddRef(fMojiKumiSet); - } - return *this; -} - -bool IMojiKumiSet::operator==(const IMojiKumiSet& rhs) const -{ - return fMojiKumiSet == rhs.fMojiKumiSet; -} - -bool IMojiKumiSet::operator!=(const IMojiKumiSet& rhs) const -{ - return !(*this == rhs); -} - -MojiKumiSetRef IMojiKumiSet::GetRef() const -{ - return fMojiKumiSet; -} - -bool IMojiKumiSet::IsNull() const -{ - return sMojiKumiSet->IsNull(fMojiKumiSet); -} - -ATETextDOM::Int32 IMojiKumiSet::GetSize( ) -{ - ATETextDOM::Int32 ret; - ATEErr error = sMojiKumiSet->GetSize(fMojiKumiSet, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IMojiKumi IMojiKumiSet::GetFirst( ) -{ - MojiKumiRef ret = 0; - ATEErr error = sMojiKumiSet->GetFirst(fMojiKumiSet, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumi(ret); -} - -IMojiKumi IMojiKumiSet::GetLast( ) -{ - MojiKumiRef ret = 0; - ATEErr error = sMojiKumiSet->GetLast(fMojiKumiSet, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumi(ret); -} - -IMojiKumi IMojiKumiSet::Item( ATETextDOM::Int32 nIndex) const -{ - MojiKumiRef ret = 0; - ATEErr error = sMojiKumiSet->Item(fMojiKumiSet, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumi(ret); -} - -ATETextDOM::Int32 IMojiKumiSet::Find( const IMojiKumi mojiKumi) -{ - ATETextDOM::Int32 ret; - ATEErr error = sMojiKumiSet->Find_AsMojiKumi(fMojiKumiSet, mojiKumi.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IMojiKumiSet::Find( const ATETextDOM::Unicode* name) -{ - ATETextDOM::Int32 ret; - ATEErr error = sMojiKumiSet->Find_AsUnicode(fMojiKumiSet, name, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IMojiKumiSet::Find( MojikumiTablePredefinedTag tag) -{ - ATETextDOM::Int32 ret; - ATEErr error = sMojiKumiSet->Find_ByPredefinedMojikumiTag(fMojiKumiSet, tag, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IMojiKumiSet::Remove( ATETextDOM::Int32 nIndex) -{ - ATEBool8 ret; - ATEErr error = sMojiKumiSet->Remove(fMojiKumiSet, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IMojiKumiSet::Add( IMojiKumi mojiKumi) -{ - ATETextDOM::Int32 ret; - ATEErr error = sMojiKumiSet->Add(fMojiKumiSet, mojiKumi.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IMojiKumiSet::Replace( ATETextDOM::Int32 nIndex, IMojiKumi mojiKumi) -{ - ATEBool8 ret; - ATEErr error = sMojiKumiSet->Replace(fMojiKumiSet, nIndex, mojiKumi.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IMojiKumi IMojiKumiSet::CreateNewMojiKumi( const ATETextDOM::Unicode* name, ATETextDOM::Int32* nIndex) -{ - MojiKumiRef ret = 0; - ATEErr error = sMojiKumiSet->CreateNewMojiKumi(fMojiKumiSet, name, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumi(ret); -} - -////////////////////////////////////////////// -// --ITextFrame-- -////////////////////////////////////////////// - -ITextFrame::ITextFrame() -:fTextFrame(0) -{ -} - -ITextFrame::ITextFrame(TextFrameRef textframe) -:fTextFrame(textframe) -{ -} - -ITextFrame::ITextFrame(const ITextFrame& src) -:fTextFrame(src.fTextFrame) -{ - sTextFrame->AddRef(fTextFrame); -} - -ITextFrame::~ITextFrame() -{ - sTextFrame->Release(fTextFrame); -} - -ITextFrame& ITextFrame::operator=(const ITextFrame& rhs) -{ - if (&rhs != this) - { - sTextFrame->Release(fTextFrame); - fTextFrame = rhs.fTextFrame; - sTextFrame->AddRef(fTextFrame); - } - return *this; -} - -bool ITextFrame::operator==(const ITextFrame& rhs) const -{ - ATEBool8 ret = false; - ATEErr error = sTextFrame->IsEqual(fTextFrame, rhs.fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextFrame::operator!=(const ITextFrame& rhs) const -{ - return !(*this == rhs); -} - -TextFrameRef ITextFrame::GetRef() const -{ - return fTextFrame; -} - -bool ITextFrame::IsNull() const -{ - return sTextFrame->IsNull(fTextFrame); -} - -IStory ITextFrame::GetStory( ) const -{ - StoryRef ret = 0; - ATEErr error = sTextFrame->GetStory(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return IStory(ret); -} - -ITextRange ITextFrame::GetTextRange( bool bIncludeOverflow) const -{ - TextRangeRef ret = 0; - ATEErr error = sTextFrame->GetTextRange(fTextFrame, bIncludeOverflow, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -ITextLinesIterator ITextFrame::GetTextLinesIterator( ) const -{ - TextLinesIteratorRef ret = 0; - ATEErr error = sTextFrame->GetTextLinesIterator(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ITextLinesIterator(ret); -} - -FrameType ITextFrame::GetType( ) const -{ - FrameType ret; - ATEErr error = sTextFrame->GetType(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LineOrientation ITextFrame::GetLineOrientation( ) const -{ - LineOrientation ret; - ATEErr error = sTextFrame->GetLineOrientation(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextFrame::GetSelected( ) const -{ - ATEBool8 ret; - ATEErr error = sTextFrame->GetSelected(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::RealMatrix ITextFrame::GetMatrix( ) const -{ - ATETextDOM::RealMatrix ret; - ATETextDOM::FloatMatrix tempRet; - ATEErr error = sTextFrame->GetMatrix(fTextFrame, &tempRet); - ATEFloatMatrixToATERealMatrix(&tempRet,&ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ITextFrame::GetRowCount( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextFrame->GetRowCount(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ITextFrame::GetColumnCount( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextFrame->GetColumnCount(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextFrame::GetRowMajorOrder( ) const -{ - ATEBool8 ret; - ATEErr error = sTextFrame->GetRowMajorOrder(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real ITextFrame::GetRowGutter( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sTextFrame->GetRowGutter(fTextFrame, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real ITextFrame::GetColumnGutter( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sTextFrame->GetColumnGutter(fTextFrame, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real ITextFrame::GetSpacing( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sTextFrame->GetSpacing(fTextFrame, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextFrame::GetOpticalAlignment( ) const -{ - ATEBool8 ret; - ATEErr error = sTextFrame->GetOpticalAlignment(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -#if SLO_COMPLEXSCRIPT -ParagraphDirection ITextFrame::GetStoryDirection( ) const -{ - ParagraphDirection ret; - ATEErr error = sTextFrame->GetStoryDirection(fTextFrame, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} -#endif - -void ITextFrame::SetRowCount( ATETextDOM::Int32 rowCount) -{ - ATEErr error = sTextFrame->SetRowCount(fTextFrame, rowCount); - if(error) Throw_ATE_Exception(error); -} - -void ITextFrame::SetColumnCount( ATETextDOM::Int32 columnCount) -{ - ATEErr error = sTextFrame->SetColumnCount(fTextFrame, columnCount); - if(error) Throw_ATE_Exception(error); -} - -void ITextFrame::SetRowMajorOrder( bool isRowMajor) -{ - ATEErr error = sTextFrame->SetRowMajorOrder(fTextFrame, isRowMajor); - if(error) Throw_ATE_Exception(error); -} - -void ITextFrame::SetRowGutter( ATETextDOM::Real gutter) -{ - ATEErr error = sTextFrame->SetRowGutter(fTextFrame, static_cast(gutter)); - if(error) Throw_ATE_Exception(error); -} - -void ITextFrame::SetColumnGutter( ATETextDOM::Real gutter) -{ - ATEErr error = sTextFrame->SetColumnGutter(fTextFrame, static_cast(gutter)); - if(error) Throw_ATE_Exception(error); -} - -void ITextFrame::SetSpacing( ATETextDOM::Real spacing) -{ - ATEErr error = sTextFrame->SetSpacing(fTextFrame, static_cast(spacing)); - if(error) Throw_ATE_Exception(error); -} - -void ITextFrame::SetOpticalAlignment( bool isActive) -{ - ATEErr error = sTextFrame->SetOpticalAlignment(fTextFrame, isActive); - if(error) Throw_ATE_Exception(error); -} - -void ITextFrame::SetLineOrientation( LineOrientation lineOrientation) -{ - ATEErr error = sTextFrame->SetLineOrientation(fTextFrame, lineOrientation); - if(error) Throw_ATE_Exception(error); -} - -#if SLO_COMPLEXSCRIPT -void ITextFrame::SetStoryDirection( ParagraphDirection direction) -{ - ATEErr error = sTextFrame->SetStoryDirection(fTextFrame, direction); - if(error) Throw_ATE_Exception(error); -} -#endif - -////////////////////////////////////////////// -// --ITextFramesIterator-- -////////////////////////////////////////////// - -ITextFramesIterator::ITextFramesIterator() -:fTextFramesIterator(0) -{ -} - -ITextFramesIterator::ITextFramesIterator(TextFramesIteratorRef textframesiterator) -:fTextFramesIterator(textframesiterator) -{ -} - -ITextFramesIterator::ITextFramesIterator(const ITextFramesIterator& src) -:fTextFramesIterator(src.fTextFramesIterator) -{ - sTextFramesIterator->AddRef(fTextFramesIterator); -} - -ITextFramesIterator::~ITextFramesIterator() -{ - sTextFramesIterator->Release(fTextFramesIterator); -} - -ITextFramesIterator& ITextFramesIterator::operator=(const ITextFramesIterator& rhs) -{ - if (&rhs != this) - { - sTextFramesIterator->Release(fTextFramesIterator); - fTextFramesIterator = rhs.fTextFramesIterator; - sTextFramesIterator->AddRef(fTextFramesIterator); - } - return *this; -} - -bool ITextFramesIterator::operator==(const ITextFramesIterator& rhs) const -{ - return fTextFramesIterator == rhs.fTextFramesIterator; -} - -bool ITextFramesIterator::operator!=(const ITextFramesIterator& rhs) const -{ - return !(*this == rhs); -} - -TextFramesIteratorRef ITextFramesIterator::GetRef() const -{ - return fTextFramesIterator; -} - -bool ITextFramesIterator::IsNull() const -{ - return sTextFramesIterator->IsNull(fTextFramesIterator); -} - -ITextFramesIterator::ITextFramesIterator( const ITextRange& range) -{ - ATEErr error = sTextFramesIterator->Initialize(range.GetRef(), &fTextFramesIterator); - if(error) Throw_ATE_Exception(error); -} - -bool ITextFramesIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTextFramesIterator->IsNotDone(fTextFramesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextFramesIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTextFramesIterator->IsDone(fTextFramesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextFramesIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sTextFramesIterator->IsEmpty(fTextFramesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextFramesIterator::Next( ) -{ - ATEErr error = sTextFramesIterator->Next(fTextFramesIterator); - if(error) Throw_ATE_Exception(error); -} - -void ITextFramesIterator::Previous( ) -{ - ATEErr error = sTextFramesIterator->Previous(fTextFramesIterator); - if(error) Throw_ATE_Exception(error); -} - -ITextFrame ITextFramesIterator::Item( ) const -{ - TextFrameRef ret = 0; - ATEErr error = sTextFramesIterator->Item(fTextFramesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ITextFrame(ret); -} - -////////////////////////////////////////////// -// --ITextLine-- -////////////////////////////////////////////// - -ITextLine::ITextLine() -:fTextLine(0) -{ -} - -ITextLine::ITextLine(TextLineRef textline) -:fTextLine(textline) -{ -} - -ITextLine::ITextLine(const ITextLine& src) -:fTextLine(src.fTextLine) -{ - sTextLine->AddRef(fTextLine); -} - -ITextLine::~ITextLine() -{ - sTextLine->Release(fTextLine); -} - -ITextLine& ITextLine::operator=(const ITextLine& rhs) -{ - if (&rhs != this) - { - sTextLine->Release(fTextLine); - fTextLine = rhs.fTextLine; - sTextLine->AddRef(fTextLine); - } - return *this; -} - -bool ITextLine::operator==(const ITextLine& rhs) const -{ - return fTextLine == rhs.fTextLine; -} - -bool ITextLine::operator!=(const ITextLine& rhs) const -{ - return !(*this == rhs); -} - -TextLineRef ITextLine::GetRef() const -{ - return fTextLine; -} - -bool ITextLine::IsNull() const -{ - return sTextLine->IsNull(fTextLine); -} - -IGlyphRunsIterator ITextLine::GetGlyphRunsIterator( ) const -{ - GlyphRunsIteratorRef ret = 0; - ATEErr error = sTextLine->GetGlyphRunsIterator(fTextLine, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyphRunsIterator(ret); -} - -IGlyphRunsIterator ITextLine::GetVisualGlyphRunsIterator( ) const -{ - GlyphRunsIteratorRef ret = 0; - ATEErr error = sTextLine->GetVisualGlyphRunsIterator(fTextLine, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyphRunsIterator(ret); -} - -ITextFrame ITextLine::GetTextFrame( ) const -{ - TextFrameRef ret = 0; - ATEErr error = sTextLine->GetTextFrame(fTextLine, &ret); - if(error) Throw_ATE_Exception(error); - return ITextFrame(ret); -} - -ITextRange ITextLine::GetTextRange( ) const -{ - TextRangeRef ret = 0; - ATEErr error = sTextLine->GetTextRange(fTextLine, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -IArrayLine ITextLine::GetBaselines( ) const -{ - ArrayLineRef ret = 0; - ATEErr error = sTextLine->GetBaselines(fTextLine, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayLine(ret); -} - -////////////////////////////////////////////// -// --ITextLinesIterator-- -////////////////////////////////////////////// - -ITextLinesIterator::ITextLinesIterator() -:fTextLinesIterator(0) -{ -} - -ITextLinesIterator::ITextLinesIterator(TextLinesIteratorRef textlinesiterator) -:fTextLinesIterator(textlinesiterator) -{ -} - -ITextLinesIterator::ITextLinesIterator(const ITextLinesIterator& src) -:fTextLinesIterator(src.fTextLinesIterator) -{ - sTextLinesIterator->AddRef(fTextLinesIterator); -} - -ITextLinesIterator::~ITextLinesIterator() -{ - sTextLinesIterator->Release(fTextLinesIterator); -} - -ITextLinesIterator& ITextLinesIterator::operator=(const ITextLinesIterator& rhs) -{ - if (&rhs != this) - { - sTextLinesIterator->Release(fTextLinesIterator); - fTextLinesIterator = rhs.fTextLinesIterator; - sTextLinesIterator->AddRef(fTextLinesIterator); - } - return *this; -} - -bool ITextLinesIterator::operator==(const ITextLinesIterator& rhs) const -{ - return fTextLinesIterator == rhs.fTextLinesIterator; -} - -bool ITextLinesIterator::operator!=(const ITextLinesIterator& rhs) const -{ - return !(*this == rhs); -} - -TextLinesIteratorRef ITextLinesIterator::GetRef() const -{ - return fTextLinesIterator; -} - -bool ITextLinesIterator::IsNull() const -{ - return sTextLinesIterator->IsNull(fTextLinesIterator); -} - -bool ITextLinesIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTextLinesIterator->IsNotDone(fTextLinesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextLinesIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTextLinesIterator->IsDone(fTextLinesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextLinesIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sTextLinesIterator->IsEmpty(fTextLinesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextLinesIterator::Next( ) -{ - ATEErr error = sTextLinesIterator->Next(fTextLinesIterator); - if(error) Throw_ATE_Exception(error); -} - -void ITextLinesIterator::Previous( ) -{ - ATEErr error = sTextLinesIterator->Previous(fTextLinesIterator); - if(error) Throw_ATE_Exception(error); -} - -ITextLine ITextLinesIterator::Item( ) const -{ - TextLineRef ret = 0; - ATEErr error = sTextLinesIterator->Item(fTextLinesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ITextLine(ret); -} - -////////////////////////////////////////////// -// --ITextResources-- -////////////////////////////////////////////// - -ITextResources::ITextResources() -:fTextResources(0) -{ -} - -ITextResources::ITextResources(TextResourcesRef textresources) -:fTextResources(textresources) -{ -} - -ITextResources::ITextResources(const ITextResources& src) -:fTextResources(src.fTextResources) -{ - sTextResources->AddRef(fTextResources); -} - -ITextResources::~ITextResources() -{ - sTextResources->Release(fTextResources); -} - -ITextResources& ITextResources::operator=(const ITextResources& rhs) -{ - if (&rhs != this) - { - sTextResources->Release(fTextResources); - fTextResources = rhs.fTextResources; - sTextResources->AddRef(fTextResources); - } - return *this; -} - -bool ITextResources::operator==(const ITextResources& rhs) const -{ - return fTextResources == rhs.fTextResources; -} - -bool ITextResources::operator!=(const ITextResources& rhs) const -{ - return !(*this == rhs); -} - -TextResourcesRef ITextResources::GetRef() const -{ - return fTextResources; -} - -bool ITextResources::IsNull() const -{ - return sTextResources->IsNull(fTextResources); -} - -ITextResources ITextResources::GetTextResources( ) -{ - TextResourcesRef ret = 0; - ATEErr error = sTextResources->GetTextResources(fTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ITextResources(ret); -} - -////////////////////////////////////////////// -// --IApplicationTextResources-- -////////////////////////////////////////////// - -IApplicationTextResources::IApplicationTextResources() -:fApplicationTextResources(0) -{ -} - -IApplicationTextResources::IApplicationTextResources(ApplicationTextResourcesRef applicationtextresources) -:fApplicationTextResources(applicationtextresources) -{ -} - -IApplicationTextResources::IApplicationTextResources(const IApplicationTextResources& src) -:fApplicationTextResources(src.fApplicationTextResources) -{ - sApplicationTextResources->AddRef(fApplicationTextResources); -} - -IApplicationTextResources::~IApplicationTextResources() -{ - sApplicationTextResources->Release(fApplicationTextResources); -} - -IApplicationTextResources& IApplicationTextResources::operator=(const IApplicationTextResources& rhs) -{ - if (&rhs != this) - { - sApplicationTextResources->Release(fApplicationTextResources); - fApplicationTextResources = rhs.fApplicationTextResources; - sApplicationTextResources->AddRef(fApplicationTextResources); - } - return *this; -} - -bool IApplicationTextResources::operator==(const IApplicationTextResources& rhs) const -{ - return fApplicationTextResources == rhs.fApplicationTextResources; -} - -bool IApplicationTextResources::operator!=(const IApplicationTextResources& rhs) const -{ - return !(*this == rhs); -} - -ApplicationTextResourcesRef IApplicationTextResources::GetRef() const -{ - return fApplicationTextResources; -} - -bool IApplicationTextResources::IsNull() const -{ - return sApplicationTextResources->IsNull(fApplicationTextResources); -} - -ITextResources IApplicationTextResources::GetTextResources( ) -{ - TextResourcesRef ret = 0; - ATEErr error = sApplicationTextResources->GetTextResources(fApplicationTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ITextResources(ret); -} - -IKinsokuSet IApplicationTextResources::GetKinsokuSet( ) const -{ - KinsokuSetRef ret = 0; - ATEErr error = sApplicationTextResources->GetKinsokuSet(fApplicationTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsokuSet(ret); -} - -IMojiKumiSet IApplicationTextResources::GetMojiKumiSet( ) const -{ - MojiKumiSetRef ret = 0; - ATEErr error = sApplicationTextResources->GetMojiKumiSet(fApplicationTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumiSet(ret); -} - -ICompFontClassSet IApplicationTextResources::GetCompFontClassSet( ) const -{ - CompFontClassSetRef ret = 0; - ATEErr error = sApplicationTextResources->GetCompFontClassSet(fApplicationTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontClassSet(ret); -} - -ICompFontSet IApplicationTextResources::GetCompFontSet( ) const -{ - CompFontSetRef ret = 0; - ATEErr error = sApplicationTextResources->GetCompFontSet(fApplicationTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontSet(ret); -} - -////////////////////////////////////////////// -// --IDocumentTextResources-- -////////////////////////////////////////////// - -IDocumentTextResources::IDocumentTextResources() -:fDocumentTextResources(0) -{ -} - -IDocumentTextResources::IDocumentTextResources(DocumentTextResourcesRef documenttextresources) -:fDocumentTextResources(documenttextresources) -{ -} - -IDocumentTextResources::IDocumentTextResources(const IDocumentTextResources& src) -:fDocumentTextResources(src.fDocumentTextResources) -{ - sDocumentTextResources->AddRef(fDocumentTextResources); -} - -IDocumentTextResources::~IDocumentTextResources() -{ - sDocumentTextResources->Release(fDocumentTextResources); -} - -IDocumentTextResources& IDocumentTextResources::operator=(const IDocumentTextResources& rhs) -{ - if (&rhs != this) - { - sDocumentTextResources->Release(fDocumentTextResources); - fDocumentTextResources = rhs.fDocumentTextResources; - sDocumentTextResources->AddRef(fDocumentTextResources); - } - return *this; -} - -bool IDocumentTextResources::operator==(const IDocumentTextResources& rhs) const -{ - return fDocumentTextResources == rhs.fDocumentTextResources; -} - -bool IDocumentTextResources::operator!=(const IDocumentTextResources& rhs) const -{ - return !(*this == rhs); -} - -DocumentTextResourcesRef IDocumentTextResources::GetRef() const -{ - return fDocumentTextResources; -} - -bool IDocumentTextResources::IsNull() const -{ - return sDocumentTextResources->IsNull(fDocumentTextResources); -} - -IKinsokuSet IDocumentTextResources::GetKinsokuSet( ) const -{ - KinsokuSetRef ret = 0; - ATEErr error = sDocumentTextResources->GetKinsokuSet(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsokuSet(ret); -} - -IMojiKumiSet IDocumentTextResources::GetMojiKumiSet( ) const -{ - MojiKumiSetRef ret = 0; - ATEErr error = sDocumentTextResources->GetMojiKumiSet(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumiSet(ret); -} - -ICompFontClassSet IDocumentTextResources::GetCompFontClassSet( ) const -{ - CompFontClassSetRef ret = 0; - ATEErr error = sDocumentTextResources->GetCompFontClassSet(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontClassSet(ret); -} - -ICompFontSet IDocumentTextResources::GetCompFontSet( ) const -{ - CompFontSetRef ret = 0; - ATEErr error = sDocumentTextResources->GetCompFontSet(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ICompFontSet(ret); -} - -ITextResources IDocumentTextResources::GetTextResources( ) -{ - TextResourcesRef ret = 0; - ATEErr error = sDocumentTextResources->GetTextResources(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ITextResources(ret); -} - -IFind IDocumentTextResources::GetFind( ) -{ - FindRef ret = 0; - ATEErr error = sDocumentTextResources->GetFind(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IFind(ret); -} - -ISpell IDocumentTextResources::GetSpell( ) -{ - SpellRef ret = 0; - ATEErr error = sDocumentTextResources->GetSpell(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ISpell(ret); -} - -IGlyph IDocumentTextResources::GetGlyphAndAlternates( ) const -{ - GlyphRef ret = 0; - ATEErr error = sDocumentTextResources->GetGlyphAndAlternates(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -IGlyph IDocumentTextResources::GetAlternateGlyph( ) const -{ - GlyphRef ret = 0; - ATEErr error = sDocumentTextResources->GetAlternateGlyph(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -void IDocumentTextResources::InsertAlternateGlyph( const ATETextDOM::Unicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ATETextDOM::Int32 otFeatureCount, const ATETextDOM::Int32* otFeatureIndexArray, bool leaveSelected) -{ - ATEErr error = sDocumentTextResources->InsertAlternateGlyph(fDocumentTextResources, theCharacters, glyphID, otFeatureArray, otFeatureCount, otFeatureIndexArray, leaveSelected); - if(error) Throw_ATE_Exception(error); -} - -IArrayInteger IDocumentTextResources::GetAlternatesAvailableThroughoutSelection( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sDocumentTextResources->GetAlternatesAvailableThroughoutSelection(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -JapaneseAlternateFeature IDocumentTextResources::GetJapaneseAlternateFeatureInSelection( bool* isFeature) const -{ - JapaneseAlternateFeature ret; - ATEBool8 isFeatureRet; - ATEErr error = sDocumentTextResources->GetJapaneseAlternateFeatureInSelection(fDocumentTextResources, &isFeatureRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isFeature) *isFeature = isFeatureRet; - return ret; -} - -void IDocumentTextResources::SetJapaneseAlternateFeatureInSelection( JapaneseAlternateFeature feature) -{ - ATEErr error = sDocumentTextResources->SetJapaneseAlternateFeatureInSelection(fDocumentTextResources, feature); - if(error) Throw_ATE_Exception(error); -} - -ICharStyles IDocumentTextResources::GetCharStylesInDocument( ) const -{ - CharStylesRef ret = 0; - ATEErr error = sDocumentTextResources->GetCharStylesInDocument(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyles(ret); -} - -IParaStyles IDocumentTextResources::GetParaStylesInDocument( ) const -{ - ParaStylesRef ret = 0; - ATEErr error = sDocumentTextResources->GetParaStylesInDocument(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IParaStyles(ret); -} - -ICharStyle IDocumentTextResources::GetCharStyle( const ATETextDOM::Unicode* pName) const -{ - CharStyleRef ret = 0; - ATEErr error = sDocumentTextResources->GetCharStyle(fDocumentTextResources, pName, &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyle(ret); -} - -IParaStyle IDocumentTextResources::GetParaStyle( const ATETextDOM::Unicode* pName) const -{ - ParaStyleRef ret = 0; - ATEErr error = sDocumentTextResources->GetParaStyle(fDocumentTextResources, pName, &ret); - if(error) Throw_ATE_Exception(error); - return IParaStyle(ret); -} - -ICharStyle IDocumentTextResources::GetNormalCharStyle( ) const -{ - CharStyleRef ret = 0; - ATEErr error = sDocumentTextResources->GetNormalCharStyle(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyle(ret); -} - -IParaStyle IDocumentTextResources::GetNormalParaStyle( ) const -{ - ParaStyleRef ret = 0; - ATEErr error = sDocumentTextResources->GetNormalParaStyle(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return IParaStyle(ret); -} - -void IDocumentTextResources::ResetNormalCharStyle( ) -{ - ATEErr error = sDocumentTextResources->ResetNormalCharStyle(fDocumentTextResources); - if(error) Throw_ATE_Exception(error); -} - -void IDocumentTextResources::ResetNormalParaStyle( ) -{ - ATEErr error = sDocumentTextResources->ResetNormalParaStyle(fDocumentTextResources); - if(error) Throw_ATE_Exception(error); -} - -ICharStyle IDocumentTextResources::CreateCharStyle( const ATETextDOM::Unicode* pName) -{ - CharStyleRef ret = 0; - ATEErr error = sDocumentTextResources->CreateCharStyle(fDocumentTextResources, pName, &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyle(ret); -} - -IParaStyle IDocumentTextResources::CreateParaStyle( const ATETextDOM::Unicode* pName) -{ - ParaStyleRef ret = 0; - ATEErr error = sDocumentTextResources->CreateParaStyle(fDocumentTextResources, pName, &ret); - if(error) Throw_ATE_Exception(error); - return IParaStyle(ret); -} - -ICharStyle IDocumentTextResources::CreateCharStyleWithFeatures( const ATETextDOM::Unicode* pName, ICharFeatures pFeatures) -{ - CharStyleRef ret = 0; - ATEErr error = sDocumentTextResources->CreateCharStyleWithFeatures(fDocumentTextResources, pName, pFeatures.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyle(ret); -} - -IParaStyle IDocumentTextResources::CreateParaStyleWithFeatures( const ATETextDOM::Unicode* pName, IParaFeatures pFeatures) -{ - ParaStyleRef ret = 0; - ATEErr error = sDocumentTextResources->CreateParaStyleWithFeatures(fDocumentTextResources, pName, pFeatures.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return IParaStyle(ret); -} - -bool IDocumentTextResources::RemoveCharStyle( const ATETextDOM::Unicode* pName) -{ - ATEBool8 ret; - ATEErr error = sDocumentTextResources->RemoveCharStyle(fDocumentTextResources, pName, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IDocumentTextResources::RemoveParaStyle( const ATETextDOM::Unicode* pName) -{ - ATEBool8 ret; - ATEErr error = sDocumentTextResources->RemoveParaStyle(fDocumentTextResources, pName, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::ImportCharStyles( ITextResources pSrcResources) -{ - ATEErr error = sDocumentTextResources->ImportCharStyles(fDocumentTextResources, pSrcResources.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IDocumentTextResources::ImportParaStyles( ITextResources pSrcResources) -{ - ATEErr error = sDocumentTextResources->ImportParaStyles(fDocumentTextResources, pSrcResources.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IDocumentTextResources::SetUseSmartQuotes( bool smartQuotesAreOn) -{ - ATEErr error = sDocumentTextResources->SetUseSmartQuotes(fDocumentTextResources, smartQuotesAreOn); - if(error) Throw_ATE_Exception(error); -} - -void IDocumentTextResources::SetSmartDoubleQuoteCharacters( ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language) -{ - ATEErr error = sDocumentTextResources->SetSmartDoubleQuoteCharacters(fDocumentTextResources, openQuote, closeQuote, language); - if(error) Throw_ATE_Exception(error); -} - -void IDocumentTextResources::SetSmartSingleQuoteCharacters( ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language) -{ - ATEErr error = sDocumentTextResources->SetSmartSingleQuoteCharacters(fDocumentTextResources, openQuote, closeQuote, language); - if(error) Throw_ATE_Exception(error); -} - -bool IDocumentTextResources::UseSmartQuotes( ) -{ - ATEBool8 ret; - ATEErr error = sDocumentTextResources->UseSmartQuotes(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::GetSmartDoubleQuoteCharacters( ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language) -{ - ATEErr error = sDocumentTextResources->GetSmartDoubleQuoteCharacters(fDocumentTextResources, openQuote, closeQuote, language); - if(error) Throw_ATE_Exception(error); -} - -void IDocumentTextResources::GetSmartSingleQuoteCharacters( ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language) -{ - ATEErr error = sDocumentTextResources->GetSmartSingleQuoteCharacters(fDocumentTextResources, openQuote, closeQuote, language); - if(error) Throw_ATE_Exception(error); -} - -ICharFeatures IDocumentTextResources::GetInsertionCharFeatures( ) const -{ - CharFeaturesRef ret = 0; - ATEErr error = sDocumentTextResources->GetInsertionCharFeatures(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ICharFeatures(ret); -} - -ICharStyle IDocumentTextResources::GetInsertionCharStyle( ) const -{ - CharStyleRef ret = 0; - ATEErr error = sDocumentTextResources->GetInsertionCharStyle(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyle(ret); -} - -void IDocumentTextResources::SetInsertionFeaturesAndStyle( const ICharFeatures& pFeatures, const ATETextDOM::Unicode* pStyleName) -{ - ATEErr error = sDocumentTextResources->SetInsertionFeaturesAndStyle(fDocumentTextResources, pFeatures.GetRef(), pStyleName); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real IDocumentTextResources::GetSuperscriptSize( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sDocumentTextResources->GetSuperscriptSize(fDocumentTextResources, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetSuperscriptSize( ATETextDOM::Real value) -{ - ATEErr error = sDocumentTextResources->SetSuperscriptSize(fDocumentTextResources, static_cast(value)); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real IDocumentTextResources::GetSuperscriptPosition( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sDocumentTextResources->GetSuperscriptPosition(fDocumentTextResources, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetSuperscriptPosition( ATETextDOM::Real value) -{ - ATEErr error = sDocumentTextResources->SetSuperscriptPosition(fDocumentTextResources, static_cast(value)); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real IDocumentTextResources::GetSubscriptSize( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sDocumentTextResources->GetSubscriptSize(fDocumentTextResources, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetSubscriptSize( ATETextDOM::Real value) -{ - ATEErr error = sDocumentTextResources->SetSubscriptSize(fDocumentTextResources, static_cast(value)); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real IDocumentTextResources::GetSubscriptPosition( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sDocumentTextResources->GetSubscriptPosition(fDocumentTextResources, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetSubscriptPosition( ATETextDOM::Real value) -{ - ATEErr error = sDocumentTextResources->SetSubscriptPosition(fDocumentTextResources, static_cast(value)); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real IDocumentTextResources::GetSmallCapSize( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sDocumentTextResources->GetSmallCapSize(fDocumentTextResources, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetSmallCapSize( ATETextDOM::Real value) -{ - ATEErr error = sDocumentTextResources->SetSmallCapSize(fDocumentTextResources, static_cast(value)); - if(error) Throw_ATE_Exception(error); -} - -bool IDocumentTextResources::GetShowHiddenCharacters( ) const -{ - ATEBool8 ret; - ATEErr error = sDocumentTextResources->GetShowHiddenCharacters(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetShowHiddenCharacters( bool value) -{ - ATEErr error = sDocumentTextResources->SetShowHiddenCharacters(fDocumentTextResources, value); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 IDocumentTextResources::GetGreekingSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sDocumentTextResources->GetGreekingSize(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetGreekingSize( ATETextDOM::Int32 value) -{ - ATEErr error = sDocumentTextResources->SetGreekingSize(fDocumentTextResources, value); - if(error) Throw_ATE_Exception(error); -} - -bool IDocumentTextResources::GetHighlightSubstituteFonts( ) const -{ - ATEBool8 ret; - ATEErr error = sDocumentTextResources->GetHighlightSubstituteFonts(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetHighlightSubstituteFonts( bool value) -{ - ATEErr error = sDocumentTextResources->SetHighlightSubstituteFonts(fDocumentTextResources, value); - if(error) Throw_ATE_Exception(error); -} - -bool IDocumentTextResources::GetHighlightAlternateGlyphs( ) const -{ - ATEBool8 ret; - ATEErr error = sDocumentTextResources->GetHighlightAlternateGlyphs(fDocumentTextResources, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IDocumentTextResources::SetHighlightAlternateGlyphs( bool value) -{ - ATEErr error = sDocumentTextResources->SetHighlightAlternateGlyphs(fDocumentTextResources, value); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IVersionInfo-- -////////////////////////////////////////////// - -IVersionInfo::IVersionInfo() -:fVersionInfo(0) -{ - ATEErr error = sVersionInfo->Initialize(&fVersionInfo); - if(error) Throw_ATE_Exception(error); -} - -IVersionInfo::IVersionInfo(VersionInfoRef versioninfo) -:fVersionInfo(versioninfo) -{ -} - -IVersionInfo::IVersionInfo(const IVersionInfo& src) -:fVersionInfo(src.fVersionInfo) -{ - sVersionInfo->AddRef(fVersionInfo); -} - -IVersionInfo::~IVersionInfo() -{ - sVersionInfo->Release(fVersionInfo); -} - -IVersionInfo& IVersionInfo::operator=(const IVersionInfo& rhs) -{ - if (&rhs != this) - { - sVersionInfo->Release(fVersionInfo); - fVersionInfo = rhs.fVersionInfo; - sVersionInfo->AddRef(fVersionInfo); - } - return *this; -} - -bool IVersionInfo::operator==(const IVersionInfo& rhs) const -{ - return fVersionInfo == rhs.fVersionInfo; -} - -bool IVersionInfo::operator!=(const IVersionInfo& rhs) const -{ - return !(*this == rhs); -} - -VersionInfoRef IVersionInfo::GetRef() const -{ - return fVersionInfo; -} - -bool IVersionInfo::IsNull() const -{ - return sVersionInfo->IsNull(fVersionInfo); -} - -int IVersionInfo::GetMajorVersion( ) -{ - int ret; - ATEErr error = sVersionInfo->GetMajorVersion(fVersionInfo, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -int IVersionInfo::GetMinorVersion( ) -{ - int ret; - ATEErr error = sVersionInfo->GetMinorVersion(fVersionInfo, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -int IVersionInfo::GetSubMinorVersion( ) -{ - int ret; - ATEErr error = sVersionInfo->GetSubMinorVersion(fVersionInfo, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -int IVersionInfo::GetVersionAsUTF16( ASUTF16* versionString, int maxLength) -{ - int ret; - ATEErr error = sVersionInfo->GetVersionAsUTF16(fVersionInfo, versionString, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayApplicationPaintRef-- -////////////////////////////////////////////// - -IArrayApplicationPaintRef::IArrayApplicationPaintRef() -:fArrayApplicationPaintRef(0) -{ -} - -IArrayApplicationPaintRef::IArrayApplicationPaintRef(ArrayApplicationPaintRefRef arrayapplicationpaintref) -:fArrayApplicationPaintRef(arrayapplicationpaintref) -{ -} - -IArrayApplicationPaintRef::IArrayApplicationPaintRef(const IArrayApplicationPaintRef& src) -:fArrayApplicationPaintRef(src.fArrayApplicationPaintRef) -{ - sArrayApplicationPaintRef->AddRef(fArrayApplicationPaintRef); -} - -IArrayApplicationPaintRef::~IArrayApplicationPaintRef() -{ - sArrayApplicationPaintRef->Release(fArrayApplicationPaintRef); -} - -IArrayApplicationPaintRef& IArrayApplicationPaintRef::operator=(const IArrayApplicationPaintRef& rhs) -{ - if (&rhs != this) - { - sArrayApplicationPaintRef->Release(fArrayApplicationPaintRef); - fArrayApplicationPaintRef = rhs.fArrayApplicationPaintRef; - sArrayApplicationPaintRef->AddRef(fArrayApplicationPaintRef); - } - return *this; -} - -bool IArrayApplicationPaintRef::operator==(const IArrayApplicationPaintRef& rhs) const -{ - return fArrayApplicationPaintRef == rhs.fArrayApplicationPaintRef; -} - -bool IArrayApplicationPaintRef::operator!=(const IArrayApplicationPaintRef& rhs) const -{ - return !(*this == rhs); -} - -ArrayApplicationPaintRefRef IArrayApplicationPaintRef::GetRef() const -{ - return fArrayApplicationPaintRef; -} - -bool IArrayApplicationPaintRef::IsNull() const -{ - return sArrayApplicationPaintRef->IsNull(fArrayApplicationPaintRef); -} - -ATETextDOM::Int32 IArrayApplicationPaintRef::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayApplicationPaintRef->GetSize(fArrayApplicationPaintRef, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IApplicationPaint IArrayApplicationPaintRef::GetFirst( ) const -{ - ApplicationPaintRef ret = 0; - ATEErr error = sArrayApplicationPaintRef->GetFirst(fArrayApplicationPaintRef, &ret); - if(error) Throw_ATE_Exception(error); - return IApplicationPaint(ret); -} - -IApplicationPaint IArrayApplicationPaintRef::GetLast( ) const -{ - ApplicationPaintRef ret = 0; - ATEErr error = sArrayApplicationPaintRef->GetLast(fArrayApplicationPaintRef, &ret); - if(error) Throw_ATE_Exception(error); - return IApplicationPaint(ret); -} - -IApplicationPaint IArrayApplicationPaintRef::Item( ATETextDOM::Int32 index) const -{ - ApplicationPaintRef ret = 0; - ATEErr error = sArrayApplicationPaintRef->Item(fArrayApplicationPaintRef, index, &ret); - if(error) Throw_ATE_Exception(error); - return IApplicationPaint(ret); -} - -////////////////////////////////////////////// -// --IArrayReal-- -////////////////////////////////////////////// - -IArrayReal::IArrayReal() -:fArrayReal(0) -{ -} - -IArrayReal::IArrayReal(ArrayRealRef arrayreal) -:fArrayReal(arrayreal) -{ -} - -IArrayReal::IArrayReal(const IArrayReal& src) -:fArrayReal(src.fArrayReal) -{ - sArrayReal->AddRef(fArrayReal); -} - -IArrayReal::~IArrayReal() -{ - sArrayReal->Release(fArrayReal); -} - -IArrayReal& IArrayReal::operator=(const IArrayReal& rhs) -{ - if (&rhs != this) - { - sArrayReal->Release(fArrayReal); - fArrayReal = rhs.fArrayReal; - sArrayReal->AddRef(fArrayReal); - } - return *this; -} - -bool IArrayReal::operator==(const IArrayReal& rhs) const -{ - return fArrayReal == rhs.fArrayReal; -} - -bool IArrayReal::operator!=(const IArrayReal& rhs) const -{ - return !(*this == rhs); -} - -ArrayRealRef IArrayReal::GetRef() const -{ - return fArrayReal; -} - -bool IArrayReal::IsNull() const -{ - return sArrayReal->IsNull(fArrayReal); -} - -ATETextDOM::Int32 IArrayReal::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayReal->GetSize(fArrayReal, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IArrayReal::GetFirst( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sArrayReal->GetFirst(fArrayReal, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IArrayReal::GetLast( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sArrayReal->GetLast(fArrayReal, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Real IArrayReal::Item( ATETextDOM::Int32 index) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sArrayReal->Item(fArrayReal, index, &tempRet); - ret = tempRet; - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayBool-- -////////////////////////////////////////////// - -IArrayBool::IArrayBool() -:fArrayBool(0) -{ -} - -IArrayBool::IArrayBool(ArrayBoolRef arraybool) -:fArrayBool(arraybool) -{ -} - -IArrayBool::IArrayBool(const IArrayBool& src) -:fArrayBool(src.fArrayBool) -{ - sArrayBool->AddRef(fArrayBool); -} - -IArrayBool::~IArrayBool() -{ - sArrayBool->Release(fArrayBool); -} - -IArrayBool& IArrayBool::operator=(const IArrayBool& rhs) -{ - if (&rhs != this) - { - sArrayBool->Release(fArrayBool); - fArrayBool = rhs.fArrayBool; - sArrayBool->AddRef(fArrayBool); - } - return *this; -} - -bool IArrayBool::operator==(const IArrayBool& rhs) const -{ - return fArrayBool == rhs.fArrayBool; -} - -bool IArrayBool::operator!=(const IArrayBool& rhs) const -{ - return !(*this == rhs); -} - -ArrayBoolRef IArrayBool::GetRef() const -{ - return fArrayBool; -} - -bool IArrayBool::IsNull() const -{ - return sArrayBool->IsNull(fArrayBool); -} - -ATETextDOM::Int32 IArrayBool::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayBool->GetSize(fArrayBool, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IArrayBool::GetFirst( ) const -{ - ATEBool8 ret; - ATEErr error = sArrayBool->GetFirst(fArrayBool, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IArrayBool::GetLast( ) const -{ - ATEBool8 ret; - ATEErr error = sArrayBool->GetLast(fArrayBool, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IArrayBool::Item( ATETextDOM::Int32 index) const -{ - ATEBool8 ret; - ATEErr error = sArrayBool->Item(fArrayBool, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayInteger-- -////////////////////////////////////////////// - -IArrayInteger::IArrayInteger() -:fArrayInteger(0) -{ -} - -IArrayInteger::IArrayInteger(ArrayIntegerRef arrayinteger) -:fArrayInteger(arrayinteger) -{ -} - -IArrayInteger::IArrayInteger(const IArrayInteger& src) -:fArrayInteger(src.fArrayInteger) -{ - sArrayInteger->AddRef(fArrayInteger); -} - -IArrayInteger::~IArrayInteger() -{ - sArrayInteger->Release(fArrayInteger); -} - -IArrayInteger& IArrayInteger::operator=(const IArrayInteger& rhs) -{ - if (&rhs != this) - { - sArrayInteger->Release(fArrayInteger); - fArrayInteger = rhs.fArrayInteger; - sArrayInteger->AddRef(fArrayInteger); - } - return *this; -} - -bool IArrayInteger::operator==(const IArrayInteger& rhs) const -{ - return fArrayInteger == rhs.fArrayInteger; -} - -bool IArrayInteger::operator!=(const IArrayInteger& rhs) const -{ - return !(*this == rhs); -} - -ArrayIntegerRef IArrayInteger::GetRef() const -{ - return fArrayInteger; -} - -bool IArrayInteger::IsNull() const -{ - return sArrayInteger->IsNull(fArrayInteger); -} - -ATETextDOM::Int32 IArrayInteger::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayInteger->GetSize(fArrayInteger, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IArrayInteger::GetFirst( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayInteger->GetFirst(fArrayInteger, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IArrayInteger::GetLast( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayInteger->GetLast(fArrayInteger, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IArrayInteger::Item( ATETextDOM::Int32 index) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayInteger->Item(fArrayInteger, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayLineCapType-- -////////////////////////////////////////////// - -IArrayLineCapType::IArrayLineCapType() -:fArrayLineCapType(0) -{ -} - -IArrayLineCapType::IArrayLineCapType(ArrayLineCapTypeRef arraylinecaptype) -:fArrayLineCapType(arraylinecaptype) -{ -} - -IArrayLineCapType::IArrayLineCapType(const IArrayLineCapType& src) -:fArrayLineCapType(src.fArrayLineCapType) -{ - sArrayLineCapType->AddRef(fArrayLineCapType); -} - -IArrayLineCapType::~IArrayLineCapType() -{ - sArrayLineCapType->Release(fArrayLineCapType); -} - -IArrayLineCapType& IArrayLineCapType::operator=(const IArrayLineCapType& rhs) -{ - if (&rhs != this) - { - sArrayLineCapType->Release(fArrayLineCapType); - fArrayLineCapType = rhs.fArrayLineCapType; - sArrayLineCapType->AddRef(fArrayLineCapType); - } - return *this; -} - -bool IArrayLineCapType::operator==(const IArrayLineCapType& rhs) const -{ - return fArrayLineCapType == rhs.fArrayLineCapType; -} - -bool IArrayLineCapType::operator!=(const IArrayLineCapType& rhs) const -{ - return !(*this == rhs); -} - -ArrayLineCapTypeRef IArrayLineCapType::GetRef() const -{ - return fArrayLineCapType; -} - -bool IArrayLineCapType::IsNull() const -{ - return sArrayLineCapType->IsNull(fArrayLineCapType); -} - -ATETextDOM::Int32 IArrayLineCapType::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayLineCapType->GetSize(fArrayLineCapType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LineCapType IArrayLineCapType::GetFirst( ) const -{ - LineCapType ret; - ATEErr error = sArrayLineCapType->GetFirst(fArrayLineCapType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LineCapType IArrayLineCapType::GetLast( ) const -{ - LineCapType ret; - ATEErr error = sArrayLineCapType->GetLast(fArrayLineCapType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LineCapType IArrayLineCapType::Item( ATETextDOM::Int32 index) const -{ - LineCapType ret; - ATEErr error = sArrayLineCapType->Item(fArrayLineCapType, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayFigureStyle-- -////////////////////////////////////////////// - -IArrayFigureStyle::IArrayFigureStyle() -:fArrayFigureStyle(0) -{ -} - -IArrayFigureStyle::IArrayFigureStyle(ArrayFigureStyleRef arrayfigurestyle) -:fArrayFigureStyle(arrayfigurestyle) -{ -} - -IArrayFigureStyle::IArrayFigureStyle(const IArrayFigureStyle& src) -:fArrayFigureStyle(src.fArrayFigureStyle) -{ - sArrayFigureStyle->AddRef(fArrayFigureStyle); -} - -IArrayFigureStyle::~IArrayFigureStyle() -{ - sArrayFigureStyle->Release(fArrayFigureStyle); -} - -IArrayFigureStyle& IArrayFigureStyle::operator=(const IArrayFigureStyle& rhs) -{ - if (&rhs != this) - { - sArrayFigureStyle->Release(fArrayFigureStyle); - fArrayFigureStyle = rhs.fArrayFigureStyle; - sArrayFigureStyle->AddRef(fArrayFigureStyle); - } - return *this; -} - -bool IArrayFigureStyle::operator==(const IArrayFigureStyle& rhs) const -{ - return fArrayFigureStyle == rhs.fArrayFigureStyle; -} - -bool IArrayFigureStyle::operator!=(const IArrayFigureStyle& rhs) const -{ - return !(*this == rhs); -} - -ArrayFigureStyleRef IArrayFigureStyle::GetRef() const -{ - return fArrayFigureStyle; -} - -bool IArrayFigureStyle::IsNull() const -{ - return sArrayFigureStyle->IsNull(fArrayFigureStyle); -} - -ATETextDOM::Int32 IArrayFigureStyle::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayFigureStyle->GetSize(fArrayFigureStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FigureStyle IArrayFigureStyle::GetFirst( ) const -{ - FigureStyle ret; - ATEErr error = sArrayFigureStyle->GetFirst(fArrayFigureStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FigureStyle IArrayFigureStyle::GetLast( ) const -{ - FigureStyle ret; - ATEErr error = sArrayFigureStyle->GetLast(fArrayFigureStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FigureStyle IArrayFigureStyle::Item( ATETextDOM::Int32 index) const -{ - FigureStyle ret; - ATEErr error = sArrayFigureStyle->Item(fArrayFigureStyle, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayLineJoinType-- -////////////////////////////////////////////// - -IArrayLineJoinType::IArrayLineJoinType() -:fArrayLineJoinType(0) -{ -} - -IArrayLineJoinType::IArrayLineJoinType(ArrayLineJoinTypeRef arraylinejointype) -:fArrayLineJoinType(arraylinejointype) -{ -} - -IArrayLineJoinType::IArrayLineJoinType(const IArrayLineJoinType& src) -:fArrayLineJoinType(src.fArrayLineJoinType) -{ - sArrayLineJoinType->AddRef(fArrayLineJoinType); -} - -IArrayLineJoinType::~IArrayLineJoinType() -{ - sArrayLineJoinType->Release(fArrayLineJoinType); -} - -IArrayLineJoinType& IArrayLineJoinType::operator=(const IArrayLineJoinType& rhs) -{ - if (&rhs != this) - { - sArrayLineJoinType->Release(fArrayLineJoinType); - fArrayLineJoinType = rhs.fArrayLineJoinType; - sArrayLineJoinType->AddRef(fArrayLineJoinType); - } - return *this; -} - -bool IArrayLineJoinType::operator==(const IArrayLineJoinType& rhs) const -{ - return fArrayLineJoinType == rhs.fArrayLineJoinType; -} - -bool IArrayLineJoinType::operator!=(const IArrayLineJoinType& rhs) const -{ - return !(*this == rhs); -} - -ArrayLineJoinTypeRef IArrayLineJoinType::GetRef() const -{ - return fArrayLineJoinType; -} - -bool IArrayLineJoinType::IsNull() const -{ - return sArrayLineJoinType->IsNull(fArrayLineJoinType); -} - -ATETextDOM::Int32 IArrayLineJoinType::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayLineJoinType->GetSize(fArrayLineJoinType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LineJoinType IArrayLineJoinType::GetFirst( ) const -{ - LineJoinType ret; - ATEErr error = sArrayLineJoinType->GetFirst(fArrayLineJoinType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LineJoinType IArrayLineJoinType::GetLast( ) const -{ - LineJoinType ret; - ATEErr error = sArrayLineJoinType->GetLast(fArrayLineJoinType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LineJoinType IArrayLineJoinType::Item( ATETextDOM::Int32 index) const -{ - LineJoinType ret; - ATEErr error = sArrayLineJoinType->Item(fArrayLineJoinType, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayWariChuJustification-- -////////////////////////////////////////////// - -IArrayWariChuJustification::IArrayWariChuJustification() -:fArrayWariChuJustification(0) -{ -} - -IArrayWariChuJustification::IArrayWariChuJustification(ArrayWariChuJustificationRef arraywarichujustification) -:fArrayWariChuJustification(arraywarichujustification) -{ -} - -IArrayWariChuJustification::IArrayWariChuJustification(const IArrayWariChuJustification& src) -:fArrayWariChuJustification(src.fArrayWariChuJustification) -{ - sArrayWariChuJustification->AddRef(fArrayWariChuJustification); -} - -IArrayWariChuJustification::~IArrayWariChuJustification() -{ - sArrayWariChuJustification->Release(fArrayWariChuJustification); -} - -IArrayWariChuJustification& IArrayWariChuJustification::operator=(const IArrayWariChuJustification& rhs) -{ - if (&rhs != this) - { - sArrayWariChuJustification->Release(fArrayWariChuJustification); - fArrayWariChuJustification = rhs.fArrayWariChuJustification; - sArrayWariChuJustification->AddRef(fArrayWariChuJustification); - } - return *this; -} - -bool IArrayWariChuJustification::operator==(const IArrayWariChuJustification& rhs) const -{ - return fArrayWariChuJustification == rhs.fArrayWariChuJustification; -} - -bool IArrayWariChuJustification::operator!=(const IArrayWariChuJustification& rhs) const -{ - return !(*this == rhs); -} - -ArrayWariChuJustificationRef IArrayWariChuJustification::GetRef() const -{ - return fArrayWariChuJustification; -} - -bool IArrayWariChuJustification::IsNull() const -{ - return sArrayWariChuJustification->IsNull(fArrayWariChuJustification); -} - -ATETextDOM::Int32 IArrayWariChuJustification::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayWariChuJustification->GetSize(fArrayWariChuJustification, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -WariChuJustification IArrayWariChuJustification::GetFirst( ) const -{ - WariChuJustification ret; - ATEErr error = sArrayWariChuJustification->GetFirst(fArrayWariChuJustification, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -WariChuJustification IArrayWariChuJustification::GetLast( ) const -{ - WariChuJustification ret; - ATEErr error = sArrayWariChuJustification->GetLast(fArrayWariChuJustification, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -WariChuJustification IArrayWariChuJustification::Item( ATETextDOM::Int32 index) const -{ - WariChuJustification ret; - ATEErr error = sArrayWariChuJustification->Item(fArrayWariChuJustification, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayStyleRunAlignment-- -////////////////////////////////////////////// - -IArrayStyleRunAlignment::IArrayStyleRunAlignment() -:fArrayStyleRunAlignment(0) -{ -} - -IArrayStyleRunAlignment::IArrayStyleRunAlignment(ArrayStyleRunAlignmentRef arraystylerunalignment) -:fArrayStyleRunAlignment(arraystylerunalignment) -{ -} - -IArrayStyleRunAlignment::IArrayStyleRunAlignment(const IArrayStyleRunAlignment& src) -:fArrayStyleRunAlignment(src.fArrayStyleRunAlignment) -{ - sArrayStyleRunAlignment->AddRef(fArrayStyleRunAlignment); -} - -IArrayStyleRunAlignment::~IArrayStyleRunAlignment() -{ - sArrayStyleRunAlignment->Release(fArrayStyleRunAlignment); -} - -IArrayStyleRunAlignment& IArrayStyleRunAlignment::operator=(const IArrayStyleRunAlignment& rhs) -{ - if (&rhs != this) - { - sArrayStyleRunAlignment->Release(fArrayStyleRunAlignment); - fArrayStyleRunAlignment = rhs.fArrayStyleRunAlignment; - sArrayStyleRunAlignment->AddRef(fArrayStyleRunAlignment); - } - return *this; -} - -bool IArrayStyleRunAlignment::operator==(const IArrayStyleRunAlignment& rhs) const -{ - return fArrayStyleRunAlignment == rhs.fArrayStyleRunAlignment; -} - -bool IArrayStyleRunAlignment::operator!=(const IArrayStyleRunAlignment& rhs) const -{ - return !(*this == rhs); -} - -ArrayStyleRunAlignmentRef IArrayStyleRunAlignment::GetRef() const -{ - return fArrayStyleRunAlignment; -} - -bool IArrayStyleRunAlignment::IsNull() const -{ - return sArrayStyleRunAlignment->IsNull(fArrayStyleRunAlignment); -} - -ATETextDOM::Int32 IArrayStyleRunAlignment::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayStyleRunAlignment->GetSize(fArrayStyleRunAlignment, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -StyleRunAlignment IArrayStyleRunAlignment::GetFirst( ) const -{ - StyleRunAlignment ret; - ATEErr error = sArrayStyleRunAlignment->GetFirst(fArrayStyleRunAlignment, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -StyleRunAlignment IArrayStyleRunAlignment::GetLast( ) const -{ - StyleRunAlignment ret; - ATEErr error = sArrayStyleRunAlignment->GetLast(fArrayStyleRunAlignment, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -StyleRunAlignment IArrayStyleRunAlignment::Item( ATETextDOM::Int32 index) const -{ - StyleRunAlignment ret; - ATEErr error = sArrayStyleRunAlignment->Item(fArrayStyleRunAlignment, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayAutoKernType-- -////////////////////////////////////////////// - -IArrayAutoKernType::IArrayAutoKernType() -:fArrayAutoKernType(0) -{ -} - -IArrayAutoKernType::IArrayAutoKernType(ArrayAutoKernTypeRef arrayautokerntype) -:fArrayAutoKernType(arrayautokerntype) -{ -} - -IArrayAutoKernType::IArrayAutoKernType(const IArrayAutoKernType& src) -:fArrayAutoKernType(src.fArrayAutoKernType) -{ - sArrayAutoKernType->AddRef(fArrayAutoKernType); -} - -IArrayAutoKernType::~IArrayAutoKernType() -{ - sArrayAutoKernType->Release(fArrayAutoKernType); -} - -IArrayAutoKernType& IArrayAutoKernType::operator=(const IArrayAutoKernType& rhs) -{ - if (&rhs != this) - { - sArrayAutoKernType->Release(fArrayAutoKernType); - fArrayAutoKernType = rhs.fArrayAutoKernType; - sArrayAutoKernType->AddRef(fArrayAutoKernType); - } - return *this; -} - -bool IArrayAutoKernType::operator==(const IArrayAutoKernType& rhs) const -{ - return fArrayAutoKernType == rhs.fArrayAutoKernType; -} - -bool IArrayAutoKernType::operator!=(const IArrayAutoKernType& rhs) const -{ - return !(*this == rhs); -} - -ArrayAutoKernTypeRef IArrayAutoKernType::GetRef() const -{ - return fArrayAutoKernType; -} - -bool IArrayAutoKernType::IsNull() const -{ - return sArrayAutoKernType->IsNull(fArrayAutoKernType); -} - -ATETextDOM::Int32 IArrayAutoKernType::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayAutoKernType->GetSize(fArrayAutoKernType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -AutoKernType IArrayAutoKernType::GetFirst( ) const -{ - AutoKernType ret; - ATEErr error = sArrayAutoKernType->GetFirst(fArrayAutoKernType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -AutoKernType IArrayAutoKernType::GetLast( ) const -{ - AutoKernType ret; - ATEErr error = sArrayAutoKernType->GetLast(fArrayAutoKernType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -AutoKernType IArrayAutoKernType::Item( ATETextDOM::Int32 index) const -{ - AutoKernType ret; - ATEErr error = sArrayAutoKernType->Item(fArrayAutoKernType, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayBaselineDirection-- -////////////////////////////////////////////// - -IArrayBaselineDirection::IArrayBaselineDirection() -:fArrayBaselineDirection(0) -{ -} - -IArrayBaselineDirection::IArrayBaselineDirection(ArrayBaselineDirectionRef arraybaselinedirection) -:fArrayBaselineDirection(arraybaselinedirection) -{ -} - -IArrayBaselineDirection::IArrayBaselineDirection(const IArrayBaselineDirection& src) -:fArrayBaselineDirection(src.fArrayBaselineDirection) -{ - sArrayBaselineDirection->AddRef(fArrayBaselineDirection); -} - -IArrayBaselineDirection::~IArrayBaselineDirection() -{ - sArrayBaselineDirection->Release(fArrayBaselineDirection); -} - -IArrayBaselineDirection& IArrayBaselineDirection::operator=(const IArrayBaselineDirection& rhs) -{ - if (&rhs != this) - { - sArrayBaselineDirection->Release(fArrayBaselineDirection); - fArrayBaselineDirection = rhs.fArrayBaselineDirection; - sArrayBaselineDirection->AddRef(fArrayBaselineDirection); - } - return *this; -} - -bool IArrayBaselineDirection::operator==(const IArrayBaselineDirection& rhs) const -{ - return fArrayBaselineDirection == rhs.fArrayBaselineDirection; -} - -bool IArrayBaselineDirection::operator!=(const IArrayBaselineDirection& rhs) const -{ - return !(*this == rhs); -} - -ArrayBaselineDirectionRef IArrayBaselineDirection::GetRef() const -{ - return fArrayBaselineDirection; -} - -bool IArrayBaselineDirection::IsNull() const -{ - return sArrayBaselineDirection->IsNull(fArrayBaselineDirection); -} - -ATETextDOM::Int32 IArrayBaselineDirection::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayBaselineDirection->GetSize(fArrayBaselineDirection, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -BaselineDirection IArrayBaselineDirection::GetFirst( ) const -{ - BaselineDirection ret; - ATEErr error = sArrayBaselineDirection->GetFirst(fArrayBaselineDirection, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -BaselineDirection IArrayBaselineDirection::GetLast( ) const -{ - BaselineDirection ret; - ATEErr error = sArrayBaselineDirection->GetLast(fArrayBaselineDirection, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -BaselineDirection IArrayBaselineDirection::Item( ATETextDOM::Int32 index) const -{ - BaselineDirection ret; - ATEErr error = sArrayBaselineDirection->Item(fArrayBaselineDirection, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayLanguage-- -////////////////////////////////////////////// - -IArrayLanguage::IArrayLanguage() -:fArrayLanguage(0) -{ -} - -IArrayLanguage::IArrayLanguage(ArrayLanguageRef arraylanguage) -:fArrayLanguage(arraylanguage) -{ -} - -IArrayLanguage::IArrayLanguage(const IArrayLanguage& src) -:fArrayLanguage(src.fArrayLanguage) -{ - sArrayLanguage->AddRef(fArrayLanguage); -} - -IArrayLanguage::~IArrayLanguage() -{ - sArrayLanguage->Release(fArrayLanguage); -} - -IArrayLanguage& IArrayLanguage::operator=(const IArrayLanguage& rhs) -{ - if (&rhs != this) - { - sArrayLanguage->Release(fArrayLanguage); - fArrayLanguage = rhs.fArrayLanguage; - sArrayLanguage->AddRef(fArrayLanguage); - } - return *this; -} - -bool IArrayLanguage::operator==(const IArrayLanguage& rhs) const -{ - return fArrayLanguage == rhs.fArrayLanguage; -} - -bool IArrayLanguage::operator!=(const IArrayLanguage& rhs) const -{ - return !(*this == rhs); -} - -ArrayLanguageRef IArrayLanguage::GetRef() const -{ - return fArrayLanguage; -} - -bool IArrayLanguage::IsNull() const -{ - return sArrayLanguage->IsNull(fArrayLanguage); -} - -ATETextDOM::Int32 IArrayLanguage::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayLanguage->GetSize(fArrayLanguage, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -Language IArrayLanguage::GetFirst( ) const -{ - Language ret; - ATEErr error = sArrayLanguage->GetFirst(fArrayLanguage, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -Language IArrayLanguage::GetLast( ) const -{ - Language ret; - ATEErr error = sArrayLanguage->GetLast(fArrayLanguage, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -Language IArrayLanguage::Item( ATETextDOM::Int32 index) const -{ - Language ret; - ATEErr error = sArrayLanguage->Item(fArrayLanguage, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayFontCapsOption-- -////////////////////////////////////////////// - -IArrayFontCapsOption::IArrayFontCapsOption() -:fArrayFontCapsOption(0) -{ -} - -IArrayFontCapsOption::IArrayFontCapsOption(ArrayFontCapsOptionRef arrayfontcapsoption) -:fArrayFontCapsOption(arrayfontcapsoption) -{ -} - -IArrayFontCapsOption::IArrayFontCapsOption(const IArrayFontCapsOption& src) -:fArrayFontCapsOption(src.fArrayFontCapsOption) -{ - sArrayFontCapsOption->AddRef(fArrayFontCapsOption); -} - -IArrayFontCapsOption::~IArrayFontCapsOption() -{ - sArrayFontCapsOption->Release(fArrayFontCapsOption); -} - -IArrayFontCapsOption& IArrayFontCapsOption::operator=(const IArrayFontCapsOption& rhs) -{ - if (&rhs != this) - { - sArrayFontCapsOption->Release(fArrayFontCapsOption); - fArrayFontCapsOption = rhs.fArrayFontCapsOption; - sArrayFontCapsOption->AddRef(fArrayFontCapsOption); - } - return *this; -} - -bool IArrayFontCapsOption::operator==(const IArrayFontCapsOption& rhs) const -{ - return fArrayFontCapsOption == rhs.fArrayFontCapsOption; -} - -bool IArrayFontCapsOption::operator!=(const IArrayFontCapsOption& rhs) const -{ - return !(*this == rhs); -} - -ArrayFontCapsOptionRef IArrayFontCapsOption::GetRef() const -{ - return fArrayFontCapsOption; -} - -bool IArrayFontCapsOption::IsNull() const -{ - return sArrayFontCapsOption->IsNull(fArrayFontCapsOption); -} - -ATETextDOM::Int32 IArrayFontCapsOption::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayFontCapsOption->GetSize(fArrayFontCapsOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontCapsOption IArrayFontCapsOption::GetFirst( ) const -{ - FontCapsOption ret; - ATEErr error = sArrayFontCapsOption->GetFirst(fArrayFontCapsOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontCapsOption IArrayFontCapsOption::GetLast( ) const -{ - FontCapsOption ret; - ATEErr error = sArrayFontCapsOption->GetLast(fArrayFontCapsOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontCapsOption IArrayFontCapsOption::Item( ATETextDOM::Int32 index) const -{ - FontCapsOption ret; - ATEErr error = sArrayFontCapsOption->Item(fArrayFontCapsOption, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayFontBaselineOption-- -////////////////////////////////////////////// - -IArrayFontBaselineOption::IArrayFontBaselineOption() -:fArrayFontBaselineOption(0) -{ -} - -IArrayFontBaselineOption::IArrayFontBaselineOption(ArrayFontBaselineOptionRef arrayfontbaselineoption) -:fArrayFontBaselineOption(arrayfontbaselineoption) -{ -} - -IArrayFontBaselineOption::IArrayFontBaselineOption(const IArrayFontBaselineOption& src) -:fArrayFontBaselineOption(src.fArrayFontBaselineOption) -{ - sArrayFontBaselineOption->AddRef(fArrayFontBaselineOption); -} - -IArrayFontBaselineOption::~IArrayFontBaselineOption() -{ - sArrayFontBaselineOption->Release(fArrayFontBaselineOption); -} - -IArrayFontBaselineOption& IArrayFontBaselineOption::operator=(const IArrayFontBaselineOption& rhs) -{ - if (&rhs != this) - { - sArrayFontBaselineOption->Release(fArrayFontBaselineOption); - fArrayFontBaselineOption = rhs.fArrayFontBaselineOption; - sArrayFontBaselineOption->AddRef(fArrayFontBaselineOption); - } - return *this; -} - -bool IArrayFontBaselineOption::operator==(const IArrayFontBaselineOption& rhs) const -{ - return fArrayFontBaselineOption == rhs.fArrayFontBaselineOption; -} - -bool IArrayFontBaselineOption::operator!=(const IArrayFontBaselineOption& rhs) const -{ - return !(*this == rhs); -} - -ArrayFontBaselineOptionRef IArrayFontBaselineOption::GetRef() const -{ - return fArrayFontBaselineOption; -} - -bool IArrayFontBaselineOption::IsNull() const -{ - return sArrayFontBaselineOption->IsNull(fArrayFontBaselineOption); -} - -ATETextDOM::Int32 IArrayFontBaselineOption::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayFontBaselineOption->GetSize(fArrayFontBaselineOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontBaselineOption IArrayFontBaselineOption::GetFirst( ) const -{ - FontBaselineOption ret; - ATEErr error = sArrayFontBaselineOption->GetFirst(fArrayFontBaselineOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontBaselineOption IArrayFontBaselineOption::GetLast( ) const -{ - FontBaselineOption ret; - ATEErr error = sArrayFontBaselineOption->GetLast(fArrayFontBaselineOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontBaselineOption IArrayFontBaselineOption::Item( ATETextDOM::Int32 index) const -{ - FontBaselineOption ret; - ATEErr error = sArrayFontBaselineOption->Item(fArrayFontBaselineOption, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayFontOpenTypePositionOption-- -////////////////////////////////////////////// - -IArrayFontOpenTypePositionOption::IArrayFontOpenTypePositionOption() -:fArrayFontOpenTypePositionOption(0) -{ -} - -IArrayFontOpenTypePositionOption::IArrayFontOpenTypePositionOption(ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption) -:fArrayFontOpenTypePositionOption(arrayfontopentypepositionoption) -{ -} - -IArrayFontOpenTypePositionOption::IArrayFontOpenTypePositionOption(const IArrayFontOpenTypePositionOption& src) -:fArrayFontOpenTypePositionOption(src.fArrayFontOpenTypePositionOption) -{ - sArrayFontOpenTypePositionOption->AddRef(fArrayFontOpenTypePositionOption); -} - -IArrayFontOpenTypePositionOption::~IArrayFontOpenTypePositionOption() -{ - sArrayFontOpenTypePositionOption->Release(fArrayFontOpenTypePositionOption); -} - -IArrayFontOpenTypePositionOption& IArrayFontOpenTypePositionOption::operator=(const IArrayFontOpenTypePositionOption& rhs) -{ - if (&rhs != this) - { - sArrayFontOpenTypePositionOption->Release(fArrayFontOpenTypePositionOption); - fArrayFontOpenTypePositionOption = rhs.fArrayFontOpenTypePositionOption; - sArrayFontOpenTypePositionOption->AddRef(fArrayFontOpenTypePositionOption); - } - return *this; -} - -bool IArrayFontOpenTypePositionOption::operator==(const IArrayFontOpenTypePositionOption& rhs) const -{ - return fArrayFontOpenTypePositionOption == rhs.fArrayFontOpenTypePositionOption; -} - -bool IArrayFontOpenTypePositionOption::operator!=(const IArrayFontOpenTypePositionOption& rhs) const -{ - return !(*this == rhs); -} - -ArrayFontOpenTypePositionOptionRef IArrayFontOpenTypePositionOption::GetRef() const -{ - return fArrayFontOpenTypePositionOption; -} - -bool IArrayFontOpenTypePositionOption::IsNull() const -{ - return sArrayFontOpenTypePositionOption->IsNull(fArrayFontOpenTypePositionOption); -} - -ATETextDOM::Int32 IArrayFontOpenTypePositionOption::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayFontOpenTypePositionOption->GetSize(fArrayFontOpenTypePositionOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontOpenTypePositionOption IArrayFontOpenTypePositionOption::GetFirst( ) const -{ - FontOpenTypePositionOption ret; - ATEErr error = sArrayFontOpenTypePositionOption->GetFirst(fArrayFontOpenTypePositionOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontOpenTypePositionOption IArrayFontOpenTypePositionOption::GetLast( ) const -{ - FontOpenTypePositionOption ret; - ATEErr error = sArrayFontOpenTypePositionOption->GetLast(fArrayFontOpenTypePositionOption, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -FontOpenTypePositionOption IArrayFontOpenTypePositionOption::Item( ATETextDOM::Int32 index) const -{ - FontOpenTypePositionOption ret; - ATEErr error = sArrayFontOpenTypePositionOption->Item(fArrayFontOpenTypePositionOption, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayUnderlinePosition-- -////////////////////////////////////////////// - -IArrayUnderlinePosition::IArrayUnderlinePosition() -:fArrayUnderlinePosition(0) -{ -} - -IArrayUnderlinePosition::IArrayUnderlinePosition(ArrayUnderlinePositionRef arrayunderlineposition) -:fArrayUnderlinePosition(arrayunderlineposition) -{ -} - -IArrayUnderlinePosition::IArrayUnderlinePosition(const IArrayUnderlinePosition& src) -:fArrayUnderlinePosition(src.fArrayUnderlinePosition) -{ - sArrayUnderlinePosition->AddRef(fArrayUnderlinePosition); -} - -IArrayUnderlinePosition::~IArrayUnderlinePosition() -{ - sArrayUnderlinePosition->Release(fArrayUnderlinePosition); -} - -IArrayUnderlinePosition& IArrayUnderlinePosition::operator=(const IArrayUnderlinePosition& rhs) -{ - if (&rhs != this) - { - sArrayUnderlinePosition->Release(fArrayUnderlinePosition); - fArrayUnderlinePosition = rhs.fArrayUnderlinePosition; - sArrayUnderlinePosition->AddRef(fArrayUnderlinePosition); - } - return *this; -} - -bool IArrayUnderlinePosition::operator==(const IArrayUnderlinePosition& rhs) const -{ - return fArrayUnderlinePosition == rhs.fArrayUnderlinePosition; -} - -bool IArrayUnderlinePosition::operator!=(const IArrayUnderlinePosition& rhs) const -{ - return !(*this == rhs); -} - -ArrayUnderlinePositionRef IArrayUnderlinePosition::GetRef() const -{ - return fArrayUnderlinePosition; -} - -bool IArrayUnderlinePosition::IsNull() const -{ - return sArrayUnderlinePosition->IsNull(fArrayUnderlinePosition); -} - -ATETextDOM::Int32 IArrayUnderlinePosition::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayUnderlinePosition->GetSize(fArrayUnderlinePosition, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -UnderlinePosition IArrayUnderlinePosition::GetFirst( ) const -{ - UnderlinePosition ret; - ATEErr error = sArrayUnderlinePosition->GetFirst(fArrayUnderlinePosition, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -UnderlinePosition IArrayUnderlinePosition::GetLast( ) const -{ - UnderlinePosition ret; - ATEErr error = sArrayUnderlinePosition->GetLast(fArrayUnderlinePosition, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -UnderlinePosition IArrayUnderlinePosition::Item( ATETextDOM::Int32 index) const -{ - UnderlinePosition ret; - ATEErr error = sArrayUnderlinePosition->Item(fArrayUnderlinePosition, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayStrikethroughPosition-- -////////////////////////////////////////////// - -IArrayStrikethroughPosition::IArrayStrikethroughPosition() -:fArrayStrikethroughPosition(0) -{ -} - -IArrayStrikethroughPosition::IArrayStrikethroughPosition(ArrayStrikethroughPositionRef arraystrikethroughposition) -:fArrayStrikethroughPosition(arraystrikethroughposition) -{ -} - -IArrayStrikethroughPosition::IArrayStrikethroughPosition(const IArrayStrikethroughPosition& src) -:fArrayStrikethroughPosition(src.fArrayStrikethroughPosition) -{ - sArrayStrikethroughPosition->AddRef(fArrayStrikethroughPosition); -} - -IArrayStrikethroughPosition::~IArrayStrikethroughPosition() -{ - sArrayStrikethroughPosition->Release(fArrayStrikethroughPosition); -} - -IArrayStrikethroughPosition& IArrayStrikethroughPosition::operator=(const IArrayStrikethroughPosition& rhs) -{ - if (&rhs != this) - { - sArrayStrikethroughPosition->Release(fArrayStrikethroughPosition); - fArrayStrikethroughPosition = rhs.fArrayStrikethroughPosition; - sArrayStrikethroughPosition->AddRef(fArrayStrikethroughPosition); - } - return *this; -} - -bool IArrayStrikethroughPosition::operator==(const IArrayStrikethroughPosition& rhs) const -{ - return fArrayStrikethroughPosition == rhs.fArrayStrikethroughPosition; -} - -bool IArrayStrikethroughPosition::operator!=(const IArrayStrikethroughPosition& rhs) const -{ - return !(*this == rhs); -} - -ArrayStrikethroughPositionRef IArrayStrikethroughPosition::GetRef() const -{ - return fArrayStrikethroughPosition; -} - -bool IArrayStrikethroughPosition::IsNull() const -{ - return sArrayStrikethroughPosition->IsNull(fArrayStrikethroughPosition); -} - -ATETextDOM::Int32 IArrayStrikethroughPosition::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayStrikethroughPosition->GetSize(fArrayStrikethroughPosition, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -StrikethroughPosition IArrayStrikethroughPosition::GetFirst( ) const -{ - StrikethroughPosition ret; - ATEErr error = sArrayStrikethroughPosition->GetFirst(fArrayStrikethroughPosition, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -StrikethroughPosition IArrayStrikethroughPosition::GetLast( ) const -{ - StrikethroughPosition ret; - ATEErr error = sArrayStrikethroughPosition->GetLast(fArrayStrikethroughPosition, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -StrikethroughPosition IArrayStrikethroughPosition::Item( ATETextDOM::Int32 index) const -{ - StrikethroughPosition ret; - ATEErr error = sArrayStrikethroughPosition->Item(fArrayStrikethroughPosition, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayParagraphJustification-- -////////////////////////////////////////////// - -IArrayParagraphJustification::IArrayParagraphJustification() -:fArrayParagraphJustification(0) -{ -} - -IArrayParagraphJustification::IArrayParagraphJustification(ArrayParagraphJustificationRef arrayparagraphjustification) -:fArrayParagraphJustification(arrayparagraphjustification) -{ -} - -IArrayParagraphJustification::IArrayParagraphJustification(const IArrayParagraphJustification& src) -:fArrayParagraphJustification(src.fArrayParagraphJustification) -{ - sArrayParagraphJustification->AddRef(fArrayParagraphJustification); -} - -IArrayParagraphJustification::~IArrayParagraphJustification() -{ - sArrayParagraphJustification->Release(fArrayParagraphJustification); -} - -IArrayParagraphJustification& IArrayParagraphJustification::operator=(const IArrayParagraphJustification& rhs) -{ - if (&rhs != this) - { - sArrayParagraphJustification->Release(fArrayParagraphJustification); - fArrayParagraphJustification = rhs.fArrayParagraphJustification; - sArrayParagraphJustification->AddRef(fArrayParagraphJustification); - } - return *this; -} - -bool IArrayParagraphJustification::operator==(const IArrayParagraphJustification& rhs) const -{ - return fArrayParagraphJustification == rhs.fArrayParagraphJustification; -} - -bool IArrayParagraphJustification::operator!=(const IArrayParagraphJustification& rhs) const -{ - return !(*this == rhs); -} - -ArrayParagraphJustificationRef IArrayParagraphJustification::GetRef() const -{ - return fArrayParagraphJustification; -} - -bool IArrayParagraphJustification::IsNull() const -{ - return sArrayParagraphJustification->IsNull(fArrayParagraphJustification); -} - -ATETextDOM::Int32 IArrayParagraphJustification::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayParagraphJustification->GetSize(fArrayParagraphJustification, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ParagraphJustification IArrayParagraphJustification::GetFirst( ) const -{ - ParagraphJustification ret; - ATEErr error = sArrayParagraphJustification->GetFirst(fArrayParagraphJustification, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ParagraphJustification IArrayParagraphJustification::GetLast( ) const -{ - ParagraphJustification ret; - ATEErr error = sArrayParagraphJustification->GetLast(fArrayParagraphJustification, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ParagraphJustification IArrayParagraphJustification::Item( ATETextDOM::Int32 index) const -{ - ParagraphJustification ret; - ATEErr error = sArrayParagraphJustification->Item(fArrayParagraphJustification, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayArrayReal-- -////////////////////////////////////////////// - -IArrayArrayReal::IArrayArrayReal() -:fArrayArrayReal(0) -{ -} - -IArrayArrayReal::IArrayArrayReal(ArrayArrayRealRef arrayarrayreal) -:fArrayArrayReal(arrayarrayreal) -{ -} - -IArrayArrayReal::IArrayArrayReal(const IArrayArrayReal& src) -:fArrayArrayReal(src.fArrayArrayReal) -{ - sArrayArrayReal->AddRef(fArrayArrayReal); -} - -IArrayArrayReal::~IArrayArrayReal() -{ - sArrayArrayReal->Release(fArrayArrayReal); -} - -IArrayArrayReal& IArrayArrayReal::operator=(const IArrayArrayReal& rhs) -{ - if (&rhs != this) - { - sArrayArrayReal->Release(fArrayArrayReal); - fArrayArrayReal = rhs.fArrayArrayReal; - sArrayArrayReal->AddRef(fArrayArrayReal); - } - return *this; -} - -bool IArrayArrayReal::operator==(const IArrayArrayReal& rhs) const -{ - return fArrayArrayReal == rhs.fArrayArrayReal; -} - -bool IArrayArrayReal::operator!=(const IArrayArrayReal& rhs) const -{ - return !(*this == rhs); -} - -ArrayArrayRealRef IArrayArrayReal::GetRef() const -{ - return fArrayArrayReal; -} - -bool IArrayArrayReal::IsNull() const -{ - return sArrayArrayReal->IsNull(fArrayArrayReal); -} - -ATETextDOM::Int32 IArrayArrayReal::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayArrayReal->GetSize(fArrayArrayReal, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IArrayReal IArrayArrayReal::GetFirst( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sArrayArrayReal->GetFirst(fArrayArrayReal, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IArrayArrayReal::GetLast( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sArrayArrayReal->GetLast(fArrayArrayReal, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IArrayArrayReal::Item( ATETextDOM::Int32 index) const -{ - ArrayRealRef ret = 0; - ATEErr error = sArrayArrayReal->Item(fArrayArrayReal, index, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -////////////////////////////////////////////// -// --IArrayBurasagariType-- -////////////////////////////////////////////// - -IArrayBurasagariType::IArrayBurasagariType() -:fArrayBurasagariType(0) -{ -} - -IArrayBurasagariType::IArrayBurasagariType(ArrayBurasagariTypeRef arrayburasagaritype) -:fArrayBurasagariType(arrayburasagaritype) -{ -} - -IArrayBurasagariType::IArrayBurasagariType(const IArrayBurasagariType& src) -:fArrayBurasagariType(src.fArrayBurasagariType) -{ - sArrayBurasagariType->AddRef(fArrayBurasagariType); -} - -IArrayBurasagariType::~IArrayBurasagariType() -{ - sArrayBurasagariType->Release(fArrayBurasagariType); -} - -IArrayBurasagariType& IArrayBurasagariType::operator=(const IArrayBurasagariType& rhs) -{ - if (&rhs != this) - { - sArrayBurasagariType->Release(fArrayBurasagariType); - fArrayBurasagariType = rhs.fArrayBurasagariType; - sArrayBurasagariType->AddRef(fArrayBurasagariType); - } - return *this; -} - -bool IArrayBurasagariType::operator==(const IArrayBurasagariType& rhs) const -{ - return fArrayBurasagariType == rhs.fArrayBurasagariType; -} - -bool IArrayBurasagariType::operator!=(const IArrayBurasagariType& rhs) const -{ - return !(*this == rhs); -} - -ArrayBurasagariTypeRef IArrayBurasagariType::GetRef() const -{ - return fArrayBurasagariType; -} - -bool IArrayBurasagariType::IsNull() const -{ - return sArrayBurasagariType->IsNull(fArrayBurasagariType); -} - -ATETextDOM::Int32 IArrayBurasagariType::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayBurasagariType->GetSize(fArrayBurasagariType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -BurasagariType IArrayBurasagariType::GetFirst( ) const -{ - BurasagariType ret; - ATEErr error = sArrayBurasagariType->GetFirst(fArrayBurasagariType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -BurasagariType IArrayBurasagariType::GetLast( ) const -{ - BurasagariType ret; - ATEErr error = sArrayBurasagariType->GetLast(fArrayBurasagariType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -BurasagariType IArrayBurasagariType::Item( ATETextDOM::Int32 index) const -{ - BurasagariType ret; - ATEErr error = sArrayBurasagariType->Item(fArrayBurasagariType, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayPreferredKinsokuOrder-- -////////////////////////////////////////////// - -IArrayPreferredKinsokuOrder::IArrayPreferredKinsokuOrder() -:fArrayPreferredKinsokuOrder(0) -{ -} - -IArrayPreferredKinsokuOrder::IArrayPreferredKinsokuOrder(ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder) -:fArrayPreferredKinsokuOrder(arraypreferredkinsokuorder) -{ -} - -IArrayPreferredKinsokuOrder::IArrayPreferredKinsokuOrder(const IArrayPreferredKinsokuOrder& src) -:fArrayPreferredKinsokuOrder(src.fArrayPreferredKinsokuOrder) -{ - sArrayPreferredKinsokuOrder->AddRef(fArrayPreferredKinsokuOrder); -} - -IArrayPreferredKinsokuOrder::~IArrayPreferredKinsokuOrder() -{ - sArrayPreferredKinsokuOrder->Release(fArrayPreferredKinsokuOrder); -} - -IArrayPreferredKinsokuOrder& IArrayPreferredKinsokuOrder::operator=(const IArrayPreferredKinsokuOrder& rhs) -{ - if (&rhs != this) - { - sArrayPreferredKinsokuOrder->Release(fArrayPreferredKinsokuOrder); - fArrayPreferredKinsokuOrder = rhs.fArrayPreferredKinsokuOrder; - sArrayPreferredKinsokuOrder->AddRef(fArrayPreferredKinsokuOrder); - } - return *this; -} - -bool IArrayPreferredKinsokuOrder::operator==(const IArrayPreferredKinsokuOrder& rhs) const -{ - return fArrayPreferredKinsokuOrder == rhs.fArrayPreferredKinsokuOrder; -} - -bool IArrayPreferredKinsokuOrder::operator!=(const IArrayPreferredKinsokuOrder& rhs) const -{ - return !(*this == rhs); -} - -ArrayPreferredKinsokuOrderRef IArrayPreferredKinsokuOrder::GetRef() const -{ - return fArrayPreferredKinsokuOrder; -} - -bool IArrayPreferredKinsokuOrder::IsNull() const -{ - return sArrayPreferredKinsokuOrder->IsNull(fArrayPreferredKinsokuOrder); -} - -ATETextDOM::Int32 IArrayPreferredKinsokuOrder::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayPreferredKinsokuOrder->GetSize(fArrayPreferredKinsokuOrder, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -PreferredKinsokuOrder IArrayPreferredKinsokuOrder::GetFirst( ) const -{ - PreferredKinsokuOrder ret; - ATEErr error = sArrayPreferredKinsokuOrder->GetFirst(fArrayPreferredKinsokuOrder, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -PreferredKinsokuOrder IArrayPreferredKinsokuOrder::GetLast( ) const -{ - PreferredKinsokuOrder ret; - ATEErr error = sArrayPreferredKinsokuOrder->GetLast(fArrayPreferredKinsokuOrder, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -PreferredKinsokuOrder IArrayPreferredKinsokuOrder::Item( ATETextDOM::Int32 index) const -{ - PreferredKinsokuOrder ret; - ATEErr error = sArrayPreferredKinsokuOrder->Item(fArrayPreferredKinsokuOrder, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayKinsokuRef-- -////////////////////////////////////////////// - -IArrayKinsokuRef::IArrayKinsokuRef() -:fArrayKinsokuRef(0) -{ -} - -IArrayKinsokuRef::IArrayKinsokuRef(ArrayKinsokuRefRef arraykinsokuref) -:fArrayKinsokuRef(arraykinsokuref) -{ -} - -IArrayKinsokuRef::IArrayKinsokuRef(const IArrayKinsokuRef& src) -:fArrayKinsokuRef(src.fArrayKinsokuRef) -{ - sArrayKinsokuRef->AddRef(fArrayKinsokuRef); -} - -IArrayKinsokuRef::~IArrayKinsokuRef() -{ - sArrayKinsokuRef->Release(fArrayKinsokuRef); -} - -IArrayKinsokuRef& IArrayKinsokuRef::operator=(const IArrayKinsokuRef& rhs) -{ - if (&rhs != this) - { - sArrayKinsokuRef->Release(fArrayKinsokuRef); - fArrayKinsokuRef = rhs.fArrayKinsokuRef; - sArrayKinsokuRef->AddRef(fArrayKinsokuRef); - } - return *this; -} - -bool IArrayKinsokuRef::operator==(const IArrayKinsokuRef& rhs) const -{ - return fArrayKinsokuRef == rhs.fArrayKinsokuRef; -} - -bool IArrayKinsokuRef::operator!=(const IArrayKinsokuRef& rhs) const -{ - return !(*this == rhs); -} - -ArrayKinsokuRefRef IArrayKinsokuRef::GetRef() const -{ - return fArrayKinsokuRef; -} - -bool IArrayKinsokuRef::IsNull() const -{ - return sArrayKinsokuRef->IsNull(fArrayKinsokuRef); -} - -ATETextDOM::Int32 IArrayKinsokuRef::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayKinsokuRef->GetSize(fArrayKinsokuRef, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IKinsoku IArrayKinsokuRef::GetFirst( ) const -{ - KinsokuRef ret = 0; - ATEErr error = sArrayKinsokuRef->GetFirst(fArrayKinsokuRef, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsoku(ret); -} - -IKinsoku IArrayKinsokuRef::GetLast( ) const -{ - KinsokuRef ret = 0; - ATEErr error = sArrayKinsokuRef->GetLast(fArrayKinsokuRef, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsoku(ret); -} - -IKinsoku IArrayKinsokuRef::Item( ATETextDOM::Int32 index) const -{ - KinsokuRef ret = 0; - ATEErr error = sArrayKinsokuRef->Item(fArrayKinsokuRef, index, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsoku(ret); -} - -////////////////////////////////////////////// -// --IArrayMojiKumiRef-- -////////////////////////////////////////////// - -IArrayMojiKumiRef::IArrayMojiKumiRef() -:fArrayMojiKumiRef(0) -{ -} - -IArrayMojiKumiRef::IArrayMojiKumiRef(ArrayMojiKumiRefRef arraymojikumiref) -:fArrayMojiKumiRef(arraymojikumiref) -{ -} - -IArrayMojiKumiRef::IArrayMojiKumiRef(const IArrayMojiKumiRef& src) -:fArrayMojiKumiRef(src.fArrayMojiKumiRef) -{ - sArrayMojiKumiRef->AddRef(fArrayMojiKumiRef); -} - -IArrayMojiKumiRef::~IArrayMojiKumiRef() -{ - sArrayMojiKumiRef->Release(fArrayMojiKumiRef); -} - -IArrayMojiKumiRef& IArrayMojiKumiRef::operator=(const IArrayMojiKumiRef& rhs) -{ - if (&rhs != this) - { - sArrayMojiKumiRef->Release(fArrayMojiKumiRef); - fArrayMojiKumiRef = rhs.fArrayMojiKumiRef; - sArrayMojiKumiRef->AddRef(fArrayMojiKumiRef); - } - return *this; -} - -bool IArrayMojiKumiRef::operator==(const IArrayMojiKumiRef& rhs) const -{ - return fArrayMojiKumiRef == rhs.fArrayMojiKumiRef; -} - -bool IArrayMojiKumiRef::operator!=(const IArrayMojiKumiRef& rhs) const -{ - return !(*this == rhs); -} - -ArrayMojiKumiRefRef IArrayMojiKumiRef::GetRef() const -{ - return fArrayMojiKumiRef; -} - -bool IArrayMojiKumiRef::IsNull() const -{ - return sArrayMojiKumiRef->IsNull(fArrayMojiKumiRef); -} - -ATETextDOM::Int32 IArrayMojiKumiRef::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayMojiKumiRef->GetSize(fArrayMojiKumiRef, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IMojiKumi IArrayMojiKumiRef::GetFirst( ) const -{ - MojiKumiRef ret = 0; - ATEErr error = sArrayMojiKumiRef->GetFirst(fArrayMojiKumiRef, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumi(ret); -} - -IMojiKumi IArrayMojiKumiRef::GetLast( ) const -{ - MojiKumiRef ret = 0; - ATEErr error = sArrayMojiKumiRef->GetLast(fArrayMojiKumiRef, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumi(ret); -} - -IMojiKumi IArrayMojiKumiRef::Item( ATETextDOM::Int32 index) const -{ - MojiKumiRef ret = 0; - ATEErr error = sArrayMojiKumiRef->Item(fArrayMojiKumiRef, index, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumi(ret); -} - -////////////////////////////////////////////// -// --IArrayMojiKumiSetRef-- -////////////////////////////////////////////// - -IArrayMojiKumiSetRef::IArrayMojiKumiSetRef() -:fArrayMojiKumiSetRef(0) -{ -} - -IArrayMojiKumiSetRef::IArrayMojiKumiSetRef(ArrayMojiKumiSetRefRef arraymojikumisetref) -:fArrayMojiKumiSetRef(arraymojikumisetref) -{ -} - -IArrayMojiKumiSetRef::IArrayMojiKumiSetRef(const IArrayMojiKumiSetRef& src) -:fArrayMojiKumiSetRef(src.fArrayMojiKumiSetRef) -{ - sArrayMojiKumiSetRef->AddRef(fArrayMojiKumiSetRef); -} - -IArrayMojiKumiSetRef::~IArrayMojiKumiSetRef() -{ - sArrayMojiKumiSetRef->Release(fArrayMojiKumiSetRef); -} - -IArrayMojiKumiSetRef& IArrayMojiKumiSetRef::operator=(const IArrayMojiKumiSetRef& rhs) -{ - if (&rhs != this) - { - sArrayMojiKumiSetRef->Release(fArrayMojiKumiSetRef); - fArrayMojiKumiSetRef = rhs.fArrayMojiKumiSetRef; - sArrayMojiKumiSetRef->AddRef(fArrayMojiKumiSetRef); - } - return *this; -} - -bool IArrayMojiKumiSetRef::operator==(const IArrayMojiKumiSetRef& rhs) const -{ - return fArrayMojiKumiSetRef == rhs.fArrayMojiKumiSetRef; -} - -bool IArrayMojiKumiSetRef::operator!=(const IArrayMojiKumiSetRef& rhs) const -{ - return !(*this == rhs); -} - -ArrayMojiKumiSetRefRef IArrayMojiKumiSetRef::GetRef() const -{ - return fArrayMojiKumiSetRef; -} - -bool IArrayMojiKumiSetRef::IsNull() const -{ - return sArrayMojiKumiSetRef->IsNull(fArrayMojiKumiSetRef); -} - -ATETextDOM::Int32 IArrayMojiKumiSetRef::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayMojiKumiSetRef->GetSize(fArrayMojiKumiSetRef, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IMojiKumiSet IArrayMojiKumiSetRef::GetFirst( ) const -{ - MojiKumiSetRef ret = 0; - ATEErr error = sArrayMojiKumiSetRef->GetFirst(fArrayMojiKumiSetRef, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumiSet(ret); -} - -IMojiKumiSet IArrayMojiKumiSetRef::GetLast( ) const -{ - MojiKumiSetRef ret = 0; - ATEErr error = sArrayMojiKumiSetRef->GetLast(fArrayMojiKumiSetRef, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumiSet(ret); -} - -IMojiKumiSet IArrayMojiKumiSetRef::Item( ATETextDOM::Int32 index) const -{ - MojiKumiSetRef ret = 0; - ATEErr error = sArrayMojiKumiSetRef->Item(fArrayMojiKumiSetRef, index, &ret); - if(error) Throw_ATE_Exception(error); - return IMojiKumiSet(ret); -} - -////////////////////////////////////////////// -// --IArrayTabStopsRef-- -////////////////////////////////////////////// - -IArrayTabStopsRef::IArrayTabStopsRef() -:fArrayTabStopsRef(0) -{ -} - -IArrayTabStopsRef::IArrayTabStopsRef(ArrayTabStopsRefRef arraytabstopsref) -:fArrayTabStopsRef(arraytabstopsref) -{ -} - -IArrayTabStopsRef::IArrayTabStopsRef(const IArrayTabStopsRef& src) -:fArrayTabStopsRef(src.fArrayTabStopsRef) -{ - sArrayTabStopsRef->AddRef(fArrayTabStopsRef); -} - -IArrayTabStopsRef::~IArrayTabStopsRef() -{ - sArrayTabStopsRef->Release(fArrayTabStopsRef); -} - -IArrayTabStopsRef& IArrayTabStopsRef::operator=(const IArrayTabStopsRef& rhs) -{ - if (&rhs != this) - { - sArrayTabStopsRef->Release(fArrayTabStopsRef); - fArrayTabStopsRef = rhs.fArrayTabStopsRef; - sArrayTabStopsRef->AddRef(fArrayTabStopsRef); - } - return *this; -} - -bool IArrayTabStopsRef::operator==(const IArrayTabStopsRef& rhs) const -{ - return fArrayTabStopsRef == rhs.fArrayTabStopsRef; -} - -bool IArrayTabStopsRef::operator!=(const IArrayTabStopsRef& rhs) const -{ - return !(*this == rhs); -} - -ArrayTabStopsRefRef IArrayTabStopsRef::GetRef() const -{ - return fArrayTabStopsRef; -} - -bool IArrayTabStopsRef::IsNull() const -{ - return sArrayTabStopsRef->IsNull(fArrayTabStopsRef); -} - -ATETextDOM::Int32 IArrayTabStopsRef::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayTabStopsRef->GetSize(fArrayTabStopsRef, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ITabStops IArrayTabStopsRef::GetFirst( ) const -{ - TabStopsRef ret = 0; - ATEErr error = sArrayTabStopsRef->GetFirst(fArrayTabStopsRef, &ret); - if(error) Throw_ATE_Exception(error); - return ITabStops(ret); -} - -ITabStops IArrayTabStopsRef::GetLast( ) const -{ - TabStopsRef ret = 0; - ATEErr error = sArrayTabStopsRef->GetLast(fArrayTabStopsRef, &ret); - if(error) Throw_ATE_Exception(error); - return ITabStops(ret); -} - -ITabStops IArrayTabStopsRef::Item( ATETextDOM::Int32 index) const -{ - TabStopsRef ret = 0; - ATEErr error = sArrayTabStopsRef->Item(fArrayTabStopsRef, index, &ret); - if(error) Throw_ATE_Exception(error); - return ITabStops(ret); -} - -////////////////////////////////////////////// -// --IArrayLeadingType-- -////////////////////////////////////////////// - -IArrayLeadingType::IArrayLeadingType() -:fArrayLeadingType(0) -{ -} - -IArrayLeadingType::IArrayLeadingType(ArrayLeadingTypeRef arrayleadingtype) -:fArrayLeadingType(arrayleadingtype) -{ -} - -IArrayLeadingType::IArrayLeadingType(const IArrayLeadingType& src) -:fArrayLeadingType(src.fArrayLeadingType) -{ - sArrayLeadingType->AddRef(fArrayLeadingType); -} - -IArrayLeadingType::~IArrayLeadingType() -{ - sArrayLeadingType->Release(fArrayLeadingType); -} - -IArrayLeadingType& IArrayLeadingType::operator=(const IArrayLeadingType& rhs) -{ - if (&rhs != this) - { - sArrayLeadingType->Release(fArrayLeadingType); - fArrayLeadingType = rhs.fArrayLeadingType; - sArrayLeadingType->AddRef(fArrayLeadingType); - } - return *this; -} - -bool IArrayLeadingType::operator==(const IArrayLeadingType& rhs) const -{ - return fArrayLeadingType == rhs.fArrayLeadingType; -} - -bool IArrayLeadingType::operator!=(const IArrayLeadingType& rhs) const -{ - return !(*this == rhs); -} - -ArrayLeadingTypeRef IArrayLeadingType::GetRef() const -{ - return fArrayLeadingType; -} - -bool IArrayLeadingType::IsNull() const -{ - return sArrayLeadingType->IsNull(fArrayLeadingType); -} - -ATETextDOM::Int32 IArrayLeadingType::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayLeadingType->GetSize(fArrayLeadingType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LeadingType IArrayLeadingType::GetFirst( ) const -{ - LeadingType ret; - ATEErr error = sArrayLeadingType->GetFirst(fArrayLeadingType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LeadingType IArrayLeadingType::GetLast( ) const -{ - LeadingType ret; - ATEErr error = sArrayLeadingType->GetLast(fArrayLeadingType, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -LeadingType IArrayLeadingType::Item( ATETextDOM::Int32 index) const -{ - LeadingType ret; - ATEErr error = sArrayLeadingType->Item(fArrayLeadingType, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayFontRef-- -////////////////////////////////////////////// - -IArrayFontRef::IArrayFontRef() -:fArrayFontRef(0) -{ -} - -IArrayFontRef::IArrayFontRef(ArrayFontRefRef arrayfontref) -:fArrayFontRef(arrayfontref) -{ -} - -IArrayFontRef::IArrayFontRef(const IArrayFontRef& src) -:fArrayFontRef(src.fArrayFontRef) -{ - sArrayFontRef->AddRef(fArrayFontRef); -} - -IArrayFontRef::~IArrayFontRef() -{ - sArrayFontRef->Release(fArrayFontRef); -} - -IArrayFontRef& IArrayFontRef::operator=(const IArrayFontRef& rhs) -{ - if (&rhs != this) - { - sArrayFontRef->Release(fArrayFontRef); - fArrayFontRef = rhs.fArrayFontRef; - sArrayFontRef->AddRef(fArrayFontRef); - } - return *this; -} - -bool IArrayFontRef::operator==(const IArrayFontRef& rhs) const -{ - return fArrayFontRef == rhs.fArrayFontRef; -} - -bool IArrayFontRef::operator!=(const IArrayFontRef& rhs) const -{ - return !(*this == rhs); -} - -ArrayFontRefRef IArrayFontRef::GetRef() const -{ - return fArrayFontRef; -} - -bool IArrayFontRef::IsNull() const -{ - return sArrayFontRef->IsNull(fArrayFontRef); -} - -ATETextDOM::Int32 IArrayFontRef::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayFontRef->GetSize(fArrayFontRef, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IFont IArrayFontRef::GetFirst( ) const -{ - FontRef ret = 0; - ATEErr error = sArrayFontRef->GetFirst(fArrayFontRef, &ret); - if(error) Throw_ATE_Exception(error); - return IFont(ret); -} - -IFont IArrayFontRef::GetLast( ) const -{ - FontRef ret = 0; - ATEErr error = sArrayFontRef->GetLast(fArrayFontRef, &ret); - if(error) Throw_ATE_Exception(error); - return IFont(ret); -} - -IFont IArrayFontRef::Item( ATETextDOM::Int32 index) const -{ - FontRef ret = 0; - ATEErr error = sArrayFontRef->Item(fArrayFontRef, index, &ret); - if(error) Throw_ATE_Exception(error); - return IFont(ret); -} - -////////////////////////////////////////////// -// --IArrayGlyphID-- -////////////////////////////////////////////// - -IArrayGlyphID::IArrayGlyphID() -:fArrayGlyphID(0) -{ -} - -IArrayGlyphID::IArrayGlyphID(ArrayGlyphIDRef arrayglyphid) -:fArrayGlyphID(arrayglyphid) -{ -} - -IArrayGlyphID::IArrayGlyphID(const IArrayGlyphID& src) -:fArrayGlyphID(src.fArrayGlyphID) -{ - sArrayGlyphID->AddRef(fArrayGlyphID); -} - -IArrayGlyphID::~IArrayGlyphID() -{ - sArrayGlyphID->Release(fArrayGlyphID); -} - -IArrayGlyphID& IArrayGlyphID::operator=(const IArrayGlyphID& rhs) -{ - if (&rhs != this) - { - sArrayGlyphID->Release(fArrayGlyphID); - fArrayGlyphID = rhs.fArrayGlyphID; - sArrayGlyphID->AddRef(fArrayGlyphID); - } - return *this; -} - -bool IArrayGlyphID::operator==(const IArrayGlyphID& rhs) const -{ - return fArrayGlyphID == rhs.fArrayGlyphID; -} - -bool IArrayGlyphID::operator!=(const IArrayGlyphID& rhs) const -{ - return !(*this == rhs); -} - -ArrayGlyphIDRef IArrayGlyphID::GetRef() const -{ - return fArrayGlyphID; -} - -bool IArrayGlyphID::IsNull() const -{ - return sArrayGlyphID->IsNull(fArrayGlyphID); -} - -ATETextDOM::Int32 IArrayGlyphID::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayGlyphID->GetSize(fArrayGlyphID, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATEGlyphID IArrayGlyphID::GetFirst( ) const -{ - ATEGlyphID ret; - ATEErr error = sArrayGlyphID->GetFirst(fArrayGlyphID, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATEGlyphID IArrayGlyphID::GetLast( ) const -{ - ATEGlyphID ret; - ATEErr error = sArrayGlyphID->GetLast(fArrayGlyphID, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATEGlyphID IArrayGlyphID::Item( ATETextDOM::Int32 index) const -{ - ATEGlyphID ret; - ATEErr error = sArrayGlyphID->Item(fArrayGlyphID, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayRealPoint-- -////////////////////////////////////////////// - -IArrayRealPoint::IArrayRealPoint() -:fArrayRealPoint(0) -{ -} - -IArrayRealPoint::IArrayRealPoint(ArrayRealPointRef arrayrealpoint) -:fArrayRealPoint(arrayrealpoint) -{ -} - -IArrayRealPoint::IArrayRealPoint(const IArrayRealPoint& src) -:fArrayRealPoint(src.fArrayRealPoint) -{ - sArrayRealPoint->AddRef(fArrayRealPoint); -} - -IArrayRealPoint::~IArrayRealPoint() -{ - sArrayRealPoint->Release(fArrayRealPoint); -} - -IArrayRealPoint& IArrayRealPoint::operator=(const IArrayRealPoint& rhs) -{ - if (&rhs != this) - { - sArrayRealPoint->Release(fArrayRealPoint); - fArrayRealPoint = rhs.fArrayRealPoint; - sArrayRealPoint->AddRef(fArrayRealPoint); - } - return *this; -} - -bool IArrayRealPoint::operator==(const IArrayRealPoint& rhs) const -{ - return fArrayRealPoint == rhs.fArrayRealPoint; -} - -bool IArrayRealPoint::operator!=(const IArrayRealPoint& rhs) const -{ - return !(*this == rhs); -} - -ArrayRealPointRef IArrayRealPoint::GetRef() const -{ - return fArrayRealPoint; -} - -bool IArrayRealPoint::IsNull() const -{ - return sArrayRealPoint->IsNull(fArrayRealPoint); -} - -ATETextDOM::Int32 IArrayRealPoint::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayRealPoint->GetSize(fArrayRealPoint, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::RealPoint IArrayRealPoint::GetFirst( ) const -{ - ATETextDOM::RealPoint ret; - ATETextDOM::FloatPoint tempRet; - ATEErr error = sArrayRealPoint->GetFirst(fArrayRealPoint, &tempRet); - if(error) Throw_ATE_Exception(error); - ATEFloatPointToATERealPoint(&tempRet,&ret); - return ret; -} - -ATETextDOM::RealPoint IArrayRealPoint::GetLast( ) const -{ - ATETextDOM::RealPoint ret; - ATETextDOM::FloatPoint tempRet; - ATEErr error = sArrayRealPoint->GetLast(fArrayRealPoint, &tempRet); - if(error) Throw_ATE_Exception(error); - ATEFloatPointToATERealPoint(&tempRet,&ret); - return ret; -} - -ATETextDOM::RealPoint IArrayRealPoint::Item( ATETextDOM::Int32 index) const -{ - ATETextDOM::RealPoint ret; - ATETextDOM::FloatPoint tempRet; - ATEErr error = sArrayRealPoint->Item(fArrayRealPoint, index, &tempRet); - if(error) Throw_ATE_Exception(error); - ATEFloatPointToATERealPoint(&tempRet,&ret); - return ret; -} - -////////////////////////////////////////////// -// --IArrayRealMatrix-- -////////////////////////////////////////////// - -IArrayRealMatrix::IArrayRealMatrix() -:fArrayRealMatrix(0) -{ -} - -IArrayRealMatrix::IArrayRealMatrix(ArrayRealMatrixRef arrayrealmatrix) -:fArrayRealMatrix(arrayrealmatrix) -{ -} - -IArrayRealMatrix::IArrayRealMatrix(const IArrayRealMatrix& src) -:fArrayRealMatrix(src.fArrayRealMatrix) -{ - sArrayRealMatrix->AddRef(fArrayRealMatrix); -} - -IArrayRealMatrix::~IArrayRealMatrix() -{ - sArrayRealMatrix->Release(fArrayRealMatrix); -} - -IArrayRealMatrix& IArrayRealMatrix::operator=(const IArrayRealMatrix& rhs) -{ - if (&rhs != this) - { - sArrayRealMatrix->Release(fArrayRealMatrix); - fArrayRealMatrix = rhs.fArrayRealMatrix; - sArrayRealMatrix->AddRef(fArrayRealMatrix); - } - return *this; -} - -bool IArrayRealMatrix::operator==(const IArrayRealMatrix& rhs) const -{ - return fArrayRealMatrix == rhs.fArrayRealMatrix; -} - -bool IArrayRealMatrix::operator!=(const IArrayRealMatrix& rhs) const -{ - return !(*this == rhs); -} - -ArrayRealMatrixRef IArrayRealMatrix::GetRef() const -{ - return fArrayRealMatrix; -} - -bool IArrayRealMatrix::IsNull() const -{ - return sArrayRealMatrix->IsNull(fArrayRealMatrix); -} - -ATETextDOM::Int32 IArrayRealMatrix::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayRealMatrix->GetSize(fArrayRealMatrix, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::RealMatrix IArrayRealMatrix::GetFirst( ) const -{ - ATETextDOM::RealMatrix ret; - ATETextDOM::FloatMatrix tempRet; - ATEErr error = sArrayRealMatrix->GetFirst(fArrayRealMatrix, &tempRet); - ATEFloatMatrixToATERealMatrix(&tempRet,&ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::RealMatrix IArrayRealMatrix::GetLast( ) const -{ - ATETextDOM::RealMatrix ret; - ATETextDOM::FloatMatrix tempRet; - ATEErr error = sArrayRealMatrix->GetLast(fArrayRealMatrix, &tempRet); - ATEFloatMatrixToATERealMatrix(&tempRet,&ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::RealMatrix IArrayRealMatrix::Item( ATETextDOM::Int32 index) const -{ - ATETextDOM::RealMatrix ret; - ATETextDOM::FloatMatrix tempRet; - ATEErr error = sArrayRealMatrix->Item(fArrayRealMatrix, index, &tempRet); - ATEFloatMatrixToATERealMatrix(&tempRet,&ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -#if SLO_COMPLEXSCRIPT -////////////////////////////////////////////// -// --IArrayParagraphDirection-- -////////////////////////////////////////////// - -IArrayParagraphDirection::IArrayParagraphDirection() -:fArrayParagraphDirection(0) -{ -} - -IArrayParagraphDirection::IArrayParagraphDirection(ArrayParagraphDirectionRef arrayparagraphdirection) -:fArrayParagraphDirection(arrayparagraphdirection) -{ -} - -IArrayParagraphDirection::IArrayParagraphDirection(const IArrayParagraphDirection& src) -:fArrayParagraphDirection(src.fArrayParagraphDirection) -{ - sArrayParagraphDirection->AddRef(fArrayParagraphDirection); -} - -IArrayParagraphDirection::~IArrayParagraphDirection() -{ - sArrayParagraphDirection->Release(fArrayParagraphDirection); -} - -IArrayParagraphDirection& IArrayParagraphDirection::operator=(const IArrayParagraphDirection& rhs) -{ - if (&rhs != this) - { - sArrayParagraphDirection->Release(fArrayParagraphDirection); - fArrayParagraphDirection = rhs.fArrayParagraphDirection; - sArrayParagraphDirection->AddRef(fArrayParagraphDirection); - } - return *this; -} - -bool IArrayParagraphDirection::operator==(const IArrayParagraphDirection& rhs) const -{ - return fArrayParagraphDirection == rhs.fArrayParagraphDirection; -} - -bool IArrayParagraphDirection::operator!=(const IArrayParagraphDirection& rhs) const -{ - return !(*this == rhs); -} - -ArrayParagraphDirectionRef IArrayParagraphDirection::GetRef() const -{ - return fArrayParagraphDirection; -} - -bool IArrayParagraphDirection::IsNull() const -{ - return sArrayParagraphDirection->IsNull(fArrayParagraphDirection); -} - -ATETextDOM::Int32 IArrayParagraphDirection::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayParagraphDirection->GetSize(fArrayParagraphDirection, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ParagraphDirection IArrayParagraphDirection::GetFirst( ) const -{ - ParagraphDirection ret; - ATEErr error = sArrayParagraphDirection->GetFirst(fArrayParagraphDirection, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ParagraphDirection IArrayParagraphDirection::GetLast( ) const -{ - ParagraphDirection ret; - ATEErr error = sArrayParagraphDirection->GetLast(fArrayParagraphDirection, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ParagraphDirection IArrayParagraphDirection::Item( ATETextDOM::Int32 index) const -{ - ParagraphDirection ret; - ATEErr error = sArrayParagraphDirection->Item(fArrayParagraphDirection, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayJustificationMethod-- -////////////////////////////////////////////// - -IArrayJustificationMethod::IArrayJustificationMethod() -:fArrayJustificationMethod(0) -{ -} - -IArrayJustificationMethod::IArrayJustificationMethod(ArrayJustificationMethodRef arrayjustificationmethod) -:fArrayJustificationMethod(arrayjustificationmethod) -{ -} - -IArrayJustificationMethod::IArrayJustificationMethod(const IArrayJustificationMethod& src) -:fArrayJustificationMethod(src.fArrayJustificationMethod) -{ - sArrayJustificationMethod->AddRef(fArrayJustificationMethod); -} - -IArrayJustificationMethod::~IArrayJustificationMethod() -{ - sArrayJustificationMethod->Release(fArrayJustificationMethod); -} - -IArrayJustificationMethod& IArrayJustificationMethod::operator=(const IArrayJustificationMethod& rhs) -{ - if (&rhs != this) - { - sArrayJustificationMethod->Release(fArrayJustificationMethod); - fArrayJustificationMethod = rhs.fArrayJustificationMethod; - sArrayJustificationMethod->AddRef(fArrayJustificationMethod); - } - return *this; -} - -bool IArrayJustificationMethod::operator==(const IArrayJustificationMethod& rhs) const -{ - return fArrayJustificationMethod == rhs.fArrayJustificationMethod; -} - -bool IArrayJustificationMethod::operator!=(const IArrayJustificationMethod& rhs) const -{ - return !(*this == rhs); -} - -ArrayJustificationMethodRef IArrayJustificationMethod::GetRef() const -{ - return fArrayJustificationMethod; -} - -bool IArrayJustificationMethod::IsNull() const -{ - return sArrayJustificationMethod->IsNull(fArrayJustificationMethod); -} - -ATETextDOM::Int32 IArrayJustificationMethod::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayJustificationMethod->GetSize(fArrayJustificationMethod, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -JustificationMethod IArrayJustificationMethod::GetFirst( ) const -{ - JustificationMethod ret; - ATEErr error = sArrayJustificationMethod->GetFirst(fArrayJustificationMethod, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -JustificationMethod IArrayJustificationMethod::GetLast( ) const -{ - JustificationMethod ret; - ATEErr error = sArrayJustificationMethod->GetLast(fArrayJustificationMethod, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -JustificationMethod IArrayJustificationMethod::Item( ATETextDOM::Int32 index) const -{ - JustificationMethod ret; - ATEErr error = sArrayJustificationMethod->Item(fArrayJustificationMethod, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - - -////////////////////////////////////////////// -// --IArrayKashidaWidth-- -////////////////////////////////////////////// - -IArrayKashidaWidth::IArrayKashidaWidth() - :fArrayKashidaWidth(0) -{ -} - -IArrayKashidaWidth::IArrayKashidaWidth(ArrayKashidaWidthRef arraykashidawidth) - :fArrayKashidaWidth(arraykashidawidth) -{ -} - -IArrayKashidaWidth::IArrayKashidaWidth(const IArrayKashidaWidth& src) - :fArrayKashidaWidth(src.fArrayKashidaWidth) -{ - sArrayKashidaWidth->AddRef(fArrayKashidaWidth); -} - -IArrayKashidaWidth::~IArrayKashidaWidth() -{ - sArrayKashidaWidth->Release(fArrayKashidaWidth); -} - -IArrayKashidaWidth& IArrayKashidaWidth::operator=(const IArrayKashidaWidth& rhs) -{ - if (&rhs != this) - { - sArrayKashidaWidth->Release(fArrayKashidaWidth); - fArrayKashidaWidth = rhs.fArrayKashidaWidth; - sArrayKashidaWidth->AddRef(fArrayKashidaWidth); - } - return *this; -} - -bool IArrayKashidaWidth::operator==(const IArrayKashidaWidth& rhs) const -{ - return fArrayKashidaWidth == rhs.fArrayKashidaWidth; -} - -bool IArrayKashidaWidth::operator!=(const IArrayKashidaWidth& rhs) const -{ - return !(*this == rhs); -} - -ArrayKashidaWidthRef IArrayKashidaWidth::GetRef() const -{ - return fArrayKashidaWidth; -} - -bool IArrayKashidaWidth::IsNull() const -{ - return sArrayKashidaWidth->IsNull(fArrayKashidaWidth); -} - -ATETextDOM::Int32 IArrayKashidaWidth::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayKashidaWidth->GetSize(fArrayKashidaWidth, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -KashidaWidth IArrayKashidaWidth::GetFirst( ) const -{ - KashidaWidth ret; - ATEErr error = sArrayKashidaWidth->GetFirst(fArrayKashidaWidth, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -KashidaWidth IArrayKashidaWidth::GetLast( ) const -{ - KashidaWidth ret; - ATEErr error = sArrayKashidaWidth->GetLast(fArrayKashidaWidth, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -KashidaWidth IArrayKashidaWidth::Item( ATETextDOM::Int32 index) const -{ - KashidaWidth ret; - ATEErr error = sArrayKashidaWidth->Item(fArrayKashidaWidth, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayKashidas-- -////////////////////////////////////////////// - -IArrayKashidas::IArrayKashidas() -:fArrayKashidas(0) -{ -} - -IArrayKashidas::IArrayKashidas(ArrayKashidasRef arraykashidas) -:fArrayKashidas(arraykashidas) -{ -} - -IArrayKashidas::IArrayKashidas(const IArrayKashidas& src) -:fArrayKashidas(src.fArrayKashidas) -{ - sArrayKashidas->AddRef(fArrayKashidas); -} - -IArrayKashidas::~IArrayKashidas() -{ - sArrayKashidas->Release(fArrayKashidas); -} - -IArrayKashidas& IArrayKashidas::operator=(const IArrayKashidas& rhs) -{ - if (&rhs != this) - { - sArrayKashidas->Release(fArrayKashidas); - fArrayKashidas = rhs.fArrayKashidas; - sArrayKashidas->AddRef(fArrayKashidas); - } - return *this; -} - -bool IArrayKashidas::operator==(const IArrayKashidas& rhs) const -{ - return fArrayKashidas == rhs.fArrayKashidas; -} - -bool IArrayKashidas::operator!=(const IArrayKashidas& rhs) const -{ - return !(*this == rhs); -} - -ArrayKashidasRef IArrayKashidas::GetRef() const -{ - return fArrayKashidas; -} - -bool IArrayKashidas::IsNull() const -{ - return sArrayKashidas->IsNull(fArrayKashidas); -} - -ATETextDOM::Int32 IArrayKashidas::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayKashidas->GetSize(fArrayKashidas, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -Kashidas IArrayKashidas::GetFirst( ) const -{ - Kashidas ret; - ATEErr error = sArrayKashidas->GetFirst(fArrayKashidas, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -Kashidas IArrayKashidas::GetLast( ) const -{ - Kashidas ret; - ATEErr error = sArrayKashidas->GetLast(fArrayKashidas, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -Kashidas IArrayKashidas::Item( ATETextDOM::Int32 index) const -{ - Kashidas ret; - ATEErr error = sArrayKashidas->Item(fArrayKashidas, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayDirOverride-- -////////////////////////////////////////////// - -IArrayDirOverride::IArrayDirOverride() -:fArrayDirOverride(0) -{ -} - -IArrayDirOverride::IArrayDirOverride(ArrayDirOverrideRef arraydiroverride) -:fArrayDirOverride(arraydiroverride) -{ -} - -IArrayDirOverride::IArrayDirOverride(const IArrayDirOverride& src) -:fArrayDirOverride(src.fArrayDirOverride) -{ - sArrayDirOverride->AddRef(fArrayDirOverride); -} - -IArrayDirOverride::~IArrayDirOverride() -{ - sArrayDirOverride->Release(fArrayDirOverride); -} - -IArrayDirOverride& IArrayDirOverride::operator=(const IArrayDirOverride& rhs) -{ - if (&rhs != this) - { - sArrayDirOverride->Release(fArrayDirOverride); - fArrayDirOverride = rhs.fArrayDirOverride; - sArrayDirOverride->AddRef(fArrayDirOverride); - } - return *this; -} - -bool IArrayDirOverride::operator==(const IArrayDirOverride& rhs) const -{ - return fArrayDirOverride == rhs.fArrayDirOverride; -} - -bool IArrayDirOverride::operator!=(const IArrayDirOverride& rhs) const -{ - return !(*this == rhs); -} - -ArrayDirOverrideRef IArrayDirOverride::GetRef() const -{ - return fArrayDirOverride; -} - -bool IArrayDirOverride::IsNull() const -{ - return sArrayDirOverride->IsNull(fArrayDirOverride); -} - -ATETextDOM::Int32 IArrayDirOverride::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayDirOverride->GetSize(fArrayDirOverride, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DirOverride IArrayDirOverride::GetFirst( ) const -{ - DirOverride ret; - ATEErr error = sArrayDirOverride->GetFirst(fArrayDirOverride, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DirOverride IArrayDirOverride::GetLast( ) const -{ - DirOverride ret; - ATEErr error = sArrayDirOverride->GetLast(fArrayDirOverride, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DirOverride IArrayDirOverride::Item( ATETextDOM::Int32 index) const -{ - DirOverride ret; - ATEErr error = sArrayDirOverride->Item(fArrayDirOverride, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayDigitSet-- -////////////////////////////////////////////// - -IArrayDigitSet::IArrayDigitSet() -:fArrayDigitSet(0) -{ -} - -IArrayDigitSet::IArrayDigitSet(ArrayDigitSetRef arraydigitset) -:fArrayDigitSet(arraydigitset) -{ -} - -IArrayDigitSet::IArrayDigitSet(const IArrayDigitSet& src) -:fArrayDigitSet(src.fArrayDigitSet) -{ - sArrayDigitSet->AddRef(fArrayDigitSet); -} - -IArrayDigitSet::~IArrayDigitSet() -{ - sArrayDigitSet->Release(fArrayDigitSet); -} - -IArrayDigitSet& IArrayDigitSet::operator=(const IArrayDigitSet& rhs) -{ - if (&rhs != this) - { - sArrayDigitSet->Release(fArrayDigitSet); - fArrayDigitSet = rhs.fArrayDigitSet; - sArrayDigitSet->AddRef(fArrayDigitSet); - } - return *this; -} - -bool IArrayDigitSet::operator==(const IArrayDigitSet& rhs) const -{ - return fArrayDigitSet == rhs.fArrayDigitSet; -} - -bool IArrayDigitSet::operator!=(const IArrayDigitSet& rhs) const -{ - return !(*this == rhs); -} - -ArrayDigitSetRef IArrayDigitSet::GetRef() const -{ - return fArrayDigitSet; -} - -bool IArrayDigitSet::IsNull() const -{ - return sArrayDigitSet->IsNull(fArrayDigitSet); -} - -ATETextDOM::Int32 IArrayDigitSet::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayDigitSet->GetSize(fArrayDigitSet, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DigitSet IArrayDigitSet::GetFirst( ) const -{ - DigitSet ret; - ATEErr error = sArrayDigitSet->GetFirst(fArrayDigitSet, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DigitSet IArrayDigitSet::GetLast( ) const -{ - DigitSet ret; - ATEErr error = sArrayDigitSet->GetLast(fArrayDigitSet, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DigitSet IArrayDigitSet::Item( ATETextDOM::Int32 index) const -{ - DigitSet ret; - ATEErr error = sArrayDigitSet->Item(fArrayDigitSet, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IArrayDiacVPos-- -////////////////////////////////////////////// - -IArrayDiacVPos::IArrayDiacVPos() -:fArrayDiacVPos(0) -{ -} - -IArrayDiacVPos::IArrayDiacVPos(ArrayDiacVPosRef arraydiacvpos) -:fArrayDiacVPos(arraydiacvpos) -{ -} - -IArrayDiacVPos::IArrayDiacVPos(const IArrayDiacVPos& src) -:fArrayDiacVPos(src.fArrayDiacVPos) -{ - sArrayDiacVPos->AddRef(fArrayDiacVPos); -} - -IArrayDiacVPos::~IArrayDiacVPos() -{ - sArrayDiacVPos->Release(fArrayDiacVPos); -} - -IArrayDiacVPos& IArrayDiacVPos::operator=(const IArrayDiacVPos& rhs) -{ - if (&rhs != this) - { - sArrayDiacVPos->Release(fArrayDiacVPos); - fArrayDiacVPos = rhs.fArrayDiacVPos; - sArrayDiacVPos->AddRef(fArrayDiacVPos); - } - return *this; -} - -bool IArrayDiacVPos::operator==(const IArrayDiacVPos& rhs) const -{ - return fArrayDiacVPos == rhs.fArrayDiacVPos; -} - -bool IArrayDiacVPos::operator!=(const IArrayDiacVPos& rhs) const -{ - return !(*this == rhs); -} - -ArrayDiacVPosRef IArrayDiacVPos::GetRef() const -{ - return fArrayDiacVPos; -} - -bool IArrayDiacVPos::IsNull() const -{ - return sArrayDiacVPos->IsNull(fArrayDiacVPos); -} - -ATETextDOM::Int32 IArrayDiacVPos::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayDiacVPos->GetSize(fArrayDiacVPos, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DiacVPos IArrayDiacVPos::GetFirst( ) const -{ - DiacVPos ret; - ATEErr error = sArrayDiacVPos->GetFirst(fArrayDiacVPos, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DiacVPos IArrayDiacVPos::GetLast( ) const -{ - DiacVPos ret; - ATEErr error = sArrayDiacVPos->GetLast(fArrayDiacVPos, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -DiacVPos IArrayDiacVPos::Item( ATETextDOM::Int32 index) const -{ - DiacVPos ret; - ATEErr error = sArrayDiacVPos->Item(fArrayDiacVPos, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} -#endif - -////////////////////////////////////////////// -// --ICharFeatures-- -////////////////////////////////////////////// - -ICharFeatures::ICharFeatures() -:fCharFeatures(0) -{ - ATEErr error = sCharFeatures->Initialize(&fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -ICharFeatures::ICharFeatures(CharFeaturesRef charfeatures) -:fCharFeatures(charfeatures) -{ -} - -ICharFeatures::ICharFeatures(const ICharFeatures& src) -:fCharFeatures(src.fCharFeatures) -{ - sCharFeatures->AddRef(fCharFeatures); -} - -ICharFeatures::~ICharFeatures() -{ - sCharFeatures->Release(fCharFeatures); -} - -ICharFeatures& ICharFeatures::operator=(const ICharFeatures& rhs) -{ - if (&rhs != this) - { - sCharFeatures->Release(fCharFeatures); - fCharFeatures = rhs.fCharFeatures; - sCharFeatures->AddRef(fCharFeatures); - } - return *this; -} - -bool ICharFeatures::operator==(const ICharFeatures& rhs) const -{ - return fCharFeatures == rhs.fCharFeatures; -} - -bool ICharFeatures::operator!=(const ICharFeatures& rhs) const -{ - return !(*this == rhs); -} - -CharFeaturesRef ICharFeatures::GetRef() const -{ - return fCharFeatures; -} - -bool ICharFeatures::IsNull() const -{ - return sCharFeatures->IsNull(fCharFeatures); -} - -ICharFeatures ICharFeatures::Clone( ) const -{ - CharFeaturesRef ret = 0; - ATEErr error = sCharFeatures->Clone(fCharFeatures, &ret); - if(error) Throw_ATE_Exception(error); - return ICharFeatures(ret); -} - -IFont ICharFeatures::GetFont( bool* isAssigned) const -{ - FontRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFont(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return IFont(ret); -} - -ATETextDOM::Real ICharFeatures::GetFontSize( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATEBool8 isAssignedRet; - ATETextDOM::Float tempRet; - ATEErr error = sCharFeatures->GetFontSize(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetHorizontalScale( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATEBool8 isAssignedRet; - ATETextDOM::Float tempRet; - ATEErr error = sCharFeatures->GetHorizontalScale(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetVerticalScale( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATEBool8 isAssignedRet; - ATETextDOM::Float tempRet; - ATEErr error = sCharFeatures->GetVerticalScale(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -bool ICharFeatures::GetAutoLeading( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetAutoLeading(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetLeading( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLeading(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Int32 ICharFeatures::GetTracking( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetTracking(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetBaselineShift( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetBaselineShift(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetCharacterRotation( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetCharacterRotation(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -AutoKernType ICharFeatures::GetAutoKernType( bool* isAssigned) const -{ - AutoKernType ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetAutoKernType(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -FontCapsOption ICharFeatures::GetFontCapsOption( bool* isAssigned) const -{ - FontCapsOption ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFontCapsOption(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -FontBaselineOption ICharFeatures::GetFontBaselineOption( bool* isAssigned) const -{ - FontBaselineOption ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFontBaselineOption(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -FontOpenTypePositionOption ICharFeatures::GetFontOpenTypePositionOption( bool* isAssigned) const -{ - FontOpenTypePositionOption ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFontOpenTypePositionOption(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -StrikethroughPosition ICharFeatures::GetStrikethroughPosition( bool* isAssigned) const -{ - StrikethroughPosition ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetStrikethroughPosition(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -UnderlinePosition ICharFeatures::GetUnderlinePosition( bool* isAssigned) const -{ - UnderlinePosition ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetUnderlinePosition(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetUnderlineOffset( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetUnderlineOffset(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -bool ICharFeatures::GetLigature( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLigature(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetDiscretionaryLigatures( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetDiscretionaryLigatures(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetContextualLigatures( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetContextualLigatures(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetAlternateLigatures( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetAlternateLigatures(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetOldStyle( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetOldStyle(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetFractions( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFractions(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetOrdinals( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetOrdinals(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetSwash( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetSwash(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetTitling( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetTitling(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetConnectionForms( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetConnectionForms(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetStylisticAlternates( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetStylisticAlternates(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetOrnaments( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetOrnaments(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -FigureStyle ICharFeatures::GetFigureStyle( bool* isAssigned) const -{ - FigureStyle ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFigureStyle(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetProportionalMetrics( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetProportionalMetrics(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetKana( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetKana(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetRuby( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetRuby(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetItalics( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetItalics(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -BaselineDirection ICharFeatures::GetBaselineDirection( bool* isAssigned) const -{ - BaselineDirection ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetBaselineDirection(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -Language ICharFeatures::GetLanguage( bool* isAssigned) const -{ - Language ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLanguage(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -JapaneseAlternateFeature ICharFeatures::GetJapaneseAlternateFeature( bool* isAssigned) const -{ - JapaneseAlternateFeature ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetJapaneseAlternateFeature(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetTsume( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetTsume(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -StyleRunAlignment ICharFeatures::GetStyleRunAlignment( bool* isAssigned) const -{ - StyleRunAlignment ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetStyleRunAlignment(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetWariChuEnabled( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetWariChuEnabled(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 ICharFeatures::GetWariChuLineCount( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetWariChuLineCount(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 ICharFeatures::GetWariChuLineGap( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetWariChuLineGap(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetWariChuScale( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetWariChuScale(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetWariChuSize( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetWariChuSize(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Int32 ICharFeatures::GetWariChuWidowAmount( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetWariChuWidowAmount(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 ICharFeatures::GetWariChuOrphanAmount( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetWariChuOrphanAmount(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -WariChuJustification ICharFeatures::GetWariChuJustification( bool* isAssigned) const -{ - WariChuJustification ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetWariChuJustification(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 ICharFeatures::GetTCYUpDownAdjustment( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetTCYUpDownAdjustment(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 ICharFeatures::GetTCYLeftRightAdjustment( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetTCYLeftRightAdjustment(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetLeftAki( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLeftAki(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetRightAki( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetRightAki(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -bool ICharFeatures::GetNoBreak( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetNoBreak(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -IApplicationPaint ICharFeatures::GetFillColor( bool* isAssigned) const -{ - ApplicationPaintRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFillColor(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return IApplicationPaint(ret); -} - -IApplicationPaint ICharFeatures::GetStrokeColor( bool* isAssigned) const -{ - ApplicationPaintRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetStrokeColor(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return IApplicationPaint(ret); -} - -bool ICharFeatures::GetFill( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFill(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetFillVisible( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFillVisible(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetStroke( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetStroke(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - - -bool ICharFeatures::GetStrokeVisible( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetStrokeVisible(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetFillFirst( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFillFirst(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetFillOverPrint( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFillOverPrint(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetStrokeOverPrint( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetStrokeOverPrint(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -IApplicationPaint ICharFeatures::GetFillBackgroundColor( bool* isAssigned) const -{ - ApplicationPaintRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFillBackgroundColor(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return IApplicationPaint(ret); -} - -bool ICharFeatures::GetFillBackground( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetFillBackground(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -LineCapType ICharFeatures::GetLineCap( bool* isAssigned) const -{ - LineCapType ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLineCap(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -LineJoinType ICharFeatures::GetLineJoin( bool* isAssigned) const -{ - LineJoinType ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLineJoin(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetLineWidth( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLineWidth(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetMiterLimit( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetMiterLimit(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetLineDashOffset( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLineDashOffset(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -IArrayReal ICharFeatures::GetLineDashArray( bool* isAssigned) const -{ - ArrayRealRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetLineDashArray(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return IArrayReal(ret); -} - -#if SLO_COMPLEXSCRIPT -Kashidas ICharFeatures::GetKashidas( bool* isAssigned) const -{ - Kashidas ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetKashidas(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -DirOverride ICharFeatures::GetDirOverride( bool* isAssigned) const -{ - DirOverride ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetDirOverride(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -DigitSet ICharFeatures::GetDigitSet( bool* isAssigned) const -{ - DigitSet ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetDigitSet(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -DiacVPos ICharFeatures::GetDiacVPos( bool* isAssigned) const -{ - DiacVPos ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetDiacVPos(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetDiacXOffset( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetDiacXOffset(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetDiacYOffset( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetDiacYOffset(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -bool ICharFeatures::GetAutoMydfb( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetAutoMydfb(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real ICharFeatures::GetMarkYDistFromBaseline( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetMarkYDistFromBaseline(fCharFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -bool ICharFeatures::GetOverlapSwash( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetOverlapSwash(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetJustificationAlternates( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetJustificationAlternates(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool ICharFeatures::GetStretchedAlternates( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sCharFeatures->GetStretchedAlternates(fCharFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} -#endif - -void ICharFeatures::SetFont( IFont newVal) -{ - ATEErr error = sCharFeatures->SetFont(fCharFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFontSize( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetFontSize(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetHorizontalScale( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetHorizontalScale(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetVerticalScale( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetVerticalScale(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetAutoLeading( bool newVal) -{ - ATEErr error = sCharFeatures->SetAutoLeading(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetLeading( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetLeading(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetTracking( ATETextDOM::Int32 newVal) -{ - ATEErr error = sCharFeatures->SetTracking(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetBaselineShift( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetBaselineShift(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetCharacterRotation( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetCharacterRotation(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetAutoKernType( AutoKernType newVal) -{ - ATEErr error = sCharFeatures->SetAutoKernType(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFontCapsOption( FontCapsOption newVal) -{ - ATEErr error = sCharFeatures->SetFontCapsOption(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFontBaselineOption( FontBaselineOption newVal) -{ - ATEErr error = sCharFeatures->SetFontBaselineOption(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFontOpenTypePositionOption( FontOpenTypePositionOption newVal) -{ - ATEErr error = sCharFeatures->SetFontOpenTypePositionOption(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetStrikethroughPosition( StrikethroughPosition newVal) -{ - ATEErr error = sCharFeatures->SetStrikethroughPosition(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetUnderlinePosition( UnderlinePosition newVal) -{ - ATEErr error = sCharFeatures->SetUnderlinePosition(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetUnderlineOffset( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetUnderlineOffset(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetLigature( bool newVal) -{ - ATEErr error = sCharFeatures->SetLigature(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetDiscretionaryLigatures( bool newVal) -{ - ATEErr error = sCharFeatures->SetDiscretionaryLigatures(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetContextualLigatures( bool newVal) -{ - ATEErr error = sCharFeatures->SetContextualLigatures(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetAlternateLigatures( bool newVal) -{ - ATEErr error = sCharFeatures->SetAlternateLigatures(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetOldStyle( bool newVal) -{ - ATEErr error = sCharFeatures->SetOldStyle(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFractions( bool newVal) -{ - ATEErr error = sCharFeatures->SetFractions(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetOrdinals( bool newVal) -{ - ATEErr error = sCharFeatures->SetOrdinals(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetSwash( bool newVal) -{ - ATEErr error = sCharFeatures->SetSwash(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetTitling( bool newVal) -{ - ATEErr error = sCharFeatures->SetTitling(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetConnectionForms( bool newVal) -{ - ATEErr error = sCharFeatures->SetConnectionForms(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetStylisticAlternates( bool newVal) -{ - ATEErr error = sCharFeatures->SetStylisticAlternates(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetOrnaments( bool newVal) -{ - ATEErr error = sCharFeatures->SetOrnaments(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFigureStyle( FigureStyle newVal) -{ - ATEErr error = sCharFeatures->SetFigureStyle(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetProportionalMetrics( bool newVal) -{ - ATEErr error = sCharFeatures->SetProportionalMetrics(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetKana( bool newVal) -{ - ATEErr error = sCharFeatures->SetKana(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetItalics( bool newVal) -{ - ATEErr error = sCharFeatures->SetItalics(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetRuby( bool newVal) -{ - ATEErr error = sCharFeatures->SetRuby(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetBaselineDirection( BaselineDirection newVal) -{ - ATEErr error = sCharFeatures->SetBaselineDirection(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetLanguage( Language newVal) -{ - ATEErr error = sCharFeatures->SetLanguage(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetJapaneseAlternateFeature( JapaneseAlternateFeature newVal) -{ - ATEErr error = sCharFeatures->SetJapaneseAlternateFeature(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetTsume( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetTsume(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetStyleRunAlignment( StyleRunAlignment newVal) -{ - ATEErr error = sCharFeatures->SetStyleRunAlignment(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetWariChuEnabled( bool newVal) -{ - ATEErr error = sCharFeatures->SetWariChuEnabled(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetWariChuLineCount( ATETextDOM::Int32 newVal) -{ - ATEErr error = sCharFeatures->SetWariChuLineCount(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetWariChuLineGap( ATETextDOM::Int32 newVal) -{ - ATEErr error = sCharFeatures->SetWariChuLineGap(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetWariChuScale( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetWariChuScale(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetWariChuSize( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetWariChuSize(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetWariChuWidowAmount( ATETextDOM::Int32 newVal) -{ - ATEErr error = sCharFeatures->SetWariChuWidowAmount(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetWariChuOrphanAmount( ATETextDOM::Int32 newVal) -{ - ATEErr error = sCharFeatures->SetWariChuOrphanAmount(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetWariChuJustification( WariChuJustification newVal) -{ - ATEErr error = sCharFeatures->SetWariChuJustification(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetTCYUpDownAdjustment( ATETextDOM::Int32 newVal) -{ - ATEErr error = sCharFeatures->SetTCYUpDownAdjustment(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetTCYLeftRightAdjustment( ATETextDOM::Int32 newVal) -{ - ATEErr error = sCharFeatures->SetTCYLeftRightAdjustment(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetLeftAki( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetLeftAki(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetRightAki( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetRightAki(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetNoBreak( bool newVal) -{ - ATEErr error = sCharFeatures->SetNoBreak(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFillColor( IApplicationPaint newVal) -{ - ATEErr error = sCharFeatures->SetFillColor(fCharFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetStrokeColor( IApplicationPaint newVal) -{ - ATEErr error = sCharFeatures->SetStrokeColor(fCharFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFill( bool newVal) -{ - ATEErr error = sCharFeatures->SetFill(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFillVisible( bool newVal) -{ - ATEErr error = sCharFeatures->SetFillVisible(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetStroke( bool newVal) -{ - ATEErr error = sCharFeatures->SetStroke(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetStrokeVisible( bool newVal) -{ - ATEErr error = sCharFeatures->SetStrokeVisible(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFillFirst( bool newVal) -{ - ATEErr error = sCharFeatures->SetFillFirst(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFillOverPrint( bool newVal) -{ - ATEErr error = sCharFeatures->SetFillOverPrint(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetStrokeOverPrint( bool newVal) -{ - ATEErr error = sCharFeatures->SetStrokeOverPrint(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFillBackgroundColor( IApplicationPaint newVal) -{ - ATEErr error = sCharFeatures->SetFillBackgroundColor(fCharFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetFillBackground( bool newVal) -{ - ATEErr error = sCharFeatures->SetFillBackground(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} -void ICharFeatures::SetLineCap( LineCapType newVal) -{ - ATEErr error = sCharFeatures->SetLineCap(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetLineJoin( LineJoinType newVal) -{ - ATEErr error = sCharFeatures->SetLineJoin(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetLineWidth( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetLineWidth(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetMiterLimit( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetMiterLimit(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetLineDashOffset( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetLineDashOffset(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetLineDashArray( IArrayReal newVal) -{ - ATEErr error = sCharFeatures->SetLineDashArray(fCharFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -#if SLO_COMPLEXSCRIPT -void ICharFeatures::SetKashidas( Kashidas newVal) -{ - ATEErr error = sCharFeatures->SetKashidas(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetDirOverride( DirOverride newVal) -{ - ATEErr error = sCharFeatures->SetDirOverride(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetDigitSet( DigitSet newVal) -{ - ATEErr error = sCharFeatures->SetDigitSet(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetDiacVPos( DiacVPos newVal) -{ - ATEErr error = sCharFeatures->SetDiacVPos(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetDiacXOffset( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetDiacXOffset(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetDiacYOffset( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetDiacYOffset(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetAutoMydfb( bool newVal) -{ - ATEErr error = sCharFeatures->SetAutoMydfb(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetMarkYDistFromBaseline( ATETextDOM::Real newVal) -{ - ATEErr error = sCharFeatures->SetMarkYDistFromBaseline(fCharFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetOverlapSwash( bool newVal) -{ - ATEErr error = sCharFeatures->SetOverlapSwash(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetJustificationAlternates( bool newVal) -{ - ATEErr error = sCharFeatures->SetJustificationAlternates(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::SetStretchedAlternates( bool newVal) -{ - ATEErr error = sCharFeatures->SetStretchedAlternates(fCharFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} -#endif - -void ICharFeatures::ClearFont( ) -{ - ATEErr error = sCharFeatures->ClearFont(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFontSize( ) -{ - ATEErr error = sCharFeatures->ClearFontSize(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearHorizontalScale( ) -{ - ATEErr error = sCharFeatures->ClearHorizontalScale(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearVerticalScale( ) -{ - ATEErr error = sCharFeatures->ClearVerticalScale(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearAutoLeading( ) -{ - ATEErr error = sCharFeatures->ClearAutoLeading(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLeading( ) -{ - ATEErr error = sCharFeatures->ClearLeading(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearTracking( ) -{ - ATEErr error = sCharFeatures->ClearTracking(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearBaselineShift( ) -{ - ATEErr error = sCharFeatures->ClearBaselineShift(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearCharacterRotation( ) -{ - ATEErr error = sCharFeatures->ClearCharacterRotation(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearAutoKernType( ) -{ - ATEErr error = sCharFeatures->ClearAutoKernType(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFontCapsOption( ) -{ - ATEErr error = sCharFeatures->ClearFontCapsOption(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFontBaselineOption( ) -{ - ATEErr error = sCharFeatures->ClearFontBaselineOption(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFontOpenTypePositionOption( ) -{ - ATEErr error = sCharFeatures->ClearFontOpenTypePositionOption(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearStrikethroughPosition( ) -{ - ATEErr error = sCharFeatures->ClearStrikethroughPosition(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearUnderlinePosition( ) -{ - ATEErr error = sCharFeatures->ClearUnderlinePosition(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearUnderlineOffset( ) -{ - ATEErr error = sCharFeatures->ClearUnderlineOffset(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLigature( ) -{ - ATEErr error = sCharFeatures->ClearLigature(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearDiscretionaryLigatures( ) -{ - ATEErr error = sCharFeatures->ClearDiscretionaryLigatures(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearContextualLigatures( ) -{ - ATEErr error = sCharFeatures->ClearContextualLigatures(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearAlternateLigatures( ) -{ - ATEErr error = sCharFeatures->ClearAlternateLigatures(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearOldStyle( ) -{ - ATEErr error = sCharFeatures->ClearOldStyle(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFractions( ) -{ - ATEErr error = sCharFeatures->ClearFractions(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearOrdinals( ) -{ - ATEErr error = sCharFeatures->ClearOrdinals(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearSwash( ) -{ - ATEErr error = sCharFeatures->ClearSwash(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearTitling( ) -{ - ATEErr error = sCharFeatures->ClearTitling(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearConnectionForms( ) -{ - ATEErr error = sCharFeatures->ClearConnectionForms(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearStylisticAlternates( ) -{ - ATEErr error = sCharFeatures->ClearStylisticAlternates(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearOrnaments( ) -{ - ATEErr error = sCharFeatures->ClearOrnaments(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFigureStyle( ) -{ - ATEErr error = sCharFeatures->ClearFigureStyle(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearProportionalMetrics( ) -{ - ATEErr error = sCharFeatures->ClearProportionalMetrics(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearKana( ) -{ - ATEErr error = sCharFeatures->ClearKana(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearItalics( ) -{ - ATEErr error = sCharFeatures->ClearItalics(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearRuby( ) -{ - ATEErr error = sCharFeatures->ClearRuby(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearBaselineDirection( ) -{ - ATEErr error = sCharFeatures->ClearBaselineDirection(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLanguage( ) -{ - ATEErr error = sCharFeatures->ClearLanguage(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearJapaneseAlternateFeature( ) -{ - ATEErr error = sCharFeatures->ClearJapaneseAlternateFeature(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearTsume( ) -{ - ATEErr error = sCharFeatures->ClearTsume(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearStyleRunAlignment( ) -{ - ATEErr error = sCharFeatures->ClearStyleRunAlignment(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearWariChuEnabled( ) -{ - ATEErr error = sCharFeatures->ClearWariChuEnabled(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearWariChuLineCount( ) -{ - ATEErr error = sCharFeatures->ClearWariChuLineCount(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearWariChuLineGap( ) -{ - ATEErr error = sCharFeatures->ClearWariChuLineGap(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearWariChuSubLineAmount( ) -{ - ATEErr error = sCharFeatures->ClearWariChuSubLineAmount(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearWariChuWidowAmount( ) -{ - ATEErr error = sCharFeatures->ClearWariChuWidowAmount(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearWariChuOrphanAmount( ) -{ - ATEErr error = sCharFeatures->ClearWariChuOrphanAmount(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearWariChuJustification( ) -{ - ATEErr error = sCharFeatures->ClearWariChuJustification(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearTCYUpDownAdjustment( ) -{ - ATEErr error = sCharFeatures->ClearTCYUpDownAdjustment(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearTCYLeftRightAdjustment( ) -{ - ATEErr error = sCharFeatures->ClearTCYLeftRightAdjustment(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLeftAki( ) -{ - ATEErr error = sCharFeatures->ClearLeftAki(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearRightAki( ) -{ - ATEErr error = sCharFeatures->ClearRightAki(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearNoBreak( ) -{ - ATEErr error = sCharFeatures->ClearNoBreak(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFillColor( ) -{ - ATEErr error = sCharFeatures->ClearFillColor(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearStrokeColor( ) -{ - ATEErr error = sCharFeatures->ClearStrokeColor(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFill( ) -{ - ATEErr error = sCharFeatures->ClearFill(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFillVisible( ) -{ - ATEErr error = sCharFeatures->ClearFillVisible(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearStroke( ) -{ - ATEErr error = sCharFeatures->ClearStroke(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearStrokeVisible( ) -{ - ATEErr error = sCharFeatures->ClearStrokeVisible(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFillFirst( ) -{ - ATEErr error = sCharFeatures->ClearFillFirst(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFillOverPrint( ) -{ - ATEErr error = sCharFeatures->ClearFillOverPrint(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearStrokeOverPrint( ) -{ - ATEErr error = sCharFeatures->ClearStrokeOverPrint(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFillBackgroundColor( ) -{ - ATEErr error = sCharFeatures->ClearFillBackgroundColor(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearFillBackground( ) -{ - ATEErr error = sCharFeatures->ClearFillBackground(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLineCap( ) -{ - ATEErr error = sCharFeatures->ClearLineCap(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLineJoin( ) -{ - ATEErr error = sCharFeatures->ClearLineJoin(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLineWidth( ) -{ - ATEErr error = sCharFeatures->ClearLineWidth(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearMiterLimit( ) -{ - ATEErr error = sCharFeatures->ClearMiterLimit(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLineDashOffset( ) -{ - ATEErr error = sCharFeatures->ClearLineDashOffset(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearLineDashArray( ) -{ - ATEErr error = sCharFeatures->ClearLineDashArray(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -#if SLO_COMPLEXSCRIPT -void ICharFeatures::ClearKashidas( ) -{ - ATEErr error = sCharFeatures->ClearKashidas(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearDirOverride( ) -{ - ATEErr error = sCharFeatures->ClearDirOverride(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearDigitSet( ) -{ - ATEErr error = sCharFeatures->ClearDigitSet(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearDiacVPos( ) -{ - ATEErr error = sCharFeatures->ClearDiacVPos(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearDiacXOffset( ) -{ - ATEErr error = sCharFeatures->ClearDiacXOffset(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearDiacYOffset( ) -{ - ATEErr error = sCharFeatures->ClearDiacYOffset(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearAutoMydfb( ) -{ - ATEErr error = sCharFeatures->ClearAutoMydfb(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearMarkYDistFromBaseline( ) -{ - ATEErr error = sCharFeatures->ClearMarkYDistFromBaseline(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearOverlapSwash( ) -{ - ATEErr error = sCharFeatures->ClearOverlapSwash(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearJustificationAlternates( ) -{ - ATEErr error = sCharFeatures->ClearJustificationAlternates(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} - -void ICharFeatures::ClearStretchedAlternates( ) -{ - ATEErr error = sCharFeatures->ClearStretchedAlternates(fCharFeatures); - if(error) Throw_ATE_Exception(error); -} -#endif - -bool ICharFeatures::IntersectFeatures( ICharFeatures rhs) -{ - ATEBool8 ret; - ATEErr error = sCharFeatures->IntersectFeatures(fCharFeatures, rhs.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharFeatures::ReplaceOrAddFeatures( ICharFeatures rhs) -{ - ATEBool8 ret; - ATEErr error = sCharFeatures->ReplaceOrAddFeatures(fCharFeatures, rhs.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharFeatures::UnassignEachIfEqual( ICharFeatures rhs) -{ - ATEBool8 ret; - ATEErr error = sCharFeatures->UnassignEachIfEqual(fCharFeatures, rhs.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharFeatures::IsEachNotAssigned( ) const -{ - ATEBool8 ret; - ATEErr error = sCharFeatures->IsEachNotAssigned(fCharFeatures, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharFeatures::IsEachAssigned( ) const -{ - ATEBool8 ret; - ATEErr error = sCharFeatures->IsEachAssigned(fCharFeatures, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --ICharInspector-- -////////////////////////////////////////////// - -ICharInspector::ICharInspector() -:fCharInspector(0) -{ - ATEErr error = sCharInspector->Initialize(&fCharInspector); - if(error) Throw_ATE_Exception(error); -} - -ICharInspector::ICharInspector(CharInspectorRef charinspector) -:fCharInspector(charinspector) -{ -} - -ICharInspector::ICharInspector(const ICharInspector& src) -:fCharInspector(src.fCharInspector) -{ - sCharInspector->AddRef(fCharInspector); -} - -ICharInspector::~ICharInspector() -{ - sCharInspector->Release(fCharInspector); -} - -ICharInspector& ICharInspector::operator=(const ICharInspector& rhs) -{ - if (&rhs != this) - { - sCharInspector->Release(fCharInspector); - fCharInspector = rhs.fCharInspector; - sCharInspector->AddRef(fCharInspector); - } - return *this; -} - -bool ICharInspector::operator==(const ICharInspector& rhs) const -{ - return fCharInspector == rhs.fCharInspector; -} - -bool ICharInspector::operator!=(const ICharInspector& rhs) const -{ - return !(*this == rhs); -} - -CharInspectorRef ICharInspector::GetRef() const -{ - return fCharInspector; -} - -bool ICharInspector::IsNull() const -{ - return sCharInspector->IsNull(fCharInspector); -} - -IArrayFontRef ICharInspector::GetFont( ) const -{ - ArrayFontRefRef ret = 0; - ATEErr error = sCharInspector->GetFont(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayFontRef(ret); -} - -IArrayReal ICharInspector::GetFontSize( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetFontSize(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal ICharInspector::GetHorizontalScale( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetHorizontalScale(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal ICharInspector::GetVerticalScale( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetVerticalScale(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayBool ICharInspector::GetSyntheticBold( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetSyntheticBold(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetSyntheticItalic( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetSyntheticItalic(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetAutoLeading( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetAutoLeading(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayReal ICharInspector::GetLeading( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetLeading(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayInteger ICharInspector::GetTracking( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sCharInspector->GetTracking(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayReal ICharInspector::GetBaselineShift( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetBaselineShift(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal ICharInspector::GetCharacterRotation( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetCharacterRotation(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayFontCapsOption ICharInspector::GetFontCapsOption( ) const -{ - ArrayFontCapsOptionRef ret = 0; - ATEErr error = sCharInspector->GetFontCapsOption(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayFontCapsOption(ret); -} - -IArrayFontBaselineOption ICharInspector::GetFontBaselineOption( ) const -{ - ArrayFontBaselineOptionRef ret = 0; - ATEErr error = sCharInspector->GetFontBaselineOption(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayFontBaselineOption(ret); -} - -IArrayFontOpenTypePositionOption ICharInspector::GetFontOpenTypePositionOption( ) const -{ - ArrayFontOpenTypePositionOptionRef ret = 0; - ATEErr error = sCharInspector->GetFontOpenTypePositionOption(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayFontOpenTypePositionOption(ret); -} - -IArrayStrikethroughPosition ICharInspector::GetStrikethroughPosition( ) const -{ - ArrayStrikethroughPositionRef ret = 0; - ATEErr error = sCharInspector->GetStrikethroughPosition(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayStrikethroughPosition(ret); -} - -IArrayUnderlinePosition ICharInspector::GetUnderlinePosition( ) const -{ - ArrayUnderlinePositionRef ret = 0; - ATEErr error = sCharInspector->GetUnderlinePosition(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayUnderlinePosition(ret); -} - -IArrayReal ICharInspector::GetUnderlineOffset( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetUnderlineOffset(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayBool ICharInspector::GetLigature( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetLigature(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetDiscretionaryLigatures( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetDiscretionaryLigatures(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetContextualLigatures( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetContextualLigatures(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetAlternateLigatures( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetAlternateLigatures(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetOldStyle( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetOldStyle(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetFractions( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetFractions(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetOrdinals( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetOrdinals(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetSwash( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetSwash(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetTitling( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetTitling(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetConnectionForms( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetConnectionForms(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetStylisticAlternates( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetStylisticAlternates(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetOrnaments( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetOrnaments(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayFigureStyle ICharInspector::GetFigureStyle( ) const -{ - ArrayFigureStyleRef ret = 0; - ATEErr error = sCharInspector->GetFigureStyle(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayFigureStyle(ret); -} - -IArrayBool ICharInspector::GetProportionalMetrics( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetProportionalMetrics(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetKana( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetKana(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetItalics( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetItalics(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetRuby( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetRuby(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBaselineDirection ICharInspector::GetBaselineDirection( ) const -{ - ArrayBaselineDirectionRef ret = 0; - ATEErr error = sCharInspector->GetBaselineDirection(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBaselineDirection(ret); -} - -IArrayLanguage ICharInspector::GetLanguage( ) const -{ - ArrayLanguageRef ret = 0; - ATEErr error = sCharInspector->GetLanguage(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayLanguage(ret); -} - -IArrayReal ICharInspector::GetTsume( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetTsume(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayStyleRunAlignment ICharInspector::GetStyleRunAlignment( ) const -{ - ArrayStyleRunAlignmentRef ret = 0; - ATEErr error = sCharInspector->GetStyleRunAlignment(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayStyleRunAlignment(ret); -} - -IArrayInteger ICharInspector::GetWariChuLineCount( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sCharInspector->GetWariChuLineCount(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayInteger ICharInspector::GetWariChuLineGap( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sCharInspector->GetWariChuLineGap(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayReal ICharInspector::GetWariChuScale( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetWariChuScale(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal ICharInspector::GetWariChuSize( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetWariChuSize(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayInteger ICharInspector::GetWariChuWidowAmount( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sCharInspector->GetWariChuWidowAmount(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayInteger ICharInspector::GetWariChuOrphanAmount( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sCharInspector->GetWariChuOrphanAmount(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayWariChuJustification ICharInspector::GetWariChuJustification( ) const -{ - ArrayWariChuJustificationRef ret = 0; - ATEErr error = sCharInspector->GetWariChuJustification(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayWariChuJustification(ret); -} - -IArrayBool ICharInspector::GetWariChuEnabled( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetWariChuEnabled(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayInteger ICharInspector::GetTCYUpDownAdjustment( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sCharInspector->GetTCYUpDownAdjustment(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayInteger ICharInspector::GetTCYLeftRightAdjustment( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sCharInspector->GetTCYLeftRightAdjustment(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayReal ICharInspector::GetLeftAki( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetLeftAki(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal ICharInspector::GetRightAki( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetRightAki(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayBool ICharInspector::GetNoBreak( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetNoBreak(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayApplicationPaintRef ICharInspector::GetFillColor( ) const -{ - ArrayApplicationPaintRefRef ret = 0; - ATEErr error = sCharInspector->GetFillColor(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayApplicationPaintRef(ret); -} - -IArrayApplicationPaintRef ICharInspector::GetStrokeColor( ) const -{ - ArrayApplicationPaintRefRef ret = 0; - ATEErr error = sCharInspector->GetStrokeColor(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayApplicationPaintRef(ret); -} - -IArrayBool ICharInspector::GetFill( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetFill(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetFillVisible( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetFillVisible(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetStroke( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetStroke(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetStrokeVisible( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetStrokeVisible(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetFillFirst( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetFillFirst(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetFillOverPrint( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetFillOverPrint(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetStrokeOverPrint( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetStrokeOverPrint(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayApplicationPaintRef ICharInspector::GetFillBackgroundColor( ) const -{ - ArrayApplicationPaintRefRef ret = 0; - ATEErr error = sCharInspector->GetFillBackgroundColor(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayApplicationPaintRef(ret); -} - -IArrayBool ICharInspector::GetFillBackground( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetFillBackground(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayLineCapType ICharInspector::GetLineCap( ) const -{ - ArrayLineCapTypeRef ret = 0; - ATEErr error = sCharInspector->GetLineCap(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayLineCapType(ret); -} - -IArrayLineJoinType ICharInspector::GetLineJoin( ) const -{ - ArrayLineJoinTypeRef ret = 0; - ATEErr error = sCharInspector->GetLineJoin(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayLineJoinType(ret); -} - -IArrayReal ICharInspector::GetLineWidth( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetLineWidth(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal ICharInspector::GetMiterLimit( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetMiterLimit(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal ICharInspector::GetLineDashOffset( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetLineDashOffset(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayArrayReal ICharInspector::GetLineDashArray( ) const -{ - ArrayArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetLineDashArray(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayArrayReal(ret); -} - -#if SLO_COMPLEXSCRIPT -IArrayKashidas ICharInspector::GetKashidas( ) const -{ - ArrayKashidasRef ret = 0; - ATEErr error = sCharInspector->GetKashidas(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayKashidas(ret); -} - -IArrayDirOverride ICharInspector::GetDirOverride( ) const -{ - ArrayDirOverrideRef ret = 0; - ATEErr error = sCharInspector->GetDirOverride(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayDirOverride(ret); -} - -IArrayDigitSet ICharInspector::GetDigitSet( ) const -{ - ArrayDigitSetRef ret = 0; - ATEErr error = sCharInspector->GetDigitSet(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayDigitSet(ret); -} - -IArrayDiacVPos ICharInspector::GetDiacVPos( ) const -{ - ArrayDiacVPosRef ret = 0; - ATEErr error = sCharInspector->GetDiacVPos(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayDiacVPos(ret); -} - -IArrayReal ICharInspector::GetDiacXOffset( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetDiacXOffset(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal ICharInspector::GetDiacYOffset( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetDiacYOffset(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayBool ICharInspector::GetAutoMydfb( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetAutoMydfb(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayReal ICharInspector::GetMarkYDistFromBaseline( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sCharInspector->GetMarkYDistFromBaseline(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayBool ICharInspector::GetOverlapSwash( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetOverlapSwash(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetJustificationAlternates( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetJustificationAlternates(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBool ICharInspector::GetStretchedAlternates( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sCharInspector->GetStretchedAlternates(fCharInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} -#endif - -////////////////////////////////////////////// -// --ICharStyle-- -////////////////////////////////////////////// - -ICharStyle::ICharStyle() -:fCharStyle(0) -{ -} - -ICharStyle::ICharStyle(CharStyleRef charstyle) -:fCharStyle(charstyle) -{ -} - -ICharStyle::ICharStyle(const ICharStyle& src) -:fCharStyle(src.fCharStyle) -{ - sCharStyle->AddRef(fCharStyle); -} - -ICharStyle::~ICharStyle() -{ - sCharStyle->Release(fCharStyle); -} - -ICharStyle& ICharStyle::operator=(const ICharStyle& rhs) -{ - if (&rhs != this) - { - sCharStyle->Release(fCharStyle); - fCharStyle = rhs.fCharStyle; - sCharStyle->AddRef(fCharStyle); - } - return *this; -} - -bool ICharStyle::operator==(const ICharStyle& rhs) const -{ - ATEBool8 ret = false; - ATEErr error = sCharStyle->IsEqual(fCharStyle, rhs.fCharStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharStyle::operator!=(const ICharStyle& rhs) const -{ - return !(*this == rhs); -} - -CharStyleRef ICharStyle::GetRef() const -{ - return fCharStyle; -} - -bool ICharStyle::IsNull() const -{ - return sCharStyle->IsNull(fCharStyle); -} - -ATETextDOM::Int32 ICharStyle::GetName( ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCharStyle->GetName(fCharStyle, pName, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharStyle::SetName( const ATETextDOM::Unicode* pName) -{ - ATEBool8 ret; - ATEErr error = sCharStyle->SetName(fCharStyle, pName, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICharStyle ICharStyle::GetParent( ) const -{ - CharStyleRef ret = 0; - ATEErr error = sCharStyle->GetParent(fCharStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyle(ret); -} - -bool ICharStyle::SetParent( const ICharStyle pStyle) -{ - ATEBool8 ret; - ATEErr error = sCharStyle->SetParent(fCharStyle, pStyle.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharStyle::HasParent( ) const -{ - ATEBool8 ret; - ATEErr error = sCharStyle->HasParent(fCharStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICharFeatures ICharStyle::GetFeatures( ) const -{ - CharFeaturesRef ret = 0; - ATEErr error = sCharStyle->GetFeatures(fCharStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ICharFeatures(ret); -} - -void ICharStyle::SetFeatures( ICharFeatures pFeatures) -{ - ATEErr error = sCharStyle->SetFeatures(fCharStyle, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ICharStyle::ReplaceOrAddFeatures( ICharFeatures pFeatures) -{ - ATEErr error = sCharStyle->ReplaceOrAddFeatures(fCharStyle, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --ICharStyles-- -////////////////////////////////////////////// - -ICharStyles::ICharStyles() -:fCharStyles(0) -{ -} - -ICharStyles::ICharStyles(CharStylesRef charstyles) -:fCharStyles(charstyles) -{ -} - -ICharStyles::ICharStyles(const ICharStyles& src) -:fCharStyles(src.fCharStyles) -{ - sCharStyles->AddRef(fCharStyles); -} - -ICharStyles::~ICharStyles() -{ - sCharStyles->Release(fCharStyles); -} - -ICharStyles& ICharStyles::operator=(const ICharStyles& rhs) -{ - if (&rhs != this) - { - sCharStyles->Release(fCharStyles); - fCharStyles = rhs.fCharStyles; - sCharStyles->AddRef(fCharStyles); - } - return *this; -} - -bool ICharStyles::operator==(const ICharStyles& rhs) const -{ - return fCharStyles == rhs.fCharStyles; -} - -bool ICharStyles::operator!=(const ICharStyles& rhs) const -{ - return !(*this == rhs); -} - -CharStylesRef ICharStyles::GetRef() const -{ - return fCharStyles; -} - -bool ICharStyles::IsNull() const -{ - return sCharStyles->IsNull(fCharStyles); -} - -bool ICharStyles::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sCharStyles->IsEmpty(fCharStyles, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ICharStyles::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sCharStyles->GetSize(fCharStyles, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ICharStyles::ShowAllStyles( ) const -{ - ATEErr error = sCharStyles->ShowAllStyles(fCharStyles); - if(error) Throw_ATE_Exception(error); -} - -void ICharStyles::ShowOnlyUnreferencedStyles( ) const -{ - ATEErr error = sCharStyles->ShowOnlyUnreferencedStyles(fCharStyles); - if(error) Throw_ATE_Exception(error); -} - -void ICharStyles::ShowOnlyStylesReferencedIn( ITextRange pRange) const -{ - ATEErr error = sCharStyles->ShowOnlyStylesReferencedIn(fCharStyles, pRange.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ICharStyles::MoveStyleTo( ICharStyle pStyle, ATETextDOM::Int32 position) -{ - ATEErr error = sCharStyles->MoveStyleTo(fCharStyles, pStyle.GetRef(), position); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --ICharStylesIterator-- -////////////////////////////////////////////// - -ICharStylesIterator::ICharStylesIterator() -:fCharStylesIterator(0) -{ -} - -ICharStylesIterator::ICharStylesIterator(CharStylesIteratorRef charstylesiterator) -:fCharStylesIterator(charstylesiterator) -{ -} - -ICharStylesIterator::ICharStylesIterator(const ICharStylesIterator& src) -:fCharStylesIterator(src.fCharStylesIterator) -{ - sCharStylesIterator->AddRef(fCharStylesIterator); -} - -ICharStylesIterator::~ICharStylesIterator() -{ - sCharStylesIterator->Release(fCharStylesIterator); -} - -ICharStylesIterator& ICharStylesIterator::operator=(const ICharStylesIterator& rhs) -{ - if (&rhs != this) - { - sCharStylesIterator->Release(fCharStylesIterator); - fCharStylesIterator = rhs.fCharStylesIterator; - sCharStylesIterator->AddRef(fCharStylesIterator); - } - return *this; -} - -bool ICharStylesIterator::operator==(const ICharStylesIterator& rhs) const -{ - return fCharStylesIterator == rhs.fCharStylesIterator; -} - -bool ICharStylesIterator::operator!=(const ICharStylesIterator& rhs) const -{ - return !(*this == rhs); -} - -CharStylesIteratorRef ICharStylesIterator::GetRef() const -{ - return fCharStylesIterator; -} - -bool ICharStylesIterator::IsNull() const -{ - return sCharStylesIterator->IsNull(fCharStylesIterator); -} - -ICharStylesIterator::ICharStylesIterator( ICharStyles pStyles, Direction direction) -{ - ATEErr error = sCharStylesIterator->Initialize(pStyles.GetRef(), direction, &fCharStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -bool ICharStylesIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sCharStylesIterator->IsNotDone(fCharStylesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharStylesIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sCharStylesIterator->IsDone(fCharStylesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ICharStylesIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sCharStylesIterator->IsEmpty(fCharStylesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ICharStylesIterator::MoveToFirst( ) -{ - ATEErr error = sCharStylesIterator->MoveToFirst(fCharStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -void ICharStylesIterator::MoveToLast( ) -{ - ATEErr error = sCharStylesIterator->MoveToLast(fCharStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -void ICharStylesIterator::Next( ) -{ - ATEErr error = sCharStylesIterator->Next(fCharStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -void ICharStylesIterator::Previous( ) -{ - ATEErr error = sCharStylesIterator->Previous(fCharStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -ICharStyle ICharStylesIterator::Item( ) const -{ - CharStyleRef ret = 0; - ATEErr error = sCharStylesIterator->Item(fCharStylesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyle(ret); -} - -////////////////////////////////////////////// -// --IFind-- -////////////////////////////////////////////// - -IFind::IFind() -:fFind(0) -{ -} - -IFind::IFind(FindRef find) -:fFind(find) -{ -} - -IFind::IFind(const IFind& src) -:fFind(src.fFind) -{ - sFind->AddRef(fFind); -} - -IFind::~IFind() -{ - sFind->Release(fFind); -} - -IFind& IFind::operator=(const IFind& rhs) -{ - if (&rhs != this) - { - sFind->Release(fFind); - fFind = rhs.fFind; - sFind->AddRef(fFind); - } - return *this; -} - -bool IFind::operator==(const IFind& rhs) const -{ - return fFind == rhs.fFind; -} - -bool IFind::operator!=(const IFind& rhs) const -{ - return !(*this == rhs); -} - -FindRef IFind::GetRef() const -{ - return fFind; -} - -bool IFind::IsNull() const -{ - return sFind->IsNull(fFind); -} - -Direction IFind::GetSearchDirection( ) const -{ - Direction ret; - ATEErr error = sFind->GetSearchDirection(fFind, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFind::GetIgnoreCase( ) const -{ - ATEBool8 ret; - ATEErr error = sFind->GetIgnoreCase(fFind, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFind::GetWholeWord( ) const -{ - ATEBool8 ret; - ATEErr error = sFind->GetWholeWord(fFind, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFind::GetWrap( ) const -{ - ATEBool8 ret; - ATEErr error = sFind->GetWrap(fFind, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFind::GetFindWordsOutOfBounds( ) const -{ - ATEBool8 ret; - ATEErr error = sFind->GetFindWordsOutOfBounds(fFind, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -#if SLO_COMPLEXSCRIPT -bool IFind::GetIgnoreAccents( ) const -{ - ATEBool8 ret; - ATEErr error = sFind->GetIgnoreAccents(fFind, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFind::GetIgnoreKashidas( ) const -{ - ATEBool8 ret; - ATEErr error = sFind->GetIgnoreKashidas(fFind, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} -#endif - -void IFind::SetSearchDirection( Direction newValue) -{ - ATEErr error = sFind->SetSearchDirection(fFind, newValue); - if(error) Throw_ATE_Exception(error); -} - -void IFind::SetIgnoreCase( bool newValue) -{ - ATEErr error = sFind->SetIgnoreCase(fFind, newValue); - if(error) Throw_ATE_Exception(error); -} - -void IFind::SetWholeWord( bool newValue) -{ - ATEErr error = sFind->SetWholeWord(fFind, newValue); - if(error) Throw_ATE_Exception(error); -} - -void IFind::SetWrap( bool newValue) -{ - ATEErr error = sFind->SetWrap(fFind, newValue); - if(error) Throw_ATE_Exception(error); -} - -void IFind::SetFindWordsOutOfBounds( bool newValue) -{ - ATEErr error = sFind->SetFindWordsOutOfBounds(fFind, newValue); - if(error) Throw_ATE_Exception(error); -} - -#if SLO_COMPLEXSCRIPT -void IFind::SetIgnoreAccents( bool newValue) -{ - ATEErr error = sFind->SetIgnoreAccents(fFind, newValue); - if(error) Throw_ATE_Exception(error); -} - -void IFind::SetIgnoreKashidas( bool newValue) -{ - ATEErr error = sFind->SetIgnoreKashidas(fFind, newValue); - if(error) Throw_ATE_Exception(error); -} -#endif - -SearchScope IFind::GetSearchScope( ) const -{ - SearchScope ret; - ATEErr error = sFind->GetSearchScope(fFind, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IFind::SetSearchScope( SearchScope searchScope) -{ - ATEErr error = sFind->SetSearchScope(fFind, searchScope); - if(error) Throw_ATE_Exception(error); -} - -void IFind::SetSearchRange( ITextRange pRange) -{ - ATEErr error = sFind->SetSearchRange(fFind, pRange.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IFind::SetSearchChars( ATETextDOM::Unicode* pSearchChars) -{ - ATEErr error = sFind->SetSearchChars(fFind, pSearchChars); - if(error) Throw_ATE_Exception(error); -} - -void IFind::GetSearchChars( ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length) const -{ - ATEErr error = sFind->GetSearchChars(fFind, pSearchChars, length); - if(error) Throw_ATE_Exception(error); -} - -void IFind::SetReplaceChars( ATETextDOM::Unicode* pSearchChars) -{ - ATEErr error = sFind->SetReplaceChars(fFind, pSearchChars); - if(error) Throw_ATE_Exception(error); -} - -void IFind::GetReplaceChars( ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length) const -{ - ATEErr error = sFind->GetReplaceChars(fFind, pSearchChars, length); - if(error) Throw_ATE_Exception(error); -} - -void IFind::Reset( ) -{ - ATEErr error = sFind->Reset(fFind); - if(error) Throw_ATE_Exception(error); -} - -bool IFind::FindMatch( ITextRange pTextRange) -{ - ATEBool8 ret; - ATEErr error = sFind->FindMatch(fFind, pTextRange.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFind::FindNextMatch( ITextRange pTextRange) -{ - ATEBool8 ret; - ATEErr error = sFind->FindNextMatch(fFind, pTextRange.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFind::ReplaceMatch( ITextRange pTextRange, bool findNext) -{ - ATEBool8 ret; - ATEErr error = sFind->ReplaceMatch(fFind, pTextRange.GetRef(), findNext, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFind::FindAndReplaceAllMatches( ATETextDOM::Int32* pReplaceCount) -{ - ATEBool8 ret; - ATEErr error = sFind->FindAndReplaceAllMatches(fFind, pReplaceCount, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IFind::GetPreReplaceAllSettings( ATETextDOM::Int32* pCurrentPoint, ATETextDOM::Int32* pStartPoint) const -{ - ATEErr error = sFind->GetPreReplaceAllSettings(fFind, pCurrentPoint, pStartPoint); - if(error) Throw_ATE_Exception(error); -} - -void IFind::RestorePreReplaceAllSettings( const ATETextDOM::Int32 currentPoint, const ATETextDOM::Int32 startPoint) -{ - ATEErr error = sFind->RestorePreReplaceAllSettings(fFind, currentPoint, startPoint); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IFont-- -////////////////////////////////////////////// - -IFont::IFont() -:fFont(0) -{ -} - -IFont::IFont(FontRef font) -:fFont(font) -{ -} - -IFont::IFont(const IFont& src) -:fFont(src.fFont) -{ - sFont->AddRef(fFont); -} - -IFont::~IFont() -{ - sFont->Release(fFont); -} - -IFont& IFont::operator=(const IFont& rhs) -{ - if (&rhs != this) - { - sFont->Release(fFont); - fFont = rhs.fFont; - sFont->AddRef(fFont); - } - return *this; -} - -bool IFont::operator==(const IFont& rhs) const -{ - return fFont == rhs.fFont; -} - -bool IFont::operator!=(const IFont& rhs) const -{ - return !(*this == rhs); -} - -FontRef IFont::GetRef() const -{ - return fFont; -} - -bool IFont::IsNull() const -{ - return sFont->IsNull(fFont); -} - -bool IFont::IsCoolTypeTechnology( ) const -{ - ATEBool8 ret; - ATEErr error = sFont->IsCoolTypeTechnology(fFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IFont::IsVerticalRomanGlyphsOnSideByDefault( bool withItalics, StyleRunAlignment characterAlignment) const -{ - ATEBool8 ret; - ATEErr error = sFont->IsVerticalRomanGlyphsOnSideByDefault(fFont, withItalics, characterAlignment, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void* IFont::GetCTFontDict( ) -{ - void* ret; - ATEErr error = sFont->GetCTFontDict(fFont, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IGlyph-- -////////////////////////////////////////////// - -IGlyph::IGlyph() -:fGlyph(0) -{ -} - -IGlyph::IGlyph(GlyphRef glyph) -:fGlyph(glyph) -{ -} - -IGlyph::IGlyph(const IGlyph& src) -:fGlyph(src.fGlyph) -{ - sGlyph->AddRef(fGlyph); -} - -IGlyph::~IGlyph() -{ - sGlyph->Release(fGlyph); -} - -IGlyph& IGlyph::operator=(const IGlyph& rhs) -{ - if (&rhs != this) - { - sGlyph->Release(fGlyph); - fGlyph = rhs.fGlyph; - sGlyph->AddRef(fGlyph); - } - return *this; -} - -bool IGlyph::operator==(const IGlyph& rhs) const -{ - return fGlyph == rhs.fGlyph; -} - -bool IGlyph::operator!=(const IGlyph& rhs) const -{ - return !(*this == rhs); -} - -GlyphRef IGlyph::GetRef() const -{ - return fGlyph; -} - -bool IGlyph::IsNull() const -{ - return sGlyph->IsNull(fGlyph); -} - -ATEGlyphID IGlyph::GetGlyphID( ) const -{ - ATEGlyphID ret; - ATEErr error = sGlyph->GetGlyphID(fGlyph, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IGlyphs IGlyph::GetAlternateGlyphs( ) const -{ - GlyphsRef ret = 0; - ATEErr error = sGlyph->GetAlternateGlyphs(fGlyph, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyphs(ret); -} - -void IGlyph::GetOTFeatures( char** otFeatures, ATETextDOM::Int32* otFeatureCount, ATETextDOM::Int32** otFeatureIndex) -{ - ATEErr error = sGlyph->GetOTFeatures(fGlyph, otFeatures, otFeatureCount, otFeatureIndex); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IGlyphs-- -////////////////////////////////////////////// - -IGlyphs::IGlyphs() -:fGlyphs(0) -{ -} - -IGlyphs::IGlyphs(GlyphsRef glyphs) -:fGlyphs(glyphs) -{ -} - -IGlyphs::IGlyphs(const IGlyphs& src) -:fGlyphs(src.fGlyphs) -{ - sGlyphs->AddRef(fGlyphs); -} - -IGlyphs::~IGlyphs() -{ - sGlyphs->Release(fGlyphs); -} - -IGlyphs& IGlyphs::operator=(const IGlyphs& rhs) -{ - if (&rhs != this) - { - sGlyphs->Release(fGlyphs); - fGlyphs = rhs.fGlyphs; - sGlyphs->AddRef(fGlyphs); - } - return *this; -} - -bool IGlyphs::operator==(const IGlyphs& rhs) const -{ - return fGlyphs == rhs.fGlyphs; -} - -bool IGlyphs::operator!=(const IGlyphs& rhs) const -{ - return !(*this == rhs); -} - -GlyphsRef IGlyphs::GetRef() const -{ - return fGlyphs; -} - -bool IGlyphs::IsNull() const -{ - return sGlyphs->IsNull(fGlyphs); -} - -ATETextDOM::Int32 IGlyphs::GetSize( ) -{ - ATETextDOM::Int32 ret; - ATEErr error = sGlyphs->GetSize(fGlyphs, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IGlyph IGlyphs::GetFirst( ) -{ - GlyphRef ret = 0; - ATEErr error = sGlyphs->GetFirst(fGlyphs, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -IGlyph IGlyphs::GetLast( ) -{ - GlyphRef ret = 0; - ATEErr error = sGlyphs->GetLast(fGlyphs, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -ITextRanges IGlyphs::GetTextRanges( ) const -{ - TextRangesRef ret = 0; - ATEErr error = sGlyphs->GetTextRanges(fGlyphs, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -ITextRanges IGlyphs::GetTextSelection( ) const -{ - TextRangesRef ret = 0; - ATEErr error = sGlyphs->GetTextSelection(fGlyphs, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -IParagraphsIterator IGlyphs::GetParagraphsIterator( ) const -{ - ParagraphsIteratorRef ret = 0; - ATEErr error = sGlyphs->GetParagraphsIterator(fGlyphs, &ret); - if(error) Throw_ATE_Exception(error); - return IParagraphsIterator(ret); -} - -ITextRunsIterator IGlyphs::GetTextRunsIterator( ) const -{ - TextRunsIteratorRef ret = 0; - ATEErr error = sGlyphs->GetTextRunsIterator(fGlyphs, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRunsIterator(ret); -} - -IWordsIterator IGlyphs::GetWordsIterator( ) const -{ - WordsIteratorRef ret = 0; - ATEErr error = sGlyphs->GetWordsIterator(fGlyphs, &ret); - if(error) Throw_ATE_Exception(error); - return IWordsIterator(ret); -} - -void IGlyphs::Add( const IGlyph& glyph) -{ - ATEErr error = sGlyphs->Add(fGlyphs, glyph.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -IGlyph IGlyphs::Item( ATETextDOM::Int32 nIndex) const -{ - GlyphRef ret = 0; - ATEErr error = sGlyphs->Item(fGlyphs, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -void IGlyphs::RemoveAll( ) -{ - ATEErr error = sGlyphs->RemoveAll(fGlyphs); - if(error) Throw_ATE_Exception(error); -} - -void IGlyphs::Remove( ATETextDOM::Int32 nIndex) -{ - ATEErr error = sGlyphs->Remove(fGlyphs, nIndex); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IGlyphsIterator-- -////////////////////////////////////////////// - -IGlyphsIterator::IGlyphsIterator() -:fGlyphsIterator(0) -{ -} - -IGlyphsIterator::IGlyphsIterator(GlyphsIteratorRef glyphsiterator) -:fGlyphsIterator(glyphsiterator) -{ -} - -IGlyphsIterator::IGlyphsIterator(const IGlyphsIterator& src) -:fGlyphsIterator(src.fGlyphsIterator) -{ - sGlyphsIterator->AddRef(fGlyphsIterator); -} - -IGlyphsIterator::~IGlyphsIterator() -{ - sGlyphsIterator->Release(fGlyphsIterator); -} - -IGlyphsIterator& IGlyphsIterator::operator=(const IGlyphsIterator& rhs) -{ - if (&rhs != this) - { - sGlyphsIterator->Release(fGlyphsIterator); - fGlyphsIterator = rhs.fGlyphsIterator; - sGlyphsIterator->AddRef(fGlyphsIterator); - } - return *this; -} - -bool IGlyphsIterator::operator==(const IGlyphsIterator& rhs) const -{ - return fGlyphsIterator == rhs.fGlyphsIterator; -} - -bool IGlyphsIterator::operator!=(const IGlyphsIterator& rhs) const -{ - return !(*this == rhs); -} - -GlyphsIteratorRef IGlyphsIterator::GetRef() const -{ - return fGlyphsIterator; -} - -bool IGlyphsIterator::IsNull() const -{ - return sGlyphsIterator->IsNull(fGlyphsIterator); -} - -IGlyphsIterator::IGlyphsIterator( IGlyphs glyphs, Direction direction) -{ - ATEErr error = sGlyphsIterator->Initialize(glyphs.GetRef(), direction, &fGlyphsIterator); - if(error) Throw_ATE_Exception(error); -} - -bool IGlyphsIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sGlyphsIterator->IsNotDone(fGlyphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IGlyphsIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sGlyphsIterator->IsDone(fGlyphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IGlyphsIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sGlyphsIterator->IsEmpty(fGlyphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IGlyph IGlyphsIterator::GetFirst( ) -{ - GlyphRef ret = 0; - ATEErr error = sGlyphsIterator->GetFirst(fGlyphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -IGlyph IGlyphsIterator::GetLast( ) -{ - GlyphRef ret = 0; - ATEErr error = sGlyphsIterator->GetLast(fGlyphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -IGlyph IGlyphsIterator::GetNext( ) -{ - GlyphRef ret = 0; - ATEErr error = sGlyphsIterator->GetNext(fGlyphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -IGlyph IGlyphsIterator::Item( ) const -{ - GlyphRef ret = 0; - ATEErr error = sGlyphsIterator->Item(fGlyphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return IGlyph(ret); -} - -void IGlyphsIterator::Next( ) -{ - ATEErr error = sGlyphsIterator->Next(fGlyphsIterator); - if(error) Throw_ATE_Exception(error); -} - -void IGlyphsIterator::Previous( ) -{ - ATEErr error = sGlyphsIterator->Previous(fGlyphsIterator); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IKinsoku-- -////////////////////////////////////////////// - -IKinsoku::IKinsoku() -:fKinsoku(0) -{ - ATEErr error = sKinsoku->Initialize(&fKinsoku); - if(error) Throw_ATE_Exception(error); -} - -IKinsoku::IKinsoku(KinsokuRef kinsoku) -:fKinsoku(kinsoku) -{ -} - -IKinsoku::IKinsoku(const IKinsoku& src) -:fKinsoku(src.fKinsoku) -{ - sKinsoku->AddRef(fKinsoku); -} - -IKinsoku::~IKinsoku() -{ - sKinsoku->Release(fKinsoku); -} - -IKinsoku& IKinsoku::operator=(const IKinsoku& rhs) -{ - if (&rhs != this) - { - sKinsoku->Release(fKinsoku); - fKinsoku = rhs.fKinsoku; - sKinsoku->AddRef(fKinsoku); - } - return *this; -} - -bool IKinsoku::operator==(const IKinsoku& rhs) const -{ - ATEBool8 ret = false; - ATEErr error = sKinsoku->IsEqual(fKinsoku, rhs.fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsoku::operator!=(const IKinsoku& rhs) const -{ - return !(*this == rhs); -} - -KinsokuRef IKinsoku::GetRef() const -{ - return fKinsoku; -} - -bool IKinsoku::IsNull() const -{ - return sKinsoku->IsNull(fKinsoku); -} - -ATETextDOM::Int32 IKinsoku::GetName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetName(fKinsoku, name, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsoku::GetNameSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetNameSize(fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IKinsoku::SetName( const ATETextDOM::Unicode* name) -{ - ATEErr error = sKinsoku->SetName(fKinsoku, name); - if(error) Throw_ATE_Exception(error); -} - -bool IKinsoku::MatchesPredefinedResourceTag( ATE::KinsokuPredefinedTag tag) const -{ - ATEBool8 ret; - ATEErr error = sKinsoku->MatchesPredefinedResourceTag(fKinsoku, tag, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsoku::GetNoStartCharSet( ATETextDOM::Unicode* noStartCharSet, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetNoStartCharSet(fKinsoku, noStartCharSet, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsoku::GetNoStartCharSetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetNoStartCharSetSize(fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IKinsoku::SetNoStartCharSet( const ATETextDOM::Unicode* noStartCharSet) -{ - ATEErr error = sKinsoku->SetNoStartCharSet(fKinsoku, noStartCharSet); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 IKinsoku::GetNoEndCharSet( ATETextDOM::Unicode* noEndCharSet, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetNoEndCharSet(fKinsoku, noEndCharSet, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsoku::GetNoEndCharSetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetNoEndCharSetSize(fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IKinsoku::SetNoEndCharSet( const ATETextDOM::Unicode* noEndCharSet) -{ - ATEErr error = sKinsoku->SetNoEndCharSet(fKinsoku, noEndCharSet); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 IKinsoku::GetNoBreakCharSet( ATETextDOM::Unicode* noBreakCharSet, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetNoBreakCharSet(fKinsoku, noBreakCharSet, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsoku::GetNoBreakCharSetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetNoBreakCharSetSize(fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IKinsoku::SetNoBreakCharSet( const ATETextDOM::Unicode* noBreakCharSet) -{ - ATEErr error = sKinsoku->SetNoBreakCharSet(fKinsoku, noBreakCharSet); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 IKinsoku::GetHangingCharSet( ATETextDOM::Unicode* hangingCharSet, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetHangingCharSet(fKinsoku, hangingCharSet, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsoku::GetHangingCharSetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsoku->GetHangingCharSetSize(fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IKinsoku::SetHangingCharSet( const ATETextDOM::Unicode* hangingCharSet) -{ - ATEErr error = sKinsoku->SetHangingCharSet(fKinsoku, hangingCharSet); - if(error) Throw_ATE_Exception(error); -} - -bool IKinsoku::IsNoStartChar( ATETextDOM::Unicode character) const -{ - ATEBool8 ret; - ATEErr error = sKinsoku->IsNoStartChar(fKinsoku, character, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsoku::IsNoEndChar( ATETextDOM::Unicode character) const -{ - ATEBool8 ret; - ATEErr error = sKinsoku->IsNoEndChar(fKinsoku, character, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsoku::IsNoBreakChar( ATETextDOM::Unicode character) const -{ - ATEBool8 ret; - ATEErr error = sKinsoku->IsNoBreakChar(fKinsoku, character, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsoku::IsHangingChar( ATETextDOM::Unicode character) const -{ - ATEBool8 ret; - ATEErr error = sKinsoku->IsHangingChar(fKinsoku, character, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsoku::IsEquivalent( IKinsoku rhsKinsoku) const -{ - ATEBool8 ret; - ATEErr error = sKinsoku->IsEquivalent(fKinsoku, rhsKinsoku.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsoku::IsModified( ) const -{ - ATEBool8 ret; - ATEErr error = sKinsoku->IsModified(fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsoku::IsPredefined( ) const -{ - ATEBool8 ret; - ATEErr error = sKinsoku->IsPredefined(fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IKinsoku IKinsoku::Duplicate( ) const -{ - KinsokuRef ret = 0; - ATEErr error = sKinsoku->Duplicate(fKinsoku, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsoku(ret); -} - -////////////////////////////////////////////// -// --IKinsokuSet-- -////////////////////////////////////////////// - -IKinsokuSet::IKinsokuSet() -:fKinsokuSet(0) -{ -} - -IKinsokuSet::IKinsokuSet(KinsokuSetRef kinsokuset) -:fKinsokuSet(kinsokuset) -{ -} - -IKinsokuSet::IKinsokuSet(const IKinsokuSet& src) -:fKinsokuSet(src.fKinsokuSet) -{ - sKinsokuSet->AddRef(fKinsokuSet); -} - -IKinsokuSet::~IKinsokuSet() -{ - sKinsokuSet->Release(fKinsokuSet); -} - -IKinsokuSet& IKinsokuSet::operator=(const IKinsokuSet& rhs) -{ - if (&rhs != this) - { - sKinsokuSet->Release(fKinsokuSet); - fKinsokuSet = rhs.fKinsokuSet; - sKinsokuSet->AddRef(fKinsokuSet); - } - return *this; -} - -bool IKinsokuSet::operator==(const IKinsokuSet& rhs) const -{ - return fKinsokuSet == rhs.fKinsokuSet; -} - -bool IKinsokuSet::operator!=(const IKinsokuSet& rhs) const -{ - return !(*this == rhs); -} - -KinsokuSetRef IKinsokuSet::GetRef() const -{ - return fKinsokuSet; -} - -bool IKinsokuSet::IsNull() const -{ - return sKinsokuSet->IsNull(fKinsokuSet); -} - -ATETextDOM::Int32 IKinsokuSet::GetSize( ) -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsokuSet->GetSize(fKinsokuSet, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IKinsoku IKinsokuSet::GetFirst( ) -{ - KinsokuRef ret = 0; - ATEErr error = sKinsokuSet->GetFirst(fKinsokuSet, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsoku(ret); -} - -IKinsoku IKinsokuSet::GetLast( ) -{ - KinsokuRef ret = 0; - ATEErr error = sKinsokuSet->GetLast(fKinsokuSet, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsoku(ret); -} - -IKinsoku IKinsokuSet::Item( ATETextDOM::Int32 nIndex) const -{ - KinsokuRef ret = 0; - ATEErr error = sKinsokuSet->Item(fKinsokuSet, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return IKinsoku(ret); -} - -ATETextDOM::Int32 IKinsokuSet::Find( IKinsoku kinsoku) -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsokuSet->Find_ByKinsoku(fKinsokuSet, kinsoku.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsokuSet::Find( const ATETextDOM::Unicode* name) -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsokuSet->Find_ByName(fKinsokuSet, name, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsokuSet::Find( KinsokuPredefinedTag tag) -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsokuSet->Find_ByPredefinedKinsokuTag(fKinsokuSet, tag, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsokuSet::Remove( ATETextDOM::Int32 nIndex) -{ - ATEBool8 ret; - ATEErr error = sKinsokuSet->Remove(fKinsokuSet, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IKinsokuSet::Add( IKinsoku kinsoku) -{ - ATETextDOM::Int32 ret; - ATEErr error = sKinsokuSet->Add(fKinsokuSet, kinsoku.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IKinsokuSet::Replace( ATETextDOM::Int32 nIndex, IKinsoku kinsoku) -{ - ATEBool8 ret; - ATEErr error = sKinsokuSet->Replace(fKinsokuSet, nIndex, kinsoku.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IParaFeatures-- -////////////////////////////////////////////// - -IParaFeatures::IParaFeatures() -:fParaFeatures(0) -{ - ATEErr error = sParaFeatures->Initialize(&fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -IParaFeatures::IParaFeatures(ParaFeaturesRef parafeatures) -:fParaFeatures(parafeatures) -{ -} - -IParaFeatures::IParaFeatures(const IParaFeatures& src) -:fParaFeatures(src.fParaFeatures) -{ - sParaFeatures->AddRef(fParaFeatures); -} - -IParaFeatures::~IParaFeatures() -{ - sParaFeatures->Release(fParaFeatures); -} - -IParaFeatures& IParaFeatures::operator=(const IParaFeatures& rhs) -{ - if (&rhs != this) - { - sParaFeatures->Release(fParaFeatures); - fParaFeatures = rhs.fParaFeatures; - sParaFeatures->AddRef(fParaFeatures); - } - return *this; -} - -bool IParaFeatures::operator==(const IParaFeatures& rhs) const -{ - return fParaFeatures == rhs.fParaFeatures; -} - -bool IParaFeatures::operator!=(const IParaFeatures& rhs) const -{ - return !(*this == rhs); -} - -ParaFeaturesRef IParaFeatures::GetRef() const -{ - return fParaFeatures; -} - -bool IParaFeatures::IsNull() const -{ - return sParaFeatures->IsNull(fParaFeatures); -} - -IParaFeatures IParaFeatures::Clone( ) const -{ - ParaFeaturesRef ret = 0; - ATEErr error = sParaFeatures->Clone(fParaFeatures, &ret); - if(error) Throw_ATE_Exception(error); - return IParaFeatures(ret); -} - -ParagraphJustification IParaFeatures::GetJustification( bool* isAssigned) const -{ - ParagraphJustification ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetJustification(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetFirstLineIndent( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetFirstLineIndent(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetStartIndent( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetStartIndent(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetEndIndent( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetEndIndent(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetSpaceBefore( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetSpaceBefore(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetSpaceAfter( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATEBool8 isAssignedRet; - ATETextDOM::Float tempRet; - ATEErr error = sParaFeatures->GetSpaceAfter(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -bool IParaFeatures::GetAutoHyphenate( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetAutoHyphenate(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 IParaFeatures::GetHyphenatedWordSize( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetHyphenatedWordSize(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 IParaFeatures::GetPreHyphenSize( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetPreHyphenSize(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 IParaFeatures::GetPostHyphenSize( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetPostHyphenSize(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 IParaFeatures::GetConsecutiveHyphenLimit( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetConsecutiveHyphenLimit(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetHyphenationZone( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetHyphenationZone(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -bool IParaFeatures::GetHyphenateCapitalized( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetHyphenateCapitalized(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetHyphenationPreference( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetHyphenationPreference(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetDesiredWordSpacing( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetDesiredWordSpacing(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetMaxWordSpacing( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetMaxWordSpacing(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetMinWordSpacing( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetMinWordSpacing(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetDesiredLetterSpacing( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetDesiredLetterSpacing(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetMaxLetterSpacing( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetMaxLetterSpacing(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetMinLetterSpacing( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetMinLetterSpacing(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetDesiredGlyphScaling( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetDesiredGlyphScaling(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetMaxGlyphScaling( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetMaxGlyphScaling(fParaFeatures, &isAssignedRet, &tempRet); - if (isAssigned) *isAssigned = isAssignedRet; - if(error) Throw_ATE_Exception(error); - ret = tempRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetMinGlyphScaling( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetMinGlyphScaling(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -ParagraphJustification IParaFeatures::GetSingleWordJustification( bool* isAssigned) const -{ - ParagraphJustification ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetSingleWordJustification(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Real IParaFeatures::GetAutoLeadingPercentage( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetAutoLeadingPercentage(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -LeadingType IParaFeatures::GetLeadingType( bool* isAssigned) const -{ - LeadingType ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetLeadingType(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ITabStops IParaFeatures::GetTabStops( bool* isAssigned) const -{ - TabStopsRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetTabStops(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ITabStops(ret); -} - -ATETextDOM::Real IParaFeatures::GetDefaultTabWidth( bool* isAssigned) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetDefaultTabWidth(fParaFeatures, &isAssignedRet, &tempRet); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - ret = tempRet; - return ret; -} - -bool IParaFeatures::GetHangingRoman( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetHangingRoman(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATETextDOM::Int32 IParaFeatures::GetAutoTCY( bool* isAssigned) const -{ - ATETextDOM::Int32 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetAutoTCY(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool IParaFeatures::GetBunriKinshi( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetBunriKinshi(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -BurasagariType IParaFeatures::GetBurasagariType( bool* isAssigned) const -{ - BurasagariType ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetBurasagariType(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -PreferredKinsokuOrder IParaFeatures::GetPreferredKinsokuOrder( bool* isAssigned) const -{ - PreferredKinsokuOrder ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetPreferredKinsokuOrder(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -bool IParaFeatures::GetKurikaeshiMojiShori( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetKurikaeshiMojiShori(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -IKinsoku IParaFeatures::GetKinsoku( bool* isAssigned) const -{ - KinsokuRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetKinsoku(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return IKinsoku(ret); -} - -IMojiKumi IParaFeatures::GetMojiKumi( bool* isAssigned) const -{ - MojiKumiRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetMojiKumi(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return IMojiKumi(ret); -} - -bool IParaFeatures::GetEveryLineComposer( bool* isAssigned) const -{ - ATEBool8 ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetEveryLineComposer(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ICharFeatures IParaFeatures::GetDefaultCharFeatures( bool* isAssigned) const -{ - CharFeaturesRef ret = 0; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetDefaultCharFeatures(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ICharFeatures(ret); -} - -#if SLO_COMPLEXSCRIPT -ATE::ParagraphDirection IParaFeatures::GetParagraphDirection( bool* isAssigned) const -{ - ATE::ParagraphDirection ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetParagraphDirection(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATE::JustificationMethod IParaFeatures::GetJustificationMethod( bool* isAssigned) const -{ - ATE::JustificationMethod ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetJustificationMethod(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -ATE::KashidaWidth IParaFeatures::GetKashidaWidth( bool* isAssigned) const -{ - ATE::KashidaWidth ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetKashidaWidth(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} -#endif - -ATE::ComposerEngine IParaFeatures::GetComposerEngine( bool* isAssigned) const -{ - ATE::ComposerEngine ret; - ATEBool8 isAssignedRet; - ATEErr error = sParaFeatures->GetComposerEngine(fParaFeatures, &isAssignedRet, &ret); - if(error) Throw_ATE_Exception(error); - if (isAssigned) *isAssigned = isAssignedRet; - return ret; -} - -void IParaFeatures::SetJustification( ParagraphJustification newVal) -{ - ATEErr error = sParaFeatures->SetJustification(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetFirstLineIndent( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetFirstLineIndent(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetStartIndent( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetStartIndent(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetEndIndent( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetEndIndent(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetSpaceBefore( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetSpaceBefore(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetSpaceAfter( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetSpaceAfter(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetAutoHyphenate( bool newVal) -{ - ATEErr error = sParaFeatures->SetAutoHyphenate(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetHyphenatedWordSize( ATETextDOM::Int32 newVal) -{ - ATEErr error = sParaFeatures->SetHyphenatedWordSize(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetPreHyphenSize( ATETextDOM::Int32 newVal) -{ - ATEErr error = sParaFeatures->SetPreHyphenSize(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetPostHyphenSize( ATETextDOM::Int32 newVal) -{ - ATEErr error = sParaFeatures->SetPostHyphenSize(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetConsecutiveHyphenLimit( ATETextDOM::Int32 newVal) -{ - ATEErr error = sParaFeatures->SetConsecutiveHyphenLimit(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetHyphenationZone( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetHyphenationZone(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetHyphenateCapitalized( bool newVal) -{ - ATEErr error = sParaFeatures->SetHyphenateCapitalized(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetHyphenationPreference( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetHyphenationPreference(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetDesiredWordSpacing( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetDesiredWordSpacing(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetMaxWordSpacing( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetMaxWordSpacing(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetMinWordSpacing( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetMinWordSpacing(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetDesiredLetterSpacing( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetDesiredLetterSpacing(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetMaxLetterSpacing( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetMaxLetterSpacing(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetMinLetterSpacing( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetMinLetterSpacing(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetDesiredGlyphScaling( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetDesiredGlyphScaling(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetMaxGlyphScaling( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetMaxGlyphScaling(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetMinGlyphScaling( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetMinGlyphScaling(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetSingleWordJustification( ParagraphJustification newVal) -{ - ATEErr error = sParaFeatures->SetSingleWordJustification(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetAutoLeadingPercentage( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetAutoLeadingPercentage(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetLeadingType( LeadingType newVal) -{ - ATEErr error = sParaFeatures->SetLeadingType(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetTabStops( ITabStops newVal) -{ - ATEErr error = sParaFeatures->SetTabStops(fParaFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetDefaultTabWidth( ATETextDOM::Real newVal) -{ - ATEErr error = sParaFeatures->SetDefaultTabWidth(fParaFeatures, static_cast(newVal)); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetHangingRoman( bool newVal) -{ - ATEErr error = sParaFeatures->SetHangingRoman(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetAutoTCY( ATETextDOM::Int32 newVal) -{ - ATEErr error = sParaFeatures->SetAutoTCY(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetBunriKinshi( bool newVal) -{ - ATEErr error = sParaFeatures->SetBunriKinshi(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetBurasagariType( BurasagariType newVal) -{ - ATEErr error = sParaFeatures->SetBurasagariType(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetPreferredKinsokuOrder( PreferredKinsokuOrder newVal) -{ - ATEErr error = sParaFeatures->SetPreferredKinsokuOrder(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetKurikaeshiMojiShori( bool newVal) -{ - ATEErr error = sParaFeatures->SetKurikaeshiMojiShori(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetKinsoku( IKinsoku newVal) -{ - ATEErr error = sParaFeatures->SetKinsoku(fParaFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetMojiKumi( IMojiKumi newVal) -{ - ATEErr error = sParaFeatures->SetMojiKumi(fParaFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetEveryLineComposer( bool newVal) -{ - ATEErr error = sParaFeatures->SetEveryLineComposer(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetDefaultCharFeatures( ICharFeatures newVal) -{ - ATEErr error = sParaFeatures->SetDefaultCharFeatures(fParaFeatures, newVal.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -#if SLO_COMPLEXSCRIPT -void IParaFeatures::SetParagraphDirection( ATE::ParagraphDirection newVal) -{ - ATEErr error = sParaFeatures->SetParagraphDirection(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetJustificationMethod( ATE::JustificationMethod newVal) -{ - ATEErr error = sParaFeatures->SetJustificationMethod(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::SetKashidaWidth( ATE::KashidaWidth newVal) -{ - ATEErr error = sParaFeatures->SetKashidaWidth(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} -#endif - -void IParaFeatures::SetComposerEngine( ATE::ComposerEngine newVal) -{ - ATEErr error = sParaFeatures->SetComposerEngine(fParaFeatures, newVal); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearJustification( ) -{ - ATEErr error = sParaFeatures->ClearJustification(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearFirstLineIndent( ) -{ - ATEErr error = sParaFeatures->ClearFirstLineIndent(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearStartIndent( ) -{ - ATEErr error = sParaFeatures->ClearStartIndent(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearEndIndent( ) -{ - ATEErr error = sParaFeatures->ClearEndIndent(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearSpaceBefore( ) -{ - ATEErr error = sParaFeatures->ClearSpaceBefore(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearSpaceAfter( ) -{ - ATEErr error = sParaFeatures->ClearSpaceAfter(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearAutoHyphenate( ) -{ - ATEErr error = sParaFeatures->ClearAutoHyphenate(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearHyphenatedWordSize( ) -{ - ATEErr error = sParaFeatures->ClearHyphenatedWordSize(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearPreHyphenSize( ) -{ - ATEErr error = sParaFeatures->ClearPreHyphenSize(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearPostHyphenSize( ) -{ - ATEErr error = sParaFeatures->ClearPostHyphenSize(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearConsecutiveHyphenLimit( ) -{ - ATEErr error = sParaFeatures->ClearConsecutiveHyphenLimit(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearHyphenationZone( ) -{ - ATEErr error = sParaFeatures->ClearHyphenationZone(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearHyphenateCapitalized( ) -{ - ATEErr error = sParaFeatures->ClearHyphenateCapitalized(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearHyphenationPreference( ) -{ - ATEErr error = sParaFeatures->ClearHyphenationPreference(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearWordSpacing( ) -{ - ATEErr error = sParaFeatures->ClearWordSpacing(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearLetterSpacing( ) -{ - ATEErr error = sParaFeatures->ClearLetterSpacing(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearGlyphScaling( ) -{ - ATEErr error = sParaFeatures->ClearGlyphScaling(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearSingleWordJustification( ) -{ - ATEErr error = sParaFeatures->ClearSingleWordJustification(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearAutoLeadingPercentage( ) -{ - ATEErr error = sParaFeatures->ClearAutoLeadingPercentage(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearLeadingType( ) -{ - ATEErr error = sParaFeatures->ClearLeadingType(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearTabStops( ) -{ - ATEErr error = sParaFeatures->ClearTabStops(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearHangingRoman( ) -{ - ATEErr error = sParaFeatures->ClearHangingRoman(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearAutoTCY( ) -{ - ATEErr error = sParaFeatures->ClearAutoTCY(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearBunriKinshi( ) -{ - ATEErr error = sParaFeatures->ClearBunriKinshi(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearBurasagariType( ) -{ - ATEErr error = sParaFeatures->ClearBurasagariType(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearPreferredKinsokuOrder( ) -{ - ATEErr error = sParaFeatures->ClearPreferredKinsokuOrder(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearKurikaeshiMojiShori( ) -{ - ATEErr error = sParaFeatures->ClearKurikaeshiMojiShori(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearKinsoku( ) -{ - ATEErr error = sParaFeatures->ClearKinsoku(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearMojiKumi( ) -{ - ATEErr error = sParaFeatures->ClearMojiKumi(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearEveryLineComposer( ) -{ - ATEErr error = sParaFeatures->ClearEveryLineComposer(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearDefaultCharFeatures( ) -{ - ATEErr error = sParaFeatures->ClearDefaultCharFeatures(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -#if SLO_COMPLEXSCRIPT -void IParaFeatures::ClearParagraphDirection( ) -{ - ATEErr error = sParaFeatures->ClearParagraphDirection(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearJustificationMethod( ) -{ - ATEErr error = sParaFeatures->ClearJustificationMethod(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -void IParaFeatures::ClearKashidaWidth( ) -{ - ATEErr error = sParaFeatures->ClearKashidaWidth(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} -#endif - -void IParaFeatures::ClearComposerEngine( ) -{ - ATEErr error = sParaFeatures->ClearComposerEngine(fParaFeatures); - if(error) Throw_ATE_Exception(error); -} - -bool IParaFeatures::IntersectFeatures( IParaFeatures rhs) -{ - ATEBool8 ret; - ATEErr error = sParaFeatures->IntersectFeatures(fParaFeatures, rhs.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaFeatures::ReplaceOrAddFeatures( IParaFeatures rhs) -{ - ATEBool8 ret; - ATEErr error = sParaFeatures->ReplaceOrAddFeatures(fParaFeatures, rhs.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaFeatures::UnassignEachIfEqual( const IParaFeatures rhs) -{ - ATEBool8 ret; - ATEErr error = sParaFeatures->UnassignEachIfEqual(fParaFeatures, rhs.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaFeatures::IsEachNotAssigned( ) const -{ - ATEBool8 ret; - ATEErr error = sParaFeatures->IsEachNotAssigned(fParaFeatures, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaFeatures::IsEachAssigned( ) const -{ - ATEBool8 ret; - ATEErr error = sParaFeatures->IsEachAssigned(fParaFeatures, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IParagraph-- -////////////////////////////////////////////// - -IParagraph::IParagraph() -:fParagraph(0) -{ -} - -IParagraph::IParagraph(ParagraphRef paragraph) -:fParagraph(paragraph) -{ -} - -IParagraph::IParagraph(const IParagraph& src) -:fParagraph(src.fParagraph) -{ - sParagraph->AddRef(fParagraph); -} - -IParagraph::~IParagraph() -{ - sParagraph->Release(fParagraph); -} - -IParagraph& IParagraph::operator=(const IParagraph& rhs) -{ - if (&rhs != this) - { - sParagraph->Release(fParagraph); - fParagraph = rhs.fParagraph; - sParagraph->AddRef(fParagraph); - } - return *this; -} - -bool IParagraph::operator==(const IParagraph& rhs) const -{ - return fParagraph == rhs.fParagraph; -} - -bool IParagraph::operator!=(const IParagraph& rhs) const -{ - return !(*this == rhs); -} - -ParagraphRef IParagraph::GetRef() const -{ - return fParagraph; -} - -bool IParagraph::IsNull() const -{ - return sParagraph->IsNull(fParagraph); -} - -ATETextDOM::Int32 IParagraph::GetLength( ) -{ - ATETextDOM::Int32 ret; - ATEErr error = sParagraph->GetLength(fParagraph, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IStory IParagraph::GetStory( ) -{ - StoryRef ret = 0; - ATEErr error = sParagraph->GetStory(fParagraph, &ret); - if(error) Throw_ATE_Exception(error); - return IStory(ret); -} - -ITextRange IParagraph::GetTextRange( ) -{ - TextRangeRef ret = 0; - ATEErr error = sParagraph->GetTextRange(fParagraph, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -ITextRanges IParagraph::GetTextRanges( ) -{ - TextRangesRef ret = 0; - ATEErr error = sParagraph->GetTextRanges(fParagraph, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -ITextRanges IParagraph::GetTextSelection( ) -{ - TextRangesRef ret = 0; - ATEErr error = sParagraph->GetTextSelection(fParagraph, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -IWordsIterator IParagraph::GetWordsIterator( ) -{ - WordsIteratorRef ret = 0; - ATEErr error = sParagraph->GetWordsIterator(fParagraph, &ret); - if(error) Throw_ATE_Exception(error); - return IWordsIterator(ret); -} - -IParagraph IParagraph::GetNext( ) -{ - ParagraphRef ret = 0; - ATEErr error = sParagraph->GetNext(fParagraph, &ret); - if(error) Throw_ATE_Exception(error); - return IParagraph(ret); -} - -IParagraph IParagraph::GetPrev( ) -{ - ParagraphRef ret = 0; - ATEErr error = sParagraph->GetPrev(fParagraph, &ret); - if(error) Throw_ATE_Exception(error); - return IParagraph(ret); -} - -ATETextDOM::ATETextDomErr IParagraph::GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) -{ - ATETextDOM::ATETextDomErr ret; - ATEErr error = sParagraph->GetContents_AsUnicode(fParagraph, text, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::ATETextDomErr IParagraph::GetContents( char* text, ATETextDOM::Int32 maxLength) -{ - ATETextDOM::ATETextDomErr ret; - ATEErr error = sParagraph->GetContents_AsChar(fParagraph, text, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IParagraphsIterator-- -////////////////////////////////////////////// - -IParagraphsIterator::IParagraphsIterator() -:fParagraphsIterator(0) -{ -} - -IParagraphsIterator::IParagraphsIterator(ParagraphsIteratorRef paragraphsiterator) -:fParagraphsIterator(paragraphsiterator) -{ -} - -IParagraphsIterator::IParagraphsIterator(const IParagraphsIterator& src) -:fParagraphsIterator(src.fParagraphsIterator) -{ - sParagraphsIterator->AddRef(fParagraphsIterator); -} - -IParagraphsIterator::~IParagraphsIterator() -{ - sParagraphsIterator->Release(fParagraphsIterator); -} - -IParagraphsIterator& IParagraphsIterator::operator=(const IParagraphsIterator& rhs) -{ - if (&rhs != this) - { - sParagraphsIterator->Release(fParagraphsIterator); - fParagraphsIterator = rhs.fParagraphsIterator; - sParagraphsIterator->AddRef(fParagraphsIterator); - } - return *this; -} - -bool IParagraphsIterator::operator==(const IParagraphsIterator& rhs) const -{ - return fParagraphsIterator == rhs.fParagraphsIterator; -} - -bool IParagraphsIterator::operator!=(const IParagraphsIterator& rhs) const -{ - return !(*this == rhs); -} - -ParagraphsIteratorRef IParagraphsIterator::GetRef() const -{ - return fParagraphsIterator; -} - -bool IParagraphsIterator::IsNull() const -{ - return sParagraphsIterator->IsNull(fParagraphsIterator); -} - -IParagraphsIterator::IParagraphsIterator( ITextRanges ranges, Direction direction) -{ - ATEErr error = sParagraphsIterator->Initialize(ranges.GetRef(), direction, &fParagraphsIterator); - if(error) Throw_ATE_Exception(error); -} - -bool IParagraphsIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sParagraphsIterator->IsDone(fParagraphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParagraphsIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sParagraphsIterator->IsNotDone(fParagraphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParagraphsIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sParagraphsIterator->IsEmpty(fParagraphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IParagraphsIterator::MoveToFirst( ) -{ - ATEErr error = sParagraphsIterator->MoveToFirst(fParagraphsIterator); - if(error) Throw_ATE_Exception(error); -} - -void IParagraphsIterator::MoveToLast( ) -{ - ATEErr error = sParagraphsIterator->MoveToLast(fParagraphsIterator); - if(error) Throw_ATE_Exception(error); -} - -void IParagraphsIterator::Next( ) -{ - ATEErr error = sParagraphsIterator->Next(fParagraphsIterator); - if(error) Throw_ATE_Exception(error); -} - -IParagraph IParagraphsIterator::Item( ) -{ - ParagraphRef ret = 0; - ATEErr error = sParagraphsIterator->Item(fParagraphsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return IParagraph(ret); -} - -////////////////////////////////////////////// -// --IParaInspector-- -////////////////////////////////////////////// - -IParaInspector::IParaInspector() -:fParaInspector(0) -{ - ATEErr error = sParaInspector->Initialize(&fParaInspector); - if(error) Throw_ATE_Exception(error); -} - -IParaInspector::IParaInspector(ParaInspectorRef parainspector) -:fParaInspector(parainspector) -{ -} - -IParaInspector::IParaInspector(const IParaInspector& src) -:fParaInspector(src.fParaInspector) -{ - sParaInspector->AddRef(fParaInspector); -} - -IParaInspector::~IParaInspector() -{ - sParaInspector->Release(fParaInspector); -} - -IParaInspector& IParaInspector::operator=(const IParaInspector& rhs) -{ - if (&rhs != this) - { - sParaInspector->Release(fParaInspector); - fParaInspector = rhs.fParaInspector; - sParaInspector->AddRef(fParaInspector); - } - return *this; -} - -bool IParaInspector::operator==(const IParaInspector& rhs) const -{ - return fParaInspector == rhs.fParaInspector; -} - -bool IParaInspector::operator!=(const IParaInspector& rhs) const -{ - return !(*this == rhs); -} - -ParaInspectorRef IParaInspector::GetRef() const -{ - return fParaInspector; -} - -bool IParaInspector::IsNull() const -{ - return sParaInspector->IsNull(fParaInspector); -} - -IArrayParagraphJustification IParaInspector::GetJustification( ) const -{ - ArrayParagraphJustificationRef ret = 0; - ATEErr error = sParaInspector->GetJustification(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayParagraphJustification(ret); -} - -IArrayReal IParaInspector::GetFirstLineIndent( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetFirstLineIndent(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetStartIndent( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetStartIndent(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetEndIndent( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetEndIndent(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetSpaceBefore( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetSpaceBefore(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetSpaceAfter( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetSpaceAfter(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayBool IParaInspector::GetAutoHyphenate( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sParaInspector->GetAutoHyphenate(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayInteger IParaInspector::GetHyphenatedWordSize( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sParaInspector->GetHyphenatedWordSize(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayInteger IParaInspector::GetPreHyphenSize( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sParaInspector->GetPreHyphenSize(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayInteger IParaInspector::GetPostHyphenSize( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sParaInspector->GetPostHyphenSize(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayInteger IParaInspector::GetConsecutiveHyphenLimit( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sParaInspector->GetConsecutiveHyphenLimit(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayReal IParaInspector::GetHyphenationZone( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetHyphenationZone(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayBool IParaInspector::GetHyphenateCapitalized( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sParaInspector->GetHyphenateCapitalized(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayReal IParaInspector::GetHyphenationPreference( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetHyphenationPreference(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetDesiredWordSpacing( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetDesiredWordSpacing(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetMaxWordSpacing( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetMaxWordSpacing(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetMinWordSpacing( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetMinWordSpacing(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetDesiredLetterSpacing( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetDesiredLetterSpacing(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetMaxLetterSpacing( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetMaxLetterSpacing(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetMinLetterSpacing( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetMinLetterSpacing(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetDesiredGlyphScaling( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetDesiredGlyphScaling(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetMaxGlyphScaling( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetMaxGlyphScaling(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayReal IParaInspector::GetMinGlyphScaling( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetMinGlyphScaling(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayParagraphJustification IParaInspector::GetSingleWordJustification( ) const -{ - ArrayParagraphJustificationRef ret = 0; - ATEErr error = sParaInspector->GetSingleWordJustification(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayParagraphJustification(ret); -} - -IArrayReal IParaInspector::GetAutoLeadingPercentage( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetAutoLeadingPercentage(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayLeadingType IParaInspector::GetLeadingType( ) const -{ - ArrayLeadingTypeRef ret = 0; - ATEErr error = sParaInspector->GetLeadingType(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayLeadingType(ret); -} - -IArrayTabStopsRef IParaInspector::GetTabStops( ) const -{ - ArrayTabStopsRefRef ret = 0; - ATEErr error = sParaInspector->GetTabStops(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayTabStopsRef(ret); -} - -IArrayReal IParaInspector::GetDefaultTabWidth( ) const -{ - ArrayRealRef ret = 0; - ATEErr error = sParaInspector->GetDefaultTabWidth(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayReal(ret); -} - -IArrayBool IParaInspector::GetHangingRoman( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sParaInspector->GetHangingRoman(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayInteger IParaInspector::GetAutoTCY( ) const -{ - ArrayIntegerRef ret = 0; - ATEErr error = sParaInspector->GetAutoTCY(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayInteger(ret); -} - -IArrayBool IParaInspector::GetBunriKinshi( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sParaInspector->GetBunriKinshi(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayBurasagariType IParaInspector::GetBurasagariType( ) const -{ - ArrayBurasagariTypeRef ret = 0; - ATEErr error = sParaInspector->GetBurasagariType(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBurasagariType(ret); -} - -IArrayPreferredKinsokuOrder IParaInspector::GetPreferredKinsokuOrder( ) const -{ - ArrayPreferredKinsokuOrderRef ret = 0; - ATEErr error = sParaInspector->GetPreferredKinsokuOrder(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayPreferredKinsokuOrder(ret); -} - -IArrayBool IParaInspector::GetKurikaeshiMojiShori( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sParaInspector->GetKurikaeshiMojiShori(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -IArrayKinsokuRef IParaInspector::GetKinsoku( ) const -{ - ArrayKinsokuRefRef ret = 0; - ATEErr error = sParaInspector->GetKinsoku(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayKinsokuRef(ret); -} - -IArrayMojiKumiRef IParaInspector::GetMojiKumi( ) const -{ - ArrayMojiKumiRefRef ret = 0; - ATEErr error = sParaInspector->GetMojiKumi(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayMojiKumiRef(ret); -} - -IArrayBool IParaInspector::GetEveryLineComposer( ) const -{ - ArrayBoolRef ret = 0; - ATEErr error = sParaInspector->GetEveryLineComposer(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayBool(ret); -} - -#if SLO_COMPLEXSCRIPT -IArrayParagraphDirection IParaInspector::GetParagraphDirection( ) const -{ - ArrayParagraphDirectionRef ret = 0; - ATEErr error = sParaInspector->GetParagraphDirection(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayParagraphDirection(ret); -} - -IArrayJustificationMethod IParaInspector::GetJustificationMethod( ) const -{ - ArrayJustificationMethodRef ret = 0; - ATEErr error = sParaInspector->GetJustificationMethod(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayJustificationMethod(ret); -} - -IArrayKashidaWidth IParaInspector::GetKashidaWidth( ) const -{ - ArrayKashidaWidthRef ret = 0; - ATEErr error = sParaInspector->GetKashidaWidth(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayKashidaWidth(ret); -} -#endif - -IArrayComposerEngine IParaInspector::GetComposerEngine( ) const -{ - ArrayComposerEngineRef ret = 0; - ATEErr error = sParaInspector->GetComposerEngine(fParaInspector, &ret); - if(error) Throw_ATE_Exception(error); - return IArrayComposerEngine(ret); -} - -////////////////////////////////////////////// -// --IParaStyle-- -////////////////////////////////////////////// - -IParaStyle::IParaStyle() -:fParaStyle(0) -{ -} - -IParaStyle::IParaStyle(ParaStyleRef parastyle) -:fParaStyle(parastyle) -{ -} - -IParaStyle::IParaStyle(const IParaStyle& src) -:fParaStyle(src.fParaStyle) -{ - sParaStyle->AddRef(fParaStyle); -} - -IParaStyle::~IParaStyle() -{ - sParaStyle->Release(fParaStyle); -} - -IParaStyle& IParaStyle::operator=(const IParaStyle& rhs) -{ - if (&rhs != this) - { - sParaStyle->Release(fParaStyle); - fParaStyle = rhs.fParaStyle; - sParaStyle->AddRef(fParaStyle); - } - return *this; -} - -bool IParaStyle::operator==(const IParaStyle& rhs) const -{ - ATEBool8 ret = false; - ATEErr error = sParaStyle->IsEqual(fParaStyle, rhs.fParaStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaStyle::operator!=(const IParaStyle& rhs) const -{ - return !(*this == rhs); -} - -ParaStyleRef IParaStyle::GetRef() const -{ - return fParaStyle; -} - -bool IParaStyle::IsNull() const -{ - return sParaStyle->IsNull(fParaStyle); -} - -ATETextDOM::Int32 IParaStyle::GetName( ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sParaStyle->GetName(fParaStyle, pName, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaStyle::SetName( const ATETextDOM::Unicode* pName) -{ - ATEBool8 ret; - ATEErr error = sParaStyle->SetName(fParaStyle, pName, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IParaStyle IParaStyle::GetParent( ) const -{ - ParaStyleRef ret = 0; - ATEErr error = sParaStyle->GetParent(fParaStyle, &ret); - if(error) Throw_ATE_Exception(error); - return IParaStyle(ret); -} - -bool IParaStyle::SetParent( const IParaStyle pStyle) -{ - ATEBool8 ret; - ATEErr error = sParaStyle->SetParent(fParaStyle, pStyle.GetRef(), &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaStyle::HasParent( ) const -{ - ATEBool8 ret; - ATEErr error = sParaStyle->HasParent(fParaStyle, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IParaFeatures IParaStyle::GetFeatures( ) const -{ - ParaFeaturesRef ret = 0; - ATEErr error = sParaStyle->GetFeatures(fParaStyle, &ret); - if(error) Throw_ATE_Exception(error); - return IParaFeatures(ret); -} - -void IParaStyle::SetFeatures( IParaFeatures pFeatures) -{ - ATEErr error = sParaStyle->SetFeatures(fParaStyle, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IParaStyle::ReplaceOrAddFeatures( IParaFeatures pFeatures) -{ - ATEErr error = sParaStyle->ReplaceOrAddFeatures(fParaStyle, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IParaStyles-- -////////////////////////////////////////////// - -IParaStyles::IParaStyles() -:fParaStyles(0) -{ -} - -IParaStyles::IParaStyles(ParaStylesRef parastyles) -:fParaStyles(parastyles) -{ -} - -IParaStyles::IParaStyles(const IParaStyles& src) -:fParaStyles(src.fParaStyles) -{ - sParaStyles->AddRef(fParaStyles); -} - -IParaStyles::~IParaStyles() -{ - sParaStyles->Release(fParaStyles); -} - -IParaStyles& IParaStyles::operator=(const IParaStyles& rhs) -{ - if (&rhs != this) - { - sParaStyles->Release(fParaStyles); - fParaStyles = rhs.fParaStyles; - sParaStyles->AddRef(fParaStyles); - } - return *this; -} - -bool IParaStyles::operator==(const IParaStyles& rhs) const -{ - return fParaStyles == rhs.fParaStyles; -} - -bool IParaStyles::operator!=(const IParaStyles& rhs) const -{ - return !(*this == rhs); -} - -ParaStylesRef IParaStyles::GetRef() const -{ - return fParaStyles; -} - -bool IParaStyles::IsNull() const -{ - return sParaStyles->IsNull(fParaStyles); -} - -bool IParaStyles::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sParaStyles->IsEmpty(fParaStyles, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IParaStyles::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sParaStyles->GetSize(fParaStyles, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IParaStyles::ShowAllStyles( ) const -{ - ATEErr error = sParaStyles->ShowAllStyles(fParaStyles); - if(error) Throw_ATE_Exception(error); -} - -void IParaStyles::ShowOnlyUnreferencedStyles( ) const -{ - ATEErr error = sParaStyles->ShowOnlyUnreferencedStyles(fParaStyles); - if(error) Throw_ATE_Exception(error); -} - -void IParaStyles::ShowOnlyStylesReferencedIn( ITextRange pRange) const -{ - ATEErr error = sParaStyles->ShowOnlyStylesReferencedIn(fParaStyles, pRange.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IParaStyles::MoveStyleTo( IParaStyle pStyle, ATETextDOM::Int32 position) -{ - ATEErr error = sParaStyles->MoveStyleTo(fParaStyles, pStyle.GetRef(), position); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IParaStylesIterator-- -////////////////////////////////////////////// - -IParaStylesIterator::IParaStylesIterator() -:fParaStylesIterator(0) -{ -} - -IParaStylesIterator::IParaStylesIterator(ParaStylesIteratorRef parastylesiterator) -:fParaStylesIterator(parastylesiterator) -{ -} - -IParaStylesIterator::IParaStylesIterator(const IParaStylesIterator& src) -:fParaStylesIterator(src.fParaStylesIterator) -{ - sParaStylesIterator->AddRef(fParaStylesIterator); -} - -IParaStylesIterator::~IParaStylesIterator() -{ - sParaStylesIterator->Release(fParaStylesIterator); -} - -IParaStylesIterator& IParaStylesIterator::operator=(const IParaStylesIterator& rhs) -{ - if (&rhs != this) - { - sParaStylesIterator->Release(fParaStylesIterator); - fParaStylesIterator = rhs.fParaStylesIterator; - sParaStylesIterator->AddRef(fParaStylesIterator); - } - return *this; -} - -bool IParaStylesIterator::operator==(const IParaStylesIterator& rhs) const -{ - return fParaStylesIterator == rhs.fParaStylesIterator; -} - -bool IParaStylesIterator::operator!=(const IParaStylesIterator& rhs) const -{ - return !(*this == rhs); -} - -ParaStylesIteratorRef IParaStylesIterator::GetRef() const -{ - return fParaStylesIterator; -} - -bool IParaStylesIterator::IsNull() const -{ - return sParaStylesIterator->IsNull(fParaStylesIterator); -} - -IParaStylesIterator::IParaStylesIterator( IParaStyles paraStyles, Direction direction) -{ - ATEErr error = sParaStylesIterator->Initialize(paraStyles.GetRef(), direction, &fParaStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -bool IParaStylesIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sParaStylesIterator->IsNotDone(fParaStylesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaStylesIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sParaStylesIterator->IsDone(fParaStylesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IParaStylesIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sParaStylesIterator->IsEmpty(fParaStylesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IParaStylesIterator::MoveToFirst( ) -{ - ATEErr error = sParaStylesIterator->MoveToFirst(fParaStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -void IParaStylesIterator::MoveToLast( ) -{ - ATEErr error = sParaStylesIterator->MoveToLast(fParaStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -void IParaStylesIterator::Next( ) -{ - ATEErr error = sParaStylesIterator->Next(fParaStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -void IParaStylesIterator::Previous( ) -{ - ATEErr error = sParaStylesIterator->Previous(fParaStylesIterator); - if(error) Throw_ATE_Exception(error); -} - -IParaStyle IParaStylesIterator::Item( ) const -{ - ParaStyleRef ret = 0; - ATEErr error = sParaStylesIterator->Item(fParaStylesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return IParaStyle(ret); -} - -////////////////////////////////////////////// -// --ISpell-- -////////////////////////////////////////////// - -ISpell::ISpell() -:fSpell(0) -{ -} - -ISpell::ISpell(SpellRef spell) -:fSpell(spell) -{ -} - -ISpell::ISpell(const ISpell& src) -:fSpell(src.fSpell) -{ - sSpell->AddRef(fSpell); -} - -ISpell::~ISpell() -{ - sSpell->Release(fSpell); -} - -ISpell& ISpell::operator=(const ISpell& rhs) -{ - if (&rhs != this) - { - sSpell->Release(fSpell); - fSpell = rhs.fSpell; - sSpell->AddRef(fSpell); - } - return *this; -} - -bool ISpell::operator==(const ISpell& rhs) const -{ - return fSpell == rhs.fSpell; -} - -bool ISpell::operator!=(const ISpell& rhs) const -{ - return !(*this == rhs); -} - -SpellRef ISpell::GetRef() const -{ - return fSpell; -} - -bool ISpell::IsNull() const -{ - return sSpell->IsNull(fSpell); -} - -void ISpell::Initialize( ) -{ - ATEErr error = sSpell->Initialize(fSpell); - if(error) Throw_ATE_Exception(error); -} - -bool ISpell::IsInitialized( ) -{ - ATEBool8 ret; - ATEErr error = sSpell->IsInitialized(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ISpell::GetIgnoreWordsInAllUppercase( ) const -{ - ATEBool8 ret; - ATEErr error = sSpell->GetIgnoreWordsInAllUppercase(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ISpell::GetIgnoreWordsWithNumbers( ) const -{ - ATEBool8 ret; - ATEErr error = sSpell->GetIgnoreWordsWithNumbers(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ISpell::GetIgnoreRomanNumerals( ) const -{ - ATEBool8 ret; - ATEErr error = sSpell->GetIgnoreRomanNumerals(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ISpell::GetIgnoreRepeatedWords( ) const -{ - ATEBool8 ret; - ATEErr error = sSpell->GetIgnoreRepeatedWords(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ISpell::GetIgnoreUncapitalizedStartOfSentence( ) const -{ - ATEBool8 ret; - ATEErr error = sSpell->GetIgnoreUncapitalizedStartOfSentence(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -#if SLO_COMPLEXSCRIPT -bool ISpell::GetStrictYeh( ) const -{ - ATEBool8 ret; - ATEErr error = sSpell->GetStrictYeh(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ISpell::GetStrictAlef( ) const -{ - ATEBool8 ret; - ATEErr error = sSpell->GetStrictAlef(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} -#endif - -void ISpell::SetIgnoreWordsInAllUppercase( bool newValue) -{ - ATEErr error = sSpell->SetIgnoreWordsInAllUppercase(fSpell, newValue); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::SetIgnoreWordsWithNumbers( bool newValue) -{ - ATEErr error = sSpell->SetIgnoreWordsWithNumbers(fSpell, newValue); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::SetIgnoreRomanNumerals( bool newValue) -{ - ATEErr error = sSpell->SetIgnoreRomanNumerals(fSpell, newValue); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::SetIgnoreRepeatedWords( bool newValue) -{ - ATEErr error = sSpell->SetIgnoreRepeatedWords(fSpell, newValue); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::SetIgnoreUncapitalizedStartOfSentence( bool newValue) -{ - ATEErr error = sSpell->SetIgnoreUncapitalizedStartOfSentence(fSpell, newValue); - if(error) Throw_ATE_Exception(error); -} - -#if SLO_COMPLEXSCRIPT -void ISpell::SetStrictYeh( bool newValue) -{ - ATEErr error = sSpell->SetStrictYeh(fSpell, newValue); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::SetStrictAlef( bool newValue) -{ - ATEErr error = sSpell->SetStrictAlef(fSpell, newValue); - if(error) Throw_ATE_Exception(error); -} -#endif - -SearchScope ISpell::GetSearchScope( ) const -{ - SearchScope ret; - ATEErr error = sSpell->GetSearchScope(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ISpell::SetSearchScope( SearchScope searchScope) -{ - ATEErr error = sSpell->SetSearchScope(fSpell, searchScope); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::SetSearchRange( const ITextRange& pRange, const bool resetEndOfSentence, const bool resetCurPos) -{ - ATEErr error = sSpell->SetSearchRange(fSpell, pRange.GetRef(), resetEndOfSentence, resetCurPos); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::Reset( ) -{ - ATEErr error = sSpell->Reset(fSpell); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::ResumeFrom( const ATETextDOM::Int32 resumePoint) -{ - ATEErr error = sSpell->ResumeFrom(fSpell, resumePoint); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::ResumeFromInsertionPoint( ) -{ - ATEErr error = sSpell->ResumeFromInsertionPoint(fSpell); - if(error) Throw_ATE_Exception(error); -} - -bool ISpell::FindOneMisspelledWord( SpellCheckingResult* pResult, ITextRange pRange, Language* pLanguage) -{ - ATEBool8 ret; - ATEErr error = sSpell->FindOneMisspelledWord(fSpell, pResult, pRange.GetRef(), pLanguage, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ISpell::GetWordListSize( ) -{ - ATETextDOM::Int32 ret; - ATEErr error = sSpell->GetWordListSize(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ISpell::GetWordListContents( ATETextDOM::Unicode* pWordListBuffer, ATETextDOM::Int32 sizeOfBuffer, ATETextDOM::Int32* pNumberOfWords) -{ - ATEErr error = sSpell->GetWordListContents(fSpell, pWordListBuffer, sizeOfBuffer, pNumberOfWords); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::Replace( ITextRange pRange, const ATETextDOM::Unicode* pCorrection) -{ - ATEErr error = sSpell->Replace(fSpell, pRange.GetRef(), pCorrection); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::AddSelectedToReplaceAllDict( const ATETextDOM::Unicode* pCorrection) -{ - ATEErr error = sSpell->AddSelectedToReplaceAllDict(fSpell, pCorrection); - if(error) Throw_ATE_Exception(error); -} - -bool ISpell::DoReplaceAll( ) -{ - ATEBool8 ret; - ATEErr error = sSpell->DoReplaceAll(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ISpell::GetPreReplaceAllSettings( ATETextDOM::Int32* pCurrentPoint, bool* pFoundSentenceEnd) const -{ - ATEBool8 foundSentenceEndRet; - ATEErr error = sSpell->GetPreReplaceAllSettings(fSpell, pCurrentPoint, &foundSentenceEndRet); - if(error) Throw_ATE_Exception(error); - if (pFoundSentenceEnd) *pFoundSentenceEnd = foundSentenceEndRet; -} - -bool ISpell::FindReplaceAllWord( ITextRange pRange, const bool firstTimeInThisObject) -{ - ATEBool8 ret; - ATEErr error = sSpell->FindReplaceAllWord(fSpell, pRange.GetRef(), firstTimeInThisObject, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ISpell::RestorePreReplaceAllSettings( const ATETextDOM::Int32 currentPoint, const bool foundSentenceEnd) -{ - ATEErr error = sSpell->RestorePreReplaceAllSettings(fSpell, currentPoint, foundSentenceEnd); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::ClearPairDictionary( ) -{ - ATEErr error = sSpell->ClearPairDictionary(fSpell); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::AddSelectedToUserDict( ) -{ - ATEErr error = sSpell->AddSelectedToUserDict(fSpell); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::GetUserDictionaryContents( ) -{ - ATEErr error = sSpell->GetUserDictionaryContents(fSpell); - if(error) Throw_ATE_Exception(error); -} - -bool ISpell::AddToUserDictionary( const ATETextDOM::Unicode* pWord) -{ - ATEBool8 ret; - ATEErr error = sSpell->AddToUserDictionary(fSpell, pWord, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ISpell::DeleteFromUserDictionary( const ATETextDOM::Unicode* pWord) -{ - ATEErr error = sSpell->DeleteFromUserDictionary(fSpell, pWord); - if(error) Throw_ATE_Exception(error); -} - -bool ISpell::WordExistsInUserDictionary( const ATETextDOM::Unicode* pWord) -{ - ATEBool8 ret; - ATEErr error = sSpell->WordExistsInUserDictionary(fSpell, pWord, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ISpell::AddSelectedToIgnoreList( ) -{ - ATEErr error = sSpell->AddSelectedToIgnoreList(fSpell); - if(error) Throw_ATE_Exception(error); -} - -void ISpell::ClearIgnoreList( ) -{ - ATEErr error = sSpell->ClearIgnoreList(fSpell); - if(error) Throw_ATE_Exception(error); -} - -Language ISpell::GetLanguageOfLastMissingDictionary( ) -{ - Language ret; - ATEErr error = sSpell->GetLanguageOfLastMissingDictionary(fSpell, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ISpell::GetSpellingDictionaryPath(ATETextDOM::Unicode* path) -{ - ATETextDOM::Int32 ret; - ATEErr error = sSpell->GetSpellingDictionaryPath(fSpell, path, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --IStories-- -////////////////////////////////////////////// - -IStories::IStories() -:fStories(0) -{ -} - -IStories::IStories(StoriesRef stories) -:fStories(stories) -{ -} - -IStories::IStories(const IStories& src) -:fStories(src.fStories) -{ - sStories->AddRef(fStories); -} - -IStories::~IStories() -{ - sStories->Release(fStories); -} - -IStories& IStories::operator=(const IStories& rhs) -{ - if (&rhs != this) - { - sStories->Release(fStories); - fStories = rhs.fStories; - sStories->AddRef(fStories); - } - return *this; -} - -bool IStories::operator==(const IStories& rhs) const -{ - return fStories == rhs.fStories; -} - -bool IStories::operator!=(const IStories& rhs) const -{ - return !(*this == rhs); -} - -StoriesRef IStories::GetRef() const -{ - return fStories; -} - -bool IStories::IsNull() const -{ - return sStories->IsNull(fStories); -} - -ATETextDOM::Int32 IStories::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sStories->GetSize(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IStory IStories::GetFirst( ) -{ - StoryRef ret = 0; - ATEErr error = sStories->GetFirst(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return IStory(ret); -} - -IStory IStories::GetLast( ) -{ - StoryRef ret = 0; - ATEErr error = sStories->GetLast(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return IStory(ret); -} - -bool IStories::HasFocus( ) const -{ - ATEBool8 ret; - ATEErr error = sStories->HasFocus(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IStory IStories::GetFocus( ) const -{ - StoryRef ret = 0; - ATEErr error = sStories->GetFocus(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return IStory(ret); -} - -void IStories::SetFocus( const IStory& story) -{ - ATEErr error = sStories->SetFocus(fStories, story.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void IStories::LoseFocus( ) -{ - ATEErr error = sStories->LoseFocus(fStories); - if(error) Throw_ATE_Exception(error); -} - -ITextRanges IStories::GetTextRanges( ) const -{ - TextRangesRef ret = 0; - ATEErr error = sStories->GetTextRanges(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -ITextRanges IStories::GetTextSelection( ) const -{ - TextRangesRef ret = 0; - ATEErr error = sStories->GetTextSelection(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -IParagraphsIterator IStories::GetParagraphsIterator( ) const -{ - ParagraphsIteratorRef ret = 0; - ATEErr error = sStories->GetParagraphsIterator(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return IParagraphsIterator(ret); -} - -IWordsIterator IStories::GetWordsIterator( ) const -{ - WordsIteratorRef ret = 0; - ATEErr error = sStories->GetWordsIterator(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return IWordsIterator(ret); -} - -ITextRunsIterator IStories::GetTextRunsIterator( ) const -{ - TextRunsIteratorRef ret = 0; - ATEErr error = sStories->GetTextRunsIterator(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRunsIterator(ret); -} - -IDocumentTextResources IStories::GetDocumentTextResources( ) const -{ - DocumentTextResourcesRef ret = 0; - ATEErr error = sStories->GetDocumentTextResources(fStories, &ret); - if(error) Throw_ATE_Exception(error); - return IDocumentTextResources(ret); -} - -IStory IStories::Item( ATETextDOM::Int32 nIndex) const -{ - StoryRef ret = 0; - ATEErr error = sStories->Item(fStories, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return IStory(ret); -} - -void IStories::SuspendReflow( ) -{ - ATEErr error = sStories->SuspendReflow(fStories); - if(error) Throw_ATE_Exception(error); -} - -void IStories::ResumeReflow( ) -{ - ATEErr error = sStories->ResumeReflow(fStories); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IStory-- -////////////////////////////////////////////// - -IStory::IStory() -:fStory(0) -{ -} - -IStory::IStory(StoryRef story) -:fStory(story) -{ -} - -IStory::IStory(const IStory& src) -:fStory(src.fStory) -{ - sStory->AddRef(fStory); -} - -IStory::~IStory() -{ - sStory->Release(fStory); -} - -IStory& IStory::operator=(const IStory& rhs) -{ - if (&rhs != this) - { - sStory->Release(fStory); - fStory = rhs.fStory; - sStory->AddRef(fStory); - } - return *this; -} - -bool IStory::operator==(const IStory& rhs) const -{ - ATEBool8 ret = false; - ATEErr error = sStory->IsEqual(fStory, rhs.fStory, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IStory::operator!=(const IStory& rhs) const -{ - return !(*this == rhs); -} - -StoryRef IStory::GetRef() const -{ - return fStory; -} - -bool IStory::IsNull() const -{ - return sStory->IsNull(fStory); -} - -ATETextDOM::Int32 IStory::GetIndex( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sStory->GetIndex(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IStory::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sStory->GetSize(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IStories IStory::GetStories( ) const -{ - StoriesRef ret = 0; - ATEErr error = sStory->GetStories(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return IStories(ret); -} - -ITextRange IStory::GetTextRange( ) const -{ - TextRangeRef ret = 0; - ATEErr error = sStory->GetTextRange_ForThisStory(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -ITextRanges IStory::GetTextSelection( ) const -{ - TextRangesRef ret = 0; - ATEErr error = sStory->GetTextSelection(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -IParagraphsIterator IStory::GetParagraphsIterator( ) const -{ - ParagraphsIteratorRef ret = 0; - ATEErr error = sStory->GetParagraphsIterator(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return IParagraphsIterator(ret); -} - -IWordsIterator IStory::GetWordsIterator( ) const -{ - WordsIteratorRef ret = 0; - ATEErr error = sStory->GetWordsIterator(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return IWordsIterator(ret); -} - -ITextRunsIterator IStory::GetTextRunsIterator( ) const -{ - TextRunsIteratorRef ret = 0; - ATEErr error = sStory->GetTextRunsIterator(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRunsIterator(ret); -} - -ITextFramesIterator IStory::GetTextFramesIterator( ) const -{ - TextFramesIteratorRef ret = 0; - ATEErr error = sStory->GetTextFramesIterator(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return ITextFramesIterator(ret); -} - -ITextFrame IStory::GetFrame( ATETextDOM::Int32 frameIndex) const -{ - TextFrameRef ret = 0; - ATEErr error = sStory->GetFrame(fStory, frameIndex, &ret); - if(error) Throw_ATE_Exception(error); - return ITextFrame(ret); -} - -void IStory::SetKernForSelection( const ITextRange& textRange, AutoKernType autoKernType) -{ - ATEErr error = sStory->SetKernForSelection(fStory, textRange.GetRef(), autoKernType); - if(error) Throw_ATE_Exception(error); -} - -void IStory::SetKernAtChar( ATETextDOM::Int32 charIndex, ATETextDOM::Int32 value) -{ - ATEErr error = sStory->SetKernAtChar(fStory, charIndex, value); - if(error) Throw_ATE_Exception(error); -} - -void IStory::GetKern( const ITextRange& textRange, AutoKernType* pAutoKernType, ATETextDOM::Int32* value) const -{ - ATEErr error = sStory->GetKern(fStory, textRange.GetRef(), pAutoKernType, value); - if(error) Throw_ATE_Exception(error); -} - -AutoKernType IStory::GetModelKernAtChar( ATETextDOM::Int32 charIndex, ATETextDOM::Int32* pManualKernValue) const -{ - AutoKernType ret; - ATEErr error = sStory->GetModelKernAtChar(fStory, charIndex, pManualKernValue, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ITextRange IStory::GetTextRange( ATETextDOM::Int32 start, ATETextDOM::Int32 end) const -{ - TextRangeRef ret = 0; - ATEErr error = sStory->GetTextRange(fStory, start, end, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -IStory IStory::Duplicate( ) -{ - StoryRef ret = 0; - ATEErr error = sStory->Duplicate(fStory, &ret); - if(error) Throw_ATE_Exception(error); - return IStory(ret); -} - -void IStory::SuspendReflow( ) -{ - ATEErr error = sStory->SuspendReflow(fStory); - if(error) Throw_ATE_Exception(error); -} - -void IStory::ResumeReflow( ) -{ - ATEErr error = sStory->ResumeReflow(fStory); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --ITabStop-- -////////////////////////////////////////////// - -ITabStop::ITabStop() -:fTabStop(0) -{ - ATEErr error = sTabStop->Initialize(&fTabStop); - if(error) Throw_ATE_Exception(error); -} - -ITabStop::ITabStop(TabStopRef tabstop) -:fTabStop(tabstop) -{ -} - -ITabStop::ITabStop(const ITabStop& src) -:fTabStop(src.fTabStop) -{ - sTabStop->AddRef(fTabStop); -} - -ITabStop::~ITabStop() -{ - sTabStop->Release(fTabStop); -} - -ITabStop& ITabStop::operator=(const ITabStop& rhs) -{ - if (&rhs != this) - { - sTabStop->Release(fTabStop); - fTabStop = rhs.fTabStop; - sTabStop->AddRef(fTabStop); - } - return *this; -} - -bool ITabStop::operator==(const ITabStop& rhs) const -{ - return fTabStop == rhs.fTabStop; -} - -bool ITabStop::operator!=(const ITabStop& rhs) const -{ - return !(*this == rhs); -} - -TabStopRef ITabStop::GetRef() const -{ - return fTabStop; -} - -bool ITabStop::IsNull() const -{ - return sTabStop->IsNull(fTabStop); -} - -TabType ITabStop::GetTabType( ) const -{ - TabType ret; - ATEErr error = sTabStop->GetTabType(fTabStop, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITabStop::SetTabType( TabType tabType) -{ - ATEErr error = sTabStop->SetTabType(fTabStop, tabType); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Real ITabStop::GetPosition( ) const -{ - ATETextDOM::Real ret; - ATETextDOM::Float tempRet; - ATEErr error = sTabStop->GetPosition(fTabStop, &tempRet); - if(error) Throw_ATE_Exception(error); - ret = tempRet; - return ret; -} - -void ITabStop::SetPosition( ATETextDOM::Real position) -{ - ATEErr error = sTabStop->SetPosition(fTabStop, static_cast(position)); - if(error) Throw_ATE_Exception(error); -} - -bool ITabStop::HasLeader( ) const -{ - ATEBool8 ret; - ATEErr error = sTabStop->HasLeader(fTabStop, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITabStop::GetLeader( ATETextDOM::Unicode* leader, ATETextDOM::Int32 maxLength) const -{ - ATEErr error = sTabStop->GetLeader(fTabStop, leader, maxLength); - if(error) Throw_ATE_Exception(error); -} - -void ITabStop::SetLeader( ATETextDOM::Unicode* leader) -{ - ATEErr error = sTabStop->SetLeader(fTabStop, leader); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Unicode ITabStop::GetDecimalCharacter( ) const -{ - ATETextDOM::Unicode ret; - ATEErr error = sTabStop->GetDecimalCharacter(fTabStop, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITabStop::SetDecimalCharacter( ATETextDOM::Unicode decimalChar) -{ - ATEErr error = sTabStop->SetDecimalCharacter(fTabStop, decimalChar); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --ITabStops-- -////////////////////////////////////////////// - -ITabStops::ITabStops() -:fTabStops(0) -{ - ATEErr error = sTabStops->Initialize(&fTabStops); - if(error) Throw_ATE_Exception(error); -} - -ITabStops::ITabStops(TabStopsRef tabstops) -:fTabStops(tabstops) -{ -} - -ITabStops::ITabStops(const ITabStops& src) -:fTabStops(src.fTabStops) -{ - sTabStops->AddRef(fTabStops); -} - -ITabStops::~ITabStops() -{ - sTabStops->Release(fTabStops); -} - -ITabStops& ITabStops::operator=(const ITabStops& rhs) -{ - if (&rhs != this) - { - sTabStops->Release(fTabStops); - fTabStops = rhs.fTabStops; - sTabStops->AddRef(fTabStops); - } - return *this; -} - -bool ITabStops::operator==(const ITabStops& rhs) const -{ - return fTabStops == rhs.fTabStops; -} - -bool ITabStops::operator!=(const ITabStops& rhs) const -{ - return !(*this == rhs); -} - -TabStopsRef ITabStops::GetRef() const -{ - return fTabStops; -} - -bool ITabStops::IsNull() const -{ - return sTabStops->IsNull(fTabStops); -} - -ATETextDOM::Int32 ITabStops::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTabStops->GetSize(fTabStops, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ITabStop ITabStops::GetFirst( ) const -{ - TabStopRef ret = 0; - ATEErr error = sTabStops->GetFirst(fTabStops, &ret); - if(error) Throw_ATE_Exception(error); - return ITabStop(ret); -} - -ITabStop ITabStops::GetLast( ) const -{ - TabStopRef ret = 0; - ATEErr error = sTabStops->GetLast(fTabStops, &ret); - if(error) Throw_ATE_Exception(error); - return ITabStop(ret); -} - -void ITabStops::ReplaceOrAdd( const ITabStop& pTabStop) -{ - ATEErr error = sTabStops->ReplaceOrAdd(fTabStops, pTabStop.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -ITabStop ITabStops::Item( ATETextDOM::Int32 nIndex) const -{ - TabStopRef ret = 0; - ATEErr error = sTabStops->Item(fTabStops, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return ITabStop(ret); -} - -void ITabStops::Remove( ATETextDOM::Int32 nIndex) -{ - ATEErr error = sTabStops->Remove(fTabStops, nIndex); - if(error) Throw_ATE_Exception(error); -} - -void ITabStops::RemoveAll( ) -{ - ATEErr error = sTabStops->RemoveAll(fTabStops); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --ITabStopsIterator-- -////////////////////////////////////////////// - -ITabStopsIterator::ITabStopsIterator() -:fTabStopsIterator(0) -{ -} - -ITabStopsIterator::ITabStopsIterator(TabStopsIteratorRef tabstopsiterator) -:fTabStopsIterator(tabstopsiterator) -{ -} - -ITabStopsIterator::ITabStopsIterator(const ITabStopsIterator& src) -:fTabStopsIterator(src.fTabStopsIterator) -{ - sTabStopsIterator->AddRef(fTabStopsIterator); -} - -ITabStopsIterator::~ITabStopsIterator() -{ - sTabStopsIterator->Release(fTabStopsIterator); -} - -ITabStopsIterator& ITabStopsIterator::operator=(const ITabStopsIterator& rhs) -{ - if (&rhs != this) - { - sTabStopsIterator->Release(fTabStopsIterator); - fTabStopsIterator = rhs.fTabStopsIterator; - sTabStopsIterator->AddRef(fTabStopsIterator); - } - return *this; -} - -bool ITabStopsIterator::operator==(const ITabStopsIterator& rhs) const -{ - return fTabStopsIterator == rhs.fTabStopsIterator; -} - -bool ITabStopsIterator::operator!=(const ITabStopsIterator& rhs) const -{ - return !(*this == rhs); -} - -TabStopsIteratorRef ITabStopsIterator::GetRef() const -{ - return fTabStopsIterator; -} - -bool ITabStopsIterator::IsNull() const -{ - return sTabStopsIterator->IsNull(fTabStopsIterator); -} - -ITabStopsIterator::ITabStopsIterator( ITabStops tabStops, Direction direction) -{ - ATEErr error = sTabStopsIterator->Initialize(tabStops.GetRef(), direction, &fTabStopsIterator); - if(error) Throw_ATE_Exception(error); -} - -bool ITabStopsIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTabStopsIterator->IsDone(fTabStopsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITabStopsIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTabStopsIterator->IsNotDone(fTabStopsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITabStopsIterator::IsEmpty( ) -{ - ATEBool8 ret; - ATEErr error = sTabStopsIterator->IsEmpty(fTabStopsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITabStopsIterator::MoveToFirst( ) -{ - ATEErr error = sTabStopsIterator->MoveToFirst(fTabStopsIterator); - if(error) Throw_ATE_Exception(error); -} - -void ITabStopsIterator::MoveToLast( ) -{ - ATEErr error = sTabStopsIterator->MoveToLast(fTabStopsIterator); - if(error) Throw_ATE_Exception(error); -} - -void ITabStopsIterator::Next( ) -{ - ATEErr error = sTabStopsIterator->Next(fTabStopsIterator); - if(error) Throw_ATE_Exception(error); -} - -ITabStop ITabStopsIterator::Item( ) const -{ - TabStopRef ret = 0; - ATEErr error = sTabStopsIterator->Item(fTabStopsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ITabStop(ret); -} - -////////////////////////////////////////////// -// --ITextRange-- -////////////////////////////////////////////// - -ITextRange::ITextRange() -:fTextRange(0) -{ -} - -ITextRange::ITextRange(TextRangeRef textrange) -:fTextRange(textrange) -{ -} - -ITextRange::ITextRange(const ITextRange& src) -:fTextRange(src.fTextRange) -{ - sTextRange->AddRef(fTextRange); -} - -ITextRange::~ITextRange() -{ - sTextRange->Release(fTextRange); -} - -ITextRange& ITextRange::operator=(const ITextRange& rhs) -{ - if (&rhs != this) - { - sTextRange->Release(fTextRange); - fTextRange = rhs.fTextRange; - sTextRange->AddRef(fTextRange); - } - return *this; -} - -bool ITextRange::operator==(const ITextRange& rhs) const -{ - ATEBool8 ret = false; - ATEErr error = sTextRange->IsEqual(fTextRange, rhs.fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRange::operator!=(const ITextRange& rhs) const -{ - return !(*this == rhs); -} - -TextRangeRef ITextRange::GetRef() const -{ - return fTextRange; -} - -bool ITextRange::IsNull() const -{ - return sTextRange->IsNull(fTextRange); -} - -ATETextDOM::Int32 ITextRange::GetStart( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRange->GetStart(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextRange::SetStart( ATETextDOM::Int32 start) -{ - ATEErr error = sTextRange->SetStart(fTextRange, start); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 ITextRange::GetEnd( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRange->GetEnd(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextRange::SetEnd( ATETextDOM::Int32 end) -{ - ATEErr error = sTextRange->SetEnd(fTextRange, end); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 ITextRange::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRange->GetSize(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -IStory ITextRange::GetStory( ) const -{ - StoryRef ret = 0; - ATEErr error = sTextRange->GetStory(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return IStory(ret); -} - -ITextRanges ITextRange::GetTextSelection( ) const -{ - TextRangesRef ret = 0; - ATEErr error = sTextRange->GetTextSelection(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -ITextFramesIterator ITextRange::GetTextFramesIterator( ) const -{ - TextFramesIteratorRef ret = 0; - ATEErr error = sTextRange->GetTextFramesIterator(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ITextFramesIterator(ret); -} - -IParagraphsIterator ITextRange::GetParagraphsIterator( ) const -{ - ParagraphsIteratorRef ret = 0; - ATEErr error = sTextRange->GetParagraphsIterator(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return IParagraphsIterator(ret); -} - -IWordsIterator ITextRange::GetWordsIterator( ) const -{ - WordsIteratorRef ret = 0; - ATEErr error = sTextRange->GetWordsIterator(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return IWordsIterator(ret); -} - -ITextRunsIterator ITextRange::GetTextRunsIterator( ) const -{ - TextRunsIteratorRef ret = 0; - ATEErr error = sTextRange->GetTextRunsIterator(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRunsIterator(ret); -} - -ICharInspector ITextRange::GetCharInspector( ) const -{ - CharInspectorRef ret = 0; - ATEErr error = sTextRange->GetCharInspector(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ICharInspector(ret); -} - -IParaInspector ITextRange::GetParaInspector( ) const -{ - ParaInspectorRef ret = 0; - ATEErr error = sTextRange->GetParaInspector(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return IParaInspector(ret); -} - -ICharStyles ITextRange::GetNamedCharStyles( ) const -{ - CharStylesRef ret = 0; - ATEErr error = sTextRange->GetNamedCharStyles(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ICharStyles(ret); -} - -IParaStyles ITextRange::GetNamedParaStyles( ) const -{ - ParaStylesRef ret = 0; - ATEErr error = sTextRange->GetNamedParaStyles(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return IParaStyles(ret); -} - -bool ITextRange::SetNamedCharStyle( const ATETextDOM::Unicode* pName) -{ - ATEBool8 ret; - ATEErr error = sTextRange->SetNamedCharStyle(fTextRange, pName, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRange::SetNamedParaStyle( const ATETextDOM::Unicode* pName) -{ - ATEBool8 ret; - ATEErr error = sTextRange->SetNamedParaStyle(fTextRange, pName, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextRange::ClearNamedCharStyle( ) -{ - ATEErr error = sTextRange->ClearNamedCharStyle(fTextRange); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::ClearNamedParaStyle( ) -{ - ATEErr error = sTextRange->ClearNamedParaStyle(fTextRange); - if(error) Throw_ATE_Exception(error); -} - -ICharFeatures ITextRange::GetUniqueCharFeatures( ) const -{ - CharFeaturesRef ret = 0; - ATEErr error = sTextRange->GetUniqueCharFeatures(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ICharFeatures(ret); -} - -IParaFeatures ITextRange::GetUniqueParaFeatures( ) const -{ - ParaFeaturesRef ret = 0; - ATEErr error = sTextRange->GetUniqueParaFeatures(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return IParaFeatures(ret); -} - -bool ITextRange::HasLocalCharFeatures( ) -{ - ATEBool8 ret; - ATEErr error = sTextRange->HasLocalCharFeatures(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRange::HasLocalParaFeatures( ) -{ - ATEBool8 ret; - ATEErr error = sTextRange->HasLocalParaFeatures(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICharFeatures ITextRange::GetUniqueLocalCharFeatures( ) -{ - CharFeaturesRef ret = 0; - ATEErr error = sTextRange->GetUniqueLocalCharFeatures(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ICharFeatures(ret); -} - -IParaFeatures ITextRange::GetUniqueLocalParaFeatures( ) -{ - ParaFeaturesRef ret = 0; - ATEErr error = sTextRange->GetUniqueLocalParaFeatures(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return IParaFeatures(ret); -} - -void ITextRange::SetLocalCharFeatures( const ICharFeatures& pFeatures) -{ - ATEErr error = sTextRange->SetLocalCharFeatures(fTextRange, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::ReplaceOrAddLocalCharFeatures( const ICharFeatures& pFeatures) -{ - ATEErr error = sTextRange->ReplaceOrAddLocalCharFeatures(fTextRange, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::ClearLocalCharFeatures( ) -{ - ATEErr error = sTextRange->ClearLocalCharFeatures(fTextRange); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::SetLocalParaFeatures( const IParaFeatures& pFeatures) -{ - ATEErr error = sTextRange->SetLocalParaFeatures(fTextRange, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::ReplaceOrAddLocalParaFeatures( const IParaFeatures& pFeatures) -{ - ATEErr error = sTextRange->ReplaceOrAddLocalParaFeatures(fTextRange, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::ClearLocalParaFeatures( ) -{ - ATEErr error = sTextRange->ClearLocalParaFeatures(fTextRange); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::SetStory( const IStory& story) -{ - ATEErr error = sTextRange->SetStory(fTextRange, story.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::SetRange( ATETextDOM::Int32 start, ATETextDOM::Int32 end) -{ - ATEErr error = sTextRange->SetRange(fTextRange, start, end); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::Collapse( CollapseDirection direction) -{ - ATEErr error = sTextRange->Collapse(fTextRange, direction); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 ITextRange::Move( ATETextDOM::Int32 unit) -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRange->Move(fTextRange, unit, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ITextRange ITextRange::Clone( ) const -{ - TextRangeRef ret = 0; - ATEErr error = sTextRange->Clone(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -void ITextRange::InsertBefore( const ATETextDOM::Unicode* text, ATETextDOM::Int32 length) -{ - ATEErr error = sTextRange->InsertBefore_AsUnicode(fTextRange, text, length); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::InsertAfter( const ATETextDOM::Unicode* text, ATETextDOM::Int32 length) -{ - ATEErr error = sTextRange->InsertAfter_AsUnicode(fTextRange, text, length); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::InsertBefore( const ITextRange& anotherRange) -{ - ATEErr error = sTextRange->InsertBefore_AsTextRange(fTextRange, anotherRange.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::InsertAfter( const ITextRange& anotherRange) -{ - ATEErr error = sTextRange->InsertAfter_AsTextRange(fTextRange, anotherRange.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 ITextRange::GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRange->GetContents_AsUnicode(fTextRange, text, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ITextRange::GetContents( char* text, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRange->GetContents_AsChar(fTextRange, text, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRange::GetSingleGlyphInRange( ATEGlyphID* pSingleGlyph) const -{ - ATEBool8 ret; - ATEErr error = sTextRange->GetSingleGlyphInRange(fTextRange, pSingleGlyph, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextRange::Select( bool addToSelection) -{ - ATEErr error = sTextRange->Select(fTextRange, addToSelection); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::DeSelect( ) -{ - ATEErr error = sTextRange->DeSelect(fTextRange); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::ChangeCase( CaseChangeType caseChangeType) -{ - ATEErr error = sTextRange->ChangeCase(fTextRange, caseChangeType); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::FitHeadlines( ) -{ - ATEErr error = sTextRange->FitHeadlines(fTextRange); - if(error) Throw_ATE_Exception(error); -} - -void ITextRange::Remove( ) -{ - ATEErr error = sTextRange->Remove(fTextRange); - if(error) Throw_ATE_Exception(error); -} - -ASCharType ITextRange::GetCharacterType( ) const -{ - ASCharType ret; - ATEErr error = sTextRange->GetCharacterType(fTextRange, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -////////////////////////////////////////////// -// --ITextRanges-- -////////////////////////////////////////////// - -ITextRanges::ITextRanges() -:fTextRanges(0) -{ - ATEErr error = sTextRanges->Initialize(&fTextRanges); - if(error) Throw_ATE_Exception(error); -} - -ITextRanges::ITextRanges(TextRangesRef textranges) -:fTextRanges(textranges) -{ -} - -ITextRanges::ITextRanges(const ITextRanges& src) -:fTextRanges(src.fTextRanges) -{ - sTextRanges->AddRef(fTextRanges); -} - -ITextRanges::~ITextRanges() -{ - sTextRanges->Release(fTextRanges); -} - -ITextRanges& ITextRanges::operator=(const ITextRanges& rhs) -{ - if (&rhs != this) - { - sTextRanges->Release(fTextRanges); - fTextRanges = rhs.fTextRanges; - sTextRanges->AddRef(fTextRanges); - } - return *this; -} - -bool ITextRanges::operator==(const ITextRanges& rhs) const -{ - return fTextRanges == rhs.fTextRanges; -} - -bool ITextRanges::operator!=(const ITextRanges& rhs) const -{ - return !(*this == rhs); -} - -TextRangesRef ITextRanges::GetRef() const -{ - return fTextRanges; -} - -bool ITextRanges::IsNull() const -{ - return sTextRanges->IsNull(fTextRanges); -} - -ATETextDOM::Int32 ITextRanges::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRanges->GetSize(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ITextRange ITextRanges::GetFirst( ) const -{ - TextRangeRef ret = 0; - ATEErr error = sTextRanges->GetFirst(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -ITextRange ITextRanges::GetLast( ) const -{ - TextRangeRef ret = 0; - ATEErr error = sTextRanges->GetLast(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -ITextRanges ITextRanges::GetTextSelection( ) const -{ - TextRangesRef ret = 0; - ATEErr error = sTextRanges->GetTextSelection(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRanges(ret); -} - -IParagraphsIterator ITextRanges::GetParagraphsIterator( ) const -{ - ParagraphsIteratorRef ret = 0; - ATEErr error = sTextRanges->GetParagraphsIterator(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return IParagraphsIterator(ret); -} - -IWordsIterator ITextRanges::GetWordsIterator( ) const -{ - WordsIteratorRef ret = 0; - ATEErr error = sTextRanges->GetWordsIterator(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return IWordsIterator(ret); -} - -ITextRunsIterator ITextRanges::GetTextRunsIterator( ) const -{ - TextRunsIteratorRef ret = 0; - ATEErr error = sTextRanges->GetTextRunsIterator(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRunsIterator(ret); -} - -ICharInspector ITextRanges::GetCharInspector( ) const -{ - CharInspectorRef ret = 0; - ATEErr error = sTextRanges->GetCharInspector(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ICharInspector(ret); -} - -IParaInspector ITextRanges::GetParaInspector( ) const -{ - ParaInspectorRef ret = 0; - ATEErr error = sTextRanges->GetParaInspector(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return IParaInspector(ret); -} - -void ITextRanges::ClearNamedCharStyle( ) -{ - ATEErr error = sTextRanges->ClearNamedCharStyle(fTextRanges); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::ClearNamedParaStyle( ) -{ - ATEErr error = sTextRanges->ClearNamedParaStyle(fTextRanges); - if(error) Throw_ATE_Exception(error); -} - -ICharFeatures ITextRanges::GetUniqueCharFeatures( ) const -{ - CharFeaturesRef ret = 0; - ATEErr error = sTextRanges->GetUniqueCharFeatures(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ICharFeatures(ret); -} - -IParaFeatures ITextRanges::GetUniqueParaFeatures( ) const -{ - ParaFeaturesRef ret = 0; - ATEErr error = sTextRanges->GetUniqueParaFeatures(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return IParaFeatures(ret); -} - -bool ITextRanges::HasLocalCharFeatures( ) -{ - ATEBool8 ret; - ATEErr error = sTextRanges->HasLocalCharFeatures(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRanges::HasLocalParaFeatures( ) -{ - ATEBool8 ret; - ATEErr error = sTextRanges->HasLocalParaFeatures(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ICharFeatures ITextRanges::GetUniqueLocalCharFeatures( ) -{ - CharFeaturesRef ret = 0; - ATEErr error = sTextRanges->GetUniqueLocalCharFeatures(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return ICharFeatures(ret); -} - -IParaFeatures ITextRanges::GetUniqueLocalParaFeatures( ) -{ - ParaFeaturesRef ret = 0; - ATEErr error = sTextRanges->GetUniqueLocalParaFeatures(fTextRanges, &ret); - if(error) Throw_ATE_Exception(error); - return IParaFeatures(ret); -} - -void ITextRanges::SetLocalCharFeatures( const ICharFeatures& pFeatures) -{ - ATEErr error = sTextRanges->SetLocalCharFeatures(fTextRanges, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::ReplaceOrAddLocalCharFeatures( const ICharFeatures& pFeatures) -{ - ATEErr error = sTextRanges->ReplaceOrAddLocalCharFeatures(fTextRanges, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::ClearLocalCharFeatures( ) -{ - ATEErr error = sTextRanges->ClearLocalCharFeatures(fTextRanges); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::SetLocalParaFeatures( const IParaFeatures& pFeatures) -{ - ATEErr error = sTextRanges->SetLocalParaFeatures(fTextRanges, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::ReplaceOrAddLocalParaFeatures( const IParaFeatures& pFeatures) -{ - ATEErr error = sTextRanges->ReplaceOrAddLocalParaFeatures(fTextRanges, pFeatures.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::ClearLocalParaFeatures( ) -{ - ATEErr error = sTextRanges->ClearLocalParaFeatures(fTextRanges); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::Select( bool addToSelection) -{ - ATEErr error = sTextRanges->Select(fTextRanges, addToSelection); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::DeSelect( ) -{ - ATEErr error = sTextRanges->DeSelect(fTextRanges); - if(error) Throw_ATE_Exception(error); -} - -ATETextDOM::Int32 ITextRanges::GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRanges->GetContents_AsUnicode(fTextRanges, text, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 ITextRanges::GetContents( char* text, ATETextDOM::Int32 maxLength) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sTextRanges->GetContents_AsChar(fTextRanges, text, maxLength, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextRanges::ChangeCase( CaseChangeType caseChangeType) -{ - ATEErr error = sTextRanges->ChangeCase(fTextRanges, caseChangeType); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::Add( const ITextRange& textRange) -{ - ATEErr error = sTextRanges->Add(fTextRanges, textRange.GetRef()); - if(error) Throw_ATE_Exception(error); -} - -ITextRange ITextRanges::Item( ATETextDOM::Int32 nIndex) const -{ - TextRangeRef ret = 0; - ATEErr error = sTextRanges->Item(fTextRanges, nIndex, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -void ITextRanges::RemoveAll( ) -{ - ATEErr error = sTextRanges->RemoveAll(fTextRanges); - if(error) Throw_ATE_Exception(error); -} - -void ITextRanges::Remove( ATETextDOM::Int32 nIndex) -{ - ATEErr error = sTextRanges->Remove(fTextRanges, nIndex); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --ITextRangesIterator-- -////////////////////////////////////////////// - -ITextRangesIterator::ITextRangesIterator() -:fTextRangesIterator(0) -{ -} - -ITextRangesIterator::ITextRangesIterator(TextRangesIteratorRef textrangesiterator) -:fTextRangesIterator(textrangesiterator) -{ -} - -ITextRangesIterator::ITextRangesIterator(const ITextRangesIterator& src) -:fTextRangesIterator(src.fTextRangesIterator) -{ - sTextRangesIterator->AddRef(fTextRangesIterator); -} - -ITextRangesIterator::~ITextRangesIterator() -{ - sTextRangesIterator->Release(fTextRangesIterator); -} - -ITextRangesIterator& ITextRangesIterator::operator=(const ITextRangesIterator& rhs) -{ - if (&rhs != this) - { - sTextRangesIterator->Release(fTextRangesIterator); - fTextRangesIterator = rhs.fTextRangesIterator; - sTextRangesIterator->AddRef(fTextRangesIterator); - } - return *this; -} - -bool ITextRangesIterator::operator==(const ITextRangesIterator& rhs) const -{ - return fTextRangesIterator == rhs.fTextRangesIterator; -} - -bool ITextRangesIterator::operator!=(const ITextRangesIterator& rhs) const -{ - return !(*this == rhs); -} - -TextRangesIteratorRef ITextRangesIterator::GetRef() const -{ - return fTextRangesIterator; -} - -bool ITextRangesIterator::IsNull() const -{ - return sTextRangesIterator->IsNull(fTextRangesIterator); -} - -ITextRangesIterator::ITextRangesIterator( ITextRanges textRanges, Direction direction) -{ - ATEErr error = sTextRangesIterator->Initialize(textRanges.GetRef(), direction, &fTextRangesIterator); - if(error) Throw_ATE_Exception(error); -} - -ITextRangesIterator ITextRangesIterator::Clone( ) const -{ - TextRangesIteratorRef ret = 0; - ATEErr error = sTextRangesIterator->Clone(fTextRangesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRangesIterator(ret); -} - -bool ITextRangesIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTextRangesIterator->IsNotDone(fTextRangesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRangesIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTextRangesIterator->IsDone(fTextRangesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRangesIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sTextRangesIterator->IsEmpty(fTextRangesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextRangesIterator::MoveToFirst( ) -{ - ATEErr error = sTextRangesIterator->MoveToFirst(fTextRangesIterator); - if(error) Throw_ATE_Exception(error); -} - -void ITextRangesIterator::MoveToLast( ) -{ - ATEErr error = sTextRangesIterator->MoveToLast(fTextRangesIterator); - if(error) Throw_ATE_Exception(error); -} - -void ITextRangesIterator::Next( ) -{ - ATEErr error = sTextRangesIterator->Next(fTextRangesIterator); - if(error) Throw_ATE_Exception(error); -} - -ITextRange ITextRangesIterator::Item( ) const -{ - TextRangeRef ret = 0; - ATEErr error = sTextRangesIterator->Item(fTextRangesIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -////////////////////////////////////////////// -// --ITextRunsIterator-- -////////////////////////////////////////////// - -ITextRunsIterator::ITextRunsIterator() -:fTextRunsIterator(0) -{ -} - -ITextRunsIterator::ITextRunsIterator(TextRunsIteratorRef textrunsiterator) -:fTextRunsIterator(textrunsiterator) -{ -} - -ITextRunsIterator::ITextRunsIterator(const ITextRunsIterator& src) -:fTextRunsIterator(src.fTextRunsIterator) -{ - sTextRunsIterator->AddRef(fTextRunsIterator); -} - -ITextRunsIterator::~ITextRunsIterator() -{ - sTextRunsIterator->Release(fTextRunsIterator); -} - -ITextRunsIterator& ITextRunsIterator::operator=(const ITextRunsIterator& rhs) -{ - if (&rhs != this) - { - sTextRunsIterator->Release(fTextRunsIterator); - fTextRunsIterator = rhs.fTextRunsIterator; - sTextRunsIterator->AddRef(fTextRunsIterator); - } - return *this; -} - -bool ITextRunsIterator::operator==(const ITextRunsIterator& rhs) const -{ - return fTextRunsIterator == rhs.fTextRunsIterator; -} - -bool ITextRunsIterator::operator!=(const ITextRunsIterator& rhs) const -{ - return !(*this == rhs); -} - -TextRunsIteratorRef ITextRunsIterator::GetRef() const -{ - return fTextRunsIterator; -} - -bool ITextRunsIterator::IsNull() const -{ - return sTextRunsIterator->IsNull(fTextRunsIterator); -} - -ITextRunsIterator::ITextRunsIterator( const ITextRanges& ranges, Direction direction) -{ - ATEErr error = sTextRunsIterator->Initialize(ranges.GetRef(), direction, &fTextRunsIterator); - if(error) Throw_ATE_Exception(error); -} - -bool ITextRunsIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTextRunsIterator->IsNotDone(fTextRunsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRunsIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sTextRunsIterator->IsDone(fTextRunsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool ITextRunsIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sTextRunsIterator->IsEmpty(fTextRunsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void ITextRunsIterator::MoveToFirst( ) -{ - ATEErr error = sTextRunsIterator->MoveToFirst(fTextRunsIterator); - if(error) Throw_ATE_Exception(error); -} - -void ITextRunsIterator::MoveToLast( ) -{ - ATEErr error = sTextRunsIterator->MoveToLast(fTextRunsIterator); - if(error) Throw_ATE_Exception(error); -} - -void ITextRunsIterator::Next( ) -{ - ATEErr error = sTextRunsIterator->Next(fTextRunsIterator); - if(error) Throw_ATE_Exception(error); -} - -ITextRange ITextRunsIterator::Item( ) const -{ - TextRangeRef ret = 0; - ATEErr error = sTextRunsIterator->Item(fTextRunsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -////////////////////////////////////////////// -// --IWordsIterator-- -////////////////////////////////////////////// - -IWordsIterator::IWordsIterator() -:fWordsIterator(0) -{ -} - -IWordsIterator::IWordsIterator(WordsIteratorRef wordsiterator) -:fWordsIterator(wordsiterator) -{ -} - -IWordsIterator::IWordsIterator(const IWordsIterator& src) -:fWordsIterator(src.fWordsIterator) -{ - sWordsIterator->AddRef(fWordsIterator); -} - -IWordsIterator::~IWordsIterator() -{ - sWordsIterator->Release(fWordsIterator); -} - -IWordsIterator& IWordsIterator::operator=(const IWordsIterator& rhs) -{ - if (&rhs != this) - { - sWordsIterator->Release(fWordsIterator); - fWordsIterator = rhs.fWordsIterator; - sWordsIterator->AddRef(fWordsIterator); - } - return *this; -} - -bool IWordsIterator::operator==(const IWordsIterator& rhs) const -{ - return fWordsIterator == rhs.fWordsIterator; -} - -bool IWordsIterator::operator!=(const IWordsIterator& rhs) const -{ - return !(*this == rhs); -} - -WordsIteratorRef IWordsIterator::GetRef() const -{ - return fWordsIterator; -} - -bool IWordsIterator::IsNull() const -{ - return sWordsIterator->IsNull(fWordsIterator); -} - -IWordsIterator::IWordsIterator( const ITextRanges& ranges, Direction direction) -{ - ATEErr error = sWordsIterator->Initialize(ranges.GetRef(), direction, &fWordsIterator); - if(error) Throw_ATE_Exception(error); -} - -bool IWordsIterator::IsNotDone( ) const -{ - ATEBool8 ret; - ATEErr error = sWordsIterator->IsNotDone(fWordsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IWordsIterator::IsDone( ) const -{ - ATEBool8 ret; - ATEErr error = sWordsIterator->IsDone(fWordsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -bool IWordsIterator::IsEmpty( ) const -{ - ATEBool8 ret; - ATEErr error = sWordsIterator->IsEmpty(fWordsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IWordsIterator::MoveToFirst( ) -{ - ATEErr error = sWordsIterator->MoveToFirst(fWordsIterator); - if(error) Throw_ATE_Exception(error); -} - -void IWordsIterator::MoveToLast( ) -{ - ATEErr error = sWordsIterator->MoveToLast(fWordsIterator); - if(error) Throw_ATE_Exception(error); -} - -void IWordsIterator::Next( ) -{ - ATEErr error = sWordsIterator->Next(fWordsIterator); - if(error) Throw_ATE_Exception(error); -} - -ITextRange IWordsIterator::Item( ) const -{ - TextRangeRef ret = 0; - ATEErr error = sWordsIterator->Item(fWordsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ITextRange(ret); -} - -ATETextDOM::Int32 IWordsIterator::GetTrailingSpaceCount( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sWordsIterator->GetTrailingSpaceCount(fWordsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IWordsIterator::GetTrailingCount( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sWordsIterator->GetTrailingCount(fWordsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ATETextDOM::Int32 IWordsIterator::GetTrailingTerminatingPunctuationCount( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sWordsIterator->GetTrailingTerminatingPunctuationCount(fWordsIterator, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - - -////////////////////////////////////////////// -// --IArrayLine -- -////////////////////////////////////////////// - -IArrayLine::IArrayLine() -:fArrayLine(0) -{ -} - -IArrayLine::IArrayLine(ArrayLineRef rangeref) -:fArrayLine(rangeref) -{ -} - -IArrayLine::IArrayLine(const IArrayLine& src) -:fArrayLine(src.fArrayLine) -{ - sArrayLine->AddRef(fArrayLine); -} - -IArrayLine::~IArrayLine() -{ - sArrayLine->Release(fArrayLine); -} - -IArrayLine& IArrayLine::operator=(const IArrayLine& rhs) -{ - if (&rhs != this) - { - sArrayLine->Release(fArrayLine); - fArrayLine = rhs.fArrayLine; - sArrayLine->AddRef(fArrayLine); - } - return *this; -} - -bool IArrayLine::operator==(const IArrayLine& rhs) const -{ - return fArrayLine == rhs.fArrayLine; -} - -bool IArrayLine::operator!=(const IArrayLine& rhs) const -{ - return !(*this == rhs); -} - -ArrayLineRef IArrayLine::GetRef() const -{ - return fArrayLine; -} - -bool IArrayLine::IsNull() const -{ - return sArrayLine->IsNull(fArrayLine); -} - -ATETextDOM::Int32 IArrayLine::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayLine->GetSize(fArrayLine, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -void IArrayLine::Item( ATETextDOM::Int32 index, ATETextDOM::FloatPoint* retStart, ATETextDOM::FloatPoint* retEnd) const -{ - ATETextDOM::FloatPoint tempRetEnd,tempStartEnd; - ATEErr error = sArrayLine->Item(fArrayLine, index, &tempStartEnd, &tempRetEnd); - SloFloatPointToAIFloatPoint(&tempStartEnd,retStart); - SloFloatPointToAIFloatPoint(&tempRetEnd,retEnd); - if(error) Throw_ATE_Exception(error); -} - -////////////////////////////////////////////// -// --IArrayComposerEngine-- -////////////////////////////////////////////// - -IArrayComposerEngine::IArrayComposerEngine() -:fArrayComposerEngine(0) -{ -} - -IArrayComposerEngine::IArrayComposerEngine(ArrayComposerEngineRef arraycomposerengine) -:fArrayComposerEngine(arraycomposerengine) -{ -} - -IArrayComposerEngine::IArrayComposerEngine(const IArrayComposerEngine& src) -:fArrayComposerEngine(src.fArrayComposerEngine) -{ - sArrayComposerEngine->AddRef(fArrayComposerEngine); -} - -IArrayComposerEngine::~IArrayComposerEngine() -{ - sArrayComposerEngine->Release(fArrayComposerEngine); -} - -IArrayComposerEngine& IArrayComposerEngine::operator=(const IArrayComposerEngine& rhs) -{ - if (&rhs != this) - { - sArrayComposerEngine->Release(fArrayComposerEngine); - fArrayComposerEngine = rhs.fArrayComposerEngine; - sArrayComposerEngine->AddRef(fArrayComposerEngine); - } - return *this; -} - -bool IArrayComposerEngine::operator==(const IArrayComposerEngine& rhs) const -{ - return fArrayComposerEngine == rhs.fArrayComposerEngine; -} - -bool IArrayComposerEngine::operator!=(const IArrayComposerEngine& rhs) const -{ - return !(*this == rhs); -} - -ArrayComposerEngineRef IArrayComposerEngine::GetRef() const -{ - return fArrayComposerEngine; -} - -bool IArrayComposerEngine::IsNull() const -{ - return sArrayComposerEngine->IsNull(fArrayComposerEngine); -} - -ATETextDOM::Int32 IArrayComposerEngine::GetSize( ) const -{ - ATETextDOM::Int32 ret; - ATEErr error = sArrayComposerEngine->GetSize(fArrayComposerEngine, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ComposerEngine IArrayComposerEngine::GetFirst( ) const -{ - ComposerEngine ret; - ATEErr error = sArrayComposerEngine->GetFirst(fArrayComposerEngine, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ComposerEngine IArrayComposerEngine::GetLast( ) const -{ - ComposerEngine ret; - ATEErr error = sArrayComposerEngine->GetLast(fArrayComposerEngine, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - -ComposerEngine IArrayComposerEngine::Item( ATETextDOM::Int32 index) const -{ - ComposerEngine ret; - ATEErr error = sArrayComposerEngine->Item(fArrayComposerEngine, index, &ret); - if(error) Throw_ATE_Exception(error); - return ret; -} - - -}// namespace ATE - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: IText.cpp + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ +#include "IText.h" +#include "IThrowException.h" +#include "ATETextSuitesExtern.h" +#ifdef WIN_ENV +#pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) +#endif + +namespace ATE +{ +///////////////////////////////////////////////// +// UTILITY METHOD +//////////////////////////////////////////////// + +void ATEFloatMatrixToATERealMatrix( const ATETextDOM::FloatMatrix *f, ATETextDOM::RealMatrix *r ) +{ + if (f && r) + { + r->a = f->a; + r->b = f->b; + r->c = f->c; + r->d = f->d; + r->tx = f->tx; + r->ty = f->ty; + } +} + +void ATEFloatPointToATERealPoint ( const ATETextDOM::FloatPoint *f, ATETextDOM::RealPoint *r ) +{ + if (f && r) + { + r->h = f->h; + r->v = f->v; + } +} + +void SloFloatPointToAIFloatPoint ( const ATETextDOM::FloatPoint *f, ATETextDOM::FloatPoint *r ) +{ + if (f && r) + { + r->h = f->h; + r->v = f->v; + } +} + +////////////////////////////////////////////// +// --IApplicationPaint-- +////////////////////////////////////////////// + +IApplicationPaint::IApplicationPaint() +:fApplicationPaint(0) +{ +} + +IApplicationPaint::IApplicationPaint(ApplicationPaintRef applicationpaint) +:fApplicationPaint(applicationpaint) +{ +} + +IApplicationPaint::IApplicationPaint(const IApplicationPaint& src) +:fApplicationPaint(src.fApplicationPaint) +{ + sApplicationPaint->AddRef(fApplicationPaint); +} + +IApplicationPaint::~IApplicationPaint() +{ + sApplicationPaint->Release(fApplicationPaint); +} + +IApplicationPaint& IApplicationPaint::operator=(const IApplicationPaint& rhs) +{ + if (&rhs != this) + { + sApplicationPaint->Release(fApplicationPaint); + fApplicationPaint = rhs.fApplicationPaint; + sApplicationPaint->AddRef(fApplicationPaint); + } + return *this; +} + +bool IApplicationPaint::operator==(const IApplicationPaint& rhs) const +{ + return fApplicationPaint == rhs.fApplicationPaint; +} + +bool IApplicationPaint::operator!=(const IApplicationPaint& rhs) const +{ + return !(*this == rhs); +} + +ApplicationPaintRef IApplicationPaint::GetRef() const +{ + return fApplicationPaint; +} + +bool IApplicationPaint::IsNull() const +{ + return sApplicationPaint->IsNull(fApplicationPaint); +} + +////////////////////////////////////////////// +// --ICompFont-- +////////////////////////////////////////////// + +ICompFont::ICompFont() +:fCompFont(0) +{ +} + +ICompFont::ICompFont(CompFontRef compfont) +:fCompFont(compfont) +{ +} + +ICompFont::ICompFont(const ICompFont& src) +:fCompFont(src.fCompFont) +{ + sCompFont->AddRef(fCompFont); +} + +ICompFont::~ICompFont() +{ + sCompFont->Release(fCompFont); +} + +ICompFont& ICompFont::operator=(const ICompFont& rhs) +{ + if (&rhs != this) + { + sCompFont->Release(fCompFont); + fCompFont = rhs.fCompFont; + sCompFont->AddRef(fCompFont); + } + return *this; +} + +bool ICompFont::operator==(const ICompFont& rhs) const +{ + return fCompFont == rhs.fCompFont; +} + +bool ICompFont::operator!=(const ICompFont& rhs) const +{ + return !(*this == rhs); +} + +CompFontRef ICompFont::GetRef() const +{ + return fCompFont; +} + +bool ICompFont::IsNull() const +{ + return sCompFont->IsNull(fCompFont); +} + +ICompFont::ICompFont( ITextResources pResources) +{ + ATEErr error = sCompFont->Initialize(pResources.GetRef(), &fCompFont); + if(error) Throw_ATE_Exception(error); +} + +void ICompFont::GetNativeName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const +{ + ATEErr error = sCompFont->GetNativeName(fCompFont, name, maxLength); + if(error) Throw_ATE_Exception(error); +} + +void ICompFont::SetNativeName( const ATETextDOM::Unicode* name) +{ + ATEErr error = sCompFont->SetNativeName(fCompFont, name); + if(error) Throw_ATE_Exception(error); +} + +void ICompFont::GetPostScriptName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const +{ + ATEErr error = sCompFont->GetPostScriptName_AsUnicode(fCompFont, name, maxLength); + if(error) Throw_ATE_Exception(error); +} + +void ICompFont::GetPostScriptName( char* name, ATETextDOM::Int32 maxLength) const +{ + ATEErr error = sCompFont->GetPostScriptName_AsChar(fCompFont, name, maxLength); + if(error) Throw_ATE_Exception(error); +} + +void ICompFont::SetFontDictionary( void* fontDictionary) +{ + ATEErr error = sCompFont->SetFontDictionary(fCompFont, fontDictionary); + if(error) Throw_ATE_Exception(error); +} + +void* ICompFont::GetFontDictionary( ) const +{ + void* ret; + ATEErr error = sCompFont->GetFontDictionary(fCompFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICompFont ICompFont::Duplicate( ) const +{ + CompFontRef ret = 0; + ATEErr error = sCompFont->Duplicate(fCompFont, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFont(ret); +} + +bool ICompFont::IsModified( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFont->IsModified(fCompFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFont::IsEditable( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFont->IsEditable(fCompFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFont::IsCommitted( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFont->IsCommitted(fCompFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFont::VerifyState( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFont->VerifyState(fCompFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFont::IsATCFileLoaded( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFont->IsATCFileLoaded(fCompFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ICompFont::GetComponentCount( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFont->GetComponentCount(fCompFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICompFontComponent ICompFont::GetComponent( ATETextDOM::Int32 index) const +{ + CompFontComponentRef ret = 0; + ATEErr error = sCompFont->GetComponent(fCompFont, index, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontComponent(ret); +} + +ATETextDOM::Int32 ICompFont::Find( ICompFontComponent component) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFont->Find(fCompFont, component.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFont::RemoveComponent( ATETextDOM::Int32 index) +{ + ATEBool8 ret; + ATEErr error = sCompFont->RemoveComponent(fCompFont, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ICompFont::AddComponent( ICompFontComponent component) +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFont->AddComponent(fCompFont, component.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFont::ReplaceComponent( ATETextDOM::Int32 index, ICompFontComponent component) +{ + ATEBool8 ret; + ATEErr error = sCompFont->ReplaceComponent(fCompFont, index, component.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --ICompFontClass-- +////////////////////////////////////////////// + +ICompFontClass::ICompFontClass() +:fCompFontClass(0) +{ + ATEErr error = sCompFontClass->Initialize(&fCompFontClass); + if(error) Throw_ATE_Exception(error); +} + +ICompFontClass::ICompFontClass(CompFontClassRef compfontclass) +:fCompFontClass(compfontclass) +{ +} + +ICompFontClass::ICompFontClass(const ICompFontClass& src) +:fCompFontClass(src.fCompFontClass) +{ + sCompFontClass->AddRef(fCompFontClass); +} + +ICompFontClass::~ICompFontClass() +{ + sCompFontClass->Release(fCompFontClass); +} + +ICompFontClass& ICompFontClass::operator=(const ICompFontClass& rhs) +{ + if (&rhs != this) + { + sCompFontClass->Release(fCompFontClass); + fCompFontClass = rhs.fCompFontClass; + sCompFontClass->AddRef(fCompFontClass); + } + return *this; +} + +bool ICompFontClass::operator==(const ICompFontClass& rhs) const +{ + return fCompFontClass == rhs.fCompFontClass; +} + +bool ICompFontClass::operator!=(const ICompFontClass& rhs) const +{ + return !(*this == rhs); +} + +CompFontClassRef ICompFontClass::GetRef() const +{ + return fCompFontClass; +} + +bool ICompFontClass::IsNull() const +{ + return sCompFontClass->IsNull(fCompFontClass); +} + +void ICompFontClass::GetNativeName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const +{ + ATEErr error = sCompFontClass->GetNativeName(fCompFontClass, name, maxLength); + if(error) Throw_ATE_Exception(error); +} + +void ICompFontClass::SetNativeName( const ATETextDOM::Unicode* name) +{ + ATEErr error = sCompFontClass->SetNativeName(fCompFontClass, name); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 ICompFontClass::GetCodes( ATETextDOM::Unicode* codes, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontClass->GetCodes(fCompFontClass, codes, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ICompFontClass::SetCodes( const ATETextDOM::Unicode* codes) +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontClass->SetCodes(fCompFontClass, codes, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICompFontClass ICompFontClass::Duplicate( ) const +{ + CompFontClassRef ret = 0; + ATEErr error = sCompFontClass->Duplicate(fCompFontClass, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontClass(ret); +} + +ATETextDOM::Int32 ICompFontClass::GetCharacterCount( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontClass->GetCharacterCount(fCompFontClass, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +CompositeFontClassType ICompFontClass::GetClassType( ) const +{ + CompositeFontClassType ret; + ATEErr error = sCompFontClass->GetClassType(fCompFontClass, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFontClass::IsCodeInClass( ATETextDOM::Unicode code) const +{ + ATEBool8 ret; + ATEErr error = sCompFontClass->IsCodeInClass(fCompFontClass, code, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFontClass::IsEditable( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFontClass->IsEditable(fCompFontClass, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFontClass::IsCustomOverride( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFontClass->IsCustomOverride(fCompFontClass, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFontClass::IsModified( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFontClass->IsModified(fCompFontClass, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFontClass::VerifyState( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFontClass->VerifyState(fCompFontClass, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --ICompFontClassSet-- +////////////////////////////////////////////// + +ICompFontClassSet::ICompFontClassSet() +:fCompFontClassSet(0) +{ +} + +ICompFontClassSet::ICompFontClassSet(CompFontClassSetRef compfontclassset) +:fCompFontClassSet(compfontclassset) +{ +} + +ICompFontClassSet::ICompFontClassSet(const ICompFontClassSet& src) +:fCompFontClassSet(src.fCompFontClassSet) +{ + sCompFontClassSet->AddRef(fCompFontClassSet); +} + +ICompFontClassSet::~ICompFontClassSet() +{ + sCompFontClassSet->Release(fCompFontClassSet); +} + +ICompFontClassSet& ICompFontClassSet::operator=(const ICompFontClassSet& rhs) +{ + if (&rhs != this) + { + sCompFontClassSet->Release(fCompFontClassSet); + fCompFontClassSet = rhs.fCompFontClassSet; + sCompFontClassSet->AddRef(fCompFontClassSet); + } + return *this; +} + +bool ICompFontClassSet::operator==(const ICompFontClassSet& rhs) const +{ + return fCompFontClassSet == rhs.fCompFontClassSet; +} + +bool ICompFontClassSet::operator!=(const ICompFontClassSet& rhs) const +{ + return !(*this == rhs); +} + +CompFontClassSetRef ICompFontClassSet::GetRef() const +{ + return fCompFontClassSet; +} + +bool ICompFontClassSet::IsNull() const +{ + return sCompFontClassSet->IsNull(fCompFontClassSet); +} + +ATETextDOM::Int32 ICompFontClassSet::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontClassSet->GetSize(fCompFontClassSet, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICompFontClass ICompFontClassSet::GetFirst( ) const +{ + CompFontClassRef ret = 0; + ATEErr error = sCompFontClassSet->GetFirst(fCompFontClassSet, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontClass(ret); +} + +ICompFontClass ICompFontClassSet::GetLast( ) const +{ + CompFontClassRef ret = 0; + ATEErr error = sCompFontClassSet->GetLast(fCompFontClassSet, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontClass(ret); +} + +ICompFontClass ICompFontClassSet::Item( ATETextDOM::Int32 nIndex) const +{ + CompFontClassRef ret = 0; + ATEErr error = sCompFontClassSet->Item(fCompFontClassSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontClass(ret); +} + +ATETextDOM::Int32 ICompFontClassSet::Find( ICompFontClass compFontClass) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontClassSet->Find(fCompFontClassSet, compFontClass.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ICompFontClassSet::FindPredefined( CompositeFontClassType predefinedType) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontClassSet->FindPredefined(fCompFontClassSet, predefinedType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --ICompFontComponent-- +////////////////////////////////////////////// + +ICompFontComponent::ICompFontComponent() +:fCompFontComponent(0) +{ +} + +ICompFontComponent::ICompFontComponent(CompFontComponentRef compfontcomponent) +:fCompFontComponent(compfontcomponent) +{ +} + +ICompFontComponent::ICompFontComponent(const ICompFontComponent& src) +:fCompFontComponent(src.fCompFontComponent) +{ + sCompFontComponent->AddRef(fCompFontComponent); +} + +ICompFontComponent::~ICompFontComponent() +{ + sCompFontComponent->Release(fCompFontComponent); +} + +ICompFontComponent& ICompFontComponent::operator=(const ICompFontComponent& rhs) +{ + if (&rhs != this) + { + sCompFontComponent->Release(fCompFontComponent); + fCompFontComponent = rhs.fCompFontComponent; + sCompFontComponent->AddRef(fCompFontComponent); + } + return *this; +} + +bool ICompFontComponent::operator==(const ICompFontComponent& rhs) const +{ + return fCompFontComponent == rhs.fCompFontComponent; +} + +bool ICompFontComponent::operator!=(const ICompFontComponent& rhs) const +{ + return !(*this == rhs); +} + +CompFontComponentRef ICompFontComponent::GetRef() const +{ + return fCompFontComponent; +} + +bool ICompFontComponent::IsNull() const +{ + return sCompFontComponent->IsNull(fCompFontComponent); +} + +ICompFontComponent::ICompFontComponent( ITextResources pResources) +{ + ATEErr error = sCompFontComponent->Initialize(pResources.GetRef(), &fCompFontComponent); + if(error) Throw_ATE_Exception(error); +} + +ICompFontClass ICompFontComponent::GetClass( ) const +{ + CompFontClassRef ret = 0; + ATEErr error = sCompFontComponent->GetClass(fCompFontComponent, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontClass(ret); +} + +void ICompFontComponent::SetClass( ICompFontClass charClass) +{ + ATEErr error = sCompFontComponent->SetClass(fCompFontComponent, charClass.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +IFont ICompFontComponent::GetFont( ) const +{ + FontRef ret = 0; + ATEErr error = sCompFontComponent->GetFont(fCompFontComponent, &ret); + if(error) Throw_ATE_Exception(error); + return IFont(ret); +} + +void ICompFontComponent::SetFont( IFont font) +{ + ATEErr error = sCompFontComponent->SetFont(fCompFontComponent, font.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real ICompFontComponent::GetSize( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sCompFontComponent->GetSize(fCompFontComponent, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ICompFontComponent::SetSize( ATETextDOM::Real size) +{ + ATEErr error = sCompFontComponent->SetSize(fCompFontComponent, static_cast(size)); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real ICompFontComponent::GetBaseline( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sCompFontComponent->GetBaseline(fCompFontComponent, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ICompFontComponent::SetBaseline( ATETextDOM::Real baseline) +{ + ATEErr error = sCompFontComponent->SetBaseline(fCompFontComponent, static_cast(baseline)); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real ICompFontComponent::GetHorizontalScale( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sCompFontComponent->GetHorizontalScale(fCompFontComponent, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ICompFontComponent::SetHorizontalScale( ATETextDOM::Real horizontalScale) +{ + ATEErr error = sCompFontComponent->SetHorizontalScale(fCompFontComponent, static_cast(horizontalScale)); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real ICompFontComponent::GetVerticalScale( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sCompFontComponent->GetVerticalScale(fCompFontComponent, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ICompFontComponent::SetVerticalScale( ATETextDOM::Real verticalScale) +{ + ATEErr error = sCompFontComponent->SetVerticalScale(fCompFontComponent, static_cast(verticalScale)); + if(error) Throw_ATE_Exception(error); +} + +bool ICompFontComponent::GetCenterGlyph( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFontComponent->GetCenterGlyph(fCompFontComponent, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ICompFontComponent::SetCenterGlyph( bool centerglyph) +{ + ATEErr error = sCompFontComponent->SetCenterGlyph(fCompFontComponent, centerglyph); + if(error) Throw_ATE_Exception(error); +} + +bool ICompFontComponent::IsModified( ) const +{ + ATEBool8 ret; + ATEErr error = sCompFontComponent->IsModified(fCompFontComponent, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --ICompFontSet-- +////////////////////////////////////////////// + +ICompFontSet::ICompFontSet() +:fCompFontSet(0) +{ +} + +ICompFontSet::ICompFontSet(CompFontSetRef compfontset) +:fCompFontSet(compfontset) +{ +} + +ICompFontSet::ICompFontSet(const ICompFontSet& src) +:fCompFontSet(src.fCompFontSet) +{ + sCompFontSet->AddRef(fCompFontSet); +} + +ICompFontSet::~ICompFontSet() +{ + sCompFontSet->Release(fCompFontSet); +} + +ICompFontSet& ICompFontSet::operator=(const ICompFontSet& rhs) +{ + if (&rhs != this) + { + sCompFontSet->Release(fCompFontSet); + fCompFontSet = rhs.fCompFontSet; + sCompFontSet->AddRef(fCompFontSet); + } + return *this; +} + +bool ICompFontSet::operator==(const ICompFontSet& rhs) const +{ + return fCompFontSet == rhs.fCompFontSet; +} + +bool ICompFontSet::operator!=(const ICompFontSet& rhs) const +{ + return !(*this == rhs); +} + +CompFontSetRef ICompFontSet::GetRef() const +{ + return fCompFontSet; +} + +bool ICompFontSet::IsNull() const +{ + return sCompFontSet->IsNull(fCompFontSet); +} + +ATETextDOM::Int32 ICompFontSet::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontSet->GetSize(fCompFontSet, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICompFont ICompFontSet::GetFirst( ) const +{ + CompFontRef ret = 0; + ATEErr error = sCompFontSet->GetFirst(fCompFontSet, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFont(ret); +} + +ICompFont ICompFontSet::GetLast( ) const +{ + CompFontRef ret = 0; + ATEErr error = sCompFontSet->GetLast(fCompFontSet, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFont(ret); +} + +ICompFont ICompFontSet::Item( ATETextDOM::Int32 nIndex) const +{ + CompFontRef ret = 0; + ATEErr error = sCompFontSet->Item(fCompFontSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFont(ret); +} + +ATETextDOM::Int32 ICompFontSet::Find( ICompFont font) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontSet->Find(fCompFontSet, font.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFontSet::Remove( ATETextDOM::Int32 nIndex) +{ + ATEBool8 ret; + ATEErr error = sCompFontSet->Remove(fCompFontSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ICompFontSet::Add( ICompFont font) +{ + ATETextDOM::Int32 ret; + ATEErr error = sCompFontSet->Add(fCompFontSet, font.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICompFontSet::Replace( ATETextDOM::Int32 nIndex, ICompFont newFont) +{ + ATEBool8 ret; + ATEErr error = sCompFontSet->Replace(fCompFontSet, nIndex, newFont.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ICompFontSet::Update( ) const +{ + ATEErr error = sCompFontSet->Update(fCompFontSet); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IGlyphRun-- +////////////////////////////////////////////// + +IGlyphRun::IGlyphRun() +:fGlyphRun(0) +{ +} + +IGlyphRun::IGlyphRun(GlyphRunRef glyphrun) +:fGlyphRun(glyphrun) +{ +} + +IGlyphRun::IGlyphRun(const IGlyphRun& src) +:fGlyphRun(src.fGlyphRun) +{ + sGlyphRun->AddRef(fGlyphRun); +} + +IGlyphRun::~IGlyphRun() +{ + sGlyphRun->Release(fGlyphRun); +} + +IGlyphRun& IGlyphRun::operator=(const IGlyphRun& rhs) +{ + if (&rhs != this) + { + sGlyphRun->Release(fGlyphRun); + fGlyphRun = rhs.fGlyphRun; + sGlyphRun->AddRef(fGlyphRun); + } + return *this; +} + +bool IGlyphRun::operator==(const IGlyphRun& rhs) const +{ + return fGlyphRun == rhs.fGlyphRun; +} + +bool IGlyphRun::operator!=(const IGlyphRun& rhs) const +{ + return !(*this == rhs); +} + +GlyphRunRef IGlyphRun::GetRef() const +{ + return fGlyphRun; +} + +bool IGlyphRun::IsNull() const +{ + return sGlyphRun->IsNull(fGlyphRun); +} + +ITextLine IGlyphRun::GetTextLine( ) const +{ + TextLineRef ret = 0; + ATEErr error = sGlyphRun->GetTextLine(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return ITextLine(ret); +} + +ATETextDOM::Int32 IGlyphRun::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sGlyphRun->GetSize(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IGlyphRun::GetCharacterCount( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sGlyphRun->GetCharacterCount(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IArrayRealPoint IGlyphRun::GetOrigins( ) const +{ + ArrayRealPointRef ret = 0; + ATEErr error = sGlyphRun->GetOrigins(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayRealPoint(ret); +} + +IArrayGlyphID IGlyphRun::GetGlyphIDs( ) const +{ + ArrayGlyphIDRef ret = 0; + ATEErr error = sGlyphRun->GetGlyphIDs(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayGlyphID(ret); +} + +ITextRange +IGlyphRun::GetCharacterRange() const +{ + TextRangeRef ret = 0; + ATEErr error = sGlyphRun->GetCharacterRange(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +ATETextDOM::RealMatrix IGlyphRun::GetMatrix( ) const +{ + ATETextDOM::RealMatrix ret; + ATETextDOM::FloatMatrix tempRet; + ATEErr error = sGlyphRun->GetMatrix(fGlyphRun, &tempRet); + ATEFloatMatrixToATERealMatrix(&tempRet,&ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICharFeatures IGlyphRun::GetCharFeatures( ) const +{ + CharFeaturesRef ret = 0; + ATEErr error = sGlyphRun->GetCharFeatures(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return ICharFeatures(ret); +} + +GlyphOrientation IGlyphRun::GetGlyphOrientation( ) const +{ + GlyphOrientation ret; + ATEErr error = sGlyphRun->GetGlyphOrientation(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetAscent( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetAscent(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetDescent( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetDescent(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetTracking( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetTracking(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetSpaceGlyphWidth( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetSpaceGlyphWidth(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetDistanceToBaseline( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetDistanceToBaseline(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetUnderlinePosition( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetUnderlinePosition(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetUnderlineThickness( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetUnderlineThickness(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetMaxCapHeight( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetMaxCapHeight(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetMinCapHeight( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetMinCapHeight(fGlyphRun, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IGlyphRun::GetXHeight() const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sGlyphRun->GetMinCapHeight(fGlyphRun, &tempRet); + ret = tempRet; + if (error) Throw_ATE_Exception(error); + return ret; +} + +IFont IGlyphRun::GetFlattenedFont( ) const +{ + FontRef ret = 0; + ATEErr error = sGlyphRun->GetFlattenedFont(fGlyphRun, &ret); + if(error) Throw_ATE_Exception(error); + return IFont(ret); +} + +ATETextDOM::Int32 IGlyphRun::GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sGlyphRun->GetContents_AsUnicode(fGlyphRun, text, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IGlyphRun::GetContents( char* text, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sGlyphRun->GetContents_AsChar(fGlyphRun, text, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IGlyphRunsIterator-- +////////////////////////////////////////////// + +IGlyphRunsIterator::IGlyphRunsIterator() +:fGlyphRunsIterator(0) +{ +} + +IGlyphRunsIterator::IGlyphRunsIterator(GlyphRunsIteratorRef glyphrunsiterator) +:fGlyphRunsIterator(glyphrunsiterator) +{ +} + +IGlyphRunsIterator::IGlyphRunsIterator(const IGlyphRunsIterator& src) +:fGlyphRunsIterator(src.fGlyphRunsIterator) +{ + sGlyphRunsIterator->AddRef(fGlyphRunsIterator); +} + +IGlyphRunsIterator::~IGlyphRunsIterator() +{ + sGlyphRunsIterator->Release(fGlyphRunsIterator); +} + +IGlyphRunsIterator& IGlyphRunsIterator::operator=(const IGlyphRunsIterator& rhs) +{ + if (&rhs != this) + { + sGlyphRunsIterator->Release(fGlyphRunsIterator); + fGlyphRunsIterator = rhs.fGlyphRunsIterator; + sGlyphRunsIterator->AddRef(fGlyphRunsIterator); + } + return *this; +} + +bool IGlyphRunsIterator::operator==(const IGlyphRunsIterator& rhs) const +{ + return fGlyphRunsIterator == rhs.fGlyphRunsIterator; +} + +bool IGlyphRunsIterator::operator!=(const IGlyphRunsIterator& rhs) const +{ + return !(*this == rhs); +} + +GlyphRunsIteratorRef IGlyphRunsIterator::GetRef() const +{ + return fGlyphRunsIterator; +} + +bool IGlyphRunsIterator::IsNull() const +{ + return sGlyphRunsIterator->IsNull(fGlyphRunsIterator); +} + +bool IGlyphRunsIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sGlyphRunsIterator->IsNotDone(fGlyphRunsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IGlyphRunsIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sGlyphRunsIterator->IsDone(fGlyphRunsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IGlyphRunsIterator::Next( ) +{ + ATEErr error = sGlyphRunsIterator->Next(fGlyphRunsIterator); + if(error) Throw_ATE_Exception(error); +} + +IGlyphRun IGlyphRunsIterator::Item( ) const +{ + GlyphRunRef ret = 0; + ATEErr error = sGlyphRunsIterator->Item(fGlyphRunsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyphRun(ret); +} + +////////////////////////////////////////////// +// --IListStyle-- +////////////////////////////////////////////// + +IListStyle::IListStyle() +:fListStyle(0) +{ + ATEErr error = sListStyle->Initialize(&fListStyle); + if(error) Throw_ATE_Exception(error); +} + +IListStyle::IListStyle(ListStyleRef listStyle) +:fListStyle(listStyle) +{ +} + +IListStyle::IListStyle(const IListStyle& src) +:fListStyle(src.fListStyle) +{ + sListStyle->AddRef(fListStyle); +} + +IListStyle::~IListStyle() +{ + sListStyle->Release(fListStyle); +} + +IListStyle& IListStyle::operator=(const IListStyle& rhs) +{ + if (&rhs != this) + { + sListStyle->Release(fListStyle); + fListStyle = rhs.fListStyle; + sListStyle->AddRef(fListStyle); + } + return *this; +} + +bool IListStyle::operator==(const IListStyle& rhs) const +{ + ATEBool8 ret = false; + ATEErr error = sListStyle->IsEqual(fListStyle, rhs.fListStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IListStyle::operator!=(const IListStyle& rhs) const +{ + return !(*this == rhs); +} + +ListStyleRef IListStyle::GetRef() const +{ + return fListStyle; +} + +bool IListStyle::IsNull() const +{ + return sListStyle->IsNull(fListStyle); +} + +ATETextDOM::Int32 IListStyle::GetName( ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sListStyle->GetName(fListStyle, name, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IListStyle::GetNameSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sListStyle->GetNameSize(fListStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IListStyle::GetNumberOfLevelStyles( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sListStyle->GetNumberOfLevelStyles(fListStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + + +void IListStyle::GetNthTierIndents(ATETextDOM::Int32 index, + ATETextDOM::Float emWidth, + ATETextDOM::Float * listIndent, + ATETextDOM::Float * textIndent, + ATETextDOM::Float * labelIndent) +{ + ATEErr error = sListStyle->GetNthTierIndents(fListStyle, index, emWidth, listIndent , textIndent, labelIndent); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::GetNthLevelLabelAlignment(ATETextDOM::Int32 index, + ATE::BNListAlignment& labelAlignment) +{ + ATEErr error = sListStyle->GetNthLevelLabelAlignment(fListStyle, index, labelAlignment ); + if(error) Throw_ATE_Exception(error); +} + +IFont IListStyle::GetNthLevelLabelFont( ATETextDOM::Int32 index) +{ + FontRef ret = 0; + ATEErr error = sListStyle->GetNthLevelLabelFont(fListStyle, index, &ret ); + if(error) Throw_ATE_Exception(error); + return IFont(ret); +} + +void IListStyle::GetNthLevelSequenceGenerator(ATETextDOM::Int32 index, + ATE::ListStylePredefinedTag& sequenceGeneratorType, + ATETextDOM::Unicode* prefix, + ATETextDOM::Unicode* postfix, + ATETextDOM::Unicode* bullet) +{ + ATEErr error = sListStyle->GetNthLevelSequenceGenerator(fListStyle, index, sequenceGeneratorType, prefix, postfix, bullet ); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::SetName( const ATETextDOM::Unicode * name) +{ + ATEErr error = sListStyle->SetName(fListStyle, name); + if(error) Throw_ATE_Exception(error); +} + +bool IListStyle::MatchesPredefinedResourceTag( ATE::ListStylePredefinedTag tag) const +{ + ATEBool8 ret; + ATEErr error = sListStyle->MatchesPredefinedResourceTag(fListStyle, tag, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IListStyle::IsEquivalent( IListStyle rhsListStyle) const +{ + ATEBool8 ret; + ATEErr error = sListStyle->IsEquivalent(fListStyle, rhsListStyle.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IListStyle::IsModified( ) const +{ + ATEBool8 ret; + ATEErr error = sListStyle->IsModified(fListStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IListStyle::IsPredefined( ) const +{ + ATEBool8 ret; + ATEErr error = sListStyle->IsPredefined(fListStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IListStyle::SetNthLevelIndentUnits( ATETextDOM::Int32 index, ATE::IndentUnits units) +{ + ATEErr error = sListStyle->SetNthLevelIndentUnits(fListStyle, index, units); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::SetNthLevelTextIndent( ATETextDOM::Int32 index, ATETextDOM::Float indent) +{ + ATEErr error = sListStyle->SetNthLevelTextIndent(fListStyle, index, indent); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::SetNthLevelLabelIndent( ATETextDOM::Int32 index, ATETextDOM::Float indent) +{ + ATEErr error = sListStyle->SetNthLevelLabelIndent(fListStyle, index, indent); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::SetNthLevelLabelAlignment( ATETextDOM::Int32 index, ATE::BNListAlignment labelAlignment) +{ + ATEErr error = sListStyle->SetNthLevelLabelAlignment(fListStyle, index, labelAlignment); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::SetNthLevelLabelFont(ATETextDOM::Int32 index, IFont font) +{ + ATEErr error = sListStyle->SetNthLevelLabelFont(fListStyle, index, font.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::SetNthLevelSequenceGenerator(ATETextDOM::Int32 index, + ATE::ListStylePredefinedTag sequenceGeneratorTag, + const ATETextDOM::Unicode* prefix, + const ATETextDOM::Unicode* postfix, + const ATETextDOM::Unicode* bullet) +{ + ATEErr error = sListStyle->SetNthLevelSequenceGenerator(fListStyle, index, sequenceGeneratorTag, prefix, postfix, bullet); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::InsertLevelAt( ATETextDOM::Int32 index, + ATE::IndentUnits units, + ATETextDOM::Float textIndent, + ATETextDOM::Float labelIndent, + ATE::BNListAlignment labelAlignment, + IFont font, + ATE::ListStylePredefinedTag sequenceGeneratorTag, + const ATETextDOM::Unicode* prefix, + const ATETextDOM::Unicode* postfix, + const ATETextDOM::Unicode* bullet) +{ + ATEErr error = sListStyle->InsertLevelAt(fListStyle, index, units, textIndent, labelIndent, labelAlignment, font.GetRef() , sequenceGeneratorTag, prefix, postfix, bullet ); + if(error) Throw_ATE_Exception(error); +} + +void IListStyle::EraseLevel( ListStyleRef listStyle, ATETextDOM::Int32 index) +{ + ATEErr error = sListStyle->EraseLevel(fListStyle, index); + if(error) Throw_ATE_Exception(error); +} + +IListStyle IListStyle::Duplicate( ) const +{ + ListStyleRef ret = 0; + ATEErr error = sListStyle->Duplicate(fListStyle, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyle(ret); +} + +////////////////////////////////////////////// +// --IListStyleSet-- +////////////////////////////////////////////// + +IListStyleSet::IListStyleSet() +:fListStyleSet(0) +{ +} + +IListStyleSet::IListStyleSet(ListStyleSetRef listStyleset) +:fListStyleSet(listStyleset) +{ +} + +IListStyleSet::IListStyleSet(const IListStyleSet& src) +:fListStyleSet(src.fListStyleSet) +{ + sListStyleSet->AddRef(fListStyleSet); +} + +IListStyleSet::~IListStyleSet() +{ + sListStyleSet->Release(fListStyleSet); +} + +IListStyleSet& IListStyleSet::operator=(const IListStyleSet& rhs) +{ + if (&rhs != this) + { + sListStyleSet->Release(fListStyleSet); + fListStyleSet = rhs.fListStyleSet; + sListStyleSet->AddRef(fListStyleSet); + } + return *this; +} + +bool IListStyleSet::operator==(const IListStyleSet& rhs) const +{ + return fListStyleSet == rhs.fListStyleSet; +} + +bool IListStyleSet::operator!=(const IListStyleSet& rhs) const +{ + return !(*this == rhs); +} + +ListStyleSetRef IListStyleSet::GetRef() const +{ + return fListStyleSet; +} + +bool IListStyleSet::IsNull() const +{ + return sListStyleSet->IsNull(fListStyleSet); +} + +ATETextDOM::Int32 IListStyleSet::GetSize( ) +{ + ATETextDOM::Int32 ret; + ATEErr error = sListStyleSet->GetSize(fListStyleSet, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IListStyle IListStyleSet::GetFirst( ) +{ + ListStyleRef ret = 0; + ATEErr error = sListStyleSet->GetFirst(fListStyleSet, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyle(ret); +} + +IListStyle IListStyleSet::GetLast( ) +{ + ListStyleRef ret = 0; + ATEErr error = sListStyleSet->GetLast(fListStyleSet, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyle(ret); +} + +IListStyle IListStyleSet::Item( ATETextDOM::Int32 nIndex) const +{ + ListStyleRef ret = 0; + ATEErr error = sListStyleSet->Item(fListStyleSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyle(ret); +} + +ATETextDOM::Int32 IListStyleSet::Find( const IListStyle ListStyle) +{ + ATETextDOM::Int32 ret; + ATEErr error = sListStyleSet->Find_AsListStyle(fListStyleSet, ListStyle.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IListStyleSet::Find( const ATETextDOM::Unicode* name) +{ + ATETextDOM::Int32 ret; + ATEErr error = sListStyleSet->Find_AsUnicode(fListStyleSet, name, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IListStyleSet::Find( ListStylePredefinedTag tag) +{ + ATETextDOM::Int32 ret; + ATEErr error = sListStyleSet->Find_ByPredefinedListStyleTag(fListStyleSet, tag, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IListStyleSet::Remove( ATETextDOM::Int32 nIndex) +{ + ATEBool8 ret; + ATEErr error = sListStyleSet->Remove(fListStyleSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IListStyleSet::Add( IListStyle ListStyle) +{ + ATETextDOM::Int32 ret; + ATEErr error = sListStyleSet->Add(fListStyleSet, ListStyle.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IListStyleSet::Replace( ATETextDOM::Int32 nIndex, IListStyle ListStyle) +{ + ATEBool8 ret; + ATEErr error = sListStyleSet->Replace(fListStyleSet, nIndex, ListStyle.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IMojiKumi-- +////////////////////////////////////////////// + +IMojiKumi::IMojiKumi() +:fMojiKumi(0) +{ + ATEErr error = sMojiKumi->Initialize(&fMojiKumi); + if(error) Throw_ATE_Exception(error); +} + +IMojiKumi::IMojiKumi(MojiKumiRef mojikumi) +:fMojiKumi(mojikumi) +{ +} + +IMojiKumi::IMojiKumi(const IMojiKumi& src) +:fMojiKumi(src.fMojiKumi) +{ + sMojiKumi->AddRef(fMojiKumi); +} + +IMojiKumi::~IMojiKumi() +{ + sMojiKumi->Release(fMojiKumi); +} + +IMojiKumi& IMojiKumi::operator=(const IMojiKumi& rhs) +{ + if (&rhs != this) + { + sMojiKumi->Release(fMojiKumi); + fMojiKumi = rhs.fMojiKumi; + sMojiKumi->AddRef(fMojiKumi); + } + return *this; +} + +bool IMojiKumi::operator==(const IMojiKumi& rhs) const +{ + ATEBool8 ret = false; + ATEErr error = sMojiKumi->IsEqual(fMojiKumi, rhs.fMojiKumi, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IMojiKumi::operator!=(const IMojiKumi& rhs) const +{ + return !(*this == rhs); +} + +MojiKumiRef IMojiKumi::GetRef() const +{ + return fMojiKumi; +} + +bool IMojiKumi::IsNull() const +{ + return sMojiKumi->IsNull(fMojiKumi); +} + +ATETextDOM::Int32 IMojiKumi::GetName( ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sMojiKumi->GetName(fMojiKumi, name, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IMojiKumi::GetNameSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sMojiKumi->GetNameSize(fMojiKumi, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IMojiKumi::SetName( const ATETextDOM::Unicode * name) +{ + ATEErr error = sMojiKumi->SetName(fMojiKumi, name); + if(error) Throw_ATE_Exception(error); +} + +bool IMojiKumi::MatchesPredefinedResourceTag( ATE::MojikumiTablePredefinedTag tag) const +{ + ATEBool8 ret; + ATEErr error = sMojiKumi->MatchesPredefinedResourceTag(fMojiKumi, tag, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IMojiKumi::GetEntry( ATETextDOM::Int32 index, ATETextDOM::Float * minExpansion, ATETextDOM::Float * maxExpansion, ATETextDOM::Float * desiredExpansion) const +{ + ATEErr error = sMojiKumi->GetEntry(fMojiKumi, index, minExpansion, maxExpansion, desiredExpansion); + if(error) Throw_ATE_Exception(error); +} + +void IMojiKumi::SetEntry( ATETextDOM::Int32 index, ATETextDOM::Real minExpansion, ATETextDOM::Real maxExpansion, ATETextDOM::Real desiredExpansion) +{ + ATEErr error = sMojiKumi->SetEntry(fMojiKumi, index, static_cast(minExpansion), static_cast(maxExpansion), static_cast(desiredExpansion)); + if(error) Throw_ATE_Exception(error); +} + +bool IMojiKumi::IsEquivalent( IMojiKumi rhsMojiKumi) const +{ + ATEBool8 ret; + ATEErr error = sMojiKumi->IsEquivalent(fMojiKumi, rhsMojiKumi.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IMojiKumi::IsModified( ) const +{ + ATEBool8 ret; + ATEErr error = sMojiKumi->IsModified(fMojiKumi, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IMojiKumi::IsPredefined( ) const +{ + ATEBool8 ret; + ATEErr error = sMojiKumi->IsPredefined(fMojiKumi, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IMojiKumi IMojiKumi::Duplicate( ) const +{ + MojiKumiRef ret = 0; + ATEErr error = sMojiKumi->Duplicate(fMojiKumi, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumi(ret); +} + +////////////////////////////////////////////// +// --IMojiKumiSet-- +////////////////////////////////////////////// + +IMojiKumiSet::IMojiKumiSet() +:fMojiKumiSet(0) +{ +} + +IMojiKumiSet::IMojiKumiSet(MojiKumiSetRef mojikumiset) +:fMojiKumiSet(mojikumiset) +{ +} + +IMojiKumiSet::IMojiKumiSet(const IMojiKumiSet& src) +:fMojiKumiSet(src.fMojiKumiSet) +{ + sMojiKumiSet->AddRef(fMojiKumiSet); +} + +IMojiKumiSet::~IMojiKumiSet() +{ + sMojiKumiSet->Release(fMojiKumiSet); +} + +IMojiKumiSet& IMojiKumiSet::operator=(const IMojiKumiSet& rhs) +{ + if (&rhs != this) + { + sMojiKumiSet->Release(fMojiKumiSet); + fMojiKumiSet = rhs.fMojiKumiSet; + sMojiKumiSet->AddRef(fMojiKumiSet); + } + return *this; +} + +bool IMojiKumiSet::operator==(const IMojiKumiSet& rhs) const +{ + return fMojiKumiSet == rhs.fMojiKumiSet; +} + +bool IMojiKumiSet::operator!=(const IMojiKumiSet& rhs) const +{ + return !(*this == rhs); +} + +MojiKumiSetRef IMojiKumiSet::GetRef() const +{ + return fMojiKumiSet; +} + +bool IMojiKumiSet::IsNull() const +{ + return sMojiKumiSet->IsNull(fMojiKumiSet); +} + +ATETextDOM::Int32 IMojiKumiSet::GetSize( ) +{ + ATETextDOM::Int32 ret; + ATEErr error = sMojiKumiSet->GetSize(fMojiKumiSet, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IMojiKumi IMojiKumiSet::GetFirst( ) +{ + MojiKumiRef ret = 0; + ATEErr error = sMojiKumiSet->GetFirst(fMojiKumiSet, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumi(ret); +} + +IMojiKumi IMojiKumiSet::GetLast( ) +{ + MojiKumiRef ret = 0; + ATEErr error = sMojiKumiSet->GetLast(fMojiKumiSet, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumi(ret); +} + +IMojiKumi IMojiKumiSet::Item( ATETextDOM::Int32 nIndex) const +{ + MojiKumiRef ret = 0; + ATEErr error = sMojiKumiSet->Item(fMojiKumiSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumi(ret); +} + +ATETextDOM::Int32 IMojiKumiSet::Find( const IMojiKumi mojiKumi) +{ + ATETextDOM::Int32 ret; + ATEErr error = sMojiKumiSet->Find_AsMojiKumi(fMojiKumiSet, mojiKumi.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IMojiKumiSet::Find( const ATETextDOM::Unicode* name) +{ + ATETextDOM::Int32 ret; + ATEErr error = sMojiKumiSet->Find_AsUnicode(fMojiKumiSet, name, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IMojiKumiSet::Find( MojikumiTablePredefinedTag tag) +{ + ATETextDOM::Int32 ret; + ATEErr error = sMojiKumiSet->Find_ByPredefinedMojikumiTag(fMojiKumiSet, tag, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IMojiKumiSet::Remove( ATETextDOM::Int32 nIndex) +{ + ATEBool8 ret; + ATEErr error = sMojiKumiSet->Remove(fMojiKumiSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IMojiKumiSet::Add( IMojiKumi mojiKumi) +{ + ATETextDOM::Int32 ret; + ATEErr error = sMojiKumiSet->Add(fMojiKumiSet, mojiKumi.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IMojiKumiSet::Replace( ATETextDOM::Int32 nIndex, IMojiKumi mojiKumi) +{ + ATEBool8 ret; + ATEErr error = sMojiKumiSet->Replace(fMojiKumiSet, nIndex, mojiKumi.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IMojiKumi IMojiKumiSet::CreateNewMojiKumi( const ATETextDOM::Unicode* name, ATETextDOM::Int32* nIndex) +{ + MojiKumiRef ret = 0; + ATEErr error = sMojiKumiSet->CreateNewMojiKumi(fMojiKumiSet, name, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumi(ret); +} + +////////////////////////////////////////////// +// --ITextFrame-- +////////////////////////////////////////////// + +ITextFrame::ITextFrame() +:fTextFrame(0) +{ +} + +ITextFrame::ITextFrame(TextFrameRef textframe) +:fTextFrame(textframe) +{ +} + +ITextFrame::ITextFrame(const ITextFrame& src) +:fTextFrame(src.fTextFrame) +{ + sTextFrame->AddRef(fTextFrame); +} + +ITextFrame::~ITextFrame() +{ + sTextFrame->Release(fTextFrame); +} + +ITextFrame& ITextFrame::operator=(const ITextFrame& rhs) +{ + if (&rhs != this) + { + sTextFrame->Release(fTextFrame); + fTextFrame = rhs.fTextFrame; + sTextFrame->AddRef(fTextFrame); + } + return *this; +} + +bool ITextFrame::operator==(const ITextFrame& rhs) const +{ + ATEBool8 ret = false; + ATEErr error = sTextFrame->IsEqual(fTextFrame, rhs.fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextFrame::operator!=(const ITextFrame& rhs) const +{ + return !(*this == rhs); +} + +TextFrameRef ITextFrame::GetRef() const +{ + return fTextFrame; +} + +bool ITextFrame::IsNull() const +{ + return sTextFrame->IsNull(fTextFrame); +} + +IStory ITextFrame::GetStory( ) const +{ + StoryRef ret = 0; + ATEErr error = sTextFrame->GetStory(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return IStory(ret); +} + +ITextRange ITextFrame::GetTextRange( bool bIncludeOverflow) const +{ + TextRangeRef ret = 0; + ATEErr error = sTextFrame->GetTextRange(fTextFrame, bIncludeOverflow, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +ITextLinesIterator ITextFrame::GetTextLinesIterator( ) const +{ + TextLinesIteratorRef ret = 0; + ATEErr error = sTextFrame->GetTextLinesIterator(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ITextLinesIterator(ret); +} + +FrameType ITextFrame::GetType( ) const +{ + FrameType ret; + ATEErr error = sTextFrame->GetType(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LineOrientation ITextFrame::GetLineOrientation( ) const +{ + LineOrientation ret; + ATEErr error = sTextFrame->GetLineOrientation(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextFrame::GetSelected( ) const +{ + ATEBool8 ret; + ATEErr error = sTextFrame->GetSelected(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::RealMatrix ITextFrame::GetMatrix( ) const +{ + ATETextDOM::RealMatrix ret; + ATETextDOM::FloatMatrix tempRet; + ATEErr error = sTextFrame->GetMatrix(fTextFrame, &tempRet); + ATEFloatMatrixToATERealMatrix(&tempRet,&ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ITextFrame::GetRowCount( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextFrame->GetRowCount(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ITextFrame::GetColumnCount( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextFrame->GetColumnCount(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextFrame::GetRowMajorOrder( ) const +{ + ATEBool8 ret; + ATEErr error = sTextFrame->GetRowMajorOrder(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real ITextFrame::GetRowGutter( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sTextFrame->GetRowGutter(fTextFrame, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real ITextFrame::GetColumnGutter( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sTextFrame->GetColumnGutter(fTextFrame, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real ITextFrame::GetSpacing( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sTextFrame->GetSpacing(fTextFrame, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextFrame::GetOpticalAlignment( ) const +{ + ATEBool8 ret; + ATEErr error = sTextFrame->GetOpticalAlignment(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +#if SLO_COMPLEXSCRIPT +ParagraphDirection ITextFrame::GetStoryDirection( ) const +{ + ParagraphDirection ret; + ATEErr error = sTextFrame->GetStoryDirection(fTextFrame, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} +#endif + +void ITextFrame::SetRowCount( ATETextDOM::Int32 rowCount) +{ + ATEErr error = sTextFrame->SetRowCount(fTextFrame, rowCount); + if(error) Throw_ATE_Exception(error); +} + +void ITextFrame::SetColumnCount( ATETextDOM::Int32 columnCount) +{ + ATEErr error = sTextFrame->SetColumnCount(fTextFrame, columnCount); + if(error) Throw_ATE_Exception(error); +} + +void ITextFrame::SetRowMajorOrder( bool isRowMajor) +{ + ATEErr error = sTextFrame->SetRowMajorOrder(fTextFrame, isRowMajor); + if(error) Throw_ATE_Exception(error); +} + +void ITextFrame::SetRowGutter( ATETextDOM::Real gutter) +{ + ATEErr error = sTextFrame->SetRowGutter(fTextFrame, static_cast(gutter)); + if(error) Throw_ATE_Exception(error); +} + +void ITextFrame::SetColumnGutter( ATETextDOM::Real gutter) +{ + ATEErr error = sTextFrame->SetColumnGutter(fTextFrame, static_cast(gutter)); + if(error) Throw_ATE_Exception(error); +} + +void ITextFrame::SetSpacing( ATETextDOM::Real spacing) +{ + ATEErr error = sTextFrame->SetSpacing(fTextFrame, static_cast(spacing)); + if(error) Throw_ATE_Exception(error); +} + +void ITextFrame::SetOpticalAlignment( bool isActive) +{ + ATEErr error = sTextFrame->SetOpticalAlignment(fTextFrame, isActive); + if(error) Throw_ATE_Exception(error); +} + +void ITextFrame::SetLineOrientation( LineOrientation lineOrientation) +{ + ATEErr error = sTextFrame->SetLineOrientation(fTextFrame, lineOrientation); + if(error) Throw_ATE_Exception(error); +} + +#if SLO_COMPLEXSCRIPT +void ITextFrame::SetStoryDirection( ParagraphDirection direction) +{ + ATEErr error = sTextFrame->SetStoryDirection(fTextFrame, direction); + if(error) Throw_ATE_Exception(error); +} +#endif + +////////////////////////////////////////////// +// --ITextFramesIterator-- +////////////////////////////////////////////// + +ITextFramesIterator::ITextFramesIterator() +:fTextFramesIterator(0) +{ +} + +ITextFramesIterator::ITextFramesIterator(TextFramesIteratorRef textframesiterator) +:fTextFramesIterator(textframesiterator) +{ +} + +ITextFramesIterator::ITextFramesIterator(const ITextFramesIterator& src) +:fTextFramesIterator(src.fTextFramesIterator) +{ + sTextFramesIterator->AddRef(fTextFramesIterator); +} + +ITextFramesIterator::~ITextFramesIterator() +{ + sTextFramesIterator->Release(fTextFramesIterator); +} + +ITextFramesIterator& ITextFramesIterator::operator=(const ITextFramesIterator& rhs) +{ + if (&rhs != this) + { + sTextFramesIterator->Release(fTextFramesIterator); + fTextFramesIterator = rhs.fTextFramesIterator; + sTextFramesIterator->AddRef(fTextFramesIterator); + } + return *this; +} + +bool ITextFramesIterator::operator==(const ITextFramesIterator& rhs) const +{ + return fTextFramesIterator == rhs.fTextFramesIterator; +} + +bool ITextFramesIterator::operator!=(const ITextFramesIterator& rhs) const +{ + return !(*this == rhs); +} + +TextFramesIteratorRef ITextFramesIterator::GetRef() const +{ + return fTextFramesIterator; +} + +bool ITextFramesIterator::IsNull() const +{ + return sTextFramesIterator->IsNull(fTextFramesIterator); +} + +ITextFramesIterator::ITextFramesIterator( const ITextRange& range) +{ + ATEErr error = sTextFramesIterator->Initialize(range.GetRef(), &fTextFramesIterator); + if(error) Throw_ATE_Exception(error); +} + +bool ITextFramesIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTextFramesIterator->IsNotDone(fTextFramesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextFramesIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTextFramesIterator->IsDone(fTextFramesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextFramesIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sTextFramesIterator->IsEmpty(fTextFramesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextFramesIterator::Next( ) +{ + ATEErr error = sTextFramesIterator->Next(fTextFramesIterator); + if(error) Throw_ATE_Exception(error); +} + +void ITextFramesIterator::Previous( ) +{ + ATEErr error = sTextFramesIterator->Previous(fTextFramesIterator); + if(error) Throw_ATE_Exception(error); +} + +ITextFrame ITextFramesIterator::Item( ) const +{ + TextFrameRef ret = 0; + ATEErr error = sTextFramesIterator->Item(fTextFramesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ITextFrame(ret); +} + +////////////////////////////////////////////// +// --ITextLine-- +////////////////////////////////////////////// + +ITextLine::ITextLine() +:fTextLine(0) +{ +} + +ITextLine::ITextLine(TextLineRef textline) +:fTextLine(textline) +{ +} + +ITextLine::ITextLine(const ITextLine& src) +:fTextLine(src.fTextLine) +{ + sTextLine->AddRef(fTextLine); +} + +ITextLine::~ITextLine() +{ + sTextLine->Release(fTextLine); +} + +ITextLine& ITextLine::operator=(const ITextLine& rhs) +{ + if (&rhs != this) + { + sTextLine->Release(fTextLine); + fTextLine = rhs.fTextLine; + sTextLine->AddRef(fTextLine); + } + return *this; +} + +bool ITextLine::operator==(const ITextLine& rhs) const +{ + return fTextLine == rhs.fTextLine; +} + +bool ITextLine::operator!=(const ITextLine& rhs) const +{ + return !(*this == rhs); +} + +TextLineRef ITextLine::GetRef() const +{ + return fTextLine; +} + +bool ITextLine::IsNull() const +{ + return sTextLine->IsNull(fTextLine); +} + +IGlyphRunsIterator ITextLine::GetGlyphRunsIterator( ) const +{ + GlyphRunsIteratorRef ret = 0; + ATEErr error = sTextLine->GetGlyphRunsIterator(fTextLine, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyphRunsIterator(ret); +} + +IGlyphRunsIterator ITextLine::GetVisualGlyphRunsIterator( ) const +{ + GlyphRunsIteratorRef ret = 0; + ATEErr error = sTextLine->GetVisualGlyphRunsIterator(fTextLine, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyphRunsIterator(ret); +} + +ITextFrame ITextLine::GetTextFrame( ) const +{ + TextFrameRef ret = 0; + ATEErr error = sTextLine->GetTextFrame(fTextLine, &ret); + if(error) Throw_ATE_Exception(error); + return ITextFrame(ret); +} + +ITextRange ITextLine::GetTextRange( ) const +{ + TextRangeRef ret = 0; + ATEErr error = sTextLine->GetTextRange(fTextLine, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +IArrayLine ITextLine::GetBaselines( ) const +{ + ArrayLineRef ret = 0; + ATEErr error = sTextLine->GetBaselines(fTextLine, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayLine(ret); +} + +////////////////////////////////////////////// +// --ITextLinesIterator-- +////////////////////////////////////////////// + +ITextLinesIterator::ITextLinesIterator() +:fTextLinesIterator(0) +{ +} + +ITextLinesIterator::ITextLinesIterator(TextLinesIteratorRef textlinesiterator) +:fTextLinesIterator(textlinesiterator) +{ +} + +ITextLinesIterator::ITextLinesIterator(const ITextLinesIterator& src) +:fTextLinesIterator(src.fTextLinesIterator) +{ + sTextLinesIterator->AddRef(fTextLinesIterator); +} + +ITextLinesIterator::~ITextLinesIterator() +{ + sTextLinesIterator->Release(fTextLinesIterator); +} + +ITextLinesIterator& ITextLinesIterator::operator=(const ITextLinesIterator& rhs) +{ + if (&rhs != this) + { + sTextLinesIterator->Release(fTextLinesIterator); + fTextLinesIterator = rhs.fTextLinesIterator; + sTextLinesIterator->AddRef(fTextLinesIterator); + } + return *this; +} + +bool ITextLinesIterator::operator==(const ITextLinesIterator& rhs) const +{ + return fTextLinesIterator == rhs.fTextLinesIterator; +} + +bool ITextLinesIterator::operator!=(const ITextLinesIterator& rhs) const +{ + return !(*this == rhs); +} + +TextLinesIteratorRef ITextLinesIterator::GetRef() const +{ + return fTextLinesIterator; +} + +bool ITextLinesIterator::IsNull() const +{ + return sTextLinesIterator->IsNull(fTextLinesIterator); +} + +bool ITextLinesIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTextLinesIterator->IsNotDone(fTextLinesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextLinesIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTextLinesIterator->IsDone(fTextLinesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextLinesIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sTextLinesIterator->IsEmpty(fTextLinesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextLinesIterator::Next( ) +{ + ATEErr error = sTextLinesIterator->Next(fTextLinesIterator); + if(error) Throw_ATE_Exception(error); +} + +void ITextLinesIterator::Previous( ) +{ + ATEErr error = sTextLinesIterator->Previous(fTextLinesIterator); + if(error) Throw_ATE_Exception(error); +} + +ITextLine ITextLinesIterator::Item( ) const +{ + TextLineRef ret = 0; + ATEErr error = sTextLinesIterator->Item(fTextLinesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ITextLine(ret); +} + +////////////////////////////////////////////// +// --ITextResources-- +////////////////////////////////////////////// + +ITextResources::ITextResources() +:fTextResources(0) +{ +} + +ITextResources::ITextResources(TextResourcesRef textresources) +:fTextResources(textresources) +{ +} + +ITextResources::ITextResources(const ITextResources& src) +:fTextResources(src.fTextResources) +{ + sTextResources->AddRef(fTextResources); +} + +ITextResources::~ITextResources() +{ + sTextResources->Release(fTextResources); +} + +ITextResources& ITextResources::operator=(const ITextResources& rhs) +{ + if (&rhs != this) + { + sTextResources->Release(fTextResources); + fTextResources = rhs.fTextResources; + sTextResources->AddRef(fTextResources); + } + return *this; +} + +bool ITextResources::operator==(const ITextResources& rhs) const +{ + return fTextResources == rhs.fTextResources; +} + +bool ITextResources::operator!=(const ITextResources& rhs) const +{ + return !(*this == rhs); +} + +TextResourcesRef ITextResources::GetRef() const +{ + return fTextResources; +} + +bool ITextResources::IsNull() const +{ + return sTextResources->IsNull(fTextResources); +} + +ITextResources ITextResources::GetTextResources( ) +{ + TextResourcesRef ret = 0; + ATEErr error = sTextResources->GetTextResources(fTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ITextResources(ret); +} + +////////////////////////////////////////////// +// --IApplicationTextResources-- +////////////////////////////////////////////// + +IApplicationTextResources::IApplicationTextResources() +:fApplicationTextResources(0) +{ +} + +IApplicationTextResources::IApplicationTextResources(ApplicationTextResourcesRef applicationtextresources) +:fApplicationTextResources(applicationtextresources) +{ +} + +IApplicationTextResources::IApplicationTextResources(const IApplicationTextResources& src) +:fApplicationTextResources(src.fApplicationTextResources) +{ + sApplicationTextResources->AddRef(fApplicationTextResources); +} + +IApplicationTextResources::~IApplicationTextResources() +{ + sApplicationTextResources->Release(fApplicationTextResources); +} + +IApplicationTextResources& IApplicationTextResources::operator=(const IApplicationTextResources& rhs) +{ + if (&rhs != this) + { + sApplicationTextResources->Release(fApplicationTextResources); + fApplicationTextResources = rhs.fApplicationTextResources; + sApplicationTextResources->AddRef(fApplicationTextResources); + } + return *this; +} + +bool IApplicationTextResources::operator==(const IApplicationTextResources& rhs) const +{ + return fApplicationTextResources == rhs.fApplicationTextResources; +} + +bool IApplicationTextResources::operator!=(const IApplicationTextResources& rhs) const +{ + return !(*this == rhs); +} + +ApplicationTextResourcesRef IApplicationTextResources::GetRef() const +{ + return fApplicationTextResources; +} + +bool IApplicationTextResources::IsNull() const +{ + return sApplicationTextResources->IsNull(fApplicationTextResources); +} + +ITextResources IApplicationTextResources::GetTextResources( ) +{ + TextResourcesRef ret = 0; + ATEErr error = sApplicationTextResources->GetTextResources(fApplicationTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ITextResources(ret); +} + +IKinsokuSet IApplicationTextResources::GetKinsokuSet( ) const +{ + KinsokuSetRef ret = 0; + ATEErr error = sApplicationTextResources->GetKinsokuSet(fApplicationTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsokuSet(ret); +} + +IListStyleSet IApplicationTextResources::GetListStyleSet( ) const +{ + ListStyleSetRef ret = 0; + ATEErr error = sApplicationTextResources->GetListStyleSet(fApplicationTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyleSet(ret); +} + +IMojiKumiSet IApplicationTextResources::GetMojiKumiSet( ) const +{ + MojiKumiSetRef ret = 0; + ATEErr error = sApplicationTextResources->GetMojiKumiSet(fApplicationTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumiSet(ret); +} + +ICompFontClassSet IApplicationTextResources::GetCompFontClassSet( ) const +{ + CompFontClassSetRef ret = 0; + ATEErr error = sApplicationTextResources->GetCompFontClassSet(fApplicationTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontClassSet(ret); +} + +ICompFontSet IApplicationTextResources::GetCompFontSet( ) const +{ + CompFontSetRef ret = 0; + ATEErr error = sApplicationTextResources->GetCompFontSet(fApplicationTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontSet(ret); +} + +////////////////////////////////////////////// +// --IDocumentTextResources-- +////////////////////////////////////////////// + +IDocumentTextResources::IDocumentTextResources() +:fDocumentTextResources(0) +{ +} + +IDocumentTextResources::IDocumentTextResources(DocumentTextResourcesRef documenttextresources) +:fDocumentTextResources(documenttextresources) +{ +} + +IDocumentTextResources::IDocumentTextResources(const IDocumentTextResources& src) +:fDocumentTextResources(src.fDocumentTextResources) +{ + sDocumentTextResources->AddRef(fDocumentTextResources); +} + +IDocumentTextResources::~IDocumentTextResources() +{ + sDocumentTextResources->Release(fDocumentTextResources); +} + +IDocumentTextResources& IDocumentTextResources::operator=(const IDocumentTextResources& rhs) +{ + if (&rhs != this) + { + sDocumentTextResources->Release(fDocumentTextResources); + fDocumentTextResources = rhs.fDocumentTextResources; + sDocumentTextResources->AddRef(fDocumentTextResources); + } + return *this; +} + +bool IDocumentTextResources::operator==(const IDocumentTextResources& rhs) const +{ + return fDocumentTextResources == rhs.fDocumentTextResources; +} + +bool IDocumentTextResources::operator!=(const IDocumentTextResources& rhs) const +{ + return !(*this == rhs); +} + +DocumentTextResourcesRef IDocumentTextResources::GetRef() const +{ + return fDocumentTextResources; +} + +bool IDocumentTextResources::IsNull() const +{ + return sDocumentTextResources->IsNull(fDocumentTextResources); +} + +IKinsokuSet IDocumentTextResources::GetKinsokuSet( ) const +{ + KinsokuSetRef ret = 0; + ATEErr error = sDocumentTextResources->GetKinsokuSet(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsokuSet(ret); +} + +IListStyleSet IDocumentTextResources::GetListStyleSet( ) const +{ + ListStyleSetRef ret = 0; + ATEErr error = sDocumentTextResources->GetListStyleSet(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyleSet(ret); +} + +IMojiKumiSet IDocumentTextResources::GetMojiKumiSet( ) const +{ + MojiKumiSetRef ret = 0; + ATEErr error = sDocumentTextResources->GetMojiKumiSet(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumiSet(ret); +} + +ICompFontClassSet IDocumentTextResources::GetCompFontClassSet( ) const +{ + CompFontClassSetRef ret = 0; + ATEErr error = sDocumentTextResources->GetCompFontClassSet(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontClassSet(ret); +} + +ICompFontSet IDocumentTextResources::GetCompFontSet( ) const +{ + CompFontSetRef ret = 0; + ATEErr error = sDocumentTextResources->GetCompFontSet(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ICompFontSet(ret); +} + +ITextResources IDocumentTextResources::GetTextResources( ) +{ + TextResourcesRef ret = 0; + ATEErr error = sDocumentTextResources->GetTextResources(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ITextResources(ret); +} + +IFind IDocumentTextResources::GetFind( ) +{ + FindRef ret = 0; + ATEErr error = sDocumentTextResources->GetFind(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IFind(ret); +} + +ISpell IDocumentTextResources::GetSpell( ) +{ + SpellRef ret = 0; + ATEErr error = sDocumentTextResources->GetSpell(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ISpell(ret); +} + +IGlyph IDocumentTextResources::GetGlyphAndAlternates( ) const +{ + GlyphRef ret = 0; + ATEErr error = sDocumentTextResources->GetGlyphAndAlternates(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +IGlyph IDocumentTextResources::GetAlternateGlyph( ) const +{ + GlyphRef ret = 0; + ATEErr error = sDocumentTextResources->GetAlternateGlyph(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +void IDocumentTextResources::InsertAlternateGlyph( const ATETextDOM::Unicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ATETextDOM::Int32 otFeatureCount, const ATETextDOM::Int32* otFeatureIndexArray, bool leaveSelected) +{ + ATEErr error = sDocumentTextResources->InsertAlternateGlyph(fDocumentTextResources, theCharacters, glyphID, otFeatureArray, otFeatureCount, otFeatureIndexArray, leaveSelected); + if(error) Throw_ATE_Exception(error); +} + +IArrayInteger IDocumentTextResources::GetAlternatesAvailableThroughoutSelection( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sDocumentTextResources->GetAlternatesAvailableThroughoutSelection(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +JapaneseAlternateFeature IDocumentTextResources::GetJapaneseAlternateFeatureInSelection( bool* isFeature) const +{ + JapaneseAlternateFeature ret; + ATEBool8 isFeatureRet; + ATEErr error = sDocumentTextResources->GetJapaneseAlternateFeatureInSelection(fDocumentTextResources, &isFeatureRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isFeature) *isFeature = isFeatureRet; + return ret; +} + +void IDocumentTextResources::SetJapaneseAlternateFeatureInSelection( JapaneseAlternateFeature feature) +{ + ATEErr error = sDocumentTextResources->SetJapaneseAlternateFeatureInSelection(fDocumentTextResources, feature); + if(error) Throw_ATE_Exception(error); +} + +ICharStyles IDocumentTextResources::GetCharStylesInDocument( ) const +{ + CharStylesRef ret = 0; + ATEErr error = sDocumentTextResources->GetCharStylesInDocument(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyles(ret); +} + +IParaStyles IDocumentTextResources::GetParaStylesInDocument( ) const +{ + ParaStylesRef ret = 0; + ATEErr error = sDocumentTextResources->GetParaStylesInDocument(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IParaStyles(ret); +} + +ICharStyle IDocumentTextResources::GetCharStyle( const ATETextDOM::Unicode* pName) const +{ + CharStyleRef ret = 0; + ATEErr error = sDocumentTextResources->GetCharStyle(fDocumentTextResources, pName, &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyle(ret); +} + +IParaStyle IDocumentTextResources::GetParaStyle( const ATETextDOM::Unicode* pName) const +{ + ParaStyleRef ret = 0; + ATEErr error = sDocumentTextResources->GetParaStyle(fDocumentTextResources, pName, &ret); + if(error) Throw_ATE_Exception(error); + return IParaStyle(ret); +} + +ICharStyle IDocumentTextResources::GetNormalCharStyle( ) const +{ + CharStyleRef ret = 0; + ATEErr error = sDocumentTextResources->GetNormalCharStyle(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyle(ret); +} + +IParaStyle IDocumentTextResources::GetNormalParaStyle( ) const +{ + ParaStyleRef ret = 0; + ATEErr error = sDocumentTextResources->GetNormalParaStyle(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return IParaStyle(ret); +} + +void IDocumentTextResources::ResetNormalCharStyle( ) +{ + ATEErr error = sDocumentTextResources->ResetNormalCharStyle(fDocumentTextResources); + if(error) Throw_ATE_Exception(error); +} + +void IDocumentTextResources::ResetNormalParaStyle( ) +{ + ATEErr error = sDocumentTextResources->ResetNormalParaStyle(fDocumentTextResources); + if(error) Throw_ATE_Exception(error); +} + +ICharStyle IDocumentTextResources::CreateCharStyle( const ATETextDOM::Unicode* pName) +{ + CharStyleRef ret = 0; + ATEErr error = sDocumentTextResources->CreateCharStyle(fDocumentTextResources, pName, &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyle(ret); +} + +IParaStyle IDocumentTextResources::CreateParaStyle( const ATETextDOM::Unicode* pName) +{ + ParaStyleRef ret = 0; + ATEErr error = sDocumentTextResources->CreateParaStyle(fDocumentTextResources, pName, &ret); + if(error) Throw_ATE_Exception(error); + return IParaStyle(ret); +} + +ICharStyle IDocumentTextResources::CreateCharStyleWithFeatures( const ATETextDOM::Unicode* pName, ICharFeatures pFeatures) +{ + CharStyleRef ret = 0; + ATEErr error = sDocumentTextResources->CreateCharStyleWithFeatures(fDocumentTextResources, pName, pFeatures.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyle(ret); +} + +IParaStyle IDocumentTextResources::CreateParaStyleWithFeatures( const ATETextDOM::Unicode* pName, IParaFeatures pFeatures) +{ + ParaStyleRef ret = 0; + ATEErr error = sDocumentTextResources->CreateParaStyleWithFeatures(fDocumentTextResources, pName, pFeatures.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return IParaStyle(ret); +} + +bool IDocumentTextResources::RemoveCharStyle( const ATETextDOM::Unicode* pName) +{ + ATEBool8 ret; + ATEErr error = sDocumentTextResources->RemoveCharStyle(fDocumentTextResources, pName, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IDocumentTextResources::RemoveParaStyle( const ATETextDOM::Unicode* pName) +{ + ATEBool8 ret; + ATEErr error = sDocumentTextResources->RemoveParaStyle(fDocumentTextResources, pName, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::ImportCharStyles( ITextResources pSrcResources) +{ + ATEErr error = sDocumentTextResources->ImportCharStyles(fDocumentTextResources, pSrcResources.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IDocumentTextResources::ImportParaStyles( ITextResources pSrcResources) +{ + ATEErr error = sDocumentTextResources->ImportParaStyles(fDocumentTextResources, pSrcResources.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IDocumentTextResources::SetUseSmartQuotes( bool smartQuotesAreOn) +{ + ATEErr error = sDocumentTextResources->SetUseSmartQuotes(fDocumentTextResources, smartQuotesAreOn); + if(error) Throw_ATE_Exception(error); +} + +void IDocumentTextResources::SetSmartDoubleQuoteCharacters( ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language) +{ + ATEErr error = sDocumentTextResources->SetSmartDoubleQuoteCharacters(fDocumentTextResources, openQuote, closeQuote, language); + if(error) Throw_ATE_Exception(error); +} + +void IDocumentTextResources::SetSmartSingleQuoteCharacters( ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language) +{ + ATEErr error = sDocumentTextResources->SetSmartSingleQuoteCharacters(fDocumentTextResources, openQuote, closeQuote, language); + if(error) Throw_ATE_Exception(error); +} + +bool IDocumentTextResources::UseSmartQuotes( ) +{ + ATEBool8 ret; + ATEErr error = sDocumentTextResources->UseSmartQuotes(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::GetSmartDoubleQuoteCharacters( ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language) +{ + ATEErr error = sDocumentTextResources->GetSmartDoubleQuoteCharacters(fDocumentTextResources, openQuote, closeQuote, language); + if(error) Throw_ATE_Exception(error); +} + +void IDocumentTextResources::GetSmartSingleQuoteCharacters( ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language) +{ + ATEErr error = sDocumentTextResources->GetSmartSingleQuoteCharacters(fDocumentTextResources, openQuote, closeQuote, language); + if(error) Throw_ATE_Exception(error); +} + +ICharFeatures IDocumentTextResources::GetInsertionCharFeatures( ) const +{ + CharFeaturesRef ret = 0; + ATEErr error = sDocumentTextResources->GetInsertionCharFeatures(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ICharFeatures(ret); +} + +ICharStyle IDocumentTextResources::GetInsertionCharStyle( ) const +{ + CharStyleRef ret = 0; + ATEErr error = sDocumentTextResources->GetInsertionCharStyle(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyle(ret); +} + +void IDocumentTextResources::SetInsertionFeaturesAndStyle( const ICharFeatures& pFeatures, const ATETextDOM::Unicode* pStyleName) +{ + ATEErr error = sDocumentTextResources->SetInsertionFeaturesAndStyle(fDocumentTextResources, pFeatures.GetRef(), pStyleName); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real IDocumentTextResources::GetSuperscriptSize( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sDocumentTextResources->GetSuperscriptSize(fDocumentTextResources, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetSuperscriptSize( ATETextDOM::Real value) +{ + ATEErr error = sDocumentTextResources->SetSuperscriptSize(fDocumentTextResources, static_cast(value)); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real IDocumentTextResources::GetSuperscriptPosition( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sDocumentTextResources->GetSuperscriptPosition(fDocumentTextResources, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetSuperscriptPosition( ATETextDOM::Real value) +{ + ATEErr error = sDocumentTextResources->SetSuperscriptPosition(fDocumentTextResources, static_cast(value)); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real IDocumentTextResources::GetSubscriptSize( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sDocumentTextResources->GetSubscriptSize(fDocumentTextResources, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetSubscriptSize( ATETextDOM::Real value) +{ + ATEErr error = sDocumentTextResources->SetSubscriptSize(fDocumentTextResources, static_cast(value)); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real IDocumentTextResources::GetSubscriptPosition( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sDocumentTextResources->GetSubscriptPosition(fDocumentTextResources, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetSubscriptPosition( ATETextDOM::Real value) +{ + ATEErr error = sDocumentTextResources->SetSubscriptPosition(fDocumentTextResources, static_cast(value)); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real IDocumentTextResources::GetSmallCapSize( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sDocumentTextResources->GetSmallCapSize(fDocumentTextResources, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetSmallCapSize( ATETextDOM::Real value) +{ + ATEErr error = sDocumentTextResources->SetSmallCapSize(fDocumentTextResources, static_cast(value)); + if(error) Throw_ATE_Exception(error); +} + +bool IDocumentTextResources::GetShowHiddenCharacters( ) const +{ + ATEBool8 ret; + ATEErr error = sDocumentTextResources->GetShowHiddenCharacters(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetShowHiddenCharacters( bool value) +{ + ATEErr error = sDocumentTextResources->SetShowHiddenCharacters(fDocumentTextResources, value); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 IDocumentTextResources::GetGreekingSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sDocumentTextResources->GetGreekingSize(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetGreekingSize( ATETextDOM::Int32 value) +{ + ATEErr error = sDocumentTextResources->SetGreekingSize(fDocumentTextResources, value); + if(error) Throw_ATE_Exception(error); +} + +bool IDocumentTextResources::GetHighlightSubstituteFonts( ) const +{ + ATEBool8 ret; + ATEErr error = sDocumentTextResources->GetHighlightSubstituteFonts(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetHighlightSubstituteFonts( bool value) +{ + ATEErr error = sDocumentTextResources->SetHighlightSubstituteFonts(fDocumentTextResources, value); + if(error) Throw_ATE_Exception(error); +} + +bool IDocumentTextResources::GetHighlightAlternateGlyphs( ) const +{ + ATEBool8 ret; + ATEErr error = sDocumentTextResources->GetHighlightAlternateGlyphs(fDocumentTextResources, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IDocumentTextResources::SetHighlightAlternateGlyphs( bool value) +{ + ATEErr error = sDocumentTextResources->SetHighlightAlternateGlyphs(fDocumentTextResources, value); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IVersionInfo-- +////////////////////////////////////////////// + +IVersionInfo::IVersionInfo() +:fVersionInfo(0) +{ + ATEErr error = sVersionInfo->Initialize(&fVersionInfo); + if(error) Throw_ATE_Exception(error); +} + +IVersionInfo::IVersionInfo(VersionInfoRef versioninfo) +:fVersionInfo(versioninfo) +{ +} + +IVersionInfo::IVersionInfo(const IVersionInfo& src) +:fVersionInfo(src.fVersionInfo) +{ + sVersionInfo->AddRef(fVersionInfo); +} + +IVersionInfo::~IVersionInfo() +{ + sVersionInfo->Release(fVersionInfo); +} + +IVersionInfo& IVersionInfo::operator=(const IVersionInfo& rhs) +{ + if (&rhs != this) + { + sVersionInfo->Release(fVersionInfo); + fVersionInfo = rhs.fVersionInfo; + sVersionInfo->AddRef(fVersionInfo); + } + return *this; +} + +bool IVersionInfo::operator==(const IVersionInfo& rhs) const +{ + return fVersionInfo == rhs.fVersionInfo; +} + +bool IVersionInfo::operator!=(const IVersionInfo& rhs) const +{ + return !(*this == rhs); +} + +VersionInfoRef IVersionInfo::GetRef() const +{ + return fVersionInfo; +} + +bool IVersionInfo::IsNull() const +{ + return sVersionInfo->IsNull(fVersionInfo); +} + +int IVersionInfo::GetMajorVersion( ) +{ + int ret; + ATEErr error = sVersionInfo->GetMajorVersion(fVersionInfo, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +int IVersionInfo::GetMinorVersion( ) +{ + int ret; + ATEErr error = sVersionInfo->GetMinorVersion(fVersionInfo, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +int IVersionInfo::GetSubMinorVersion( ) +{ + int ret; + ATEErr error = sVersionInfo->GetSubMinorVersion(fVersionInfo, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +int IVersionInfo::GetVersionAsUTF16( ASUTF16* versionString, int maxLength) +{ + int ret; + ATEErr error = sVersionInfo->GetVersionAsUTF16(fVersionInfo, versionString, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayApplicationPaintRef-- +////////////////////////////////////////////// + +IArrayApplicationPaintRef::IArrayApplicationPaintRef() +:fArrayApplicationPaintRef(0) +{ +} + +IArrayApplicationPaintRef::IArrayApplicationPaintRef(ArrayApplicationPaintRefRef arrayapplicationpaintref) +:fArrayApplicationPaintRef(arrayapplicationpaintref) +{ +} + +IArrayApplicationPaintRef::IArrayApplicationPaintRef(const IArrayApplicationPaintRef& src) +:fArrayApplicationPaintRef(src.fArrayApplicationPaintRef) +{ + sArrayApplicationPaintRef->AddRef(fArrayApplicationPaintRef); +} + +IArrayApplicationPaintRef::~IArrayApplicationPaintRef() +{ + sArrayApplicationPaintRef->Release(fArrayApplicationPaintRef); +} + +IArrayApplicationPaintRef& IArrayApplicationPaintRef::operator=(const IArrayApplicationPaintRef& rhs) +{ + if (&rhs != this) + { + sArrayApplicationPaintRef->Release(fArrayApplicationPaintRef); + fArrayApplicationPaintRef = rhs.fArrayApplicationPaintRef; + sArrayApplicationPaintRef->AddRef(fArrayApplicationPaintRef); + } + return *this; +} + +bool IArrayApplicationPaintRef::operator==(const IArrayApplicationPaintRef& rhs) const +{ + return fArrayApplicationPaintRef == rhs.fArrayApplicationPaintRef; +} + +bool IArrayApplicationPaintRef::operator!=(const IArrayApplicationPaintRef& rhs) const +{ + return !(*this == rhs); +} + +ArrayApplicationPaintRefRef IArrayApplicationPaintRef::GetRef() const +{ + return fArrayApplicationPaintRef; +} + +bool IArrayApplicationPaintRef::IsNull() const +{ + return sArrayApplicationPaintRef->IsNull(fArrayApplicationPaintRef); +} + +ATETextDOM::Int32 IArrayApplicationPaintRef::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayApplicationPaintRef->GetSize(fArrayApplicationPaintRef, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IApplicationPaint IArrayApplicationPaintRef::GetFirst( ) const +{ + ApplicationPaintRef ret = 0; + ATEErr error = sArrayApplicationPaintRef->GetFirst(fArrayApplicationPaintRef, &ret); + if(error) Throw_ATE_Exception(error); + return IApplicationPaint(ret); +} + +IApplicationPaint IArrayApplicationPaintRef::GetLast( ) const +{ + ApplicationPaintRef ret = 0; + ATEErr error = sArrayApplicationPaintRef->GetLast(fArrayApplicationPaintRef, &ret); + if(error) Throw_ATE_Exception(error); + return IApplicationPaint(ret); +} + +IApplicationPaint IArrayApplicationPaintRef::Item( ATETextDOM::Int32 index) const +{ + ApplicationPaintRef ret = 0; + ATEErr error = sArrayApplicationPaintRef->Item(fArrayApplicationPaintRef, index, &ret); + if(error) Throw_ATE_Exception(error); + return IApplicationPaint(ret); +} + +////////////////////////////////////////////// +// --IArrayReal-- +////////////////////////////////////////////// + +IArrayReal::IArrayReal() +:fArrayReal(0) +{ +} + +IArrayReal::IArrayReal(ArrayRealRef arrayreal) +:fArrayReal(arrayreal) +{ +} + +IArrayReal::IArrayReal(const IArrayReal& src) +:fArrayReal(src.fArrayReal) +{ + sArrayReal->AddRef(fArrayReal); +} + +IArrayReal::~IArrayReal() +{ + sArrayReal->Release(fArrayReal); +} + +IArrayReal& IArrayReal::operator=(const IArrayReal& rhs) +{ + if (&rhs != this) + { + sArrayReal->Release(fArrayReal); + fArrayReal = rhs.fArrayReal; + sArrayReal->AddRef(fArrayReal); + } + return *this; +} + +bool IArrayReal::operator==(const IArrayReal& rhs) const +{ + return fArrayReal == rhs.fArrayReal; +} + +bool IArrayReal::operator!=(const IArrayReal& rhs) const +{ + return !(*this == rhs); +} + +ArrayRealRef IArrayReal::GetRef() const +{ + return fArrayReal; +} + +bool IArrayReal::IsNull() const +{ + return sArrayReal->IsNull(fArrayReal); +} + +ATETextDOM::Int32 IArrayReal::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayReal->GetSize(fArrayReal, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IArrayReal::GetFirst( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sArrayReal->GetFirst(fArrayReal, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IArrayReal::GetLast( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sArrayReal->GetLast(fArrayReal, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Real IArrayReal::Item( ATETextDOM::Int32 index) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sArrayReal->Item(fArrayReal, index, &tempRet); + ret = tempRet; + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayBool-- +////////////////////////////////////////////// + +IArrayBool::IArrayBool() +:fArrayBool(0) +{ +} + +IArrayBool::IArrayBool(ArrayBoolRef arraybool) +:fArrayBool(arraybool) +{ +} + +IArrayBool::IArrayBool(const IArrayBool& src) +:fArrayBool(src.fArrayBool) +{ + sArrayBool->AddRef(fArrayBool); +} + +IArrayBool::~IArrayBool() +{ + sArrayBool->Release(fArrayBool); +} + +IArrayBool& IArrayBool::operator=(const IArrayBool& rhs) +{ + if (&rhs != this) + { + sArrayBool->Release(fArrayBool); + fArrayBool = rhs.fArrayBool; + sArrayBool->AddRef(fArrayBool); + } + return *this; +} + +bool IArrayBool::operator==(const IArrayBool& rhs) const +{ + return fArrayBool == rhs.fArrayBool; +} + +bool IArrayBool::operator!=(const IArrayBool& rhs) const +{ + return !(*this == rhs); +} + +ArrayBoolRef IArrayBool::GetRef() const +{ + return fArrayBool; +} + +bool IArrayBool::IsNull() const +{ + return sArrayBool->IsNull(fArrayBool); +} + +ATETextDOM::Int32 IArrayBool::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayBool->GetSize(fArrayBool, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IArrayBool::GetFirst( ) const +{ + ATEBool8 ret; + ATEErr error = sArrayBool->GetFirst(fArrayBool, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IArrayBool::GetLast( ) const +{ + ATEBool8 ret; + ATEErr error = sArrayBool->GetLast(fArrayBool, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IArrayBool::Item( ATETextDOM::Int32 index) const +{ + ATEBool8 ret; + ATEErr error = sArrayBool->Item(fArrayBool, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayInteger-- +////////////////////////////////////////////// + +IArrayInteger::IArrayInteger() +:fArrayInteger(0) +{ +} + +IArrayInteger::IArrayInteger(ArrayIntegerRef arrayinteger) +:fArrayInteger(arrayinteger) +{ +} + +IArrayInteger::IArrayInteger(const IArrayInteger& src) +:fArrayInteger(src.fArrayInteger) +{ + sArrayInteger->AddRef(fArrayInteger); +} + +IArrayInteger::~IArrayInteger() +{ + sArrayInteger->Release(fArrayInteger); +} + +IArrayInteger& IArrayInteger::operator=(const IArrayInteger& rhs) +{ + if (&rhs != this) + { + sArrayInteger->Release(fArrayInteger); + fArrayInteger = rhs.fArrayInteger; + sArrayInteger->AddRef(fArrayInteger); + } + return *this; +} + +bool IArrayInteger::operator==(const IArrayInteger& rhs) const +{ + return fArrayInteger == rhs.fArrayInteger; +} + +bool IArrayInteger::operator!=(const IArrayInteger& rhs) const +{ + return !(*this == rhs); +} + +ArrayIntegerRef IArrayInteger::GetRef() const +{ + return fArrayInteger; +} + +bool IArrayInteger::IsNull() const +{ + return sArrayInteger->IsNull(fArrayInteger); +} + +ATETextDOM::Int32 IArrayInteger::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayInteger->GetSize(fArrayInteger, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IArrayInteger::GetFirst( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayInteger->GetFirst(fArrayInteger, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IArrayInteger::GetLast( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayInteger->GetLast(fArrayInteger, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IArrayInteger::Item( ATETextDOM::Int32 index) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayInteger->Item(fArrayInteger, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayLineCapType-- +////////////////////////////////////////////// + +IArrayLineCapType::IArrayLineCapType() +:fArrayLineCapType(0) +{ +} + +IArrayLineCapType::IArrayLineCapType(ArrayLineCapTypeRef arraylinecaptype) +:fArrayLineCapType(arraylinecaptype) +{ +} + +IArrayLineCapType::IArrayLineCapType(const IArrayLineCapType& src) +:fArrayLineCapType(src.fArrayLineCapType) +{ + sArrayLineCapType->AddRef(fArrayLineCapType); +} + +IArrayLineCapType::~IArrayLineCapType() +{ + sArrayLineCapType->Release(fArrayLineCapType); +} + +IArrayLineCapType& IArrayLineCapType::operator=(const IArrayLineCapType& rhs) +{ + if (&rhs != this) + { + sArrayLineCapType->Release(fArrayLineCapType); + fArrayLineCapType = rhs.fArrayLineCapType; + sArrayLineCapType->AddRef(fArrayLineCapType); + } + return *this; +} + +bool IArrayLineCapType::operator==(const IArrayLineCapType& rhs) const +{ + return fArrayLineCapType == rhs.fArrayLineCapType; +} + +bool IArrayLineCapType::operator!=(const IArrayLineCapType& rhs) const +{ + return !(*this == rhs); +} + +ArrayLineCapTypeRef IArrayLineCapType::GetRef() const +{ + return fArrayLineCapType; +} + +bool IArrayLineCapType::IsNull() const +{ + return sArrayLineCapType->IsNull(fArrayLineCapType); +} + +ATETextDOM::Int32 IArrayLineCapType::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayLineCapType->GetSize(fArrayLineCapType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LineCapType IArrayLineCapType::GetFirst( ) const +{ + LineCapType ret; + ATEErr error = sArrayLineCapType->GetFirst(fArrayLineCapType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LineCapType IArrayLineCapType::GetLast( ) const +{ + LineCapType ret; + ATEErr error = sArrayLineCapType->GetLast(fArrayLineCapType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LineCapType IArrayLineCapType::Item( ATETextDOM::Int32 index) const +{ + LineCapType ret; + ATEErr error = sArrayLineCapType->Item(fArrayLineCapType, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayFigureStyle-- +////////////////////////////////////////////// + +IArrayFigureStyle::IArrayFigureStyle() +:fArrayFigureStyle(0) +{ +} + +IArrayFigureStyle::IArrayFigureStyle(ArrayFigureStyleRef arrayfigurestyle) +:fArrayFigureStyle(arrayfigurestyle) +{ +} + +IArrayFigureStyle::IArrayFigureStyle(const IArrayFigureStyle& src) +:fArrayFigureStyle(src.fArrayFigureStyle) +{ + sArrayFigureStyle->AddRef(fArrayFigureStyle); +} + +IArrayFigureStyle::~IArrayFigureStyle() +{ + sArrayFigureStyle->Release(fArrayFigureStyle); +} + +IArrayFigureStyle& IArrayFigureStyle::operator=(const IArrayFigureStyle& rhs) +{ + if (&rhs != this) + { + sArrayFigureStyle->Release(fArrayFigureStyle); + fArrayFigureStyle = rhs.fArrayFigureStyle; + sArrayFigureStyle->AddRef(fArrayFigureStyle); + } + return *this; +} + +bool IArrayFigureStyle::operator==(const IArrayFigureStyle& rhs) const +{ + return fArrayFigureStyle == rhs.fArrayFigureStyle; +} + +bool IArrayFigureStyle::operator!=(const IArrayFigureStyle& rhs) const +{ + return !(*this == rhs); +} + +ArrayFigureStyleRef IArrayFigureStyle::GetRef() const +{ + return fArrayFigureStyle; +} + +bool IArrayFigureStyle::IsNull() const +{ + return sArrayFigureStyle->IsNull(fArrayFigureStyle); +} + +ATETextDOM::Int32 IArrayFigureStyle::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayFigureStyle->GetSize(fArrayFigureStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FigureStyle IArrayFigureStyle::GetFirst( ) const +{ + FigureStyle ret; + ATEErr error = sArrayFigureStyle->GetFirst(fArrayFigureStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FigureStyle IArrayFigureStyle::GetLast( ) const +{ + FigureStyle ret; + ATEErr error = sArrayFigureStyle->GetLast(fArrayFigureStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FigureStyle IArrayFigureStyle::Item( ATETextDOM::Int32 index) const +{ + FigureStyle ret; + ATEErr error = sArrayFigureStyle->Item(fArrayFigureStyle, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayLineJoinType-- +////////////////////////////////////////////// + +IArrayLineJoinType::IArrayLineJoinType() +:fArrayLineJoinType(0) +{ +} + +IArrayLineJoinType::IArrayLineJoinType(ArrayLineJoinTypeRef arraylinejointype) +:fArrayLineJoinType(arraylinejointype) +{ +} + +IArrayLineJoinType::IArrayLineJoinType(const IArrayLineJoinType& src) +:fArrayLineJoinType(src.fArrayLineJoinType) +{ + sArrayLineJoinType->AddRef(fArrayLineJoinType); +} + +IArrayLineJoinType::~IArrayLineJoinType() +{ + sArrayLineJoinType->Release(fArrayLineJoinType); +} + +IArrayLineJoinType& IArrayLineJoinType::operator=(const IArrayLineJoinType& rhs) +{ + if (&rhs != this) + { + sArrayLineJoinType->Release(fArrayLineJoinType); + fArrayLineJoinType = rhs.fArrayLineJoinType; + sArrayLineJoinType->AddRef(fArrayLineJoinType); + } + return *this; +} + +bool IArrayLineJoinType::operator==(const IArrayLineJoinType& rhs) const +{ + return fArrayLineJoinType == rhs.fArrayLineJoinType; +} + +bool IArrayLineJoinType::operator!=(const IArrayLineJoinType& rhs) const +{ + return !(*this == rhs); +} + +ArrayLineJoinTypeRef IArrayLineJoinType::GetRef() const +{ + return fArrayLineJoinType; +} + +bool IArrayLineJoinType::IsNull() const +{ + return sArrayLineJoinType->IsNull(fArrayLineJoinType); +} + +ATETextDOM::Int32 IArrayLineJoinType::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayLineJoinType->GetSize(fArrayLineJoinType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LineJoinType IArrayLineJoinType::GetFirst( ) const +{ + LineJoinType ret; + ATEErr error = sArrayLineJoinType->GetFirst(fArrayLineJoinType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LineJoinType IArrayLineJoinType::GetLast( ) const +{ + LineJoinType ret; + ATEErr error = sArrayLineJoinType->GetLast(fArrayLineJoinType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LineJoinType IArrayLineJoinType::Item( ATETextDOM::Int32 index) const +{ + LineJoinType ret; + ATEErr error = sArrayLineJoinType->Item(fArrayLineJoinType, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayWariChuJustification-- +////////////////////////////////////////////// + +IArrayWariChuJustification::IArrayWariChuJustification() +:fArrayWariChuJustification(0) +{ +} + +IArrayWariChuJustification::IArrayWariChuJustification(ArrayWariChuJustificationRef arraywarichujustification) +:fArrayWariChuJustification(arraywarichujustification) +{ +} + +IArrayWariChuJustification::IArrayWariChuJustification(const IArrayWariChuJustification& src) +:fArrayWariChuJustification(src.fArrayWariChuJustification) +{ + sArrayWariChuJustification->AddRef(fArrayWariChuJustification); +} + +IArrayWariChuJustification::~IArrayWariChuJustification() +{ + sArrayWariChuJustification->Release(fArrayWariChuJustification); +} + +IArrayWariChuJustification& IArrayWariChuJustification::operator=(const IArrayWariChuJustification& rhs) +{ + if (&rhs != this) + { + sArrayWariChuJustification->Release(fArrayWariChuJustification); + fArrayWariChuJustification = rhs.fArrayWariChuJustification; + sArrayWariChuJustification->AddRef(fArrayWariChuJustification); + } + return *this; +} + +bool IArrayWariChuJustification::operator==(const IArrayWariChuJustification& rhs) const +{ + return fArrayWariChuJustification == rhs.fArrayWariChuJustification; +} + +bool IArrayWariChuJustification::operator!=(const IArrayWariChuJustification& rhs) const +{ + return !(*this == rhs); +} + +ArrayWariChuJustificationRef IArrayWariChuJustification::GetRef() const +{ + return fArrayWariChuJustification; +} + +bool IArrayWariChuJustification::IsNull() const +{ + return sArrayWariChuJustification->IsNull(fArrayWariChuJustification); +} + +ATETextDOM::Int32 IArrayWariChuJustification::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayWariChuJustification->GetSize(fArrayWariChuJustification, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +WariChuJustification IArrayWariChuJustification::GetFirst( ) const +{ + WariChuJustification ret; + ATEErr error = sArrayWariChuJustification->GetFirst(fArrayWariChuJustification, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +WariChuJustification IArrayWariChuJustification::GetLast( ) const +{ + WariChuJustification ret; + ATEErr error = sArrayWariChuJustification->GetLast(fArrayWariChuJustification, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +WariChuJustification IArrayWariChuJustification::Item( ATETextDOM::Int32 index) const +{ + WariChuJustification ret; + ATEErr error = sArrayWariChuJustification->Item(fArrayWariChuJustification, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayStyleRunAlignment-- +////////////////////////////////////////////// + +IArrayStyleRunAlignment::IArrayStyleRunAlignment() +:fArrayStyleRunAlignment(0) +{ +} + +IArrayStyleRunAlignment::IArrayStyleRunAlignment(ArrayStyleRunAlignmentRef arraystylerunalignment) +:fArrayStyleRunAlignment(arraystylerunalignment) +{ +} + +IArrayStyleRunAlignment::IArrayStyleRunAlignment(const IArrayStyleRunAlignment& src) +:fArrayStyleRunAlignment(src.fArrayStyleRunAlignment) +{ + sArrayStyleRunAlignment->AddRef(fArrayStyleRunAlignment); +} + +IArrayStyleRunAlignment::~IArrayStyleRunAlignment() +{ + sArrayStyleRunAlignment->Release(fArrayStyleRunAlignment); +} + +IArrayStyleRunAlignment& IArrayStyleRunAlignment::operator=(const IArrayStyleRunAlignment& rhs) +{ + if (&rhs != this) + { + sArrayStyleRunAlignment->Release(fArrayStyleRunAlignment); + fArrayStyleRunAlignment = rhs.fArrayStyleRunAlignment; + sArrayStyleRunAlignment->AddRef(fArrayStyleRunAlignment); + } + return *this; +} + +bool IArrayStyleRunAlignment::operator==(const IArrayStyleRunAlignment& rhs) const +{ + return fArrayStyleRunAlignment == rhs.fArrayStyleRunAlignment; +} + +bool IArrayStyleRunAlignment::operator!=(const IArrayStyleRunAlignment& rhs) const +{ + return !(*this == rhs); +} + +ArrayStyleRunAlignmentRef IArrayStyleRunAlignment::GetRef() const +{ + return fArrayStyleRunAlignment; +} + +bool IArrayStyleRunAlignment::IsNull() const +{ + return sArrayStyleRunAlignment->IsNull(fArrayStyleRunAlignment); +} + +ATETextDOM::Int32 IArrayStyleRunAlignment::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayStyleRunAlignment->GetSize(fArrayStyleRunAlignment, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +StyleRunAlignment IArrayStyleRunAlignment::GetFirst( ) const +{ + StyleRunAlignment ret; + ATEErr error = sArrayStyleRunAlignment->GetFirst(fArrayStyleRunAlignment, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +StyleRunAlignment IArrayStyleRunAlignment::GetLast( ) const +{ + StyleRunAlignment ret; + ATEErr error = sArrayStyleRunAlignment->GetLast(fArrayStyleRunAlignment, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +StyleRunAlignment IArrayStyleRunAlignment::Item( ATETextDOM::Int32 index) const +{ + StyleRunAlignment ret; + ATEErr error = sArrayStyleRunAlignment->Item(fArrayStyleRunAlignment, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayAutoKernType-- +////////////////////////////////////////////// + +IArrayAutoKernType::IArrayAutoKernType() +:fArrayAutoKernType(0) +{ +} + +IArrayAutoKernType::IArrayAutoKernType(ArrayAutoKernTypeRef arrayautokerntype) +:fArrayAutoKernType(arrayautokerntype) +{ +} + +IArrayAutoKernType::IArrayAutoKernType(const IArrayAutoKernType& src) +:fArrayAutoKernType(src.fArrayAutoKernType) +{ + sArrayAutoKernType->AddRef(fArrayAutoKernType); +} + +IArrayAutoKernType::~IArrayAutoKernType() +{ + sArrayAutoKernType->Release(fArrayAutoKernType); +} + +IArrayAutoKernType& IArrayAutoKernType::operator=(const IArrayAutoKernType& rhs) +{ + if (&rhs != this) + { + sArrayAutoKernType->Release(fArrayAutoKernType); + fArrayAutoKernType = rhs.fArrayAutoKernType; + sArrayAutoKernType->AddRef(fArrayAutoKernType); + } + return *this; +} + +bool IArrayAutoKernType::operator==(const IArrayAutoKernType& rhs) const +{ + return fArrayAutoKernType == rhs.fArrayAutoKernType; +} + +bool IArrayAutoKernType::operator!=(const IArrayAutoKernType& rhs) const +{ + return !(*this == rhs); +} + +ArrayAutoKernTypeRef IArrayAutoKernType::GetRef() const +{ + return fArrayAutoKernType; +} + +bool IArrayAutoKernType::IsNull() const +{ + return sArrayAutoKernType->IsNull(fArrayAutoKernType); +} + +ATETextDOM::Int32 IArrayAutoKernType::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayAutoKernType->GetSize(fArrayAutoKernType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +AutoKernType IArrayAutoKernType::GetFirst( ) const +{ + AutoKernType ret; + ATEErr error = sArrayAutoKernType->GetFirst(fArrayAutoKernType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +AutoKernType IArrayAutoKernType::GetLast( ) const +{ + AutoKernType ret; + ATEErr error = sArrayAutoKernType->GetLast(fArrayAutoKernType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +AutoKernType IArrayAutoKernType::Item( ATETextDOM::Int32 index) const +{ + AutoKernType ret; + ATEErr error = sArrayAutoKernType->Item(fArrayAutoKernType, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayBaselineDirection-- +////////////////////////////////////////////// + +IArrayBaselineDirection::IArrayBaselineDirection() +:fArrayBaselineDirection(0) +{ +} + +IArrayBaselineDirection::IArrayBaselineDirection(ArrayBaselineDirectionRef arraybaselinedirection) +:fArrayBaselineDirection(arraybaselinedirection) +{ +} + +IArrayBaselineDirection::IArrayBaselineDirection(const IArrayBaselineDirection& src) +:fArrayBaselineDirection(src.fArrayBaselineDirection) +{ + sArrayBaselineDirection->AddRef(fArrayBaselineDirection); +} + +IArrayBaselineDirection::~IArrayBaselineDirection() +{ + sArrayBaselineDirection->Release(fArrayBaselineDirection); +} + +IArrayBaselineDirection& IArrayBaselineDirection::operator=(const IArrayBaselineDirection& rhs) +{ + if (&rhs != this) + { + sArrayBaselineDirection->Release(fArrayBaselineDirection); + fArrayBaselineDirection = rhs.fArrayBaselineDirection; + sArrayBaselineDirection->AddRef(fArrayBaselineDirection); + } + return *this; +} + +bool IArrayBaselineDirection::operator==(const IArrayBaselineDirection& rhs) const +{ + return fArrayBaselineDirection == rhs.fArrayBaselineDirection; +} + +bool IArrayBaselineDirection::operator!=(const IArrayBaselineDirection& rhs) const +{ + return !(*this == rhs); +} + +ArrayBaselineDirectionRef IArrayBaselineDirection::GetRef() const +{ + return fArrayBaselineDirection; +} + +bool IArrayBaselineDirection::IsNull() const +{ + return sArrayBaselineDirection->IsNull(fArrayBaselineDirection); +} + +ATETextDOM::Int32 IArrayBaselineDirection::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayBaselineDirection->GetSize(fArrayBaselineDirection, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +BaselineDirection IArrayBaselineDirection::GetFirst( ) const +{ + BaselineDirection ret; + ATEErr error = sArrayBaselineDirection->GetFirst(fArrayBaselineDirection, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +BaselineDirection IArrayBaselineDirection::GetLast( ) const +{ + BaselineDirection ret; + ATEErr error = sArrayBaselineDirection->GetLast(fArrayBaselineDirection, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +BaselineDirection IArrayBaselineDirection::Item( ATETextDOM::Int32 index) const +{ + BaselineDirection ret; + ATEErr error = sArrayBaselineDirection->Item(fArrayBaselineDirection, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayLanguage-- +////////////////////////////////////////////// + +IArrayLanguage::IArrayLanguage() +:fArrayLanguage(0) +{ +} + +IArrayLanguage::IArrayLanguage(ArrayLanguageRef arraylanguage) +:fArrayLanguage(arraylanguage) +{ +} + +IArrayLanguage::IArrayLanguage(const IArrayLanguage& src) +:fArrayLanguage(src.fArrayLanguage) +{ + sArrayLanguage->AddRef(fArrayLanguage); +} + +IArrayLanguage::~IArrayLanguage() +{ + sArrayLanguage->Release(fArrayLanguage); +} + +IArrayLanguage& IArrayLanguage::operator=(const IArrayLanguage& rhs) +{ + if (&rhs != this) + { + sArrayLanguage->Release(fArrayLanguage); + fArrayLanguage = rhs.fArrayLanguage; + sArrayLanguage->AddRef(fArrayLanguage); + } + return *this; +} + +bool IArrayLanguage::operator==(const IArrayLanguage& rhs) const +{ + return fArrayLanguage == rhs.fArrayLanguage; +} + +bool IArrayLanguage::operator!=(const IArrayLanguage& rhs) const +{ + return !(*this == rhs); +} + +ArrayLanguageRef IArrayLanguage::GetRef() const +{ + return fArrayLanguage; +} + +bool IArrayLanguage::IsNull() const +{ + return sArrayLanguage->IsNull(fArrayLanguage); +} + +ATETextDOM::Int32 IArrayLanguage::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayLanguage->GetSize(fArrayLanguage, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +Language IArrayLanguage::GetFirst( ) const +{ + Language ret; + ATEErr error = sArrayLanguage->GetFirst(fArrayLanguage, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +Language IArrayLanguage::GetLast( ) const +{ + Language ret; + ATEErr error = sArrayLanguage->GetLast(fArrayLanguage, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +Language IArrayLanguage::Item( ATETextDOM::Int32 index) const +{ + Language ret; + ATEErr error = sArrayLanguage->Item(fArrayLanguage, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayFontCapsOption-- +////////////////////////////////////////////// + +IArrayFontCapsOption::IArrayFontCapsOption() +:fArrayFontCapsOption(0) +{ +} + +IArrayFontCapsOption::IArrayFontCapsOption(ArrayFontCapsOptionRef arrayfontcapsoption) +:fArrayFontCapsOption(arrayfontcapsoption) +{ +} + +IArrayFontCapsOption::IArrayFontCapsOption(const IArrayFontCapsOption& src) +:fArrayFontCapsOption(src.fArrayFontCapsOption) +{ + sArrayFontCapsOption->AddRef(fArrayFontCapsOption); +} + +IArrayFontCapsOption::~IArrayFontCapsOption() +{ + sArrayFontCapsOption->Release(fArrayFontCapsOption); +} + +IArrayFontCapsOption& IArrayFontCapsOption::operator=(const IArrayFontCapsOption& rhs) +{ + if (&rhs != this) + { + sArrayFontCapsOption->Release(fArrayFontCapsOption); + fArrayFontCapsOption = rhs.fArrayFontCapsOption; + sArrayFontCapsOption->AddRef(fArrayFontCapsOption); + } + return *this; +} + +bool IArrayFontCapsOption::operator==(const IArrayFontCapsOption& rhs) const +{ + return fArrayFontCapsOption == rhs.fArrayFontCapsOption; +} + +bool IArrayFontCapsOption::operator!=(const IArrayFontCapsOption& rhs) const +{ + return !(*this == rhs); +} + +ArrayFontCapsOptionRef IArrayFontCapsOption::GetRef() const +{ + return fArrayFontCapsOption; +} + +bool IArrayFontCapsOption::IsNull() const +{ + return sArrayFontCapsOption->IsNull(fArrayFontCapsOption); +} + +ATETextDOM::Int32 IArrayFontCapsOption::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayFontCapsOption->GetSize(fArrayFontCapsOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontCapsOption IArrayFontCapsOption::GetFirst( ) const +{ + FontCapsOption ret; + ATEErr error = sArrayFontCapsOption->GetFirst(fArrayFontCapsOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontCapsOption IArrayFontCapsOption::GetLast( ) const +{ + FontCapsOption ret; + ATEErr error = sArrayFontCapsOption->GetLast(fArrayFontCapsOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontCapsOption IArrayFontCapsOption::Item( ATETextDOM::Int32 index) const +{ + FontCapsOption ret; + ATEErr error = sArrayFontCapsOption->Item(fArrayFontCapsOption, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayFontBaselineOption-- +////////////////////////////////////////////// + +IArrayFontBaselineOption::IArrayFontBaselineOption() +:fArrayFontBaselineOption(0) +{ +} + +IArrayFontBaselineOption::IArrayFontBaselineOption(ArrayFontBaselineOptionRef arrayfontbaselineoption) +:fArrayFontBaselineOption(arrayfontbaselineoption) +{ +} + +IArrayFontBaselineOption::IArrayFontBaselineOption(const IArrayFontBaselineOption& src) +:fArrayFontBaselineOption(src.fArrayFontBaselineOption) +{ + sArrayFontBaselineOption->AddRef(fArrayFontBaselineOption); +} + +IArrayFontBaselineOption::~IArrayFontBaselineOption() +{ + sArrayFontBaselineOption->Release(fArrayFontBaselineOption); +} + +IArrayFontBaselineOption& IArrayFontBaselineOption::operator=(const IArrayFontBaselineOption& rhs) +{ + if (&rhs != this) + { + sArrayFontBaselineOption->Release(fArrayFontBaselineOption); + fArrayFontBaselineOption = rhs.fArrayFontBaselineOption; + sArrayFontBaselineOption->AddRef(fArrayFontBaselineOption); + } + return *this; +} + +bool IArrayFontBaselineOption::operator==(const IArrayFontBaselineOption& rhs) const +{ + return fArrayFontBaselineOption == rhs.fArrayFontBaselineOption; +} + +bool IArrayFontBaselineOption::operator!=(const IArrayFontBaselineOption& rhs) const +{ + return !(*this == rhs); +} + +ArrayFontBaselineOptionRef IArrayFontBaselineOption::GetRef() const +{ + return fArrayFontBaselineOption; +} + +bool IArrayFontBaselineOption::IsNull() const +{ + return sArrayFontBaselineOption->IsNull(fArrayFontBaselineOption); +} + +ATETextDOM::Int32 IArrayFontBaselineOption::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayFontBaselineOption->GetSize(fArrayFontBaselineOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontBaselineOption IArrayFontBaselineOption::GetFirst( ) const +{ + FontBaselineOption ret; + ATEErr error = sArrayFontBaselineOption->GetFirst(fArrayFontBaselineOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontBaselineOption IArrayFontBaselineOption::GetLast( ) const +{ + FontBaselineOption ret; + ATEErr error = sArrayFontBaselineOption->GetLast(fArrayFontBaselineOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontBaselineOption IArrayFontBaselineOption::Item( ATETextDOM::Int32 index) const +{ + FontBaselineOption ret; + ATEErr error = sArrayFontBaselineOption->Item(fArrayFontBaselineOption, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayFontOpenTypePositionOption-- +////////////////////////////////////////////// + +IArrayFontOpenTypePositionOption::IArrayFontOpenTypePositionOption() +:fArrayFontOpenTypePositionOption(0) +{ +} + +IArrayFontOpenTypePositionOption::IArrayFontOpenTypePositionOption(ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption) +:fArrayFontOpenTypePositionOption(arrayfontopentypepositionoption) +{ +} + +IArrayFontOpenTypePositionOption::IArrayFontOpenTypePositionOption(const IArrayFontOpenTypePositionOption& src) +:fArrayFontOpenTypePositionOption(src.fArrayFontOpenTypePositionOption) +{ + sArrayFontOpenTypePositionOption->AddRef(fArrayFontOpenTypePositionOption); +} + +IArrayFontOpenTypePositionOption::~IArrayFontOpenTypePositionOption() +{ + sArrayFontOpenTypePositionOption->Release(fArrayFontOpenTypePositionOption); +} + +IArrayFontOpenTypePositionOption& IArrayFontOpenTypePositionOption::operator=(const IArrayFontOpenTypePositionOption& rhs) +{ + if (&rhs != this) + { + sArrayFontOpenTypePositionOption->Release(fArrayFontOpenTypePositionOption); + fArrayFontOpenTypePositionOption = rhs.fArrayFontOpenTypePositionOption; + sArrayFontOpenTypePositionOption->AddRef(fArrayFontOpenTypePositionOption); + } + return *this; +} + +bool IArrayFontOpenTypePositionOption::operator==(const IArrayFontOpenTypePositionOption& rhs) const +{ + return fArrayFontOpenTypePositionOption == rhs.fArrayFontOpenTypePositionOption; +} + +bool IArrayFontOpenTypePositionOption::operator!=(const IArrayFontOpenTypePositionOption& rhs) const +{ + return !(*this == rhs); +} + +ArrayFontOpenTypePositionOptionRef IArrayFontOpenTypePositionOption::GetRef() const +{ + return fArrayFontOpenTypePositionOption; +} + +bool IArrayFontOpenTypePositionOption::IsNull() const +{ + return sArrayFontOpenTypePositionOption->IsNull(fArrayFontOpenTypePositionOption); +} + +ATETextDOM::Int32 IArrayFontOpenTypePositionOption::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayFontOpenTypePositionOption->GetSize(fArrayFontOpenTypePositionOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontOpenTypePositionOption IArrayFontOpenTypePositionOption::GetFirst( ) const +{ + FontOpenTypePositionOption ret; + ATEErr error = sArrayFontOpenTypePositionOption->GetFirst(fArrayFontOpenTypePositionOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontOpenTypePositionOption IArrayFontOpenTypePositionOption::GetLast( ) const +{ + FontOpenTypePositionOption ret; + ATEErr error = sArrayFontOpenTypePositionOption->GetLast(fArrayFontOpenTypePositionOption, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +FontOpenTypePositionOption IArrayFontOpenTypePositionOption::Item( ATETextDOM::Int32 index) const +{ + FontOpenTypePositionOption ret; + ATEErr error = sArrayFontOpenTypePositionOption->Item(fArrayFontOpenTypePositionOption, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayUnderlinePosition-- +////////////////////////////////////////////// + +IArrayUnderlinePosition::IArrayUnderlinePosition() +:fArrayUnderlinePosition(0) +{ +} + +IArrayUnderlinePosition::IArrayUnderlinePosition(ArrayUnderlinePositionRef arrayunderlineposition) +:fArrayUnderlinePosition(arrayunderlineposition) +{ +} + +IArrayUnderlinePosition::IArrayUnderlinePosition(const IArrayUnderlinePosition& src) +:fArrayUnderlinePosition(src.fArrayUnderlinePosition) +{ + sArrayUnderlinePosition->AddRef(fArrayUnderlinePosition); +} + +IArrayUnderlinePosition::~IArrayUnderlinePosition() +{ + sArrayUnderlinePosition->Release(fArrayUnderlinePosition); +} + +IArrayUnderlinePosition& IArrayUnderlinePosition::operator=(const IArrayUnderlinePosition& rhs) +{ + if (&rhs != this) + { + sArrayUnderlinePosition->Release(fArrayUnderlinePosition); + fArrayUnderlinePosition = rhs.fArrayUnderlinePosition; + sArrayUnderlinePosition->AddRef(fArrayUnderlinePosition); + } + return *this; +} + +bool IArrayUnderlinePosition::operator==(const IArrayUnderlinePosition& rhs) const +{ + return fArrayUnderlinePosition == rhs.fArrayUnderlinePosition; +} + +bool IArrayUnderlinePosition::operator!=(const IArrayUnderlinePosition& rhs) const +{ + return !(*this == rhs); +} + +ArrayUnderlinePositionRef IArrayUnderlinePosition::GetRef() const +{ + return fArrayUnderlinePosition; +} + +bool IArrayUnderlinePosition::IsNull() const +{ + return sArrayUnderlinePosition->IsNull(fArrayUnderlinePosition); +} + +ATETextDOM::Int32 IArrayUnderlinePosition::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayUnderlinePosition->GetSize(fArrayUnderlinePosition, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +UnderlinePosition IArrayUnderlinePosition::GetFirst( ) const +{ + UnderlinePosition ret; + ATEErr error = sArrayUnderlinePosition->GetFirst(fArrayUnderlinePosition, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +UnderlinePosition IArrayUnderlinePosition::GetLast( ) const +{ + UnderlinePosition ret; + ATEErr error = sArrayUnderlinePosition->GetLast(fArrayUnderlinePosition, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +UnderlinePosition IArrayUnderlinePosition::Item( ATETextDOM::Int32 index) const +{ + UnderlinePosition ret; + ATEErr error = sArrayUnderlinePosition->Item(fArrayUnderlinePosition, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayStrikethroughPosition-- +////////////////////////////////////////////// + +IArrayStrikethroughPosition::IArrayStrikethroughPosition() +:fArrayStrikethroughPosition(0) +{ +} + +IArrayStrikethroughPosition::IArrayStrikethroughPosition(ArrayStrikethroughPositionRef arraystrikethroughposition) +:fArrayStrikethroughPosition(arraystrikethroughposition) +{ +} + +IArrayStrikethroughPosition::IArrayStrikethroughPosition(const IArrayStrikethroughPosition& src) +:fArrayStrikethroughPosition(src.fArrayStrikethroughPosition) +{ + sArrayStrikethroughPosition->AddRef(fArrayStrikethroughPosition); +} + +IArrayStrikethroughPosition::~IArrayStrikethroughPosition() +{ + sArrayStrikethroughPosition->Release(fArrayStrikethroughPosition); +} + +IArrayStrikethroughPosition& IArrayStrikethroughPosition::operator=(const IArrayStrikethroughPosition& rhs) +{ + if (&rhs != this) + { + sArrayStrikethroughPosition->Release(fArrayStrikethroughPosition); + fArrayStrikethroughPosition = rhs.fArrayStrikethroughPosition; + sArrayStrikethroughPosition->AddRef(fArrayStrikethroughPosition); + } + return *this; +} + +bool IArrayStrikethroughPosition::operator==(const IArrayStrikethroughPosition& rhs) const +{ + return fArrayStrikethroughPosition == rhs.fArrayStrikethroughPosition; +} + +bool IArrayStrikethroughPosition::operator!=(const IArrayStrikethroughPosition& rhs) const +{ + return !(*this == rhs); +} + +ArrayStrikethroughPositionRef IArrayStrikethroughPosition::GetRef() const +{ + return fArrayStrikethroughPosition; +} + +bool IArrayStrikethroughPosition::IsNull() const +{ + return sArrayStrikethroughPosition->IsNull(fArrayStrikethroughPosition); +} + +ATETextDOM::Int32 IArrayStrikethroughPosition::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayStrikethroughPosition->GetSize(fArrayStrikethroughPosition, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +StrikethroughPosition IArrayStrikethroughPosition::GetFirst( ) const +{ + StrikethroughPosition ret; + ATEErr error = sArrayStrikethroughPosition->GetFirst(fArrayStrikethroughPosition, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +StrikethroughPosition IArrayStrikethroughPosition::GetLast( ) const +{ + StrikethroughPosition ret; + ATEErr error = sArrayStrikethroughPosition->GetLast(fArrayStrikethroughPosition, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +StrikethroughPosition IArrayStrikethroughPosition::Item( ATETextDOM::Int32 index) const +{ + StrikethroughPosition ret; + ATEErr error = sArrayStrikethroughPosition->Item(fArrayStrikethroughPosition, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayParagraphJustification-- +////////////////////////////////////////////// + +IArrayParagraphJustification::IArrayParagraphJustification() +:fArrayParagraphJustification(0) +{ +} + +IArrayParagraphJustification::IArrayParagraphJustification(ArrayParagraphJustificationRef arrayparagraphjustification) +:fArrayParagraphJustification(arrayparagraphjustification) +{ +} + +IArrayParagraphJustification::IArrayParagraphJustification(const IArrayParagraphJustification& src) +:fArrayParagraphJustification(src.fArrayParagraphJustification) +{ + sArrayParagraphJustification->AddRef(fArrayParagraphJustification); +} + +IArrayParagraphJustification::~IArrayParagraphJustification() +{ + sArrayParagraphJustification->Release(fArrayParagraphJustification); +} + +IArrayParagraphJustification& IArrayParagraphJustification::operator=(const IArrayParagraphJustification& rhs) +{ + if (&rhs != this) + { + sArrayParagraphJustification->Release(fArrayParagraphJustification); + fArrayParagraphJustification = rhs.fArrayParagraphJustification; + sArrayParagraphJustification->AddRef(fArrayParagraphJustification); + } + return *this; +} + +bool IArrayParagraphJustification::operator==(const IArrayParagraphJustification& rhs) const +{ + return fArrayParagraphJustification == rhs.fArrayParagraphJustification; +} + +bool IArrayParagraphJustification::operator!=(const IArrayParagraphJustification& rhs) const +{ + return !(*this == rhs); +} + +ArrayParagraphJustificationRef IArrayParagraphJustification::GetRef() const +{ + return fArrayParagraphJustification; +} + +bool IArrayParagraphJustification::IsNull() const +{ + return sArrayParagraphJustification->IsNull(fArrayParagraphJustification); +} + +ATETextDOM::Int32 IArrayParagraphJustification::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayParagraphJustification->GetSize(fArrayParagraphJustification, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ParagraphJustification IArrayParagraphJustification::GetFirst( ) const +{ + ParagraphJustification ret; + ATEErr error = sArrayParagraphJustification->GetFirst(fArrayParagraphJustification, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ParagraphJustification IArrayParagraphJustification::GetLast( ) const +{ + ParagraphJustification ret; + ATEErr error = sArrayParagraphJustification->GetLast(fArrayParagraphJustification, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ParagraphJustification IArrayParagraphJustification::Item( ATETextDOM::Int32 index) const +{ + ParagraphJustification ret; + ATEErr error = sArrayParagraphJustification->Item(fArrayParagraphJustification, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayArrayReal-- +////////////////////////////////////////////// + +IArrayArrayReal::IArrayArrayReal() +:fArrayArrayReal(0) +{ +} + +IArrayArrayReal::IArrayArrayReal(ArrayArrayRealRef arrayarrayreal) +:fArrayArrayReal(arrayarrayreal) +{ +} + +IArrayArrayReal::IArrayArrayReal(const IArrayArrayReal& src) +:fArrayArrayReal(src.fArrayArrayReal) +{ + sArrayArrayReal->AddRef(fArrayArrayReal); +} + +IArrayArrayReal::~IArrayArrayReal() +{ + sArrayArrayReal->Release(fArrayArrayReal); +} + +IArrayArrayReal& IArrayArrayReal::operator=(const IArrayArrayReal& rhs) +{ + if (&rhs != this) + { + sArrayArrayReal->Release(fArrayArrayReal); + fArrayArrayReal = rhs.fArrayArrayReal; + sArrayArrayReal->AddRef(fArrayArrayReal); + } + return *this; +} + +bool IArrayArrayReal::operator==(const IArrayArrayReal& rhs) const +{ + return fArrayArrayReal == rhs.fArrayArrayReal; +} + +bool IArrayArrayReal::operator!=(const IArrayArrayReal& rhs) const +{ + return !(*this == rhs); +} + +ArrayArrayRealRef IArrayArrayReal::GetRef() const +{ + return fArrayArrayReal; +} + +bool IArrayArrayReal::IsNull() const +{ + return sArrayArrayReal->IsNull(fArrayArrayReal); +} + +ATETextDOM::Int32 IArrayArrayReal::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayArrayReal->GetSize(fArrayArrayReal, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IArrayReal IArrayArrayReal::GetFirst( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sArrayArrayReal->GetFirst(fArrayArrayReal, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IArrayArrayReal::GetLast( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sArrayArrayReal->GetLast(fArrayArrayReal, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IArrayArrayReal::Item( ATETextDOM::Int32 index) const +{ + ArrayRealRef ret = 0; + ATEErr error = sArrayArrayReal->Item(fArrayArrayReal, index, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +////////////////////////////////////////////// +// --IArrayBurasagariType-- +////////////////////////////////////////////// + +IArrayBurasagariType::IArrayBurasagariType() +:fArrayBurasagariType(0) +{ +} + +IArrayBurasagariType::IArrayBurasagariType(ArrayBurasagariTypeRef arrayburasagaritype) +:fArrayBurasagariType(arrayburasagaritype) +{ +} + +IArrayBurasagariType::IArrayBurasagariType(const IArrayBurasagariType& src) +:fArrayBurasagariType(src.fArrayBurasagariType) +{ + sArrayBurasagariType->AddRef(fArrayBurasagariType); +} + +IArrayBurasagariType::~IArrayBurasagariType() +{ + sArrayBurasagariType->Release(fArrayBurasagariType); +} + +IArrayBurasagariType& IArrayBurasagariType::operator=(const IArrayBurasagariType& rhs) +{ + if (&rhs != this) + { + sArrayBurasagariType->Release(fArrayBurasagariType); + fArrayBurasagariType = rhs.fArrayBurasagariType; + sArrayBurasagariType->AddRef(fArrayBurasagariType); + } + return *this; +} + +bool IArrayBurasagariType::operator==(const IArrayBurasagariType& rhs) const +{ + return fArrayBurasagariType == rhs.fArrayBurasagariType; +} + +bool IArrayBurasagariType::operator!=(const IArrayBurasagariType& rhs) const +{ + return !(*this == rhs); +} + +ArrayBurasagariTypeRef IArrayBurasagariType::GetRef() const +{ + return fArrayBurasagariType; +} + +bool IArrayBurasagariType::IsNull() const +{ + return sArrayBurasagariType->IsNull(fArrayBurasagariType); +} + +ATETextDOM::Int32 IArrayBurasagariType::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayBurasagariType->GetSize(fArrayBurasagariType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +BurasagariType IArrayBurasagariType::GetFirst( ) const +{ + BurasagariType ret; + ATEErr error = sArrayBurasagariType->GetFirst(fArrayBurasagariType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +BurasagariType IArrayBurasagariType::GetLast( ) const +{ + BurasagariType ret; + ATEErr error = sArrayBurasagariType->GetLast(fArrayBurasagariType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +BurasagariType IArrayBurasagariType::Item( ATETextDOM::Int32 index) const +{ + BurasagariType ret; + ATEErr error = sArrayBurasagariType->Item(fArrayBurasagariType, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayPreferredKinsokuOrder-- +////////////////////////////////////////////// + +IArrayPreferredKinsokuOrder::IArrayPreferredKinsokuOrder() +:fArrayPreferredKinsokuOrder(0) +{ +} + +IArrayPreferredKinsokuOrder::IArrayPreferredKinsokuOrder(ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder) +:fArrayPreferredKinsokuOrder(arraypreferredkinsokuorder) +{ +} + +IArrayPreferredKinsokuOrder::IArrayPreferredKinsokuOrder(const IArrayPreferredKinsokuOrder& src) +:fArrayPreferredKinsokuOrder(src.fArrayPreferredKinsokuOrder) +{ + sArrayPreferredKinsokuOrder->AddRef(fArrayPreferredKinsokuOrder); +} + +IArrayPreferredKinsokuOrder::~IArrayPreferredKinsokuOrder() +{ + sArrayPreferredKinsokuOrder->Release(fArrayPreferredKinsokuOrder); +} + +IArrayPreferredKinsokuOrder& IArrayPreferredKinsokuOrder::operator=(const IArrayPreferredKinsokuOrder& rhs) +{ + if (&rhs != this) + { + sArrayPreferredKinsokuOrder->Release(fArrayPreferredKinsokuOrder); + fArrayPreferredKinsokuOrder = rhs.fArrayPreferredKinsokuOrder; + sArrayPreferredKinsokuOrder->AddRef(fArrayPreferredKinsokuOrder); + } + return *this; +} + +bool IArrayPreferredKinsokuOrder::operator==(const IArrayPreferredKinsokuOrder& rhs) const +{ + return fArrayPreferredKinsokuOrder == rhs.fArrayPreferredKinsokuOrder; +} + +bool IArrayPreferredKinsokuOrder::operator!=(const IArrayPreferredKinsokuOrder& rhs) const +{ + return !(*this == rhs); +} + +ArrayPreferredKinsokuOrderRef IArrayPreferredKinsokuOrder::GetRef() const +{ + return fArrayPreferredKinsokuOrder; +} + +bool IArrayPreferredKinsokuOrder::IsNull() const +{ + return sArrayPreferredKinsokuOrder->IsNull(fArrayPreferredKinsokuOrder); +} + +ATETextDOM::Int32 IArrayPreferredKinsokuOrder::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayPreferredKinsokuOrder->GetSize(fArrayPreferredKinsokuOrder, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +PreferredKinsokuOrder IArrayPreferredKinsokuOrder::GetFirst( ) const +{ + PreferredKinsokuOrder ret; + ATEErr error = sArrayPreferredKinsokuOrder->GetFirst(fArrayPreferredKinsokuOrder, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +PreferredKinsokuOrder IArrayPreferredKinsokuOrder::GetLast( ) const +{ + PreferredKinsokuOrder ret; + ATEErr error = sArrayPreferredKinsokuOrder->GetLast(fArrayPreferredKinsokuOrder, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +PreferredKinsokuOrder IArrayPreferredKinsokuOrder::Item( ATETextDOM::Int32 index) const +{ + PreferredKinsokuOrder ret; + ATEErr error = sArrayPreferredKinsokuOrder->Item(fArrayPreferredKinsokuOrder, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayKinsokuRef-- +////////////////////////////////////////////// + +IArrayKinsokuRef::IArrayKinsokuRef() +:fArrayKinsokuRef(0) +{ +} + +IArrayKinsokuRef::IArrayKinsokuRef(ArrayKinsokuRefRef arraykinsokuref) +:fArrayKinsokuRef(arraykinsokuref) +{ +} + +IArrayKinsokuRef::IArrayKinsokuRef(const IArrayKinsokuRef& src) +:fArrayKinsokuRef(src.fArrayKinsokuRef) +{ + sArrayKinsokuRef->AddRef(fArrayKinsokuRef); +} + +IArrayKinsokuRef::~IArrayKinsokuRef() +{ + sArrayKinsokuRef->Release(fArrayKinsokuRef); +} + +IArrayKinsokuRef& IArrayKinsokuRef::operator=(const IArrayKinsokuRef& rhs) +{ + if (&rhs != this) + { + sArrayKinsokuRef->Release(fArrayKinsokuRef); + fArrayKinsokuRef = rhs.fArrayKinsokuRef; + sArrayKinsokuRef->AddRef(fArrayKinsokuRef); + } + return *this; +} + +bool IArrayKinsokuRef::operator==(const IArrayKinsokuRef& rhs) const +{ + return fArrayKinsokuRef == rhs.fArrayKinsokuRef; +} + +bool IArrayKinsokuRef::operator!=(const IArrayKinsokuRef& rhs) const +{ + return !(*this == rhs); +} + +ArrayKinsokuRefRef IArrayKinsokuRef::GetRef() const +{ + return fArrayKinsokuRef; +} + +bool IArrayKinsokuRef::IsNull() const +{ + return sArrayKinsokuRef->IsNull(fArrayKinsokuRef); +} + +ATETextDOM::Int32 IArrayKinsokuRef::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayKinsokuRef->GetSize(fArrayKinsokuRef, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IKinsoku IArrayKinsokuRef::GetFirst( ) const +{ + KinsokuRef ret = 0; + ATEErr error = sArrayKinsokuRef->GetFirst(fArrayKinsokuRef, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsoku(ret); +} + +IKinsoku IArrayKinsokuRef::GetLast( ) const +{ + KinsokuRef ret = 0; + ATEErr error = sArrayKinsokuRef->GetLast(fArrayKinsokuRef, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsoku(ret); +} + +IKinsoku IArrayKinsokuRef::Item( ATETextDOM::Int32 index) const +{ + KinsokuRef ret = 0; + ATEErr error = sArrayKinsokuRef->Item(fArrayKinsokuRef, index, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsoku(ret); +} + +////////////////////////////////////////////// +// --IArrayListStyleRef-- +////////////////////////////////////////////// + +IArrayListStyleRef::IArrayListStyleRef() +:fArrayListStyleRef(0) +{ +} + +IArrayListStyleRef::IArrayListStyleRef(ArrayListStyleRefRef arrayListStyleref) +:fArrayListStyleRef(arrayListStyleref) +{ +} + +IArrayListStyleRef::IArrayListStyleRef(const IArrayListStyleRef& src) +:fArrayListStyleRef(src.fArrayListStyleRef) +{ + sArrayListStyleRef->AddRef(fArrayListStyleRef); +} + +IArrayListStyleRef::~IArrayListStyleRef() +{ + sArrayListStyleRef->Release(fArrayListStyleRef); +} + +IArrayListStyleRef& IArrayListStyleRef::operator=(const IArrayListStyleRef& rhs) +{ + if (&rhs != this) + { + sArrayListStyleRef->Release(fArrayListStyleRef); + fArrayListStyleRef = rhs.fArrayListStyleRef; + sArrayListStyleRef->AddRef(fArrayListStyleRef); + } + return *this; +} + +bool IArrayListStyleRef::operator==(const IArrayListStyleRef& rhs) const +{ + return fArrayListStyleRef == rhs.fArrayListStyleRef; +} + +bool IArrayListStyleRef::operator!=(const IArrayListStyleRef& rhs) const +{ + return !(*this == rhs); +} + +ArrayListStyleRefRef IArrayListStyleRef::GetRef() const +{ + return fArrayListStyleRef; +} + +bool IArrayListStyleRef::IsNull() const +{ + return sArrayListStyleRef->IsNull(fArrayListStyleRef); +} + +ATETextDOM::Int32 IArrayListStyleRef::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayListStyleRef->GetSize(fArrayListStyleRef, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IListStyle IArrayListStyleRef::GetFirst( ) const +{ + ListStyleRef ret = 0; + ATEErr error = sArrayListStyleRef->GetFirst(fArrayListStyleRef, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyle(ret); +} + +IListStyle IArrayListStyleRef::GetLast( ) const +{ + ListStyleRef ret = 0; + ATEErr error = sArrayListStyleRef->GetLast(fArrayListStyleRef, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyle(ret); +} + +IListStyle IArrayListStyleRef::Item( ATETextDOM::Int32 index) const +{ + ListStyleRef ret = 0; + ATEErr error = sArrayListStyleRef->Item(fArrayListStyleRef, index, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyle(ret); +} + +////////////////////////////////////////////// +// --IArrayListStyleSetRef-- +////////////////////////////////////////////// + +IArrayListStyleSetRef::IArrayListStyleSetRef() +:fArrayListStyleSetRef(0) +{ +} + +IArrayListStyleSetRef::IArrayListStyleSetRef(ArrayListStyleSetRefRef arrayListStylesetref) +:fArrayListStyleSetRef(arrayListStylesetref) +{ +} + +IArrayListStyleSetRef::IArrayListStyleSetRef(const IArrayListStyleSetRef& src) +:fArrayListStyleSetRef(src.fArrayListStyleSetRef) +{ + sArrayListStyleSetRef->AddRef(fArrayListStyleSetRef); +} + +IArrayListStyleSetRef::~IArrayListStyleSetRef() +{ + sArrayListStyleSetRef->Release(fArrayListStyleSetRef); +} + +IArrayListStyleSetRef& IArrayListStyleSetRef::operator=(const IArrayListStyleSetRef& rhs) +{ + if (&rhs != this) + { + sArrayListStyleSetRef->Release(fArrayListStyleSetRef); + fArrayListStyleSetRef = rhs.fArrayListStyleSetRef; + sArrayListStyleSetRef->AddRef(fArrayListStyleSetRef); + } + return *this; +} + +bool IArrayListStyleSetRef::operator==(const IArrayListStyleSetRef& rhs) const +{ + return fArrayListStyleSetRef == rhs.fArrayListStyleSetRef; +} + +bool IArrayListStyleSetRef::operator!=(const IArrayListStyleSetRef& rhs) const +{ + return !(*this == rhs); +} + +ArrayListStyleSetRefRef IArrayListStyleSetRef::GetRef() const +{ + return fArrayListStyleSetRef; +} + +bool IArrayListStyleSetRef::IsNull() const +{ + return sArrayListStyleSetRef->IsNull(fArrayListStyleSetRef); +} + +ATETextDOM::Int32 IArrayListStyleSetRef::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayListStyleSetRef->GetSize(fArrayListStyleSetRef, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IListStyleSet IArrayListStyleSetRef::GetFirst( ) const +{ + ListStyleSetRef ret = 0; + ATEErr error = sArrayListStyleSetRef->GetFirst(fArrayListStyleSetRef, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyleSet(ret); +} + +IListStyleSet IArrayListStyleSetRef::GetLast( ) const +{ + ListStyleSetRef ret = 0; + ATEErr error = sArrayListStyleSetRef->GetLast(fArrayListStyleSetRef, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyleSet(ret); +} + +IListStyleSet IArrayListStyleSetRef::Item( ATETextDOM::Int32 index) const +{ + ListStyleSetRef ret = 0; + ATEErr error = sArrayListStyleSetRef->Item(fArrayListStyleSetRef, index, &ret); + if(error) Throw_ATE_Exception(error); + return IListStyleSet(ret); +} + +////////////////////////////////////////////// +// --IArrayMojiKumiRef-- +////////////////////////////////////////////// + +IArrayMojiKumiRef::IArrayMojiKumiRef() +:fArrayMojiKumiRef(0) +{ +} + +IArrayMojiKumiRef::IArrayMojiKumiRef(ArrayMojiKumiRefRef arraymojikumiref) +:fArrayMojiKumiRef(arraymojikumiref) +{ +} + +IArrayMojiKumiRef::IArrayMojiKumiRef(const IArrayMojiKumiRef& src) +:fArrayMojiKumiRef(src.fArrayMojiKumiRef) +{ + sArrayMojiKumiRef->AddRef(fArrayMojiKumiRef); +} + +IArrayMojiKumiRef::~IArrayMojiKumiRef() +{ + sArrayMojiKumiRef->Release(fArrayMojiKumiRef); +} + +IArrayMojiKumiRef& IArrayMojiKumiRef::operator=(const IArrayMojiKumiRef& rhs) +{ + if (&rhs != this) + { + sArrayMojiKumiRef->Release(fArrayMojiKumiRef); + fArrayMojiKumiRef = rhs.fArrayMojiKumiRef; + sArrayMojiKumiRef->AddRef(fArrayMojiKumiRef); + } + return *this; +} + +bool IArrayMojiKumiRef::operator==(const IArrayMojiKumiRef& rhs) const +{ + return fArrayMojiKumiRef == rhs.fArrayMojiKumiRef; +} + +bool IArrayMojiKumiRef::operator!=(const IArrayMojiKumiRef& rhs) const +{ + return !(*this == rhs); +} + +ArrayMojiKumiRefRef IArrayMojiKumiRef::GetRef() const +{ + return fArrayMojiKumiRef; +} + +bool IArrayMojiKumiRef::IsNull() const +{ + return sArrayMojiKumiRef->IsNull(fArrayMojiKumiRef); +} + +ATETextDOM::Int32 IArrayMojiKumiRef::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayMojiKumiRef->GetSize(fArrayMojiKumiRef, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IMojiKumi IArrayMojiKumiRef::GetFirst( ) const +{ + MojiKumiRef ret = 0; + ATEErr error = sArrayMojiKumiRef->GetFirst(fArrayMojiKumiRef, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumi(ret); +} + +IMojiKumi IArrayMojiKumiRef::GetLast( ) const +{ + MojiKumiRef ret = 0; + ATEErr error = sArrayMojiKumiRef->GetLast(fArrayMojiKumiRef, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumi(ret); +} + +IMojiKumi IArrayMojiKumiRef::Item( ATETextDOM::Int32 index) const +{ + MojiKumiRef ret = 0; + ATEErr error = sArrayMojiKumiRef->Item(fArrayMojiKumiRef, index, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumi(ret); +} + +////////////////////////////////////////////// +// --IArrayMojiKumiSetRef-- +////////////////////////////////////////////// + +IArrayMojiKumiSetRef::IArrayMojiKumiSetRef() +:fArrayMojiKumiSetRef(0) +{ +} + +IArrayMojiKumiSetRef::IArrayMojiKumiSetRef(ArrayMojiKumiSetRefRef arraymojikumisetref) +:fArrayMojiKumiSetRef(arraymojikumisetref) +{ +} + +IArrayMojiKumiSetRef::IArrayMojiKumiSetRef(const IArrayMojiKumiSetRef& src) +:fArrayMojiKumiSetRef(src.fArrayMojiKumiSetRef) +{ + sArrayMojiKumiSetRef->AddRef(fArrayMojiKumiSetRef); +} + +IArrayMojiKumiSetRef::~IArrayMojiKumiSetRef() +{ + sArrayMojiKumiSetRef->Release(fArrayMojiKumiSetRef); +} + +IArrayMojiKumiSetRef& IArrayMojiKumiSetRef::operator=(const IArrayMojiKumiSetRef& rhs) +{ + if (&rhs != this) + { + sArrayMojiKumiSetRef->Release(fArrayMojiKumiSetRef); + fArrayMojiKumiSetRef = rhs.fArrayMojiKumiSetRef; + sArrayMojiKumiSetRef->AddRef(fArrayMojiKumiSetRef); + } + return *this; +} + +bool IArrayMojiKumiSetRef::operator==(const IArrayMojiKumiSetRef& rhs) const +{ + return fArrayMojiKumiSetRef == rhs.fArrayMojiKumiSetRef; +} + +bool IArrayMojiKumiSetRef::operator!=(const IArrayMojiKumiSetRef& rhs) const +{ + return !(*this == rhs); +} + +ArrayMojiKumiSetRefRef IArrayMojiKumiSetRef::GetRef() const +{ + return fArrayMojiKumiSetRef; +} + +bool IArrayMojiKumiSetRef::IsNull() const +{ + return sArrayMojiKumiSetRef->IsNull(fArrayMojiKumiSetRef); +} + +ATETextDOM::Int32 IArrayMojiKumiSetRef::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayMojiKumiSetRef->GetSize(fArrayMojiKumiSetRef, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IMojiKumiSet IArrayMojiKumiSetRef::GetFirst( ) const +{ + MojiKumiSetRef ret = 0; + ATEErr error = sArrayMojiKumiSetRef->GetFirst(fArrayMojiKumiSetRef, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumiSet(ret); +} + +IMojiKumiSet IArrayMojiKumiSetRef::GetLast( ) const +{ + MojiKumiSetRef ret = 0; + ATEErr error = sArrayMojiKumiSetRef->GetLast(fArrayMojiKumiSetRef, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumiSet(ret); +} + +IMojiKumiSet IArrayMojiKumiSetRef::Item( ATETextDOM::Int32 index) const +{ + MojiKumiSetRef ret = 0; + ATEErr error = sArrayMojiKumiSetRef->Item(fArrayMojiKumiSetRef, index, &ret); + if(error) Throw_ATE_Exception(error); + return IMojiKumiSet(ret); +} + +////////////////////////////////////////////// +// --IArrayTabStopsRef-- +////////////////////////////////////////////// + +IArrayTabStopsRef::IArrayTabStopsRef() +:fArrayTabStopsRef(0) +{ +} + +IArrayTabStopsRef::IArrayTabStopsRef(ArrayTabStopsRefRef arraytabstopsref) +:fArrayTabStopsRef(arraytabstopsref) +{ +} + +IArrayTabStopsRef::IArrayTabStopsRef(const IArrayTabStopsRef& src) +:fArrayTabStopsRef(src.fArrayTabStopsRef) +{ + sArrayTabStopsRef->AddRef(fArrayTabStopsRef); +} + +IArrayTabStopsRef::~IArrayTabStopsRef() +{ + sArrayTabStopsRef->Release(fArrayTabStopsRef); +} + +IArrayTabStopsRef& IArrayTabStopsRef::operator=(const IArrayTabStopsRef& rhs) +{ + if (&rhs != this) + { + sArrayTabStopsRef->Release(fArrayTabStopsRef); + fArrayTabStopsRef = rhs.fArrayTabStopsRef; + sArrayTabStopsRef->AddRef(fArrayTabStopsRef); + } + return *this; +} + +bool IArrayTabStopsRef::operator==(const IArrayTabStopsRef& rhs) const +{ + return fArrayTabStopsRef == rhs.fArrayTabStopsRef; +} + +bool IArrayTabStopsRef::operator!=(const IArrayTabStopsRef& rhs) const +{ + return !(*this == rhs); +} + +ArrayTabStopsRefRef IArrayTabStopsRef::GetRef() const +{ + return fArrayTabStopsRef; +} + +bool IArrayTabStopsRef::IsNull() const +{ + return sArrayTabStopsRef->IsNull(fArrayTabStopsRef); +} + +ATETextDOM::Int32 IArrayTabStopsRef::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayTabStopsRef->GetSize(fArrayTabStopsRef, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ITabStops IArrayTabStopsRef::GetFirst( ) const +{ + TabStopsRef ret = 0; + ATEErr error = sArrayTabStopsRef->GetFirst(fArrayTabStopsRef, &ret); + if(error) Throw_ATE_Exception(error); + return ITabStops(ret); +} + +ITabStops IArrayTabStopsRef::GetLast( ) const +{ + TabStopsRef ret = 0; + ATEErr error = sArrayTabStopsRef->GetLast(fArrayTabStopsRef, &ret); + if(error) Throw_ATE_Exception(error); + return ITabStops(ret); +} + +ITabStops IArrayTabStopsRef::Item( ATETextDOM::Int32 index) const +{ + TabStopsRef ret = 0; + ATEErr error = sArrayTabStopsRef->Item(fArrayTabStopsRef, index, &ret); + if(error) Throw_ATE_Exception(error); + return ITabStops(ret); +} + +////////////////////////////////////////////// +// --IArrayLeadingType-- +////////////////////////////////////////////// + +IArrayLeadingType::IArrayLeadingType() +:fArrayLeadingType(0) +{ +} + +IArrayLeadingType::IArrayLeadingType(ArrayLeadingTypeRef arrayleadingtype) +:fArrayLeadingType(arrayleadingtype) +{ +} + +IArrayLeadingType::IArrayLeadingType(const IArrayLeadingType& src) +:fArrayLeadingType(src.fArrayLeadingType) +{ + sArrayLeadingType->AddRef(fArrayLeadingType); +} + +IArrayLeadingType::~IArrayLeadingType() +{ + sArrayLeadingType->Release(fArrayLeadingType); +} + +IArrayLeadingType& IArrayLeadingType::operator=(const IArrayLeadingType& rhs) +{ + if (&rhs != this) + { + sArrayLeadingType->Release(fArrayLeadingType); + fArrayLeadingType = rhs.fArrayLeadingType; + sArrayLeadingType->AddRef(fArrayLeadingType); + } + return *this; +} + +bool IArrayLeadingType::operator==(const IArrayLeadingType& rhs) const +{ + return fArrayLeadingType == rhs.fArrayLeadingType; +} + +bool IArrayLeadingType::operator!=(const IArrayLeadingType& rhs) const +{ + return !(*this == rhs); +} + +ArrayLeadingTypeRef IArrayLeadingType::GetRef() const +{ + return fArrayLeadingType; +} + +bool IArrayLeadingType::IsNull() const +{ + return sArrayLeadingType->IsNull(fArrayLeadingType); +} + +ATETextDOM::Int32 IArrayLeadingType::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayLeadingType->GetSize(fArrayLeadingType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LeadingType IArrayLeadingType::GetFirst( ) const +{ + LeadingType ret; + ATEErr error = sArrayLeadingType->GetFirst(fArrayLeadingType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LeadingType IArrayLeadingType::GetLast( ) const +{ + LeadingType ret; + ATEErr error = sArrayLeadingType->GetLast(fArrayLeadingType, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +LeadingType IArrayLeadingType::Item( ATETextDOM::Int32 index) const +{ + LeadingType ret; + ATEErr error = sArrayLeadingType->Item(fArrayLeadingType, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayFontRef-- +////////////////////////////////////////////// + +IArrayFontRef::IArrayFontRef() +:fArrayFontRef(0) +{ +} + +IArrayFontRef::IArrayFontRef(ArrayFontRefRef arrayfontref) +:fArrayFontRef(arrayfontref) +{ +} + +IArrayFontRef::IArrayFontRef(const IArrayFontRef& src) +:fArrayFontRef(src.fArrayFontRef) +{ + sArrayFontRef->AddRef(fArrayFontRef); +} + +IArrayFontRef::~IArrayFontRef() +{ + sArrayFontRef->Release(fArrayFontRef); +} + +IArrayFontRef& IArrayFontRef::operator=(const IArrayFontRef& rhs) +{ + if (&rhs != this) + { + sArrayFontRef->Release(fArrayFontRef); + fArrayFontRef = rhs.fArrayFontRef; + sArrayFontRef->AddRef(fArrayFontRef); + } + return *this; +} + +bool IArrayFontRef::operator==(const IArrayFontRef& rhs) const +{ + return fArrayFontRef == rhs.fArrayFontRef; +} + +bool IArrayFontRef::operator!=(const IArrayFontRef& rhs) const +{ + return !(*this == rhs); +} + +ArrayFontRefRef IArrayFontRef::GetRef() const +{ + return fArrayFontRef; +} + +bool IArrayFontRef::IsNull() const +{ + return sArrayFontRef->IsNull(fArrayFontRef); +} + +ATETextDOM::Int32 IArrayFontRef::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayFontRef->GetSize(fArrayFontRef, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IFont IArrayFontRef::GetFirst( ) const +{ + FontRef ret = 0; + ATEErr error = sArrayFontRef->GetFirst(fArrayFontRef, &ret); + if(error) Throw_ATE_Exception(error); + return IFont(ret); +} + +IFont IArrayFontRef::GetLast( ) const +{ + FontRef ret = 0; + ATEErr error = sArrayFontRef->GetLast(fArrayFontRef, &ret); + if(error) Throw_ATE_Exception(error); + return IFont(ret); +} + +IFont IArrayFontRef::Item( ATETextDOM::Int32 index) const +{ + FontRef ret = 0; + ATEErr error = sArrayFontRef->Item(fArrayFontRef, index, &ret); + if(error) Throw_ATE_Exception(error); + return IFont(ret); +} + +////////////////////////////////////////////// +// --IArrayGlyphID-- +////////////////////////////////////////////// + +IArrayGlyphID::IArrayGlyphID() +:fArrayGlyphID(0) +{ +} + +IArrayGlyphID::IArrayGlyphID(ArrayGlyphIDRef arrayglyphid) +:fArrayGlyphID(arrayglyphid) +{ +} + +IArrayGlyphID::IArrayGlyphID(const IArrayGlyphID& src) +:fArrayGlyphID(src.fArrayGlyphID) +{ + sArrayGlyphID->AddRef(fArrayGlyphID); +} + +IArrayGlyphID::~IArrayGlyphID() +{ + sArrayGlyphID->Release(fArrayGlyphID); +} + +IArrayGlyphID& IArrayGlyphID::operator=(const IArrayGlyphID& rhs) +{ + if (&rhs != this) + { + sArrayGlyphID->Release(fArrayGlyphID); + fArrayGlyphID = rhs.fArrayGlyphID; + sArrayGlyphID->AddRef(fArrayGlyphID); + } + return *this; +} + +bool IArrayGlyphID::operator==(const IArrayGlyphID& rhs) const +{ + return fArrayGlyphID == rhs.fArrayGlyphID; +} + +bool IArrayGlyphID::operator!=(const IArrayGlyphID& rhs) const +{ + return !(*this == rhs); +} + +ArrayGlyphIDRef IArrayGlyphID::GetRef() const +{ + return fArrayGlyphID; +} + +bool IArrayGlyphID::IsNull() const +{ + return sArrayGlyphID->IsNull(fArrayGlyphID); +} + +ATETextDOM::Int32 IArrayGlyphID::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayGlyphID->GetSize(fArrayGlyphID, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATEGlyphID IArrayGlyphID::GetFirst( ) const +{ + ATEGlyphID ret; + ATEErr error = sArrayGlyphID->GetFirst(fArrayGlyphID, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATEGlyphID IArrayGlyphID::GetLast( ) const +{ + ATEGlyphID ret; + ATEErr error = sArrayGlyphID->GetLast(fArrayGlyphID, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATEGlyphID IArrayGlyphID::Item( ATETextDOM::Int32 index) const +{ + ATEGlyphID ret; + ATEErr error = sArrayGlyphID->Item(fArrayGlyphID, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayRealPoint-- +////////////////////////////////////////////// + +IArrayRealPoint::IArrayRealPoint() +:fArrayRealPoint(0) +{ +} + +IArrayRealPoint::IArrayRealPoint(ArrayRealPointRef arrayrealpoint) +:fArrayRealPoint(arrayrealpoint) +{ +} + +IArrayRealPoint::IArrayRealPoint(const IArrayRealPoint& src) +:fArrayRealPoint(src.fArrayRealPoint) +{ + sArrayRealPoint->AddRef(fArrayRealPoint); +} + +IArrayRealPoint::~IArrayRealPoint() +{ + sArrayRealPoint->Release(fArrayRealPoint); +} + +IArrayRealPoint& IArrayRealPoint::operator=(const IArrayRealPoint& rhs) +{ + if (&rhs != this) + { + sArrayRealPoint->Release(fArrayRealPoint); + fArrayRealPoint = rhs.fArrayRealPoint; + sArrayRealPoint->AddRef(fArrayRealPoint); + } + return *this; +} + +bool IArrayRealPoint::operator==(const IArrayRealPoint& rhs) const +{ + return fArrayRealPoint == rhs.fArrayRealPoint; +} + +bool IArrayRealPoint::operator!=(const IArrayRealPoint& rhs) const +{ + return !(*this == rhs); +} + +ArrayRealPointRef IArrayRealPoint::GetRef() const +{ + return fArrayRealPoint; +} + +bool IArrayRealPoint::IsNull() const +{ + return sArrayRealPoint->IsNull(fArrayRealPoint); +} + +ATETextDOM::Int32 IArrayRealPoint::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayRealPoint->GetSize(fArrayRealPoint, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::RealPoint IArrayRealPoint::GetFirst( ) const +{ + ATETextDOM::RealPoint ret; + ATETextDOM::FloatPoint tempRet; + ATEErr error = sArrayRealPoint->GetFirst(fArrayRealPoint, &tempRet); + if(error) Throw_ATE_Exception(error); + ATEFloatPointToATERealPoint(&tempRet,&ret); + return ret; +} + +ATETextDOM::RealPoint IArrayRealPoint::GetLast( ) const +{ + ATETextDOM::RealPoint ret; + ATETextDOM::FloatPoint tempRet; + ATEErr error = sArrayRealPoint->GetLast(fArrayRealPoint, &tempRet); + if(error) Throw_ATE_Exception(error); + ATEFloatPointToATERealPoint(&tempRet,&ret); + return ret; +} + +ATETextDOM::RealPoint IArrayRealPoint::Item( ATETextDOM::Int32 index) const +{ + ATETextDOM::RealPoint ret; + ATETextDOM::FloatPoint tempRet; + ATEErr error = sArrayRealPoint->Item(fArrayRealPoint, index, &tempRet); + if(error) Throw_ATE_Exception(error); + ATEFloatPointToATERealPoint(&tempRet,&ret); + return ret; +} + +////////////////////////////////////////////// +// --IArrayRealMatrix-- +////////////////////////////////////////////// + +IArrayRealMatrix::IArrayRealMatrix() +:fArrayRealMatrix(0) +{ +} + +IArrayRealMatrix::IArrayRealMatrix(ArrayRealMatrixRef arrayrealmatrix) +:fArrayRealMatrix(arrayrealmatrix) +{ +} + +IArrayRealMatrix::IArrayRealMatrix(const IArrayRealMatrix& src) +:fArrayRealMatrix(src.fArrayRealMatrix) +{ + sArrayRealMatrix->AddRef(fArrayRealMatrix); +} + +IArrayRealMatrix::~IArrayRealMatrix() +{ + sArrayRealMatrix->Release(fArrayRealMatrix); +} + +IArrayRealMatrix& IArrayRealMatrix::operator=(const IArrayRealMatrix& rhs) +{ + if (&rhs != this) + { + sArrayRealMatrix->Release(fArrayRealMatrix); + fArrayRealMatrix = rhs.fArrayRealMatrix; + sArrayRealMatrix->AddRef(fArrayRealMatrix); + } + return *this; +} + +bool IArrayRealMatrix::operator==(const IArrayRealMatrix& rhs) const +{ + return fArrayRealMatrix == rhs.fArrayRealMatrix; +} + +bool IArrayRealMatrix::operator!=(const IArrayRealMatrix& rhs) const +{ + return !(*this == rhs); +} + +ArrayRealMatrixRef IArrayRealMatrix::GetRef() const +{ + return fArrayRealMatrix; +} + +bool IArrayRealMatrix::IsNull() const +{ + return sArrayRealMatrix->IsNull(fArrayRealMatrix); +} + +ATETextDOM::Int32 IArrayRealMatrix::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayRealMatrix->GetSize(fArrayRealMatrix, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::RealMatrix IArrayRealMatrix::GetFirst( ) const +{ + ATETextDOM::RealMatrix ret; + ATETextDOM::FloatMatrix tempRet; + ATEErr error = sArrayRealMatrix->GetFirst(fArrayRealMatrix, &tempRet); + ATEFloatMatrixToATERealMatrix(&tempRet,&ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::RealMatrix IArrayRealMatrix::GetLast( ) const +{ + ATETextDOM::RealMatrix ret; + ATETextDOM::FloatMatrix tempRet; + ATEErr error = sArrayRealMatrix->GetLast(fArrayRealMatrix, &tempRet); + ATEFloatMatrixToATERealMatrix(&tempRet,&ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::RealMatrix IArrayRealMatrix::Item( ATETextDOM::Int32 index) const +{ + ATETextDOM::RealMatrix ret; + ATETextDOM::FloatMatrix tempRet; + ATEErr error = sArrayRealMatrix->Item(fArrayRealMatrix, index, &tempRet); + ATEFloatMatrixToATERealMatrix(&tempRet,&ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +#if SLO_COMPLEXSCRIPT +////////////////////////////////////////////// +// --IArrayParagraphDirection-- +////////////////////////////////////////////// + +IArrayParagraphDirection::IArrayParagraphDirection() +:fArrayParagraphDirection(0) +{ +} + +IArrayParagraphDirection::IArrayParagraphDirection(ArrayParagraphDirectionRef arrayparagraphdirection) +:fArrayParagraphDirection(arrayparagraphdirection) +{ +} + +IArrayParagraphDirection::IArrayParagraphDirection(const IArrayParagraphDirection& src) +:fArrayParagraphDirection(src.fArrayParagraphDirection) +{ + sArrayParagraphDirection->AddRef(fArrayParagraphDirection); +} + +IArrayParagraphDirection::~IArrayParagraphDirection() +{ + sArrayParagraphDirection->Release(fArrayParagraphDirection); +} + +IArrayParagraphDirection& IArrayParagraphDirection::operator=(const IArrayParagraphDirection& rhs) +{ + if (&rhs != this) + { + sArrayParagraphDirection->Release(fArrayParagraphDirection); + fArrayParagraphDirection = rhs.fArrayParagraphDirection; + sArrayParagraphDirection->AddRef(fArrayParagraphDirection); + } + return *this; +} + +bool IArrayParagraphDirection::operator==(const IArrayParagraphDirection& rhs) const +{ + return fArrayParagraphDirection == rhs.fArrayParagraphDirection; +} + +bool IArrayParagraphDirection::operator!=(const IArrayParagraphDirection& rhs) const +{ + return !(*this == rhs); +} + +ArrayParagraphDirectionRef IArrayParagraphDirection::GetRef() const +{ + return fArrayParagraphDirection; +} + +bool IArrayParagraphDirection::IsNull() const +{ + return sArrayParagraphDirection->IsNull(fArrayParagraphDirection); +} + +ATETextDOM::Int32 IArrayParagraphDirection::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayParagraphDirection->GetSize(fArrayParagraphDirection, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ParagraphDirection IArrayParagraphDirection::GetFirst( ) const +{ + ParagraphDirection ret; + ATEErr error = sArrayParagraphDirection->GetFirst(fArrayParagraphDirection, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ParagraphDirection IArrayParagraphDirection::GetLast( ) const +{ + ParagraphDirection ret; + ATEErr error = sArrayParagraphDirection->GetLast(fArrayParagraphDirection, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ParagraphDirection IArrayParagraphDirection::Item( ATETextDOM::Int32 index) const +{ + ParagraphDirection ret; + ATEErr error = sArrayParagraphDirection->Item(fArrayParagraphDirection, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayJustificationMethod-- +////////////////////////////////////////////// + +IArrayJustificationMethod::IArrayJustificationMethod() +:fArrayJustificationMethod(0) +{ +} + +IArrayJustificationMethod::IArrayJustificationMethod(ArrayJustificationMethodRef arrayjustificationmethod) +:fArrayJustificationMethod(arrayjustificationmethod) +{ +} + +IArrayJustificationMethod::IArrayJustificationMethod(const IArrayJustificationMethod& src) +:fArrayJustificationMethod(src.fArrayJustificationMethod) +{ + sArrayJustificationMethod->AddRef(fArrayJustificationMethod); +} + +IArrayJustificationMethod::~IArrayJustificationMethod() +{ + sArrayJustificationMethod->Release(fArrayJustificationMethod); +} + +IArrayJustificationMethod& IArrayJustificationMethod::operator=(const IArrayJustificationMethod& rhs) +{ + if (&rhs != this) + { + sArrayJustificationMethod->Release(fArrayJustificationMethod); + fArrayJustificationMethod = rhs.fArrayJustificationMethod; + sArrayJustificationMethod->AddRef(fArrayJustificationMethod); + } + return *this; +} + +bool IArrayJustificationMethod::operator==(const IArrayJustificationMethod& rhs) const +{ + return fArrayJustificationMethod == rhs.fArrayJustificationMethod; +} + +bool IArrayJustificationMethod::operator!=(const IArrayJustificationMethod& rhs) const +{ + return !(*this == rhs); +} + +ArrayJustificationMethodRef IArrayJustificationMethod::GetRef() const +{ + return fArrayJustificationMethod; +} + +bool IArrayJustificationMethod::IsNull() const +{ + return sArrayJustificationMethod->IsNull(fArrayJustificationMethod); +} + +ATETextDOM::Int32 IArrayJustificationMethod::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayJustificationMethod->GetSize(fArrayJustificationMethod, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +JustificationMethod IArrayJustificationMethod::GetFirst( ) const +{ + JustificationMethod ret; + ATEErr error = sArrayJustificationMethod->GetFirst(fArrayJustificationMethod, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +JustificationMethod IArrayJustificationMethod::GetLast( ) const +{ + JustificationMethod ret; + ATEErr error = sArrayJustificationMethod->GetLast(fArrayJustificationMethod, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +JustificationMethod IArrayJustificationMethod::Item( ATETextDOM::Int32 index) const +{ + JustificationMethod ret; + ATEErr error = sArrayJustificationMethod->Item(fArrayJustificationMethod, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + + +////////////////////////////////////////////// +// --IArrayKashidaWidth-- +////////////////////////////////////////////// + +IArrayKashidaWidth::IArrayKashidaWidth() + :fArrayKashidaWidth(0) +{ +} + +IArrayKashidaWidth::IArrayKashidaWidth(ArrayKashidaWidthRef arraykashidawidth) + :fArrayKashidaWidth(arraykashidawidth) +{ +} + +IArrayKashidaWidth::IArrayKashidaWidth(const IArrayKashidaWidth& src) + :fArrayKashidaWidth(src.fArrayKashidaWidth) +{ + sArrayKashidaWidth->AddRef(fArrayKashidaWidth); +} + +IArrayKashidaWidth::~IArrayKashidaWidth() +{ + sArrayKashidaWidth->Release(fArrayKashidaWidth); +} + +IArrayKashidaWidth& IArrayKashidaWidth::operator=(const IArrayKashidaWidth& rhs) +{ + if (&rhs != this) + { + sArrayKashidaWidth->Release(fArrayKashidaWidth); + fArrayKashidaWidth = rhs.fArrayKashidaWidth; + sArrayKashidaWidth->AddRef(fArrayKashidaWidth); + } + return *this; +} + +bool IArrayKashidaWidth::operator==(const IArrayKashidaWidth& rhs) const +{ + return fArrayKashidaWidth == rhs.fArrayKashidaWidth; +} + +bool IArrayKashidaWidth::operator!=(const IArrayKashidaWidth& rhs) const +{ + return !(*this == rhs); +} + +ArrayKashidaWidthRef IArrayKashidaWidth::GetRef() const +{ + return fArrayKashidaWidth; +} + +bool IArrayKashidaWidth::IsNull() const +{ + return sArrayKashidaWidth->IsNull(fArrayKashidaWidth); +} + +ATETextDOM::Int32 IArrayKashidaWidth::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayKashidaWidth->GetSize(fArrayKashidaWidth, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +KashidaWidth IArrayKashidaWidth::GetFirst( ) const +{ + KashidaWidth ret; + ATEErr error = sArrayKashidaWidth->GetFirst(fArrayKashidaWidth, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +KashidaWidth IArrayKashidaWidth::GetLast( ) const +{ + KashidaWidth ret; + ATEErr error = sArrayKashidaWidth->GetLast(fArrayKashidaWidth, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +KashidaWidth IArrayKashidaWidth::Item( ATETextDOM::Int32 index) const +{ + KashidaWidth ret; + ATEErr error = sArrayKashidaWidth->Item(fArrayKashidaWidth, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayKashidas-- +////////////////////////////////////////////// + +IArrayKashidas::IArrayKashidas() +:fArrayKashidas(0) +{ +} + +IArrayKashidas::IArrayKashidas(ArrayKashidasRef arraykashidas) +:fArrayKashidas(arraykashidas) +{ +} + +IArrayKashidas::IArrayKashidas(const IArrayKashidas& src) +:fArrayKashidas(src.fArrayKashidas) +{ + sArrayKashidas->AddRef(fArrayKashidas); +} + +IArrayKashidas::~IArrayKashidas() +{ + sArrayKashidas->Release(fArrayKashidas); +} + +IArrayKashidas& IArrayKashidas::operator=(const IArrayKashidas& rhs) +{ + if (&rhs != this) + { + sArrayKashidas->Release(fArrayKashidas); + fArrayKashidas = rhs.fArrayKashidas; + sArrayKashidas->AddRef(fArrayKashidas); + } + return *this; +} + +bool IArrayKashidas::operator==(const IArrayKashidas& rhs) const +{ + return fArrayKashidas == rhs.fArrayKashidas; +} + +bool IArrayKashidas::operator!=(const IArrayKashidas& rhs) const +{ + return !(*this == rhs); +} + +ArrayKashidasRef IArrayKashidas::GetRef() const +{ + return fArrayKashidas; +} + +bool IArrayKashidas::IsNull() const +{ + return sArrayKashidas->IsNull(fArrayKashidas); +} + +ATETextDOM::Int32 IArrayKashidas::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayKashidas->GetSize(fArrayKashidas, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +Kashidas IArrayKashidas::GetFirst( ) const +{ + Kashidas ret; + ATEErr error = sArrayKashidas->GetFirst(fArrayKashidas, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +Kashidas IArrayKashidas::GetLast( ) const +{ + Kashidas ret; + ATEErr error = sArrayKashidas->GetLast(fArrayKashidas, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +Kashidas IArrayKashidas::Item( ATETextDOM::Int32 index) const +{ + Kashidas ret; + ATEErr error = sArrayKashidas->Item(fArrayKashidas, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayDirOverride-- +////////////////////////////////////////////// + +IArrayDirOverride::IArrayDirOverride() +:fArrayDirOverride(0) +{ +} + +IArrayDirOverride::IArrayDirOverride(ArrayDirOverrideRef arraydiroverride) +:fArrayDirOverride(arraydiroverride) +{ +} + +IArrayDirOverride::IArrayDirOverride(const IArrayDirOverride& src) +:fArrayDirOverride(src.fArrayDirOverride) +{ + sArrayDirOverride->AddRef(fArrayDirOverride); +} + +IArrayDirOverride::~IArrayDirOverride() +{ + sArrayDirOverride->Release(fArrayDirOverride); +} + +IArrayDirOverride& IArrayDirOverride::operator=(const IArrayDirOverride& rhs) +{ + if (&rhs != this) + { + sArrayDirOverride->Release(fArrayDirOverride); + fArrayDirOverride = rhs.fArrayDirOverride; + sArrayDirOverride->AddRef(fArrayDirOverride); + } + return *this; +} + +bool IArrayDirOverride::operator==(const IArrayDirOverride& rhs) const +{ + return fArrayDirOverride == rhs.fArrayDirOverride; +} + +bool IArrayDirOverride::operator!=(const IArrayDirOverride& rhs) const +{ + return !(*this == rhs); +} + +ArrayDirOverrideRef IArrayDirOverride::GetRef() const +{ + return fArrayDirOverride; +} + +bool IArrayDirOverride::IsNull() const +{ + return sArrayDirOverride->IsNull(fArrayDirOverride); +} + +ATETextDOM::Int32 IArrayDirOverride::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayDirOverride->GetSize(fArrayDirOverride, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DirOverride IArrayDirOverride::GetFirst( ) const +{ + DirOverride ret; + ATEErr error = sArrayDirOverride->GetFirst(fArrayDirOverride, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DirOverride IArrayDirOverride::GetLast( ) const +{ + DirOverride ret; + ATEErr error = sArrayDirOverride->GetLast(fArrayDirOverride, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DirOverride IArrayDirOverride::Item( ATETextDOM::Int32 index) const +{ + DirOverride ret; + ATEErr error = sArrayDirOverride->Item(fArrayDirOverride, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayDigitSet-- +////////////////////////////////////////////// + +IArrayDigitSet::IArrayDigitSet() +:fArrayDigitSet(0) +{ +} + +IArrayDigitSet::IArrayDigitSet(ArrayDigitSetRef arraydigitset) +:fArrayDigitSet(arraydigitset) +{ +} + +IArrayDigitSet::IArrayDigitSet(const IArrayDigitSet& src) +:fArrayDigitSet(src.fArrayDigitSet) +{ + sArrayDigitSet->AddRef(fArrayDigitSet); +} + +IArrayDigitSet::~IArrayDigitSet() +{ + sArrayDigitSet->Release(fArrayDigitSet); +} + +IArrayDigitSet& IArrayDigitSet::operator=(const IArrayDigitSet& rhs) +{ + if (&rhs != this) + { + sArrayDigitSet->Release(fArrayDigitSet); + fArrayDigitSet = rhs.fArrayDigitSet; + sArrayDigitSet->AddRef(fArrayDigitSet); + } + return *this; +} + +bool IArrayDigitSet::operator==(const IArrayDigitSet& rhs) const +{ + return fArrayDigitSet == rhs.fArrayDigitSet; +} + +bool IArrayDigitSet::operator!=(const IArrayDigitSet& rhs) const +{ + return !(*this == rhs); +} + +ArrayDigitSetRef IArrayDigitSet::GetRef() const +{ + return fArrayDigitSet; +} + +bool IArrayDigitSet::IsNull() const +{ + return sArrayDigitSet->IsNull(fArrayDigitSet); +} + +ATETextDOM::Int32 IArrayDigitSet::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayDigitSet->GetSize(fArrayDigitSet, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DigitSet IArrayDigitSet::GetFirst( ) const +{ + DigitSet ret; + ATEErr error = sArrayDigitSet->GetFirst(fArrayDigitSet, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DigitSet IArrayDigitSet::GetLast( ) const +{ + DigitSet ret; + ATEErr error = sArrayDigitSet->GetLast(fArrayDigitSet, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DigitSet IArrayDigitSet::Item( ATETextDOM::Int32 index) const +{ + DigitSet ret; + ATEErr error = sArrayDigitSet->Item(fArrayDigitSet, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IArrayDiacVPos-- +////////////////////////////////////////////// + +IArrayDiacVPos::IArrayDiacVPos() +:fArrayDiacVPos(0) +{ +} + +IArrayDiacVPos::IArrayDiacVPos(ArrayDiacVPosRef arraydiacvpos) +:fArrayDiacVPos(arraydiacvpos) +{ +} + +IArrayDiacVPos::IArrayDiacVPos(const IArrayDiacVPos& src) +:fArrayDiacVPos(src.fArrayDiacVPos) +{ + sArrayDiacVPos->AddRef(fArrayDiacVPos); +} + +IArrayDiacVPos::~IArrayDiacVPos() +{ + sArrayDiacVPos->Release(fArrayDiacVPos); +} + +IArrayDiacVPos& IArrayDiacVPos::operator=(const IArrayDiacVPos& rhs) +{ + if (&rhs != this) + { + sArrayDiacVPos->Release(fArrayDiacVPos); + fArrayDiacVPos = rhs.fArrayDiacVPos; + sArrayDiacVPos->AddRef(fArrayDiacVPos); + } + return *this; +} + +bool IArrayDiacVPos::operator==(const IArrayDiacVPos& rhs) const +{ + return fArrayDiacVPos == rhs.fArrayDiacVPos; +} + +bool IArrayDiacVPos::operator!=(const IArrayDiacVPos& rhs) const +{ + return !(*this == rhs); +} + +ArrayDiacVPosRef IArrayDiacVPos::GetRef() const +{ + return fArrayDiacVPos; +} + +bool IArrayDiacVPos::IsNull() const +{ + return sArrayDiacVPos->IsNull(fArrayDiacVPos); +} + +ATETextDOM::Int32 IArrayDiacVPos::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayDiacVPos->GetSize(fArrayDiacVPos, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DiacVPos IArrayDiacVPos::GetFirst( ) const +{ + DiacVPos ret; + ATEErr error = sArrayDiacVPos->GetFirst(fArrayDiacVPos, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DiacVPos IArrayDiacVPos::GetLast( ) const +{ + DiacVPos ret; + ATEErr error = sArrayDiacVPos->GetLast(fArrayDiacVPos, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +DiacVPos IArrayDiacVPos::Item( ATETextDOM::Int32 index) const +{ + DiacVPos ret; + ATEErr error = sArrayDiacVPos->Item(fArrayDiacVPos, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} +#endif + +////////////////////////////////////////////// +// --ICharFeatures-- +////////////////////////////////////////////// + +ICharFeatures::ICharFeatures() +:fCharFeatures(0) +{ + ATEErr error = sCharFeatures->Initialize(&fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +ICharFeatures::ICharFeatures(CharFeaturesRef charfeatures) +:fCharFeatures(charfeatures) +{ +} + +ICharFeatures::ICharFeatures(const ICharFeatures& src) +:fCharFeatures(src.fCharFeatures) +{ + sCharFeatures->AddRef(fCharFeatures); +} + +ICharFeatures::~ICharFeatures() +{ + sCharFeatures->Release(fCharFeatures); +} + +ICharFeatures& ICharFeatures::operator=(const ICharFeatures& rhs) +{ + if (&rhs != this) + { + sCharFeatures->Release(fCharFeatures); + fCharFeatures = rhs.fCharFeatures; + sCharFeatures->AddRef(fCharFeatures); + } + return *this; +} + +bool ICharFeatures::operator==(const ICharFeatures& rhs) const +{ + return fCharFeatures == rhs.fCharFeatures; +} + +bool ICharFeatures::operator!=(const ICharFeatures& rhs) const +{ + return !(*this == rhs); +} + +CharFeaturesRef ICharFeatures::GetRef() const +{ + return fCharFeatures; +} + +bool ICharFeatures::IsNull() const +{ + return sCharFeatures->IsNull(fCharFeatures); +} + +ICharFeatures ICharFeatures::Clone( ) const +{ + CharFeaturesRef ret = 0; + ATEErr error = sCharFeatures->Clone(fCharFeatures, &ret); + if(error) Throw_ATE_Exception(error); + return ICharFeatures(ret); +} + +IFont ICharFeatures::GetFont( bool* isAssigned) const +{ + FontRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFont(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return IFont(ret); +} + +ATETextDOM::Real ICharFeatures::GetFontSize( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATEBool8 isAssignedRet; + ATETextDOM::Float tempRet; + ATEErr error = sCharFeatures->GetFontSize(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetHorizontalScale( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATEBool8 isAssignedRet; + ATETextDOM::Float tempRet; + ATEErr error = sCharFeatures->GetHorizontalScale(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetVerticalScale( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATEBool8 isAssignedRet; + ATETextDOM::Float tempRet; + ATEErr error = sCharFeatures->GetVerticalScale(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +bool ICharFeatures::GetAutoLeading( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetAutoLeading(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetLeading( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLeading(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Int32 ICharFeatures::GetTracking( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetTracking(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetBaselineShift( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetBaselineShift(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetCharacterRotation( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetCharacterRotation(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +AutoKernType ICharFeatures::GetAutoKernType( bool* isAssigned) const +{ + AutoKernType ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetAutoKernType(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +FontCapsOption ICharFeatures::GetFontCapsOption( bool* isAssigned) const +{ + FontCapsOption ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFontCapsOption(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +FontBaselineOption ICharFeatures::GetFontBaselineOption( bool* isAssigned) const +{ + FontBaselineOption ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFontBaselineOption(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +FontOpenTypePositionOption ICharFeatures::GetFontOpenTypePositionOption( bool* isAssigned) const +{ + FontOpenTypePositionOption ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFontOpenTypePositionOption(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +StrikethroughPosition ICharFeatures::GetStrikethroughPosition( bool* isAssigned) const +{ + StrikethroughPosition ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStrikethroughPosition(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +UnderlinePosition ICharFeatures::GetUnderlinePosition( bool* isAssigned) const +{ + UnderlinePosition ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetUnderlinePosition(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetUnderlineOffset( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetUnderlineOffset(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +bool ICharFeatures::GetLigature( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLigature(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetDiscretionaryLigatures( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetDiscretionaryLigatures(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetContextualLigatures( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetContextualLigatures(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetAlternateLigatures( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetAlternateLigatures(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetOldStyle( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetOldStyle(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetFractions( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFractions(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetOrdinals( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetOrdinals(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetSwash( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetSwash(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetTitling( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetTitling(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetConnectionForms( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetConnectionForms(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetStylisticAlternates( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStylisticAlternates(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 ICharFeatures::GetStylisticSets(bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStylisticSets(fCharFeatures, &isAssignedRet, &ret); + if (error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetOrnaments( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetOrnaments(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +FigureStyle ICharFeatures::GetFigureStyle( bool* isAssigned) const +{ + FigureStyle ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFigureStyle(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetProportionalMetrics( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetProportionalMetrics(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetKana( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetKana(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetRuby( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetRuby(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetItalics( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetItalics(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +BaselineDirection ICharFeatures::GetBaselineDirection( bool* isAssigned) const +{ + BaselineDirection ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetBaselineDirection(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +Language ICharFeatures::GetLanguage( bool* isAssigned) const +{ + Language ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLanguage(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +JapaneseAlternateFeature ICharFeatures::GetJapaneseAlternateFeature( bool* isAssigned) const +{ + JapaneseAlternateFeature ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetJapaneseAlternateFeature(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetTsume( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetTsume(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +StyleRunAlignment ICharFeatures::GetStyleRunAlignment( bool* isAssigned) const +{ + StyleRunAlignment ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStyleRunAlignment(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetWariChuEnabled( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetWariChuEnabled(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 ICharFeatures::GetWariChuLineCount( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetWariChuLineCount(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 ICharFeatures::GetWariChuLineGap( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetWariChuLineGap(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetWariChuScale( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetWariChuScale(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetWariChuSize( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetWariChuSize(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Int32 ICharFeatures::GetWariChuWidowAmount( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetWariChuWidowAmount(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 ICharFeatures::GetWariChuOrphanAmount( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetWariChuOrphanAmount(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +WariChuJustification ICharFeatures::GetWariChuJustification( bool* isAssigned) const +{ + WariChuJustification ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetWariChuJustification(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 ICharFeatures::GetTCYUpDownAdjustment( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetTCYUpDownAdjustment(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 ICharFeatures::GetTCYLeftRightAdjustment( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetTCYLeftRightAdjustment(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetLeftAki( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLeftAki(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetRightAki( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetRightAki(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +bool ICharFeatures::GetNoBreak( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetNoBreak(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +IApplicationPaint ICharFeatures::GetFillColor( bool* isAssigned) const +{ + ApplicationPaintRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFillColor(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return IApplicationPaint(ret); +} + +IApplicationPaint ICharFeatures::GetStrokeColor( bool* isAssigned) const +{ + ApplicationPaintRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStrokeColor(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return IApplicationPaint(ret); +} + +bool ICharFeatures::GetFill( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFill(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetFillVisible( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFillVisible(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetStroke( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStroke(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + + +bool ICharFeatures::GetStrokeVisible( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStrokeVisible(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetFillFirst( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFillFirst(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetFillOverPrint( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFillOverPrint(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetStrokeOverPrint( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStrokeOverPrint(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +IApplicationPaint ICharFeatures::GetFillBackgroundColor( bool* isAssigned) const +{ + ApplicationPaintRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFillBackgroundColor(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return IApplicationPaint(ret); +} + +bool ICharFeatures::GetFillBackground( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetFillBackground(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +LineCapType ICharFeatures::GetLineCap( bool* isAssigned) const +{ + LineCapType ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLineCap(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +LineJoinType ICharFeatures::GetLineJoin( bool* isAssigned) const +{ + LineJoinType ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLineJoin(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetLineWidth( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLineWidth(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetMiterLimit( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetMiterLimit(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetLineDashOffset( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLineDashOffset(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +IArrayReal ICharFeatures::GetLineDashArray( bool* isAssigned) const +{ + ArrayRealRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetLineDashArray(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return IArrayReal(ret); +} + +#if SLO_COMPLEXSCRIPT +Kashidas ICharFeatures::GetKashidas( bool* isAssigned) const +{ + Kashidas ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetKashidas(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +DirOverride ICharFeatures::GetDirOverride( bool* isAssigned) const +{ + DirOverride ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetDirOverride(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +DigitSet ICharFeatures::GetDigitSet( bool* isAssigned) const +{ + DigitSet ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetDigitSet(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +DiacVPos ICharFeatures::GetDiacVPos( bool* isAssigned) const +{ + DiacVPos ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetDiacVPos(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetDiacXOffset( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetDiacXOffset(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetDiacYOffset( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetDiacYOffset(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +bool ICharFeatures::GetAutoMydfb( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetAutoMydfb(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real ICharFeatures::GetMarkYDistFromBaseline( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetMarkYDistFromBaseline(fCharFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +bool ICharFeatures::GetOverlapSwash( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetOverlapSwash(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetJustificationAlternates( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetJustificationAlternates(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool ICharFeatures::GetStretchedAlternates( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sCharFeatures->GetStretchedAlternates(fCharFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} +#endif + +void ICharFeatures::SetFont( IFont newVal) +{ + ATEErr error = sCharFeatures->SetFont(fCharFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFontSize( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetFontSize(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetHorizontalScale( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetHorizontalScale(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetVerticalScale( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetVerticalScale(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetAutoLeading( bool newVal) +{ + ATEErr error = sCharFeatures->SetAutoLeading(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetLeading( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetLeading(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetTracking( ATETextDOM::Int32 newVal) +{ + ATEErr error = sCharFeatures->SetTracking(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetBaselineShift( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetBaselineShift(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetCharacterRotation( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetCharacterRotation(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetAutoKernType( AutoKernType newVal) +{ + ATEErr error = sCharFeatures->SetAutoKernType(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFontCapsOption( FontCapsOption newVal) +{ + ATEErr error = sCharFeatures->SetFontCapsOption(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFontBaselineOption( FontBaselineOption newVal) +{ + ATEErr error = sCharFeatures->SetFontBaselineOption(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFontOpenTypePositionOption( FontOpenTypePositionOption newVal) +{ + ATEErr error = sCharFeatures->SetFontOpenTypePositionOption(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStrikethroughPosition( StrikethroughPosition newVal) +{ + ATEErr error = sCharFeatures->SetStrikethroughPosition(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetUnderlinePosition( UnderlinePosition newVal) +{ + ATEErr error = sCharFeatures->SetUnderlinePosition(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetUnderlineOffset( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetUnderlineOffset(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetLigature( bool newVal) +{ + ATEErr error = sCharFeatures->SetLigature(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetDiscretionaryLigatures( bool newVal) +{ + ATEErr error = sCharFeatures->SetDiscretionaryLigatures(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetContextualLigatures( bool newVal) +{ + ATEErr error = sCharFeatures->SetContextualLigatures(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetAlternateLigatures( bool newVal) +{ + ATEErr error = sCharFeatures->SetAlternateLigatures(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetOldStyle( bool newVal) +{ + ATEErr error = sCharFeatures->SetOldStyle(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFractions( bool newVal) +{ + ATEErr error = sCharFeatures->SetFractions(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetOrdinals( bool newVal) +{ + ATEErr error = sCharFeatures->SetOrdinals(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetSwash( bool newVal) +{ + ATEErr error = sCharFeatures->SetSwash(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetTitling( bool newVal) +{ + ATEErr error = sCharFeatures->SetTitling(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetConnectionForms( bool newVal) +{ + ATEErr error = sCharFeatures->SetConnectionForms(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStylisticAlternates( bool newVal) +{ + ATEErr error = sCharFeatures->SetStylisticAlternates(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStylisticSets(ATETextDOM::Int32 newVal) +{ + ATEErr error = sCharFeatures->SetStylisticSets(fCharFeatures, newVal); + if (error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetOrnaments( bool newVal) +{ + ATEErr error = sCharFeatures->SetOrnaments(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFigureStyle( FigureStyle newVal) +{ + ATEErr error = sCharFeatures->SetFigureStyle(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetProportionalMetrics( bool newVal) +{ + ATEErr error = sCharFeatures->SetProportionalMetrics(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetKana( bool newVal) +{ + ATEErr error = sCharFeatures->SetKana(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetItalics( bool newVal) +{ + ATEErr error = sCharFeatures->SetItalics(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetRuby( bool newVal) +{ + ATEErr error = sCharFeatures->SetRuby(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetBaselineDirection( BaselineDirection newVal) +{ + ATEErr error = sCharFeatures->SetBaselineDirection(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetLanguage( Language newVal) +{ + ATEErr error = sCharFeatures->SetLanguage(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetJapaneseAlternateFeature( JapaneseAlternateFeature newVal) +{ + ATEErr error = sCharFeatures->SetJapaneseAlternateFeature(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetTsume( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetTsume(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStyleRunAlignment( StyleRunAlignment newVal) +{ + ATEErr error = sCharFeatures->SetStyleRunAlignment(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetWariChuEnabled( bool newVal) +{ + ATEErr error = sCharFeatures->SetWariChuEnabled(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetWariChuLineCount( ATETextDOM::Int32 newVal) +{ + ATEErr error = sCharFeatures->SetWariChuLineCount(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetWariChuLineGap( ATETextDOM::Int32 newVal) +{ + ATEErr error = sCharFeatures->SetWariChuLineGap(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetWariChuScale( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetWariChuScale(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetWariChuSize( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetWariChuSize(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetWariChuWidowAmount( ATETextDOM::Int32 newVal) +{ + ATEErr error = sCharFeatures->SetWariChuWidowAmount(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetWariChuOrphanAmount( ATETextDOM::Int32 newVal) +{ + ATEErr error = sCharFeatures->SetWariChuOrphanAmount(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetWariChuJustification( WariChuJustification newVal) +{ + ATEErr error = sCharFeatures->SetWariChuJustification(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetTCYUpDownAdjustment( ATETextDOM::Int32 newVal) +{ + ATEErr error = sCharFeatures->SetTCYUpDownAdjustment(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetTCYLeftRightAdjustment( ATETextDOM::Int32 newVal) +{ + ATEErr error = sCharFeatures->SetTCYLeftRightAdjustment(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetLeftAki( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetLeftAki(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetRightAki( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetRightAki(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetNoBreak( bool newVal) +{ + ATEErr error = sCharFeatures->SetNoBreak(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFillColor( IApplicationPaint newVal) +{ + ATEErr error = sCharFeatures->SetFillColor(fCharFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStrokeColor( IApplicationPaint newVal) +{ + ATEErr error = sCharFeatures->SetStrokeColor(fCharFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFill( bool newVal) +{ + ATEErr error = sCharFeatures->SetFill(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFillVisible( bool newVal) +{ + ATEErr error = sCharFeatures->SetFillVisible(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStroke( bool newVal) +{ + ATEErr error = sCharFeatures->SetStroke(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStrokeVisible( bool newVal) +{ + ATEErr error = sCharFeatures->SetStrokeVisible(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFillFirst( bool newVal) +{ + ATEErr error = sCharFeatures->SetFillFirst(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFillOverPrint( bool newVal) +{ + ATEErr error = sCharFeatures->SetFillOverPrint(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStrokeOverPrint( bool newVal) +{ + ATEErr error = sCharFeatures->SetStrokeOverPrint(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFillBackgroundColor( IApplicationPaint newVal) +{ + ATEErr error = sCharFeatures->SetFillBackgroundColor(fCharFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetFillBackground( bool newVal) +{ + ATEErr error = sCharFeatures->SetFillBackground(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} +void ICharFeatures::SetLineCap( LineCapType newVal) +{ + ATEErr error = sCharFeatures->SetLineCap(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetLineJoin( LineJoinType newVal) +{ + ATEErr error = sCharFeatures->SetLineJoin(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetLineWidth( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetLineWidth(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetMiterLimit( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetMiterLimit(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetLineDashOffset( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetLineDashOffset(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetLineDashArray( IArrayReal newVal) +{ + ATEErr error = sCharFeatures->SetLineDashArray(fCharFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +#if SLO_COMPLEXSCRIPT +void ICharFeatures::SetKashidas( Kashidas newVal) +{ + ATEErr error = sCharFeatures->SetKashidas(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetDirOverride( DirOverride newVal) +{ + ATEErr error = sCharFeatures->SetDirOverride(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetDigitSet( DigitSet newVal) +{ + ATEErr error = sCharFeatures->SetDigitSet(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetDiacVPos( DiacVPos newVal) +{ + ATEErr error = sCharFeatures->SetDiacVPos(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetDiacXOffset( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetDiacXOffset(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetDiacYOffset( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetDiacYOffset(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetAutoMydfb( bool newVal) +{ + ATEErr error = sCharFeatures->SetAutoMydfb(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetMarkYDistFromBaseline( ATETextDOM::Real newVal) +{ + ATEErr error = sCharFeatures->SetMarkYDistFromBaseline(fCharFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetOverlapSwash( bool newVal) +{ + ATEErr error = sCharFeatures->SetOverlapSwash(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetJustificationAlternates( bool newVal) +{ + ATEErr error = sCharFeatures->SetJustificationAlternates(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::SetStretchedAlternates( bool newVal) +{ + ATEErr error = sCharFeatures->SetStretchedAlternates(fCharFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} +#endif + +void ICharFeatures::ClearFont( ) +{ + ATEErr error = sCharFeatures->ClearFont(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFontSize( ) +{ + ATEErr error = sCharFeatures->ClearFontSize(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearHorizontalScale( ) +{ + ATEErr error = sCharFeatures->ClearHorizontalScale(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearVerticalScale( ) +{ + ATEErr error = sCharFeatures->ClearVerticalScale(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearAutoLeading( ) +{ + ATEErr error = sCharFeatures->ClearAutoLeading(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLeading( ) +{ + ATEErr error = sCharFeatures->ClearLeading(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearTracking( ) +{ + ATEErr error = sCharFeatures->ClearTracking(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearBaselineShift( ) +{ + ATEErr error = sCharFeatures->ClearBaselineShift(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearCharacterRotation( ) +{ + ATEErr error = sCharFeatures->ClearCharacterRotation(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearAutoKernType( ) +{ + ATEErr error = sCharFeatures->ClearAutoKernType(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFontCapsOption( ) +{ + ATEErr error = sCharFeatures->ClearFontCapsOption(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFontBaselineOption( ) +{ + ATEErr error = sCharFeatures->ClearFontBaselineOption(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFontOpenTypePositionOption( ) +{ + ATEErr error = sCharFeatures->ClearFontOpenTypePositionOption(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStrikethroughPosition( ) +{ + ATEErr error = sCharFeatures->ClearStrikethroughPosition(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearUnderlinePosition( ) +{ + ATEErr error = sCharFeatures->ClearUnderlinePosition(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearUnderlineOffset( ) +{ + ATEErr error = sCharFeatures->ClearUnderlineOffset(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLigature( ) +{ + ATEErr error = sCharFeatures->ClearLigature(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearDiscretionaryLigatures( ) +{ + ATEErr error = sCharFeatures->ClearDiscretionaryLigatures(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearContextualLigatures( ) +{ + ATEErr error = sCharFeatures->ClearContextualLigatures(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearAlternateLigatures( ) +{ + ATEErr error = sCharFeatures->ClearAlternateLigatures(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearOldStyle( ) +{ + ATEErr error = sCharFeatures->ClearOldStyle(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFractions( ) +{ + ATEErr error = sCharFeatures->ClearFractions(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearOrdinals( ) +{ + ATEErr error = sCharFeatures->ClearOrdinals(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearSwash( ) +{ + ATEErr error = sCharFeatures->ClearSwash(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearTitling( ) +{ + ATEErr error = sCharFeatures->ClearTitling(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearConnectionForms( ) +{ + ATEErr error = sCharFeatures->ClearConnectionForms(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStylisticAlternates( ) +{ + ATEErr error = sCharFeatures->ClearStylisticAlternates(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStylisticSets() +{ + ATEErr error = sCharFeatures->ClearStylisticSets(fCharFeatures); + if (error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearOrnaments( ) +{ + ATEErr error = sCharFeatures->ClearOrnaments(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFigureStyle( ) +{ + ATEErr error = sCharFeatures->ClearFigureStyle(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearProportionalMetrics( ) +{ + ATEErr error = sCharFeatures->ClearProportionalMetrics(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearKana( ) +{ + ATEErr error = sCharFeatures->ClearKana(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearItalics( ) +{ + ATEErr error = sCharFeatures->ClearItalics(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearRuby( ) +{ + ATEErr error = sCharFeatures->ClearRuby(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearBaselineDirection( ) +{ + ATEErr error = sCharFeatures->ClearBaselineDirection(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLanguage( ) +{ + ATEErr error = sCharFeatures->ClearLanguage(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearJapaneseAlternateFeature( ) +{ + ATEErr error = sCharFeatures->ClearJapaneseAlternateFeature(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearTsume( ) +{ + ATEErr error = sCharFeatures->ClearTsume(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStyleRunAlignment( ) +{ + ATEErr error = sCharFeatures->ClearStyleRunAlignment(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearWariChuEnabled( ) +{ + ATEErr error = sCharFeatures->ClearWariChuEnabled(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearWariChuLineCount( ) +{ + ATEErr error = sCharFeatures->ClearWariChuLineCount(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearWariChuLineGap( ) +{ + ATEErr error = sCharFeatures->ClearWariChuLineGap(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearWariChuSubLineAmount( ) +{ + ATEErr error = sCharFeatures->ClearWariChuSubLineAmount(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearWariChuWidowAmount( ) +{ + ATEErr error = sCharFeatures->ClearWariChuWidowAmount(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearWariChuOrphanAmount( ) +{ + ATEErr error = sCharFeatures->ClearWariChuOrphanAmount(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearWariChuJustification( ) +{ + ATEErr error = sCharFeatures->ClearWariChuJustification(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearTCYUpDownAdjustment( ) +{ + ATEErr error = sCharFeatures->ClearTCYUpDownAdjustment(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearTCYLeftRightAdjustment( ) +{ + ATEErr error = sCharFeatures->ClearTCYLeftRightAdjustment(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLeftAki( ) +{ + ATEErr error = sCharFeatures->ClearLeftAki(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearRightAki( ) +{ + ATEErr error = sCharFeatures->ClearRightAki(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearNoBreak( ) +{ + ATEErr error = sCharFeatures->ClearNoBreak(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFillColor( ) +{ + ATEErr error = sCharFeatures->ClearFillColor(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStrokeColor( ) +{ + ATEErr error = sCharFeatures->ClearStrokeColor(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFill( ) +{ + ATEErr error = sCharFeatures->ClearFill(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFillVisible( ) +{ + ATEErr error = sCharFeatures->ClearFillVisible(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStroke( ) +{ + ATEErr error = sCharFeatures->ClearStroke(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStrokeVisible( ) +{ + ATEErr error = sCharFeatures->ClearStrokeVisible(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFillFirst( ) +{ + ATEErr error = sCharFeatures->ClearFillFirst(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFillOverPrint( ) +{ + ATEErr error = sCharFeatures->ClearFillOverPrint(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStrokeOverPrint( ) +{ + ATEErr error = sCharFeatures->ClearStrokeOverPrint(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFillBackgroundColor( ) +{ + ATEErr error = sCharFeatures->ClearFillBackgroundColor(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearFillBackground( ) +{ + ATEErr error = sCharFeatures->ClearFillBackground(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLineCap( ) +{ + ATEErr error = sCharFeatures->ClearLineCap(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLineJoin( ) +{ + ATEErr error = sCharFeatures->ClearLineJoin(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLineWidth( ) +{ + ATEErr error = sCharFeatures->ClearLineWidth(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearMiterLimit( ) +{ + ATEErr error = sCharFeatures->ClearMiterLimit(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLineDashOffset( ) +{ + ATEErr error = sCharFeatures->ClearLineDashOffset(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearLineDashArray( ) +{ + ATEErr error = sCharFeatures->ClearLineDashArray(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +#if SLO_COMPLEXSCRIPT +void ICharFeatures::ClearKashidas( ) +{ + ATEErr error = sCharFeatures->ClearKashidas(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearDirOverride( ) +{ + ATEErr error = sCharFeatures->ClearDirOverride(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearDigitSet( ) +{ + ATEErr error = sCharFeatures->ClearDigitSet(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearDiacVPos( ) +{ + ATEErr error = sCharFeatures->ClearDiacVPos(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearDiacXOffset( ) +{ + ATEErr error = sCharFeatures->ClearDiacXOffset(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearDiacYOffset( ) +{ + ATEErr error = sCharFeatures->ClearDiacYOffset(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearAutoMydfb( ) +{ + ATEErr error = sCharFeatures->ClearAutoMydfb(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearMarkYDistFromBaseline( ) +{ + ATEErr error = sCharFeatures->ClearMarkYDistFromBaseline(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearOverlapSwash( ) +{ + ATEErr error = sCharFeatures->ClearOverlapSwash(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearJustificationAlternates( ) +{ + ATEErr error = sCharFeatures->ClearJustificationAlternates(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} + +void ICharFeatures::ClearStretchedAlternates( ) +{ + ATEErr error = sCharFeatures->ClearStretchedAlternates(fCharFeatures); + if(error) Throw_ATE_Exception(error); +} +#endif + +bool ICharFeatures::IntersectFeatures( ICharFeatures rhs) +{ + ATEBool8 ret; + ATEErr error = sCharFeatures->IntersectFeatures(fCharFeatures, rhs.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharFeatures::ReplaceOrAddFeatures( ICharFeatures rhs) +{ + ATEBool8 ret; + ATEErr error = sCharFeatures->ReplaceOrAddFeatures(fCharFeatures, rhs.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharFeatures::UnassignEachIfEqual( ICharFeatures rhs) +{ + ATEBool8 ret; + ATEErr error = sCharFeatures->UnassignEachIfEqual(fCharFeatures, rhs.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharFeatures::IsEachNotAssigned( ) const +{ + ATEBool8 ret; + ATEErr error = sCharFeatures->IsEachNotAssigned(fCharFeatures, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharFeatures::IsEachAssigned( ) const +{ + ATEBool8 ret; + ATEErr error = sCharFeatures->IsEachAssigned(fCharFeatures, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --ICharInspector-- +////////////////////////////////////////////// + +ICharInspector::ICharInspector() +:fCharInspector(0) +{ + ATEErr error = sCharInspector->Initialize(&fCharInspector); + if(error) Throw_ATE_Exception(error); +} + +ICharInspector::ICharInspector(CharInspectorRef charinspector) +:fCharInspector(charinspector) +{ +} + +ICharInspector::ICharInspector(const ICharInspector& src) +:fCharInspector(src.fCharInspector) +{ + sCharInspector->AddRef(fCharInspector); +} + +ICharInspector::~ICharInspector() +{ + sCharInspector->Release(fCharInspector); +} + +ICharInspector& ICharInspector::operator=(const ICharInspector& rhs) +{ + if (&rhs != this) + { + sCharInspector->Release(fCharInspector); + fCharInspector = rhs.fCharInspector; + sCharInspector->AddRef(fCharInspector); + } + return *this; +} + +bool ICharInspector::operator==(const ICharInspector& rhs) const +{ + return fCharInspector == rhs.fCharInspector; +} + +bool ICharInspector::operator!=(const ICharInspector& rhs) const +{ + return !(*this == rhs); +} + +CharInspectorRef ICharInspector::GetRef() const +{ + return fCharInspector; +} + +bool ICharInspector::IsNull() const +{ + return sCharInspector->IsNull(fCharInspector); +} + +IArrayFontRef ICharInspector::GetFont( ) const +{ + ArrayFontRefRef ret = 0; + ATEErr error = sCharInspector->GetFont(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayFontRef(ret); +} + +IArrayReal ICharInspector::GetFontSize( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetFontSize(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal ICharInspector::GetHorizontalScale( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetHorizontalScale(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal ICharInspector::GetVerticalScale( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetVerticalScale(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayBool ICharInspector::GetSyntheticBold( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetSyntheticBold(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetSyntheticItalic( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetSyntheticItalic(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetAutoLeading( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetAutoLeading(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayReal ICharInspector::GetLeading( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetLeading(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayInteger ICharInspector::GetTracking( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sCharInspector->GetTracking(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayReal ICharInspector::GetBaselineShift( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetBaselineShift(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal ICharInspector::GetCharacterRotation( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetCharacterRotation(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayFontCapsOption ICharInspector::GetFontCapsOption( ) const +{ + ArrayFontCapsOptionRef ret = 0; + ATEErr error = sCharInspector->GetFontCapsOption(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayFontCapsOption(ret); +} + +IArrayFontBaselineOption ICharInspector::GetFontBaselineOption( ) const +{ + ArrayFontBaselineOptionRef ret = 0; + ATEErr error = sCharInspector->GetFontBaselineOption(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayFontBaselineOption(ret); +} + +IArrayFontOpenTypePositionOption ICharInspector::GetFontOpenTypePositionOption( ) const +{ + ArrayFontOpenTypePositionOptionRef ret = 0; + ATEErr error = sCharInspector->GetFontOpenTypePositionOption(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayFontOpenTypePositionOption(ret); +} + +IArrayStrikethroughPosition ICharInspector::GetStrikethroughPosition( ) const +{ + ArrayStrikethroughPositionRef ret = 0; + ATEErr error = sCharInspector->GetStrikethroughPosition(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayStrikethroughPosition(ret); +} + +IArrayUnderlinePosition ICharInspector::GetUnderlinePosition( ) const +{ + ArrayUnderlinePositionRef ret = 0; + ATEErr error = sCharInspector->GetUnderlinePosition(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayUnderlinePosition(ret); +} + +IArrayReal ICharInspector::GetUnderlineOffset( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetUnderlineOffset(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayBool ICharInspector::GetLigature( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetLigature(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetDiscretionaryLigatures( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetDiscretionaryLigatures(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetContextualLigatures( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetContextualLigatures(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetAlternateLigatures( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetAlternateLigatures(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetOldStyle( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetOldStyle(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetFractions( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetFractions(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetOrdinals( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetOrdinals(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetSwash( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetSwash(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetTitling( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetTitling(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetConnectionForms( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetConnectionForms(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetStylisticAlternates( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetStylisticAlternates(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayInteger ICharInspector::GetStylisticSets() const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sCharInspector->GetStylisticSets(fCharInspector, &ret); + if (error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayBool ICharInspector::GetOrnaments( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetOrnaments(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayFigureStyle ICharInspector::GetFigureStyle( ) const +{ + ArrayFigureStyleRef ret = 0; + ATEErr error = sCharInspector->GetFigureStyle(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayFigureStyle(ret); +} + +IArrayBool ICharInspector::GetProportionalMetrics( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetProportionalMetrics(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetKana( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetKana(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetItalics( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetItalics(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetRuby( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetRuby(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBaselineDirection ICharInspector::GetBaselineDirection( ) const +{ + ArrayBaselineDirectionRef ret = 0; + ATEErr error = sCharInspector->GetBaselineDirection(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBaselineDirection(ret); +} + +IArrayLanguage ICharInspector::GetLanguage( ) const +{ + ArrayLanguageRef ret = 0; + ATEErr error = sCharInspector->GetLanguage(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayLanguage(ret); +} + +IArrayReal ICharInspector::GetTsume( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetTsume(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayStyleRunAlignment ICharInspector::GetStyleRunAlignment( ) const +{ + ArrayStyleRunAlignmentRef ret = 0; + ATEErr error = sCharInspector->GetStyleRunAlignment(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayStyleRunAlignment(ret); +} + +IArrayInteger ICharInspector::GetWariChuLineCount( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sCharInspector->GetWariChuLineCount(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayInteger ICharInspector::GetWariChuLineGap( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sCharInspector->GetWariChuLineGap(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayReal ICharInspector::GetWariChuScale( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetWariChuScale(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal ICharInspector::GetWariChuSize( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetWariChuSize(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayInteger ICharInspector::GetWariChuWidowAmount( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sCharInspector->GetWariChuWidowAmount(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayInteger ICharInspector::GetWariChuOrphanAmount( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sCharInspector->GetWariChuOrphanAmount(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayWariChuJustification ICharInspector::GetWariChuJustification( ) const +{ + ArrayWariChuJustificationRef ret = 0; + ATEErr error = sCharInspector->GetWariChuJustification(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayWariChuJustification(ret); +} + +IArrayBool ICharInspector::GetWariChuEnabled( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetWariChuEnabled(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayInteger ICharInspector::GetTCYUpDownAdjustment( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sCharInspector->GetTCYUpDownAdjustment(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayInteger ICharInspector::GetTCYLeftRightAdjustment( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sCharInspector->GetTCYLeftRightAdjustment(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayReal ICharInspector::GetLeftAki( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetLeftAki(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal ICharInspector::GetRightAki( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetRightAki(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayBool ICharInspector::GetNoBreak( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetNoBreak(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayApplicationPaintRef ICharInspector::GetFillColor( ) const +{ + ArrayApplicationPaintRefRef ret = 0; + ATEErr error = sCharInspector->GetFillColor(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayApplicationPaintRef(ret); +} + +IArrayApplicationPaintRef ICharInspector::GetStrokeColor( ) const +{ + ArrayApplicationPaintRefRef ret = 0; + ATEErr error = sCharInspector->GetStrokeColor(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayApplicationPaintRef(ret); +} + +IArrayBool ICharInspector::GetFill( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetFill(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetFillVisible( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetFillVisible(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetStroke( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetStroke(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetStrokeVisible( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetStrokeVisible(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetFillFirst( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetFillFirst(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetFillOverPrint( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetFillOverPrint(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetStrokeOverPrint( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetStrokeOverPrint(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayApplicationPaintRef ICharInspector::GetFillBackgroundColor( ) const +{ + ArrayApplicationPaintRefRef ret = 0; + ATEErr error = sCharInspector->GetFillBackgroundColor(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayApplicationPaintRef(ret); +} + +IArrayBool ICharInspector::GetFillBackground( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetFillBackground(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayLineCapType ICharInspector::GetLineCap( ) const +{ + ArrayLineCapTypeRef ret = 0; + ATEErr error = sCharInspector->GetLineCap(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayLineCapType(ret); +} + +IArrayLineJoinType ICharInspector::GetLineJoin( ) const +{ + ArrayLineJoinTypeRef ret = 0; + ATEErr error = sCharInspector->GetLineJoin(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayLineJoinType(ret); +} + +IArrayReal ICharInspector::GetLineWidth( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetLineWidth(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal ICharInspector::GetMiterLimit( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetMiterLimit(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal ICharInspector::GetLineDashOffset( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetLineDashOffset(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayArrayReal ICharInspector::GetLineDashArray( ) const +{ + ArrayArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetLineDashArray(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayArrayReal(ret); +} + +#if SLO_COMPLEXSCRIPT +IArrayKashidas ICharInspector::GetKashidas( ) const +{ + ArrayKashidasRef ret = 0; + ATEErr error = sCharInspector->GetKashidas(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayKashidas(ret); +} + +IArrayDirOverride ICharInspector::GetDirOverride( ) const +{ + ArrayDirOverrideRef ret = 0; + ATEErr error = sCharInspector->GetDirOverride(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayDirOverride(ret); +} + +IArrayDigitSet ICharInspector::GetDigitSet( ) const +{ + ArrayDigitSetRef ret = 0; + ATEErr error = sCharInspector->GetDigitSet(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayDigitSet(ret); +} + +IArrayDiacVPos ICharInspector::GetDiacVPos( ) const +{ + ArrayDiacVPosRef ret = 0; + ATEErr error = sCharInspector->GetDiacVPos(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayDiacVPos(ret); +} + +IArrayReal ICharInspector::GetDiacXOffset( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetDiacXOffset(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal ICharInspector::GetDiacYOffset( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetDiacYOffset(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayBool ICharInspector::GetAutoMydfb( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetAutoMydfb(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayReal ICharInspector::GetMarkYDistFromBaseline( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sCharInspector->GetMarkYDistFromBaseline(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayBool ICharInspector::GetOverlapSwash( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetOverlapSwash(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetJustificationAlternates( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetJustificationAlternates(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBool ICharInspector::GetStretchedAlternates( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sCharInspector->GetStretchedAlternates(fCharInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} +#endif + +////////////////////////////////////////////// +// --ICharStyle-- +////////////////////////////////////////////// + +ICharStyle::ICharStyle() +:fCharStyle(0) +{ +} + +ICharStyle::ICharStyle(CharStyleRef charstyle) +:fCharStyle(charstyle) +{ +} + +ICharStyle::ICharStyle(const ICharStyle& src) +:fCharStyle(src.fCharStyle) +{ + sCharStyle->AddRef(fCharStyle); +} + +ICharStyle::~ICharStyle() +{ + sCharStyle->Release(fCharStyle); +} + +ICharStyle& ICharStyle::operator=(const ICharStyle& rhs) +{ + if (&rhs != this) + { + sCharStyle->Release(fCharStyle); + fCharStyle = rhs.fCharStyle; + sCharStyle->AddRef(fCharStyle); + } + return *this; +} + +bool ICharStyle::operator==(const ICharStyle& rhs) const +{ + ATEBool8 ret = false; + ATEErr error = sCharStyle->IsEqual(fCharStyle, rhs.fCharStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharStyle::operator!=(const ICharStyle& rhs) const +{ + return !(*this == rhs); +} + +CharStyleRef ICharStyle::GetRef() const +{ + return fCharStyle; +} + +bool ICharStyle::IsNull() const +{ + return sCharStyle->IsNull(fCharStyle); +} + +ATETextDOM::Int32 ICharStyle::GetName( ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCharStyle->GetName(fCharStyle, pName, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharStyle::SetName( const ATETextDOM::Unicode* pName) +{ + ATEBool8 ret; + ATEErr error = sCharStyle->SetName(fCharStyle, pName, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICharStyle ICharStyle::GetParent( ) const +{ + CharStyleRef ret = 0; + ATEErr error = sCharStyle->GetParent(fCharStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyle(ret); +} + +bool ICharStyle::SetParent( const ICharStyle pStyle) +{ + ATEBool8 ret; + ATEErr error = sCharStyle->SetParent(fCharStyle, pStyle.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharStyle::HasParent( ) const +{ + ATEBool8 ret; + ATEErr error = sCharStyle->HasParent(fCharStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICharFeatures ICharStyle::GetFeatures( ) const +{ + CharFeaturesRef ret = 0; + ATEErr error = sCharStyle->GetFeatures(fCharStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ICharFeatures(ret); +} + +void ICharStyle::SetFeatures( ICharFeatures pFeatures) +{ + ATEErr error = sCharStyle->SetFeatures(fCharStyle, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ICharStyle::ReplaceOrAddFeatures( ICharFeatures pFeatures) +{ + ATEErr error = sCharStyle->ReplaceOrAddFeatures(fCharStyle, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --ICharStyles-- +////////////////////////////////////////////// + +ICharStyles::ICharStyles() +:fCharStyles(0) +{ +} + +ICharStyles::ICharStyles(CharStylesRef charstyles) +:fCharStyles(charstyles) +{ +} + +ICharStyles::ICharStyles(const ICharStyles& src) +:fCharStyles(src.fCharStyles) +{ + sCharStyles->AddRef(fCharStyles); +} + +ICharStyles::~ICharStyles() +{ + sCharStyles->Release(fCharStyles); +} + +ICharStyles& ICharStyles::operator=(const ICharStyles& rhs) +{ + if (&rhs != this) + { + sCharStyles->Release(fCharStyles); + fCharStyles = rhs.fCharStyles; + sCharStyles->AddRef(fCharStyles); + } + return *this; +} + +bool ICharStyles::operator==(const ICharStyles& rhs) const +{ + return fCharStyles == rhs.fCharStyles; +} + +bool ICharStyles::operator!=(const ICharStyles& rhs) const +{ + return !(*this == rhs); +} + +CharStylesRef ICharStyles::GetRef() const +{ + return fCharStyles; +} + +bool ICharStyles::IsNull() const +{ + return sCharStyles->IsNull(fCharStyles); +} + +bool ICharStyles::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sCharStyles->IsEmpty(fCharStyles, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ICharStyles::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sCharStyles->GetSize(fCharStyles, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ICharStyles::ShowAllStyles( ) const +{ + ATEErr error = sCharStyles->ShowAllStyles(fCharStyles); + if(error) Throw_ATE_Exception(error); +} + +void ICharStyles::ShowOnlyUnreferencedStyles( ) const +{ + ATEErr error = sCharStyles->ShowOnlyUnreferencedStyles(fCharStyles); + if(error) Throw_ATE_Exception(error); +} + +void ICharStyles::ShowOnlyStylesReferencedIn( ITextRange pRange) const +{ + ATEErr error = sCharStyles->ShowOnlyStylesReferencedIn(fCharStyles, pRange.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ICharStyles::MoveStyleTo( ICharStyle pStyle, ATETextDOM::Int32 position) +{ + ATEErr error = sCharStyles->MoveStyleTo(fCharStyles, pStyle.GetRef(), position); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --ICharStylesIterator-- +////////////////////////////////////////////// + +ICharStylesIterator::ICharStylesIterator() +:fCharStylesIterator(0) +{ +} + +ICharStylesIterator::ICharStylesIterator(CharStylesIteratorRef charstylesiterator) +:fCharStylesIterator(charstylesiterator) +{ +} + +ICharStylesIterator::ICharStylesIterator(const ICharStylesIterator& src) +:fCharStylesIterator(src.fCharStylesIterator) +{ + sCharStylesIterator->AddRef(fCharStylesIterator); +} + +ICharStylesIterator::~ICharStylesIterator() +{ + sCharStylesIterator->Release(fCharStylesIterator); +} + +ICharStylesIterator& ICharStylesIterator::operator=(const ICharStylesIterator& rhs) +{ + if (&rhs != this) + { + sCharStylesIterator->Release(fCharStylesIterator); + fCharStylesIterator = rhs.fCharStylesIterator; + sCharStylesIterator->AddRef(fCharStylesIterator); + } + return *this; +} + +bool ICharStylesIterator::operator==(const ICharStylesIterator& rhs) const +{ + return fCharStylesIterator == rhs.fCharStylesIterator; +} + +bool ICharStylesIterator::operator!=(const ICharStylesIterator& rhs) const +{ + return !(*this == rhs); +} + +CharStylesIteratorRef ICharStylesIterator::GetRef() const +{ + return fCharStylesIterator; +} + +bool ICharStylesIterator::IsNull() const +{ + return sCharStylesIterator->IsNull(fCharStylesIterator); +} + +ICharStylesIterator::ICharStylesIterator( ICharStyles pStyles, Direction direction) +{ + ATEErr error = sCharStylesIterator->Initialize(pStyles.GetRef(), direction, &fCharStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +bool ICharStylesIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sCharStylesIterator->IsNotDone(fCharStylesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharStylesIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sCharStylesIterator->IsDone(fCharStylesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ICharStylesIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sCharStylesIterator->IsEmpty(fCharStylesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ICharStylesIterator::MoveToFirst( ) +{ + ATEErr error = sCharStylesIterator->MoveToFirst(fCharStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +void ICharStylesIterator::MoveToLast( ) +{ + ATEErr error = sCharStylesIterator->MoveToLast(fCharStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +void ICharStylesIterator::Next( ) +{ + ATEErr error = sCharStylesIterator->Next(fCharStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +void ICharStylesIterator::Previous( ) +{ + ATEErr error = sCharStylesIterator->Previous(fCharStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +ICharStyle ICharStylesIterator::Item( ) const +{ + CharStyleRef ret = 0; + ATEErr error = sCharStylesIterator->Item(fCharStylesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyle(ret); +} + +////////////////////////////////////////////// +// --IFind-- +////////////////////////////////////////////// + +IFind::IFind() +:fFind(0) +{ +} + +IFind::IFind(FindRef find) +:fFind(find) +{ +} + +IFind::IFind(const IFind& src) +:fFind(src.fFind) +{ + sFind->AddRef(fFind); +} + +IFind::~IFind() +{ + sFind->Release(fFind); +} + +IFind& IFind::operator=(const IFind& rhs) +{ + if (&rhs != this) + { + sFind->Release(fFind); + fFind = rhs.fFind; + sFind->AddRef(fFind); + } + return *this; +} + +bool IFind::operator==(const IFind& rhs) const +{ + return fFind == rhs.fFind; +} + +bool IFind::operator!=(const IFind& rhs) const +{ + return !(*this == rhs); +} + +FindRef IFind::GetRef() const +{ + return fFind; +} + +bool IFind::IsNull() const +{ + return sFind->IsNull(fFind); +} + +Direction IFind::GetSearchDirection( ) const +{ + Direction ret; + ATEErr error = sFind->GetSearchDirection(fFind, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFind::GetIgnoreCase( ) const +{ + ATEBool8 ret; + ATEErr error = sFind->GetIgnoreCase(fFind, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFind::GetWholeWord( ) const +{ + ATEBool8 ret; + ATEErr error = sFind->GetWholeWord(fFind, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFind::GetWrap( ) const +{ + ATEBool8 ret; + ATEErr error = sFind->GetWrap(fFind, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFind::GetFindWordsOutOfBounds( ) const +{ + ATEBool8 ret; + ATEErr error = sFind->GetFindWordsOutOfBounds(fFind, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +#if SLO_COMPLEXSCRIPT +bool IFind::GetIgnoreAccents( ) const +{ + ATEBool8 ret; + ATEErr error = sFind->GetIgnoreAccents(fFind, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFind::GetIgnoreKashidas( ) const +{ + ATEBool8 ret; + ATEErr error = sFind->GetIgnoreKashidas(fFind, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} +#endif + +void IFind::SetSearchDirection( Direction newValue) +{ + ATEErr error = sFind->SetSearchDirection(fFind, newValue); + if(error) Throw_ATE_Exception(error); +} + +void IFind::SetIgnoreCase( bool newValue) +{ + ATEErr error = sFind->SetIgnoreCase(fFind, newValue); + if(error) Throw_ATE_Exception(error); +} + +void IFind::SetWholeWord( bool newValue) +{ + ATEErr error = sFind->SetWholeWord(fFind, newValue); + if(error) Throw_ATE_Exception(error); +} + +void IFind::SetWrap( bool newValue) +{ + ATEErr error = sFind->SetWrap(fFind, newValue); + if(error) Throw_ATE_Exception(error); +} + +void IFind::SetFindWordsOutOfBounds( bool newValue) +{ + ATEErr error = sFind->SetFindWordsOutOfBounds(fFind, newValue); + if(error) Throw_ATE_Exception(error); +} + +#if SLO_COMPLEXSCRIPT +void IFind::SetIgnoreAccents( bool newValue) +{ + ATEErr error = sFind->SetIgnoreAccents(fFind, newValue); + if(error) Throw_ATE_Exception(error); +} + +void IFind::SetIgnoreKashidas( bool newValue) +{ + ATEErr error = sFind->SetIgnoreKashidas(fFind, newValue); + if(error) Throw_ATE_Exception(error); +} +#endif + +SearchScope IFind::GetSearchScope( ) const +{ + SearchScope ret; + ATEErr error = sFind->GetSearchScope(fFind, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IFind::SetSearchScope( SearchScope searchScope) +{ + ATEErr error = sFind->SetSearchScope(fFind, searchScope); + if(error) Throw_ATE_Exception(error); +} + +void IFind::SetSearchRange( ITextRange pRange) +{ + ATEErr error = sFind->SetSearchRange(fFind, pRange.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IFind::SetSearchChars( ATETextDOM::Unicode* pSearchChars) +{ + ATEErr error = sFind->SetSearchChars(fFind, pSearchChars); + if(error) Throw_ATE_Exception(error); +} + +void IFind::GetSearchChars( ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length) const +{ + ATEErr error = sFind->GetSearchChars(fFind, pSearchChars, length); + if(error) Throw_ATE_Exception(error); +} + +void IFind::SetReplaceChars( ATETextDOM::Unicode* pSearchChars) +{ + ATEErr error = sFind->SetReplaceChars(fFind, pSearchChars); + if(error) Throw_ATE_Exception(error); +} + +void IFind::GetReplaceChars( ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length) const +{ + ATEErr error = sFind->GetReplaceChars(fFind, pSearchChars, length); + if(error) Throw_ATE_Exception(error); +} + +void IFind::Reset( ) +{ + ATEErr error = sFind->Reset(fFind); + if(error) Throw_ATE_Exception(error); +} + +bool IFind::FindMatch( ITextRange pTextRange) +{ + ATEBool8 ret; + ATEErr error = sFind->FindMatch(fFind, pTextRange.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFind::FindNextMatch( ITextRange pTextRange) +{ + ATEBool8 ret; + ATEErr error = sFind->FindNextMatch(fFind, pTextRange.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFind::ReplaceMatch( ITextRange pTextRange, bool findNext) +{ + ATEBool8 ret; + ATEErr error = sFind->ReplaceMatch(fFind, pTextRange.GetRef(), findNext, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFind::FindAndReplaceAllMatches( ATETextDOM::Int32* pReplaceCount) +{ + ATEBool8 ret; + ATEErr error = sFind->FindAndReplaceAllMatches(fFind, pReplaceCount, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IFind::GetPreReplaceAllSettings( ATETextDOM::Int32* pCurrentPoint, ATETextDOM::Int32* pStartPoint) const +{ + ATEErr error = sFind->GetPreReplaceAllSettings(fFind, pCurrentPoint, pStartPoint); + if(error) Throw_ATE_Exception(error); +} + +void IFind::RestorePreReplaceAllSettings( const ATETextDOM::Int32 currentPoint, const ATETextDOM::Int32 startPoint) +{ + ATEErr error = sFind->RestorePreReplaceAllSettings(fFind, currentPoint, startPoint); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IFont-- +////////////////////////////////////////////// + +IFont::IFont() +:fFont(0) +{ +} + +IFont::IFont(FontRef font) +:fFont(font) +{ +} + +IFont::IFont(const IFont& src) +:fFont(src.fFont) +{ + sFont->AddRef(fFont); +} + +IFont::~IFont() +{ + sFont->Release(fFont); +} + +IFont& IFont::operator=(const IFont& rhs) +{ + if (&rhs != this) + { + sFont->Release(fFont); + fFont = rhs.fFont; + sFont->AddRef(fFont); + } + return *this; +} + +bool IFont::operator==(const IFont& rhs) const +{ + return fFont == rhs.fFont; +} + +bool IFont::operator!=(const IFont& rhs) const +{ + return !(*this == rhs); +} + +FontRef IFont::GetRef() const +{ + return fFont; +} + +bool IFont::IsNull() const +{ + return sFont->IsNull(fFont); +} + +bool IFont::IsCoolTypeTechnology( ) const +{ + ATEBool8 ret; + ATEErr error = sFont->IsCoolTypeTechnology(fFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IFont::IsVerticalRomanGlyphsOnSideByDefault( bool withItalics, StyleRunAlignment characterAlignment) const +{ + ATEBool8 ret; + ATEErr error = sFont->IsVerticalRomanGlyphsOnSideByDefault(fFont, withItalics, characterAlignment, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void* IFont::GetCTFontDict( ) +{ + void* ret; + ATEErr error = sFont->GetCTFontDict(fFont, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IGlyph-- +////////////////////////////////////////////// + +IGlyph::IGlyph() +:fGlyph(0) +{ +} + +IGlyph::IGlyph(GlyphRef glyph) +:fGlyph(glyph) +{ +} + +IGlyph::IGlyph(const IGlyph& src) +:fGlyph(src.fGlyph) +{ + sGlyph->AddRef(fGlyph); +} + +IGlyph::~IGlyph() +{ + sGlyph->Release(fGlyph); +} + +IGlyph& IGlyph::operator=(const IGlyph& rhs) +{ + if (&rhs != this) + { + sGlyph->Release(fGlyph); + fGlyph = rhs.fGlyph; + sGlyph->AddRef(fGlyph); + } + return *this; +} + +bool IGlyph::operator==(const IGlyph& rhs) const +{ + return fGlyph == rhs.fGlyph; +} + +bool IGlyph::operator!=(const IGlyph& rhs) const +{ + return !(*this == rhs); +} + +GlyphRef IGlyph::GetRef() const +{ + return fGlyph; +} + +bool IGlyph::IsNull() const +{ + return sGlyph->IsNull(fGlyph); +} + +ATEGlyphID IGlyph::GetGlyphID( ) const +{ + ATEGlyphID ret; + ATEErr error = sGlyph->GetGlyphID(fGlyph, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IGlyphs IGlyph::GetAlternateGlyphs( ) const +{ + GlyphsRef ret = 0; + ATEErr error = sGlyph->GetAlternateGlyphs(fGlyph, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyphs(ret); +} + +void IGlyph::GetOTFeatures( char** otFeatures, ATETextDOM::Int32* otFeatureCount, ATETextDOM::Int32** otFeatureIndex) +{ + ATEErr error = sGlyph->GetOTFeatures(fGlyph, otFeatures, otFeatureCount, otFeatureIndex); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IGlyphs-- +////////////////////////////////////////////// + +IGlyphs::IGlyphs() +:fGlyphs(0) +{ +} + +IGlyphs::IGlyphs(GlyphsRef glyphs) +:fGlyphs(glyphs) +{ +} + +IGlyphs::IGlyphs(const IGlyphs& src) +:fGlyphs(src.fGlyphs) +{ + sGlyphs->AddRef(fGlyphs); +} + +IGlyphs::~IGlyphs() +{ + sGlyphs->Release(fGlyphs); +} + +IGlyphs& IGlyphs::operator=(const IGlyphs& rhs) +{ + if (&rhs != this) + { + sGlyphs->Release(fGlyphs); + fGlyphs = rhs.fGlyphs; + sGlyphs->AddRef(fGlyphs); + } + return *this; +} + +bool IGlyphs::operator==(const IGlyphs& rhs) const +{ + return fGlyphs == rhs.fGlyphs; +} + +bool IGlyphs::operator!=(const IGlyphs& rhs) const +{ + return !(*this == rhs); +} + +GlyphsRef IGlyphs::GetRef() const +{ + return fGlyphs; +} + +bool IGlyphs::IsNull() const +{ + return sGlyphs->IsNull(fGlyphs); +} + +ATETextDOM::Int32 IGlyphs::GetSize( ) +{ + ATETextDOM::Int32 ret; + ATEErr error = sGlyphs->GetSize(fGlyphs, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IGlyph IGlyphs::GetFirst( ) +{ + GlyphRef ret = 0; + ATEErr error = sGlyphs->GetFirst(fGlyphs, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +IGlyph IGlyphs::GetLast( ) +{ + GlyphRef ret = 0; + ATEErr error = sGlyphs->GetLast(fGlyphs, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +ITextRanges IGlyphs::GetTextRanges( ) const +{ + TextRangesRef ret = 0; + ATEErr error = sGlyphs->GetTextRanges(fGlyphs, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +ITextRanges IGlyphs::GetTextSelection( ) const +{ + TextRangesRef ret = 0; + ATEErr error = sGlyphs->GetTextSelection(fGlyphs, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +IParagraphsIterator IGlyphs::GetParagraphsIterator( ) const +{ + ParagraphsIteratorRef ret = 0; + ATEErr error = sGlyphs->GetParagraphsIterator(fGlyphs, &ret); + if(error) Throw_ATE_Exception(error); + return IParagraphsIterator(ret); +} + +ITextRunsIterator IGlyphs::GetTextRunsIterator( ) const +{ + TextRunsIteratorRef ret = 0; + ATEErr error = sGlyphs->GetTextRunsIterator(fGlyphs, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRunsIterator(ret); +} + +IWordsIterator IGlyphs::GetWordsIterator( ) const +{ + WordsIteratorRef ret = 0; + ATEErr error = sGlyphs->GetWordsIterator(fGlyphs, &ret); + if(error) Throw_ATE_Exception(error); + return IWordsIterator(ret); +} + +void IGlyphs::Add( const IGlyph& glyph) +{ + ATEErr error = sGlyphs->Add(fGlyphs, glyph.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +IGlyph IGlyphs::Item( ATETextDOM::Int32 nIndex) const +{ + GlyphRef ret = 0; + ATEErr error = sGlyphs->Item(fGlyphs, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +void IGlyphs::RemoveAll( ) +{ + ATEErr error = sGlyphs->RemoveAll(fGlyphs); + if(error) Throw_ATE_Exception(error); +} + +void IGlyphs::Remove( ATETextDOM::Int32 nIndex) +{ + ATEErr error = sGlyphs->Remove(fGlyphs, nIndex); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IGlyphsIterator-- +////////////////////////////////////////////// + +IGlyphsIterator::IGlyphsIterator() +:fGlyphsIterator(0) +{ +} + +IGlyphsIterator::IGlyphsIterator(GlyphsIteratorRef glyphsiterator) +:fGlyphsIterator(glyphsiterator) +{ +} + +IGlyphsIterator::IGlyphsIterator(const IGlyphsIterator& src) +:fGlyphsIterator(src.fGlyphsIterator) +{ + sGlyphsIterator->AddRef(fGlyphsIterator); +} + +IGlyphsIterator::~IGlyphsIterator() +{ + sGlyphsIterator->Release(fGlyphsIterator); +} + +IGlyphsIterator& IGlyphsIterator::operator=(const IGlyphsIterator& rhs) +{ + if (&rhs != this) + { + sGlyphsIterator->Release(fGlyphsIterator); + fGlyphsIterator = rhs.fGlyphsIterator; + sGlyphsIterator->AddRef(fGlyphsIterator); + } + return *this; +} + +bool IGlyphsIterator::operator==(const IGlyphsIterator& rhs) const +{ + return fGlyphsIterator == rhs.fGlyphsIterator; +} + +bool IGlyphsIterator::operator!=(const IGlyphsIterator& rhs) const +{ + return !(*this == rhs); +} + +GlyphsIteratorRef IGlyphsIterator::GetRef() const +{ + return fGlyphsIterator; +} + +bool IGlyphsIterator::IsNull() const +{ + return sGlyphsIterator->IsNull(fGlyphsIterator); +} + +IGlyphsIterator::IGlyphsIterator( IGlyphs glyphs, Direction direction) +{ + ATEErr error = sGlyphsIterator->Initialize(glyphs.GetRef(), direction, &fGlyphsIterator); + if(error) Throw_ATE_Exception(error); +} + +bool IGlyphsIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sGlyphsIterator->IsNotDone(fGlyphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IGlyphsIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sGlyphsIterator->IsDone(fGlyphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IGlyphsIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sGlyphsIterator->IsEmpty(fGlyphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IGlyph IGlyphsIterator::GetFirst( ) +{ + GlyphRef ret = 0; + ATEErr error = sGlyphsIterator->GetFirst(fGlyphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +IGlyph IGlyphsIterator::GetLast( ) +{ + GlyphRef ret = 0; + ATEErr error = sGlyphsIterator->GetLast(fGlyphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +IGlyph IGlyphsIterator::GetNext( ) +{ + GlyphRef ret = 0; + ATEErr error = sGlyphsIterator->GetNext(fGlyphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +IGlyph IGlyphsIterator::Item( ) const +{ + GlyphRef ret = 0; + ATEErr error = sGlyphsIterator->Item(fGlyphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return IGlyph(ret); +} + +void IGlyphsIterator::Next( ) +{ + ATEErr error = sGlyphsIterator->Next(fGlyphsIterator); + if(error) Throw_ATE_Exception(error); +} + +void IGlyphsIterator::Previous( ) +{ + ATEErr error = sGlyphsIterator->Previous(fGlyphsIterator); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IKinsoku-- +////////////////////////////////////////////// + +IKinsoku::IKinsoku() +:fKinsoku(0) +{ + ATEErr error = sKinsoku->Initialize(&fKinsoku); + if(error) Throw_ATE_Exception(error); +} + +IKinsoku::IKinsoku(KinsokuRef kinsoku) +:fKinsoku(kinsoku) +{ +} + +IKinsoku::IKinsoku(const IKinsoku& src) +:fKinsoku(src.fKinsoku) +{ + sKinsoku->AddRef(fKinsoku); +} + +IKinsoku::~IKinsoku() +{ + sKinsoku->Release(fKinsoku); +} + +IKinsoku& IKinsoku::operator=(const IKinsoku& rhs) +{ + if (&rhs != this) + { + sKinsoku->Release(fKinsoku); + fKinsoku = rhs.fKinsoku; + sKinsoku->AddRef(fKinsoku); + } + return *this; +} + +bool IKinsoku::operator==(const IKinsoku& rhs) const +{ + ATEBool8 ret = false; + ATEErr error = sKinsoku->IsEqual(fKinsoku, rhs.fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsoku::operator!=(const IKinsoku& rhs) const +{ + return !(*this == rhs); +} + +KinsokuRef IKinsoku::GetRef() const +{ + return fKinsoku; +} + +bool IKinsoku::IsNull() const +{ + return sKinsoku->IsNull(fKinsoku); +} + +ATETextDOM::Int32 IKinsoku::GetName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetName(fKinsoku, name, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsoku::GetNameSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetNameSize(fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IKinsoku::SetName( const ATETextDOM::Unicode* name) +{ + ATEErr error = sKinsoku->SetName(fKinsoku, name); + if(error) Throw_ATE_Exception(error); +} + +bool IKinsoku::MatchesPredefinedResourceTag( ATE::KinsokuPredefinedTag tag) const +{ + ATEBool8 ret; + ATEErr error = sKinsoku->MatchesPredefinedResourceTag(fKinsoku, tag, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsoku::GetNoStartCharSet( ATETextDOM::Unicode* noStartCharSet, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetNoStartCharSet(fKinsoku, noStartCharSet, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsoku::GetNoStartCharSetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetNoStartCharSetSize(fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IKinsoku::SetNoStartCharSet( const ATETextDOM::Unicode* noStartCharSet) +{ + ATEErr error = sKinsoku->SetNoStartCharSet(fKinsoku, noStartCharSet); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 IKinsoku::GetNoEndCharSet( ATETextDOM::Unicode* noEndCharSet, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetNoEndCharSet(fKinsoku, noEndCharSet, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsoku::GetNoEndCharSetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetNoEndCharSetSize(fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IKinsoku::SetNoEndCharSet( const ATETextDOM::Unicode* noEndCharSet) +{ + ATEErr error = sKinsoku->SetNoEndCharSet(fKinsoku, noEndCharSet); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 IKinsoku::GetNoBreakCharSet( ATETextDOM::Unicode* noBreakCharSet, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetNoBreakCharSet(fKinsoku, noBreakCharSet, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsoku::GetNoBreakCharSetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetNoBreakCharSetSize(fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IKinsoku::SetNoBreakCharSet( const ATETextDOM::Unicode* noBreakCharSet) +{ + ATEErr error = sKinsoku->SetNoBreakCharSet(fKinsoku, noBreakCharSet); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 IKinsoku::GetHangingCharSet( ATETextDOM::Unicode* hangingCharSet, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetHangingCharSet(fKinsoku, hangingCharSet, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsoku::GetHangingCharSetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsoku->GetHangingCharSetSize(fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IKinsoku::SetHangingCharSet( const ATETextDOM::Unicode* hangingCharSet) +{ + ATEErr error = sKinsoku->SetHangingCharSet(fKinsoku, hangingCharSet); + if(error) Throw_ATE_Exception(error); +} + +bool IKinsoku::IsNoStartChar( ATETextDOM::Unicode character) const +{ + ATEBool8 ret; + ATEErr error = sKinsoku->IsNoStartChar(fKinsoku, character, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsoku::IsNoEndChar( ATETextDOM::Unicode character) const +{ + ATEBool8 ret; + ATEErr error = sKinsoku->IsNoEndChar(fKinsoku, character, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsoku::IsNoBreakChar( ATETextDOM::Unicode character) const +{ + ATEBool8 ret; + ATEErr error = sKinsoku->IsNoBreakChar(fKinsoku, character, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsoku::IsHangingChar( ATETextDOM::Unicode character) const +{ + ATEBool8 ret; + ATEErr error = sKinsoku->IsHangingChar(fKinsoku, character, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsoku::IsEquivalent( IKinsoku rhsKinsoku) const +{ + ATEBool8 ret; + ATEErr error = sKinsoku->IsEquivalent(fKinsoku, rhsKinsoku.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsoku::IsModified( ) const +{ + ATEBool8 ret; + ATEErr error = sKinsoku->IsModified(fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsoku::IsPredefined( ) const +{ + ATEBool8 ret; + ATEErr error = sKinsoku->IsPredefined(fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IKinsoku IKinsoku::Duplicate( ) const +{ + KinsokuRef ret = 0; + ATEErr error = sKinsoku->Duplicate(fKinsoku, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsoku(ret); +} + +////////////////////////////////////////////// +// --IKinsokuSet-- +////////////////////////////////////////////// + +IKinsokuSet::IKinsokuSet() +:fKinsokuSet(0) +{ +} + +IKinsokuSet::IKinsokuSet(KinsokuSetRef kinsokuset) +:fKinsokuSet(kinsokuset) +{ +} + +IKinsokuSet::IKinsokuSet(const IKinsokuSet& src) +:fKinsokuSet(src.fKinsokuSet) +{ + sKinsokuSet->AddRef(fKinsokuSet); +} + +IKinsokuSet::~IKinsokuSet() +{ + sKinsokuSet->Release(fKinsokuSet); +} + +IKinsokuSet& IKinsokuSet::operator=(const IKinsokuSet& rhs) +{ + if (&rhs != this) + { + sKinsokuSet->Release(fKinsokuSet); + fKinsokuSet = rhs.fKinsokuSet; + sKinsokuSet->AddRef(fKinsokuSet); + } + return *this; +} + +bool IKinsokuSet::operator==(const IKinsokuSet& rhs) const +{ + return fKinsokuSet == rhs.fKinsokuSet; +} + +bool IKinsokuSet::operator!=(const IKinsokuSet& rhs) const +{ + return !(*this == rhs); +} + +KinsokuSetRef IKinsokuSet::GetRef() const +{ + return fKinsokuSet; +} + +bool IKinsokuSet::IsNull() const +{ + return sKinsokuSet->IsNull(fKinsokuSet); +} + +ATETextDOM::Int32 IKinsokuSet::GetSize( ) +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsokuSet->GetSize(fKinsokuSet, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IKinsoku IKinsokuSet::GetFirst( ) +{ + KinsokuRef ret = 0; + ATEErr error = sKinsokuSet->GetFirst(fKinsokuSet, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsoku(ret); +} + +IKinsoku IKinsokuSet::GetLast( ) +{ + KinsokuRef ret = 0; + ATEErr error = sKinsokuSet->GetLast(fKinsokuSet, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsoku(ret); +} + +IKinsoku IKinsokuSet::Item( ATETextDOM::Int32 nIndex) const +{ + KinsokuRef ret = 0; + ATEErr error = sKinsokuSet->Item(fKinsokuSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return IKinsoku(ret); +} + +ATETextDOM::Int32 IKinsokuSet::Find( IKinsoku kinsoku) +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsokuSet->Find_ByKinsoku(fKinsokuSet, kinsoku.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsokuSet::Find( const ATETextDOM::Unicode* name) +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsokuSet->Find_ByName(fKinsokuSet, name, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsokuSet::Find( KinsokuPredefinedTag tag) +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsokuSet->Find_ByPredefinedKinsokuTag(fKinsokuSet, tag, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsokuSet::Remove( ATETextDOM::Int32 nIndex) +{ + ATEBool8 ret; + ATEErr error = sKinsokuSet->Remove(fKinsokuSet, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IKinsokuSet::Add( IKinsoku kinsoku) +{ + ATETextDOM::Int32 ret; + ATEErr error = sKinsokuSet->Add(fKinsokuSet, kinsoku.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IKinsokuSet::Replace( ATETextDOM::Int32 nIndex, IKinsoku kinsoku) +{ + ATEBool8 ret; + ATEErr error = sKinsokuSet->Replace(fKinsokuSet, nIndex, kinsoku.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IParaFeatures-- +////////////////////////////////////////////// + +IParaFeatures::IParaFeatures() +:fParaFeatures(0) +{ + ATEErr error = sParaFeatures->Initialize(&fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +IParaFeatures::IParaFeatures(ParaFeaturesRef parafeatures) +:fParaFeatures(parafeatures) +{ +} + +IParaFeatures::IParaFeatures(const IParaFeatures& src) +:fParaFeatures(src.fParaFeatures) +{ + sParaFeatures->AddRef(fParaFeatures); +} + +IParaFeatures::~IParaFeatures() +{ + sParaFeatures->Release(fParaFeatures); +} + +IParaFeatures& IParaFeatures::operator=(const IParaFeatures& rhs) +{ + if (&rhs != this) + { + sParaFeatures->Release(fParaFeatures); + fParaFeatures = rhs.fParaFeatures; + sParaFeatures->AddRef(fParaFeatures); + } + return *this; +} + +bool IParaFeatures::operator==(const IParaFeatures& rhs) const +{ + return fParaFeatures == rhs.fParaFeatures; +} + +bool IParaFeatures::operator!=(const IParaFeatures& rhs) const +{ + return !(*this == rhs); +} + +ParaFeaturesRef IParaFeatures::GetRef() const +{ + return fParaFeatures; +} + +bool IParaFeatures::IsNull() const +{ + return sParaFeatures->IsNull(fParaFeatures); +} + +IParaFeatures IParaFeatures::Clone( ) const +{ + ParaFeaturesRef ret = 0; + ATEErr error = sParaFeatures->Clone(fParaFeatures, &ret); + if(error) Throw_ATE_Exception(error); + return IParaFeatures(ret); +} + +ParagraphJustification IParaFeatures::GetJustification( bool* isAssigned) const +{ + ParagraphJustification ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetJustification(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetFirstLineIndent( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetFirstLineIndent(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetStartIndent( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetStartIndent(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetEndIndent( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetEndIndent(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetSpaceBefore( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetSpaceBefore(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetSpaceAfter( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATEBool8 isAssignedRet; + ATETextDOM::Float tempRet; + ATEErr error = sParaFeatures->GetSpaceAfter(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +bool IParaFeatures::GetAutoHyphenate( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetAutoHyphenate(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 IParaFeatures::GetHyphenatedWordSize( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetHyphenatedWordSize(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 IParaFeatures::GetPreHyphenSize( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetPreHyphenSize(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 IParaFeatures::GetPostHyphenSize( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetPostHyphenSize(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 IParaFeatures::GetConsecutiveHyphenLimit( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetConsecutiveHyphenLimit(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetHyphenationZone( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetHyphenationZone(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +bool IParaFeatures::GetHyphenateCapitalized( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetHyphenateCapitalized(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetHyphenationPreference( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetHyphenationPreference(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetDesiredWordSpacing( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetDesiredWordSpacing(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetMaxWordSpacing( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetMaxWordSpacing(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetMinWordSpacing( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetMinWordSpacing(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetDesiredLetterSpacing( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetDesiredLetterSpacing(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetMaxLetterSpacing( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetMaxLetterSpacing(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetMinLetterSpacing( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetMinLetterSpacing(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetDesiredGlyphScaling( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetDesiredGlyphScaling(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetMaxGlyphScaling( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetMaxGlyphScaling(fParaFeatures, &isAssignedRet, &tempRet); + if (isAssigned) *isAssigned = isAssignedRet; + if(error) Throw_ATE_Exception(error); + ret = tempRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetMinGlyphScaling( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetMinGlyphScaling(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +ParagraphJustification IParaFeatures::GetSingleWordJustification( bool* isAssigned) const +{ + ParagraphJustification ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetSingleWordJustification(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Real IParaFeatures::GetAutoLeadingPercentage( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetAutoLeadingPercentage(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +LeadingType IParaFeatures::GetLeadingType( bool* isAssigned) const +{ + LeadingType ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetLeadingType(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ITabStops IParaFeatures::GetTabStops( bool* isAssigned) const +{ + TabStopsRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetTabStops(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ITabStops(ret); +} + +ATETextDOM::Real IParaFeatures::GetDefaultTabWidth( bool* isAssigned) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetDefaultTabWidth(fParaFeatures, &isAssignedRet, &tempRet); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + ret = tempRet; + return ret; +} + +bool IParaFeatures::GetHangingRoman( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetHangingRoman(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATETextDOM::Int32 IParaFeatures::GetAutoTCY( bool* isAssigned) const +{ + ATETextDOM::Int32 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetAutoTCY(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool IParaFeatures::GetBunriKinshi( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetBunriKinshi(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +BurasagariType IParaFeatures::GetBurasagariType( bool* isAssigned) const +{ + BurasagariType ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetBurasagariType(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +PreferredKinsokuOrder IParaFeatures::GetPreferredKinsokuOrder( bool* isAssigned) const +{ + PreferredKinsokuOrder ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetPreferredKinsokuOrder(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +bool IParaFeatures::GetKurikaeshiMojiShori( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetKurikaeshiMojiShori(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +IKinsoku IParaFeatures::GetKinsoku( bool* isAssigned) const +{ + KinsokuRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetKinsoku(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return IKinsoku(ret); +} + +IListStyle IParaFeatures::GetListStyle( bool* isAssigned) const +{ + ListStyleRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetListStyle(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return IListStyle(ret); +} + +IMojiKumi IParaFeatures::GetMojiKumi( bool* isAssigned) const +{ + MojiKumiRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetMojiKumi(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return IMojiKumi(ret); +} + +bool IParaFeatures::GetEveryLineComposer( bool* isAssigned) const +{ + ATEBool8 ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetEveryLineComposer(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ICharFeatures IParaFeatures::GetDefaultCharFeatures( bool* isAssigned) const +{ + CharFeaturesRef ret = 0; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetDefaultCharFeatures(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ICharFeatures(ret); +} + +#if SLO_COMPLEXSCRIPT +ATE::ParagraphDirection IParaFeatures::GetParagraphDirection( bool* isAssigned) const +{ + ATE::ParagraphDirection ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetParagraphDirection(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATE::JustificationMethod IParaFeatures::GetJustificationMethod( bool* isAssigned) const +{ + ATE::JustificationMethod ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetJustificationMethod(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +ATE::KashidaWidth IParaFeatures::GetKashidaWidth( bool* isAssigned) const +{ + ATE::KashidaWidth ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetKashidaWidth(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} +#endif + +ATE::ComposerEngine IParaFeatures::GetComposerEngine( bool* isAssigned) const +{ + ATE::ComposerEngine ret; + ATEBool8 isAssignedRet; + ATEErr error = sParaFeatures->GetComposerEngine(fParaFeatures, &isAssignedRet, &ret); + if(error) Throw_ATE_Exception(error); + if (isAssigned) *isAssigned = isAssignedRet; + return ret; +} + +void IParaFeatures::SetJustification( ParagraphJustification newVal) +{ + ATEErr error = sParaFeatures->SetJustification(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetFirstLineIndent( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetFirstLineIndent(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetStartIndent( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetStartIndent(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetEndIndent( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetEndIndent(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetSpaceBefore( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetSpaceBefore(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetSpaceAfter( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetSpaceAfter(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetAutoHyphenate( bool newVal) +{ + ATEErr error = sParaFeatures->SetAutoHyphenate(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetHyphenatedWordSize( ATETextDOM::Int32 newVal) +{ + ATEErr error = sParaFeatures->SetHyphenatedWordSize(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetPreHyphenSize( ATETextDOM::Int32 newVal) +{ + ATEErr error = sParaFeatures->SetPreHyphenSize(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetPostHyphenSize( ATETextDOM::Int32 newVal) +{ + ATEErr error = sParaFeatures->SetPostHyphenSize(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetConsecutiveHyphenLimit( ATETextDOM::Int32 newVal) +{ + ATEErr error = sParaFeatures->SetConsecutiveHyphenLimit(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetHyphenationZone( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetHyphenationZone(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetHyphenateCapitalized( bool newVal) +{ + ATEErr error = sParaFeatures->SetHyphenateCapitalized(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetHyphenationPreference( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetHyphenationPreference(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetDesiredWordSpacing( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetDesiredWordSpacing(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetMaxWordSpacing( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetMaxWordSpacing(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetMinWordSpacing( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetMinWordSpacing(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetDesiredLetterSpacing( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetDesiredLetterSpacing(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetMaxLetterSpacing( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetMaxLetterSpacing(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetMinLetterSpacing( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetMinLetterSpacing(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetDesiredGlyphScaling( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetDesiredGlyphScaling(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetMaxGlyphScaling( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetMaxGlyphScaling(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetMinGlyphScaling( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetMinGlyphScaling(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetSingleWordJustification( ParagraphJustification newVal) +{ + ATEErr error = sParaFeatures->SetSingleWordJustification(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetAutoLeadingPercentage( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetAutoLeadingPercentage(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetLeadingType( LeadingType newVal) +{ + ATEErr error = sParaFeatures->SetLeadingType(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetTabStops( ITabStops newVal) +{ + ATEErr error = sParaFeatures->SetTabStops(fParaFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetDefaultTabWidth( ATETextDOM::Real newVal) +{ + ATEErr error = sParaFeatures->SetDefaultTabWidth(fParaFeatures, static_cast(newVal)); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetHangingRoman( bool newVal) +{ + ATEErr error = sParaFeatures->SetHangingRoman(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetAutoTCY( ATETextDOM::Int32 newVal) +{ + ATEErr error = sParaFeatures->SetAutoTCY(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetBunriKinshi( bool newVal) +{ + ATEErr error = sParaFeatures->SetBunriKinshi(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetBurasagariType( BurasagariType newVal) +{ + ATEErr error = sParaFeatures->SetBurasagariType(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetPreferredKinsokuOrder( PreferredKinsokuOrder newVal) +{ + ATEErr error = sParaFeatures->SetPreferredKinsokuOrder(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetKurikaeshiMojiShori( bool newVal) +{ + ATEErr error = sParaFeatures->SetKurikaeshiMojiShori(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetKinsoku( IKinsoku newVal) +{ + ATEErr error = sParaFeatures->SetKinsoku(fParaFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetListStyle( IListStyle newVal) +{ + ATEErr error = sParaFeatures->SetListStyle(fParaFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetMojiKumi( IMojiKumi newVal) +{ + ATEErr error = sParaFeatures->SetMojiKumi(fParaFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetEveryLineComposer( bool newVal) +{ + ATEErr error = sParaFeatures->SetEveryLineComposer(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetDefaultCharFeatures( ICharFeatures newVal) +{ + ATEErr error = sParaFeatures->SetDefaultCharFeatures(fParaFeatures, newVal.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +#if SLO_COMPLEXSCRIPT +void IParaFeatures::SetParagraphDirection( ATE::ParagraphDirection newVal) +{ + ATEErr error = sParaFeatures->SetParagraphDirection(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetJustificationMethod( ATE::JustificationMethod newVal) +{ + ATEErr error = sParaFeatures->SetJustificationMethod(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::SetKashidaWidth( ATE::KashidaWidth newVal) +{ + ATEErr error = sParaFeatures->SetKashidaWidth(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} +#endif + +void IParaFeatures::SetComposerEngine( ATE::ComposerEngine newVal) +{ + ATEErr error = sParaFeatures->SetComposerEngine(fParaFeatures, newVal); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearJustification( ) +{ + ATEErr error = sParaFeatures->ClearJustification(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearFirstLineIndent( ) +{ + ATEErr error = sParaFeatures->ClearFirstLineIndent(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearStartIndent( ) +{ + ATEErr error = sParaFeatures->ClearStartIndent(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearEndIndent( ) +{ + ATEErr error = sParaFeatures->ClearEndIndent(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearSpaceBefore( ) +{ + ATEErr error = sParaFeatures->ClearSpaceBefore(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearSpaceAfter( ) +{ + ATEErr error = sParaFeatures->ClearSpaceAfter(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearAutoHyphenate( ) +{ + ATEErr error = sParaFeatures->ClearAutoHyphenate(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearHyphenatedWordSize( ) +{ + ATEErr error = sParaFeatures->ClearHyphenatedWordSize(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearPreHyphenSize( ) +{ + ATEErr error = sParaFeatures->ClearPreHyphenSize(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearPostHyphenSize( ) +{ + ATEErr error = sParaFeatures->ClearPostHyphenSize(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearConsecutiveHyphenLimit( ) +{ + ATEErr error = sParaFeatures->ClearConsecutiveHyphenLimit(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearHyphenationZone( ) +{ + ATEErr error = sParaFeatures->ClearHyphenationZone(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearHyphenateCapitalized( ) +{ + ATEErr error = sParaFeatures->ClearHyphenateCapitalized(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearHyphenationPreference( ) +{ + ATEErr error = sParaFeatures->ClearHyphenationPreference(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearWordSpacing( ) +{ + ATEErr error = sParaFeatures->ClearWordSpacing(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearLetterSpacing( ) +{ + ATEErr error = sParaFeatures->ClearLetterSpacing(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearGlyphScaling( ) +{ + ATEErr error = sParaFeatures->ClearGlyphScaling(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearSingleWordJustification( ) +{ + ATEErr error = sParaFeatures->ClearSingleWordJustification(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearAutoLeadingPercentage( ) +{ + ATEErr error = sParaFeatures->ClearAutoLeadingPercentage(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearLeadingType( ) +{ + ATEErr error = sParaFeatures->ClearLeadingType(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearTabStops( ) +{ + ATEErr error = sParaFeatures->ClearTabStops(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearHangingRoman( ) +{ + ATEErr error = sParaFeatures->ClearHangingRoman(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearAutoTCY( ) +{ + ATEErr error = sParaFeatures->ClearAutoTCY(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearBunriKinshi( ) +{ + ATEErr error = sParaFeatures->ClearBunriKinshi(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearBurasagariType( ) +{ + ATEErr error = sParaFeatures->ClearBurasagariType(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearPreferredKinsokuOrder( ) +{ + ATEErr error = sParaFeatures->ClearPreferredKinsokuOrder(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearKurikaeshiMojiShori( ) +{ + ATEErr error = sParaFeatures->ClearKurikaeshiMojiShori(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearKinsoku( ) +{ + ATEErr error = sParaFeatures->ClearKinsoku(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearListStyle( ) +{ + ATEErr error = sParaFeatures->ClearListStyle(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearMojiKumi( ) +{ + ATEErr error = sParaFeatures->ClearMojiKumi(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearEveryLineComposer( ) +{ + ATEErr error = sParaFeatures->ClearEveryLineComposer(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearDefaultCharFeatures( ) +{ + ATEErr error = sParaFeatures->ClearDefaultCharFeatures(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +#if SLO_COMPLEXSCRIPT +void IParaFeatures::ClearParagraphDirection( ) +{ + ATEErr error = sParaFeatures->ClearParagraphDirection(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearJustificationMethod( ) +{ + ATEErr error = sParaFeatures->ClearJustificationMethod(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +void IParaFeatures::ClearKashidaWidth( ) +{ + ATEErr error = sParaFeatures->ClearKashidaWidth(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} +#endif + +void IParaFeatures::ClearComposerEngine( ) +{ + ATEErr error = sParaFeatures->ClearComposerEngine(fParaFeatures); + if(error) Throw_ATE_Exception(error); +} + +bool IParaFeatures::IntersectFeatures( IParaFeatures rhs) +{ + ATEBool8 ret; + ATEErr error = sParaFeatures->IntersectFeatures(fParaFeatures, rhs.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaFeatures::ReplaceOrAddFeatures( IParaFeatures rhs) +{ + ATEBool8 ret; + ATEErr error = sParaFeatures->ReplaceOrAddFeatures(fParaFeatures, rhs.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaFeatures::UnassignEachIfEqual( const IParaFeatures rhs) +{ + ATEBool8 ret; + ATEErr error = sParaFeatures->UnassignEachIfEqual(fParaFeatures, rhs.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaFeatures::IsEachNotAssigned( ) const +{ + ATEBool8 ret; + ATEErr error = sParaFeatures->IsEachNotAssigned(fParaFeatures, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaFeatures::IsEachAssigned( ) const +{ + ATEBool8 ret; + ATEErr error = sParaFeatures->IsEachAssigned(fParaFeatures, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IParagraph-- +////////////////////////////////////////////// + +IParagraph::IParagraph() +:fParagraph(0) +{ +} + +IParagraph::IParagraph(ParagraphRef paragraph) +:fParagraph(paragraph) +{ +} + +IParagraph::IParagraph(const IParagraph& src) +:fParagraph(src.fParagraph) +{ + sParagraph->AddRef(fParagraph); +} + +IParagraph::~IParagraph() +{ + sParagraph->Release(fParagraph); +} + +IParagraph& IParagraph::operator=(const IParagraph& rhs) +{ + if (&rhs != this) + { + sParagraph->Release(fParagraph); + fParagraph = rhs.fParagraph; + sParagraph->AddRef(fParagraph); + } + return *this; +} + +bool IParagraph::operator==(const IParagraph& rhs) const +{ + return fParagraph == rhs.fParagraph; +} + +bool IParagraph::operator!=(const IParagraph& rhs) const +{ + return !(*this == rhs); +} + +ParagraphRef IParagraph::GetRef() const +{ + return fParagraph; +} + +bool IParagraph::IsNull() const +{ + return sParagraph->IsNull(fParagraph); +} + +ATETextDOM::Int32 IParagraph::GetLength( ) +{ + ATETextDOM::Int32 ret; + ATEErr error = sParagraph->GetLength(fParagraph, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IStory IParagraph::GetStory( ) +{ + StoryRef ret = 0; + ATEErr error = sParagraph->GetStory(fParagraph, &ret); + if(error) Throw_ATE_Exception(error); + return IStory(ret); +} + +ITextRange IParagraph::GetTextRange( ) +{ + TextRangeRef ret = 0; + ATEErr error = sParagraph->GetTextRange(fParagraph, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +ITextRanges IParagraph::GetTextRanges( ) +{ + TextRangesRef ret = 0; + ATEErr error = sParagraph->GetTextRanges(fParagraph, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +ITextRanges IParagraph::GetTextSelection( ) +{ + TextRangesRef ret = 0; + ATEErr error = sParagraph->GetTextSelection(fParagraph, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +IWordsIterator IParagraph::GetWordsIterator( ) +{ + WordsIteratorRef ret = 0; + ATEErr error = sParagraph->GetWordsIterator(fParagraph, &ret); + if(error) Throw_ATE_Exception(error); + return IWordsIterator(ret); +} + +IParagraph IParagraph::GetNext( ) +{ + ParagraphRef ret = 0; + ATEErr error = sParagraph->GetNext(fParagraph, &ret); + if(error) Throw_ATE_Exception(error); + return IParagraph(ret); +} + +IParagraph IParagraph::GetPrev( ) +{ + ParagraphRef ret = 0; + ATEErr error = sParagraph->GetPrev(fParagraph, &ret); + if(error) Throw_ATE_Exception(error); + return IParagraph(ret); +} + +ATETextDOM::ATETextDomErr IParagraph::GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) +{ + ATETextDOM::ATETextDomErr ret; + ATEErr error = sParagraph->GetContents_AsUnicode(fParagraph, text, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::ATETextDomErr IParagraph::GetContents( char* text, ATETextDOM::Int32 maxLength) +{ + ATETextDOM::ATETextDomErr ret; + ATEErr error = sParagraph->GetContents_AsChar(fParagraph, text, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IParagraphsIterator-- +////////////////////////////////////////////// + +IParagraphsIterator::IParagraphsIterator() +:fParagraphsIterator(0) +{ +} + +IParagraphsIterator::IParagraphsIterator(ParagraphsIteratorRef paragraphsiterator) +:fParagraphsIterator(paragraphsiterator) +{ +} + +IParagraphsIterator::IParagraphsIterator(const IParagraphsIterator& src) +:fParagraphsIterator(src.fParagraphsIterator) +{ + sParagraphsIterator->AddRef(fParagraphsIterator); +} + +IParagraphsIterator::~IParagraphsIterator() +{ + sParagraphsIterator->Release(fParagraphsIterator); +} + +IParagraphsIterator& IParagraphsIterator::operator=(const IParagraphsIterator& rhs) +{ + if (&rhs != this) + { + sParagraphsIterator->Release(fParagraphsIterator); + fParagraphsIterator = rhs.fParagraphsIterator; + sParagraphsIterator->AddRef(fParagraphsIterator); + } + return *this; +} + +bool IParagraphsIterator::operator==(const IParagraphsIterator& rhs) const +{ + return fParagraphsIterator == rhs.fParagraphsIterator; +} + +bool IParagraphsIterator::operator!=(const IParagraphsIterator& rhs) const +{ + return !(*this == rhs); +} + +ParagraphsIteratorRef IParagraphsIterator::GetRef() const +{ + return fParagraphsIterator; +} + +bool IParagraphsIterator::IsNull() const +{ + return sParagraphsIterator->IsNull(fParagraphsIterator); +} + +IParagraphsIterator::IParagraphsIterator( ITextRanges ranges, Direction direction) +{ + ATEErr error = sParagraphsIterator->Initialize(ranges.GetRef(), direction, &fParagraphsIterator); + if(error) Throw_ATE_Exception(error); +} + +bool IParagraphsIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sParagraphsIterator->IsDone(fParagraphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParagraphsIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sParagraphsIterator->IsNotDone(fParagraphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParagraphsIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sParagraphsIterator->IsEmpty(fParagraphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IParagraphsIterator::MoveToFirst( ) +{ + ATEErr error = sParagraphsIterator->MoveToFirst(fParagraphsIterator); + if(error) Throw_ATE_Exception(error); +} + +void IParagraphsIterator::MoveToLast( ) +{ + ATEErr error = sParagraphsIterator->MoveToLast(fParagraphsIterator); + if(error) Throw_ATE_Exception(error); +} + +void IParagraphsIterator::Next( ) +{ + ATEErr error = sParagraphsIterator->Next(fParagraphsIterator); + if(error) Throw_ATE_Exception(error); +} + +IParagraph IParagraphsIterator::Item( ) +{ + ParagraphRef ret = 0; + ATEErr error = sParagraphsIterator->Item(fParagraphsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return IParagraph(ret); +} + +////////////////////////////////////////////// +// --IParaInspector-- +////////////////////////////////////////////// + +IParaInspector::IParaInspector() +:fParaInspector(0) +{ + ATEErr error = sParaInspector->Initialize(&fParaInspector); + if(error) Throw_ATE_Exception(error); +} + +IParaInspector::IParaInspector(ParaInspectorRef parainspector) +:fParaInspector(parainspector) +{ +} + +IParaInspector::IParaInspector(const IParaInspector& src) +:fParaInspector(src.fParaInspector) +{ + sParaInspector->AddRef(fParaInspector); +} + +IParaInspector::~IParaInspector() +{ + sParaInspector->Release(fParaInspector); +} + +IParaInspector& IParaInspector::operator=(const IParaInspector& rhs) +{ + if (&rhs != this) + { + sParaInspector->Release(fParaInspector); + fParaInspector = rhs.fParaInspector; + sParaInspector->AddRef(fParaInspector); + } + return *this; +} + +bool IParaInspector::operator==(const IParaInspector& rhs) const +{ + return fParaInspector == rhs.fParaInspector; +} + +bool IParaInspector::operator!=(const IParaInspector& rhs) const +{ + return !(*this == rhs); +} + +ParaInspectorRef IParaInspector::GetRef() const +{ + return fParaInspector; +} + +bool IParaInspector::IsNull() const +{ + return sParaInspector->IsNull(fParaInspector); +} + +IArrayParagraphJustification IParaInspector::GetJustification( ) const +{ + ArrayParagraphJustificationRef ret = 0; + ATEErr error = sParaInspector->GetJustification(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayParagraphJustification(ret); +} + +IArrayReal IParaInspector::GetFirstLineIndent( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetFirstLineIndent(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetStartIndent( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetStartIndent(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetEndIndent( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetEndIndent(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetSpaceBefore( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetSpaceBefore(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetSpaceAfter( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetSpaceAfter(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayBool IParaInspector::GetAutoHyphenate( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sParaInspector->GetAutoHyphenate(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayInteger IParaInspector::GetHyphenatedWordSize( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sParaInspector->GetHyphenatedWordSize(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayInteger IParaInspector::GetPreHyphenSize( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sParaInspector->GetPreHyphenSize(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayInteger IParaInspector::GetPostHyphenSize( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sParaInspector->GetPostHyphenSize(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayInteger IParaInspector::GetConsecutiveHyphenLimit( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sParaInspector->GetConsecutiveHyphenLimit(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayReal IParaInspector::GetHyphenationZone( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetHyphenationZone(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayBool IParaInspector::GetHyphenateCapitalized( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sParaInspector->GetHyphenateCapitalized(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayReal IParaInspector::GetHyphenationPreference( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetHyphenationPreference(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetDesiredWordSpacing( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetDesiredWordSpacing(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetMaxWordSpacing( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetMaxWordSpacing(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetMinWordSpacing( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetMinWordSpacing(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetDesiredLetterSpacing( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetDesiredLetterSpacing(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetMaxLetterSpacing( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetMaxLetterSpacing(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetMinLetterSpacing( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetMinLetterSpacing(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetDesiredGlyphScaling( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetDesiredGlyphScaling(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetMaxGlyphScaling( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetMaxGlyphScaling(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayReal IParaInspector::GetMinGlyphScaling( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetMinGlyphScaling(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayParagraphJustification IParaInspector::GetSingleWordJustification( ) const +{ + ArrayParagraphJustificationRef ret = 0; + ATEErr error = sParaInspector->GetSingleWordJustification(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayParagraphJustification(ret); +} + +IArrayReal IParaInspector::GetAutoLeadingPercentage( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetAutoLeadingPercentage(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayLeadingType IParaInspector::GetLeadingType( ) const +{ + ArrayLeadingTypeRef ret = 0; + ATEErr error = sParaInspector->GetLeadingType(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayLeadingType(ret); +} + +IArrayTabStopsRef IParaInspector::GetTabStops( ) const +{ + ArrayTabStopsRefRef ret = 0; + ATEErr error = sParaInspector->GetTabStops(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayTabStopsRef(ret); +} + +IArrayReal IParaInspector::GetDefaultTabWidth( ) const +{ + ArrayRealRef ret = 0; + ATEErr error = sParaInspector->GetDefaultTabWidth(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayReal(ret); +} + +IArrayBool IParaInspector::GetHangingRoman( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sParaInspector->GetHangingRoman(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayInteger IParaInspector::GetAutoTCY( ) const +{ + ArrayIntegerRef ret = 0; + ATEErr error = sParaInspector->GetAutoTCY(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayInteger(ret); +} + +IArrayBool IParaInspector::GetBunriKinshi( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sParaInspector->GetBunriKinshi(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayBurasagariType IParaInspector::GetBurasagariType( ) const +{ + ArrayBurasagariTypeRef ret = 0; + ATEErr error = sParaInspector->GetBurasagariType(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBurasagariType(ret); +} + +IArrayPreferredKinsokuOrder IParaInspector::GetPreferredKinsokuOrder( ) const +{ + ArrayPreferredKinsokuOrderRef ret = 0; + ATEErr error = sParaInspector->GetPreferredKinsokuOrder(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayPreferredKinsokuOrder(ret); +} + +IArrayBool IParaInspector::GetKurikaeshiMojiShori( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sParaInspector->GetKurikaeshiMojiShori(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +IArrayKinsokuRef IParaInspector::GetKinsoku( ) const +{ + ArrayKinsokuRefRef ret = 0; + ATEErr error = sParaInspector->GetKinsoku(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayKinsokuRef(ret); +} + +IArrayListStyleRef IParaInspector::GetListStyle( ) const +{ + ArrayListStyleRefRef ret = 0; + ATEErr error = sParaInspector->GetListStyle(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayListStyleRef(ret); +} + +IArrayMojiKumiRef IParaInspector::GetMojiKumi( ) const +{ + ArrayMojiKumiRefRef ret = 0; + ATEErr error = sParaInspector->GetMojiKumi(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayMojiKumiRef(ret); +} + +IArrayBool IParaInspector::GetEveryLineComposer( ) const +{ + ArrayBoolRef ret = 0; + ATEErr error = sParaInspector->GetEveryLineComposer(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayBool(ret); +} + +#if SLO_COMPLEXSCRIPT +IArrayParagraphDirection IParaInspector::GetParagraphDirection( ) const +{ + ArrayParagraphDirectionRef ret = 0; + ATEErr error = sParaInspector->GetParagraphDirection(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayParagraphDirection(ret); +} + +IArrayJustificationMethod IParaInspector::GetJustificationMethod( ) const +{ + ArrayJustificationMethodRef ret = 0; + ATEErr error = sParaInspector->GetJustificationMethod(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayJustificationMethod(ret); +} + +IArrayKashidaWidth IParaInspector::GetKashidaWidth( ) const +{ + ArrayKashidaWidthRef ret = 0; + ATEErr error = sParaInspector->GetKashidaWidth(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayKashidaWidth(ret); +} +#endif + +IArrayComposerEngine IParaInspector::GetComposerEngine( ) const +{ + ArrayComposerEngineRef ret = 0; + ATEErr error = sParaInspector->GetComposerEngine(fParaInspector, &ret); + if(error) Throw_ATE_Exception(error); + return IArrayComposerEngine(ret); +} + +////////////////////////////////////////////// +// --IParaStyle-- +////////////////////////////////////////////// + +IParaStyle::IParaStyle() +:fParaStyle(0) +{ +} + +IParaStyle::IParaStyle(ParaStyleRef parastyle) +:fParaStyle(parastyle) +{ +} + +IParaStyle::IParaStyle(const IParaStyle& src) +:fParaStyle(src.fParaStyle) +{ + sParaStyle->AddRef(fParaStyle); +} + +IParaStyle::~IParaStyle() +{ + sParaStyle->Release(fParaStyle); +} + +IParaStyle& IParaStyle::operator=(const IParaStyle& rhs) +{ + if (&rhs != this) + { + sParaStyle->Release(fParaStyle); + fParaStyle = rhs.fParaStyle; + sParaStyle->AddRef(fParaStyle); + } + return *this; +} + +bool IParaStyle::operator==(const IParaStyle& rhs) const +{ + ATEBool8 ret = false; + ATEErr error = sParaStyle->IsEqual(fParaStyle, rhs.fParaStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaStyle::operator!=(const IParaStyle& rhs) const +{ + return !(*this == rhs); +} + +ParaStyleRef IParaStyle::GetRef() const +{ + return fParaStyle; +} + +bool IParaStyle::IsNull() const +{ + return sParaStyle->IsNull(fParaStyle); +} + +ATETextDOM::Int32 IParaStyle::GetName( ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sParaStyle->GetName(fParaStyle, pName, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaStyle::SetName( const ATETextDOM::Unicode* pName) +{ + ATEBool8 ret; + ATEErr error = sParaStyle->SetName(fParaStyle, pName, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IParaStyle IParaStyle::GetParent( ) const +{ + ParaStyleRef ret = 0; + ATEErr error = sParaStyle->GetParent(fParaStyle, &ret); + if(error) Throw_ATE_Exception(error); + return IParaStyle(ret); +} + +bool IParaStyle::SetParent( const IParaStyle pStyle) +{ + ATEBool8 ret; + ATEErr error = sParaStyle->SetParent(fParaStyle, pStyle.GetRef(), &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaStyle::HasParent( ) const +{ + ATEBool8 ret; + ATEErr error = sParaStyle->HasParent(fParaStyle, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IParaFeatures IParaStyle::GetFeatures( ) const +{ + ParaFeaturesRef ret = 0; + ATEErr error = sParaStyle->GetFeatures(fParaStyle, &ret); + if(error) Throw_ATE_Exception(error); + return IParaFeatures(ret); +} + +void IParaStyle::SetFeatures( IParaFeatures pFeatures) +{ + ATEErr error = sParaStyle->SetFeatures(fParaStyle, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IParaStyle::ReplaceOrAddFeatures( IParaFeatures pFeatures) +{ + ATEErr error = sParaStyle->ReplaceOrAddFeatures(fParaStyle, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IParaStyles-- +////////////////////////////////////////////// + +IParaStyles::IParaStyles() +:fParaStyles(0) +{ +} + +IParaStyles::IParaStyles(ParaStylesRef parastyles) +:fParaStyles(parastyles) +{ +} + +IParaStyles::IParaStyles(const IParaStyles& src) +:fParaStyles(src.fParaStyles) +{ + sParaStyles->AddRef(fParaStyles); +} + +IParaStyles::~IParaStyles() +{ + sParaStyles->Release(fParaStyles); +} + +IParaStyles& IParaStyles::operator=(const IParaStyles& rhs) +{ + if (&rhs != this) + { + sParaStyles->Release(fParaStyles); + fParaStyles = rhs.fParaStyles; + sParaStyles->AddRef(fParaStyles); + } + return *this; +} + +bool IParaStyles::operator==(const IParaStyles& rhs) const +{ + return fParaStyles == rhs.fParaStyles; +} + +bool IParaStyles::operator!=(const IParaStyles& rhs) const +{ + return !(*this == rhs); +} + +ParaStylesRef IParaStyles::GetRef() const +{ + return fParaStyles; +} + +bool IParaStyles::IsNull() const +{ + return sParaStyles->IsNull(fParaStyles); +} + +bool IParaStyles::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sParaStyles->IsEmpty(fParaStyles, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IParaStyles::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sParaStyles->GetSize(fParaStyles, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IParaStyles::ShowAllStyles( ) const +{ + ATEErr error = sParaStyles->ShowAllStyles(fParaStyles); + if(error) Throw_ATE_Exception(error); +} + +void IParaStyles::ShowOnlyUnreferencedStyles( ) const +{ + ATEErr error = sParaStyles->ShowOnlyUnreferencedStyles(fParaStyles); + if(error) Throw_ATE_Exception(error); +} + +void IParaStyles::ShowOnlyStylesReferencedIn( ITextRange pRange) const +{ + ATEErr error = sParaStyles->ShowOnlyStylesReferencedIn(fParaStyles, pRange.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IParaStyles::MoveStyleTo( IParaStyle pStyle, ATETextDOM::Int32 position) +{ + ATEErr error = sParaStyles->MoveStyleTo(fParaStyles, pStyle.GetRef(), position); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IParaStylesIterator-- +////////////////////////////////////////////// + +IParaStylesIterator::IParaStylesIterator() +:fParaStylesIterator(0) +{ +} + +IParaStylesIterator::IParaStylesIterator(ParaStylesIteratorRef parastylesiterator) +:fParaStylesIterator(parastylesiterator) +{ +} + +IParaStylesIterator::IParaStylesIterator(const IParaStylesIterator& src) +:fParaStylesIterator(src.fParaStylesIterator) +{ + sParaStylesIterator->AddRef(fParaStylesIterator); +} + +IParaStylesIterator::~IParaStylesIterator() +{ + sParaStylesIterator->Release(fParaStylesIterator); +} + +IParaStylesIterator& IParaStylesIterator::operator=(const IParaStylesIterator& rhs) +{ + if (&rhs != this) + { + sParaStylesIterator->Release(fParaStylesIterator); + fParaStylesIterator = rhs.fParaStylesIterator; + sParaStylesIterator->AddRef(fParaStylesIterator); + } + return *this; +} + +bool IParaStylesIterator::operator==(const IParaStylesIterator& rhs) const +{ + return fParaStylesIterator == rhs.fParaStylesIterator; +} + +bool IParaStylesIterator::operator!=(const IParaStylesIterator& rhs) const +{ + return !(*this == rhs); +} + +ParaStylesIteratorRef IParaStylesIterator::GetRef() const +{ + return fParaStylesIterator; +} + +bool IParaStylesIterator::IsNull() const +{ + return sParaStylesIterator->IsNull(fParaStylesIterator); +} + +IParaStylesIterator::IParaStylesIterator( IParaStyles paraStyles, Direction direction) +{ + ATEErr error = sParaStylesIterator->Initialize(paraStyles.GetRef(), direction, &fParaStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +bool IParaStylesIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sParaStylesIterator->IsNotDone(fParaStylesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaStylesIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sParaStylesIterator->IsDone(fParaStylesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IParaStylesIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sParaStylesIterator->IsEmpty(fParaStylesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IParaStylesIterator::MoveToFirst( ) +{ + ATEErr error = sParaStylesIterator->MoveToFirst(fParaStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +void IParaStylesIterator::MoveToLast( ) +{ + ATEErr error = sParaStylesIterator->MoveToLast(fParaStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +void IParaStylesIterator::Next( ) +{ + ATEErr error = sParaStylesIterator->Next(fParaStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +void IParaStylesIterator::Previous( ) +{ + ATEErr error = sParaStylesIterator->Previous(fParaStylesIterator); + if(error) Throw_ATE_Exception(error); +} + +IParaStyle IParaStylesIterator::Item( ) const +{ + ParaStyleRef ret = 0; + ATEErr error = sParaStylesIterator->Item(fParaStylesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return IParaStyle(ret); +} + +////////////////////////////////////////////// +// --ISpell-- +////////////////////////////////////////////// + +ISpell::ISpell() +:fSpell(0) +{ +} + +ISpell::ISpell(SpellRef spell) +:fSpell(spell) +{ +} + +ISpell::ISpell(const ISpell& src) +:fSpell(src.fSpell) +{ + sSpell->AddRef(fSpell); +} + +ISpell::~ISpell() +{ + sSpell->Release(fSpell); +} + +ISpell& ISpell::operator=(const ISpell& rhs) +{ + if (&rhs != this) + { + sSpell->Release(fSpell); + fSpell = rhs.fSpell; + sSpell->AddRef(fSpell); + } + return *this; +} + +bool ISpell::operator==(const ISpell& rhs) const +{ + return fSpell == rhs.fSpell; +} + +bool ISpell::operator!=(const ISpell& rhs) const +{ + return !(*this == rhs); +} + +SpellRef ISpell::GetRef() const +{ + return fSpell; +} + +bool ISpell::IsNull() const +{ + return sSpell->IsNull(fSpell); +} + +void ISpell::Initialize( ) +{ + ATEErr error = sSpell->Initialize(fSpell); + if(error) Throw_ATE_Exception(error); +} + +bool ISpell::IsInitialized( ) +{ + ATEBool8 ret; + ATEErr error = sSpell->IsInitialized(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ISpell::GetIgnoreWordsInAllUppercase( ) const +{ + ATEBool8 ret; + ATEErr error = sSpell->GetIgnoreWordsInAllUppercase(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ISpell::GetIgnoreWordsWithNumbers( ) const +{ + ATEBool8 ret; + ATEErr error = sSpell->GetIgnoreWordsWithNumbers(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ISpell::GetIgnoreRomanNumerals( ) const +{ + ATEBool8 ret; + ATEErr error = sSpell->GetIgnoreRomanNumerals(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ISpell::GetIgnoreRepeatedWords( ) const +{ + ATEBool8 ret; + ATEErr error = sSpell->GetIgnoreRepeatedWords(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ISpell::GetIgnoreUncapitalizedStartOfSentence( ) const +{ + ATEBool8 ret; + ATEErr error = sSpell->GetIgnoreUncapitalizedStartOfSentence(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +#if SLO_COMPLEXSCRIPT +bool ISpell::GetStrictYeh( ) const +{ + ATEBool8 ret; + ATEErr error = sSpell->GetStrictYeh(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ISpell::GetStrictAlef( ) const +{ + ATEBool8 ret; + ATEErr error = sSpell->GetStrictAlef(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} +#endif + +void ISpell::SetIgnoreWordsInAllUppercase( bool newValue) +{ + ATEErr error = sSpell->SetIgnoreWordsInAllUppercase(fSpell, newValue); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::SetIgnoreWordsWithNumbers( bool newValue) +{ + ATEErr error = sSpell->SetIgnoreWordsWithNumbers(fSpell, newValue); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::SetIgnoreRomanNumerals( bool newValue) +{ + ATEErr error = sSpell->SetIgnoreRomanNumerals(fSpell, newValue); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::SetIgnoreRepeatedWords( bool newValue) +{ + ATEErr error = sSpell->SetIgnoreRepeatedWords(fSpell, newValue); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::SetIgnoreUncapitalizedStartOfSentence( bool newValue) +{ + ATEErr error = sSpell->SetIgnoreUncapitalizedStartOfSentence(fSpell, newValue); + if(error) Throw_ATE_Exception(error); +} + +#if SLO_COMPLEXSCRIPT +void ISpell::SetStrictYeh( bool newValue) +{ + ATEErr error = sSpell->SetStrictYeh(fSpell, newValue); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::SetStrictAlef( bool newValue) +{ + ATEErr error = sSpell->SetStrictAlef(fSpell, newValue); + if(error) Throw_ATE_Exception(error); +} +#endif + +SearchScope ISpell::GetSearchScope( ) const +{ + SearchScope ret; + ATEErr error = sSpell->GetSearchScope(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ISpell::SetSearchScope( SearchScope searchScope) +{ + ATEErr error = sSpell->SetSearchScope(fSpell, searchScope); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::SetSearchRange( const ITextRange& pRange, const bool resetEndOfSentence, const bool resetCurPos, const bool includeWordsOnSearchBoundary) +{ + ATEErr error = sSpell->SetSearchRange(fSpell, pRange.GetRef(), resetEndOfSentence, resetCurPos, includeWordsOnSearchBoundary); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::Reset( ) +{ + ATEErr error = sSpell->Reset(fSpell); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::ResumeFrom( const ATETextDOM::Int32 resumePoint) +{ + ATEErr error = sSpell->ResumeFrom(fSpell, resumePoint); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::ResumeFromInsertionPoint( ) +{ + ATEErr error = sSpell->ResumeFromInsertionPoint(fSpell); + if(error) Throw_ATE_Exception(error); +} + +bool ISpell::FindOneMisspelledWord( SpellCheckingResult* pResult, ITextRange pRange, Language* pLanguage, bool populateSuggestionList ) +{ + ATEBool8 ret; + ATEErr error = sSpell->FindOneMisspelledWord(fSpell, pResult, pRange.GetRef(), pLanguage, populateSuggestionList, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ISpell::GetWordListSize( ) +{ + ATETextDOM::Int32 ret; + ATEErr error = sSpell->GetWordListSize(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ISpell::GetWordListContents( ATETextDOM::Unicode* pWordListBuffer, ATETextDOM::Int32 sizeOfBuffer, ATETextDOM::Int32* pNumberOfWords) +{ + ATEErr error = sSpell->GetWordListContents(fSpell, pWordListBuffer, sizeOfBuffer, pNumberOfWords); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::Replace( ITextRange pRange, const ATETextDOM::Unicode* pCorrection) +{ + ATEErr error = sSpell->Replace(fSpell, pRange.GetRef(), pCorrection); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::AddSelectedToReplaceAllDict( const ATETextDOM::Unicode* pCorrection) +{ + ATEErr error = sSpell->AddSelectedToReplaceAllDict(fSpell, pCorrection); + if(error) Throw_ATE_Exception(error); +} + +bool ISpell::DoReplaceAll( ) +{ + ATEBool8 ret; + ATEErr error = sSpell->DoReplaceAll(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ISpell::GetPreReplaceAllSettings( ATETextDOM::Int32* pCurrentPoint, bool* pFoundSentenceEnd) const +{ + ATEBool8 foundSentenceEndRet; + ATEErr error = sSpell->GetPreReplaceAllSettings(fSpell, pCurrentPoint, &foundSentenceEndRet); + if(error) Throw_ATE_Exception(error); + if (pFoundSentenceEnd) *pFoundSentenceEnd = foundSentenceEndRet; +} + +bool ISpell::FindReplaceAllWord( ITextRange pRange, const bool firstTimeInThisObject) +{ + ATEBool8 ret; + ATEErr error = sSpell->FindReplaceAllWord(fSpell, pRange.GetRef(), firstTimeInThisObject, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ISpell::RestorePreReplaceAllSettings( const ATETextDOM::Int32 currentPoint, const bool foundSentenceEnd) +{ + ATEErr error = sSpell->RestorePreReplaceAllSettings(fSpell, currentPoint, foundSentenceEnd); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::ClearPairDictionary( ) +{ + ATEErr error = sSpell->ClearPairDictionary(fSpell); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::AddSelectedToUserDict( ) +{ + ATEErr error = sSpell->AddSelectedToUserDict(fSpell); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::GetUserDictionaryContents( ) +{ + ATEErr error = sSpell->GetUserDictionaryContents(fSpell); + if(error) Throw_ATE_Exception(error); +} + +bool ISpell::AddToUserDictionary( const ATETextDOM::Unicode* pWord) +{ + ATEBool8 ret; + ATEErr error = sSpell->AddToUserDictionary(fSpell, pWord, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ISpell::DeleteFromUserDictionary( const ATETextDOM::Unicode* pWord) +{ + ATEErr error = sSpell->DeleteFromUserDictionary(fSpell, pWord); + if(error) Throw_ATE_Exception(error); +} + +bool ISpell::WordExistsInUserDictionary( const ATETextDOM::Unicode* pWord, const ATE::CheckEquivalentFormsSetting checkEquivalentFormsSetting) +{ + ATEBool8 ret; + ATEErr error = sSpell->WordExistsInIgnoreDictionary(fSpell, pWord, checkEquivalentFormsSetting, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ISpell::WordExistsInIgnoreDictionary( const ATETextDOM::Unicode* pWord, const ATE::CheckEquivalentFormsSetting checkEquivalentFormsSetting) +{ + ATEBool8 ret; + ATEErr error = sSpell->WordExistsInIgnoreDictionary(fSpell, pWord, checkEquivalentFormsSetting, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ISpell::AddSelectedToIgnoreList( ) +{ + ATEErr error = sSpell->AddSelectedToIgnoreList(fSpell); + if(error) Throw_ATE_Exception(error); +} + +void ISpell::ClearIgnoreList( ) +{ + ATEErr error = sSpell->ClearIgnoreList(fSpell); + if(error) Throw_ATE_Exception(error); +} + +Language ISpell::GetLanguageOfLastMissingDictionary( ) +{ + Language ret; + ATEErr error = sSpell->GetLanguageOfLastMissingDictionary(fSpell, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ISpell::GetSpellingDictionaryPath(ATETextDOM::Unicode* path) +{ + ATETextDOM::Int32 ret; + ATEErr error = sSpell->GetSpellingDictionaryPath(fSpell, path, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --IStories-- +////////////////////////////////////////////// + +IStories::IStories() +:fStories(0) +{ +} + +IStories::IStories(StoriesRef stories) +:fStories(stories) +{ +} + +IStories::IStories(const IStories& src) +:fStories(src.fStories) +{ + sStories->AddRef(fStories); +} + +IStories::~IStories() +{ + sStories->Release(fStories); +} + +IStories& IStories::operator=(const IStories& rhs) +{ + if (&rhs != this) + { + sStories->Release(fStories); + fStories = rhs.fStories; + sStories->AddRef(fStories); + } + return *this; +} + +bool IStories::operator==(const IStories& rhs) const +{ + return fStories == rhs.fStories; +} + +bool IStories::operator!=(const IStories& rhs) const +{ + return !(*this == rhs); +} + +StoriesRef IStories::GetRef() const +{ + return fStories; +} + +bool IStories::IsNull() const +{ + return sStories->IsNull(fStories); +} + +ATETextDOM::Int32 IStories::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sStories->GetSize(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IStory IStories::GetFirst( ) +{ + StoryRef ret = 0; + ATEErr error = sStories->GetFirst(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return IStory(ret); +} + +IStory IStories::GetLast( ) +{ + StoryRef ret = 0; + ATEErr error = sStories->GetLast(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return IStory(ret); +} + +bool IStories::HasFocus( ) const +{ + ATEBool8 ret; + ATEErr error = sStories->HasFocus(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IStory IStories::GetFocus( ) const +{ + StoryRef ret = 0; + ATEErr error = sStories->GetFocus(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return IStory(ret); +} + +void IStories::SetFocus( const IStory& story) +{ + ATEErr error = sStories->SetFocus(fStories, story.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void IStories::LoseFocus( ) +{ + ATEErr error = sStories->LoseFocus(fStories); + if(error) Throw_ATE_Exception(error); +} + +ITextRanges IStories::GetTextRanges( ) const +{ + TextRangesRef ret = 0; + ATEErr error = sStories->GetTextRanges(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +ITextRanges IStories::GetTextSelection( ) const +{ + TextRangesRef ret = 0; + ATEErr error = sStories->GetTextSelection(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +IParagraphsIterator IStories::GetParagraphsIterator( ) const +{ + ParagraphsIteratorRef ret = 0; + ATEErr error = sStories->GetParagraphsIterator(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return IParagraphsIterator(ret); +} + +IWordsIterator IStories::GetWordsIterator( ) const +{ + WordsIteratorRef ret = 0; + ATEErr error = sStories->GetWordsIterator(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return IWordsIterator(ret); +} + +ITextRunsIterator IStories::GetTextRunsIterator( ) const +{ + TextRunsIteratorRef ret = 0; + ATEErr error = sStories->GetTextRunsIterator(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRunsIterator(ret); +} + +IDocumentTextResources IStories::GetDocumentTextResources( ) const +{ + DocumentTextResourcesRef ret = 0; + ATEErr error = sStories->GetDocumentTextResources(fStories, &ret); + if(error) Throw_ATE_Exception(error); + return IDocumentTextResources(ret); +} + +IStory IStories::Item( ATETextDOM::Int32 nIndex) const +{ + StoryRef ret = 0; + ATEErr error = sStories->Item(fStories, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return IStory(ret); +} + +void IStories::SuspendReflow( ) +{ + ATEErr error = sStories->SuspendReflow(fStories); + if(error) Throw_ATE_Exception(error); +} + +void IStories::ResumeReflow( ) +{ + ATEErr error = sStories->ResumeReflow(fStories); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IStory-- +////////////////////////////////////////////// + +IStory::IStory() +:fStory(0) +{ +} + +IStory::IStory(StoryRef story) +:fStory(story) +{ +} + +IStory::IStory(const IStory& src) +:fStory(src.fStory) +{ + sStory->AddRef(fStory); +} + +IStory::~IStory() +{ + sStory->Release(fStory); +} + +IStory& IStory::operator=(const IStory& rhs) +{ + if (&rhs != this) + { + sStory->Release(fStory); + fStory = rhs.fStory; + sStory->AddRef(fStory); + } + return *this; +} + +bool IStory::operator==(const IStory& rhs) const +{ + ATEBool8 ret = false; + ATEErr error = sStory->IsEqual(fStory, rhs.fStory, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IStory::operator!=(const IStory& rhs) const +{ + return !(*this == rhs); +} + +StoryRef IStory::GetRef() const +{ + return fStory; +} + +bool IStory::IsNull() const +{ + return sStory->IsNull(fStory); +} + +ATETextDOM::Int32 IStory::GetIndex( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sStory->GetIndex(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IStory::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sStory->GetSize(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IStories IStory::GetStories( ) const +{ + StoriesRef ret = 0; + ATEErr error = sStory->GetStories(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return IStories(ret); +} + +ITextRange IStory::GetTextRange( ) const +{ + TextRangeRef ret = 0; + ATEErr error = sStory->GetTextRange_ForThisStory(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +ITextRanges IStory::GetTextSelection( ) const +{ + TextRangesRef ret = 0; + ATEErr error = sStory->GetTextSelection(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +IParagraphsIterator IStory::GetParagraphsIterator( ) const +{ + ParagraphsIteratorRef ret = 0; + ATEErr error = sStory->GetParagraphsIterator(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return IParagraphsIterator(ret); +} + +IWordsIterator IStory::GetWordsIterator( ) const +{ + WordsIteratorRef ret = 0; + ATEErr error = sStory->GetWordsIterator(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return IWordsIterator(ret); +} + +ITextRunsIterator IStory::GetTextRunsIterator( ) const +{ + TextRunsIteratorRef ret = 0; + ATEErr error = sStory->GetTextRunsIterator(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRunsIterator(ret); +} + +ITextFramesIterator IStory::GetTextFramesIterator( ) const +{ + TextFramesIteratorRef ret = 0; + ATEErr error = sStory->GetTextFramesIterator(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return ITextFramesIterator(ret); +} + +ITextFrame IStory::GetFrame( ATETextDOM::Int32 frameIndex) const +{ + TextFrameRef ret = 0; + ATEErr error = sStory->GetFrame(fStory, frameIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ITextFrame(ret); +} + +void IStory::SetKernForSelection( const ITextRange& textRange, AutoKernType autoKernType) +{ + ATEErr error = sStory->SetKernForSelection(fStory, textRange.GetRef(), autoKernType); + if(error) Throw_ATE_Exception(error); +} + +void IStory::SetKernAtChar( ATETextDOM::Int32 charIndex, ATETextDOM::Int32 value) +{ + ATEErr error = sStory->SetKernAtChar(fStory, charIndex, value); + if(error) Throw_ATE_Exception(error); +} + +void IStory::GetKern( const ITextRange& textRange, AutoKernType* pAutoKernType, ATETextDOM::Int32* value) const +{ + ATEErr error = sStory->GetKern(fStory, textRange.GetRef(), pAutoKernType, value); + if(error) Throw_ATE_Exception(error); +} + +AutoKernType IStory::GetModelKernAtChar( ATETextDOM::Int32 charIndex, ATETextDOM::Int32* pManualKernValue) const +{ + AutoKernType ret; + ATEErr error = sStory->GetModelKernAtChar(fStory, charIndex, pManualKernValue, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ITextRange IStory::GetTextRange( ATETextDOM::Int32 start, ATETextDOM::Int32 end) const +{ + TextRangeRef ret = 0; + ATEErr error = sStory->GetTextRange(fStory, start, end, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +IStory IStory::Duplicate( ) +{ + StoryRef ret = 0; + ATEErr error = sStory->Duplicate(fStory, &ret); + if(error) Throw_ATE_Exception(error); + return IStory(ret); +} + +void IStory::SuspendReflow( ) +{ + ATEErr error = sStory->SuspendReflow(fStory); + if(error) Throw_ATE_Exception(error); +} + +void IStory::ResumeReflow( ) +{ + ATEErr error = sStory->ResumeReflow(fStory); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --ITabStop-- +////////////////////////////////////////////// + +ITabStop::ITabStop() +:fTabStop(0) +{ + ATEErr error = sTabStop->Initialize(&fTabStop); + if(error) Throw_ATE_Exception(error); +} + +ITabStop::ITabStop(TabStopRef tabstop) +:fTabStop(tabstop) +{ +} + +ITabStop::ITabStop(const ITabStop& src) +:fTabStop(src.fTabStop) +{ + sTabStop->AddRef(fTabStop); +} + +ITabStop::~ITabStop() +{ + sTabStop->Release(fTabStop); +} + +ITabStop& ITabStop::operator=(const ITabStop& rhs) +{ + if (&rhs != this) + { + sTabStop->Release(fTabStop); + fTabStop = rhs.fTabStop; + sTabStop->AddRef(fTabStop); + } + return *this; +} + +bool ITabStop::operator==(const ITabStop& rhs) const +{ + return fTabStop == rhs.fTabStop; +} + +bool ITabStop::operator!=(const ITabStop& rhs) const +{ + return !(*this == rhs); +} + +TabStopRef ITabStop::GetRef() const +{ + return fTabStop; +} + +bool ITabStop::IsNull() const +{ + return sTabStop->IsNull(fTabStop); +} + +TabType ITabStop::GetTabType( ) const +{ + TabType ret; + ATEErr error = sTabStop->GetTabType(fTabStop, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITabStop::SetTabType( TabType tabType) +{ + ATEErr error = sTabStop->SetTabType(fTabStop, tabType); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Real ITabStop::GetPosition( ) const +{ + ATETextDOM::Real ret; + ATETextDOM::Float tempRet; + ATEErr error = sTabStop->GetPosition(fTabStop, &tempRet); + if(error) Throw_ATE_Exception(error); + ret = tempRet; + return ret; +} + +void ITabStop::SetPosition( ATETextDOM::Real position) +{ + ATEErr error = sTabStop->SetPosition(fTabStop, static_cast(position)); + if(error) Throw_ATE_Exception(error); +} + +bool ITabStop::HasLeader( ) const +{ + ATEBool8 ret; + ATEErr error = sTabStop->HasLeader(fTabStop, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITabStop::GetLeader( ATETextDOM::Unicode* leader, ATETextDOM::Int32 maxLength) const +{ + ATEErr error = sTabStop->GetLeader(fTabStop, leader, maxLength); + if(error) Throw_ATE_Exception(error); +} + +void ITabStop::SetLeader( ATETextDOM::Unicode* leader) +{ + ATEErr error = sTabStop->SetLeader(fTabStop, leader); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Unicode ITabStop::GetDecimalCharacter( ) const +{ + ATETextDOM::Unicode ret; + ATEErr error = sTabStop->GetDecimalCharacter(fTabStop, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITabStop::SetDecimalCharacter( ATETextDOM::Unicode decimalChar) +{ + ATEErr error = sTabStop->SetDecimalCharacter(fTabStop, decimalChar); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --ITabStops-- +////////////////////////////////////////////// + +ITabStops::ITabStops() +:fTabStops(0) +{ + ATEErr error = sTabStops->Initialize(&fTabStops); + if(error) Throw_ATE_Exception(error); +} + +ITabStops::ITabStops(TabStopsRef tabstops) +:fTabStops(tabstops) +{ +} + +ITabStops::ITabStops(const ITabStops& src) +:fTabStops(src.fTabStops) +{ + sTabStops->AddRef(fTabStops); +} + +ITabStops::~ITabStops() +{ + sTabStops->Release(fTabStops); +} + +ITabStops& ITabStops::operator=(const ITabStops& rhs) +{ + if (&rhs != this) + { + sTabStops->Release(fTabStops); + fTabStops = rhs.fTabStops; + sTabStops->AddRef(fTabStops); + } + return *this; +} + +bool ITabStops::operator==(const ITabStops& rhs) const +{ + return fTabStops == rhs.fTabStops; +} + +bool ITabStops::operator!=(const ITabStops& rhs) const +{ + return !(*this == rhs); +} + +TabStopsRef ITabStops::GetRef() const +{ + return fTabStops; +} + +bool ITabStops::IsNull() const +{ + return sTabStops->IsNull(fTabStops); +} + +ATETextDOM::Int32 ITabStops::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTabStops->GetSize(fTabStops, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ITabStop ITabStops::GetFirst( ) const +{ + TabStopRef ret = 0; + ATEErr error = sTabStops->GetFirst(fTabStops, &ret); + if(error) Throw_ATE_Exception(error); + return ITabStop(ret); +} + +ITabStop ITabStops::GetLast( ) const +{ + TabStopRef ret = 0; + ATEErr error = sTabStops->GetLast(fTabStops, &ret); + if(error) Throw_ATE_Exception(error); + return ITabStop(ret); +} + +void ITabStops::ReplaceOrAdd( const ITabStop& pTabStop) +{ + ATEErr error = sTabStops->ReplaceOrAdd(fTabStops, pTabStop.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +ITabStop ITabStops::Item( ATETextDOM::Int32 nIndex) const +{ + TabStopRef ret = 0; + ATEErr error = sTabStops->Item(fTabStops, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ITabStop(ret); +} + +void ITabStops::Remove( ATETextDOM::Int32 nIndex) +{ + ATEErr error = sTabStops->Remove(fTabStops, nIndex); + if(error) Throw_ATE_Exception(error); +} + +void ITabStops::RemoveAll( ) +{ + ATEErr error = sTabStops->RemoveAll(fTabStops); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --ITabStopsIterator-- +////////////////////////////////////////////// + +ITabStopsIterator::ITabStopsIterator() +:fTabStopsIterator(0) +{ +} + +ITabStopsIterator::ITabStopsIterator(TabStopsIteratorRef tabstopsiterator) +:fTabStopsIterator(tabstopsiterator) +{ +} + +ITabStopsIterator::ITabStopsIterator(const ITabStopsIterator& src) +:fTabStopsIterator(src.fTabStopsIterator) +{ + sTabStopsIterator->AddRef(fTabStopsIterator); +} + +ITabStopsIterator::~ITabStopsIterator() +{ + sTabStopsIterator->Release(fTabStopsIterator); +} + +ITabStopsIterator& ITabStopsIterator::operator=(const ITabStopsIterator& rhs) +{ + if (&rhs != this) + { + sTabStopsIterator->Release(fTabStopsIterator); + fTabStopsIterator = rhs.fTabStopsIterator; + sTabStopsIterator->AddRef(fTabStopsIterator); + } + return *this; +} + +bool ITabStopsIterator::operator==(const ITabStopsIterator& rhs) const +{ + return fTabStopsIterator == rhs.fTabStopsIterator; +} + +bool ITabStopsIterator::operator!=(const ITabStopsIterator& rhs) const +{ + return !(*this == rhs); +} + +TabStopsIteratorRef ITabStopsIterator::GetRef() const +{ + return fTabStopsIterator; +} + +bool ITabStopsIterator::IsNull() const +{ + return sTabStopsIterator->IsNull(fTabStopsIterator); +} + +ITabStopsIterator::ITabStopsIterator( ITabStops tabStops, Direction direction) +{ + ATEErr error = sTabStopsIterator->Initialize(tabStops.GetRef(), direction, &fTabStopsIterator); + if(error) Throw_ATE_Exception(error); +} + +bool ITabStopsIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTabStopsIterator->IsDone(fTabStopsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITabStopsIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTabStopsIterator->IsNotDone(fTabStopsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITabStopsIterator::IsEmpty( ) +{ + ATEBool8 ret; + ATEErr error = sTabStopsIterator->IsEmpty(fTabStopsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITabStopsIterator::MoveToFirst( ) +{ + ATEErr error = sTabStopsIterator->MoveToFirst(fTabStopsIterator); + if(error) Throw_ATE_Exception(error); +} + +void ITabStopsIterator::MoveToLast( ) +{ + ATEErr error = sTabStopsIterator->MoveToLast(fTabStopsIterator); + if(error) Throw_ATE_Exception(error); +} + +void ITabStopsIterator::Next( ) +{ + ATEErr error = sTabStopsIterator->Next(fTabStopsIterator); + if(error) Throw_ATE_Exception(error); +} + +ITabStop ITabStopsIterator::Item( ) const +{ + TabStopRef ret = 0; + ATEErr error = sTabStopsIterator->Item(fTabStopsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ITabStop(ret); +} + +////////////////////////////////////////////// +// --ITextRange-- +////////////////////////////////////////////// + +ITextRange::ITextRange() +:fTextRange(0) +{ +} + +ITextRange::ITextRange(TextRangeRef textrange) +:fTextRange(textrange) +{ +} + +ITextRange::ITextRange(const ITextRange& src) +:fTextRange(src.fTextRange) +{ + sTextRange->AddRef(fTextRange); +} + +ITextRange::~ITextRange() +{ + sTextRange->Release(fTextRange); +} + +ITextRange& ITextRange::operator=(const ITextRange& rhs) +{ + if (&rhs != this) + { + sTextRange->Release(fTextRange); + fTextRange = rhs.fTextRange; + sTextRange->AddRef(fTextRange); + } + return *this; +} + +bool ITextRange::operator==(const ITextRange& rhs) const +{ + ATEBool8 ret = false; + ATEErr error = sTextRange->IsEqual(fTextRange, rhs.fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRange::operator!=(const ITextRange& rhs) const +{ + return !(*this == rhs); +} + +TextRangeRef ITextRange::GetRef() const +{ + return fTextRange; +} + +bool ITextRange::IsNull() const +{ + return sTextRange->IsNull(fTextRange); +} + +ATETextDOM::Int32 ITextRange::GetStart( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRange->GetStart(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextRange::SetStart( ATETextDOM::Int32 start) +{ + ATEErr error = sTextRange->SetStart(fTextRange, start); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 ITextRange::GetEnd( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRange->GetEnd(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextRange::SetEnd( ATETextDOM::Int32 end) +{ + ATEErr error = sTextRange->SetEnd(fTextRange, end); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 ITextRange::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRange->GetSize(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +IStory ITextRange::GetStory( ) const +{ + StoryRef ret = 0; + ATEErr error = sTextRange->GetStory(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return IStory(ret); +} + +ITextRanges ITextRange::GetTextSelection( ) const +{ + TextRangesRef ret = 0; + ATEErr error = sTextRange->GetTextSelection(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +ITextFramesIterator ITextRange::GetTextFramesIterator( ) const +{ + TextFramesIteratorRef ret = 0; + ATEErr error = sTextRange->GetTextFramesIterator(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ITextFramesIterator(ret); +} + +IParagraphsIterator ITextRange::GetParagraphsIterator( ) const +{ + ParagraphsIteratorRef ret = 0; + ATEErr error = sTextRange->GetParagraphsIterator(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return IParagraphsIterator(ret); +} + +IWordsIterator ITextRange::GetWordsIterator( ) const +{ + WordsIteratorRef ret = 0; + ATEErr error = sTextRange->GetWordsIterator(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return IWordsIterator(ret); +} + +ITextRunsIterator ITextRange::GetTextRunsIterator( ) const +{ + TextRunsIteratorRef ret = 0; + ATEErr error = sTextRange->GetTextRunsIterator(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRunsIterator(ret); +} + +ICharInspector ITextRange::GetCharInspector( ) const +{ + CharInspectorRef ret = 0; + ATEErr error = sTextRange->GetCharInspector(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ICharInspector(ret); +} + +IParaInspector ITextRange::GetParaInspector( ) const +{ + ParaInspectorRef ret = 0; + ATEErr error = sTextRange->GetParaInspector(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return IParaInspector(ret); +} + +ICharStyles ITextRange::GetNamedCharStyles( ) const +{ + CharStylesRef ret = 0; + ATEErr error = sTextRange->GetNamedCharStyles(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ICharStyles(ret); +} + +IParaStyles ITextRange::GetNamedParaStyles( ) const +{ + ParaStylesRef ret = 0; + ATEErr error = sTextRange->GetNamedParaStyles(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return IParaStyles(ret); +} + +bool ITextRange::SetNamedCharStyle( const ATETextDOM::Unicode* pName) +{ + ATEBool8 ret; + ATEErr error = sTextRange->SetNamedCharStyle(fTextRange, pName, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRange::SetNamedParaStyle( const ATETextDOM::Unicode* pName) +{ + ATEBool8 ret; + ATEErr error = sTextRange->SetNamedParaStyle(fTextRange, pName, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextRange::ClearNamedCharStyle( ) +{ + ATEErr error = sTextRange->ClearNamedCharStyle(fTextRange); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::ClearNamedParaStyle( ) +{ + ATEErr error = sTextRange->ClearNamedParaStyle(fTextRange); + if(error) Throw_ATE_Exception(error); +} + +ICharFeatures ITextRange::GetUniqueCharFeatures( ) const +{ + CharFeaturesRef ret = 0; + ATEErr error = sTextRange->GetUniqueCharFeatures(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ICharFeatures(ret); +} + +IParaFeatures ITextRange::GetUniqueParaFeatures( ) const +{ + ParaFeaturesRef ret = 0; + ATEErr error = sTextRange->GetUniqueParaFeatures(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return IParaFeatures(ret); +} + +bool ITextRange::HasLocalCharFeatures( ) +{ + ATEBool8 ret; + ATEErr error = sTextRange->HasLocalCharFeatures(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRange::HasLocalParaFeatures( ) +{ + ATEBool8 ret; + ATEErr error = sTextRange->HasLocalParaFeatures(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICharFeatures ITextRange::GetUniqueLocalCharFeatures( ) +{ + CharFeaturesRef ret = 0; + ATEErr error = sTextRange->GetUniqueLocalCharFeatures(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ICharFeatures(ret); +} + +IParaFeatures ITextRange::GetUniqueLocalParaFeatures( ) +{ + ParaFeaturesRef ret = 0; + ATEErr error = sTextRange->GetUniqueLocalParaFeatures(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return IParaFeatures(ret); +} + +void ITextRange::SetLocalCharFeatures( const ICharFeatures& pFeatures) +{ + ATEErr error = sTextRange->SetLocalCharFeatures(fTextRange, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::ReplaceOrAddLocalCharFeatures( const ICharFeatures& pFeatures) +{ + ATEErr error = sTextRange->ReplaceOrAddLocalCharFeatures(fTextRange, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::ClearLocalCharFeatures( ) +{ + ATEErr error = sTextRange->ClearLocalCharFeatures(fTextRange); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::SetLocalParaFeatures( const IParaFeatures& pFeatures) +{ + ATEErr error = sTextRange->SetLocalParaFeatures(fTextRange, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::ReplaceOrAddLocalParaFeatures( const IParaFeatures& pFeatures) +{ + ATEErr error = sTextRange->ReplaceOrAddLocalParaFeatures(fTextRange, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::ClearLocalParaFeatures( ) +{ + ATEErr error = sTextRange->ClearLocalParaFeatures(fTextRange); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::SetStory( const IStory& story) +{ + ATEErr error = sTextRange->SetStory(fTextRange, story.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::SetRange( ATETextDOM::Int32 start, ATETextDOM::Int32 end) +{ + ATEErr error = sTextRange->SetRange(fTextRange, start, end); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::Collapse( CollapseDirection direction) +{ + ATEErr error = sTextRange->Collapse(fTextRange, direction); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 ITextRange::Move( ATETextDOM::Int32 unit) +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRange->Move(fTextRange, unit, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ITextRange ITextRange::Clone( ) const +{ + TextRangeRef ret = 0; + ATEErr error = sTextRange->Clone(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +void ITextRange::InsertBefore( const ATETextDOM::Unicode* text, ATETextDOM::Int32 length) +{ + ATEErr error = sTextRange->InsertBefore_AsUnicode(fTextRange, text, length); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::InsertAfter( const ATETextDOM::Unicode* text, ATETextDOM::Int32 length) +{ + ATEErr error = sTextRange->InsertAfter_AsUnicode(fTextRange, text, length); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::InsertBefore( const ITextRange& anotherRange) +{ + ATEErr error = sTextRange->InsertBefore_AsTextRange(fTextRange, anotherRange.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::InsertAfter( const ITextRange& anotherRange) +{ + ATEErr error = sTextRange->InsertAfter_AsTextRange(fTextRange, anotherRange.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 ITextRange::GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRange->GetContents_AsUnicode(fTextRange, text, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ITextRange::GetContents( char* text, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRange->GetContents_AsChar(fTextRange, text, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRange::GetSingleGlyphInRange( ATEGlyphID* pSingleGlyph) const +{ + ATEBool8 ret; + ATEErr error = sTextRange->GetSingleGlyphInRange(fTextRange, pSingleGlyph, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextRange::Select( bool addToSelection) +{ + ATEErr error = sTextRange->Select(fTextRange, addToSelection); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::DeSelect( ) +{ + ATEErr error = sTextRange->DeSelect(fTextRange); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::ChangeCase( CaseChangeType caseChangeType) +{ + ATEErr error = sTextRange->ChangeCase(fTextRange, caseChangeType); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::FitHeadlines( ) +{ + ATEErr error = sTextRange->FitHeadlines(fTextRange); + if(error) Throw_ATE_Exception(error); +} + +void ITextRange::Remove( ) +{ + ATEErr error = sTextRange->Remove(fTextRange); + if(error) Throw_ATE_Exception(error); +} + +ASCharType ITextRange::GetCharacterType( ) const +{ + ASCharType ret; + ATEErr error = sTextRange->GetCharacterType(fTextRange, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +////////////////////////////////////////////// +// --ITextRanges-- +////////////////////////////////////////////// + +ITextRanges::ITextRanges() +:fTextRanges(0) +{ + ATEErr error = sTextRanges->Initialize(&fTextRanges); + if(error) Throw_ATE_Exception(error); +} + +ITextRanges::ITextRanges(TextRangesRef textranges) +:fTextRanges(textranges) +{ +} + +ITextRanges::ITextRanges(const ITextRanges& src) +:fTextRanges(src.fTextRanges) +{ + sTextRanges->AddRef(fTextRanges); +} + +ITextRanges::~ITextRanges() +{ + sTextRanges->Release(fTextRanges); +} + +ITextRanges& ITextRanges::operator=(const ITextRanges& rhs) +{ + if (&rhs != this) + { + sTextRanges->Release(fTextRanges); + fTextRanges = rhs.fTextRanges; + sTextRanges->AddRef(fTextRanges); + } + return *this; +} + +bool ITextRanges::operator==(const ITextRanges& rhs) const +{ + return fTextRanges == rhs.fTextRanges; +} + +bool ITextRanges::operator!=(const ITextRanges& rhs) const +{ + return !(*this == rhs); +} + +TextRangesRef ITextRanges::GetRef() const +{ + return fTextRanges; +} + +bool ITextRanges::IsNull() const +{ + return sTextRanges->IsNull(fTextRanges); +} + +ATETextDOM::Int32 ITextRanges::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRanges->GetSize(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ITextRange ITextRanges::GetFirst( ) const +{ + TextRangeRef ret = 0; + ATEErr error = sTextRanges->GetFirst(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +ITextRange ITextRanges::GetLast( ) const +{ + TextRangeRef ret = 0; + ATEErr error = sTextRanges->GetLast(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +ITextRanges ITextRanges::GetTextSelection( ) const +{ + TextRangesRef ret = 0; + ATEErr error = sTextRanges->GetTextSelection(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRanges(ret); +} + +IParagraphsIterator ITextRanges::GetParagraphsIterator( ) const +{ + ParagraphsIteratorRef ret = 0; + ATEErr error = sTextRanges->GetParagraphsIterator(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return IParagraphsIterator(ret); +} + +IWordsIterator ITextRanges::GetWordsIterator( ) const +{ + WordsIteratorRef ret = 0; + ATEErr error = sTextRanges->GetWordsIterator(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return IWordsIterator(ret); +} + +ITextRunsIterator ITextRanges::GetTextRunsIterator( ) const +{ + TextRunsIteratorRef ret = 0; + ATEErr error = sTextRanges->GetTextRunsIterator(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRunsIterator(ret); +} + +ICharInspector ITextRanges::GetCharInspector( ) const +{ + CharInspectorRef ret = 0; + ATEErr error = sTextRanges->GetCharInspector(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ICharInspector(ret); +} + +IParaInspector ITextRanges::GetParaInspector( ) const +{ + ParaInspectorRef ret = 0; + ATEErr error = sTextRanges->GetParaInspector(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return IParaInspector(ret); +} + +void ITextRanges::ClearNamedCharStyle( ) +{ + ATEErr error = sTextRanges->ClearNamedCharStyle(fTextRanges); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::ClearNamedParaStyle( ) +{ + ATEErr error = sTextRanges->ClearNamedParaStyle(fTextRanges); + if(error) Throw_ATE_Exception(error); +} + +ICharFeatures ITextRanges::GetUniqueCharFeatures( ) const +{ + CharFeaturesRef ret = 0; + ATEErr error = sTextRanges->GetUniqueCharFeatures(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ICharFeatures(ret); +} + +IParaFeatures ITextRanges::GetUniqueParaFeatures( ) const +{ + ParaFeaturesRef ret = 0; + ATEErr error = sTextRanges->GetUniqueParaFeatures(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return IParaFeatures(ret); +} + +bool ITextRanges::HasLocalCharFeatures( ) +{ + ATEBool8 ret; + ATEErr error = sTextRanges->HasLocalCharFeatures(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRanges::HasLocalParaFeatures( ) +{ + ATEBool8 ret; + ATEErr error = sTextRanges->HasLocalParaFeatures(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ICharFeatures ITextRanges::GetUniqueLocalCharFeatures( ) +{ + CharFeaturesRef ret = 0; + ATEErr error = sTextRanges->GetUniqueLocalCharFeatures(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return ICharFeatures(ret); +} + +IParaFeatures ITextRanges::GetUniqueLocalParaFeatures( ) +{ + ParaFeaturesRef ret = 0; + ATEErr error = sTextRanges->GetUniqueLocalParaFeatures(fTextRanges, &ret); + if(error) Throw_ATE_Exception(error); + return IParaFeatures(ret); +} + +void ITextRanges::SetLocalCharFeatures( const ICharFeatures& pFeatures) +{ + ATEErr error = sTextRanges->SetLocalCharFeatures(fTextRanges, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::ReplaceOrAddLocalCharFeatures( const ICharFeatures& pFeatures) +{ + ATEErr error = sTextRanges->ReplaceOrAddLocalCharFeatures(fTextRanges, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::ClearLocalCharFeatures( ) +{ + ATEErr error = sTextRanges->ClearLocalCharFeatures(fTextRanges); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::SetLocalParaFeatures( const IParaFeatures& pFeatures) +{ + ATEErr error = sTextRanges->SetLocalParaFeatures(fTextRanges, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::ReplaceOrAddLocalParaFeatures( const IParaFeatures& pFeatures) +{ + ATEErr error = sTextRanges->ReplaceOrAddLocalParaFeatures(fTextRanges, pFeatures.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::ClearLocalParaFeatures( ) +{ + ATEErr error = sTextRanges->ClearLocalParaFeatures(fTextRanges); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::Select( bool addToSelection) +{ + ATEErr error = sTextRanges->Select(fTextRanges, addToSelection); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::DeSelect( ) +{ + ATEErr error = sTextRanges->DeSelect(fTextRanges); + if(error) Throw_ATE_Exception(error); +} + +ATETextDOM::Int32 ITextRanges::GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRanges->GetContents_AsUnicode(fTextRanges, text, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 ITextRanges::GetContents( char* text, ATETextDOM::Int32 maxLength) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sTextRanges->GetContents_AsChar(fTextRanges, text, maxLength, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextRanges::ChangeCase( CaseChangeType caseChangeType) +{ + ATEErr error = sTextRanges->ChangeCase(fTextRanges, caseChangeType); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::Add( const ITextRange& textRange) +{ + ATEErr error = sTextRanges->Add(fTextRanges, textRange.GetRef()); + if(error) Throw_ATE_Exception(error); +} + +ITextRange ITextRanges::Item( ATETextDOM::Int32 nIndex) const +{ + TextRangeRef ret = 0; + ATEErr error = sTextRanges->Item(fTextRanges, nIndex, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +void ITextRanges::RemoveAll( ) +{ + ATEErr error = sTextRanges->RemoveAll(fTextRanges); + if(error) Throw_ATE_Exception(error); +} + +void ITextRanges::Remove( ATETextDOM::Int32 nIndex) +{ + ATEErr error = sTextRanges->Remove(fTextRanges, nIndex); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --ITextRangesIterator-- +////////////////////////////////////////////// + +ITextRangesIterator::ITextRangesIterator() +:fTextRangesIterator(0) +{ +} + +ITextRangesIterator::ITextRangesIterator(TextRangesIteratorRef textrangesiterator) +:fTextRangesIterator(textrangesiterator) +{ +} + +ITextRangesIterator::ITextRangesIterator(const ITextRangesIterator& src) +:fTextRangesIterator(src.fTextRangesIterator) +{ + sTextRangesIterator->AddRef(fTextRangesIterator); +} + +ITextRangesIterator::~ITextRangesIterator() +{ + sTextRangesIterator->Release(fTextRangesIterator); +} + +ITextRangesIterator& ITextRangesIterator::operator=(const ITextRangesIterator& rhs) +{ + if (&rhs != this) + { + sTextRangesIterator->Release(fTextRangesIterator); + fTextRangesIterator = rhs.fTextRangesIterator; + sTextRangesIterator->AddRef(fTextRangesIterator); + } + return *this; +} + +bool ITextRangesIterator::operator==(const ITextRangesIterator& rhs) const +{ + return fTextRangesIterator == rhs.fTextRangesIterator; +} + +bool ITextRangesIterator::operator!=(const ITextRangesIterator& rhs) const +{ + return !(*this == rhs); +} + +TextRangesIteratorRef ITextRangesIterator::GetRef() const +{ + return fTextRangesIterator; +} + +bool ITextRangesIterator::IsNull() const +{ + return sTextRangesIterator->IsNull(fTextRangesIterator); +} + +ITextRangesIterator::ITextRangesIterator( ITextRanges textRanges, Direction direction) +{ + ATEErr error = sTextRangesIterator->Initialize(textRanges.GetRef(), direction, &fTextRangesIterator); + if(error) Throw_ATE_Exception(error); +} + +ITextRangesIterator ITextRangesIterator::Clone( ) const +{ + TextRangesIteratorRef ret = 0; + ATEErr error = sTextRangesIterator->Clone(fTextRangesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRangesIterator(ret); +} + +bool ITextRangesIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTextRangesIterator->IsNotDone(fTextRangesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRangesIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTextRangesIterator->IsDone(fTextRangesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRangesIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sTextRangesIterator->IsEmpty(fTextRangesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextRangesIterator::MoveToFirst( ) +{ + ATEErr error = sTextRangesIterator->MoveToFirst(fTextRangesIterator); + if(error) Throw_ATE_Exception(error); +} + +void ITextRangesIterator::MoveToLast( ) +{ + ATEErr error = sTextRangesIterator->MoveToLast(fTextRangesIterator); + if(error) Throw_ATE_Exception(error); +} + +void ITextRangesIterator::Next( ) +{ + ATEErr error = sTextRangesIterator->Next(fTextRangesIterator); + if(error) Throw_ATE_Exception(error); +} + +ITextRange ITextRangesIterator::Item( ) const +{ + TextRangeRef ret = 0; + ATEErr error = sTextRangesIterator->Item(fTextRangesIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +////////////////////////////////////////////// +// --ITextRunsIterator-- +////////////////////////////////////////////// + +ITextRunsIterator::ITextRunsIterator() +:fTextRunsIterator(0) +{ +} + +ITextRunsIterator::ITextRunsIterator(TextRunsIteratorRef textrunsiterator) +:fTextRunsIterator(textrunsiterator) +{ +} + +ITextRunsIterator::ITextRunsIterator(const ITextRunsIterator& src) +:fTextRunsIterator(src.fTextRunsIterator) +{ + sTextRunsIterator->AddRef(fTextRunsIterator); +} + +ITextRunsIterator::~ITextRunsIterator() +{ + sTextRunsIterator->Release(fTextRunsIterator); +} + +ITextRunsIterator& ITextRunsIterator::operator=(const ITextRunsIterator& rhs) +{ + if (&rhs != this) + { + sTextRunsIterator->Release(fTextRunsIterator); + fTextRunsIterator = rhs.fTextRunsIterator; + sTextRunsIterator->AddRef(fTextRunsIterator); + } + return *this; +} + +bool ITextRunsIterator::operator==(const ITextRunsIterator& rhs) const +{ + return fTextRunsIterator == rhs.fTextRunsIterator; +} + +bool ITextRunsIterator::operator!=(const ITextRunsIterator& rhs) const +{ + return !(*this == rhs); +} + +TextRunsIteratorRef ITextRunsIterator::GetRef() const +{ + return fTextRunsIterator; +} + +bool ITextRunsIterator::IsNull() const +{ + return sTextRunsIterator->IsNull(fTextRunsIterator); +} + +ITextRunsIterator::ITextRunsIterator( const ITextRanges& ranges, Direction direction) +{ + ATEErr error = sTextRunsIterator->Initialize(ranges.GetRef(), direction, &fTextRunsIterator); + if(error) Throw_ATE_Exception(error); +} + +bool ITextRunsIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTextRunsIterator->IsNotDone(fTextRunsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRunsIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sTextRunsIterator->IsDone(fTextRunsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool ITextRunsIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sTextRunsIterator->IsEmpty(fTextRunsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void ITextRunsIterator::MoveToFirst( ) +{ + ATEErr error = sTextRunsIterator->MoveToFirst(fTextRunsIterator); + if(error) Throw_ATE_Exception(error); +} + +void ITextRunsIterator::MoveToLast( ) +{ + ATEErr error = sTextRunsIterator->MoveToLast(fTextRunsIterator); + if(error) Throw_ATE_Exception(error); +} + +void ITextRunsIterator::Next( ) +{ + ATEErr error = sTextRunsIterator->Next(fTextRunsIterator); + if(error) Throw_ATE_Exception(error); +} + +ITextRange ITextRunsIterator::Item( ) const +{ + TextRangeRef ret = 0; + ATEErr error = sTextRunsIterator->Item(fTextRunsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +////////////////////////////////////////////// +// --IWordsIterator-- +////////////////////////////////////////////// + +IWordsIterator::IWordsIterator() +:fWordsIterator(0) +{ +} + +IWordsIterator::IWordsIterator(WordsIteratorRef wordsiterator) +:fWordsIterator(wordsiterator) +{ +} + +IWordsIterator::IWordsIterator(const IWordsIterator& src) +:fWordsIterator(src.fWordsIterator) +{ + sWordsIterator->AddRef(fWordsIterator); +} + +IWordsIterator::~IWordsIterator() +{ + sWordsIterator->Release(fWordsIterator); +} + +IWordsIterator& IWordsIterator::operator=(const IWordsIterator& rhs) +{ + if (&rhs != this) + { + sWordsIterator->Release(fWordsIterator); + fWordsIterator = rhs.fWordsIterator; + sWordsIterator->AddRef(fWordsIterator); + } + return *this; +} + +bool IWordsIterator::operator==(const IWordsIterator& rhs) const +{ + return fWordsIterator == rhs.fWordsIterator; +} + +bool IWordsIterator::operator!=(const IWordsIterator& rhs) const +{ + return !(*this == rhs); +} + +WordsIteratorRef IWordsIterator::GetRef() const +{ + return fWordsIterator; +} + +bool IWordsIterator::IsNull() const +{ + return sWordsIterator->IsNull(fWordsIterator); +} + +IWordsIterator::IWordsIterator( const ITextRanges& ranges, Direction direction) +{ + ATEErr error = sWordsIterator->Initialize(ranges.GetRef(), direction, &fWordsIterator); + if(error) Throw_ATE_Exception(error); +} + +bool IWordsIterator::IsNotDone( ) const +{ + ATEBool8 ret; + ATEErr error = sWordsIterator->IsNotDone(fWordsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IWordsIterator::IsDone( ) const +{ + ATEBool8 ret; + ATEErr error = sWordsIterator->IsDone(fWordsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +bool IWordsIterator::IsEmpty( ) const +{ + ATEBool8 ret; + ATEErr error = sWordsIterator->IsEmpty(fWordsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IWordsIterator::MoveToFirst( ) +{ + ATEErr error = sWordsIterator->MoveToFirst(fWordsIterator); + if(error) Throw_ATE_Exception(error); +} + +void IWordsIterator::MoveToLast( ) +{ + ATEErr error = sWordsIterator->MoveToLast(fWordsIterator); + if(error) Throw_ATE_Exception(error); +} + +void IWordsIterator::Next( ) +{ + ATEErr error = sWordsIterator->Next(fWordsIterator); + if(error) Throw_ATE_Exception(error); +} + +ITextRange IWordsIterator::Item( ) const +{ + TextRangeRef ret = 0; + ATEErr error = sWordsIterator->Item(fWordsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ITextRange(ret); +} + +ATETextDOM::Int32 IWordsIterator::GetTrailingSpaceCount( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sWordsIterator->GetTrailingSpaceCount(fWordsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IWordsIterator::GetTrailingCount( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sWordsIterator->GetTrailingCount(fWordsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ATETextDOM::Int32 IWordsIterator::GetTrailingTerminatingPunctuationCount( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sWordsIterator->GetTrailingTerminatingPunctuationCount(fWordsIterator, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + + +////////////////////////////////////////////// +// --IArrayLine -- +////////////////////////////////////////////// + +IArrayLine::IArrayLine() +:fArrayLine(0) +{ +} + +IArrayLine::IArrayLine(ArrayLineRef rangeref) +:fArrayLine(rangeref) +{ +} + +IArrayLine::IArrayLine(const IArrayLine& src) +:fArrayLine(src.fArrayLine) +{ + sArrayLine->AddRef(fArrayLine); +} + +IArrayLine::~IArrayLine() +{ + sArrayLine->Release(fArrayLine); +} + +IArrayLine& IArrayLine::operator=(const IArrayLine& rhs) +{ + if (&rhs != this) + { + sArrayLine->Release(fArrayLine); + fArrayLine = rhs.fArrayLine; + sArrayLine->AddRef(fArrayLine); + } + return *this; +} + +bool IArrayLine::operator==(const IArrayLine& rhs) const +{ + return fArrayLine == rhs.fArrayLine; +} + +bool IArrayLine::operator!=(const IArrayLine& rhs) const +{ + return !(*this == rhs); +} + +ArrayLineRef IArrayLine::GetRef() const +{ + return fArrayLine; +} + +bool IArrayLine::IsNull() const +{ + return sArrayLine->IsNull(fArrayLine); +} + +ATETextDOM::Int32 IArrayLine::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayLine->GetSize(fArrayLine, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +void IArrayLine::Item( ATETextDOM::Int32 index, ATETextDOM::FloatPoint* retStart, ATETextDOM::FloatPoint* retEnd) const +{ + ATETextDOM::FloatPoint tempRetEnd,tempStartEnd; + ATEErr error = sArrayLine->Item(fArrayLine, index, &tempStartEnd, &tempRetEnd); + SloFloatPointToAIFloatPoint(&tempStartEnd,retStart); + SloFloatPointToAIFloatPoint(&tempRetEnd,retEnd); + if(error) Throw_ATE_Exception(error); +} + +////////////////////////////////////////////// +// --IArrayComposerEngine-- +////////////////////////////////////////////// + +IArrayComposerEngine::IArrayComposerEngine() +:fArrayComposerEngine(0) +{ +} + +IArrayComposerEngine::IArrayComposerEngine(ArrayComposerEngineRef arraycomposerengine) +:fArrayComposerEngine(arraycomposerengine) +{ +} + +IArrayComposerEngine::IArrayComposerEngine(const IArrayComposerEngine& src) +:fArrayComposerEngine(src.fArrayComposerEngine) +{ + sArrayComposerEngine->AddRef(fArrayComposerEngine); +} + +IArrayComposerEngine::~IArrayComposerEngine() +{ + sArrayComposerEngine->Release(fArrayComposerEngine); +} + +IArrayComposerEngine& IArrayComposerEngine::operator=(const IArrayComposerEngine& rhs) +{ + if (&rhs != this) + { + sArrayComposerEngine->Release(fArrayComposerEngine); + fArrayComposerEngine = rhs.fArrayComposerEngine; + sArrayComposerEngine->AddRef(fArrayComposerEngine); + } + return *this; +} + +bool IArrayComposerEngine::operator==(const IArrayComposerEngine& rhs) const +{ + return fArrayComposerEngine == rhs.fArrayComposerEngine; +} + +bool IArrayComposerEngine::operator!=(const IArrayComposerEngine& rhs) const +{ + return !(*this == rhs); +} + +ArrayComposerEngineRef IArrayComposerEngine::GetRef() const +{ + return fArrayComposerEngine; +} + +bool IArrayComposerEngine::IsNull() const +{ + return sArrayComposerEngine->IsNull(fArrayComposerEngine); +} + +ATETextDOM::Int32 IArrayComposerEngine::GetSize( ) const +{ + ATETextDOM::Int32 ret; + ATEErr error = sArrayComposerEngine->GetSize(fArrayComposerEngine, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ComposerEngine IArrayComposerEngine::GetFirst( ) const +{ + ComposerEngine ret; + ATEErr error = sArrayComposerEngine->GetFirst(fArrayComposerEngine, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ComposerEngine IArrayComposerEngine::GetLast( ) const +{ + ComposerEngine ret; + ATEErr error = sArrayComposerEngine->GetLast(fArrayComposerEngine, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +ComposerEngine IArrayComposerEngine::Item( ATETextDOM::Int32 index) const +{ + ComposerEngine ret; + ATEErr error = sArrayComposerEngine->Item(fArrayComposerEngine, index, &ret); + if(error) Throw_ATE_Exception(error); + return ret; +} + +} // namespace ATE diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/IText.h b/BloksAIPlugin/Vendor/illustratorapi/ate/IText.h index dce3ddf..4ee3096 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/IText.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/IText.h @@ -1,10570 +1,11081 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: IText.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ -#pragma once - -#include "ATESuites.h" -#include "ATEException.h" -#include "SloTextdomTypes.h" - -namespace ATE -{ -class IApplicationPaint; -class ICompFont; -class ICompFontClass; -class ICompFontClassSet; -class ICompFontComponent; -class ICompFontSet; -class IGlyphRun; -class IGlyphRunsIterator; -class IMojiKumi; -class IMojiKumiSet; -class ITextFrame; -class ITextFramesIterator; -class ITextLine; -class ITextLinesIterator; -class ITextResources; -class IApplicationTextResources; -class IDocumentTextResources; -class IVersionInfo; -class IArrayApplicationPaintRef; -class IArrayReal; -class IArrayBool; -class IArrayInteger; -class IArrayLineCapType; -class IArrayFigureStyle; -class IArrayLineJoinType; -class IArrayWariChuJustification; -class IArrayStyleRunAlignment; -class IArrayAutoKernType; -class IArrayBaselineDirection; -class IArrayLanguage; -class IArrayFontCapsOption; -class IArrayFontBaselineOption; -class IArrayFontOpenTypePositionOption; -class IArrayUnderlinePosition; -class IArrayStrikethroughPosition; -class IArrayParagraphJustification; -class IArrayArrayReal; -class IArrayBurasagariType; -class IArrayPreferredKinsokuOrder; -class IArrayKinsokuRef; -class IArrayMojiKumiRef; -class IArrayMojiKumiSetRef; -class IArrayTabStopsRef; -class IArrayLeadingType; -class IArrayFontRef; -class IArrayGlyphID; -class IArrayRealPoint; -class IArrayRealMatrix; -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only -class IArrayParagraphDirection; -class IArrayJustificationMethod; -class IArrayKashidaWidth; -class IArrayKashidas; -class IArrayDirOverride; -class IArrayDigitSet; -class IArrayDiacVPos; -#endif -class ICharFeatures; -class ICharInspector; -class ICharStyle; -class ICharStyles; -class ICharStylesIterator; -class IFind; -class IFont; -class IGlyph; -class IGlyphs; -class IGlyphsIterator; -class IKinsoku; -class IKinsokuSet; -class IParaFeatures; -class IParagraph; -class IParagraphsIterator; -class IParaInspector; -class IParaStyle; -class IParaStyles; -class IParaStylesIterator; -class ISpell; -class IStories; -class IStory; -class ITabStop; -class ITabStops; -class ITabStopsIterator; -class ITextRange; -class ITextRanges; -class ITextRangesIterator; -class ITextRunsIterator; -class IWordsIterator; -class IArrayLine; -class IArrayComposerEngine; -////////////////////////////////////////////// -// --IApplicationPaint-- -////////////////////////////////////////////// -/** Encapsulates Illustrator-specific painting of - fill and stroke for text, as defined by - the \c #AIATEPaintSuite. - - @see \c IArrayApplicationPaintRef */ -class IApplicationPaint -{ -private: - ApplicationPaintRef fApplicationPaint; -public: - /** Constructor - @return The new object. */ - IApplicationPaint(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IApplicationPaint(const IApplicationPaint& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IApplicationPaint& operator=(const IApplicationPaint& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IApplicationPaint& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IApplicationPaint& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param applicationpaint The C object. - @return The new C++ object. - @return The new C++ object. */ - explicit IApplicationPaint(ApplicationPaintRef applicationpaint); - /** Destructor */ - virtual ~IApplicationPaint(); - /** Retrieves a reference to this object. - @return The object reference. */ - ApplicationPaintRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - -}; - -////////////////////////////////////////////// -// --ICompFont-- -////////////////////////////////////////////// -/** Encapsulates a composite font as a text resource. The methods allow you to - add, access, and manipulate fonts for use with the - Adobe Text Engine (ATE). This font contains \c ICompFontComponent - objects. */ -class ICompFont -{ -private: - CompFontRef fCompFont; -public: - /** Constructor - @return The new object. */ - ICompFont(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICompFont(const ICompFont& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICompFont& operator=(const ICompFont& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICompFont& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICompFont& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param compfont The C object. - @return The new C++ object. */ - explicit ICompFont(CompFontRef compfont); - /** Destructor */ - virtual ~ICompFont(); - /** Retrieves a reference to this object. - @return The object reference. */ - CompFontRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor: Creates a composite font from a text resources object. - @param pResources The text resources object. - @return The new object. */ - ICompFont( ITextResources pResources); - - // ======================================================================= - // PROPERTIES - // ======================================================================= - - /** Retrieves the platform-specific name of this font. - @param name A buffer in which to return the name string. - @param maxLength The number of characters in the passed buffer. The name is - truncated to this length if necessary. - @return Nothing. - */ - void GetNativeName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const; - - /** Sets the platform-specific name of this font. The PostScript name is - automatically derived from this name. - @param name The new name string. - @return Nothing. - */ - void SetNativeName( const ATETextDOM::Unicode* name); - - /** Retrieves the PostScript name of this font as Unicode. - @param name A Unicode character buffer in which to return the name string. - @param maxLength The number of characters in the passed buffer. The name is - truncated to this length if necessary. - @return Nothing. - */ - void GetPostScriptName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const; - - /** Retrieves the PostScript name of this font as a C string. - @param name A \c char buffer in which to return the name string. - @param maxLength The number of characters in the passed buffer. The name is - truncated to this length if necessary. - @return Nothing. - */ - void GetPostScriptName( char* name, ATETextDOM::Int32 maxLength) const; - - /** Sets the font dictionary for this font. - @param fontDictionary A pointer to the new dictionary. - @return Nothing. - @see \c #AIDictionarySuite - */ - void SetFontDictionary( void* fontDictionary); - - /** Retrieves the font dictionary for this font. - @return A pointer to the dictionary.. - @see \c #AIDictionarySuite - */ - void* GetFontDictionary( ) const; - - // ======================================================================= - // METHODS - // ======================================================================= - /** Duplicates this font. - @return The new font object. - */ - ICompFont Duplicate( ) const; - - /** Reports whether the resource been modified since it became editable. - @return True if the resource has been modified. - */ - bool IsModified( ) const; - - /** Reports whether the resource is currently editable. - @return True if the resource is editable. - */ - bool IsEditable( ) const; - - /** Reports whether changes to the resource have been committed. - @return True if changes have been committed. - */ - bool IsCommitted( ) const; - - /** Reports whether the resource is in a valid state, either editable or committed. - @return True if the resource is in a valid state. - */ - bool VerifyState( ) const; - - /** Reports whether the ATC file for the font is currently loaded. - @return True if the font file is loaded. - */ - bool IsATCFileLoaded( ) const; - - /** Retrieves the number of components of this font. Use with - \c #GetComponent() to iterate through components. - @return The number of components. - */ - ATETextDOM::Int32 GetComponentCount( ) const; - - /** Retrieves a component from this font by index position. Use with - \c #GetComponentCount() to iterate through components. - @param index The 0-based position index. - @return The component object. - */ - ICompFontComponent GetComponent( ATETextDOM::Int32 index) const; - - /** Retrieves a specific component from this font. - @param component The component object. - @return The index position of the component, or -1 if the component - is not in this font. - */ - ATETextDOM::Int32 Find( ICompFontComponent component) const; - - /** Removes a component from this font. - @param index The 0-based position index of the component to remove. - @return True if a component was successfully removed. - */ - bool RemoveComponent( ATETextDOM::Int32 index); - - /** Appends a component to this font. - @param component The component object. - @return The 0-based position index of the successfully - added component, or -1 if the component could not be appended. - */ - ATETextDOM::Int32 AddComponent( ICompFontComponent component); - - /** Replaces a component in this font. - @param index The 0-based position index of the component to replace. - @param component The replacement component object. - @return True if a component was successfully replaced. - */ - bool ReplaceComponent( ATETextDOM::Int32 index, ICompFontComponent component); - -}; - -////////////////////////////////////////////// -// --ICompFontClass-- -////////////////////////////////////////////// -/** Encapsulates a font character class as a text resource. The methods allow you to - add, access, and manipulate font classes for use with the - Adobe Text Engine (ATE). A font character class contains a collection of Unicode characters. - */ -class ICompFontClass -{ -private: - CompFontClassRef fCompFontClass; -public: - /** Constructor - @return The new object. */ - ICompFontClass(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICompFontClass(const ICompFontClass& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICompFontClass& operator=(const ICompFontClass& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICompFontClass& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICompFontClass& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param compfontclass The C object. - @return The new C++ object. */ - explicit ICompFontClass(CompFontClassRef compfontclass); - /** Destructor */ - virtual ~ICompFontClass(); - /** Retrieves a reference to this object. - @return The object reference. */ - CompFontClassRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================= - - /** Retrieves the platform-specific name of this font class. - @param name A buffer in which to return the name string. - @param maxLength The number of characters in the passed buffer. The name is - truncated to this length if necessary. - @return Nothing. - */ - void GetNativeName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const; - - /** Sets the platform-specific name of this font. - @param name The new name string. - @return Nothing. - */ - void SetNativeName( const ATETextDOM::Unicode* name); - - /** Retrieves the Unicode character codes that belong to this class. - @param codes A buffer in which to return the character codes. - @param maxLength The number of characters in the passed buffer. The return - string (including the terminating 0) is truncated to this length if necessary. - @return The number of character codes written to the buffer, including the terminating 0. - */ - ATETextDOM::Int32 GetCodes( ATETextDOM::Unicode* codes, ATETextDOM::Int32 maxLength) const; - - /** Sets the Unicode character codes that belong to this class. - @param codes A buffer containing the new Unicode character codes. - @return The character code count, not include the terminating 0. - */ - ATETextDOM::Int32 SetCodes( const ATETextDOM::Unicode* codes); - - // ======================================================================= - // METHODS - // ======================================================================= - - /** Duplicates this font class. - @return The new font class object. - */ - ICompFontClass Duplicate( ) const; - - /** Retrieves the number of characters in this font class. - @return The number of characters. - */ - ATETextDOM::Int32 GetCharacterCount( ) const; - - /** Retrieves the type of this font class. - @return The class type constant. - */ - CompositeFontClassType GetClassType( ) const; - - /** Reports whether a Unicode character is in this font class. - @param code The character code. - @return True if the code is part of this class. - */ - bool IsCodeInClass( ATETextDOM::Unicode code) const; - - /** Reports whether the resource is currently editable. - @return True if the resource is editable. - @note Predefined classes are never editable. - */ - bool IsEditable( ) const; - - /** Reports whether this is a custom override class or predefined class. - @return True if this is a custom override class, false if it is a predefined class. - @note Predefined classes are never editable. - */ - bool IsCustomOverride( ) const; - - /** Reports whether the resource been modified since it became editable. - @return True if the resource has been modified. - */ - bool IsModified( ) const; - - /** Reports whether the resource is in a valid state, either editable or committed. - @return True if the resource is in a valid state. - */ - bool VerifyState( ) const; - -}; - -////////////////////////////////////////////// -// --ICompFontClassSet-- -////////////////////////////////////////////// -/** Encapsulates a font class set as a text resource. The methods allow you to - add, access, and manipulate font class sets for use with the - Adobe Text Engine (ATE). A font class set contains a collection of \c ICompFontClass objects. - */ -class ICompFontClassSet -{ -private: - CompFontClassSetRef fCompFontClassSet; -public: - /** Constructor - @return The new object. */ - ICompFontClassSet(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICompFontClassSet(const ICompFontClassSet& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICompFontClassSet& operator=(const ICompFontClassSet& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICompFontClassSet& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICompFontClassSet& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param compfontclassset The C object. - @return The new C++ object. */ - explicit ICompFontClassSet(CompFontClassSetRef compfontclassset); - /** Destructor */ - virtual ~ICompFontClassSet(); - /** Retrieves a reference to this object. - @return The object reference. */ - CompFontClassSetRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================= - - /** Retrieves the number of members of this set. - @return The number of members. - */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. - */ - ICompFontClass GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. - */ - ICompFontClass GetLast( ) const; - - // ======================================================================= - // METHODS - // ======================================================================= - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param nIndex The 0-based position index. - @return The member object. - */ - ICompFontClass Item( ATETextDOM::Int32 nIndex) const; - - /** Retrieves a specific font class from this set. - @param compFontClass The font class object. - @return The index position of the object in this set, or -1 - if the object is not in this set. - */ - ATETextDOM::Int32 Find( ICompFontClass compFontClass) const; - - /** Retrieves a specific predefined font class type from this set. - @param predefinedType The font class type. - @return The index position of the type in this set, or -1 - if the type is not in this set. - */ - ATETextDOM::Int32 FindPredefined( CompositeFontClassType predefinedType) const; - -}; - -////////////////////////////////////////////// -// --ICompFontComponent-- -////////////////////////////////////////////// -/** Encapsulates a font component as a text resource. The methods allow you to - add, access, and manipulate font components for use with the - Adobe Text Engine (ATE). Font components belong to \c ICompFont objects. - See \c ICompFont::GetComponent() */ -class ICompFontComponent -{ -private: - CompFontComponentRef fCompFontComponent; -public: - /** Constructor - @return The new object. */ - ICompFontComponent(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICompFontComponent(const ICompFontComponent& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICompFontComponent& operator=(const ICompFontComponent& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICompFontComponent& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICompFontComponent& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param compfontcomponent The C object. - @return The new C++ object. */ - explicit ICompFontComponent(CompFontComponentRef compfontcomponent); - /** Destructor */ - virtual ~ICompFontComponent(); - /** Retrieves a reference to this object. - @return The object reference. */ - CompFontComponentRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor: Creates a font component from a text resources object. - @param pResources The text resources object. - @return The new object. */ - ICompFontComponent( ITextResources pResources); - - // ======================================================================= - // PROPERTIES - // ======================================================================= - - /** Retrieves the font class to which this component belongs. - @return The font class object. - */ - ICompFontClass GetClass( ) const; - - /** Sets the font character class to which this component belongs. - @param charClass The font character class object. - @return Nothing. - */ - void SetClass( ICompFontClass charClass); - - /** Retrieves the font to which this component belongs. - @return The font object. - */ - IFont GetFont( ) const; - - /** Sets the font to which this component belongs. - @param font The font object. - @return Nothing. - */ - void SetFont( IFont font); - - /** Retrieves the point size of this component. - @return The point size. - */ - ATETextDOM::Real GetSize( ) const; - - /** Sets the point size of this component. - @param size The new point size. - */ - void SetSize( ATETextDOM::Real size); - - /** Retrieves the baseline value of this component. - @return The baseline value. - */ - ATETextDOM::Real GetBaseline( ) const; - - /** Sets the baseline value of this component. - @param baseline The new baseline value. - */ - void SetBaseline( ATETextDOM::Real baseline); - - /** Retrieves the horizontal scaling factor of this component. - @return The horizontal scaling factor. - */ - ATETextDOM::Real GetHorizontalScale( ) const; - - /** Sets the horizontal scaling factor of this component. - @param horizontalScale The new horizontal scaling factor. - */ - void SetHorizontalScale( ATETextDOM::Real horizontalScale); - - /** Retrieves the vertical scaling factor of this component. - @return The vertical scaling factor. - */ - ATETextDOM::Real GetVerticalScale( ) const; - - /** Sets the vertical scaling factor of this component. - @param verticalScale The new vertical scaling factor. - */ - void SetVerticalScale( ATETextDOM::Real verticalScale); - - /** Reports the centering state of this component. - @return True if centering is on. - */ - bool GetCenterGlyph( ) const; - - /** Sets the centering state of this component. - @param centerglyph True to turn centering on, false to turn it off - @return Nothing - */ - void SetCenterGlyph( bool centerglyph); - - // ======================================================================= - // METHODS - // ======================================================================= - - /** Reports whether the resource been modified since it became editable. - @return True if the resource has been modified. - */ - bool IsModified( ) const; - -}; - -////////////////////////////////////////////// -// --ICompFontSet-- -////////////////////////////////////////////// -/** Encapsulates a composite font set as a text resource. The methods allow you to - add, access, and manipulate font sets for use with the - Adobe Text Engine (ATE). A font set contains a collection of \c ICompFont objects. - */ -class ICompFontSet -{ -private: - CompFontSetRef fCompFontSet; -public: - /** Constructor - @return The new object. */ - ICompFontSet(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICompFontSet(const ICompFontSet& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICompFontSet& operator=(const ICompFontSet& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICompFontSet& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICompFontSet& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param compfontset The C object. - @return The new C++ object. */ - explicit ICompFontSet(CompFontSetRef compfontset); - /** Destructor */ - virtual ~ICompFontSet(); - /** Retrieves a reference to this object. - @return The object reference. */ - CompFontSetRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================= - - /** Retrieves the number of members of this set. - @return The number of members. - */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. - */ - ICompFont GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. - */ - ICompFont GetLast( ) const; - // ======================================================================= - // METHODS - // ======================================================================= - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param nIndex The 0-based position index. - @return The member object. - */ - ICompFont Item( ATETextDOM::Int32 nIndex) const; - - /** Retrieves a specific font from this set. - @param font The font object. - @return The index position of the object in this set, or -1 - if the object is not in this set. - */ - ATETextDOM::Int32 Find( ICompFont font) const; - - /** Removes a member font from this font set. - @param nIndex The 0-based position index of the font to remove. - @return True if a font was successfully removed. - */ - bool Remove( ATETextDOM::Int32 nIndex); - - /** Appends a font to this font set. - @param font The font object. - @return The 0-based position index of the successfully - added font, or -1 if the font could not be appended. - */ - ATETextDOM::Int32 Add( ICompFont font); - - /** Replaces a font in this set. - @param nIndex The 0-based position index of the font to replace. - @param newFont The replacement font object. - @return True if a font was successfully replaced. - */ - bool Replace( ATETextDOM::Int32 nIndex, ICompFont newFont); - - /** Updates this font set to reflect what is currently in the - document font resource's font set. This can invalidate - previously saved font indices. - @return Nothing. - */ - void Update( ) const; - -}; - -////////////////////////////////////////////// -// --IGlyphRun-- -////////////////////////////////////////////// -/** Encapsulates a glyph run as a text resource. The methods allow you to - add, access, and manipulate glyph runs for use with the - Adobe Text Engine (ATE). A glyph run belongs to a \c ITextLine object. - It contains a string of characters, along with drawing information - for them. - */ -class IGlyphRun -{ -private: - GlyphRunRef fGlyphRun; -public: - /** Constructor - @return The new object. */ - IGlyphRun(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IGlyphRun(const IGlyphRun& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IGlyphRun& operator=(const IGlyphRun& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IGlyphRun& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IGlyphRun& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param glyphrun The C object. - @return The new C++ object. */ - explicit IGlyphRun(GlyphRunRef glyphrun); - /** Destructor */ - virtual ~IGlyphRun(); - /** Retrieves a reference to this object. - @return The object reference. */ - GlyphRunRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // METHODS - // ======================================================================= - - /** Retrieves the text-line parent of this glyph run. - @return The text-line object. - */ - ITextLine GetTextLine( ) const; - - /** Retrieves the number of glyphs in this run. - The number of the glyphs can be different from number of characters returned - by \c #GetCharacterCount(), because of factors such ligature and hyphenation. - @return The number of glyphs. - */ - ATETextDOM::Int32 GetSize( ) const; - - /** Retrieves the number of characters in this run. Use to determine - the size of buffer to pass to \c #GetContents(). - @return The number of characters. - @see \c #GetSize() - */ - ATETextDOM::Int32 GetCharacterCount( ) const; - - /** Retrieves the origin points of each glyph in this run. - @return The array of origin points. - */ - IArrayRealPoint GetOrigins( ) const; - - /** Retrieves the unique identifiers of each glyph in this run. - @return The array of identifiers. - */ - IArrayGlyphID GetGlyphIDs( ) const; - - /** Retrieves the transformation matrix of this run, which - specifies the full transformation. To get the location of - an individual glyph, you must transform the origin by the value - in the \c #GetOrigins() array, then concatinate this matrix with - the text frame matrix, returned by \c ITextFrame::GetMatrix(). - @return The transformation matrix. - */ - ATETextDOM::RealMatrix GetMatrix( ) const; - - /** Retrieves the character features of this run. - Only the following members are defined: -
\c Font -
\c FontSize -
\c HorizontalScale -
\c VerticalScale -
\c Tracking -
\c BaselineShift -
\c FillColor -
\c StrokeColor -
\c fBlend -
\c Fill -
\c Stroke -
\c FillFirst -
\c FillOverPrint -
\c StrokeOverPrint -
\c FillBackgroundColor -
\c FillBackground -
\c LineCap -
\c LineJoin -
\c LineWidth -
\c MiterLimit -
\c LineDashOffset -
\c LineDashArray - @return The character features object. - */ - ICharFeatures GetCharFeatures( ) const; - - /** Retrieves the glyph orientation of this run. - @return The orientation constant. - */ - GlyphOrientation GetGlyphOrientation( ) const; - - /** Retrieves the ascent of this run. - @return The ascent value, in document points. - */ - ATETextDOM::Real GetAscent( ) const; - - /** Retrieves the descent of this run. - @return The descent value, in document points. - */ - ATETextDOM::Real GetDescent( ) const; - - /** Retrieves the tracking (space between each character) of this run, - @return The tracking value, in document points. - */ - ATETextDOM::Real GetTracking( ) const; - - /** Retrieves the width of the space glyph in the font for this run. - @return The width value, in document points. - */ - ATETextDOM::Real GetSpaceGlyphWidth( ) const; - - /** Retrieves the distance to the baseline in the font for this run. - @return The distance value, in document points. - */ - ATETextDOM::Real GetDistanceToBaseline( ) const; - - /** Retrieves the underline position in the font for this run. - @return The position value, in document points. - */ - ATETextDOM::Real GetUnderlinePosition( ) const; - - /** Retrieves the underline thickness in the font for this run. - @return The thickness value, in document points. - */ - ATETextDOM::Real GetUnderlineThickness( ) const; - - /** Retrieves the maximum height for capital letters in the font for this run. - @return The height value, in document points. - */ - ATETextDOM::Real GetMaxCapHeight( ) const; - - /** Retrieves the minimum height for capital letters in the font for this run. - @return The height value, in document points. - */ - ATETextDOM::Real GetMinCapHeight( ) const; - - /** Retrieves the component font for this run if the character-feature font is - a composite font, otherwise retrieves the character-feature font. - @return The font object. - */ - IFont GetFlattenedFont( ) const; - - /** Retrieves the contents of this run as a Unicode string. - @param text [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - Use \c #GetCharacterCount() to determine what size is needed. - @return The number of characters written to the text buffer. - */ - ATETextDOM::Int32 GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const; - - /** Retrieves the contents of this run as a C string. - @param text [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - Use \c #GetCharacterCount() to determine what size is needed. - @return The number of characters written to the text buffer. - */ - ATETextDOM::Int32 GetContents( char* text, ATETextDOM::Int32 maxLength) const; - -}; - -////////////////////////////////////////////// -// --IGlyphRunsIterator-- -////////////////////////////////////////////// -/** This object enables you to iterate through the set of - glyph runs in the current document. - @see \c IGlyphRun. - */ -class IGlyphRunsIterator -{ -private: - GlyphRunsIteratorRef fGlyphRunsIterator; -public: - /** Constructor - @return The new object. */ - IGlyphRunsIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IGlyphRunsIterator(const IGlyphRunsIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IGlyphRunsIterator& operator=(const IGlyphRunsIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IGlyphRunsIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IGlyphRunsIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param glyphrunsiterator The C object. - @return The new C++ object. */ - explicit IGlyphRunsIterator(GlyphRunsIteratorRef glyphrunsiterator); - /** Destructor */ - virtual ~IGlyphRunsIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - GlyphRunsIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // METHODS - // ===================================================================== - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsDone( ) const; - /** Increments the current position in the set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Retrieves the current glyph run. - @return The glyph run object. */ - IGlyphRun Item( ) const; - -}; - -////////////////////////////////////////////// -// --IMojiKumi-- -////////////////////////////////////////////// -/** Encapsulates the MojiKumi characteristics of a character as a text resource. - The methods allow you to add, access, and manipulate MojiKumi for use with the - Adobe Text Engine (ATE). These objects are collected in an \c IMojiKumiSet. - */ -class IMojiKumi -{ -private: - MojiKumiRef fMojiKumi; -public: - /** Constructor - @return The new object. */ - IMojiKumi(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IMojiKumi(const IMojiKumi& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IMojiKumi& operator=(const IMojiKumi& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IMojiKumi& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IMojiKumi& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param mojikumi The C object. - @return The new C++ object. */ - explicit IMojiKumi(MojiKumiRef mojikumi); - /** Destructor */ - virtual ~IMojiKumi(); - /** Retrieves a reference to this object. - @return The object reference. */ - MojiKumiRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================= - - /** Retrieves the name of this object. - @param name [out] A Unicode string in which to return the name. - @param maxLength The number of characters in the buffer. - Use \c #GetNameSize() to determine the size needed. - @return The number of characters written to the buffer. - */ - ATETextDOM::Int32 GetName( ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength) const; - /** Retrieves the number of characters in the name of this object. Use to - determine the size of buffer to pass to \c #GetName(). - @return The number of characters in the name. - */ - ATETextDOM::Int32 GetNameSize( ) const; - /** Sets the name of this object. - @param name A Unicode string containing the new name. - @return Nothing. - */ - void SetName( const ATETextDOM::Unicode * name); - /** Reports whether this object matches a predefined tag in the - MojiKumi table. - @param tag The tag object. - @return True if this object matches the tag. - */ - bool MatchesPredefinedResourceTag( ATE::MojikumiTablePredefinedTag tag) const; - /** Retrieves a MojiKumi table entry from this object. - @param index The 0-based position index for the entry. - @param minExpansion [out] A buffer in which to return the maximum expansion value. - @param maxExpansion [out] A buffer in which to return the minimum expansion value. - @param desiredExpansion [out] A buffer in which to return the desired expansion value. - @return Nothing. - */ - void GetEntry( ATETextDOM::Int32 index, ATETextDOM::Float * minExpansion, ATETextDOM::Float * maxExpansion, ATETextDOM::Float * desiredExpansion) const; - /** Sets a MojiKumi table entry from this object. - @param index The 0-based position index for the entry. - @param minExpansion The new maximum expansion value. - @param maxExpansion The new minimum expansion value. - @param desiredExpansion The new desired expansion value. - @return Nothing. - */ - void SetEntry( ATETextDOM::Int32 index, ATETextDOM::Real minExpansion, ATETextDOM::Real maxExpansion, ATETextDOM::Real desiredExpansion); - - // ======================================================================= - // METHODS - // ======================================================================= - - /** Reports whether this object is equivalent to another MojiKumi object. - @param rhsMojiKumi The other MojiKumi object. - @return True if the objects are equivalent. - */ - bool IsEquivalent( IMojiKumi rhsMojiKumi) const; - /** Reports whether the resource been modified since it became editable. - @return True if the resource has been modified. - */ - bool IsModified( ) const; - /** Reports whether this is a predefined MojiKumi. - @return True if the MojiKumi is predefined, false if it is customized. - */ - bool IsPredefined( ) const; - /** Creates a new object by duplicating the information in this one. - @return The new object - */ - IMojiKumi Duplicate( ) const; - -}; - -////////////////////////////////////////////// -// --IMojiKumiSet-- -////////////////////////////////////////////// -/** Encapsulates a MojiKumi set as a text resource. The methods allow you to - add, access, and manipulate MojiKumi sets for use with the - Adobe Text Engine (ATE). The set contains \c IMojiKumi objects. - */ -class IMojiKumiSet -{ -private: - MojiKumiSetRef fMojiKumiSet; -public: - /** Constructor - @return The new object. */ - IMojiKumiSet(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IMojiKumiSet(const IMojiKumiSet& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IMojiKumiSet& operator=(const IMojiKumiSet& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IMojiKumiSet& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IMojiKumiSet& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param mojikumiset The C object. - @return The new C++ object. */ - explicit IMojiKumiSet(MojiKumiSetRef mojikumiset); - /** Destructor */ - virtual ~IMojiKumiSet(); - /** Retrieves a reference to this object. - @return The object reference. */ - MojiKumiSetRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================= - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ); - /** Retrieves the first member of this set. - @return The member object. */ - IMojiKumi GetFirst( ); - /** Retrieves the last member of this set. - @return The member object. */ - IMojiKumi GetLast( ); - - // ======================================================================= - // METHODS - // ======================================================================= - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param nIndex The 0-based position index. - @return The member object. - */ - IMojiKumi Item( ATETextDOM::Int32 nIndex) const; - /** Retrieves a specific MojiKumi object from this set, matching name and data. - @param mojiKumi The MojiKumi object. - @return The index position of the object in this set, or -1 - if the object is not in this set. - */ - ATETextDOM::Int32 Find( const IMojiKumi mojiKumi); - /** Retrieves a specific MojiKumi object from this set, matching only the name. - @param name The object name. - @return The index position of the object in this set, or -1 - if the object is not in this set. - */ - ATETextDOM::Int32 Find( const ATETextDOM::Unicode* name); - /** Retrieves a specific MojiKumi object from this set, matching a tag. - @param tag The tag. Use \c #kUserDefinedMojikumiTableTag to get the first - customized (not predefined) MojiKumi. - @return The index position of the object in this set, or -1 - if the object is not in this set. - */ - ATETextDOM::Int32 Find( MojikumiTablePredefinedTag tag); - /** Removes a member MojiKumi from this set. - @param nIndex The 0-based position index of the MojiKumi to remove. - @return True if a MojiKumi was successfully removed. - */ - bool Remove( ATETextDOM::Int32 nIndex); - /** Appends a MojiKumi to this set. - @param mojiKumi The MojiKumi object. - @return The 0-based position index of the successfully - added object, or the current index of this object - if it is already in the set, or -1 if the object - was not in the set and could not be appended. - */ - ATETextDOM::Int32 Add( IMojiKumi mojiKumi); - /** Replaces a MojiKumi in this set. - @param nIndex The 0-based position index of the MojiKumi to replace. - @param mojiKumi The replacement MojiKumi object. - @return True if an object was successfully replaced. - */ - bool Replace( ATETextDOM::Int32 nIndex, IMojiKumi mojiKumi); - /** Creates a new, empty MojiKumi object and appends it to this set. - @param name The name of the new object. - @param nIndex [out] A buffer in which to return the - 0-based position index of the successfully - added object, or -1 if it could not be added. - @return The new object, or a \c NULL object - if the MojiKumi could not be created. - */ - IMojiKumi CreateNewMojiKumi( const ATETextDOM::Unicode* name, ATETextDOM::Int32* nIndex); - -}; - -////////////////////////////////////////////// -// --ITextFrame-- -////////////////////////////////////////////// -/** This class encapsulates a text frame, which manages the layout - of a text range into rows and columns. The methods allow you to - add, access, and manipulate text frames for use with the - Adobe Text Engine (ATE). The frame is associated with an \c ITextRange, - and contains \c ITextLine objects representing rows of text, which you can - access through an \c ITextLinesIterator. A text frame can be part - of an \c IStory. */ -class ITextFrame -{ -private: - TextFrameRef fTextFrame; -public: - /** Constructor - @return The new object. */ - ITextFrame(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITextFrame(const ITextFrame& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITextFrame& operator=(const ITextFrame& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITextFrame& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITextFrame& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param textframe The C object. - @return The new C++ object. */ - explicit ITextFrame(TextFrameRef textframe); - /** Destructor */ - virtual ~ITextFrame(); - /** Retrieves a reference to this object. - @return The object reference. */ - TextFrameRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // METHODS - // ===================================================================== - /** Retrieves the parent story of this text frame. - @return The story object. - */ - IStory GetStory( ) const; - /** Retrieves the text range of this frame. - @param bIncludeOverflow Optional. When true (the default), if - the frame is the last one in its story, the range includes any - overflow text. When false, overflow text is not included. - @return The text range object. - */ - ITextRange GetTextRange( bool bIncludeOverflow = true) const; - /** Retrieves a text-line iterator with which you can access - the text lines of this text frame. - @return The text-line iterator object. - */ - ITextLinesIterator GetTextLinesIterator( ) const; - /** Retrieves the type of this text frame. - @return The type constant. - */ - FrameType GetType( ) const; - /** Retrieves the line orientation of this text frame. - @return The line orientation constant. - */ - LineOrientation GetLineOrientation( ) const; - /** Reports whether this frame is selected. Use the \c #AIArtSuite - to set the selection. - @return True if the text frame is selected. - */ - bool GetSelected( ) const; - /** Retrieves the transformation matrix of this text frame. - @return The transformation matrix. - */ - ATETextDOM::RealMatrix GetMatrix( ) const; - /** Retrieves the number of rows for this text frame. - @return The number of rows. - */ - ATETextDOM::Int32 GetRowCount( ) const; - /** Retrieves the number of columns for this text frame. - @return The number of columns. - */ - ATETextDOM::Int32 GetColumnCount( ) const; - /** Reports whether the text range is arranged in row-major order. - @return True if the text frame is in row-major order. - */ - bool GetRowMajorOrder( ) const; - /** Retrieves the row gutter value for this text frame. - @return The row gutter value, in document points. - */ - ATETextDOM::Real GetRowGutter( ) const; - /** Retrieves the column gutter value for this text frame. - @return The column gutter value, in document points. - */ - ATETextDOM::Real GetColumnGutter( ) const; - /** Retrieves the line spacing value for this text frame. - @return The line spacing value, in document points. - */ - ATETextDOM::Real GetSpacing( ) const; - /** Reports whether optical alignment is on for this text frame - @return True if optical alignment is on. - */ - bool GetOpticalAlignment( ) const; -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - /** Retrieves the paragraph direction for this text frame. - @return The paragraph direction object. - */ - ParagraphDirection GetStoryDirection( ) const; -#endif - /** Sets the number of rows for this text frame. - @param rowCount The number of rows. - @return Nothing. - */ - void SetRowCount( ATETextDOM::Int32 rowCount); - /** Sets the number of columns for this text frame. - @param columnCount The number of columns. - @return Nothing. - */ - void SetColumnCount( ATETextDOM::Int32 columnCount); - /** Turns row-major order on or off for this text frame. - @param isRowMajor True to turn row-major order on, - false to turn it off. - @return Nothing. - */ - void SetRowMajorOrder( bool isRowMajor); - /** Sets the row gutter value for this text frame. - @param gutter The new row-gutter value in document points. - @return Nothing. - */ - void SetRowGutter( ATETextDOM::Real gutter); - /** Sets the column gutter value for this text frame. - @param gutter The new column-gutter value in document points. - @return Nothing. - */ - void SetColumnGutter( ATETextDOM::Real gutter); - /** Sets the line spacing value for this text frame. - @param spacing The new line spacing value in document points. - @return Nothing. - */ - void SetSpacing( ATETextDOM::Real spacing); - /** Turns optical alignment on or off for this text frame. - @param isActive True to turn optical alignment on, - false to turn it off. - @return Nothing. - */ - void SetOpticalAlignment( bool isActive); - /** Sets the line orientation value for this text frame. - @param lineOrientation The new line orientation constant. - @return Nothing. - */ - void SetLineOrientation( LineOrientation lineOrientation); - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - /** Sets the paragragh direction for this text frame. - @param direction The paragraph direction. - @return Nothing. - */ - void SetStoryDirection( ParagraphDirection direction); -#endif -}; - -////////////////////////////////////////////// -// --ITextFramesIterator-- -////////////////////////////////////////////// -/** This object enables you to iterate through the set of - text frames in the current document. - @see \c ITextFrame. */ -class ITextFramesIterator -{ -private: - TextFramesIteratorRef fTextFramesIterator; -public: - /** Constructor - @return The new object. */ - ITextFramesIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITextFramesIterator(const ITextFramesIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITextFramesIterator& operator=(const ITextFramesIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITextFramesIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITextFramesIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param textframesiterator The C object. - @return The new C++ object. */ - explicit ITextFramesIterator(TextFramesIteratorRef textframesiterator); - /** Destructor */ - virtual ~ITextFramesIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - TextFramesIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates an iterator for the text frames - contained in a text range. - @param range The text range object. - @return The new iterator object. - */ - ITextFramesIterator( const ITextRange& range); - - // ======================================================================= - // METHODS - // ===================================================================== - - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Increments the current position in the set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Decrements the current position in the set. - @return Nothing. */ - void Previous( ); - /** Retrieves the current text frame. - @return The text frame object. */ - ITextFrame Item( ) const; - -}; - -////////////////////////////////////////////// -// --ITextLine-- -////////////////////////////////////////////// - -/** This class encapsulates a line of text in a text frame. - The line is part of an \c ITextFrame, contains \c IGlyphRun - objects that you can access with an \c IGlyphRunIterator, - and is associated with an \c ITextRange. - @see \c ITextFrame::GetTextLinesIterator() */ -class ITextLine -{ -private: - TextLineRef fTextLine; -public: - /** Constructor - @return The new object. */ - ITextLine(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITextLine(const ITextLine& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITextLine& operator=(const ITextLine& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITextLine& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITextLine& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param textline The C object. - @return The new C++ object. */ - explicit ITextLine(TextLineRef textline); - /** Destructor */ - virtual ~ITextLine(); - /** Retrieves a reference to this object. - @return The object reference. */ - TextLineRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // METHODS - // ======================================================================= - - /** Retrieves a glyph-run iterator with which you can access - the glyph runs of this line. - @return The glyph-run iterator object. - @see GetVisualGlyphRunsIterator() - */ - IGlyphRunsIterator GetGlyphRunsIterator( ) const; - /** Retrieves a glyph-run iterator with which you can access - the glyph runs of this line, handling the special case of text that - contains a mixture of left-to-right (LTR) and right-to-left (RTL) - text. If this case is not expected, use \c #GetGlyphRunsIterator(). - @return The glyph-run iterator object. - @see GetGlyphRunsIterator() */ - IGlyphRunsIterator GetVisualGlyphRunsIterator( ) const; - /** Retrieves the parent text frame of this line. - @return The text frame object. - */ - ITextFrame GetTextFrame( ) const; - /** Retrieves the text range for this line. - @return The text range object. - */ - ITextRange GetTextRange( ) const; - /** Retrieves an array of baselines (IArrayLine) specified by a - start and end point in the coordinate space of the containing text frame. - An array is required since each composed line can contain several segments - due to intrusions such as text wraps and Japanese features such as warichu. - @return The array of baselines. - */ - IArrayLine GetBaselines() const; -}; - -////////////////////////////////////////////// -// --ITextLinesIterator-- -////////////////////////////////////////////// -/** This object enables you to iterate through the set of - text lines in a text frame. - @see \c ITextFrame::GetTextLinesIterator() */ -class ITextLinesIterator -{ -private: - TextLinesIteratorRef fTextLinesIterator; -public: - /** Constructor - @return The new object. */ - ITextLinesIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITextLinesIterator(const ITextLinesIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITextLinesIterator& operator=(const ITextLinesIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITextLinesIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITextLinesIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param textlinesiterator The C object. - @return The new C++ object. */ - explicit ITextLinesIterator(TextLinesIteratorRef textlinesiterator); - /** Destructor */ - virtual ~ITextLinesIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - TextLinesIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // METHODS - // ======================================================================= - - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Increments the current position in the set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Decrements the current position in the set. - @return Nothing. */ - void Previous( ); - /** Retrieves the current text line. - @return The text line object. */ - ITextLine Item( ) const; - -}; - -////////////////////////////////////////////// -// --ITextResources-- -////////////////////////////////////////////// -/** Parent class for \c IApplicationTextResources -and \c IDocumentTextResources */ -class ITextResources -{ -private: - TextResourcesRef fTextResources; -public: - ITextResources(); - ITextResources(const ITextResources& src); - ITextResources& operator=(const ITextResources& rhs); - bool operator==(const ITextResources& rhs) const; - bool operator!=(const ITextResources& rhs) const; - explicit ITextResources(TextResourcesRef textresources); - virtual ~ITextResources(); - TextResourcesRef GetRef() const; - bool IsNull() const; - - ITextResources GetTextResources( ); - -}; - -////////////////////////////////////////////// -// --IApplicationTextResources-- -////////////////////////////////////////////// -/** Parent class for \c IDocumentTextResources */ -class IApplicationTextResources -{ -private: - ApplicationTextResourcesRef fApplicationTextResources; -public: - /** Constructor - @return The new object. */ - IApplicationTextResources(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IApplicationTextResources(const IApplicationTextResources& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IApplicationTextResources& operator=(const IApplicationTextResources& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IApplicationTextResources& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IApplicationTextResources& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param applicationtextresources The C object. - @return The new C++ object. */ - explicit IApplicationTextResources(ApplicationTextResourcesRef applicationtextresources); - /** Destructor */ - virtual ~IApplicationTextResources(); - /** Retrieves a reference to this object. - @return The object reference. */ - ApplicationTextResourcesRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // From parent class... - ITextResources GetTextResources( ); - // ======================================================================= - // PROPERTIES - // ======================================================================= - IKinsokuSet GetKinsokuSet( ) const; - IMojiKumiSet GetMojiKumiSet( ) const; - ICompFontClassSet GetCompFontClassSet( ) const; - ICompFontSet GetCompFontSet( ) const; - -}; - -////////////////////////////////////////////// -// --IDocumentTextResources-- -////////////////////////////////////////////// -/** This object encapsulates the text resources of a document. - Text resources include fonts, character and paragraph styles, - and various text preferences. */ -class IDocumentTextResources -{ -private: - DocumentTextResourcesRef fDocumentTextResources; -public: - /** Constructor - @return The new object. */ - IDocumentTextResources(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IDocumentTextResources(const IDocumentTextResources& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IDocumentTextResources& operator=(const IDocumentTextResources& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IDocumentTextResources& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IDocumentTextResources& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param documenttextresources The C object. - @return The new C++ object. */ - explicit IDocumentTextResources(DocumentTextResourcesRef documenttextresources); - /** Destructor */ - virtual ~IDocumentTextResources(); - /** Retrieves a reference to this object. - @return The object reference. */ - DocumentTextResourcesRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // From parent class... - /** Retrieves the Kinsoku set for the document. - @return The Kinsoku set object. - */ - IKinsokuSet GetKinsokuSet( ) const; - /** Retrieves the MojiKumi set for the document. - @return The MojiKumi set object. - */ - IMojiKumiSet GetMojiKumiSet( ) const; - /** Retrieves the composite font class set for the document. - @return The composite font class set object. - */ - ICompFontClassSet GetCompFontClassSet( ) const; - /** Retrieves the composite font set for the document. - @return The composite font set object. - */ - ICompFontSet GetCompFontSet( ) const; - /** Retrieves the text resources for the document. - @return The text resources object. - */ - ITextResources GetTextResources( ); - - /** Retrieves the search object for the document. - @return The search object. - */ - IFind GetFind( ); - /** Retrieves the spell-check object for the document. - @return The spell-check object. - */ - ISpell GetSpell( ); - - /** Retrieves the glyph for the document. - @return The glyph object. - */ - IGlyph GetGlyphAndAlternates( ) const; - /** Retrieves the alternate glyph for the document. - @return The glyph object. - */ - IGlyph GetAlternateGlyph( ) const; - /** Inserts a new alternate glyph. - @param theCharacters The characters for which this glyph is an alternate. - @param glyphID The glyph identifier. - @param otFeatureArray An array of features. - @param otFeatureCount The size of the feature array. - @param otFeatureIndexArray A mapping of the glyph-feature array to the character features. - @param leaveSelected True to leave the character in the selected state. - @return Nothing. - */ - void InsertAlternateGlyph( const ATETextDOM::Unicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ATETextDOM::Int32 otFeatureCount, const ATETextDOM::Int32* otFeatureIndexArray, bool leaveSelected); - - /** Retrieves the alternate glyphs for the document that are available - for selection. - @return The array of alternate glyphs. */ - IArrayInteger GetAlternatesAvailableThroughoutSelection( ) const; - - /** Retrieves the Japanese alternate-feature value for the document selection. - @param isFeature [out] A buffer in which to return true if the alternate is found. - @return The feature constant. - */ - JapaneseAlternateFeature GetJapaneseAlternateFeatureInSelection( bool* isFeature) const; - /** Sets the Japanese alternate-feature value for the document selection. - @param feature The feature constant. - @return Nothing. - */ - void SetJapaneseAlternateFeatureInSelection( JapaneseAlternateFeature feature); - - /** Retrieves the character style set for the document. - @return The character style set object. - */ - ICharStyles GetCharStylesInDocument( ) const; - /** Retrieves the paragraph style set for the document. - @return The paragraph style set object. - */ - IParaStyles GetParaStylesInDocument( ) const; - /** Retrieves a specific character style from the style set for the document. - @param pName The style name. - @return The character style object. - */ - ICharStyle GetCharStyle( const ATETextDOM::Unicode* pName) const; - /** Retrieves a specific paragraph style from the style set for the document. - @param pName The style name. - @return The paragraph style object. - */ - IParaStyle GetParaStyle( const ATETextDOM::Unicode* pName) const; - /** Retrieves the normal character style for the document. - @return The character style object. - */ - ICharStyle GetNormalCharStyle( ) const; - /** Retrieves the normal paragraph style for the document. - @return The paragraph style object. - */ - IParaStyle GetNormalParaStyle( ) const; - /** Sets the normal character style for the document to the - application default. - @return Nothing. - */ - void ResetNormalCharStyle( ); - /** Sets the normal paragraph style for the document to the - application default. - @return Nothing. - */ - void ResetNormalParaStyle( ); - - /** Creates a new, empty character style and adds it to the style set for the document. - @param pName The style name. - @return The character style object, or a null object if a style with - this name already exists, or if the name is an empty string. If - no style is created, the document style set remains unchanged. - */ - ICharStyle CreateCharStyle( const ATETextDOM::Unicode* pName); - /** Creates a new, empty paragraph style and adds it to the style set for the document. - @param pName The style name. - @return The paragraph style object, or a null object if a style with - this name already exists, or if the name is an empty string. If - no style is created, the document style set remains unchanged. - */ - IParaStyle CreateParaStyle( const ATETextDOM::Unicode* pName); - /** Creates a new character style with specified features - and adds it to the style set for the document. - @param pName The style name. - @param pFeatures The feature set for the new style. - @return The character style object, or a null object if a style with - this name already exists, or if the name is an empty string. If - no style is created, the document style set remains unchanged. - */ - ICharStyle CreateCharStyleWithFeatures( const ATETextDOM::Unicode* pName, ICharFeatures pFeatures); - /** Creates a new paragraph style with specified features - and adds it to the style set for the document. - @param pName The style name. - @param pFeatures The feature set for the new style. - @return The paragraph style object, or a null object if a style with - this name already exists, or if the name is an empty string. If - no style is created, the document style set remains unchanged. - */ - IParaStyle CreateParaStyleWithFeatures( const ATETextDOM::Unicode* pName, IParaFeatures pFeatures); - - /** Removes a character style from the style set for the document. - @param pName The style name. - @return True if a style with this name is removed, false if no style - with this name is in the document, or if the name is an empty string. - */ - bool RemoveCharStyle( const ATETextDOM::Unicode* pName); - /** Removes a paragraph style from the style set for the document. - @param pName The style name. - @return True if a style with this name is removed, false if no style - with this name is in the document, or if the name is an empty string. - */ - bool RemoveParaStyle( const ATETextDOM::Unicode* pName); - - /** Imports a set of character styles into this document - from another resource set. - @param pSrcResources The source text-resources object. - @return Nothing. - */ - void ImportCharStyles( ITextResources pSrcResources); - /** Imports a set of paragraph styles into this document - from another resource set. - @param pSrcResources The source text-resources object. - @return Nothing. - */ - void ImportParaStyles( ITextResources pSrcResources); - - /** Turns smart-quotes on or off for this document. - @param smartQuotesAreOn True to turn smart-quotes on, false to turn them off. - @return Nothing - */ - void SetUseSmartQuotes( bool smartQuotesAreOn); - /** Sets the smart-quotes double-quote character codes for a specific language. - @param openQuote The code to use for opening double-quote. - @param closeQuote The code to use for opening double-quote. - @param language The language in which to use these codes. - @return Nothing - */ - void SetSmartDoubleQuoteCharacters( ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); - /** Sets the smart-quotes single-quote character codes for a specific language. - @param openQuote The code to use for opening single-quote. - @param closeQuote The code to use for opening single-quote. - @param language The language in which to use these codes. - @return Nothing - */ - void SetSmartSingleQuoteCharacters( ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); - /** Reports whether smart-quotes are on for this document. - @return True if smart-quotes are on. - */ - bool UseSmartQuotes( ); - /** Retrieves the smart-quotes double-quote character codes for a specific language. - @param openQuote [out] A buffer in which to return the code used for opening double-quote. - @param closeQuote [out] A buffer in which to return the code used for opening double-quote. - @param language The language for which to get codes. - @return Nothing - */ - void GetSmartDoubleQuoteCharacters( ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); - /** Retrieves the smart-quotes single-quote character codes for a specific language. - @param openQuote [out] A buffer in which to return the code used for opening single-quote. - @param closeQuote [out] A buffer in which to return the code used for opening single-quote. - @param language The language for which to get codes. - @return Nothing - */ - void GetSmartSingleQuoteCharacters( ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); - - /** Retrieves the local overrides (character features) from the insertion - attributes, saved from the most recent text selection or attribute change to text. - @return The character features object. - */ - ICharFeatures GetInsertionCharFeatures( ) const; - /** Retrieves the character style from the insertion - attributes, saved from the most recent text selection or attribute change to text. - @return The character style object. - */ - ICharStyle GetInsertionCharStyle( ) const; - /** Sets the character features and style for the current insertion attributes. - @param pFeatures The new character features object. - @param pStyleName The new style name. - @return Nothing - */ - void SetInsertionFeaturesAndStyle( const ICharFeatures& pFeatures, const ATETextDOM::Unicode* pStyleName); - - /** Retrieves the superscript size. - @return The size in document points. - */ - ATETextDOM::Real GetSuperscriptSize( ) const; - /** Sets the superscript size. - @param value The new size in document points. - @return Nothing - */ - void SetSuperscriptSize( ATETextDOM::Real value); - /** Retrieves the superscript position. - @return The position in document points and page coordinates. - */ - ATETextDOM::Real GetSuperscriptPosition( ) const; - /** Sets the superscript position. - @param value The new position in document points and page coordinates. - @return Nothing - */ - void SetSuperscriptPosition( ATETextDOM::Real value); - /** Retrieves the subscript size. - @return The size in document points. - */ - ATETextDOM::Real GetSubscriptSize( ) const; - /** Sets the supbscript size. - @param value The new size in document points. - @return Nothing - */ - void SetSubscriptSize( ATETextDOM::Real value); - /** Retrieves the subscript position. - @return The position in document points and page coordinates. - */ - ATETextDOM::Real GetSubscriptPosition( ) const; - /** Sets the subscript position. - @param value The new position in document points and page coordinates.Text that does not fit is truncated - @return Nothing - */ - void SetSubscriptPosition( ATETextDOM::Real value); - - /** Retrieves the small-cap size. - @return The size in document points. - */ - ATETextDOM::Real GetSmallCapSize( ) const; - /** Sets the small-cap size. - @param value The new size in document points. - @return Nothing - */ - void SetSmallCapSize( ATETextDOM::Real value); - - /** Reports whether hidden characters are shown. - @return True if hidden characters are shown. - */ - bool GetShowHiddenCharacters( ) const; - /** Turns show hidden characters on or off. - @param value True to show hidden characters, false to hide them. - */ - void SetShowHiddenCharacters( bool value); - - /** Retrieves the greeking threshhold. - @return The greeking threshhold in document points. - */ - ATETextDOM::Int32 GetGreekingSize( ) const; - /** Sets the greeking threshhold. - @param value The new threshhold in document points. - @return Nothing - */ - void SetGreekingSize( ATETextDOM::Int32 value); - - /** Reports whether substitute fonts are highlighted. - @return True if substitute fonts are highlighted. - */ - bool GetHighlightSubstituteFonts( ) const; - /** Turns highlighting of substitute fonts on or off. - @param value True to highlight substitute fonts, false to turn highlighting off. - */ - void SetHighlightSubstituteFonts( bool value); - /** Reports whether alternate glyphs are highlighted. - @return True if alternate glyphs are highlighted. - */ - bool GetHighlightAlternateGlyphs( ) const; - /** Turns highlighting of alternate glyphs on or off. - @param value True to highligh alternate glyphs, false to turn highlighting off. - */ - void SetHighlightAlternateGlyphs( bool value); - -}; - -////////////////////////////////////////////// -// --IVersionInfo-- -////////////////////////////////////////////// -/** This object encapsulates version information for - the Adobe Text Engine (ATE). -*/ -class IVersionInfo -{ -private: - VersionInfoRef fVersionInfo; -public: - /** Constructor - @return The new object. */ - IVersionInfo(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IVersionInfo(const IVersionInfo& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IVersionInfo& operator=(const IVersionInfo& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IVersionInfo& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IVersionInfo& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param versioninfo The C object. - @return The new C++ object. */ - explicit IVersionInfo(VersionInfoRef versioninfo); - /** Destructor */ - virtual ~IVersionInfo(); - /** Retrieves a reference to this object. - @return The object reference. */ - VersionInfoRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Retrieves the major version portion of the version number. - @return The major version value. */ - int GetMajorVersion( ); - /** Retrieves the minor version portion of the version number. - @return The minor version value. */ - int GetMinorVersion( ); - /** Retrieves the sub-minor version (patch) portion of the version number. - @return The sub-minor version value. */ - int GetSubMinorVersion( ); - - /** Retrieves the version number as a string of UTF-16 characters. - For example: - @code - ASUTF16 versionString[256]; - GetVersionAsUTF16(versionString , 256); - @endcode - @param versionString [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - */ - int GetVersionAsUTF16( ASUTF16* versionString, int maxLength); - -}; - -////////////////////////////////////////////// -// --IArrayApplicationPaintRef-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of application paint - objects, which encapsulate Illustrator-specific painting - of fill and stroke for text, as defined by the \c #AIATEPaintSuite. - @see \c IApplicationPaint - */ - -class IArrayApplicationPaintRef -{ -private: - ArrayApplicationPaintRefRef fArrayApplicationPaintRef; -public: - /** Constructor - @return The new object. */ - IArrayApplicationPaintRef(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayApplicationPaintRef(const IArrayApplicationPaintRef& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayApplicationPaintRef& operator=(const IArrayApplicationPaintRef& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayApplicationPaintRef& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayApplicationPaintRef& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayapplicationpaintref The C object. - @return The new C++ object. */ - explicit IArrayApplicationPaintRef(ArrayApplicationPaintRefRef arrayapplicationpaintref); - /** Destructor */ - virtual ~IArrayApplicationPaintRef(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayApplicationPaintRefRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - IApplicationPaint GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - IApplicationPaint GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member object. - */ - IApplicationPaint Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayReal-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of real-number values. */ -class IArrayReal -{ -private: - ArrayRealRef fArrayReal; -public: - /** Constructor - @return The new object. */ - IArrayReal(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayReal(const IArrayReal& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayReal& operator=(const IArrayReal& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayReal& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayReal& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayreal The C object. - @return The new C++ object. */ - explicit IArrayReal(ArrayRealRef arrayreal); - /** Destructor */ - virtual ~IArrayReal(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayRealRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - ATETextDOM::Real GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - ATETextDOM::Real GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - ATETextDOM::Real Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayBool-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of boolean values. */ -class IArrayBool -{ -private: - ArrayBoolRef fArrayBool; -public: - /** Constructor - @return The new object. */ - IArrayBool(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayBool(const IArrayBool& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayBool& operator=(const IArrayBool& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayBool& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayBool& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraybool The C object. - @return The new C++ object. */ - explicit IArrayBool(ArrayBoolRef arraybool); - /** Destructor */ - virtual ~IArrayBool(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayBoolRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - bool GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - bool GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - bool Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayInteger-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of integer values. */ -class IArrayInteger -{ -private: - ArrayIntegerRef fArrayInteger; -public: - /** Constructor - @return The new object. */ - IArrayInteger(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayInteger(const IArrayInteger& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayInteger& operator=(const IArrayInteger& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayInteger& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayInteger& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayinteger The C object. - @return The new C++ object. */ - explicit IArrayInteger(ArrayIntegerRef arrayinteger); - /** Destructor */ - virtual ~IArrayInteger(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayIntegerRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - ATETextDOM::Int32 GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - ATETextDOM::Int32 GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - ATETextDOM::Int32 Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayLineCapType-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of line-cap type values. - See \c #LineCapType. */ -class IArrayLineCapType -{ -private: - ArrayLineCapTypeRef fArrayLineCapType; -public: - /** Constructor - @return The new object. */ - IArrayLineCapType(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayLineCapType(const IArrayLineCapType& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayLineCapType& operator=(const IArrayLineCapType& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayLineCapType& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayLineCapType& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraylinecaptype The C object. - @return The new C++ object. */ - explicit IArrayLineCapType(ArrayLineCapTypeRef arraylinecaptype); - /** Destructor */ - virtual ~IArrayLineCapType(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayLineCapTypeRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - LineCapType GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - LineCapType GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - LineCapType Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayFigureStyle-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of figure style values. - See \c #FigureStyle. */ -class IArrayFigureStyle -{ -private: - ArrayFigureStyleRef fArrayFigureStyle; -public: - /** Constructor - @return The new object. */ - IArrayFigureStyle(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayFigureStyle(const IArrayFigureStyle& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayFigureStyle& operator=(const IArrayFigureStyle& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayFigureStyle& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayFigureStyle& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayfigurestyle The C object. - @return The new C++ object. */ - explicit IArrayFigureStyle(ArrayFigureStyleRef arrayfigurestyle); - /** Destructor */ - virtual ~IArrayFigureStyle(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayFigureStyleRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - FigureStyle GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - FigureStyle GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - FigureStyle Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayLineJoinType-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of line-join type values. - See \c #LineJoinType. */ -class IArrayLineJoinType -{ -private: - ArrayLineJoinTypeRef fArrayLineJoinType; -public: - /** Constructor - @return The new object. */ - IArrayLineJoinType(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayLineJoinType(const IArrayLineJoinType& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayLineJoinType& operator=(const IArrayLineJoinType& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayLineJoinType& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayLineJoinType& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraylinejointype The C object. - @return The new C++ object. */ - explicit IArrayLineJoinType(ArrayLineJoinTypeRef arraylinejointype); - /** Destructor */ - virtual ~IArrayLineJoinType(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayLineJoinTypeRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - LineJoinType GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - LineJoinType GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - LineJoinType Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayWariChuJustification-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of WariChu justification values. - See \c #WariChuJustification. */ -class IArrayWariChuJustification -{ -private: - ArrayWariChuJustificationRef fArrayWariChuJustification; -public: - /** Constructor - @return The new object. */ - IArrayWariChuJustification(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayWariChuJustification(const IArrayWariChuJustification& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayWariChuJustification& operator=(const IArrayWariChuJustification& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayWariChuJustification& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayWariChuJustification& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraywarichujustification The C object. - @return The new C++ object. */ - explicit IArrayWariChuJustification(ArrayWariChuJustificationRef arraywarichujustification); - /** Destructor */ - virtual ~IArrayWariChuJustification(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayWariChuJustificationRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - WariChuJustification GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - WariChuJustification GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - WariChuJustification Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayStyleRunAlignment-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of style-run alignment values. - See \c #StyleRunAlignment. */ -class IArrayStyleRunAlignment -{ -private: - ArrayStyleRunAlignmentRef fArrayStyleRunAlignment; -public: - /** Constructor - @return The new object. */ - IArrayStyleRunAlignment(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayStyleRunAlignment(const IArrayStyleRunAlignment& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayStyleRunAlignment& operator=(const IArrayStyleRunAlignment& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayStyleRunAlignment& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayStyleRunAlignment& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraystylerunalignment The C object. - @return The new C++ object. */ - explicit IArrayStyleRunAlignment(ArrayStyleRunAlignmentRef arraystylerunalignment); - /** Destructor */ - virtual ~IArrayStyleRunAlignment(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayStyleRunAlignmentRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - StyleRunAlignment GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - StyleRunAlignment GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - StyleRunAlignment Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayAutoKernType-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of automatic kern type values. - See \c #AutoKernType. */ -class IArrayAutoKernType -{ -private: - ArrayAutoKernTypeRef fArrayAutoKernType; -public: - /** Constructor - @return The new object. */ - IArrayAutoKernType(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayAutoKernType(const IArrayAutoKernType& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayAutoKernType& operator=(const IArrayAutoKernType& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayAutoKernType& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayAutoKernType& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayautokerntype The C object. - @return The new C++ object. */ - explicit IArrayAutoKernType(ArrayAutoKernTypeRef arrayautokerntype); - /** Destructor */ - virtual ~IArrayAutoKernType(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayAutoKernTypeRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - AutoKernType GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - AutoKernType GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - AutoKernType Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayBaselineDirection-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of baseline direction values. - See \c #BaselineDirection. */ -class IArrayBaselineDirection -{ -private: - ArrayBaselineDirectionRef fArrayBaselineDirection; -public: - /** Constructor - @return The new object. */ - IArrayBaselineDirection(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayBaselineDirection(const IArrayBaselineDirection& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayBaselineDirection& operator=(const IArrayBaselineDirection& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayBaselineDirection& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayBaselineDirection& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraybaselinedirection The C object. - @return The new C++ object. */ - explicit IArrayBaselineDirection(ArrayBaselineDirectionRef arraybaselinedirection); - /** Destructor */ - virtual ~IArrayBaselineDirection(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayBaselineDirectionRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - BaselineDirection GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - BaselineDirection GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - BaselineDirection Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayLanguage-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of language values. - See \c #Language. */ -class IArrayLanguage -{ -private: - ArrayLanguageRef fArrayLanguage; -public: - /** Constructor - @return The new object. */ - IArrayLanguage(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayLanguage(const IArrayLanguage& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayLanguage& operator=(const IArrayLanguage& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayLanguage& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayLanguage& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraylanguage The C object. - @return The new C++ object. */ - explicit IArrayLanguage(ArrayLanguageRef arraylanguage); - /** Destructor */ - virtual ~IArrayLanguage(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayLanguageRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - Language GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - Language GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - Language Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayFontCapsOption-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of font caps option values. - See \c #FontCapsOption. */ -class IArrayFontCapsOption -{ -private: - ArrayFontCapsOptionRef fArrayFontCapsOption; -public: - /** Constructor - @return The new object. */ - IArrayFontCapsOption(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayFontCapsOption(const IArrayFontCapsOption& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayFontCapsOption& operator=(const IArrayFontCapsOption& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayFontCapsOption& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayFontCapsOption& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayfontcapsoption The C object. - @return The new C++ object. */ - explicit IArrayFontCapsOption(ArrayFontCapsOptionRef arrayfontcapsoption); - /** Destructor */ - virtual ~IArrayFontCapsOption(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayFontCapsOptionRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - FontCapsOption GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - FontCapsOption GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - FontCapsOption Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayFontBaselineOption-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of font baseline option values. - See \c #FontBaselineOption. */ -class IArrayFontBaselineOption -{ -private: - ArrayFontBaselineOptionRef fArrayFontBaselineOption; -public: - /** Constructor - @return The new object. */ - IArrayFontBaselineOption(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayFontBaselineOption(const IArrayFontBaselineOption& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayFontBaselineOption& operator=(const IArrayFontBaselineOption& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayFontBaselineOption& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayFontBaselineOption& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayfontbaselineoption The C object. - @return The new C++ object. */ - explicit IArrayFontBaselineOption(ArrayFontBaselineOptionRef arrayfontbaselineoption); - /** Destructor */ - virtual ~IArrayFontBaselineOption(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayFontBaselineOptionRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - FontBaselineOption GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - FontBaselineOption GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - FontBaselineOption Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayFontOpenTypePositionOption-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of font OpenType position option values. - See \c #FontOpenTypePositionOption. */ -class IArrayFontOpenTypePositionOption -{ -private: - ArrayFontOpenTypePositionOptionRef fArrayFontOpenTypePositionOption; -public: - /** Constructor - @return The new object. */ - IArrayFontOpenTypePositionOption(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayFontOpenTypePositionOption(const IArrayFontOpenTypePositionOption& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayFontOpenTypePositionOption& operator=(const IArrayFontOpenTypePositionOption& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayFontOpenTypePositionOption& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayFontOpenTypePositionOption& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayfontopentypepositionoption The C object. - @return The new C++ object. */ - explicit IArrayFontOpenTypePositionOption(ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption); - /** Destructor */ - virtual ~IArrayFontOpenTypePositionOption(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayFontOpenTypePositionOptionRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - FontOpenTypePositionOption GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - FontOpenTypePositionOption GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - FontOpenTypePositionOption Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayUnderlinePosition-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of underline position values. - See \c #UnderlinePosition. */ -class IArrayUnderlinePosition -{ -private: - ArrayUnderlinePositionRef fArrayUnderlinePosition; -public: - /** Constructor - @return The new object. */ - IArrayUnderlinePosition(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayUnderlinePosition(const IArrayUnderlinePosition& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayUnderlinePosition& operator=(const IArrayUnderlinePosition& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayUnderlinePosition& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayUnderlinePosition& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayunderlineposition The C object. - @return The new C++ object. */ - explicit IArrayUnderlinePosition(ArrayUnderlinePositionRef arrayunderlineposition); - /** Destructor */ - virtual ~IArrayUnderlinePosition(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayUnderlinePositionRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - UnderlinePosition GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - UnderlinePosition GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - UnderlinePosition Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayStrikethroughPosition-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of strikethrough position values. - See \c #StrikethroughPosition. */ -class IArrayStrikethroughPosition -{ -private: - ArrayStrikethroughPositionRef fArrayStrikethroughPosition; -public: - /** Constructor - @return The new object. */ - IArrayStrikethroughPosition(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayStrikethroughPosition(const IArrayStrikethroughPosition& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayStrikethroughPosition& operator=(const IArrayStrikethroughPosition& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayStrikethroughPosition& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayStrikethroughPosition& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraystrikethroughposition The C object. - @return The new C++ object. */ - explicit IArrayStrikethroughPosition(ArrayStrikethroughPositionRef arraystrikethroughposition); - /** Destructor */ - virtual ~IArrayStrikethroughPosition(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayStrikethroughPositionRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - StrikethroughPosition GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - StrikethroughPosition GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - StrikethroughPosition Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayParagraphJustification-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of paragraph justification values. - See \c #ParagraphJustification. */ -class IArrayParagraphJustification -{ -private: - ArrayParagraphJustificationRef fArrayParagraphJustification; -public: - /** Constructor - @return The new object. */ - IArrayParagraphJustification(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayParagraphJustification(const IArrayParagraphJustification& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayParagraphJustification& operator=(const IArrayParagraphJustification& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayParagraphJustification& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayParagraphJustification& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayparagraphjustification The C object. - @return The new C++ object. */ - explicit IArrayParagraphJustification(ArrayParagraphJustificationRef arrayparagraphjustification); - /** Destructor */ - virtual ~IArrayParagraphJustification(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayParagraphJustificationRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - ParagraphJustification GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - ParagraphJustification GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - ParagraphJustification Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayArrayReal-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of arrays of real-number values. */ -class IArrayArrayReal -{ -private: - ArrayArrayRealRef fArrayArrayReal; -public: - /** Constructor - @return The new object. */ - IArrayArrayReal(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayArrayReal(const IArrayArrayReal& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayArrayReal& operator=(const IArrayArrayReal& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayArrayReal& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayArrayReal& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayarrayreal The C object. - @return The new C++ object. */ - explicit IArrayArrayReal(ArrayArrayRealRef arrayarrayreal); - /** Destructor */ - virtual ~IArrayArrayReal(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayArrayRealRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of member arrays. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member array value. */ - IArrayReal GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member array value. */ - IArrayReal GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member array value. - */ - IArrayReal Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayBurasagariType-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of Burasagari type values. - See \c #BurasagariType. */ -class IArrayBurasagariType -{ -private: - ArrayBurasagariTypeRef fArrayBurasagariType; -public: - /** Constructor - @return The new object. */ - IArrayBurasagariType(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayBurasagariType(const IArrayBurasagariType& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayBurasagariType& operator=(const IArrayBurasagariType& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayBurasagariType& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayBurasagariType& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayburasagaritype The C object. - @return The new C++ object. */ - explicit IArrayBurasagariType(ArrayBurasagariTypeRef arrayburasagaritype); - /** Destructor */ - virtual ~IArrayBurasagariType(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayBurasagariTypeRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - BurasagariType GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - BurasagariType GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - BurasagariType Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayPreferredKinsokuOrder-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of preferred Kinsoku order values. - See \c #PreferredKinsokuOrder. */ -class IArrayPreferredKinsokuOrder -{ -private: - ArrayPreferredKinsokuOrderRef fArrayPreferredKinsokuOrder; -public: - /** Constructor - @return The new object. */ - IArrayPreferredKinsokuOrder(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayPreferredKinsokuOrder(const IArrayPreferredKinsokuOrder& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayPreferredKinsokuOrder& operator=(const IArrayPreferredKinsokuOrder& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayPreferredKinsokuOrder& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayPreferredKinsokuOrder& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraypreferredkinsokuorder The C object. - @return The new C++ object. */ - explicit IArrayPreferredKinsokuOrder(ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder); - /** Destructor */ - virtual ~IArrayPreferredKinsokuOrder(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayPreferredKinsokuOrderRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - PreferredKinsokuOrder GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - PreferredKinsokuOrder GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - PreferredKinsokuOrder Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayKinsokuRef-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of Kinsoku objects. */ -class IArrayKinsokuRef -{ -private: - ArrayKinsokuRefRef fArrayKinsokuRef; -public: - /** Constructor - @return The new object. */ - IArrayKinsokuRef(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayKinsokuRef(const IArrayKinsokuRef& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayKinsokuRef& operator=(const IArrayKinsokuRef& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayKinsokuRef& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayKinsokuRef& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraykinsokuref The C object. - @return The new C++ object. */ - explicit IArrayKinsokuRef(ArrayKinsokuRefRef arraykinsokuref); - /** Destructor */ - virtual ~IArrayKinsokuRef(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayKinsokuRefRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - IKinsoku GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - IKinsoku GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member object. - */ - IKinsoku Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayMojiKumiRef-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of MojiKumi objects. */ -class IArrayMojiKumiRef -{ -private: - ArrayMojiKumiRefRef fArrayMojiKumiRef; -public: - /** Constructor - @return The new object. */ - IArrayMojiKumiRef(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayMojiKumiRef(const IArrayMojiKumiRef& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayMojiKumiRef& operator=(const IArrayMojiKumiRef& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayMojiKumiRef& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayMojiKumiRef& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraymojikumiref The C object. - @return The new C++ object. */ - explicit IArrayMojiKumiRef(ArrayMojiKumiRefRef arraymojikumiref); - /** Destructor */ - virtual ~IArrayMojiKumiRef(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayMojiKumiRefRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - IMojiKumi GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - IMojiKumi GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member object. - */ - IMojiKumi Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayMojiKumiSetRef-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of MojiKumi set objects. */ -class IArrayMojiKumiSetRef -{ -private: - ArrayMojiKumiSetRefRef fArrayMojiKumiSetRef; -public: - /** Constructor - @return The new object. */ - IArrayMojiKumiSetRef(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayMojiKumiSetRef(const IArrayMojiKumiSetRef& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayMojiKumiSetRef& operator=(const IArrayMojiKumiSetRef& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayMojiKumiSetRef& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayMojiKumiSetRef& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraymojikumisetref The C object. - @return The new C++ object. */ - explicit IArrayMojiKumiSetRef(ArrayMojiKumiSetRefRef arraymojikumisetref); - /** Destructor */ - virtual ~IArrayMojiKumiSetRef(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayMojiKumiSetRefRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - IMojiKumiSet GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - IMojiKumiSet GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member object. - */ - IMojiKumiSet Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayTabStopsRef-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of tab-stops objects. */ -class IArrayTabStopsRef -{ -private: - ArrayTabStopsRefRef fArrayTabStopsRef; -public: - /** Constructor - @return The new object. */ - IArrayTabStopsRef(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayTabStopsRef(const IArrayTabStopsRef& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayTabStopsRef& operator=(const IArrayTabStopsRef& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayTabStopsRef& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayTabStopsRef& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraytabstopsref The C object. - @return The new C++ object. */ - explicit IArrayTabStopsRef(ArrayTabStopsRefRef arraytabstopsref); - /** Destructor */ - virtual ~IArrayTabStopsRef(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayTabStopsRefRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - ITabStops GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - ITabStops GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member object. - */ - ITabStops Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayLeadingType-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of preferred leading type values. - See \c #LeadingType. */ -class IArrayLeadingType -{ -private: - ArrayLeadingTypeRef fArrayLeadingType; -public: - /** Constructor - @return The new object. */ - IArrayLeadingType(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayLeadingType(const IArrayLeadingType& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayLeadingType& operator=(const IArrayLeadingType& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayLeadingType& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayLeadingType& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayleadingtype The C object. - @return The new C++ object. */ - explicit IArrayLeadingType(ArrayLeadingTypeRef arrayleadingtype); - /** Destructor */ - virtual ~IArrayLeadingType(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayLeadingTypeRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - LeadingType GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - LeadingType GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - LeadingType Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayFontRef-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of font objects. */ -class IArrayFontRef -{ -private: - ArrayFontRefRef fArrayFontRef; -public: - /** Constructor - @return The new object. */ - IArrayFontRef(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayFontRef(const IArrayFontRef& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayFontRef& operator=(const IArrayFontRef& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayFontRef& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayFontRef& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayfontref The C object. - @return The new C++ object. */ - explicit IArrayFontRef(ArrayFontRefRef arrayfontref); - /** Destructor */ - virtual ~IArrayFontRef(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayFontRefRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - IFont GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - IFont GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member object. - */ - IFont Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayGlyphID-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of glyph identifier objects. */ -class IArrayGlyphID -{ -private: - ArrayGlyphIDRef fArrayGlyphID; -public: - /** Constructor - @return The new object. */ - IArrayGlyphID(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayGlyphID(const IArrayGlyphID& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayGlyphID& operator=(const IArrayGlyphID& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayGlyphID& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayGlyphID& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayglyphid The C object. - @return The new C++ object. */ - explicit IArrayGlyphID(ArrayGlyphIDRef arrayglyphid); - /** Destructor */ - virtual ~IArrayGlyphID(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayGlyphIDRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - ATEGlyphID GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - ATEGlyphID GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member object. - */ - ATEGlyphID Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayRealPoint-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of point position values - with real-number coordinates. */ -class IArrayRealPoint -{ -private: - ArrayRealPointRef fArrayRealPoint; -public: - /** Constructor - @return The new object. */ - IArrayRealPoint(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayRealPoint(const IArrayRealPoint& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayRealPoint& operator=(const IArrayRealPoint& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayRealPoint& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayRealPoint& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayrealpoint The C object. - @return The new C++ object. */ - explicit IArrayRealPoint(ArrayRealPointRef arrayrealpoint); - /** Destructor */ - virtual ~IArrayRealPoint(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayRealPointRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - ATETextDOM::RealPoint GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - ATETextDOM::RealPoint GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - ATETextDOM::RealPoint Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayRealMatrix-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of transformation matrix values. */ -class IArrayRealMatrix -{ -private: - ArrayRealMatrixRef fArrayRealMatrix; -public: - /** Constructor - @return The new object. */ - IArrayRealMatrix(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayRealMatrix(const IArrayRealMatrix& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayRealMatrix& operator=(const IArrayRealMatrix& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayRealMatrix& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayRealMatrix& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayrealmatrix The C object. - @return The new C++ object. */ - explicit IArrayRealMatrix(ArrayRealMatrixRef arrayrealmatrix); - /** Destructor */ - virtual ~IArrayRealMatrix(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayRealMatrixRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - ATETextDOM::RealMatrix GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - ATETextDOM::RealMatrix GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - ATETextDOM::RealMatrix Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayLine-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of line objects - where each entry is the start and end point of a 2D line. -*/ -class IArrayLine -{ -private: - ArrayLineRef fArrayLine; -public: - /** Constructor. - @return The new object. */ - IArrayLine(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayLine(const IArrayLine& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayLine& operator=(const IArrayLine& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayLine& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayLine& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param ArrayLineRef The C object. - @return The new C++ object. */ - explicit IArrayLine(ArrayLineRef ArrayLineRef); - /** Destructor */ - virtual ~IArrayLine(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayLineRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves the line start and end points of a 2Dline in this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @param lineStart [out] the ATETextDOM::RealPoint object defining the start of the line. - @param lineEnd [out] the ATETextDOM::RealPoint object defining the end of the line. - @return Nothing. - */ - void Item( ATETextDOM::Int32 index, ATETextDOM::FloatPoint* lineStart, ATETextDOM::FloatPoint* lineEnd) const; -}; - -////////////////////////////////////////////// -// --IArrayComposerEngine-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of composer engine objects. -*/ -class IArrayComposerEngine -{ -private: - ArrayComposerEngineRef fArrayComposerEngine; -public: - /** Constructor. - @return The new object. */ - IArrayComposerEngine(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayComposerEngine(const IArrayComposerEngine& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayComposerEngine& operator=(const IArrayComposerEngine& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayComposerEngine& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayComposerEngine& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraycomposerengine The C object. - @return The new C++ object. */ - explicit IArrayComposerEngine(ArrayComposerEngineRef arraycomposerengine); - /** Destructor */ - virtual ~IArrayComposerEngine(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayComposerEngineRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - ComposerEngine GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - ComposerEngine GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - ComposerEngine Item( ATETextDOM::Int32 index) const; - -}; -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only -////////////////////////////////////////////// -// --IArrayParagraphDirection-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of paragraph direction objects. -*/ -class IArrayParagraphDirection -{ -private: - ArrayParagraphDirectionRef fArrayParagraphDirection; -public: - /** Constructor - @return The new object. */ - IArrayParagraphDirection(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayParagraphDirection(const IArrayParagraphDirection& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayParagraphDirection& operator=(const IArrayParagraphDirection& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayParagraphDirection& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayParagraphDirection& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayparagraphdirection The C object. - @return The new C++ object. */ - explicit IArrayParagraphDirection(ArrayParagraphDirectionRef arrayparagraphdirection); - /** Destructor */ - virtual ~IArrayParagraphDirection(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayParagraphDirectionRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - ParagraphDirection GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - ParagraphDirection GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - ParagraphDirection Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayJustificationMethod-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of justification method objects. -*/ -class IArrayJustificationMethod -{ -private: - ArrayJustificationMethodRef fArrayJustificationMethod; -public: - /** Constructor - @return The new object. */ - IArrayJustificationMethod(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayJustificationMethod(const IArrayJustificationMethod& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayJustificationMethod& operator=(const IArrayJustificationMethod& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayJustificationMethod& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayJustificationMethod& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arrayjustificationmethod The C object. - @return The new C++ object. */ - explicit IArrayJustificationMethod(ArrayJustificationMethodRef arrayjustificationmethod); - /** Destructor */ - virtual ~IArrayJustificationMethod(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayJustificationMethodRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - JustificationMethod GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - JustificationMethod GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - JustificationMethod Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayKashidaWidth-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of justification method objects. -*/ -class IArrayKashidaWidth -{ -private: - ArrayKashidaWidthRef fArrayKashidaWidth; -public: - /** Constructor - @return The new object. */ - IArrayKashidaWidth(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayKashidaWidth(const IArrayKashidaWidth& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayKashidaWidth& operator=(const IArrayKashidaWidth& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayKashidaWidth& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayKashidaWidth& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraykashidawidth The C object. - @return The new C++ object. */ - explicit IArrayKashidaWidth(ArrayKashidaWidthRef arraykashidawidth); - /** Destructor */ - virtual ~IArrayKashidaWidth(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayKashidaWidthRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - KashidaWidth GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - KashidaWidth GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - KashidaWidth Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayKashidas-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of kashidas objects. -*/ -class IArrayKashidas -{ -private: - ArrayKashidasRef fArrayKashidas; -public: - /** Constructor - @return The new object. */ - IArrayKashidas(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayKashidas(const IArrayKashidas& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayKashidas& operator=(const IArrayKashidas& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayKashidas& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayKashidas& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraykashidas The C object. - @return The new C++ object. */ - explicit IArrayKashidas(ArrayKashidasRef arraykashidas); - /** Destructor */ - virtual ~IArrayKashidas(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayKashidasRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - Kashidas GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - Kashidas GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - Kashidas Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayDirOverride-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of writing direction override objects. -*/ -class IArrayDirOverride -{ -private: - ArrayDirOverrideRef fArrayDirOverride; -public: - /** Constructor - @return The new object. */ - IArrayDirOverride(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayDirOverride(const IArrayDirOverride& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayDirOverride& operator=(const IArrayDirOverride& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayDirOverride& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayDirOverride& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraydiroverride The C object. - @return The new C++ object. */ - explicit IArrayDirOverride(ArrayDirOverrideRef arraydiroverride); - /** Destructor */ - virtual ~IArrayDirOverride(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayDirOverrideRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - DirOverride GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - DirOverride GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - DirOverride Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayDigitSet-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of digit set objects. -*/ -class IArrayDigitSet -{ -private: - ArrayDigitSetRef fArrayDigitSet; -public: - /** Constructor - @return The new object. */ - IArrayDigitSet(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayDigitSet(const IArrayDigitSet& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayDigitSet& operator=(const IArrayDigitSet& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayDigitSet& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayDigitSet& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraydigitset The C object. - @return The new C++ object. */ - explicit IArrayDigitSet(ArrayDigitSetRef arraydigitset); - /** Destructor */ - virtual ~IArrayDigitSet(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayDigitSetRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - DigitSet GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - DigitSet GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - DigitSet Item( ATETextDOM::Int32 index) const; - -}; - -////////////////////////////////////////////// -// --IArrayDiacVPos-- -////////////////////////////////////////////// -/** Provides access to an ordered collection of diacritics positioning objects. -*/ -class IArrayDiacVPos -{ -private: - ArrayDiacVPosRef fArrayDiacVPos; -public: - /** Constructor - @return The new object. */ - IArrayDiacVPos(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IArrayDiacVPos(const IArrayDiacVPos& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IArrayDiacVPos& operator=(const IArrayDiacVPos& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IArrayDiacVPos& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IArrayDiacVPos& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param arraydiacvpos The C object. - @return The new C++ object. */ - explicit IArrayDiacVPos(ArrayDiacVPosRef arraydiacvpos); - /** Destructor */ - virtual ~IArrayDiacVPos(); - /** Retrieves a reference to this object. - @return The object reference. */ - ArrayDiacVPosRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member value. */ - DiacVPos GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member value. */ - DiacVPos GetLast( ) const; - - // ======================================================================== - // METHODS - // ======================================================================== - - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param index The 0-based position index. - @return The member value. - */ - DiacVPos Item( ATETextDOM::Int32 index) const; - -}; -#endif - - -////////////////////////////////////////////// -// --ICharFeatures-- -////////////////////////////////////////////// - -/** This class encapsulates the complete set of character attributes that - can be applied to text. An object of this type is contained in an - \c ICharStyle object, and is returned from various methods that - query character features of text runs and text ranges. A paragraph - style can also have a default set of character features; see - \c IParaFeatures::GetDefaultCharFeatures(). - - Attribute values are inherited from the Normal style, and can be overridden - in a named style associated with the character, or at the local character level. - - A style or character can partially define attributes. Only those values - that are assigned override the inherited values. The constructor creates - an empty object, in which all attribute values are unassigned. - Setting a value causes it to be assigned, and clearing it causes - it to be unassigned. When you retrieve an attribute value, a boolean - return value, \c isAssigned, reports whether that attribute has a local - value in the queried object. - - @see \c ICharInspector - - */ -class ICharFeatures -{ -private: - CharFeaturesRef fCharFeatures; -public: - /** Constructor. The object is empty; that is, all - attribute values are unassigned. - @return The new object. */ - ICharFeatures(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICharFeatures(const ICharFeatures& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICharFeatures& operator=(const ICharFeatures& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICharFeatures& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICharFeatures& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param charfeatures The C object. - @return The new C++ object. */ - explicit ICharFeatures(CharFeaturesRef charfeatures); - /** Destructor */ - virtual ~ICharFeatures(); - /** Retrieves a reference to this object. - @return The object reference. */ - CharFeaturesRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Creates a duplicate of this object. - @return The new object. */ - ICharFeatures Clone( ) const; - - /////////////////////////////////////////////////////////////////////// - // GET PROPERTIES - /////////////////////////////////////////////////////////////////////// - - /** Retrieves the font attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The font object. */ - IFont GetFont( bool* isAssigned) const; - /** Retrieves the font size attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The font size in dcoument points. */ - ATETextDOM::Real GetFontSize( bool* isAssigned) const; - /** Retrieves the horizontal scale attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The scale value, where 1 is 100% */ - ATETextDOM::Real GetHorizontalScale( bool* isAssigned) const; - /** Retrieves the vertical scale attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The scale value, where 1 is 100%. */ - ATETextDOM::Real GetVerticalScale( bool* isAssigned) const; - /** Retrieves the automatic leading attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if automatic leading is on, false if it is off. */ - bool GetAutoLeading( bool* isAssigned) const; - /** Retrieves the leading attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The leading value in document points. */ - ATETextDOM::Real GetLeading( bool* isAssigned) const; - /** Retrieves the tracking attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The tracking value in document points. */ - ATETextDOM::Int32 GetTracking( bool* isAssigned) const; - /** Retrieves the baseline shift attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The baseline shift value in document points. */ - ATETextDOM::Real GetBaselineShift( bool* isAssigned) const; - /** Retrieves the character rotation attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The character rotation value in degrees. */ - ATETextDOM::Real GetCharacterRotation( bool* isAssigned) const; - /** Retrieves the automatic kerning type attribute of this character. - (The actual kerning value applies to character pairs rather than - individual characters, so is available through the \c ICharStyle.) - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The automatic kerning type constant. - @note Use \c IStory::GetKern( ) to get the kerning - value for a text range. */ - AutoKernType GetAutoKernType( bool* isAssigned) const; - - /** Retrieves the font caps option attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The font caps option constant. */ - FontCapsOption GetFontCapsOption( bool* isAssigned) const; - /** Retrieves the font baseline option attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The font baseline option constant. */ - FontBaselineOption GetFontBaselineOption( bool* isAssigned) const; - /** Retrieves the font OpenType position option attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The font OpenType position option constant. */ - FontOpenTypePositionOption GetFontOpenTypePositionOption( bool* isAssigned) const; - /** Retrieves the strikethrough position attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The strikethrough position constant. */ - StrikethroughPosition GetStrikethroughPosition( bool* isAssigned) const; - /** Retrieves the underline position attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The underline position constant. */ - UnderlinePosition GetUnderlinePosition( bool* isAssigned) const; - /** Retrieves the underline offset attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The underline offset value, in document points. */ - ATETextDOM::Real GetUnderlineOffset( bool* isAssigned) const; - // ------------------------------------------------------------------ - // OpenType settings - // ------------------------------------------------------------------ - /** Retrieves the OpenType ligature attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if ligature is on, false if it is off. */ - bool GetLigature( bool* isAssigned) const; - /** Retrieves the OpenType discretionary ligatures attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if discretionary ligatures are on, false if they are off. */ - bool GetDiscretionaryLigatures( bool* isAssigned) const; - /** Retrieves the OpenType context ligatures attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if context ligatures are on, false if they are off. */ - bool GetContextualLigatures( bool* isAssigned) const; - /** Retrieves the OpenType alternate ligatures attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if alternate ligatures are on, false if they are off. */ - bool GetAlternateLigatures( bool* isAssigned) const; - /** Retrieves the OpenType old-style attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if the character is old-style, false if it is not. */ - bool GetOldStyle( bool* isAssigned) const; - /** Retrieves the OpenType fractions attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if fractions are on, false if they are off. */ - bool GetFractions( bool* isAssigned) const; - /** Retrieves the OpenType ordinals attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if ordinals are on, false if they are off. */ - bool GetOrdinals( bool* isAssigned) const; - /** Retrieves the OpenType swash attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if swash is on, false if it is off. */ - bool GetSwash( bool* isAssigned) const; - /** Retrieves the OpenType titling attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if titling is on, false if it is off. */ - bool GetTitling( bool* isAssigned) const; - /** Retrieves the OpenType connection forms attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if connection forms are on, false if they are off. */ - bool GetConnectionForms( bool* isAssigned) const; - /** Retrieves the OpenType stylistic alternates attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if stylistic alternates are on, false if they are off. */ - bool GetStylisticAlternates( bool* isAssigned) const; - /** Retrieves the OpenType ornaments attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if ornaments are on, false if they are off. */ - bool GetOrnaments( bool* isAssigned) const; - /** Retrieves the OpenType figure style attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The figure style constant. */ - FigureStyle GetFigureStyle( bool* isAssigned) const; - // ------------------------------------------------------------------ - // Japanese OpenType settings - // ------------------------------------------------------------------ - /** Retrieves the Japanese OpenType proportional metrics attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if proportional metrics are on, false if they are off. */ - bool GetProportionalMetrics( bool* isAssigned) const; - /** Retrieves the Japanese OpenType Kana attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if Kana is on, false if it is off. */ - bool GetKana( bool* isAssigned) const; - /** Retrieves the Japanese OpenType Ruby attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if Ruby is on, false if it is off. */ - bool GetRuby( bool* isAssigned) const; - /** Retrieves the Japanese OpenType italics attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if italics is on, false if it is off. */ - bool GetItalics( bool* isAssigned) const; - /** Retrieves the Japanese OpenType baseline direction attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The baseline direction constant. */ - BaselineDirection GetBaselineDirection( bool* isAssigned) const; - /** Retrieves the Japanese OpenType language attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The language constant. */ - Language GetLanguage( bool* isAssigned) const; - /** Retrieves the Japanese OpenType alternate feature attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The Japanese alternate feature constant. */ - JapaneseAlternateFeature GetJapaneseAlternateFeature( bool* isAssigned) const; - /** Retrieves the Japanese OpenType Tsume attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The Tsume value, in document points. */ - ATETextDOM::Real GetTsume( bool* isAssigned) const; - /** Retrieves the Japanese OpenType style run alignment attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The style run alignment constant. */ - StyleRunAlignment GetStyleRunAlignment( bool* isAssigned) const; - // ------------------------------------------------------------------ - // WariChu settings - // ------------------------------------------------------------------ - /** Retrieves the WariChu-enabled attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if WariChu is on, false if it is off. */ - bool GetWariChuEnabled( bool* isAssigned) const; - /** Retrieves the WariChu line count attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The WariChu line count value. */ - ATETextDOM::Int32 GetWariChuLineCount( bool* isAssigned) const; - /** Retrieves the WariChu line gap attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The WariChu line gap value. */ - ATETextDOM::Int32 GetWariChuLineGap( bool* isAssigned) const; - /** Retrieves the WariChu scale attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The WariChu scale factor, where 1 is 100% */ - ATETextDOM::Real GetWariChuScale( bool* isAssigned) const; - /** Retrieves the WariChu size attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The WariChu size in document points. */ - ATETextDOM::Real GetWariChuSize( bool* isAssigned) const; - /** Retrieves the WariChu widow amount attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The WariChu widow amount value. */ - ATETextDOM::Int32 GetWariChuWidowAmount( bool* isAssigned) const; - /** Retrieves the WariChu orphan amount attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The WariChu orphan amount value. */ - ATETextDOM::Int32 GetWariChuOrphanAmount( bool* isAssigned) const; - /** Retrieves the WariChu justification attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The WariChu justification constant. */ - WariChuJustification GetWariChuJustification( bool* isAssigned) const; - /** Retrieves the Tate Chu Yoko up-down adjustment attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The up-down adjustment value. */ - ATETextDOM::Int32 GetTCYUpDownAdjustment( bool* isAssigned) const; - /** Retrieves the Tate Chu Yoko right-left adjustment attribute of this character style. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The right-left adjustment value. */ - ATETextDOM::Int32 GetTCYLeftRightAdjustment( bool* isAssigned) const; - /** Retrieves the left Aki attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The left Aki value. */ - ATETextDOM::Real GetLeftAki( bool* isAssigned) const; - /** Retrieves the right Aki attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The right Aki value. */ - ATETextDOM::Real GetRightAki( bool* isAssigned) const; - //--------------------------------------------------------------- - // General settings - //--------------------------------------------------------------- - /** Retrieves the no-break attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if no-break is on, false if it is off. */ - bool GetNoBreak( bool* isAssigned) const; - /** Retrieves the fill color attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The paint object containing the fill color. */ - IApplicationPaint GetFillColor( bool* isAssigned) const; - /** Retrieves the stroke color attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The paint object containing the stroke color. */ - IApplicationPaint GetStrokeColor( bool* isAssigned) const; - /** Retrieves the fill attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if fill is on, false if it is off. */ - bool GetFill( bool* isAssigned) const; - /** Retrieves the fill visibilty attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if fill is visible, false if it is not. */ - bool GetFillVisible( bool* isAssigned) const; - /** Retrieves the stroke attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if stroke is on, false if it is off. */ - bool GetStroke( bool* isAssigned) const; - /** Retrieves the stroke visibility attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if stroke is visible, false if it is not. */ - bool GetStrokeVisible( bool* isAssigned) const; - /** Retrieves the fill-first attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if fill-first is on, false if it is off. */ - bool GetFillFirst( bool* isAssigned) const; - /** Retrieves the fill overprint attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if fill overprint is on, false if it is off. */ - bool GetFillOverPrint( bool* isAssigned) const; - /** Retrieves the stroke overprint attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if stroke overprint is on, false if it is off. */ - bool GetStrokeOverPrint( bool* isAssigned) const; - /** Retrieves the fill background color attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The paint object containing the fill color. */ - IApplicationPaint GetFillBackgroundColor( bool* isAssigned) const; - /** Retrieves the fill background attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if fill is on, false if it is off. */ - bool GetFillBackground( bool* isAssigned) const; - /** Retrieves the line cap attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The line cap type constant. */ - LineCapType GetLineCap( bool* isAssigned) const; - /** Retrieves the line join attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The line join type constant. */ - LineJoinType GetLineJoin( bool* isAssigned) const; - /** Retrieves the line width attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The line width value in document points. */ - ATETextDOM::Real GetLineWidth( bool* isAssigned) const; - /** Retrieves the miter limit attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The miter limit value in document points. */ - ATETextDOM::Real GetMiterLimit( bool* isAssigned) const; - /** Retrieves the line dash offset attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The line dash offset value in document points. */ - ATETextDOM::Real GetLineDashOffset( bool* isAssigned) const; - /** Retrieves the line dash array attribute of this character. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The line dash array object. */ - IArrayReal GetLineDashArray( bool* isAssigned) const; - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - // ------------------------------------------------------------------ - // Complex Script Settings - // ------------------------------------------------------------------ - - /** Retrieves the kashidas attribute of this character. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return The kashidas object. - */ - Kashidas GetKashidas( bool* isAssigned) const; - /** Retrieves the direction override attribute of this character. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return The direction override object. - */ - DirOverride GetDirOverride( bool* isAssigned) const; - /** Retrieves the digit set attribute of this character. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return The digit set object. - */ - DigitSet GetDigitSet( bool* isAssigned) const; - /** Retrieves the diacritics positioning attribute of this - character. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return The diacritics positioning object. - */ - DiacVPos GetDiacVPos( bool* isAssigned) const; - /** Retrieves the diacritics x offset attribute of this - character as a real number. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return diacritics x offset as a real number. - */ - ATETextDOM::Real GetDiacXOffset( bool* isAssigned) const; - /** Retrieves the diacritics y offset attribute of this - character as a real number. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return diacritics y offset as a real number. - */ - ATETextDOM::Real GetDiacYOffset( bool* isAssigned) const; - /** Retrieves the automatic diacritics y distance from baseline attribute of this character. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return True if automatic diacritics y distance from baseline is on, false if it is off. - */ - bool GetAutoMydfb( bool* isAssigned) const; - /** Retrieves the diacritics y distance from baseline attribute - of this character as a real number. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return diacritics y distance from baseline as a real number. - */ - ATETextDOM::Real GetMarkYDistFromBaseline( bool* isAssigned) const; - /** Retrieves the OpenType overlap swash attribute of - this character. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return True if overlap swash is on, false if it is off. - */ - bool GetOverlapSwash( bool* isAssigned) const; - /** Retrieves the justification alternates attribute of - this character. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return True if justification alternates is on, false if it is off. - */ - bool GetJustificationAlternates( bool* isAssigned) const; - /** Retrieves the stretched alternates attribute of this character. - @param isAssigned [out] a buffer in which to return - true if this attribute has a local value. - @return True if stretched alternates is on, false if it is off. - */ - bool GetStretchedAlternates( bool* isAssigned) const; -#endif - - /////////////////////////////////////////////////////////////////// - // SET PROPERTIES - //////////////////////////////////////////////////////////////// - - /** Sets the local font attribute for this character. - @param newVal The new font object. - @return Nothing. - */ - void SetFont( IFont newVal); - /** Sets the local font size attribute for this character. - @param newVal The new value, in the range [0.1..1296]. - @return Nothing. - */ - void SetFontSize( ATETextDOM::Real newVal); - /** Sets the local horizontal scale attribute for this character. - @param newVal The new scaling factor, in the range [0.1..100], where 1 is 100%. - @return Nothing. - */ - void SetHorizontalScale( ATETextDOM::Real newVal); - /** Sets the local vertical scale attribute for this character. - @param newVal The new scaling factor, in the range [0.1..100], where 1 is 100%. - @return Nothing. - */ - void SetVerticalScale( ATETextDOM::Real newVal); - /** Sets the local automatic leading attribute for this character. - @param newVal True to turn automatic leading on, false to turn it off. - @return Nothing. - */ - void SetAutoLeading( bool newVal); - /** Sets the local leading attribute for this character. - @param newVal The new leading value in document points. - @return Nothing. - */ - void SetLeading( ATETextDOM::Real newVal); - /** Sets the local tracking attribute for this character. - @param newVal The new tracking value in document points. - @return Nothing. - */ - void SetTracking( ATETextDOM::Int32 newVal); - /** Sets the local baseline shift attribute for this character. - @param newVal The new baseline shift value in document points. - @return Nothing. - */ - void SetBaselineShift( ATETextDOM::Real newVal); - /** Sets the local character rotation attribute for this character. - @param newVal The new rotation value in degrees. - @return Nothing. - */ - void SetCharacterRotation( ATETextDOM::Real newVal); - /** Sets the local automatic kerning type attribute for this character style. - This is not available for individual characters. - @param newVal The new automatic kerning type constant. - @return Nothing. - */ - void SetAutoKernType( AutoKernType newVal); - /** Sets the local font caps option attribute for this character style. - @param newVal The new font caps option constant. - @return Nothing. - */ - void SetFontCapsOption( FontCapsOption newVal); - /** Sets the local font baseline option attribute for this character style. - @param newVal The new font baseline option constant. - @return Nothing. - */ - void SetFontBaselineOption( FontBaselineOption newVal); - /** Sets the local font OpenType position option attribute for this character style. - @param newVal The new font OpenType position option constant. - @return Nothing. - */ - void SetFontOpenTypePositionOption( FontOpenTypePositionOption newVal); - /** Sets the local strikethrough position attribute for this character style. - @param newVal The new strikethrough position constant. - @return Nothing. - */ - void SetStrikethroughPosition( StrikethroughPosition newVal); - /** Sets the local underline position attribute for this character style. - @param newVal The new underline position constant. - @return Nothing. - */ - void SetUnderlinePosition( UnderlinePosition newVal); - /** Sets the local underline offset attribute for this character style. - @param newVal The new underline offset value, in document points. - @return Nothing. - */ - void SetUnderlineOffset( ATETextDOM::Real newVal); - // ------------------------------------------------------------------ - // OpenType settings - // ------------------------------------------------------------------ - /** Sets the local OpenType ligature attribute for this character style. - @param newVal The new underline offset value, in document points. - @return Nothing. - */ - void SetLigature( bool newVal); - /** Sets the local OpenType discretionary ligatures attribute for this character style. - @param newVal True to turn discretionary ligatures on, false to turn it off. - @return Nothing. - */ - void SetDiscretionaryLigatures( bool newVal); - /** Sets the local OpenType contextual ligatures attribute for this character style. - @param newVal True to turn contextual ligatures on, false to turn it off. - @return Nothing. - */ - void SetContextualLigatures( bool newVal); - /** Sets the local OpenType alternate ligatures attribute for this character style. - @param newVal True to turn alternate ligatures on, false to turn it off. - @return Nothing. - */ - void SetAlternateLigatures( bool newVal); - /** Sets the local OpenType old-style attribute for this character style. - @param newVal True to turn old-style on, false to turn it off. - @return Nothing. - */ - void SetOldStyle( bool newVal); - /** Sets the local OpenType fractions attribute for this character style. - @param newVal True to turn fractions on, false to turn it off. - @return Nothing. - */ - void SetFractions( bool newVal); - /** Sets the local OpenType ordinals attribute for this character style. - @param newVal True to turn ordinals on, false to turn it off. - @return Nothing. - */ - void SetOrdinals( bool newVal); - /** Sets the local OpenType swash attribute for this character style. - @param newVal True to turn swash on, false to turn it off. - @return Nothing. - */ - void SetSwash( bool newVal); - /** Sets the local OpenType titling attribute for this character style. - @param newVal True to turn titling on, false to turn it off. - @return Nothing. - */ - void SetTitling( bool newVal); - /** Sets the local OpenType connection forms attribute for this character style. - @param newVal True to turn connection forms on, false to turn it off. - @return Nothing. - */ - void SetConnectionForms( bool newVal); - /** Sets the local OpenType stylistic alternates attribute for this character style. - @param newVal True to turn stylistic alternates on, false to turn it off. - @return Nothing. - */ - void SetStylisticAlternates( bool newVal); - /** Sets the local OpenType ornaments attribute for this character style. - @param newVal True to turn ornaments on, false to turn it off. - @return Nothing. - */ - void SetOrnaments( bool newVal); - /** Sets the local OpenType figure style attribute for this character style. - @param newVal The new figure style constant. - @return Nothing. - */ - void SetFigureStyle( FigureStyle newVal); - // ------------------------------------------------------------------ - // Japanese OpenType settings - // ------------------------------------------------------------------ - /** Sets the local Japanese OpenType proportional metrics attribute of this character. - @param newVal True to turn proportional metrics on, false to turn it off. - @return Nothing. */ - void SetProportionalMetrics( bool newVal); - /** Sets the local Japanese OpenType Kana attribute of this character. - @param newVal True to turn Kana on, false to turn it off. - @return Nothing. */ - void SetKana( bool newVal); - /** Sets the local Japanese OpenType italics attribute of this character. - @param newVal True to turn italics on, false to turn it off. - @return Nothing. */ - void SetItalics( bool newVal); - /** Sets the local Japanese OpenType Ruby attribute of this character. - @param newVal True to turn Ruby on, false to turn it off. - @return Nothing. */ - void SetRuby( bool newVal); - /** Sets the local Japanese OpenType baseline direction attribute of this character. - @param newVal The new baseline direction constant. - @return Nothing. */ - void SetBaselineDirection( BaselineDirection newVal); - /** Sets the local Japanese OpenType language attribute of this character. - @param newVal The new language constant. - @return Nothing. */ - void SetLanguage( Language newVal); - /** Sets the local Japanese OpenType Japanese alternate feature attribute of this character. - @param newVal The new Japanese alternate feature constant. - @return Nothing. */ - void SetJapaneseAlternateFeature( JapaneseAlternateFeature newVal); - /** Sets the local Japanese OpenType Tsume attribute of this character. - @param newVal The new Tsume value in document points. - @return Nothing. */ - void SetTsume( ATETextDOM::Real newVal); - /** Sets the local Japanese OpenType style run alignment attribute of this character. - @param newVal The new style run alignment constant. - @return Nothing. */ - void SetStyleRunAlignment( StyleRunAlignment newVal); - // ------------------------------------------------------------------ - // WariChu settings - // ------------------------------------------------------------------ - /** Sets the local WariChu enabled attribute of this character. - @param newVal True to turn enabling on, false to turn it off. - @return Nothing. */ - void SetWariChuEnabled( bool newVal); - /** Sets the local WariChu line count attribute of this character. - @param newVal The new line count value. - @return Nothing. */ - void SetWariChuLineCount( ATETextDOM::Int32 newVal); - /** Sets the local WariChu line gap attribute of this character. - @param newVal The new line gap value. - @return Nothing. */ - void SetWariChuLineGap( ATETextDOM::Int32 newVal); - /** Sets the local WariChu scale attribute of this character. - @param newVal The new scaling factor, where 1 is 100%. - @return Nothing. */ - void SetWariChuScale( ATETextDOM::Real newVal); - /** Sets the local WariChu size attribute of this character. - @param newVal The new size value in document points. - @return Nothing. */ - void SetWariChuSize( ATETextDOM::Real newVal); - /** Sets the local WariChu widow amount attribute of this character. - @param newVal The new widow amount value. - @return Nothing. */ - void SetWariChuWidowAmount( ATETextDOM::Int32 newVal); - /** Sets the local WariChu orphan amount attribute of this character. - @param newVal The new orphan amount value. - @return Nothing. */ - void SetWariChuOrphanAmount( ATETextDOM::Int32 newVal); - /** Sets the local WariChu justification attribute of this character. - @param newVal The new justification constant. - @return Nothing. */ - void SetWariChuJustification( WariChuJustification newVal); - /** Sets the local Tate Chu Yoko up-down adjustment attribute of this character. - @param newVal The new adjustment value. - @return Nothing. */ - void SetTCYUpDownAdjustment( ATETextDOM::Int32 newVal); - /** Sets the local Tate Chu Yoko right-left adjustment attribute of this character. - @param newVal The new adjustment value. - @return Nothing. */ - void SetTCYLeftRightAdjustment( ATETextDOM::Int32 newVal); - /** Sets the local left Aki attribute of this character. - @param newVal The new left Aki value. - @return Nothing. */ - void SetLeftAki( ATETextDOM::Real newVal); - /** Sets the local right Aki attribute of this character. - @param newVal The new right Aki value. - @return Nothing. */ - void SetRightAki( ATETextDOM::Real newVal); - //------------------------------------------------ - // General settings - //------------------------------------------------ - /** Sets the local no-break attribute of this character. - @param newVal True to turn no-break on, false to turn it off. - @return Nothing. */ - void SetNoBreak( bool newVal); - /** Sets the local fill color attribute of this character. - @param newVal The paint object containing the new fill color value. - @return Nothing. */ - void SetFillColor( IApplicationPaint newVal); - /** Sets the local stroke color attribute of this character. - @param newVal The paint object containing the new stroke color value. - @return Nothing. */ - void SetStrokeColor( IApplicationPaint newVal); - /** Sets the local fill attribute of this character. - @param newVal True to turn fill on, false to turn it off. - @return Nothing. */ - void SetFill( bool newVal); - /** Sets the local fill visibilty attribute of this character. - @param newVal True to turn fill visibility on, false to turn it off. - @return Nothing. */ - void SetFillVisible( bool newVal); - /** Sets the local stroke attribute of this character. - @param newVal True to turn stroke on, false to turn it off. - @return Nothing. */ - void SetStroke( bool newVal); - /** Sets the local stroke visibility attribute of this character. - @param newVal True to turn stroke visibility on, false to turn it off. - @return Nothing. */ - void SetStrokeVisible( bool newVal); - /** Sets the local fill-first attribute of this character. - @param newVal True to turn fill-first on, false to turn it off. - @return Nothing. */ - void SetFillFirst( bool newVal); - /** Sets the local fill overprint attribute of this character. - @param newVal True to turn fill overprint on, false to turn it off. - @return Nothing. */ - void SetFillOverPrint( bool newVal); - /** Sets the local stroke overprint attribute of this character. - @param newVal True to turn stroke overprint on, false to turn it off. - @return Nothing. */ - void SetStrokeOverPrint( bool newVal); - /** Sets the local fill background color attribute of this character. - @param newVal The paint object containing the new fill color value. - @return Nothing. */ - void SetFillBackgroundColor( IApplicationPaint newVal); - /** Sets the local fill background attribute of this character. - @param newVal True to turn fill on, false to turn it off. - @return Nothing. */ - void SetFillBackground( bool newVal); - /** Sets the local line cap attribute of this character. - @param newVal The new line cap type constant. - @return Nothing. */ - void SetLineCap( LineCapType newVal); - /** Sets the local line join attribute of this character. - @param newVal The new line join type constant. - @return Nothing. */ - void SetLineJoin( LineJoinType newVal); - /** Sets the local line width attribute of this character. - @param newVal The new line width value in document points. - @return Nothing. */ - void SetLineWidth( ATETextDOM::Real newVal); - /** Sets the local miter limit attribute of this character. - @param newVal The new miter limit value in document points. - @return Nothing. */ - void SetMiterLimit( ATETextDOM::Real newVal); - /** Sets the local line dash offset attribute of this character. - @param newVal The new line dash offset value in document points. - @return Nothing. */ - void SetLineDashOffset( ATETextDOM::Real newVal); - /** Sets the local line dash array attribute of this character. - @param newVal The new line dash array object. - @return Nothing. */ - void SetLineDashArray( IArrayReal newVal); - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - // ------------------------------------------------------------------ - // Complex Script Settings - // ------------------------------------------------------------------ - - /** Sets the kashidas attribute of this character. - @param newVal The new kashidas object. - @return Nothing. - */ - void SetKashidas( Kashidas newVal); - /** Sets the direction override attribute of this character. - @param newVal The new direction override object. - @return Nothing. - */ - void SetDirOverride( DirOverride newVal); - /** Sets the digit set attribute of this character. - @param newVal The new digit set object. - @return Nothing. - */ - void SetDigitSet( DigitSet newVal); - /** Sets the diacritics positioning attribute of this character. - @param newVal The diacritics positioning object. - @return Nothing. - */ - void SetDiacVPos( DiacVPos newVal); - /** Sets the diacritics x offset attribute of this character. - @param newVal The new diacritics x offset in document points. - @return Nothing. - */ - void SetDiacXOffset( ATETextDOM::Real newVal); - /** Sets the diacritics y offset attribute of this character. - @param newVal The new diacritics y offset in document points. - @return Nothing. - */ - void SetDiacYOffset( ATETextDOM::Real newVal); - /** Sets the automatic diacritics y distance from baseline attribute of this character. - @param newVal True to turn automatic diacritics y distance from baseline on, false to turn it off. - @return Nothing. - */ - void SetAutoMydfb( bool newVal); - /** Sets the diacritics y distance from baseline attribute of this character. - @param newVal The new diacritics y distance from baseline in document points. - @return Nothing. - */ - void SetMarkYDistFromBaseline( ATETextDOM::Real newVal); - /** Sets the overlap swash attribute of this character. - @param newVal True to turn overlap swash on, false to turn it off. - @return Nothing. - */ - void SetOverlapSwash( bool newVal); - /** Sets the justification alternates attribute of this character. - @param newVal True to turn justification alternates on, false to turn it off. - @return Nothing. - */ - void SetJustificationAlternates( bool newVal); - /** Sets the stretched alternates attribute of this character. - @param newVal Trues to turn stretched alternates on, false to turn it off. - @return Nothing. - */ - void SetStretchedAlternates( bool newVal); -#endif - - // ====================================================================== - // CLEAR PROPERTIES - // ====================================================================== - - /** Removes the local font attribute value of this character. - @return Nothing. */ - void ClearFont( ); - /** Removes the local font size attribute value of this character. - @return Nothing. */ - void ClearFontSize( ); - /** Removes the local horizontal scale attribute value of this character. - @return Nothing. */ - void ClearHorizontalScale( ); - /** Removes the local vertical scale attribute value of this character. - @return Nothing. */ - void ClearVerticalScale( ); - /** Removes the local automatic leading attribute value of this character. - @return Nothing. */ - void ClearAutoLeading( ); - /** Removes the local leading attribute value of this character. - @return Nothing. */ - void ClearLeading( ); - /** Removes the local tracking attribute value of this character. - @return Nothing. */ - void ClearTracking( ); - /** Removes the local baseline shift attribute value of this character. - @return Nothing. */ - void ClearBaselineShift( ); - /** Removes the local character rotation attribute value of this character. - @return Nothing. */ - void ClearCharacterRotation( ); - /** Removes the local automatic kerning attribute value of this character style. - This is not available for individual characters. - @return Nothing. */ - void ClearAutoKernType( ); - /** Removes the local font caps option attribute value of this character. - @return Nothing. */ - void ClearFontCapsOption( ); - /** Removes the local font baseline option attribute value of this character. - @return Nothing. */ - void ClearFontBaselineOption( ); - /** Removes the local font OpenType position option attribute value of this character. - @return Nothing. */ - void ClearFontOpenTypePositionOption( ); - /** Removes the local strikethrough position attribute value of this character. - @return Nothing. */ - void ClearStrikethroughPosition( ); - /** Removes the local underline position attribute value of this character. - @return Nothing. */ - void ClearUnderlinePosition( ); - /** Removes the local underline offset attribute value of this character. - @return Nothing. */ - void ClearUnderlineOffset( ); - // ------------------------------------------------------------------ - // OpenType settings - // ------------------------------------------------------------------ - /** Removes the local OpenType ligature attribute value of this character. - @return Nothing. */ - void ClearLigature( ); - /** Removes the local OpenType discretionary ligature attribute value of this character. - @return Nothing. */ - void ClearDiscretionaryLigatures( ); - /** Removes the local OpenType contextual ligature attribute value of this character. - @return Nothing. */ - void ClearContextualLigatures( ); - /** Removes the local OpenType alternate ligature attribute value of this character. - @return Nothing. */ - void ClearAlternateLigatures( ); - /** Removes the local OpenType old-style attribute value of this character. - @return Nothing. */ - void ClearOldStyle( ); - /** Removes the local OpenType fractions attribute value of this character. - @return Nothing. */ - void ClearFractions( ); - /** Removes the local OpenType ordinals attribute value of this character. - @return Nothing. */ - void ClearOrdinals( ); - /** Removes the local OpenType swash attribute value of this character. - @return Nothing. */ - void ClearSwash( ); - /** Removes the local OpenType titling attribute value of this character. - @return Nothing. */ - void ClearTitling( ); - /** Removes the local OpenType connection forms attribute value of this character. - @return Nothing. */ - void ClearConnectionForms( ); - /** Removes the local OpenType stylistic alternates attribute value of this character. - @return Nothing. */ - void ClearStylisticAlternates( ); - /** Removes the local OpenType ornaments attribute value of this character. - @return Nothing. */ - void ClearOrnaments( ); - /** Removes the local OpenType figure style attribute value of this character. - @return Nothing. */ - void ClearFigureStyle( ); - // ------------------------------------------------------------------ - // Japanese OpenType settings - // ------------------------------------------------------------------ - /** Removes the local Japanese OpenType proportional metrics attribute value of this character. - @return Nothing. */ - void ClearProportionalMetrics( ); - /** Removes the local Japanese OpenType Kana attribute value of this character. - @return Nothing. */ - void ClearKana( ); - /** Removes the local Japanese OpenType italics attribute value of this character. - @return Nothing. */ - void ClearItalics( ); - /** Removes the local Japanese OpenType Ruby attribute value of this character. - @return Nothing. */ - void ClearRuby( ); - /** Removes the local Japanese OpenType baseline direction attribute value of this character. - @return Nothing. */ - void ClearBaselineDirection( ); - /** Removes the local Japanese OpenType language attribute value of this character. - @return Nothing. */ - void ClearLanguage( ); - /** Removes the local Japanese OpenType Japanese alternate feature attribute value of this character. - @return Nothing. */ - void ClearJapaneseAlternateFeature( ); - /** Removes the local Japanese OpenType Tsume attribute value of this character. - @return Nothing. */ - void ClearTsume( ); - /** Removes the local Japanese OpenType style-run alignment attribute value of this character. - @return Nothing. */ - void ClearStyleRunAlignment( ); - // ------------------------------------------------------------------ - // WariChu settings - // ------------------------------------------------------------------ - /** Removes the local WariChu enabled attribute value of this character. - @return Nothing. */ - void ClearWariChuEnabled( ); - /** Removes the local WariChu line count attribute value of this character. - @return Nothing. */ - void ClearWariChuLineCount( ); - /** Removes the local WariChu line gap attribute value of this character. - @return Nothing. */ - void ClearWariChuLineGap( ); - /** Removes the local WariChu sub-line amount attribute value of this character. - @return Nothing. */ - void ClearWariChuSubLineAmount( ); - /** Removes the local WariChu widow amount attribute value of this character. - @return Nothing. */ - void ClearWariChuWidowAmount( ); - /** Removes the local WariChu orphan amount attribute value of this character. - @return Nothing. */ - void ClearWariChuOrphanAmount( ); - /** Removes the local WariChu justification attribute value of this character. - @return Nothing. */ - void ClearWariChuJustification( ); - /** Removes the local Tate Chu Yoko up-down adjustment attribute value of this character. - @return Nothing. */ - void ClearTCYUpDownAdjustment( ); - /** Removes the local Tate Chu Yoko right-left adjustment attribute value of this character. - @return Nothing. */ - void ClearTCYLeftRightAdjustment( ); - /** Removes the local left Aki attribute value of this character. - @return Nothing. */ - void ClearLeftAki( ); - /** Removes the local right Aki attribute value of this character. - @return Nothing. */ - void ClearRightAki( ); - // ------------------------------------------------------------------ - // General settings - // ------------------------------------------------------------------ - /** Removes the local no-break attribute value of this character. - @return Nothing. */ - void ClearNoBreak( ); - /** Removes the local fill color attribute value of this character. - @return Nothing. */ - void ClearFillColor( ); - /** Removes the local stroke color attribute value of this character. - @return Nothing. */ - void ClearStrokeColor( ); - /** Removes the local fill attribute value of this character. - @return Nothing. */ - void ClearFill( ); - /** Removes the local fill visibility attribute value of this character. - @return Nothing. */ - void ClearFillVisible( ); - /** Removes the local stroke attribute value of this character. - @return Nothing. */ - void ClearStroke( ); - /** Removes the local stroke visibility attribute value of this character. - @return Nothing. */ - void ClearStrokeVisible( ); - /** Removes the local fill-first attribute value of this character. - @return Nothing. */ - void ClearFillFirst( ); - /** Removes the local fill overprint attribute value of this character. - @return Nothing. */ - void ClearFillOverPrint( ); - /** Removes the local stroke overprint attribute value of this character. - @return Nothing. */ - void ClearStrokeOverPrint( ); - /** Removes the local fill background color attribute value of this character. - @return Nothing. */ - void ClearFillBackgroundColor( ); - /** Removes the local fill background attribute value of this character. - @return Nothing. */ - void ClearFillBackground( ); - /** Removes the local line cap attribute value of this character. - @return Nothing. */ - void ClearLineCap( ); - /** Removes the local line join attribute value of this character. - @return Nothing. */ - void ClearLineJoin( ); - /** Removes the local line width attribute value of this character. - @return Nothing. */ - void ClearLineWidth( ); - /** Removes the local miter limit attribute value of this character. - @return Nothing. */ - void ClearMiterLimit( ); - /** Removes the local line dash offset attribute value of this character. - @return Nothing. */ - void ClearLineDashOffset( ); - /** Removes the local line dash array attribute value of this character. - @return Nothing. */ - void ClearLineDashArray( ); - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - // ------------------------------------------------------------------ - // Complex Script Settings - // ------------------------------------------------------------------ - - /** Removes the kashidas attribute value of this character. - @return Nothing. - */ - void ClearKashidas( ); - /** Removes the direction override attribute value of this character. - @return Nothing. - */ - void ClearDirOverride( ); - /** Removes the digit set attribute value of this character. - @return Nothing. - */ - void ClearDigitSet( ); - /** Removes the diacritics positioning attribute value of this character. - @return Nothing. - */ - void ClearDiacVPos( ); - /** Removes the diacritics x offset attribute value of this character. - @return Nothing. - */ - void ClearDiacXOffset( ); - /** Removes the diacritics y offset attribute value of this character. - @return Nothing. - */ - void ClearDiacYOffset( ); - /** Removes the automatic diacritics y distance from baseline attribute value of this character. - @return Nothing. - */ - void ClearAutoMydfb( ); - /** Removes the diacritics y distance from baseline attribute value of this character. - @return Nothing. - */ - void ClearMarkYDistFromBaseline( ); - /** Removes the overlap swash attribute value of this character. - @return Nothing. - */ - void ClearOverlapSwash( ); - /** Removes the justification alternates attribute value of this character. - @return Nothing. - */ - void ClearJustificationAlternates( ); - /** Removes the stretched alternates attribute value of this character. - @return Nothing. - */ - void ClearStretchedAlternates( ); -#endif - - //////////////////////////////////////////////////////////////////////////// - // ALGEBRA METHODS - //////////////////////////////////////////////////////////////////////////// - - /** Clears any attributes in this object whose values are - not the same as or are unassigned in the comparison object. - The only values that remain are those that match - the corresponding value in the comparison object. - @param rhs Right-hand side of comparison. - @return True if changes were made. */ - bool IntersectFeatures( ICharFeatures rhs); - /** Sets any attributes in this object whose values are - assigned in the comparison object to those values. - @param rhs Right-hand side of comparison. - @return True if changes were made. */ - bool ReplaceOrAddFeatures( ICharFeatures rhs); - /** Clears any attributes in this object whose values are the - same as in the comparison object. - @param rhs Right-hand side of comparison. - @return True if changes were made. */ - bool UnassignEachIfEqual( ICharFeatures rhs); - - /** Reports whether all attributes of this object are unassigned. - @return True if no attributes have local values. */ - bool IsEachNotAssigned( ) const; - /** Reports whether all attributes of this object are assigned. - @return True if all attributes have local values. */ - bool IsEachAssigned( ) const; - -}; - -////////////////////////////////////////////// -// --ICharInspector-- -////////////////////////////////////////////// - -/** This class allows you to retrieve the - character features that apply to the characters in a text range, - after considering all inherited style values and local overrides. - - Obtain an \c ICharInspector object from a text range or set of text - ranges. See \c ITextRange::GetCharInspector(). - - The methods collect the values of a particular attribute into - an array whose order is the same as the order of characters in the text. - */ -class ICharInspector -{ -private: - CharInspectorRef fCharInspector; -public: - /** Constructor. The object is empty; that is, all - attribute values are unassigned. - @return The new object. */ - ICharInspector(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICharInspector(const ICharInspector& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICharInspector& operator=(const ICharInspector& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICharInspector& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICharInspector& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param charinspector The C object. - @return The new C++ object. */ - explicit ICharInspector(CharInspectorRef charinspector); - /** Destructor */ - virtual ~ICharInspector(); - /** Retrieves a reference to this object. - @return The object reference. */ - CharInspectorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - //------------------------------------------------------------ - // Properties - //------------------------------------------------------------ - - /** Retrieves the font values from the character set. - @return The array object containing the values. */ - IArrayFontRef GetFont( ) const; - /** Retrieves the font size values from the character set. - @return The array object containing the values. */ - IArrayReal GetFontSize( ) const; - /** Retrieves the horizontal scale values from the character set. - @return The array object containing the values. */ - IArrayReal GetHorizontalScale( ) const; - /** Retrieves the vertical scale values from the character set. - @return The array object. */ - IArrayReal GetVerticalScale( ) const; - /** Retrieves the synthetic bold values from the character set. - @return The array object containing the values. */ - IArrayBool GetSyntheticBold( ) const; - /** Retrieves the synthetic italic values from the character set. - @return The array object containing the values. */ - IArrayBool GetSyntheticItalic( ) const; - /** Retrieves the automatic leading values from the character set. - @return The array object containing the values. */ - IArrayBool GetAutoLeading( ) const; - /** Retrieves the leading values from the character set. - @return The array object containing the values. */ - IArrayReal GetLeading( ) const; - /** Retrieves the tracking values from the character set. - @return The array object containing the values. */ - IArrayInteger GetTracking( ) const; - /** Retrieves the baseline shift values from the character set. - @return The array object containing the values. */ - IArrayReal GetBaselineShift( ) const; - /** Retrieves the character rotation values from the character set. - @return The array object containing the values. */ - IArrayReal GetCharacterRotation( ) const; - /** Retrieves the font caps option values from the character set. - @return The array object containing the values. */ - IArrayFontCapsOption GetFontCapsOption( ) const; - /** Retrieves the font baseline option values from the character set. - @return The array object containing the values. */ - IArrayFontBaselineOption GetFontBaselineOption( ) const; - /** Retrieves the font OpenType position option values from the character set. - @return The array object containing the values. */ - IArrayFontOpenTypePositionOption GetFontOpenTypePositionOption( ) const; - /** Retrieves the strikethrough position values from the character set. - @return The array object containing the values. */ - IArrayStrikethroughPosition GetStrikethroughPosition( ) const; - /** Retrieves the underline position values from the character set. - @return The array object containing the values. */ - IArrayUnderlinePosition GetUnderlinePosition( ) const; - /** Retrieves the underline offset values from the character set. - @return The array object containing the values. */ - IArrayReal GetUnderlineOffset( ) const; - - // ------------------------------------------------------------------ - // OpenType settings - // ------------------------------------------------------------------ - /** Retrieves the OpenType ligature values from the character set. - @return The array object containing the values. */ - IArrayBool GetLigature( ) const; - /** Retrieves the OpenType discretionary ligature values from the character set. - @return The array object containing the values. */ - IArrayBool GetDiscretionaryLigatures( ) const; - /** Retrieves the OpenType contextual ligature values from the character set. - @return The array object containing the values. */ - IArrayBool GetContextualLigatures( ) const; - /** Retrieves the OpenType alternate ligature values from the character set. - @return The array object containing the values. */ - IArrayBool GetAlternateLigatures( ) const; - /** Retrieves the OpenType old-style values from the character set. - @return The array object containing the values. */ - IArrayBool GetOldStyle( ) const; - /** Retrieves the OpenType fractions values from the character set. - @return The array object containing the values. */ - IArrayBool GetFractions( ) const; - /** Retrieves the OpenType ordinals values from the character set. - @return The array object containing the values. */ - IArrayBool GetOrdinals( ) const; - /** Retrieves the OpenType swash values from the character set. - @return The array object containing the values. */ - IArrayBool GetSwash( ) const; - /** Retrieves the OpenType titling values from the character set. - @return The array object containing the values. */ - IArrayBool GetTitling( ) const; - /** Retrieves the OpenType connection forms values from the character set. - @return The array object containing the values. */ - IArrayBool GetConnectionForms( ) const; - /** Retrieves the OpenType stylistic alternates values from the character set. - @return The array object containing the values. */ - IArrayBool GetStylisticAlternates( ) const; - /** Retrieves the OpenType ornaments values from the character set. - @return The array object containing the values. */ - IArrayBool GetOrnaments( ) const; - /** Retrieves the OpenType figure style values from the character set. - @return The array object containing the values. */ - IArrayFigureStyle GetFigureStyle( ) const; - // ------------------------------------------------------------------ - // Japanese OpenType settings - // ------------------------------------------------------------------ - /** Retrieves the Japanese OpenType proportional metrics values from the character set. - @return The array object containing the values. */ - IArrayBool GetProportionalMetrics( ) const; - /** Retrieves the Japanese OpenType Kana values from the character set. - @return The array object containing the values. */ - IArrayBool GetKana( ) const; - /** Retrieves the Japanese OpenType italics values from the character set. - @return The array object containing the values. */ - IArrayBool GetItalics( ) const; - /** Retrieves the Japanese OpenType Ruby values from the character set. - @return The array object containing the values. */ - IArrayBool GetRuby( ) const; - /** Retrieves the Japanese OpenType baseline direction values from the character set. - @return The array object containing the values. */ - IArrayBaselineDirection GetBaselineDirection( ) const; - /** Retrieves the Japanese OpenType language values from the character set. - @return The array object containing the values. */ - IArrayLanguage GetLanguage( ) const; - /** Retrieves the Japanese OpenType Tsume values from the character set. - @return The array object containing the values. */ - IArrayReal GetTsume( ) const; - /** Retrieves the Japanese OpenType style-run alignment values from the character set. - @return The array object containing the values. */ - IArrayStyleRunAlignment GetStyleRunAlignment( ) const; - // ------------------------------------------------------------------ - // WariChu settings - // ------------------------------------------------------------------ - /** Retrieves the WariChu line count values from the character set. - @return The array object containing the values. */ - IArrayInteger GetWariChuLineCount( ) const; - /** Retrieves the WariChu line gap values from the character set. - @return The array object containing the values. */ - IArrayInteger GetWariChuLineGap( ) const; - /** Retrieves the WariChu scale values from the character set. - @return The array object containing the values. */ - IArrayReal GetWariChuScale( ) const; - /** Retrieves the WariChu size values from the character set. - @return The array object containing the values. */ - IArrayReal GetWariChuSize( ) const; - /** Retrieves the WariChu widow amount values from the character set. - @return The array object containing the values. */ - IArrayInteger GetWariChuWidowAmount( ) const; - /** Retrieves the WariChu orphan amount values from the character set. - @return The array object containing the values. */ - IArrayInteger GetWariChuOrphanAmount( ) const; - /** Retrieves the WariChu justification values from the character set. - @return The array object containing the values. */ - IArrayWariChuJustification GetWariChuJustification( ) const; - /** Retrieves the WariChu enabled values from the character set. - @return The array object containing the values. */ - IArrayBool GetWariChuEnabled( ) const; - /** Retrieves the Tate Chu Yoko up-down adjustment values from the character set. - @return The array object containing the values. */ - IArrayInteger GetTCYUpDownAdjustment( ) const; - /** Retrieves the Tate Chu Yoko right-left adjustment values from the character set. - @return The array object containing the values. */ - IArrayInteger GetTCYLeftRightAdjustment( ) const; - /** Retrieves the left Aki values from the character set. - @return The array object containing the values. */ - IArrayReal GetLeftAki( ) const; - /** Retrieves the right Aki values from the character set. - @return The array object containing the values. */ - IArrayReal GetRightAki( ) const; - - // ------------------------------------------------------------------ - // General settings - // ------------------------------------------------------------------ - - /** Retrieves the no-break values from the character set. - @return The array object containing the values. */ - IArrayBool GetNoBreak( ) const; - /** Retrieves the fill color values from the character set. - @return The array object containing the values. */ - IArrayApplicationPaintRef GetFillColor( ) const; - /** Retrieves the stroke color values from the character set. - @return The array object containing the values. */ - IArrayApplicationPaintRef GetStrokeColor( ) const; - /** Retrieves the fill values from the character set. - @return The array object containing the values. */ - IArrayBool GetFill( ) const; - /** Retrieves the fill visibility values from the character set. - @return The array object containing the values. */ - IArrayBool GetFillVisible( ) const; - /** Retrieves the stroke values from the character set. - @return The array object containing the values. */ - IArrayBool GetStroke( ) const; - /** Retrieves the stroke visibility values from the character set. - @return The array object containing the values. */ - IArrayBool GetStrokeVisible( ) const; - /** Retrieves the fill-first values from the character set. - @return The array object containing the values. */ - IArrayBool GetFillFirst( ) const; - /** Retrieves the fill overprint values from the character set. - @return The array object containing the values. */ - IArrayBool GetFillOverPrint( ) const; - /** Retrieves the stroke overprint values from the character set. - @return The array object containing the values. */ - IArrayBool GetStrokeOverPrint( ) const; - /** Retrieves the fill background color values from the character set. - @return The array object containing the values. */ - IArrayApplicationPaintRef GetFillBackgroundColor( ) const; - /** Retrieves the fill background values from the character set. - @return The array object containing the values. */ - IArrayBool GetFillBackground( ) const; - /** Retrieves the line cap values from the character set. - @return The array object containing the values. */ - IArrayLineCapType GetLineCap( ) const; - /** Retrieves the line join values from the character set. - @return The array object containing the values. */ - IArrayLineJoinType GetLineJoin( ) const; - /** Retrieves the line width values from the character set. - @return The array object containing the values. */ - IArrayReal GetLineWidth( ) const; - /** Retrieves the miter limit values from the character set. - @return The array object containing the values. */ - IArrayReal GetMiterLimit( ) const; - /** Retrieves the line dash offset values from the character set. - @return The array object containing the values. */ - IArrayReal GetLineDashOffset( ) const; - /** Retrieves the line dash array values from the character set. - @return The array object containing the values. */ - IArrayArrayReal GetLineDashArray( ) const; - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - // ------------------------------------------------------------------ - // Complex Script Settings - // ------------------------------------------------------------------ - - /** Retrieves the kashidas values from the character set. - @return The array object containing the values. - */ - IArrayKashidas GetKashidas( ) const; - /** Retrieves the direction override values from the character set. - @return The array object containing the values. - */ - IArrayDirOverride GetDirOverride( ) const; - /** Retrieves the digit set values from the character set. - @return The array object containing the values. - */ - IArrayDigitSet GetDigitSet( ) const; - /** Retrieves the diacritics positioning values from the character set. - @return The array object containing the values. - */ - IArrayDiacVPos GetDiacVPos( ) const; - /** Retrieves the diacritics x offset values from the character set. - @return The array object containing the values. - */ - IArrayReal GetDiacXOffset( ) const; - /** Retrieves the diacritics y offset values from the character set. - @return The array object containing the values. - */ - IArrayReal GetDiacYOffset( ) const; - /** Retrieves the automatic diacritics y offset from baseline values from the character set. - @return The array object containing the values. - */ - IArrayBool GetAutoMydfb( ) const; - /** Retrieves the diacritics y offset from baseline values from the character set. - @return The array object containing the values. - */ - IArrayReal GetMarkYDistFromBaseline( ) const; - /** Retrieves the overlap swash values from the character set. - @return The array object containing the values. - */ - IArrayBool GetOverlapSwash( ) const; - /** Retrieves the justification alternate values from the character set. - @return The array object containing the values. - */ - IArrayBool GetJustificationAlternates( ) const; - /** Retrieves the stretched alternates values from the character set. - @return The array object containing the values. - */ - IArrayBool GetStretchedAlternates( ) const; -#endif - -}; - -////////////////////////////////////////////// -// --ICharStyle-- -////////////////////////////////////////////// -/** This class encapsulates a named character style, which can be - applied to a set of characters. It contains an \c ICharFeatures - object, which defines the character attributes for this style. - - Attribute values are inherited from the Normal style, and can be overridden - in a named style associated with a text run or text range, or at the - local character level. - - A style or character can partially define attributes. Only those values - that are assigned override the inherited values. The constructor creates - an empty object, in which all attribute values are unassigned. - Setting a value causes it to be assigned, and clearing it causes - it to be unassigned. When you retrieve an attribute value, a boolean - return value, \c isAssigned, reports whether that attribute has a local - value in the queried object. - */ -class ICharStyle -{ -private: - CharStyleRef fCharStyle; -public: - /** Constructor. The object is empty; that is, all - attribute values are unassigned. - @return The new object. */ - ICharStyle(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICharStyle(const ICharStyle& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICharStyle& operator=(const ICharStyle& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICharStyle& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICharStyle& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param charstyle The C object. - @return The new C++ object. */ - explicit ICharStyle(CharStyleRef charstyle); - /** Destructor */ - virtual ~ICharStyle(); - /** Retrieves a reference to this object. - @return The object reference. */ - CharStyleRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - //------------------------------------------------- - // Properties - //------------------------------------------------- - - /** Retrieves the name of this style. - @param pName [out] A buffer in which to return the name string. - @param maxLength [in, out] The number of characters in the buffer. - @return The length of the returned string, or 0 if an error occurred. - */ - ATETextDOM::Int32 GetName( ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength) const; - /** Sets the name of this style. - @param pName The new, \c NULL terminated name string. - @return True if the name was set successfully, false if a style - already has the specified name or if the name string is empty. - */ - bool SetName( const ATETextDOM::Unicode* pName); - /** Retrieves the parent style of this style. - @return The style object, or a \c NULL object for the Normal (root) style. - */ - ICharStyle GetParent( ) const; - /** Sets the parent style of this style. - @param pStyle The new parent style object, - @return True if the parent was set successfully, false if - this is the Normal (root) style. - */ - bool SetParent( const ICharStyle pStyle); - /** Reports whether this style has a parent. - @return True if this style has a parent, false if this is the Normal (root) style. - */ - bool HasParent( ) const; - /** Retrieves the features defined for this style. - @return The character features object. - */ - ICharFeatures GetFeatures( ) const; - /** Sets the features defined for this style. For the Normal (root) style, - this is the same as \c #ReplaceOrAddFeatures(). For all other - styles, the new feature set completely replaces the old feature set. - @param pFeatures The new character features object. - @return Nothing. - */ - void SetFeatures( ICharFeatures pFeatures); - /** Sets attribute values of this style's feature set to those values that - are specifically assigned in the replacement feature set. Those values - that are unassigned in the replacement set remain unchanged in this - style. - @param pFeatures The replacement character features object. - @return Nothing. - */ - void ReplaceOrAddFeatures( ICharFeatures pFeatures); - -}; - -////////////////////////////////////////////// -// --ICharStyles-- -////////////////////////////////////////////// -/** Encapsulates a set of character styles as a text resource. - A style set contains a collection of \c ICharStyle objects. - Use an \c ICharStylesIterator object to iterate through the set. - */ -class ICharStyles -{ -private: - CharStylesRef fCharStyles; -public: - /** Constructor. - @return The new object. */ - ICharStyles(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICharStyles(const ICharStyles& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICharStyles& operator=(const ICharStyles& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICharStyles& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICharStyles& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param charstyles The C object. - @return The new C++ object. */ - explicit ICharStyles(CharStylesRef charstyles); - /** Destructor */ - virtual ~ICharStyles(); - /** Retrieves a reference to this object. - @return The object reference. */ - CharStylesRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - //----------------------------------------------------------- - // METHODS - //----------------------------------------------------------- - - /** Reports whether this is set is empty. - @return True if this set contains no style objects. */ - bool IsEmpty( ) const; - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - - /** Shows all styles. - @return Nothing. - @see \c #ShowOnlyUnreferencedStyles(), \c #ShowOnlyStylesReferencedIn() - */ - void ShowAllStyles( ) const; - /** Shows only styles to which there are not references in text. - @return Nothing. - @see \c #ShowAllStyles(), \c #ShowOnlyStylesReferencedIn() - */ - void ShowOnlyUnreferencedStyles( ) const; - /** Shows only styles that are used in a text range. - @param pRange The text range object. - @return Nothing. - @see \c #ShowAllStyles(), \c #ShowOnlyUnreferencedStyles() - */ - void ShowOnlyStylesReferencedIn( ITextRange pRange) const; - /** Reorders styles in this set by moving a style to a given position. - @param pStyle The style object. - @param position The new 0-based position index. - @return Nothing. - */ - void MoveStyleTo( ICharStyle pStyle, ATETextDOM::Int32 position); - -}; - -////////////////////////////////////////////// -// --ICharStylesIterator-- -////////////////////////////////////////////// -/** This class enables you to iterate through a set of - character styles. - @see \c ICharStyles */ -class ICharStylesIterator -{ -private: - CharStylesIteratorRef fCharStylesIterator; -public: - /** Constructor. - @return The new object. */ - ICharStylesIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ICharStylesIterator(const ICharStylesIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ICharStylesIterator& operator=(const ICharStylesIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ICharStylesIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ICharStylesIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param charstylesiterator The C object. - @return The new C++ object. */ - explicit ICharStylesIterator(CharStylesIteratorRef charstylesiterator); - /** Destructor */ - virtual ~ICharStylesIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - CharStylesIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates an iterator for a specific style set - that is ordered first-to-last or last-to-first. - @param pStyles The style set object. - @param direction Optional. The order of iteration. Default is first to last. - @return The new iterator object. - */ - ICharStylesIterator( ICharStyles pStyles, Direction direction = kForward); - - //------------------------------------------------------ - // Methods - //------------------------------------------------------ - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Sets the current position to the first member in the set. - @return Nothing. */ - void MoveToFirst( ); - /** Sets the current position to the last member in the set. - @return Nothing. */ - void MoveToLast( ); - /** Increments the current position in the set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Decrements the current position in the set. - @return Nothing. */ - void Previous( ); - /** Retrieves the current character style. - @return The character style object. */ - ICharStyle Item( ) const; - -}; - -////////////////////////////////////////////// -// --IFind-- -////////////////////////////////////////////// -/** This class encapsulates a search through text. The - methods allow you to find and replace text in a document - using various kinds of character matching. - - To find or replace all matches in the search scope, do the following: - \li Save the text object you are currently working with. - \li Retrieve the current search position markers with \c #GetPreReplaceAllSettings() - and save them. - \li Implement a loop through all text objects, using - \c #FindMatch(), \c #FindNextMatch(), and \c #ReplaceMatch() - to find or replace all occurances of your match string. -
Keep track of how many matches or replacements were found, - to report back to the user. - \li Restore the previous search position markers with \c #RestorePreReplaceAllSettings() - \li Restore the working text object with \c #SetSearchRange(). - - */ -class IFind -{ -private: - FindRef fFind; -public: - /** Constructor. - @return The new object. */ - IFind(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IFind(const IFind& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IFind& operator=(const IFind& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IFind& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IFind& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param find The C object. - @return The new C++ object. */ - explicit IFind(FindRef find); - /** Destructor */ - virtual ~IFind(); - /** Retrieves a reference to this object. - @return The object reference. */ - FindRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - //------------------------------------------------------ - // Options - //------------------------------------------------------ - /** Retrieves the direction of search, front-to-back or - back-to-front. - @return The direction constant. - */ - Direction GetSearchDirection( ) const; - /** Reports whether searching is case-sensitive. - @return True if the search is set to ignore case, false if - it is case-sensitive. - */ - bool GetIgnoreCase( ) const; - /** Reports whether searching matches whole words. - @return True if the search is set to match whole words. - */ - bool GetWholeWord( ) const; - /** Reports whether searching wraps. - @return True if the search is set to wrap. - */ - bool GetWrap( ) const; - /** Reports whether searching should continue beyond selected text. - @return True if the search is set to go out-of-bounds. - */ - bool GetFindWordsOutOfBounds( ) const; - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - /** Reports whether accents are to be ignored during the find. - @return True if accents are to be ignored, false if they are not. - */ - bool GetIgnoreAccents( ) const; - /** Reports whether kashidas are to be ignored during the find. - @return True if kashidas are to be ignored, false if they are not. - */ - bool GetIgnoreKashidas( ) const; -#endif - - /** Sets the direction of search, front-to-back or back-to-front. - @param newValue The direction constant. - @return Nothing. - */ - void SetSearchDirection( Direction newValue); - /** Sets whether searching is case-sensitive. - @param newValue True to set the search to ignore case, - false to make it case-sensitive. - @return Nothing. - */ - void SetIgnoreCase( bool newValue); - /** Sets whether searching matches whole words. - @param newValue True to turn whole-word matching on, - false to turn it off. - @return Nothing. - */ - void SetWholeWord( bool newValue); - /** Sets whether searching wraps, ignoring line breaks. - @param newValue True to turn wrapping on, - false to turn it off. - @return Nothing. - */ - void SetWrap( bool newValue); - /** Sets whether searching matches words that are out-of-bounds. - @param newValue True to turn out-of-bounds matching on, - false to turn it off. - @return Nothing. - */ - void SetFindWordsOutOfBounds( bool newValue); - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - /** Sets whether accents should be ignored during the find. - @param newValue True to ignore accents. - @return Nothing. - */ - void SetIgnoreAccents( bool newValue); - /** Sets whether kashidas are to be ignored during the find. - @param newValue True to ignore kashidas. - @return Nothing. - */ - void SetIgnoreKashidas( bool newValue); -#endif - - /** Retrieves the scope of the search, the entire document or the current \c IStory. - The default scope is the entire document. - @return The search-scope constant. - */ - SearchScope GetSearchScope( ) const; - /** Sets the scope of the search to be the entire document or the current \c IStory. - The default scope is the entire document. - @param searchScope The search-scope constant. - @return Nothing. - */ - void SetSearchScope( SearchScope searchScope); - /** Sets the range of this search to a specific text range. Use to restore - the range after a global search or replace operation. - @param pRange The text range object. - @return Nothing. - @see Class description of \c IFind. - */ - void SetSearchRange( ITextRange pRange); - /** Sets the character string that this search tries to match - within the range and scope. - @param pSearchChars The search string. - @return Nothing. - */ - void SetSearchChars( ATETextDOM::Unicode* pSearchChars); - /** Retrieves the character string that this search tries to match. - @param pSearchChars [out] A buffer in which to return the search string. - @param length The number of characters in the buffer. Only this much of - the search string is returned. - @return Nothing. - */ - void GetSearchChars( ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length) const; - /** Sets the character string that this search uses to replace - matches found within the range and scope. - @param pSearchChars The replacement string. - @return Nothing. - */ - void SetReplaceChars( ATETextDOM::Unicode* pSearchChars); - /** Retrieves the character string that this search uses to replace - matches found within the range and scope. - @param pSearchChars [out] A buffer in which to return the replacement string. - @param length The number of characters in the buffer. Only this much of - the replacement string is returned. - @return Nothing. - */ - void GetReplaceChars( ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length) const; - // Temporary way to reset the engine for modeless operation - void Reset( ); - //------------------------------------------------------ - // Methods - //------------------------------------------------------ - // Searches current user selection. - /** Searches for the match string in the specified text range. - @param pTextRange The text range within which to search. - @return True if a match is found, false otherwise. - @see SetSearchChars() - */ - bool FindMatch( ITextRange pTextRange); - // Skips the current user selection. - /** Searches for the match string starting at the end of the current selection in the - specified text range. - @param pTextRange The text range object. - @return True if a match is found, false otherwise. - @see \c #SetSearchChars() - */ - bool FindNextMatch( ITextRange pTextRange); - - /** Searches for the match string in specified text range and replaces it, if found, - with the replacement string. - @param pTextRange The text range object. - @param findNext When true, searches in the current selection. When - false, begins searching at the end of the current selection. - @return If findNext parameter is true this function will return true if there is - another occurance found after the one just replaced, - and will return false if there is no other occurance found. - If findNext is false this function will always return false. - @see \c #SetSearchChars(), \c #SetReplaceChars() - */ - bool ReplaceMatch( ITextRange pTextRange, bool findNext); - - /** @deprecated Do not use. See class description of \c IFind. */ - bool FindAndReplaceAllMatches( ATETextDOM::Int32* pReplaceCount); - - /** Retrieves the current position markers in this object, so that they - can be saved before a global search or replacement operation. - @param pCurrentPoint A buffer in which to return the - 0-based index to the current position. - @param pStartPoint A buffer in which to return the - 0-based index to the starting position. - @return Nothing. - @see Class description of \c IFind. - - */ - void GetPreReplaceAllSettings( ATETextDOM::Int32* pCurrentPoint, ATETextDOM::Int32* pStartPoint) const; - - /** Restores the current position markers in this object after a global - search or replacement operation. - @param currentPoint The saved 0-based index to the current position. - @param startPoint The saved 0-based index to the starting position. - @return Nothing. - @see Class description of \c IFind. - */ - void RestorePreReplaceAllSettings( const ATETextDOM::Int32 currentPoint, const ATETextDOM::Int32 startPoint); - -}; - -////////////////////////////////////////////// -// --IFont-- -////////////////////////////////////////////// -/** Encapsulates a font as a text resource. The methods allow you to - add, access, and manipulate fonts for use with the - Adobe Text Engine (ATE). */ - -class IFont -{ -private: - FontRef fFont; -public: - /** Constructor. - @return The new object. */ - IFont(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IFont(const IFont& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IFont& operator=(const IFont& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IFont& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IFont& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param font The C object. - @return The new C++ object. */ - explicit IFont(FontRef font); - /** Destructor */ - virtual ~IFont(); - /** Retrieves a reference to this object. - @return The object reference. */ - FontRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - //----------------------------------------------- - // METHODS - //----------------------------------------------- - /** Reports whether this is a CoolType font. - @return True if this is a CoolType font. - */ - bool IsCoolTypeTechnology( ) const; - - /** Reports whether Roman glyphs in this font are sideways by default for a specified character alignment. - @param withItalics True to report the default for italics. - @param characterAlignment The style-run alignment constant for which to get the default. - @return True if the default for Roman glyphs is sideways. - */ - bool IsVerticalRomanGlyphsOnSideByDefault( bool withItalics, StyleRunAlignment characterAlignment) const; - - /** Retrieves a pointer to the CT font dictionary for this font. - @return A pointer to the dictionary. */ - void* GetCTFontDict( ); - -}; - -////////////////////////////////////////////// -// --IGlyph-- -////////////////////////////////////////////// -/** Encapsulates a glyph as a text resource. The methods allow you to - add, access, and manipulate glyphs for use with the - Adobe Text Engine (ATE). */ -class IGlyph -{ -private: - GlyphRef fGlyph; -public: - /** Constructor. - @return The new object. */ - IGlyph(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IGlyph(const IGlyph& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IGlyph& operator=(const IGlyph& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IGlyph& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IGlyph& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param glyph The C object. - @return The new C++ object. */ - explicit IGlyph(GlyphRef glyph); - /** Destructor */ - virtual ~IGlyph(); - /** Retrieves a reference to this object. - @return The object reference. */ - GlyphRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the unique identifier for this glyph. - @return The identifier. */ - ATEGlyphID GetGlyphID( ) const; - /** Retrieves the set of alternates for this glyph. - @return The alternate glyph set. */ - IGlyphs GetAlternateGlyphs( ) const; - /** Retrieves the OpenType feature of this glyph. - @param otFeatures [out] A buffer in which to return the features string. - @param otFeatureCount [out] A buffer in which to return the number of features. - @param otFeatureIndex [out] A buffer in which to return the index into the feature string. - @return Nothing. */ - void GetOTFeatures( char** otFeatures, ATETextDOM::Int32* otFeatureCount, ATETextDOM::Int32** otFeatureIndex); - // RealMatrix GetTransformation(); - -}; - -////////////////////////////////////////////// -// --IGlyphs-- -////////////////////////////////////////////// -/** Encapsulates a set of glyphs as a text resource. - A glyph set contains a collection of \c IGlyph objects. - Use an \c IGlyphsIterator object to iterate through the set. - */ -class IGlyphs -{ -private: - GlyphsRef fGlyphs; -public: - /** Constructor. - @return The new object. */ - IGlyphs(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IGlyphs(const IGlyphs& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IGlyphs& operator=(const IGlyphs& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IGlyphs& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IGlyphs& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param glyphs The C object. - @return The new C++ object. */ - explicit IGlyphs(GlyphsRef glyphs); - /** Destructor */ - virtual ~IGlyphs(); - /** Retrieves a reference to this object. - @return The object reference. */ - GlyphsRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - // ======================================================================== - // PROPERTIES - // ======================================================================== - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ); - /** Retrieves the first member of this set. - @return The member value. */ - IGlyph GetFirst( ); - /** Retrieves the last member of this set. - @return The member value. */ - IGlyph GetLast( ); - // navigation objects. - /** Retrieves the set of text ranges that use this glyph set. - @return The text ranges set objet. */ - ITextRanges GetTextRanges( ) const; - /** Retrieves the set of selected text ranges that use this glyph set. - @return The text ranges set objet. */ - ITextRanges GetTextSelection( ) const; - /** Creates an iterator object for all paragraphs in the current document - that use this glyph set. - @return The iterator object. */ - IParagraphsIterator GetParagraphsIterator( ) const; - /** Creates an iterator object for all text runs in the current document - that use this glyph set. - @return The iterator object. */ - ITextRunsIterator GetTextRunsIterator( ) const; - /** Creates an iterator object for all words in the current document - that use this glyph set. - @return The iterator object. */ - IWordsIterator GetWordsIterator( ) const; - // ======================================================================== - // METHODS - // ======================================================================== - /** Appends a glyph to this set. - @param glyph The glyph object. - @return The 0-based position index of the successfully - added object, or the current index of this object - if it is already in the set, or -1 if the object - was not in the set and could not be appended. - */ - void Add( const IGlyph& glyph); - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param nIndex The 0-based position index. - @return The member object. - */ - IGlyph Item( ATETextDOM::Int32 nIndex) const; - /** Removes all members from the set. - @return Nothing. */ - void RemoveAll( ); - /** Removes a member from the set. - @param nIndex The 0-based position index of the member to remove. - @return Nothing. */ - void Remove( ATETextDOM::Int32 nIndex); - -}; - -////////////////////////////////////////////// -// --IGlyphsIterator-- -////////////////////////////////////////////// -/** This class enables you to iterate through a set of.glyphs - @see \c IGlyphs */ -class IGlyphsIterator -{ -private: - GlyphsIteratorRef fGlyphsIterator; -public: - /** Constructor. - @return The new object. */ - IGlyphsIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IGlyphsIterator(const IGlyphsIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IGlyphsIterator& operator=(const IGlyphsIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IGlyphsIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IGlyphsIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param glyphsiterator The C object. - @return The new C++ object. */ - explicit IGlyphsIterator(GlyphsIteratorRef glyphsiterator); - /** Destructor */ - virtual ~IGlyphsIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - GlyphsIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates an iterator for a specific glyph set - that is ordered first-to-last or last-to-first. - @param glyphs The glyph set object. - @param direction Optional. The order of iteration. Default is first-to-last. - @return The new iterator object. - */ - IGlyphsIterator( IGlyphs glyphs, Direction direction = kForward); - - //------------------------------------------------------ - // Methods - //------------------------------------------------------ - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Retrieves the first member in this set. - @return The glyph object. */ - IGlyph GetFirst( ); - /** Retrieves the last member in this set. - @return The glyph object. */ - IGlyph GetLast( ); - /** Retrieves the next member in this set in the iterator's current direction. - @return The glyph object. */ - IGlyph GetNext( ); - /** Retrieves the current glyph. - @return The glyph object. */ - IGlyph Item( ) const; - /** Increments the current position in this set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Decrements the current position in this set. - @return Nothing. */ - void Previous( ); - -}; - -////////////////////////////////////////////// -// --IKinsoku-- -////////////////////////////////////////////// -/** Encapsulates a Kinsoku as a text resource. The methods allow you to - add, access, and manipulate Kinsoku for use with the - Adobe Text Engine (ATE). The \c IKinsokuSet collects \c IKinsoku objects. - */ -class IKinsoku -{ -private: - KinsokuRef fKinsoku; -public: - /** Constructor. Constructs an empty Kinsoku. - @return The new object. */ - IKinsoku(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IKinsoku(const IKinsoku& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IKinsoku& operator=(const IKinsoku& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IKinsoku& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IKinsoku& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param kinsoku The C object. - @return The new C++ object. */ - explicit IKinsoku(KinsokuRef kinsoku); - /** Destructor */ - virtual ~IKinsoku(); - /** Retrieves a reference to this object. - @return The object reference. */ - KinsokuRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - //======================================================================== - // PROPERTIES - // ======================================================================= - /** Retrieves the name of this Kinsoku. - @param name [out] A buffer in which to return the name string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const; - /** Retrieves the number of characters in the name of this Kinsoku. - @return The number of characters needed in the buffer to get the name. */ - ATETextDOM::Int32 GetNameSize( ) const; - /** Sets the name of this Kinsoku. - @param name The name string. - @return Nothing. */ - void SetName( const ATETextDOM::Unicode* name); - /** Reports whether this object matches a predefined tag. - @param tag The tag object. - @return True if this object matches the tag. - */ - bool MatchesPredefinedResourceTag( ATE::KinsokuPredefinedTag tag) const; - /** Retrieves the characters that cannot be used to start this Kinsoku. - @param noStartCharSet [out] A buffer in which to return the no-start character string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetNoStartCharSet( ATETextDOM::Unicode* noStartCharSet, ATETextDOM::Int32 maxLength) const; - /** Retrieves the number of characters in the no-start character set of this Kinsoku. - @return The number of characters needed in the buffer to get the no-start set. */ - ATETextDOM::Int32 GetNoStartCharSetSize( ) const; - /** Sets the characters that cannot be used to start this Kinsoku. - @param noStartCharSet The string containing the characters. - @return Nothing. */ - void SetNoStartCharSet( const ATETextDOM::Unicode* noStartCharSet); - /** Retrieves the characters that cannot be used to end this Kinsoku. - @param noEndCharSet [out] A buffer in which to return the no-end character string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetNoEndCharSet( ATETextDOM::Unicode* noEndCharSet, ATETextDOM::Int32 maxLength) const; - /** Retrieves the number of characters in the no-end character set of this Kinsoku. - @return The number of characters needed in the buffer to get the no-end set. */ - ATETextDOM::Int32 GetNoEndCharSetSize( ) const; - /** Sets the characters that cannot be used to end this Kinsoku. - @param noEndCharSet The string containing the characters. - @return Nothing. */ - void SetNoEndCharSet( const ATETextDOM::Unicode* noEndCharSet); - /** Retrieves the characters that cannot be used at a break in this Kinsoku. - @param noBreakCharSet [out] A buffer in which to return the no-break character string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetNoBreakCharSet( ATETextDOM::Unicode* noBreakCharSet, ATETextDOM::Int32 maxLength) const; - /** Retrieves the number of characters in the no-break character set of this Kinsoku. - @return The number of characters needed in the buffer to get the no-break set. */ - ATETextDOM::Int32 GetNoBreakCharSetSize( ) const; - /** Sets the characters that cannot be used at a break in this Kinsoku. - @param noBreakCharSet The string containing the characters. - @return Nothing. */ - void SetNoBreakCharSet( const ATETextDOM::Unicode* noBreakCharSet); - /** Retrieves the characters that can be left hanging in this Kinsoku. - @param hangingCharSet [out] A buffer in which to return the hanging character string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetHangingCharSet( ATETextDOM::Unicode* hangingCharSet, ATETextDOM::Int32 maxLength) const; - /** Retrieves the number of characters in the hanging character set of this Kinsoku. - @return The number of characters needed in the buffer to get the hanging set. */ - ATETextDOM::Int32 GetHangingCharSetSize( ) const; - /** Sets the characters that can be left hanging in this Kinsoku. - @param hangingCharSet The string containing the characters. - @return Nothing. */ - void SetHangingCharSet( const ATETextDOM::Unicode* hangingCharSet); - // ======================================================================= - // METHODS - // ======================================================================= - - /** Reports whether a character is in the no-start set of this Kinsoku. - @param character The character. - @return True if this character is in the set. */ - bool IsNoStartChar( ATETextDOM::Unicode character) const; - /** Reports whether a character is in the no-end set of this Kinsoku. - @param character The character. - @return True if this character is in the set. */ - bool IsNoEndChar( ATETextDOM::Unicode character) const; - /** Reports whether a character is in the no-break set of this Kinsoku. - @param character The character. - @return True if this character is in the set. */ - bool IsNoBreakChar( ATETextDOM::Unicode character) const; - /** Reports whether a character is in the hanging set of this Kinsoku. - @param character The character. - @return True if this character is in the set. */ - bool IsHangingChar( ATETextDOM::Unicode character) const; - - /// Does a shallow equivalency test - /// Does a deep equivalency test - /** Reports whether this object represents the same Kinsoku as another Kinsoku object. - @param rhsKinsoku The comparison object. - @return True if the two objects are the same. */ - bool IsEquivalent( IKinsoku rhsKinsoku) const; - /** Reports whether the resource been modified since it became editable. - @return True if the resource has been modified. */ - bool IsModified( ) const; - /** Reports whether this is a predefined Kinsoku. - @return True if the Kinsoku is predefined, false if it is customized. */ - bool IsPredefined( ) const; - /** Creates a new object by duplicating the information in this one. - @return The new object */ - IKinsoku Duplicate( ) const; - -}; - -////////////////////////////////////////////// -// --IKinsokuSet-- -////////////////////////////////////////////// -/** Encapsulates a set of Kinsoku as a text resource. - A Kinsoku set contains a collection of \c IKinsoku objects. */ -class IKinsokuSet -{ -private: - KinsokuSetRef fKinsokuSet; -public: - /** Constructor. - @return The new object. */ - IKinsokuSet(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IKinsokuSet(const IKinsokuSet& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IKinsokuSet& operator=(const IKinsokuSet& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IKinsokuSet& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IKinsokuSet& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param kinsokuset The C object. - @return The new C++ object. */ - explicit IKinsokuSet(KinsokuSetRef kinsokuset); - /** Destructor */ - virtual ~IKinsokuSet(); - /** Retrieves a reference to this object. - @return The object reference. */ - KinsokuSetRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================= - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ); - /** Retrieves the first member of this set. - @return The member object. */ - IKinsoku GetFirst( ); - /** Retrieves the last member of this set. - @return The member object. */ - IKinsoku GetLast( ); - - // ======================================================================= - // METHODS - // ======================================================================= - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param nIndex The 0-based position index. - @return The member object. - */ - IKinsoku Item( ATETextDOM::Int32 nIndex) const; - /** Retrieves a specific Kinsoku object from this set, matching name and data. - @param kinsoku The Kinsoku object. - @return The index position of the object in this set, or -1 - if the object is not in this set. - */ - ATETextDOM::Int32 Find( IKinsoku kinsoku); - /** Retrieves a specific Kinsoku object from this set, matching only the name. - @param name The name string. - @return The index position of the object in this set, or -1 - if the object is not in this set. - */ - ATETextDOM::Int32 Find( const ATETextDOM::Unicode* name); - /** Retrieves a specific Kinsoku object from this set, matching a tag. - @param tag The tag. Use \c #kUserDefinedKinsokuTag to get the first - customized (not predefined) Kinsoku. - @return The index position of the object in this set, or -1 - if the object is not in this set. - */ - ATETextDOM::Int32 Find( KinsokuPredefinedTag tag); - /** Removes a member from the set. - @param nIndex The 0-based position index of the member to remove. - @return True if a member was successfully removed. */ - bool Remove( ATETextDOM::Int32 nIndex); - /** Appends a Kinsoku to this set. - @param kinsoku The Kinsoku object. - @return The 0-based position index of the successfully - added object, or the current index of this object - if it is already in the set, or -1 if the object - was not in the set and could not be appended. - */ - ATETextDOM::Int32 Add( IKinsoku kinsoku); - /** Replaces a Kinsoku in this set. - @param nIndex The 0-based position index of the MojiKumi to replace. - @param kinsoku The replacement Kinsoku object. - @return True if an object was successfully replaced. - */ - bool Replace( ATETextDOM::Int32 nIndex, IKinsoku kinsoku); - -}; - -////////////////////////////////////////////// -// --IParaFeatures-- -////////////////////////////////////////////// -/** This class encapsulates the complete set of paragraph attributes that - can be applied to text. An object of this type is contained in an - \c IParaStyle object, and can be associated with a \c ITextRange. - - Attribute values are inherited from the Normal style, and can be overridden - in a named style associated with the text, or at the local text level. - - A style or text range can partially define attributes. Only those values - that are assigned override the inherited values. The constructor creates - an empty object, in which all attribute values are unassigned. - Setting a value causes it to be assigned, and clearing it causes - it to be unassigned. When you retrieve an attribute value, a boolean - return value, \c isAssigned, reports whether that attribute has a local - value in the queried object. - */ -class IParaFeatures -{ -private: - ParaFeaturesRef fParaFeatures; -public: - /** Constructor. Creates an empty object, in which all attributes - are undefined. - @return The new object. */ - IParaFeatures(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IParaFeatures(const IParaFeatures& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IParaFeatures& operator=(const IParaFeatures& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IParaFeatures& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IParaFeatures& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param parafeatures The C object. - @return The new C++ object. */ - explicit IParaFeatures(ParaFeaturesRef parafeatures); - /** Destructor */ - virtual ~IParaFeatures(); - /** Retrieves a reference to this object. - @return The object reference. */ - ParaFeaturesRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - /** Creates a duplicate of this object. - @return The new object. */ - IParaFeatures Clone( ) const; - - // ------------------------------------------------------------------ - // Justification - // ------------------------------------------------------------------ - /** Retrieves the justification attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The justification constant. */ - ParagraphJustification GetJustification( bool* isAssigned) const; - /** Retrieves the first-line indent attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The first-line indent value in document points. */ - ATETextDOM::Real GetFirstLineIndent( bool* isAssigned) const; - /** Retrieves the paragraph start indent attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The start indent value in document points. */ - ATETextDOM::Real GetStartIndent( bool* isAssigned) const; - /** Retrieves the paragraph end indent attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The end indent value in document points. */ - ATETextDOM::Real GetEndIndent( bool* isAssigned) const; - /** Retrieves the line space before attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The line space before value in document points. */ - ATETextDOM::Real GetSpaceBefore( bool* isAssigned) const; - /** Retrieves the line space after attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The line space after value in document points. */ - ATETextDOM::Real GetSpaceAfter( bool* isAssigned) const; - // ------------------------------------------------------------------ - // Hyphenation - // ------------------------------------------------------------------ - /** Retrieves the automatic hyphenation attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if automatic hyphenation is on, false if it is off. */ - bool GetAutoHyphenate( bool* isAssigned) const; - /** Retrieves the hyphenation word size attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The hyphenation word size value (number of characters). */ - ATETextDOM::Int32 GetHyphenatedWordSize( bool* isAssigned) const; - /** Retrieves the pre-hyphen size attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The pre-hyphen size value (number of characters). */ - ATETextDOM::Int32 GetPreHyphenSize( bool* isAssigned) const; - /** Retrieves the post-hyphen size attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The post-hyphen size value (number of characters). */ - ATETextDOM::Int32 GetPostHyphenSize( bool* isAssigned) const; - /** Retrieves the consecutive hyphen limit attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The consecutive hyphen limit value (number of hyphens). */ - ATETextDOM::Int32 GetConsecutiveHyphenLimit( bool* isAssigned) const; - /** Retrieves the hyphenation zone attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The hyphenation zone value in document points. */ - ATETextDOM::Real GetHyphenationZone( bool* isAssigned) const; - /** Retrieves the hyphenation capitalization attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if hyphenation capitalization is on, false if it is off. */ - bool GetHyphenateCapitalized( bool* isAssigned) const; - /** Retrieves the hyphenation preference attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The hyphenation preference value. */ - ATETextDOM::Real GetHyphenationPreference( bool* isAssigned) const; - // ------------------------------------------------------------------ - // Justification Features - // ------------------------------------------------------------------ - /** Retrieves the desired word spacing attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The desired word spacing value, in document points. */ - ATETextDOM::Real GetDesiredWordSpacing( bool* isAssigned) const; - /** Retrieves the maximum word spacing attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The maximum word spacing value, in document points. */ - ATETextDOM::Real GetMaxWordSpacing( bool* isAssigned) const; - /** Retrieves the minimum word spacing attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The minimum word spacing value, in document points. */ - ATETextDOM::Real GetMinWordSpacing( bool* isAssigned) const; - /** Retrieves the desired letter spacing attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The desired letter spacing value, in document points. */ - ATETextDOM::Real GetDesiredLetterSpacing( bool* isAssigned) const; - /** Retrieves the maximum letter spacing attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The maximum letter spacing value, in document points. */ - ATETextDOM::Real GetMaxLetterSpacing( bool* isAssigned) const; - /** Retrieves the minimum letter spacing attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The minimum letter spacing value, in document points. */ - ATETextDOM::Real GetMinLetterSpacing( bool* isAssigned) const; - /** Retrieves the desired glyph scaling attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The desired glyph scaling value, where 1 is 100%. */ - ATETextDOM::Real GetDesiredGlyphScaling( bool* isAssigned) const; - /** Retrieves the maximum glyph scaling attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The maximum glyph scaling value, where 1 is 100%. */ - ATETextDOM::Real GetMaxGlyphScaling( bool* isAssigned) const; - /** Retrieves the minimum glyph scaling attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The minimum glyph scaling value, where 1 is 100%. */ - ATETextDOM::Real GetMinGlyphScaling( bool* isAssigned) const; - /** Retrieves the single-word justification attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The single-word justification type constant. */ - ParagraphJustification GetSingleWordJustification( bool* isAssigned) const; - /** Retrieves the automatic leading percentage attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return Theautomatic leading percentage value, where 1 is 100%. */ - ATETextDOM::Real GetAutoLeadingPercentage( bool* isAssigned) const; - /** Retrieves the leading type attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The leading type constant. */ - LeadingType GetLeadingType( bool* isAssigned) const; - /** Retrieves the tab stops attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The tab stops object. */ - ITabStops GetTabStops( bool* isAssigned) const; - /** Retrieves the default tab width attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The default tab width value, in document points. */ - ATETextDOM::Real GetDefaultTabWidth( bool* isAssigned) const; - // ------------------------------------------------------------------ - // Japanese Features - // ------------------------------------------------------------------ - /** Retrieves the Japanese hanging Roman attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if hanging Roman is on, false if it is off. */ - bool GetHangingRoman( bool* isAssigned) const; - /** Retrieves the Japanese automatic Tate Chu Yoko attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The automatic Tate Chu Yoko value. */ - ATETextDOM::Int32 GetAutoTCY( bool* isAssigned) const; - /** Retrieves the Japanese Bunri Kinshi attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if Bunri Kinshi is on, false if it is off. */ - bool GetBunriKinshi( bool* isAssigned) const; - /** Retrieves the Japanese Burasagari type attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The Burasagari type constant. */ - BurasagariType GetBurasagariType( bool* isAssigned) const; - /** Retrieves the Japanese preferred Kinsoku order attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The preferred Kinsoku order constant. */ - PreferredKinsokuOrder GetPreferredKinsokuOrder( bool* isAssigned) const; - /** Retrieves the Japanese Kurikaeshi Moji Shori attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if Kurikaeshi Moji Shori is on, false if it is off. */ - bool GetKurikaeshiMojiShori( bool* isAssigned) const; - /** Retrieves the Kinsoku attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The Kinsoku object, or a \c NULL object if Kinsoku is not used. */ - IKinsoku GetKinsoku( bool* isAssigned) const; - /** Retrieves the MojiKumi attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The MojiKumi object, or a \c NULL object if MojiKumi is not used. */ - IMojiKumi GetMojiKumi( bool* isAssigned) const; - // ------------------------------------------------------------------ - // Other Features - // ------------------------------------------------------------------ - /** Retrieves the every-line composer attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return True if every-line composer is on, false if it is off. */ - bool GetEveryLineComposer( bool* isAssigned) const; - /** Retrieves the default character features attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The character features object. */ - ICharFeatures GetDefaultCharFeatures( bool* isAssigned) const; - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - // ------------------------------------------------------------------ - // Complex Script Features - // ------------------------------------------------------------------ - /** Retrieves the main writing direction attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The paragragh direction object. - */ - ATE::ParagraphDirection GetParagraphDirection( bool* isAssigned) const; - /** Retrieves the justification method attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The justification method object. - */ - ATE::JustificationMethod GetJustificationMethod( bool* isAssigned) const; - /** Retrieves the Kashida Width attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The Kashida Width object. - */ - ATE::KashidaWidth GetKashidaWidth( bool* isAssigned) const; -#endif - /** Retrieves the composer engine attribute of this paragraph. - @param isAssigned [out] A buffer in which to return - true if this attribute has a local value. - @return The composer engine object. - */ - ATE::ComposerEngine GetComposerEngine( bool* isAssigned ) const; - - // ====================================================================== - // SET PROPERTIES - // ====================================================================== - // ------------------------------------------------------------------ - // Justification - // ------------------------------------------------------------------ - /** Sets the local justification attribute of this paragraph. - @param newVal The new justification constant. - @return Nothing. */ - void SetJustification( ParagraphJustification newVal); - /** Sets the local first-line indent attribute of this paragraph. - @param newVal The new first-line indent value, in document points. - @return Nothing. */ - void SetFirstLineIndent( ATETextDOM::Real newVal); - /** Sets the local start indent attribute of this paragraph. - @param newVal The new start indent value, in document points. - @return Nothing. */ - void SetStartIndent( ATETextDOM::Real newVal); - /** Sets the local end indent attribute of this paragraph. - @param newVal The new end indent value, in document points. - @return Nothing. */ - void SetEndIndent( ATETextDOM::Real newVal); - /** Sets the local line space before attribute of this paragraph. - @param newVal The new line space before value, in document points. - @return Nothing. */ - void SetSpaceBefore( ATETextDOM::Real newVal); - /** Sets the local line space after attribute of this paragraph. - @param newVal The new line space after value, in document points. - @return Nothing. */ - void SetSpaceAfter( ATETextDOM::Real newVal); - // ------------------------------------------------------------------ - // Hyphenation - // ------------------------------------------------------------------ - /** Sets the local automatic hyphenation attribute of this paragraph. - @param newVal True to turn automatic hyphenation on, false to turn it off. - @return Nothing. */ - void SetAutoHyphenate( bool newVal); - /** Sets the local hyphenated word size attribute of this paragraph. - @param newVal The new hyphenated word size value, in characters. - @return Nothing. */ - void SetHyphenatedWordSize( ATETextDOM::Int32 newVal); - /** Sets the local pre-hyphen size attribute of this paragraph. - @param newVal The new pre-hyphen size value, in characters. - @return Nothing. */ - void SetPreHyphenSize( ATETextDOM::Int32 newVal); - /** Sets the local post-hyphen size attribute of this paragraph. - @param newVal The new post-hyphen size value, in characters. - @return Nothing. */ - void SetPostHyphenSize( ATETextDOM::Int32 newVal); - /** Sets the local consecutive hyphen limit attribute of this paragraph. - @param newVal The new consecutive hyphen limit value, a number of hyphens. - @return Nothing. */ - void SetConsecutiveHyphenLimit( ATETextDOM::Int32 newVal); - /** Sets the local hyphenation zone attribute of this paragraph. - @param newVal The new hyphenation zone value, in document points. - @return Nothing. */ - void SetHyphenationZone( ATETextDOM::Real newVal); - /** Sets the local hyphenation capitalized attribute of this paragraph. - @param newVal True to turn hyphenation capitalized on, false to turn it off. - @return Nothing. */ - void SetHyphenateCapitalized( bool newVal); - /** Sets the local hyphenation preference attribute of this paragraph. - @param newVal The new hyphenation preference value. - @return Nothing. */ - void SetHyphenationPreference( ATETextDOM::Real newVal); - // ------------------------------------------------------------------ - // Justification Features - // ------------------------------------------------------------------ - /** Sets the local desired word spacing attribute of this paragraph. - @param newVal The new desired word spacing value, in document points. - @return Nothing. */ - void SetDesiredWordSpacing( ATETextDOM::Real newVal); - /** Sets the local maximum word spacing attribute of this paragraph. - @param newVal The new maximum word spacing value, in document points. - @return Nothing. */ - void SetMaxWordSpacing( ATETextDOM::Real newVal); - /** Sets the local minimum word spacing attribute of this paragraph. - @param newVal The new minimum word spacing value, in document points. - @return Nothing. */ - void SetMinWordSpacing( ATETextDOM::Real newVal); - /** Sets the local desired letter spacing attribute of this paragraph. - @param newVal The new desired letter spacing value, in document points. - @return Nothing. */ - void SetDesiredLetterSpacing( ATETextDOM::Real newVal); - /** Sets the local maximum letter spacing attribute of this paragraph. - @param newVal The new maximum letter spacing value, in document points. - @return Nothing. */ - void SetMaxLetterSpacing( ATETextDOM::Real newVal); - /** Sets the local minimum letter spacing attribute of this paragraph. - @param newVal The new minimum letter spacing value, in document points. - @return Nothing. */ - void SetMinLetterSpacing( ATETextDOM::Real newVal); - /** Sets the local desired glyph scaling attribute of this paragraph. - @param newVal The new desired glyph scaling value, where 1 is 100%. - @return Nothing. */ - void SetDesiredGlyphScaling( ATETextDOM::Real newVal); - /** Sets the local maximum glyph scaling attribute of this paragraph. - @param newVal The new maximum glyph scaling value, where 1 is 100%. - @return Nothing. */ - void SetMaxGlyphScaling( ATETextDOM::Real newVal); - /** Sets the local minimum glyph scaling attribute of this paragraph. - @param newVal The new minimum glyph scaling value, where 1 is 100%. - @return Nothing. */ - void SetMinGlyphScaling( ATETextDOM::Real newVal); - /** Sets the local single-word justification attribute of this paragraph. - @param newVal The new single-word justification type constant. - @return Nothing. */ - void SetSingleWordJustification( ParagraphJustification newVal); - /** Sets the local automatic leading percentage attribute of this paragraph. - @param newVal The new automatic leading percentage value, where 1 is 100%. - @return Nothing. */ - void SetAutoLeadingPercentage( ATETextDOM::Real newVal); - /** Sets the local leading type attribute of this paragraph. - @param newVal The new leading type constant. - @return Nothing. */ - void SetLeadingType( LeadingType newVal); - /** Sets the local tab stops attribute of this paragraph. - @param newVal The new tab stops object. - @return Nothing. */ - void SetTabStops( ITabStops newVal); - /** Sets the local default tab width attribute of this paragraph. - @param newVal The new default tab width value, in document points. - @return Nothing. */ - void SetDefaultTabWidth( ATETextDOM::Real newVal); - // ------------------------------------------------------------------ - // Japanese Features - // ------------------------------------------------------------------ - /** Sets the local Japanese hanging Roman attribute of this paragraph. - @param newVal True to turn hanging Roman on, false to turn it off. - @return Nothing. */ - void SetHangingRoman( bool newVal); - /** Sets the local automatic Tate Chu Yoko attribute of this paragraph. - @param newVal The new automatic Tate Chu Yoko value. - @return Nothing. */ - void SetAutoTCY( ATETextDOM::Int32 newVal); - /** Sets the local Bunri Kinshi attribute of this paragraph. - @param newVal True to turn Bunri Kinshi on, false to turn it off. - @return Nothing. */ - void SetBunriKinshi( bool newVal); - /** Sets the local Burasagari type attribute of this paragraph. - @param newVal The new Burasagari type constant. - @return Nothing. */ - void SetBurasagariType( BurasagariType newVal); - /** Sets the local preferred Kinsoku order attribute of this paragraph. - @param newVal The new preferred Kinsoku order constant. - @return Nothing. */ - void SetPreferredKinsokuOrder( PreferredKinsokuOrder newVal); - /** Sets the local Kurikaeshi Moji Shori attribute of this paragraph. - @param newVal True to turn Kurikaeshi Moji Shori on, false to turn it off. - @return Nothing. */ - void SetKurikaeshiMojiShori( bool newVal); - /** Sets the local Kinsoku attribute of this paragraph. - @param newVal The new Kinsoku object. - @return Nothing. */ - void SetKinsoku( IKinsoku newVal); - /** Sets the local Moji Kumi attribute of this paragraph. - @param newVal The new Moji Kumi object. - @return Nothing. */ - void SetMojiKumi( IMojiKumi newVal); - // ------------------------------------------------------------------ - // Other Features - // ------------------------------------------------------------------ - /** Sets the local every-line composer attribute of this paragraph. - @param newVal True to turn every-line composer on, false to turn it off. - @return Nothing. */ - void SetEveryLineComposer( bool newVal); - /** Sets the local default character features attribute of this paragraph. - @param newVal The new default character features object. - @return Nothing. */ - void SetDefaultCharFeatures( ICharFeatures newVal); - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - // ------------------------------------------------------------------ - // Complex Script Features - // ------------------------------------------------------------------ - /** Sets the main writing direction attribute of this paragraph. - @param newVal The new paragraph direction object. - @return Nothing. - */ - void SetParagraphDirection( ATE::ParagraphDirection newVal); - /** Sets the justification method attribute of this paragraph. - @param newVal The new justification method object. - @return Nothing. - */ - void SetJustificationMethod( ATE::JustificationMethod newVal); - /** Sets the Kashida Width attribute of this paragraph. - @param newVal The new kashida width object. - @return Nothing. - */ - void SetKashidaWidth( ATE::KashidaWidth newVal); -#endif - /** Sets the composer engine attribute of this paragraph. - @param newVal The new composer engine object. - @return Nothing. - */ - void SetComposerEngine( ATE::ComposerEngine newVal); - - // ====================================================================== - // CLEAR PROPERTIES - // ====================================================================== - // ------------------------------------------------------------------ - // Justification - // ------------------------------------------------------------------ - /** Removes the local justification attribute value of this paragraph. - @return Nothing. */ - void ClearJustification( ); - /** Removes the local first-line indent attribute value of this paragraph. - @return Nothing. */ - void ClearFirstLineIndent( ); - /** Removes the local start indent attribute value of this paragraph. - @return Nothing. */ - void ClearStartIndent( ); - /** Removes the local end indent attribute value of this paragraph. - @return Nothing. */ - void ClearEndIndent( ); - /** Removes the local line space before attribute value of this paragraph. - @return Nothing. */ - void ClearSpaceBefore( ); - /** Removes the local line space after attribute value of this paragraph. - @return Nothing. */ - void ClearSpaceAfter( ); - // ------------------------------------------------------------------ - // Hyphenation - // ------------------------------------------------------------------ - /** Removes the local automatic hyphenation attribute value of this paragraph. - @return Nothing. */ - void ClearAutoHyphenate( ); - /** Removes the local hyphenation word size attribute value of this paragraph. - @return Nothing. */ - void ClearHyphenatedWordSize( ); - /** Removes the local pre-hyphen size attribute value of this paragraph. - @return Nothing. */ - void ClearPreHyphenSize( ); - /** Removes the local post-hyphen size attribute value of this paragraph. - @return Nothing. */ - void ClearPostHyphenSize( ); - /** Removes the local consecutive hyphen limit attribute value of this paragraph. - @return Nothing. */ - void ClearConsecutiveHyphenLimit( ); - /** Removes the local hyphenation zone attribute value of this paragraph. - @return Nothing. */ - void ClearHyphenationZone( ); - /** Removes the local hyphenate capitalized attribute value of this paragraph. - @return Nothing. */ - void ClearHyphenateCapitalized( ); - /** Removes the local hyphenation preference attribute value of this paragraph. - @return Nothing. */ - void ClearHyphenationPreference( ); - // ------------------------------------------------------------------ - // Justification Features - // ------------------------------------------------------------------ - /** Removes all of the local word spacing attribute values of this paragraph. - @return Nothing. */ - void ClearWordSpacing( ); - /** Removes all of the local letter spacing attribute values of this paragraph. - @return Nothing. */ - void ClearLetterSpacing( ); - /** Removes all of the local glyph scaling attribute values of this paragraph. - @return Nothing. */ - void ClearGlyphScaling( ); - /** Removes the local single-word justification attribute value of this paragraph. - @return Nothing. */ - void ClearSingleWordJustification( ); - /** Removes the local automatic leading percentage attribute value of this paragraph. - @return Nothing. */ - void ClearAutoLeadingPercentage( ); - /** Removes the local leading type attribute value of this paragraph. - @return Nothing. */ - void ClearLeadingType( ); - /** Removes the local tab stops attribute value of this paragraph. - @return Nothing. */ - void ClearTabStops( ); - // ------------------------------------------------------------------ - // Japanese Features - // ------------------------------------------------------------------ - /** Removes the local Japanese hanging Roman attribute value of this paragraph. - @return Nothing. */ - void ClearHangingRoman( ); - /** Removes the local automatic Tate Chu Yoko attribute value of this paragraph. - @return Nothing. */ - void ClearAutoTCY( ); - /** Removes the local Bunri Kinshi attribute value of this paragraph. - @return Nothing. */ - void ClearBunriKinshi( ); - /** Removes the local Burasagari type attribute value of this paragraph. - @return Nothing. */ - void ClearBurasagariType( ); - /** Removes the local preferred Kinsoku order attribute value of this paragraph. - @return Nothing. */ - void ClearPreferredKinsokuOrder( ); - /** Removes the local Kurikaeshi Moji Shori attribute value of this paragraph. - @return Nothing. */ - void ClearKurikaeshiMojiShori( ); - /** Removes the local Kinsoku attribute value of this paragraph. - @return Nothing. */ - void ClearKinsoku( ); - /** Removes the local Moji Kumi attribute value of this paragraph. - @return Nothing. */ - void ClearMojiKumi( ); - // ------------------------------------------------------------------ - // Other Features - // ------------------------------------------------------------------ - /** Removes the local every-line composer attribute value of this paragraph. - @return Nothing. */ - void ClearEveryLineComposer( ); - /** Removes the local default character features attribute value of this paragraph. - @return Nothing. */ - void ClearDefaultCharFeatures( ); - -#if SLO_COMPLEXSCRIPT // Available for use in Middle Eastern versions of the product only. - // ------------------------------------------------------------------ - // Complex Script Features - // ------------------------------------------------------------------ - /** Removes the main writing direction attribute value of this paragraph. - @return Nothing. - */ - void ClearParagraphDirection( ); - /** Removes the justification method attribute value of this paragraph. - @return Nothing. - */ - void ClearJustificationMethod( ); - /** Removes the kashida width attribute value of this paragraph. - @return Nothing. - */ - void ClearKashidaWidth( ); -#endif - /** Removes the composer engine attribute value of this paragraph. - @return Nothing. - */ - void ClearComposerEngine( ); - - //////////////////////////////////////////////////////////////////////////// - // ALGEBRA METHODS - //////////////////////////////////////////////////////////////////////////// - - /** Clears any attributes in this object whose values are - not the same as or are unassigned in the comparison object. - The only values that remain are those that match - the corresponding value in the comparison object. - @param rhs Right-hand side of comparison. - @return True if changes were made. */ - bool IntersectFeatures( IParaFeatures rhs); - /** Sets any attributes in this object whose values are - assigned in the comparison object to those values. - @param rhs Right-hand side of comparison. - @return True if changes were made. */ - bool ReplaceOrAddFeatures( IParaFeatures rhs); - /** Clears any attributes in this object whose values are the - same as in the comparison object. - @param rhs Right-hand side of comparison. - @return True if changes were made. */ - bool UnassignEachIfEqual( const IParaFeatures rhs); - - /** Reports whether all attributes of this object are unassigned. - @return True if no attributes have local values. */ - bool IsEachNotAssigned( ) const; - /** Reports whether all attributes of this object are assigned. - @return True if all attributes have local values. */ - bool IsEachAssigned( ) const; - -}; - -////////////////////////////////////////////// -// --IParagraph-- -////////////////////////////////////////////// -/** This class encapsulates a paragraph of text, to which a - paragraph style (\c IParaStyle) can be applied. - Paragraphs are contained in stories. - Use an \c IParagraphsIterator object to iterate through - paragraphs in a set of stories. - - Use an \c IParaInspector object to retrieve the - paragraph features that apply to a specific paragraph, - after considering all inherited style values and local overrides. - */ -class IParagraph -{ -private: - ParagraphRef fParagraph; -public: - /** Constructor. - @return The new object. */ - IParagraph(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IParagraph(const IParagraph& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IParagraph& operator=(const IParagraph& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IParagraph& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IParagraph& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param paragraph The C object. - @return The new C++ object. */ - explicit IParagraph(ParagraphRef paragraph); - /** Destructor */ - virtual ~IParagraph(); - /** Retrieves a reference to this object. - @return The object reference. */ - ParagraphRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - /** Retrieves the length of this paragraph. - @return The number of characters in this paragraph. */ - ATETextDOM::Int32 GetLength( ); - // navigation objects. - /** Retrieves the story that contains this paragraph - @return The story object. */ - IStory GetStory( ); - /** Retrieves the text range corresponding to this paragraph - @return The text range object. */ - ITextRange GetTextRange( ); - /** Retrieves the set of text ranges corresponding to this paragraph - @return The text ranges object. */ - ITextRanges GetTextRanges( ); - /** Retrieves the text selection in this paragraph. - @return The text range set object. */ - ITextRanges GetTextSelection( ); - /** Creates an iteration object with which to access the words in this paragraph. - @return The word iterator object. */ - IWordsIterator GetWordsIterator( ); - // ======================================================================== - // METHODS - // ======================================================================== - /** Retrieves the paragraph after this one in the containing story. - @return The paragraph object. */ - IParagraph GetNext( ); - /** Retrieves the paragraph before this one in the containing story. - @return The paragraph object. */ - IParagraph GetPrev( ); - /** Retrieves the text contents of this paragraph as a Unicode string. - @param text [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - */ - ATETextDOM::ATETextDomErr GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength); - /** Retrieves the text contents of this paragraph as a C string. - @param text [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - */ - ATETextDOM::ATETextDomErr GetContents( char* text, ATETextDOM::Int32 maxLength); - -}; - -////////////////////////////////////////////// -// --IParagraphsIterator-- -////////////////////////////////////////////// -/** This class allows you to iterate through a set of paragraphs contained in - a set of story objects or text ranges. Retrieve the iteration object - with \c IStories::GetParagraphsIterator(), or create one - from a set of text ranges (\c ITextRanges). Use it to access - the \c IParagraph objects in the document's text. -*/ -class IParagraphsIterator -{ -private: - ParagraphsIteratorRef fParagraphsIterator; -public: - /** Constructor. - @return The new object. */ - IParagraphsIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IParagraphsIterator(const IParagraphsIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IParagraphsIterator& operator=(const IParagraphsIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IParagraphsIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IParagraphsIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param paragraphsiterator The C object. - @return The new C++ object. */ - explicit IParagraphsIterator(ParagraphsIteratorRef paragraphsiterator); - /** Destructor */ - virtual ~IParagraphsIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - ParagraphsIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates a paragraph iterator for a specific text-range set - that is ordered first-to-last or last-to-first. - @param ranges The text-range set object. - @param direction Optional. The order of iteration. Default is first-to-last. - @return The new iterator object. - */ - IParagraphsIterator( ITextRanges ranges, Direction direction = kForward); - //------------------------------------------------------ - // Methods - //------------------------------------------------------ - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Sets the current position to the first member of this set. - @return Nothing. */ - void MoveToFirst( ); - /** Sets the current position to the last member of this set. - @return Nothing. */ - void MoveToLast( ); - /** Increments the current position in this set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Retrieves the current paragraph. - @return The paragraph object. */ - IParagraph Item( ); - -}; - -////////////////////////////////////////////// -// --IParaInspector-- -////////////////////////////////////////////// -/** This class allows you to retrieve the - paragraph features that apply to a specific paragraph, - after considering all inherited style values and local overrides. - - Obtain an \c IParaInspector object from a text range or set of text - ranges. See \c ITextRange::GetParaInspector(). - - The methods collect the values of a particular attribute into - an array whose order is the same as the order of paragraphs in the text. -*/ -class IParaInspector -{ -private: - ParaInspectorRef fParaInspector; -public: - /** Constructor. - @return The new object. */ - IParaInspector(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IParaInspector(const IParaInspector& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IParaInspector& operator=(const IParaInspector& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IParaInspector& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IParaInspector& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param parainspector The C object. - @return The new C++ object. */ - explicit IParaInspector(ParaInspectorRef parainspector); - /** Destructor */ - virtual ~IParaInspector(); - /** Retrieves a reference to this object. - @return The object reference. */ - ParaInspectorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ------------------------------------------------------------------ - // Justification - // ------------------------------------------------------------------ - /** Retrieves the justification values from the paragraph set. - @return The array object containing the values. */ - IArrayParagraphJustification GetJustification( ) const; - /** Retrieves the first-line indent values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetFirstLineIndent( ) const; - /** Retrieves the start indent values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetStartIndent( ) const; - /** Retrieves the end indent values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetEndIndent( ) const; - /** Retrieves the line space before values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetSpaceBefore( ) const; - /** Retrieves the line space after values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetSpaceAfter( ) const; - // ------------------------------------------------------------------ - // Hyphenation - // ------------------------------------------------------------------ - /** Retrieves the automatic hyphenation values from the paragraph set. - @return The array object containing the values. */ - IArrayBool GetAutoHyphenate( ) const; - /** Retrieves the hyphenated word size values from the paragraph set. - @return The array object containing the values. */ - IArrayInteger GetHyphenatedWordSize( ) const; - /** Retrieves the pre-hyphen size values from the paragraph set. - @return The array object containing the values. */ - IArrayInteger GetPreHyphenSize( ) const; - /** Retrieves the post-hyphen size values from the paragraph set. - @return The array object containing the values. */ - IArrayInteger GetPostHyphenSize( ) const; - /** Retrieves the consecutive hyphen limit values from the paragraph set. - @return The array object containing the values. */ - IArrayInteger GetConsecutiveHyphenLimit( ) const; - /** Retrieves the hyphenation zone values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetHyphenationZone( ) const; - /** Retrieves the hyphenate capitalized values from the paragraph set. - @return The array object containing the values. */ - IArrayBool GetHyphenateCapitalized( ) const; - /** Retrieves the hyphenation preference values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetHyphenationPreference( ) const; - // ------------------------------------------------------------------ - // Justification Features - // ------------------------------------------------------------------ - /** Retrieves the desired word spacing values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetDesiredWordSpacing( ) const; - /** Retrieves the maximum word spacing values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetMaxWordSpacing( ) const; - /** Retrieves the minimum word spacing values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetMinWordSpacing( ) const; - /** Retrieves the desired letter spacing values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetDesiredLetterSpacing( ) const; - /** Retrieves the maximum letter spacing values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetMaxLetterSpacing( ) const; - /** Retrieves the minimum letter spacing values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetMinLetterSpacing( ) const; - /** Retrieves the desired glyph scaling values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetDesiredGlyphScaling( ) const; - /** Retrieves the maximum glyph scaling values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetMaxGlyphScaling( ) const; - /** Retrieves the minimum glyph scaling values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetMinGlyphScaling( ) const; - /** Retrieves the single-word justification values from the paragraph set. - @return The array object containing the values. */ - IArrayParagraphJustification GetSingleWordJustification( ) const; - /** Retrieves the automatic leading percentage values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetAutoLeadingPercentage( ) const; - /** Retrieves the leading type values from the paragraph set. - @return The array object containing the values. */ - IArrayLeadingType GetLeadingType( ) const; - /** Retrieves the tab stops values from the paragraph set. - @return The array object containing the values. */ - IArrayTabStopsRef GetTabStops( ) const; - /** Retrieves the tab width values from the paragraph set. - @return The array object containing the values. */ - IArrayReal GetDefaultTabWidth( ) const; - // ------------------------------------------------------------------ - // Japanese Features - // ------------------------------------------------------------------ - /** Retrieves the Japanese hanging Roman values from the paragraph set. - @return The array object containing the values. */ - IArrayBool GetHangingRoman( ) const; - /** Retrieves the automatic Tate Chu Yoko values from the paragraph set. - @return The array object containing the values. */ - IArrayInteger GetAutoTCY( ) const; - /** Retrieves the Bunri Kinshi values from the paragraph set. - @return The array object containing the values. */ - IArrayBool GetBunriKinshi( ) const; - /** Retrieves the Burasagari type values from the paragraph set. - @return The array object containing the values. */ - IArrayBurasagariType GetBurasagariType( ) const; - /** Retrieves the preferred Kinsoku order values from the paragraph set. - @return The array object containing the values. */ - IArrayPreferredKinsokuOrder GetPreferredKinsokuOrder( ) const; - /** Retrieves the Kurikaeshi Moji Shori values from the paragraph set. - @return The array object containing the values. */ - IArrayBool GetKurikaeshiMojiShori( ) const; - /** Retrieves the Kinsoku values from the paragraph set. - @return The array object containing the values. */ - IArrayKinsokuRef GetKinsoku( ) const; - /** Retrieves the Moji Kumi values from the paragraph set. - @return The array object containing the values. */ - IArrayMojiKumiRef GetMojiKumi( ) const; - // ------------------------------------------------------------------ - // Other Features - // ------------------------------------------------------------------ - /** Retrieves the every-line composer values from the paragraph set. - @return The array object containing the values. */ - IArrayBool GetEveryLineComposer( ) const; - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - // ------------------------------------------------------------------ - // Complex Script Features - // ------------------------------------------------------------------ - /** Retrieves the main writing direction values from the paragraph set. - @return The array object containing the values. - */ - IArrayParagraphDirection GetParagraphDirection( ) const; - /** Retrieves the justification method values from the paragraph set. - @return The array object containing the values. - */ - IArrayJustificationMethod GetJustificationMethod( ) const; - /** Retrieves the Kashida Width values from the paragraph set. - @return The array object containing the values. - */ - IArrayKashidaWidth GetKashidaWidth( ) const; -#endif - /** Retrieves the composer engine values from the paragraph set. - @return The array object containing the values. - */ - IArrayComposerEngine GetComposerEngine( ) const; - -}; - -////////////////////////////////////////////// -// --IParaStyle-- -////////////////////////////////////////////// -/** This class encapsulates a named paragraph style, which can be - applied to a paragraph or set of paragraphs. It contains an \c IParaFeatures - object, which defines the paragraph attributes for this style. - - Attribute values are inherited from the Normal style, and can be overridden - in a named style associated with a story or text range, or at the - local paragraph level. - - A style or paragraph can partially define attributes. Only those values - that are assigned override the inherited values. The constructor creates - an empty object, in which all attribute values are unassigned. - Setting a value causes it to be assigned, and clearing it causes - it to be unassigned. When you retrieve an attribute value, a boolean - return value, \c isAssigned, reports whether that attribute has a local - value in the queried object. - */ -class IParaStyle -{ -private: - ParaStyleRef fParaStyle; -public: - /** Constructor. - @return The new object. */ - IParaStyle(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IParaStyle(const IParaStyle& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IParaStyle& operator=(const IParaStyle& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IParaStyle& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IParaStyle& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param parastyle The C object. - @return The new C++ object. */ - explicit IParaStyle(ParaStyleRef parastyle); - /** Destructor */ - virtual ~IParaStyle(); - /** Retrieves a reference to this object. - @return The object reference. */ - ParaStyleRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Retrieves the name of this style. - @param pName [out] A buffer in which to return the name string. - @param maxLength [in, out] The number of characters in the buffer. - @return The length of the returned string, or 0 if an error occurred. - */ - ATETextDOM::Int32 GetName( ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength) const; - /** Sets the name of this style. - @param pName The new, \c NULL terminated name string. - @return True if the name was set successfully, false if a style - already has the specified name or if the name string is empty. - */ - bool SetName( const ATETextDOM::Unicode* pName); - /** Retrieves the parent style of this style. - @return The style object, or a \c NULL object for the Normal (root) style. - */ - IParaStyle GetParent( ) const; - /** Sets the parent style of this style. - @param pStyle The new parent style object, - @return True if the parent was set successfully, false if - this is the Normal (root) style. - */ - bool SetParent( const IParaStyle pStyle); - /** Reports whether this style has a parent. - @return True if this style has a parent, false if this is the Normal (root) style. - */ - bool HasParent( ) const; - /** Retrieves the features defined for this style. - @return The paragraph features object. - */ - IParaFeatures GetFeatures( ) const; - /** Sets the features defined for this style. For the Normal (root) style, - this is the same as \c #ReplaceOrAddFeatures(). For all other - styles, the new feature set completely replaces the old feature set. - @param pFeatures The new paragraph features object. - @return Nothing. - */ - void SetFeatures( IParaFeatures pFeatures); - /** Sets attribute values of this style's feature set to those values that - are specifically assigned in the replacement feature set. Those values - that are unassigned in the replacement set remain unchanged in this - style. - @param pFeatures The replacement paragraph features object. - @return Nothing. - */ - void ReplaceOrAddFeatures( IParaFeatures pFeatures); - -}; - -////////////////////////////////////////////// -// --IParaStyles-- -////////////////////////////////////////////// -/** Encapsulates a set of paragraph styles as a text resource. - A style set contains a collection of \c IParaStyle objects. - Use an \c IParaStylesIterator object to iterate through the set. - */ -class IParaStyles -{ -private: - ParaStylesRef fParaStyles; -public: - /** Constructor. - @return The new object. */ - IParaStyles(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IParaStyles(const IParaStyles& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IParaStyles& operator=(const IParaStyles& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IParaStyles& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IParaStyles& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param parastyles The C object. - @return The new C++ object. */ - explicit IParaStyles(ParaStylesRef parastyles); - /** Destructor */ - virtual ~IParaStyles(); - /** Retrieves a reference to this object. - @return The object reference. */ - ParaStylesRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - //------------------------------------------------------ - // Methods - //------------------------------------------------------ - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Shows all styles. - @return Nothing. - @see \c #ShowOnlyUnreferencedStyles(), \c #ShowOnlyStylesReferencedIn() - */ - void ShowAllStyles( ) const; - /** Shows only styles to which there are not references in text. - @return Nothing. - @see \c #ShowAllStyles(), \c #ShowOnlyStylesReferencedIn() - */ - void ShowOnlyUnreferencedStyles( ) const; - /** Shows only styles that are used in a text range. - @param pRange The text range object. - @return Nothing. - @see \c #ShowAllStyles(), \c #ShowOnlyUnreferencedStyles() - */ - void ShowOnlyStylesReferencedIn( ITextRange pRange) const; - /** Reorders styles in this set by moving a style to a given position. - @param pStyle The style object. - @param position The new 0-based position index. - @return Nothing. - */ - void MoveStyleTo( IParaStyle pStyle, ATETextDOM::Int32 position); - -}; - -////////////////////////////////////////////// -// --IParaStylesIterator-- -////////////////////////////////////////////// -/** This class allows you to iterate through a set of paragraph styles. - Create the iterator object from a \c IParaStyles object. - Use it to access the \c IParaStyle objects in the collection. -*/ -class IParaStylesIterator -{ -private: - ParaStylesIteratorRef fParaStylesIterator; -public: - /** Constructor. - @return The new object. */ - IParaStylesIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IParaStylesIterator(const IParaStylesIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IParaStylesIterator& operator=(const IParaStylesIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IParaStylesIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IParaStylesIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param parastylesiterator The C object. - @return The new C++ object. */ - explicit IParaStylesIterator(ParaStylesIteratorRef parastylesiterator); - /** Destructor */ - virtual ~IParaStylesIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - ParaStylesIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates an iterator object for a specific paragraph style set - that is ordered first-to-last or last-to-first. - @param paraStyles The paragraph style set object. - @param direction Optional. The order of iteration. Default is first-to-last. - @return The new iterator object. - */ - IParaStylesIterator( IParaStyles paraStyles, Direction direction = kForward); - //------------------------------------------------------ - // Methods - //------------------------------------------------------ - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Sets the current position to the first member of this set. - @return Nothing. */ - void MoveToFirst( ); - /** Sets the current position to the last member of this set. - @return Nothing. */ - void MoveToLast( ); - /** Increments the current position in this set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Decrements the current position in this set. - @return Nothing. */ - void Previous( ); - /** Retrieves the current paragraph style. - @return The paragraph style object. */ - IParaStyle Item( ) const; - -}; - -////////////////////////////////////////////// -// --ISpell-- -////////////////////////////////////////////// -/** This class allows you to configure and execute spell-checks - within a document, story, or text range. Use the object to - perform searches for unknown words, replace them with corrected words, - and maintain associated dictionaries and word lists. - - To implement a replace-all operation, - \li Save the current text object and search state, using - \c #GetSearchRange() and \c #GetPreReplaceAllSettings(). - \li Loop through the text objects, and use \c #FindReplaceAllWord() to find all instances - of the target word in the current text object. Keep calling until the method - returns false, making sure to set the \c firstTimeInThisObject flag as needed. - When the method returns a text range, select it and call \c #ReplaceSelected(). - - \li When the operation is complete, restore the text object using \c #SetSearchRange(), - then restore the position and sentence-end flag using \c #RestorePreReplaceAllSettings(). - You must do it in this order, because \c #SetSearchRange() resets the flag. - */ -class ISpell -{ -private: - SpellRef fSpell; -public: - /** Constructor. - @return The new object. */ - ISpell(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ISpell(const ISpell& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ISpell& operator=(const ISpell& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ISpell& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ISpell& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param spell The C object. - @return The new C++ object. */ - explicit ISpell(SpellRef spell); - /** Destructor */ - virtual ~ISpell(); - /** Retrieves a reference to this object. - @return The object reference. */ - SpellRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // Options - // ======================================================================== - /** Initializes this spell-check object with a directory. - @return Nothing*/ - void Initialize( ); - /** Reports whether this spell-check object has been initialized. - @return True if this object has been initialized. */ - bool IsInitialized( ); - /** Reports whether this spell-check ignores words that are all uppercase. - @return True if this spell-check ignores words that are all uppercase. */ - bool GetIgnoreWordsInAllUppercase( ) const; - /** Reports whether this spell-check ignores words that contain numbers. - @return True if this spell-check ignores words that contain numbers. */ - bool GetIgnoreWordsWithNumbers( ) const; - /** Reports whether this spell-check ignores roman numerals. - @return True if this spell-check ignores roman numerals. */ - bool GetIgnoreRomanNumerals( ) const; - /** Reports whether this spell-check ignores repeated words. - @return True if this spell-check ignores repeated words. */ - bool GetIgnoreRepeatedWords( ) const; - /** Reports whether this spell-check ignores the uncapitalized first word of a sentence. - @return True if this spell-check ignores the uncapitalized first word of a sentence. */ - bool GetIgnoreUncapitalizedStartOfSentence( ) const; - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - /** Reports whether strict Yeh characters are considered during the spell check. - @return True if strict Yeh characters are considered, false if they are not. - */ - bool GetStrictYeh( ) const; - /** Reports whether strict Alef characters are considered during the spell check. - @return True if strict Alef characters are considered, false if they are not. - */ - bool GetStrictAlef( ) const; -#endif - - /** Sets whether this spell-check ignores words that are all uppercase. - @param newValue True to ignore words that are all uppercase, - false to report as a spelling error. */ - void SetIgnoreWordsInAllUppercase( bool newValue); - /** Sets whether this spell-check ignores words that contain numbers. - @param newValue True to ignore words that contain numbers, - false to report as a spelling error. */ - void SetIgnoreWordsWithNumbers( bool newValue); - /** Sets whether this spell-check ignores roman numerals. - @param newValue True to ignore roman numerals, - false to report as a spelling error. */ - void SetIgnoreRomanNumerals( bool newValue); - /** Sets whether this spell-check ignores repeated word. - @param newValue True to ignore repeated words, - false to report as a spelling error. */ - void SetIgnoreRepeatedWords( bool newValue); - /** Sets whether this spell-check ignores uncapitalized first words of sentences. - @param newValue True to ignore uncapitalized first words of sentences, - false to report as a spelling error. */ - void SetIgnoreUncapitalizedStartOfSentence( bool newValue); - -#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only - /** Sets whether to consider strict Yeh characters during the spell check. - @param newValue True to consider strict Yeh characters, false to not. - @return Nothing. - */ - void SetStrictYeh( bool newValue); - /** Sets whether to consider strict Alef characters during the spell check. - @param newValue True to consider strict Alef characters, false to not. - @return Nothing. - */ - void SetStrictAlef( bool newValue); -#endif - - /** Reports the scope of search for this spell-check, the entire document or - a story. The default scope is the entire document. - @return The search-scope constant. */ - SearchScope GetSearchScope( ) const; - /** Sets the scope of search for this spell-check, the entire document or - a story. The default scope is the entire document. - @param searchScope The search-scope constant. */ - void SetSearchScope( SearchScope searchScope); - - /** Sets the range of search for this spell-check, limiting the search - to a specific text range within the scope. - @param pRange The text range object. - @param resetEndOfSentence Optional, whether to reset the end-of-sentence marker. - Default is true. - @param resetCurPos Optional, whether to reset the cursor position after the search. - Default is true. - */ - void SetSearchRange( const ITextRange& pRange, const bool resetEndOfSentence = true, const bool resetCurPos = true); - - /** Resets the search temporarily, for a modeless search. - @return Nothing. */ - void Reset( ); - /** Resumes this search from a given point. - Use this if the user has changed - the text significantly enough that you need to reset, but you are fairly - certain that the text has not been changed before the given point. - @param resumePoint A number of characters, the 0-based offset - into the text at which to resume. - @return Nothing. */ - void ResumeFrom( const ATETextDOM::Int32 resumePoint); - // Use this to resume from the current insertion point. - /** Resumes this search from the current insertion point. - @return Nothing. */ - void ResumeFromInsertionPoint( ); - - // ======================================================================== - // Methods - // ======================================================================== - - /** Searches from the start of the range for the first occurrance of an unknown word. - If a word is found, fills a word list with suggested corrections. To retrieve this - list, use \c #GetWordListSize() and GetWordListContents(). - @param pResult [out] A buffer in which to return the first unknown word found. - @param pRange [out] A buffer in which to return the text range that contains the returned word. - @param pLanguage [out] Optional. A buffer in which to return the language. - @return True if an unknown word was found and returned, false if the search reached - the end of the range without finding an unknown word. */ - bool FindOneMisspelledWord( SpellCheckingResult* pResult, ITextRange pRange, Language* pLanguage = NULL); - /** Retrieves the number of characters in the list of suggested corrections - for an unknown word found by \c #FindOneMisspelledWord(). - Use to create a string buffer for \c #GetWordListContents(). - @return The number of characters in the list.*/ - ATETextDOM::Int32 GetWordListSize( ); - /** Retrieves the list of suggested corrections for an unknown word - found by \c #FindOneMisspelledWord(). - @param pWordListBuffer [out] A buffer in which to return the word list. Use \c #GetWordListSize() - to allocate sufficient space for the string. - @param sizeOfBuffer The number of characters in the passed buffer. - @param pNumberOfWords [out] A buffer in which to return the number of - NULL-terminated words in the returned word list. - @return Nothing. */ - void GetWordListContents( ATETextDOM::Unicode* pWordListBuffer, ATETextDOM::Int32 sizeOfBuffer, ATETextDOM::Int32* pNumberOfWords); - /** Replaces a text range with new text. - @param pRange The destination text range object. - @param pCorrection A string containing the replacement text. - @return Nothing. */ - void Replace( ITextRange pRange, const ATETextDOM::Unicode* pCorrection); - - // Use this to add an entry to a pair dictionary, binding the selected word to rCorrection. - /** Adds the selected text to the replace-all dictionary - associating it with a given correction string. - @param pCorrection The correction string. - @return Nothing. */ - void AddSelectedToReplaceAllDict( const ATETextDOM::Unicode* pCorrection); - - /** @deprecated Obsolete, do not use. See \c ISpell class description - for information on implementing a replace-all operation. */ - bool DoReplaceAll( ); - - /** Stores search positions before a replace-all operation that you implement - using \c #FindReplaceAllWord(). Use \c #RestorePreReplaceAllSettings() to - restore the positions after the operation. - You must also save the text object you are currently working with, - and use \c #SetSearchRange() to restore it. - See \c ISpell class description for information on implementing a replace-all operation. - @param pCurrentPoint [out] A buffer in which to save the current search offset. - @param pFoundSentenceEnd [out] A buffer in which to save the current sentence-end flag. - @return Nothing. - */ - void GetPreReplaceAllSettings( ATETextDOM::Int32* pCurrentPoint, bool* pFoundSentenceEnd) const; - // Implement a loop to go through all the text objects you want to replace all with. - // Use this to find all instances of the target word in the current text object. - // Keep calling it until it returns false, making sure to set firstTimeInThisObject as needed. - // It will return the text range to select and call ReplaceSelected( ) with. - /** Searches for the current target word in a text range object. Use to implement - a replace-all operation, by finding all instances of the target word in all text objects - in the range. See \c ISpell class description. - @param pRange The text range object. - @param firstTimeInThisObject True to indicate that that search is - being done in a new text object in your loop. - @return True if the target word is found in the text range. - */ - bool FindReplaceAllWord( ITextRange pRange, const bool firstTimeInThisObject); - /** Restores search positions after a replace-all operation that you implement using \c #FindReplaceAllWord(). - Use \c #GetPreReplaceAllSettings() to store the positions before the operation. - You must also save the text object you are currently working with, and use \c #SetSearchRange() - to restore it. See \c ISpell class description for information on implementing a replace-all operation. - @param currentPoint The buffer containing the saved search offset. - @param foundSentenceEnd The buffer containing the saved sentence-end flag. - @return Nothing. - */ - void RestorePreReplaceAllSettings( const ATETextDOM::Int32 currentPoint, const bool foundSentenceEnd); - - /// Manage spell-check dictionaries - - /** Removes all pairs from the pair dictionary associated with this spell-checker. - The dictionary is never cleared automatically. - @return Nothing. */ - void ClearPairDictionary( ); - - /** Adds the currently selected word to the dictionary associated with this spell-checker. - @return Nothing. */ - void AddSelectedToUserDict( ); - - /** Copies the known-word dictionary for this spell-checker - to the internal word list. Use \c #GetWordListSize() and - \c #GetWordListContents() to examine the result. - @return Nothing. */ - void GetUserDictionaryContents( ); - /** Adds a word to the known-word dictionary for this spell-checker. - @param pWord A string containing the word. - @return True if the addition was successful, false if the string contains - spaces (multiple words) and no word was added. */ - bool AddToUserDictionary( const ATETextDOM::Unicode* pWord); - /** Removes a word from the known-word dictionary for this spell-checker. - @param pWord A string containing the word. - @return Nothing. */ - void DeleteFromUserDictionary( const ATETextDOM::Unicode* pWord); - /** Reports whether a word is contained in the known-word dictionary for this spell-checker. - @param pWord A string containing the word. - @return True if the word is in the dictionary. */ - bool WordExistsInUserDictionary( const ATETextDOM::Unicode* pWord); - /** Adds the currently selected word to the list of words to be - ignored by this spell-checker. - @return Nothing. */ - void AddSelectedToIgnoreList( ); - /** Removes all words from the list of words to be ignored by this spell-checker. - The list is never cleared automatically. - @return Nothing. */ - void ClearIgnoreList( ); - /** Retrieves the language of the most recent missing dictionary. - @return The language constant. */ - Language GetLanguageOfLastMissingDictionary( ); - //param @out : the size of the length of the path - // @in : the memory where the path is to be stored - ATETextDOM::Int32 GetSpellingDictionaryPath(ATETextDOM::Unicode* path); -}; - -////////////////////////////////////////////// -// --IStories-- -////////////////////////////////////////////// -/** Encapsulates a set of stories. Contains a collection of \c IStory objects. - Use to access the text and input focus of the member stories, and to - temporarily suspend reflow calculations for efficiency when altering the text. */ -class IStories -{ -private: - StoriesRef fStories; -public: - /** Constructor. - @return The new object. */ - IStories(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IStories(const IStories& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IStories& operator=(const IStories& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IStories& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IStories& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param stories The C object. - @return The new C++ object. */ - explicit IStories(StoriesRef stories); - /** Destructor */ - virtual ~IStories(); - /** Retrieves a reference to this object. - @return The object reference. */ - StoriesRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - IStory GetFirst( ); - /** Retrieves the last member of this set. - @return The member object. */ - IStory GetLast( ); - // Focus methods - /** Reports whether a member story has the input focus. - @return True if a story in this collection is currently being edited. - @note Only one story can have the focus. It can lose focus if - the user selects text outside it, or clicks outside the - text of the story. */ - bool HasFocus( ) const; - /** Retrieves the member story that has input focus. - @return The story currently being edited, or a \c NULL oject if no text is being edited. */ - IStory GetFocus( ) const; - /** Sets the input focus to a member story, deselecting everything in the document. - @param story The story object. - @return Nothing. */ - void SetFocus( const IStory& story); - /** Removes input focus from the story currently being edited, - deselecting everything in the document. - @return Nothing. */ - void LoseFocus( ); - // Navigation objects. - /** Retrieves the set of text ranges in these stories. - @return The text range set object. */ - ITextRanges GetTextRanges( ) const; - /** Retrieves the set of text ranges for selected text in these stories. - @return The text range set object. */ - ITextRanges GetTextSelection( ) const; - /** Creates an iterator object for the set of paragraphs in these stories. - @return The paragraph iterator object. */ - IParagraphsIterator GetParagraphsIterator( ) const; - /** Creates an iterator object for the set of words in these stories. - @return The word iterator object. */ - IWordsIterator GetWordsIterator( ) const; - /** Creates an iterator object for the set of text runs in these stories. - @return The text run iterator object. */ - ITextRunsIterator GetTextRunsIterator( ) const; - /** Retrieves the document text resources for these stories. - @return The document text resources object. */ - IDocumentTextResources GetDocumentTextResources( ) const; - // ======================================================================== - // METHODS - // ======================================================================== - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param nIndex The 0-based position index. - @return The member object. - */ - IStory Item( ATETextDOM::Int32 nIndex) const; - /** Suspends reflow calculation for these stories. Speeds up calls that cause reflow, - such as \c ITextRange insertion methods. Use \c #ResumeReflow() - to restore normal reflow calculation. - @return Nothing. */ - void SuspendReflow( ); - /** Resumes normal reflow calculation after a call to \c #SuspendReflow(). - @return Nothing. */ - void ResumeReflow( ); - -}; - -////////////////////////////////////////////// -// --IStory-- -////////////////////////////////////////////// -/** This class represents a text flow. A story contains - paragraphs, words, text runs, and text frames. You can - get a text range for any arbitrary subset of the text, - or for the selected text. - - <> - - Kerning is managed at the story level. - - A set of stories is collected in an \c IStories object. - */ -class IStory -{ -private: - StoryRef fStory; -public: - /** Constructor. - @return The new object. */ - IStory(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IStory(const IStory& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IStory& operator=(const IStory& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IStory& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IStory& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param story The C object. - @return The new C++ object. */ - explicit IStory(StoryRef story); - /** Destructor */ - virtual ~IStory(); - /** Retrieves a reference to this object. - @return The object reference. */ - StoryRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================== - // PROPERTIES - // ======================================================================== - - /** Retrieves the index position of this story in its \c IStories collection. - @return The 0-based index. */ - ATETextDOM::Int32 GetIndex( ) const; - /** Retrieves the number of characters in this story. - @return The number of characters. */ - ATETextDOM::Int32 GetSize( ) const; - /// navigation objects. - /** Retrieves the story collection that contains this story. - @return The story collection object. */ - IStories GetStories( ) const; - /** Retrieves the text range that contains the entire text of this story. - @return The text range object. */ - ITextRange GetTextRange( ) const; - /** Retrieves the set of text ranges that contains the selected text of this story. - @return The text range set object. */ - ITextRanges GetTextSelection( ) const; - /** Creates an iterator object for the set of paragraphs in this story. - @return The paragraph iterator object. */ - IParagraphsIterator GetParagraphsIterator( ) const; - /** Creates an iterator object for the set of words in this story. - @return The word iterator object. */ - IWordsIterator GetWordsIterator( ) const; - /** Creates an iterator object for the set of text runs in this story. - @return The text run iterator object. */ - ITextRunsIterator GetTextRunsIterator( ) const; - /** Creates an iterator object for the set of text frames in this story. - @return The text frame iterator object. */ - ITextFramesIterator GetTextFramesIterator( ) const; - /** Retrieves a text frame from this story. - @param frameIndex The 0-based position index. - @return The text frame object. */ - ITextFrame GetFrame( ATETextDOM::Int32 frameIndex) const; - - /// Kerning management - /// for auto or optical kerns - /** Sets automatic or optical kerning for a text range in this story. - @param textRange The text range. - @param autoKernType The kerning type constant. - @return Nothing. */ - void SetKernForSelection( const ITextRange& textRange, AutoKernType autoKernType); - /// for manual kerns - /** Sets a specific kern value in this story. - @param charIndex The 0-based position index of the character to kern. - @param value The kerning value. - @return Nothing. */ - void SetKernAtChar( ATETextDOM::Int32 charIndex, ATETextDOM::Int32 value); - /** Retrieves the kerning type and value for a text range in this story. - @param textRange The text range object. - @param pAutoKernType [out] A buffer in which to return the kerning type constant. - @param value [out] A buffer in which to return the kerning value. - @return Nothing. */ - void GetKern( const ITextRange& textRange, AutoKernType* pAutoKernType, ATETextDOM::Int32* value) const; - /** Retrieves the kerning type and value for a character in this story. - @param charIndex The 0-based position index of the character. - @param pManualKernValue [out] A buffer in which to return the kerning value. - @return The kerning type constant that applies to this character. */ - AutoKernType GetModelKernAtChar( ATETextDOM::Int32 charIndex, ATETextDOM::Int32* pManualKernValue) const; - // ======================================================================== - // METHODS - // ======================================================================== - /** Retrieves an arbitrary text range from this story. - @param start The 0-based position index of the first character in the range. - If negative, 0 is used. - @param end The 0-based position index of the last character in the range. - If greater than the size of the story, the last character of the story is used. - @return The text range object. */ - ITextRange GetTextRange( ATETextDOM::Int32 start, ATETextDOM::Int32 end) const; - /** Creates a new story that is a copy of this one. - @return The story object. */ - IStory Duplicate( ); - /** Suspends reflow calculation for this story. Speeds up calls that cause reflow, - such as \c ITextRange insertion methods. Use \c #ResumeReflow() - to restore normal reflow calculation. - @return Nothing. */ - void SuspendReflow( ); - /** Resumes normal reflow calculation after a call to \c #SuspendReflow(). - @return Nothing. */ - void ResumeReflow( ); - -}; - -////////////////////////////////////////////// -// --ITabStop-- -////////////////////////////////////////////// -/** Encapsulates a tab stop in a paragraph. Tab stops are collected - in an \c ITabStops object, which you can retrieve from - a paragraph using \c IParaFeatures::GetTabStops. - Use an \c ITabStopsIterator object to iterate through the collection. */ -class ITabStop -{ -private: - TabStopRef fTabStop; -public: - /** Constructor. - @return The new object. */ - ITabStop(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITabStop(const ITabStop& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITabStop& operator=(const ITabStop& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITabStop& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITabStop& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param tabstop The C object. - @return The new C++ object. */ - explicit ITabStop(TabStopRef tabstop); - /** Destructor */ - virtual ~ITabStop(); - /** Retrieves a reference to this object. - @return The object reference. */ - TabStopRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================= - /** Retrieves the type of this tab stop (right or left). - @return The tab type constant. */ - TabType GetTabType( ) const; - /** Sets the type of this tab stop (right or left). - @param tabType The tab type constant. - @return Nothing. */ - void SetTabType( TabType tabType); - /** Retrieves the position of this tab stop. - @return The tab position in document points. */ - ATETextDOM::Real GetPosition( ) const; - /** Sets the position of this tab stop. - @param position The tab position in document points. - @return Nothing. */ - void SetPosition( ATETextDOM::Real position); - /** Reports whether this tab stop uses a leader. - @return True if the tab uses a leader. */ - bool HasLeader( ) const; - /** Retrieves the leader string for this tab stop. - @param leader [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - @return Nothing. */ - void GetLeader( ATETextDOM::Unicode* leader, ATETextDOM::Int32 maxLength) const; - /** Sets the leader string for this tab stop. - @param leader The string. - @return Nothing. */ - void SetLeader( ATETextDOM::Unicode* leader); - /** Retrieves the decimal character for this tab stop. - @return A string containing the character. */ - ATETextDOM::Unicode GetDecimalCharacter( ) const; - /** Sets the decimal character for this tab stop. - @param decimalChar A string containing the character. */ - void SetDecimalCharacter( ATETextDOM::Unicode decimalChar); - -}; - -////////////////////////////////////////////// -// --ITabStops-- -////////////////////////////////////////////// -/** Encapsulates a set if tab stops in a paragraph. - You can create a new set of tab stops to apply to a paragraph, - with \c IParaFeatures::SetTabStops(), or retrieve the existing - tab stops with \c IParaFeatures::GetTabStops(). - Tab stop sets are collected in an \c IArrayTabStops object, - which you can retrieve from a set of paragraphs using - \c IParaInspector::GetTabStops. Use an \c ITabStopsIterator - object to iterate through each set in the array. - */ -class ITabStops -{ -private: - TabStopsRef fTabStops; -public: - /** Constructor. Creates an empty container. - @return The new object. */ - ITabStops(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITabStops(const ITabStops& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITabStops& operator=(const ITabStops& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITabStops& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITabStops& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param tabstops The C object. - @return The new C++ object. */ - explicit ITabStops(TabStopsRef tabstops); - /** Destructor */ - virtual ~ITabStops(); - /** Retrieves a reference to this object. - @return The object reference. */ - TabStopsRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================= - /** Retrieves the number of members of this set. - @return The number of members. */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - ITabStop GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - ITabStop GetLast( ) const; - // ======================================================================= - // METHODS - // ======================================================================= - /** Replaces or adds a tab stop to this set. - @param pTabStop The replacement or new tab stop object. - @return Nothing. - */ - void ReplaceOrAdd( const ITabStop& pTabStop); - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param nIndex The 0-based position index. - @return The member object. - */ - ITabStop Item( ATETextDOM::Int32 nIndex) const; - /** Removes a member from the set. - @param nIndex The 0-based position index of the member to remove. - @return Nothing. */ - void Remove( ATETextDOM::Int32 nIndex); - /** Removes all members from the set. - @return Nothing. */ - void RemoveAll( ); -}; - -////////////////////////////////////////////// -// --ITabStopsIterator-- -////////////////////////////////////////////// -/** This class allows you to iterate through a set of tab stops. - Create the iterator object from a \c ITabStops object. - Use it to access the \c ITabStop objects in the collection. -*/ -class ITabStopsIterator -{ -private: - TabStopsIteratorRef fTabStopsIterator; -public: - /** Constructor. - @return The new object. */ - ITabStopsIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITabStopsIterator(const ITabStopsIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITabStopsIterator& operator=(const ITabStopsIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITabStopsIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITabStopsIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param tabstopsiterator The C object. - @return The new C++ object. */ - explicit ITabStopsIterator(TabStopsIteratorRef tabstopsiterator); - /** Destructor */ - virtual ~ITabStopsIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - TabStopsIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates an iterator object for a specific tab stop set - that is ordered first-to-last or last-to-first. - @param tabStops The tab stops set object. - @param direction Optional. The order of iteration. Default is first-to-last. - @return The new iterator object. - */ - ITabStopsIterator( ITabStops tabStops, Direction direction = kForward); - - - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ); - /** Sets the current position to the first member of this set. - @return Nothing. */ - void MoveToFirst( ); - /** Sets the current position to the last member of this set. - @return Nothing. */ - void MoveToLast( ); - /** Increments the current position in the set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Retrieves the current tab stop. - @return The tab stop object. */ - ITabStop Item( ) const; - -}; - -/** A text range, the basic text unit of the Adobe Text Engine, is a set - of characters that ranges from a start offset to an end offset within a story. - Use a text range object: - \li To access selected text, paragraphs, words, text frames, - and text runs (character sequences that share attributes) - within the contained text. - \li To access and modify paragraph and character styles and features in the contained text. - \li To convert text to a Unicode or C string. - \li To select or deselect text programmatically. - \li To convert case in text. - \li To find a single glyph that represents a multiple characters. - - Each time you manipulate the contents of a text range, a reflow operation occurs. - Reflow can change the length and endpoints of any text range in the containing story, - and can cause previously obtained text runs to become invalid; see \c ITextRunIterator. - For efficiency, you can temporarily disable reflowing, then renable it after - making your changes. Use \c IStory::SuspendReflow() and \c IStory::ResumeReflow(), - or the \c IInhibitReflow class. Functions that can cause reflow are: -

\c InsertAfter() -
\c InsertBefore() -
\c #Remove() -
\c #SetLocalCharFeatures() -
\c #ReplaceOrAddLocalCharFeatures() -
\c #SetLocalParaFeatures() -
\c #ReplaceOrAddLocalParaFeatures() - - For example, suppose you have the initial text "0123456789", and have created two - ranges, Range1 from 0 to 5 whose content is "01234", and Range2 from 3 to 9 - whose content is "345678". If you call Range1.insertAfter("abc") - the text becomes "01234abc56789", Range1 becomes "01234abc", and - Range2 becomes "34abc5678". The offsets change automatically so that the - contained text in the ranges reflects the insertion. -*/ -////////////////////////////////////////////// -// --ITextRange-- -////////////////////////////////////////////// -class ITextRange -{ -private: - TextRangeRef fTextRange; -public: - /** Constructor. - @return The new object. */ - ITextRange(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITextRange(const ITextRange& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITextRange& operator=(const ITextRange& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITextRange& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITextRange& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param textrange The C object. - @return The new C++ object. */ - explicit ITextRange(TextRangeRef textrange); - /** Destructor */ - virtual ~ITextRange(); - /** Retrieves a reference to this object. - @return The object reference. */ - TextRangeRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ======================================================================== - /** Retrieves the start offset of this text range. - @return The 0-based index of the start offset from the - beginning of the containing story. */ - ATETextDOM::Int32 GetStart( ) const; - /** Sets the start offset of this text range. - @param start The 0-based index of the start offset from the - beginning of the containing story. - @return Nothing. */ - void SetStart( ATETextDOM::Int32 start); - /** Retrieves the end offset of this text range. - @return The 0-based index of the end offset from the - beginning of the containing story. */ - ATETextDOM::Int32 GetEnd( ) const; - /** Sets the end offset of this text range. - @param end The 0-based index of the end offset from the - beginning of the containing story. - @return Nothing. */ - void SetEnd( ATETextDOM::Int32 end); - /** Retrieves the size of this text range. - @return The number of characters. */ - ATETextDOM::Int32 GetSize( ) const; - // ======================================================================= - // NAVIGATION OBJECTS - // ======================================================================== - /** Retrieves the story that contains this text range. - @return The story object. */ - IStory GetStory( ) const; - /** Retrieves the selected text within this text range. - @return The text ranges object containing the selected text. */ - ITextRanges GetTextSelection( ) const; - /** Creates an iterator for the text frames contained in this text range. - @return The iterator object. */ - ITextFramesIterator GetTextFramesIterator( ) const; - /** Creates an iterator for the paragraphs contained in this text range. - @return The iterator object. */ - IParagraphsIterator GetParagraphsIterator( ) const; - /** Creates an iterator for the words contained in this text range. - @return The iterator object. */ - IWordsIterator GetWordsIterator( ) const; - /** Creates an iterator for the text runs contained in this text range. - Text runs are character sequences that share attributes. - @return The iterator object. */ - ITextRunsIterator GetTextRunsIterator( ) const; - // ======================================================================= - // ATTRIBUTE INSPECTION AND MODIFICATION - // ======================================================================== - /** Creates an inspector with which to access the character features of - all characters in this text range. - @return The inspector object. */ - ICharInspector GetCharInspector( ) const; - /** Creates an inspector with which to access the paragraph features of - all paragraphs in this text range. - @return The inspector object. */ - IParaInspector GetParaInspector( ) const; - /** Retrieves a set of all named character styles used in this text range. - @return The character style set object. */ - ICharStyles GetNamedCharStyles( ) const; - /** Retrieves a set of all named paragraph styles used in this text range. - @return The paragraph style set object. */ - IParaStyles GetNamedParaStyles( ) const; - /** Associates a named character style to this text range. The inherited values can - be overridden by styles or features specified locally in contained - text ranges or individual characters. - @param pName The style name. - @return True if the style is successfully applied, false if there - is no style with the specified name. */ - bool SetNamedCharStyle( const ATETextDOM::Unicode* pName); - /** Associates a named paragraph style to this text range. The inherited values can - be overridden by styles or features specified locally in contained - text ranges or individual paragraphs. - @param pName The style name. - @return True if the style is successfully applied, false if there - is no style with the specified name. */ - bool SetNamedParaStyle( const ATETextDOM::Unicode* pName); - /** Removes the association of this text range and its character style. - Copies the feature values of the character style into local override - values in the contained characters. See \c ICharFeatures. - @return Nothing. */ - void ClearNamedCharStyle( ); - /** Removes the association of this text range and its paragraph style. - Copies the feature values of the paragraph style into local override - values in the contained paragraphs. See \c IParaFeatures. - @return Nothing. */ - void ClearNamedParaStyle( ); - /** Retrieves the unique character features used in this text range. - Unique features are those which have the same value in all text - runs in the range. - @return The character features object containing the unique - feature values. Other features are unassigned.*/ - ICharFeatures GetUniqueCharFeatures( ) const; - /** Retrieves the unique paragraph features used in this text range. - Unique features are those which have the same value in all text - runs in the range. - @return The paragraph features object containing the unique - feature values. Other features are unassigned.*/ - IParaFeatures GetUniqueParaFeatures( ) const; - /** Reports whether there any local character feature overrides for - characters contained in this text range. - @return True if there are local overrides. */ - bool HasLocalCharFeatures( ); - /** Reports whether there any local paragraph feature overrides for - paragraphs contained in this text range. - @return True if there are local overrides. */ - bool HasLocalParaFeatures( ); - /** Retrieves the character features that have local overrides in this text range, - and whose local values are the same in all text runs in the range. - @return The character features object containing the unique - local feature values. Other features are unassigned. If all - features are unassigned, either there are no local overrides, - or the local overrides have no common values. */ - ICharFeatures GetUniqueLocalCharFeatures( ); - /** Retrieves the paragraph features that have local overrides in this text range, - and whose local values are the same in all text runs in the range. - @return The paragraph features object containing the unique - local feature values. Other features are unassigned. If all - features are unassigned, either there are no local overrides, - or the local overrides have no common values. */ - IParaFeatures GetUniqueLocalParaFeatures( ); - - /** Replaces all of the local overrides for all characters in this text range - with a new set of feature values. All values that are assigned - become local values, replacing any previous local value. These local - values override any specified in a style associated with the - character or the text range. All values that are unassigned remove - any previous local values, so that those values are inherited. - - Triggers a reflow operation that can cause previously obtained - text runs to become invalid; see \c ITextRunIterator. - @param pFeatures The new feature set object. - @return Nothing. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void SetLocalCharFeatures( const ICharFeatures& pFeatures); - /** Modifies the local overrides for all characters in this text range. - All values that are assigned become local values, replacing any - previous local value. Values that are unassigned leave any previous - local values unchanged. - - Triggers a reflow operation that can cause previously obtained - text runs to become invalid; see \c ITextRunIterator. - - @param pFeatures The new feature set object. - @return Nothing. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void ReplaceOrAddLocalCharFeatures( const ICharFeatures& pFeatures); - /** Removes all local overrides for all characters in this text range. - All character features are then inherited from styles associated - with the character or text range, or from the Normal style. - @return Nothing. */ - void ClearLocalCharFeatures( ); - - /** Replaces all of the local overrides for all paragraphs in this text range - with a new set of feature values. All values that are assigned - become local values, replacing any previous local value. These local - values override any specified in a style associated with the - paragraph or the text range. All values that are unassigned remove - any previous local values, so that those values are inherited. - - Triggers a reflow operation that can cause previously obtained - text runs to become invalid; see \c ITextRunIterator. - @param pFeatures The new feature set object. - @return Nothing. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void SetLocalParaFeatures( const IParaFeatures& pFeatures); - /** Modifies the local overrides for all paragraphs in this text range. - All values that are assigned become local values, replacing any - previous local value. Values that are unassigned leave any previous - local values unchanged. - - Triggers a reflow operation that can cause previously obtained - text runs to become invalid; see \c ITextRunIterator. - @param pFeatures The new feature set object. - @return Nothing. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void ReplaceOrAddLocalParaFeatures( const IParaFeatures& pFeatures); - /** Removes all local overrides for all paragraphs in this text range. - All paragraph features are then inherited from styles associated - with the paragraph or text range, or from the Normal style. - @return Nothing. */ - void ClearLocalParaFeatures( ); - // ======================================================================= - // METHODS - // ======================================================================== - /** Associates this text range with a new story. - @param story The story object. - @return Nothing. */ - void SetStory( const IStory& story); - /** Sets the start and end points of this text range. - @param start The 0-based index of the start offset from the - beginning of the containing story. - @param end The 0-based index of the end offset from the - beginning of the containing story. - @return Nothing. */ - void SetRange( ATETextDOM::Int32 start, ATETextDOM::Int32 end); - /** Resets start or end point of this range so that it contains only - one character, either the first or the last. - @param direction Optional. The direction constant. Default is - \c CollapseEnd, which sets the start offset to the end offset. - Use \c CollapseStart to set the end offset to the start offset. */ - void Collapse( CollapseDirection direction = CollapseEnd); - /** Moves this text range by adding or subtracting a number of characters - to or from the start and end offsets. Does not move the range if the - result would be out of the story bounds. - @param unit The number of characters, positive to move the range - toward the end, negative to move it toward the beginning of - the story. - @return The number of characters by which the range was translated, - or 0 if the translation could not be made within the story bounds. */ - ATETextDOM::Int32 Move( ATETextDOM::Int32 unit); - /** Creates a duplicate of this object. - @return The new object. */ - ITextRange Clone( ) const; - /** Inserts text into this text range before the current start point. Triggers a - reflow operation that resets the start and end points of this and any other - affected ranges to include both the old and new text. - @param text A Unicode string containing the text. - @param length (Optional) The number of characters, or -1 (the default) if - the string is NULL-terminated. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void InsertBefore( const ATETextDOM::Unicode* text, ATETextDOM::Int32 length = -1); - /** Inserts text into this text range after the current end point. Triggers a - reflow operation that resets the start and end points of this and any other - affected ranges to include both the old and new text. - @param text A Unicode string containing the text. - @param length (Optional) The number of characters, or -1 (the default) if - the string is NULL-terminated. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void InsertAfter( const ATETextDOM::Unicode* text, ATETextDOM::Int32 length = -1); - /** Inserts text into this text range before the current start point. Triggers a - reflow operation that resets the start and end points of this and any other - affected ranges to include both the old and new text. - @param anotherRange A text range object containing the text. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void InsertBefore( const ITextRange& anotherRange); - /** Inserts text into this text range after the current end point. Triggers a - reflow operation that resets the start and end points of this and any other - affected ranges to include both the old and new text. - @param anotherRange A text range object containing the text. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void InsertAfter( const ITextRange& anotherRange); - - /** Retrieves the contents of this text range as a Unicode string. - @param text [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const; - /** Retrieves the contents of this text range as a C string. - @param text [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetContents( char* text, ATETextDOM::Int32 maxLength) const; - - /** Reports whether the characters in this text range map to a single glyph, - and if so, retrieves that glyph. - @param pSingleGlyph [out] A buffer in which to return the glyph identifier, - if there is one. Otherwise, the buffer is not changed. - @return True if the characters in this range map to a single glyph. */ - bool GetSingleGlyphInRange( ATEGlyphID* pSingleGlyph) const; - - /** Selects the text in this text range. - @param addToSelection (Optional) True to add this text to the current - selection, false (the default) to clear the current selection before - selecting this text. - @return Nothing. */ - void Select( bool addToSelection = false); - /** Deselects the text in this text range. This can result in a discontiguous selection, - if this text range is a subset of the selected text. - @return Nothing. */ - void DeSelect( ); - /** Changes the case of the text in this text range. - @param caseChangeType The case type constant. - @return Nothing. */ - void ChangeCase( CaseChangeType caseChangeType); - /** Adjusts the tracking of the text in this range to - fit on one line spanning the width of the area text object. - This is the equivalent of choosing Type > Fit Headline with - the text range selected. - @return Nothing. */ - void FitHeadlines( ); - /** Deletes all of the characters in this text range. Triggers a - reflow operation that resets the start and end points of any other - affected ranges. - @return Nothing. - @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ - void Remove( ); - /** Retrieves the character type of the single character in this - text range. Throws \c #kBadParameterErr if this text range - does not contain exactly one character. - @return The character type constant, */ - ASCharType GetCharacterType( ) const; - -}; - -////////////////////////////////////////////// -// --ITextRanges-- -////////////////////////////////////////////// -/** Encapsulates a set of text ranges. Contains a collection of \c ITextRange objects. - Allows you to perform many of the text operations on all of the member ranges - at once. Use an \c ITextRangesIterator object to iterate through the member ranges. */ -class ITextRanges -{ -private: - TextRangesRef fTextRanges; -public: - /** Constructor. - @return The new object. */ - ITextRanges(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITextRanges(const ITextRanges& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITextRanges& operator=(const ITextRanges& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITextRanges& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITextRanges& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param textranges The C object. - @return The new C++ object. */ - explicit ITextRanges(TextRangesRef textranges); - /** Destructor */ - virtual ~ITextRanges(); - /** Retrieves a reference to this object. - @return The object reference. */ - TextRangesRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - // ======================================================================= - // PROPERTIES - // ====================================================================== - /** Retrieves the number of members of this set. - @return The number of members. - */ - ATETextDOM::Int32 GetSize( ) const; - /** Retrieves the first member of this set. - @return The member object. */ - ITextRange GetFirst( ) const; - /** Retrieves the last member of this set. - @return The member object. */ - ITextRange GetLast( ) const; - // navigation objects. - /** Retrieves the selected text within this text range set. - @return The text ranges object containing the selected text. */ - ITextRanges GetTextSelection( ) const; - /** Creates an iterator for the paragraphs contained in this text range set. - @return The iterator object. */ - IParagraphsIterator GetParagraphsIterator( ) const; - /** Creates an iterator for the words contained in this text range set. - @return The iterator object. */ - IWordsIterator GetWordsIterator( ) const; - /** Creates an iterator for the text runs contained in this text range set. - @return The iterator object. */ - ITextRunsIterator GetTextRunsIterator( ) const; - // ======================================================================= - // ATTRIBUTE INSPECTION AND MODIFICATION - // ======================================================================== - /** Creates an inspector with which to access the character features of - all characters in this text range set. - @return The inspector object. */ - ICharInspector GetCharInspector( ) const; - /** Creates an inspector with which to access the paragraph features of - all paragraphs in this text range set. - @return The inspector object. */ - IParaInspector GetParaInspector( ) const; - /** Removes the association of this text range set and its character style. - Copies the feature values of the character style into local override - values in the contained characters. See \c ICharFeatures. - @return Nothing. */ - void ClearNamedCharStyle( ); - /** Removes the association of this text range set and its paragraph style. - Copies the feature values of the paragraph style into local override - values in the contained paragraphs. See \c IParaFeatures. - @return Nothing. */ - void ClearNamedParaStyle( ); - /** Retrieves the unique character features used in this text range set. - Unique features are those which have the same value in all text - runs in the ranges. - @return The character features object containing the unique - feature values. Other features are unassigned.*/ - ICharFeatures GetUniqueCharFeatures( ) const; - /** Retrieves the unique paragraph features used in this text range set. - Unique features are those which have the same value in all text - runs in the ranges. - @return The paragraph features object containing the unique - feature values. Other features are unassigned.*/ - IParaFeatures GetUniqueParaFeatures( ) const; - /** Reports whether there any local character feature overrides for - characters contained in this text range set. - @return True if there are local overrides. */ - bool HasLocalCharFeatures( ); - /** Reports whether there any local paragraph feature overrides for - paragraphs contained in this text range set. - @return True if there are local overrides. */ - bool HasLocalParaFeatures( ); - /** Retrieves the character features that have local overrides in this text range set, - and whose local values are the same in all text runs in the ranges. - @return The character features object containing the unique - local feature values. Other features are unassigned. If all - features are unassigned, either there are no local overrides, - or the local overrides have no common values. */ - ICharFeatures GetUniqueLocalCharFeatures( ); - /** Retrieves the paragraph features that have local overrides in this text range set, - and whose local values are the same in all text runs in the ranges. - @return The paragraph features object containing the unique - local feature values. Other features are unassigned. If all - features are unassigned, either there are no local overrides, - or the local overrides have no common values. */ - IParaFeatures GetUniqueLocalParaFeatures( ); - - /** Replaces all of the local overrides for all characters in this text range set - with a new set of feature values. All values that are assigned - become local values, replacing any previous local value. These local - values override any specified in a style associated with a - character or a text range. All values that are unassigned remove - any previous local values, so that those values are inherited. - @param pFeatures The new feature set object. - @return Nothing. */ - void SetLocalCharFeatures( const ICharFeatures& pFeatures); - /** Modifies the local overrides for all characters in this text range set. - All values that are assigned become local values, replacing any - previous local value. Values that are unassigned leave any previous - local values unchanged. - @param pFeatures The new feature set object. - @return Nothing. */ - void ReplaceOrAddLocalCharFeatures( const ICharFeatures& pFeatures); - /** Removes all local overrides for all characters in this text range set. - All character features are then inherited from styles associated - with the character or text range, or from the Normal style. - @return Nothing. */ - void ClearLocalCharFeatures( ); - /** Replaces all of the local overrides for all paragraphs in this text range set - with a new set of feature values. All values that are assigned - become local values, replacing any previous local value. These local - values override any specified in a style associated with a - paragraph or a text range. All values that are unassigned remove - any previous local values, so that those values are inherited. - @param pFeatures The new feature set object. - @return Nothing. */ - void SetLocalParaFeatures( const IParaFeatures& pFeatures); - /** Modifies the local overrides for all paragraphs in this text range set. - All values that are assigned become local values, replacing any - previous local value. Values that are unassigned leave any previous - local values unchanged. - @param pFeatures The new feature set object. - @return Nothing. */ - void ReplaceOrAddLocalParaFeatures( const IParaFeatures& pFeatures); - /** Removes all local overrides for all paragraphs in this text range set. - All paragraph features are then inherited from styles associated - with the paragraph or text range, or from the Normal style. - @return Nothing. */ - void ClearLocalParaFeatures( ); - // ======================================================================= - // METHODS - // ====================================================================== - /** Selects the text in this text range set. - @param addToSelection (Optional) True to add this text to the current - selection, false (the default) to clear the current selection before - selecting this text. - @return Nothing. */ - void Select( bool addToSelection = false); - /** Deselects the text in this text range set. - This can result in a discontiguous selection, - if this text is a subset of the selected text. - @return Nothing. */ - void DeSelect( ); - /** Retrieves the contents of this text range set as a Unicode string. - @param text [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const; - /** Retrieves the contents of this text range set as a C string. - @param text [out] A buffer in which to return the string. - @param maxLength The number of characters in the buffer. - @return The number of characters in the returned string. */ - ATETextDOM::Int32 GetContents( char* text, ATETextDOM::Int32 maxLength) const; - /** Changes the case of the text in this text range set. - @param caseChangeType The case type constant. - @return Nothing. */ - void ChangeCase( CaseChangeType caseChangeType); - /** Adds a text range as a member of this set. - @param textRange The text range object. - @return Nothing. */ - void Add( const ITextRange& textRange); - /** Retrieves a member of this set by position index. Use with \c GetSize() - to iterate through members. - @param nIndex The 0-based position index. - @return The member object. - */ - ITextRange Item( ATETextDOM::Int32 nIndex) const; - /** Removes all members from the set. - @return Nothing. */ - void RemoveAll( ); - /** Removes a member from the set. - @param nIndex The 0-based position index of the member to remove. - @return Nothing. */ - void Remove( ATETextDOM::Int32 nIndex); - -}; - -////////////////////////////////////////////// -// --ITextRangesIterator-- -////////////////////////////////////////////// -/** This object allows you to iterate through a set of text ranges. - Create the iterator from a set of text ranges (\c ITextRanges). */ -class ITextRangesIterator -{ -private: - TextRangesIteratorRef fTextRangesIterator; -public: - /** Constructor. - @return The new object. */ - ITextRangesIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITextRangesIterator(const ITextRangesIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITextRangesIterator& operator=(const ITextRangesIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITextRangesIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITextRangesIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param textrangesiterator The C object. - @return The new C++ object. */ - explicit ITextRangesIterator(TextRangesIteratorRef textrangesiterator); - /** Destructor */ - virtual ~ITextRangesIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - TextRangesIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates an iterator object for a specific text range set - that is ordered first-to-last or last-to-first. - @param textRanges The text range set object. - @param direction Optional. The order of iteration. Default is first-to-last. - @return The new iterator object. - */ - ITextRangesIterator( ITextRanges textRanges, Direction direction = kForward); - - /** Creates a duplicate of this object. - @return The new object. */ - ITextRangesIterator Clone( ) const; - - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Sets the current position to the first member of this set. - @return Nothing. */ - void MoveToFirst( ); - /** Sets the current position to the last member of this set. - @return Nothing. */ - void MoveToLast( ); - /** Increments the current position in the set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Retrieves the current text range. - @return The text range object. */ - ITextRange Item( ) const; - -}; - -////////////////////////////////////////////// -// --ITextRunsIterator-- -////////////////////////////////////////////// -/** This object allows you to iterate through a set of text runs in a story. - A text run is a range of text whose characters all share the - same set of attributes. If the text of the story changes through insertions - or deletions, an existing text run iterator is rendered invalid. - - Create a text run iterator object using \c ITextRange::GetTextRunsIterator(), - or the corresponding method in \c ITextRanges, \c IStory, \c IStories, or \c IGlyphs. - */ -class ITextRunsIterator -{ -private: - TextRunsIteratorRef fTextRunsIterator; -public: - /** Constructor. - @return The new object. */ - ITextRunsIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - ITextRunsIterator(const ITextRunsIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - ITextRunsIterator& operator=(const ITextRunsIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const ITextRunsIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const ITextRunsIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param textrunsiterator The C object. - @return The new C++ object. */ - explicit ITextRunsIterator(TextRunsIteratorRef textrunsiterator); - /** Destructor */ - virtual ~ITextRunsIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - TextRunsIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates an iterator object for a the text runs in a specific text range set - that is ordered first-to-last or last-to-first. - @param ranges The text range set object. - @param direction Optional. The order of iteration. Default is first-to-last. - @return The new iterator object. - */ - ITextRunsIterator( const ITextRanges& ranges, Direction direction = kForward); - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Sets the current position to the first member of this set. - @return Nothing. */ - void MoveToFirst( ); - /** Sets the current position to the last member of this set. - @return Nothing. */ - void MoveToLast( ); - /** Increments the current position in the set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Retrieves the text range containing the current text run. - @return The text range object. - @note This can change from one call to the next if the story text changes. - For foward iteration, the new text run begins at or before the old one. - For backward iteration, the new text run begins at or after the old one. */ - ITextRange Item( ) const; - -}; - -////////////////////////////////////////////// -// --IWordsIterator-- -////////////////////////////////////////////// -/** This object allows you to iterate through a set of words in a text range. - Create an iterator object using \c ITextRange::GetWordsIterator(), - or the corresponding method in \c ITextRanges, \c IStory, \c IStories, - \c IParagraph, or \c IGlyphs. - */ -class IWordsIterator -{ -private: - WordsIteratorRef fWordsIterator; -public: - /** Constructor. - @return The new object. */ - IWordsIterator(); - /** Copy constructor - @param src The object to copy. - @return The new object. */ - IWordsIterator(const IWordsIterator& src); - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IWordsIterator& operator=(const IWordsIterator& rhs); - /** Comparison operator tests for equality. - @param rhs The object to compare to this one. - @return True if the two objects are the same. */ - bool operator==(const IWordsIterator& rhs) const; - /** Comparison operator tests for inequality. - @param rhs The object to compare to this one. - @return True if the two objects are not the same. */ - bool operator!=(const IWordsIterator& rhs) const; - /** Constructs this C++ object from the corresponding C object - returned by an ATE suite function. - The C++ object manages reference counting. - @param wordsiterator The C object. - @return The new C++ object. */ - explicit IWordsIterator(WordsIteratorRef wordsiterator); - /** Destructor */ - virtual ~IWordsIterator(); - /** Retrieves a reference to this object. - @return The object reference. */ - WordsIteratorRef GetRef() const; - /** Reports whether this is a null object. - @return True if this is a null object. */ - bool IsNull() const; - - /** Constructor. Creates an iterator object for the words in a specific text range set. - that is ordered first-to-last or last-to-first. - @param ranges The text range set object. - @param direction Optional. The order of iteration. Default is first-to-last. - @return The new iterator object. - */ - IWordsIterator( const ITextRanges& ranges, Direction direction = kForward); - - /** Reports whether the end of the set has been reached. - @return True if more members remain in the set. */ - bool IsNotDone( ) const; - /** Reports whether the end of the set has been reached. - @return True if no more members remain in the set. */ - bool IsDone( ) const; - /** Reports whether the set is empty. - @return True if the set is empty. */ - bool IsEmpty( ) const; - /** Sets the current position to the first member of this set. - @return Nothing. */ - void MoveToFirst( ); - /** Sets the current position to the last member of this set. - @return Nothing. */ - void MoveToLast( ); - /** Increments the current position in the set in the iterator's current direction. - @return Nothing. */ - void Next( ); - /** Retrieves the text range for the current word, including trailing characters. - This is equivalent to Ctrl/Cmd + arrow. For example, "..." is considered a word. - @return The text range object. */ - ITextRange Item( ) const; - - /// Trailing characters - - /** Retrieves the number of trailing spaces for the current word. - Trailing spaces are those after the word, regardless of the direction of - iteration. - @return The number of trailing spaces. */ - ATETextDOM::Int32 GetTrailingSpaceCount( ) const; - /** Retrieves the total number of trailing characters for the current word, including - spaces, other white-space characters, and punctuation characters. - Trailing characters are those after the word, regardless of the direction of - iteration. - @return The number of trailing characters. */ - ATETextDOM::Int32 GetTrailingCount( ) const; - /** Retrieves the number of trailing punctuation characters for the current word. - Trailing characters are those after the word, regardless of the direction of - iteration. - @return The number of trailing punctuation characters. */ - ATETextDOM::Int32 GetTrailingTerminatingPunctuationCount( ) const; - -}; - -/** A convenience class for temporarily inhibiting reflow in a text story. - By default, as edits are made to the contents of a text story and its attributes, - the story contents are reflowed through the story containers. This operation - can be expensive. Use this class to inhibit reflow when batching together - a series of edits to one or more text objects. Destroy the object when - all the edits are complete, so that reflow is automatically resumed. - */ -class IInhibitReflow -{ -public: - /** Constructor. - @return The new object. */ - IInhibitReflow() - { - } - /** Constructor. Creates a reflow inhibitor object for a story. - @param story The story object. - @return The new reflow inhibitor object. - */ - IInhibitReflow(const IStory& story) - :fStory(story) - { - fStory.SuspendReflow(); - } - /** Copy constructor - @param reflow The object to copy. - @return The new object. */ - IInhibitReflow(const IInhibitReflow& reflow) - :fStory(reflow.fStory) - { - fStory.SuspendReflow(); - } - /** Destructor. */ - virtual ~IInhibitReflow() - { - if(!fStory.IsNull()) - fStory.ResumeReflow(); - } - /** Assignment operator. - @param rhs The object to assign to this one. - @return A reference to this object. */ - IInhibitReflow& operator=(const IInhibitReflow& rhs) - { - this->~IInhibitReflow( ); - fStory = rhs.fStory; - if(!fStory.IsNull()) - fStory.SuspendReflow(); - return *this; - } -protected: - IStory fStory; -}; -}// namespace ATE - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: IText.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ +#pragma once + +#include "ATESuites.h" +#include "ATEException.h" +#include "SloTextdomTypes.h" + +namespace ATE +{ +class IApplicationPaint; +class ICompFont; +class ICompFontClass; +class ICompFontClassSet; +class ICompFontComponent; +class ICompFontSet; +class IGlyphRun; +class IGlyphRunsIterator; +class IListStyle; +class IListStyleSet; +class IMojiKumi; +class IMojiKumiSet; +class ITextFrame; +class ITextFramesIterator; +class ITextLine; +class ITextLinesIterator; +class ITextResources; +class IApplicationTextResources; +class IDocumentTextResources; +class IVersionInfo; +class IArrayApplicationPaintRef; +class IArrayReal; +class IArrayBool; +class IArrayInteger; +class IArrayLineCapType; +class IArrayFigureStyle; +class IArrayLineJoinType; +class IArrayWariChuJustification; +class IArrayStyleRunAlignment; +class IArrayAutoKernType; +class IArrayBaselineDirection; +class IArrayLanguage; +class IArrayFontCapsOption; +class IArrayFontBaselineOption; +class IArrayFontOpenTypePositionOption; +class IArrayUnderlinePosition; +class IArrayStrikethroughPosition; +class IArrayParagraphJustification; +class IArrayArrayReal; +class IArrayBurasagariType; +class IArrayPreferredKinsokuOrder; +class IArrayKinsokuRef; +class IArrayListStyleRef; +class IArrayListStyleSetRef; +class IArrayMojiKumiRef; +class IArrayMojiKumiSetRef; +class IArrayTabStopsRef; +class IArrayLeadingType; +class IArrayFontRef; +class IArrayGlyphID; +class IArrayRealPoint; +class IArrayRealMatrix; +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only +class IArrayParagraphDirection; +class IArrayJustificationMethod; +class IArrayKashidaWidth; +class IArrayKashidas; +class IArrayDirOverride; +class IArrayDigitSet; +class IArrayDiacVPos; +#endif +class ICharFeatures; +class ICharInspector; +class ICharStyle; +class ICharStyles; +class ICharStylesIterator; +class IFind; +class IFont; +class IGlyph; +class IGlyphs; +class IGlyphsIterator; +class IKinsoku; +class IKinsokuSet; +class IParaFeatures; +class IParagraph; +class IParagraphsIterator; +class IParaInspector; +class IParaStyle; +class IParaStyles; +class IParaStylesIterator; +class ISpell; +class IStories; +class IStory; +class ITabStop; +class ITabStops; +class ITabStopsIterator; +class ITextRange; +class ITextRanges; +class ITextRangesIterator; +class ITextRunsIterator; +class IWordsIterator; +class IArrayLine; +class IArrayComposerEngine; +////////////////////////////////////////////// +// --IApplicationPaint-- +////////////////////////////////////////////// +/** Encapsulates Illustrator-specific painting of + fill and stroke for text, as defined by + the \c #AIATEPaintSuite. + + @see \c IArrayApplicationPaintRef */ +class IApplicationPaint +{ +private: + ApplicationPaintRef fApplicationPaint; +public: + /** Constructor + @return The new object. */ + IApplicationPaint(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IApplicationPaint(const IApplicationPaint& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IApplicationPaint& operator=(const IApplicationPaint& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IApplicationPaint& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IApplicationPaint& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param applicationpaint The C object. + @return The new C++ object. + @return The new C++ object. */ + explicit IApplicationPaint(ApplicationPaintRef applicationpaint); + /** Destructor */ + virtual ~IApplicationPaint(); + /** Retrieves a reference to this object. + @return The object reference. */ + ApplicationPaintRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + +}; + +////////////////////////////////////////////// +// --ICompFont-- +////////////////////////////////////////////// +/** Encapsulates a composite font as a text resource. The methods allow you to + add, access, and manipulate fonts for use with the + Adobe Text Engine (ATE). This font contains \c ICompFontComponent + objects. */ +class ICompFont +{ +private: + CompFontRef fCompFont; +public: + /** Constructor + @return The new object. */ + ICompFont(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICompFont(const ICompFont& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICompFont& operator=(const ICompFont& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICompFont& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICompFont& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param compfont The C object. + @return The new C++ object. */ + explicit ICompFont(CompFontRef compfont); + /** Destructor */ + virtual ~ICompFont(); + /** Retrieves a reference to this object. + @return The object reference. */ + CompFontRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor: Creates a composite font from a text resources object. + @param pResources The text resources object. + @return The new object. */ + ICompFont( ITextResources pResources); + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the platform-specific name of this font. + @param name A buffer in which to return the name string. + @param maxLength The number of characters in the passed buffer. The name is + truncated to this length if necessary. + @return Nothing. + */ + void GetNativeName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const; + + /** Sets the platform-specific name of this font. The PostScript name is + automatically derived from this name. + @param name The new name string. + @return Nothing. + */ + void SetNativeName( const ATETextDOM::Unicode* name); + + /** Retrieves the PostScript name of this font as Unicode. + @param name A Unicode character buffer in which to return the name string. + @param maxLength The number of characters in the passed buffer. The name is + truncated to this length if necessary. + @return Nothing. + */ + void GetPostScriptName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const; + + /** Retrieves the PostScript name of this font as a C string. + @param name A \c char buffer in which to return the name string. + @param maxLength The number of characters in the passed buffer. The name is + truncated to this length if necessary. + @return Nothing. + */ + void GetPostScriptName( char* name, ATETextDOM::Int32 maxLength) const; + + /** Sets the font dictionary for this font. + @param fontDictionary A pointer to the new dictionary. + @return Nothing. + @see \c #AIDictionarySuite + */ + void SetFontDictionary( void* fontDictionary); + + /** Retrieves the font dictionary for this font. + @return A pointer to the dictionary.. + @see \c #AIDictionarySuite + */ + void* GetFontDictionary( ) const; + + // ======================================================================= + // METHODS + // ======================================================================= + /** Duplicates this font. + @return The new font object. + */ + ICompFont Duplicate( ) const; + + /** Reports whether the resource been modified since it became editable. + @return True if the resource has been modified. + */ + bool IsModified( ) const; + + /** Reports whether the resource is currently editable. + @return True if the resource is editable. + */ + bool IsEditable( ) const; + + /** Reports whether changes to the resource have been committed. + @return True if changes have been committed. + */ + bool IsCommitted( ) const; + + /** Reports whether the resource is in a valid state, either editable or committed. + @return True if the resource is in a valid state. + */ + bool VerifyState( ) const; + + /** Reports whether the ATC file for the font is currently loaded. + @return True if the font file is loaded. + */ + bool IsATCFileLoaded( ) const; + + /** Retrieves the number of components of this font. Use with + \c #GetComponent() to iterate through components. + @return The number of components. + */ + ATETextDOM::Int32 GetComponentCount( ) const; + + /** Retrieves a component from this font by index position. Use with + \c #GetComponentCount() to iterate through components. + @param index The 0-based position index. + @return The component object. + */ + ICompFontComponent GetComponent( ATETextDOM::Int32 index) const; + + /** Retrieves a specific component from this font. + @param component The component object. + @return The index position of the component, or -1 if the component + is not in this font. + */ + ATETextDOM::Int32 Find( ICompFontComponent component) const; + + /** Removes a component from this font. + @param index The 0-based position index of the component to remove. + @return True if a component was successfully removed. + */ + bool RemoveComponent( ATETextDOM::Int32 index); + + /** Appends a component to this font. + @param component The component object. + @return The 0-based position index of the successfully + added component, or -1 if the component could not be appended. + */ + ATETextDOM::Int32 AddComponent( ICompFontComponent component); + + /** Replaces a component in this font. + @param index The 0-based position index of the component to replace. + @param component The replacement component object. + @return True if a component was successfully replaced. + */ + bool ReplaceComponent( ATETextDOM::Int32 index, ICompFontComponent component); + +}; + +////////////////////////////////////////////// +// --ICompFontClass-- +////////////////////////////////////////////// +/** Encapsulates a font character class as a text resource. The methods allow you to + add, access, and manipulate font classes for use with the + Adobe Text Engine (ATE). A font character class contains a collection of Unicode characters. + */ +class ICompFontClass +{ +private: + CompFontClassRef fCompFontClass; +public: + /** Constructor + @return The new object. */ + ICompFontClass(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICompFontClass(const ICompFontClass& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICompFontClass& operator=(const ICompFontClass& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICompFontClass& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICompFontClass& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param compfontclass The C object. + @return The new C++ object. */ + explicit ICompFontClass(CompFontClassRef compfontclass); + /** Destructor */ + virtual ~ICompFontClass(); + /** Retrieves a reference to this object. + @return The object reference. */ + CompFontClassRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the platform-specific name of this font class. + @param name A buffer in which to return the name string. + @param maxLength The number of characters in the passed buffer. The name is + truncated to this length if necessary. + @return Nothing. + */ + void GetNativeName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const; + + /** Sets the platform-specific name of this font. + @param name The new name string. + @return Nothing. + */ + void SetNativeName( const ATETextDOM::Unicode* name); + + /** Retrieves the Unicode character codes that belong to this class. + @param codes A buffer in which to return the character codes. + @param maxLength The number of characters in the passed buffer. The return + string (including the terminating 0) is truncated to this length if necessary. + @return The number of character codes written to the buffer, including the terminating 0. + */ + ATETextDOM::Int32 GetCodes( ATETextDOM::Unicode* codes, ATETextDOM::Int32 maxLength) const; + + /** Sets the Unicode character codes that belong to this class. + @param codes A buffer containing the new Unicode character codes. + @return The character code count, not include the terminating 0. + */ + ATETextDOM::Int32 SetCodes( const ATETextDOM::Unicode* codes); + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Duplicates this font class. + @return The new font class object. + */ + ICompFontClass Duplicate( ) const; + + /** Retrieves the number of characters in this font class. + @return The number of characters. + */ + ATETextDOM::Int32 GetCharacterCount( ) const; + + /** Retrieves the type of this font class. + @return The class type constant. + */ + CompositeFontClassType GetClassType( ) const; + + /** Reports whether a Unicode character is in this font class. + @param code The character code. + @return True if the code is part of this class. + */ + bool IsCodeInClass( ATETextDOM::Unicode code) const; + + /** Reports whether the resource is currently editable. + @return True if the resource is editable. + @note Predefined classes are never editable. + */ + bool IsEditable( ) const; + + /** Reports whether this is a custom override class or predefined class. + @return True if this is a custom override class, false if it is a predefined class. + @note Predefined classes are never editable. + */ + bool IsCustomOverride( ) const; + + /** Reports whether the resource been modified since it became editable. + @return True if the resource has been modified. + */ + bool IsModified( ) const; + + /** Reports whether the resource is in a valid state, either editable or committed. + @return True if the resource is in a valid state. + */ + bool VerifyState( ) const; + +}; + +////////////////////////////////////////////// +// --ICompFontClassSet-- +////////////////////////////////////////////// +/** Encapsulates a font class set as a text resource. The methods allow you to + add, access, and manipulate font class sets for use with the + Adobe Text Engine (ATE). A font class set contains a collection of \c ICompFontClass objects. + */ +class ICompFontClassSet +{ +private: + CompFontClassSetRef fCompFontClassSet; +public: + /** Constructor + @return The new object. */ + ICompFontClassSet(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICompFontClassSet(const ICompFontClassSet& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICompFontClassSet& operator=(const ICompFontClassSet& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICompFontClassSet& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICompFontClassSet& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param compfontclassset The C object. + @return The new C++ object. */ + explicit ICompFontClassSet(CompFontClassSetRef compfontclassset); + /** Destructor */ + virtual ~ICompFontClassSet(); + /** Retrieves a reference to this object. + @return The object reference. */ + CompFontClassSetRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the number of members of this set. + @return The number of members. + */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. + */ + ICompFontClass GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. + */ + ICompFontClass GetLast( ) const; + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + ICompFontClass Item( ATETextDOM::Int32 nIndex) const; + + /** Retrieves a specific font class from this set. + @param compFontClass The font class object. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( ICompFontClass compFontClass) const; + + /** Retrieves a specific predefined font class type from this set. + @param predefinedType The font class type. + @return The index position of the type in this set, or -1 + if the type is not in this set. + */ + ATETextDOM::Int32 FindPredefined( CompositeFontClassType predefinedType) const; + +}; + +////////////////////////////////////////////// +// --ICompFontComponent-- +////////////////////////////////////////////// +/** Encapsulates a font component as a text resource. The methods allow you to + add, access, and manipulate font components for use with the + Adobe Text Engine (ATE). Font components belong to \c ICompFont objects. + See \c ICompFont::GetComponent() */ +class ICompFontComponent +{ +private: + CompFontComponentRef fCompFontComponent; +public: + /** Constructor + @return The new object. */ + ICompFontComponent(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICompFontComponent(const ICompFontComponent& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICompFontComponent& operator=(const ICompFontComponent& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICompFontComponent& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICompFontComponent& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param compfontcomponent The C object. + @return The new C++ object. */ + explicit ICompFontComponent(CompFontComponentRef compfontcomponent); + /** Destructor */ + virtual ~ICompFontComponent(); + /** Retrieves a reference to this object. + @return The object reference. */ + CompFontComponentRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor: Creates a font component from a text resources object. + @param pResources The text resources object. + @return The new object. */ + ICompFontComponent( ITextResources pResources); + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the font class to which this component belongs. + @return The font class object. + */ + ICompFontClass GetClass( ) const; + + /** Sets the font character class to which this component belongs. + @param charClass The font character class object. + @return Nothing. + */ + void SetClass( ICompFontClass charClass); + + /** Retrieves the font to which this component belongs. + @return The font object. + */ + IFont GetFont( ) const; + + /** Sets the font to which this component belongs. + @param font The font object. + @return Nothing. + */ + void SetFont( IFont font); + + /** Retrieves the point size of this component. + @return The point size. + */ + ATETextDOM::Real GetSize( ) const; + + /** Sets the point size of this component. + @param size The new point size. + */ + void SetSize( ATETextDOM::Real size); + + /** Retrieves the baseline value of this component. + @return The baseline value. + */ + ATETextDOM::Real GetBaseline( ) const; + + /** Sets the baseline value of this component. + @param baseline The new baseline value. + */ + void SetBaseline( ATETextDOM::Real baseline); + + /** Retrieves the horizontal scaling factor of this component. + @return The horizontal scaling factor. + */ + ATETextDOM::Real GetHorizontalScale( ) const; + + /** Sets the horizontal scaling factor of this component. + @param horizontalScale The new horizontal scaling factor. + */ + void SetHorizontalScale( ATETextDOM::Real horizontalScale); + + /** Retrieves the vertical scaling factor of this component. + @return The vertical scaling factor. + */ + ATETextDOM::Real GetVerticalScale( ) const; + + /** Sets the vertical scaling factor of this component. + @param verticalScale The new vertical scaling factor. + */ + void SetVerticalScale( ATETextDOM::Real verticalScale); + + /** Reports the centering state of this component. + @return True if centering is on. + */ + bool GetCenterGlyph( ) const; + + /** Sets the centering state of this component. + @param centerglyph True to turn centering on, false to turn it off + @return Nothing + */ + void SetCenterGlyph( bool centerglyph); + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Reports whether the resource been modified since it became editable. + @return True if the resource has been modified. + */ + bool IsModified( ) const; + +}; + +////////////////////////////////////////////// +// --ICompFontSet-- +////////////////////////////////////////////// +/** Encapsulates a composite font set as a text resource. The methods allow you to + add, access, and manipulate font sets for use with the + Adobe Text Engine (ATE). A font set contains a collection of \c ICompFont objects. + */ +class ICompFontSet +{ +private: + CompFontSetRef fCompFontSet; +public: + /** Constructor + @return The new object. */ + ICompFontSet(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICompFontSet(const ICompFontSet& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICompFontSet& operator=(const ICompFontSet& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICompFontSet& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICompFontSet& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param compfontset The C object. + @return The new C++ object. */ + explicit ICompFontSet(CompFontSetRef compfontset); + /** Destructor */ + virtual ~ICompFontSet(); + /** Retrieves a reference to this object. + @return The object reference. */ + CompFontSetRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the number of members of this set. + @return The number of members. + */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. + */ + ICompFont GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. + */ + ICompFont GetLast( ) const; + // ======================================================================= + // METHODS + // ======================================================================= + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + ICompFont Item( ATETextDOM::Int32 nIndex) const; + + /** Retrieves a specific font from this set. + @param font The font object. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( ICompFont font) const; + + /** Removes a member font from this font set. + @param nIndex The 0-based position index of the font to remove. + @return True if a font was successfully removed. + */ + bool Remove( ATETextDOM::Int32 nIndex); + + /** Appends a font to this font set. + @param font The font object. + @return The 0-based position index of the successfully + added font, or -1 if the font could not be appended. + */ + ATETextDOM::Int32 Add( ICompFont font); + + /** Replaces a font in this set. + @param nIndex The 0-based position index of the font to replace. + @param newFont The replacement font object. + @return True if a font was successfully replaced. + */ + bool Replace( ATETextDOM::Int32 nIndex, ICompFont newFont); + + /** Updates this font set to reflect what is currently in the + document font resource's font set. This can invalidate + previously saved font indices. + @return Nothing. + */ + void Update( ) const; + +}; + +////////////////////////////////////////////// +// --IGlyphRun-- +////////////////////////////////////////////// +/** Encapsulates a glyph run as a text resource. The methods allow you to + add, access, and manipulate glyph runs for use with the + Adobe Text Engine (ATE). A glyph run belongs to a \c ITextLine object. + It contains a string of characters, along with drawing information + for them. + */ +class IGlyphRun +{ +private: + GlyphRunRef fGlyphRun; +public: + /** Constructor + @return The new object. */ + IGlyphRun(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IGlyphRun(const IGlyphRun& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IGlyphRun& operator=(const IGlyphRun& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IGlyphRun& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IGlyphRun& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param glyphrun The C object. + @return The new C++ object. */ + explicit IGlyphRun(GlyphRunRef glyphrun); + /** Destructor */ + virtual ~IGlyphRun(); + /** Retrieves a reference to this object. + @return The object reference. */ + GlyphRunRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Retrieves the text-line parent of this glyph run. + @return The text-line object. + */ + ITextLine GetTextLine( ) const; + + /** Retrieves the number of glyphs in this run. + The number of the glyphs can be different from number of characters returned + by \c #GetCharacterCount(), because of factors such ligature and hyphenation. + @return The number of glyphs. + */ + ATETextDOM::Int32 GetSize( ) const; + + /** Retrieves the number of characters in this run. Use to determine + the size of buffer to pass to \c #GetContents(). + @return The number of characters. + @see \c #GetSize() + */ + ATETextDOM::Int32 GetCharacterCount( ) const; + + /** Retrieves the origin points of each glyph in this run. + @return The array of origin points. + */ + IArrayRealPoint GetOrigins( ) const; + + /** Retrieves the unique identifiers of each glyph in this run. + @return The array of identifiers. + */ + IArrayGlyphID GetGlyphIDs( ) const; + + /** Retrieves the character range of this glyphrun + */ + ITextRange GetCharacterRange() const; + + /** Retrieves the transformation matrix of this run, which + specifies the full transformation. To get the location of + an individual glyph, you must transform the origin by the value + in the \c #GetOrigins() array, then concatinate this matrix with + the text frame matrix, returned by \c ITextFrame::GetMatrix(). + @return The transformation matrix. + */ + ATETextDOM::RealMatrix GetMatrix( ) const; + + /** Retrieves the character features of this run. + Only the following members are defined: +
\c Font +
\c FontSize +
\c HorizontalScale +
\c VerticalScale +
\c Tracking +
\c BaselineShift +
\c FillColor +
\c StrokeColor +
\c fBlend +
\c Fill +
\c Stroke +
\c FillFirst +
\c FillOverPrint +
\c StrokeOverPrint +
\c FillBackgroundColor +
\c FillBackground +
\c LineCap +
\c LineJoin +
\c LineWidth +
\c MiterLimit +
\c LineDashOffset +
\c LineDashArray + @return The character features object. + */ + ICharFeatures GetCharFeatures( ) const; + + /** Retrieves the glyph orientation of this run. + @return The orientation constant. + */ + GlyphOrientation GetGlyphOrientation( ) const; + + /** Retrieves the ascent of this run. + @return The ascent value, in document points. + */ + ATETextDOM::Real GetAscent( ) const; + + /** Retrieves the descent of this run. + @return The descent value, in document points. + */ + ATETextDOM::Real GetDescent( ) const; + + /** Retrieves the tracking (space between each character) of this run, + @return The tracking value, in document points. + */ + ATETextDOM::Real GetTracking( ) const; + + /** Retrieves the width of the space glyph in the font for this run. + @return The width value, in document points. + */ + ATETextDOM::Real GetSpaceGlyphWidth( ) const; + + /** Retrieves the distance to the baseline in the font for this run. + @return The distance value, in document points. + */ + ATETextDOM::Real GetDistanceToBaseline( ) const; + + /** Retrieves the underline position in the font for this run. + @return The position value, in document points. + */ + ATETextDOM::Real GetUnderlinePosition( ) const; + + /** Retrieves the underline thickness in the font for this run. + @return The thickness value, in document points. + */ + ATETextDOM::Real GetUnderlineThickness( ) const; + + /** Retrieves the maximum height for capital letters in the font for this run. + @return The height value, in document points. + */ + ATETextDOM::Real GetMaxCapHeight( ) const; + + /** Retrieves the minimum height for capital letters in the font for this run. + @return The height value, in document points. + */ + ATETextDOM::Real GetMinCapHeight( ) const; + + /** Retrieves x height in the font for this run. + @return The height value, in document points. + */ + ATETextDOM::Real GetXHeight() const; + + /** Retrieves the component font for this run if the character-feature font is + a composite font, otherwise retrieves the character-feature font. + @return The font object. + */ + IFont GetFlattenedFont( ) const; + + /** Retrieves the contents of this run as a Unicode string. + @param text [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + Use \c #GetCharacterCount() to determine what size is needed. + @return The number of characters written to the text buffer. + */ + ATETextDOM::Int32 GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const; + + /** Retrieves the contents of this run as a C string. + @param text [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + Use \c #GetCharacterCount() to determine what size is needed. + @return The number of characters written to the text buffer. + */ + ATETextDOM::Int32 GetContents( char* text, ATETextDOM::Int32 maxLength) const; + +}; + +////////////////////////////////////////////// +// --IGlyphRunsIterator-- +////////////////////////////////////////////// +/** This object enables you to iterate through the set of + glyph runs in the current document. + @see \c IGlyphRun. + */ +class IGlyphRunsIterator +{ +private: + GlyphRunsIteratorRef fGlyphRunsIterator; +public: + /** Constructor + @return The new object. */ + IGlyphRunsIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IGlyphRunsIterator(const IGlyphRunsIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IGlyphRunsIterator& operator=(const IGlyphRunsIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IGlyphRunsIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IGlyphRunsIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param glyphrunsiterator The C object. + @return The new C++ object. */ + explicit IGlyphRunsIterator(GlyphRunsIteratorRef glyphrunsiterator); + /** Destructor */ + virtual ~IGlyphRunsIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + GlyphRunsIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // METHODS + // ===================================================================== + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsDone( ) const; + /** Increments the current position in the set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Retrieves the current glyph run. + @return The glyph run object. */ + IGlyphRun Item( ) const; + +}; + +////////////////////////////////////////////// +// --IListStyle-- +////////////////////////////////////////////// +/** Encapsulates the ListStyle characteristics of a character as a text resource. + The methods allow you to add, access, and manipulate ListStyle for use with the + Adobe Text Engine (ATE). These objects are collected in an \c IListStyleSet. + */ +class IListStyle +{ +private: + ListStyleRef fListStyle; +public: + /** Constructor + @return The new object. */ + IListStyle(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IListStyle(const IListStyle& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IListStyle& operator=(const IListStyle& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IListStyle& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IListStyle& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param ListStyle The C object. + @return The new C++ object. */ + explicit IListStyle(ListStyleRef listStyle); + /** Destructor */ + virtual ~IListStyle(); + /** Retrieves a reference to this object. + @return The object reference. */ + ListStyleRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the name of this object. + @param name [out] A Unicode string in which to return the name. + @param maxLength The number of characters in the buffer. + Use \c #GetNameSize() to determine the size needed. + @return The number of characters written to the buffer. + */ + ATETextDOM::Int32 GetName( ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength) const; + /** Retrieves the number of characters in the name of this object. Use to + determine the size of buffer to pass to \c #GetName(). + @return The number of characters in the name. + */ + ATETextDOM::Int32 GetNameSize( ) const; + /** Sets the name of this object. + @param name A Unicode string containing the new name. + @return Nothing. + */ + void SetName( const ATETextDOM::Unicode * name); + /** Retrieves the number of sub level in this list object. + @return The number of levels. + */ + ATETextDOM::Int32 GetNumberOfLevelStyles( ) const; + /** Retrieves the Nth level indents of this list object, give the einput emWidth + @param index : Nth level position + @param listIndent - This is the accumuulated text indent till the Nth level of this list + @param textIndent - This is the text indent of Nth level of this list + @param labelIndent -This is the label indent of Nth level of this list + */ + void GetNthTierIndents(ATETextDOM::Int32 index, + ATETextDOM::Float emWidth, + ATETextDOM::Float * listIndent, + ATETextDOM::Float * textIndent, + ATETextDOM::Float * labelIndent); + /** Retrieves the Nth level label Alignment of this list object, + @param index : Nth level position + @param labelAlignment --This is the label Alignment of Nth level of this list + */ + void GetNthLevelLabelAlignment(ATETextDOM::Int32 index, + ATE::BNListAlignment& labelAlignment); + /** Retrieves the font of label of Nth level in this list object. + @param index : Nth level position + @return The font of label of Nth level + */ + IFont GetNthLevelLabelFont( ATETextDOM::Int32 index); + /** Retrieves the Nth Sequence Generator this list object + @param index : Nth level position + @param sequenceGeneratorType - This is type of sequece generator of Nth level of this list + @param prefix - This is the label prefix of Nth level of this list + @param postfix -This is the label postfix of Nth level of this list + @param bullet -This is the bullet label of Nth level of this list if Nth level is of type BulletSequenceGenerator, else it is invalid + */ + void GetNthLevelSequenceGenerator(ATETextDOM::Int32 index, + ATE::ListStylePredefinedTag& sequenceGeneratorType, + ATETextDOM::Unicode* prefix, + ATETextDOM::Unicode* postfix, + ATETextDOM::Unicode* bullet); + /** Reports whether this object matches a predefined tag in the + ListStyle. + @param tag The tag object. + @return True if this object matches the tag. + */ + bool MatchesPredefinedResourceTag( ATE::ListStylePredefinedTag tag) const; + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Reports whether this object is equivalent to another ListStyle object. + @param rhsListStyle The other ListStyle object. + @return True if the objects are equivalent. + */ + bool IsEquivalent( IListStyle rhsListStyle) const; + /** Reports whether the resource been modified since it became editable. + @return True if the resource has been modified. + */ + bool IsModified( ) const; + /** Reports whether this is a predefined ListStyle. + @return True if the ListStyle is predefined, false if it is customized. + */ + bool IsPredefined( ) const; + + /** Sets the Nth level Indent Units of this list object. + @param index : Nth level position + @param units: indent units of Nth level + */ + void SetNthLevelIndentUnits( ATETextDOM::Int32 index, ATE::IndentUnits units); + /** Sets the Nth level Text indent of this list object. + @param index : Nth level position + @param indent: text indent of Nth level + */ + void SetNthLevelTextIndent( ATETextDOM::Int32 index, ATETextDOM::Float indent); + /** Sets the Nth level Label indent of this list object. + @param index : Nth level position + @param indent: Label indent of Nth level + */ + void SetNthLevelLabelIndent( ATETextDOM::Int32 index, ATETextDOM::Float indent); + /** Sets the Nth level Label Alignment of this list object. + @param index : Nth level position + @param labelAlignment: label Alignment of Nth level + */ + void SetNthLevelLabelAlignment( ATETextDOM::Int32 index, ATE::BNListAlignment labelAlignment); + /** Sets the Nth level Label Font of this list object. + @param index : Nth level position + @param font: label Font of Nth level + */ + void SetNthLevelLabelFont(ATETextDOM::Int32 index, IFont font); + /** Sets the Nth level Label Font of this list object. + @param index : Nth level position + @param sequenceGeneratorTag: Sequennce type of Nth level + @param prefix: label prefix Nth level + @param postfix: label postfix of Nth level + @param bullet: bullet label of Nth level of this list if Nth level is of type BulletSequenceGenerator, else it is invalid + */ + void SetNthLevelSequenceGenerator( ATETextDOM::Int32 index, + ATE::ListStylePredefinedTag sequenceGeneratorTag, + const ATETextDOM::Unicode* prefix, + const ATETextDOM::Unicode* postfix, + const ATETextDOM::Unicode* bullet); + /** Sets the Nth level Label Font of this list object. + @param index : position at which this new level should be inserted inside this list + @param units: indent units + @param textIndent: text indent + @param labelIndent: label indent + @param labelAlignment: label Alignment of Nth level + @param font: label Font + @param sequenceGeneratorTag: Sequennce type + @param prefix: label prefix + @param postfix: label postfix + @param bullet: bullet label if sequenceGeneratorTag is of type kPreedefinedBulletSequence else it is invalid + */ + void InsertLevelAt( ATETextDOM::Int32 index, + ATE::IndentUnits units, + ATETextDOM::Float textIndent, + ATETextDOM::Float labelIndent, + ATE::BNListAlignment labelAlignment, + IFont font, + ATE::ListStylePredefinedTag sequenceGeneratorTag, + const ATETextDOM::Unicode* prefix, + const ATETextDOM::Unicode* postfix, + const ATETextDOM::Unicode* bullet); + /** Sets the Nth level Label Font of this list object. + @param index : Nth level position + */ + void EraseLevel( ListStyleRef listStyle, ATETextDOM::Int32 index); + /** Creates a new object by duplicating the information in this one. + @return The new object + */ + IListStyle Duplicate( ) const; + +}; + +////////////////////////////////////////////// +// --IListStyleSet-- +////////////////////////////////////////////// +/** Encapsulates a ListStyle set as a text resource. The methods allow you to + add, access, and manipulate ListStyle sets for use with the + Adobe Text Engine (ATE). The set contains \c IListStyle objects. + */ +class IListStyleSet +{ +private: + ListStyleSetRef fListStyleSet; +public: + /** Constructor + @return The new object. */ + IListStyleSet(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IListStyleSet(const IListStyleSet& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IListStyleSet& operator=(const IListStyleSet& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IListStyleSet& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IListStyleSet& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param ListStyleset The C object. + @return The new C++ object. */ + explicit IListStyleSet(ListStyleSetRef listStyleset); + /** Destructor */ + virtual ~IListStyleSet(); + /** Retrieves a reference to this object. + @return The object reference. */ + ListStyleSetRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ); + /** Retrieves the first member of this set. + @return The member object. */ + IListStyle GetFirst( ); + /** Retrieves the last member of this set. + @return The member object. */ + IListStyle GetLast( ); + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + IListStyle Item( ATETextDOM::Int32 nIndex) const; + /** Retrieves a specific ListStyle object from this set, matching name and data. + @param ListStyle The ListStyle object. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( const IListStyle listStyle); + /** Retrieves a specific ListStyle object from this set, matching only the name. + @param name The object name. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( const ATETextDOM::Unicode* name); + /** Retrieves a specific ListStyle object from this set, matching a tag. + @param tag The tag. Use \c #kUserDefinedListStyleTag to get the first + customized (not predefined) ListStyle. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( ListStylePredefinedTag tag); + /** Removes a member ListStyle from this set. + @param nIndex The 0-based position index of the ListStyle to remove. + @return True if a ListStyle was successfully removed. + */ + bool Remove( ATETextDOM::Int32 nIndex); + /** Appends a ListStyle to this set. + @param ListStyle The ListStyle object. + @return The 0-based position index of the successfully + added object, or the current index of this object + if it is already in the set, or -1 if the object + was not in the set and could not be appended. + */ + ATETextDOM::Int32 Add( IListStyle listStyle); + /** Replaces a ListStyle in this set. + @param nIndex The 0-based position index of the ListStyle to replace. + @param ListStyle The replacement ListStyle object. + @return True if an object was successfully replaced. + */ + bool Replace( ATETextDOM::Int32 nIndex, IListStyle listStyle); + +}; + + +////////////////////////////////////////////// +// --IMojiKumi-- +////////////////////////////////////////////// +/** Encapsulates the MojiKumi characteristics of a character as a text resource. + The methods allow you to add, access, and manipulate MojiKumi for use with the + Adobe Text Engine (ATE). These objects are collected in an \c IMojiKumiSet. + */ +class IMojiKumi +{ +private: + MojiKumiRef fMojiKumi; +public: + /** Constructor + @return The new object. */ + IMojiKumi(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IMojiKumi(const IMojiKumi& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IMojiKumi& operator=(const IMojiKumi& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IMojiKumi& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IMojiKumi& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param mojikumi The C object. + @return The new C++ object. */ + explicit IMojiKumi(MojiKumiRef mojikumi); + /** Destructor */ + virtual ~IMojiKumi(); + /** Retrieves a reference to this object. + @return The object reference. */ + MojiKumiRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the name of this object. + @param name [out] A Unicode string in which to return the name. + @param maxLength The number of characters in the buffer. + Use \c #GetNameSize() to determine the size needed. + @return The number of characters written to the buffer. + */ + ATETextDOM::Int32 GetName( ATETextDOM::Unicode * name, ATETextDOM::Int32 maxLength) const; + /** Retrieves the number of characters in the name of this object. Use to + determine the size of buffer to pass to \c #GetName(). + @return The number of characters in the name. + */ + ATETextDOM::Int32 GetNameSize( ) const; + /** Sets the name of this object. + @param name A Unicode string containing the new name. + @return Nothing. + */ + void SetName( const ATETextDOM::Unicode * name); + /** Reports whether this object matches a predefined tag in the + MojiKumi table. + @param tag The tag object. + @return True if this object matches the tag. + */ + bool MatchesPredefinedResourceTag( ATE::MojikumiTablePredefinedTag tag) const; + /** Retrieves a MojiKumi table entry from this object. + @param index The 0-based position index for the entry. + @param minExpansion [out] A buffer in which to return the maximum expansion value. + @param maxExpansion [out] A buffer in which to return the minimum expansion value. + @param desiredExpansion [out] A buffer in which to return the desired expansion value. + @return Nothing. + */ + void GetEntry( ATETextDOM::Int32 index, ATETextDOM::Float * minExpansion, ATETextDOM::Float * maxExpansion, ATETextDOM::Float * desiredExpansion) const; + /** Sets a MojiKumi table entry from this object. + @param index The 0-based position index for the entry. + @param minExpansion The new maximum expansion value. + @param maxExpansion The new minimum expansion value. + @param desiredExpansion The new desired expansion value. + @return Nothing. + */ + void SetEntry( ATETextDOM::Int32 index, ATETextDOM::Real minExpansion, ATETextDOM::Real maxExpansion, ATETextDOM::Real desiredExpansion); + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Reports whether this object is equivalent to another MojiKumi object. + @param rhsMojiKumi The other MojiKumi object. + @return True if the objects are equivalent. + */ + bool IsEquivalent( IMojiKumi rhsMojiKumi) const; + /** Reports whether the resource been modified since it became editable. + @return True if the resource has been modified. + */ + bool IsModified( ) const; + /** Reports whether this is a predefined MojiKumi. + @return True if the MojiKumi is predefined, false if it is customized. + */ + bool IsPredefined( ) const; + /** Creates a new object by duplicating the information in this one. + @return The new object + */ + IMojiKumi Duplicate( ) const; + +}; + +////////////////////////////////////////////// +// --IMojiKumiSet-- +////////////////////////////////////////////// +/** Encapsulates a MojiKumi set as a text resource. The methods allow you to + add, access, and manipulate MojiKumi sets for use with the + Adobe Text Engine (ATE). The set contains \c IMojiKumi objects. + */ +class IMojiKumiSet +{ +private: + MojiKumiSetRef fMojiKumiSet; +public: + /** Constructor + @return The new object. */ + IMojiKumiSet(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IMojiKumiSet(const IMojiKumiSet& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IMojiKumiSet& operator=(const IMojiKumiSet& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IMojiKumiSet& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IMojiKumiSet& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param mojikumiset The C object. + @return The new C++ object. */ + explicit IMojiKumiSet(MojiKumiSetRef mojikumiset); + /** Destructor */ + virtual ~IMojiKumiSet(); + /** Retrieves a reference to this object. + @return The object reference. */ + MojiKumiSetRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ); + /** Retrieves the first member of this set. + @return The member object. */ + IMojiKumi GetFirst( ); + /** Retrieves the last member of this set. + @return The member object. */ + IMojiKumi GetLast( ); + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + IMojiKumi Item( ATETextDOM::Int32 nIndex) const; + /** Retrieves a specific MojiKumi object from this set, matching name and data. + @param mojiKumi The MojiKumi object. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( const IMojiKumi mojiKumi); + /** Retrieves a specific MojiKumi object from this set, matching only the name. + @param name The object name. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( const ATETextDOM::Unicode* name); + /** Retrieves a specific MojiKumi object from this set, matching a tag. + @param tag The tag. Use \c #kUserDefinedMojikumiTableTag to get the first + customized (not predefined) MojiKumi. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( MojikumiTablePredefinedTag tag); + /** Removes a member MojiKumi from this set. + @param nIndex The 0-based position index of the MojiKumi to remove. + @return True if a MojiKumi was successfully removed. + */ + bool Remove( ATETextDOM::Int32 nIndex); + /** Appends a MojiKumi to this set. + @param mojiKumi The MojiKumi object. + @return The 0-based position index of the successfully + added object, or the current index of this object + if it is already in the set, or -1 if the object + was not in the set and could not be appended. + */ + ATETextDOM::Int32 Add( IMojiKumi mojiKumi); + /** Replaces a MojiKumi in this set. + @param nIndex The 0-based position index of the MojiKumi to replace. + @param mojiKumi The replacement MojiKumi object. + @return True if an object was successfully replaced. + */ + bool Replace( ATETextDOM::Int32 nIndex, IMojiKumi mojiKumi); + /** Creates a new, empty MojiKumi object and appends it to this set. + @param name The name of the new object. + @param nIndex [out] A buffer in which to return the + 0-based position index of the successfully + added object, or -1 if it could not be added. + @return The new object, or a \c NULL object + if the MojiKumi could not be created. + */ + IMojiKumi CreateNewMojiKumi( const ATETextDOM::Unicode* name, ATETextDOM::Int32* nIndex); + +}; + +////////////////////////////////////////////// +// --ITextFrame-- +////////////////////////////////////////////// +/** This class encapsulates a text frame, which manages the layout + of a text range into rows and columns. The methods allow you to + add, access, and manipulate text frames for use with the + Adobe Text Engine (ATE). The frame is associated with an \c ITextRange, + and contains \c ITextLine objects representing rows of text, which you can + access through an \c ITextLinesIterator. A text frame can be part + of an \c IStory. */ +class ITextFrame +{ +private: + TextFrameRef fTextFrame; +public: + /** Constructor + @return The new object. */ + ITextFrame(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITextFrame(const ITextFrame& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITextFrame& operator=(const ITextFrame& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITextFrame& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITextFrame& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param textframe The C object. + @return The new C++ object. */ + explicit ITextFrame(TextFrameRef textframe); + /** Destructor */ + virtual ~ITextFrame(); + /** Retrieves a reference to this object. + @return The object reference. */ + TextFrameRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // METHODS + // ===================================================================== + /** Retrieves the parent story of this text frame. + @return The story object. + */ + IStory GetStory( ) const; + /** Retrieves the text range of this frame. + @param bIncludeOverflow Optional. When true (the default), if + the frame is the last one in its story, the range includes any + overflow text. When false, overflow text is not included. + @return The text range object. + */ + ITextRange GetTextRange( bool bIncludeOverflow = true) const; + /** Retrieves a text-line iterator with which you can access + the text lines of this text frame. + @return The text-line iterator object. + */ + ITextLinesIterator GetTextLinesIterator( ) const; + /** Retrieves the type of this text frame. + @return The type constant. + */ + FrameType GetType( ) const; + /** Retrieves the line orientation of this text frame. + @return The line orientation constant. + */ + LineOrientation GetLineOrientation( ) const; + /** Reports whether this frame is selected. Use the \c #AIArtSuite + to set the selection. + @return True if the text frame is selected. + */ + bool GetSelected( ) const; + /** Retrieves the transformation matrix of this text frame. + @return The transformation matrix. + */ + ATETextDOM::RealMatrix GetMatrix( ) const; + /** Retrieves the number of rows for this text frame. + @return The number of rows. + */ + ATETextDOM::Int32 GetRowCount( ) const; + /** Retrieves the number of columns for this text frame. + @return The number of columns. + */ + ATETextDOM::Int32 GetColumnCount( ) const; + /** Reports whether the text range is arranged in row-major order. + @return True if the text frame is in row-major order. + */ + bool GetRowMajorOrder( ) const; + /** Retrieves the row gutter value for this text frame. + @return The row gutter value, in document points. + */ + ATETextDOM::Real GetRowGutter( ) const; + /** Retrieves the column gutter value for this text frame. + @return The column gutter value, in document points. + */ + ATETextDOM::Real GetColumnGutter( ) const; + /** Retrieves the line spacing value for this text frame. + @return The line spacing value, in document points. + */ + ATETextDOM::Real GetSpacing( ) const; + /** Reports whether optical alignment is on for this text frame + @return True if optical alignment is on. + */ + bool GetOpticalAlignment( ) const; +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + /** Retrieves the paragraph direction for this text frame. + @return The paragraph direction object. + */ + ParagraphDirection GetStoryDirection( ) const; +#endif + /** Sets the number of rows for this text frame. + @param rowCount The number of rows. + @return Nothing. + */ + void SetRowCount( ATETextDOM::Int32 rowCount); + /** Sets the number of columns for this text frame. + @param columnCount The number of columns. + @return Nothing. + */ + void SetColumnCount( ATETextDOM::Int32 columnCount); + /** Turns row-major order on or off for this text frame. + @param isRowMajor True to turn row-major order on, + false to turn it off. + @return Nothing. + */ + void SetRowMajorOrder( bool isRowMajor); + /** Sets the row gutter value for this text frame. + @param gutter The new row-gutter value in document points. + @return Nothing. + */ + void SetRowGutter( ATETextDOM::Real gutter); + /** Sets the column gutter value for this text frame. + @param gutter The new column-gutter value in document points. + @return Nothing. + */ + void SetColumnGutter( ATETextDOM::Real gutter); + /** Sets the line spacing value for this text frame. + @param spacing The new line spacing value in document points. + @return Nothing. + */ + void SetSpacing( ATETextDOM::Real spacing); + /** Turns optical alignment on or off for this text frame. + @param isActive True to turn optical alignment on, + false to turn it off. + @return Nothing. + */ + void SetOpticalAlignment( bool isActive); + /** Sets the line orientation value for this text frame. + @param lineOrientation The new line orientation constant. + @return Nothing. + */ + void SetLineOrientation( LineOrientation lineOrientation); + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + /** Sets the paragragh direction for this text frame. + @param direction The paragraph direction. + @return Nothing. + */ + void SetStoryDirection( ParagraphDirection direction); +#endif +}; + +////////////////////////////////////////////// +// --ITextFramesIterator-- +////////////////////////////////////////////// +/** This object enables you to iterate through the set of + text frames in the current document. + @see \c ITextFrame. */ +class ITextFramesIterator +{ +private: + TextFramesIteratorRef fTextFramesIterator; +public: + /** Constructor + @return The new object. */ + ITextFramesIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITextFramesIterator(const ITextFramesIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITextFramesIterator& operator=(const ITextFramesIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITextFramesIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITextFramesIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param textframesiterator The C object. + @return The new C++ object. */ + explicit ITextFramesIterator(TextFramesIteratorRef textframesiterator); + /** Destructor */ + virtual ~ITextFramesIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + TextFramesIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates an iterator for the text frames + contained in a text range. + @param range The text range object. + @return The new iterator object. + */ + ITextFramesIterator( const ITextRange& range); + + // ======================================================================= + // METHODS + // ===================================================================== + + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Increments the current position in the set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Decrements the current position in the set. + @return Nothing. */ + void Previous( ); + /** Retrieves the current text frame. + @return The text frame object. */ + ITextFrame Item( ) const; + +}; + +////////////////////////////////////////////// +// --ITextLine-- +////////////////////////////////////////////// + +/** This class encapsulates a line of text in a text frame. + The line is part of an \c ITextFrame, contains \c IGlyphRun + objects that you can access with an \c IGlyphRunIterator, + and is associated with an \c ITextRange. + @see \c ITextFrame::GetTextLinesIterator() */ +class ITextLine +{ +private: + TextLineRef fTextLine; +public: + /** Constructor + @return The new object. */ + ITextLine(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITextLine(const ITextLine& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITextLine& operator=(const ITextLine& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITextLine& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITextLine& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param textline The C object. + @return The new C++ object. */ + explicit ITextLine(TextLineRef textline); + /** Destructor */ + virtual ~ITextLine(); + /** Retrieves a reference to this object. + @return The object reference. */ + TextLineRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Retrieves a glyph-run iterator with which you can access + the glyph runs of this line. + @return The glyph-run iterator object. + @see GetVisualGlyphRunsIterator() + */ + IGlyphRunsIterator GetGlyphRunsIterator( ) const; + /** Retrieves a glyph-run iterator with which you can access + the glyph runs of this line, handling the special case of text that + contains a mixture of left-to-right (LTR) and right-to-left (RTL) + text. If this case is not expected, use \c #GetGlyphRunsIterator(). + @return The glyph-run iterator object. + @see GetGlyphRunsIterator() */ + IGlyphRunsIterator GetVisualGlyphRunsIterator( ) const; + /** Retrieves the parent text frame of this line. + @return The text frame object. + */ + ITextFrame GetTextFrame( ) const; + /** Retrieves the text range for this line. + @return The text range object. + */ + ITextRange GetTextRange( ) const; + /** Retrieves an array of baselines (IArrayLine) specified by a + start and end point in the coordinate space of the containing text frame. + An array is required since each composed line can contain several segments + due to intrusions such as text wraps and Japanese features such as warichu. + @return The array of baselines. + */ + IArrayLine GetBaselines() const; +}; + +////////////////////////////////////////////// +// --ITextLinesIterator-- +////////////////////////////////////////////// +/** This object enables you to iterate through the set of + text lines in a text frame. + @see \c ITextFrame::GetTextLinesIterator() */ +class ITextLinesIterator +{ +private: + TextLinesIteratorRef fTextLinesIterator; +public: + /** Constructor + @return The new object. */ + ITextLinesIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITextLinesIterator(const ITextLinesIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITextLinesIterator& operator=(const ITextLinesIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITextLinesIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITextLinesIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param textlinesiterator The C object. + @return The new C++ object. */ + explicit ITextLinesIterator(TextLinesIteratorRef textlinesiterator); + /** Destructor */ + virtual ~ITextLinesIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + TextLinesIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // METHODS + // ======================================================================= + + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Increments the current position in the set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Decrements the current position in the set. + @return Nothing. */ + void Previous( ); + /** Retrieves the current text line. + @return The text line object. */ + ITextLine Item( ) const; + +}; + +////////////////////////////////////////////// +// --ITextResources-- +////////////////////////////////////////////// +/** Parent class for \c IApplicationTextResources +and \c IDocumentTextResources */ +class ITextResources +{ +private: + TextResourcesRef fTextResources; +public: + ITextResources(); + ITextResources(const ITextResources& src); + ITextResources& operator=(const ITextResources& rhs); + bool operator==(const ITextResources& rhs) const; + bool operator!=(const ITextResources& rhs) const; + explicit ITextResources(TextResourcesRef textresources); + virtual ~ITextResources(); + TextResourcesRef GetRef() const; + bool IsNull() const; + + ITextResources GetTextResources( ); + +}; + +////////////////////////////////////////////// +// --IApplicationTextResources-- +////////////////////////////////////////////// +/** Parent class for \c IDocumentTextResources */ +class IApplicationTextResources +{ +private: + ApplicationTextResourcesRef fApplicationTextResources; +public: + /** Constructor + @return The new object. */ + IApplicationTextResources(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IApplicationTextResources(const IApplicationTextResources& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IApplicationTextResources& operator=(const IApplicationTextResources& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IApplicationTextResources& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IApplicationTextResources& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param applicationtextresources The C object. + @return The new C++ object. */ + explicit IApplicationTextResources(ApplicationTextResourcesRef applicationtextresources); + /** Destructor */ + virtual ~IApplicationTextResources(); + /** Retrieves a reference to this object. + @return The object reference. */ + ApplicationTextResourcesRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // From parent class... + ITextResources GetTextResources( ); + // ======================================================================= + // PROPERTIES + // ======================================================================= + IKinsokuSet GetKinsokuSet( ) const; + IListStyleSet GetListStyleSet( ) const; + IMojiKumiSet GetMojiKumiSet( ) const; + ICompFontClassSet GetCompFontClassSet( ) const; + ICompFontSet GetCompFontSet( ) const; + +}; + +////////////////////////////////////////////// +// --IDocumentTextResources-- +////////////////////////////////////////////// +/** This object encapsulates the text resources of a document. + Text resources include fonts, character and paragraph styles, + and various text preferences. */ +class IDocumentTextResources +{ +private: + DocumentTextResourcesRef fDocumentTextResources; +public: + /** Constructor + @return The new object. */ + IDocumentTextResources(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IDocumentTextResources(const IDocumentTextResources& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IDocumentTextResources& operator=(const IDocumentTextResources& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IDocumentTextResources& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IDocumentTextResources& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param documenttextresources The C object. + @return The new C++ object. */ + explicit IDocumentTextResources(DocumentTextResourcesRef documenttextresources); + /** Destructor */ + virtual ~IDocumentTextResources(); + /** Retrieves a reference to this object. + @return The object reference. */ + DocumentTextResourcesRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // From parent class... + /** Retrieves the Kinsoku set for the document. + @return The Kinsoku set object. + */ + IKinsokuSet GetKinsokuSet( ) const; + /** Retrieves the ListStyle set for the document. + @return The ListStyle set object. + */ + IListStyleSet GetListStyleSet( ) const; + /** Retrieves the MojiKumi set for the document. + @return The MojiKumi set object. + */ + IMojiKumiSet GetMojiKumiSet( ) const; + /** Retrieves the composite font class set for the document. + @return The composite font class set object. + */ + ICompFontClassSet GetCompFontClassSet( ) const; + /** Retrieves the composite font set for the document. + @return The composite font set object. + */ + ICompFontSet GetCompFontSet( ) const; + /** Retrieves the text resources for the document. + @return The text resources object. + */ + ITextResources GetTextResources( ); + + /** Retrieves the search object for the document. + @return The search object. + */ + IFind GetFind( ); + /** Retrieves the spell-check object for the document. + @return The spell-check object. + */ + ISpell GetSpell( ); + + /** Retrieves the glyph for the document. + @return The glyph object. + */ + IGlyph GetGlyphAndAlternates( ) const; + /** Retrieves the alternate glyph for the document. + @return The glyph object. + */ + IGlyph GetAlternateGlyph( ) const; + /** Inserts a new alternate glyph. + @param theCharacters The characters for which this glyph is an alternate. + @param glyphID The glyph identifier. + @param otFeatureArray An array of features. + @param otFeatureCount The size of the feature array. + @param otFeatureIndexArray A mapping of the glyph-feature array to the character features. + @param leaveSelected True to leave the character in the selected state. + @return Nothing. + */ + void InsertAlternateGlyph( const ATETextDOM::Unicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ATETextDOM::Int32 otFeatureCount, const ATETextDOM::Int32* otFeatureIndexArray, bool leaveSelected); + + /** Retrieves the alternate glyphs for the document that are available + for selection. + @return The array of alternate glyphs. */ + IArrayInteger GetAlternatesAvailableThroughoutSelection( ) const; + + /** Retrieves the Japanese alternate-feature value for the document selection. + @param isFeature [out] A buffer in which to return true if the alternate is found. + @return The feature constant. + */ + JapaneseAlternateFeature GetJapaneseAlternateFeatureInSelection( bool* isFeature) const; + /** Sets the Japanese alternate-feature value for the document selection. + @param feature The feature constant. + @return Nothing. + */ + void SetJapaneseAlternateFeatureInSelection( JapaneseAlternateFeature feature); + + /** Retrieves the character style set for the document. + @return The character style set object. + */ + ICharStyles GetCharStylesInDocument( ) const; + /** Retrieves the paragraph style set for the document. + @return The paragraph style set object. + */ + IParaStyles GetParaStylesInDocument( ) const; + /** Retrieves a specific character style from the style set for the document. + @param pName The style name. + @return The character style object. + */ + ICharStyle GetCharStyle( const ATETextDOM::Unicode* pName) const; + /** Retrieves a specific paragraph style from the style set for the document. + @param pName The style name. + @return The paragraph style object. + */ + IParaStyle GetParaStyle( const ATETextDOM::Unicode* pName) const; + /** Retrieves the normal character style for the document. + @return The character style object. + */ + ICharStyle GetNormalCharStyle( ) const; + /** Retrieves the normal paragraph style for the document. + @return The paragraph style object. + */ + IParaStyle GetNormalParaStyle( ) const; + /** Sets the normal character style for the document to the + application default. + @return Nothing. + */ + void ResetNormalCharStyle( ); + /** Sets the normal paragraph style for the document to the + application default. + @return Nothing. + */ + void ResetNormalParaStyle( ); + + /** Creates a new, empty character style and adds it to the style set for the document. + @param pName The style name. + @return The character style object, or a null object if a style with + this name already exists, or if the name is an empty string. If + no style is created, the document style set remains unchanged. + */ + ICharStyle CreateCharStyle( const ATETextDOM::Unicode* pName); + /** Creates a new, empty paragraph style and adds it to the style set for the document. + @param pName The style name. + @return The paragraph style object, or a null object if a style with + this name already exists, or if the name is an empty string. If + no style is created, the document style set remains unchanged. + */ + IParaStyle CreateParaStyle( const ATETextDOM::Unicode* pName); + /** Creates a new character style with specified features + and adds it to the style set for the document. + @param pName The style name. + @param pFeatures The feature set for the new style. + @return The character style object, or a null object if a style with + this name already exists, or if the name is an empty string. If + no style is created, the document style set remains unchanged. + */ + ICharStyle CreateCharStyleWithFeatures( const ATETextDOM::Unicode* pName, ICharFeatures pFeatures); + /** Creates a new paragraph style with specified features + and adds it to the style set for the document. + @param pName The style name. + @param pFeatures The feature set for the new style. + @return The paragraph style object, or a null object if a style with + this name already exists, or if the name is an empty string. If + no style is created, the document style set remains unchanged. + */ + IParaStyle CreateParaStyleWithFeatures( const ATETextDOM::Unicode* pName, IParaFeatures pFeatures); + + /** Removes a character style from the style set for the document. + @param pName The style name. + @return True if a style with this name is removed, false if no style + with this name is in the document, or if the name is an empty string. + */ + bool RemoveCharStyle( const ATETextDOM::Unicode* pName); + /** Removes a paragraph style from the style set for the document. + @param pName The style name. + @return True if a style with this name is removed, false if no style + with this name is in the document, or if the name is an empty string. + */ + bool RemoveParaStyle( const ATETextDOM::Unicode* pName); + + /** Imports a set of character styles into this document + from another resource set. + @param pSrcResources The source text-resources object. + @return Nothing. + */ + void ImportCharStyles( ITextResources pSrcResources); + /** Imports a set of paragraph styles into this document + from another resource set. + @param pSrcResources The source text-resources object. + @return Nothing. + */ + void ImportParaStyles( ITextResources pSrcResources); + + /** Turns smart-quotes on or off for this document. + @param smartQuotesAreOn True to turn smart-quotes on, false to turn them off. + @return Nothing + */ + void SetUseSmartQuotes( bool smartQuotesAreOn); + /** Sets the smart-quotes double-quote character codes for a specific language. + @param openQuote The code to use for opening double-quote. + @param closeQuote The code to use for opening double-quote. + @param language The language in which to use these codes. + @return Nothing + */ + void SetSmartDoubleQuoteCharacters( ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); + /** Sets the smart-quotes single-quote character codes for a specific language. + @param openQuote The code to use for opening single-quote. + @param closeQuote The code to use for opening single-quote. + @param language The language in which to use these codes. + @return Nothing + */ + void SetSmartSingleQuoteCharacters( ATETextDOM::Unicode openQuote, ATETextDOM::Unicode closeQuote, Language language); + /** Reports whether smart-quotes are on for this document. + @return True if smart-quotes are on. + */ + bool UseSmartQuotes( ); + /** Retrieves the smart-quotes double-quote character codes for a specific language. + @param openQuote [out] A buffer in which to return the code used for opening double-quote. + @param closeQuote [out] A buffer in which to return the code used for opening double-quote. + @param language The language for which to get codes. + @return Nothing + */ + void GetSmartDoubleQuoteCharacters( ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); + /** Retrieves the smart-quotes single-quote character codes for a specific language. + @param openQuote [out] A buffer in which to return the code used for opening single-quote. + @param closeQuote [out] A buffer in which to return the code used for opening single-quote. + @param language The language for which to get codes. + @return Nothing + */ + void GetSmartSingleQuoteCharacters( ATETextDOM::Unicode* openQuote, ATETextDOM::Unicode* closeQuote, Language language); + + /** Retrieves the local overrides (character features) from the insertion + attributes, saved from the most recent text selection or attribute change to text. + @return The character features object. + */ + ICharFeatures GetInsertionCharFeatures( ) const; + /** Retrieves the character style from the insertion + attributes, saved from the most recent text selection or attribute change to text. + @return The character style object. + */ + ICharStyle GetInsertionCharStyle( ) const; + /** Sets the character features and style for the current insertion attributes. + @param pFeatures The new character features object. + @param pStyleName The new style name. + @return Nothing + */ + void SetInsertionFeaturesAndStyle( const ICharFeatures& pFeatures, const ATETextDOM::Unicode* pStyleName); + + /** Retrieves the superscript size. + @return The size in document points. + */ + ATETextDOM::Real GetSuperscriptSize( ) const; + /** Sets the superscript size. + @param value The new size in document points. + @return Nothing + */ + void SetSuperscriptSize( ATETextDOM::Real value); + /** Retrieves the superscript position. + @return The position in document points and page coordinates. + */ + ATETextDOM::Real GetSuperscriptPosition( ) const; + /** Sets the superscript position. + @param value The new position in document points and page coordinates. + @return Nothing + */ + void SetSuperscriptPosition( ATETextDOM::Real value); + /** Retrieves the subscript size. + @return The size in document points. + */ + ATETextDOM::Real GetSubscriptSize( ) const; + /** Sets the supbscript size. + @param value The new size in document points. + @return Nothing + */ + void SetSubscriptSize( ATETextDOM::Real value); + /** Retrieves the subscript position. + @return The position in document points and page coordinates. + */ + ATETextDOM::Real GetSubscriptPosition( ) const; + /** Sets the subscript position. + @param value The new position in document points and page coordinates.Text that does not fit is truncated + @return Nothing + */ + void SetSubscriptPosition( ATETextDOM::Real value); + + /** Retrieves the small-cap size. + @return The size in document points. + */ + ATETextDOM::Real GetSmallCapSize( ) const; + /** Sets the small-cap size. + @param value The new size in document points. + @return Nothing + */ + void SetSmallCapSize( ATETextDOM::Real value); + + /** Reports whether hidden characters are shown. + @return True if hidden characters are shown. + */ + bool GetShowHiddenCharacters( ) const; + /** Turns show hidden characters on or off. + @param value True to show hidden characters, false to hide them. + */ + void SetShowHiddenCharacters( bool value); + + /** Retrieves the greeking threshhold. + @return The greeking threshhold in document points. + */ + ATETextDOM::Int32 GetGreekingSize( ) const; + /** Sets the greeking threshhold. + @param value The new threshhold in document points. + @return Nothing + */ + void SetGreekingSize( ATETextDOM::Int32 value); + + /** Reports whether substitute fonts are highlighted. + @return True if substitute fonts are highlighted. + */ + bool GetHighlightSubstituteFonts( ) const; + /** Turns highlighting of substitute fonts on or off. + @param value True to highlight substitute fonts, false to turn highlighting off. + */ + void SetHighlightSubstituteFonts( bool value); + /** Reports whether alternate glyphs are highlighted. + @return True if alternate glyphs are highlighted. + */ + bool GetHighlightAlternateGlyphs( ) const; + /** Turns highlighting of alternate glyphs on or off. + @param value True to highligh alternate glyphs, false to turn highlighting off. + */ + void SetHighlightAlternateGlyphs( bool value); + +}; + +////////////////////////////////////////////// +// --IVersionInfo-- +////////////////////////////////////////////// +/** This object encapsulates version information for + the Adobe Text Engine (ATE). +*/ +class IVersionInfo +{ +private: + VersionInfoRef fVersionInfo; +public: + /** Constructor + @return The new object. */ + IVersionInfo(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IVersionInfo(const IVersionInfo& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IVersionInfo& operator=(const IVersionInfo& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IVersionInfo& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IVersionInfo& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param versioninfo The C object. + @return The new C++ object. */ + explicit IVersionInfo(VersionInfoRef versioninfo); + /** Destructor */ + virtual ~IVersionInfo(); + /** Retrieves a reference to this object. + @return The object reference. */ + VersionInfoRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Retrieves the major version portion of the version number. + @return The major version value. */ + int GetMajorVersion( ); + /** Retrieves the minor version portion of the version number. + @return The minor version value. */ + int GetMinorVersion( ); + /** Retrieves the sub-minor version (patch) portion of the version number. + @return The sub-minor version value. */ + int GetSubMinorVersion( ); + + /** Retrieves the version number as a string of UTF-16 characters. + For example: + @code + ASUTF16 versionString[256]; + GetVersionAsUTF16(versionString , 256); + @endcode + @param versionString [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + */ + int GetVersionAsUTF16( ASUTF16* versionString, int maxLength); + +}; + +////////////////////////////////////////////// +// --IArrayApplicationPaintRef-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of application paint + objects, which encapsulate Illustrator-specific painting + of fill and stroke for text, as defined by the \c #AIATEPaintSuite. + @see \c IApplicationPaint + */ + +class IArrayApplicationPaintRef +{ +private: + ArrayApplicationPaintRefRef fArrayApplicationPaintRef; +public: + /** Constructor + @return The new object. */ + IArrayApplicationPaintRef(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayApplicationPaintRef(const IArrayApplicationPaintRef& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayApplicationPaintRef& operator=(const IArrayApplicationPaintRef& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayApplicationPaintRef& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayApplicationPaintRef& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayapplicationpaintref The C object. + @return The new C++ object. */ + explicit IArrayApplicationPaintRef(ArrayApplicationPaintRefRef arrayapplicationpaintref); + /** Destructor */ + virtual ~IArrayApplicationPaintRef(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayApplicationPaintRefRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + IApplicationPaint GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + IApplicationPaint GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + IApplicationPaint Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayReal-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of real-number values. */ +class IArrayReal +{ +private: + ArrayRealRef fArrayReal; +public: + /** Constructor + @return The new object. */ + IArrayReal(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayReal(const IArrayReal& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayReal& operator=(const IArrayReal& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayReal& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayReal& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayreal The C object. + @return The new C++ object. */ + explicit IArrayReal(ArrayRealRef arrayreal); + /** Destructor */ + virtual ~IArrayReal(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayRealRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + ATETextDOM::Real GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + ATETextDOM::Real GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + ATETextDOM::Real Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayBool-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of boolean values. */ +class IArrayBool +{ +private: + ArrayBoolRef fArrayBool; +public: + /** Constructor + @return The new object. */ + IArrayBool(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayBool(const IArrayBool& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayBool& operator=(const IArrayBool& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayBool& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayBool& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraybool The C object. + @return The new C++ object. */ + explicit IArrayBool(ArrayBoolRef arraybool); + /** Destructor */ + virtual ~IArrayBool(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayBoolRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + bool GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + bool GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + bool Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayInteger-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of integer values. */ +class IArrayInteger +{ +private: + ArrayIntegerRef fArrayInteger; +public: + /** Constructor + @return The new object. */ + IArrayInteger(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayInteger(const IArrayInteger& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayInteger& operator=(const IArrayInteger& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayInteger& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayInteger& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayinteger The C object. + @return The new C++ object. */ + explicit IArrayInteger(ArrayIntegerRef arrayinteger); + /** Destructor */ + virtual ~IArrayInteger(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayIntegerRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + ATETextDOM::Int32 GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + ATETextDOM::Int32 GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + ATETextDOM::Int32 Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayLineCapType-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of line-cap type values. + See \c #LineCapType. */ +class IArrayLineCapType +{ +private: + ArrayLineCapTypeRef fArrayLineCapType; +public: + /** Constructor + @return The new object. */ + IArrayLineCapType(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayLineCapType(const IArrayLineCapType& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayLineCapType& operator=(const IArrayLineCapType& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayLineCapType& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayLineCapType& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraylinecaptype The C object. + @return The new C++ object. */ + explicit IArrayLineCapType(ArrayLineCapTypeRef arraylinecaptype); + /** Destructor */ + virtual ~IArrayLineCapType(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayLineCapTypeRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + LineCapType GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + LineCapType GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + LineCapType Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayFigureStyle-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of figure style values. + See \c #FigureStyle. */ +class IArrayFigureStyle +{ +private: + ArrayFigureStyleRef fArrayFigureStyle; +public: + /** Constructor + @return The new object. */ + IArrayFigureStyle(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayFigureStyle(const IArrayFigureStyle& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayFigureStyle& operator=(const IArrayFigureStyle& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayFigureStyle& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayFigureStyle& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayfigurestyle The C object. + @return The new C++ object. */ + explicit IArrayFigureStyle(ArrayFigureStyleRef arrayfigurestyle); + /** Destructor */ + virtual ~IArrayFigureStyle(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayFigureStyleRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + FigureStyle GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + FigureStyle GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + FigureStyle Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayLineJoinType-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of line-join type values. + See \c #LineJoinType. */ +class IArrayLineJoinType +{ +private: + ArrayLineJoinTypeRef fArrayLineJoinType; +public: + /** Constructor + @return The new object. */ + IArrayLineJoinType(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayLineJoinType(const IArrayLineJoinType& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayLineJoinType& operator=(const IArrayLineJoinType& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayLineJoinType& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayLineJoinType& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraylinejointype The C object. + @return The new C++ object. */ + explicit IArrayLineJoinType(ArrayLineJoinTypeRef arraylinejointype); + /** Destructor */ + virtual ~IArrayLineJoinType(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayLineJoinTypeRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + LineJoinType GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + LineJoinType GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + LineJoinType Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayWariChuJustification-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of WariChu justification values. + See \c #WariChuJustification. */ +class IArrayWariChuJustification +{ +private: + ArrayWariChuJustificationRef fArrayWariChuJustification; +public: + /** Constructor + @return The new object. */ + IArrayWariChuJustification(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayWariChuJustification(const IArrayWariChuJustification& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayWariChuJustification& operator=(const IArrayWariChuJustification& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayWariChuJustification& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayWariChuJustification& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraywarichujustification The C object. + @return The new C++ object. */ + explicit IArrayWariChuJustification(ArrayWariChuJustificationRef arraywarichujustification); + /** Destructor */ + virtual ~IArrayWariChuJustification(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayWariChuJustificationRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + WariChuJustification GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + WariChuJustification GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + WariChuJustification Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayStyleRunAlignment-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of style-run alignment values. + See \c #StyleRunAlignment. */ +class IArrayStyleRunAlignment +{ +private: + ArrayStyleRunAlignmentRef fArrayStyleRunAlignment; +public: + /** Constructor + @return The new object. */ + IArrayStyleRunAlignment(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayStyleRunAlignment(const IArrayStyleRunAlignment& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayStyleRunAlignment& operator=(const IArrayStyleRunAlignment& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayStyleRunAlignment& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayStyleRunAlignment& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraystylerunalignment The C object. + @return The new C++ object. */ + explicit IArrayStyleRunAlignment(ArrayStyleRunAlignmentRef arraystylerunalignment); + /** Destructor */ + virtual ~IArrayStyleRunAlignment(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayStyleRunAlignmentRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + StyleRunAlignment GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + StyleRunAlignment GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + StyleRunAlignment Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayAutoKernType-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of automatic kern type values. + See \c #AutoKernType. */ +class IArrayAutoKernType +{ +private: + ArrayAutoKernTypeRef fArrayAutoKernType; +public: + /** Constructor + @return The new object. */ + IArrayAutoKernType(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayAutoKernType(const IArrayAutoKernType& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayAutoKernType& operator=(const IArrayAutoKernType& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayAutoKernType& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayAutoKernType& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayautokerntype The C object. + @return The new C++ object. */ + explicit IArrayAutoKernType(ArrayAutoKernTypeRef arrayautokerntype); + /** Destructor */ + virtual ~IArrayAutoKernType(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayAutoKernTypeRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + AutoKernType GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + AutoKernType GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + AutoKernType Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayBaselineDirection-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of baseline direction values. + See \c #BaselineDirection. */ +class IArrayBaselineDirection +{ +private: + ArrayBaselineDirectionRef fArrayBaselineDirection; +public: + /** Constructor + @return The new object. */ + IArrayBaselineDirection(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayBaselineDirection(const IArrayBaselineDirection& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayBaselineDirection& operator=(const IArrayBaselineDirection& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayBaselineDirection& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayBaselineDirection& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraybaselinedirection The C object. + @return The new C++ object. */ + explicit IArrayBaselineDirection(ArrayBaselineDirectionRef arraybaselinedirection); + /** Destructor */ + virtual ~IArrayBaselineDirection(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayBaselineDirectionRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + BaselineDirection GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + BaselineDirection GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + BaselineDirection Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayLanguage-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of language values. + See \c #Language. */ +class IArrayLanguage +{ +private: + ArrayLanguageRef fArrayLanguage; +public: + /** Constructor + @return The new object. */ + IArrayLanguage(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayLanguage(const IArrayLanguage& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayLanguage& operator=(const IArrayLanguage& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayLanguage& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayLanguage& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraylanguage The C object. + @return The new C++ object. */ + explicit IArrayLanguage(ArrayLanguageRef arraylanguage); + /** Destructor */ + virtual ~IArrayLanguage(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayLanguageRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + Language GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + Language GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + Language Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayFontCapsOption-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of font caps option values. + See \c #FontCapsOption. */ +class IArrayFontCapsOption +{ +private: + ArrayFontCapsOptionRef fArrayFontCapsOption; +public: + /** Constructor + @return The new object. */ + IArrayFontCapsOption(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayFontCapsOption(const IArrayFontCapsOption& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayFontCapsOption& operator=(const IArrayFontCapsOption& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayFontCapsOption& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayFontCapsOption& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayfontcapsoption The C object. + @return The new C++ object. */ + explicit IArrayFontCapsOption(ArrayFontCapsOptionRef arrayfontcapsoption); + /** Destructor */ + virtual ~IArrayFontCapsOption(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayFontCapsOptionRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + FontCapsOption GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + FontCapsOption GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + FontCapsOption Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayFontBaselineOption-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of font baseline option values. + See \c #FontBaselineOption. */ +class IArrayFontBaselineOption +{ +private: + ArrayFontBaselineOptionRef fArrayFontBaselineOption; +public: + /** Constructor + @return The new object. */ + IArrayFontBaselineOption(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayFontBaselineOption(const IArrayFontBaselineOption& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayFontBaselineOption& operator=(const IArrayFontBaselineOption& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayFontBaselineOption& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayFontBaselineOption& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayfontbaselineoption The C object. + @return The new C++ object. */ + explicit IArrayFontBaselineOption(ArrayFontBaselineOptionRef arrayfontbaselineoption); + /** Destructor */ + virtual ~IArrayFontBaselineOption(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayFontBaselineOptionRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + FontBaselineOption GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + FontBaselineOption GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + FontBaselineOption Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayFontOpenTypePositionOption-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of font OpenType position option values. + See \c #FontOpenTypePositionOption. */ +class IArrayFontOpenTypePositionOption +{ +private: + ArrayFontOpenTypePositionOptionRef fArrayFontOpenTypePositionOption; +public: + /** Constructor + @return The new object. */ + IArrayFontOpenTypePositionOption(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayFontOpenTypePositionOption(const IArrayFontOpenTypePositionOption& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayFontOpenTypePositionOption& operator=(const IArrayFontOpenTypePositionOption& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayFontOpenTypePositionOption& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayFontOpenTypePositionOption& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayfontopentypepositionoption The C object. + @return The new C++ object. */ + explicit IArrayFontOpenTypePositionOption(ArrayFontOpenTypePositionOptionRef arrayfontopentypepositionoption); + /** Destructor */ + virtual ~IArrayFontOpenTypePositionOption(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayFontOpenTypePositionOptionRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + FontOpenTypePositionOption GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + FontOpenTypePositionOption GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + FontOpenTypePositionOption Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayUnderlinePosition-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of underline position values. + See \c #UnderlinePosition. */ +class IArrayUnderlinePosition +{ +private: + ArrayUnderlinePositionRef fArrayUnderlinePosition; +public: + /** Constructor + @return The new object. */ + IArrayUnderlinePosition(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayUnderlinePosition(const IArrayUnderlinePosition& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayUnderlinePosition& operator=(const IArrayUnderlinePosition& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayUnderlinePosition& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayUnderlinePosition& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayunderlineposition The C object. + @return The new C++ object. */ + explicit IArrayUnderlinePosition(ArrayUnderlinePositionRef arrayunderlineposition); + /** Destructor */ + virtual ~IArrayUnderlinePosition(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayUnderlinePositionRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + UnderlinePosition GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + UnderlinePosition GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + UnderlinePosition Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayStrikethroughPosition-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of strikethrough position values. + See \c #StrikethroughPosition. */ +class IArrayStrikethroughPosition +{ +private: + ArrayStrikethroughPositionRef fArrayStrikethroughPosition; +public: + /** Constructor + @return The new object. */ + IArrayStrikethroughPosition(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayStrikethroughPosition(const IArrayStrikethroughPosition& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayStrikethroughPosition& operator=(const IArrayStrikethroughPosition& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayStrikethroughPosition& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayStrikethroughPosition& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraystrikethroughposition The C object. + @return The new C++ object. */ + explicit IArrayStrikethroughPosition(ArrayStrikethroughPositionRef arraystrikethroughposition); + /** Destructor */ + virtual ~IArrayStrikethroughPosition(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayStrikethroughPositionRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + StrikethroughPosition GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + StrikethroughPosition GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + StrikethroughPosition Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayParagraphJustification-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of paragraph justification values. + See \c #ParagraphJustification. */ +class IArrayParagraphJustification +{ +private: + ArrayParagraphJustificationRef fArrayParagraphJustification; +public: + /** Constructor + @return The new object. */ + IArrayParagraphJustification(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayParagraphJustification(const IArrayParagraphJustification& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayParagraphJustification& operator=(const IArrayParagraphJustification& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayParagraphJustification& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayParagraphJustification& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayparagraphjustification The C object. + @return The new C++ object. */ + explicit IArrayParagraphJustification(ArrayParagraphJustificationRef arrayparagraphjustification); + /** Destructor */ + virtual ~IArrayParagraphJustification(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayParagraphJustificationRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + ParagraphJustification GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + ParagraphJustification GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + ParagraphJustification Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayArrayReal-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of arrays of real-number values. */ +class IArrayArrayReal +{ +private: + ArrayArrayRealRef fArrayArrayReal; +public: + /** Constructor + @return The new object. */ + IArrayArrayReal(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayArrayReal(const IArrayArrayReal& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayArrayReal& operator=(const IArrayArrayReal& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayArrayReal& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayArrayReal& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayarrayreal The C object. + @return The new C++ object. */ + explicit IArrayArrayReal(ArrayArrayRealRef arrayarrayreal); + /** Destructor */ + virtual ~IArrayArrayReal(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayArrayRealRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of member arrays. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member array value. */ + IArrayReal GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member array value. */ + IArrayReal GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member array value. + */ + IArrayReal Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayBurasagariType-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of Burasagari type values. + See \c #BurasagariType. */ +class IArrayBurasagariType +{ +private: + ArrayBurasagariTypeRef fArrayBurasagariType; +public: + /** Constructor + @return The new object. */ + IArrayBurasagariType(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayBurasagariType(const IArrayBurasagariType& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayBurasagariType& operator=(const IArrayBurasagariType& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayBurasagariType& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayBurasagariType& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayburasagaritype The C object. + @return The new C++ object. */ + explicit IArrayBurasagariType(ArrayBurasagariTypeRef arrayburasagaritype); + /** Destructor */ + virtual ~IArrayBurasagariType(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayBurasagariTypeRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + BurasagariType GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + BurasagariType GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + BurasagariType Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayPreferredKinsokuOrder-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of preferred Kinsoku order values. + See \c #PreferredKinsokuOrder. */ +class IArrayPreferredKinsokuOrder +{ +private: + ArrayPreferredKinsokuOrderRef fArrayPreferredKinsokuOrder; +public: + /** Constructor + @return The new object. */ + IArrayPreferredKinsokuOrder(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayPreferredKinsokuOrder(const IArrayPreferredKinsokuOrder& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayPreferredKinsokuOrder& operator=(const IArrayPreferredKinsokuOrder& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayPreferredKinsokuOrder& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayPreferredKinsokuOrder& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraypreferredkinsokuorder The C object. + @return The new C++ object. */ + explicit IArrayPreferredKinsokuOrder(ArrayPreferredKinsokuOrderRef arraypreferredkinsokuorder); + /** Destructor */ + virtual ~IArrayPreferredKinsokuOrder(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayPreferredKinsokuOrderRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + PreferredKinsokuOrder GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + PreferredKinsokuOrder GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + PreferredKinsokuOrder Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayKinsokuRef-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of Kinsoku objects. */ +class IArrayKinsokuRef +{ +private: + ArrayKinsokuRefRef fArrayKinsokuRef; +public: + /** Constructor + @return The new object. */ + IArrayKinsokuRef(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayKinsokuRef(const IArrayKinsokuRef& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayKinsokuRef& operator=(const IArrayKinsokuRef& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayKinsokuRef& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayKinsokuRef& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraykinsokuref The C object. + @return The new C++ object. */ + explicit IArrayKinsokuRef(ArrayKinsokuRefRef arraykinsokuref); + /** Destructor */ + virtual ~IArrayKinsokuRef(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayKinsokuRefRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + IKinsoku GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + IKinsoku GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + IKinsoku Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayListStyleRef-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of ListStyle objects. */ +class IArrayListStyleRef +{ +private: + ArrayListStyleRefRef fArrayListStyleRef; +public: + /** Constructor + @return The new object. */ + IArrayListStyleRef(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayListStyleRef(const IArrayListStyleRef& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayListStyleRef& operator=(const IArrayListStyleRef& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayListStyleRef& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayListStyleRef& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayListStyleref The C object. + @return The new C++ object. */ + explicit IArrayListStyleRef(ArrayListStyleRefRef arrayListStyleref); + /** Destructor */ + virtual ~IArrayListStyleRef(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayListStyleRefRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + IListStyle GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + IListStyle GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + IListStyle Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayListStyleSetRef-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of ListStyle set objects. */ +class IArrayListStyleSetRef +{ +private: + ArrayListStyleSetRefRef fArrayListStyleSetRef; +public: + /** Constructor + @return The new object. */ + IArrayListStyleSetRef(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayListStyleSetRef(const IArrayListStyleSetRef& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayListStyleSetRef& operator=(const IArrayListStyleSetRef& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayListStyleSetRef& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayListStyleSetRef& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayListStylesetref The C object. + @return The new C++ object. */ + explicit IArrayListStyleSetRef(ArrayListStyleSetRefRef arrayListStylesetref); + /** Destructor */ + virtual ~IArrayListStyleSetRef(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayListStyleSetRefRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + IListStyleSet GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + IListStyleSet GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + IListStyleSet Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayMojiKumiRef-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of MojiKumi objects. */ +class IArrayMojiKumiRef +{ +private: + ArrayMojiKumiRefRef fArrayMojiKumiRef; +public: + /** Constructor + @return The new object. */ + IArrayMojiKumiRef(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayMojiKumiRef(const IArrayMojiKumiRef& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayMojiKumiRef& operator=(const IArrayMojiKumiRef& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayMojiKumiRef& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayMojiKumiRef& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraymojikumiref The C object. + @return The new C++ object. */ + explicit IArrayMojiKumiRef(ArrayMojiKumiRefRef arraymojikumiref); + /** Destructor */ + virtual ~IArrayMojiKumiRef(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayMojiKumiRefRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + IMojiKumi GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + IMojiKumi GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + IMojiKumi Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayMojiKumiSetRef-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of MojiKumi set objects. */ +class IArrayMojiKumiSetRef +{ +private: + ArrayMojiKumiSetRefRef fArrayMojiKumiSetRef; +public: + /** Constructor + @return The new object. */ + IArrayMojiKumiSetRef(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayMojiKumiSetRef(const IArrayMojiKumiSetRef& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayMojiKumiSetRef& operator=(const IArrayMojiKumiSetRef& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayMojiKumiSetRef& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayMojiKumiSetRef& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraymojikumisetref The C object. + @return The new C++ object. */ + explicit IArrayMojiKumiSetRef(ArrayMojiKumiSetRefRef arraymojikumisetref); + /** Destructor */ + virtual ~IArrayMojiKumiSetRef(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayMojiKumiSetRefRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + IMojiKumiSet GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + IMojiKumiSet GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + IMojiKumiSet Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayTabStopsRef-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of tab-stops objects. */ +class IArrayTabStopsRef +{ +private: + ArrayTabStopsRefRef fArrayTabStopsRef; +public: + /** Constructor + @return The new object. */ + IArrayTabStopsRef(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayTabStopsRef(const IArrayTabStopsRef& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayTabStopsRef& operator=(const IArrayTabStopsRef& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayTabStopsRef& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayTabStopsRef& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraytabstopsref The C object. + @return The new C++ object. */ + explicit IArrayTabStopsRef(ArrayTabStopsRefRef arraytabstopsref); + /** Destructor */ + virtual ~IArrayTabStopsRef(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayTabStopsRefRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + ITabStops GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + ITabStops GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + ITabStops Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayLeadingType-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of preferred leading type values. + See \c #LeadingType. */ +class IArrayLeadingType +{ +private: + ArrayLeadingTypeRef fArrayLeadingType; +public: + /** Constructor + @return The new object. */ + IArrayLeadingType(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayLeadingType(const IArrayLeadingType& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayLeadingType& operator=(const IArrayLeadingType& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayLeadingType& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayLeadingType& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayleadingtype The C object. + @return The new C++ object. */ + explicit IArrayLeadingType(ArrayLeadingTypeRef arrayleadingtype); + /** Destructor */ + virtual ~IArrayLeadingType(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayLeadingTypeRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + LeadingType GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + LeadingType GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + LeadingType Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayFontRef-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of font objects. */ +class IArrayFontRef +{ +private: + ArrayFontRefRef fArrayFontRef; +public: + /** Constructor + @return The new object. */ + IArrayFontRef(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayFontRef(const IArrayFontRef& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayFontRef& operator=(const IArrayFontRef& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayFontRef& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayFontRef& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayfontref The C object. + @return The new C++ object. */ + explicit IArrayFontRef(ArrayFontRefRef arrayfontref); + /** Destructor */ + virtual ~IArrayFontRef(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayFontRefRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + IFont GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + IFont GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + IFont Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayGlyphID-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of glyph identifier objects. */ +class IArrayGlyphID +{ +private: + ArrayGlyphIDRef fArrayGlyphID; +public: + /** Constructor + @return The new object. */ + IArrayGlyphID(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayGlyphID(const IArrayGlyphID& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayGlyphID& operator=(const IArrayGlyphID& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayGlyphID& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayGlyphID& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayglyphid The C object. + @return The new C++ object. */ + explicit IArrayGlyphID(ArrayGlyphIDRef arrayglyphid); + /** Destructor */ + virtual ~IArrayGlyphID(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayGlyphIDRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + ATEGlyphID GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + ATEGlyphID GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member object. + */ + ATEGlyphID Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayRealPoint-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of point position values + with real-number coordinates. */ +class IArrayRealPoint +{ +private: + ArrayRealPointRef fArrayRealPoint; +public: + /** Constructor + @return The new object. */ + IArrayRealPoint(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayRealPoint(const IArrayRealPoint& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayRealPoint& operator=(const IArrayRealPoint& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayRealPoint& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayRealPoint& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayrealpoint The C object. + @return The new C++ object. */ + explicit IArrayRealPoint(ArrayRealPointRef arrayrealpoint); + /** Destructor */ + virtual ~IArrayRealPoint(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayRealPointRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + ATETextDOM::RealPoint GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + ATETextDOM::RealPoint GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + ATETextDOM::RealPoint Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayRealMatrix-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of transformation matrix values. */ +class IArrayRealMatrix +{ +private: + ArrayRealMatrixRef fArrayRealMatrix; +public: + /** Constructor + @return The new object. */ + IArrayRealMatrix(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayRealMatrix(const IArrayRealMatrix& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayRealMatrix& operator=(const IArrayRealMatrix& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayRealMatrix& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayRealMatrix& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayrealmatrix The C object. + @return The new C++ object. */ + explicit IArrayRealMatrix(ArrayRealMatrixRef arrayrealmatrix); + /** Destructor */ + virtual ~IArrayRealMatrix(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayRealMatrixRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + ATETextDOM::RealMatrix GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + ATETextDOM::RealMatrix GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + ATETextDOM::RealMatrix Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayLine-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of line objects + where each entry is the start and end point of a 2D line. +*/ +class IArrayLine +{ +private: + ArrayLineRef fArrayLine; +public: + /** Constructor. + @return The new object. */ + IArrayLine(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayLine(const IArrayLine& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayLine& operator=(const IArrayLine& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayLine& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayLine& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param ArrayLineRef The C object. + @return The new C++ object. */ + explicit IArrayLine(ArrayLineRef ArrayLineRef); + /** Destructor */ + virtual ~IArrayLine(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayLineRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves the line start and end points of a 2Dline in this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @param lineStart [out] the ATETextDOM::RealPoint object defining the start of the line. + @param lineEnd [out] the ATETextDOM::RealPoint object defining the end of the line. + @return Nothing. + */ + void Item( ATETextDOM::Int32 index, ATETextDOM::FloatPoint* lineStart, ATETextDOM::FloatPoint* lineEnd) const; +}; + +////////////////////////////////////////////// +// --IArrayComposerEngine-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of composer engine objects. +*/ +class IArrayComposerEngine +{ +private: + ArrayComposerEngineRef fArrayComposerEngine; +public: + /** Constructor. + @return The new object. */ + IArrayComposerEngine(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayComposerEngine(const IArrayComposerEngine& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayComposerEngine& operator=(const IArrayComposerEngine& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayComposerEngine& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayComposerEngine& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraycomposerengine The C object. + @return The new C++ object. */ + explicit IArrayComposerEngine(ArrayComposerEngineRef arraycomposerengine); + /** Destructor */ + virtual ~IArrayComposerEngine(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayComposerEngineRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + ComposerEngine GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + ComposerEngine GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + ComposerEngine Item( ATETextDOM::Int32 index) const; + +}; +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only +////////////////////////////////////////////// +// --IArrayParagraphDirection-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of paragraph direction objects. +*/ +class IArrayParagraphDirection +{ +private: + ArrayParagraphDirectionRef fArrayParagraphDirection; +public: + /** Constructor + @return The new object. */ + IArrayParagraphDirection(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayParagraphDirection(const IArrayParagraphDirection& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayParagraphDirection& operator=(const IArrayParagraphDirection& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayParagraphDirection& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayParagraphDirection& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayparagraphdirection The C object. + @return The new C++ object. */ + explicit IArrayParagraphDirection(ArrayParagraphDirectionRef arrayparagraphdirection); + /** Destructor */ + virtual ~IArrayParagraphDirection(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayParagraphDirectionRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + ParagraphDirection GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + ParagraphDirection GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + ParagraphDirection Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayJustificationMethod-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of justification method objects. +*/ +class IArrayJustificationMethod +{ +private: + ArrayJustificationMethodRef fArrayJustificationMethod; +public: + /** Constructor + @return The new object. */ + IArrayJustificationMethod(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayJustificationMethod(const IArrayJustificationMethod& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayJustificationMethod& operator=(const IArrayJustificationMethod& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayJustificationMethod& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayJustificationMethod& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arrayjustificationmethod The C object. + @return The new C++ object. */ + explicit IArrayJustificationMethod(ArrayJustificationMethodRef arrayjustificationmethod); + /** Destructor */ + virtual ~IArrayJustificationMethod(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayJustificationMethodRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + JustificationMethod GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + JustificationMethod GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + JustificationMethod Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayKashidaWidth-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of justification method objects. +*/ +class IArrayKashidaWidth +{ +private: + ArrayKashidaWidthRef fArrayKashidaWidth; +public: + /** Constructor + @return The new object. */ + IArrayKashidaWidth(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayKashidaWidth(const IArrayKashidaWidth& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayKashidaWidth& operator=(const IArrayKashidaWidth& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayKashidaWidth& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayKashidaWidth& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraykashidawidth The C object. + @return The new C++ object. */ + explicit IArrayKashidaWidth(ArrayKashidaWidthRef arraykashidawidth); + /** Destructor */ + virtual ~IArrayKashidaWidth(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayKashidaWidthRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + KashidaWidth GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + KashidaWidth GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + KashidaWidth Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayKashidas-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of kashidas objects. +*/ +class IArrayKashidas +{ +private: + ArrayKashidasRef fArrayKashidas; +public: + /** Constructor + @return The new object. */ + IArrayKashidas(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayKashidas(const IArrayKashidas& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayKashidas& operator=(const IArrayKashidas& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayKashidas& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayKashidas& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraykashidas The C object. + @return The new C++ object. */ + explicit IArrayKashidas(ArrayKashidasRef arraykashidas); + /** Destructor */ + virtual ~IArrayKashidas(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayKashidasRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + Kashidas GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + Kashidas GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + Kashidas Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayDirOverride-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of writing direction override objects. +*/ +class IArrayDirOverride +{ +private: + ArrayDirOverrideRef fArrayDirOverride; +public: + /** Constructor + @return The new object. */ + IArrayDirOverride(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayDirOverride(const IArrayDirOverride& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayDirOverride& operator=(const IArrayDirOverride& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayDirOverride& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayDirOverride& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraydiroverride The C object. + @return The new C++ object. */ + explicit IArrayDirOverride(ArrayDirOverrideRef arraydiroverride); + /** Destructor */ + virtual ~IArrayDirOverride(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayDirOverrideRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + DirOverride GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + DirOverride GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + DirOverride Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayDigitSet-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of digit set objects. +*/ +class IArrayDigitSet +{ +private: + ArrayDigitSetRef fArrayDigitSet; +public: + /** Constructor + @return The new object. */ + IArrayDigitSet(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayDigitSet(const IArrayDigitSet& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayDigitSet& operator=(const IArrayDigitSet& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayDigitSet& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayDigitSet& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraydigitset The C object. + @return The new C++ object. */ + explicit IArrayDigitSet(ArrayDigitSetRef arraydigitset); + /** Destructor */ + virtual ~IArrayDigitSet(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayDigitSetRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + DigitSet GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + DigitSet GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + DigitSet Item( ATETextDOM::Int32 index) const; + +}; + +////////////////////////////////////////////// +// --IArrayDiacVPos-- +////////////////////////////////////////////// +/** Provides access to an ordered collection of diacritics positioning objects. +*/ +class IArrayDiacVPos +{ +private: + ArrayDiacVPosRef fArrayDiacVPos; +public: + /** Constructor + @return The new object. */ + IArrayDiacVPos(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IArrayDiacVPos(const IArrayDiacVPos& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IArrayDiacVPos& operator=(const IArrayDiacVPos& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IArrayDiacVPos& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IArrayDiacVPos& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param arraydiacvpos The C object. + @return The new C++ object. */ + explicit IArrayDiacVPos(ArrayDiacVPosRef arraydiacvpos); + /** Destructor */ + virtual ~IArrayDiacVPos(); + /** Retrieves a reference to this object. + @return The object reference. */ + ArrayDiacVPosRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member value. */ + DiacVPos GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member value. */ + DiacVPos GetLast( ) const; + + // ======================================================================== + // METHODS + // ======================================================================== + + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param index The 0-based position index. + @return The member value. + */ + DiacVPos Item( ATETextDOM::Int32 index) const; + +}; +#endif + + +////////////////////////////////////////////// +// --ICharFeatures-- +////////////////////////////////////////////// + +/** This class encapsulates the complete set of character attributes that + can be applied to text. An object of this type is contained in an + \c ICharStyle object, and is returned from various methods that + query character features of text runs and text ranges. A paragraph + style can also have a default set of character features; see + \c IParaFeatures::GetDefaultCharFeatures(). + + Attribute values are inherited from the Normal style, and can be overridden + in a named style associated with the character, or at the local character level. + + A style or character can partially define attributes. Only those values + that are assigned override the inherited values. The constructor creates + an empty object, in which all attribute values are unassigned. + Setting a value causes it to be assigned, and clearing it causes + it to be unassigned. When you retrieve an attribute value, a boolean + return value, \c isAssigned, reports whether that attribute has a local + value in the queried object. + + @see \c ICharInspector + + */ +class ICharFeatures +{ +private: + CharFeaturesRef fCharFeatures; +public: + /** Constructor. The object is empty; that is, all + attribute values are unassigned. + @return The new object. */ + ICharFeatures(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICharFeatures(const ICharFeatures& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICharFeatures& operator=(const ICharFeatures& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICharFeatures& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICharFeatures& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param charfeatures The C object. + @return The new C++ object. */ + explicit ICharFeatures(CharFeaturesRef charfeatures); + /** Destructor */ + virtual ~ICharFeatures(); + /** Retrieves a reference to this object. + @return The object reference. */ + CharFeaturesRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Creates a duplicate of this object. + @return The new object. */ + ICharFeatures Clone( ) const; + + /////////////////////////////////////////////////////////////////////// + // GET PROPERTIES + /////////////////////////////////////////////////////////////////////// + + /** Retrieves the font attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The font object. */ + IFont GetFont( bool* isAssigned) const; + /** Retrieves the font size attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The font size in dcoument points. */ + ATETextDOM::Real GetFontSize( bool* isAssigned) const; + /** Retrieves the horizontal scale attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The scale value, where 1 is 100% */ + ATETextDOM::Real GetHorizontalScale( bool* isAssigned) const; + /** Retrieves the vertical scale attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The scale value, where 1 is 100%. */ + ATETextDOM::Real GetVerticalScale( bool* isAssigned) const; + /** Retrieves the automatic leading attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if automatic leading is on, false if it is off. */ + bool GetAutoLeading( bool* isAssigned) const; + /** Retrieves the leading attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The leading value in document points. */ + ATETextDOM::Real GetLeading( bool* isAssigned) const; + /** Retrieves the tracking attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The tracking value in document points. */ + ATETextDOM::Int32 GetTracking( bool* isAssigned) const; + /** Retrieves the baseline shift attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The baseline shift value in document points. */ + ATETextDOM::Real GetBaselineShift( bool* isAssigned) const; + /** Retrieves the character rotation attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The character rotation value in degrees. */ + ATETextDOM::Real GetCharacterRotation( bool* isAssigned) const; + /** Retrieves the automatic kerning type attribute of this character. + (The actual kerning value applies to character pairs rather than + individual characters, so is available through the \c ICharStyle.) + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The automatic kerning type constant. + @note Use \c IStory::GetKern( ) to get the kerning + value for a text range. */ + AutoKernType GetAutoKernType( bool* isAssigned) const; + + /** Retrieves the font caps option attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The font caps option constant. */ + FontCapsOption GetFontCapsOption( bool* isAssigned) const; + /** Retrieves the font baseline option attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The font baseline option constant. */ + FontBaselineOption GetFontBaselineOption( bool* isAssigned) const; + /** Retrieves the font OpenType position option attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The font OpenType position option constant. */ + FontOpenTypePositionOption GetFontOpenTypePositionOption( bool* isAssigned) const; + /** Retrieves the strikethrough position attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The strikethrough position constant. */ + StrikethroughPosition GetStrikethroughPosition( bool* isAssigned) const; + /** Retrieves the underline position attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The underline position constant. */ + UnderlinePosition GetUnderlinePosition( bool* isAssigned) const; + /** Retrieves the underline offset attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The underline offset value, in document points. */ + ATETextDOM::Real GetUnderlineOffset( bool* isAssigned) const; + // ------------------------------------------------------------------ + // OpenType settings + // ------------------------------------------------------------------ + /** Retrieves the OpenType ligature attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if ligature is on, false if it is off. */ + bool GetLigature( bool* isAssigned) const; + /** Retrieves the OpenType discretionary ligatures attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if discretionary ligatures are on, false if they are off. */ + bool GetDiscretionaryLigatures( bool* isAssigned) const; + /** Retrieves the OpenType context ligatures attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if context ligatures are on, false if they are off. */ + bool GetContextualLigatures( bool* isAssigned) const; + /** Retrieves the OpenType alternate ligatures attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if alternate ligatures are on, false if they are off. */ + bool GetAlternateLigatures( bool* isAssigned) const; + /** Retrieves the OpenType old-style attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if the character is old-style, false if it is not. */ + bool GetOldStyle( bool* isAssigned) const; + /** Retrieves the OpenType fractions attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if fractions are on, false if they are off. */ + bool GetFractions( bool* isAssigned) const; + /** Retrieves the OpenType ordinals attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if ordinals are on, false if they are off. */ + bool GetOrdinals( bool* isAssigned) const; + /** Retrieves the OpenType swash attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if swash is on, false if it is off. */ + bool GetSwash( bool* isAssigned) const; + /** Retrieves the OpenType titling attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if titling is on, false if it is off. */ + bool GetTitling( bool* isAssigned) const; + /** Retrieves the OpenType connection forms attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if connection forms are on, false if they are off. */ + bool GetConnectionForms( bool* isAssigned) const; + /** Retrieves the OpenType stylistic alternates attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if stylistic alternates are on, false if they are off. */ + bool GetStylisticAlternates( bool* isAssigned) const; + /** Retrieves the OpenType stylistic sets attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. */ + ATETextDOM::Int32 GetStylisticSets(bool* isAssigned) const; + /** Retrieves the OpenType ornaments attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if ornaments are on, false if they are off. */ + bool GetOrnaments( bool* isAssigned) const; + /** Retrieves the OpenType figure style attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The figure style constant. */ + FigureStyle GetFigureStyle( bool* isAssigned) const; + // ------------------------------------------------------------------ + // Japanese OpenType settings + // ------------------------------------------------------------------ + /** Retrieves the Japanese OpenType proportional metrics attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if proportional metrics are on, false if they are off. */ + bool GetProportionalMetrics( bool* isAssigned) const; + /** Retrieves the Japanese OpenType Kana attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if Kana is on, false if it is off. */ + bool GetKana( bool* isAssigned) const; + /** Retrieves the Japanese OpenType Ruby attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if Ruby is on, false if it is off. */ + bool GetRuby( bool* isAssigned) const; + /** Retrieves the Japanese OpenType italics attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if italics is on, false if it is off. */ + bool GetItalics( bool* isAssigned) const; + /** Retrieves the Japanese OpenType baseline direction attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The baseline direction constant. */ + BaselineDirection GetBaselineDirection( bool* isAssigned) const; + /** Retrieves the Japanese OpenType language attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The language constant. */ + Language GetLanguage( bool* isAssigned) const; + /** Retrieves the Japanese OpenType alternate feature attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The Japanese alternate feature constant. */ + JapaneseAlternateFeature GetJapaneseAlternateFeature( bool* isAssigned) const; + /** Retrieves the Japanese OpenType Tsume attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The Tsume value, in document points. */ + ATETextDOM::Real GetTsume( bool* isAssigned) const; + /** Retrieves the Japanese OpenType style run alignment attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The style run alignment constant. */ + StyleRunAlignment GetStyleRunAlignment( bool* isAssigned) const; + // ------------------------------------------------------------------ + // WariChu settings + // ------------------------------------------------------------------ + /** Retrieves the WariChu-enabled attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if WariChu is on, false if it is off. */ + bool GetWariChuEnabled( bool* isAssigned) const; + /** Retrieves the WariChu line count attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The WariChu line count value. */ + ATETextDOM::Int32 GetWariChuLineCount( bool* isAssigned) const; + /** Retrieves the WariChu line gap attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The WariChu line gap value. */ + ATETextDOM::Int32 GetWariChuLineGap( bool* isAssigned) const; + /** Retrieves the WariChu scale attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The WariChu scale factor, where 1 is 100% */ + ATETextDOM::Real GetWariChuScale( bool* isAssigned) const; + /** Retrieves the WariChu size attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The WariChu size in document points. */ + ATETextDOM::Real GetWariChuSize( bool* isAssigned) const; + /** Retrieves the WariChu widow amount attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The WariChu widow amount value. */ + ATETextDOM::Int32 GetWariChuWidowAmount( bool* isAssigned) const; + /** Retrieves the WariChu orphan amount attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The WariChu orphan amount value. */ + ATETextDOM::Int32 GetWariChuOrphanAmount( bool* isAssigned) const; + /** Retrieves the WariChu justification attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The WariChu justification constant. */ + WariChuJustification GetWariChuJustification( bool* isAssigned) const; + /** Retrieves the Tate Chu Yoko up-down adjustment attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The up-down adjustment value. */ + ATETextDOM::Int32 GetTCYUpDownAdjustment( bool* isAssigned) const; + /** Retrieves the Tate Chu Yoko right-left adjustment attribute of this character style. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The right-left adjustment value. */ + ATETextDOM::Int32 GetTCYLeftRightAdjustment( bool* isAssigned) const; + /** Retrieves the left Aki attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The left Aki value. */ + ATETextDOM::Real GetLeftAki( bool* isAssigned) const; + /** Retrieves the right Aki attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The right Aki value. */ + ATETextDOM::Real GetRightAki( bool* isAssigned) const; + //--------------------------------------------------------------- + // General settings + //--------------------------------------------------------------- + /** Retrieves the no-break attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if no-break is on, false if it is off. */ + bool GetNoBreak( bool* isAssigned) const; + /** Retrieves the fill color attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The paint object containing the fill color. */ + IApplicationPaint GetFillColor( bool* isAssigned) const; + /** Retrieves the stroke color attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The paint object containing the stroke color. */ + IApplicationPaint GetStrokeColor( bool* isAssigned) const; + /** Retrieves the fill attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if fill is on, false if it is off. */ + bool GetFill( bool* isAssigned) const; + /** Retrieves the fill visibilty attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if fill is visible, false if it is not. */ + bool GetFillVisible( bool* isAssigned) const; + /** Retrieves the stroke attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if stroke is on, false if it is off. */ + bool GetStroke( bool* isAssigned) const; + /** Retrieves the stroke visibility attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if stroke is visible, false if it is not. */ + bool GetStrokeVisible( bool* isAssigned) const; + /** Retrieves the fill-first attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if fill-first is on, false if it is off. */ + bool GetFillFirst( bool* isAssigned) const; + /** Retrieves the fill overprint attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if fill overprint is on, false if it is off. */ + bool GetFillOverPrint( bool* isAssigned) const; + /** Retrieves the stroke overprint attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if stroke overprint is on, false if it is off. */ + bool GetStrokeOverPrint( bool* isAssigned) const; + /** Retrieves the fill background color attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The paint object containing the fill color. */ + IApplicationPaint GetFillBackgroundColor( bool* isAssigned) const; + /** Retrieves the fill background attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if fill is on, false if it is off. */ + bool GetFillBackground( bool* isAssigned) const; + /** Retrieves the line cap attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The line cap type constant. */ + LineCapType GetLineCap( bool* isAssigned) const; + /** Retrieves the line join attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The line join type constant. */ + LineJoinType GetLineJoin( bool* isAssigned) const; + /** Retrieves the line width attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The line width value in document points. */ + ATETextDOM::Real GetLineWidth( bool* isAssigned) const; + /** Retrieves the miter limit attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The miter limit value in document points. */ + ATETextDOM::Real GetMiterLimit( bool* isAssigned) const; + /** Retrieves the line dash offset attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The line dash offset value in document points. */ + ATETextDOM::Real GetLineDashOffset( bool* isAssigned) const; + /** Retrieves the line dash array attribute of this character. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The line dash array object. */ + IArrayReal GetLineDashArray( bool* isAssigned) const; + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + // ------------------------------------------------------------------ + // Complex Script Settings + // ------------------------------------------------------------------ + + /** Retrieves the kashidas attribute of this character. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return The kashidas object. + */ + Kashidas GetKashidas( bool* isAssigned) const; + /** Retrieves the direction override attribute of this character. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return The direction override object. + */ + DirOverride GetDirOverride( bool* isAssigned) const; + /** Retrieves the digit set attribute of this character. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return The digit set object. + */ + DigitSet GetDigitSet( bool* isAssigned) const; + /** Retrieves the diacritics positioning attribute of this + character. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return The diacritics positioning object. + */ + DiacVPos GetDiacVPos( bool* isAssigned) const; + /** Retrieves the diacritics x offset attribute of this + character as a real number. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return diacritics x offset as a real number. + */ + ATETextDOM::Real GetDiacXOffset( bool* isAssigned) const; + /** Retrieves the diacritics y offset attribute of this + character as a real number. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return diacritics y offset as a real number. + */ + ATETextDOM::Real GetDiacYOffset( bool* isAssigned) const; + /** Retrieves the automatic diacritics y distance from baseline attribute of this character. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return True if automatic diacritics y distance from baseline is on, false if it is off. + */ + bool GetAutoMydfb( bool* isAssigned) const; + /** Retrieves the diacritics y distance from baseline attribute + of this character as a real number. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return diacritics y distance from baseline as a real number. + */ + ATETextDOM::Real GetMarkYDistFromBaseline( bool* isAssigned) const; + /** Retrieves the OpenType overlap swash attribute of + this character. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return True if overlap swash is on, false if it is off. + */ + bool GetOverlapSwash( bool* isAssigned) const; + /** Retrieves the justification alternates attribute of + this character. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return True if justification alternates is on, false if it is off. + */ + bool GetJustificationAlternates( bool* isAssigned) const; + /** Retrieves the stretched alternates attribute of this character. + @param isAssigned [out] a buffer in which to return + true if this attribute has a local value. + @return True if stretched alternates is on, false if it is off. + */ + bool GetStretchedAlternates( bool* isAssigned) const; +#endif + + /////////////////////////////////////////////////////////////////// + // SET PROPERTIES + //////////////////////////////////////////////////////////////// + + /** Sets the local font attribute for this character. + @param newVal The new font object. + @return Nothing. + */ + void SetFont( IFont newVal); + /** Sets the local font size attribute for this character. + @param newVal The new value, in the range [0.1..1296]. + @return Nothing. + */ + void SetFontSize( ATETextDOM::Real newVal); + /** Sets the local horizontal scale attribute for this character. + @param newVal The new scaling factor, in the range [0.1..100], where 1 is 100%. + @return Nothing. + */ + void SetHorizontalScale( ATETextDOM::Real newVal); + /** Sets the local vertical scale attribute for this character. + @param newVal The new scaling factor, in the range [0.1..100], where 1 is 100%. + @return Nothing. + */ + void SetVerticalScale( ATETextDOM::Real newVal); + /** Sets the local automatic leading attribute for this character. + @param newVal True to turn automatic leading on, false to turn it off. + @return Nothing. + */ + void SetAutoLeading( bool newVal); + /** Sets the local leading attribute for this character. + @param newVal The new leading value in document points. + @return Nothing. + */ + void SetLeading( ATETextDOM::Real newVal); + /** Sets the local tracking attribute for this character. + @param newVal The new tracking value in document points. + @return Nothing. + */ + void SetTracking( ATETextDOM::Int32 newVal); + /** Sets the local baseline shift attribute for this character. + @param newVal The new baseline shift value in document points. + @return Nothing. + */ + void SetBaselineShift( ATETextDOM::Real newVal); + /** Sets the local character rotation attribute for this character. + @param newVal The new rotation value in degrees. + @return Nothing. + */ + void SetCharacterRotation( ATETextDOM::Real newVal); + /** Sets the local automatic kerning type attribute for this character style. + This is not available for individual characters. + @param newVal The new automatic kerning type constant. + @return Nothing. + */ + void SetAutoKernType( AutoKernType newVal); + /** Sets the local font caps option attribute for this character style. + @param newVal The new font caps option constant. + @return Nothing. + */ + void SetFontCapsOption( FontCapsOption newVal); + /** Sets the local font baseline option attribute for this character style. + @param newVal The new font baseline option constant. + @return Nothing. + */ + void SetFontBaselineOption( FontBaselineOption newVal); + /** Sets the local font OpenType position option attribute for this character style. + @param newVal The new font OpenType position option constant. + @return Nothing. + */ + void SetFontOpenTypePositionOption( FontOpenTypePositionOption newVal); + /** Sets the local strikethrough position attribute for this character style. + @param newVal The new strikethrough position constant. + @return Nothing. + */ + void SetStrikethroughPosition( StrikethroughPosition newVal); + /** Sets the local underline position attribute for this character style. + @param newVal The new underline position constant. + @return Nothing. + */ + void SetUnderlinePosition( UnderlinePosition newVal); + /** Sets the local underline offset attribute for this character style. + @param newVal The new underline offset value, in document points. + @return Nothing. + */ + void SetUnderlineOffset( ATETextDOM::Real newVal); + // ------------------------------------------------------------------ + // OpenType settings + // ------------------------------------------------------------------ + /** Sets the local OpenType ligature attribute for this character style. + @param newVal The new underline offset value, in document points. + @return Nothing. + */ + void SetLigature( bool newVal); + /** Sets the local OpenType discretionary ligatures attribute for this character style. + @param newVal True to turn discretionary ligatures on, false to turn it off. + @return Nothing. + */ + void SetDiscretionaryLigatures( bool newVal); + /** Sets the local OpenType contextual ligatures attribute for this character style. + @param newVal True to turn contextual ligatures on, false to turn it off. + @return Nothing. + */ + void SetContextualLigatures( bool newVal); + /** Sets the local OpenType alternate ligatures attribute for this character style. + @param newVal True to turn alternate ligatures on, false to turn it off. + @return Nothing. + */ + void SetAlternateLigatures( bool newVal); + /** Sets the local OpenType old-style attribute for this character style. + @param newVal True to turn old-style on, false to turn it off. + @return Nothing. + */ + void SetOldStyle( bool newVal); + /** Sets the local OpenType fractions attribute for this character style. + @param newVal True to turn fractions on, false to turn it off. + @return Nothing. + */ + void SetFractions( bool newVal); + /** Sets the local OpenType ordinals attribute for this character style. + @param newVal True to turn ordinals on, false to turn it off. + @return Nothing. + */ + void SetOrdinals( bool newVal); + /** Sets the local OpenType swash attribute for this character style. + @param newVal True to turn swash on, false to turn it off. + @return Nothing. + */ + void SetSwash( bool newVal); + /** Sets the local OpenType titling attribute for this character style. + @param newVal True to turn titling on, false to turn it off. + @return Nothing. + */ + void SetTitling( bool newVal); + /** Sets the local OpenType connection forms attribute for this character style. + @param newVal True to turn connection forms on, false to turn it off. + @return Nothing. + */ + void SetConnectionForms( bool newVal); + /** Sets the local OpenType stylistic alternates attribute for this character style. + @param newVal True to turn stylistic alternates on, false to turn it off. + @return Nothing. + */ + void SetStylisticAlternates( bool newVal); + + /** Sets the local OpenType stylistic sets attributes for this character style. + */ + void SetStylisticSets(ATETextDOM::Int32 newVal); + /** Sets the local OpenType ornaments attribute for this character style. + @param newVal True to turn ornaments on, false to turn it off. + @return Nothing. + */ + void SetOrnaments( bool newVal); + /** Sets the local OpenType figure style attribute for this character style. + @param newVal The new figure style constant. + @return Nothing. + */ + void SetFigureStyle( FigureStyle newVal); + // ------------------------------------------------------------------ + // Japanese OpenType settings + // ------------------------------------------------------------------ + /** Sets the local Japanese OpenType proportional metrics attribute of this character. + @param newVal True to turn proportional metrics on, false to turn it off. + @return Nothing. */ + void SetProportionalMetrics( bool newVal); + /** Sets the local Japanese OpenType Kana attribute of this character. + @param newVal True to turn Kana on, false to turn it off. + @return Nothing. */ + void SetKana( bool newVal); + /** Sets the local Japanese OpenType italics attribute of this character. + @param newVal True to turn italics on, false to turn it off. + @return Nothing. */ + void SetItalics( bool newVal); + /** Sets the local Japanese OpenType Ruby attribute of this character. + @param newVal True to turn Ruby on, false to turn it off. + @return Nothing. */ + void SetRuby( bool newVal); + /** Sets the local Japanese OpenType baseline direction attribute of this character. + @param newVal The new baseline direction constant. + @return Nothing. */ + void SetBaselineDirection( BaselineDirection newVal); + /** Sets the local Japanese OpenType language attribute of this character. + @param newVal The new language constant. + @return Nothing. */ + void SetLanguage( Language newVal); + /** Sets the local Japanese OpenType Japanese alternate feature attribute of this character. + @param newVal The new Japanese alternate feature constant. + @return Nothing. */ + void SetJapaneseAlternateFeature( JapaneseAlternateFeature newVal); + /** Sets the local Japanese OpenType Tsume attribute of this character. + @param newVal The new Tsume value in document points. + @return Nothing. */ + void SetTsume( ATETextDOM::Real newVal); + /** Sets the local Japanese OpenType style run alignment attribute of this character. + @param newVal The new style run alignment constant. + @return Nothing. */ + void SetStyleRunAlignment( StyleRunAlignment newVal); + // ------------------------------------------------------------------ + // WariChu settings + // ------------------------------------------------------------------ + /** Sets the local WariChu enabled attribute of this character. + @param newVal True to turn enabling on, false to turn it off. + @return Nothing. */ + void SetWariChuEnabled( bool newVal); + /** Sets the local WariChu line count attribute of this character. + @param newVal The new line count value. + @return Nothing. */ + void SetWariChuLineCount( ATETextDOM::Int32 newVal); + /** Sets the local WariChu line gap attribute of this character. + @param newVal The new line gap value. + @return Nothing. */ + void SetWariChuLineGap( ATETextDOM::Int32 newVal); + /** Sets the local WariChu scale attribute of this character. + @param newVal The new scaling factor, where 1 is 100%. + @return Nothing. */ + void SetWariChuScale( ATETextDOM::Real newVal); + /** Sets the local WariChu size attribute of this character. + @param newVal The new size value in document points. + @return Nothing. */ + void SetWariChuSize( ATETextDOM::Real newVal); + /** Sets the local WariChu widow amount attribute of this character. + @param newVal The new widow amount value. + @return Nothing. */ + void SetWariChuWidowAmount( ATETextDOM::Int32 newVal); + /** Sets the local WariChu orphan amount attribute of this character. + @param newVal The new orphan amount value. + @return Nothing. */ + void SetWariChuOrphanAmount( ATETextDOM::Int32 newVal); + /** Sets the local WariChu justification attribute of this character. + @param newVal The new justification constant. + @return Nothing. */ + void SetWariChuJustification( WariChuJustification newVal); + /** Sets the local Tate Chu Yoko up-down adjustment attribute of this character. + @param newVal The new adjustment value. + @return Nothing. */ + void SetTCYUpDownAdjustment( ATETextDOM::Int32 newVal); + /** Sets the local Tate Chu Yoko right-left adjustment attribute of this character. + @param newVal The new adjustment value. + @return Nothing. */ + void SetTCYLeftRightAdjustment( ATETextDOM::Int32 newVal); + /** Sets the local left Aki attribute of this character. + @param newVal The new left Aki value. + @return Nothing. */ + void SetLeftAki( ATETextDOM::Real newVal); + /** Sets the local right Aki attribute of this character. + @param newVal The new right Aki value. + @return Nothing. */ + void SetRightAki( ATETextDOM::Real newVal); + //------------------------------------------------ + // General settings + //------------------------------------------------ + /** Sets the local no-break attribute of this character. + @param newVal True to turn no-break on, false to turn it off. + @return Nothing. */ + void SetNoBreak( bool newVal); + /** Sets the local fill color attribute of this character. + @param newVal The paint object containing the new fill color value. + @return Nothing. */ + void SetFillColor( IApplicationPaint newVal); + /** Sets the local stroke color attribute of this character. + @param newVal The paint object containing the new stroke color value. + @return Nothing. */ + void SetStrokeColor( IApplicationPaint newVal); + /** Sets the local fill attribute of this character. + @param newVal True to turn fill on, false to turn it off. + @return Nothing. */ + void SetFill( bool newVal); + /** Sets the local fill visibilty attribute of this character. + @param newVal True to turn fill visibility on, false to turn it off. + @return Nothing. */ + void SetFillVisible( bool newVal); + /** Sets the local stroke attribute of this character. + @param newVal True to turn stroke on, false to turn it off. + @return Nothing. */ + void SetStroke( bool newVal); + /** Sets the local stroke visibility attribute of this character. + @param newVal True to turn stroke visibility on, false to turn it off. + @return Nothing. */ + void SetStrokeVisible( bool newVal); + /** Sets the local fill-first attribute of this character. + @param newVal True to turn fill-first on, false to turn it off. + @return Nothing. */ + void SetFillFirst( bool newVal); + /** Sets the local fill overprint attribute of this character. + @param newVal True to turn fill overprint on, false to turn it off. + @return Nothing. */ + void SetFillOverPrint( bool newVal); + /** Sets the local stroke overprint attribute of this character. + @param newVal True to turn stroke overprint on, false to turn it off. + @return Nothing. */ + void SetStrokeOverPrint( bool newVal); + /** Sets the local fill background color attribute of this character. + @param newVal The paint object containing the new fill color value. + @return Nothing. */ + void SetFillBackgroundColor( IApplicationPaint newVal); + /** Sets the local fill background attribute of this character. + @param newVal True to turn fill on, false to turn it off. + @return Nothing. */ + void SetFillBackground( bool newVal); + /** Sets the local line cap attribute of this character. + @param newVal The new line cap type constant. + @return Nothing. */ + void SetLineCap( LineCapType newVal); + /** Sets the local line join attribute of this character. + @param newVal The new line join type constant. + @return Nothing. */ + void SetLineJoin( LineJoinType newVal); + /** Sets the local line width attribute of this character. + @param newVal The new line width value in document points. + @return Nothing. */ + void SetLineWidth( ATETextDOM::Real newVal); + /** Sets the local miter limit attribute of this character. + @param newVal The new miter limit value in document points. + @return Nothing. */ + void SetMiterLimit( ATETextDOM::Real newVal); + /** Sets the local line dash offset attribute of this character. + @param newVal The new line dash offset value in document points. + @return Nothing. */ + void SetLineDashOffset( ATETextDOM::Real newVal); + /** Sets the local line dash array attribute of this character. + @param newVal The new line dash array object. + @return Nothing. */ + void SetLineDashArray( IArrayReal newVal); + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + // ------------------------------------------------------------------ + // Complex Script Settings + // ------------------------------------------------------------------ + + /** Sets the kashidas attribute of this character. + @param newVal The new kashidas object. + @return Nothing. + */ + void SetKashidas( Kashidas newVal); + /** Sets the direction override attribute of this character. + @param newVal The new direction override object. + @return Nothing. + */ + void SetDirOverride( DirOverride newVal); + /** Sets the digit set attribute of this character. + @param newVal The new digit set object. + @return Nothing. + */ + void SetDigitSet( DigitSet newVal); + /** Sets the diacritics positioning attribute of this character. + @param newVal The diacritics positioning object. + @return Nothing. + */ + void SetDiacVPos( DiacVPos newVal); + /** Sets the diacritics x offset attribute of this character. + @param newVal The new diacritics x offset in document points. + @return Nothing. + */ + void SetDiacXOffset( ATETextDOM::Real newVal); + /** Sets the diacritics y offset attribute of this character. + @param newVal The new diacritics y offset in document points. + @return Nothing. + */ + void SetDiacYOffset( ATETextDOM::Real newVal); + /** Sets the automatic diacritics y distance from baseline attribute of this character. + @param newVal True to turn automatic diacritics y distance from baseline on, false to turn it off. + @return Nothing. + */ + void SetAutoMydfb( bool newVal); + /** Sets the diacritics y distance from baseline attribute of this character. + @param newVal The new diacritics y distance from baseline in document points. + @return Nothing. + */ + void SetMarkYDistFromBaseline( ATETextDOM::Real newVal); + /** Sets the overlap swash attribute of this character. + @param newVal True to turn overlap swash on, false to turn it off. + @return Nothing. + */ + void SetOverlapSwash( bool newVal); + /** Sets the justification alternates attribute of this character. + @param newVal True to turn justification alternates on, false to turn it off. + @return Nothing. + */ + void SetJustificationAlternates( bool newVal); + /** Sets the stretched alternates attribute of this character. + @param newVal Trues to turn stretched alternates on, false to turn it off. + @return Nothing. + */ + void SetStretchedAlternates( bool newVal); +#endif + + // ====================================================================== + // CLEAR PROPERTIES + // ====================================================================== + + /** Removes the local font attribute value of this character. + @return Nothing. */ + void ClearFont( ); + /** Removes the local font size attribute value of this character. + @return Nothing. */ + void ClearFontSize( ); + /** Removes the local horizontal scale attribute value of this character. + @return Nothing. */ + void ClearHorizontalScale( ); + /** Removes the local vertical scale attribute value of this character. + @return Nothing. */ + void ClearVerticalScale( ); + /** Removes the local automatic leading attribute value of this character. + @return Nothing. */ + void ClearAutoLeading( ); + /** Removes the local leading attribute value of this character. + @return Nothing. */ + void ClearLeading( ); + /** Removes the local tracking attribute value of this character. + @return Nothing. */ + void ClearTracking( ); + /** Removes the local baseline shift attribute value of this character. + @return Nothing. */ + void ClearBaselineShift( ); + /** Removes the local character rotation attribute value of this character. + @return Nothing. */ + void ClearCharacterRotation( ); + /** Removes the local automatic kerning attribute value of this character style. + This is not available for individual characters. + @return Nothing. */ + void ClearAutoKernType( ); + /** Removes the local font caps option attribute value of this character. + @return Nothing. */ + void ClearFontCapsOption( ); + /** Removes the local font baseline option attribute value of this character. + @return Nothing. */ + void ClearFontBaselineOption( ); + /** Removes the local font OpenType position option attribute value of this character. + @return Nothing. */ + void ClearFontOpenTypePositionOption( ); + /** Removes the local strikethrough position attribute value of this character. + @return Nothing. */ + void ClearStrikethroughPosition( ); + /** Removes the local underline position attribute value of this character. + @return Nothing. */ + void ClearUnderlinePosition( ); + /** Removes the local underline offset attribute value of this character. + @return Nothing. */ + void ClearUnderlineOffset( ); + // ------------------------------------------------------------------ + // OpenType settings + // ------------------------------------------------------------------ + /** Removes the local OpenType ligature attribute value of this character. + @return Nothing. */ + void ClearLigature( ); + /** Removes the local OpenType discretionary ligature attribute value of this character. + @return Nothing. */ + void ClearDiscretionaryLigatures( ); + /** Removes the local OpenType contextual ligature attribute value of this character. + @return Nothing. */ + void ClearContextualLigatures( ); + /** Removes the local OpenType alternate ligature attribute value of this character. + @return Nothing. */ + void ClearAlternateLigatures( ); + /** Removes the local OpenType old-style attribute value of this character. + @return Nothing. */ + void ClearOldStyle( ); + /** Removes the local OpenType fractions attribute value of this character. + @return Nothing. */ + void ClearFractions( ); + /** Removes the local OpenType ordinals attribute value of this character. + @return Nothing. */ + void ClearOrdinals( ); + /** Removes the local OpenType swash attribute value of this character. + @return Nothing. */ + void ClearSwash( ); + /** Removes the local OpenType titling attribute value of this character. + @return Nothing. */ + void ClearTitling( ); + /** Removes the local OpenType connection forms attribute value of this character. + @return Nothing. */ + void ClearConnectionForms( ); + /** Removes the local OpenType stylistic alternates attribute value of this character. + @return Nothing. */ + void ClearStylisticAlternates( ); + /** Removes the local OpenType stylistic sets attribute value of this character. + @return Nothing. */ + void ClearStylisticSets(); + /** Removes the local OpenType ornaments attribute value of this character. + @return Nothing. */ + void ClearOrnaments( ); + /** Removes the local OpenType figure style attribute value of this character. + @return Nothing. */ + void ClearFigureStyle( ); + // ------------------------------------------------------------------ + // Japanese OpenType settings + // ------------------------------------------------------------------ + /** Removes the local Japanese OpenType proportional metrics attribute value of this character. + @return Nothing. */ + void ClearProportionalMetrics( ); + /** Removes the local Japanese OpenType Kana attribute value of this character. + @return Nothing. */ + void ClearKana( ); + /** Removes the local Japanese OpenType italics attribute value of this character. + @return Nothing. */ + void ClearItalics( ); + /** Removes the local Japanese OpenType Ruby attribute value of this character. + @return Nothing. */ + void ClearRuby( ); + /** Removes the local Japanese OpenType baseline direction attribute value of this character. + @return Nothing. */ + void ClearBaselineDirection( ); + /** Removes the local Japanese OpenType language attribute value of this character. + @return Nothing. */ + void ClearLanguage( ); + /** Removes the local Japanese OpenType Japanese alternate feature attribute value of this character. + @return Nothing. */ + void ClearJapaneseAlternateFeature( ); + /** Removes the local Japanese OpenType Tsume attribute value of this character. + @return Nothing. */ + void ClearTsume( ); + /** Removes the local Japanese OpenType style-run alignment attribute value of this character. + @return Nothing. */ + void ClearStyleRunAlignment( ); + // ------------------------------------------------------------------ + // WariChu settings + // ------------------------------------------------------------------ + /** Removes the local WariChu enabled attribute value of this character. + @return Nothing. */ + void ClearWariChuEnabled( ); + /** Removes the local WariChu line count attribute value of this character. + @return Nothing. */ + void ClearWariChuLineCount( ); + /** Removes the local WariChu line gap attribute value of this character. + @return Nothing. */ + void ClearWariChuLineGap( ); + /** Removes the local WariChu sub-line amount attribute value of this character. + @return Nothing. */ + void ClearWariChuSubLineAmount( ); + /** Removes the local WariChu widow amount attribute value of this character. + @return Nothing. */ + void ClearWariChuWidowAmount( ); + /** Removes the local WariChu orphan amount attribute value of this character. + @return Nothing. */ + void ClearWariChuOrphanAmount( ); + /** Removes the local WariChu justification attribute value of this character. + @return Nothing. */ + void ClearWariChuJustification( ); + /** Removes the local Tate Chu Yoko up-down adjustment attribute value of this character. + @return Nothing. */ + void ClearTCYUpDownAdjustment( ); + /** Removes the local Tate Chu Yoko right-left adjustment attribute value of this character. + @return Nothing. */ + void ClearTCYLeftRightAdjustment( ); + /** Removes the local left Aki attribute value of this character. + @return Nothing. */ + void ClearLeftAki( ); + /** Removes the local right Aki attribute value of this character. + @return Nothing. */ + void ClearRightAki( ); + // ------------------------------------------------------------------ + // General settings + // ------------------------------------------------------------------ + /** Removes the local no-break attribute value of this character. + @return Nothing. */ + void ClearNoBreak( ); + /** Removes the local fill color attribute value of this character. + @return Nothing. */ + void ClearFillColor( ); + /** Removes the local stroke color attribute value of this character. + @return Nothing. */ + void ClearStrokeColor( ); + /** Removes the local fill attribute value of this character. + @return Nothing. */ + void ClearFill( ); + /** Removes the local fill visibility attribute value of this character. + @return Nothing. */ + void ClearFillVisible( ); + /** Removes the local stroke attribute value of this character. + @return Nothing. */ + void ClearStroke( ); + /** Removes the local stroke visibility attribute value of this character. + @return Nothing. */ + void ClearStrokeVisible( ); + /** Removes the local fill-first attribute value of this character. + @return Nothing. */ + void ClearFillFirst( ); + /** Removes the local fill overprint attribute value of this character. + @return Nothing. */ + void ClearFillOverPrint( ); + /** Removes the local stroke overprint attribute value of this character. + @return Nothing. */ + void ClearStrokeOverPrint( ); + /** Removes the local fill background color attribute value of this character. + @return Nothing. */ + void ClearFillBackgroundColor( ); + /** Removes the local fill background attribute value of this character. + @return Nothing. */ + void ClearFillBackground( ); + /** Removes the local line cap attribute value of this character. + @return Nothing. */ + void ClearLineCap( ); + /** Removes the local line join attribute value of this character. + @return Nothing. */ + void ClearLineJoin( ); + /** Removes the local line width attribute value of this character. + @return Nothing. */ + void ClearLineWidth( ); + /** Removes the local miter limit attribute value of this character. + @return Nothing. */ + void ClearMiterLimit( ); + /** Removes the local line dash offset attribute value of this character. + @return Nothing. */ + void ClearLineDashOffset( ); + /** Removes the local line dash array attribute value of this character. + @return Nothing. */ + void ClearLineDashArray( ); + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + // ------------------------------------------------------------------ + // Complex Script Settings + // ------------------------------------------------------------------ + + /** Removes the kashidas attribute value of this character. + @return Nothing. + */ + void ClearKashidas( ); + /** Removes the direction override attribute value of this character. + @return Nothing. + */ + void ClearDirOverride( ); + /** Removes the digit set attribute value of this character. + @return Nothing. + */ + void ClearDigitSet( ); + /** Removes the diacritics positioning attribute value of this character. + @return Nothing. + */ + void ClearDiacVPos( ); + /** Removes the diacritics x offset attribute value of this character. + @return Nothing. + */ + void ClearDiacXOffset( ); + /** Removes the diacritics y offset attribute value of this character. + @return Nothing. + */ + void ClearDiacYOffset( ); + /** Removes the automatic diacritics y distance from baseline attribute value of this character. + @return Nothing. + */ + void ClearAutoMydfb( ); + /** Removes the diacritics y distance from baseline attribute value of this character. + @return Nothing. + */ + void ClearMarkYDistFromBaseline( ); + /** Removes the overlap swash attribute value of this character. + @return Nothing. + */ + void ClearOverlapSwash( ); + /** Removes the justification alternates attribute value of this character. + @return Nothing. + */ + void ClearJustificationAlternates( ); + /** Removes the stretched alternates attribute value of this character. + @return Nothing. + */ + void ClearStretchedAlternates( ); +#endif + + //////////////////////////////////////////////////////////////////////////// + // ALGEBRA METHODS + //////////////////////////////////////////////////////////////////////////// + + /** Clears any attributes in this object whose values are + not the same as or are unassigned in the comparison object. + The only values that remain are those that match + the corresponding value in the comparison object. + @param rhs Right-hand side of comparison. + @return True if changes were made. */ + bool IntersectFeatures( ICharFeatures rhs); + /** Sets any attributes in this object whose values are + assigned in the comparison object to those values. + @param rhs Right-hand side of comparison. + @return True if changes were made. */ + bool ReplaceOrAddFeatures( ICharFeatures rhs); + /** Clears any attributes in this object whose values are the + same as in the comparison object. + @param rhs Right-hand side of comparison. + @return True if changes were made. */ + bool UnassignEachIfEqual( ICharFeatures rhs); + + /** Reports whether all attributes of this object are unassigned. + @return True if no attributes have local values. */ + bool IsEachNotAssigned( ) const; + /** Reports whether all attributes of this object are assigned. + @return True if all attributes have local values. */ + bool IsEachAssigned( ) const; + +}; + +////////////////////////////////////////////// +// --ICharInspector-- +////////////////////////////////////////////// + +/** This class allows you to retrieve the + character features that apply to the characters in a text range, + after considering all inherited style values and local overrides. + + Obtain an \c ICharInspector object from a text range or set of text + ranges. See \c ITextRange::GetCharInspector(). + + The methods collect the values of a particular attribute into + an array whose order is the same as the order of characters in the text. + */ +class ICharInspector +{ +private: + CharInspectorRef fCharInspector; +public: + /** Constructor. The object is empty; that is, all + attribute values are unassigned. + @return The new object. */ + ICharInspector(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICharInspector(const ICharInspector& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICharInspector& operator=(const ICharInspector& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICharInspector& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICharInspector& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param charinspector The C object. + @return The new C++ object. */ + explicit ICharInspector(CharInspectorRef charinspector); + /** Destructor */ + virtual ~ICharInspector(); + /** Retrieves a reference to this object. + @return The object reference. */ + CharInspectorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + //------------------------------------------------------------ + // Properties + //------------------------------------------------------------ + + /** Retrieves the font values from the character set. + @return The array object containing the values. */ + IArrayFontRef GetFont( ) const; + /** Retrieves the font size values from the character set. + @return The array object containing the values. */ + IArrayReal GetFontSize( ) const; + /** Retrieves the horizontal scale values from the character set. + @return The array object containing the values. */ + IArrayReal GetHorizontalScale( ) const; + /** Retrieves the vertical scale values from the character set. + @return The array object. */ + IArrayReal GetVerticalScale( ) const; + /** Retrieves the synthetic bold values from the character set. + @return The array object containing the values. */ + IArrayBool GetSyntheticBold( ) const; + /** Retrieves the synthetic italic values from the character set. + @return The array object containing the values. */ + IArrayBool GetSyntheticItalic( ) const; + /** Retrieves the automatic leading values from the character set. + @return The array object containing the values. */ + IArrayBool GetAutoLeading( ) const; + /** Retrieves the leading values from the character set. + @return The array object containing the values. */ + IArrayReal GetLeading( ) const; + /** Retrieves the tracking values from the character set. + @return The array object containing the values. */ + IArrayInteger GetTracking( ) const; + /** Retrieves the baseline shift values from the character set. + @return The array object containing the values. */ + IArrayReal GetBaselineShift( ) const; + /** Retrieves the character rotation values from the character set. + @return The array object containing the values. */ + IArrayReal GetCharacterRotation( ) const; + /** Retrieves the font caps option values from the character set. + @return The array object containing the values. */ + IArrayFontCapsOption GetFontCapsOption( ) const; + /** Retrieves the font baseline option values from the character set. + @return The array object containing the values. */ + IArrayFontBaselineOption GetFontBaselineOption( ) const; + /** Retrieves the font OpenType position option values from the character set. + @return The array object containing the values. */ + IArrayFontOpenTypePositionOption GetFontOpenTypePositionOption( ) const; + /** Retrieves the strikethrough position values from the character set. + @return The array object containing the values. */ + IArrayStrikethroughPosition GetStrikethroughPosition( ) const; + /** Retrieves the underline position values from the character set. + @return The array object containing the values. */ + IArrayUnderlinePosition GetUnderlinePosition( ) const; + /** Retrieves the underline offset values from the character set. + @return The array object containing the values. */ + IArrayReal GetUnderlineOffset( ) const; + + // ------------------------------------------------------------------ + // OpenType settings + // ------------------------------------------------------------------ + /** Retrieves the OpenType ligature values from the character set. + @return The array object containing the values. */ + IArrayBool GetLigature( ) const; + /** Retrieves the OpenType discretionary ligature values from the character set. + @return The array object containing the values. */ + IArrayBool GetDiscretionaryLigatures( ) const; + /** Retrieves the OpenType contextual ligature values from the character set. + @return The array object containing the values. */ + IArrayBool GetContextualLigatures( ) const; + /** Retrieves the OpenType alternate ligature values from the character set. + @return The array object containing the values. */ + IArrayBool GetAlternateLigatures( ) const; + /** Retrieves the OpenType old-style values from the character set. + @return The array object containing the values. */ + IArrayBool GetOldStyle( ) const; + /** Retrieves the OpenType fractions values from the character set. + @return The array object containing the values. */ + IArrayBool GetFractions( ) const; + /** Retrieves the OpenType ordinals values from the character set. + @return The array object containing the values. */ + IArrayBool GetOrdinals( ) const; + /** Retrieves the OpenType swash values from the character set. + @return The array object containing the values. */ + IArrayBool GetSwash( ) const; + /** Retrieves the OpenType titling values from the character set. + @return The array object containing the values. */ + IArrayBool GetTitling( ) const; + /** Retrieves the OpenType connection forms values from the character set. + @return The array object containing the values. */ + IArrayBool GetConnectionForms( ) const; + /** Retrieves the OpenType stylistic alternates values from the character set. + @return The array object containing the values. */ + IArrayBool GetStylisticAlternates( ) const; + /** Retrieves the OpenType stylistic set values from the character set. + @return The array object containing the values. */ + IArrayInteger GetStylisticSets( ) const; + /** Retrieves the OpenType ornaments values from the character set. + @return The array object containing the values. */ + IArrayBool GetOrnaments( ) const; + /** Retrieves the OpenType figure style values from the character set. + @return The array object containing the values. */ + IArrayFigureStyle GetFigureStyle( ) const; + // ------------------------------------------------------------------ + // Japanese OpenType settings + // ------------------------------------------------------------------ + /** Retrieves the Japanese OpenType proportional metrics values from the character set. + @return The array object containing the values. */ + IArrayBool GetProportionalMetrics( ) const; + /** Retrieves the Japanese OpenType Kana values from the character set. + @return The array object containing the values. */ + IArrayBool GetKana( ) const; + /** Retrieves the Japanese OpenType italics values from the character set. + @return The array object containing the values. */ + IArrayBool GetItalics( ) const; + /** Retrieves the Japanese OpenType Ruby values from the character set. + @return The array object containing the values. */ + IArrayBool GetRuby( ) const; + /** Retrieves the Japanese OpenType baseline direction values from the character set. + @return The array object containing the values. */ + IArrayBaselineDirection GetBaselineDirection( ) const; + /** Retrieves the Japanese OpenType language values from the character set. + @return The array object containing the values. */ + IArrayLanguage GetLanguage( ) const; + /** Retrieves the Japanese OpenType Tsume values from the character set. + @return The array object containing the values. */ + IArrayReal GetTsume( ) const; + /** Retrieves the Japanese OpenType style-run alignment values from the character set. + @return The array object containing the values. */ + IArrayStyleRunAlignment GetStyleRunAlignment( ) const; + // ------------------------------------------------------------------ + // WariChu settings + // ------------------------------------------------------------------ + /** Retrieves the WariChu line count values from the character set. + @return The array object containing the values. */ + IArrayInteger GetWariChuLineCount( ) const; + /** Retrieves the WariChu line gap values from the character set. + @return The array object containing the values. */ + IArrayInteger GetWariChuLineGap( ) const; + /** Retrieves the WariChu scale values from the character set. + @return The array object containing the values. */ + IArrayReal GetWariChuScale( ) const; + /** Retrieves the WariChu size values from the character set. + @return The array object containing the values. */ + IArrayReal GetWariChuSize( ) const; + /** Retrieves the WariChu widow amount values from the character set. + @return The array object containing the values. */ + IArrayInteger GetWariChuWidowAmount( ) const; + /** Retrieves the WariChu orphan amount values from the character set. + @return The array object containing the values. */ + IArrayInteger GetWariChuOrphanAmount( ) const; + /** Retrieves the WariChu justification values from the character set. + @return The array object containing the values. */ + IArrayWariChuJustification GetWariChuJustification( ) const; + /** Retrieves the WariChu enabled values from the character set. + @return The array object containing the values. */ + IArrayBool GetWariChuEnabled( ) const; + /** Retrieves the Tate Chu Yoko up-down adjustment values from the character set. + @return The array object containing the values. */ + IArrayInteger GetTCYUpDownAdjustment( ) const; + /** Retrieves the Tate Chu Yoko right-left adjustment values from the character set. + @return The array object containing the values. */ + IArrayInteger GetTCYLeftRightAdjustment( ) const; + /** Retrieves the left Aki values from the character set. + @return The array object containing the values. */ + IArrayReal GetLeftAki( ) const; + /** Retrieves the right Aki values from the character set. + @return The array object containing the values. */ + IArrayReal GetRightAki( ) const; + + // ------------------------------------------------------------------ + // General settings + // ------------------------------------------------------------------ + + /** Retrieves the no-break values from the character set. + @return The array object containing the values. */ + IArrayBool GetNoBreak( ) const; + /** Retrieves the fill color values from the character set. + @return The array object containing the values. */ + IArrayApplicationPaintRef GetFillColor( ) const; + /** Retrieves the stroke color values from the character set. + @return The array object containing the values. */ + IArrayApplicationPaintRef GetStrokeColor( ) const; + /** Retrieves the fill values from the character set. + @return The array object containing the values. */ + IArrayBool GetFill( ) const; + /** Retrieves the fill visibility values from the character set. + @return The array object containing the values. */ + IArrayBool GetFillVisible( ) const; + /** Retrieves the stroke values from the character set. + @return The array object containing the values. */ + IArrayBool GetStroke( ) const; + /** Retrieves the stroke visibility values from the character set. + @return The array object containing the values. */ + IArrayBool GetStrokeVisible( ) const; + /** Retrieves the fill-first values from the character set. + @return The array object containing the values. */ + IArrayBool GetFillFirst( ) const; + /** Retrieves the fill overprint values from the character set. + @return The array object containing the values. */ + IArrayBool GetFillOverPrint( ) const; + /** Retrieves the stroke overprint values from the character set. + @return The array object containing the values. */ + IArrayBool GetStrokeOverPrint( ) const; + /** Retrieves the fill background color values from the character set. + @return The array object containing the values. */ + IArrayApplicationPaintRef GetFillBackgroundColor( ) const; + /** Retrieves the fill background values from the character set. + @return The array object containing the values. */ + IArrayBool GetFillBackground( ) const; + /** Retrieves the line cap values from the character set. + @return The array object containing the values. */ + IArrayLineCapType GetLineCap( ) const; + /** Retrieves the line join values from the character set. + @return The array object containing the values. */ + IArrayLineJoinType GetLineJoin( ) const; + /** Retrieves the line width values from the character set. + @return The array object containing the values. */ + IArrayReal GetLineWidth( ) const; + /** Retrieves the miter limit values from the character set. + @return The array object containing the values. */ + IArrayReal GetMiterLimit( ) const; + /** Retrieves the line dash offset values from the character set. + @return The array object containing the values. */ + IArrayReal GetLineDashOffset( ) const; + /** Retrieves the line dash array values from the character set. + @return The array object containing the values. */ + IArrayArrayReal GetLineDashArray( ) const; + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + // ------------------------------------------------------------------ + // Complex Script Settings + // ------------------------------------------------------------------ + + /** Retrieves the kashidas values from the character set. + @return The array object containing the values. + */ + IArrayKashidas GetKashidas( ) const; + /** Retrieves the direction override values from the character set. + @return The array object containing the values. + */ + IArrayDirOverride GetDirOverride( ) const; + /** Retrieves the digit set values from the character set. + @return The array object containing the values. + */ + IArrayDigitSet GetDigitSet( ) const; + /** Retrieves the diacritics positioning values from the character set. + @return The array object containing the values. + */ + IArrayDiacVPos GetDiacVPos( ) const; + /** Retrieves the diacritics x offset values from the character set. + @return The array object containing the values. + */ + IArrayReal GetDiacXOffset( ) const; + /** Retrieves the diacritics y offset values from the character set. + @return The array object containing the values. + */ + IArrayReal GetDiacYOffset( ) const; + /** Retrieves the automatic diacritics y offset from baseline values from the character set. + @return The array object containing the values. + */ + IArrayBool GetAutoMydfb( ) const; + /** Retrieves the diacritics y offset from baseline values from the character set. + @return The array object containing the values. + */ + IArrayReal GetMarkYDistFromBaseline( ) const; + /** Retrieves the overlap swash values from the character set. + @return The array object containing the values. + */ + IArrayBool GetOverlapSwash( ) const; + /** Retrieves the justification alternate values from the character set. + @return The array object containing the values. + */ + IArrayBool GetJustificationAlternates( ) const; + /** Retrieves the stretched alternates values from the character set. + @return The array object containing the values. + */ + IArrayBool GetStretchedAlternates( ) const; +#endif + +}; + +////////////////////////////////////////////// +// --ICharStyle-- +////////////////////////////////////////////// +/** This class encapsulates a named character style, which can be + applied to a set of characters. It contains an \c ICharFeatures + object, which defines the character attributes for this style. + + Attribute values are inherited from the Normal style, and can be overridden + in a named style associated with a text run or text range, or at the + local character level. + + A style or character can partially define attributes. Only those values + that are assigned override the inherited values. The constructor creates + an empty object, in which all attribute values are unassigned. + Setting a value causes it to be assigned, and clearing it causes + it to be unassigned. When you retrieve an attribute value, a boolean + return value, \c isAssigned, reports whether that attribute has a local + value in the queried object. + */ +class ICharStyle +{ +private: + CharStyleRef fCharStyle; +public: + /** Constructor. The object is empty; that is, all + attribute values are unassigned. + @return The new object. */ + ICharStyle(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICharStyle(const ICharStyle& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICharStyle& operator=(const ICharStyle& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICharStyle& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICharStyle& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param charstyle The C object. + @return The new C++ object. */ + explicit ICharStyle(CharStyleRef charstyle); + /** Destructor */ + virtual ~ICharStyle(); + /** Retrieves a reference to this object. + @return The object reference. */ + CharStyleRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + //------------------------------------------------- + // Properties + //------------------------------------------------- + + /** Retrieves the name of this style. + @param pName [out] A buffer in which to return the name string. + @param maxLength [in, out] The number of characters in the buffer. + @return The length of the returned string, or 0 if an error occurred. + */ + ATETextDOM::Int32 GetName( ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength) const; + /** Sets the name of this style. + @param pName The new, \c NULL terminated name string. + @return True if the name was set successfully, false if a style + already has the specified name or if the name string is empty. + */ + bool SetName( const ATETextDOM::Unicode* pName); + /** Retrieves the parent style of this style. + @return The style object, or a \c NULL object for the Normal (root) style. + */ + ICharStyle GetParent( ) const; + /** Sets the parent style of this style. + @param pStyle The new parent style object, + @return True if the parent was set successfully, false if + this is the Normal (root) style. + */ + bool SetParent( const ICharStyle pStyle); + /** Reports whether this style has a parent. + @return True if this style has a parent, false if this is the Normal (root) style. + */ + bool HasParent( ) const; + /** Retrieves the features defined for this style. + @return The character features object. + */ + ICharFeatures GetFeatures( ) const; + /** Sets the features defined for this style. For the Normal (root) style, + this is the same as \c #ReplaceOrAddFeatures(). For all other + styles, the new feature set completely replaces the old feature set. + @param pFeatures The new character features object. + @return Nothing. + */ + void SetFeatures( ICharFeatures pFeatures); + /** Sets attribute values of this style's feature set to those values that + are specifically assigned in the replacement feature set. Those values + that are unassigned in the replacement set remain unchanged in this + style. + @param pFeatures The replacement character features object. + @return Nothing. + */ + void ReplaceOrAddFeatures( ICharFeatures pFeatures); + +}; + +////////////////////////////////////////////// +// --ICharStyles-- +////////////////////////////////////////////// +/** Encapsulates a set of character styles as a text resource. + A style set contains a collection of \c ICharStyle objects. + Use an \c ICharStylesIterator object to iterate through the set. + */ +class ICharStyles +{ +private: + CharStylesRef fCharStyles; +public: + /** Constructor. + @return The new object. */ + ICharStyles(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICharStyles(const ICharStyles& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICharStyles& operator=(const ICharStyles& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICharStyles& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICharStyles& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param charstyles The C object. + @return The new C++ object. */ + explicit ICharStyles(CharStylesRef charstyles); + /** Destructor */ + virtual ~ICharStyles(); + /** Retrieves a reference to this object. + @return The object reference. */ + CharStylesRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + //----------------------------------------------------------- + // METHODS + //----------------------------------------------------------- + + /** Reports whether this is set is empty. + @return True if this set contains no style objects. */ + bool IsEmpty( ) const; + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + + /** Shows all styles. + @return Nothing. + @see \c #ShowOnlyUnreferencedStyles(), \c #ShowOnlyStylesReferencedIn() + */ + void ShowAllStyles( ) const; + /** Shows only styles to which there are not references in text. + @return Nothing. + @see \c #ShowAllStyles(), \c #ShowOnlyStylesReferencedIn() + */ + void ShowOnlyUnreferencedStyles( ) const; + /** Shows only styles that are used in a text range. + @param pRange The text range object. + @return Nothing. + @see \c #ShowAllStyles(), \c #ShowOnlyUnreferencedStyles() + */ + void ShowOnlyStylesReferencedIn( ITextRange pRange) const; + /** Reorders styles in this set by moving a style to a given position. + @param pStyle The style object. + @param position The new 0-based position index. + @return Nothing. + */ + void MoveStyleTo( ICharStyle pStyle, ATETextDOM::Int32 position); + +}; + +////////////////////////////////////////////// +// --ICharStylesIterator-- +////////////////////////////////////////////// +/** This class enables you to iterate through a set of + character styles. + @see \c ICharStyles */ +class ICharStylesIterator +{ +private: + CharStylesIteratorRef fCharStylesIterator; +public: + /** Constructor. + @return The new object. */ + ICharStylesIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ICharStylesIterator(const ICharStylesIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ICharStylesIterator& operator=(const ICharStylesIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ICharStylesIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ICharStylesIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param charstylesiterator The C object. + @return The new C++ object. */ + explicit ICharStylesIterator(CharStylesIteratorRef charstylesiterator); + /** Destructor */ + virtual ~ICharStylesIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + CharStylesIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates an iterator for a specific style set + that is ordered first-to-last or last-to-first. + @param pStyles The style set object. + @param direction Optional. The order of iteration. Default is first to last. + @return The new iterator object. + */ + ICharStylesIterator( ICharStyles pStyles, Direction direction = kForward); + + //------------------------------------------------------ + // Methods + //------------------------------------------------------ + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Sets the current position to the first member in the set. + @return Nothing. */ + void MoveToFirst( ); + /** Sets the current position to the last member in the set. + @return Nothing. */ + void MoveToLast( ); + /** Increments the current position in the set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Decrements the current position in the set. + @return Nothing. */ + void Previous( ); + /** Retrieves the current character style. + @return The character style object. */ + ICharStyle Item( ) const; + +}; + +////////////////////////////////////////////// +// --IFind-- +////////////////////////////////////////////// +/** This class encapsulates a search through text. The + methods allow you to find and replace text in a document + using various kinds of character matching. + + To find or replace all matches in the search scope, do the following: + \li Save the text object you are currently working with. + \li Retrieve the current search position markers with \c #GetPreReplaceAllSettings() + and save them. + \li Implement a loop through all text objects, using + \c #FindMatch(), \c #FindNextMatch(), and \c #ReplaceMatch() + to find or replace all occurances of your match string. +
Keep track of how many matches or replacements were found, + to report back to the user. + \li Restore the previous search position markers with \c #RestorePreReplaceAllSettings() + \li Restore the working text object with \c #SetSearchRange(). + + */ +class IFind +{ +private: + FindRef fFind; +public: + /** Constructor. + @return The new object. */ + IFind(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IFind(const IFind& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IFind& operator=(const IFind& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IFind& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IFind& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param find The C object. + @return The new C++ object. */ + explicit IFind(FindRef find); + /** Destructor */ + virtual ~IFind(); + /** Retrieves a reference to this object. + @return The object reference. */ + FindRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + //------------------------------------------------------ + // Options + //------------------------------------------------------ + /** Retrieves the direction of search, front-to-back or + back-to-front. + @return The direction constant. + */ + Direction GetSearchDirection( ) const; + /** Reports whether searching is case-sensitive. + @return True if the search is set to ignore case, false if + it is case-sensitive. + */ + bool GetIgnoreCase( ) const; + /** Reports whether searching matches whole words. + @return True if the search is set to match whole words. + */ + bool GetWholeWord( ) const; + /** Reports whether searching wraps. + @return True if the search is set to wrap. + */ + bool GetWrap( ) const; + /** Reports whether searching should continue beyond selected text. + @return True if the search is set to go out-of-bounds. + */ + bool GetFindWordsOutOfBounds( ) const; + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + /** Reports whether accents are to be ignored during the find. + @return True if accents are to be ignored, false if they are not. + */ + bool GetIgnoreAccents( ) const; + /** Reports whether kashidas are to be ignored during the find. + @return True if kashidas are to be ignored, false if they are not. + */ + bool GetIgnoreKashidas( ) const; +#endif + + /** Sets the direction of search, front-to-back or back-to-front. + @param newValue The direction constant. + @return Nothing. + */ + void SetSearchDirection( Direction newValue); + /** Sets whether searching is case-sensitive. + @param newValue True to set the search to ignore case, + false to make it case-sensitive. + @return Nothing. + */ + void SetIgnoreCase( bool newValue); + /** Sets whether searching matches whole words. + @param newValue True to turn whole-word matching on, + false to turn it off. + @return Nothing. + */ + void SetWholeWord( bool newValue); + /** Sets whether searching wraps, ignoring line breaks. + @param newValue True to turn wrapping on, + false to turn it off. + @return Nothing. + */ + void SetWrap( bool newValue); + /** Sets whether searching matches words that are out-of-bounds. + @param newValue True to turn out-of-bounds matching on, + false to turn it off. + @return Nothing. + */ + void SetFindWordsOutOfBounds( bool newValue); + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + /** Sets whether accents should be ignored during the find. + @param newValue True to ignore accents. + @return Nothing. + */ + void SetIgnoreAccents( bool newValue); + /** Sets whether kashidas are to be ignored during the find. + @param newValue True to ignore kashidas. + @return Nothing. + */ + void SetIgnoreKashidas( bool newValue); +#endif + + /** Retrieves the scope of the search, the entire document or the current \c IStory. + The default scope is the entire document. + @return The search-scope constant. + */ + SearchScope GetSearchScope( ) const; + /** Sets the scope of the search to be the entire document or the current \c IStory. + The default scope is the entire document. + @param searchScope The search-scope constant. + @return Nothing. + */ + void SetSearchScope( SearchScope searchScope); + /** Sets the range of this search to a specific text range. Use to restore + the range after a global search or replace operation. + @param pRange The text range object. + @return Nothing. + @see Class description of \c IFind. + */ + void SetSearchRange( ITextRange pRange); + /** Sets the character string that this search tries to match + within the range and scope. + @param pSearchChars The search string. + @return Nothing. + */ + void SetSearchChars( ATETextDOM::Unicode* pSearchChars); + /** Retrieves the character string that this search tries to match. + @param pSearchChars [out] A buffer in which to return the search string. + @param length The number of characters in the buffer. Only this much of + the search string is returned. + @return Nothing. + */ + void GetSearchChars( ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length) const; + /** Sets the character string that this search uses to replace + matches found within the range and scope. + @param pSearchChars The replacement string. + @return Nothing. + */ + void SetReplaceChars( ATETextDOM::Unicode* pSearchChars); + /** Retrieves the character string that this search uses to replace + matches found within the range and scope. + @param pSearchChars [out] A buffer in which to return the replacement string. + @param length The number of characters in the buffer. Only this much of + the replacement string is returned. + @return Nothing. + */ + void GetReplaceChars( ATETextDOM::Unicode* pSearchChars, ATETextDOM::Int32 length) const; + // Temporary way to reset the engine for modeless operation + void Reset( ); + //------------------------------------------------------ + // Methods + //------------------------------------------------------ + // Searches current user selection. + /** Searches for the match string in the specified text range. + @param pTextRange The text range within which to search. + @return True if a match is found, false otherwise. + @see SetSearchChars() + */ + bool FindMatch( ITextRange pTextRange); + // Skips the current user selection. + /** Searches for the match string starting at the end of the current selection in the + specified text range. + @param pTextRange The text range object. + @return True if a match is found, false otherwise. + @see \c #SetSearchChars() + */ + bool FindNextMatch( ITextRange pTextRange); + + /** Searches for the match string in specified text range and replaces it, if found, + with the replacement string. + @param pTextRange The text range object. + @param findNext When true, searches in the current selection. When + false, begins searching at the end of the current selection. + @return If findNext parameter is true this function will return true if there is + another occurance found after the one just replaced, + and will return false if there is no other occurance found. + If findNext is false this function will always return false. + @see \c #SetSearchChars(), \c #SetReplaceChars() + */ + bool ReplaceMatch( ITextRange pTextRange, bool findNext); + + /** @deprecated Do not use. See class description of \c IFind. */ + bool FindAndReplaceAllMatches( ATETextDOM::Int32* pReplaceCount); + + /** Retrieves the current position markers in this object, so that they + can be saved before a global search or replacement operation. + @param pCurrentPoint A buffer in which to return the + 0-based index to the current position. + @param pStartPoint A buffer in which to return the + 0-based index to the starting position. + @return Nothing. + @see Class description of \c IFind. + + */ + void GetPreReplaceAllSettings( ATETextDOM::Int32* pCurrentPoint, ATETextDOM::Int32* pStartPoint) const; + + /** Restores the current position markers in this object after a global + search or replacement operation. + @param currentPoint The saved 0-based index to the current position. + @param startPoint The saved 0-based index to the starting position. + @return Nothing. + @see Class description of \c IFind. + */ + void RestorePreReplaceAllSettings( const ATETextDOM::Int32 currentPoint, const ATETextDOM::Int32 startPoint); + +}; + +////////////////////////////////////////////// +// --IFont-- +////////////////////////////////////////////// +/** Encapsulates a font as a text resource. The methods allow you to + add, access, and manipulate fonts for use with the + Adobe Text Engine (ATE). */ + +class IFont +{ +private: + FontRef fFont; +public: + /** Constructor. + @return The new object. */ + IFont(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IFont(const IFont& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IFont& operator=(const IFont& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IFont& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IFont& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param font The C object. + @return The new C++ object. */ + explicit IFont(FontRef font); + /** Destructor */ + virtual ~IFont(); + /** Retrieves a reference to this object. + @return The object reference. */ + FontRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + //----------------------------------------------- + // METHODS + //----------------------------------------------- + /** Reports whether this is a CoolType font. + @return True if this is a CoolType font. + */ + bool IsCoolTypeTechnology( ) const; + + /** Reports whether Roman glyphs in this font are sideways by default for a specified character alignment. + @param withItalics True to report the default for italics. + @param characterAlignment The style-run alignment constant for which to get the default. + @return True if the default for Roman glyphs is sideways. + */ + bool IsVerticalRomanGlyphsOnSideByDefault( bool withItalics, StyleRunAlignment characterAlignment) const; + + /** Retrieves a pointer to the CT font dictionary for this font. + @return A pointer to the dictionary. */ + void* GetCTFontDict( ); + +}; + +////////////////////////////////////////////// +// --IGlyph-- +////////////////////////////////////////////// +/** Encapsulates a glyph as a text resource. The methods allow you to + add, access, and manipulate glyphs for use with the + Adobe Text Engine (ATE). */ +class IGlyph +{ +private: + GlyphRef fGlyph; +public: + /** Constructor. + @return The new object. */ + IGlyph(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IGlyph(const IGlyph& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IGlyph& operator=(const IGlyph& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IGlyph& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IGlyph& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param glyph The C object. + @return The new C++ object. */ + explicit IGlyph(GlyphRef glyph); + /** Destructor */ + virtual ~IGlyph(); + /** Retrieves a reference to this object. + @return The object reference. */ + GlyphRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the unique identifier for this glyph. + @return The identifier. */ + ATEGlyphID GetGlyphID( ) const; + /** Retrieves the set of alternates for this glyph. + @return The alternate glyph set. */ + IGlyphs GetAlternateGlyphs( ) const; + /** Retrieves the OpenType feature of this glyph. + @param otFeatures [out] A buffer in which to return the features string. + @param otFeatureCount [out] A buffer in which to return the number of features. + @param otFeatureIndex [out] A buffer in which to return the index into the feature string. + @return Nothing. */ + void GetOTFeatures( char** otFeatures, ATETextDOM::Int32* otFeatureCount, ATETextDOM::Int32** otFeatureIndex); + // RealMatrix GetTransformation(); + +}; + +////////////////////////////////////////////// +// --IGlyphs-- +////////////////////////////////////////////// +/** Encapsulates a set of glyphs as a text resource. + A glyph set contains a collection of \c IGlyph objects. + Use an \c IGlyphsIterator object to iterate through the set. + */ +class IGlyphs +{ +private: + GlyphsRef fGlyphs; +public: + /** Constructor. + @return The new object. */ + IGlyphs(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IGlyphs(const IGlyphs& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IGlyphs& operator=(const IGlyphs& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IGlyphs& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IGlyphs& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param glyphs The C object. + @return The new C++ object. */ + explicit IGlyphs(GlyphsRef glyphs); + /** Destructor */ + virtual ~IGlyphs(); + /** Retrieves a reference to this object. + @return The object reference. */ + GlyphsRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + // ======================================================================== + // PROPERTIES + // ======================================================================== + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ); + /** Retrieves the first member of this set. + @return The member value. */ + IGlyph GetFirst( ); + /** Retrieves the last member of this set. + @return The member value. */ + IGlyph GetLast( ); + // navigation objects. + /** Retrieves the set of text ranges that use this glyph set. + @return The text ranges set objet. */ + ITextRanges GetTextRanges( ) const; + /** Retrieves the set of selected text ranges that use this glyph set. + @return The text ranges set objet. */ + ITextRanges GetTextSelection( ) const; + /** Creates an iterator object for all paragraphs in the current document + that use this glyph set. + @return The iterator object. */ + IParagraphsIterator GetParagraphsIterator( ) const; + /** Creates an iterator object for all text runs in the current document + that use this glyph set. + @return The iterator object. */ + ITextRunsIterator GetTextRunsIterator( ) const; + /** Creates an iterator object for all words in the current document + that use this glyph set. + @return The iterator object. */ + IWordsIterator GetWordsIterator( ) const; + // ======================================================================== + // METHODS + // ======================================================================== + /** Appends a glyph to this set. + @param glyph The glyph object. + @return The 0-based position index of the successfully + added object, or the current index of this object + if it is already in the set, or -1 if the object + was not in the set and could not be appended. + */ + void Add( const IGlyph& glyph); + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + IGlyph Item( ATETextDOM::Int32 nIndex) const; + /** Removes all members from the set. + @return Nothing. */ + void RemoveAll( ); + /** Removes a member from the set. + @param nIndex The 0-based position index of the member to remove. + @return Nothing. */ + void Remove( ATETextDOM::Int32 nIndex); + +}; + +////////////////////////////////////////////// +// --IGlyphsIterator-- +////////////////////////////////////////////// +/** This class enables you to iterate through a set of.glyphs + @see \c IGlyphs */ +class IGlyphsIterator +{ +private: + GlyphsIteratorRef fGlyphsIterator; +public: + /** Constructor. + @return The new object. */ + IGlyphsIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IGlyphsIterator(const IGlyphsIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IGlyphsIterator& operator=(const IGlyphsIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IGlyphsIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IGlyphsIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param glyphsiterator The C object. + @return The new C++ object. */ + explicit IGlyphsIterator(GlyphsIteratorRef glyphsiterator); + /** Destructor */ + virtual ~IGlyphsIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + GlyphsIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates an iterator for a specific glyph set + that is ordered first-to-last or last-to-first. + @param glyphs The glyph set object. + @param direction Optional. The order of iteration. Default is first-to-last. + @return The new iterator object. + */ + IGlyphsIterator( IGlyphs glyphs, Direction direction = kForward); + + //------------------------------------------------------ + // Methods + //------------------------------------------------------ + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Retrieves the first member in this set. + @return The glyph object. */ + IGlyph GetFirst( ); + /** Retrieves the last member in this set. + @return The glyph object. */ + IGlyph GetLast( ); + /** Retrieves the next member in this set in the iterator's current direction. + @return The glyph object. */ + IGlyph GetNext( ); + /** Retrieves the current glyph. + @return The glyph object. */ + IGlyph Item( ) const; + /** Increments the current position in this set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Decrements the current position in this set. + @return Nothing. */ + void Previous( ); + +}; + +////////////////////////////////////////////// +// --IKinsoku-- +////////////////////////////////////////////// +/** Encapsulates a Kinsoku as a text resource. The methods allow you to + add, access, and manipulate Kinsoku for use with the + Adobe Text Engine (ATE). The \c IKinsokuSet collects \c IKinsoku objects. + */ +class IKinsoku +{ +private: + KinsokuRef fKinsoku; +public: + /** Constructor. Constructs an empty Kinsoku. + @return The new object. */ + IKinsoku(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IKinsoku(const IKinsoku& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IKinsoku& operator=(const IKinsoku& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IKinsoku& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IKinsoku& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param kinsoku The C object. + @return The new C++ object. */ + explicit IKinsoku(KinsokuRef kinsoku); + /** Destructor */ + virtual ~IKinsoku(); + /** Retrieves a reference to this object. + @return The object reference. */ + KinsokuRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + //======================================================================== + // PROPERTIES + // ======================================================================= + /** Retrieves the name of this Kinsoku. + @param name [out] A buffer in which to return the name string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetName( ATETextDOM::Unicode* name, ATETextDOM::Int32 maxLength) const; + /** Retrieves the number of characters in the name of this Kinsoku. + @return The number of characters needed in the buffer to get the name. */ + ATETextDOM::Int32 GetNameSize( ) const; + /** Sets the name of this Kinsoku. + @param name The name string. + @return Nothing. */ + void SetName( const ATETextDOM::Unicode* name); + /** Reports whether this object matches a predefined tag. + @param tag The tag object. + @return True if this object matches the tag. + */ + bool MatchesPredefinedResourceTag( ATE::KinsokuPredefinedTag tag) const; + /** Retrieves the characters that cannot be used to start this Kinsoku. + @param noStartCharSet [out] A buffer in which to return the no-start character string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetNoStartCharSet( ATETextDOM::Unicode* noStartCharSet, ATETextDOM::Int32 maxLength) const; + /** Retrieves the number of characters in the no-start character set of this Kinsoku. + @return The number of characters needed in the buffer to get the no-start set. */ + ATETextDOM::Int32 GetNoStartCharSetSize( ) const; + /** Sets the characters that cannot be used to start this Kinsoku. + @param noStartCharSet The string containing the characters. + @return Nothing. */ + void SetNoStartCharSet( const ATETextDOM::Unicode* noStartCharSet); + /** Retrieves the characters that cannot be used to end this Kinsoku. + @param noEndCharSet [out] A buffer in which to return the no-end character string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetNoEndCharSet( ATETextDOM::Unicode* noEndCharSet, ATETextDOM::Int32 maxLength) const; + /** Retrieves the number of characters in the no-end character set of this Kinsoku. + @return The number of characters needed in the buffer to get the no-end set. */ + ATETextDOM::Int32 GetNoEndCharSetSize( ) const; + /** Sets the characters that cannot be used to end this Kinsoku. + @param noEndCharSet The string containing the characters. + @return Nothing. */ + void SetNoEndCharSet( const ATETextDOM::Unicode* noEndCharSet); + /** Retrieves the characters that cannot be used at a break in this Kinsoku. + @param noBreakCharSet [out] A buffer in which to return the no-break character string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetNoBreakCharSet( ATETextDOM::Unicode* noBreakCharSet, ATETextDOM::Int32 maxLength) const; + /** Retrieves the number of characters in the no-break character set of this Kinsoku. + @return The number of characters needed in the buffer to get the no-break set. */ + ATETextDOM::Int32 GetNoBreakCharSetSize( ) const; + /** Sets the characters that cannot be used at a break in this Kinsoku. + @param noBreakCharSet The string containing the characters. + @return Nothing. */ + void SetNoBreakCharSet( const ATETextDOM::Unicode* noBreakCharSet); + /** Retrieves the characters that can be left hanging in this Kinsoku. + @param hangingCharSet [out] A buffer in which to return the hanging character string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetHangingCharSet( ATETextDOM::Unicode* hangingCharSet, ATETextDOM::Int32 maxLength) const; + /** Retrieves the number of characters in the hanging character set of this Kinsoku. + @return The number of characters needed in the buffer to get the hanging set. */ + ATETextDOM::Int32 GetHangingCharSetSize( ) const; + /** Sets the characters that can be left hanging in this Kinsoku. + @param hangingCharSet The string containing the characters. + @return Nothing. */ + void SetHangingCharSet( const ATETextDOM::Unicode* hangingCharSet); + // ======================================================================= + // METHODS + // ======================================================================= + + /** Reports whether a character is in the no-start set of this Kinsoku. + @param character The character. + @return True if this character is in the set. */ + bool IsNoStartChar( ATETextDOM::Unicode character) const; + /** Reports whether a character is in the no-end set of this Kinsoku. + @param character The character. + @return True if this character is in the set. */ + bool IsNoEndChar( ATETextDOM::Unicode character) const; + /** Reports whether a character is in the no-break set of this Kinsoku. + @param character The character. + @return True if this character is in the set. */ + bool IsNoBreakChar( ATETextDOM::Unicode character) const; + /** Reports whether a character is in the hanging set of this Kinsoku. + @param character The character. + @return True if this character is in the set. */ + bool IsHangingChar( ATETextDOM::Unicode character) const; + + /// Does a shallow equivalency test + /// Does a deep equivalency test + /** Reports whether this object represents the same Kinsoku as another Kinsoku object. + @param rhsKinsoku The comparison object. + @return True if the two objects are the same. */ + bool IsEquivalent( IKinsoku rhsKinsoku) const; + /** Reports whether the resource been modified since it became editable. + @return True if the resource has been modified. */ + bool IsModified( ) const; + /** Reports whether this is a predefined Kinsoku. + @return True if the Kinsoku is predefined, false if it is customized. */ + bool IsPredefined( ) const; + /** Creates a new object by duplicating the information in this one. + @return The new object */ + IKinsoku Duplicate( ) const; + +}; + +////////////////////////////////////////////// +// --IKinsokuSet-- +////////////////////////////////////////////// +/** Encapsulates a set of Kinsoku as a text resource. + A Kinsoku set contains a collection of \c IKinsoku objects. */ +class IKinsokuSet +{ +private: + KinsokuSetRef fKinsokuSet; +public: + /** Constructor. + @return The new object. */ + IKinsokuSet(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IKinsokuSet(const IKinsokuSet& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IKinsokuSet& operator=(const IKinsokuSet& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IKinsokuSet& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IKinsokuSet& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param kinsokuset The C object. + @return The new C++ object. */ + explicit IKinsokuSet(KinsokuSetRef kinsokuset); + /** Destructor */ + virtual ~IKinsokuSet(); + /** Retrieves a reference to this object. + @return The object reference. */ + KinsokuSetRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ); + /** Retrieves the first member of this set. + @return The member object. */ + IKinsoku GetFirst( ); + /** Retrieves the last member of this set. + @return The member object. */ + IKinsoku GetLast( ); + + // ======================================================================= + // METHODS + // ======================================================================= + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + IKinsoku Item( ATETextDOM::Int32 nIndex) const; + /** Retrieves a specific Kinsoku object from this set, matching name and data. + @param kinsoku The Kinsoku object. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( IKinsoku kinsoku); + /** Retrieves a specific Kinsoku object from this set, matching only the name. + @param name The name string. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( const ATETextDOM::Unicode* name); + /** Retrieves a specific Kinsoku object from this set, matching a tag. + @param tag The tag. Use \c #kUserDefinedKinsokuTag to get the first + customized (not predefined) Kinsoku. + @return The index position of the object in this set, or -1 + if the object is not in this set. + */ + ATETextDOM::Int32 Find( KinsokuPredefinedTag tag); + /** Removes a member from the set. + @param nIndex The 0-based position index of the member to remove. + @return True if a member was successfully removed. */ + bool Remove( ATETextDOM::Int32 nIndex); + /** Appends a Kinsoku to this set. + @param kinsoku The Kinsoku object. + @return The 0-based position index of the successfully + added object, or the current index of this object + if it is already in the set, or -1 if the object + was not in the set and could not be appended. + */ + ATETextDOM::Int32 Add( IKinsoku kinsoku); + /** Replaces a Kinsoku in this set. + @param nIndex The 0-based position index of the MojiKumi to replace. + @param kinsoku The replacement Kinsoku object. + @return True if an object was successfully replaced. + */ + bool Replace( ATETextDOM::Int32 nIndex, IKinsoku kinsoku); + +}; + +////////////////////////////////////////////// +// --IParaFeatures-- +////////////////////////////////////////////// +/** This class encapsulates the complete set of paragraph attributes that + can be applied to text. An object of this type is contained in an + \c IParaStyle object, and can be associated with a \c ITextRange. + + Attribute values are inherited from the Normal style, and can be overridden + in a named style associated with the text, or at the local text level. + + A style or text range can partially define attributes. Only those values + that are assigned override the inherited values. The constructor creates + an empty object, in which all attribute values are unassigned. + Setting a value causes it to be assigned, and clearing it causes + it to be unassigned. When you retrieve an attribute value, a boolean + return value, \c isAssigned, reports whether that attribute has a local + value in the queried object. + */ +class IParaFeatures +{ +private: + ParaFeaturesRef fParaFeatures; +public: + /** Constructor. Creates an empty object, in which all attributes + are undefined. + @return The new object. */ + IParaFeatures(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IParaFeatures(const IParaFeatures& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IParaFeatures& operator=(const IParaFeatures& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IParaFeatures& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IParaFeatures& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param parafeatures The C object. + @return The new C++ object. */ + explicit IParaFeatures(ParaFeaturesRef parafeatures); + /** Destructor */ + virtual ~IParaFeatures(); + /** Retrieves a reference to this object. + @return The object reference. */ + ParaFeaturesRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + /** Creates a duplicate of this object. + @return The new object. */ + IParaFeatures Clone( ) const; + + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + /** Retrieves the justification attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The justification constant. */ + ParagraphJustification GetJustification( bool* isAssigned) const; + /** Retrieves the first-line indent attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The first-line indent value in document points. */ + ATETextDOM::Real GetFirstLineIndent( bool* isAssigned) const; + /** Retrieves the paragraph start indent attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The start indent value in document points. */ + ATETextDOM::Real GetStartIndent( bool* isAssigned) const; + /** Retrieves the paragraph end indent attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The end indent value in document points. */ + ATETextDOM::Real GetEndIndent( bool* isAssigned) const; + /** Retrieves the line space before attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The line space before value in document points. */ + ATETextDOM::Real GetSpaceBefore( bool* isAssigned) const; + /** Retrieves the line space after attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The line space after value in document points. */ + ATETextDOM::Real GetSpaceAfter( bool* isAssigned) const; + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + /** Retrieves the automatic hyphenation attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if automatic hyphenation is on, false if it is off. */ + bool GetAutoHyphenate( bool* isAssigned) const; + /** Retrieves the hyphenation word size attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The hyphenation word size value (number of characters). */ + ATETextDOM::Int32 GetHyphenatedWordSize( bool* isAssigned) const; + /** Retrieves the pre-hyphen size attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The pre-hyphen size value (number of characters). */ + ATETextDOM::Int32 GetPreHyphenSize( bool* isAssigned) const; + /** Retrieves the post-hyphen size attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The post-hyphen size value (number of characters). */ + ATETextDOM::Int32 GetPostHyphenSize( bool* isAssigned) const; + /** Retrieves the consecutive hyphen limit attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The consecutive hyphen limit value (number of hyphens). */ + ATETextDOM::Int32 GetConsecutiveHyphenLimit( bool* isAssigned) const; + /** Retrieves the hyphenation zone attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The hyphenation zone value in document points. */ + ATETextDOM::Real GetHyphenationZone( bool* isAssigned) const; + /** Retrieves the hyphenation capitalization attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if hyphenation capitalization is on, false if it is off. */ + bool GetHyphenateCapitalized( bool* isAssigned) const; + /** Retrieves the hyphenation preference attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The hyphenation preference value. */ + ATETextDOM::Real GetHyphenationPreference( bool* isAssigned) const; + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + /** Retrieves the desired word spacing attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The desired word spacing value, in document points. */ + ATETextDOM::Real GetDesiredWordSpacing( bool* isAssigned) const; + /** Retrieves the maximum word spacing attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The maximum word spacing value, in document points. */ + ATETextDOM::Real GetMaxWordSpacing( bool* isAssigned) const; + /** Retrieves the minimum word spacing attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The minimum word spacing value, in document points. */ + ATETextDOM::Real GetMinWordSpacing( bool* isAssigned) const; + /** Retrieves the desired letter spacing attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The desired letter spacing value, in document points. */ + ATETextDOM::Real GetDesiredLetterSpacing( bool* isAssigned) const; + /** Retrieves the maximum letter spacing attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The maximum letter spacing value, in document points. */ + ATETextDOM::Real GetMaxLetterSpacing( bool* isAssigned) const; + /** Retrieves the minimum letter spacing attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The minimum letter spacing value, in document points. */ + ATETextDOM::Real GetMinLetterSpacing( bool* isAssigned) const; + /** Retrieves the desired glyph scaling attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The desired glyph scaling value, where 1 is 100%. */ + ATETextDOM::Real GetDesiredGlyphScaling( bool* isAssigned) const; + /** Retrieves the maximum glyph scaling attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The maximum glyph scaling value, where 1 is 100%. */ + ATETextDOM::Real GetMaxGlyphScaling( bool* isAssigned) const; + /** Retrieves the minimum glyph scaling attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The minimum glyph scaling value, where 1 is 100%. */ + ATETextDOM::Real GetMinGlyphScaling( bool* isAssigned) const; + /** Retrieves the single-word justification attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The single-word justification type constant. */ + ParagraphJustification GetSingleWordJustification( bool* isAssigned) const; + /** Retrieves the automatic leading percentage attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return Theautomatic leading percentage value, where 1 is 100%. */ + ATETextDOM::Real GetAutoLeadingPercentage( bool* isAssigned) const; + /** Retrieves the leading type attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The leading type constant. */ + LeadingType GetLeadingType( bool* isAssigned) const; + /** Retrieves the tab stops attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The tab stops object. */ + ITabStops GetTabStops( bool* isAssigned) const; + /** Retrieves the default tab width attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The default tab width value, in document points. */ + ATETextDOM::Real GetDefaultTabWidth( bool* isAssigned) const; + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + /** Retrieves the Japanese hanging Roman attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if hanging Roman is on, false if it is off. */ + bool GetHangingRoman( bool* isAssigned) const; + /** Retrieves the Japanese automatic Tate Chu Yoko attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The automatic Tate Chu Yoko value. */ + ATETextDOM::Int32 GetAutoTCY( bool* isAssigned) const; + /** Retrieves the Japanese Bunri Kinshi attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if Bunri Kinshi is on, false if it is off. */ + bool GetBunriKinshi( bool* isAssigned) const; + /** Retrieves the Japanese Burasagari type attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The Burasagari type constant. */ + BurasagariType GetBurasagariType( bool* isAssigned) const; + /** Retrieves the Japanese preferred Kinsoku order attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The preferred Kinsoku order constant. */ + PreferredKinsokuOrder GetPreferredKinsokuOrder( bool* isAssigned) const; + /** Retrieves the Japanese Kurikaeshi Moji Shori attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if Kurikaeshi Moji Shori is on, false if it is off. */ + bool GetKurikaeshiMojiShori( bool* isAssigned) const; + /** Retrieves the Kinsoku attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The Kinsoku object, or a \c NULL object if Kinsoku is not used. */ + IKinsoku GetKinsoku( bool* isAssigned) const; + /** Retrieves the ListStyle attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The ListStyle object, or a \c NULL object if ListStyle is not used. */ + IListStyle GetListStyle( bool* isAssigned) const; + /** Retrieves the MojiKumi attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The MojiKumi object, or a \c NULL object if MojiKumi is not used. */ + IMojiKumi GetMojiKumi( bool* isAssigned) const; + // ------------------------------------------------------------------ + // Other Features + // ------------------------------------------------------------------ + /** Retrieves the every-line composer attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return True if every-line composer is on, false if it is off. */ + bool GetEveryLineComposer( bool* isAssigned) const; + /** Retrieves the default character features attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The character features object. */ + ICharFeatures GetDefaultCharFeatures( bool* isAssigned) const; + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + // ------------------------------------------------------------------ + // Complex Script Features + // ------------------------------------------------------------------ + /** Retrieves the main writing direction attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The paragragh direction object. + */ + ATE::ParagraphDirection GetParagraphDirection( bool* isAssigned) const; + /** Retrieves the justification method attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The justification method object. + */ + ATE::JustificationMethod GetJustificationMethod( bool* isAssigned) const; + /** Retrieves the Kashida Width attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The Kashida Width object. + */ + ATE::KashidaWidth GetKashidaWidth( bool* isAssigned) const; +#endif + /** Retrieves the composer engine attribute of this paragraph. + @param isAssigned [out] A buffer in which to return + true if this attribute has a local value. + @return The composer engine object. + */ + ATE::ComposerEngine GetComposerEngine( bool* isAssigned ) const; + + // ====================================================================== + // SET PROPERTIES + // ====================================================================== + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + /** Sets the local justification attribute of this paragraph. + @param newVal The new justification constant. + @return Nothing. */ + void SetJustification( ParagraphJustification newVal); + /** Sets the local first-line indent attribute of this paragraph. + @param newVal The new first-line indent value, in document points. + @return Nothing. */ + void SetFirstLineIndent( ATETextDOM::Real newVal); + /** Sets the local start indent attribute of this paragraph. + @param newVal The new start indent value, in document points. + @return Nothing. */ + void SetStartIndent( ATETextDOM::Real newVal); + /** Sets the local end indent attribute of this paragraph. + @param newVal The new end indent value, in document points. + @return Nothing. */ + void SetEndIndent( ATETextDOM::Real newVal); + /** Sets the local line space before attribute of this paragraph. + @param newVal The new line space before value, in document points. + @return Nothing. */ + void SetSpaceBefore( ATETextDOM::Real newVal); + /** Sets the local line space after attribute of this paragraph. + @param newVal The new line space after value, in document points. + @return Nothing. */ + void SetSpaceAfter( ATETextDOM::Real newVal); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + /** Sets the local automatic hyphenation attribute of this paragraph. + @param newVal True to turn automatic hyphenation on, false to turn it off. + @return Nothing. */ + void SetAutoHyphenate( bool newVal); + /** Sets the local hyphenated word size attribute of this paragraph. + @param newVal The new hyphenated word size value, in characters. + @return Nothing. */ + void SetHyphenatedWordSize( ATETextDOM::Int32 newVal); + /** Sets the local pre-hyphen size attribute of this paragraph. + @param newVal The new pre-hyphen size value, in characters. + @return Nothing. */ + void SetPreHyphenSize( ATETextDOM::Int32 newVal); + /** Sets the local post-hyphen size attribute of this paragraph. + @param newVal The new post-hyphen size value, in characters. + @return Nothing. */ + void SetPostHyphenSize( ATETextDOM::Int32 newVal); + /** Sets the local consecutive hyphen limit attribute of this paragraph. + @param newVal The new consecutive hyphen limit value, a number of hyphens. + @return Nothing. */ + void SetConsecutiveHyphenLimit( ATETextDOM::Int32 newVal); + /** Sets the local hyphenation zone attribute of this paragraph. + @param newVal The new hyphenation zone value, in document points. + @return Nothing. */ + void SetHyphenationZone( ATETextDOM::Real newVal); + /** Sets the local hyphenation capitalized attribute of this paragraph. + @param newVal True to turn hyphenation capitalized on, false to turn it off. + @return Nothing. */ + void SetHyphenateCapitalized( bool newVal); + /** Sets the local hyphenation preference attribute of this paragraph. + @param newVal The new hyphenation preference value. + @return Nothing. */ + void SetHyphenationPreference( ATETextDOM::Real newVal); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + /** Sets the local desired word spacing attribute of this paragraph. + @param newVal The new desired word spacing value, in document points. + @return Nothing. */ + void SetDesiredWordSpacing( ATETextDOM::Real newVal); + /** Sets the local maximum word spacing attribute of this paragraph. + @param newVal The new maximum word spacing value, in document points. + @return Nothing. */ + void SetMaxWordSpacing( ATETextDOM::Real newVal); + /** Sets the local minimum word spacing attribute of this paragraph. + @param newVal The new minimum word spacing value, in document points. + @return Nothing. */ + void SetMinWordSpacing( ATETextDOM::Real newVal); + /** Sets the local desired letter spacing attribute of this paragraph. + @param newVal The new desired letter spacing value, in document points. + @return Nothing. */ + void SetDesiredLetterSpacing( ATETextDOM::Real newVal); + /** Sets the local maximum letter spacing attribute of this paragraph. + @param newVal The new maximum letter spacing value, in document points. + @return Nothing. */ + void SetMaxLetterSpacing( ATETextDOM::Real newVal); + /** Sets the local minimum letter spacing attribute of this paragraph. + @param newVal The new minimum letter spacing value, in document points. + @return Nothing. */ + void SetMinLetterSpacing( ATETextDOM::Real newVal); + /** Sets the local desired glyph scaling attribute of this paragraph. + @param newVal The new desired glyph scaling value, where 1 is 100%. + @return Nothing. */ + void SetDesiredGlyphScaling( ATETextDOM::Real newVal); + /** Sets the local maximum glyph scaling attribute of this paragraph. + @param newVal The new maximum glyph scaling value, where 1 is 100%. + @return Nothing. */ + void SetMaxGlyphScaling( ATETextDOM::Real newVal); + /** Sets the local minimum glyph scaling attribute of this paragraph. + @param newVal The new minimum glyph scaling value, where 1 is 100%. + @return Nothing. */ + void SetMinGlyphScaling( ATETextDOM::Real newVal); + /** Sets the local single-word justification attribute of this paragraph. + @param newVal The new single-word justification type constant. + @return Nothing. */ + void SetSingleWordJustification( ParagraphJustification newVal); + /** Sets the local automatic leading percentage attribute of this paragraph. + @param newVal The new automatic leading percentage value, where 1 is 100%. + @return Nothing. */ + void SetAutoLeadingPercentage( ATETextDOM::Real newVal); + /** Sets the local leading type attribute of this paragraph. + @param newVal The new leading type constant. + @return Nothing. */ + void SetLeadingType( LeadingType newVal); + /** Sets the local tab stops attribute of this paragraph. + @param newVal The new tab stops object. + @return Nothing. */ + void SetTabStops( ITabStops newVal); + /** Sets the local default tab width attribute of this paragraph. + @param newVal The new default tab width value, in document points. + @return Nothing. */ + void SetDefaultTabWidth( ATETextDOM::Real newVal); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + /** Sets the local Japanese hanging Roman attribute of this paragraph. + @param newVal True to turn hanging Roman on, false to turn it off. + @return Nothing. */ + void SetHangingRoman( bool newVal); + /** Sets the local automatic Tate Chu Yoko attribute of this paragraph. + @param newVal The new automatic Tate Chu Yoko value. + @return Nothing. */ + void SetAutoTCY( ATETextDOM::Int32 newVal); + /** Sets the local Bunri Kinshi attribute of this paragraph. + @param newVal True to turn Bunri Kinshi on, false to turn it off. + @return Nothing. */ + void SetBunriKinshi( bool newVal); + /** Sets the local Burasagari type attribute of this paragraph. + @param newVal The new Burasagari type constant. + @return Nothing. */ + void SetBurasagariType( BurasagariType newVal); + /** Sets the local preferred Kinsoku order attribute of this paragraph. + @param newVal The new preferred Kinsoku order constant. + @return Nothing. */ + void SetPreferredKinsokuOrder( PreferredKinsokuOrder newVal); + /** Sets the local Kurikaeshi Moji Shori attribute of this paragraph. + @param newVal True to turn Kurikaeshi Moji Shori on, false to turn it off. + @return Nothing. */ + void SetKurikaeshiMojiShori( bool newVal); + /** Sets the local Kinsoku attribute of this paragraph. + @param newVal The new Kinsoku object. + @return Nothing. */ + void SetKinsoku( IKinsoku newVal); + /** Sets the local ListStyle attribute of this paragraph. + @param newVal The new ListStyle object. + @return Nothing. */ + void SetListStyle( IListStyle newVal); + /** Sets the local Moji Kumi attribute of this paragraph. + @param newVal The new Moji Kumi object. + @return Nothing. */ + void SetMojiKumi( IMojiKumi newVal); + // ------------------------------------------------------------------ + // Other Features + // ------------------------------------------------------------------ + /** Sets the local every-line composer attribute of this paragraph. + @param newVal True to turn every-line composer on, false to turn it off. + @return Nothing. */ + void SetEveryLineComposer( bool newVal); + /** Sets the local default character features attribute of this paragraph. + @param newVal The new default character features object. + @return Nothing. */ + void SetDefaultCharFeatures( ICharFeatures newVal); + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + // ------------------------------------------------------------------ + // Complex Script Features + // ------------------------------------------------------------------ + /** Sets the main writing direction attribute of this paragraph. + @param newVal The new paragraph direction object. + @return Nothing. + */ + void SetParagraphDirection( ATE::ParagraphDirection newVal); + /** Sets the justification method attribute of this paragraph. + @param newVal The new justification method object. + @return Nothing. + */ + void SetJustificationMethod( ATE::JustificationMethod newVal); + /** Sets the Kashida Width attribute of this paragraph. + @param newVal The new kashida width object. + @return Nothing. + */ + void SetKashidaWidth( ATE::KashidaWidth newVal); +#endif + /** Sets the composer engine attribute of this paragraph. + @param newVal The new composer engine object. + @return Nothing. + */ + void SetComposerEngine( ATE::ComposerEngine newVal); + + // ====================================================================== + // CLEAR PROPERTIES + // ====================================================================== + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + /** Removes the local justification attribute value of this paragraph. + @return Nothing. */ + void ClearJustification( ); + /** Removes the local first-line indent attribute value of this paragraph. + @return Nothing. */ + void ClearFirstLineIndent( ); + /** Removes the local start indent attribute value of this paragraph. + @return Nothing. */ + void ClearStartIndent( ); + /** Removes the local end indent attribute value of this paragraph. + @return Nothing. */ + void ClearEndIndent( ); + /** Removes the local line space before attribute value of this paragraph. + @return Nothing. */ + void ClearSpaceBefore( ); + /** Removes the local line space after attribute value of this paragraph. + @return Nothing. */ + void ClearSpaceAfter( ); + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + /** Removes the local automatic hyphenation attribute value of this paragraph. + @return Nothing. */ + void ClearAutoHyphenate( ); + /** Removes the local hyphenation word size attribute value of this paragraph. + @return Nothing. */ + void ClearHyphenatedWordSize( ); + /** Removes the local pre-hyphen size attribute value of this paragraph. + @return Nothing. */ + void ClearPreHyphenSize( ); + /** Removes the local post-hyphen size attribute value of this paragraph. + @return Nothing. */ + void ClearPostHyphenSize( ); + /** Removes the local consecutive hyphen limit attribute value of this paragraph. + @return Nothing. */ + void ClearConsecutiveHyphenLimit( ); + /** Removes the local hyphenation zone attribute value of this paragraph. + @return Nothing. */ + void ClearHyphenationZone( ); + /** Removes the local hyphenate capitalized attribute value of this paragraph. + @return Nothing. */ + void ClearHyphenateCapitalized( ); + /** Removes the local hyphenation preference attribute value of this paragraph. + @return Nothing. */ + void ClearHyphenationPreference( ); + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + /** Removes all of the local word spacing attribute values of this paragraph. + @return Nothing. */ + void ClearWordSpacing( ); + /** Removes all of the local letter spacing attribute values of this paragraph. + @return Nothing. */ + void ClearLetterSpacing( ); + /** Removes all of the local glyph scaling attribute values of this paragraph. + @return Nothing. */ + void ClearGlyphScaling( ); + /** Removes the local single-word justification attribute value of this paragraph. + @return Nothing. */ + void ClearSingleWordJustification( ); + /** Removes the local automatic leading percentage attribute value of this paragraph. + @return Nothing. */ + void ClearAutoLeadingPercentage( ); + /** Removes the local leading type attribute value of this paragraph. + @return Nothing. */ + void ClearLeadingType( ); + /** Removes the local tab stops attribute value of this paragraph. + @return Nothing. */ + void ClearTabStops( ); + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + /** Removes the local Japanese hanging Roman attribute value of this paragraph. + @return Nothing. */ + void ClearHangingRoman( ); + /** Removes the local automatic Tate Chu Yoko attribute value of this paragraph. + @return Nothing. */ + void ClearAutoTCY( ); + /** Removes the local Bunri Kinshi attribute value of this paragraph. + @return Nothing. */ + void ClearBunriKinshi( ); + /** Removes the local Burasagari type attribute value of this paragraph. + @return Nothing. */ + void ClearBurasagariType( ); + /** Removes the local preferred Kinsoku order attribute value of this paragraph. + @return Nothing. */ + void ClearPreferredKinsokuOrder( ); + /** Removes the local Kurikaeshi Moji Shori attribute value of this paragraph. + @return Nothing. */ + void ClearKurikaeshiMojiShori( ); + /** Removes the local Kinsoku attribute value of this paragraph. + @return Nothing. */ + void ClearKinsoku( ); + /** Removes the local ListStyle attribute value of this paragraph. + @return Nothing. */ + void ClearListStyle( ); + /** Removes the local Moji Kumi attribute value of this paragraph. + @return Nothing. */ + void ClearMojiKumi( ); + // ------------------------------------------------------------------ + // Other Features + // ------------------------------------------------------------------ + /** Removes the local every-line composer attribute value of this paragraph. + @return Nothing. */ + void ClearEveryLineComposer( ); + /** Removes the local default character features attribute value of this paragraph. + @return Nothing. */ + void ClearDefaultCharFeatures( ); + +#if SLO_COMPLEXSCRIPT // Available for use in Middle Eastern versions of the product only. + // ------------------------------------------------------------------ + // Complex Script Features + // ------------------------------------------------------------------ + /** Removes the main writing direction attribute value of this paragraph. + @return Nothing. + */ + void ClearParagraphDirection( ); + /** Removes the justification method attribute value of this paragraph. + @return Nothing. + */ + void ClearJustificationMethod( ); + /** Removes the kashida width attribute value of this paragraph. + @return Nothing. + */ + void ClearKashidaWidth( ); +#endif + /** Removes the composer engine attribute value of this paragraph. + @return Nothing. + */ + void ClearComposerEngine( ); + + //////////////////////////////////////////////////////////////////////////// + // ALGEBRA METHODS + //////////////////////////////////////////////////////////////////////////// + + /** Clears any attributes in this object whose values are + not the same as or are unassigned in the comparison object. + The only values that remain are those that match + the corresponding value in the comparison object. + @param rhs Right-hand side of comparison. + @return True if changes were made. */ + bool IntersectFeatures( IParaFeatures rhs); + /** Sets any attributes in this object whose values are + assigned in the comparison object to those values. + @param rhs Right-hand side of comparison. + @return True if changes were made. */ + bool ReplaceOrAddFeatures( IParaFeatures rhs); + /** Clears any attributes in this object whose values are the + same as in the comparison object. + @param rhs Right-hand side of comparison. + @return True if changes were made. */ + bool UnassignEachIfEqual( const IParaFeatures rhs); + + /** Reports whether all attributes of this object are unassigned. + @return True if no attributes have local values. */ + bool IsEachNotAssigned( ) const; + /** Reports whether all attributes of this object are assigned. + @return True if all attributes have local values. */ + bool IsEachAssigned( ) const; + +}; + +////////////////////////////////////////////// +// --IParagraph-- +////////////////////////////////////////////// +/** This class encapsulates a paragraph of text, to which a + paragraph style (\c IParaStyle) can be applied. + Paragraphs are contained in stories. + Use an \c IParagraphsIterator object to iterate through + paragraphs in a set of stories. + + Use an \c IParaInspector object to retrieve the + paragraph features that apply to a specific paragraph, + after considering all inherited style values and local overrides. + */ +class IParagraph +{ +private: + ParagraphRef fParagraph; +public: + /** Constructor. + @return The new object. */ + IParagraph(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IParagraph(const IParagraph& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IParagraph& operator=(const IParagraph& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IParagraph& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IParagraph& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param paragraph The C object. + @return The new C++ object. */ + explicit IParagraph(ParagraphRef paragraph); + /** Destructor */ + virtual ~IParagraph(); + /** Retrieves a reference to this object. + @return The object reference. */ + ParagraphRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + /** Retrieves the length of this paragraph. + @return The number of characters in this paragraph. */ + ATETextDOM::Int32 GetLength( ); + // navigation objects. + /** Retrieves the story that contains this paragraph + @return The story object. */ + IStory GetStory( ); + /** Retrieves the text range corresponding to this paragraph + @return The text range object. */ + ITextRange GetTextRange( ); + /** Retrieves the set of text ranges corresponding to this paragraph + @return The text ranges object. */ + ITextRanges GetTextRanges( ); + /** Retrieves the text selection in this paragraph. + @return The text range set object. */ + ITextRanges GetTextSelection( ); + /** Creates an iteration object with which to access the words in this paragraph. + @return The word iterator object. */ + IWordsIterator GetWordsIterator( ); + // ======================================================================== + // METHODS + // ======================================================================== + /** Retrieves the paragraph after this one in the containing story. + @return The paragraph object. */ + IParagraph GetNext( ); + /** Retrieves the paragraph before this one in the containing story. + @return The paragraph object. */ + IParagraph GetPrev( ); + /** Retrieves the text contents of this paragraph as a Unicode string. + @param text [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + */ + ATETextDOM::ATETextDomErr GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength); + /** Retrieves the text contents of this paragraph as a C string. + @param text [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + */ + ATETextDOM::ATETextDomErr GetContents( char* text, ATETextDOM::Int32 maxLength); + +}; + +////////////////////////////////////////////// +// --IParagraphsIterator-- +////////////////////////////////////////////// +/** This class allows you to iterate through a set of paragraphs contained in + a set of story objects or text ranges. Retrieve the iteration object + with \c IStories::GetParagraphsIterator(), or create one + from a set of text ranges (\c ITextRanges). Use it to access + the \c IParagraph objects in the document's text. +*/ +class IParagraphsIterator +{ +private: + ParagraphsIteratorRef fParagraphsIterator; +public: + /** Constructor. + @return The new object. */ + IParagraphsIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IParagraphsIterator(const IParagraphsIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IParagraphsIterator& operator=(const IParagraphsIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IParagraphsIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IParagraphsIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param paragraphsiterator The C object. + @return The new C++ object. */ + explicit IParagraphsIterator(ParagraphsIteratorRef paragraphsiterator); + /** Destructor */ + virtual ~IParagraphsIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + ParagraphsIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates a paragraph iterator for a specific text-range set + that is ordered first-to-last or last-to-first. + @param ranges The text-range set object. + @param direction Optional. The order of iteration. Default is first-to-last. + @return The new iterator object. + */ + IParagraphsIterator( ITextRanges ranges, Direction direction = kForward); + //------------------------------------------------------ + // Methods + //------------------------------------------------------ + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Sets the current position to the first member of this set. + @return Nothing. */ + void MoveToFirst( ); + /** Sets the current position to the last member of this set. + @return Nothing. */ + void MoveToLast( ); + /** Increments the current position in this set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Retrieves the current paragraph. + @return The paragraph object. */ + IParagraph Item( ); + +}; + +////////////////////////////////////////////// +// --IParaInspector-- +////////////////////////////////////////////// +/** This class allows you to retrieve the + paragraph features that apply to a specific paragraph, + after considering all inherited style values and local overrides. + + Obtain an \c IParaInspector object from a text range or set of text + ranges. See \c ITextRange::GetParaInspector(). + + The methods collect the values of a particular attribute into + an array whose order is the same as the order of paragraphs in the text. +*/ +class IParaInspector +{ +private: + ParaInspectorRef fParaInspector; +public: + /** Constructor. + @return The new object. */ + IParaInspector(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IParaInspector(const IParaInspector& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IParaInspector& operator=(const IParaInspector& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IParaInspector& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IParaInspector& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param parainspector The C object. + @return The new C++ object. */ + explicit IParaInspector(ParaInspectorRef parainspector); + /** Destructor */ + virtual ~IParaInspector(); + /** Retrieves a reference to this object. + @return The object reference. */ + ParaInspectorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ------------------------------------------------------------------ + // Justification + // ------------------------------------------------------------------ + /** Retrieves the justification values from the paragraph set. + @return The array object containing the values. */ + IArrayParagraphJustification GetJustification( ) const; + /** Retrieves the first-line indent values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetFirstLineIndent( ) const; + /** Retrieves the start indent values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetStartIndent( ) const; + /** Retrieves the end indent values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetEndIndent( ) const; + /** Retrieves the line space before values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetSpaceBefore( ) const; + /** Retrieves the line space after values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetSpaceAfter( ) const; + // ------------------------------------------------------------------ + // Hyphenation + // ------------------------------------------------------------------ + /** Retrieves the automatic hyphenation values from the paragraph set. + @return The array object containing the values. */ + IArrayBool GetAutoHyphenate( ) const; + /** Retrieves the hyphenated word size values from the paragraph set. + @return The array object containing the values. */ + IArrayInteger GetHyphenatedWordSize( ) const; + /** Retrieves the pre-hyphen size values from the paragraph set. + @return The array object containing the values. */ + IArrayInteger GetPreHyphenSize( ) const; + /** Retrieves the post-hyphen size values from the paragraph set. + @return The array object containing the values. */ + IArrayInteger GetPostHyphenSize( ) const; + /** Retrieves the consecutive hyphen limit values from the paragraph set. + @return The array object containing the values. */ + IArrayInteger GetConsecutiveHyphenLimit( ) const; + /** Retrieves the hyphenation zone values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetHyphenationZone( ) const; + /** Retrieves the hyphenate capitalized values from the paragraph set. + @return The array object containing the values. */ + IArrayBool GetHyphenateCapitalized( ) const; + /** Retrieves the hyphenation preference values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetHyphenationPreference( ) const; + // ------------------------------------------------------------------ + // Justification Features + // ------------------------------------------------------------------ + /** Retrieves the desired word spacing values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetDesiredWordSpacing( ) const; + /** Retrieves the maximum word spacing values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetMaxWordSpacing( ) const; + /** Retrieves the minimum word spacing values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetMinWordSpacing( ) const; + /** Retrieves the desired letter spacing values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetDesiredLetterSpacing( ) const; + /** Retrieves the maximum letter spacing values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetMaxLetterSpacing( ) const; + /** Retrieves the minimum letter spacing values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetMinLetterSpacing( ) const; + /** Retrieves the desired glyph scaling values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetDesiredGlyphScaling( ) const; + /** Retrieves the maximum glyph scaling values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetMaxGlyphScaling( ) const; + /** Retrieves the minimum glyph scaling values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetMinGlyphScaling( ) const; + /** Retrieves the single-word justification values from the paragraph set. + @return The array object containing the values. */ + IArrayParagraphJustification GetSingleWordJustification( ) const; + /** Retrieves the automatic leading percentage values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetAutoLeadingPercentage( ) const; + /** Retrieves the leading type values from the paragraph set. + @return The array object containing the values. */ + IArrayLeadingType GetLeadingType( ) const; + /** Retrieves the tab stops values from the paragraph set. + @return The array object containing the values. */ + IArrayTabStopsRef GetTabStops( ) const; + /** Retrieves the tab width values from the paragraph set. + @return The array object containing the values. */ + IArrayReal GetDefaultTabWidth( ) const; + // ------------------------------------------------------------------ + // Japanese Features + // ------------------------------------------------------------------ + /** Retrieves the Japanese hanging Roman values from the paragraph set. + @return The array object containing the values. */ + IArrayBool GetHangingRoman( ) const; + /** Retrieves the automatic Tate Chu Yoko values from the paragraph set. + @return The array object containing the values. */ + IArrayInteger GetAutoTCY( ) const; + /** Retrieves the Bunri Kinshi values from the paragraph set. + @return The array object containing the values. */ + IArrayBool GetBunriKinshi( ) const; + /** Retrieves the Burasagari type values from the paragraph set. + @return The array object containing the values. */ + IArrayBurasagariType GetBurasagariType( ) const; + /** Retrieves the preferred Kinsoku order values from the paragraph set. + @return The array object containing the values. */ + IArrayPreferredKinsokuOrder GetPreferredKinsokuOrder( ) const; + /** Retrieves the Kurikaeshi Moji Shori values from the paragraph set. + @return The array object containing the values. */ + IArrayBool GetKurikaeshiMojiShori( ) const; + /** Retrieves the Kinsoku values from the paragraph set. + @return The array object containing the values. */ + IArrayKinsokuRef GetKinsoku( ) const; + /** Retrieves the ListStyle values from the paragraph set. + @return The array object containing the values. */ + IArrayListStyleRef GetListStyle( ) const; + /** Retrieves the Moji Kumi values from the paragraph set. + @return The array object containing the values. */ + IArrayMojiKumiRef GetMojiKumi( ) const; + // ------------------------------------------------------------------ + // Other Features + // ------------------------------------------------------------------ + /** Retrieves the every-line composer values from the paragraph set. + @return The array object containing the values. */ + IArrayBool GetEveryLineComposer( ) const; + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + // ------------------------------------------------------------------ + // Complex Script Features + // ------------------------------------------------------------------ + /** Retrieves the main writing direction values from the paragraph set. + @return The array object containing the values. + */ + IArrayParagraphDirection GetParagraphDirection( ) const; + /** Retrieves the justification method values from the paragraph set. + @return The array object containing the values. + */ + IArrayJustificationMethod GetJustificationMethod( ) const; + /** Retrieves the Kashida Width values from the paragraph set. + @return The array object containing the values. + */ + IArrayKashidaWidth GetKashidaWidth( ) const; +#endif + /** Retrieves the composer engine values from the paragraph set. + @return The array object containing the values. + */ + IArrayComposerEngine GetComposerEngine( ) const; + +}; + +////////////////////////////////////////////// +// --IParaStyle-- +////////////////////////////////////////////// +/** This class encapsulates a named paragraph style, which can be + applied to a paragraph or set of paragraphs. It contains an \c IParaFeatures + object, which defines the paragraph attributes for this style. + + Attribute values are inherited from the Normal style, and can be overridden + in a named style associated with a story or text range, or at the + local paragraph level. + + A style or paragraph can partially define attributes. Only those values + that are assigned override the inherited values. The constructor creates + an empty object, in which all attribute values are unassigned. + Setting a value causes it to be assigned, and clearing it causes + it to be unassigned. When you retrieve an attribute value, a boolean + return value, \c isAssigned, reports whether that attribute has a local + value in the queried object. + */ +class IParaStyle +{ +private: + ParaStyleRef fParaStyle; +public: + /** Constructor. + @return The new object. */ + IParaStyle(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IParaStyle(const IParaStyle& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IParaStyle& operator=(const IParaStyle& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IParaStyle& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IParaStyle& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param parastyle The C object. + @return The new C++ object. */ + explicit IParaStyle(ParaStyleRef parastyle); + /** Destructor */ + virtual ~IParaStyle(); + /** Retrieves a reference to this object. + @return The object reference. */ + ParaStyleRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Retrieves the name of this style. + @param pName [out] A buffer in which to return the name string. + @param maxLength [in, out] The number of characters in the buffer. + @return The length of the returned string, or 0 if an error occurred. + */ + ATETextDOM::Int32 GetName( ATETextDOM::Unicode* pName, ATETextDOM::Int32 maxLength) const; + /** Sets the name of this style. + @param pName The new, \c NULL terminated name string. + @return True if the name was set successfully, false if a style + already has the specified name or if the name string is empty. + */ + bool SetName( const ATETextDOM::Unicode* pName); + /** Retrieves the parent style of this style. + @return The style object, or a \c NULL object for the Normal (root) style. + */ + IParaStyle GetParent( ) const; + /** Sets the parent style of this style. + @param pStyle The new parent style object, + @return True if the parent was set successfully, false if + this is the Normal (root) style. + */ + bool SetParent( const IParaStyle pStyle); + /** Reports whether this style has a parent. + @return True if this style has a parent, false if this is the Normal (root) style. + */ + bool HasParent( ) const; + /** Retrieves the features defined for this style. + @return The paragraph features object. + */ + IParaFeatures GetFeatures( ) const; + /** Sets the features defined for this style. For the Normal (root) style, + this is the same as \c #ReplaceOrAddFeatures(). For all other + styles, the new feature set completely replaces the old feature set. + @param pFeatures The new paragraph features object. + @return Nothing. + */ + void SetFeatures( IParaFeatures pFeatures); + /** Sets attribute values of this style's feature set to those values that + are specifically assigned in the replacement feature set. Those values + that are unassigned in the replacement set remain unchanged in this + style. + @param pFeatures The replacement paragraph features object. + @return Nothing. + */ + void ReplaceOrAddFeatures( IParaFeatures pFeatures); + +}; + +////////////////////////////////////////////// +// --IParaStyles-- +////////////////////////////////////////////// +/** Encapsulates a set of paragraph styles as a text resource. + A style set contains a collection of \c IParaStyle objects. + Use an \c IParaStylesIterator object to iterate through the set. + */ +class IParaStyles +{ +private: + ParaStylesRef fParaStyles; +public: + /** Constructor. + @return The new object. */ + IParaStyles(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IParaStyles(const IParaStyles& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IParaStyles& operator=(const IParaStyles& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IParaStyles& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IParaStyles& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param parastyles The C object. + @return The new C++ object. */ + explicit IParaStyles(ParaStylesRef parastyles); + /** Destructor */ + virtual ~IParaStyles(); + /** Retrieves a reference to this object. + @return The object reference. */ + ParaStylesRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + //------------------------------------------------------ + // Methods + //------------------------------------------------------ + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Shows all styles. + @return Nothing. + @see \c #ShowOnlyUnreferencedStyles(), \c #ShowOnlyStylesReferencedIn() + */ + void ShowAllStyles( ) const; + /** Shows only styles to which there are not references in text. + @return Nothing. + @see \c #ShowAllStyles(), \c #ShowOnlyStylesReferencedIn() + */ + void ShowOnlyUnreferencedStyles( ) const; + /** Shows only styles that are used in a text range. + @param pRange The text range object. + @return Nothing. + @see \c #ShowAllStyles(), \c #ShowOnlyUnreferencedStyles() + */ + void ShowOnlyStylesReferencedIn( ITextRange pRange) const; + /** Reorders styles in this set by moving a style to a given position. + @param pStyle The style object. + @param position The new 0-based position index. + @return Nothing. + */ + void MoveStyleTo( IParaStyle pStyle, ATETextDOM::Int32 position); + +}; + +////////////////////////////////////////////// +// --IParaStylesIterator-- +////////////////////////////////////////////// +/** This class allows you to iterate through a set of paragraph styles. + Create the iterator object from a \c IParaStyles object. + Use it to access the \c IParaStyle objects in the collection. +*/ +class IParaStylesIterator +{ +private: + ParaStylesIteratorRef fParaStylesIterator; +public: + /** Constructor. + @return The new object. */ + IParaStylesIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IParaStylesIterator(const IParaStylesIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IParaStylesIterator& operator=(const IParaStylesIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IParaStylesIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IParaStylesIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param parastylesiterator The C object. + @return The new C++ object. */ + explicit IParaStylesIterator(ParaStylesIteratorRef parastylesiterator); + /** Destructor */ + virtual ~IParaStylesIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + ParaStylesIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates an iterator object for a specific paragraph style set + that is ordered first-to-last or last-to-first. + @param paraStyles The paragraph style set object. + @param direction Optional. The order of iteration. Default is first-to-last. + @return The new iterator object. + */ + IParaStylesIterator( IParaStyles paraStyles, Direction direction = kForward); + //------------------------------------------------------ + // Methods + //------------------------------------------------------ + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Sets the current position to the first member of this set. + @return Nothing. */ + void MoveToFirst( ); + /** Sets the current position to the last member of this set. + @return Nothing. */ + void MoveToLast( ); + /** Increments the current position in this set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Decrements the current position in this set. + @return Nothing. */ + void Previous( ); + /** Retrieves the current paragraph style. + @return The paragraph style object. */ + IParaStyle Item( ) const; + +}; + +////////////////////////////////////////////// +// --ISpell-- +////////////////////////////////////////////// +/** This class allows you to configure and execute spell-checks + within a document, story, or text range. Use the object to + perform searches for unknown words, replace them with corrected words, + and maintain associated dictionaries and word lists. + + To implement a replace-all operation, + \li Save the current text object and search state, using + \c #GetSearchRange() and \c #GetPreReplaceAllSettings(). + \li Loop through the text objects, and use \c #FindReplaceAllWord() to find all instances + of the target word in the current text object. Keep calling until the method + returns false, making sure to set the \c firstTimeInThisObject flag as needed. + When the method returns a text range, select it and call \c #ReplaceSelected(). + + \li When the operation is complete, restore the text object using \c #SetSearchRange(), + then restore the position and sentence-end flag using \c #RestorePreReplaceAllSettings(). + You must do it in this order, because \c #SetSearchRange() resets the flag. + */ +class ISpell +{ +private: + SpellRef fSpell; +public: + /** Constructor. + @return The new object. */ + ISpell(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ISpell(const ISpell& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ISpell& operator=(const ISpell& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ISpell& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ISpell& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param spell The C object. + @return The new C++ object. */ + explicit ISpell(SpellRef spell); + /** Destructor */ + virtual ~ISpell(); + /** Retrieves a reference to this object. + @return The object reference. */ + SpellRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // Options + // ======================================================================== + /** Initializes this spell-check object with a directory. + @return Nothing*/ + void Initialize( ); + /** Reports whether this spell-check object has been initialized. + @return True if this object has been initialized. */ + bool IsInitialized( ); + /** Reports whether this spell-check ignores words that are all uppercase. + @return True if this spell-check ignores words that are all uppercase. */ + bool GetIgnoreWordsInAllUppercase( ) const; + /** Reports whether this spell-check ignores words that contain numbers. + @return True if this spell-check ignores words that contain numbers. */ + bool GetIgnoreWordsWithNumbers( ) const; + /** Reports whether this spell-check ignores roman numerals. + @return True if this spell-check ignores roman numerals. */ + bool GetIgnoreRomanNumerals( ) const; + /** Reports whether this spell-check ignores repeated words. + @return True if this spell-check ignores repeated words. */ + bool GetIgnoreRepeatedWords( ) const; + /** Reports whether this spell-check ignores the uncapitalized first word of a sentence. + @return True if this spell-check ignores the uncapitalized first word of a sentence. */ + bool GetIgnoreUncapitalizedStartOfSentence( ) const; + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + /** Reports whether strict Yeh characters are considered during the spell check. + @return True if strict Yeh characters are considered, false if they are not. + */ + bool GetStrictYeh( ) const; + /** Reports whether strict Alef characters are considered during the spell check. + @return True if strict Alef characters are considered, false if they are not. + */ + bool GetStrictAlef( ) const; +#endif + + /** Sets whether this spell-check ignores words that are all uppercase. + @param newValue True to ignore words that are all uppercase, + false to report as a spelling error. */ + void SetIgnoreWordsInAllUppercase( bool newValue); + /** Sets whether this spell-check ignores words that contain numbers. + @param newValue True to ignore words that contain numbers, + false to report as a spelling error. */ + void SetIgnoreWordsWithNumbers( bool newValue); + /** Sets whether this spell-check ignores roman numerals. + @param newValue True to ignore roman numerals, + false to report as a spelling error. */ + void SetIgnoreRomanNumerals( bool newValue); + /** Sets whether this spell-check ignores repeated word. + @param newValue True to ignore repeated words, + false to report as a spelling error. */ + void SetIgnoreRepeatedWords( bool newValue); + /** Sets whether this spell-check ignores uncapitalized first words of sentences. + @param newValue True to ignore uncapitalized first words of sentences, + false to report as a spelling error. */ + void SetIgnoreUncapitalizedStartOfSentence( bool newValue); + +#if SLO_COMPLEXSCRIPT // Middle Eastern specific features only + /** Sets whether to consider strict Yeh characters during the spell check. + @param newValue True to consider strict Yeh characters, false to not. + @return Nothing. + */ + void SetStrictYeh( bool newValue); + /** Sets whether to consider strict Alef characters during the spell check. + @param newValue True to consider strict Alef characters, false to not. + @return Nothing. + */ + void SetStrictAlef( bool newValue); +#endif + + /** Reports the scope of search for this spell-check, the entire document or + a story. The default scope is the entire document. + @return The search-scope constant. */ + SearchScope GetSearchScope( ) const; + /** Sets the scope of search for this spell-check, the entire document or + a story. The default scope is the entire document. + @param searchScope The search-scope constant. */ + void SetSearchScope( SearchScope searchScope); + + /** Sets the range of search for this spell-check, limiting the search + to a specific text range within the scope. + @param pRange The text range object. + @param resetEndOfSentence Optional, whether to reset the end-of-sentence marker. + Default is true. + @param resetCurPos Optional, whether to reset the cursor position after the search. + Default is true. + */ + void SetSearchRange( const ITextRange& pRange, const bool resetEndOfSentence = true, const bool resetCurPos = true, const bool includeWordsOnSearchBoundary = true); + + /** Resets the search temporarily, for a modeless search. + @return Nothing. */ + void Reset( ); + /** Resumes this search from a given point. + Use this if the user has changed + the text significantly enough that you need to reset, but you are fairly + certain that the text has not been changed before the given point. + @param resumePoint A number of characters, the 0-based offset + into the text at which to resume. + @return Nothing. */ + void ResumeFrom( const ATETextDOM::Int32 resumePoint); + // Use this to resume from the current insertion point. + /** Resumes this search from the current insertion point. + @return Nothing. */ + void ResumeFromInsertionPoint( ); + + // ======================================================================== + // Methods + // ======================================================================== + + /** Searches from the start of the range for the first occurrance of an unknown word. + If a word is found, fills a word list with suggested corrections. To retrieve this + list, use \c #GetWordListSize() and GetWordListContents(). + @param pResult [out] A buffer in which to return the first unknown word found. + @param pRange [out] A buffer in which to return the text range that contains the returned word. + @param pLanguage [out] Optional. A buffer in which to return the language. + @param populateSuggestionList true to populate the internal suggestion list that is accessed via GetWordListContents for the incorrect word found, false to not. + @return True if an unknown word was found and returned, false if the search reached + the end of the range without finding an unknown word. */ + bool FindOneMisspelledWord( SpellCheckingResult* pResult, ITextRange pRange, Language* pLanguage = NULL, bool populateSuggestionList = true ); + /** Retrieves the number of characters in the list of suggested corrections + for an unknown word found by \c #FindOneMisspelledWord(). + Use to create a string buffer for \c #GetWordListContents(). + @return The number of characters in the list.*/ + ATETextDOM::Int32 GetWordListSize( ); + /** Retrieves the list of suggested corrections for an unknown word + found by \c #FindOneMisspelledWord(). + @param pWordListBuffer [out] A buffer in which to return the word list. Use \c #GetWordListSize() + to allocate sufficient space for the string. + @param sizeOfBuffer The number of characters in the passed buffer. + @param pNumberOfWords [out] A buffer in which to return the number of + NULL-terminated words in the returned word list. + @return Nothing. */ + void GetWordListContents( ATETextDOM::Unicode* pWordListBuffer, ATETextDOM::Int32 sizeOfBuffer, ATETextDOM::Int32* pNumberOfWords); + /** Replaces a text range with new text. + @param pRange The destination text range object. + @param pCorrection A string containing the replacement text. + @return Nothing. */ + void Replace( ITextRange pRange, const ATETextDOM::Unicode* pCorrection); + + // Use this to add an entry to a pair dictionary, binding the selected word to rCorrection. + /** Adds the selected text to the replace-all dictionary + associating it with a given correction string. + @param pCorrection The correction string. + @return Nothing. */ + void AddSelectedToReplaceAllDict( const ATETextDOM::Unicode* pCorrection); + + /** @deprecated Obsolete, do not use. See \c ISpell class description + for information on implementing a replace-all operation. */ + bool DoReplaceAll( ); + + /** Stores search positions before a replace-all operation that you implement + using \c #FindReplaceAllWord(). Use \c #RestorePreReplaceAllSettings() to + restore the positions after the operation. + You must also save the text object you are currently working with, + and use \c #SetSearchRange() to restore it. + See \c ISpell class description for information on implementing a replace-all operation. + @param pCurrentPoint [out] A buffer in which to save the current search offset. + @param pFoundSentenceEnd [out] A buffer in which to save the current sentence-end flag. + @return Nothing. + */ + void GetPreReplaceAllSettings( ATETextDOM::Int32* pCurrentPoint, bool* pFoundSentenceEnd) const; + // Implement a loop to go through all the text objects you want to replace all with. + // Use this to find all instances of the target word in the current text object. + // Keep calling it until it returns false, making sure to set firstTimeInThisObject as needed. + // It will return the text range to select and call ReplaceSelected( ) with. + /** Searches for the current target word in a text range object. Use to implement + a replace-all operation, by finding all instances of the target word in all text objects + in the range. See \c ISpell class description. + @param pRange The text range object. + @param firstTimeInThisObject True to indicate that that search is + being done in a new text object in your loop. + @return True if the target word is found in the text range. + */ + bool FindReplaceAllWord( ITextRange pRange, const bool firstTimeInThisObject); + /** Restores search positions after a replace-all operation that you implement using \c #FindReplaceAllWord(). + Use \c #GetPreReplaceAllSettings() to store the positions before the operation. + You must also save the text object you are currently working with, and use \c #SetSearchRange() + to restore it. See \c ISpell class description for information on implementing a replace-all operation. + @param currentPoint The buffer containing the saved search offset. + @param foundSentenceEnd The buffer containing the saved sentence-end flag. + @return Nothing. + */ + void RestorePreReplaceAllSettings( const ATETextDOM::Int32 currentPoint, const bool foundSentenceEnd); + + /// Manage spell-check dictionaries + + /** Removes all pairs from the pair dictionary associated with this spell-checker. + The dictionary is never cleared automatically. + @return Nothing. */ + void ClearPairDictionary( ); + + /** Adds the currently selected word to the dictionary associated with this spell-checker. + @return Nothing. */ + void AddSelectedToUserDict( ); + + /** Copies the known-word dictionary for this spell-checker + to the internal word list. Use \c #GetWordListSize() and + \c #GetWordListContents() to examine the result. + @return Nothing. */ + void GetUserDictionaryContents( ); + /** Adds a word to the known-word dictionary for this spell-checker. + @param pWord A string containing the word. + @return True if the addition was successful, false if the string contains + spaces (multiple words) and no word was added. */ + bool AddToUserDictionary( const ATETextDOM::Unicode* pWord); + /** Removes a word from the known-word dictionary for this spell-checker. + @param pWord A string containing the word. + @return Nothing. */ + void DeleteFromUserDictionary( const ATETextDOM::Unicode* pWord); + /** Reports whether a word is contained in the known-word dictionary for this spell-checker. + @param pWord A string containing the word. + @param checkEquivalentFormsSetting Controls the search for equivalent forms + @return True if the word is in the dictionary. */ + bool WordExistsInUserDictionary( const ATETextDOM::Unicode* pWord, const ATE::CheckEquivalentFormsSetting checkEquivalentFormsSetting); + /** Reports whether a word is contained in the ignore List for this spell-checker. + @param pWord A string containing the word. + @param checkEquivalentFormsSetting Controls the search for equivalent forms + @return True if the word is in the ignore List. */ + bool WordExistsInIgnoreDictionary( const ATETextDOM::Unicode* pWord, const ATE::CheckEquivalentFormsSetting checkEquivalentFormsSetting); + /** Adds the currently selected word to the list of words to be + ignored by this spell-checker. + @return Nothing. */ + void AddSelectedToIgnoreList( ); + /** Removes all words from the list of words to be ignored by this spell-checker. + The list is never cleared automatically. + @return Nothing. */ + void ClearIgnoreList( ); + /** Retrieves the language of the most recent missing dictionary. + @return The language constant. */ + Language GetLanguageOfLastMissingDictionary( ); + //param @out : the size of the length of the path + // @in : the memory where the path is to be stored + ATETextDOM::Int32 GetSpellingDictionaryPath(ATETextDOM::Unicode* path); +}; + +////////////////////////////////////////////// +// --IStories-- +////////////////////////////////////////////// +/** Encapsulates a set of stories. Contains a collection of \c IStory objects. + Use to access the text and input focus of the member stories, and to + temporarily suspend reflow calculations for efficiency when altering the text. */ +class IStories +{ +private: + StoriesRef fStories; +public: + /** Constructor. + @return The new object. */ + IStories(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IStories(const IStories& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IStories& operator=(const IStories& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IStories& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IStories& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param stories The C object. + @return The new C++ object. */ + explicit IStories(StoriesRef stories); + /** Destructor */ + virtual ~IStories(); + /** Retrieves a reference to this object. + @return The object reference. */ + StoriesRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + IStory GetFirst( ); + /** Retrieves the last member of this set. + @return The member object. */ + IStory GetLast( ); + // Focus methods + /** Reports whether a member story has the input focus. + @return True if a story in this collection is currently being edited. + @note Only one story can have the focus. It can lose focus if + the user selects text outside it, or clicks outside the + text of the story. */ + bool HasFocus( ) const; + /** Retrieves the member story that has input focus. + @return The story currently being edited, or a \c NULL oject if no text is being edited. */ + IStory GetFocus( ) const; + /** Sets the input focus to a member story, deselecting everything in the document. + @param story The story object. + @return Nothing. */ + void SetFocus( const IStory& story); + /** Removes input focus from the story currently being edited, + deselecting everything in the document. + @return Nothing. */ + void LoseFocus( ); + // Navigation objects. + /** Retrieves the set of text ranges in these stories. + @return The text range set object. */ + ITextRanges GetTextRanges( ) const; + /** Retrieves the set of text ranges for selected text in these stories. + @return The text range set object. */ + ITextRanges GetTextSelection( ) const; + /** Creates an iterator object for the set of paragraphs in these stories. + @return The paragraph iterator object. */ + IParagraphsIterator GetParagraphsIterator( ) const; + /** Creates an iterator object for the set of words in these stories. + @return The word iterator object. */ + IWordsIterator GetWordsIterator( ) const; + /** Creates an iterator object for the set of text runs in these stories. + @return The text run iterator object. */ + ITextRunsIterator GetTextRunsIterator( ) const; + /** Retrieves the document text resources for these stories. + @return The document text resources object. */ + IDocumentTextResources GetDocumentTextResources( ) const; + // ======================================================================== + // METHODS + // ======================================================================== + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + IStory Item( ATETextDOM::Int32 nIndex) const; + /** Suspends reflow calculation for these stories. Speeds up calls that cause reflow, + such as \c ITextRange insertion methods. Use \c #ResumeReflow() + to restore normal reflow calculation. + @return Nothing. */ + void SuspendReflow( ); + /** Resumes normal reflow calculation after a call to \c #SuspendReflow(). + @return Nothing. */ + void ResumeReflow( ); + +}; + +////////////////////////////////////////////// +// --IStory-- +////////////////////////////////////////////// +/** This class represents a text flow. A story contains + paragraphs, words, text runs, and text frames. You can + get a text range for any arbitrary subset of the text, + or for the selected text. + + <> + + Kerning is managed at the story level. + + A set of stories is collected in an \c IStories object. + */ +class IStory +{ +private: + StoryRef fStory; +public: + /** Constructor. + @return The new object. */ + IStory(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IStory(const IStory& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IStory& operator=(const IStory& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IStory& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IStory& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param story The C object. + @return The new C++ object. */ + explicit IStory(StoryRef story); + /** Destructor */ + virtual ~IStory(); + /** Retrieves a reference to this object. + @return The object reference. */ + StoryRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================== + // PROPERTIES + // ======================================================================== + + /** Retrieves the index position of this story in its \c IStories collection. + @return The 0-based index. */ + ATETextDOM::Int32 GetIndex( ) const; + /** Retrieves the number of characters in this story. + @return The number of characters. */ + ATETextDOM::Int32 GetSize( ) const; + /// navigation objects. + /** Retrieves the story collection that contains this story. + @return The story collection object. */ + IStories GetStories( ) const; + /** Retrieves the text range that contains the entire text of this story. + @return The text range object. */ + ITextRange GetTextRange( ) const; + /** Retrieves the set of text ranges that contains the selected text of this story. + @return The text range set object. */ + ITextRanges GetTextSelection( ) const; + /** Creates an iterator object for the set of paragraphs in this story. + @return The paragraph iterator object. */ + IParagraphsIterator GetParagraphsIterator( ) const; + /** Creates an iterator object for the set of words in this story. + @return The word iterator object. */ + IWordsIterator GetWordsIterator( ) const; + /** Creates an iterator object for the set of text runs in this story. + @return The text run iterator object. */ + ITextRunsIterator GetTextRunsIterator( ) const; + /** Creates an iterator object for the set of text frames in this story. + @return The text frame iterator object. */ + ITextFramesIterator GetTextFramesIterator( ) const; + /** Retrieves a text frame from this story. + @param frameIndex The 0-based position index. + @return The text frame object. */ + ITextFrame GetFrame( ATETextDOM::Int32 frameIndex) const; + + /// Kerning management + /// for auto or optical kerns + /** Sets automatic or optical kerning for a text range in this story. + @param textRange The text range. + @param autoKernType The kerning type constant. + @return Nothing. */ + void SetKernForSelection( const ITextRange& textRange, AutoKernType autoKernType); + /// for manual kerns + /** Sets a specific kern value in this story. + @param charIndex The 0-based position index of the character to kern. + @param value The kerning value. + @return Nothing. */ + void SetKernAtChar( ATETextDOM::Int32 charIndex, ATETextDOM::Int32 value); + /** Retrieves the kerning type and value for a text range in this story. + @param textRange The text range object. + @param pAutoKernType [out] A buffer in which to return the kerning type constant. + @param value [out] A buffer in which to return the kerning value. + @return Nothing. */ + void GetKern( const ITextRange& textRange, AutoKernType* pAutoKernType, ATETextDOM::Int32* value) const; + /** Retrieves the kerning type and value for a character in this story. + @param charIndex The 0-based position index of the character. + @param pManualKernValue [out] A buffer in which to return the kerning value. + @return The kerning type constant that applies to this character. */ + AutoKernType GetModelKernAtChar( ATETextDOM::Int32 charIndex, ATETextDOM::Int32* pManualKernValue) const; + // ======================================================================== + // METHODS + // ======================================================================== + /** Retrieves an arbitrary text range from this story. + @param start The 0-based position index of the first character in the range. + If negative, 0 is used. + @param end The 0-based position index of the last character in the range. + If greater than the size of the story, the last character of the story is used. + @return The text range object. */ + ITextRange GetTextRange( ATETextDOM::Int32 start, ATETextDOM::Int32 end) const; + /** Creates a new story that is a copy of this one. + @return The story object. */ + IStory Duplicate( ); + /** Suspends reflow calculation for this story. Speeds up calls that cause reflow, + such as \c ITextRange insertion methods. Use \c #ResumeReflow() + to restore normal reflow calculation. + @return Nothing. */ + void SuspendReflow( ); + /** Resumes normal reflow calculation after a call to \c #SuspendReflow(). + @return Nothing. */ + void ResumeReflow( ); + +}; + +////////////////////////////////////////////// +// --ITabStop-- +////////////////////////////////////////////// +/** Encapsulates a tab stop in a paragraph. Tab stops are collected + in an \c ITabStops object, which you can retrieve from + a paragraph using \c IParaFeatures::GetTabStops. + Use an \c ITabStopsIterator object to iterate through the collection. */ +class ITabStop +{ +private: + TabStopRef fTabStop; +public: + /** Constructor. + @return The new object. */ + ITabStop(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITabStop(const ITabStop& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITabStop& operator=(const ITabStop& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITabStop& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITabStop& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param tabstop The C object. + @return The new C++ object. */ + explicit ITabStop(TabStopRef tabstop); + /** Destructor */ + virtual ~ITabStop(); + /** Retrieves a reference to this object. + @return The object reference. */ + TabStopRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + /** Retrieves the type of this tab stop (right or left). + @return The tab type constant. */ + TabType GetTabType( ) const; + /** Sets the type of this tab stop (right or left). + @param tabType The tab type constant. + @return Nothing. */ + void SetTabType( TabType tabType); + /** Retrieves the position of this tab stop. + @return The tab position in document points. */ + ATETextDOM::Real GetPosition( ) const; + /** Sets the position of this tab stop. + @param position The tab position in document points. + @return Nothing. */ + void SetPosition( ATETextDOM::Real position); + /** Reports whether this tab stop uses a leader. + @return True if the tab uses a leader. */ + bool HasLeader( ) const; + /** Retrieves the leader string for this tab stop. + @param leader [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + @return Nothing. */ + void GetLeader( ATETextDOM::Unicode* leader, ATETextDOM::Int32 maxLength) const; + /** Sets the leader string for this tab stop. + @param leader The string. + @return Nothing. */ + void SetLeader( ATETextDOM::Unicode* leader); + /** Retrieves the decimal character for this tab stop. + @return A string containing the character. */ + ATETextDOM::Unicode GetDecimalCharacter( ) const; + /** Sets the decimal character for this tab stop. + @param decimalChar A string containing the character. */ + void SetDecimalCharacter( ATETextDOM::Unicode decimalChar); + +}; + +////////////////////////////////////////////// +// --ITabStops-- +////////////////////////////////////////////// +/** Encapsulates a set if tab stops in a paragraph. + You can create a new set of tab stops to apply to a paragraph, + with \c IParaFeatures::SetTabStops(), or retrieve the existing + tab stops with \c IParaFeatures::GetTabStops(). + Tab stop sets are collected in an \c IArrayTabStops object, + which you can retrieve from a set of paragraphs using + \c IParaInspector::GetTabStops. Use an \c ITabStopsIterator + object to iterate through each set in the array. + */ +class ITabStops +{ +private: + TabStopsRef fTabStops; +public: + /** Constructor. Creates an empty container. + @return The new object. */ + ITabStops(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITabStops(const ITabStops& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITabStops& operator=(const ITabStops& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITabStops& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITabStops& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param tabstops The C object. + @return The new C++ object. */ + explicit ITabStops(TabStopsRef tabstops); + /** Destructor */ + virtual ~ITabStops(); + /** Retrieves a reference to this object. + @return The object reference. */ + TabStopsRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================= + /** Retrieves the number of members of this set. + @return The number of members. */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + ITabStop GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + ITabStop GetLast( ) const; + // ======================================================================= + // METHODS + // ======================================================================= + /** Replaces or adds a tab stop to this set. + @param pTabStop The replacement or new tab stop object. + @return Nothing. + */ + void ReplaceOrAdd( const ITabStop& pTabStop); + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + ITabStop Item( ATETextDOM::Int32 nIndex) const; + /** Removes a member from the set. + @param nIndex The 0-based position index of the member to remove. + @return Nothing. */ + void Remove( ATETextDOM::Int32 nIndex); + /** Removes all members from the set. + @return Nothing. */ + void RemoveAll( ); +}; + +////////////////////////////////////////////// +// --ITabStopsIterator-- +////////////////////////////////////////////// +/** This class allows you to iterate through a set of tab stops. + Create the iterator object from a \c ITabStops object. + Use it to access the \c ITabStop objects in the collection. +*/ +class ITabStopsIterator +{ +private: + TabStopsIteratorRef fTabStopsIterator; +public: + /** Constructor. + @return The new object. */ + ITabStopsIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITabStopsIterator(const ITabStopsIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITabStopsIterator& operator=(const ITabStopsIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITabStopsIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITabStopsIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param tabstopsiterator The C object. + @return The new C++ object. */ + explicit ITabStopsIterator(TabStopsIteratorRef tabstopsiterator); + /** Destructor */ + virtual ~ITabStopsIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + TabStopsIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates an iterator object for a specific tab stop set + that is ordered first-to-last or last-to-first. + @param tabStops The tab stops set object. + @param direction Optional. The order of iteration. Default is first-to-last. + @return The new iterator object. + */ + ITabStopsIterator( ITabStops tabStops, Direction direction = kForward); + + + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ); + /** Sets the current position to the first member of this set. + @return Nothing. */ + void MoveToFirst( ); + /** Sets the current position to the last member of this set. + @return Nothing. */ + void MoveToLast( ); + /** Increments the current position in the set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Retrieves the current tab stop. + @return The tab stop object. */ + ITabStop Item( ) const; + +}; + +/** A text range, the basic text unit of the Adobe Text Engine, is a set + of characters that ranges from a start offset to an end offset within a story. + Use a text range object: + \li To access selected text, paragraphs, words, text frames, + and text runs (character sequences that share attributes) + within the contained text. + \li To access and modify paragraph and character styles and features in the contained text. + \li To convert text to a Unicode or C string. + \li To select or deselect text programmatically. + \li To convert case in text. + \li To find a single glyph that represents a multiple characters. + + Each time you manipulate the contents of a text range, a reflow operation occurs. + Reflow can change the length and endpoints of any text range in the containing story, + and can cause previously obtained text runs to become invalid; see \c ITextRunIterator. + For efficiency, you can temporarily disable reflowing, then renable it after + making your changes. Use \c IStory::SuspendReflow() and \c IStory::ResumeReflow(), + or the \c IInhibitReflow class. Functions that can cause reflow are: +

\c InsertAfter() +
\c InsertBefore() +
\c #Remove() +
\c #SetLocalCharFeatures() +
\c #ReplaceOrAddLocalCharFeatures() +
\c #SetLocalParaFeatures() +
\c #ReplaceOrAddLocalParaFeatures() + + For example, suppose you have the initial text "0123456789", and have created two + ranges, Range1 from 0 to 5 whose content is "01234", and Range2 from 3 to 9 + whose content is "345678". If you call Range1.insertAfter("abc") + the text becomes "01234abc56789", Range1 becomes "01234abc", and + Range2 becomes "34abc5678". The offsets change automatically so that the + contained text in the ranges reflects the insertion. +*/ +////////////////////////////////////////////// +// --ITextRange-- +////////////////////////////////////////////// +class ITextRange +{ +private: + TextRangeRef fTextRange; +public: + /** Constructor. + @return The new object. */ + ITextRange(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITextRange(const ITextRange& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITextRange& operator=(const ITextRange& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITextRange& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITextRange& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param textrange The C object. + @return The new C++ object. */ + explicit ITextRange(TextRangeRef textrange); + /** Destructor */ + virtual ~ITextRange(); + /** Retrieves a reference to this object. + @return The object reference. */ + TextRangeRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ======================================================================== + /** Retrieves the start offset of this text range. + @return The 0-based index of the start offset from the + beginning of the containing story. */ + ATETextDOM::Int32 GetStart( ) const; + /** Sets the start offset of this text range. + @param start The 0-based index of the start offset from the + beginning of the containing story. + @return Nothing. */ + void SetStart( ATETextDOM::Int32 start); + /** Retrieves the end offset of this text range. + @return The 0-based index of the end offset from the + beginning of the containing story. */ + ATETextDOM::Int32 GetEnd( ) const; + /** Sets the end offset of this text range. + @param end The 0-based index of the end offset from the + beginning of the containing story. + @return Nothing. */ + void SetEnd( ATETextDOM::Int32 end); + /** Retrieves the size of this text range. + @return The number of characters. */ + ATETextDOM::Int32 GetSize( ) const; + // ======================================================================= + // NAVIGATION OBJECTS + // ======================================================================== + /** Retrieves the story that contains this text range. + @return The story object. */ + IStory GetStory( ) const; + /** Retrieves the selected text within this text range. + @return The text ranges object containing the selected text. */ + ITextRanges GetTextSelection( ) const; + /** Creates an iterator for the text frames contained in this text range. + @return The iterator object. */ + ITextFramesIterator GetTextFramesIterator( ) const; + /** Creates an iterator for the paragraphs contained in this text range. + @return The iterator object. */ + IParagraphsIterator GetParagraphsIterator( ) const; + /** Creates an iterator for the words contained in this text range. + @return The iterator object. */ + IWordsIterator GetWordsIterator( ) const; + /** Creates an iterator for the text runs contained in this text range. + Text runs are character sequences that share attributes. + @return The iterator object. */ + ITextRunsIterator GetTextRunsIterator( ) const; + // ======================================================================= + // ATTRIBUTE INSPECTION AND MODIFICATION + // ======================================================================== + /** Creates an inspector with which to access the character features of + all characters in this text range. + @return The inspector object. */ + ICharInspector GetCharInspector( ) const; + /** Creates an inspector with which to access the paragraph features of + all paragraphs in this text range. + @return The inspector object. */ + IParaInspector GetParaInspector( ) const; + /** Retrieves a set of all named character styles used in this text range. + @return The character style set object. */ + ICharStyles GetNamedCharStyles( ) const; + /** Retrieves a set of all named paragraph styles used in this text range. + @return The paragraph style set object. */ + IParaStyles GetNamedParaStyles( ) const; + /** Associates a named character style to this text range. The inherited values can + be overridden by styles or features specified locally in contained + text ranges or individual characters. + @param pName The style name. + @return True if the style is successfully applied, false if there + is no style with the specified name. */ + bool SetNamedCharStyle( const ATETextDOM::Unicode* pName); + /** Associates a named paragraph style to this text range. The inherited values can + be overridden by styles or features specified locally in contained + text ranges or individual paragraphs. + @param pName The style name. + @return True if the style is successfully applied, false if there + is no style with the specified name. */ + bool SetNamedParaStyle( const ATETextDOM::Unicode* pName); + /** Removes the association of this text range and its character style. + Copies the feature values of the character style into local override + values in the contained characters. See \c ICharFeatures. + @return Nothing. */ + void ClearNamedCharStyle( ); + /** Removes the association of this text range and its paragraph style. + Copies the feature values of the paragraph style into local override + values in the contained paragraphs. See \c IParaFeatures. + @return Nothing. */ + void ClearNamedParaStyle( ); + /** Retrieves the unique character features used in this text range. + Unique features are those which have the same value in all text + runs in the range. + @return The character features object containing the unique + feature values. Other features are unassigned.*/ + ICharFeatures GetUniqueCharFeatures( ) const; + /** Retrieves the unique paragraph features used in this text range. + Unique features are those which have the same value in all text + runs in the range. + @return The paragraph features object containing the unique + feature values. Other features are unassigned.*/ + IParaFeatures GetUniqueParaFeatures( ) const; + /** Reports whether there any local character feature overrides for + characters contained in this text range. + @return True if there are local overrides. */ + bool HasLocalCharFeatures( ); + /** Reports whether there any local paragraph feature overrides for + paragraphs contained in this text range. + @return True if there are local overrides. */ + bool HasLocalParaFeatures( ); + /** Retrieves the character features that have local overrides in this text range, + and whose local values are the same in all text runs in the range. + @return The character features object containing the unique + local feature values. Other features are unassigned. If all + features are unassigned, either there are no local overrides, + or the local overrides have no common values. */ + ICharFeatures GetUniqueLocalCharFeatures( ); + /** Retrieves the paragraph features that have local overrides in this text range, + and whose local values are the same in all text runs in the range. + @return The paragraph features object containing the unique + local feature values. Other features are unassigned. If all + features are unassigned, either there are no local overrides, + or the local overrides have no common values. */ + IParaFeatures GetUniqueLocalParaFeatures( ); + + /** Replaces all of the local overrides for all characters in this text range + with a new set of feature values. All values that are assigned + become local values, replacing any previous local value. These local + values override any specified in a style associated with the + character or the text range. All values that are unassigned remove + any previous local values, so that those values are inherited. + + Triggers a reflow operation that can cause previously obtained + text runs to become invalid; see \c ITextRunIterator. + @param pFeatures The new feature set object. + @return Nothing. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void SetLocalCharFeatures( const ICharFeatures& pFeatures); + /** Modifies the local overrides for all characters in this text range. + All values that are assigned become local values, replacing any + previous local value. Values that are unassigned leave any previous + local values unchanged. + + Triggers a reflow operation that can cause previously obtained + text runs to become invalid; see \c ITextRunIterator. + + @param pFeatures The new feature set object. + @return Nothing. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void ReplaceOrAddLocalCharFeatures( const ICharFeatures& pFeatures); + /** Removes all local overrides for all characters in this text range. + All character features are then inherited from styles associated + with the character or text range, or from the Normal style. + @return Nothing. */ + void ClearLocalCharFeatures( ); + + /** Replaces all of the local overrides for all paragraphs in this text range + with a new set of feature values. All values that are assigned + become local values, replacing any previous local value. These local + values override any specified in a style associated with the + paragraph or the text range. All values that are unassigned remove + any previous local values, so that those values are inherited. + + Triggers a reflow operation that can cause previously obtained + text runs to become invalid; see \c ITextRunIterator. + @param pFeatures The new feature set object. + @return Nothing. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void SetLocalParaFeatures( const IParaFeatures& pFeatures); + /** Modifies the local overrides for all paragraphs in this text range. + All values that are assigned become local values, replacing any + previous local value. Values that are unassigned leave any previous + local values unchanged. + + Triggers a reflow operation that can cause previously obtained + text runs to become invalid; see \c ITextRunIterator. + @param pFeatures The new feature set object. + @return Nothing. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void ReplaceOrAddLocalParaFeatures( const IParaFeatures& pFeatures); + /** Removes all local overrides for all paragraphs in this text range. + All paragraph features are then inherited from styles associated + with the paragraph or text range, or from the Normal style. + @return Nothing. */ + void ClearLocalParaFeatures( ); + // ======================================================================= + // METHODS + // ======================================================================== + /** Associates this text range with a new story. + @param story The story object. + @return Nothing. */ + void SetStory( const IStory& story); + /** Sets the start and end points of this text range. + @param start The 0-based index of the start offset from the + beginning of the containing story. + @param end The 0-based index of the end offset from the + beginning of the containing story. + @return Nothing. */ + void SetRange( ATETextDOM::Int32 start, ATETextDOM::Int32 end); + /** Resets start or end point of this range so that it contains only + one character, either the first or the last. + @param direction Optional. The direction constant. Default is + \c CollapseEnd, which sets the start offset to the end offset. + Use \c CollapseStart to set the end offset to the start offset. */ + void Collapse( CollapseDirection direction = CollapseEnd); + /** Moves this text range by adding or subtracting a number of characters + to or from the start and end offsets. Does not move the range if the + result would be out of the story bounds. + @param unit The number of characters, positive to move the range + toward the end, negative to move it toward the beginning of + the story. + @return The number of characters by which the range was translated, + or 0 if the translation could not be made within the story bounds. */ + ATETextDOM::Int32 Move( ATETextDOM::Int32 unit); + /** Creates a duplicate of this object. + @return The new object. */ + ITextRange Clone( ) const; + /** Inserts text into this text range before the current start point. Triggers a + reflow operation that resets the start and end points of this and any other + affected ranges to include both the old and new text. + @param text A Unicode string containing the text. + @param length (Optional) The number of characters, or -1 (the default) if + the string is NULL-terminated. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void InsertBefore( const ATETextDOM::Unicode* text, ATETextDOM::Int32 length = -1); + /** Inserts text into this text range after the current end point. Triggers a + reflow operation that resets the start and end points of this and any other + affected ranges to include both the old and new text. + @param text A Unicode string containing the text. + @param length (Optional) The number of characters, or -1 (the default) if + the string is NULL-terminated. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void InsertAfter( const ATETextDOM::Unicode* text, ATETextDOM::Int32 length = -1); + /** Inserts text into this text range before the current start point. Triggers a + reflow operation that resets the start and end points of this and any other + affected ranges to include both the old and new text. + @param anotherRange A text range object containing the text. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void InsertBefore( const ITextRange& anotherRange); + /** Inserts text into this text range after the current end point. Triggers a + reflow operation that resets the start and end points of this and any other + affected ranges to include both the old and new text. + @param anotherRange A text range object containing the text. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void InsertAfter( const ITextRange& anotherRange); + + /** Retrieves the contents of this text range as a Unicode string. + @param text [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const; + /** Retrieves the contents of this text range as a C string. + @param text [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetContents( char* text, ATETextDOM::Int32 maxLength) const; + + /** Reports whether the characters in this text range map to a single glyph, + and if so, retrieves that glyph. + @param pSingleGlyph [out] A buffer in which to return the glyph identifier, + if there is one. Otherwise, the buffer is not changed. + @return True if the characters in this range map to a single glyph. */ + bool GetSingleGlyphInRange( ATEGlyphID* pSingleGlyph) const; + + /** Selects the text in this text range. + @param addToSelection (Optional) True to add this text to the current + selection, false (the default) to clear the current selection before + selecting this text. + @return Nothing. */ + void Select( bool addToSelection = false); + /** Deselects the text in this text range. This can result in a discontiguous selection, + if this text range is a subset of the selected text. + @return Nothing. */ + void DeSelect( ); + /** Changes the case of the text in this text range. + @param caseChangeType The case type constant. + @return Nothing. */ + void ChangeCase( CaseChangeType caseChangeType); + /** Adjusts the tracking of the text in this range to + fit on one line spanning the width of the area text object. + This is the equivalent of choosing Type > Fit Headline with + the text range selected. + @return Nothing. */ + void FitHeadlines( ); + /** Deletes all of the characters in this text range. Triggers a + reflow operation that resets the start and end points of any other + affected ranges. + @return Nothing. + @see \c IStory::SuspendReflow(), \c IStory::ResumeReflow() */ + void Remove( ); + /** Retrieves the character type of the single character in this + text range. Throws \c #kBadParameterErr if this text range + does not contain exactly one character. + @return The character type constant, */ + ASCharType GetCharacterType( ) const; + +}; + +////////////////////////////////////////////// +// --ITextRanges-- +////////////////////////////////////////////// +/** Encapsulates a set of text ranges. Contains a collection of \c ITextRange objects. + Allows you to perform many of the text operations on all of the member ranges + at once. Use an \c ITextRangesIterator object to iterate through the member ranges. */ +class ITextRanges +{ +private: + TextRangesRef fTextRanges; +public: + /** Constructor. + @return The new object. */ + ITextRanges(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITextRanges(const ITextRanges& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITextRanges& operator=(const ITextRanges& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITextRanges& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITextRanges& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param textranges The C object. + @return The new C++ object. */ + explicit ITextRanges(TextRangesRef textranges); + /** Destructor */ + virtual ~ITextRanges(); + /** Retrieves a reference to this object. + @return The object reference. */ + TextRangesRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + // ======================================================================= + // PROPERTIES + // ====================================================================== + /** Retrieves the number of members of this set. + @return The number of members. + */ + ATETextDOM::Int32 GetSize( ) const; + /** Retrieves the first member of this set. + @return The member object. */ + ITextRange GetFirst( ) const; + /** Retrieves the last member of this set. + @return The member object. */ + ITextRange GetLast( ) const; + // navigation objects. + /** Retrieves the selected text within this text range set. + @return The text ranges object containing the selected text. */ + ITextRanges GetTextSelection( ) const; + /** Creates an iterator for the paragraphs contained in this text range set. + @return The iterator object. */ + IParagraphsIterator GetParagraphsIterator( ) const; + /** Creates an iterator for the words contained in this text range set. + @return The iterator object. */ + IWordsIterator GetWordsIterator( ) const; + /** Creates an iterator for the text runs contained in this text range set. + @return The iterator object. */ + ITextRunsIterator GetTextRunsIterator( ) const; + // ======================================================================= + // ATTRIBUTE INSPECTION AND MODIFICATION + // ======================================================================== + /** Creates an inspector with which to access the character features of + all characters in this text range set. + @return The inspector object. */ + ICharInspector GetCharInspector( ) const; + /** Creates an inspector with which to access the paragraph features of + all paragraphs in this text range set. + @return The inspector object. */ + IParaInspector GetParaInspector( ) const; + /** Removes the association of this text range set and its character style. + Copies the feature values of the character style into local override + values in the contained characters. See \c ICharFeatures. + @return Nothing. */ + void ClearNamedCharStyle( ); + /** Removes the association of this text range set and its paragraph style. + Copies the feature values of the paragraph style into local override + values in the contained paragraphs. See \c IParaFeatures. + @return Nothing. */ + void ClearNamedParaStyle( ); + /** Retrieves the unique character features used in this text range set. + Unique features are those which have the same value in all text + runs in the ranges. + @return The character features object containing the unique + feature values. Other features are unassigned.*/ + ICharFeatures GetUniqueCharFeatures( ) const; + /** Retrieves the unique paragraph features used in this text range set. + Unique features are those which have the same value in all text + runs in the ranges. + @return The paragraph features object containing the unique + feature values. Other features are unassigned.*/ + IParaFeatures GetUniqueParaFeatures( ) const; + /** Reports whether there any local character feature overrides for + characters contained in this text range set. + @return True if there are local overrides. */ + bool HasLocalCharFeatures( ); + /** Reports whether there any local paragraph feature overrides for + paragraphs contained in this text range set. + @return True if there are local overrides. */ + bool HasLocalParaFeatures( ); + /** Retrieves the character features that have local overrides in this text range set, + and whose local values are the same in all text runs in the ranges. + @return The character features object containing the unique + local feature values. Other features are unassigned. If all + features are unassigned, either there are no local overrides, + or the local overrides have no common values. */ + ICharFeatures GetUniqueLocalCharFeatures( ); + /** Retrieves the paragraph features that have local overrides in this text range set, + and whose local values are the same in all text runs in the ranges. + @return The paragraph features object containing the unique + local feature values. Other features are unassigned. If all + features are unassigned, either there are no local overrides, + or the local overrides have no common values. */ + IParaFeatures GetUniqueLocalParaFeatures( ); + + /** Replaces all of the local overrides for all characters in this text range set + with a new set of feature values. All values that are assigned + become local values, replacing any previous local value. These local + values override any specified in a style associated with a + character or a text range. All values that are unassigned remove + any previous local values, so that those values are inherited. + @param pFeatures The new feature set object. + @return Nothing. */ + void SetLocalCharFeatures( const ICharFeatures& pFeatures); + /** Modifies the local overrides for all characters in this text range set. + All values that are assigned become local values, replacing any + previous local value. Values that are unassigned leave any previous + local values unchanged. + @param pFeatures The new feature set object. + @return Nothing. */ + void ReplaceOrAddLocalCharFeatures( const ICharFeatures& pFeatures); + /** Removes all local overrides for all characters in this text range set. + All character features are then inherited from styles associated + with the character or text range, or from the Normal style. + @return Nothing. */ + void ClearLocalCharFeatures( ); + /** Replaces all of the local overrides for all paragraphs in this text range set + with a new set of feature values. All values that are assigned + become local values, replacing any previous local value. These local + values override any specified in a style associated with a + paragraph or a text range. All values that are unassigned remove + any previous local values, so that those values are inherited. + @param pFeatures The new feature set object. + @return Nothing. */ + void SetLocalParaFeatures( const IParaFeatures& pFeatures); + /** Modifies the local overrides for all paragraphs in this text range set. + All values that are assigned become local values, replacing any + previous local value. Values that are unassigned leave any previous + local values unchanged. + @param pFeatures The new feature set object. + @return Nothing. */ + void ReplaceOrAddLocalParaFeatures( const IParaFeatures& pFeatures); + /** Removes all local overrides for all paragraphs in this text range set. + All paragraph features are then inherited from styles associated + with the paragraph or text range, or from the Normal style. + @return Nothing. */ + void ClearLocalParaFeatures( ); + // ======================================================================= + // METHODS + // ====================================================================== + /** Selects the text in this text range set. + @param addToSelection (Optional) True to add this text to the current + selection, false (the default) to clear the current selection before + selecting this text. + @return Nothing. */ + void Select( bool addToSelection = false); + /** Deselects the text in this text range set. + This can result in a discontiguous selection, + if this text is a subset of the selected text. + @return Nothing. */ + void DeSelect( ); + /** Retrieves the contents of this text range set as a Unicode string. + @param text [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetContents( ATETextDOM::Unicode* text, ATETextDOM::Int32 maxLength) const; + /** Retrieves the contents of this text range set as a C string. + @param text [out] A buffer in which to return the string. + @param maxLength The number of characters in the buffer. + @return The number of characters in the returned string. */ + ATETextDOM::Int32 GetContents( char* text, ATETextDOM::Int32 maxLength) const; + /** Changes the case of the text in this text range set. + @param caseChangeType The case type constant. + @return Nothing. */ + void ChangeCase( CaseChangeType caseChangeType); + /** Adds a text range as a member of this set. + @param textRange The text range object. + @return Nothing. */ + void Add( const ITextRange& textRange); + /** Retrieves a member of this set by position index. Use with \c GetSize() + to iterate through members. + @param nIndex The 0-based position index. + @return The member object. + */ + ITextRange Item( ATETextDOM::Int32 nIndex) const; + /** Removes all members from the set. + @return Nothing. */ + void RemoveAll( ); + /** Removes a member from the set. + @param nIndex The 0-based position index of the member to remove. + @return Nothing. */ + void Remove( ATETextDOM::Int32 nIndex); + +}; + +////////////////////////////////////////////// +// --ITextRangesIterator-- +////////////////////////////////////////////// +/** This object allows you to iterate through a set of text ranges. + Create the iterator from a set of text ranges (\c ITextRanges). */ +class ITextRangesIterator +{ +private: + TextRangesIteratorRef fTextRangesIterator; +public: + /** Constructor. + @return The new object. */ + ITextRangesIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITextRangesIterator(const ITextRangesIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITextRangesIterator& operator=(const ITextRangesIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITextRangesIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITextRangesIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param textrangesiterator The C object. + @return The new C++ object. */ + explicit ITextRangesIterator(TextRangesIteratorRef textrangesiterator); + /** Destructor */ + virtual ~ITextRangesIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + TextRangesIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates an iterator object for a specific text range set + that is ordered first-to-last or last-to-first. + @param textRanges The text range set object. + @param direction Optional. The order of iteration. Default is first-to-last. + @return The new iterator object. + */ + ITextRangesIterator( ITextRanges textRanges, Direction direction = kForward); + + /** Creates a duplicate of this object. + @return The new object. */ + ITextRangesIterator Clone( ) const; + + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Sets the current position to the first member of this set. + @return Nothing. */ + void MoveToFirst( ); + /** Sets the current position to the last member of this set. + @return Nothing. */ + void MoveToLast( ); + /** Increments the current position in the set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Retrieves the current text range. + @return The text range object. */ + ITextRange Item( ) const; + +}; + +////////////////////////////////////////////// +// --ITextRunsIterator-- +////////////////////////////////////////////// +/** This object allows you to iterate through a set of text runs in a story. + A text run is a range of text whose characters all share the + same set of attributes. If the text of the story changes through insertions + or deletions, an existing text run iterator is rendered invalid. + + Create a text run iterator object using \c ITextRange::GetTextRunsIterator(), + or the corresponding method in \c ITextRanges, \c IStory, \c IStories, or \c IGlyphs. + */ +class ITextRunsIterator +{ +private: + TextRunsIteratorRef fTextRunsIterator; +public: + /** Constructor. + @return The new object. */ + ITextRunsIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + ITextRunsIterator(const ITextRunsIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + ITextRunsIterator& operator=(const ITextRunsIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const ITextRunsIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const ITextRunsIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param textrunsiterator The C object. + @return The new C++ object. */ + explicit ITextRunsIterator(TextRunsIteratorRef textrunsiterator); + /** Destructor */ + virtual ~ITextRunsIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + TextRunsIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates an iterator object for a the text runs in a specific text range set + that is ordered first-to-last or last-to-first. + @param ranges The text range set object. + @param direction Optional. The order of iteration. Default is first-to-last. + @return The new iterator object. + */ + ITextRunsIterator( const ITextRanges& ranges, Direction direction = kForward); + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Sets the current position to the first member of this set. + @return Nothing. */ + void MoveToFirst( ); + /** Sets the current position to the last member of this set. + @return Nothing. */ + void MoveToLast( ); + /** Increments the current position in the set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Retrieves the text range containing the current text run. + @return The text range object. + @note This can change from one call to the next if the story text changes. + For foward iteration, the new text run begins at or before the old one. + For backward iteration, the new text run begins at or after the old one. */ + ITextRange Item( ) const; + +}; + +////////////////////////////////////////////// +// --IWordsIterator-- +////////////////////////////////////////////// +/** This object allows you to iterate through a set of words in a text range. + Create an iterator object using \c ITextRange::GetWordsIterator(), + or the corresponding method in \c ITextRanges, \c IStory, \c IStories, + \c IParagraph, or \c IGlyphs. + */ +class IWordsIterator +{ +private: + WordsIteratorRef fWordsIterator; +public: + /** Constructor. + @return The new object. */ + IWordsIterator(); + /** Copy constructor + @param src The object to copy. + @return The new object. */ + IWordsIterator(const IWordsIterator& src); + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IWordsIterator& operator=(const IWordsIterator& rhs); + /** Comparison operator tests for equality. + @param rhs The object to compare to this one. + @return True if the two objects are the same. */ + bool operator==(const IWordsIterator& rhs) const; + /** Comparison operator tests for inequality. + @param rhs The object to compare to this one. + @return True if the two objects are not the same. */ + bool operator!=(const IWordsIterator& rhs) const; + /** Constructs this C++ object from the corresponding C object + returned by an ATE suite function. + The C++ object manages reference counting. + @param wordsiterator The C object. + @return The new C++ object. */ + explicit IWordsIterator(WordsIteratorRef wordsiterator); + /** Destructor */ + virtual ~IWordsIterator(); + /** Retrieves a reference to this object. + @return The object reference. */ + WordsIteratorRef GetRef() const; + /** Reports whether this is a null object. + @return True if this is a null object. */ + bool IsNull() const; + + /** Constructor. Creates an iterator object for the words in a specific text range set. + that is ordered first-to-last or last-to-first. + @param ranges The text range set object. + @param direction Optional. The order of iteration. Default is first-to-last. + @return The new iterator object. + */ + IWordsIterator( const ITextRanges& ranges, Direction direction = kForward); + + /** Reports whether the end of the set has been reached. + @return True if more members remain in the set. */ + bool IsNotDone( ) const; + /** Reports whether the end of the set has been reached. + @return True if no more members remain in the set. */ + bool IsDone( ) const; + /** Reports whether the set is empty. + @return True if the set is empty. */ + bool IsEmpty( ) const; + /** Sets the current position to the first member of this set. + @return Nothing. */ + void MoveToFirst( ); + /** Sets the current position to the last member of this set. + @return Nothing. */ + void MoveToLast( ); + /** Increments the current position in the set in the iterator's current direction. + @return Nothing. */ + void Next( ); + /** Retrieves the text range for the current word, including trailing characters. + This is equivalent to Ctrl/Cmd + arrow. For example, "..." is considered a word. + @return The text range object. */ + ITextRange Item( ) const; + + /// Trailing characters + + /** Retrieves the number of trailing spaces for the current word. + Trailing spaces are those after the word, regardless of the direction of + iteration. + @return The number of trailing spaces. */ + ATETextDOM::Int32 GetTrailingSpaceCount( ) const; + /** Retrieves the total number of trailing characters for the current word, including + spaces, other white-space characters, and punctuation characters. + Trailing characters are those after the word, regardless of the direction of + iteration. + @return The number of trailing characters. */ + ATETextDOM::Int32 GetTrailingCount( ) const; + /** Retrieves the number of trailing punctuation characters for the current word. + Trailing characters are those after the word, regardless of the direction of + iteration. + @return The number of trailing punctuation characters. */ + ATETextDOM::Int32 GetTrailingTerminatingPunctuationCount( ) const; + +}; + +/** A convenience class for temporarily inhibiting reflow in a text story. + By default, as edits are made to the contents of a text story and its attributes, + the story contents are reflowed through the story containers. This operation + can be expensive. Use this class to inhibit reflow when batching together + a series of edits to one or more text objects. Destroy the object when + all the edits are complete, so that reflow is automatically resumed. + */ +class IInhibitReflow +{ +public: + /** Constructor. + @return The new object. */ + IInhibitReflow() + { + } + /** Constructor. Creates a reflow inhibitor object for a story. + @param story The story object. + @return The new reflow inhibitor object. + */ + IInhibitReflow(const IStory& story) + :fStory(story) + { + fStory.SuspendReflow(); + } + /** Copy constructor + @param reflow The object to copy. + @return The new object. */ + IInhibitReflow(const IInhibitReflow& reflow) + :fStory(reflow.fStory) + { + fStory.SuspendReflow(); + } + /** Destructor. */ + virtual ~IInhibitReflow() + { + try + { + if(!fStory.IsNull()) + fStory.ResumeReflow(); + } + catch (...) {} + } + /** Assignment operator. + @param rhs The object to assign to this one. + @return A reference to this object. */ + IInhibitReflow& operator=(const IInhibitReflow& rhs) + { + this->~IInhibitReflow( ); + fStory = rhs.fStory; + if(!fStory.IsNull()) + fStory.SuspendReflow(); + return *this; + } +protected: + IStory fStory; +}; + +} // namespace ATE + diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.cpp b/BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.cpp index 45d341d..18c1d18 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.cpp @@ -1,30 +1,29 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: IThrowException.cpp - - Notes: Include this file in your plugin project, or write your own custom file. - - ---------------------------------------------------------------------------------- */ -#include "IThrowException.h" -#include "ATEException.h" - -namespace ATE -{ - -void Throw_ATE_Exception (ATEErr err) -{ - throw Exception(err); -} - - -}// namespace ATE +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: IThrowException.cpp + + Notes: Include this file in your plugin project, or write your own custom file. + + ---------------------------------------------------------------------------------- */ +#include "IThrowException.h" +#include "ATEException.h" + +namespace ATE +{ + +void Throw_ATE_Exception (ATEErr err) +{ + throw Exception(err); +} + +} // namespace ATE diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.h b/BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.h index 2d3d13f..1b1322b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/IThrowException.h @@ -1,32 +1,31 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: IThrowException.h - - Notes: define the exception method. - - ---------------------------------------------------------------------------------- */ -#ifndef __IThrowException__ -#define __IThrowException__ - -#include "ATETypes.h" -#include "ATETypesDef.h" - -namespace ATE -{ - -void Throw_ATE_Exception (ATEErr err); - - -}// namespace ATE - -#endif //__IThrowException__ +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: IThrowException.h + + Notes: define the exception method. + + ---------------------------------------------------------------------------------- */ +#ifndef __IThrowException__ +#define __IThrowException__ + +#include "ATETypes.h" +#include "ATETypesDef.h" + +namespace ATE +{ + +void Throw_ATE_Exception (ATEErr err); + +} // namespace ATE + +#endif //__IThrowException__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/SloTextdomTypes/SloTextdomTypes.h b/BloksAIPlugin/Vendor/illustratorapi/ate/SloTextdomTypes/SloTextdomTypes.h deleted file mode 100644 index 1fde619..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/SloTextdomTypes/SloTextdomTypes.h +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef __SloTextdomTypes___ -#define __SloTextdomTypes___ - - -// error codes -#define kNoErr 0 -#define kOutOfMemoryErr '!MEM' -#define kBadParameterErr 'PARM' -#define kNotImplementedErr '!IMP' -#define kCantHappenErr 'CANT' - -namespace ATETextDOM -{ - -#ifdef WINDOWS - typedef __int32 Int32; -#endif - -#ifdef MACINTOSH - typedef int32_t Int32; -#endif - -#ifdef WINDOWS - typedef __int32 ATETextDomErr; -#endif -#ifdef MACINTOSH - typedef int32_t ATETextDomErr; -#endif - - typedef unsigned short Unicode; - - typedef float Float; - typedef double Real; - - typedef struct _t_FloatMatrix { - Float a, b, c, d, tx, ty; - } FloatMatrix; - - typedef struct _t_FloatPoint { - Float h, v; - } FloatPoint; - - typedef struct _t_RealMatrix { - Real a, b, c, d, tx, ty; - } RealMatrix; - - typedef struct _t_RealPoint { - Real h, v; - } RealPoint; - -} -#endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25Suites.h b/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25Suites.h index 4b3855d..8f4d594 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25Suites.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25Suites.h @@ -1,1093 +1,1093 @@ -///* ------------------------------------------------------------------------------- -// -// Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. -// -// NOTICE: Adobe permits you to use, modify, and distribute this file -// in accordance with the terms of the Adobe license agreement accompanying -// it. If you have received this file from a source other than Adobe, then -// your use, modification, or distribution of it requires the prior written -// permission of Adobe. -// -// ---------------------------------------------------------------------------------- -// -// File: ATE25Suites.h -// -// Notes: Machine Generated file from script version 1.45 -// Please don't modify manually! -// -// ---------------------------------------------------------------------------------- */ -// -//#ifndef __ATE25Suites__ -//#define __ATE25Suites__ -// -//#include "ATESuites.h" -// -//#ifdef __cplusplus -//namespace ATE -//{ -//extern "C" { -//#endif -// -//#ifdef MAC_ENV -// #if defined (__MWERKS__) -// #pragma options align=power_gcc -// #elif defined (__GNUC__) -// #pragma options align=power -// #endif -//#endif -// -//#ifdef WIN_ENV -// #pragma pack(push, 4) -//#endif -// -//////////////////////////////////////////////// -//// --TextFrameSuite-- -//////////////////////////////////////////////// -//#define kATE25TextFrameSuite kTextFrameSuite -//#define kTextFrameSuiteVersion1 1 -//#define kATE25TextFrameSuiteVersion kTextFrameSuiteVersion1 -// -//typedef struct ATE25TextFrameSuite{ -// -// // Reference count maintenance. -// void (*AddRef) ( TextFrameRef textframe); -// void (*Release) ( TextFrameRef textframe); -// ATEBool8 (*IsNull) ( TextFrameRef textframe); -// -// // METHODS -// // ===================================================================== -// /// Get the parent story -// ATEErr (*GetStory) ( TextFrameRef textframe, StoryRef* ret); -// /** Get the text range of this frame, -// If this frame is the last frame in this story then:- -// 1. If bIncludeOverflow is true, then the range returned is including the overflown text. -// 2. If bIncludeOverflow is false, then the range returned will not include the overflown text. -// */ -// ATEErr (*GetTextRange) ( TextFrameRef textframe, ATEBool8 bIncludeOverflow, TextRangeRef* ret); -// ATEErr (*GetTextLinesIterator) ( TextFrameRef textframe, TextLinesIteratorRef* ret); -// ATEErr (*IsEqual) ( TextFrameRef textframe, const TextFrameRef anotherFrame, ATEBool8* ret); -// ATEErr (*GetType) ( TextFrameRef textframe, FrameType* ret); -// ATEErr (*GetLineOrientation) ( TextFrameRef textframe, LineOrientation* ret); -// /** Check if this frame is selected. To set the selection, you have to use application specific -// API for that. In Illustrator case, you can use AIArtSuite to set the selection. -// */ -// ATEErr (*GetSelected) ( TextFrameRef textframe, ATEBool8* ret); -// ATEErr (*GetMatrix) ( TextFrameRef textframe, ASRealMatrix* ret); -// ATEErr (*GetRowCount) ( TextFrameRef textframe, ASInt32* ret); -// ATEErr (*GetColumnCount) ( TextFrameRef textframe, ASInt32* ret); -// ATEErr (*GetRowMajorOrder) ( TextFrameRef textframe, ATEBool8* ret); -// ATEErr (*GetRowGutter) ( TextFrameRef textframe, ASReal* ret); -// ATEErr (*GetColumnGutter) ( TextFrameRef textframe, ASReal* ret); -// ATEErr (*GetSpacing) ( TextFrameRef textframe, ASReal* ret); -// ATEErr (*GetOpticalAlignment) ( TextFrameRef textframe, ATEBool8* ret); -// ATEErr (*SetRowCount) ( TextFrameRef textframe, ASInt32 rowCount); -// ATEErr (*SetColumnCount) ( TextFrameRef textframe, ASInt32 columnCount); -// ATEErr (*SetRowMajorOrder) ( TextFrameRef textframe, ATEBool8 isRowMajor); -// ATEErr (*SetRowGutter) ( TextFrameRef textframe, ASReal gutter); -// ATEErr (*SetColumnGutter) ( TextFrameRef textframe, ASReal gutter); -// ATEErr (*SetSpacing) ( TextFrameRef textframe, ASReal spacing); -// ATEErr (*SetOpticalAlignment) ( TextFrameRef textframe, ATEBool8 isActive); -// ATEErr (*SetLineOrientation) ( TextFrameRef textframe, LineOrientation lineOrientation); -// -//}ATE25TextFrameSuite; -// -//////////////////////////////////////////////// -//// --DocumentTextResourcesSuite-- -//////////////////////////////////////////////// -//#define kATE25DocumentTextResourcesSuite kDocumentTextResourcesSuite -//#define kDocumentTextResourcesSuiteVersion1 1 -//#define kATE25DocumentTextResourcesSuiteVersion kDocumentTextResourcesSuiteVersion1 -// -//typedef struct ATE25DocumentTextResourcesSuite{ -// -// // Reference count maintenance. -// void (*AddRef) ( DocumentTextResourcesRef documenttextresources); -// void (*Release) ( DocumentTextResourcesRef documenttextresources); -// ATEBool8 (*IsNull) ( DocumentTextResourcesRef documenttextresources); -// -// // From parent class... -// ATEErr (*GetKinsokuSet) ( DocumentTextResourcesRef documenttextresources, KinsokuSetRef* ret); -// ATEErr (*GetMojiKumiSet) ( DocumentTextResourcesRef documenttextresources, MojiKumiSetRef* ret); -// ATEErr (*GetCompFontClassSet) ( DocumentTextResourcesRef documenttextresources, CompFontClassSetRef* ret); -// ATEErr (*GetCompFontSet) ( DocumentTextResourcesRef documenttextresources, CompFontSetRef* ret); -// ATEErr (*GetTextResources) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef* ret); -// ATEErr (*GetFind) ( DocumentTextResourcesRef documenttextresources, FindRef* ret); -// ATEErr (*GetSpell) ( DocumentTextResourcesRef documenttextresources, const char* pSpellingDirectory, SpellRef* ret); -// ATEErr (*GetGlyphAndAlternates) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); -// ATEErr (*GetAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); -// ATEErr (*InsertAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ASInt32 otFeatureCount, const ASInt32* otFeatureIndexArray, ATEBool8 leaveSelected); -// ATEErr (*GetAlternatesAvailableThroughoutSelection) ( DocumentTextResourcesRef documenttextresources, ArrayIntegerRef* ret); -// ATEErr (*GetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, ATEBool8* isFeature, JapaneseAlternateFeature* ret); -// ATEErr (*SetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, JapaneseAlternateFeature feature); -// ATEErr (*GetCharStylesInDocument) ( DocumentTextResourcesRef documenttextresources, CharStylesRef* ret); -// ATEErr (*GetParaStylesInDocument) ( DocumentTextResourcesRef documenttextresources, ParaStylesRef* ret); -// /// Returns a named style corresponding to pName. If no matching -// /// style can be found or *pName == L'\0' then a null object is returned. -// ATEErr (*GetCharStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, CharStyleRef* ret); -// ATEErr (*GetParaStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ParaStyleRef* ret); -// ATEErr (*GetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); -// ATEErr (*GetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources, ParaStyleRef* ret); -// ATEErr (*ResetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources); -// ATEErr (*ResetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources); -// /// Routines to add new named styles to the document. If an existing -// /// style already corresponds to pName or *pName == L'\0' then the -// /// document is unchanged and a null object is returned. -// ATEErr (*CreateCharStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, CharStyleRef* ret); -// ATEErr (*CreateParaStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ParaStyleRef* ret); -// ATEErr (*CreateCharStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, CharFeaturesRef pFeatures, CharStyleRef* ret); -// ATEErr (*CreateParaStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ParaFeaturesRef pFeatures, ParaStyleRef* ret); -// /// Removes a style from the document. Exact details will be provided -// /// later. -// /// -// /// If no matching style in the document corresponds to pName or -// /// *pName == L'\0' then the document is unchanged and false is returned. -// ATEErr (*RemoveCharStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ATEBool8* ret); -// ATEErr (*RemoveParaStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ATEBool8* ret); -// /// Imports named styles from pSrcResources into current resource. -// ATEErr (*ImportCharStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); -// ATEErr (*ImportParaStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); -// ATEErr (*SetUseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8 smartQuotesAreOn); -// ATEErr (*SetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ASUnicode openQuote, ASUnicode closeQuote, Language language); -// ATEErr (*SetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ASUnicode openQuote, ASUnicode closeQuote, Language language); -// ATEErr (*UseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); -// ATEErr (*GetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ASUnicode* openQuote, ASUnicode* closeQuote, Language language); -// ATEErr (*GetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ASUnicode* openQuote, ASUnicode* closeQuote, Language language); -// /// The library stores an internal set of insertion attributes either from -// /// the last selection or from the last attribute change to text. This set -// /// of insertion attributes comprises the local overrides (CharFeatures) -// /// and the named style (CharStyle) -// ATEErr (*GetInsertionCharFeatures) ( DocumentTextResourcesRef documenttextresources, CharFeaturesRef* ret); -// ATEErr (*GetInsertionCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); -// ATEErr (*SetInsertionFeaturesAndStyle) ( DocumentTextResourcesRef documenttextresources, const CharFeaturesRef pFeatures, const ASUnicode* pStyleName); -// /// Get superscript size -// ATEErr (*GetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); -// /// Set superscript size -// ATEErr (*SetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ASReal value); -// /// Get superscript position -// ATEErr (*GetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); -// /// Set superscript position -// ATEErr (*SetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ASReal value); -// /// Get subscript size -// ATEErr (*GetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); -// /// Set subscript size -// ATEErr (*SetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ASReal value); -// /// Get subscript position -// ATEErr (*GetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); -// /// Set subscript position -// ATEErr (*SetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ASReal value); -// /// Get SmallCap size -// ATEErr (*GetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); -// /// Set SmallCap size -// ATEErr (*SetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ASReal value); -// /// Get ShowHiddenCharacters -// ATEErr (*GetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); -// /// Set ShowHiddenCharacters -// ATEErr (*SetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); -// /// Get Greeking Size -// ATEErr (*GetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ASInt32* ret); -// /// Set Greeking Size -// ATEErr (*SetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ASInt32 value); -// /// Get HighlightSubstituteFonts -// ATEErr (*GetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); -// /// Set HighlightSubstituteFonts -// ATEErr (*SetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); -// /// Get HighlightAlternateGlyphs -// ATEErr (*GetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); -// /// Set HighlightAlternateGlyphs -// ATEErr (*SetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); -// -//}ATE25DocumentTextResourcesSuite; -// -//////////////////////////////////////////////// -//// --CharFeaturesSuite-- -//////////////////////////////////////////////// -//#define kATE25CharFeaturesSuite kCharFeaturesSuite -//#define kCharFeaturesSuiteVersion1 1 -//#define kATE25CharFeaturesSuiteVersion kCharFeaturesSuiteVersion1 -// -//typedef struct ATE25CharFeaturesSuite{ -// -// // Reference count maintenance. -// void (*AddRef) ( CharFeaturesRef charfeatures); -// void (*Release) ( CharFeaturesRef charfeatures); -// ATEBool8 (*IsNull) ( CharFeaturesRef charfeatures); -// -// // CharFeatures is a complete Set of character attributes that -// // can be applied to text (except for kerning). They can be used to -// // describe or Set the (1) local character attributes of text (a.k.a. -// // the local overrides or (2) attributes of a named character style. -// // -// // Often, a given CharFeatures instance will only partially define -// // each of its attributes. The validity of an attribute is -// // determined by an associated boolean. Calls to "Get" methods -// // return an "isAssigned" boolean that reflects the validity of -// // the returned argument. Calls to "Set" methods always Set the -// // associated boolean to indicate validity. Calls to "clear" -// // methods always invalidate that boolean/attribute pair. -// // -// // A character's attribute is determined by an inheritance model. -// // At the top is the "Normal" style which fully defines all -// // attributes. These can be overriden by a named style or a local -// // override, where an attribute is valid. -// // -// // A given attribute value of a character is determined by starting -// // with the local override for that attribute if it is defined. If -// // not, then the attribute comes from the corresponding named style -// // (if it exists and) if it is defined. If all else fails, the -// // default value comes from the "Normal" character style. -// // -// // Default constructor creates a "blank" CharFeatures instance where -// // all attributes are undefined (invalid). -// ATEErr (*Initialize) ( CharFeaturesRef* charfeatures); -// ATEErr (*Clone) ( CharFeaturesRef charfeatures, CharFeaturesRef* ret); -// ATEErr (*GetFont) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontRef* ret); -// ATEErr (*GetFontSize) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetHorizontalScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetVerticalScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetAutoLeading) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetLeading) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetTracking) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetBaselineShift) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetCharacterRotation) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// /** Kern type information is only available for CharStyle instances. -// Use Story::GetKern( ) to obtain kern type information for a TextRange. -// */ -// ATEErr (*GetAutoKernType) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, AutoKernType* ret); -// ATEErr (*GetFontCapsOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontCapsOption* ret); -// ATEErr (*GetFontBaselineOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontBaselineOption* ret); -// ATEErr (*GetFontOpenTypePositionOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontOpenTypePositionOption* ret); -// ATEErr (*GetStrikethroughPosition) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, StrikethroughPosition* ret); -// ATEErr (*GetUnderlinePosition) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, UnderlinePosition* ret); -// ATEErr (*GetUnderlineOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// // ------------------------------------------------------------------ -// // OpenType features -// // ------------------------------------------------------------------ -// ATEErr (*GetLigature) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetDiscretionaryLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetContextualLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetAlternateLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetOldStyle) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetFractions) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetOrdinals) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetSwash) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetTitling) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetConnectionForms) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetStylisticAlternates) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetOrnaments) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetFigureStyle) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FigureStyle* ret); -// // ------------------------------------------------------------------ -// // Japanese OpenType feature support -// // ------------------------------------------------------------------ -// ATEErr (*GetProportionalMetrics) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetKana) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetRuby) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetItalics) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetBaselineDirection) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, BaselineDirection* ret); -// ATEErr (*GetLanguage) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, Language* ret); -// ATEErr (*GetJapaneseAlternateFeature) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, JapaneseAlternateFeature* ret); -// ATEErr (*GetTsume) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetStyleRunAlignment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, StyleRunAlignment* ret); -// // ------------------------------------------------------------------ -// // WariChu Setings -// // ------------------------------------------------------------------ -// ATEErr (*GetWariChuEnabled) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetWariChuLineCount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetWariChuLineGap) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetWariChuScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetWariChuSize) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetWariChuWidowAmount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetWariChuOrphanAmount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetWariChuJustification) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, WariChuJustification* ret); -// ATEErr (*GetTCYUpDownAdjustment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetLeftAki) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetRightAki) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetNoBreak) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetFillColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); -// ATEErr (*GetStrokeColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); -// ATEErr (*GetFill) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetStroke) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetFillFirst) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetFillOverPrint) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetStrokeOverPrint) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetLineCap) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineCapType* ret); -// ATEErr (*GetLineJoin) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineJoinType* ret); -// ATEErr (*GetLineWidth) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetMiterLimit) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetLineDashOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetLineDashArray) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ArrayRealRef* ret); -// // SET PROPERTIES -// // ====================================================================== -// ATEErr (*SetFont) ( CharFeaturesRef charfeatures, FontRef newVal); -// /** Set font size -// This function will throw kOutOfRange error if (newVal > 1296 || newVal < 0.1) -// */ -// ATEErr (*SetFontSize) ( CharFeaturesRef charfeatures, ASReal newVal); -// /** Set Horizontal Scale -// This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) -// If newVal is 1, this means 100% in the character palatte. -// */ -// ATEErr (*SetHorizontalScale) ( CharFeaturesRef charfeatures, ASReal newVal); -// /** Set Vertical Scale -// This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) -// If newVal is 1, this means 100% in the character palatte. -// */ -// ATEErr (*SetVerticalScale) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetAutoLeading) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetLeading) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetTracking) ( CharFeaturesRef charfeatures, ASInt32 newVal); -// ATEErr (*SetBaselineShift) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetCharacterRotation) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetAutoKernType) ( CharFeaturesRef charfeatures, AutoKernType newVal); -// ATEErr (*SetFontCapsOption) ( CharFeaturesRef charfeatures, FontCapsOption newVal); -// ATEErr (*SetFontBaselineOption) ( CharFeaturesRef charfeatures, FontBaselineOption newVal); -// ATEErr (*SetFontOpenTypePositionOption) ( CharFeaturesRef charfeatures, FontOpenTypePositionOption newVal); -// ATEErr (*SetStrikethroughPosition) ( CharFeaturesRef charfeatures, StrikethroughPosition newVal); -// ATEErr (*SetUnderlinePosition) ( CharFeaturesRef charfeatures, UnderlinePosition newVal); -// ATEErr (*SetUnderlineOffset) ( CharFeaturesRef charfeatures, ASReal newVal); -// // ------------------------------------------------------------------ -// // OpenType features -// // ------------------------------------------------------------------ -// ATEErr (*SetLigature) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetDiscretionaryLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetContextualLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetAlternateLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetOldStyle) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetFractions) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetOrdinals) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetSwash) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetTitling) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetConnectionForms) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetStylisticAlternates) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetOrnaments) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetFigureStyle) ( CharFeaturesRef charfeatures, FigureStyle newVal); -// // ------------------------------------------------------------------ -// // Japanese OpenType feature support -// // ------------------------------------------------------------------ -// ATEErr (*SetProportionalMetrics) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetKana) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetItalics) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetRuby) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetBaselineDirection) ( CharFeaturesRef charfeatures, BaselineDirection newVal); -// ATEErr (*SetLanguage) ( CharFeaturesRef charfeatures, Language newVal); -// ATEErr (*SetJapaneseAlternateFeature) ( CharFeaturesRef charfeatures, JapaneseAlternateFeature newVal); -// ATEErr (*SetTsume) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetStyleRunAlignment) ( CharFeaturesRef charfeatures, StyleRunAlignment newVal); -// // ------------------------------------------------------------------ -// // WariChu Setings -// // ------------------------------------------------------------------ -// ATEErr (*SetWariChuEnabled) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetWariChuLineCount) ( CharFeaturesRef charfeatures, ASInt32 newVal); -// ATEErr (*SetWariChuLineGap) ( CharFeaturesRef charfeatures, ASInt32 newVal); -// ATEErr (*SetWariChuScale) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetWariChuSize) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetWariChuWidowAmount) ( CharFeaturesRef charfeatures, ASInt32 newVal); -// ATEErr (*SetWariChuOrphanAmount) ( CharFeaturesRef charfeatures, ASInt32 newVal); -// ATEErr (*SetWariChuJustification) ( CharFeaturesRef charfeatures, WariChuJustification newVal); -// ATEErr (*SetTCYUpDownAdjustment) ( CharFeaturesRef charfeatures, ASInt32 newVal); -// ATEErr (*SetTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures, ASInt32 newVal); -// ATEErr (*SetLeftAki) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetRightAki) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetNoBreak) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetFillColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); -// ATEErr (*SetStrokeColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); -// ATEErr (*SetFill) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetStroke) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetFillFirst) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetFillOverPrint) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetStrokeOverPrint) ( CharFeaturesRef charfeatures, ATEBool8 newVal); -// ATEErr (*SetLineCap) ( CharFeaturesRef charfeatures, LineCapType newVal); -// ATEErr (*SetLineJoin) ( CharFeaturesRef charfeatures, LineJoinType newVal); -// ATEErr (*SetLineWidth) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetMiterLimit) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetLineDashOffset) ( CharFeaturesRef charfeatures, ASReal newVal); -// ATEErr (*SetLineDashArray) ( CharFeaturesRef charfeatures, ArrayRealRef newVal); -// // CLEAR PROPERTIES -// // ====================================================================== -// ATEErr (*ClearFont) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFontSize) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearHorizontalScale) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearVerticalScale) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearAutoLeading) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearLeading) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearTracking) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearBaselineShift) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearCharacterRotation) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearAutoKernType) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFontCapsOption) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFontBaselineOption) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFontOpenTypePositionOption) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearStrikethroughPosition) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearUnderlinePosition) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearUnderlineOffset) ( CharFeaturesRef charfeatures); -// // ------------------------------------------------------------------ -// // OpenType features -// // ------------------------------------------------------------------ -// ATEErr (*ClearLigature) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearDiscretionaryLigatures) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearContextualLigatures) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearAlternateLigatures) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearOldStyle) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFractions) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearOrdinals) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearSwash) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearTitling) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearConnectionForms) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearStylisticAlternates) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearOrnaments) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFigureStyle) ( CharFeaturesRef charfeatures); -// // ------------------------------------------------------------------ -// // Japanese OpenType feature support -// // ------------------------------------------------------------------ -// ATEErr (*ClearProportionalMetrics) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearKana) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearItalics) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearRuby) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearBaselineDirection) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearLanguage) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearJapaneseAlternateFeature) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearTsume) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearStyleRunAlignment) ( CharFeaturesRef charfeatures); -// // ------------------------------------------------------------------ -// // WariChu Setings -// // ------------------------------------------------------------------ -// ATEErr (*ClearWariChuEnabled) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearWariChuLineCount) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearWariChuLineGap) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearWariChuSubLineAmount) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearWariChuWidowAmount) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearWariChuOrphanAmount) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearWariChuJustification) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearTCYUpDownAdjustment) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearLeftAki) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearRightAki) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearNoBreak) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFillColor) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearStrokeColor) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFill) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearStroke) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFillFirst) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearFillOverPrint) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearStrokeOverPrint) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearLineCap) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearLineJoin) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearLineWidth) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearMiterLimit) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearLineDashOffset) ( CharFeaturesRef charfeatures); -// ATEErr (*ClearLineDashArray) ( CharFeaturesRef charfeatures); -// // ALGEBRA METHODS -// // Methods return true if changes were made. -// // ====================================================================== -// // Intersection of 2 Features is the intersection of each attribute -// // on the lhs with the corresponding attribute on the rhs. -// // Attribute intersections are defined by the following truth table: -// // -// // ______________________________________________________________________ -// // this.attribute | rhs.attribute || Action/Result -// // ====================================================================== -// // assigned | assigned || [Case 1] If values are equal -// // | || ACTION: nothing -// // | || RESULT: value preserved -// // | || [Case 2] If values are not equal -// // | || ACTION: if (*this.attribute != *rhs.attribute) -// // | || this.attribute.Clear(); -// // | || RESULT: unassigned -// // ---------------------------------------------------------------------- -// // assigned | unassigned || ACTION: this.attribute.Clear() -// // | || RESULT: unassigned -// // ---------------------------------------------------------------------- -// // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) -// // | || RESULT: unassigned -// // ---------------------------------------------------------------------- -// // unassigned | unassigned || ACTION: nothing (both are equal) -// // | || RESULT: unassigned -// // ______________________________________________________________________ -// // -// ATEErr (*IntersectFeatures) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); -// // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. -// ATEErr (*ReplaceOrAddFeatures) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); -// // Unassigns each attribute whose value equals value of corresponding attribute in rhs -// ATEErr (*UnassignEachIfEqual) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); -// // True if all are not assigned; false otherwise -// ATEErr (*IsEachNotAssigned) ( CharFeaturesRef charfeatures, ATEBool8* ret); -// // True if all are assigned; false otherwise -// ATEErr (*IsEachAssigned) ( CharFeaturesRef charfeatures, ATEBool8* ret); -// // ACCESSORS DESIGNED FOR CLIENT APPLICATION CORE -// // ====================================================================== -// -//}ATE25CharFeaturesSuite; -// -//////////////////////////////////////////////// -//// --CharInspectorSuite-- -//////////////////////////////////////////////// -//#define kATE25CharInspectorSuite kCharInspectorSuite -//#define kCharInspectorSuiteVersion1 1 -//#define kATE25CharInspectorSuiteVersion kCharInspectorSuiteVersion1 -// -//typedef struct ATE25CharInspectorSuite{ -// -// // Reference count maintenance. -// void (*AddRef) ( CharInspectorRef charinspector); -// void (*Release) ( CharInspectorRef charinspector); -// ATEBool8 (*IsNull) ( CharInspectorRef charinspector); -// -// ATEErr (*Initialize) ( CharInspectorRef* charinspector); -// ATEErr (*GetFont) ( CharInspectorRef charinspector, ArrayFontRefRef* ret); -// ATEErr (*GetFontSize) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetHorizontalScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetVerticalScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetSyntheticBold) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetSyntheticItalic) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetAutoLeading) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetLeading) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetTracking) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); -// ATEErr (*GetBaselineShift) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetCharacterRotation) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetFontCapsOption) ( CharInspectorRef charinspector, ArrayFontCapsOptionRef* ret); -// ATEErr (*GetFontBaselineOption) ( CharInspectorRef charinspector, ArrayFontBaselineOptionRef* ret); -// ATEErr (*GetFontOpenTypePositionOption) ( CharInspectorRef charinspector, ArrayFontOpenTypePositionOptionRef* ret); -// ATEErr (*GetStrikethroughPosition) ( CharInspectorRef charinspector, ArrayStrikethroughPositionRef* ret); -// ATEErr (*GetUnderlinePosition) ( CharInspectorRef charinspector, ArrayUnderlinePositionRef* ret); -// ATEErr (*GetUnderlineOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// // ------------------------------------------------------------------ -// // OpenType features -// // ------------------------------------------------------------------ -// ATEErr (*GetLigature) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetDiscretionaryLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetContextualLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetAlternateLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetOldStyle) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetFractions) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetOrdinals) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetSwash) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetTitling) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetConnectionForms) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetStylisticAlternates) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetOrnaments) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetFigureStyle) ( CharInspectorRef charinspector, ArrayFigureStyleRef* ret); -// // ------------------------------------------------------------------ -// // Japanese OpenType feature support -// // ------------------------------------------------------------------ -// ATEErr (*GetProportionalMetrics) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetKana) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetItalics) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetRuby) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetBaselineDirection) ( CharInspectorRef charinspector, ArrayBaselineDirectionRef* ret); -// ATEErr (*GetLanguage) ( CharInspectorRef charinspector, ArrayLanguageRef* ret); -// ATEErr (*GetTsume) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetStyleRunAlignment) ( CharInspectorRef charinspector, ArrayStyleRunAlignmentRef* ret); -// // ------------------------------------------------------------------ -// // WariChu Setings -// // ------------------------------------------------------------------ -// ATEErr (*GetWariChuLineCount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); -// ATEErr (*GetWariChuLineGap) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); -// ATEErr (*GetWariChuScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetWariChuSize) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetWariChuWidowAmount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); -// ATEErr (*GetWariChuOrphanAmount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); -// ATEErr (*GetWariChuJustification) ( CharInspectorRef charinspector, ArrayWariChuJustificationRef* ret); -// ATEErr (*GetWariChuEnabled) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetTCYUpDownAdjustment) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); -// ATEErr (*GetTCYLeftRightAdjustment) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); -// ATEErr (*GetLeftAki) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetRightAki) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetNoBreak) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetFillColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); -// ATEErr (*GetStrokeColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); -// ATEErr (*GetFill) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetStroke) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetFillFirst) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetFillOverPrint) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetStrokeOverPrint) ( CharInspectorRef charinspector, ArrayBoolRef* ret); -// ATEErr (*GetLineCap) ( CharInspectorRef charinspector, ArrayLineCapTypeRef* ret); -// ATEErr (*GetLineJoin) ( CharInspectorRef charinspector, ArrayLineJoinTypeRef* ret); -// ATEErr (*GetLineWidth) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetMiterLimit) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetLineDashOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); -// ATEErr (*GetLineDashArray) ( CharInspectorRef charinspector, ArrayArrayRealRef* ret); -// -//}ATE25CharInspectorSuite; -// -//////////////////////////////////////////////// -//// --FindSuite-- -//////////////////////////////////////////////// -//#define kATE25FindSuite kFindSuite -//#define kFindSuiteVersion1 1 -//#define kATE25FindSuiteVersion kFindSuiteVersion1 -// -//typedef struct ATE25FindSuite{ -// -// // Reference count maintenance. -// void (*AddRef) ( FindRef find); -// void (*Release) ( FindRef find); -// ATEBool8 (*IsNull) ( FindRef find); -// -// // Options -// // ======================================================================== -// ATEErr (*GetSearchDirection) ( FindRef find, Direction* ret); -// ATEErr (*GetIgnoreCase) ( FindRef find, ATEBool8* ret); -// ATEErr (*GetWholeWord) ( FindRef find, ATEBool8* ret); -// ATEErr (*GetWrap) ( FindRef find, ATEBool8* ret); -// ATEErr (*GetFindWordsOutOfBounds) ( FindRef find, ATEBool8* ret); -// ATEErr (*SetSearchDirection) ( FindRef find, Direction newValue); -// ATEErr (*SetIgnoreCase) ( FindRef find, ATEBool8 newValue); -// ATEErr (*SetWholeWord) ( FindRef find, ATEBool8 newValue); -// ATEErr (*SetWrap) ( FindRef find, ATEBool8 newValue); -// ATEErr (*SetFindWordsOutOfBounds) ( FindRef find, ATEBool8 newValue); -// // Control scope of search to be entire document or Story. -// // By default, the entire document is searched. -// ATEErr (*GetSearchScope) ( FindRef find, SearchScope* ret); -// ATEErr (*SetSearchScope) ( FindRef find, SearchScope searchScope); -// // If called, search is done only within specified TextRange -// ATEErr (*SetSearchRange) ( FindRef find, TextRangeRef pRange); -// ATEErr (*SetSearchChars) ( FindRef find, ASUnicode* pSearchChars); -// ATEErr (*GetSearchChars) ( FindRef find, ASUnicode* pSearchChars, ASInt32 length); -// ATEErr (*SetReplaceChars) ( FindRef find, ASUnicode* pSearchChars); -// ATEErr (*GetReplaceChars) ( FindRef find, ASUnicode* pSearchChars, ASInt32 length); -// // Temporary way to reset the engine for modeless operation -// ATEErr (*Reset) ( FindRef find); -// // Methods -// // ======================================================================== -// // Searches current user selection. -// // Returns false if the search failed -// ATEErr (*FindMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8* ret); -// // Skips the current user selection. -// // Returns false if the search failed -// ATEErr (*FindNextMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8* ret); -// ATEErr (*ReplaceMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8 findNext, ATEBool8* ret); -// // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and -// // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. -// ATEErr (*FindAndReplaceAllMatches) ( FindRef find, ASInt32* pReplaceCount, ATEBool8* ret); -// // Use these to implement ReplaceAll. -// // Start by saving off the settings with GetPreReplaceAllSettings( ) -// // (also note what text object you're currently working with so you can restore that -// // via SetSearchRange( ) when you're finished. -// ATEErr (*GetPreReplaceAllSettings) ( FindRef find, ASInt32* pCurrentPoint, ASInt32* pStartPoint); -// // Implement a loop to go through all the text objects you want to replace all with. -// // Use FindMatch( ), FindNextMatch( ), and ReplaceMatch( ) to replace all. -// // Keep track of how many ReplaceMatch( ) calls were made for reporting back to the user -// // When finished, restore the correct text object and range using SetSearchRange( ) -// // and restore the positions using RestorePreReplaceAllSettings( ) -// ATEErr (*RestorePreReplaceAllSettings) ( FindRef find, const ASInt32 currentPoint, const ASInt32 startPoint); -// -//}ATE25FindSuite; -// -//////////////////////////////////////////////// -//// --ParaFeaturesSuite-- -//////////////////////////////////////////////// -//#define kATE25ParaFeaturesSuite kParaFeaturesSuite -//#define kParaFeaturesSuiteVersion1 1 -//#define kATE25ParaFeaturesSuiteVersion kParaFeaturesSuiteVersion1 -// -//typedef struct ATE25ParaFeaturesSuite{ -// -// // Reference count maintenance. -// void (*AddRef) ( ParaFeaturesRef parafeatures); -// void (*Release) ( ParaFeaturesRef parafeatures); -// ATEBool8 (*IsNull) ( ParaFeaturesRef parafeatures); -// -// // ParaFeatures is a complete Set of paragraph attributes that -// // can be applied to text (except for kerning). They can be used to -// // describe or Set the (1) local paragraph attributes of text (a.k.a. -// // the local overrides or (2) attributes of a named paragraph style. -// // -// // Often, a given ParaFeatures instance will only partially define -// // each of its attributes. The validity of an attribute is -// // determined by an associated boolean. Calls to "Get" methods -// // return an "isAssigned" boolean that reflects the validity of -// // the returned argument. Calls to "Set" methods always Set the -// // associated boolean to indicate validity. Calls to "Clear" -// // methods always invalidate that boolean/attribute pair. -// // -// // A paragraph's attribute is determined by an inheritance model. -// // At the top is the "Normal" style which fully defines all -// // attributes. These can be overriden by a named style or a local -// // override, where an attribute is valid. -// // -// // A given attribute value of a paragraph is determined by starting -// // with the local override for that attribute if it is defined. If -// // not, then the attribute comes from the corresponding named style -// // (if it exists and) if it is defined. If all else fails, the -// // default value comes from the "Normal" paragraph style. -// // -// // Default constructor creates a "blank" ParaFeatures instance where -// // all attributes are undefined (invalid). -// ATEErr (*Initialize) ( ParaFeaturesRef* parafeatures); -// ATEErr (*Clone) ( ParaFeaturesRef parafeatures, ParaFeaturesRef* ret); -// // ------------------------------------------------------------------ -// // Justification -// // ------------------------------------------------------------------ -// ATEErr (*GetJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); -// ATEErr (*GetFirstLineIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetStartIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetEndIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetSpaceBefore) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetSpaceAfter) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// // ------------------------------------------------------------------ -// // Hyphenation -// // ------------------------------------------------------------------ -// ATEErr (*GetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetPreHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetPostHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetHyphenationZone) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetHyphenationPreference) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// // ------------------------------------------------------------------ -// // Justification Features -// // ------------------------------------------------------------------ -// ATEErr (*GetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetMinWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetSingleWordJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); -// ATEErr (*GetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// ATEErr (*GetLeadingType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, LeadingType* ret); -// ATEErr (*GetTabStops) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, TabStopsRef* ret); -// ATEErr (*GetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); -// // ------------------------------------------------------------------ -// // Japanese Features -// // ------------------------------------------------------------------ -// ATEErr (*GetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetAutoTCY) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); -// ATEErr (*GetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetBurasagariType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, BurasagariType* ret); -// ATEErr (*GetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, PreferredKinsokuOrder* ret); -// ATEErr (*GetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); -// /// This will return a null object if Kinsoku is not used (ie None set) -// ATEErr (*GetKinsoku) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, KinsokuRef* ret); -// /// This will return a null object if Mojikumi is not used (ie None set) -// ATEErr (*GetMojiKumi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, MojiKumiRef* ret); -// // Other -// ATEErr (*GetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); -// ATEErr (*GetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, CharFeaturesRef* ret); -// // SET PROPERTIES -// // ====================================================================== -// // ------------------------------------------------------------------ -// // Justification -// // ------------------------------------------------------------------ -// ATEErr (*SetJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); -// ATEErr (*SetFirstLineIndent) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetStartIndent) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetEndIndent) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetSpaceBefore) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetSpaceAfter) ( ParaFeaturesRef parafeatures, ASReal newVal); -// // ------------------------------------------------------------------ -// // Hyphenation -// // ------------------------------------------------------------------ -// ATEErr (*SetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); -// ATEErr (*SetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ASInt32 newVal); -// ATEErr (*SetPreHyphenSize) ( ParaFeaturesRef parafeatures, ASInt32 newVal); -// ATEErr (*SetPostHyphenSize) ( ParaFeaturesRef parafeatures, ASInt32 newVal); -// ATEErr (*SetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ASInt32 newVal); -// ATEErr (*SetHyphenationZone) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); -// ATEErr (*SetHyphenationPreference) ( ParaFeaturesRef parafeatures, ASReal newVal); -// // ------------------------------------------------------------------ -// // Justification Features -// // ------------------------------------------------------------------ -// ATEErr (*SetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetMinWordSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetSingleWordJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); -// ATEErr (*SetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ASReal newVal); -// ATEErr (*SetLeadingType) ( ParaFeaturesRef parafeatures, LeadingType newVal); -// ATEErr (*SetTabStops) ( ParaFeaturesRef parafeatures, TabStopsRef newVal); -// ATEErr (*SetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ASReal newVal); -// // ------------------------------------------------------------------ -// // Japanese Features -// // ------------------------------------------------------------------ -// ATEErr (*SetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); -// ATEErr (*SetAutoTCY) ( ParaFeaturesRef parafeatures, ASInt32 newVal); -// ATEErr (*SetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); -// ATEErr (*SetBurasagariType) ( ParaFeaturesRef parafeatures, BurasagariType newVal); -// ATEErr (*SetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, PreferredKinsokuOrder newVal); -// ATEErr (*SetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); -// ATEErr (*SetKinsoku) ( ParaFeaturesRef parafeatures, KinsokuRef newVal); -// ATEErr (*SetMojiKumi) ( ParaFeaturesRef parafeatures, MojiKumiRef newVal); -// // Other -// ATEErr (*SetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); -// ATEErr (*SetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, CharFeaturesRef newVal); -// // CLEAR PROPERTIES -// // ====================================================================== -// // ------------------------------------------------------------------ -// // Justification -// // ------------------------------------------------------------------ -// ATEErr (*ClearJustification) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearFirstLineIndent) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearStartIndent) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearEndIndent) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearSpaceBefore) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearSpaceAfter) ( ParaFeaturesRef parafeatures); -// // ------------------------------------------------------------------ -// // Hyphenation -// // ------------------------------------------------------------------ -// ATEErr (*ClearAutoHyphenate) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearHyphenatedWordSize) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearPreHyphenSize) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearPostHyphenSize) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearHyphenationZone) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearHyphenateCapitalized) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearHyphenationPreference) ( ParaFeaturesRef parafeatures); -// // ------------------------------------------------------------------ -// // Justification Features -// // ------------------------------------------------------------------ -// ATEErr (*ClearWordSpacing) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearLetterSpacing) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearGlyphScaling) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearSingleWordJustification) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearAutoLeadingPercentage) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearLeadingType) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearTabStops) ( ParaFeaturesRef parafeatures); -// // ------------------------------------------------------------------ -// // Japanese Features -// // ------------------------------------------------------------------ -// ATEErr (*ClearHangingRoman) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearAutoTCY) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearBunriKinshi) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearBurasagariType) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearKinsoku) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearMojiKumi) ( ParaFeaturesRef parafeatures); -// // Other -// ATEErr (*ClearEveryLineComposer) ( ParaFeaturesRef parafeatures); -// ATEErr (*ClearDefaultCharFeatures) ( ParaFeaturesRef parafeatures); -// // ALGEBRA METHODS -// // Methods return true if changes were made. -// // ====================================================================== -// // Intersection of 2 Features is the intersection of each attribute -// // on the lhs with the corresponding attribute on the rhs. -// // Attribute intersections are defined by the following truth table: -// // -// // ______________________________________________________________________ -// // this.attribute | rhs.attribute || Action/Result -// // ====================================================================== -// // assigned | assigned || [Case 1] If values are equal -// // | || ACTION: nothing -// // | || RESULT: value preserved -// // | || [Case 2] If values are not equal -// // | || ACTION: if (*this.attribute != *rhs.attribute) -// // | || this.attribute.Clear(); -// // | || RESULT: unassigned -// // ---------------------------------------------------------------------- -// // assigned | unassigned || ACTION: this.attribute.Clear() -// // | || RESULT: unassigned -// // ---------------------------------------------------------------------- -// // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) -// // | || RESULT: unassigned -// // ---------------------------------------------------------------------- -// // unassigned | unassigned || ACTION: nothing (both are equal) -// // | || RESULT: unassigned -// // ______________________________________________________________________ -// // -// ATEErr (*IntersectFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); -// // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. -// ATEErr (*ReplaceOrAddFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); -// // Unassigns each attribute whose value equals value of corresponding attribute in rhs -// ATEErr (*UnassignEachIfEqual) ( ParaFeaturesRef parafeatures, const ParaFeaturesRef rhs, ATEBool8* ret); -// // True if all are not assigned; false otherwise -// ATEErr (*IsEachNotAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); -// // True if all are assigned; false otherwise -// ATEErr (*IsEachAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); -// // PRIVATE AND PROTECTED -// // ====================================================================== -// -//}ATE25ParaFeaturesSuite; -// -//////////////////////////////////////////////// -//// --ParaInspectorSuite-- -//////////////////////////////////////////////// -//#define kATE25ParaInspectorSuite kParaInspectorSuite -//#define kParaInspectorSuiteVersion1 1 -//#define kATE25ParaInspectorSuiteVersion kParaInspectorSuiteVersion1 -// -//typedef struct ATE25ParaInspectorSuite{ -// -// // Reference count maintenance. -// void (*AddRef) ( ParaInspectorRef parainspector); -// void (*Release) ( ParaInspectorRef parainspector); -// ATEBool8 (*IsNull) ( ParaInspectorRef parainspector); -// -// ATEErr (*Initialize) ( ParaInspectorRef* parainspector); -// // ------------------------------------------------------------------ -// // Justification -// // ------------------------------------------------------------------ -// ATEErr (*GetJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); -// ATEErr (*GetFirstLineIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetStartIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetEndIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetSpaceBefore) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetSpaceAfter) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// // ------------------------------------------------------------------ -// // Hyphenation -// // ------------------------------------------------------------------ -// ATEErr (*GetAutoHyphenate) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); -// ATEErr (*GetHyphenatedWordSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); -// ATEErr (*GetPreHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); -// ATEErr (*GetPostHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); -// ATEErr (*GetConsecutiveHyphenLimit) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); -// ATEErr (*GetHyphenationZone) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetHyphenateCapitalized) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); -// ATEErr (*GetHyphenationPreference) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// // ------------------------------------------------------------------ -// // Justification Features -// // ------------------------------------------------------------------ -// ATEErr (*GetDesiredWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetMaxWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetMinWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetDesiredLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetMaxLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetMinLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetDesiredGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetMaxGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetMinGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetSingleWordJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); -// ATEErr (*GetAutoLeadingPercentage) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// ATEErr (*GetLeadingType) ( ParaInspectorRef parainspector, ArrayLeadingTypeRef* ret); -// ATEErr (*GetTabStops) ( ParaInspectorRef parainspector, ArrayTabStopsRefRef* ret); -// ATEErr (*GetDefaultTabWidth) ( ParaInspectorRef parainspector, ArrayRealRef* ret); -// // ------------------------------------------------------------------ -// // Japanese Features -// // ------------------------------------------------------------------ -// ATEErr (*GetHangingRoman) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); -// ATEErr (*GetAutoTCY) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); -// ATEErr (*GetBunriKinshi) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); -// ATEErr (*GetBurasagariType) ( ParaInspectorRef parainspector, ArrayBurasagariTypeRef* ret); -// ATEErr (*GetPreferredKinsokuOrder) ( ParaInspectorRef parainspector, ArrayPreferredKinsokuOrderRef* ret); -// ATEErr (*GetKurikaeshiMojiShori) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); -// ATEErr (*GetKinsoku) ( ParaInspectorRef parainspector, ArrayKinsokuRefRef* ret); -// ATEErr (*GetMojiKumi) ( ParaInspectorRef parainspector, ArrayMojiKumiRefRef* ret); -// // Other -// ATEErr (*GetEveryLineComposer) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); -// -//}ATE25ParaInspectorSuite; -// -//////////////////////////////////////////////// -//// --SpellSuite-- -//////////////////////////////////////////////// -//#define kATE25SpellSuite kSpellSuite -//#define kSpellSuiteVersion1 1 -//#define kATE25SpellSuiteVersion kSpellSuiteVersion1 -// -//typedef struct ATE25SpellSuite{ -// -// // Reference count maintenance. -// void (*AddRef) ( SpellRef spell); -// void (*Release) ( SpellRef spell); -// ATEBool8 (*IsNull) ( SpellRef spell); -// -// // Options -// // ======================================================================== -// ATEErr (*Initialize) ( SpellRef spell, const char* pSpellingDirectory); -// ATEErr (*IsInitialized) ( SpellRef spell, ATEBool8* ret); -// ATEErr (*GetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8* ret); -// ATEErr (*GetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8* ret); -// ATEErr (*GetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8* ret); -// ATEErr (*GetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8* ret); -// ATEErr (*GetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8* ret); -// ATEErr (*SetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8 newValue); -// ATEErr (*SetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8 newValue); -// ATEErr (*SetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8 newValue); -// ATEErr (*SetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8 newValue); -// ATEErr (*SetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8 newValue); -// // Control scope of search to be entire document or Story. -// // By default, the entire document is searched. -// ATEErr (*GetSearchScope) ( SpellRef spell, SearchScope* ret); -// ATEErr (*SetSearchScope) ( SpellRef spell, SearchScope searchScope); -// // If called, search is done only within specified TextRange -// ATEErr (*SetSearchRange) ( SpellRef spell, const TextRangeRef pRange, const ATEBool8 resetEndOfSentence, const ATEBool8 resetCurPos); -// // Temporary way to reset the engine for modeless operation -// ATEErr (*Reset) ( SpellRef spell); -// // Use this if the user changes the text significantly enough that you need to reset, -// // but are fairly certain that the text hasn't been changed before the resumePoint. -// ATEErr (*ResumeFrom) ( SpellRef spell, const ASInt32 resumePoint); -// // Use this to resume from the current insertion point. -// ATEErr (*ResumeFromInsertionPoint) ( SpellRef spell); -// // Methods -// // ======================================================================== -// // Searches from start for unknown words and return the first one it finds. -// // Returns true if it found an unknown word, false if it searched to the end -// // and didn't find any unknown words. -// ATEErr (*FindOneMisspelledWord) ( SpellRef spell, SpellCheckingResult* pResult, TextRangeRef pRange, Language* pLanguage, ATEBool8* ret); -// // Calling FindOneMisspelledWord( ) will fill up an internal list of suggested -// // corrections. Use these calls to get the contents of that word list: -// // -// // This will return the size of the buffer required to hold the contents of the word list. -// ATEErr (*GetWordListSize) ( SpellRef spell, ASInt32* ret); -// // -// // This will fill up pWordListBuffer with the contents of the list. -// // sizeOfBuffer is the size of pWordListBuffer (used to prevent overflow) -// // pNumberOfWords is the number of words in the buffer. The words are all null-terminated. -// ATEErr (*GetWordListContents) ( SpellRef spell, ASUnicode* pWordListBuffer, ASInt32 sizeOfBuffer, ASInt32* pNumberOfWords); -// ATEErr (*Replace) ( SpellRef spell, TextRangeRef pRange, const ASUnicode* pCorrection ); -// // Use this to add an entry to a pair dictionary, binding the selected word to rCorrection. -// ATEErr (*AddSelectedToReplaceAllDict) ( SpellRef spell, const ASUnicode* pCorrection); -// // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and -// // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. -// ATEErr (*DoReplaceAll) ( SpellRef spell, ATEBool8* ret); -// // Use these to implement ReplaceAll. -// // Start by saving off the settings with GetPreReplaceAllSettings( ) -// // (also note what text object you're currently working with so you can restore that -// // via SetSearchRange( ) when you're finished. -// ATEErr (*GetPreReplaceAllSettings) ( SpellRef spell, ASInt32* pCurrentPoint, ATEBool8* pFoundSentenceEnd); -// // Implement a loop to go through all the text objects you want to replace all with. -// // Use this to find all instances of the target word in the current text object. -// // Keep calling it until it returns false, making sure to set firstTimeInThisObject as needed. -// // It will return the text range to select and call ReplaceSelected( ) with. -// ATEErr (*FindReplaceAllWord) ( SpellRef spell, TextRangeRef pRange, const ATEBool8 firstTimeInThisObject, ATEBool8* ret); -// // When finished, restore the correct text object and range using SetSearchRange( ) -// // and restore the positions using RestorePreReplaceAllSettings( ) -// // Order is important here - do notcall RestorePreReplaceAllSettings( ) first, -// // as SetSearchRange( ) will reset the foundSentenceEnd flag. -// ATEErr (*RestorePreReplaceAllSettings) ( SpellRef spell, const ASInt32 currentPoint, const ATEBool8 foundSentenceEnd); -// // The pair dictionary is not automatically cleared. Call this when you want it cleared. -// ATEErr (*ClearPairDictionary) ( SpellRef spell); -// // Use this for adding words as they're found. -// ATEErr (*AddSelectedToUserDict) ( SpellRef spell); -// // User dictionary access and maintenance - used to manage the dictionary at any time. -// // -// // Calling GetUserDictionaryContents( ) will fill up the same internal list as FindAndSelectOneMisspelledWord( ) -// // Use GetWordListSize( ) and GetWordListContents( ) just like with the suggestion list. -// ATEErr (*GetUserDictionaryContents) ( SpellRef spell); -// // now makes sure that there are no spaces (multiple words) -// // Return value reflects success in adding legit word. -// ATEErr (*AddToUserDictionary) ( SpellRef spell, const ASUnicode* pWord, ATEBool8* ret); -// ATEErr (*DeleteFromUserDictionary) ( SpellRef spell, const ASUnicode* pWord); -// ATEErr (*WordExistsInUserDictionary) ( SpellRef spell, const ASUnicode* pWord, ATEBool8* ret); -// // The ignore list is used for storing "ignore all" words. -// ATEErr (*AddSelectedToIgnoreList) ( SpellRef spell); -// // The ignore list is not automatically cleared. Call this when you want it cleared. -// ATEErr (*ClearIgnoreList) ( SpellRef spell); -// ATEErr (*GetLanguageOfLastMissingDictionary) ( SpellRef spell, Language* ret); -// -//}ATE25SpellSuite; -// -//#ifdef MAC_ENV -// #pragma options align=reset -//#endif -// -//#ifdef WIN_ENV -// #pragma pack(pop) -//#endif -// -//#ifdef __cplusplus -//}// namespace ATE -//} -//#endif -// +///* ------------------------------------------------------------------------------- +// +// Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. +// +// NOTICE: Adobe permits you to use, modify, and distribute this file +// in accordance with the terms of the Adobe license agreement accompanying +// it. If you have received this file from a source other than Adobe, then +// your use, modification, or distribution of it requires the prior written +// permission of Adobe. +// +// ---------------------------------------------------------------------------------- +// +// File: ATE25Suites.h +// +// Notes: Machine Generated file from script version 1.45 +// Please don't modify manually! +// +// ---------------------------------------------------------------------------------- */ +// +//#ifndef __ATE25Suites__ +//#define __ATE25Suites__ +// +//#include "ATESuites.h" +// +//#ifdef __cplusplus +//namespace ATE +//{ +//extern "C" { +//#endif +// +//#ifdef MAC_ENV +// #if defined (__MWERKS__) +// #pragma options align=power_gcc +// #elif defined (__GNUC__) +// #pragma options align=power +// #endif +//#endif +// +//#ifdef WIN_ENV +// #pragma pack(push, 4) +//#endif +// +//////////////////////////////////////////////// +//// --TextFrameSuite-- +//////////////////////////////////////////////// +//#define kATE25TextFrameSuite kTextFrameSuite +//#define kTextFrameSuiteVersion1 1 +//#define kATE25TextFrameSuiteVersion kTextFrameSuiteVersion1 +// +//typedef struct ATE25TextFrameSuite{ +// +// // Reference count maintenance. +// void (*AddRef) ( TextFrameRef textframe); +// void (*Release) ( TextFrameRef textframe); +// ATEBool8 (*IsNull) ( TextFrameRef textframe); +// +// // METHODS +// // ===================================================================== +// /// Get the parent story +// ATEErr (*GetStory) ( TextFrameRef textframe, StoryRef* ret); +// /** Get the text range of this frame, +// If this frame is the last frame in this story then:- +// 1. If bIncludeOverflow is true, then the range returned is including the overflown text. +// 2. If bIncludeOverflow is false, then the range returned will not include the overflown text. +// */ +// ATEErr (*GetTextRange) ( TextFrameRef textframe, ATEBool8 bIncludeOverflow, TextRangeRef* ret); +// ATEErr (*GetTextLinesIterator) ( TextFrameRef textframe, TextLinesIteratorRef* ret); +// ATEErr (*IsEqual) ( TextFrameRef textframe, const TextFrameRef anotherFrame, ATEBool8* ret); +// ATEErr (*GetType) ( TextFrameRef textframe, FrameType* ret); +// ATEErr (*GetLineOrientation) ( TextFrameRef textframe, LineOrientation* ret); +// /** Check if this frame is selected. To set the selection, you have to use application specific +// API for that. In Illustrator case, you can use AIArtSuite to set the selection. +// */ +// ATEErr (*GetSelected) ( TextFrameRef textframe, ATEBool8* ret); +// ATEErr (*GetMatrix) ( TextFrameRef textframe, ASRealMatrix* ret); +// ATEErr (*GetRowCount) ( TextFrameRef textframe, ASInt32* ret); +// ATEErr (*GetColumnCount) ( TextFrameRef textframe, ASInt32* ret); +// ATEErr (*GetRowMajorOrder) ( TextFrameRef textframe, ATEBool8* ret); +// ATEErr (*GetRowGutter) ( TextFrameRef textframe, ASReal* ret); +// ATEErr (*GetColumnGutter) ( TextFrameRef textframe, ASReal* ret); +// ATEErr (*GetSpacing) ( TextFrameRef textframe, ASReal* ret); +// ATEErr (*GetOpticalAlignment) ( TextFrameRef textframe, ATEBool8* ret); +// ATEErr (*SetRowCount) ( TextFrameRef textframe, ASInt32 rowCount); +// ATEErr (*SetColumnCount) ( TextFrameRef textframe, ASInt32 columnCount); +// ATEErr (*SetRowMajorOrder) ( TextFrameRef textframe, ATEBool8 isRowMajor); +// ATEErr (*SetRowGutter) ( TextFrameRef textframe, ASReal gutter); +// ATEErr (*SetColumnGutter) ( TextFrameRef textframe, ASReal gutter); +// ATEErr (*SetSpacing) ( TextFrameRef textframe, ASReal spacing); +// ATEErr (*SetOpticalAlignment) ( TextFrameRef textframe, ATEBool8 isActive); +// ATEErr (*SetLineOrientation) ( TextFrameRef textframe, LineOrientation lineOrientation); +// +//}ATE25TextFrameSuite; +// +//////////////////////////////////////////////// +//// --DocumentTextResourcesSuite-- +//////////////////////////////////////////////// +//#define kATE25DocumentTextResourcesSuite kDocumentTextResourcesSuite +//#define kDocumentTextResourcesSuiteVersion1 1 +//#define kATE25DocumentTextResourcesSuiteVersion kDocumentTextResourcesSuiteVersion1 +// +//typedef struct ATE25DocumentTextResourcesSuite{ +// +// // Reference count maintenance. +// void (*AddRef) ( DocumentTextResourcesRef documenttextresources); +// void (*Release) ( DocumentTextResourcesRef documenttextresources); +// ATEBool8 (*IsNull) ( DocumentTextResourcesRef documenttextresources); +// +// // From parent class... +// ATEErr (*GetKinsokuSet) ( DocumentTextResourcesRef documenttextresources, KinsokuSetRef* ret); +// ATEErr (*GetMojiKumiSet) ( DocumentTextResourcesRef documenttextresources, MojiKumiSetRef* ret); +// ATEErr (*GetCompFontClassSet) ( DocumentTextResourcesRef documenttextresources, CompFontClassSetRef* ret); +// ATEErr (*GetCompFontSet) ( DocumentTextResourcesRef documenttextresources, CompFontSetRef* ret); +// ATEErr (*GetTextResources) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef* ret); +// ATEErr (*GetFind) ( DocumentTextResourcesRef documenttextresources, FindRef* ret); +// ATEErr (*GetSpell) ( DocumentTextResourcesRef documenttextresources, const char* pSpellingDirectory, SpellRef* ret); +// ATEErr (*GetGlyphAndAlternates) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); +// ATEErr (*GetAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, GlyphRef* ret); +// ATEErr (*InsertAlternateGlyph) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* theCharacters, const ATEGlyphID glyphID, const char* otFeatureArray, ASInt32 otFeatureCount, const ASInt32* otFeatureIndexArray, ATEBool8 leaveSelected); +// ATEErr (*GetAlternatesAvailableThroughoutSelection) ( DocumentTextResourcesRef documenttextresources, ArrayIntegerRef* ret); +// ATEErr (*GetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, ATEBool8* isFeature, JapaneseAlternateFeature* ret); +// ATEErr (*SetJapaneseAlternateFeatureInSelection) ( DocumentTextResourcesRef documenttextresources, JapaneseAlternateFeature feature); +// ATEErr (*GetCharStylesInDocument) ( DocumentTextResourcesRef documenttextresources, CharStylesRef* ret); +// ATEErr (*GetParaStylesInDocument) ( DocumentTextResourcesRef documenttextresources, ParaStylesRef* ret); +// /// Returns a named style corresponding to pName. If no matching +// /// style can be found or *pName == L'\0' then a null object is returned. +// ATEErr (*GetCharStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, CharStyleRef* ret); +// ATEErr (*GetParaStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ParaStyleRef* ret); +// ATEErr (*GetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); +// ATEErr (*GetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources, ParaStyleRef* ret); +// ATEErr (*ResetNormalCharStyle) ( DocumentTextResourcesRef documenttextresources); +// ATEErr (*ResetNormalParaStyle) ( DocumentTextResourcesRef documenttextresources); +// /// Routines to add new named styles to the document. If an existing +// /// style already corresponds to pName or *pName == L'\0' then the +// /// document is unchanged and a null object is returned. +// ATEErr (*CreateCharStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, CharStyleRef* ret); +// ATEErr (*CreateParaStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ParaStyleRef* ret); +// ATEErr (*CreateCharStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, CharFeaturesRef pFeatures, CharStyleRef* ret); +// ATEErr (*CreateParaStyleWithFeatures) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ParaFeaturesRef pFeatures, ParaStyleRef* ret); +// /// Removes a style from the document. Exact details will be provided +// /// later. +// /// +// /// If no matching style in the document corresponds to pName or +// /// *pName == L'\0' then the document is unchanged and false is returned. +// ATEErr (*RemoveCharStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ATEBool8* ret); +// ATEErr (*RemoveParaStyle) ( DocumentTextResourcesRef documenttextresources, const ASUnicode* pName, ATEBool8* ret); +// /// Imports named styles from pSrcResources into current resource. +// ATEErr (*ImportCharStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); +// ATEErr (*ImportParaStyles) ( DocumentTextResourcesRef documenttextresources, TextResourcesRef pSrcResources); +// ATEErr (*SetUseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8 smartQuotesAreOn); +// ATEErr (*SetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ASUnicode openQuote, ASUnicode closeQuote, Language language); +// ATEErr (*SetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ASUnicode openQuote, ASUnicode closeQuote, Language language); +// ATEErr (*UseSmartQuotes) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); +// ATEErr (*GetSmartDoubleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ASUnicode* openQuote, ASUnicode* closeQuote, Language language); +// ATEErr (*GetSmartSingleQuoteCharacters) ( DocumentTextResourcesRef documenttextresources, ASUnicode* openQuote, ASUnicode* closeQuote, Language language); +// /// The library stores an internal set of insertion attributes either from +// /// the last selection or from the last attribute change to text. This set +// /// of insertion attributes comprises the local overrides (CharFeatures) +// /// and the named style (CharStyle) +// ATEErr (*GetInsertionCharFeatures) ( DocumentTextResourcesRef documenttextresources, CharFeaturesRef* ret); +// ATEErr (*GetInsertionCharStyle) ( DocumentTextResourcesRef documenttextresources, CharStyleRef* ret); +// ATEErr (*SetInsertionFeaturesAndStyle) ( DocumentTextResourcesRef documenttextresources, const CharFeaturesRef pFeatures, const ASUnicode* pStyleName); +// /// Get superscript size +// ATEErr (*GetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); +// /// Set superscript size +// ATEErr (*SetSuperscriptSize) ( DocumentTextResourcesRef documenttextresources, ASReal value); +// /// Get superscript position +// ATEErr (*GetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); +// /// Set superscript position +// ATEErr (*SetSuperscriptPosition) ( DocumentTextResourcesRef documenttextresources, ASReal value); +// /// Get subscript size +// ATEErr (*GetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); +// /// Set subscript size +// ATEErr (*SetSubscriptSize) ( DocumentTextResourcesRef documenttextresources, ASReal value); +// /// Get subscript position +// ATEErr (*GetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); +// /// Set subscript position +// ATEErr (*SetSubscriptPosition) ( DocumentTextResourcesRef documenttextresources, ASReal value); +// /// Get SmallCap size +// ATEErr (*GetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ASReal* ret); +// /// Set SmallCap size +// ATEErr (*SetSmallCapSize) ( DocumentTextResourcesRef documenttextresources, ASReal value); +// /// Get ShowHiddenCharacters +// ATEErr (*GetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); +// /// Set ShowHiddenCharacters +// ATEErr (*SetShowHiddenCharacters) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); +// /// Get Greeking Size +// ATEErr (*GetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ASInt32* ret); +// /// Set Greeking Size +// ATEErr (*SetGreekingSize) ( DocumentTextResourcesRef documenttextresources, ASInt32 value); +// /// Get HighlightSubstituteFonts +// ATEErr (*GetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); +// /// Set HighlightSubstituteFonts +// ATEErr (*SetHighlightSubstituteFonts) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); +// /// Get HighlightAlternateGlyphs +// ATEErr (*GetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8* ret); +// /// Set HighlightAlternateGlyphs +// ATEErr (*SetHighlightAlternateGlyphs) ( DocumentTextResourcesRef documenttextresources, ATEBool8 value); +// +//}ATE25DocumentTextResourcesSuite; +// +//////////////////////////////////////////////// +//// --CharFeaturesSuite-- +//////////////////////////////////////////////// +//#define kATE25CharFeaturesSuite kCharFeaturesSuite +//#define kCharFeaturesSuiteVersion1 1 +//#define kATE25CharFeaturesSuiteVersion kCharFeaturesSuiteVersion1 +// +//typedef struct ATE25CharFeaturesSuite{ +// +// // Reference count maintenance. +// void (*AddRef) ( CharFeaturesRef charfeatures); +// void (*Release) ( CharFeaturesRef charfeatures); +// ATEBool8 (*IsNull) ( CharFeaturesRef charfeatures); +// +// // CharFeatures is a complete Set of character attributes that +// // can be applied to text (except for kerning). They can be used to +// // describe or Set the (1) local character attributes of text (a.k.a. +// // the local overrides or (2) attributes of a named character style. +// // +// // Often, a given CharFeatures instance will only partially define +// // each of its attributes. The validity of an attribute is +// // determined by an associated boolean. Calls to "Get" methods +// // return an "isAssigned" boolean that reflects the validity of +// // the returned argument. Calls to "Set" methods always Set the +// // associated boolean to indicate validity. Calls to "clear" +// // methods always invalidate that boolean/attribute pair. +// // +// // A character's attribute is determined by an inheritance model. +// // At the top is the "Normal" style which fully defines all +// // attributes. These can be overriden by a named style or a local +// // override, where an attribute is valid. +// // +// // A given attribute value of a character is determined by starting +// // with the local override for that attribute if it is defined. If +// // not, then the attribute comes from the corresponding named style +// // (if it exists and) if it is defined. If all else fails, the +// // default value comes from the "Normal" character style. +// // +// // Default constructor creates a "blank" CharFeatures instance where +// // all attributes are undefined (invalid). +// ATEErr (*Initialize) ( CharFeaturesRef* charfeatures); +// ATEErr (*Clone) ( CharFeaturesRef charfeatures, CharFeaturesRef* ret); +// ATEErr (*GetFont) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontRef* ret); +// ATEErr (*GetFontSize) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetHorizontalScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetVerticalScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetAutoLeading) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetLeading) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetTracking) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetBaselineShift) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetCharacterRotation) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// /** Kern type information is only available for CharStyle instances. +// Use Story::GetKern( ) to obtain kern type information for a TextRange. +// */ +// ATEErr (*GetAutoKernType) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, AutoKernType* ret); +// ATEErr (*GetFontCapsOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontCapsOption* ret); +// ATEErr (*GetFontBaselineOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontBaselineOption* ret); +// ATEErr (*GetFontOpenTypePositionOption) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FontOpenTypePositionOption* ret); +// ATEErr (*GetStrikethroughPosition) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, StrikethroughPosition* ret); +// ATEErr (*GetUnderlinePosition) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, UnderlinePosition* ret); +// ATEErr (*GetUnderlineOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// // ------------------------------------------------------------------ +// // OpenType features +// // ------------------------------------------------------------------ +// ATEErr (*GetLigature) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetDiscretionaryLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetContextualLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetAlternateLigatures) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetOldStyle) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetFractions) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetOrdinals) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetSwash) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetTitling) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetConnectionForms) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetStylisticAlternates) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetOrnaments) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetFigureStyle) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, FigureStyle* ret); +// // ------------------------------------------------------------------ +// // Japanese OpenType feature support +// // ------------------------------------------------------------------ +// ATEErr (*GetProportionalMetrics) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetKana) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetRuby) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetItalics) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetBaselineDirection) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, BaselineDirection* ret); +// ATEErr (*GetLanguage) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, Language* ret); +// ATEErr (*GetJapaneseAlternateFeature) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, JapaneseAlternateFeature* ret); +// ATEErr (*GetTsume) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetStyleRunAlignment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, StyleRunAlignment* ret); +// // ------------------------------------------------------------------ +// // WariChu Setings +// // ------------------------------------------------------------------ +// ATEErr (*GetWariChuEnabled) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetWariChuLineCount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetWariChuLineGap) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetWariChuScale) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetWariChuSize) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetWariChuWidowAmount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetWariChuOrphanAmount) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetWariChuJustification) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, WariChuJustification* ret); +// ATEErr (*GetTCYUpDownAdjustment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetLeftAki) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetRightAki) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetNoBreak) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetFillColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); +// ATEErr (*GetStrokeColor) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ApplicationPaintRef* ret); +// ATEErr (*GetFill) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetStroke) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetFillFirst) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetFillOverPrint) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetStrokeOverPrint) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetLineCap) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineCapType* ret); +// ATEErr (*GetLineJoin) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, LineJoinType* ret); +// ATEErr (*GetLineWidth) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetMiterLimit) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetLineDashOffset) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetLineDashArray) ( CharFeaturesRef charfeatures, ATEBool8* isAssigned, ArrayRealRef* ret); +// // SET PROPERTIES +// // ====================================================================== +// ATEErr (*SetFont) ( CharFeaturesRef charfeatures, FontRef newVal); +// /** Set font size +// This function will throw kOutOfRange error if (newVal > 1296 || newVal < 0.1) +// */ +// ATEErr (*SetFontSize) ( CharFeaturesRef charfeatures, ASReal newVal); +// /** Set Horizontal Scale +// This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) +// If newVal is 1, this means 100% in the character palatte. +// */ +// ATEErr (*SetHorizontalScale) ( CharFeaturesRef charfeatures, ASReal newVal); +// /** Set Vertical Scale +// This function will throw kOutOfRange error if (newVal > 100 || newVal < .01) +// If newVal is 1, this means 100% in the character palatte. +// */ +// ATEErr (*SetVerticalScale) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetAutoLeading) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetLeading) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetTracking) ( CharFeaturesRef charfeatures, ASInt32 newVal); +// ATEErr (*SetBaselineShift) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetCharacterRotation) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetAutoKernType) ( CharFeaturesRef charfeatures, AutoKernType newVal); +// ATEErr (*SetFontCapsOption) ( CharFeaturesRef charfeatures, FontCapsOption newVal); +// ATEErr (*SetFontBaselineOption) ( CharFeaturesRef charfeatures, FontBaselineOption newVal); +// ATEErr (*SetFontOpenTypePositionOption) ( CharFeaturesRef charfeatures, FontOpenTypePositionOption newVal); +// ATEErr (*SetStrikethroughPosition) ( CharFeaturesRef charfeatures, StrikethroughPosition newVal); +// ATEErr (*SetUnderlinePosition) ( CharFeaturesRef charfeatures, UnderlinePosition newVal); +// ATEErr (*SetUnderlineOffset) ( CharFeaturesRef charfeatures, ASReal newVal); +// // ------------------------------------------------------------------ +// // OpenType features +// // ------------------------------------------------------------------ +// ATEErr (*SetLigature) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetDiscretionaryLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetContextualLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetAlternateLigatures) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetOldStyle) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetFractions) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetOrdinals) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetSwash) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetTitling) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetConnectionForms) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetStylisticAlternates) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetOrnaments) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetFigureStyle) ( CharFeaturesRef charfeatures, FigureStyle newVal); +// // ------------------------------------------------------------------ +// // Japanese OpenType feature support +// // ------------------------------------------------------------------ +// ATEErr (*SetProportionalMetrics) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetKana) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetItalics) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetRuby) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetBaselineDirection) ( CharFeaturesRef charfeatures, BaselineDirection newVal); +// ATEErr (*SetLanguage) ( CharFeaturesRef charfeatures, Language newVal); +// ATEErr (*SetJapaneseAlternateFeature) ( CharFeaturesRef charfeatures, JapaneseAlternateFeature newVal); +// ATEErr (*SetTsume) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetStyleRunAlignment) ( CharFeaturesRef charfeatures, StyleRunAlignment newVal); +// // ------------------------------------------------------------------ +// // WariChu Setings +// // ------------------------------------------------------------------ +// ATEErr (*SetWariChuEnabled) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetWariChuLineCount) ( CharFeaturesRef charfeatures, ASInt32 newVal); +// ATEErr (*SetWariChuLineGap) ( CharFeaturesRef charfeatures, ASInt32 newVal); +// ATEErr (*SetWariChuScale) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetWariChuSize) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetWariChuWidowAmount) ( CharFeaturesRef charfeatures, ASInt32 newVal); +// ATEErr (*SetWariChuOrphanAmount) ( CharFeaturesRef charfeatures, ASInt32 newVal); +// ATEErr (*SetWariChuJustification) ( CharFeaturesRef charfeatures, WariChuJustification newVal); +// ATEErr (*SetTCYUpDownAdjustment) ( CharFeaturesRef charfeatures, ASInt32 newVal); +// ATEErr (*SetTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures, ASInt32 newVal); +// ATEErr (*SetLeftAki) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetRightAki) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetNoBreak) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetFillColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); +// ATEErr (*SetStrokeColor) ( CharFeaturesRef charfeatures, ApplicationPaintRef newVal); +// ATEErr (*SetFill) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetStroke) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetFillFirst) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetFillOverPrint) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetStrokeOverPrint) ( CharFeaturesRef charfeatures, ATEBool8 newVal); +// ATEErr (*SetLineCap) ( CharFeaturesRef charfeatures, LineCapType newVal); +// ATEErr (*SetLineJoin) ( CharFeaturesRef charfeatures, LineJoinType newVal); +// ATEErr (*SetLineWidth) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetMiterLimit) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetLineDashOffset) ( CharFeaturesRef charfeatures, ASReal newVal); +// ATEErr (*SetLineDashArray) ( CharFeaturesRef charfeatures, ArrayRealRef newVal); +// // CLEAR PROPERTIES +// // ====================================================================== +// ATEErr (*ClearFont) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFontSize) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearHorizontalScale) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearVerticalScale) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearAutoLeading) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearLeading) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearTracking) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearBaselineShift) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearCharacterRotation) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearAutoKernType) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFontCapsOption) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFontBaselineOption) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFontOpenTypePositionOption) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearStrikethroughPosition) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearUnderlinePosition) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearUnderlineOffset) ( CharFeaturesRef charfeatures); +// // ------------------------------------------------------------------ +// // OpenType features +// // ------------------------------------------------------------------ +// ATEErr (*ClearLigature) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearDiscretionaryLigatures) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearContextualLigatures) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearAlternateLigatures) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearOldStyle) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFractions) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearOrdinals) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearSwash) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearTitling) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearConnectionForms) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearStylisticAlternates) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearOrnaments) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFigureStyle) ( CharFeaturesRef charfeatures); +// // ------------------------------------------------------------------ +// // Japanese OpenType feature support +// // ------------------------------------------------------------------ +// ATEErr (*ClearProportionalMetrics) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearKana) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearItalics) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearRuby) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearBaselineDirection) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearLanguage) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearJapaneseAlternateFeature) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearTsume) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearStyleRunAlignment) ( CharFeaturesRef charfeatures); +// // ------------------------------------------------------------------ +// // WariChu Setings +// // ------------------------------------------------------------------ +// ATEErr (*ClearWariChuEnabled) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearWariChuLineCount) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearWariChuLineGap) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearWariChuSubLineAmount) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearWariChuWidowAmount) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearWariChuOrphanAmount) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearWariChuJustification) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearTCYUpDownAdjustment) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearTCYLeftRightAdjustment) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearLeftAki) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearRightAki) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearNoBreak) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFillColor) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearStrokeColor) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFill) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearStroke) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFillFirst) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearFillOverPrint) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearStrokeOverPrint) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearLineCap) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearLineJoin) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearLineWidth) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearMiterLimit) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearLineDashOffset) ( CharFeaturesRef charfeatures); +// ATEErr (*ClearLineDashArray) ( CharFeaturesRef charfeatures); +// // ALGEBRA METHODS +// // Methods return true if changes were made. +// // ====================================================================== +// // Intersection of 2 Features is the intersection of each attribute +// // on the lhs with the corresponding attribute on the rhs. +// // Attribute intersections are defined by the following truth table: +// // +// // ______________________________________________________________________ +// // this.attribute | rhs.attribute || Action/Result +// // ====================================================================== +// // assigned | assigned || [Case 1] If values are equal +// // | || ACTION: nothing +// // | || RESULT: value preserved +// // | || [Case 2] If values are not equal +// // | || ACTION: if (*this.attribute != *rhs.attribute) +// // | || this.attribute.Clear(); +// // | || RESULT: unassigned +// // ---------------------------------------------------------------------- +// // assigned | unassigned || ACTION: this.attribute.Clear() +// // | || RESULT: unassigned +// // ---------------------------------------------------------------------- +// // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) +// // | || RESULT: unassigned +// // ---------------------------------------------------------------------- +// // unassigned | unassigned || ACTION: nothing (both are equal) +// // | || RESULT: unassigned +// // ______________________________________________________________________ +// // +// ATEErr (*IntersectFeatures) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); +// // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. +// ATEErr (*ReplaceOrAddFeatures) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); +// // Unassigns each attribute whose value equals value of corresponding attribute in rhs +// ATEErr (*UnassignEachIfEqual) ( CharFeaturesRef charfeatures, CharFeaturesRef rhs, ATEBool8* ret); +// // True if all are not assigned; false otherwise +// ATEErr (*IsEachNotAssigned) ( CharFeaturesRef charfeatures, ATEBool8* ret); +// // True if all are assigned; false otherwise +// ATEErr (*IsEachAssigned) ( CharFeaturesRef charfeatures, ATEBool8* ret); +// // ACCESSORS DESIGNED FOR CLIENT APPLICATION CORE +// // ====================================================================== +// +//}ATE25CharFeaturesSuite; +// +//////////////////////////////////////////////// +//// --CharInspectorSuite-- +//////////////////////////////////////////////// +//#define kATE25CharInspectorSuite kCharInspectorSuite +//#define kCharInspectorSuiteVersion1 1 +//#define kATE25CharInspectorSuiteVersion kCharInspectorSuiteVersion1 +// +//typedef struct ATE25CharInspectorSuite{ +// +// // Reference count maintenance. +// void (*AddRef) ( CharInspectorRef charinspector); +// void (*Release) ( CharInspectorRef charinspector); +// ATEBool8 (*IsNull) ( CharInspectorRef charinspector); +// +// ATEErr (*Initialize) ( CharInspectorRef* charinspector); +// ATEErr (*GetFont) ( CharInspectorRef charinspector, ArrayFontRefRef* ret); +// ATEErr (*GetFontSize) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetHorizontalScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetVerticalScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetSyntheticBold) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetSyntheticItalic) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetAutoLeading) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetLeading) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetTracking) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); +// ATEErr (*GetBaselineShift) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetCharacterRotation) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetFontCapsOption) ( CharInspectorRef charinspector, ArrayFontCapsOptionRef* ret); +// ATEErr (*GetFontBaselineOption) ( CharInspectorRef charinspector, ArrayFontBaselineOptionRef* ret); +// ATEErr (*GetFontOpenTypePositionOption) ( CharInspectorRef charinspector, ArrayFontOpenTypePositionOptionRef* ret); +// ATEErr (*GetStrikethroughPosition) ( CharInspectorRef charinspector, ArrayStrikethroughPositionRef* ret); +// ATEErr (*GetUnderlinePosition) ( CharInspectorRef charinspector, ArrayUnderlinePositionRef* ret); +// ATEErr (*GetUnderlineOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// // ------------------------------------------------------------------ +// // OpenType features +// // ------------------------------------------------------------------ +// ATEErr (*GetLigature) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetDiscretionaryLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetContextualLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetAlternateLigatures) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetOldStyle) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetFractions) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetOrdinals) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetSwash) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetTitling) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetConnectionForms) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetStylisticAlternates) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetOrnaments) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetFigureStyle) ( CharInspectorRef charinspector, ArrayFigureStyleRef* ret); +// // ------------------------------------------------------------------ +// // Japanese OpenType feature support +// // ------------------------------------------------------------------ +// ATEErr (*GetProportionalMetrics) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetKana) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetItalics) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetRuby) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetBaselineDirection) ( CharInspectorRef charinspector, ArrayBaselineDirectionRef* ret); +// ATEErr (*GetLanguage) ( CharInspectorRef charinspector, ArrayLanguageRef* ret); +// ATEErr (*GetTsume) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetStyleRunAlignment) ( CharInspectorRef charinspector, ArrayStyleRunAlignmentRef* ret); +// // ------------------------------------------------------------------ +// // WariChu Setings +// // ------------------------------------------------------------------ +// ATEErr (*GetWariChuLineCount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); +// ATEErr (*GetWariChuLineGap) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); +// ATEErr (*GetWariChuScale) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetWariChuSize) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetWariChuWidowAmount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); +// ATEErr (*GetWariChuOrphanAmount) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); +// ATEErr (*GetWariChuJustification) ( CharInspectorRef charinspector, ArrayWariChuJustificationRef* ret); +// ATEErr (*GetWariChuEnabled) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetTCYUpDownAdjustment) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); +// ATEErr (*GetTCYLeftRightAdjustment) ( CharInspectorRef charinspector, ArrayIntegerRef* ret); +// ATEErr (*GetLeftAki) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetRightAki) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetNoBreak) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetFillColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); +// ATEErr (*GetStrokeColor) ( CharInspectorRef charinspector, ArrayApplicationPaintRefRef* ret); +// ATEErr (*GetFill) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetStroke) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetFillFirst) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetFillOverPrint) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetStrokeOverPrint) ( CharInspectorRef charinspector, ArrayBoolRef* ret); +// ATEErr (*GetLineCap) ( CharInspectorRef charinspector, ArrayLineCapTypeRef* ret); +// ATEErr (*GetLineJoin) ( CharInspectorRef charinspector, ArrayLineJoinTypeRef* ret); +// ATEErr (*GetLineWidth) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetMiterLimit) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetLineDashOffset) ( CharInspectorRef charinspector, ArrayRealRef* ret); +// ATEErr (*GetLineDashArray) ( CharInspectorRef charinspector, ArrayArrayRealRef* ret); +// +//}ATE25CharInspectorSuite; +// +//////////////////////////////////////////////// +//// --FindSuite-- +//////////////////////////////////////////////// +//#define kATE25FindSuite kFindSuite +//#define kFindSuiteVersion1 1 +//#define kATE25FindSuiteVersion kFindSuiteVersion1 +// +//typedef struct ATE25FindSuite{ +// +// // Reference count maintenance. +// void (*AddRef) ( FindRef find); +// void (*Release) ( FindRef find); +// ATEBool8 (*IsNull) ( FindRef find); +// +// // Options +// // ======================================================================== +// ATEErr (*GetSearchDirection) ( FindRef find, Direction* ret); +// ATEErr (*GetIgnoreCase) ( FindRef find, ATEBool8* ret); +// ATEErr (*GetWholeWord) ( FindRef find, ATEBool8* ret); +// ATEErr (*GetWrap) ( FindRef find, ATEBool8* ret); +// ATEErr (*GetFindWordsOutOfBounds) ( FindRef find, ATEBool8* ret); +// ATEErr (*SetSearchDirection) ( FindRef find, Direction newValue); +// ATEErr (*SetIgnoreCase) ( FindRef find, ATEBool8 newValue); +// ATEErr (*SetWholeWord) ( FindRef find, ATEBool8 newValue); +// ATEErr (*SetWrap) ( FindRef find, ATEBool8 newValue); +// ATEErr (*SetFindWordsOutOfBounds) ( FindRef find, ATEBool8 newValue); +// // Control scope of search to be entire document or Story. +// // By default, the entire document is searched. +// ATEErr (*GetSearchScope) ( FindRef find, SearchScope* ret); +// ATEErr (*SetSearchScope) ( FindRef find, SearchScope searchScope); +// // If called, search is done only within specified TextRange +// ATEErr (*SetSearchRange) ( FindRef find, TextRangeRef pRange); +// ATEErr (*SetSearchChars) ( FindRef find, ASUnicode* pSearchChars); +// ATEErr (*GetSearchChars) ( FindRef find, ASUnicode* pSearchChars, ASInt32 length); +// ATEErr (*SetReplaceChars) ( FindRef find, ASUnicode* pSearchChars); +// ATEErr (*GetReplaceChars) ( FindRef find, ASUnicode* pSearchChars, ASInt32 length); +// // Temporary way to reset the engine for modeless operation +// ATEErr (*Reset) ( FindRef find); +// // Methods +// // ======================================================================== +// // Searches current user selection. +// // Returns false if the search failed +// ATEErr (*FindMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8* ret); +// // Skips the current user selection. +// // Returns false if the search failed +// ATEErr (*FindNextMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8* ret); +// ATEErr (*ReplaceMatch) ( FindRef find, TextRangeRef pTextRange, ATEBool8 findNext, ATEBool8* ret); +// // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and +// // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. +// ATEErr (*FindAndReplaceAllMatches) ( FindRef find, ASInt32* pReplaceCount, ATEBool8* ret); +// // Use these to implement ReplaceAll. +// // Start by saving off the settings with GetPreReplaceAllSettings( ) +// // (also note what text object you're currently working with so you can restore that +// // via SetSearchRange( ) when you're finished. +// ATEErr (*GetPreReplaceAllSettings) ( FindRef find, ASInt32* pCurrentPoint, ASInt32* pStartPoint); +// // Implement a loop to go through all the text objects you want to replace all with. +// // Use FindMatch( ), FindNextMatch( ), and ReplaceMatch( ) to replace all. +// // Keep track of how many ReplaceMatch( ) calls were made for reporting back to the user +// // When finished, restore the correct text object and range using SetSearchRange( ) +// // and restore the positions using RestorePreReplaceAllSettings( ) +// ATEErr (*RestorePreReplaceAllSettings) ( FindRef find, const ASInt32 currentPoint, const ASInt32 startPoint); +// +//}ATE25FindSuite; +// +//////////////////////////////////////////////// +//// --ParaFeaturesSuite-- +//////////////////////////////////////////////// +//#define kATE25ParaFeaturesSuite kParaFeaturesSuite +//#define kParaFeaturesSuiteVersion1 1 +//#define kATE25ParaFeaturesSuiteVersion kParaFeaturesSuiteVersion1 +// +//typedef struct ATE25ParaFeaturesSuite{ +// +// // Reference count maintenance. +// void (*AddRef) ( ParaFeaturesRef parafeatures); +// void (*Release) ( ParaFeaturesRef parafeatures); +// ATEBool8 (*IsNull) ( ParaFeaturesRef parafeatures); +// +// // ParaFeatures is a complete Set of paragraph attributes that +// // can be applied to text (except for kerning). They can be used to +// // describe or Set the (1) local paragraph attributes of text (a.k.a. +// // the local overrides or (2) attributes of a named paragraph style. +// // +// // Often, a given ParaFeatures instance will only partially define +// // each of its attributes. The validity of an attribute is +// // determined by an associated boolean. Calls to "Get" methods +// // return an "isAssigned" boolean that reflects the validity of +// // the returned argument. Calls to "Set" methods always Set the +// // associated boolean to indicate validity. Calls to "Clear" +// // methods always invalidate that boolean/attribute pair. +// // +// // A paragraph's attribute is determined by an inheritance model. +// // At the top is the "Normal" style which fully defines all +// // attributes. These can be overriden by a named style or a local +// // override, where an attribute is valid. +// // +// // A given attribute value of a paragraph is determined by starting +// // with the local override for that attribute if it is defined. If +// // not, then the attribute comes from the corresponding named style +// // (if it exists and) if it is defined. If all else fails, the +// // default value comes from the "Normal" paragraph style. +// // +// // Default constructor creates a "blank" ParaFeatures instance where +// // all attributes are undefined (invalid). +// ATEErr (*Initialize) ( ParaFeaturesRef* parafeatures); +// ATEErr (*Clone) ( ParaFeaturesRef parafeatures, ParaFeaturesRef* ret); +// // ------------------------------------------------------------------ +// // Justification +// // ------------------------------------------------------------------ +// ATEErr (*GetJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); +// ATEErr (*GetFirstLineIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetStartIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetEndIndent) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetSpaceBefore) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetSpaceAfter) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// // ------------------------------------------------------------------ +// // Hyphenation +// // ------------------------------------------------------------------ +// ATEErr (*GetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetPreHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetPostHyphenSize) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetHyphenationZone) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetHyphenationPreference) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// // ------------------------------------------------------------------ +// // Justification Features +// // ------------------------------------------------------------------ +// ATEErr (*GetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetMinWordSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetSingleWordJustification) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ParagraphJustification* ret); +// ATEErr (*GetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// ATEErr (*GetLeadingType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, LeadingType* ret); +// ATEErr (*GetTabStops) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, TabStopsRef* ret); +// ATEErr (*GetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASReal* ret); +// // ------------------------------------------------------------------ +// // Japanese Features +// // ------------------------------------------------------------------ +// ATEErr (*GetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetAutoTCY) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ASInt32* ret); +// ATEErr (*GetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetBurasagariType) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, BurasagariType* ret); +// ATEErr (*GetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, PreferredKinsokuOrder* ret); +// ATEErr (*GetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); +// /// This will return a null object if Kinsoku is not used (ie None set) +// ATEErr (*GetKinsoku) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, KinsokuRef* ret); +// /// This will return a null object if Mojikumi is not used (ie None set) +// ATEErr (*GetMojiKumi) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, MojiKumiRef* ret); +// // Other +// ATEErr (*GetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, ATEBool8* ret); +// ATEErr (*GetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, ATEBool8* isAssigned, CharFeaturesRef* ret); +// // SET PROPERTIES +// // ====================================================================== +// // ------------------------------------------------------------------ +// // Justification +// // ------------------------------------------------------------------ +// ATEErr (*SetJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); +// ATEErr (*SetFirstLineIndent) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetStartIndent) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetEndIndent) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetSpaceBefore) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetSpaceAfter) ( ParaFeaturesRef parafeatures, ASReal newVal); +// // ------------------------------------------------------------------ +// // Hyphenation +// // ------------------------------------------------------------------ +// ATEErr (*SetAutoHyphenate) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); +// ATEErr (*SetHyphenatedWordSize) ( ParaFeaturesRef parafeatures, ASInt32 newVal); +// ATEErr (*SetPreHyphenSize) ( ParaFeaturesRef parafeatures, ASInt32 newVal); +// ATEErr (*SetPostHyphenSize) ( ParaFeaturesRef parafeatures, ASInt32 newVal); +// ATEErr (*SetConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures, ASInt32 newVal); +// ATEErr (*SetHyphenationZone) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetHyphenateCapitalized) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); +// ATEErr (*SetHyphenationPreference) ( ParaFeaturesRef parafeatures, ASReal newVal); +// // ------------------------------------------------------------------ +// // Justification Features +// // ------------------------------------------------------------------ +// ATEErr (*SetDesiredWordSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetMaxWordSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetMinWordSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetDesiredLetterSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetMaxLetterSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetMinLetterSpacing) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetDesiredGlyphScaling) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetMaxGlyphScaling) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetMinGlyphScaling) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetSingleWordJustification) ( ParaFeaturesRef parafeatures, ParagraphJustification newVal); +// ATEErr (*SetAutoLeadingPercentage) ( ParaFeaturesRef parafeatures, ASReal newVal); +// ATEErr (*SetLeadingType) ( ParaFeaturesRef parafeatures, LeadingType newVal); +// ATEErr (*SetTabStops) ( ParaFeaturesRef parafeatures, TabStopsRef newVal); +// ATEErr (*SetDefaultTabWidth) ( ParaFeaturesRef parafeatures, ASReal newVal); +// // ------------------------------------------------------------------ +// // Japanese Features +// // ------------------------------------------------------------------ +// ATEErr (*SetHangingRoman) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); +// ATEErr (*SetAutoTCY) ( ParaFeaturesRef parafeatures, ASInt32 newVal); +// ATEErr (*SetBunriKinshi) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); +// ATEErr (*SetBurasagariType) ( ParaFeaturesRef parafeatures, BurasagariType newVal); +// ATEErr (*SetPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures, PreferredKinsokuOrder newVal); +// ATEErr (*SetKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); +// ATEErr (*SetKinsoku) ( ParaFeaturesRef parafeatures, KinsokuRef newVal); +// ATEErr (*SetMojiKumi) ( ParaFeaturesRef parafeatures, MojiKumiRef newVal); +// // Other +// ATEErr (*SetEveryLineComposer) ( ParaFeaturesRef parafeatures, ATEBool8 newVal); +// ATEErr (*SetDefaultCharFeatures) ( ParaFeaturesRef parafeatures, CharFeaturesRef newVal); +// // CLEAR PROPERTIES +// // ====================================================================== +// // ------------------------------------------------------------------ +// // Justification +// // ------------------------------------------------------------------ +// ATEErr (*ClearJustification) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearFirstLineIndent) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearStartIndent) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearEndIndent) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearSpaceBefore) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearSpaceAfter) ( ParaFeaturesRef parafeatures); +// // ------------------------------------------------------------------ +// // Hyphenation +// // ------------------------------------------------------------------ +// ATEErr (*ClearAutoHyphenate) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearHyphenatedWordSize) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearPreHyphenSize) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearPostHyphenSize) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearConsecutiveHyphenLimit) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearHyphenationZone) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearHyphenateCapitalized) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearHyphenationPreference) ( ParaFeaturesRef parafeatures); +// // ------------------------------------------------------------------ +// // Justification Features +// // ------------------------------------------------------------------ +// ATEErr (*ClearWordSpacing) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearLetterSpacing) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearGlyphScaling) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearSingleWordJustification) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearAutoLeadingPercentage) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearLeadingType) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearTabStops) ( ParaFeaturesRef parafeatures); +// // ------------------------------------------------------------------ +// // Japanese Features +// // ------------------------------------------------------------------ +// ATEErr (*ClearHangingRoman) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearAutoTCY) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearBunriKinshi) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearBurasagariType) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearPreferredKinsokuOrder) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearKurikaeshiMojiShori) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearKinsoku) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearMojiKumi) ( ParaFeaturesRef parafeatures); +// // Other +// ATEErr (*ClearEveryLineComposer) ( ParaFeaturesRef parafeatures); +// ATEErr (*ClearDefaultCharFeatures) ( ParaFeaturesRef parafeatures); +// // ALGEBRA METHODS +// // Methods return true if changes were made. +// // ====================================================================== +// // Intersection of 2 Features is the intersection of each attribute +// // on the lhs with the corresponding attribute on the rhs. +// // Attribute intersections are defined by the following truth table: +// // +// // ______________________________________________________________________ +// // this.attribute | rhs.attribute || Action/Result +// // ====================================================================== +// // assigned | assigned || [Case 1] If values are equal +// // | || ACTION: nothing +// // | || RESULT: value preserved +// // | || [Case 2] If values are not equal +// // | || ACTION: if (*this.attribute != *rhs.attribute) +// // | || this.attribute.Clear(); +// // | || RESULT: unassigned +// // ---------------------------------------------------------------------- +// // assigned | unassigned || ACTION: this.attribute.Clear() +// // | || RESULT: unassigned +// // ---------------------------------------------------------------------- +// // unassigned | assigned || ACTION: nothing (this.attribute already unassigned) +// // | || RESULT: unassigned +// // ---------------------------------------------------------------------- +// // unassigned | unassigned || ACTION: nothing (both are equal) +// // | || RESULT: unassigned +// // ______________________________________________________________________ +// // +// ATEErr (*IntersectFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); +// // ReplaceOrAddFeatures sets the attribute value for any that are assigned on the rhs. +// ATEErr (*ReplaceOrAddFeatures) ( ParaFeaturesRef parafeatures, ParaFeaturesRef rhs, ATEBool8* ret); +// // Unassigns each attribute whose value equals value of corresponding attribute in rhs +// ATEErr (*UnassignEachIfEqual) ( ParaFeaturesRef parafeatures, const ParaFeaturesRef rhs, ATEBool8* ret); +// // True if all are not assigned; false otherwise +// ATEErr (*IsEachNotAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); +// // True if all are assigned; false otherwise +// ATEErr (*IsEachAssigned) ( ParaFeaturesRef parafeatures, ATEBool8* ret); +// // PRIVATE AND PROTECTED +// // ====================================================================== +// +//}ATE25ParaFeaturesSuite; +// +//////////////////////////////////////////////// +//// --ParaInspectorSuite-- +//////////////////////////////////////////////// +//#define kATE25ParaInspectorSuite kParaInspectorSuite +//#define kParaInspectorSuiteVersion1 1 +//#define kATE25ParaInspectorSuiteVersion kParaInspectorSuiteVersion1 +// +//typedef struct ATE25ParaInspectorSuite{ +// +// // Reference count maintenance. +// void (*AddRef) ( ParaInspectorRef parainspector); +// void (*Release) ( ParaInspectorRef parainspector); +// ATEBool8 (*IsNull) ( ParaInspectorRef parainspector); +// +// ATEErr (*Initialize) ( ParaInspectorRef* parainspector); +// // ------------------------------------------------------------------ +// // Justification +// // ------------------------------------------------------------------ +// ATEErr (*GetJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); +// ATEErr (*GetFirstLineIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetStartIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetEndIndent) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetSpaceBefore) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetSpaceAfter) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// // ------------------------------------------------------------------ +// // Hyphenation +// // ------------------------------------------------------------------ +// ATEErr (*GetAutoHyphenate) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); +// ATEErr (*GetHyphenatedWordSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); +// ATEErr (*GetPreHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); +// ATEErr (*GetPostHyphenSize) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); +// ATEErr (*GetConsecutiveHyphenLimit) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); +// ATEErr (*GetHyphenationZone) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetHyphenateCapitalized) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); +// ATEErr (*GetHyphenationPreference) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// // ------------------------------------------------------------------ +// // Justification Features +// // ------------------------------------------------------------------ +// ATEErr (*GetDesiredWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetMaxWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetMinWordSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetDesiredLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetMaxLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetMinLetterSpacing) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetDesiredGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetMaxGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetMinGlyphScaling) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetSingleWordJustification) ( ParaInspectorRef parainspector, ArrayParagraphJustificationRef* ret); +// ATEErr (*GetAutoLeadingPercentage) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// ATEErr (*GetLeadingType) ( ParaInspectorRef parainspector, ArrayLeadingTypeRef* ret); +// ATEErr (*GetTabStops) ( ParaInspectorRef parainspector, ArrayTabStopsRefRef* ret); +// ATEErr (*GetDefaultTabWidth) ( ParaInspectorRef parainspector, ArrayRealRef* ret); +// // ------------------------------------------------------------------ +// // Japanese Features +// // ------------------------------------------------------------------ +// ATEErr (*GetHangingRoman) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); +// ATEErr (*GetAutoTCY) ( ParaInspectorRef parainspector, ArrayIntegerRef* ret); +// ATEErr (*GetBunriKinshi) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); +// ATEErr (*GetBurasagariType) ( ParaInspectorRef parainspector, ArrayBurasagariTypeRef* ret); +// ATEErr (*GetPreferredKinsokuOrder) ( ParaInspectorRef parainspector, ArrayPreferredKinsokuOrderRef* ret); +// ATEErr (*GetKurikaeshiMojiShori) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); +// ATEErr (*GetKinsoku) ( ParaInspectorRef parainspector, ArrayKinsokuRefRef* ret); +// ATEErr (*GetMojiKumi) ( ParaInspectorRef parainspector, ArrayMojiKumiRefRef* ret); +// // Other +// ATEErr (*GetEveryLineComposer) ( ParaInspectorRef parainspector, ArrayBoolRef* ret); +// +//}ATE25ParaInspectorSuite; +// +//////////////////////////////////////////////// +//// --SpellSuite-- +//////////////////////////////////////////////// +//#define kATE25SpellSuite kSpellSuite +//#define kSpellSuiteVersion1 1 +//#define kATE25SpellSuiteVersion kSpellSuiteVersion1 +// +//typedef struct ATE25SpellSuite{ +// +// // Reference count maintenance. +// void (*AddRef) ( SpellRef spell); +// void (*Release) ( SpellRef spell); +// ATEBool8 (*IsNull) ( SpellRef spell); +// +// // Options +// // ======================================================================== +// ATEErr (*Initialize) ( SpellRef spell, const char* pSpellingDirectory); +// ATEErr (*IsInitialized) ( SpellRef spell, ATEBool8* ret); +// ATEErr (*GetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8* ret); +// ATEErr (*GetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8* ret); +// ATEErr (*GetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8* ret); +// ATEErr (*GetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8* ret); +// ATEErr (*GetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8* ret); +// ATEErr (*SetIgnoreWordsInAllUppercase) ( SpellRef spell, ATEBool8 newValue); +// ATEErr (*SetIgnoreWordsWithNumbers) ( SpellRef spell, ATEBool8 newValue); +// ATEErr (*SetIgnoreRomanNumerals) ( SpellRef spell, ATEBool8 newValue); +// ATEErr (*SetIgnoreRepeatedWords) ( SpellRef spell, ATEBool8 newValue); +// ATEErr (*SetIgnoreUncapitalizedStartOfSentence) ( SpellRef spell, ATEBool8 newValue); +// // Control scope of search to be entire document or Story. +// // By default, the entire document is searched. +// ATEErr (*GetSearchScope) ( SpellRef spell, SearchScope* ret); +// ATEErr (*SetSearchScope) ( SpellRef spell, SearchScope searchScope); +// // If called, search is done only within specified TextRange +// ATEErr (*SetSearchRange) ( SpellRef spell, const TextRangeRef pRange, const ATEBool8 resetEndOfSentence, const ATEBool8 resetCurPos); +// // Temporary way to reset the engine for modeless operation +// ATEErr (*Reset) ( SpellRef spell); +// // Use this if the user changes the text significantly enough that you need to reset, +// // but are fairly certain that the text hasn't been changed before the resumePoint. +// ATEErr (*ResumeFrom) ( SpellRef spell, const ASInt32 resumePoint); +// // Use this to resume from the current insertion point. +// ATEErr (*ResumeFromInsertionPoint) ( SpellRef spell); +// // Methods +// // ======================================================================== +// // Searches from start for unknown words and return the first one it finds. +// // Returns true if it found an unknown word, false if it searched to the end +// // and didn't find any unknown words. +// ATEErr (*FindOneMisspelledWord) ( SpellRef spell, SpellCheckingResult* pResult, TextRangeRef pRange, Language* pLanguage, ATEBool8* ret); +// // Calling FindOneMisspelledWord( ) will fill up an internal list of suggested +// // corrections. Use these calls to get the contents of that word list: +// // +// // This will return the size of the buffer required to hold the contents of the word list. +// ATEErr (*GetWordListSize) ( SpellRef spell, ASInt32* ret); +// // +// // This will fill up pWordListBuffer with the contents of the list. +// // sizeOfBuffer is the size of pWordListBuffer (used to prevent overflow) +// // pNumberOfWords is the number of words in the buffer. The words are all null-terminated. +// ATEErr (*GetWordListContents) ( SpellRef spell, ASUnicode* pWordListBuffer, ASInt32 sizeOfBuffer, ASInt32* pNumberOfWords); +// ATEErr (*Replace) ( SpellRef spell, TextRangeRef pRange, const ASUnicode* pCorrection ); +// // Use this to add an entry to a pair dictionary, binding the selected word to rCorrection. +// ATEErr (*AddSelectedToReplaceAllDict) ( SpellRef spell, const ASUnicode* pCorrection); +// // DEPRECATED - this is now a no-op. Use GetPreReplaceAllSettings( ) and +// // RestorePreReplaceAllSettings( ) to implement ReplaceAll in the plugin. +// ATEErr (*DoReplaceAll) ( SpellRef spell, ATEBool8* ret); +// // Use these to implement ReplaceAll. +// // Start by saving off the settings with GetPreReplaceAllSettings( ) +// // (also note what text object you're currently working with so you can restore that +// // via SetSearchRange( ) when you're finished. +// ATEErr (*GetPreReplaceAllSettings) ( SpellRef spell, ASInt32* pCurrentPoint, ATEBool8* pFoundSentenceEnd); +// // Implement a loop to go through all the text objects you want to replace all with. +// // Use this to find all instances of the target word in the current text object. +// // Keep calling it until it returns false, making sure to set firstTimeInThisObject as needed. +// // It will return the text range to select and call ReplaceSelected( ) with. +// ATEErr (*FindReplaceAllWord) ( SpellRef spell, TextRangeRef pRange, const ATEBool8 firstTimeInThisObject, ATEBool8* ret); +// // When finished, restore the correct text object and range using SetSearchRange( ) +// // and restore the positions using RestorePreReplaceAllSettings( ) +// // Order is important here - do notcall RestorePreReplaceAllSettings( ) first, +// // as SetSearchRange( ) will reset the foundSentenceEnd flag. +// ATEErr (*RestorePreReplaceAllSettings) ( SpellRef spell, const ASInt32 currentPoint, const ATEBool8 foundSentenceEnd); +// // The pair dictionary is not automatically cleared. Call this when you want it cleared. +// ATEErr (*ClearPairDictionary) ( SpellRef spell); +// // Use this for adding words as they're found. +// ATEErr (*AddSelectedToUserDict) ( SpellRef spell); +// // User dictionary access and maintenance - used to manage the dictionary at any time. +// // +// // Calling GetUserDictionaryContents( ) will fill up the same internal list as FindAndSelectOneMisspelledWord( ) +// // Use GetWordListSize( ) and GetWordListContents( ) just like with the suggestion list. +// ATEErr (*GetUserDictionaryContents) ( SpellRef spell); +// // now makes sure that there are no spaces (multiple words) +// // Return value reflects success in adding legit word. +// ATEErr (*AddToUserDictionary) ( SpellRef spell, const ASUnicode* pWord, ATEBool8* ret); +// ATEErr (*DeleteFromUserDictionary) ( SpellRef spell, const ASUnicode* pWord); +// ATEErr (*WordExistsInUserDictionary) ( SpellRef spell, const ASUnicode* pWord, ATEBool8* ret); +// // The ignore list is used for storing "ignore all" words. +// ATEErr (*AddSelectedToIgnoreList) ( SpellRef spell); +// // The ignore list is not automatically cleared. Call this when you want it cleared. +// ATEErr (*ClearIgnoreList) ( SpellRef spell); +// ATEErr (*GetLanguageOfLastMissingDictionary) ( SpellRef spell, Language* ret); +// +//}ATE25SpellSuite; +// +//#ifdef MAC_ENV +// #pragma options align=reset +//#endif +// +//#ifdef WIN_ENV +// #pragma pack(pop) +//#endif +// +//#ifdef __cplusplus +//}// namespace ATE +//} +//#endif +// //#endif //__ATE25Suites__ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesDeclare.h b/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesDeclare.h index 552a039..b830f0f 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesDeclare.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesDeclare.h @@ -1,30 +1,30 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATE25TextSuitesDeclare.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ - -#include "ATETextSuitesDeclare.h" - -// ATE 2.5 Suites - DECLARE_ATE_AUTOSUITE(ATE25DocumentTextResources) - DECLARE_ATE_AUTOSUITE(ATE25TextFrame) - DECLARE_ATE_AUTOSUITE(ATE25CharFeatures) - DECLARE_ATE_AUTOSUITE(ATE25CharInspector) - DECLARE_ATE_AUTOSUITE(ATE25Find) - DECLARE_ATE_AUTOSUITE(ATE25ParaFeatures) - DECLARE_ATE_AUTOSUITE(ATE25ParaInspector) +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATE25TextSuitesDeclare.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ + +#include "ATETextSuitesDeclare.h" + +// ATE 2.5 Suites + DECLARE_ATE_AUTOSUITE(ATE25DocumentTextResources) + DECLARE_ATE_AUTOSUITE(ATE25TextFrame) + DECLARE_ATE_AUTOSUITE(ATE25CharFeatures) + DECLARE_ATE_AUTOSUITE(ATE25CharInspector) + DECLARE_ATE_AUTOSUITE(ATE25Find) + DECLARE_ATE_AUTOSUITE(ATE25ParaFeatures) + DECLARE_ATE_AUTOSUITE(ATE25ParaInspector) DECLARE_ATE_AUTOSUITE(ATE25Spell) \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesExtern.h b/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesExtern.h index 34fc89d..0c483fb 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesExtern.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesExtern.h @@ -1,37 +1,37 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATE25TextSuitesExtern.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ -#ifndef __ATE25TextSuitesExtern__ -#define __ATE25TextSuitesExtern__ - -#include "ATETextSuitesExtern.h" - -namespace ATE -{ -extern "C" ATE25DocumentTextResourcesSuite* sATE25DocumentTextResources; -extern "C" ATE25TextFrameSuite* sATE25TextFrame; -extern "C" ATE25CharFeaturesSuite* sATE25CharFeatures; -extern "C" ATE25CharInspectorSuite* sATE25CharInspector; -extern "C" ATE25FindSuite* sATE25Find; -extern "C" ATE25ParaFeaturesSuite* sATE25ParaFeatures; -extern "C" ATE25ParaInspectorSuite* sATE25ParaInspector; -extern "C" ATE25SpellSuite* sATE25Spell; -}// namespace ATE -#endif //__ATE25TextSuitesExtern__ - - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATE25TextSuitesExtern.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ +#ifndef __ATE25TextSuitesExtern__ +#define __ATE25TextSuitesExtern__ + +#include "ATETextSuitesExtern.h" + +namespace ATE +{ +extern "C" ATE25DocumentTextResourcesSuite* sATE25DocumentTextResources; +extern "C" ATE25TextFrameSuite* sATE25TextFrame; +extern "C" ATE25CharFeaturesSuite* sATE25CharFeatures; +extern "C" ATE25CharInspectorSuite* sATE25CharInspector; +extern "C" ATE25FindSuite* sATE25Find; +extern "C" ATE25ParaFeaturesSuite* sATE25ParaFeatures; +extern "C" ATE25ParaInspectorSuite* sATE25ParaInspector; +extern "C" ATE25SpellSuite* sATE25Spell; +}// namespace ATE +#endif //__ATE25TextSuitesExtern__ + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesImportHelper.h b/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesImportHelper.h index 63c3b8f..028d038 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesImportHelper.h +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/legacy/ATE25TextSuitesImportHelper.h @@ -1,48 +1,48 @@ -/* ------------------------------------------------------------------------------- - - Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. - - NOTICE: Adobe permits you to use, modify, and distribute this file - in accordance with the terms of the Adobe license agreement accompanying - it. If you have received this file from a source other than Adobe, then - your use, modification, or distribution of it requires the prior written - permission of Adobe. - - ---------------------------------------------------------------------------------- - - File: ATE25TextSuitesImportHelper.h - - Notes: Machine Generated file from script version 1.45 - Please don't modify manually! - - ---------------------------------------------------------------------------------- */ -#ifndef __ATE25TextSuitesImportHelper__ -#define __ATE25TextSuitesImportHelper__ - -#include "ATETextSuitesImportHelper.h" - -#define EXTERN_TEXT_SUITES_25\ - EXTERN_TEXT_SUITES - ATE::ATE25DocumentTextResourcesSuite* sATE25DocumentTextResources;\ - ATE::ATE25TextFrameSuite* sATE25TextFrame;\ - ATE::ATE25CharFeaturesSuite* sATE25CharFeatures;\ - ATE::ATE25CharInspectorSuite* sATE25CharInspector;\ - ATE::ATE25FindSuite* sATE25Find;\ - ATE::ATE25ParaFeaturesSuite* sATE25ParaFeatures;\ - ATE::ATE25ParaInspectorSuite* sATE25ParaInspector;\ - ATE::ATE25SpellSuite* sATE25Spell;\ - -#define IMPORT_TEXT_SUITES_25\ - IMPORT_TEXT_SUITES - { kATE25DocumentTextResourcesSuite, kATE25DocumentTextResourcesSuiteVersion, &sATE25DocumentTextResources },\ - { kATE25TextFrameSuite, kATE25TextFrameSuiteVersion, &sATE25TextFrame },\ - { kATE25CharFeaturesSuite, kATE25CharFeaturesSuiteVersion, &sATE25CharFeatures },\ - { kATE25CharInspectorSuite, kATE25CharInspectorSuiteVersion, &sATE25CharInspector },\ - { kATE25FindSuite, kATE25FindSuiteVersion, &sATE25Find },\ - { kATE25ParaFeaturesSuite, kATE25ParaFeaturesSuiteVersion, &sATE25ParaFeatures },\ - { kATE25ParaInspectorSuite, kATE25ParaInspectorSuiteVersion, &sATE25ParaInspector },\ - { kATE25SpellSuite, kATE25SpellSuiteVersion, &sATE25Spell },\ - -#endif //__ATE25TextSuitesImportHelper__ - - +/* ------------------------------------------------------------------------------- + + Copyright 2000-2006 Adobe Systems Incorporated. All Rights Reserved. + + NOTICE: Adobe permits you to use, modify, and distribute this file + in accordance with the terms of the Adobe license agreement accompanying + it. If you have received this file from a source other than Adobe, then + your use, modification, or distribution of it requires the prior written + permission of Adobe. + + ---------------------------------------------------------------------------------- + + File: ATE25TextSuitesImportHelper.h + + Notes: Machine Generated file from script version 1.45 + Please don't modify manually! + + ---------------------------------------------------------------------------------- */ +#ifndef __ATE25TextSuitesImportHelper__ +#define __ATE25TextSuitesImportHelper__ + +#include "ATETextSuitesImportHelper.h" + +#define EXTERN_TEXT_SUITES_25\ + EXTERN_TEXT_SUITES + ATE::ATE25DocumentTextResourcesSuite* sATE25DocumentTextResources;\ + ATE::ATE25TextFrameSuite* sATE25TextFrame;\ + ATE::ATE25CharFeaturesSuite* sATE25CharFeatures;\ + ATE::ATE25CharInspectorSuite* sATE25CharInspector;\ + ATE::ATE25FindSuite* sATE25Find;\ + ATE::ATE25ParaFeaturesSuite* sATE25ParaFeatures;\ + ATE::ATE25ParaInspectorSuite* sATE25ParaInspector;\ + ATE::ATE25SpellSuite* sATE25Spell;\ + +#define IMPORT_TEXT_SUITES_25\ + IMPORT_TEXT_SUITES + { kATE25DocumentTextResourcesSuite, kATE25DocumentTextResourcesSuiteVersion, &sATE25DocumentTextResources },\ + { kATE25TextFrameSuite, kATE25TextFrameSuiteVersion, &sATE25TextFrame },\ + { kATE25CharFeaturesSuite, kATE25CharFeaturesSuiteVersion, &sATE25CharFeatures },\ + { kATE25CharInspectorSuite, kATE25CharInspectorSuiteVersion, &sATE25CharInspector },\ + { kATE25FindSuite, kATE25FindSuiteVersion, &sATE25Find },\ + { kATE25ParaFeaturesSuite, kATE25ParaFeaturesSuiteVersion, &sATE25ParaFeatures },\ + { kATE25ParaInspectorSuite, kATE25ParaInspectorSuiteVersion, &sATE25ParaInspector },\ + { kATE25SpellSuite, kATE25SpellSuiteVersion, &sATE25Spell },\ + +#endif //__ATE25TextSuitesImportHelper__ + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/ate/slotextdomtypes/SloTextdomTypes.h b/BloksAIPlugin/Vendor/illustratorapi/ate/slotextdomtypes/SloTextdomTypes.h new file mode 100644 index 0000000..4f07f67 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/ate/slotextdomtypes/SloTextdomTypes.h @@ -0,0 +1,52 @@ +#ifndef __SloTextdomTypes___ +#define __SloTextdomTypes___ + +// error codes +#define kNoErr 0 +#define kOutOfMemoryErr '!MEM' +#define kBadParameterErr 'PARM' +#define kNotImplementedErr '!IMP' +#define kCantHappenErr 'CANT' + +namespace ATETextDOM +{ + +#ifdef WINDOWS + typedef __int32 Int32; +#endif + +#if defined(MACINTOSH) || IOS || defined(WEB) + typedef int32_t Int32; +#endif + +#ifdef WINDOWS + typedef __int32 ATETextDomErr; +#endif +#if defined(MACINTOSH) || IOS || defined(WEB) + typedef int32_t ATETextDomErr; +#endif + + typedef unsigned short Unicode; + + typedef float Float; + typedef double Real; + + typedef struct _t_FloatMatrix { + Float a, b, c, d, tx, ty; + } FloatMatrix; + + typedef struct _t_FloatPoint { + Float h, v; + } FloatPoint; + + typedef struct _t_RealMatrix { + Real a, b, c, d, tx, ty; + } RealMatrix; + + typedef struct _t_RealPoint { + Real h, v; + } RealPoint; + +} // namespace ATETextDOM + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ADMStdTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ADMStdTypes.h index 439a819..864a9a6 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ADMStdTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ADMStdTypes.h @@ -1,198 +1,201 @@ -#ifndef __ADMStdTypes__ -#define __ADMStdTypes__ - -#include "AIBasicTypes.h" - -// ADMRect is the same size and layout as a Windows RECT. -/** Rectangle value in Windows (same as \c RECT) */ -typedef struct _t_ADMRect { - /** Coordinate values */ - ai::int32 left, top, right, bottom; -} ADMRect; - -// ADMPoint is the same size and layout as a Windows POINT. -/** Point value in Windows (same as \c Point) */ -typedef struct _t_ADMPoint { - /** Coordinate values */ - ai::int32 h, v; -} ADMPoint; - -#ifdef WIN_ENV - -// ADMBoolean is the same a Windows BOOL. -/** Boolean value in Windows (same as \c BOOL) */ -typedef int ADMBoolean; - -#endif - -#ifdef MAC_ENV - -// ADMBoolean is the same a Macintosh Boolean. -/** Boolean value in Mac OS (same as \c Boolean)*/ -typedef unsigned char ADMBoolean; - -#endif - -// ----------------------------------------------------------------------------- -// - -/** Measurement units within dialogs. The unit can be displayed automatically - after the value for items with numeric values. - @see \c #ADMItemSuite9::ShowUnits(), \c #ADMItemSuite9::SetUnits(), - \c #ADMBasicSuite::ValueToString(), \c #ADMBasicSuite::StringToValue(), - - You can create up to 10 application unit preferences, using the constants - \c #kADMAppUnits1 to \c #kADMAppUnits10. Use \c #ADMBasicSuite::SetAppUnits() - to associate the numbered unit type with a normal unit type. Retrieve - the associated unit type with \c #ADMBasicSuite::SetAppUnits(). - */ -typedef enum -{ - - // If you add new units, do not insert them into the list. Instead, add - // them to the end of the "normal" units, and adjust kADMMaxNormalUnits. - // (The actual values of these constants are used in STR# 4300, the - // unit input strings, to associate units with input strings.) - - /** Does not display units, even if show-units is on. */ - kADMNoUnits = 0, - /** Document points (1/72 inch) */ - kADMPointUnits = 1, - /** Inches */ - kADMInchUnits = 2, - /** Millimeters */ - kADMMillimeterUnits = 3, - /** Centimeters */ - kADMCentimeterUnits = 4, - /** Picas */ - kADMPicaUnits = 5, - /** Percentage values */ - kADMPercentUnits = 6, - /** Degrees */ - kADMDegreeUnits = 7, - /** Kyu units (Japanese linear measure, 0.25 mm) */ - kADMQUnits = 8, - /** Base 16 values, usually shown and entered as 0xHH (H = hexadecimal digit) */ - kADMBase16Units = 9, - /** Pixels */ - kADMPixelUnits = 10, - /** Time units, generally \c hours:minutes:seconds:frames */ - kADMTimeUnits = 11, - /** Ha units (Japanese linear measure, 0.25 mm) */ - kADMHaUnits = 12, - /** Internal */ - kADMMinNormalUnits = kADMPointUnits, - /** Internal */ - kADMMaxNormalUnits = kADMHaUnits, - - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits1 = 101, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits2 = 102, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits3 = 103, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits4 = 104, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits5 = 105, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits6 = 106, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits7 = 107, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits8 = 108, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits9 = 109, - /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ - kADMAppUnits10 = 110, - - /** Internal */ - kADMMaxAppUnits = kADMAppUnits10, - /** Internal */ - kADMDummyUnits = 0xFFFFFFFF - -} -ADMUnits; - -#ifndef __ADMRGBCOLOR_DEFINED -#define __ADMRGBCOLOR_DEFINED -// ADMRGBColor is the same as a Macintosh RGBColor on Macintosh and Windows. -/** RGB color record */ -typedef struct _t_ADMRGBColor { - /** Color values */ - unsigned short red, green, blue; -} ADMRGBColor; -#endif //__ADMRGBCOLOR_DEFINED - - -#ifndef __ADMCOLOR_DEFINED -#define __ADMCOLOR_DEFINED -// ----------------------------------------------------------------------------- - -/** Constant color values to be used for various dialog elements. - The value of the constant specifies the actual RGB value, - if the format is 0xRRGGBBFF. The lower 8 bits are always - 0xFF and can be ignored. The top 24 bits represent the - amounts of red, green, and blue, where 0x00 is none, and - 0xFF is the maximum. - \li Black = 0x000000FF, - \li Red = 0xFF0000FF, - \li Green = 0x00FF00FF, - \li Blue = 0x0000FFFF, - \li White = 0xFFFFFFFF - - Use these constants in a drawing procedure, to make your modified - or custom dialog elements consistent with other application dialogs. - See \c #ADMDrawerSuite6::SetADMColor(). - */ -typedef enum -{ - /** Black */ - kADMBlackColor = 0, - /** White */ - kADMWhiteColor, - /** Color that indicates highlighted graphics in dialog. */ - kADMHiliteColor, - /** Color that indicates highlighted text in dialog */ - kADMHiliteTextColor, - /** Color for the light part of shadowed objects. */ - kADMLightColor, - /** Color for dialog background. */ - kADMBackgroundColor, - /** Color for the shadowed part of shadowed objects. */ - kADMShadowColor, - /** Color that indicates a disabled control. */ - kADMDisabledColor, - /** Color for an unpressed button. */ - kADMButtonUpColor, - /** Color for a pressed button. */ - kADMButtonDownColor, - /** Color for the shadowed part of a pressed button. */ - kADMButtonDownShadowColor, - /** Color for a tooltip background. */ - kADMToolTipBackgroundColor, - /** Color for the text of a tooltip.*/ - kADMToolTipForegroundColor, - /** Color for window interiors. */ - kADMWindowColor, - /** Color for dialog foreground. */ - kADMForegroundColor, - /** Color for dialog text. */ - kADMTextColor, - /** Red. */ - kADMRedColor, - /** Obsolete, do not use. */ - kADMTabBackgroundColor, - /** Obsolete, do not use. */ - kADMActiveTabColor, - /** Obsolete, do not use. */ - kADMInactiveTabColor, - /** Indicates an unspecified color. */ - kADMDummyColor = 0x000000FE, // Probably ought to be renamed to kADMUnspecifiedColor - /** Internal */ - kActuallyRGBWhiteButSpecifiedToForceEnumTo32Bits = 0xFFFFFFFF -} -ADMColor; -#endif //__ADMCOLOR_DEFINED - -#endif +#ifndef __ADMStdTypes__ +#define __ADMStdTypes__ + +#include "AIBasicTypes.h" + +// ADMRect is the same size and layout as a Windows RECT. +/** Rectangle value in Windows (same as \c RECT) */ +typedef AIRect ADMRect; + +// ADMPoint is the same size and layout as a Windows POINT. +/** Point value in Windows (same as \c Point) */ +typedef AIPoint ADMPoint; + +#ifdef WIN_ENV + +// ADMBoolean is the same a Windows BOOL. +/** Boolean value in Windows (same as \c BOOL) */ +typedef int ADMBoolean; + +#endif + +#ifdef MAC_ENV + +// ADMBoolean is the same a Macintosh Boolean. +/** Boolean value in Mac OS (same as \c Boolean)*/ +typedef unsigned char ADMBoolean; + +#endif + +// ----------------------------------------------------------------------------- +// + +/** Measurement units within dialogs. The unit can be displayed automatically + after the value for items with numeric values. + @see \c #ADMItemSuite9::ShowUnits(), \c #ADMItemSuite9::SetUnits(), + \c #ADMBasicSuite::ValueToString(), \c #ADMBasicSuite::StringToValue(), + + You can create up to 10 application unit preferences, using the constants + \c #kADMAppUnits1 to \c #kADMAppUnits10. Use \c #ADMBasicSuite::SetAppUnits() + to associate the numbered unit type with a normal unit type. Retrieve + the associated unit type with \c #ADMBasicSuite::SetAppUnits(). + */ +typedef enum +{ + + // If you add new units, do not insert them into the list. Instead, add + // them to the end of the "normal" units, and adjust kADMMaxNormalUnits. + // (The actual values of these constants are used in STR# 4300, the + // unit input strings, to associate units with input strings.) + +/** Does not display units, even if show-units is on. */ + kADMNoUnits = 0, + /** Document points (1/72 inch) */ + kADMPointUnits = 1, + /** Inches */ + kADMInchUnits = 2, + /** Millimeters */ + kADMMillimeterUnits = 3, + /** Centimeters */ + kADMCentimeterUnits = 4, + /** Picas */ + kADMPicaUnits = 5, + /** Percentage values */ + kADMPercentUnits = 6, + /** Degrees */ + kADMDegreeUnits = 7, + /** Kyu units (Japanese linear measure, 0.25 mm) */ + kADMQUnits = 8, + /** Base 16 values, usually shown and entered as 0xHH (H = hexadecimal digit) */ + kADMBase16Units = 9, + /** Pixels */ + kADMPixelUnits = 10, + /** Time units, generally \c hours:minutes:seconds:frames */ + kADMTimeUnits = 11, + /** Ha units (Japanese linear measure, 0.25 mm) */ + kADMHaUnits = 12, + /** Feet-Inch */ + kADMFeetInchUnits = 13, + /** Meter */ + kADMMeterUnits = 14, + /** Yards */ + kADMYardUnits = 15, + /** Feets */ + kADMFeetUnits = 16, + /** Internal */ + kADMMinNormalUnits = kADMPointUnits, + /** Internal */ + kADMMaxNormalUnits = kADMFeetUnits, /*kADMFeetUnits, Modifying this as given in the comment above*/ + + + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits1 = 101, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits2 = 102, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits3 = 103, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits4 = 104, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits5 = 105, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits6 = 106, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits7 = 107, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits8 = 108, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits9 = 109, + /** Developer-defined unit preference. See \c #ADMBasicSuite::SetAppUnits() */ + kADMAppUnits10 = 110, + + /** Internal */ + kADMMaxAppUnits = kADMAppUnits10, + /** Internal */ + kADMDummyUnits = 0xFFFFFFFF + +} +ADMUnits; + +#ifndef __ADMRGBCOLOR_DEFINED +#define __ADMRGBCOLOR_DEFINED +// ADMRGBColor is the same as a Macintosh RGBColor on Macintosh and Windows. +/** RGB color record */ +typedef struct _t_ADMRGBColor { + /** Color values */ + unsigned short red, green, blue; +} ADMRGBColor; +#endif //__ADMRGBCOLOR_DEFINED + + +#ifndef __ADMCOLOR_DEFINED +#define __ADMCOLOR_DEFINED +// ----------------------------------------------------------------------------- + +/** Constant color values to be used for various dialog elements. + The value of the constant specifies the actual RGB value, + if the format is 0xRRGGBBFF. The lower 8 bits are always + 0xFF and can be ignored. The top 24 bits represent the + amounts of red, green, and blue, where 0x00 is none, and + 0xFF is the maximum. + \li Black = 0x000000FF, + \li Red = 0xFF0000FF, + \li Green = 0x00FF00FF, + \li Blue = 0x0000FFFF, + \li White = 0xFFFFFFFF + + Use these constants in a drawing procedure, to make your modified + or custom dialog elements consistent with other application dialogs. + See \c #ADMDrawerSuite6::SetADMColor(). + */ +typedef enum +{ + /** Black */ + kADMBlackColor = 0, + /** White */ + kADMWhiteColor, + /** Color that indicates highlighted graphics in dialog. */ + kADMHiliteColor, + /** Color that indicates highlighted text in dialog */ + kADMHiliteTextColor, + /** Color for the light part of shadowed objects. */ + kADMLightColor, + /** Color for dialog background. */ + kADMBackgroundColor, + /** Color for the shadowed part of shadowed objects. */ + kADMShadowColor, + /** Color that indicates a disabled control. */ + kADMDisabledColor, + /** Color for an unpressed button. */ + kADMButtonUpColor, + /** Color for a pressed button. */ + kADMButtonDownColor, + /** Color for the shadowed part of a pressed button. */ + kADMButtonDownShadowColor, + /** Color for a tooltip background. */ + kADMToolTipBackgroundColor, + /** Color for the text of a tooltip.*/ + kADMToolTipForegroundColor, + /** Color for window interiors. */ + kADMWindowColor, + /** Color for dialog foreground. */ + kADMForegroundColor, + /** Color for dialog text. */ + kADMTextColor, + /** Red. */ + kADMRedColor, + /** Obsolete, do not use. */ + kADMTabBackgroundColor, + /** Obsolete, do not use. */ + kADMActiveTabColor, + /** Obsolete, do not use. */ + kADMInactiveTabColor, + /** Indicates an unspecified color. */ + kADMDummyColor = 0x000000FE, // Probably ought to be renamed to kADMUnspecifiedColor + /** Internal */ + kActuallyRGBWhiteButSpecifiedToForceEnumTo32Bits = 0xFFFFFFFF +} +ADMColor; +#endif //__ADMCOLOR_DEFINED + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAGMTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAGMTypes.h index 7fb405a..f19d97e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAGMTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAGMTypes.h @@ -1,123 +1,149 @@ -#ifndef _AIAGMTYPES_H_ -#define _AIAGMTYPES_H_ - -#include "AITypes.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct _t_AIAGMColrSpace AIAGMColorSpace; -typedef int AIAGMColorSpaceFamily; -typedef struct _t_AIAGMRasterPort AIAGMRasterPort; -typedef struct _t_AIAGMDisplayListPort AIAGMDisplayListPort; -typedef struct _t_AGMBIBPort AIAGMBIBPort; // (aka AGMPort*) can safely pass AIAGMBIBPort across library boundaries. -typedef struct _t_AGMBIBColorSpace AIAGMBIBColorSpace; // (aka AGMColorSpace*) can safely pass AIAGMBIBColorSpace across library boundaries. -typedef struct _t_AIAGMPort AIAGMPort; -typedef AIAGMPort* AIAGMPortPtr; -/** @deprecated Deprecated with the move to CoolType 5. Use \c #AICTText instead. */ -typedef struct _t_AIAGMTextRecord AIAGMTextRecord; -typedef struct _t_AICTText AICTText; -typedef struct _t_AIAGMColorConvertOptions AIAGMColorConvertOptions; - -/** AGM comment callback procedure template. */ -typedef void (*AIAGMCommentProcPtr)( const AIAGMPort* dstPort, ASInt32 comment, - void* commentData, ASUInt32 dataLength ); - -/** AGM option constants. */ -typedef enum { - kAIAGMOptionsGet, - kAIAGMOptionsSet, - kAIAGMOptionsEnable, - kAIAGMOptionsDisable, - _MAX_AIAGMOptionsOp = 0x40000000 /* force 32 bit enum */ -} AIAGMOptionsOp; - -/** AGM text option constants. */ -enum { - kAIAGMOptionNone = 0, - kAIAGMOptionAAText = 1, - kAIAGMOptionAAGraphics = 2, - kAIAGMOptionOverscanImage = 4, - kAIAGMOptionTextAsPaths = 8, - kAIAGMOptionResampleImage = 0x10, - kAIAGMOptionHintGlyphLocations = 0x40, - kAIAGMOptionAANoSubPixelWidths = 0x80, - kAIAGMOptionEnableOverprint = 0x100, - kAIAGMOptionAAImages = 0x10000, - kAIAGMOptionLinearizeAAOnly = 0x2000, - kAIAGMOptionAATextPreview = 0x8000, - kAIAGMOptionUnhintedText = 0x40000, - kAIAGMOptionOverscannedText = 0x80000, - kAIAGMOptionIllustratorPixelPerfectDrawing = 0x200000 -}; - -// Keep these synchronized with enum AGMBlendingMode! -/** AGM blending option constants. */ -enum AIAGMBlendingMode { - kAIAGMBlendNormal, - kAIAGMBlendMultiply, - kAIAGMBlendScreen, - kAIAGMBlendDifference, - kAIAGMBlendDarken, - kAIAGMBlendLighten, - kAIAGMBlendColorDodge, - kAIAGMBlendColorBurn, - kAIAGMBlendExclusion, - kAIAGMBlendHardLight, - kAIAGMBlendOverlay, - kAIAGMBlendSoftLight, - kAIAGMBlendHue, - kAIAGMBlendSaturation, - kAIAGMBlendColor, - kAIAGMBlendLuminosity, - kAIAGMNumBlendingModes, - _MAX_AIAGMBlendingMode = 0x40000000 /* force 32 bit enum */ -}; - -/** Color table structure. */ -struct AIAGMColorTab { - /** The number of colors in the table. */ - ai::int32 numColors; - /** Pointer to the color data. */ - void* theColors; -}; - -/** Rectangle structure. */ -struct AIAGMInt16Rect { - /** Left edge. */ - ai::int16 xMin; - /** Bottom edge. */ - ai::int16 yMin; - /** Right edge. */ - ai::int16 xMax; - /** Top edge. */ - ai::int16 yMax; -} -; - -/** Image record structure.*/ -struct AIAGMImageRecord { - /** Bounding box of the image. */ - AIAGMInt16Rect bounds; - /** Pointer to the image data. */ - void* baseAddr; - /** Width of the image in bytes. The number of bytes - varies with the bits-per-pixel of the color space. */ - ai::int32 byteWidth; - /** Color space. */ - ai::int16 colorSpace; - /** Number of bits per pixel. */ - ai::int16 bitsPerPixel; - /** Decode array. */ - AIFloat* decodeArray; - /** Color table. */ - AIAGMColorTab colorTab; -}; - - -#ifdef __cplusplus -} -#endif - -#endif // _AIAGMTYPES_H_ +#ifndef _AIAGMTYPES_H_ +#define _AIAGMTYPES_H_ + +#include "AITypes.h" + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct _t_AIAGMColrSpace AIAGMColorSpace; +typedef int AIAGMColorSpaceFamily; +typedef struct _t_AIAGMRasterPort AIAGMRasterPort; +typedef struct _t_AIAGMDisplayListPort AIAGMDisplayListPort; +typedef struct _t_AGMBIBPort AIAGMBIBPort; // (aka AGMPort*) can safely pass AIAGMBIBPort across library boundaries. +typedef struct _t_AGMBIBColorSpace AIAGMBIBColorSpace; // (aka AGMColorSpace*) can safely pass AIAGMBIBColorSpace across library boundaries. +typedef struct _t_AIAGMPort AIAGMPort; +typedef AIAGMPort* AIAGMPortPtr; +/** @deprecated Deprecated with the move to CoolType 5. Use \c #AICTText instead. */ +typedef struct _t_AIAGMTextRecord AIAGMTextRecord; +typedef struct _t_AICTText AICTText; +typedef struct _t_AIAGMColorConvertOptions AIAGMColorConvertOptions; + +/** AGM comment callback procedure template. */ +typedef void (*AIAGMCommentProcPtr)( const AIAGMPort* dstPort, ASInt32 comment, + void* commentData, ASUInt32 dataLength ); + +/** AGM option constants. */ +typedef enum { + kAIAGMOptionsGet, + kAIAGMOptionsSet, + kAIAGMOptionsEnable, + kAIAGMOptionsDisable, + _MAX_AIAGMOptionsOp = 0x40000000 /* force 32 bit enum */ +} AIAGMOptionsOp; + +/** AGM text option constants. */ +enum { + kAIAGMOptionNone = 0, + kAIAGMOptionAAText = 1, + kAIAGMOptionAAGraphics = 2, + kAIAGMOptionOverscanImage = 4, + kAIAGMOptionTextAsPaths = 8, + kAIAGMOptionResampleImage = 0x10, + kAIAGMOptionHintGlyphLocations = 0x40, + kAIAGMOptionAANoSubPixelWidths = 0x80, + kAIAGMOptionEnableOverprint = 0x100, + kAIAGMOptionAAImages = 0x10000, + kAIAGMOptionLinearizeAAOnly = 0x2000, + kAIAGMOptionAATextPreview = 0x8000, + kAIAGMOptionUnhintedText = 0x40000, + kAIAGMOptionOverscannedText = 0x80000, + kAIAGMOptionIllustratorPixelPerfectDrawing = 0x200000, + kAIAGMOptionUseFloatReducer = 0x8000000 +}; + +// Keep these synchronized with enum AGMBlendingMode! +/** AGM blending option constants. */ +enum AIAGMBlendingMode { + kAIAGMBlendNormal, + kAIAGMBlendMultiply, + kAIAGMBlendScreen, + kAIAGMBlendDifference, + kAIAGMBlendDarken, + kAIAGMBlendLighten, + kAIAGMBlendColorDodge, + kAIAGMBlendColorBurn, + kAIAGMBlendExclusion, + kAIAGMBlendHardLight, + kAIAGMBlendOverlay, + kAIAGMBlendSoftLight, + kAIAGMBlendHue, + kAIAGMBlendSaturation, + kAIAGMBlendColor, + kAIAGMBlendLuminosity, + kAIAGMNumBlendingModes, + _MAX_AIAGMBlendingMode = 0x40000000 /* force 32 bit enum */ +}; + +/** Color table structure. */ +struct AIAGMColorTab { + /** The number of colors in the table. */ + ai::int32 numColors; + /** Pointer to the color data. */ + void* theColors; + + void Init() + { + numColors = 0; + theColors = nullptr; + } +}; + +/** Rectangle structure. */ +struct AIAGMInt16Rect { + /** Left edge. */ + ai::int16 xMin; + /** Bottom edge. */ + ai::int16 yMin; + /** Right edge. */ + ai::int16 xMax; + /** Top edge. */ + ai::int16 yMax; + + void Init() + { + xMin = 0; + yMin = 0; + xMax = 0; + yMax = 0; + } +} +; + +/** Image record structure.*/ +struct AIAGMImageRecord { + /** Bounding box of the image. */ + AIAGMInt16Rect bounds; + /** Pointer to the image data. */ + void* baseAddr; + /** Width of the image in bytes. The number of bytes + varies with the bits-per-pixel of the color space. */ + ai::int32 byteWidth; + /** Color space. */ + ai::int16 colorSpace; + /** Number of bits per pixel. */ + ai::int16 bitsPerPixel; + /** Decode array. */ + AIFloat* decodeArray; + /** Color table. */ + AIAGMColorTab colorTab; + + void Init() + { + baseAddr = nullptr; + byteWidth = 0; + colorSpace = 0; + bitsPerPixel = 0; + decodeArray = nullptr; + bounds.Init(); + colorTab.Init(); + } +}; + + +#ifdef __cplusplus +} +#endif + +#endif // _AIAGMTYPES_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATECurrTextFeatures.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATECurrTextFeatures.h index 9cf15a0..d168dc5 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATECurrTextFeatures.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATECurrTextFeatures.h @@ -1,160 +1,160 @@ -#ifndef __ATETextCurrentStyle__ -#define __ATETextCurrentStyle__ - -/* - * Name: AIATECurrTextFeatures.h - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2002-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __ATESuites__ -#include "ATESuites.h" -#endif - -#ifndef __ATETypesDef__ -#include "ATETypesDef.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIATECurrTextFeatures.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIATECurrentTextFeaturesSuite "AI ATE Current Text Features Suite" -#define kAIATECurrentTextFeaturesSuiteVersion3 AIAPI_VERSION(3) -#define kAIATECurrentTextFeaturesSuiteVersion kAIATECurrentTextFeaturesSuiteVersion3 -#define kAIATECurrentTextFeaturesVersion kAIATECurrentTextFeaturesSuiteVersion - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These functions allow you to access and manipulate the character and - paragraph style attributes of text. - \li The \e current styles are those that are applied to new text. - \li The styles applied to currently selected text are the ones displayed - in the Character and Paragraph palettes. - - You can define overrides for a character or paragraph style -- that is, - a subset of features with override values. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIATECurrentTextFeaturesSuite and \c #kAIATECurrentTextFeaturesVersion. - */ -typedef struct { - - /** Retrieves the character attributes for the current text selection, - in a flattened attribute chain, as displayed in the Character Attribute palette. - @param charFeatures [out] A buffer in which to return the character attributes. - */ - AIAPI AIErr (*GetCurrentCharFeature) ( ATE::CharFeaturesRef *charFeatures ); - - /** Retrieves the paragraph attributes for the current text selection, - in a flattened attribute chain, as displayed in the Paragraph Attribute palette. - @param paraFeatures [out] A buffer in which to return the paragraph attributes. - */ - AIAPI AIErr (*GetCurrentParaFeature) ( ATE::ParaFeaturesRef *paraFeatures ); - - /** Sets the character attributes for the current text selection, - @param charFeatures A flattened attribute chain, as displayed in the Character Attribute palette. - */ - AIAPI AIErr (*SetCurrentCharFeature) ( ATE::CharFeaturesRef charFeatures ); - - /** Sets the paragraph attributes for the current text selection, - @param paraFeatures A flattened attribute chain, as displayed in the Paragraph Attribute palette. - */ - AIAPI AIErr (*SetCurrentParaFeature) ( ATE::ParaFeaturesRef paraFeatures ); - - /** Retrieves the named character style that are applied to new text objects. - The default is the normal style in new documents. - @param pStyle [out] A buffer in which to return the character style. - */ - AIAPI AIErr (*GetCurrentCharStyle) ( ATE::CharStyleRef* pStyle ); - - /** Retrieves the named paragraph style that are applied to new text objects. - The default is the normal style in new documents. - @param pStyle [out] A buffer in which to return the paragraph style. - */ - AIAPI AIErr (*GetCurrentParaStyle) ( ATE::ParaStyleRef* pStyle ); - - /** Sets the named character style to be applied to new text objects. - If no text selection is present, overrides are cleared. - @param pStyle The character style. - */ - AIAPI AIErr (*SetCurrentCharStyle) ( ATE::CharStyleRef pStyle ); - - /** Sets the named paragraph style to be applied to new text objects. - If no text selection is present, overrides are cleared. - @param pStyle The paragraph style. - */ - AIAPI AIErr (*SetCurrentParaStyle) ( ATE::ParaStyleRef pStyle ); - - /** Updates the UI to reflect any modifications you have made to - the current text styles or features. */ - AIAPI AIErr (*Invalidate) (); - - /** Retrieves the current local character override attributes that are - applied to new text objects. - @param pFeatures [out] A buffer in which to return the character features - containing override values. - */ - AIAPI AIErr (*GetCurrentCharOverrides) ( ATE::CharFeaturesRef *pFeatures ); - - /** Retrieves the current local paragraph override attributes that are - applied to new text objects. - @param pFeatures [out] A buffer in which to return the paragraph features - containing override values. - */ - AIAPI AIErr (*GetCurrentParaOverrides) ( ATE::ParaFeaturesRef *pFeatures ); - - /** Sets the current local character override attributes that are - applied to new text objects. - @param pFeatures The character features with override values. If all attributes are - unassigned, clears the current overrides. - */ - AIAPI AIErr (*SetCurrentCharOverrides) ( ATE::CharFeaturesRef pFeatures ); - - /** Sets the current local paragraph override attributes that are - applied to new text objects. - @param pFeatures The paragraph features with override values. If all attributes are - unassigned, clears the current overrides. - */ - AIAPI AIErr (*SetCurrentParaOverrides) ( ATE::ParaFeaturesRef pFeatures ); - -} AIATECurrentTextFeaturesSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __ATETextCurrentStyle__ +#define __ATETextCurrentStyle__ + +/* + * Name: AIATECurrTextFeatures.h + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2002-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __ATESuites__ +#include "ATESuites.h" +#endif + +#ifndef __ATETypesDef__ +#include "ATETypesDef.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIATECurrTextFeatures.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIATECurrentTextFeaturesSuite "AI ATE Current Text Features Suite" +#define kAIATECurrentTextFeaturesSuiteVersion3 AIAPI_VERSION(3) +#define kAIATECurrentTextFeaturesSuiteVersion kAIATECurrentTextFeaturesSuiteVersion3 +#define kAIATECurrentTextFeaturesVersion kAIATECurrentTextFeaturesSuiteVersion + + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + These functions allow you to access and manipulate the character and + paragraph style attributes of text. + \li The \e current styles are those that are applied to new text. + \li The styles applied to currently selected text are the ones displayed + in the Character and Paragraph palettes. + + You can define overrides for a character or paragraph style -- that is, + a subset of features with override values. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIATECurrentTextFeaturesSuite and \c #kAIATECurrentTextFeaturesVersion. + */ +typedef struct { + + /** Retrieves the character attributes for the current text selection, + in a flattened attribute chain, as displayed in the Character Attribute palette. + @param charFeatures [out] A buffer in which to return the character attributes. + */ + AIAPI AIErr (*GetCurrentCharFeature) ( ATE::CharFeaturesRef *charFeatures ); + + /** Retrieves the paragraph attributes for the current text selection, + in a flattened attribute chain, as displayed in the Paragraph Attribute palette. + @param paraFeatures [out] A buffer in which to return the paragraph attributes. + */ + AIAPI AIErr (*GetCurrentParaFeature) ( ATE::ParaFeaturesRef *paraFeatures ); + + /** Sets the character attributes for the current text selection, + @param charFeatures A flattened attribute chain, as displayed in the Character Attribute palette. + */ + AIAPI AIErr (*SetCurrentCharFeature) ( ATE::CharFeaturesRef charFeatures ); + + /** Sets the paragraph attributes for the current text selection, + @param paraFeatures A flattened attribute chain, as displayed in the Paragraph Attribute palette. + */ + AIAPI AIErr (*SetCurrentParaFeature) ( ATE::ParaFeaturesRef paraFeatures ); + + /** Retrieves the named character style that are applied to new text objects. + The default is the normal style in new documents. + @param pStyle [out] A buffer in which to return the character style. + */ + AIAPI AIErr (*GetCurrentCharStyle) ( ATE::CharStyleRef* pStyle ); + + /** Retrieves the named paragraph style that are applied to new text objects. + The default is the normal style in new documents. + @param pStyle [out] A buffer in which to return the paragraph style. + */ + AIAPI AIErr (*GetCurrentParaStyle) ( ATE::ParaStyleRef* pStyle ); + + /** Sets the named character style to be applied to new text objects. + If no text selection is present, overrides are cleared. + @param pStyle The character style. + */ + AIAPI AIErr (*SetCurrentCharStyle) ( ATE::CharStyleRef pStyle ); + + /** Sets the named paragraph style to be applied to new text objects. + If no text selection is present, overrides are cleared. + @param pStyle The paragraph style. + */ + AIAPI AIErr (*SetCurrentParaStyle) ( ATE::ParaStyleRef pStyle ); + + /** Updates the UI to reflect any modifications you have made to + the current text styles or features. */ + AIAPI AIErr (*Invalidate) (); + + /** Retrieves the current local character override attributes that are + applied to new text objects. + @param pFeatures [out] A buffer in which to return the character features + containing override values. + */ + AIAPI AIErr (*GetCurrentCharOverrides) ( ATE::CharFeaturesRef *pFeatures ); + + /** Retrieves the current local paragraph override attributes that are + applied to new text objects. + @param pFeatures [out] A buffer in which to return the paragraph features + containing override values. + */ + AIAPI AIErr (*GetCurrentParaOverrides) ( ATE::ParaFeaturesRef *pFeatures ); + + /** Sets the current local character override attributes that are + applied to new text objects. + @param pFeatures The character features with override values. If all attributes are + unassigned, clears the current overrides. + */ + AIAPI AIErr (*SetCurrentCharOverrides) ( ATE::CharFeaturesRef pFeatures ); + + /** Sets the current local paragraph override attributes that are + applied to new text objects. + @param pFeatures The paragraph features with override values. If all attributes are + unassigned, clears the current overrides. + */ + AIAPI AIErr (*SetCurrentParaOverrides) ( ATE::ParaFeaturesRef pFeatures ); + +} AIATECurrentTextFeaturesSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATEPaint.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATEPaint.h index 825ff7d..93404be 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATEPaint.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATEPaint.h @@ -1,255 +1,255 @@ -/* - * Name: AIATEPaint.h - * $Revision: - * Author: - * Date: - * Purpose: Facilitates access of paint attributes applied to text. - * This suite serves as a bridge between ATE::ApplicationPaint - * and AIColor - * - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2002-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIATEPAINT__ -#define __AIATEPAINT__ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AITypes.h" - -#include "AIColor.h" -#include "AIEntry.h" -#include "AIPathStyle.h" - -#include "ATESuites.h" - - -#include "AIHeaderBegin.h" - -/** @file AIATEPaint.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIATEPaintSuite "AIATE Paint Suite" -#define kAIATEPaintSuiteVersion3 AIAPI_VERSION(3) -#define kAIATEPaintSuiteVersion kAIATEPaintSuiteVersion3 -#define kAIATEPaintVersion kAIATEPaintSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Allows you to convert between ATE and Illustrator types that describe - color and other text style attributes. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIATEPaintSuite and \c #kAIATEPaintVersion. - - Keep the following in mind: - - \li Illustrator suites and ATE suites use slightly different memory management schemes - for reference counting. To avoid problems, it is recommended that you use the - C++ wrapper classes for the ATE suites instead of using the suites directly. - See the example for \c #CreateATEApplicationPaint(). - - \li Because paint attributes are often partially defined, you \e must use style maps. - All \c #AIPathStyle instances are treated and returned as partial. If you obtain an - \c AIPathStyle from this suite, you must check its corresponding \c #AIPathStyleMap - to determine what information in the style is valid. No guarantees are made for invalid entries. - Similarly, if you pass in an \c #AIPathStyle and \c #AIPathStyleMap, they must be a correct - pairing. Pairs that do not correspond produce undefined results. - - \li You cannot directly instantiate ATE \c ApplicationPaint and ATE \c ArrayReal. - Instead, pass NULL pointers of type \c ApplicationPaintRef and \c ArrayRealRef, - which are filled with valid references. See example for \c #CreateATEApplicationPaint(). - - \li All methods return \c #kBadParameterErr if a bad parameter is passed in. - These include NULL pointers or source parameters containing data the method was - unable to convert; for example, an out-of-range value. - - \b EXAMPLES - - The following examples show how to get and set values for a range of text. - -@code - ATE::TextRangesRef selRef; - sAIDocument->GetTextSelection(&selRef); - ITextRanges ranges(selRef); - ITextRange range = ranges.getFirst( ); - ... - bool isValid = false; - AIPathStyle style; - AIPathStyleMap styleMap; - - ICharFeatures features = range->getUniqueLocalCharFeatures( ); - IApplicationPaint paint = features.getStrokeColor( &isValid ); - - if ( isValid ) - { - error = sAIATEPaintSuite->GetAIPathStyleAndMap( - features.GetRef(), &style, &styleMap - ); - ... - } -@endcode - - This example starts with an \c #AIPathStyle and \c #AIPathStyleMap, - and sets corresponding attribute values in an ATE \c CharFeaturesRef - to create local overrides of text. - -@code - ITextRange range = ... - - // The C++ wrapper takes care of initialization - ICharFeatures features; - - error = sAIATEPaintSuite->GetCharFeaturesRef( - &style, &styleMap, features - ); - - if ( kNoErr == error ) - { - range.setLocalCharFeatures( features ); - } -@endcode -*/ - -typedef struct { - - // ATE paint types -> Illustrator paint types - // ------------------------------------------------------------------------- - - /** Converts an ATE \c ApplicationPaintRef to \c #AIColor. - @param src The ATE value. - @param dst [out] A buffer in which to return the Illustrator value. - */ - AIAPI AIErr ( *GetAIColor ) ( ATE::ApplicationPaintRef src, AIColor* dst ); - - /** Converts an ATE \c LineCapType to \c #AILineCap - @param src The ATE value. - @param dst [out] A buffer in which to return the Illustrator value. - */ - AIAPI AIErr ( *GetAILineCap ) ( ATE::LineCapType src, AILineCap* dst ); - - /** Converts an ATE \c LineJoinType to \c #AILineJoin. - @param src The ATE value. - @param dst [out] A buffer in which to return the Illustrator value. - */ - AIAPI AIErr ( *GetAILineJoin ) ( ATE::LineJoinType src, AILineJoin* dst ); - - /** Converts an ATE \c ArrayReal to array contained in \c #AIDashStyle - @param src The ATE value. - @param dst [out] A buffer in which to return the Illustrator value. - */ - AIAPI AIErr ( *GetAIDashStyleArray ) ( ATE::ArrayRealRef srcArray, AIDashStyle* dstStyle ); - - // Illustrator paint types -> ATE paint types - // ------------------------------------------------------------------------- - - /** Converts an \c AIColor to an ATE \c ApplicationPaintRef. -
\b Example: - @code -// ApplicationPaintRef is NULL (an invalid reference). -ATE::ApplicationPaintRef pPaint = NULL; - -// After this call, pPaint is a valid reference -sAIATEPaintSuite->CreateATEApplicationPaint(&srcAIColor, &pPaint); - -// Use the C++ wrapper to avoid ref counting. -IApplicationPaint paint(pPaint); - ... - @endcode - @param src The Illustrator value. - @param dst [out] A buffer in which to return the ATE value. - - */ - AIAPI AIErr ( *CreateATEApplicationPaint ) ( const AIColor* src, ATE::ApplicationPaintRef* dst ); - - /** Converts an \c AILineCap to an ATE \c LineCapType. - @param src The Illustrator value. - @param dst [out] A buffer in which to return the ATE value. - */ - AIAPI AIErr ( *GetATELineCap ) ( AILineCap src, ATE::LineCapType* dst ); - - /** Converts an \c AILineJoin to ATE \c LineJoinType. - See example for \c #CreateATEApplicationPaint(). - @param src The Illustrator value. - @param dst [out] A buffer in which to return the ATE value. - */ - AIAPI AIErr ( *GetATELineJoin ) ( AILineJoin src, ATE::LineJoinType* dst ); - - /** Converts an array contained in an \c AIDashStyle to an ATE \c ArrayReal. - See example for \c #CreateATEApplicationPaint(). - @param src The Illustrator value. - @param dst [out] A buffer in which to return the ATE value. - */ - AIAPI AIErr ( *CreateATELineDashArray ) ( const AIDashStyle* srcStyle, ATE::ArrayRealRef* dst ); - - // Convenience Methods - // ------------------------------------------------------------------------- - - /** Sets fields in a path style and path style map by extracting - corresponding data contained in an ATE character feature set. - @param src The ATE character feature set. - @param pDstPathStyle [out] A buffer in which to return the Illustrator path style. - @param pDstPathStyleMap [out] A buffer in which to return the Illustrator path style map. - */ - AIAPI AIErr ( *GetAIPathStyleAndMap ) ( ATE::CharFeaturesRef src, AIPathStyle* pDstPathStyle, AIPathStyleMap* pDstPathStyleMap ); - - /** Set fields in an ATE character feature set by extracting the - corresponding data in a path style and path style map. - @param srcPathStyle A pointer to the Illustrator path style. - @param srcPathStyleMap A pointer to the Illustrator path style map. - @param dst [out] A structure in which to return the new ATE character feature set. - */ - AIAPI AIErr ( *GetCharFeatures ) ( const AIPathStyle* pSrcPathStyle, const AIPathStyleMap* pSrcPathStyleMap, ATE::CharFeaturesRef dst ); - - // Transparency Methods - // ------------------------------------------------------------------------- - - /** Extracts blend (transparency) information from an ATE character feature set - and adds it to an Illustrator dictionary. - @param pSrc The source ATE character feature set. - @param pDst [out] The dictionary to modify. If the source contains no blend information, - the dictionary is not modified. - @see \c #AIBlendStyleSuite::GetArtAttrs() for a description of the dictionary entries. - */ - AIAPI AIErr ( *GetTransparencyAttrs ) ( ATE::CharFeaturesRef pSrc, AIDictionaryRef pDst ); - - /** Sets the blend (transparency) attributes in an ATE character feature set - based on the blend values in an Illustrator dictionary. - All blend attribute in the dictionary must be known. If any are unknown, - all blend information for \c pDst is cleared. - @param pSrc The source dictionary. - @param pDst [out] The ATE character feature set to modify. - @see \c #AIBlendStyleSuite::GetArtAttrs() for a description of the dictionary entries. - */ - AIAPI AIErr ( *SetTransparencyAttrs ) ( AIDictionaryRef pSrc, ATE::CharFeaturesRef pDst ); - -} AIATEPaintSuite; - -#include "AIHeaderEnd.h" - -#endif // __AIATEPAINT__ +/* + * Name: AIATEPaint.h + * $Revision: + * Author: + * Date: + * Purpose: Facilitates access of paint attributes applied to text. + * This suite serves as a bridge between ATE::ApplicationPaint + * and AIColor + * + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2002-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIATEPAINT__ +#define __AIATEPAINT__ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AITypes.h" + +#include "AIColor.h" +#include "AIEntry.h" +#include "AIPathStyle.h" + +#include "ATESuites.h" + + +#include "AIHeaderBegin.h" + +/** @file AIATEPaint.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIATEPaintSuite "AIATE Paint Suite" +#define kAIATEPaintSuiteVersion3 AIAPI_VERSION(3) +#define kAIATEPaintSuiteVersion kAIATEPaintSuiteVersion3 +#define kAIATEPaintVersion kAIATEPaintSuiteVersion + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Allows you to convert between ATE and Illustrator types that describe + color and other text style attributes. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIATEPaintSuite and \c #kAIATEPaintVersion. + + Keep the following in mind: + + \li Illustrator suites and ATE suites use slightly different memory management schemes + for reference counting. To avoid problems, it is recommended that you use the + C++ wrapper classes for the ATE suites instead of using the suites directly. + See the example for \c #CreateATEApplicationPaint(). + + \li Because paint attributes are often partially defined, you \e must use style maps. + All \c #AIPathStyle instances are treated and returned as partial. If you obtain an + \c AIPathStyle from this suite, you must check its corresponding \c #AIPathStyleMap + to determine what information in the style is valid. No guarantees are made for invalid entries. + Similarly, if you pass in an \c #AIPathStyle and \c #AIPathStyleMap, they must be a correct + pairing. Pairs that do not correspond produce undefined results. + + \li You cannot directly instantiate ATE \c ApplicationPaint and ATE \c ArrayReal. + Instead, pass NULL pointers of type \c ApplicationPaintRef and \c ArrayRealRef, + which are filled with valid references. See example for \c #CreateATEApplicationPaint(). + + \li All methods return \c #kBadParameterErr if a bad parameter is passed in. + These include NULL pointers or source parameters containing data the method was + unable to convert; for example, an out-of-range value. + + \b EXAMPLES + + The following examples show how to get and set values for a range of text. + +@code + ATE::TextRangesRef selRef; + sAIDocument->GetTextSelection(&selRef); + ITextRanges ranges(selRef); + ITextRange range = ranges.getFirst( ); + ... + bool isValid = false; + AIPathStyle style; + AIPathStyleMap styleMap; + + ICharFeatures features = range->getUniqueLocalCharFeatures( ); + IApplicationPaint paint = features.getStrokeColor( &isValid ); + + if ( isValid ) + { + error = sAIATEPaintSuite->GetAIPathStyleAndMap( + features.GetRef(), &style, &styleMap + ); + ... + } +@endcode + + This example starts with an \c #AIPathStyle and \c #AIPathStyleMap, + and sets corresponding attribute values in an ATE \c CharFeaturesRef + to create local overrides of text. + +@code + ITextRange range = ... + + // The C++ wrapper takes care of initialization + ICharFeatures features; + + error = sAIATEPaintSuite->GetCharFeaturesRef( + &style, &styleMap, features + ); + + if ( kNoErr == error ) + { + range.setLocalCharFeatures( features ); + } +@endcode +*/ + +typedef struct { + + // ATE paint types -> Illustrator paint types + // ------------------------------------------------------------------------- + + /** Converts an ATE \c ApplicationPaintRef to \c #AIColor. + @param src The ATE value. + @param dst [out] A buffer in which to return the Illustrator value. + */ + AIAPI AIErr ( *GetAIColor ) ( ATE::ApplicationPaintRef src, AIColor* dst ); + + /** Converts an ATE \c LineCapType to \c #AILineCap + @param src The ATE value. + @param dst [out] A buffer in which to return the Illustrator value. + */ + AIAPI AIErr ( *GetAILineCap ) ( ATE::LineCapType src, AILineCap* dst ); + + /** Converts an ATE \c LineJoinType to \c #AILineJoin. + @param src The ATE value. + @param dst [out] A buffer in which to return the Illustrator value. + */ + AIAPI AIErr ( *GetAILineJoin ) ( ATE::LineJoinType src, AILineJoin* dst ); + + /** Converts an ATE \c ArrayReal to array contained in \c #AIDashStyle + @param src The ATE value. + @param dst [out] A buffer in which to return the Illustrator value. + */ + AIAPI AIErr ( *GetAIDashStyleArray ) ( ATE::ArrayRealRef srcArray, AIDashStyle* dstStyle ); + + // Illustrator paint types -> ATE paint types + // ------------------------------------------------------------------------- + + /** Converts an \c AIColor to an ATE \c ApplicationPaintRef. +
\b Example: + @code +// ApplicationPaintRef is NULL (an invalid reference). +ATE::ApplicationPaintRef pPaint = NULL; + +// After this call, pPaint is a valid reference +sAIATEPaintSuite->CreateATEApplicationPaint(&srcAIColor, &pPaint); + +// Use the C++ wrapper to avoid ref counting. +IApplicationPaint paint(pPaint); + ... + @endcode + @param src The Illustrator value. + @param dst [out] A buffer in which to return the ATE value. + + */ + AIAPI AIErr ( *CreateATEApplicationPaint ) ( const AIColor* src, ATE::ApplicationPaintRef* dst ); + + /** Converts an \c AILineCap to an ATE \c LineCapType. + @param src The Illustrator value. + @param dst [out] A buffer in which to return the ATE value. + */ + AIAPI AIErr ( *GetATELineCap ) ( AILineCap src, ATE::LineCapType* dst ); + + /** Converts an \c AILineJoin to ATE \c LineJoinType. + See example for \c #CreateATEApplicationPaint(). + @param src The Illustrator value. + @param dst [out] A buffer in which to return the ATE value. + */ + AIAPI AIErr ( *GetATELineJoin ) ( AILineJoin src, ATE::LineJoinType* dst ); + + /** Converts an array contained in an \c AIDashStyle to an ATE \c ArrayReal. + See example for \c #CreateATEApplicationPaint(). + @param src The Illustrator value. + @param dst [out] A buffer in which to return the ATE value. + */ + AIAPI AIErr ( *CreateATELineDashArray ) ( const AIDashStyle* srcStyle, ATE::ArrayRealRef* dst ); + + // Convenience Methods + // ------------------------------------------------------------------------- + + /** Sets fields in a path style and path style map by extracting + corresponding data contained in an ATE character feature set. + @param src The ATE character feature set. + @param pDstPathStyle [out] A buffer in which to return the Illustrator path style. + @param pDstPathStyleMap [out] A buffer in which to return the Illustrator path style map. + */ + AIAPI AIErr ( *GetAIPathStyleAndMap ) ( ATE::CharFeaturesRef src, AIPathStyle* pDstPathStyle, AIPathStyleMap* pDstPathStyleMap ); + + /** Set fields in an ATE character feature set by extracting the + corresponding data in a path style and path style map. + @param srcPathStyle A pointer to the Illustrator path style. + @param srcPathStyleMap A pointer to the Illustrator path style map. + @param dst [out] A structure in which to return the new ATE character feature set. + */ + AIAPI AIErr ( *GetCharFeatures ) ( const AIPathStyle* pSrcPathStyle, const AIPathStyleMap* pSrcPathStyleMap, ATE::CharFeaturesRef dst ); + + // Transparency Methods + // ------------------------------------------------------------------------- + + /** Extracts blend (transparency) information from an ATE character feature set + and adds it to an Illustrator dictionary. + @param pSrc The source ATE character feature set. + @param pDst [out] The dictionary to modify. If the source contains no blend information, + the dictionary is not modified. + @see \c #AIBlendStyleSuite::GetArtAttrs() for a description of the dictionary entries. + */ + AIAPI AIErr ( *GetTransparencyAttrs ) ( ATE::CharFeaturesRef pSrc, AIDictionaryRef pDst ); + + /** Sets the blend (transparency) attributes in an ATE character feature set + based on the blend values in an Illustrator dictionary. + All blend attribute in the dictionary must be known. If any are unknown, + all blend information for \c pDst is cleared. + @param pSrc The source dictionary. + @param pDst [out] The ATE character feature set to modify. + @see \c #AIBlendStyleSuite::GetArtAttrs() for a description of the dictionary entries. + */ + AIAPI AIErr ( *SetTransparencyAttrs ) ( AIDictionaryRef pSrc, ATE::CharFeaturesRef pDst ); + +} AIATEPaintSuite; + +#include "AIHeaderEnd.h" + +#endif // __AIATEPAINT__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATETextUtil.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATETextUtil.h index c53100a..df61a4f 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATETextUtil.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIATETextUtil.h @@ -1,241 +1,241 @@ -#ifndef __ATETextUtil__ -#define __ATETextUtil__ - -/* - * Name: AIATETextUtil.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Text Frame Object Suite. - * - * REQUIREMENT: This won't compile without a C++ compiler! - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __ATESuites__ -#include "ATESuites.h" -#endif - -#ifndef __AIDocument__ -#include "AIDocument.h" -#endif - -#ifndef __AIFont__ -#include "AIFont.h" -#endif - -#ifndef __SPFiles__ -#include "SPFiles.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIATETextUtil.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIATETextUtilSuite "AI ATE Text Util Suite" -#define kAIATETextUtilSuiteVersion4 AIAPI_VERSION(4) -#define kAIATETextUtilSuiteVersion kAIATETextUtilSuiteVersion4 -#define kAIATETextUtilVersion kAIATETextUtilSuiteVersion - - -/** @ingroup Notifiers - Font changed in current document. See \c #AIATETextUtilSuite */ -#define kAICurrentFontChangedNotifier "AI Current Font Changed Notifier" -/** @ingroup Notifiers - Font size changed in current document. See \c #AIATETextUtilSuite */ -#define kAICurrentFontSizeChangedNotifier "AI Current Font Size Changed Notifier" -/** @ingroup Notifiers - List of available fonts changed. See \c #AIATETextUtilSuite */ -#define kAIFontListChangedNotifier "AI Font List Changed Notifier" -/** @ingroup Notifiers - Sent when ATE document resources, such as named style, have changed.*/ -#define kATEDocumentResourceChangedNotifier "AI ATE Document Resource Changed Notifier" - - -/** @ingroup Errors - Returned from \c #AIATETextUtilSuite::GetBoundsFromTextRange() if the range is - hidden due to smaller frame size (overset). -*/ -#define kAIATEInvalidBounds 'INVB' - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - It provides utilities for working with text. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIATETextUtilSuite and \c #kAIATETextUtilVersion. - */ -struct AIATETextUtilSuite { - /** Retrieves the bounds of a text range. - @param tr The text range. - @param bounds [out] A buffer in which to return the bounding box. - @return The error \c #kAIATEInvalidBounds if the text range is hidden - due to smaller frame size. */ - AIAPI AIErr (*GetBoundsFromTextRange)( ATE::TextRangeRef tr, AIRealRect* bounds ); - - /** Retrieves application global resources related to text. - @param result [out] A buffer in which to return the resource values. - Access the font resources in this opaque structure using - the \c #ATE::IApplicationTextResources wrapper. - @see IText.h - */ - AIAPI AIErr (*GetApplicationTextResources)( ATE::ApplicationTextResourcesRef *result ); - - /** Retrieves per-document global resources related to text. - @param pResources [out] A buffer in which to return the resource values. - Access the font resources in this opaque structure using - the \c #ATE::ITextResources wrapper. - @see IText.h - */ - AIAPI AIErr (*GetTextResourcesFromDocument)( AIDocumentHandle pDocument, ATE::TextResourcesRef* pResources ); - - /** Retrieves the composite font from a composite font file. - @param filePath The file. - @param compFont [out] A buffer in which to return the composite font. - Access the contents of this opaque structure using - the \c #ATE::ICompFont wrapper. - @see IText.h - */ - AIAPI AIErr (*GetCompositeFont)( const ai::FilePath&, ATE::CompFontRef * compFont ); - - /** Creates or replaces a composite font file, writing the information from a specified - composite font. - @param filePath The file path. - @param compFont The composite font. - */ - AIAPI AIErr (*WriteCompositeFont)( const ai::FilePath&, const ATE::CompFontRef compFontRef); - - /** Retrieves the Kinsoku order information from a Kinsoku file. - @param filePath The file. - @param kinsokuRef [out] A buffer in which to return the Kinsoku information. - Access the contents of this opaque structure using - the \c #ATE::IKinsoku wrapper. - @see IText.h - */ - AIAPI AIErr (*GetKinsokuFile)( const ai::FilePath&, ATE::KinsokuRef *kinsokuRef ); - - /** Creates or replaces a Kinsoku file, writing the information from a specified - Kinsoku reference. - @param filePath The file. - @param kinsokuRef The new Kinsoku information. - */ - AIAPI AIErr (*WriteKinsokuFile)( const ai::FilePath&, const ATE::KinsokuRef kinsokuRef ); - - /** Retrieves the MojiKumi information from a MojiKumi file. - @param filePath The file. - @param mojikumiRef [out] A buffer in which to return the MojiKumi information. - Access the contents of this opaque structure using - the \c #ATE::IMojiKumi wrapper. - @see IText.h - */ - AIAPI AIErr (*GetMojiKumiFile) ( const ai::FilePath&, ATE::MojiKumiRef *mojikumeRef ); - - /** Creates or replaces a MojiKumi file, writing the information from a specified - MojiKumi reference. - @param filePath The file. - @param mojikumiRef The new MojiKumi information. - */ - AIAPI AIErr (*WriteMojiKumiFile)( const ai::FilePath&, const ATE::MojiKumiRef mojikumeRef); - - /** Internal. Updates the Kinsoku information shown for an entry in the Paragraph palette. - */ - AIAPI AIErr (*UpdateParagraphPaletteKinsoku) (ai::int32 index); - - /** Internal. Updates the MojuKumi information shown for an entry in the Paragraph palette. - */ - AIAPI AIErr (*UpdateParagraphPaletteMojiKumi)(ai::int32 index); - - /** Retrieves the spell-check dictionary for file. - @param filePath The file. - @param pDst [out] A buffer in which to return the spell-check information. - */ - AIAPI AIErr (*GetSpellFile)( const ai::FilePath& pSrcFileSpec, ATE::SpellRef* pDst ); - - /** Changes the font of the currently selected text object or objects. - @param theFont The new font. - */ - AIAPI AIErr (*SetCurrentFont)(AIFontKey theFont); - - /** Retrieves the font of the currently selected text object or objects. - @param theFont [out] A buffer in which to return the font, or \c NULL if - more than one font is used. - */ - AIAPI AIErr (*GetCurrentFont)(AIFontKey *result); - - /** Changes the font size of the currently selected text object or objects. - @param theFont The new size, in points. - */ - AIAPI AIErr (*SetCurrentFontSize)(AIReal theFontSize); - - /** Retrieves the font size of the currently selected text object or objects. - @param theFont [out] A buffer in which to return the font size, in points, - or \c NULL if more than one font size is used. - */ - AIAPI AIErr (*GetCurrentFontSize)(AIReal *result); - - - // These should be in ATE::IGlyphRun. - /** Retrieves an array of points representing the visual, flattened, representation - of the underline for a glyph run. These points represent a polygon, not a bezier. - It is always closed, although the last point is not equal to the first one. - The coordinate are hard, use \c #AIHardSoftSuite to convert them into - soft coordinates before working with them. - @param gr The glyph run. - @param pPoints [out] A buffer in which to return the array of points. - */ - AIAPI AIErr (*GetUnderlinePoints)(const ATE::GlyphRunRef gr , ATE::ArrayRealPointRef* pPoints); - - /** Retrieves an array of points representing the visual, flattened, representation - of the strikethrough for a glyph run.These points represent a polygon, not a bezier. - It is always closed, although the last point is not equal to the first one. - The coordinate are hard, use \c #AIHardSoftSuite to convert them into - soft coordinates before working with them. - @param gr The glyph run. - @param pPoints [out] A buffer in which to return the array of points. - */ - AIAPI AIErr (*GetStrikethroughPoints)(const ATE::GlyphRunRef gr , ATE::ArrayRealPointRef* pPoints); -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __ATETextUtil__ +#define __ATETextUtil__ + +/* + * Name: AIATETextUtil.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Text Frame Object Suite. + * + * REQUIREMENT: This won't compile without a C++ compiler! + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __ATESuites__ +#include "ATESuites.h" +#endif + +#ifndef __AIDocument__ +#include "AIDocument.h" +#endif + +#ifndef __AIFont__ +#include "AIFont.h" +#endif + +#ifndef __SPFiles__ +#include "SPFiles.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIATETextUtil.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIATETextUtilSuite "AI ATE Text Util Suite" +#define kAIATETextUtilSuiteVersion4 AIAPI_VERSION(4) +#define kAIATETextUtilSuiteVersion kAIATETextUtilSuiteVersion4 +#define kAIATETextUtilVersion kAIATETextUtilSuiteVersion + + +/** @ingroup Notifiers + Font changed in current document. See \c #AIATETextUtilSuite */ +#define kAICurrentFontChangedNotifier "AI Current Font Changed Notifier" +/** @ingroup Notifiers + Font size changed in current document. See \c #AIATETextUtilSuite */ +#define kAICurrentFontSizeChangedNotifier "AI Current Font Size Changed Notifier" +/** @ingroup Notifiers + List of available fonts changed. See \c #AIATETextUtilSuite */ +#define kAIFontListChangedNotifier "AI Font List Changed Notifier" +/** @ingroup Notifiers + Sent when ATE document resources, such as named style, have changed.*/ +#define kATEDocumentResourceChangedNotifier "AI ATE Document Resource Changed Notifier" + + +/** @ingroup Errors + Returned from \c #AIATETextUtilSuite::GetBoundsFromTextRange() if the range is + hidden due to smaller frame size (overset). +*/ +#define kAIATEInvalidBounds 'INVB' + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + It provides utilities for working with text. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIATETextUtilSuite and \c #kAIATETextUtilVersion. + */ +struct AIATETextUtilSuite { + /** Retrieves the bounds of a text range. + @param tr The text range. + @param bounds [out] A buffer in which to return the bounding box. + @return The error \c #kAIATEInvalidBounds if the text range is hidden + due to smaller frame size. */ + AIAPI AIErr (*GetBoundsFromTextRange)( ATE::TextRangeRef tr, AIRealRect* bounds ); + + /** Retrieves application global resources related to text. + @param result [out] A buffer in which to return the resource values. + Access the font resources in this opaque structure using + the \c #ATE::IApplicationTextResources wrapper. + @see IText.h + */ + AIAPI AIErr (*GetApplicationTextResources)( ATE::ApplicationTextResourcesRef *result ); + + /** Retrieves per-document global resources related to text. + @param pResources [out] A buffer in which to return the resource values. + Access the font resources in this opaque structure using + the \c #ATE::ITextResources wrapper. + @see IText.h + */ + AIAPI AIErr (*GetTextResourcesFromDocument)( AIDocumentHandle pDocument, ATE::TextResourcesRef* pResources ); + + /** Retrieves the composite font from a composite font file. + @param filePath The file. + @param compFont [out] A buffer in which to return the composite font. + Access the contents of this opaque structure using + the \c #ATE::ICompFont wrapper. + @see IText.h + */ + AIAPI AIErr (*GetCompositeFont)( const ai::FilePath&, ATE::CompFontRef * compFont ); + + /** Creates or replaces a composite font file, writing the information from a specified + composite font. + @param filePath The file path. + @param compFont The composite font. + */ + AIAPI AIErr (*WriteCompositeFont)( const ai::FilePath&, const ATE::CompFontRef compFontRef); + + /** Retrieves the Kinsoku order information from a Kinsoku file. + @param filePath The file. + @param kinsokuRef [out] A buffer in which to return the Kinsoku information. + Access the contents of this opaque structure using + the \c #ATE::IKinsoku wrapper. + @see IText.h + */ + AIAPI AIErr (*GetKinsokuFile)( const ai::FilePath&, ATE::KinsokuRef *kinsokuRef ); + + /** Creates or replaces a Kinsoku file, writing the information from a specified + Kinsoku reference. + @param filePath The file. + @param kinsokuRef The new Kinsoku information. + */ + AIAPI AIErr (*WriteKinsokuFile)( const ai::FilePath&, const ATE::KinsokuRef kinsokuRef ); + + /** Retrieves the MojiKumi information from a MojiKumi file. + @param filePath The file. + @param mojikumiRef [out] A buffer in which to return the MojiKumi information. + Access the contents of this opaque structure using + the \c #ATE::IMojiKumi wrapper. + @see IText.h + */ + AIAPI AIErr (*GetMojiKumiFile) ( const ai::FilePath&, ATE::MojiKumiRef *mojikumeRef ); + + /** Creates or replaces a MojiKumi file, writing the information from a specified + MojiKumi reference. + @param filePath The file. + @param mojikumiRef The new MojiKumi information. + */ + AIAPI AIErr (*WriteMojiKumiFile)( const ai::FilePath&, const ATE::MojiKumiRef mojikumeRef); + + /** Internal. Updates the Kinsoku information shown for an entry in the Paragraph palette. + */ + AIAPI AIErr (*UpdateParagraphPaletteKinsoku) (ai::int32 index); + + /** Internal. Updates the MojuKumi information shown for an entry in the Paragraph palette. + */ + AIAPI AIErr (*UpdateParagraphPaletteMojiKumi)(ai::int32 index); + + /** Retrieves the spell-check dictionary for file. + @param filePath The file. + @param pDst [out] A buffer in which to return the spell-check information. + */ + AIAPI AIErr (*GetSpellFile)( const ai::FilePath& pSrcFileSpec, ATE::SpellRef* pDst ); + + /** Changes the font of the currently selected text object or objects. + @param theFont The new font. + */ + AIAPI AIErr (*SetCurrentFont)(AIFontKey theFont); + + /** Retrieves the font of the currently selected text object or objects. + @param theFont [out] A buffer in which to return the font, or \c NULL if + more than one font is used. + */ + AIAPI AIErr (*GetCurrentFont)(AIFontKey *result); + + /** Changes the font size of the currently selected text object or objects. + @param theFont The new size, in points. + */ + AIAPI AIErr (*SetCurrentFontSize)(AIReal theFontSize); + + /** Retrieves the font size of the currently selected text object or objects. + @param theFont [out] A buffer in which to return the font size, in points, + or \c NULL if more than one font size is used. + */ + AIAPI AIErr (*GetCurrentFontSize)(AIReal *result); + + + // These should be in ATE::IGlyphRun. + /** Retrieves an array of points representing the visual, flattened, representation + of the underline for a glyph run. These points represent a polygon, not a bezier. + It is always closed, although the last point is not equal to the first one. + The coordinate are hard, use \c #AIHardSoftSuite to convert them into + soft coordinates before working with them. + @param gr The glyph run. + @param pPoints [out] A buffer in which to return the array of points. + */ + AIAPI AIErr (*GetUnderlinePoints)(const ATE::GlyphRunRef gr , ATE::ArrayRealPointRef* pPoints); + + /** Retrieves an array of points representing the visual, flattened, representation + of the strikethrough for a glyph run.These points represent a polygon, not a bezier. + It is always closed, although the last point is not equal to the first one. + The coordinate are hard, use \c #AIHardSoftSuite to convert them into + soft coordinates before working with them. + @param gr The glyph run. + @param pPoints [out] A buffer in which to return the array of points. + */ + AIAPI AIErr (*GetStrikethroughPoints)(const ATE::GlyphRunRef gr , ATE::ArrayRealPointRef* pPoints); +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIActionManager.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIActionManager.h index a4e27ad..c258bb9 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIActionManager.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIActionManager.h @@ -1,784 +1,785 @@ -#ifndef __AIActionManager_h__ -#define __AIActionManager_h__ - -/* - * Name: AIActionManager.h - * $Revision: 22 $ - * Author: Grace Ge - * Date: 10/14/97 - * Purpose: AI Action Manager Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "AITypes.h" -#include "SPPlugs.h" -#include "AIUnicodeString.h" - -#include "AIHeaderBegin.h" - -/** @file AIActionManager.h */ - -/* - * Constants - */ - -#define kAIActionManagerSuite "AI Action Manager Suite" -#define kAIActionManagerSuiteVersion5 AIAPI_VERSION(5) -#define kAIActionManagerSuiteVersion kAIActionManagerSuiteVersion5 -#define kAIActionManagerVersion kAIActionManagerSuiteVersion - -/** @ingroup Notifiers - Sent when an action event has completed execution. - */ -#define kAIActionManagerPlayActionEventDoneNotifier "AI Action Manager PlayActionEvent Done Notifier" -#define kAIActionActualExecutionFinishedNotifier "AI Action Actual Execution Finished Notifier" -/* - * Types - */ - -/** Identifies the data type of an action parameter. */ -typedef ai::uint32 ActionParamTypeID; - -/** Allowed values for \c ::ActionParamTypeID */ -enum { - /** integer */ - actionTypeInteger = 'long', - /** real number */ - actionTypeReal = 'real', - /** boolean */ - actionTypeBoolean = 'bool', - /** enumeration */ - actionTypeEnum = 'enum', - /** string */ - actionTypeString = 'strn', - /** real number with associated unit */ - actionTypeUnitReal ='utrl', - /** user-defined data */ - actionTypeRawData = 'rwdt', - /** null */ - actionTypeNull = 'null' -}; - -/** Identifies units for some numeric parameters. Units are shown when type is \c actionTypeUnitReal. - */ -typedef ai::uint32 ActionParamUnitID; - -#ifndef unitNone -/** Allowed values for \c ::ActionParamUnitID */ -enum { - // The Photoshop APIs also define these constants. If a plug-in includes both - // the Photoshop APIs and the Illustrator APIs then there would be compilation - // problems. We let the Photoshop definitions win. - - /** unit value - coerced */ - unitNone = '#Nne', - /** unit value - base 72ppi */ - unitDistance = '#Rlt', - /** unit value - base degrees */ - unitAngle = '#Ang', - /** unit value - base per inch */ - unitDensity = '#Rsl', - /** tagged unit value, document points */ - unitPoints = '#Pxl', - /** tagged unit value, percentage */ - unitPercent = '#Prc' - -}; -#endif - -/** Identifies a unique key associated with a parameter block */ -typedef ai::uint32 ActionParamKeyID; - -/** A reference to a Type Parameter Block (TPB) */ -typedef struct ActionParamType *AIActionParamTypeRef; - -/** A reference to a Value Parameter Block (VPB) */ -typedef struct ActionParamValue *AIActionParamValueRef; - -/** User-defined data. This is cast after it has been defined. */ -typedef void *AIActionUserData; - -/** Callback procedure prototype. */ -typedef ASErr (*AIActionCallbackProc)(AIActionParamValueRef parameter, - AIActionUserData userData, - AIBoolean showDialog); - -/** Idle procedure prototype. */ -typedef void (*AIActionIdleProc)(void); - -/** Choices for whether a parameters dialog appears by default when an action is played back. - This status is visually represented by a dialog icon to the left of the - event name in the Actions palette. */ -typedef enum _ActionDialogStatus -{ /** No dialog is defined for this action */ - kDialogNone, - /** Dialog appears on playback */ - kDialogOn, - /** Internal, not used by 3rd-party plug-ins */ - kDialogPartialOn, - /** Dialog does not appear on playback */ - kDialogOff -} ActionDialogStatus; - -/** Values that control whether values are shown in the Actions palette. */ -typedef enum _ActionValueVisibility -{ /** shown or hidden according to parameter data type */ - kDependOnParamType = -1, - /** hidden */ - kHideInPalette, - /** shown */ - kShowInPalette -} ActionValueVisibility; - - -/** @ingroup Callers - Caller id for messages sent to plug-ins from the action manager. See \c #AIActionManagerSuite. */ -#define kActionCaller "Action Manager" -/** @ingroup Selectors - Message selector sent when requesting a plug-in to play an action. In this case - the message is a \c ::DoActionMessage. */ -#define kDoActionSelector "Do Action" - -/** A plug-in receives this message with the request to execute an action. The - message caller is \c ::kActionCaller and the selector is \c ::kDoActionSelector. */ -typedef struct -{ - /** Message data */ - SPMessageData d; - /** Plug-in defined data */ - AIActionUserData userData; - /** When true, the plug-in should show the parameters dialog. */ - AIBoolean showDialog; - /** VPB containing parameter values previously recorded or set by another plug-in. */ - AIActionParamValueRef param; -} DoActionMessage; - - -/** @ingroup Suites - - The Action Manager suite allows you to access the internal scripting system built into - Adobe Illustrator. The Action Manager allows you to record and play actions which - execute Illustrator menu commands or plug-in commands. The Action Manager suite allows - your plug-in to play actions or register itself to the Illustrator application to enable - your plug-in to be scriptable via the Actions palette. - - An action event is an execution of an Illustrator command. An action event - can originate from the Illustrator application or a plug-in. It is normally, but - not limited to, an evaluation or modification to Illustrator artwork. Adobe - Illustrator’s Action Manager dispatches action events. - - In order for your plug-in’s action events to be recorded or played back you - must register them with the Action Manager and specify the parameters - associated with your action event. In addition to registering you actions, - your plug-in must respond to the Action Manager when it tells you to play - your plug-in’s action event. - - The Action Manager suite is exported by a plug-in. It may be disabled by removing - the Action Manager plug-in. Because of this, during startup you must always check for - the presence of the AIActionManager suite pointer before calling any Action Manager - functions. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIActionManagerSuite and \c #kAIActionManagerVersion. - */ - -struct AIActionManagerSuite -{ - /** This function registers a plug-in’s action event with the Adobe Illustrator application. - Call it during the startup procedure of your plug-in. This is necessary for your plug-in event - to be recognized by the Actions palette. It is the first step in making your plug-in into an action. - - The Action Manager suite is exported by a plug-in. It may be disabled by removing the Action Manager plug-in. - Because of this, during startup you must always check for the presence of the AIActionManager suite pointer - before calling any Action Manager functions. - - If your plug-in registers an action event at startup, you are responsible for recording your action event - and any associated parameters whenever the user is in Record mode.See \c #InRecordMode() and \c #RecordActionEvent(). - - @param eventName A string that identifies your plug-in event internally; not localized. - Must be unique among plug-ins. Typically the name of your plug-in, preceded by your - company name; for example, "adobe_saveDocumentAs". - - @param localizedName A string that is shown in the Adobe Illustrator Actions palette; - will be localized. - - @param callback Not used, pass a \c null value. - - @param plugin The plug-in registering the event (usually message.d->self). - - @param userData A pointer to private data associated with the action event. - Must be allocated by your plug-in (using \c SPBlocks.h) at startup. - This is passed back to your code in \c GetActionEventUserData and in the \c DoActionMessage. - - @param parameters A reference to a type parameter block (TPB). - A TPB contains keys that describe the parameter block of your plug-in. - To provide this value: - \li Create an \c AIActionParamTypeRef using \c #AINewActionParamType(). - \li Fill it with keys that describe your parameter block using \c #AIActionSetTypeKey(). - \li Pass it to this function. - \li Destroy it using \c #AIDeleteActionParamType(). */ - ASErr ASAPI (*RegisterActionEvent)(const char *eventName, const char *localizedName, - ai::int32 version, ai::int32 flag, - AIActionCallbackProc callback, - SPPluginRef plugin, - AIActionUserData userData, - AIActionParamTypeRef parameters); - - - /** Reports whether a plug-in has been registered as an action event. - (Note that this function returns a boolean value, not an error code.) - - @param eventName The name with which the action was registered. - @return True if the action was registered, false otherwise. - @see \c #RegisterActionEvent() - */ - AIBoolean ASAPI (*IsActionEventRegistered)(const char *eventName); - - /** Gets the localized name associated with a registered action event - (the string that appears in the Actions palette). - - @param eventName [in] The name with which the action was registered. - @param localizedName [out] A character buffer in which to return the localized name. - @see \c #RegisterActionEvent() - */ - ASErr ASAPI (*GetActionEventLocalizedName)(const char *eventName, char *localizedName); - /** Gets the version number associated with a registered action event. - - @param eventName [in] The name with which the action was registered. - @param version [out] A buffer in which to return the version number. - @see \c #RegisterActionEvent() - */ - ASErr ASAPI (*GetActionEventVersion)(const char *eventName, ai::int32 *version); - /** Currently unused */ - ASErr ASAPI (*GetActionEventFlag)(const char *eventName, ai::int32 *flag); - /** Gets the callback procedure associated with a registered action event. - - @param eventName [in] The name with which the action was registered. - @param version [out] A buffer in which to return the callback procedure. - @see \c #RegisterActionEvent() - */ - ASErr ASAPI (*GetActionEventCallbackProc)(const char *eventName, AIActionCallbackProc *callback); - /** Gets the plug-in associated with a registered action event--that is, the plug-in that executes the event. - - @param eventName [in] The name with which the action was registered. - @param version [out] A buffer in which to return the plug-in reference.. - @see \c #RegisterActionEvent() - */ - ASErr ASAPI (*GetActionEventPluginRef)(const char *eventName, SPPluginRef *pluginRef); - /** Gets the user data associated with a registered action event. - - @param eventName [in] The name with which the action was registered. - @param version [out] A buffer in which to return the user data. - @see \c #RegisterActionEvent() - */ - ASErr ASAPI (*GetActionEventUserData)(const char *eventName, AIActionUserData *userData); - /** Sets the user data associated with a registered action event. - - @param eventName [in] The name with which the action was registered. - @param version [in] The new user data, in the structure allocated at registration. - @see \c #RegisterActionEvent() - */ - ASErr ASAPI (*SetActionEventUserData)(const char *eventName, AIActionUserData userData); - /** Gets the type parameter block (TPB) associated with a registered action event. - - @param eventName [in] The name with which the action was registered. - @param version [out] A buffer in which to return the TPB. - @see \c #RegisterActionEvent() - */ - ASErr ASAPI (*GetActionEventParamType)(const char *eventName, AIActionParamTypeRef *param); - - /** Calls the action idle procedure, as set by \c #SetActionIdleProc(). */ - ASErr ASAPI (*Idle)(void); - /** Specifies the action idle procedure for this action. - - @param idleProc The procedure to call when the action is idle. - Define the function using this prototype:
- typedef void AIActionIdleProc (void); - */ - ASErr ASAPI (*SetActionIdleProc)(AIActionIdleProc idleProc); - /** Gets the current idle procedure for this action. - - @param idleProc [out] A buffer in which to return the procedure. - */ - ASErr ASAPI (*GetActionIdleProc)(AIActionIdleProc *idleProc); - - /** Creates a type parameter block (TPB) for an action, which describes the data types - of your plug-in’s parameters. - - In order to register as an action event, your plug-in must create an \c AIActionParamTypeRef - using this function, then fill it with keys that describe your parameter block - using \c #AIActionSetTypeKey(). - Pass the filled TPB to \c #RegisterActionEvent() when registering the event. - Destroy it after registration, using \c #AIDeleteActionParamType(). - You do not need to keep your reference; Illustrator keeps a copy of it, - and you can retrieve it using \c #GetActionEventParamType(). - - The TPB does not contain actual values, just type descriptors. - The keys that you add to the parameter block represent data types, - typically for information that is gathered when your plug-in presents - a modal dialog to the user. The values are kept in a value parameter block - (VPB), created with \c #AINewActionParamValue(). - - @param param [out] A buffer in which to return the new type parameter block (TPB). - */ - ASErr ASAPI (*AINewActionParamType)(AIActionParamTypeRef *param); - /** Deletes a type parameter block (TPB). You do not need to keep your reference; - Illustrator keeps a copy of it, and you can retrieve it using \c #GetActionEventParamType(). - - @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType(). - @see \c #AIActionSetTypeKey(), \c #RegisterActionEvent() - */ - ASErr ASAPI (*AIDeleteActionParamType)(AIActionParamTypeRef param); - - /** Retrieves a type key from a type parameter block (TPB). - - The returned key is, by convention, a 4-character long value that describes - the parameter. For example, in the Tutorial the keys for the "corner" and "size" - parameters are ’crnr’ and ’size’. The key for the parameter type in the TPB matches - the key for its value in the VPB: see \c #AIActionGetValueKey(). - - \li To check that the TPB contains a specific key, use \c #AIActionHasTypeKey(). - \li To iterate through all of the keys, get the number of keys with \c #AIActionGetTypeCount(). - \li To set a key type, use \c #AIActionSetTypeKey(). - - @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() - and returned by \c #GetActionEventParamType(). - @param index [in] The position index of the desired parameter type key. - @param key [out] A buffer in which to return the type key. - */ - ASErr ASAPI (*AIActionGetTypeKey)(AIActionParamTypeRef param, ai::uint32 index, ActionParamKeyID *key); - - /** Determines whether a value parameter block (VPB) contains a particular key. - - @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() - and returned by \c #GetActionEventParamType(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param hasKey [out] A buffer in which to return the result, true if the key is contained in the VPB, - false otherwise. - */ - ASErr ASAPI (*AIActionHasTypeKey)(AIActionParamTypeRef param, ActionParamKeyID key, AIBoolean *hasKey); - - /** Retrieves the number of keys in a type parameter block (TPB). - Use with \c #AIActionGetTypeKey() to iterate through keys. - - @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() - and returned by \c #GetActionEventParamType(). - @param count [out] A buffer in which to return the number of keys. - */ - ASErr ASAPI (*AIActionGetTypeCount)(AIActionParamTypeRef param, ai::uint32 *count); - - /** Associates a type key with a type parameter block (TPB). Creates a new key, or sets - values for an existing key. - - @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() - and returned by \c #GetActionEventParamType(). - @param key [in] The parameter type key, by convention a 4-character \c long value that - describes the parameter. For example, in the Tutorial the keys for the - "corner" and "size" parameters are ’crnr’ and ’size’. See also \c #AIActionGetTypeKey(). - @param name [in] The localizable name of the parameter, which appears in the Actions palette. - @param type [in] The data type of the key. An \c ::ActionParamTypeID value. - @param show [in] When true, the parameter is shown in the Actions palette. - - */ - ASErr ASAPI (*AIActionSetTypeKey)(AIActionParamTypeRef param, ActionParamKeyID key, const char* name, ActionParamTypeID type, AIBoolean show); - - /** Retrieves the display name of an event parameter. - - @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() - and returned by \c #GetActionEventParamType(). - @param key [in] The parameter type key, a 4-character \c long, See \c #AIActionGetTypeKey(). - @param value [out] A buffer in which to return the localizable name of the parameter, - which appears in the Actions palette. See \c #AIActionSetTypeKey(). - */ - ASErr ASAPI (*AIActionGetName)(AIActionParamTypeRef param, ActionParamKeyID key, char* value); - - /** Retrieves the data type of an event parameter. - - @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() - and returned by \c #GetActionEventParamType(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetTypeKey(). - @param value [out] A buffer in which to return the data type of the key. An \c ::ActionParamTypeID value. - */ - ASErr ASAPI (*AIActionGetType)(AIActionParamTypeRef param, ActionParamKeyID key, ActionParamTypeID* value); - - /** Reports whether a specific event parameter is displayed in the Actions palette. - (Note that the function returns a boolean value, not an error code.) - - @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() - and returned by \c #GetActionEventParamType(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetTypeKey(). - @return True if the show flag is on, false otherwise. - */ - AIBoolean ASAPI (*AIActionTypeIsShow)(AIActionParamTypeRef param, ActionParamKeyID key); - - /** Not used for third-party plug-ins */ - ASErr ASAPI (*AcquirePalette)(void); - /** Not used for third-party plug-ins */ - ASErr ASAPI (*ReleasePalette)(void); - - /** Records your plug-in’s action event and displays it in the Actions palette - with its parameter list. - - You should call this only when you have determined that the user is in Record mode, - by calling \c #InRecordMode(). You must create the VPB and set its values, - use it to record the action, then destroy the VPB. For example:
- @code -// If in record mode, record the event -if (sAIActionManager && sAIActionManager->InRecordMode()) { -// create a VPB using AINewActionParamValue() -// load the VPB with values, according to the parameter types -// record the action event using RecordActionEvent() -// delete the VPB using AIDeleteActionParamValue() -} - @endcode - - @param eventName The name with which the action was registered. See \c #RegisterActionEvent(). - @param dialogStatus Whether a dialog appears by default when the action is played back. - This status is visually represented by a dialog icon to the left of the - event name in the Actions palette. - @param parameters The event’s value parameter block (VPB), as created by - \c #AINewActionParamValue(). This structure contains the parameter values that - were used during the action event. Typically, these are the values entered by - the user in the parameter dialog box. If your action event does not have parameters, - pass \c null. - */ - ASErr ASAPI (*RecordActionEvent)(const char *eventName, ActionDialogStatus dialogStatus, AIActionParamValueRef parameters); - - /** Plays back a recorded action event. - - You can use this to play back any registered action event, not just the one for - this plug-in. The event names and their parameter types are documented in \c actions folder - in the SDK installation. - - For example, the following executes copy, new document, and paste action events: - @code -sAIActionManager->PlayActionEvent("adobe_copy", kDialogNone, NULL); -sAIActionManager->PlayActionEvent("adobe_newDocument", kDialogNone, NULL); -sAIActionManager->PlayActionEvent("adobe_paste", kDialogNone, NULL); - @endcode - - @param eventName The name with which the action was registered. See \c #RegisterActionEvent(). - @param dialogStatus Whether a dialog appears by default when the action is played back. - This status is visually represented by a dialog icon to the left of the - event name in the Actions palette. See \c ::_ActionDialogStatus. - @param parameters The event’s value parameter block (VPB), as created by - \c #AINewActionParamValue(). This structure contains the parameter values that - were used during the action event. Typically, these are the values entered by - the user in the parameter dialog box. If your action event does not have parameters, - pass \c null. - */ - ASErr ASAPI (*PlayActionEvent)(const char *eventName, ActionDialogStatus dialogStatus, AIActionParamValueRef parameters); - - /** Reports whether the user is currently in Record mode. (Note that the function - returns a boolean value, not an error code.) - - When a new action is first created or whenever the record button is pressed in the - Actions palette, the user is in Record mode, and all actions are recorded into the - Actions palette. - - If your plug-in registers an action event at startup, you are responsible for - recording your action event and any associated parameters whenever the user is - in Record mode. See \c #RecordActionEvent(). - - This function is often used within a conditional statement during the normal - execution of a plug-in. For example: - @code -// If in record mode, record the event -if (sAIActionManager && sAIActionManager->InRecordMode()) { -// create a VPB -// load the VPB with values -// record the action event -// delete the VPB -} - @endcode - - @return True if the user is in record mode, false otherwise. - */ - AIBoolean ASAPI (*InRecordMode)(void); - - /** Not used for third-party plug-ins */ - AIBoolean ASAPI (*InInsertMenuItemState)(void); - - /** Not used for third-party plug-ins */ - ASErr ASAPI (*ActivateInsertMennuItemDialog)(void); - - /** Not used for third-party plug-ins */ - ASErr ASAPI (*SetCurrentCommandLocalizedName)(const char *localizedName); - - /** Not used for third-party plug-ins */ - ASErr ASAPI (*DoFunctionKey)(ai::int32 fkey, ai::uint32 modifier); - - /** Creates a value parameter block (VPB) structure. - - The VPB contains a set of event parameter values, whose types are determined - by the type parameter block (TPB) with which the event is registered. - See \c #RegisterActionEvent() and \c #AINewActionParamValue(). - - In order to record an action event, your plug-in must create an - #AIActionParamValueRef using this function, then fill it with key/value pairs - that contain values of the correct type, using the appropriate \c AIActionSetXx function. - For example, to set an integer value, use \c #AIActionSetInteger(). - - Pass the filled VPB to \c #RecordActionEvent() when recording the event. - Destroy it after recording, using \c #AIDeleteActionParamValue(). - You do not need to keep your reference; Illustrator keeps a copy of it, - and you can retrieve it using \c #AIActionGetValueKey(). - - @param param A buffer in which to return the new value parameter block (VPB). - */ - ASErr ASAPI (*AINewActionParamValue)(AIActionParamValueRef *param); - - /** Deletes a value parameter block (VPB). You do not need to keep your reference - after recording or playing back an action with its parameter value set. - @param param The value parameter block (VPB) as returned by \c #AINewActionParamValue(). - @see \c #RecordActionEvent(), \c #PlayActionEvent() - */ - ASErr ASAPI (*AIDeleteActionParamValue)(AIActionParamValueRef param); - - /** Retrieves a value key from a value parameter block (VPB). - - The returned key is, by convention, a 4-character long value that describes - the parameter. For example, in the Tutorial the keys for the "corner" and "size" - parameters are ’crnr’ and ’size’. The key for the parameter value in the VPB - matches the key for its type in the TPB. See \c #AIActionGetTypeKey(). - - \li To check that the VPB contains a specific key, use \c #AIActionHasValueKey(). - \li To iterate through all of the keys, get the number of keys with - \c #AIActionGetValueCount(). - \li To extract or set the value for a specific key, use the accessor function appropriate - to its data type. For example, to get an integer value, use \c #AIActionGetInteger(), - and to set it, use \c #AIActionSetInteger(). - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param index [in] The position index of the desired parameter value key. - @param key [out] A buffer in which to return the value key. - */ - ASErr ASAPI (*AIActionGetValueKey)(AIActionParamValueRef param, ai::uint32 index, ActionParamKeyID *key); - - /** Determines whether a VPB contains a particular key. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param hasKey [out] A buffer in which to return the result, true if the key is contained in the VPB, - false otherwise. - */ - ASErr ASAPI (*AIActionHasValueKey)(AIActionParamValueRef param, ActionParamKeyID key, AIBoolean *hasKey); - - /** Retrieves the number of keys in a value parameter block (VPB). - Use with \c #AIActionGetValueKey() to iterate through keys - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param count [out] A buffer in which to return the number of keys. - */ - ASErr ASAPI (*AIActionGetValueCount)(AIActionParamValueRef param, ai::uint32 *count); - - /* Retrieves the data type of the value associated with a key. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [out] A buffer in which to return the data type. An \c ::ActionParamTypeID value. - */ - ASErr ASAPI (*AIActionGetValueType)(AIActionParamValueRef param, ActionParamKeyID key, ActionParamTypeID *type); - - /** Retrieves the integer value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [out] A buffer in which to return the value. - */ - ASErr ASAPI (*AIActionGetInteger)(AIActionParamValueRef param, ActionParamKeyID key, ai::int32* value); - /** Sets the integer value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [in] The new value. - */ - ASErr ASAPI (*AIActionSetInteger)(AIActionParamValueRef param, ActionParamKeyID key, ai::int32 value); - - /** Retrieves the \c real value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [out] A buffer in which to return the value. - */ - ASErr ASAPI (*AIActionGetReal)(AIActionParamValueRef param, ActionParamKeyID key, AIReal* value); - /** Sets the \c real value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [in] The new value. - */ - ASErr ASAPI (*AIActionSetReal)(AIActionParamValueRef param, ActionParamKeyID key, AIReal value); - - /** Retrieves the unit-real value associated with a particular key in a VPB. Unit-real values are - displayed in the Actions palette with unit labels. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [out] A buffer in which to return the value. - */ - ASErr ASAPI (*AIActionGetUnitReal)(AIActionParamValueRef param, ActionParamKeyID key, ActionParamUnitID* unit, AIReal* value); - /** Sets the unit-real value associated with a particular key in a VPB.Unit-real values are - displayed in the Actions palette with unit labels. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [in] The new value. - */ - ASErr ASAPI (*AIActionSetUnitReal)(AIActionParamValueRef param, ActionParamKeyID key, ActionParamUnitID unit, AIReal value); - - /** Retrieves the string value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [out] A buffer in which to return the value. - */ - ASErr ASAPI (*AIActionGetString)(AIActionParamValueRef param, ActionParamKeyID key, char* value); - /** Sets the string value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [in] The new value. - */ - ASErr ASAPI (*AIActionSetString)(AIActionParamValueRef param, ActionParamKeyID key, const char* value); - - /** Retrieves the boolean value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [out] A buffer in which to return the value. - */ - ASErr ASAPI (*AIActionGetBoolean)(AIActionParamValueRef param, ActionParamKeyID key, AIBoolean* value); - /** Sets the boolean value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [in] The new value. */ - ASErr ASAPI (*AIActionSetBoolean)(AIActionParamValueRef param, ActionParamKeyID key, ASBoolean value); - - /** Retrieves the enumerated value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param name [in] The name of the enumeration, as shown in the Actions palette. - @param value [out] A buffer in which to return the value. - */ - ASErr ASAPI (*AIActionGetEnumerated)(AIActionParamValueRef param, ActionParamKeyID key, char* name, ai::int32* value); - /** Sets the enumerated value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param name [in] The name of the enumeration, as shown in the Actions palette. - @param value [in] The new value. - */ - ASErr ASAPI (*AIActionSetEnumerated)(AIActionParamValueRef param, ActionParamKeyID key, const char* name, ai::int32 value); - - /** Sets the raw-data value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param size [in] The number of bytes in the new value. - @param value [in] The new value. You must allocate memory for the value. - */ - ASErr ASAPI (*AIActionSetRawDataBytes)(AIActionParamValueRef param, ActionParamKeyID key, ai::uint32 size, const char* value); - - /** Retrieves the size of a raw-data value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param size [out] A buffer in which to return the number of bytes in the value. - */ - ASErr ASAPI (*AIActionGetRawDataSize)(AIActionParamValueRef param, ActionParamKeyID key, ai::uint32* size); - /** Retrieves the raw-data value associated with a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [out] A buffer in which to return the value. You must allocate memory for the value, - using the size obtained with \c #AIActionGetRawDataSize(). - */ - ASErr ASAPI (*AIActionGetRawData)(AIActionParamValueRef param, ActionParamKeyID key, char* value); - - /** Retrieves the current visibility state of a particular key in a VPB.(Not that this function returns - a visibility value, not an error code.) - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @return The visibility state value; see \c ::ActionValueVisibility. - */ - ActionValueVisibility ASAPI (*AIActionValueGetVisibility)(AIActionParamValueRef param, ActionParamKeyID key); - - /** Sets the visibility state of a particular key in a VPB. - - @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). - @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). - @param value [in] The new value, see \c ::ActionValueVisibility. - */ - ASErr ASAPI (*AIActionValueSetVisibility)(AIActionParamValueRef param, ActionParamKeyID key, ActionValueVisibility value); - - /** Not used for third-party plug-ins */ - ASErr ASAPI (*UndoLastTransaction)(); - - /** Not used for third-party plug-ins */ - ASErr ASAPI (*RedoLastTransaction)(); - - /** Not used for third-party plug-ins */ - ASErr ASAPI (*IgnoreRecording)(AIBoolean ignore); - - - /** Registers an action using a Unicode name. - For details, see \c #RegisterActionEvent(). */ - - ASErr ASAPI (*RegisterActionEventUS)(const char *eventName, const ai::UnicodeString& localizedName, - ai::int32 version, ai::int32 flag, - AIActionCallbackProc callback, - SPPluginRef plugin, - AIActionUserData userData, - AIActionParamTypeRef parameters); - - /** Retrieves the localized name of an event as a Unicode string. - For details, see \c #GetActionEventLocalizedName(). */ - ASErr ASAPI (*GetActionEventLocalizedNameUS)(const char *eventName, ai::UnicodeString& localizedName); - - /** Associates a type key with a type parameter block (TPB), using Unicode strings. - For details, see \c #AIActionSetTypeKey(). */ - ASErr ASAPI (*AIActionSetTypeKeyUS)(AIActionParamTypeRef param, ActionParamKeyID key, const ai::UnicodeString& name, ActionParamTypeID type, AIBoolean show); - - /** Retrieves the identifying name of an event as a Unicode string. - For details, see \c #AIActionGetNameUS(). */ - ASErr ASAPI (*AIActionGetNameUS)(AIActionParamTypeRef param, ActionParamKeyID key, ai::UnicodeString& value); - - /** Sets the localized name of an event using a Unicode string. - For details, see \c #SetCurrentCommandLocalizedName(). */ - ASErr ASAPI (*SetCurrentCommandLocalizedNameUS)(const ai::UnicodeString& localizedName); - - /** Retrieves the string value associated with a particular key in a VPB, as a Unicode string. - For details, see \c #AIActionGetString(). */ - ASErr ASAPI (*AIActionGetStringUS)(AIActionParamValueRef param, ActionParamKeyID key, ai::UnicodeString& value); - - /** Sets the string value associated with a particular key in a VPB, using a Unicode string. - For details, see \c #AIActionSetString(). */ - ASErr ASAPI (*AIActionSetStringUS)(AIActionParamValueRef param, ActionParamKeyID key, const ai::UnicodeString& value); - - /** Retrieves the enumerated value associated with a particular key in a VPB, as a Unicode string. - For details, see \c #AIActionGetEnumeratedUS(). */ - ASErr ASAPI (*AIActionGetEnumeratedUS)(AIActionParamValueRef param, ActionParamKeyID key, ai::UnicodeString& name, ai::int32* value); - - /** Sets the enumerated value associated with a particular key in a VPB, using a Unicode string. - For details, see \c #AIActionSetEnumeratedUS(). */ - ASErr ASAPI (*AIActionSetEnumeratedUS)(AIActionParamValueRef param, ActionParamKeyID key, const ai::UnicodeString& name, ai::int32 value); -}; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIActionManager_h__ +#define __AIActionManager_h__ + +/* + * Name: AIActionManager.h + * $Revision: 22 $ + * Author: Grace Ge + * Date: 10/14/97 + * Purpose: AI Action Manager Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "AITypes.h" +#include "SPPlugs.h" +#include "AIUnicodeString.h" + +#include "AIHeaderBegin.h" + +/** @file AIActionManager.h */ + +/* + * Constants + */ + +#define kAIActionManagerSuite "AI Action Manager Suite" +#define kAIActionManagerSuiteVersion5 AIAPI_VERSION(5) +#define kAIActionManagerSuiteVersion kAIActionManagerSuiteVersion5 +#define kAIActionManagerVersion kAIActionManagerSuiteVersion + +/** @ingroup Notifiers + Sent when an action event has completed execution. + */ +#define kAIActionManagerPlayActionEventDoneNotifier "AI Action Manager PlayActionEvent Done Notifier" +#define kAIActionActualExecutionFinishedNotifier "AI Action Actual Execution Finished Notifier" +/* + * Types + */ + +/** Identifies the data type of an action parameter. */ +typedef ai::uint32 ActionParamTypeID; + +/** Allowed values for \c ::ActionParamTypeID */ +enum { + /** integer */ + actionTypeInteger = 'long', + /** real number */ + actionTypeReal = 'real', + /** boolean */ + actionTypeBoolean = 'bool', + /** enumeration */ + actionTypeEnum = 'enum', + /** string */ + actionTypeString = 'strn', + /** real number with associated unit */ + actionTypeUnitReal ='utrl', + /** user-defined data */ + actionTypeRawData = 'rwdt', + /** null */ + actionTypeNull = 'null' +}; + +/** Identifies units for some numeric parameters. Units are shown when type is \c actionTypeUnitReal. + */ +typedef ai::uint32 ActionParamUnitID; + +#ifndef _PIUnits +#define _PIUnits +/** Allowed values for \c ::ActionParamUnitID */ +enum { + // The Photoshop APIs also define these constants. If a plug-in includes both + // the Photoshop APIs and the Illustrator APIs then there would be compilation + // problems. We let the Photoshop definitions win. + + /** unit value - coerced */ + unitNone = '#Nne', + /** unit value - base 72ppi */ + unitDistance = '#Rlt', + /** unit value - base degrees */ + unitAngle = '#Ang', + /** unit value - base per inch */ + unitDensity = '#Rsl', + /** tagged unit value, document points */ + unitPoints = '#Pxl', + /** tagged unit value, percentage */ + unitPercent = '#Prc' + +}; +#endif + +/** Identifies a unique key associated with a parameter block */ +typedef ai::uint32 ActionParamKeyID; + +/** A reference to a Type Parameter Block (TPB) */ +typedef struct ActionParamType *AIActionParamTypeRef; + +/** A reference to a Value Parameter Block (VPB) */ +typedef struct ActionParamValue *AIActionParamValueRef; + +/** User-defined data. This is cast after it has been defined. */ +typedef void *AIActionUserData; + +/** Callback procedure prototype. */ +typedef ASErr (*AIActionCallbackProc)(AIActionParamValueRef parameter, + AIActionUserData userData, + AIBoolean showDialog); + +/** Idle procedure prototype. */ +typedef void (*AIActionIdleProc)(void); + +/** Choices for whether a parameters dialog appears by default when an action is played back. + This status is visually represented by a dialog icon to the left of the + event name in the Actions palette. */ +typedef enum _ActionDialogStatus +{ /** No dialog is defined for this action */ + kDialogNone, + /** Dialog appears on playback */ + kDialogOn, + /** Internal, not used by 3rd-party plug-ins */ + kDialogPartialOn, + /** Dialog does not appear on playback */ + kDialogOff +} ActionDialogStatus; + +/** Values that control whether values are shown in the Actions palette. */ +typedef enum _ActionValueVisibility +{ /** shown or hidden according to parameter data type */ + kDependOnParamType = -1, + /** hidden */ + kHideInPalette, + /** shown */ + kShowInPalette +} ActionValueVisibility; + + +/** @ingroup Callers + Caller id for messages sent to plug-ins from the action manager. See \c #AIActionManagerSuite. */ +#define kActionCaller "Action Manager" +/** @ingroup Selectors + Message selector sent when requesting a plug-in to play an action. In this case + the message is a \c ::DoActionMessage. */ +#define kDoActionSelector "Do Action" + +/** A plug-in receives this message with the request to execute an action. The + message caller is \c ::kActionCaller and the selector is \c ::kDoActionSelector. */ +typedef struct +{ + /** Message data */ + SPMessageData d; + /** Plug-in defined data */ + AIActionUserData userData; + /** When true, the plug-in should show the parameters dialog. */ + AIBoolean showDialog; + /** VPB containing parameter values previously recorded or set by another plug-in. */ + AIActionParamValueRef param; +} DoActionMessage; + + +/** @ingroup Suites + + The Action Manager suite allows you to access the internal scripting system built into + Adobe Illustrator. The Action Manager allows you to record and play actions which + execute Illustrator menu commands or plug-in commands. The Action Manager suite allows + your plug-in to play actions or register itself to the Illustrator application to enable + your plug-in to be scriptable via the Actions palette. + + An action event is an execution of an Illustrator command. An action event + can originate from the Illustrator application or a plug-in. It is normally, but + not limited to, an evaluation or modification to Illustrator artwork. Adobe + Illustrator’s Action Manager dispatches action events. + + In order for your plug-in’s action events to be recorded or played back you + must register them with the Action Manager and specify the parameters + associated with your action event. In addition to registering you actions, + your plug-in must respond to the Action Manager when it tells you to play + your plug-in’s action event. + + The Action Manager suite is exported by a plug-in. It may be disabled by removing + the Action Manager plug-in. Because of this, during startup you must always check for + the presence of the AIActionManager suite pointer before calling any Action Manager + functions. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIActionManagerSuite and \c #kAIActionManagerVersion. + */ + +struct AIActionManagerSuite +{ + /** This function registers a plug-in’s action event with the Adobe Illustrator application. + Call it during the startup procedure of your plug-in. This is necessary for your plug-in event + to be recognized by the Actions palette. It is the first step in making your plug-in into an action. + + The Action Manager suite is exported by a plug-in. It may be disabled by removing the Action Manager plug-in. + Because of this, during startup you must always check for the presence of the AIActionManager suite pointer + before calling any Action Manager functions. + + If your plug-in registers an action event at startup, you are responsible for recording your action event + and any associated parameters whenever the user is in Record mode.See \c #InRecordMode() and \c #RecordActionEvent(). + + @param eventName A string that identifies your plug-in event internally; not localized. + Must be unique among plug-ins. Typically the name of your plug-in, preceded by your + company name; for example, "adobe_saveDocumentAs". + + @param localizedName A string that is shown in the Adobe Illustrator Actions palette; + will be localized. + + @param callback Not used, pass a \c null value. + + @param plugin The plug-in registering the event (usually message.d->self). + + @param userData A pointer to private data associated with the action event. + Must be allocated by your plug-in (using \c SPBlocks.h) at startup. + This is passed back to your code in \c GetActionEventUserData and in the \c DoActionMessage. + + @param parameters A reference to a type parameter block (TPB). + A TPB contains keys that describe the parameter block of your plug-in. + To provide this value: + \li Create an \c AIActionParamTypeRef using \c #AINewActionParamType(). + \li Fill it with keys that describe your parameter block using \c #AIActionSetTypeKey(). + \li Pass it to this function. + \li Destroy it using \c #AIDeleteActionParamType(). */ + ASErr ASAPI (*RegisterActionEvent)(const char *eventName, const char *localizedName, + ai::int32 version, ai::int32 flag, + AIActionCallbackProc callback, + SPPluginRef plugin, + AIActionUserData userData, + AIActionParamTypeRef parameters); + + + /** Reports whether a plug-in has been registered as an action event. + (Note that this function returns a boolean value, not an error code.) + + @param eventName The name with which the action was registered. + @return True if the action was registered, false otherwise. + @see \c #RegisterActionEvent() + */ + AIBoolean ASAPI (*IsActionEventRegistered)(const char *eventName); + + /** Gets the localized name associated with a registered action event + (the string that appears in the Actions palette). + + @param eventName [in] The name with which the action was registered. + @param localizedName [out] A character buffer in which to return the localized name. + @see \c #RegisterActionEvent() + */ + ASErr ASAPI (*GetActionEventLocalizedName)(const char *eventName, char *localizedName); + /** Gets the version number associated with a registered action event. + + @param eventName [in] The name with which the action was registered. + @param version [out] A buffer in which to return the version number. + @see \c #RegisterActionEvent() + */ + ASErr ASAPI (*GetActionEventVersion)(const char *eventName, ai::int32 *version); + /** Currently unused */ + ASErr ASAPI (*GetActionEventFlag)(const char *eventName, ai::int32 *flag); + /** Gets the callback procedure associated with a registered action event. + + @param eventName [in] The name with which the action was registered. + @param version [out] A buffer in which to return the callback procedure. + @see \c #RegisterActionEvent() + */ + ASErr ASAPI (*GetActionEventCallbackProc)(const char *eventName, AIActionCallbackProc *callback); + /** Gets the plug-in associated with a registered action event--that is, the plug-in that executes the event. + + @param eventName [in] The name with which the action was registered. + @param version [out] A buffer in which to return the plug-in reference.. + @see \c #RegisterActionEvent() + */ + ASErr ASAPI (*GetActionEventPluginRef)(const char *eventName, SPPluginRef *pluginRef); + /** Gets the user data associated with a registered action event. + + @param eventName [in] The name with which the action was registered. + @param version [out] A buffer in which to return the user data. + @see \c #RegisterActionEvent() + */ + ASErr ASAPI (*GetActionEventUserData)(const char *eventName, AIActionUserData *userData); + /** Sets the user data associated with a registered action event. + + @param eventName [in] The name with which the action was registered. + @param version [in] The new user data, in the structure allocated at registration. + @see \c #RegisterActionEvent() + */ + ASErr ASAPI (*SetActionEventUserData)(const char *eventName, AIActionUserData userData); + /** Gets the type parameter block (TPB) associated with a registered action event. + + @param eventName [in] The name with which the action was registered. + @param version [out] A buffer in which to return the TPB. + @see \c #RegisterActionEvent() + */ + ASErr ASAPI (*GetActionEventParamType)(const char *eventName, AIActionParamTypeRef *param); + + /** Calls the action idle procedure, as set by \c #SetActionIdleProc(). */ + ASErr ASAPI (*Idle)(void); + /** Specifies the action idle procedure for this action. + + @param idleProc The procedure to call when the action is idle. + Define the function using this prototype:
+ typedef void AIActionIdleProc (void); + */ + ASErr ASAPI (*SetActionIdleProc)(AIActionIdleProc idleProc); + /** Gets the current idle procedure for this action. + + @param idleProc [out] A buffer in which to return the procedure. + */ + ASErr ASAPI (*GetActionIdleProc)(AIActionIdleProc *idleProc); + + /** Creates a type parameter block (TPB) for an action, which describes the data types + of your plug-in’s parameters. + + In order to register as an action event, your plug-in must create an \c AIActionParamTypeRef + using this function, then fill it with keys that describe your parameter block + using \c #AIActionSetTypeKey(). + Pass the filled TPB to \c #RegisterActionEvent() when registering the event. + Destroy it after registration, using \c #AIDeleteActionParamType(). + You do not need to keep your reference; Illustrator keeps a copy of it, + and you can retrieve it using \c #GetActionEventParamType(). + + The TPB does not contain actual values, just type descriptors. + The keys that you add to the parameter block represent data types, + typically for information that is gathered when your plug-in presents + a modal dialog to the user. The values are kept in a value parameter block + (VPB), created with \c #AINewActionParamValue(). + + @param param [out] A buffer in which to return the new type parameter block (TPB). + */ + ASErr ASAPI (*AINewActionParamType)(AIActionParamTypeRef *param); + /** Deletes a type parameter block (TPB). You do not need to keep your reference; + Illustrator keeps a copy of it, and you can retrieve it using \c #GetActionEventParamType(). + + @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType(). + @see \c #AIActionSetTypeKey(), \c #RegisterActionEvent() + */ + ASErr ASAPI (*AIDeleteActionParamType)(AIActionParamTypeRef param); + + /** Retrieves a type key from a type parameter block (TPB). + + The returned key is, by convention, a 4-character long value that describes + the parameter. For example, in the Tutorial the keys for the "corner" and "size" + parameters are ’crnr’ and ’size’. The key for the parameter type in the TPB matches + the key for its value in the VPB: see \c #AIActionGetValueKey(). + + \li To check that the TPB contains a specific key, use \c #AIActionHasTypeKey(). + \li To iterate through all of the keys, get the number of keys with \c #AIActionGetTypeCount(). + \li To set a key type, use \c #AIActionSetTypeKey(). + + @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() + and returned by \c #GetActionEventParamType(). + @param index [in] The position index of the desired parameter type key. + @param key [out] A buffer in which to return the type key. + */ + ASErr ASAPI (*AIActionGetTypeKey)(AIActionParamTypeRef param, ai::uint32 index, ActionParamKeyID *key); + + /** Determines whether a value parameter block (VPB) contains a particular key. + + @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() + and returned by \c #GetActionEventParamType(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param hasKey [out] A buffer in which to return the result, true if the key is contained in the VPB, + false otherwise. + */ + ASErr ASAPI (*AIActionHasTypeKey)(AIActionParamTypeRef param, ActionParamKeyID key, AIBoolean *hasKey); + + /** Retrieves the number of keys in a type parameter block (TPB). + Use with \c #AIActionGetTypeKey() to iterate through keys. + + @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() + and returned by \c #GetActionEventParamType(). + @param count [out] A buffer in which to return the number of keys. + */ + ASErr ASAPI (*AIActionGetTypeCount)(AIActionParamTypeRef param, ai::uint32 *count); + + /** Associates a type key with a type parameter block (TPB). Creates a new key, or sets + values for an existing key. + + @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() + and returned by \c #GetActionEventParamType(). + @param key [in] The parameter type key, by convention a 4-character \c long value that + describes the parameter. For example, in the Tutorial the keys for the + "corner" and "size" parameters are ’crnr’ and ’size’. See also \c #AIActionGetTypeKey(). + @param name [in] The localizable name of the parameter, which appears in the Actions palette. + @param type [in] The data type of the key. An \c ::ActionParamTypeID value. + @param show [in] When true, the parameter is shown in the Actions palette. + + */ + ASErr ASAPI (*AIActionSetTypeKey)(AIActionParamTypeRef param, ActionParamKeyID key, const char* name, ActionParamTypeID type, AIBoolean show); + + /** Retrieves the display name of an event parameter. + + @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() + and returned by \c #GetActionEventParamType(). + @param key [in] The parameter type key, a 4-character \c long, See \c #AIActionGetTypeKey(). + @param value [out] A buffer in which to return the localizable name of the parameter, + which appears in the Actions palette. See \c #AIActionSetTypeKey(). + */ + ASErr ASAPI (*AIActionGetName)(AIActionParamTypeRef param, ActionParamKeyID key, char* value); + + /** Retrieves the data type of an event parameter. + + @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() + and returned by \c #GetActionEventParamType(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetTypeKey(). + @param value [out] A buffer in which to return the data type of the key. An \c ::ActionParamTypeID value. + */ + ASErr ASAPI (*AIActionGetType)(AIActionParamTypeRef param, ActionParamKeyID key, ActionParamTypeID* value); + + /** Reports whether a specific event parameter is displayed in the Actions palette. + (Note that the function returns a boolean value, not an error code.) + + @param param [in] The type parameter block (TPB), as created by \c #AINewActionParamType() + and returned by \c #GetActionEventParamType(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetTypeKey(). + @return True if the show flag is on, false otherwise. + */ + AIBoolean ASAPI (*AIActionTypeIsShow)(AIActionParamTypeRef param, ActionParamKeyID key); + + /** Not used for third-party plug-ins */ + ASErr ASAPI (*AcquirePalette)(void); + /** Not used for third-party plug-ins */ + ASErr ASAPI (*ReleasePalette)(void); + + /** Records your plug-in’s action event and displays it in the Actions palette + with its parameter list. + + You should call this only when you have determined that the user is in Record mode, + by calling \c #InRecordMode(). You must create the VPB and set its values, + use it to record the action, then destroy the VPB. For example:
+ @code +// If in record mode, record the event +if (sAIActionManager && sAIActionManager->InRecordMode()) { +// create a VPB using AINewActionParamValue() +// load the VPB with values, according to the parameter types +// record the action event using RecordActionEvent() +// delete the VPB using AIDeleteActionParamValue() +} + @endcode + + @param eventName The name with which the action was registered. See \c #RegisterActionEvent(). + @param dialogStatus Whether a dialog appears by default when the action is played back. + This status is visually represented by a dialog icon to the left of the + event name in the Actions palette. + @param parameters The event’s value parameter block (VPB), as created by + \c #AINewActionParamValue(). This structure contains the parameter values that + were used during the action event. Typically, these are the values entered by + the user in the parameter dialog box. If your action event does not have parameters, + pass \c null. + */ + ASErr ASAPI (*RecordActionEvent)(const char *eventName, ActionDialogStatus dialogStatus, AIActionParamValueRef parameters); + + /** Plays back a recorded action event. + + You can use this to play back any registered action event, not just the one for + this plug-in. The event names and their parameter types are documented in \c actions folder + in the SDK installation. + + For example, the following executes copy, new document, and paste action events: + @code +sAIActionManager->PlayActionEvent("adobe_copy", kDialogNone, NULL); +sAIActionManager->PlayActionEvent("adobe_newDocument", kDialogNone, NULL); +sAIActionManager->PlayActionEvent("adobe_paste", kDialogNone, NULL); + @endcode + + @param eventName The name with which the action was registered. See \c #RegisterActionEvent(). + @param dialogStatus Whether a dialog appears by default when the action is played back. + This status is visually represented by a dialog icon to the left of the + event name in the Actions palette. See \c ::_ActionDialogStatus. + @param parameters The event’s value parameter block (VPB), as created by + \c #AINewActionParamValue(). This structure contains the parameter values that + were used during the action event. Typically, these are the values entered by + the user in the parameter dialog box. If your action event does not have parameters, + pass \c null. + */ + ASErr ASAPI (*PlayActionEvent)(const char *eventName, ActionDialogStatus dialogStatus, AIActionParamValueRef parameters); + + /** Reports whether the user is currently in Record mode. (Note that the function + returns a boolean value, not an error code.) + + When a new action is first created or whenever the record button is pressed in the + Actions palette, the user is in Record mode, and all actions are recorded into the + Actions palette. + + If your plug-in registers an action event at startup, you are responsible for + recording your action event and any associated parameters whenever the user is + in Record mode. See \c #RecordActionEvent(). + + This function is often used within a conditional statement during the normal + execution of a plug-in. For example: + @code +// If in record mode, record the event +if (sAIActionManager && sAIActionManager->InRecordMode()) { +// create a VPB +// load the VPB with values +// record the action event +// delete the VPB +} + @endcode + + @return True if the user is in record mode, false otherwise. + */ + AIBoolean ASAPI (*InRecordMode)(void); + + /** Not used for third-party plug-ins */ + AIBoolean ASAPI (*InInsertMenuItemState)(void); + + /** Not used for third-party plug-ins */ + ASErr ASAPI (*ActivateInsertMennuItemDialog)(void); + + /** Not used for third-party plug-ins */ + ASErr ASAPI (*SetCurrentCommandLocalizedName)(const char *localizedName); + + /** Not used for third-party plug-ins */ + ASErr ASAPI (*DoFunctionKey)(ai::int32 fkey, ai::uint32 modifier); + + /** Creates a value parameter block (VPB) structure. + + The VPB contains a set of event parameter values, whose types are determined + by the type parameter block (TPB) with which the event is registered. + See \c #RegisterActionEvent() and \c #AINewActionParamValue(). + + In order to record an action event, your plug-in must create an + #AIActionParamValueRef using this function, then fill it with key/value pairs + that contain values of the correct type, using the appropriate \c AIActionSetXx function. + For example, to set an integer value, use \c #AIActionSetInteger(). + + Pass the filled VPB to \c #RecordActionEvent() when recording the event. + Destroy it after recording, using \c #AIDeleteActionParamValue(). + You do not need to keep your reference; Illustrator keeps a copy of it, + and you can retrieve it using \c #AIActionGetValueKey(). + + @param param A buffer in which to return the new value parameter block (VPB). + */ + ASErr ASAPI (*AINewActionParamValue)(AIActionParamValueRef *param); + + /** Deletes a value parameter block (VPB). You do not need to keep your reference + after recording or playing back an action with its parameter value set. + @param param The value parameter block (VPB) as returned by \c #AINewActionParamValue(). + @see \c #RecordActionEvent(), \c #PlayActionEvent() + */ + ASErr ASAPI (*AIDeleteActionParamValue)(AIActionParamValueRef param); + + /** Retrieves a value key from a value parameter block (VPB). + + The returned key is, by convention, a 4-character long value that describes + the parameter. For example, in the Tutorial the keys for the "corner" and "size" + parameters are ’crnr’ and ’size’. The key for the parameter value in the VPB + matches the key for its type in the TPB. See \c #AIActionGetTypeKey(). + + \li To check that the VPB contains a specific key, use \c #AIActionHasValueKey(). + \li To iterate through all of the keys, get the number of keys with + \c #AIActionGetValueCount(). + \li To extract or set the value for a specific key, use the accessor function appropriate + to its data type. For example, to get an integer value, use \c #AIActionGetInteger(), + and to set it, use \c #AIActionSetInteger(). + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param index [in] The position index of the desired parameter value key. + @param key [out] A buffer in which to return the value key. + */ + ASErr ASAPI (*AIActionGetValueKey)(AIActionParamValueRef param, ai::uint32 index, ActionParamKeyID *key); + + /** Determines whether a VPB contains a particular key. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param hasKey [out] A buffer in which to return the result, true if the key is contained in the VPB, + false otherwise. + */ + ASErr ASAPI (*AIActionHasValueKey)(AIActionParamValueRef param, ActionParamKeyID key, AIBoolean *hasKey); + + /** Retrieves the number of keys in a value parameter block (VPB). + Use with \c #AIActionGetValueKey() to iterate through keys + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param count [out] A buffer in which to return the number of keys. + */ + ASErr ASAPI (*AIActionGetValueCount)(AIActionParamValueRef param, ai::uint32 *count); + + /* Retrieves the data type of the value associated with a key. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [out] A buffer in which to return the data type. An \c ::ActionParamTypeID value. + */ + ASErr ASAPI (*AIActionGetValueType)(AIActionParamValueRef param, ActionParamKeyID key, ActionParamTypeID *type); + + /** Retrieves the integer value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [out] A buffer in which to return the value. + */ + ASErr ASAPI (*AIActionGetInteger)(AIActionParamValueRef param, ActionParamKeyID key, ai::int32* value); + /** Sets the integer value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [in] The new value. + */ + ASErr ASAPI (*AIActionSetInteger)(AIActionParamValueRef param, ActionParamKeyID key, ai::int32 value); + + /** Retrieves the \c real value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [out] A buffer in which to return the value. + */ + ASErr ASAPI (*AIActionGetReal)(AIActionParamValueRef param, ActionParamKeyID key, AIReal* value); + /** Sets the \c real value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [in] The new value. + */ + ASErr ASAPI (*AIActionSetReal)(AIActionParamValueRef param, ActionParamKeyID key, AIReal value); + + /** Retrieves the unit-real value associated with a particular key in a VPB. Unit-real values are + displayed in the Actions palette with unit labels. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [out] A buffer in which to return the value. + */ + ASErr ASAPI (*AIActionGetUnitReal)(AIActionParamValueRef param, ActionParamKeyID key, ActionParamUnitID* unit, AIReal* value); + /** Sets the unit-real value associated with a particular key in a VPB.Unit-real values are + displayed in the Actions palette with unit labels. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [in] The new value. + */ + ASErr ASAPI (*AIActionSetUnitReal)(AIActionParamValueRef param, ActionParamKeyID key, ActionParamUnitID unit, AIReal value); + + /** Retrieves the string value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [out] A buffer in which to return the value. + */ + ASErr ASAPI (*AIActionGetString)(AIActionParamValueRef param, ActionParamKeyID key, char* value); + /** Sets the string value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [in] The new value. + */ + ASErr ASAPI (*AIActionSetString)(AIActionParamValueRef param, ActionParamKeyID key, const char* value); + + /** Retrieves the boolean value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [out] A buffer in which to return the value. + */ + ASErr ASAPI (*AIActionGetBoolean)(AIActionParamValueRef param, ActionParamKeyID key, AIBoolean* value); + /** Sets the boolean value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [in] The new value. */ + ASErr ASAPI (*AIActionSetBoolean)(AIActionParamValueRef param, ActionParamKeyID key, ASBoolean value); + + /** Retrieves the enumerated value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param name [in] The name of the enumeration, as shown in the Actions palette. + @param value [out] A buffer in which to return the value. + */ + ASErr ASAPI (*AIActionGetEnumerated)(AIActionParamValueRef param, ActionParamKeyID key, char* name, ai::int32* value); + /** Sets the enumerated value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param name [in] The name of the enumeration, as shown in the Actions palette. + @param value [in] The new value. + */ + ASErr ASAPI (*AIActionSetEnumerated)(AIActionParamValueRef param, ActionParamKeyID key, const char* name, ai::int32 value); + + /** Sets the raw-data value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param size [in] The number of bytes in the new value. + @param value [in] The new value. You must allocate memory for the value. + */ + ASErr ASAPI (*AIActionSetRawDataBytes)(AIActionParamValueRef param, ActionParamKeyID key, ai::uint32 size, const char* value); + + /** Retrieves the size of a raw-data value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param size [out] A buffer in which to return the number of bytes in the value. + */ + ASErr ASAPI (*AIActionGetRawDataSize)(AIActionParamValueRef param, ActionParamKeyID key, ai::uint32* size); + /** Retrieves the raw-data value associated with a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [out] A buffer in which to return the value. You must allocate memory for the value, + using the size obtained with \c #AIActionGetRawDataSize(). + */ + ASErr ASAPI (*AIActionGetRawData)(AIActionParamValueRef param, ActionParamKeyID key, char* value); + + /** Retrieves the current visibility state of a particular key in a VPB.(Not that this function returns + a visibility value, not an error code.) + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @return The visibility state value; see \c ::ActionValueVisibility. + */ + ActionValueVisibility ASAPI (*AIActionValueGetVisibility)(AIActionParamValueRef param, ActionParamKeyID key); + + /** Sets the visibility state of a particular key in a VPB. + + @param param [in] The value parameter block (VPB), as created by \c #AINewActionParamValue(). + @param key [in] The parameter type key, a 4-character \c long. See \c #AIActionGetValueKey(). + @param value [in] The new value, see \c ::ActionValueVisibility. + */ + ASErr ASAPI (*AIActionValueSetVisibility)(AIActionParamValueRef param, ActionParamKeyID key, ActionValueVisibility value); + + /** Not used for third-party plug-ins */ + ASErr ASAPI (*UndoLastTransaction)(); + + /** Not used for third-party plug-ins */ + ASErr ASAPI (*RedoLastTransaction)(); + + /** Not used for third-party plug-ins */ + ASErr ASAPI (*IgnoreRecording)(AIBoolean ignore); + + + /** Registers an action using a Unicode name. + For details, see \c #RegisterActionEvent(). */ + + ASErr ASAPI (*RegisterActionEventUS)(const char *eventName, const ai::UnicodeString& localizedName, + ai::int32 version, ai::int32 flag, + AIActionCallbackProc callback, + SPPluginRef plugin, + AIActionUserData userData, + AIActionParamTypeRef parameters); + + /** Retrieves the localized name of an event as a Unicode string. + For details, see \c #GetActionEventLocalizedName(). */ + ASErr ASAPI (*GetActionEventLocalizedNameUS)(const char *eventName, ai::UnicodeString& localizedName); + + /** Associates a type key with a type parameter block (TPB), using Unicode strings. + For details, see \c #AIActionSetTypeKey(). */ + ASErr ASAPI (*AIActionSetTypeKeyUS)(AIActionParamTypeRef param, ActionParamKeyID key, const ai::UnicodeString& name, ActionParamTypeID type, AIBoolean show); + + /** Retrieves the identifying name of an event as a Unicode string. + For details, see \c #AIActionGetNameUS(). */ + ASErr ASAPI (*AIActionGetNameUS)(AIActionParamTypeRef param, ActionParamKeyID key, ai::UnicodeString& value); + + /** Sets the localized name of an event using a Unicode string. + For details, see \c #SetCurrentCommandLocalizedName(). */ + ASErr ASAPI (*SetCurrentCommandLocalizedNameUS)(const ai::UnicodeString& localizedName); + + /** Retrieves the string value associated with a particular key in a VPB, as a Unicode string. + For details, see \c #AIActionGetString(). */ + ASErr ASAPI (*AIActionGetStringUS)(AIActionParamValueRef param, ActionParamKeyID key, ai::UnicodeString& value); + + /** Sets the string value associated with a particular key in a VPB, using a Unicode string. + For details, see \c #AIActionSetString(). */ + ASErr ASAPI (*AIActionSetStringUS)(AIActionParamValueRef param, ActionParamKeyID key, const ai::UnicodeString& value); + + /** Retrieves the enumerated value associated with a particular key in a VPB, as a Unicode string. + For details, see \c #AIActionGetEnumeratedUS(). */ + ASErr ASAPI (*AIActionGetEnumeratedUS)(AIActionParamValueRef param, ActionParamKeyID key, ai::UnicodeString& name, ai::int32* value); + + /** Sets the enumerated value associated with a particular key in a VPB, using a Unicode string. + For details, see \c #AIActionSetEnumeratedUS(). */ + ASErr ASAPI (*AIActionSetEnumeratedUS)(AIActionParamValueRef param, ActionParamKeyID key, const ai::UnicodeString& name, ai::int32 value); +}; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAnnotator.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAnnotator.h index 2d3fe72..4ec54e8 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAnnotator.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAnnotator.h @@ -1,357 +1,355 @@ -#ifndef __AIAnnotator__ -#define __AIAnnotator__ - -/* - * Name: AIAnnotator.h - * $Revision: 8 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Annotator Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIDocumentView__ -#include "AIDocumentView.h" -#endif - -#ifndef __AIFixedMath__ -#include "AIFixedMath.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIAnnotator.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIAnnotatorSuite "AI Annotator Suite" -#define kAIAnnotatorSuiteVersion6 AIAPI_VERSION(6) -#define kAIAnnotatorSuiteVersion kAIAnnotatorSuiteVersion6 -#define kAIAnnotatorVersion kAIAnnotatorSuiteVersion - -/** @ingroup Callers - The annotation caller. See \c #AIAnnotatorSuite */ -#define kCallerAIAnnotation "AI Annotation" - -/** @ingroup Selectors - Sent when the plug-in implementing a plug-in annotator should draw its annotations. */ -#define kSelectorAIDrawAnnotation "AI Draw" -/** @ingroup Selectors - Sent when the plug-in implementing a plug-in annotator should invalidate the regions - occupied by its annotations. - */ -#define kSelectorAIInvalAnnotation "AI Invalidate" - -/** Update type for the \c #kSelectorAIInvalAnnotation message. */ -#define kAnnotateNothing 0 -/** Not used */ -#define kAnnotateBetaObject 1 -/** Not used */ -#define kAnnotateBetaObjects 2 -/** Not used */ -#define kAnnotateBeziers 3 -/** Not used */ -#define kAnnotateText 4 -/** Update type for the \c #kSelectorAIDrawAnnotation message. */ -#define kAnnotateArtObject 5 - - -#if defined(MAC_ENV) || defined(WIN_ENV) -/** Port type for the \c #kSelectorAIInvalAnnotation message. */ -#define kAnnotateNoPortType 0 -/** Port type for the \c #kSelectorAIDrawAnnotation message. */ -#define kAnnotateWindowPortType 1 -/** Not used */ -#define kAnnotateGWorldPortType 2 -#endif - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** This is a reference to an annotator. It is never dereferenced. */ -typedef struct _t_AIAnnotatorOpaque *AIAnnotatorHandle; - -/** Not used */ -struct AIUpdateBezier -{ - /** Initial knot point */ - AIRealPoint p0; - /** First control point */ - AIRealPoint p1; - /** Second control point */ - AIRealPoint p2; - /** Final knot point */ - AIRealPoint p3; - /** When true, update an existing annotation. */ - AIBoolean updateIt; - /** When true, draw a new annotation. */ - AIBoolean drawIt; -}; - -/** A plug-in that has registered an annotator receives this message - with \c #kSelectorAIInvalAnnotation and \c #kSelectorAIDrawAnnotation. - */ -struct AIAnnotatorMessage -{ - /** The message data */ - SPMessageData d; - /** The annotator reference for the handler that is requested - to invalidate or draw the annotation. */ - AIAnnotatorHandle annotator; - /** The document view; see \c apiAIDocumentView.h */ - AIDocumentViewHandle view; - /** The type of update being requested. - \li \c kAnnotateNothing: Request is for invalidation (\c #kSelectorAIInvalAnnotation) - \li \c kAnnotateArtObject: Request is for drawing (\c #kSelectorAIDrawAnnotation) - */ - ai::int32 updateType; - /** Not meaningful for invalidation. - For a drawing update, a value of 1 indicates that - the update was triggered by auto-scrolling the window during mouse drag. - Otherwise 0. */ - void *updateData; - /** The port type. - \li \c kAnnotateNoPortType for \c #kSelectorAIInvalAnnotation - \li \c kAnnotateWindowPortType for \c #kSelectorAIDrawAnnotation - \li \c NULL for invalidation - */ - ai::int32 portType; - /** @deprecated For drawing, the port to which to draw the annotation. - The \c #AIPortRef is the same as an \c #ADMPortRef, and can - be used directly to create an ADM drawer for platform-independent drawing. -
\c NULL for an invalidation request. - Deprecated in AI 15.0. Use \c #AIAnnotatorDrawerSuite for platform-independent - drawing instead. - */ - AIPortRef port; - /** When true, draw an outline around the annotation area. This is controlled - by the View > Show Edges value. */ - AIBoolean showEdges; - - /** For drawing, the list of regions that have been invalidated by an annotator and - need to be redrawn. Can be \c NULL. - - The memory for invalidated regions is owned and deleted by Illustrator after a - draw message completes. When any annotator invalidates a region all the annotators - are asked to draw themselves regardless of whether their annotations lie within - the invalidation rectangles. Illustrator erases annotations only from the invalidated region. - This means that an annotator can be asked to draw itself when the area it is drawing still contains - the drawing that was done during the previous draw message. - - Most light-weight annotations can ignore this and just - draw the entire annotation in response to \c #kSelectorAIDrawAnnotation. - If there are performance issues drawing an annotator or an annotator uses - transparency/blending modes when drawing, it can clip its drawing - to the invalidation rectangles. This avoids the problem of transparency - build up in areas where the previous drawing was not cleared. - -
\c NULL for an invalidation request. - */ - const AIRealRect *invalidationRects; - /** The number of rectangles in the \c invalidationRects list. -
Always 0 for an invalidation request. */ - ai::int32 numInvalidationRects; - - /** Pointer to annotator drawer object. Pointer guaranteed to be non-NULL for - \c #kSelectorAIDrawAnnotation messages. See \c AIAnnotatorDrawer.h for more information. - */ - class AIAnnotatorDrawer *drawer; -}; - -/** Bit flag values for annotators, which determine how an annotation is drawn. - @see \c #AIAnnotatorSuite::SetAnnotatorOptions() */ -enum AIAnnotatorOptionsFlagValues -{ - /** Send notification to this annotator before other annotators, but after selection. */ - kDrawBeforeAllOthers = 1, - - /** Send notification for inactive documents. By default notification is sent - only to the active document. */ - kDrawOnInactiveDocuments = 1<<1, - - /** Do not send notification for inactive views. By default notification is sent - to all views. */ - kDontDrawOnInactiveView = 1<<2, - - /** Dummy value to ensure 32 bit enums */ - AIAnnotatorOptionsFlagValuesDummy = 0xFFFFFFFF -}; - -typedef ai::int32 AIAnnotatorOptionsFlags; - -/******************************************************************************* - ** - ** Suite Record - ** - **/ - - -/** @ingroup Suites - The annotator suite allows plug-ins to draw annotations into the document window - that are not a part of the artwork. These annotations are drawn on top after all - artwork has been drawn. For example, selection handles are annotations. - - In order to be given an opportunity to draw annotations a plug-in must first call - \c #AddAnnotator() to register itself as an annotator. Typically this is done at - plug-in startup but it may be done at any time. An annotator may be active or - inactive. Only active annotators receive requests to draw. - - A plug-in annotator can receive two messages via its main entry point. These - messages have caller \c #kCallerAIAnnotation. The messages are: - \li \c kSelectorAIDrawAnnotation A request for the annotator to draw its - annotations. In this case the message structure is an \c ::AIAnnotatorMessage - that supplies information about the document view to be drawn. - \li \c kSelectorAIInvalAnnotation A request to invalidate the bounds of any - annotations in the current document view. In response the plug-in should - call \c #InvalAnnotationRect() for each annotation. - - In addition to responding to the previous two messages a plug-in annotator - typically calls \c #InvalAnnotationRect() whenever its set of annotations - changes. This indicates the parts of the document view that need to be - redrawn as a consequence of the changes. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIAnnotatorSuite and \c #kAIAnnotatorVersion. - */ - -struct AIAnnotatorSuite -{ - /** Adds a new annotator to your plug-in. Typically called during startup. - - @param self The startup plug-in. - @param name The annotator’s display name. - @param notifier [out] A buffer in which to return a unique identifier for the new annotator. - */ - - AIAPI AIErr (*AddAnnotator) ( SPPluginRef self, const char *name, AIAnnotatorHandle *notifier ); - - /** Retrieves the display name of this annotator. - - @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). - @param name [out] A pointer to point to the display name. - */ - AIAPI AIErr (*GetAnnotatorName) ( AIAnnotatorHandle notifier, const char **name ); - - /** Reports whether an annotator is currently active. - - @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). - @param active [out] A buffer in which to return the result, true if the annotator is active. - */ - AIAPI AIErr (*GetAnnotatorActive) ( AIAnnotatorHandle notifier, AIBoolean *active ); - - /** Activates or deactivates an annotator. - - @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). - @param active True to activate the annotator, false to deactivate it. - */ - AIAPI AIErr (*SetAnnotatorActive) ( AIAnnotatorHandle notifier, AIBoolean active ); - - /** Retrieves the plug-in that defines this annotator. - - @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). - @param plugin [out] A buffer in which to return the plug-in reference. - */ - AIAPI AIErr (*GetAnnotatorPlugin) ( AIAnnotatorHandle notifier, SPPluginRef *plugin ); - - /** Gets the number of currently registered annotators. - Use with \c #GetNthAnnotator() to iterate through all annotators. - - @param [out] A buffer in which to return the number of annotators. - */ - AIAPI AIErr (*CountAnnotators) ( ai::int32 *count ); - /** Retrieves a registered annotator by position index. - Use with \c #CountAnnotators() to iterate through all registered annotators. - - @param n The index, in the range \c [1..numAnnotators]. - @param notifier [out] A buffer in which to return the annotator reference. - */ - AIAPI AIErr (*GetNthAnnotator) ( ai::int32 n, AIAnnotatorHandle *notifier ); - - /** Invalidates a rectangular area of the document so that drawing can be performed. - After using this function to determine the area in which to draw, - you can call \c ADMDrawer to perform platform-independent drawing. - For example: - @code - portBounds.left = _AIRealRoundToShort(updateRect.left) - 1; - portBounds.top = _AIRealRoundToShort(updateRect.top) + 1; - portBounds.right = _AIRealRoundToShort(updateRect.right) + 1; - portBounds.bottom = _AIRealRoundToShort(updateRect.bottom) - 1; - - sAIAnnotator->InvalAnnotationRect(fDocumentView, &portBounds); - @endcode - - @param view The document view. See \c apiAIDocumentView.h - @param annotationBounds A pointer to rectangle structure that specifies the area boundaries. - */ - AIAPI AIErr (*InvalAnnotationRect)( AIDocumentViewHandle view, const AIRect *annotationBounds ); - - /** Adds an annotator to a different plug-in (for instance, one that does on-screen drawing). - This is the alternate plug-in; you can retrieve the handle to it using \c #GetAnnotatorAlternatePlugin(). - @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). - @param plugin The handle for the alternate plug-in. - */ - AIAPI AIErr (*SetAnnotatorAlternatePlugin) ( AIAnnotatorHandle notifier, SPPluginRef plugin ); - - /** Retrieves the alternate plug-in for the annotator, to which it was added with \c #SetAnnotatorAlternatePlugin(). - @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). - @param plugin [out] A buffer in which to return the alternate plug-in reference. - */ - AIAPI AIErr (*GetAnnotatorAlternatePlugin) ( AIAnnotatorHandle notifier, SPPluginRef *plugin ); - - /** Retrieves annotator options, which determine how the annotation is drawn. - @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). - @param flags [out] A buffer in which to return the options, a logical OR of - \c #AIAnnotatorOptionsFlagValues. - */ - AIAPI AIErr (*GetAnnotatorOptions) ( AIAnnotatorHandle notifier, AIAnnotatorOptionsFlags *flags ); - /** Sets annotator options, which determine how the annotation is drawn. - @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). - @param flags The new options value, a logical OR of \c #AIAnnotatorOptionsFlagValues. - */ - AIAPI AIErr (*SetAnnotatorOptions) ( AIAnnotatorHandle notifier, const AIAnnotatorOptionsFlags flags ); -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIAnnotator__ +#define __AIAnnotator__ + +/* + * Name: AIAnnotator.h + * $Revision: 8 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Annotator Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIDocumentView__ +#include "AIDocumentView.h" +#endif + +#ifndef __AIFixedMath__ +#include "AIFixedMath.h" +#endif + +#ifndef __AIRealMath__ +#include "AIRealMath.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIAnnotator.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIAnnotatorSuite "AI Annotator Suite" +#define kAIAnnotatorSuiteVersion6 AIAPI_VERSION(6) +#define kAIAnnotatorSuiteVersion kAIAnnotatorSuiteVersion6 +#define kAIAnnotatorVersion kAIAnnotatorSuiteVersion + +/** @ingroup Callers + The annotation caller. See \c #AIAnnotatorSuite */ +#define kCallerAIAnnotation "AI Annotation" + +/** @ingroup Selectors + Sent when the plug-in implementing a plug-in annotator should draw its annotations. */ +#define kSelectorAIDrawAnnotation "AI Draw" +/** @ingroup Selectors + Sent when the plug-in implementing a plug-in annotator should invalidate the regions + occupied by its annotations. + */ +#define kSelectorAIInvalAnnotation "AI Invalidate" + +/** Update type for the \c #kSelectorAIInvalAnnotation message. */ +#define kAnnotateNothing 0 +/** Not used */ +#define kAnnotateBetaObject 1 +/** Not used */ +#define kAnnotateBetaObjects 2 +/** Not used */ +#define kAnnotateBeziers 3 +/** Not used */ +#define kAnnotateText 4 +/** Update type for the \c #kSelectorAIDrawAnnotation message. */ +#define kAnnotateArtObject 5 + + +/** Port type for the \c #kSelectorAIInvalAnnotation message. */ +#define kAnnotateNoPortType 0 +/** Port type for the \c #kSelectorAIDrawAnnotation message. */ +#define kAnnotateWindowPortType 1 +/** Not used */ +#define kAnnotateGWorldPortType 2 + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** This is a reference to an annotator. It is never dereferenced. */ +typedef struct _t_AIAnnotatorOpaque *AIAnnotatorHandle; + +/** Not used */ +struct AIUpdateBezier +{ + /** Initial knot point */ + AIRealPoint p0; + /** First control point */ + AIRealPoint p1; + /** Second control point */ + AIRealPoint p2; + /** Final knot point */ + AIRealPoint p3; + /** When true, update an existing annotation. */ + AIBoolean updateIt; + /** When true, draw a new annotation. */ + AIBoolean drawIt; +}; + +/** A plug-in that has registered an annotator receives this message + with \c #kSelectorAIInvalAnnotation and \c #kSelectorAIDrawAnnotation. + */ +struct AIAnnotatorMessage +{ + /** The message data */ + SPMessageData d; + /** The annotator reference for the handler that is requested + to invalidate or draw the annotation. */ + AIAnnotatorHandle annotator; + /** The document view; see \c apiAIDocumentView.h */ + AIDocumentViewHandle view; + /** The type of update being requested. + \li \c kAnnotateNothing: Request is for invalidation (\c #kSelectorAIInvalAnnotation) + \li \c kAnnotateArtObject: Request is for drawing (\c #kSelectorAIDrawAnnotation) + */ + ai::int32 updateType; + /** Not meaningful for invalidation. + For a drawing update, a value of 1 indicates that + the update was triggered by auto-scrolling the window during mouse drag. + Otherwise 0. */ + void *updateData; + /** The port type. + \li \c kAnnotateNoPortType for \c #kSelectorAIInvalAnnotation + \li \c kAnnotateWindowPortType for \c #kSelectorAIDrawAnnotation + \li \c NULL for invalidation + */ + ai::int32 portType; + /** @deprecated For drawing, the port to which to draw the annotation. + The \c #AIPortRef is the same as an \c #ADMPortRef, and can + be used directly to create an ADM drawer for platform-independent drawing. +
\c NULL for an invalidation request. + Deprecated in AI 15.0. Use \c #AIAnnotatorDrawerSuite for platform-independent + drawing instead. + */ + AIPortRef port; + /** When true, draw an outline around the annotation area. This is controlled + by the View > Show Edges value. */ + AIBoolean showEdges; + + /** For drawing, the list of regions that have been invalidated by an annotator and + need to be redrawn. Can be \c NULL. + + The memory for invalidated regions is owned and deleted by Illustrator after a + draw message completes. When any annotator invalidates a region all the annotators + are asked to draw themselves regardless of whether their annotations lie within + the invalidation rectangles. Illustrator erases annotations only from the invalidated region. + This means that an annotator can be asked to draw itself when the area it is drawing still contains + the drawing that was done during the previous draw message. + + Most light-weight annotations can ignore this and just + draw the entire annotation in response to \c #kSelectorAIDrawAnnotation. + If there are performance issues drawing an annotator or an annotator uses + transparency/blending modes when drawing, it can clip its drawing + to the invalidation rectangles. This avoids the problem of transparency + build up in areas where the previous drawing was not cleared. + +
\c NULL for an invalidation request. + */ + const AIRealRect *invalidationRects; + /** The number of rectangles in the \c invalidationRects list. +
Always 0 for an invalidation request. */ + ai::int32 numInvalidationRects; + + /** Pointer to annotator drawer object. Pointer guaranteed to be non-NULL for + \c #kSelectorAIDrawAnnotation messages. See \c AIAnnotatorDrawer.h for more information. + */ + class AIAnnotatorDrawer *drawer; +}; + +/** Bit flag values for annotators, which determine how an annotation is drawn. + @see \c #AIAnnotatorSuite::SetAnnotatorOptions() */ +enum AIAnnotatorOptionsFlagValues +{ + /** Send notification to this annotator before other annotators, but after selection. */ + kDrawBeforeAllOthers = 1, + + /** Send notification for inactive documents. By default notification is sent + only to the active document. */ + kDrawOnInactiveDocuments = 1<<1, + + /** Do not send notification for inactive views. By default notification is sent + to all views. */ + kDontDrawOnInactiveView = 1<<2, + + /** Dummy value to ensure 32 bit enums */ + AIAnnotatorOptionsFlagValuesDummy = 0xFFFFFFFF +}; + +typedef ai::int32 AIAnnotatorOptionsFlags; + +/******************************************************************************* + ** + ** Suite Record + ** + **/ + + +/** @ingroup Suites + The annotator suite allows plug-ins to draw annotations into the document window + that are not a part of the artwork. These annotations are drawn on top after all + artwork has been drawn. For example, selection handles are annotations. + + In order to be given an opportunity to draw annotations a plug-in must first call + \c #AddAnnotator() to register itself as an annotator. Typically this is done at + plug-in startup but it may be done at any time. An annotator may be active or + inactive. Only active annotators receive requests to draw. + + A plug-in annotator can receive two messages via its main entry point. These + messages have caller \c #kCallerAIAnnotation. The messages are: + \li \c kSelectorAIDrawAnnotation A request for the annotator to draw its + annotations. In this case the message structure is an \c ::AIAnnotatorMessage + that supplies information about the document view to be drawn. + \li \c kSelectorAIInvalAnnotation A request to invalidate the bounds of any + annotations in the current document view. In response the plug-in should + call \c #InvalAnnotationRect() for each annotation. + + In addition to responding to the previous two messages a plug-in annotator + typically calls \c #InvalAnnotationRect() whenever its set of annotations + changes. This indicates the parts of the document view that need to be + redrawn as a consequence of the changes. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIAnnotatorSuite and \c #kAIAnnotatorVersion. + */ + +struct AIAnnotatorSuite +{ + /** Adds a new annotator to your plug-in. Typically called during startup. + + @param self The startup plug-in. + @param name The annotator�s display name. + @param notifier [out] A buffer in which to return a unique identifier for the new annotator. + */ + + AIAPI AIErr (*AddAnnotator) ( SPPluginRef self, const char *name, AIAnnotatorHandle *notifier ); + + /** Retrieves the display name of this annotator. + + @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). + @param name [out] A pointer to point to the display name. + */ + AIAPI AIErr (*GetAnnotatorName) ( AIAnnotatorHandle notifier, const char **name ); + + /** Reports whether an annotator is currently active. + + @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). + @param active [out] A buffer in which to return the result, true if the annotator is active. + */ + AIAPI AIErr (*GetAnnotatorActive) ( AIAnnotatorHandle notifier, AIBoolean *active ); + + /** Activates or deactivates an annotator. + + @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). + @param active True to activate the annotator, false to deactivate it. + */ + AIAPI AIErr (*SetAnnotatorActive) ( AIAnnotatorHandle notifier, AIBoolean active ); + + /** Retrieves the plug-in that defines this annotator. + + @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). + @param plugin [out] A buffer in which to return the plug-in reference. + */ + AIAPI AIErr (*GetAnnotatorPlugin) ( AIAnnotatorHandle notifier, SPPluginRef *plugin ); + + /** Gets the number of currently registered annotators. + Use with \c #GetNthAnnotator() to iterate through all annotators. + + @param [out] A buffer in which to return the number of annotators. + */ + AIAPI AIErr (*CountAnnotators) ( ai::int32 *count ); + /** Retrieves a registered annotator by position index. + Use with \c #CountAnnotators() to iterate through all registered annotators. + + @param n The index, in the range \c [1..numAnnotators]. + @param notifier [out] A buffer in which to return the annotator reference. + */ + AIAPI AIErr (*GetNthAnnotator) ( ai::int32 n, AIAnnotatorHandle *notifier ); + + /** Invalidates a rectangular area of the document so that drawing can be performed. + After using this function to determine the area in which to draw, + you can call \c ADMDrawer to perform platform-independent drawing. + For example: + @code + portBounds.left = _AIRealRoundToShort(updateRect.left) - 1; + portBounds.top = _AIRealRoundToShort(updateRect.top) + 1; + portBounds.right = _AIRealRoundToShort(updateRect.right) + 1; + portBounds.bottom = _AIRealRoundToShort(updateRect.bottom) - 1; + + sAIAnnotator->InvalAnnotationRect(fDocumentView, &portBounds); + @endcode + + @param view The document view. See \c apiAIDocumentView.h + @param annotationBounds A pointer to rectangle structure that specifies the area boundaries. + */ + AIAPI AIErr (*InvalAnnotationRect)( AIDocumentViewHandle view, const AIRect *annotationBounds ); + + /** Adds an annotator to a different plug-in (for instance, one that does on-screen drawing). + This is the alternate plug-in; you can retrieve the handle to it using \c #GetAnnotatorAlternatePlugin(). + @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). + @param plugin The handle for the alternate plug-in. + */ + AIAPI AIErr (*SetAnnotatorAlternatePlugin) ( AIAnnotatorHandle notifier, SPPluginRef plugin ); + + /** Retrieves the alternate plug-in for the annotator, to which it was added with \c #SetAnnotatorAlternatePlugin(). + @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). + @param plugin [out] A buffer in which to return the alternate plug-in reference. + */ + AIAPI AIErr (*GetAnnotatorAlternatePlugin) ( AIAnnotatorHandle notifier, SPPluginRef *plugin ); + + /** Retrieves annotator options, which determine how the annotation is drawn. + @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). + @param flags [out] A buffer in which to return the options, a logical OR of + \c #AIAnnotatorOptionsFlagValues. + */ + AIAPI AIErr (*GetAnnotatorOptions) ( AIAnnotatorHandle notifier, AIAnnotatorOptionsFlags *flags ); + /** Sets annotator options, which determine how the annotation is drawn. + @param notifier The notifier for the annotator, as returned by \c #AddAnnotator() or \c #GetNthAnnotator(). + @param flags The new options value, a logical OR of \c #AIAnnotatorOptionsFlagValues. + */ + AIAPI AIErr (*SetAnnotatorOptions) ( AIAnnotatorHandle notifier, const AIAnnotatorOptionsFlags flags ); +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAnnotatorDrawer.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAnnotatorDrawer.h index 2cc4181..3527d3c 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAnnotatorDrawer.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAnnotatorDrawer.h @@ -1,447 +1,471 @@ -#ifndef __AIAnnotatorDrawer__ -#define __AIAnnotatorDrawer__ - -/* -* Name: AIAnnotatorDrawer.h -* Author: Started by Chris Quartetti -* Date: 2007 -* Purpose: Adobe Illustrator Annotator Suite. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2007-2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - - -/******************************************************************************* -** -** Imports -** -**/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#include "AIDocumentView.h" -#include "AIFont.h" -#include "AIAGMTypes.h" - -#include "AIHeaderBegin.h" - -// This Windows macro obscures an API -#undef DrawText - -/** @file AIAnnotatorDrawer.h */ - - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIAnnotatorDrawerSuite "AI Annotator Drawer Suite" -#define kAIAnnotatorDrawerSuiteVersion5 AIAPI_VERSION(5) -#define kAIAnnotatorDrawerSuiteVersion kAIAnnotatorDrawerSuiteVersion5 -#define kAIAnnotatorDrawerVersion kAIAnnotatorDrawerSuiteVersion - - -/******************************************************************************* -** -** Types -** -**/ - -class AIAnnotatorDrawer; // Opaque to suite clients - -/** A horizontal alignment value, such as that of text in annotations. -@see \c #AIAnnotatorDrawerSuite::DrawTextAligned() -*/ -enum AIHorizAlignment -{ - kAILeft, ///< Align left - kAICenter, ///< Align center - kAIRight, ///< Align right - kAIHorizDummy = 0xFFFFFFFF ///< Dummy value to ensure 32 bit enums -}; - -/** A vertical alignment value, such as that of text in annotations. -@see \c #AIAnnotatorDrawerSuite::DrawTextAligned() -*/ -enum AIVertAlignment -{ - kAITop, ///< Align top - kAIMiddle, ///< Align middle - kAIBottom, ///< Align bottom - kAIVertDummy = 0xFFFFFFFF ///< Dummy value to ensure 32 bit enums -}; - -/** Preset font constants for drawing text into annotations. -@see \c #AIAnnotatorDrawerSuite::SetFontPreset() -*/ -enum AIAnnotatorFont -{ - kAIAFSmall, ///< Small font - kAIAFMedium, ///< Medium font - kAIAFLarge, ///< Large font - kAIAFDummy = 0xFFFFFFFF ///< Dummy value to ensure 32 bit enums -}; - -/** -Annotator drawing port option bit constants. -@see \c #AIAnnotatorDrawerSuite::SetPortOptions() -*/ -enum AIAnnotatorPortOption -{ - kAIOptionAAGraphics = 0x1, ///< Enable antialiasing of all graphic paths including clips and images - kDummyPortOption = 0x80000000 ///< Dummy value to ensure 32 bit enums -}; - -/******************************************************************************* -** -** Suite Record -** -**/ - -/** @ingroup Errors - See \c #AIAnnotatorDrawerSuite */ -#define kDashBufferTooShortError 'SHRT' -/** @ingroup Errors - See \c #AIAnnotatorDrawerSuite */ -#define kNoStrokeParamsError 'NPRM' -/** @ingroup Errors - See \c #AIAnnotatorDrawerSuite */ -#define kDashArrayTooBigError 'DBIG' -/** @ingroup Errors - See \c #AIAnnotatorDrawerSuite */ -#define kNoDashError 'NDSH' - -/** @ingroup Suites -The annotator drawer suite allows plug-ins to draw annotations into the -document window that are not a part of the artwork. Coordinates are in -document view space. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIAnnotatorDrawerSuite and \c #kAIAnnotatorDrawerVersion. -*/ -struct AIAnnotatorDrawerSuite -{ - /// @name Color - //@{ - /** - Sets the drawing color for an annotation. - Note that this function does not return an error code. - @param drawer The annotation drawer object. - @param color The new color. - */ - AIAPI void (*SetColor)(AIAnnotatorDrawer *drawer, const AIRGBColor &color); - - /** - Retrieves the current drawing color for an annotation. - Note that this function does not return an error code. - @param drawer The annotation drawer object. - @param color [out] A buffer in which to return the color. - */ - AIAPI void (*GetColor)(AIAnnotatorDrawer *drawer, AIRGBColor &color); - //@} - - /// @name Lines and shapes - //@{ - /** Sets the line width for an annotation. - When not explicitly set, the line width is one document point. - @param drawer The annotation drawer object. - @param newWidth The new width in document points. - */ - AIAPI void (*SetLineWidth)(AIAnnotatorDrawer *drawer, const AIReal newWidth); - /** Retrieves the line width for an annotation. - Note that this function returns a numeric value, not an error code. - @param drawer The annotation drawer object. - @return The width in document points. - */ - AIAPI AIReal (*GetLineWidth)(AIAnnotatorDrawer *drawer); - - /** Turns dashed-line drawing on or off for an annotation. - Note that this function does not return an error code. - @param drawer The annotation drawer object. - @param dashed True to turn dashed lines on, false to turn them off. - @see SetLineDashedEx() - */ - AIAPI void (*SetLineDashed)(AIAnnotatorDrawer *drawer, AIBoolean dashed); - /** Reports the current dashed-line drawing state for an annotation. - Note that this function returns a Boolean value, not an error code. - @param drawer The annotation drawer object. - @return True if dashed lines are on, false if they are off. - @see \c #GetLineDashedEx() - */ - AIAPI AIBoolean (*GetLineDashed)(AIAnnotatorDrawer *drawer); - - /** Draws a line between two points in an annotation. - @param drawer The annotation drawer object. - @param start The starting point. - @param end The ending point. - */ - AIAPI AIErr (*DrawLine)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint &end); - /** Draws a rectangle in an annotation. - @param drawer The annotation drawer object. - @param rect The rectangle dimensions. - @param fill True to fill with the current color, false for no fill. - @see \c #SetColor() - */ - AIAPI AIErr (*DrawRect)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill); - - /** Draws a polygon in an annotation by connecting a set of points. - @param drawer The annotation drawer object. - @param points The array of points to connect. - @param numPoints The number of points in the array. - @param fill True to fill with the current color, false for no fill. - @see \c #SetColor() - */ - AIAPI AIErr (*DrawPolygon)(AIAnnotatorDrawer *drawer, const AIPoint points[], ai::uint32 numPoints, AIBoolean fill); - - /** Draws an ellipse bounded by the rectangle in an annotation. - @param drawer The annotation drawer object. - @param rect The rectangle dimensions. - @param fill True to fill with the current color, false for no fill. - @see \c #SetColor() - */ - AIAPI AIErr (*DrawEllipse)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill); - - /** Draws cubic Bezier curves in an annotation by threading through a set of points. - @param start [in] The starting anchor point for the curve - @param pointSets [in] An array of sets of points describing the Bezier. The points in the - inner array, p0, p1, and p2, have the following meaning:
- p0 exit control point for the previous anchor
- p1 entry control point for anchor
- p2 anchor point
- These are in the same order as for the PostScript CurveTo command. - @param numPointSets [in] The number of sets of points in the array. - @param fill True to fill with the current color, false for no fill. - @see \c #SetColor() - */ - AIAPI AIErr (*DrawBezier)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint pointSets[][3], ai::uint32 numPointSets, AIBoolean fill); - - /** Sets the dashing pattern for dashed-line drawing for an annotation. - @param drawer The annotation drawer object. - @param dashData The array of dash and gap lengths, in document points. - @param numDashes The number of entries in the dash array, in the range [1 to 12]. - @see \c #SetLineDashed() - */ - - AIAPI AIErr (*SetLineDashedEx)(AIAnnotatorDrawer *drawer, AIFloat dashData[], ai::int32 numDashes); - - /** Retrieves the dashing pattern for dashed-line drawing for an annotation. - @param drawer The annotation drawer object. - @param dashData [out] An array in which to return the dash and gap lengths, in document points. - @param numDashes [out] A buffer in which to return the number of entries in the dash array, in the range [1 to 12]. - @see \c #GetLineDashed() - */ - AIAPI AIErr (*GetLineDashedEx)(AIAnnotatorDrawer *drawer, AIFloat dashData[], ai::int32 &numDashes); - - //@} - - /// @name Text and Fonts - //@{ - /** Draws text into an annotation. - @param drawer The annotation drawer object. - @param text The text string. - @param bottomLeft The point at which to place the bottom left corner of the text. - */ - AIAPI AIErr (*DrawText)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIPoint &bottomLeft); - - /** Draws text into a rectangle in an annotation, with given alignment. The text does not wrap. - @param drawer The annotation drawer object. - @param text The text string. - @param horizAlign The horizontal alignment of content. - @param vertAlign The vertical alignment of content. - @param rect The rectangle in which to draw. - */ - AIAPI AIErr (*DrawTextAligned)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIHorizAlignment horizAlign, const AIVertAlignment vertAlign, const AIRect &rect); - - /** Finds the bounds of text if it were drawn in the current font at the current size. - @param drawer The annotation drawer object. - @param text[in] The text to be drawn. - @param location [in] A location in document view coordinates, for a relative result. Default is [0,0]. - @param useFontFallback [in] Use system font if it is not possible to draw with current font. - @param bounds [out] A buffer in which to return the coordinates of the text boundary. - If a location is not specified, top left is [0,0]. - */ - AIAPI AIErr (*GetTextBounds)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, AIPoint *location, AIBoolean useFontFallback, AIRect &bounds); - - /** Sets the font size for text drawn into a annotation. - @param drawer The annotation drawer object. - @param size The new font size, in document points. - */ - AIAPI void (*SetFontSize)(AIAnnotatorDrawer *drawer, const AIReal size); - - /** Retrieves the font size for text drawn into a annotation. - Note that this function returns a numeric value, not an error code. - @param drawer The annotation drawer object. - @return The current font size, in document points. - */ - AIAPI AIReal (*GetFontSize)(AIAnnotatorDrawer *drawer); - - /** Sets the font for text drawn into a annotation, using preset font sizes. - @param drawer The annotation drawer object. - @param font The new font preset constant. - */ - AIAPI AIErr (*SetFontPreset)(AIAnnotatorDrawer *drawer, AIAnnotatorFont font); - - /** Sets the font for text drawn into a annotation, using a font key. - @param drawer The annotation drawer object. - @param font The new font key. - */ - AIAPI AIErr (*SetFontByFontKey)(AIAnnotatorDrawer *drawer, AIFontKey font); - - /** Sets the font for text drawn into a annotation, by name. - @param drawer The annotation drawer object. - @param name The new font name. Interpreted as a PostScript font name; or, - if none is found, a platform-encoded font name. - - */ - AIAPI AIErr (*SetFontByName)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &name); - - /** Retrieves the font key for the current font used to draw - text into an annotation. - Note that this function returns a font-key object, not an error code. - @param drawer The annotation drawer object. - @return The font key. - */ - AIAPI AIFontKey (*GetFontKey)(AIAnnotatorDrawer *drawer); - - /** Retrieves the name of the current font used to draw - text into an annotation. - Note that this function does not return an error code. - @param drawer The annotation drawer object. - @param name [out] A buffer in which to return the font name. - */ - AIAPI void (*GetFontName)(AIAnnotatorDrawer *drawer, ai::UnicodeString &name); - //@} - - /// @name Clipping - //@{ - - /** Starts the sequence for defining a clipping path in an annotation. - Everything drawn until the call to \c #DefineClipEnd() - is unioned into the clipping path, after which all drawing is clipped - until the call to \c #ClearClip(). - Shapes drawn for clipping should generally be filled. - Note that this function does not return an error code. - @param drawer The annotation drawer object. - */ - AIAPI void (*DefineClipStart)(AIAnnotatorDrawer *drawer); - - /** Starts the sequence for defining a clipping path in an annotation. - Subsequent drawing is clipped until the call to \c #ClearClip(). - Note that this function does not return an error code. - @param drawer The annotation drawer object. - @see \c #DefineClipStart() - */ - AIAPI void (*DefineClipEnd)(AIAnnotatorDrawer *drawer); - - /** Ends clipping in an annotation and removes the currently defined clipping path. - @param drawer The annotation drawer object. - @see \c #DefineClipStart(), \c #DefineClipEnd() - */ - AIAPI void (*ClearClip)(AIAnnotatorDrawer *drawer); - //@} - - /// @name Miscellaneous - //@{ - /** Turns highlight blending mode on or off in an annotation. It is off by default. - This mode provides extra visibility, like XOR drawing, - but it cannot be used to erase previous marks drawn in highlight mode. - @param drawer The annotation drawer object. - @param highlightOn True to turn highlight mode on, false to turn it off. - */ - AIAPI AIErr (*SetHighlightMode)(AIAnnotatorDrawer *drawer, AIBoolean highlightOn); - - /** Retrieves the current highlight blending mode setting for an annotation. - Note that this function returns a Boolean value, not an error code. - @param drawer The annotation drawer object. - @return True if highlight mode is on. - */ - AIAPI AIBoolean (*GetHighlightMode)(AIAnnotatorDrawer *drawer); - - /** Draws a PNG Image in an annotation. - @param drawer The annotation drawer object. - @param inPNGImageData The raw PNG image data. - @param topLeft The point at which to draw the top left corner. - */ - AIAPI AIErr (*DrawPNGImage)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData, ai::uint32 inDataSize, const AIPoint &topLeft); - - /** Draws a PNG Image centered in a rectangle in an annotation. - @param drawer The annotation drawer object. - @param inPNGImageData The raw PNG image data. - @param rect The rectangle. - */ - AIAPI AIErr (*DrawPNGImageCentered)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData, ai::uint32 inDataSize, const AIRect &rect); - - /** Retrieves an AGM port for an annotation. - Note that this function returns a port object pointer, not an error code. - You must call \c #ReleaseAGMPort() when you are no longer using the port. Failure to release the port causes memory leaks. - @param drawer The annotation drawer object. - */ - AIAPI AIAGMPort* (*GetAGMPort)(AIAnnotatorDrawer *drawer); - - /** Releases an AGM port and sets the pointer to NULL. - Note that this function does not return an error code. - @param aiAGMPort The port pointer. - */ - AIAPI void (*ReleaseAGMPort)(AIAGMPort *&aiAGMPort); - - /** Retrieves the port options for an annotation. Currently, the only public - port option is anti-aliasing mode, represented by the option constant - \c #AIAnnotatorPortOption::kAIOptionAAGraphics. - @param drawer The annotation drawer object. - @param whichOptions A mask for the option bits of interest, - a logical OR of \c #AIAnnotatorPortOption values. - @param options [out] A buffer in which to return the option value, - a logical OR of \c #AIAnnotatorPortOption values masked by the which-options mask. - */ - AIAPI AIErr(*GetPortOptions)(AIAnnotatorDrawer* drawer, ai::uint32 whichOptions, ai::uint32 &options); - - /** Sets the port options for an annotation. Currently, the only public - port option is anti-aliasing mode, represented by the option constant - \c #AIAnnotatorPortOption::kAIOptionAAGraphics. - @param drawer The annotation drawer object. - @param whichOptions A mask for the option bits of interest, - a logical OR of \c #AIAnnotatorPortOption values. - @param options The new options value, a logical OR of \c #AIAnnotatorPortOption - values masked by the which-options mask. - */ - AIAPI AIErr(*SetPortOptions)( AIAnnotatorDrawer* drawer, ai::uint32 whichOptions, ai::uint32 options); - - /** Sets the opacity of an annotation. To avoid transparency buildup, clip drawing to - invalidation rectangles. - @param drawer The annotation drawer object. - @param opacity The new opacity value in the range [0.0 to 1.0]. A value of 1 means fully opaque. - */ - AIAPI AIErr (*SetOpacity)(AIAnnotatorDrawer* drawer, AIReal opacity); - - /** Retrieves the opacity of an annotation. - Note that this function returns a numeric value, not an error code. - @param drawer The annotation drawer object. - @return The opacity value in the range [0.0 to 1.0]. A value of 1 means fully opaque. - - */ - AIAPI AIReal (*GetOpacity)(AIAnnotatorDrawer* drawer); -}; - - -#include "AIHeaderEnd.h" - - -#endif - +#pragma once + +/************************************************************************* + * ADOBE CONFIDENTIAL + * + * Copyright 2018 Adobe Systems Incorporated + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe Systems Incorporated and its suppliers, + * if any. The intellectual and technical concepts contained + * herein are proprietary to Adobe Systems Incorporated and its + * suppliers and are protected by all applicable intellectual property + * laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe Systems Incorporated. + **************************************************************************/ + + +/******************************************************************************* +** +** Imports +** +**/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#include "AIDocumentView.h" +#include "AIFont.h" +#include "AIAGMTypes.h" + +#include "AIHeaderBegin.h" + +// This Windows macro obscures an API +#undef DrawText + +/** @file AIAnnotatorDrawer.h */ + + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIAnnotatorDrawerSuite "AI Annotator Drawer Suite" +#define kAIAnnotatorDrawerSuiteVersion8 AIAPI_VERSION(8) +#define kAIAnnotatorDrawerSuiteVersion kAIAnnotatorDrawerSuiteVersion8 +#define kAIAnnotatorDrawerVersion kAIAnnotatorDrawerSuiteVersion + + +/******************************************************************************* +** +** Types +** +**/ + +class AIAnnotatorDrawer; // Opaque to suite clients + +/** A horizontal alignment value, such as that of text in annotations. +@see \c #AIAnnotatorDrawerSuite::DrawTextAligned() +*/ +enum AIHorizAlignment +{ + kAILeft, ///< Align left + kAICenter, ///< Align center + kAIRight, ///< Align right + kAIHorizDummy = 0xFFFFFFFF ///< Dummy value to ensure 32 bit enums +}; + +/** A vertical alignment value, such as that of text in annotations. +@see \c #AIAnnotatorDrawerSuite::DrawTextAligned() +*/ +enum AIVertAlignment +{ + kAITop, ///< Align top + kAIMiddle, ///< Align middle + kAIBottom, ///< Align bottom + kAIVertDummy = 0xFFFFFFFF ///< Dummy value to ensure 32 bit enums +}; + +/** Preset font constants for drawing text into annotations. +@see \c #AIAnnotatorDrawerSuite::SetFontPreset() +*/ +enum AIAnnotatorFont +{ + kAIAFSmall, ///< Small font + kAIAFMedium, ///< Medium font + kAIAFLarge, ///< Large font + kAIAFDummy = 0xFFFFFFFF ///< Dummy value to ensure 32 bit enums +}; + +/** +Annotator drawing port option bit constants. +@see \c #AIAnnotatorDrawerSuite::SetPortOptions() +*/ +enum AIAnnotatorPortOption +{ + kAIOptionAAGraphics = 0x1, ///< Enable antialiasing of all graphic paths including clips and images + kAIAGMAnnotationRotate = 0x2, ///< Enable Annotation Rotation for plugin annotators + kDummyPortOption = 0x80000000 ///< Dummy value to ensure 32 bit enums +}; + +/******************************************************************************* +** +** Suite Record +** +**/ + +/** @ingroup Errors + See \c #AIAnnotatorDrawerSuite */ +#define kDashBufferTooShortError 'SHRT' +/** @ingroup Errors + See \c #AIAnnotatorDrawerSuite */ +#define kNoStrokeParamsError 'NPRM' +/** @ingroup Errors + See \c #AIAnnotatorDrawerSuite */ +#define kDashArrayTooBigError 'DBIG' +/** @ingroup Errors + See \c #AIAnnotatorDrawerSuite */ +#define kNoDashError 'NDSH' + +/** @ingroup Suites +The annotator drawer suite allows plug-ins to draw annotations into the +document window that are not a part of the artwork. Coordinates are in +document view space. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIAnnotatorDrawerSuite and \c #kAIAnnotatorDrawerVersion. +*/ +struct AIAnnotatorDrawerSuite +{ + /// @name Color + //@{ + /** + Sets the drawing color for an annotation. + Note that this function does not return an error code. + @param drawer The annotation drawer object. + @param color The new color. + */ + AIAPI void (*SetColor)(AIAnnotatorDrawer *drawer, const AIRGBColor &color); + + /** + Retrieves the current drawing color for an annotation. + Note that this function does not return an error code. + @param drawer The annotation drawer object. + @param color [out] A buffer in which to return the color. + */ + AIAPI void (*GetColor)(AIAnnotatorDrawer *drawer, AIRGBColor &color); + //@} + + /// @name Lines and shapes + //@{ + /** Sets the line width for an annotation. + When not explicitly set, the line width is one document point. + @param drawer The annotation drawer object. + @param newWidth The new width in document points. + */ + AIAPI void (*SetLineWidth)(AIAnnotatorDrawer *drawer, const AIReal newWidth); + /** Retrieves the line width for an annotation. + Note that this function returns a numeric value, not an error code. + @param drawer The annotation drawer object. + @return The width in document points. + */ + AIAPI AIReal (*GetLineWidth)(AIAnnotatorDrawer *drawer); + + /** Turns dashed-line drawing on or off for an annotation. + Note that this function does not return an error code. + @param drawer The annotation drawer object. + @param dashed True to turn dashed lines on, false to turn them off. + @see SetLineDashedEx() + */ + AIAPI void (*SetLineDashed)(AIAnnotatorDrawer *drawer, AIBoolean dashed); + /** Reports the current dashed-line drawing state for an annotation. + Note that this function returns a Boolean value, not an error code. + @param drawer The annotation drawer object. + @return True if dashed lines are on, false if they are off. + @see \c #GetLineDashedEx() + */ + AIAPI AIBoolean (*GetLineDashed)(AIAnnotatorDrawer *drawer); + + /** Draws a line between two points in an annotation. + @param drawer The annotation drawer object. + @param start The starting point. + @param end The ending point. + */ + AIAPI AIErr (*DrawLine)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint &end); + /** Draws a rectangle in an annotation. + @param drawer The annotation drawer object. + @param rect The rectangle dimensions. + @param fill True to fill with the current color, false for no fill. + @see \c #SetColor() + */ + AIAPI AIErr (*DrawRect)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill); + + /** Draws a polygon in an annotation by connecting a set of points. + @param drawer The annotation drawer object. + @param points The array of points to connect. + @param numPoints The number of points in the array. + @param fill True to fill with the current color, false for no fill. + @see \c #SetColor() + */ + AIAPI AIErr (*DrawPolygon)(AIAnnotatorDrawer *drawer, const AIPoint points[], ai::uint32 numPoints, AIBoolean fill); + + /** Draws an ellipse bounded by the rectangle in an annotation. + @param drawer The annotation drawer object. + @param rect The rectangle dimensions. + @param fill True to fill with the current color, false for no fill. + @see \c #SetColor() + */ + AIAPI AIErr (*DrawEllipse)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill); + + /** Draws cubic Bezier curves in an annotation by threading through a set of points. + @param start [in] The starting anchor point for the curve + @param pointSets [in] An array of sets of points describing the Bezier. The points in the + inner array, p0, p1, and p2, have the following meaning:
+ p0 exit control point for the previous anchor
+ p1 entry control point for anchor
+ p2 anchor point
+ These are in the same order as for the PostScript CurveTo command. + @param numPointSets [in] The number of sets of points in the array. + @param fill True to fill with the current color, false for no fill. + @see \c #SetColor() + */ + AIAPI AIErr (*DrawBezier)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint pointSets[][3], ai::uint32 numPointSets, AIBoolean fill); + + /** Sets the dashing pattern for dashed-line drawing for an annotation. + @param drawer The annotation drawer object. + @param dashData The array of dash and gap lengths, in document points. + @param numDashes The number of entries in the dash array, in the range [1 to 12]. + @see \c #SetLineDashed() + */ + + AIAPI AIErr (*SetLineDashedEx)(AIAnnotatorDrawer *drawer, AIFloat dashData[], ai::int32 numDashes); + + /** Retrieves the dashing pattern for dashed-line drawing for an annotation. + @param drawer The annotation drawer object. + @param dashData [out] An array in which to return the dash and gap lengths, in document points. + @param numDashes [out] A buffer in which to return the number of entries in the dash array, in the range [1 to 12]. + @see \c #GetLineDashed() + */ + AIAPI AIErr (*GetLineDashedEx)(AIAnnotatorDrawer *drawer, AIFloat dashData[], ai::int32 &numDashes); + + //@} + + /// @name Text and Fonts + //@{ + /** Draws text into an annotation. + @param drawer The annotation drawer object. + @param text The text string. + @param bottomLeft The point at which to place the bottom left corner of the text. + @param allowScaling[in] Scale text drawing with respect to UI scaling + */ + AIAPI AIErr (*DrawText)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIPoint &bottomLeft, AIBoolean allowScaling); + + /** Draws text into a rectangle in an annotation, with given alignment. The text does not wrap. + @param drawer The annotation drawer object. + @param text The text string. + @param horizAlign The horizontal alignment of content. + @param vertAlign The vertical alignment of content. + @param rect The rectangle in which to draw. + @param allowScaling[in] Scale text drawing with respect to UI scaling + */ + AIAPI AIErr (*DrawTextAligned)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIHorizAlignment horizAlign, const AIVertAlignment vertAlign, const AIRect &rect, AIBoolean allowScaling); + + /** Finds the bounds of text if it were drawn in the current font at the current size. + @param drawer The annotation drawer object. + @param text[in] The text to be drawn. + @param location [in] A location in document view coordinates, for a relative result. Default is [0,0]. + @param useFontFallback [in] Use system font if it is not possible to draw with current font. + @param bounds [out] A buffer in which to return the coordinates of the text boundary. + If a location is not specified, top left is [0,0]. + @param allowScaling[in] returned Scaled text bound + */ + AIAPI AIErr (*GetTextBounds)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, AIPoint *location, AIBoolean useFontFallback, AIRect &bounds, AIBoolean allowScaling); + + /** Sets the font size for text drawn into a annotation. + @param drawer The annotation drawer object. + @param size The new font size, in document points. + */ + AIAPI void (*SetFontSize)(AIAnnotatorDrawer *drawer, const AIReal size); + + /** Retrieves the font size for text drawn into a annotation. + Note that this function returns a numeric value, not an error code. + @param drawer The annotation drawer object. + @return The current font size, in document points. + */ + AIAPI AIReal (*GetFontSize)(AIAnnotatorDrawer *drawer); + + /** Sets the font for text drawn into a annotation, using preset font sizes. + @param drawer The annotation drawer object. + @param font The new font preset constant. + */ + AIAPI AIErr (*SetFontPreset)(AIAnnotatorDrawer *drawer, AIAnnotatorFont font); + + /** Sets the font for text drawn into a annotation, using a font key. + @param drawer The annotation drawer object. + @param font The new font key. + */ + AIAPI AIErr (*SetFontByFontKey)(AIAnnotatorDrawer *drawer, AIFontKey font); + + /** Sets the font for text drawn into a annotation, by name. + @param drawer The annotation drawer object. + @param name The new font name. Interpreted as a PostScript font name; or, + if none is found, a platform-encoded font name. + + */ + AIAPI AIErr (*SetFontByName)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &name); + + /** Retrieves the font key for the current font used to draw + text into an annotation. + Note that this function returns a font-key object, not an error code. + @param drawer The annotation drawer object. + @return The font key. + */ + AIAPI AIFontKey (*GetFontKey)(AIAnnotatorDrawer *drawer); + + /** Retrieves the name of the current font used to draw + text into an annotation. + Note that this function does not return an error code. + @param drawer The annotation drawer object. + @param name [out] A buffer in which to return the font name. + */ + AIAPI void (*GetFontName)(AIAnnotatorDrawer *drawer, ai::UnicodeString &name); + //@} + + /// @name Clipping + //@{ + + /** Starts the sequence for defining a clipping path in an annotation. + Everything drawn until the call to \c #DefineClipEnd() + is unioned into the clipping path, after which all drawing is clipped + until the call to \c #ClearClip(). + Shapes drawn for clipping should generally be filled. + Note that this function does not return an error code. + @param drawer The annotation drawer object. + */ + AIAPI void (*DefineClipStart)(AIAnnotatorDrawer *drawer); + + /** Starts the sequence for defining a clipping path in an annotation. + Subsequent drawing is clipped until the call to \c #ClearClip(). + Note that this function does not return an error code. + @param drawer The annotation drawer object. + @see \c #DefineClipStart() + */ + AIAPI void (*DefineClipEnd)(AIAnnotatorDrawer *drawer); + + /** Ends clipping in an annotation and removes the currently defined clipping path. + @param drawer The annotation drawer object. + @see \c #DefineClipStart(), \c #DefineClipEnd() + */ + AIAPI void (*ClearClip)(AIAnnotatorDrawer *drawer); + //@} + + /// @name Miscellaneous + //@{ + /** Turns highlight blending mode on or off in an annotation. It is off by default. + This mode provides extra visibility, like XOR drawing, + but it cannot be used to erase previous marks drawn in highlight mode. + @param drawer The annotation drawer object. + @param highlightOn True to turn highlight mode on, false to turn it off. + */ + AIAPI AIErr (*SetHighlightMode)(AIAnnotatorDrawer *drawer, AIBoolean highlightOn); + + /** Retrieves the current highlight blending mode setting for an annotation. + Note that this function returns a Boolean value, not an error code. + @param drawer The annotation drawer object. + @return True if highlight mode is on. + */ + AIAPI AIBoolean (*GetHighlightMode)(AIAnnotatorDrawer *drawer); + + /** Draws a PNG Image in an annotation. + @param drawer The annotation drawer object. + @param inPNGImageData The raw PNG image data. + @param topLeft The point at which to draw the top left corner. + */ + AIAPI AIErr (*DrawPNGImage)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData, ai::uint32 inDataSize, const AIPoint &topLeft); + + /** Draws a PNG Image centered in a rectangle in an annotation. + @param drawer The annotation drawer object. + @param inPNGImageData The raw PNG image data. + @param rect The rectangle. + */ + AIAPI AIErr (*DrawPNGImageCentered)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData, ai::uint32 inDataSize, const AIRect &rect); + + /** Draws a PNG Image in an annotation without scaling the image to document dpi. + @param drawer The annotation drawer object. + @param inPNGImageData The raw PNG image data. + @param topLeft The point at which to draw the top left corner. + */ + AIAPI AIErr (*DrawPNGImageUnscaled)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData, ai::uint32 inDataSize, const AIPoint &topLeft); + + /** Draws a PNG Image centered in a rectangle in an annotation without scaling the image to document dpi. + @param drawer The annotation drawer object. + @param inPNGImageData The raw PNG image data. + @param rect The rectangle. + */ + AIAPI AIErr (*DrawPNGImageCenteredUnscaled)(AIAnnotatorDrawer *drawer, const ai::uint8* inPNGImageData, ai::uint32 inDataSize, const AIRect &rect); + + /** Retrieves an AGM port for an annotation. + Note that this function returns a port object pointer, not an error code. + You must call \c #ReleaseAGMPort() when you are no longer using the port. Failure to release the port causes memory leaks. + @param drawer The annotation drawer object. + */ + AIAPI AIAGMPort* (*GetAGMPort)(AIAnnotatorDrawer *drawer); + + /** Releases an AGM port and sets the pointer to NULL. + Note that this function does not return an error code. + @param aiAGMPort The port pointer. + */ + AIAPI void (*ReleaseAGMPort)(AIAGMPort *&aiAGMPort); + + /** Retrieves the port options for an annotation. Currently, the only public + port option is anti-aliasing mode, represented by the option constant + \c #AIAnnotatorPortOption::kAIOptionAAGraphics. + @param drawer The annotation drawer object. + @param whichOptions A mask for the option bits of interest, + a logical OR of \c #AIAnnotatorPortOption values. + @param options [out] A buffer in which to return the option value, + a logical OR of \c #AIAnnotatorPortOption values masked by the which-options mask. + */ + AIAPI AIErr(*GetPortOptions)(AIAnnotatorDrawer* drawer, ai::uint32 whichOptions, ai::uint32 &options); + + /** Sets the port options for an annotation. Currently, the only public + port option is anti-aliasing mode, represented by the option constant + \c #AIAnnotatorPortOption::kAIOptionAAGraphics. + @param drawer The annotation drawer object. + @param whichOptions A mask for the option bits of interest, + a logical OR of \c #AIAnnotatorPortOption values. + @param options The new options value, a logical OR of \c #AIAnnotatorPortOption + values masked by the which-options mask. + */ + AIAPI AIErr(*SetPortOptions)( AIAnnotatorDrawer* drawer, ai::uint32 whichOptions, ai::uint32 options); + + /** Sets the opacity of an annotation. To avoid transparency buildup, clip drawing to + invalidation rectangles. + @param drawer The annotation drawer object. + @param opacity The new opacity value in the range [0.0 to 1.0]. A value of 1 means fully opaque. + */ + AIAPI AIErr (*SetOpacity)(AIAnnotatorDrawer* drawer, AIReal opacity); + + /** Retrieves the opacity of an annotation. + Note that this function returns a numeric value, not an error code. + @param drawer The annotation drawer object. + @return The opacity value in the range [0.0 to 1.0]. A value of 1 means fully opaque. + + */ + AIAPI AIReal (*GetOpacity)(AIAnnotatorDrawer* drawer); + + /** Save current state of drawer's rendering + @param drawer The annotation drawer object. + */ + AIAPI AIErr(*Save)( AIAnnotatorDrawer* drawer); + + /** Restore last of drawer's rendering + @param drawer The annotation drawer object. + */ + AIAPI AIErr(*Restore)( AIAnnotatorDrawer* drawer); +}; + + +#include "AIHeaderEnd.h" + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIApplication.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIApplication.h index c60474e..9dbc502 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIApplication.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIApplication.h @@ -1,95 +1,95 @@ -#ifndef __AIApplication__ -#define __AIApplication__ - -/* - * Name: AIApplication.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Document Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __DocumentList__ -#include "AIDocumentList.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIApplication.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIApplicationSuite "AI Application Suite" -#define kAIApplicationSuiteVersion3 AIAPI_VERSION(3) - -// latest version -#define kAIApplicationSuiteVersion kAIApplicationSuiteVersion3 -#define kAIApplicationVersion kAIApplicationSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - The Application suite provides functions for querying and controlling the state - of a plug-in host application. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIApplicationSuite and \c #kAIApplicationVersion. - */ - -typedef struct { - - /** Instructs the application to quit. This is identical to the user issuing a quit command. */ - AIAPI AIErr (*Quit) (); - /** Returns true if this is the first time the application has run. Not implemented.Always returns false. */ - AIAPI ASBoolean (*IsFirstTime)(); - /** Returns true if the application visible. Only implemented in Windows. */ - AIAPI ASBoolean (*IsVisible)(); - /** Hide or show the application. Not implemented. */ - AIAPI AIErr (*SetVisible)(ASBoolean bVisible); - -} AIApplicationSuite; - - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIApplication__ +#define __AIApplication__ + +/* + * Name: AIApplication.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Document Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __DocumentList__ +#include "AIDocumentList.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIApplication.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIApplicationSuite "AI Application Suite" +#define kAIApplicationSuiteVersion3 AIAPI_VERSION(3) + +// latest version +#define kAIApplicationSuiteVersion kAIApplicationSuiteVersion3 +#define kAIApplicationVersion kAIApplicationSuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + The Application suite provides functions for querying and controlling the state + of a plug-in host application. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIApplicationSuite and \c #kAIApplicationVersion. + */ + +typedef struct { + + /** Instructs the application to quit. This is identical to the user issuing a quit command. */ + AIAPI AIErr (*Quit) (); + /** Returns true if this is the first time the application has run. Not implemented.Always returns false. */ + AIAPI ASBoolean (*IsFirstTime)(); + /** Returns true if the application visible. Only implemented in Windows. */ + AIAPI ASBoolean (*IsVisible)(); + /** Hide or show the application. Not implemented. */ + AIAPI AIErr (*SetVisible)(ASBoolean bVisible); + +} AIApplicationSuite; + + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArray.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArray.h index d0f0bd5..b88a307 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArray.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArray.h @@ -1,416 +1,416 @@ -#ifndef __AIArray__ -#define __AIArray__ - -/* - * Name: AIArray.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Array Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1999-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIEntry__ -#include "AIEntry.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIArray.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - - -#define kAIArraySuite "AI Array Suite" -#define kAIArraySuiteVersion6 AIAPI_VERSION(6) -#define kAIArraySuiteVersion kAIArraySuiteVersion6 -#define kAIArrayVersion kAIArraySuiteVersion - - -// Array errors. - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite defines the array, a heterogeneous container whose elements are - accessed by sequential integer indices. - - Entries (of type \c AIEntryRef), can be inserted into and removed - from the array. The AIEntry suite provides methods to construct and - query entries of different types. See \c apiAIEntry.h. - Entries can be of simple types such as booleans, integers, floats, and strings - and complex types such as other arrays, dictionaries and references to document - objects including art objects, brushes and styles. - This makes arrays a very flexible and powerful container. - - Arrays can themselves be stored in other containers such as other arrays - or dictionaries. In particular they can be stored in the dictionaries - attached to art objects and to the document. When an array is stored in - one of these places (directly or indirectly) it is read and written as - a part of the document. - - @see AIEntrySuite, AIDictionarySuite, AIArtSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIArraySuite and \c #kAIArrayVersion. - */ -typedef struct AIArraySuite { - - /** Creates a new array. - Arrays are reference counted. Initial reference count is 1. - Use \c #AddRef() to increment the count, and \c #Release() to decrement the count. - @param array [out] A buffer in which to return the new array reference. - */ - AIAPI AIErr (*CreateArray) ( AIArrayRef* array ); - - - /** Increments the reference count for an array. - When you create an array, the initial count is 1. - Use \c #Release() to decrement the count. - (Note that this function returns a numeric value, not an error code.) - @param array The array reference. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) ( AIArrayRef array ); - - /** Decrements the reference count for an array, and - frees the memory when the reference count is 0. - When you create an array, the initial count is 1. - Use \c #AddRef() to increment the count. - (Note that this function returns a numeric value, not an error code.) - @param array The array reference. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) ( AIArrayRef array ); - - /** Makes an exact duplicate of a source array. Performs a deep copy. - @param src The array reference for the source. - @param dest [out] buffer in which to return the new array. - */ - AIAPI AIErr (*Clone) ( AIArrayRef src, AIArrayRef* dst ); - /** Makes a copy of a source array by replacing the current contents of the destination array. - @param array The reference for the array to be replaced. - @param src The array reference for the source. - */ - AIAPI AIErr (*Copy) ( AIArrayRef array, AIArrayRef src ); - - /** Returns the number of entries in an array. - The index position of an entry is in the range [0..Size(array) - 1]. - Note this returns a number, not an error code. - @param array The array reference. - @return The number of entries in the array. - */ - AIAPI ai::int32 (*Size) ( AIArrayRef array ); - /** Removes an entry from an array. - @param array The array reference. - @param i The 0-based index position of the entry. - */ - AIAPI AIErr (*DeleteEntry) ( AIArrayRef array, ai::int32 i ); - /** Inserts an entry into an array at the given index. - The new entry is assigned an arbitrary initial value. - @param array The array reference. - @param i The 0-based index position of the new entry. - */ - AIAPI AIErr (*InsertEntry) ( AIArrayRef array, ai::int32 i ); - - /** Gets the data type of an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param type [out] A buffer in which to return the type. See \c apiAIEntry.h. - */ - AIAPI AIErr (*GetEntryType) ( AIArrayRef array, ai::int32 i, AIEntryType* type ); - - /** Copies an entry from one array to another, or to another position in the same array. - @param array1 The array reference for the source. - @param array2 The array reference for the destination. Can be the same array, or different one. - @param position1 The 0-based index position of the source entry. - @param position2 The 0-based index position of the destination entry. - - */ - AIAPI AIErr (*CopyEntry) ( AIArrayRef array1, AIArrayRef array2, ai::int32 position1, - ai::int32 position2 ); - - /** Moves an entry from one array to another, or to another position in the same array. - @param array1 The array reference for the source. - @param array2 The array reference for the destination. Can be the same array, or different one. - @param position1 The 0-based index position of the source entry. - @param position2 The 0-based index position of the destination entry. - @param newposition [out] (Optional) A buffer in which to return the position of - the entry in \c array2 after the move. - */ - AIAPI AIErr (*MoveEntry) ( AIArrayRef array1, AIArrayRef array2, ai::int32 position1, - ai::int32 position2, ai::int32* newposition ); - - /** Swaps two entries in two arrays, or in the same array. - @param array1 The first array reference. - @param array2 The second array reference. Can be the same array, or different one. - @param position1 The 0-based index position of the first entry. - @param position2 The 0-based index position of the second entry. - */ - AIAPI AIErr (*SwapEntries) ( AIArrayRef array1, AIArrayRef array2, ai::int32 position1, - ai::int32 position2 ); - - /** Gets an art-object array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param type [out] A buffer in which to return the entry. - */ - - AIAPI AIErr (*GetArtEntry) ( AIArrayRef array, ai::int32 i, AIArtHandle* art ); - /** Sets the value of an array entry to be a new art object of the specified type. - @param array The array reference. - @param i The 0-based index position of the entry. - @param type The type of art object. See \c apiAIArt.h. - */ - - AIAPI AIErr (*NewArtEntry) ( AIArrayRef array, ai::int32 i, ai::int16 type ); - - /** Moves an art object from the artwork tree into an array. - @param array The array reference. - @param i The 0-based index position of the entry. - @param art The art object. See \c apiAIArt.h. - */ - - AIAPI AIErr (*MoveArtToEntry) ( AIArrayRef array, ai::int32 i, AIArtHandle art ); - - /** Moves an art object to the artwork tree from an array. - The entry is not deleted from the array, but instead is set to an arbitrary value. - @param array The array reference. - @param i The 0-based index position of the entry. - @param paintOrder The paint order of the art object in the art tree. See \c apiAIArt.h. - @param prep The prepositional object for the paint order. See \c apiAIArt.h. - @param art The art object. See \c apiAIArt.h. - */ - - AIAPI AIErr (*MoveEntryToArt) ( AIArrayRef array, ai::int32 i, ai::int16 paintOrder, - AIArtHandle prep, AIArtHandle* art ); - - - /** Copies an art object from the art tree into an array. - @param array The array reference. - @param i The 0-based index position of the entry. - @param art The art object. See \c apiAIArt.h. - */ - - AIAPI AIErr (*CopyArtToEntry) ( AIArrayRef array, ai::int32 i, AIArtHandle art ); - - /** Copies an art object from an array into the art tree. - @param array The array reference. - @param i The 0-based index position of the entry. - @param paintOrder The paint order of the art object in the art tree. See \c apiAIArt.h. - @param prep The prepositional object for the paint order. See \c apiAIArt.h. - @param art The art object. See \c apiAIArt.h. - */ - - AIAPI AIErr (*CopyEntryToArt) ( AIArrayRef array, ai::int32 i, ai::int16 paintOrder, - AIArtHandle prep, AIArtHandle* art ); - - /** Sets an array entry to refer to the topmost group of a layer. - @param array The array reference. - @param i The 0-based index position of the entry. - @param layer The layer reference. - */ - - AIAPI AIErr (*SetEntryToLayer) ( AIArrayRef array, ai::int32 i, AILayerHandle layer ); - - /** Inserts a new layer in the current document, from a group array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - Must be an art object, of type \c #kGroupArt. - @param paintOrder The paint order of the art object in the art tree. Valid values are - \c #kPlaceDefault, \c #kPlaceAbove, \c #kPlaceBelow, \c #kPlaceAboveAll and \c #kPlaceBelowAll. - @param prep The prepositional object for the paint order. - @param layer [out] A buffer in which to return the new layer reference. - */ - - AIAPI AIErr (*SetLayerToEntry) ( AIArrayRef array, ai::int32 i, ai::int16 paintOrder, - AILayerHandle prep, AILayerHandle *layer ); - - /** Retrieves an array entry by position index. - (Note this returns an array entry reference, not an error code.) - @param array The array reference. - @param i The 0-based index position of the entry. - @return The array entry, or a null entry if one does not exist. - */ - - AIAPI AIEntryRef (*Get) ( AIArrayRef array, ai::int32 i ); - - /** Adds an array entry at a given position index. - @param array The array reference. - @param i The 0-based index position of the entry. - @param entry The array entry reference. See \c apiAIEntry.h. - @see \c #AppendEntry() - */ - - AIAPI AIErr (*Set) ( AIArrayRef array, ai::int32 i, AIEntryRef entry ); - - - // the following are convenience APIs for getting and setting entries of the basic types - - /** Retrieves a boolean value from an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetBooleanEntry) ( AIArrayRef array, ai::int32 i, ASBoolean* value ); - - /** Sets a boolean value for an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value The new value. - */ - AIAPI AIErr (*SetBooleanEntry) ( AIArrayRef array, ai::int32 i, AIBoolean value ); - - /** Retrieves an integer value from an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetIntegerEntry) ( AIArrayRef array, ai::int32 i, ai::int32* value ); - - /** Sets an integer value for an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value The new value. - */ - AIAPI AIErr (*SetIntegerEntry) ( AIArrayRef array, ai::int32 i, ai::int32 value ); - - /** Retrieves a \c real value from an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRealEntry) ( AIArrayRef array, ai::int32 i, AIReal* value ); - - /** Sets a \c real value for an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value The new value. - */ - AIAPI AIErr (*SetRealEntry) ( AIArrayRef array, ai::int32 i, AIReal value ); - - /** Retrieves a string value from an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetStringEntry) ( AIArrayRef array, ai::int32 i, const char** value ); - - /** Sets a string value for an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value The new value. - */ - AIAPI AIErr (*SetStringEntry) ( AIArrayRef array, ai::int32 i, const char* value ); - - /** Retrieves a binary value from an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value [out] A buffer in which to return the value. - @param size [out] The number of bytes in \c value. - */ - AIAPI AIErr (*GetBinaryEntry) ( AIArrayRef array, ai::int32 i, void* value, ASInt32* size ); - - /** Sets a binary value for an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value A pointer to the new value. - @param size The number of bytes in \c value. - */ - AIAPI AIErr (*SetBinaryEntry) ( AIArrayRef array, ai::int32 i, void* value, ai::int32 size ); - - /** Retrieves a dictionary value from an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDictEntry) ( AIArrayRef array, ai::int32 i, AIDictionaryRef* value ); - - /** Sets a dictionary value for an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value The new value. - */ - AIAPI AIErr (*SetDictEntry) ( AIArrayRef array, ai::int32 i, AIDictionaryRef value ); - - /** Retrieves an array value from an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetArrayEntry) ( AIArrayRef array, ai::int32 i, AIArrayRef* value ); - - /** Sets an array value for an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value The new value. - */ - AIAPI AIErr (*SetArrayEntry) ( AIArrayRef array, ai::int32 i, AIArrayRef value ); - - /** Retrieves a Unicode string value from an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetUnicodeStringEntry) ( AIArrayRef array, ai::int32 i, ai::UnicodeString& value ); - - /** Sets a Unicode string value for an array entry. - @param array The array reference. - @param i The 0-based index position of the entry. - @param value The new value. - */ - AIAPI AIErr (*SetUnicodeStringEntry) ( AIArrayRef array, ai::int32 i, const ai::UnicodeString& value ); - - /** Adds an entry at the end of an array. - @param array The array reference. - @param entry The array entry reference. See \c apiAIEntry.h. - @see \c #Set() - */ - AIAPI AIErr (*AppendEntry) ( AIArrayRef array, AIEntryRef entry ); - - /** Reserves a minimum length of storage for an array. - @param array The array reference. - @param count The number of entries to reserve. - */ - AIAPI AIErr (*Reserve) ( AIArrayRef array, ai::int32 count ); - -} AIArraySuite; - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIArray__ +#define __AIArray__ + +/* + * Name: AIArray.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator Array Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1999-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIEntry__ +#include "AIEntry.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIArray.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + + +#define kAIArraySuite "AI Array Suite" +#define kAIArraySuiteVersion6 AIAPI_VERSION(6) +#define kAIArraySuiteVersion kAIArraySuiteVersion6 +#define kAIArrayVersion kAIArraySuiteVersion + + +// Array errors. + +/******************************************************************************* + ** + ** Types + ** + **/ + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite defines the array, a heterogeneous container whose elements are + accessed by sequential integer indices. + + Entries (of type \c AIEntryRef), can be inserted into and removed + from the array. The AIEntry suite provides methods to construct and + query entries of different types. See \c apiAIEntry.h. + Entries can be of simple types such as booleans, integers, floats, and strings + and complex types such as other arrays, dictionaries and references to document + objects including art objects, brushes and styles. + This makes arrays a very flexible and powerful container. + + Arrays can themselves be stored in other containers such as other arrays + or dictionaries. In particular they can be stored in the dictionaries + attached to art objects and to the document. When an array is stored in + one of these places (directly or indirectly) it is read and written as + a part of the document. + + @see AIEntrySuite, AIDictionarySuite, AIArtSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIArraySuite and \c #kAIArrayVersion. + */ +typedef struct AIArraySuite { + + /** Creates a new array. + Arrays are reference counted. Initial reference count is 1. + Use \c #AddRef() to increment the count, and \c #Release() to decrement the count. + @param array [out] A buffer in which to return the new array reference. + */ + AIAPI AIErr (*CreateArray) ( AIArrayRef* array ); + + + /** Increments the reference count for an array. + When you create an array, the initial count is 1. + Use \c #Release() to decrement the count. + (Note that this function returns a numeric value, not an error code.) + @param array The array reference. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) ( AIArrayRef array ); + + /** Decrements the reference count for an array, and + frees the memory when the reference count is 0. + When you create an array, the initial count is 1. + Use \c #AddRef() to increment the count. + (Note that this function returns a numeric value, not an error code.) + @param array The array reference. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) ( AIArrayRef array ); + + /** Makes an exact duplicate of a source array. Performs a deep copy. + @param src The array reference for the source. + @param dest [out] buffer in which to return the new array. + */ + AIAPI AIErr (*Clone) ( AIArrayRef src, AIArrayRef* dst ); + /** Makes a copy of a source array by replacing the current contents of the destination array. + @param array The reference for the array to be replaced. + @param src The array reference for the source. + */ + AIAPI AIErr (*Copy) ( AIArrayRef array, AIArrayRef src ); + + /** Returns the number of entries in an array. + The index position of an entry is in the range [0..Size(array) - 1]. + Note this returns a number, not an error code. + @param array The array reference. + @return The number of entries in the array. + */ + AIAPI ai::int32 (*Size) ( AIArrayRef array ); + /** Removes an entry from an array. + @param array The array reference. + @param i The 0-based index position of the entry. + */ + AIAPI AIErr (*DeleteEntry) ( AIArrayRef array, ai::int32 i ); + /** Inserts an entry into an array at the given index. + The new entry is assigned an arbitrary initial value. + @param array The array reference. + @param i The 0-based index position of the new entry. + */ + AIAPI AIErr (*InsertEntry) ( AIArrayRef array, ai::int32 i ); + + /** Gets the data type of an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param type [out] A buffer in which to return the type. See \c apiAIEntry.h. + */ + AIAPI AIErr (*GetEntryType) ( AIArrayRef array, ai::int32 i, AIEntryType* type ); + + /** Copies an entry from one array to another, or to another position in the same array. + @param array1 The array reference for the source. + @param array2 The array reference for the destination. Can be the same array, or different one. + @param position1 The 0-based index position of the source entry. + @param position2 The 0-based index position of the destination entry. + + */ + AIAPI AIErr (*CopyEntry) ( AIArrayRef array1, AIArrayRef array2, ai::int32 position1, + ai::int32 position2 ); + + /** Moves an entry from one array to another, or to another position in the same array. + @param array1 The array reference for the source. + @param array2 The array reference for the destination. Can be the same array, or different one. + @param position1 The 0-based index position of the source entry. + @param position2 The 0-based index position of the destination entry. + @param newposition [out] (Optional) A buffer in which to return the position of + the entry in \c array2 after the move. + */ + AIAPI AIErr (*MoveEntry) ( AIArrayRef array1, AIArrayRef array2, ai::int32 position1, + ai::int32 position2, ai::int32* newposition ); + + /** Swaps two entries in two arrays, or in the same array. + @param array1 The first array reference. + @param array2 The second array reference. Can be the same array, or different one. + @param position1 The 0-based index position of the first entry. + @param position2 The 0-based index position of the second entry. + */ + AIAPI AIErr (*SwapEntries) ( AIArrayRef array1, AIArrayRef array2, ai::int32 position1, + ai::int32 position2 ); + + /** Gets an art-object array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param type [out] A buffer in which to return the entry. + */ + + AIAPI AIErr (*GetArtEntry) ( AIArrayRef array, ai::int32 i, AIArtHandle* art ); + /** Sets the value of an array entry to be a new art object of the specified type. + @param array The array reference. + @param i The 0-based index position of the entry. + @param type The type of art object. See \c apiAIArt.h. + */ + + AIAPI AIErr (*NewArtEntry) ( AIArrayRef array, ai::int32 i, ai::int16 type ); + + /** Moves an art object from the artwork tree into an array. + @param array The array reference. + @param i The 0-based index position of the entry. + @param art The art object. See \c apiAIArt.h. + */ + + AIAPI AIErr (*MoveArtToEntry) ( AIArrayRef array, ai::int32 i, AIArtHandle art ); + + /** Moves an art object to the artwork tree from an array. + The entry is not deleted from the array, but instead is set to an arbitrary value. + @param array The array reference. + @param i The 0-based index position of the entry. + @param paintOrder The paint order of the art object in the art tree. See \c apiAIArt.h. + @param prep The prepositional object for the paint order. See \c apiAIArt.h. + @param art The art object. See \c apiAIArt.h. + */ + + AIAPI AIErr (*MoveEntryToArt) ( AIArrayRef array, ai::int32 i, ai::int16 paintOrder, + AIArtHandle prep, AIArtHandle* art ); + + + /** Copies an art object from the art tree into an array. + @param array The array reference. + @param i The 0-based index position of the entry. + @param art The art object. See \c apiAIArt.h. + */ + + AIAPI AIErr (*CopyArtToEntry) ( AIArrayRef array, ai::int32 i, AIArtHandle art ); + + /** Copies an art object from an array into the art tree. + @param array The array reference. + @param i The 0-based index position of the entry. + @param paintOrder The paint order of the art object in the art tree. See \c apiAIArt.h. + @param prep The prepositional object for the paint order. See \c apiAIArt.h. + @param art The art object. See \c apiAIArt.h. + */ + + AIAPI AIErr (*CopyEntryToArt) ( AIArrayRef array, ai::int32 i, ai::int16 paintOrder, + AIArtHandle prep, AIArtHandle* art ); + + /** Sets an array entry to refer to the topmost group of a layer. + @param array The array reference. + @param i The 0-based index position of the entry. + @param layer The layer reference. + */ + + AIAPI AIErr (*SetEntryToLayer) ( AIArrayRef array, ai::int32 i, AILayerHandle layer ); + + /** Inserts a new layer in the current document, from a group array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + Must be an art object, of type \c #kGroupArt. + @param paintOrder The paint order of the art object in the art tree. Valid values are + \c #kPlaceDefault, \c #kPlaceAbove, \c #kPlaceBelow, \c #kPlaceAboveAll and \c #kPlaceBelowAll. + @param prep The prepositional object for the paint order. + @param layer [out] A buffer in which to return the new layer reference. + */ + + AIAPI AIErr (*SetLayerToEntry) ( AIArrayRef array, ai::int32 i, ai::int16 paintOrder, + AILayerHandle prep, AILayerHandle *layer ); + + /** Retrieves an array entry by position index. + (Note this returns an array entry reference, not an error code.) + @param array The array reference. + @param i The 0-based index position of the entry. + @return The array entry, or a null entry if one does not exist. + */ + + AIAPI AIEntryRef (*Get) ( AIArrayRef array, ai::int32 i ); + + /** Adds an array entry at a given position index. + @param array The array reference. + @param i The 0-based index position of the entry. + @param entry The array entry reference. See \c apiAIEntry.h. + @see \c #AppendEntry() + */ + + AIAPI AIErr (*Set) ( AIArrayRef array, ai::int32 i, AIEntryRef entry ); + + + // the following are convenience APIs for getting and setting entries of the basic types + + /** Retrieves a boolean value from an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetBooleanEntry) ( AIArrayRef array, ai::int32 i, ASBoolean* value ); + + /** Sets a boolean value for an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value The new value. + */ + AIAPI AIErr (*SetBooleanEntry) ( AIArrayRef array, ai::int32 i, AIBoolean value ); + + /** Retrieves an integer value from an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetIntegerEntry) ( AIArrayRef array, ai::int32 i, ai::int32* value ); + + /** Sets an integer value for an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value The new value. + */ + AIAPI AIErr (*SetIntegerEntry) ( AIArrayRef array, ai::int32 i, ai::int32 value ); + + /** Retrieves a \c real value from an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRealEntry) ( AIArrayRef array, ai::int32 i, AIReal* value ); + + /** Sets a \c real value for an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value The new value. + */ + AIAPI AIErr (*SetRealEntry) ( AIArrayRef array, ai::int32 i, AIReal value ); + + /** Retrieves a string value from an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetStringEntry) ( AIArrayRef array, ai::int32 i, const char** value ); + + /** Sets a string value for an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value The new value. + */ + AIAPI AIErr (*SetStringEntry) ( AIArrayRef array, ai::int32 i, const char* value ); + + /** Retrieves a binary value from an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value [out] A buffer in which to return the value. + @param size [out] The number of bytes in \c value. + */ + AIAPI AIErr (*GetBinaryEntry) ( AIArrayRef array, ai::int32 i, void* value, ASInt32* size ); + + /** Sets a binary value for an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value A pointer to the new value. + @param size The number of bytes in \c value. + */ + AIAPI AIErr (*SetBinaryEntry) ( AIArrayRef array, ai::int32 i, void* value, ai::int32 size ); + + /** Retrieves a dictionary value from an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetDictEntry) ( AIArrayRef array, ai::int32 i, AIDictionaryRef* value ); + + /** Sets a dictionary value for an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value The new value. + */ + AIAPI AIErr (*SetDictEntry) ( AIArrayRef array, ai::int32 i, AIDictionaryRef value ); + + /** Retrieves an array value from an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetArrayEntry) ( AIArrayRef array, ai::int32 i, AIArrayRef* value ); + + /** Sets an array value for an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value The new value. + */ + AIAPI AIErr (*SetArrayEntry) ( AIArrayRef array, ai::int32 i, AIArrayRef value ); + + /** Retrieves a Unicode string value from an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetUnicodeStringEntry) ( AIArrayRef array, ai::int32 i, ai::UnicodeString& value ); + + /** Sets a Unicode string value for an array entry. + @param array The array reference. + @param i The 0-based index position of the entry. + @param value The new value. + */ + AIAPI AIErr (*SetUnicodeStringEntry) ( AIArrayRef array, ai::int32 i, const ai::UnicodeString& value ); + + /** Adds an entry at the end of an array. + @param array The array reference. + @param entry The array entry reference. See \c apiAIEntry.h. + @see \c #Set() + */ + AIAPI AIErr (*AppendEntry) ( AIArrayRef array, AIEntryRef entry ); + + /** Reserves a minimum length of storage for an array. + @param array The array reference. + @param count The number of entries to reserve. + */ + AIAPI AIErr (*Reserve) ( AIArrayRef array, ai::int32 count ); + +} AIArraySuite; + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArt.h index 5d63d2b..84da006 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArt.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArt.h @@ -1,1224 +1,1361 @@ -#ifndef __AIArt__ -#define __AIArt__ - -/* - * Name: AIArt.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Artwork Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AITypes.h" -#include "AILayer.h" - - -#include "AIHeaderBegin.h" - -/** @file AIArt.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIArtSuite "AI Art Suite" -#define kAIArtSuiteVersion18 AIAPI_VERSION(18) -#define kAIArtSuiteVersion kAIArtSuiteVersion18 -#define kAIArtVersion kAIArtSuiteVersion - - -/** @ingroup Notifiers - Sent when either a change in the selected art objects occurs or an artwork modification such as moving a point on a path occurs. - You cannot distinguish a selection change from an artwork modification change. - There is no notifier than means just one or the other. Receiving this does - not necessarily mean that the set of selected objects, as returned - \c #AIMatchingArtSuite::GetSelectedArt(), is different. -*/ -#define kAIArtSelectionChangedNotifier "AI Art Selection Changed Notifier" - - -/** @ingroup Notifiers - Sent when drawing mode of a document changes -*/ -#define kAIDrawingModeChangedNotifier "AI Drawing Mode Changed Notifier" - -/** @ingroup Notifiers - Sent when an object attribute such as the fill or stroke of an object changes. - Same as \c #kAIArtSelectionChangedNotifier, except that it is additionally sent if any global object sets change. - -*/ -#define kAIArtPropertiesChangedNotifier "AI Art Properties Changed Notifier" - -/** @ingroup Notifiers - Sent when the key object or the key anchor point to be aligned to changes. - - This happens when there is any change in the key art; that is, a reset to \c NULL, - a change from \c NULL to a valid art object, or a change from one object or - anchor point to another. - */ -#define kAIAlignmentKeyArtChangedNotifier "AI Alignment Key Art Changed Notifier" - -/** Type constants for drawing modes. */ -enum AIDrawingMode -{ - kAIDrawNormalMode = 0, - kAIDrawBehindMode, - kAIDrawInsideMode -}; - -/** Type constants for art objects. Some values are only for use in matching, and are never - returned from \c #AIArtSuite::GetArtType(). */ -enum AIArtType { - /** Special type never returned as an art object type, but used - as a parameter to the Matching Art suite function \c #AIMatchingArtSuite::GetMatchingArt(). */ - kAnyArt = -1, - /** Reserved for objects that are not supported in the plug-in interface. - You should anticipate unknown art objects and ignore them gracefully. - If a plug-in written for an earlier version of the plug-in API calls - \c #AIArtSuite::GetArtType() with an art object of a type unknown in its version, - the function maps the type to either an appropriate type or to \c kUnknownArt. */ - kUnknownArt = 0, - /** Art group */ - kGroupArt, - /** Path art */ - kPathArt, - /** Compound path art */ - kCompoundPathArt, - /** Pre-AI11 text art type; no longer supported but remains as a place holder so - that the values for other art types remain the same. */ - kTextArtUnsupported, - /** Pre-AI11 text art type; no longer supported but remains as a place holder so - that the values for other art types remain the same. */ - kTextPathArtUnsupported, - /** Pre-AI11 text art type; no longer supported but remains as a place holder so - that the values for other art types remain the same. */ - kTextRunArtUnsupported, - /** Placed art */ - kPlacedArt, - /** Never returned as an art object type, it is - an obsolete parameter to \c #AIMatchingArtSuite::GetMatchingArt(). - It was used to match paths inside text objects without matching the text objects themselves. - In AI11 and later, use the \c kMatchTextPaths flag to return text paths. */ - kMysteryPathArt, - /** Raster art */ - kRasterArt, - /** Plug-in art */ - kPluginArt, - /** Mesh art */ - kMeshArt, - /** Text Frame art */ - kTextFrameArt, - /** Symbol art */ - kSymbolArt, - /** A foreign object, which is a "black box" containing drawing commands, constructed with - \c #AIForeignObjectSuite::New() rather than \c #AIArtSuite::NewArt(). */ - kForeignArt, - /** A text object read from a legacy file (AI10 or earlier) */ - kLegacyTextArt, - /** Chart Art (Deprecated) */ - kChartArt, -}; - - -/** Return values from \c #AIArtSuite::GetArtOrder(). The order in which art objects - are encountered in a \c #AIArtSuite::GetArtSibling() tree traversal. - "Before" means above or in front in the paint order, - and "After" means behind or below in the paint order. */ -enum AIArtOrder { - /** null value */ - kUnknownOrder = 0, - /** art1 is before art2*/ - kFirstBeforeSecond = 1, - /** art2 is after art1 (an alias for \c kFirstBeforeSecond). */ - kSecondAfterFirst = kFirstBeforeSecond, - /** art1 is after art2 */ - kFirstAfterSecond, - /** art2 is before art1 (an alias for \c kFirstAfterSecond).*/ - kSecondBeforeFirst = kFirstAfterSecond, - /** art1 is contained in art2 */ - kFirstInsideSecond, - /** art2 is contained in art1 */ - kSecondInsideFirst -}; - - -/** State selectors for \c #AIArtSuite::GetArtUserAttr() and \c #AIArtSuite::SetArtUserAttr(), -and \c #AIMatchingArtSuite functions such as \c #AIMatchingArtSuite::GetMatchingArt(). - - Use for both \c whichAttr and \c attr parameters; for example, GetArtUserAttr(object, - kArtHidden, kArtHidden), NOT GetArtUserAttr(object, kArtHidden, true). - - Selection notes: Pass either \c kArtSelected or \c kArtFullySelected to - \c #AIArtSuite::SetArtUserAttr() to fully select an object, even if it is a container. - To partially select a container, select individual descendants. - To synchronize the container state before your plug-in returns, - call \c #AIDocumentSuite::RedrawDocument. Otherwise the container - state is justified by Illustrator after the plug-in returns. - - The selection attributes differ only for Get and Match operations, not for Set operations. - \li \c kArtSelected is true for (and matches) partially selected containers, such as groups with some - selected components, as well as partially selected paths. - \li \c kArtFullySelected is true for paths only if all segments are selected, and for - container objects (groups, compound paths, text objects, and so on) only if all descendants are selected. - - The functions \c #AIMatchingArtSuite::GetSelectedArt() and \c #AIArtSetSuite::SelectedArtSet() - are equivalent to using \c kArtSelected as the attribute selector. - - Selection while matching: \c kArtSelectedTopLevelGroups, \c kArtSelectedLeaves, and \c kArtSelectedTopLevelWithPaint - are used only with \c #AIMatchingArtSuite::GetMatchingArt. These values cause an error in \c #AIArtSuite::SetArtUserAttr(). - They are mutually exclusive; you can specify only one, and they cannot be combined with other flags. -*/ -enum AIArtUserAttr { - /** Object is selected; see also \c kArtFullySelected. */ - kArtSelected = 0x00000001, - /** Object is locked */ - kArtLocked = 0x00000002, - /** Object is hidden */ - kArtHidden = 0x00000004, - /** AI7 and later, distinguishes a container, such as a text path, that is fully selected from one - where some contained parts are selected, but the container is not - for example, the path is - selected but the text is not. In both cases, \c kArtSelected is on for both the container and the - contained object, but if the text is not selected, this flag is off for the container. - Pass either flag to \c #AIArtSuite::SetArtUserAttr() to fully select any object, including a container.*/ - kArtFullySelected = 0x00000008, - /** The contents of the object are expanded in the layers palette; valid only for groups and plug-in groups. */ - kArtExpanded = 0x00000010, - /** Object is part of a targeted set; see \c #AIArtSuite::ModifyTargetedArtSet() */ - kArtTargeted = 0x00000020, - /** Object defines a clip mask; this can only be set on paths, compound paths, and - text frame objects, and only if the object is already contained within a clip group. */ - kArtIsClipMask = 0x00001000, - /** Text wraps around the object. Cannot be set on an object that is part of compound group (returns \c kBadParameterErr). - Set for the ancestor compound group instead.*/ - kArtIsTextWrap = 0x00010000, - - /** Matches only fully selected top level objects and not their children; valid only for matching.*/ - kArtSelectedTopLevelGroups = 0x00000040, - /** Matches only leaf selected objects and not their containers; valid only for matching; see also \c kArtSelectedTopLevelGroups */ - kArtSelectedLeaves = 0x00000080, - /** Matches only top level selected objects that have a stroke or fill; valid only for matching; see also \c kArtSelectedTopLevelGroups */ - kArtSelectedTopLevelWithPaint = 0x00000100, // Top level groups that have a stroke or fill, or leaves - - /** Object has a simple style. - Valid only for \c #AIArtSuite::GetArtUserAttr() and \c #AIMatchingArtSuite::GetMatchingArt(). - Causes an error in \c #AIArtSuite::SetArtUserAttr(). */ - kArtHasSimpleStyle = 0x00000200, - /** True if the art object has an active style. - Valid only for \c #AIArtSuite::GetArtUserAttr() and \c #AIMatchingArtSuite::GetMatchingArt(). - Causes an error in \c #AIArtSuite::SetArtUserAttr().*/ - kArtHasActiveStyle = 0x00000400, - /** Object is a part of a compound path. - Valid only for \c #AIArtSuite::GetArtUserAttr() and \c #AIMatchingArtSuite::GetMatchingArt(). - Causes an error in \c #AIArtSuite::SetArtUserAttr(). */ - kArtPartOfCompound = 0x00000800, // notice that 0x00001000 is in use for kArtIsClipMask - /** Art object dictionaries are included in the search for matching art; valid only for matching. */ - kMatchDictionaryArt = 0x00002000, - /** Contents of graph objects are included in the search for matching art, valid only for matching.*/ - kMatchArtInGraphs = 0x00004000, - /** Result art of plug-in groups is included in the search for matching art; valid only for matching.*/ - kMatchArtInResultGroups = 0x00008000, // notice that 0x00010000 is in use for kArtIsTextWrap - - /** Defining paths of text frame objects are included in the search for matching art; valid only for matching. */ - kMatchTextPaths = 0x00020000, - - /** In \c #AIArtSuite::GetArtUserAttr(), reports whether the object has an art style that is pending re-execution. - In \c #AIArtSuite::SetArtUserAttr(), marks the art style dirty without making any other changes to the art - or to the style. - */ - kArtStyleIsDirty = 0x00040000, - - /** Neither Edit Art Nor Result art of plug-in groups is included in the search for matching art; valid only for matching. */ - kMatchArtNotIntoPluginGroups = 0x00080000, - - /** Contents of graph objects are included in the search for matching art, valid only for matching.*/ - kMatchArtInCharts = 0x00100000 -}; - -/** Flags for \c #AIArtSuite::GetArtTransformBounds() and \c #AIArtSuite::GetArtRotatedBounds() - - @note \c #AIArtSuite::GetArtBounds() takes no flags, and has the same behavior as \c #AIArtSuite::GetArtTransformBounds() with - a null transform and \c kVisibleBounds|kExcludeGuideBounds. Call \c #AIArtSuite::GetArtTransformBounds() - with a null transform to specify non-default flags. -*/ -enum AIArtBoundsOptions { - /** Default. Includes hidden and unpainted objects if they are not guides. - Ignores direction handles. */ - kVisibleBounds = 0x0000, - /** When off, \c kNoStrokeBounds, \c kNoExtendedBounds and \c kExcludeUnpaintedObjectBounds - can be combined to ignore certain aspects of the visual bounds.*/ - kControlBounds = 0x0001, - /** Strokes, effects, and other appearance attributes that may make an object extend - past the bezier outlines are ignored.*/ - kNoStrokeBounds = 0x0002, - /** Implies \c kNoStrokeBounds, but additionally excludes text characters for - text on a path or area text, measuring only the path.*/ - kNoExtendedBounds = 0x0004, - /** Use the setting of the "Use Preview Bounds" user preference - to control whether the strokes and other appearance attributes are included. - Cannot be used together with \c kNoStrokeBounds (setting both results in \c kBadParameterErr).*/ - kWStrokeDependsOnPreference = 0x0008, - /** Exclude hidden object. Can be set with \c kControlBounds or \c kVisibleBounds.*/ - kExcludeHiddenObjectBounds = 0x0010, - /** Excludes objects with no fill and no stroke.*/ - kExcludeUnpaintedObjectBounds = 0x0020, - /** Excludes guides. Can be set with \c kControlBounds or \c kVisibleBounds.*/ - kExcludeGuideBounds = 0x0040 -}; - -/** The values for the \c action parameter of \c #AIArtSuite::ModifyTargetedArtSet(). - Determines what action is taken to modify the current object set.*/ -enum AIArtTargettingAction { - /** Replace current set with the set specified in \c list */ - kReplaceAction = 0x0001, - /** Append the set specified in \c list to current set */ - kAppendAction = 0x0002, - /** Remove the set specified in \c list from the current set */ - kRemoveAction = 0x0003, - /** Moves targeting up one level (ignores \c list and \c count) */ - kUpAction = 0x0004, - /** Moves targeting down one level (ignores \c list and \c count) */ - kDownAction = 0x0005, - /** Moves targeting down to leaf level (ignores \c list and \c count) */ - kDownToLeafAction = 0x0006, - /** Moves targeting up to layer level (ignores \c list and \c count) */ - kUpToLayersAction = 0x0007 -}; - -/** Flags that specify which attributes are transferred - by \c #AIArtSuite::TransferAttributes(). These are the attributes that are common to - all art objects. */ -enum AIArtTransferAttrsOptions { - /** Transfer the unique ID, which is the name. */ - kTransferID = 1 << 0, - /** Transfer the style of the object. */ - kTransferStyle = 1 << 1, - /** Transfer the opacity mask of the object. #AIArtSuite::TransferAttributes(), - when called with this option, will not remove the destination art's opacity mask - if the source art does not have opacity mask.*/ - kTransferOpacityMask = 1 << 2, - /** Transfer the text wrap properties--whether or not the object is a text - wrap object together with the wrap offset and invert properties. */ - kTransferTextWrapProperties = 1 << 3, - /** Transfer the compound shape mode used to combine the object geometry with - others when it is a part of a compound shape. */ - kTransferCompoundShapeMode = 1 << 4, - /** Transfer saved selections. This is information that describes the - selection state for the object when a named selection is chosen from - the "Select" menu. The information is a map from selection IDs to the - corresponding selection state for the object. The selection state - information can include information about specific parts of the object - that are selected. This is not meaningful if the target object - is not an identical copy of the original, but the function does not - attempt to determine or deal with that case. */ - kTransferSavedSelections = 1 << 5, - /** Transfer slicing attributes, which define properties - for exporting the object as a slice forming part of an HTML file; see - the \c #AISlicingSuite. */ - kTransferSlicingAttributes = 1 << 6, - /** Transfer the locked attribute; see \c #AIArtUserAttr. */ - kTransferArtLocked = 1 << 7, - /** Transfer the hidden attribute; see \c #AIArtUserAttr. */ - kTransferArtHidden = 1 << 8, - /** Transfer information imported from and exported to SVG files, which - includes the SVG interactivity attributes. */ - kTransferSVGProperties = 1 << 9, - /** Transfer tags that Live Paint uses to identify paths as being the "same". - Use if one path or set of paths should replace an existing path (to distort - it or scissor it, for example). Ignored if the destination art - is not the same object type as the source art; for example, when the - destination art is a group that expands the styled art of a path.*/ - kTransferLivePaintPathTags = 1 << 10, - /** Transfers the Pixel Perfect property that makes an object align to pixel boundary. - Use when you want to retain the pixel perfect property of the source art object - in the destination art object.*/ - kTransferPixelPerfectAttribute = 1 << 11, - /** Transfers live shape related information. - Transferring these attributes does not guarantee that the destination object will - be a live shape, it must fulfill shape-specific geometric constraints also. */ - kTransferLiveShapeProperties = 1 << 12, - /** Transfer all object attributes. This causes all properties - associated with the object in the current Illustrator version to be - transferred, regardless of the API version a plug-in is built against. */ - kTransferAll = 0xFFFFFFFF -}; - -/** Opaque handle to a copy scope. */ -typedef struct _t_AICopyScopeOpaque* AICopyScopeHandle; - -/** The type of scope to create using \c #AIArtSuite::CreateCopyScope().*/ -enum AICopyScopeKind { - /** Groups together a sequence of copy operations that corresponds to - duplication of the copied objects within a single document. */ - kAICopyScopeForDuplicate = 0, - /** Groups together a sequence of calls to \c #AIPathStyleSuite::RetargetForCurrentDoc(). - This is needed so that any decisions made about how to handle conflicts between - global objects in the source and destination documents can apply to the entire set - of objects being retargeted. For example, when there are global color name conflicts - and the user chooses to apply their choice for handling one conflict (add or merge) - to all future conflicts. */ - kAICopyScopeForRetarget, - /** null value */ - kDummyScopeKind = 0xffffffff -}; - -enum AIPathPolarity -{ - kAIPolarPath, - kAINonPolarPath - -}; - -enum AIArtTimeStampOptions -{ - kAITimeStampOfArt = 1, - // Example Usecase: Hiding/Showing a Layer in Layer Panel does not update the thumbnail of that Layer because timestamp of Layer's group art changes but that of its children does not. - kAITimeStampOfChildren = kAITimeStampOfArt << 1, - // Example Usecase: Thumbnail of Assets contained in Export Assets Panel are in sync with the visibility of that art on the document. - // So if an group, added as an asset in Export Assets Panel, is shown/hidden (or its children are shown/hidden) then the thumbnail of that group in Asset Panel updates accordingly. - kAITimeStampMaxFromArtAndChildren = kAITimeStampOfChildren << 1 -}; - -/** @ingroup Errors - See \c #AIArtSuite */ -#define kUnknownArtTypeErr 'ART?' - -/** @ingroup Errors - See \c #AIArtSuite */ -#define kUnknownPaintOrderTypeErr 'ORD?' - -/** @ingroup Errors - See \c #AIArtSuite */ -#define kUntouchableArtObjectErr 'ELIO' - -/** @ingroup Errors - See \c #AIArtSuite */ -#define kTooDeepNestingErr 'NEST' - -/** @ingroup Errors - See \c #AIArtSuite */ -#define kUntouchableLayerErr 'NESS' - -/** @ingroup Errors - Attempt to insert an object type not allowed in the insertion location. - See \c #AIArtSuite */ -#define kInvalidArtTypeForDestErr '~VAT' - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite allows you to access and modify the artwork in Illustrator documents. - It provides functions to create and delete objects, rearrange objects, and get - and set information about objects. You use these functions to navigate the tree - of art objects, and to retrieve or modify generic information about art objects, - such as their bounds or lock status. - - The Art suite is fundamental to implementing most plug-ins. An Illustrator document - consists of a collection of art objects referenced by an \c #AIArtHandle. This - is an opaque pointer to an art object in the document’s artwork database. Access - the fields through the Art suite's accessor functions. - - An art object can represent an individual entity, such as a path, block of text or - placed image, or a group of objects, such as a collection of paths. - The art type identifier (\c #AIArtType) indicates the type of an art object. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIArtSuite and \c #kAIArtVersion. -*/ - -typedef struct AIArtSuite { - - /** Creates a new art object. - This can fail if the layer is locked or hidden. Otherwise, the object is inserted into the - paint order with respect another art object. For example, this creates \c new_art above \c old_art in the paint order. - @code -AIArtHandle new_art; -error = sArt->NewArt(kPathArt, kPlaceAbove, old_art, &new_art); - @endcode - This places \c new_art in the specified \c group above all other objects in the group. - @code -error = sArt->NewArt(kPathArt, kPlaceInsideOnTop, group, &new_art); - @endcode - This places \c new_art on top of all artwork in the document. - @code -error = sArt->NewArt(kPathArt, kPlaceAboveAll, nil, &new_art); - @endcode - - @param type The art type. See \c ::AIArtType. - If the new object type is a path then it is typically given the path style that would be assigned - to a path created by a tool (for example, the pen tool). Tool plug-ins can depend on this. - Plug-ins that are not tools should make no assumptions about the style assigned to paths. - @param paintOrder The paint order position, relative to the \c prep object, an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, - or a compound path or group that might contain this path. - @param newArt [out] A buffer in which to return the new art object. - - @note Change in AI 11.0: If the art is being created during the execution of an effect, - and \c prep is styled art, the new art has a path style with a black fill and no stroke. - This prevents effect executions from accidentally using the current path style - */ - AIAPI AIErr (*NewArt) ( ai::int16 type, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Removes an art object from the document. If it is a group or compound path, - also removes its children. - @param art The art object. After the call, this reference is no longer valid. - */ - AIAPI AIErr (*DisposeArt) ( AIArtHandle art ); - - /** Changes the paint order of an art object, or moves a path in or out of a compound path or group. - - @param art The art object. - @param paintOrder The paint order, relative to the \c prep object, an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - */ - AIAPI AIErr (*ReorderArt) ( AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep ); - - /** Duplicates an art object with a deep copy (children of groups and compound paths are also duplicated). - The copied objects have the same coordinates as the original, so you must do a deep move on them. - @param art The art object. - @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*DuplicateArt) ( AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Retrieves the first art object in a layer, which is the group that contains all of the art in that layer. - You can use this to traverse the art objects contained in the layer. - @param layer The layer. Use \c nil for the current layer. See \c #AILayerSuite - @param art [out] A buffer in which to return the new art object. - @see \c #GetArtFirstChild(), \c #GetArtParent(), \c #GetArtSibling(), \c #GetArtPriorSibling() */ - AIAPI AIErr (*GetFirstArtOfLayer) ( AILayerHandle layer, AIArtHandle *art ); - - /** Retrieves an art object’s parent layer, if any. - This function is useful with \c #AIMatchingArtSuite::GetSelectedArt() and \c #AIMatchingArtSuite::GetMatchingArt(), - which give you a list of art objects. For example, if your filter gets all of the selected objects and - creates a path on top of each layer with objects on it, you would need to know the layer of the objects - in order to place the new path on top: - @code -AILayerHandle layer; -AIArtHandle group, new_path; -error = sArt->GetLayerOfArt(art, &layer); -error = sArt->GetFirstArtOfLayer(layer, &group); -error = sArt->NewArt(kPathArt, kPlaceInsideOnTop, group, &new_path); - @endcode - @param art The art object. - @param layer [out] A buffer in which to return the layer object. See \c #AILayerSuite - - @note Art that is stored in a dictionary or an array is not considered to be on a layer even though - the dictionary may belong to an art object that is on a layer. */ - - AIAPI AIErr (*GetLayerOfArt) ( AIArtHandle art, AILayerHandle *layer ); - - /** Retrieves the type of an art object. - Before you begin manipulating an object’s type-specific attributes you need to know - what kind of art object it is. For example, you can call path functions if the art - is a path, or text functions if it is text. - @code -short type; -error = sArt->GetArtType(art, &type); -if (error) - return error; -switch (type) { - case kGroupArt: - ... -} - @endcode - - @param art The art object. - @param type [out] A buffer in which to return the type, an \c #AIArtType constant. - */ - - AIAPI AIErr (*GetArtType) ( AIArtHandle art, short *type ); - - /** Retrieves user attributes of an art object; that is, flags that show whether it is selected, hidden, or locked. - The user attributes of an object do not directly affect the geometry or printing of the artwork. - They are temporary and primarily used while the user is editing the document. - An art object must be unlocked before making changes to it through the API. - Unlocking and locking should therefore be the first and last things done to an object. - An object cannot be selected if it is hidden or locked. - Because most filters operate on the current selection, it is not usually not necessary to unlock objects. - -
Example: - @code -long attr; -error = sArt->GetArtUserAttr(art, kArtLocked | kArtHidden, &attributes); -if (error) return error; -if (!(attributes & kArtLocked) || !(attributes & kArtHidden)) { - error = sArt->SetArtUserAttr(art, kArtSelected, kArtSelected); - if (error) return error; -} - @endcode - @param art The art object. - @param whichAttr A mask for the attributes of interest, a logical OR of \c #AIArtType constant values. - @param attr [out] A buffer in which to return the type, a logical OR of \c #AIArtType constant values, masked by \c whichAttr. - (Note that this is NOT boolean). - @see \c #GetArtTextWrapProperty(), \c #SetArtTextWrapProperty() - - */ - AIAPI AIErr (*GetArtUserAttr) ( AIArtHandle art, ai::int32 whichAttr, ai::int32 *attr ); - - /** Sets user attributes of an object; that is, flags that show whether it is selected, hidden, or locked. - Changing the selection state of an object is considered by the plug-in interface to be a - modification to the document; that is, the document is marked dirty and needs to be saved. -
Example: - @code -// unlocks the object -error = sArt->SetArtUserAttr(art, kArtLocked, 0); -// locks the object -error = sArt->SetArtUserAttr(art, kArtLocked, kArtLocked); - @endcode - @param art The art object. - @param whichAttr A mask for the attributes of interest, a logical OR of \c #AIArtType constant values. - @param attr The new attribute value, a logical OR of \c #AIArtType constant values, masked by \c whichAttr. - (Note that this is NOT boolean). - @see \c #GetArtTextWrapProperty(), \c #SetArtTextWrapProperty() - */ - AIAPI AIErr (*SetArtUserAttr) ( AIArtHandle art, ai::int32 whichAttr, ai::int32 attr ); - - /** Retrieves the parent group of an art object. This example shows a non-recursive tree walk: - @code -... -// see if parent has sibling -error = sArt->GetArtParent(nextart, &nextart); -if (error) return error; -error = sArt->GetArtSibling(nextart, &nextart); -if (error) return error; -if (nextart) { // parent has sibling -... -} - @endcode - @param art The art object. - @param parent [out] A buffer in which to return the parent object, or a null object if - the specified art object is the topmost group of its layer, - or the topmost object in a container such as a dictionary or array.\ - */ - AIAPI AIErr (*GetArtParent) ( AIArtHandle art, AIArtHandle *parent ); - - /** Retrieves the first child of a group object. For example: - @code -AIArtHandle child; -... -error = sArt->GetArtType(art, &type); -if (error) return error; -switch (type) { - case kGroupArt: - error = sArt->GetArtFirstChild(art, &child); - if (error) return error; - error = doArtAndSiblings(message, child); - if (error) return error; - break; - ... - @endcode - @param art The art object. - @param child [out] A buffer in which to return the child object, or a null object if - the specified art object is not a container such as a group, graph, or text frame, - or is an empty container. - */ - AIAPI AIErr (*GetArtFirstChild) ( AIArtHandle art, AIArtHandle *child ); - - /** Retrieves the next object in the same group. This is the opposite of \c #GetArtPriorSibling(). - Use with \c #GetArtFirstChild() and \c #GetArtParent() to look at - all of the objects in a container. For example: - @code -... -// see if parent has sibling -error = sArt->GetArtParent(nextart, &nextart); -if (error) return error; -error = sArt->GetArtSibling(nextart, &nextart); -if (error) return error; -if (nextart) { // parent has sibling -... -} - @endcode - @param art The art object. - @param sibling [out] A buffer in which to return the sibling object, or a null object if - the specified art object is the last child in its container. - */ - AIAPI AIErr (*GetArtSibling) ( AIArtHandle art, AIArtHandle *sibling ); - - /** Retrieves the previous object in the same group. This is the opposite of \c #GetArtSibling(). -
Example: - @code -// get the previous art -error = sArt->GetArtPriorSibling(art, &art); -if (error) return error; -if (!art){ - // art was first in group - // see if parent has previous art - error = sArt->GetArtParent(art, &art); - if (error) return error; - ... -@endcode - @param art The art object. - @param sibling [out] A buffer in which to return the sibling objector a null object if - the specified art object is the first child in its container. - */ - AIAPI AIErr (*GetArtPriorSibling) ( AIArtHandle art, AIArtHandle *sibling ); - - - /** Retrieves the enclosing rectangle of an art object. - @param art The art object. - @param bounds [out] A buffer in which to return the value. - @note This function has the same behavior as \c #GetArtTransformBounds() with - a null transform and \c kVisibleBounds|kExcludeGuideBounds. - Call \c #GetArtTransformBounds() with a null transform to - specify non-default flags. - */ - AIAPI AIErr (*GetArtBounds) ( AIArtHandle art, AIRealRect *bounds ); - - /** Updates cached information for the enclosing rectangle (bounding box) - of an art object. - @param art The art object. - */ - AIAPI AIErr (*SetArtBounds) ( AIArtHandle art ); - - /** Checks whether the center point of an art object is visible. - This option can be set by the user using the Attributes dialog. -
Example: - @code -error = sArt->GetArtCenterPointVisible (art, &visible); -if (error) return error; -if (!visible) { - // it’s not visible so we do something based on that fact - ... - @endcode - @param art The art object. - @param visible [out] A buffer in which to return the value, true if the center point is visible. - */ - AIAPI AIErr (*GetArtCenterPointVisible) ( AIArtHandle art, AIBoolean *visible ); - - /** Makes the center point of an art object visible or invisible when the object is selected. - @param art The art object. - @param visible True to make the center point visible, false to make it invisible. - */ - AIAPI AIErr (*SetArtCenterPointVisible) ( AIArtHandle art, AIBoolean visible ); - - /** Retrieves the geometric bounds of an art object after applying a transformation matrix. - Returns single-precision coordinates. - @param art The art object. - @param transform A pointer to a transformation matrix to apply. - Can be \c NULL to indicate the identity matrix. You cannot use a non-null matrix - if the \c #kControlBounds option is set in \c flags. - @param flags Bit flags that specify which bounds to return. A logical OR of \c #AIArtBoundsOptions constants. - The flags must include either \c kVisibleBounds or \c kControlBounds, - and can include additional flags depending on which of these is included. - @param bounds [out] A buffer in which to return the bounds value containing single-precision coordinates. - @see \c #GetPreciseArtTransformBounds(), \c #GetArtRotatedBounds() - */ - AIAPI AIErr (*GetArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIRealRect *bounds ); - - /* New in Illustrator 7.0 */ - - /** Checks whether any linked objects (linked images or placed objects) - contained in the subtree of a given container need updating, and updates them if needed. - A linked object needs updating if its file has been modified since the contents were - last read. - - @param art The art object. - @param force When true, objects are updated regardless of whether they have changed. - @param updated [out] Optional, a buffer in which to return true if any objects were updated. */ - AIAPI AIErr (*UpdateArtworkLink) ( AIArtHandle art, AIBoolean force, AIBoolean *updated ); - - /* New in Illustrator 8.0 */ - - /** Returns true if an art object reference is valid. - (Note that the function returns a boolean value, not an error code.) - A reference can test as invalid and still refer to an object that exists in the document, - if that object is not found in the searched layer. - @param art The art object. - @param searchAllLayerLists When true, searches through all layers in - all layer lists. Otherwise, searches only the current layer list. */ - AIAPI AIBoolean (*ValidArt) ( AIArtHandle art, AIBoolean searchAllLayerLists ); - - /** Get the paint order or containment relation of two art objects. - This function reflects the order in which the objects are encountered - in a \c #GetArtSibling() tree traversal. "Before" means above - or in front in the paint order, and "After" means behind or below in the paint order. - @param art1 The first art object. - @param art2 The second art object. - @param order [out] A buffer in which to return the result. - See \c #AIArtOrder for the possible ordering values. */ - AIAPI AIErr (*GetArtOrder) ( AIArtHandle art1, AIArtHandle art2, short *order ); - - /** Selects specified artwork of a layer by matching a string to the contents - of art object notes. You can select multiple art objects by specifying a partial - string and a matching style. - @param layer The layer object. See \c #AILayerSuite. - @param name A string to match to the note contents of art objects in the layer. - If the empty string, matches all leaf objects without notes. - @param matchWholeWord When true, an art object is selected if its note contents - exactly matches the \c name string. - When false, an art object is selected if any part of its note contents - matches the \c name string. - @param caseSensitive When true, perform case-sensitive matching. When false, ignore case. - */ - AIAPI AIErr (*SelectNamedArtOfLayer) ( AILayerHandle layer, const ai::UnicodeString& name, - AIBoolean matchWholeWord, AIBoolean caseSensitive ); - - /** Retrieves the enclosing rectangle of an art object after rotation. - This is the same as \c #GetArtTransformBounds(), except that the - transformation is specified by a rotation angle rather than a matrix. - @param art The art object. - @param angle The rotation angle in radians. - @param flags Option flags for which bounds to return. - A logical OR of \c #AIArtBoundsOptions constant values. - @param bounds [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetArtRotatedBounds) ( AIArtHandle art, AIReal angle, ai::int32 flags, AIRealRect *bounds ); - - /** Returns true if an art object or a descendent object draws something that - should be considered a fill. The distinguishing property of a fill is that - it is drawn behind all other objects when applied to an object that is part - of a clipping mask. (Note that the function returns a boolean value, not an error code.) - @param art The art object. - @return True if the object or a descendant has fill. - */ - AIAPI AIBoolean (*ArtHasFill) ( AIArtHandle art ); - - /** Returns true if an art object or a descendent object draws something that - should be considered a stroke. The distinguishing property of a stroke is that - it is drawn in front of all other objects when applied to an object that is part - of a clipping mask. - (Note that the function returns a boolean value, not an error code.) - @param art The art object. - @return True if the object or a descendant has stroke. - */ - AIAPI AIBoolean (*ArtHasStroke) ( AIArtHandle art ); - - /** Returns true if two art objects contain nothing other than groups, paths and - compound paths and they have identical geometry (control points). The path styles - and other appearance attributes may be different. - (Note that the function returns a boolean value, not an error code.) - @param art1 The first art object. - @param art2 The second art object. - @return True if the objects have equal paths. - @see also \c #ObjectsAreEquivalent - */ - AIAPI AIBoolean (*ArtsHaveEqualPaths) ( AIArtHandle art1, AIArtHandle art2 ); - - /** Not implemented in AI11 and later; returns \c kNotImplementedErr. */ - AIAPI AIErr (*ArtCopyFillStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt ); - /** Not implemented in AI11 and later; returns \c kNotImplementedErr. */ - AIAPI AIErr (*ArtCopyStrokeStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt ); - - /* New in Illustrator 9.0 */ - - /** Retrieves the insertion point for a document. - This is the position in the art tree at which a drawing tool should create new art. - - @param art The art object. - @param paintorder The position in the paint order, relative to the specified art object. - See \c #AITypes::AIPaintOrder for the possible positions. - @param editable [out] A buffer in which to return true if it is possible to create art - at the returned position. For example, you cannot create art in a locked layer. - Pass null if not needed. - */ - AIAPI AIErr (*GetInsertionPoint) ( AIArtHandle *art, short *paintorder, AIBoolean *editable ); - - /** Sets the insertion point for a document. - This is the position in the art tree at which a drawing tool should create new art. - The new position is a paint-order position with respect to the given art object. - See \c #AITypes::AIPaintOrder for details. - If the object is a group, the new position is \c kPlaceInsideOnTop; - otherwise it is \c kPlaceAbove. If the art object is in a position where an - insertion point cannot be set (for example, inside a plug-in group) - the position is set relative to the nearest parent defining a valid insertion point. - If no valid insertion point can be determined, the function returns an error. - - @param art The art object. - */ - AIAPI AIErr (*SetInsertionPoint) ( AIArtHandle art ); - - /** Retrieves the key object for object alignment. The key object is the one to which - other objects are aligned. It is usually the object most recently clicked with the Select tool. - @param art [out] A buffer in which to return the art object, or a null object if there is no key object. - */ - AIAPI AIErr (*GetKeyArt) ( AIArtHandle *art ); - - - /** Clears the key object for object alignment. The key object is the one to which - other objects are aligned. It is usually the object most recently clicked with the - Select tool. - @deprecated */ - AIAPI AIErr (*CancelKeyArt) (void); - - /** Retrieves the dictionary associated with an art object. Arbitrary data can be - attached to an art object in its dictionary. See the \c #AIDictionarySuite.. - The same dictionary is accessed by the \c #AITagSuite for setting and getting - string values. - - Dictionaries are reference counted. You must call \c sAIDictionary->Release() - when you no longer need the reference. It is recommended that you use the C++ - \c #ai::Ref template class, which takes care memory management. - @param art The art object. - @param dictionary [out] A buffer in which to return a pointer to the dictionary reference. - */ - AIAPI AIErr (*GetDictionary) ( AIArtHandle art, struct _AIDictionary** dictionary ); - - /** Sets the name of an art object. This is the name that appears in the Layers - palette. - @param art The art object. - @param name The new name. Use the empty string to reset the name to - the default for the object type. */ - AIAPI AIErr (*SetArtName) (AIArtHandle art, const ai::UnicodeString& name); - - /** Retrieves the name of an art object. This is the name that appears in the Layers - palette. - @param art The art object. - @param name [out] A buffer in which to return the name. - @param isDefaultName [out] A buffer in which to return true if the returned name is a - default descriptive name, rather than a user-assigned name. May be null. - */ - AIAPI AIErr (*GetArtName) (AIArtHandle art, ai::UnicodeString& name, ASBoolean *isDefaultName); - - /** Reports whether an art object is a group that corresponds to a layer or a sublayer. - @param art The art object. - @param name [out] A buffer in which to return true if the art object is a layer group. - */ - AIAPI AIErr (*IsArtLayerGroup) (AIArtHandle art, ASBoolean *isLayerGroup); - - /** Releases elements of a layer, group, or plug-in group to separate layers. - Plug-in groups can be inside styled art. In this case: - \li If the art style consists of only the plug-in group, the plug-in group is - expanded and the original art deleted. - \li If there is more than one plug-in group or other element in the styled art, - the specified art is left in place and the remaining styled art is left intact. - - @param art The art object. - @param build When true, new layers are built upon one another such that - the topmost released layer contains everything in the original art and - the bottommost released layer contains only the highest object in the - stacking order. This order is used because the Flash exporter takes the - bottommost layer as the first animation frame and the topmost layer as the - last frame. */ - AIAPI AIErr (*ReleaseToLayers) (const AIArtHandle art, ASBoolean build); - - /** Modifies the set of targeted objects in the document using a specified action. - @param list A set of objects to be used as an additional parameter, for actions that need it. - @param count The number of objects in \c list. - @param action The action to take; see \c #AIArtTargettingAction for the possible actions. - */ - AIAPI AIErr (*ModifyTargetedArtSet) (AIArtHandle *list, ai::int32 count, ai::int32 action); - - /** Returns true if art is part of the styled art of another object. - (Note that the function returns a boolean value, not an error code.) - @param art The art object; - @return True if the object is part of the style art of another object. - */ - AIAPI AIBoolean (*IsArtStyledArt) (AIArtHandle art); - - /** Returns true if \c art adds to clipping. (Note that the function returns - a boolean value, not an error code.) Call this function only on descendents - of a clip group or a mask object. - @param art The art object. - @return True if the specified object is an appropriate art object with the - \c kArtIsClipMask flag set, or if it is a non-clip group with a clipping descendent - that is not bounded by another clip group. - */ - AIAPI AIBoolean (*IsArtClipping) (AIArtHandle art); - - - /* New in Illustrator 10.0 */ - - /** Transfers attributes from a source art object to a destination art object. - Use, for example, when converting an art object from one type to another. - @param srcart The art object from which to copy attributes. - @param dstart The art object to which to copy attributes. - @param which The attributes to transfer, a logical OR of - \c #AIArtTransferAttrsOptions values. */ - AIAPI AIErr (*TransferAttributes) (AIArtHandle srcart, AIArtHandle dstart, ai::uint32 which); - - /* New in Illustrator 11.0 */ - - /** Retrieves the last child of a container art object. Applies to container - objects such as groups, graphs and text frame objects. - @param art The art object. - @param child [out] A buffer in which to return the last child art object, or nil if - the specified art object is not a container or is an empty container. - */ - AIAPI AIErr (*GetArtLastChild) ( AIArtHandle art, AIArtHandle *child ); - - /** Sets the properties that affect how text wraps around a text wrap object; - that is, one in which the \c kArtIsTextWrap attribute is set. - Use \c #GetArtUserAttr() and \c #SetArtUserAttr() to inspect and set the \c kArtIsTextWrap attribute. - - @param art The art object. - @param offset The distance in points from the geometric outline of an object - that defines an offset for wrapping. - @param invert When true, text wraps inside the outline of the offset object. - When false, text wraps around the outside of the offset object. - @return \c kBadParameterErr if the object does not have the \c kArtIsTextWrap attribute set. - */ - AIAPI AIErr (*SetArtTextWrapProperty) ( AIArtHandle art, AIReal offset, AIBoolean invert ); - - /** Retrieves the properties that affect how text wraps around a text wrap object; - that is, one in which the \c kArtIsTextWrap attribute is set. - Use \c #GetArtUserAttr() and \c #SetArtUserAttr() to inspect and set the - \c kArtIsTextWrap attribute. - - @param art The art object. - @param offset [out] A buffer in which to return the distance in points from - the geometric outline of an object that defines an offset for wrapping. - @param invert [out] A buffer in which to return true if text wraps inside the outline - of the offset object, or false if text wraps around the outside of the offset object. - @return \c kBadParameterErr if the object does not have the \c kArtIsTextWrap attribute set. */ - AIAPI AIErr (*GetArtTextWrapProperty) ( AIArtHandle art, AIReal *offset, AIBoolean *invert ); - - /** Creates and instates a copy scope. Scopes are reference counted. You must - use \c #DestroyCopyScope to release the reference when it is no longer needed. - It is recommended that you use the C++ wrapper \c #ai::CopyScope, which takes - care of memory management. - - @param kind The type of scope to create, an \c ::AICopyScopeKind value. - @param scope [out] A buffer in which to return the new scope reference. */ - AIAPI AIErr (*CreateCopyScope) (enum AICopyScopeKind kind, AICopyScopeHandle* scope); - - /** Uninstates and destroys a copy scope. It is recommended that you use the - C++ wrapper \c #ai::CopyScope, which takes care of memory management. - @param scope The scope reference, as returned by \c #CreateCopyScope(). - */ - AIAPI AIErr (*DestroyCopyScope) (AICopyScopeHandle scope); - - /* New in Illustrator 12.0 */ - - /** Checks to see if it is OK to create or insert an art object of a given type at a given insertion point. - @param paintOrder The insertion point in the paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object for the paint order. - @param artType The type of art object, an \c #AIArtType value. - - @return \c kNoErr if it is OK, and \c #kInvalidArtTypeForDestErr if it is not. - */ - AIAPI AIErr (*InsertionPointBadForArtType) (ai::int16 paintOrder, AIArtHandle prep, ai::int16 artType); - - /** Check to see if it is OK to insert an art object or a duplicate copy of it at the indicated - insertion point, based on attributes of the insertion context and the candidate art, without actually - attempting the insertion. This is mainly intended for use during drag-drop mouseover, - to give proper cursor feedback, and so that an insertion is not attempted if it will fail. - @param candidateArt The art object to test. - @param paintOrder The position for the insertion point, with respect to \c prep, an \c AITypes::AIPaintOrder value. - @param prep The prepositional object for the \c paintOrder position. - @return \c kNoErr if it is OK. Possible non-OK returns are \c #kTooDeepNestingErr, - \c #kInvalidArtTypeForDestErr, and \c #kUntouchableArtObjectErr. - - - */ - AIAPI AIErr (*PreinsertionFlightCheck) (AIArtHandle candidateArt, ai::int16 paintOrder, AIArtHandle prep); - - /** Sets the note attribute for an art object, which typically contains text entered by the user. - To attach private data to an art object, plug-ins should use the art dictionary interface (see \c #GetDictionary()) - rather than using the note. - @param art The art object. - @param inNote The new text for the note. - */ - AIAPI AIErr (*SetNote) (AIArtHandle art, const ai::UnicodeString& inNote); - - /** Retrieves the note attribute text for an art object, which typically contains text entered by the user. - @param art The art object - @param outNote [out] A buffer in which to return the contents of the note. - Returns an empty string if the art object has no note. - @see \c #SetNote() - */ - AIAPI AIErr (*GetNote) (AIArtHandle art, ai::UnicodeString& outNote); - - /** Checks whether an art object has a note attached. (Note this function returns a boolean value, not an error code.) - @param art The art object. - @return True if there is a note attached. */ - AIAPI AIBoolean (*HasNote) (AIArtHandle art); - - /** Deletes the note attached to an art object, if there is one. No error code is returned. - @param art The art object. */ - AIAPI void (*DeleteNote) (AIArtHandle art); - - /** Gets the size of the XMP metadata associated with an art object. - @param art The art object. - @param size [out] A buffer in which to return the number of bytes, or 0 if there is no XMP metadata. - */ - AIAPI AIErr (*GetArtXMPSize)(AIArtHandle art, size_t* size); - - /** Retrieves the XML packet associated with an art object's XMP metadata. The format is UTF-8 - Unicode. - @param art The art object. - @param xmp [out] A buffer in which to return the XML packet. Allocate a buffer using \c #GetArtXMPSize(). - @param size The number of bytes in the \c xmp buffer. - */ - AIAPI AIErr (*GetArtXMP)(AIArtHandle art, char *xmp, size_t size); - - /** Sets XMP metadata for an art object, replacing any existing data. Format must be UTF-8 - Unicode. - @param art The art object. - @param xmp The new XML packet.Use a null XMP pointer or empty one to remove the existing metadata. - */ - AIAPI AIErr (*SetArtXMP)(AIArtHandle art, const char *xmp); - - /** Retrieves the geometric bounds of an art object after applying a transformation matrix. - Returns double-precision coordinates. - @param art The art object. - @param transform A pointer to a transformation matrix to apply. - @param flags Bit flags that specify which bounds to return. A logical OR of \c #AIArtBoundsOptions constants. - The flags must include either \c kVisibleBounds or \c kControlBounds, - and can include additional flags depending on which of these is included. - @param bounds [out] A buffer in which to return the bounds value, containing double-precision coordinates. - @see \c #GetArtTransformBounds() - */ - AIAPI AIErr (*GetPreciseArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIDoubleRect *bounds ); - - /** Removes an art object from the art tree, performing minimal checks for validity of the input - in order to maximize performance. Disposing of a group or compound path - also removes the children. - @param art The art object. Upon return, the reference is no longer valid. - */ - AIAPI AIErr (*UncheckedDisposeArt) ( AIArtHandle art ); - - /* New in Illustrator 13.0 */ - - /** Reports whether an art object is a graph object type. - Graphs (for historical reasons) have no specific art type in - \c #AIArtType enum, and get the type \c #kUnknownArt. - @param art The art object to query. - @param artisgraph [out] A buffer in which to return true if the object - is a graph. - */ - AIAPI AIErr (*ArtIsGraph)(AIArtHandle art, AIBoolean *artisgraph); - - /* New in Illustrator 14.0 */ - - /** Sets the art as KeyArt for object alignment.The key object is the one to which other objects are aligned. - If art is NULL, it cancels key art. Use this API to Cancel KeyArt instead of CancelKeyArt(). - @param art [in] The art object to be set as Key Art - The art needs to be currently selected. - @return an AIErr. In case of success returns kNoErr else give kBadParameterErr - @see \c #GetKeyArt() - */ - AIAPI AIErr (*SetKeyArt)(AIArtHandle art); - - /* New in Illustrator 15.0 */ - - /** Retrieves the drawing mode for current document. - @param mode [out] A buffer in which to return the drawing mode, an \c #AIDrawingMode constant. - */ - AIAPI AIErr (*GetDrawingMode)(ai::int32* mode); - - /** Sets the drawing mode for current document. - @param mode [in] The drawing mode to be set for a document, an \c #AIDrawingMode constant. - */ - AIAPI AIErr (*SetDrawingMode)(ai::int32 mode); - - /** Retrieves the insertion point for current document based on the drawing mode. - This is the position in the art tree at which a drawing tool should create new art. - @param mode [in] The drawing mode, an \c #AIDrawingMode constant. - @param art [out] The art object. - @param paintorder [out] The position in the paint order, relative to the specified art object. - See \c #AITypes::AIPaintOrder for the possible positions. - @param editable [out] A buffer in which to return true if it is possible to create art - at the returned position. For example, you cannot create art in a locked layer. - Pass null if not needed. - */ - AIAPI AIErr (*GetInsertionPointForDrawingMode) (ai::int32 mode, AIArtHandle *art, short *paintorder, AIBoolean *editable); - - /** Retrieves the insertion point for current document based on the current drawing mode. - This is the position in the art tree at which a drawing tool should create new art. - @param art [out] The art object. - @param paintorder [out] The position in the paint order, relative to the specified art object. - See \c #AITypes::AIPaintOrder for the possible positions. - @param editable [out] A buffer in which to return true if it is possible to create art - at the returned position. For example, you cannot create art in a locked layer. - Pass null if not needed. - */ - AIAPI AIErr (*GetInsertionPointForCurrentDrawingMode) (AIArtHandle *art, short *paintorder, AIBoolean *editable); - /** Retrieves the path polarity of an art object. - - @param art The art object. - @param polarity [out] A buffer in which to return the polarity value. - Value of polarity is set to \c #kAIPolarPath or \c #kAINonPolarPath. - */ - - AIAPI AIErr (*GetPathPolarity) (AIArtHandle art, ai::int32* polarity); - - /** Reports whether an art object is in pixel-perfect mode. - @param art [in]: The art object - Note that this API returns a boolean value and not an error. - @return True of the pixel-perfect property is on, false if it is off. - */ - AIAPI AIBoolean (*IsPixelPerfect) (AIArtHandle art); - - /** Turns the pixel-perfect mode on or off for an art object. - @param art [in] The art object - @param isPixelPerfect [in] True to turn pixel-perfect mode on, false to turn it off. - */ - AIAPI AIErr (*SetPixelPerfect) (AIArtHandle art, AIBoolean isPixelPerfect); - - /** Compare two art objects to determine if they are equivalient in geometry, appearance attributes, - and dictionary contents.Typically, one object is in the current document, and the other - is in another document. This function uses the same sense of equivalence in which two patterns - or symbol definitions are considered equivalent when retargeting an external symbol or pattern - to the current document. In particular, if one object is in a document with a different color - mode than the other, then non-global process colors are converted to the color mode of the - first object before comparison, and named global objects are considered equivalent if the - definitions match and the names are equal except for trailing numerical suffixes. - (Note that this function returns a Boolean value, not an error code.) - - @param art1 The first art object. - @param art2The second art object. - @return True if the objects are equivalent, false otherwise. - - @see \c #AISymbolSuite::RetargetForCurrentDocument() and \c #AIPathStyleSuite::RetargetForCurrentDoc() - */ - AIAPI AIBoolean (*ObjectsAreEquivalent) ( AIArtHandle art1, AIArtHandle art2 ); - - /** Reports whether an art object acts as a layer within a symbol pattern. - This is a simulated layer that functions as a group, except when isolated or expanded. - It is not a layer object and cannot be manipulated with the \c #AILayerSuite. - @param art [in] The art object - @param isLayerInSymbol [out] A buffer in which to return true if - this is a simulated layer in a symbol pattern, false otherwise. - */ - AIAPI AIErr (*IsArtALayerInSymbol) ( AIArtHandle art, AIBoolean* isLayerInSymbol ); - - /** Retrieves the modification time stamp for an art object. - @param art [in] The art object - @param option [in] The type of timeStamp to get, an \c ::AIArtTimeStampOptions value. - @param timeStamp [out] A buffer in which to return the modification time stamp. - */ - AIAPI AIErr (*GetArtTimeStamp) ( AIArtHandle art, enum AIArtTimeStampOptions option, size_t* timeStamp ); - - /* Retrieves the global art edit timestamp. This value is a counter that is incremented on each art edit (0 at the beginning - of the session). A comparison between the global timestamp and an art timestamp could reveal when the art was edited last. - @return The global art edit time stamp for this session. - */ - AIAPI size_t (*GetGlobalTimeStamp) (); - - AIAPI AIErr (*ConvertPointTypeToAreaType) ( AIArtHandle art, AIArtHandle* newArtHandle ); - - AIAPI AIErr (*ConvertAreaTypeToPointType) ( AIArtHandle art, AIArtHandle* newArtHandle ); - -} AIArtSuite; - -#include "AIHeaderEnd.h" // __cplusplus - -#endif // __AIArt__ - +#ifndef __AIArt__ +#define __AIArt__ + +/************************************************************************* + * + * ADOBE CONFIDENTIAL + * + * Copyright 1986 Adobe + * + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. If you have received this file from a source other than Adobe, + * then your use, modification, or distribution of it requires the prior + * written permission of Adobe. + * + **************************************************************************/ + +#pragma once + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AITypes.h" +#include "IAIAutoBuffer.h" +#include "IAIUnicodeString.h" + +#include "AIHeaderBegin.h" + +/** @file AIArt.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIArtSuite "AI Art Suite" +#define kAIArtSuiteVersion21 AIAPI_VERSION(21) +#define kAIArtSuiteVersion kAIArtSuiteVersion21 +#define kAIArtVersion kAIArtSuiteVersion + + +/** @ingroup Notifiers + Sent when either a change in the selected art objects occurs or an artwork modification such as moving a point on a path occurs. + You cannot distinguish a selection change from an artwork modification change. + There is no notifier than means just one or the other. Receiving this does + not necessarily mean that the set of selected objects, as returned + \c #AIMatchingArtSuite::GetSelectedArt(), is different. +*/ +#define kAIArtSelectionChangedNotifier "AI Art Selection Changed Notifier" + + +/** @ingroup Notifiers + Sent when drawing mode of a document changes +*/ +#define kAIDrawingModeChangedNotifier "AI Drawing Mode Changed Notifier" + +/** @ingroup Notifiers + Sent when an object attribute such as the fill or stroke of an object changes. + Same as \c #kAIArtSelectionChangedNotifier, except that it is additionally sent if any global object sets change. + +*/ +#define kAIArtPropertiesChangedNotifier "AI Art Properties Changed Notifier" + +/** @ingroup Notifiers + Sent when the key object or the key anchor point to be aligned to changes. + + This happens when there is any change in the key art; that is, a reset to \c NULL, + a change from \c NULL to a valid art object, or a change from one object or + anchor point to another. + */ +#define kAIAlignmentKeyArtChangedNotifier "AI Alignment Key Art Changed Notifier" + +/** @ingroup Notifiers + This notifier is in an experimental state, it is not completely production-ready. + + Notifies about the ArtObjects on idle event. Provides the lists of UUIDs of the art objects + that are inserted, removed, or modified in the current artwork. + + Notification about art objects that are part of the Styled Art, belong to the result group of + Plugin Art, accommodated in dictionary, or belong to a global object are not added in the lists. + (Let's say that these objects are Non-Notified Objects and the remaining objects are Notified Objects). + + Inserted Objects: An object is considered as an Inserted Object when it is created, comes to + In-Scope, or moves from the Non-Notified Objects group to the Notified Objects group. + + Removed Objects: An object is considered as a Removed Object when it gets deleted, goes to + Out-Scope, or moves from the Notified Objects group to the Non-Notified Objects group. + If an object's dictionary is acquired and not released, then the notification of that object will be + delayed till the dictionary is released. (It is not recommended to acquire and hold the dictionary + reference for future use) + + Modified Object: An object is considered as a Modified Object when the time stamp of that object + gets updated. + + See \c #ArtObjectsChangedNotifierData + */ +#define kAIArtObjectsChangedNotifier "AI Art Objects Changed Notifier" + +/** Type constants for drawing modes. */ +enum AIDrawingMode +{ + kAIDrawNormalMode = 0, + kAIDrawBehindMode, + kAIDrawInsideMode +}; + +/** Type constants for art objects. Some values are only for use in matching and are never + returned from \c #AIArtSuite::GetArtType(). */ +enum AIArtType { + /** Special type never returned as an art object type, but used + as a parameter to the Matching Art suite function \c #AIMatchingArtSuite::GetMatchingArt(). */ + kAnyArt = -1, + /** Reserved for objects that are not supported in the plug-in interface. + You should anticipate unknown art objects and ignore them gracefully. + If a plug-in written for an earlier version of the plug-in API calls + \c #AIArtSuite::GetArtType() with an art object of a type unknown in its version, + the function maps the type to either an appropriate type or to \c kUnknownArt. */ + kUnknownArt = 0, + /** Art group */ + kGroupArt, + /** Path art */ + kPathArt, + /** Compound path art */ + kCompoundPathArt, + /** Pre-AI11 text art type; no longer supported but remains as a place holder so + that the values for other art types remain the same. */ + kTextArtUnsupported, + /** Pre-AI11 text art type; no longer supported but remains as a place holder so + that the values for other art types remain the same. */ + kTextPathArtUnsupported, + /** Pre-AI11 text art type; no longer supported but remains as a place holder so + that the values for other art types remain the same. */ + kTextRunArtUnsupported, + /** Placed art */ + kPlacedArt, + /** Never returned as an art object type, it is + an obsolete parameter to \c #AIMatchingArtSuite::GetMatchingArt(). + It was used to match paths inside text objects without matching the text objects themselves. + In AI11 and later, use the \c kMatchTextPaths flag to return text paths. */ + kMysteryPathArt, + /** Raster art */ + kRasterArt, + /** Plug-in art */ + kPluginArt, + /** Mesh art */ + kMeshArt, + /** Text Frame art */ + kTextFrameArt, + /** Symbol art */ + kSymbolArt, + /** A foreign object, which is a "black box" containing drawing commands, constructed with + \c #AIForeignObjectSuite::New() rather than \c #AIArtSuite::NewArt(). */ + kForeignArt, + /** A text object read from a legacy file (AI10 or earlier) */ + kLegacyTextArt, + /** Chart Art (Deprecated) */ + kChartArt, + + /** Radial Repeat Art */ + kRadialRepeatArt, + /** Grid Repeat Art */ + kGridRepeatArt, + /** Symmetry Art */ + kSymmetryArt, + /** Concentric Repeat Art */ + kConcentricRepeatArt, + + kLastArtType = kSymmetryArt, +}; + + +/** Return values from \c #AIArtSuite::GetArtOrder(). The order in which art objects + are encountered in a \c #AIArtSuite::GetArtSibling() tree traversal. + "Before" means above or in front in the paint order, + and "After" means behind or below in the paint order. */ +enum AIArtOrder { + /** null value */ + kUnknownOrder = 0, + /** art1 is before art2*/ + kFirstBeforeSecond = 1, + /** art2 is after art1 (an alias for \c kFirstBeforeSecond). */ + kSecondAfterFirst = kFirstBeforeSecond, + /** art1 is after art2 */ + kFirstAfterSecond, + /** art2 is before art1 (an alias for \c kFirstAfterSecond).*/ + kSecondBeforeFirst = kFirstAfterSecond, + /** art1 is contained in art2 */ + kFirstInsideSecond, + /** art2 is contained in art1 */ + kSecondInsideFirst +}; + + +/** State selectors for \c #AIArtSuite::GetArtUserAttr() and \c #AIArtSuite::SetArtUserAttr(), +and \c #AIMatchingArtSuite functions such as \c #AIMatchingArtSuite::GetMatchingArt(). + + Use for both \c whichAttr and \c attr parameters; for example, GetArtUserAttr(object, + kArtHidden, kArtHidden), NOT GetArtUserAttr(object, kArtHidden, true). + + Selection notes: Pass either \c kArtSelected or \c kArtFullySelected to + \c #AIArtSuite::SetArtUserAttr() to fully select an object, even if it is a container. + To partially select a container, select individual descendants. + To synchronize the container state before your plug-in returns, + call \c #AIDocumentSuite::RedrawDocument. Otherwise the container + state is justified by Illustrator after the plug-in returns. + + The selection attributes differ only for Get and Match operations, not for Set operations. + \li \c kArtSelected is true for (and matches) partially selected containers, such as groups with some + selected components, as well as partially selected paths. + \li \c kArtFullySelected is true for paths only if all segments are selected, and for + container objects (groups, compound paths, text objects, and so on) only if all descendants are selected. + + The functions \c #AIMatchingArtSuite::GetSelectedArt() and \c #AIArtSetSuite::SelectedArtSet() + are equivalent to using \c kArtSelected as the attribute selector. + + Selection while matching: \c kArtSelectedTopLevelGroups, \c kArtSelectedLeaves, and \c kArtSelectedTopLevelWithPaint + are used only with \c #AIMatchingArtSuite::GetMatchingArt. These values cause an error in \c #AIArtSuite::SetArtUserAttr(). + They are mutually exclusive; you can specify only one, and they cannot be combined with other flags. +*/ +enum AIArtUserAttr { + /** Object is selected; see also \c kArtFullySelected. */ + kArtSelected = 0x00000001, + /** Object is locked */ + kArtLocked = 0x00000002, + /** Object is hidden */ + kArtHidden = 0x00000004, + /** AI7 and later, distinguishes a container, such as a text path, that is fully selected from one + where some contained parts are selected, but the container is not - for example, the path is + selected but the text is not. In both cases, \c kArtSelected is on for both the container and the + contained object, but if the text is not selected, this flag is off for the container. + Pass either flag to \c #AIArtSuite::SetArtUserAttr() to fully select any object, including a container.*/ + kArtFullySelected = 0x00000008, + /** The contents of the object are expanded in the layers palette; valid only for groups and plug-in groups. */ + kArtExpanded = 0x00000010, + /** Object is part of a targeted set; see \c #AIArtSuite::ModifyTargetedArtSet() */ + kArtTargeted = 0x00000020, + /** Object defines a clip mask; this can only be set on paths, compound paths, and + text frame objects, and only if the object is already contained within a clip group. */ + kArtIsClipMask = 0x00001000, + /** Text wraps around the object. Cannot be set on an object that is part of compound group (returns \c kBadParameterErr). + Set for the ancestor compound group instead.*/ + kArtIsTextWrap = 0x00010000, + + /** Matches only fully selected top level objects and not their children; valid only for matching.*/ + kArtSelectedTopLevelGroups = 0x00000040, + /** Matches only leaf selected objects and not their containers; valid only for matching; see also \c kArtSelectedTopLevelGroups */ + kArtSelectedLeaves = 0x00000080, + /** Matches only top level selected objects that have a stroke or fill; valid only for matching; see also \c kArtSelectedTopLevelGroups */ + kArtSelectedTopLevelWithPaint = 0x00000100, // Top level groups that have a stroke or fill, or leaves + + /** Object has a simple style. + Valid only for \c #AIArtSuite::GetArtUserAttr() and \c #AIMatchingArtSuite::GetMatchingArt(). + Causes an error in \c #AIArtSuite::SetArtUserAttr(). */ + kArtHasSimpleStyle = 0x00000200, + /** True if the art object has an active style. + Valid only for \c #AIArtSuite::GetArtUserAttr() and \c #AIMatchingArtSuite::GetMatchingArt(). + Causes an error in \c #AIArtSuite::SetArtUserAttr().*/ + kArtHasActiveStyle = 0x00000400, + /** Object is a part of a compound path. + Valid only for \c #AIArtSuite::GetArtUserAttr() and \c #AIMatchingArtSuite::GetMatchingArt(). + Causes an error in \c #AIArtSuite::SetArtUserAttr(). */ + kArtPartOfCompound = 0x00000800, // notice that 0x00001000 is in use for kArtIsClipMask + /** Art object dictionaries are included in the search for matching art; valid only for matching. */ + kMatchDictionaryArt = 0x00002000, + /** Contents of graph objects are included in the search for matching art, valid only for matching.*/ + kMatchArtInGraphs = 0x00004000, + /** Result art of plug-in groups is included in the search for matching art; valid only for matching.*/ + kMatchArtInResultGroups = 0x00008000, // notice that 0x00010000 is in use for kArtIsTextWrap + + /** Defining paths of text frame objects are included in the search for matching art; valid only for matching. */ + kMatchTextPaths = 0x00020000, + + /** In \c #AIArtSuite::GetArtUserAttr(), reports whether the object has an art style that is pending re-execution. + In \c #AIArtSuite::SetArtUserAttr(), marks the art style dirty without making any other changes to the art + or to the style. + */ + kArtStyleIsDirty = 0x00040000, + + /** Neither Edit Art Nor Result art of plug-in groups is included in the search for matching art; valid only for matching. */ + kMatchArtNotIntoPluginGroups = 0x00080000, + + /** Contents of graph objects are included in the search for matching art, valid only for matching.*/ + kMatchArtInCharts = 0x00100000, + + /** No Main arts of repeat objects are included in the search for matching art, valid only for matching.*/ + kMatchArtIntoRepeats = 0x00200000 +}; + +/** Flags for \c #AIArtSuite::GetArtTransformBounds() and \c #AIArtSuite::GetArtRotatedBounds() + + @note \c #AIArtSuite::GetArtBounds() takes no flags, and has the same behavior as \c #AIArtSuite::GetArtTransformBounds() with + a null transform and \c kVisibleBounds|kExcludeGuideBounds. Call \c #AIArtSuite::GetArtTransformBounds() + with a null transform to specify non-default flags. +*/ +enum AIArtBoundsOptions { + /** Default. Includes hidden and unpainted objects if they are not guides. + Ignores direction handles. */ + kVisibleBounds = 0x0000, + /** When off, \c kNoStrokeBounds, \c kNoExtendedBounds and \c kExcludeUnpaintedObjectBounds + can be combined to ignore certain aspects of the visual bounds.*/ + kControlBounds = 0x0001, + /** Strokes, effects, and other appearance attributes that may make an object extend + past the bezier outlines are ignored.*/ + kNoStrokeBounds = 0x0002, + /** Implies \c kNoStrokeBounds, but additionally excludes text characters for + text on a path or area text, measuring only the path.*/ + kNoExtendedBounds = 0x0004, + /** Use the setting of the "Use Preview Bounds" user preference + to control whether the strokes and other appearance attributes are included. + Cannot be used together with \c kNoStrokeBounds (setting both results in \c kBadParameterErr).*/ + kWStrokeDependsOnPreference = 0x0008, + /** Exclude hidden object. Can be set with \c kControlBounds or \c kVisibleBounds.*/ + kExcludeHiddenObjectBounds = 0x0010, + /** Excludes objects with no fill and no stroke.*/ + kExcludeUnpaintedObjectBounds = 0x0020, + /** Excludes guides. Can be set with \c kControlBounds or \c kVisibleBounds.*/ + kExcludeGuideBounds = 0x0040 +}; + +/** The values for the \c action parameter of \c #AIArtSuite::ModifyTargetedArtSet(). + Determines what action is taken to modify the current object set.*/ +enum AIArtTargettingAction { + /** Replaces current set with the set specified in \c list */ + kReplaceAction = 0x0001, + /** Appends the set specified in \c list to current set */ + kAppendAction = 0x0002, + /** Removes the set specified in \c list from the current set */ + kRemoveAction = 0x0003, + /** Moves targeting up one level (ignores \c list and \c count) */ + kUpAction = 0x0004, + /** Moves targeting down one level (ignores \c list and \c count) */ + kDownAction = 0x0005, + /** Moves targeting down to leaf level (ignores \c list and \c count) */ + kDownToLeafAction = 0x0006, + /** Moves targeting up to layer level (ignores \c list and \c count) */ + kUpToLayersAction = 0x0007 +}; + +/** Flags that specify which attributes are transferred + by \c #AIArtSuite::TransferAttributes(). These are the attributes that are common to + all art objects. */ +enum AIArtTransferAttrsOptions { + /** Transfer the unique ID, which is the name. */ + kTransferID = 1 << 0, + /** Transfer the style of the object. */ + kTransferStyle = 1 << 1, + /** Transfer the opacity mask of the object. #AIArtSuite::TransferAttributes(), + when called with this option, will not remove the destination art's opacity mask + if the source art does not have opacity mask.*/ + kTransferOpacityMask = 1 << 2, + /** Transfer the text wrap properties--whether or not the object is a text + wrap object together with the wrap offset and invert properties. */ + kTransferTextWrapProperties = 1 << 3, + /** Transfer the compound shape mode used to combine the object geometry with + others when it is a part of a compound shape. */ + kTransferCompoundShapeMode = 1 << 4, + /** Transfer saved selections. This is information that describes the + selection state for the object when a named selection is chosen from + the "Select" menu. The information is a map from selection IDs to the + corresponding selection state for the object. The selection state + information can include information about specific parts of the object + that are selected. This is not meaningful if the target object + is not an identical copy of the original, but the function does not + attempt to determine or deal with that case. */ + kTransferSavedSelections = 1 << 5, + /** Transfer slicing attributes, which define properties + for exporting the object as a slice forming part of an HTML file; see + the \c #AISlicingSuite. */ + kTransferSlicingAttributes = 1 << 6, + /** Transfer the locked attribute; see \c #AIArtUserAttr. */ + kTransferArtLocked = 1 << 7, + /** Transfer the hidden attribute; see \c #AIArtUserAttr. */ + kTransferArtHidden = 1 << 8, + /** Transfer information imported from and exported to SVG files, which + includes the SVG interactivity attributes. */ + kTransferSVGProperties = 1 << 9, + /** Transfer tags that Live Paint uses to identify paths as being the "same". + Use if one path or set of paths should replace an existing path (to distort + it or scissor it, for example). Ignored if the destination art + is not the same object type as the source art; for example, when the + destination art is a group that expands the styled art of a path.*/ + kTransferLivePaintPathTags = 1 << 10, + /** Transfers the Pixel Perfect property that makes an object align to pixel boundary. + Use when you want to retain the pixel perfect property of the source art object + in the destination art object.*/ + kTransferPixelPerfectAttribute = 1 << 11, + /** Transfers live shape related information. + Transferring these attributes does not guarantee that the destination object will + be a live shape, it must fulfill shape-specific geometric constraints also. */ + kTransferLiveShapeProperties = 1 << 12, + /** Transfer all object attributes. This causes all properties + associated with the object in the current Illustrator version to be + transferred, regardless of the API version a plug-in is built against. */ + kTransferAll = 0xFFFFFFFF +}; + +/** Opaque handle to a copy scope. */ +typedef struct _t_AICopyScopeOpaque* AICopyScopeHandle; + +/** The type of scope to create using \c #AIArtSuite::CreateCopyScope().*/ +enum AICopyScopeKind { + /** Groups together a sequence of copy operations that corresponds to + duplication of the copied objects within a single document. */ + kAICopyScopeForDuplicate = 0, + /** Groups together a sequence of calls to \c #AIPathStyleSuite::RetargetForCurrentDoc(). + This is needed so that any decisions made about how to handle conflicts between + global objects in the source and destination documents can apply to the entire set + of objects being retargeted. For example, when there are global color name conflicts + and the user chooses to apply their choice for handling one conflict (add or merge) + to all future conflicts. */ + kAICopyScopeForRetarget, + /** null value */ + kDummyScopeKind = 0xffffffff +}; + +enum AIPathPolarity +{ + kAIPolarPath, + kAINonPolarPath + +}; + +enum AIArtTimeStampOptions +{ + kAITimeStampOfArt = 1, + // Example Usecase: Hiding/Showing a Layer in Layer Panel does not update the thumbnail of that Layer because timestamp of Layer's group art changes but that of its children does not. + kAITimeStampOfChildren = kAITimeStampOfArt << 1, + // Example Usecase: Thumbnail of Assets contained in Export Assets Panel are in sync with the visibility of that art on the document. + // So if a group, added as an asset in Export Assets Panel, is shown/hidden (or its children are shown/hidden) then the thumbnail of that group in Asset Panel updates accordingly. + kAITimeStampMaxFromArtAndChildren = kAITimeStampOfChildren << 1 +}; + +namespace ai +{ + //Forward declaration + class uuid; + + /** struct to keep list of the UUIDs of inserted, removed, and modified objects*/ + struct ArtObjectsChangedData + { + AutoBuffer insertedObjList; + AutoBuffer removedObjList; + AutoBuffer modifiedObjList; + }; + + /** struct for notification data of kAIArtObjectsChangedNotifier*/ + struct ArtObjectsChangedNotifierData + { + ArtObjectsChangedData artObjsChangedData; + size_t refStamp; + }; +} + +/** @ingroup Errors + See \c #AIArtSuite */ +#define kUnknownArtTypeErr 'ART?' + +/** @ingroup Errors + See \c #AIArtSuite */ +#define kUnknownPaintOrderTypeErr 'ORD?' + +/** @ingroup Errors + See \c #AIArtSuite */ +#define kUntouchableArtObjectErr 'ELIO' + +/** @ingroup Errors + See \c #AIArtSuite */ +#define kTooDeepNestingErr 'NEST' + +/** @ingroup Errors + See \c #AIArtSuite */ +#define kUntouchableLayerErr 'NESS' + +/** @ingroup Errors + Attempt to insert an object type not allowed in the insertion location. + See \c #AIArtSuite */ +#define kInvalidArtTypeForDestErr '~VAT' + +/** + @ingroup Errors + See \c #AIArtSuite */ +#define kAIArtHandleOutOfScopeErr 'AHOS' + + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite allows you to access and modify the artwork in Illustrator documents. + It provides functions to create and delete objects, rearrange objects, and get + and set information about objects. You use these functions to navigate the tree + of art objects, and to retrieve or modify generic information about art objects, + such as their bounds or lock status. + + The Art suite is fundamental to implementing most plug-ins. An Illustrator document + consists of a collection of art objects referenced by an \c #AIArtHandle. This + is an opaque pointer to an art object in the document's artwork database. Access + the fields through the Art suite's accessor functions. + + An art object can represent an individual entity, such as a path, block of text or + placed image, or a group of objects, such as a collection of paths. + The art type identifier (\c #AIArtType) indicates the type of an art object. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIArtSuite and \c #kAIArtVersion. +*/ + +typedef struct AIArtSuite { + + /** Creates a new art object. + This can fail if the layer is locked or hidden. Otherwise, the object is inserted into the + paint order with respect another art object. For example, this creates \c new_art above \c old_art in the paint order. + @code +AIArtHandle new_art; +error = sArt->NewArt(kPathArt, kPlaceAbove, old_art, &new_art); + @endcode + This places \c new_art in the specified \c group above all other objects in the group. + @code +error = sArt->NewArt(kPathArt, kPlaceInsideOnTop, group, &new_art); + @endcode + This places \c new_art on top of all artwork in the document. + @code +error = sArt->NewArt(kPathArt, kPlaceAboveAll, nullptr, &new_art); + @endcode + + @param type The art type. See \c ::AIArtType. + If the new object type is a path then it is typically given the path style that would be assigned + to a path created by a tool (for example, the pen tool). Tool plug-ins can depend on this. + Plug-ins that are not tools should make no assumptions about the style assigned to paths. + @param paintOrder The paint order position, relative to the \c prep object, an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, + or a compound path or group that might contain this path. + @param newArt [out] A buffer in which to return the new art object. + + @note Change in AI 11.0: If the art is being created during the execution of an effect, + and \c prep is styled art, the new art has a path style with a black fill and no stroke. + This prevents effect executions from accidentally using the current path style + */ + AIAPI AIErr (*NewArt) ( ai::int16 type, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); + + /** Removes an art object from the document. If it is a group or compound path, + also removes its children. + @param art The art object. After the call, this reference is no longer valid. + */ + AIAPI AIErr (*DisposeArt) ( AIArtHandle art ); + + /** Changes the paint order of an art object, or moves a path in or out of a compound path or group. + + @param art The art object. + @param paintOrder The paint order, relative to the \c prep object, an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + */ + AIAPI AIErr (*ReorderArt) ( AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep ); + + /** Duplicates an art object with a deep copy (children of groups and compound paths are also duplicated). + The copied objects have the same coordinates as the original, so you must do a deep move on them. + @param art The art object. + @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object for the paint order. + @param newArt [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*DuplicateArt) ( AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); + + /** Retrieves the first art object in a layer, which is the group that contains all of the art in that layer. + You can use this to traverse the art objects contained in the layer. + @param layer The layer. Use \c nullptr for the current layer. See \c #AILayerSuite + @param art [out] A buffer in which to return the new art object. + @see \c #GetArtFirstChild(), \c #GetArtParent(), \c #GetArtSibling(), \c #GetArtPriorSibling() */ + AIAPI AIErr (*GetFirstArtOfLayer) ( AILayerHandle layer, AIArtHandle *art ); + + /** Retrieves an art object's parent layer, if any. + This function is useful with \c #AIMatchingArtSuite::GetSelectedArt() and \c #AIMatchingArtSuite::GetMatchingArt(), + which give you a list of art objects. For example, if your filter gets all of the selected objects and + creates a path on top of each layer with objects on it, you would need to know the layer of the objects + in order to place the new path on top: + @code +AILayerHandle layer; +AIArtHandle group, new_path; +error = sArt->GetLayerOfArt(art, &layer); +error = sArt->GetFirstArtOfLayer(layer, &group); +error = sArt->NewArt(kPathArt, kPlaceInsideOnTop, group, &new_path); + @endcode + @param art The art object. + @param layer [out] A buffer in which to return the layer object. See \c #AILayerSuite + + @note Art that is stored in a dictionary or an array is not considered to be on a layer even though + the dictionary may belong to an art object that is on a layer. */ + + AIAPI AIErr (*GetLayerOfArt) ( AIArtHandle art, AILayerHandle *layer ); + + /** Retrieves the type of an art object. + Before you begin manipulating an object's type-specific attributes you need to know + what kind of art object it is. For example, you can call path functions if the art + is a path, or text functions if it is text. + @code +short type; +error = sArt->GetArtType(art, &type); +if (error) + return error; +switch (type) { + case kGroupArt: + ... +} + @endcode + + @param art The art object. + @param type [out] A buffer in which to return the type, an \c #AIArtType constant. + */ + + AIAPI AIErr (*GetArtType) ( AIArtHandle art, short *type ); + + /** Retrieves user attributes of an art object; that is, flags that show whether it is selected, hidden, or locked. + The user attributes of an object do not directly affect the geometry or printing of the artwork. + They are temporary and primarily used while the user is editing the document. + An art object must be unlocked before making changes to it through the API. + Unlocking and locking should therefore be the first and last things done to an object. + An object cannot be selected if it is hidden or locked. + Because most filters operate on the current selection, it is not usually not necessary to unlock objects. + +
Example: + @code +long attr; +error = sArt->GetArtUserAttr(art, kArtLocked | kArtHidden, &attributes); +if (error) return error; +if (!(attributes & kArtLocked) || !(attributes & kArtHidden)) { + error = sArt->SetArtUserAttr(art, kArtSelected, kArtSelected); + if (error) return error; +} + @endcode + @param art The art object. + @param whichAttr A mask for the attributes of interest, a logical OR of \c #AIArtType constant values. + @param attr [out] A buffer in which to return the type, a logical OR of \c #AIArtType constant values, masked by \c whichAttr. + (Note that this is NOT boolean). + @see \c #GetArtTextWrapProperty(), \c #SetArtTextWrapProperty() + + */ + AIAPI AIErr (*GetArtUserAttr) ( AIArtHandle art, ai::int32 whichAttr, ai::int32 *attr ); + + /** Sets user attributes of an object; that is, flags that show whether it is selected, hidden, or locked. + Changing the selection state of an object is considered by the plug-in interface to be a + modification to the document; that is, the document is marked dirty and needs to be saved. +
Example: + @code +// unlocks the object +error = sArt->SetArtUserAttr(art, kArtLocked, 0); +// locks the object +error = sArt->SetArtUserAttr(art, kArtLocked, kArtLocked); + @endcode + @param art The art object. + @param whichAttr A mask for the attributes of interest, a logical OR of \c #AIArtType constant values. + @param attr The new attribute value, a logical OR of \c #AIArtType constant values, masked by \c whichAttr. + (Note that this is NOT boolean). + @see \c #GetArtTextWrapProperty(), \c #SetArtTextWrapProperty() + */ + AIAPI AIErr (*SetArtUserAttr) ( AIArtHandle art, ai::int32 whichAttr, ai::int32 attr ); + + /** Retrieves the parent group of an art object. This example shows a non-recursive tree walk: + @code +... +// see if parent has sibling +error = sArt->GetArtParent(nextart, &nextart); +if (error) return error; +error = sArt->GetArtSibling(nextart, &nextart); +if (error) return error; +if (nextart) { // parent has sibling +... +} + @endcode + @param art The art object. + @param parent [out] A buffer in which to return the parent object, or a null object if + the specified art object is the topmost group of its layer, + or the topmost object in a container such as a dictionary or array.\ + */ + AIAPI AIErr (*GetArtParent) ( AIArtHandle art, AIArtHandle *parent ); + + /** Retrieves the first child of a group object. For example: + @code +AIArtHandle child; +... +error = sArt->GetArtType(art, &type); +if (error) return error; +switch (type) { + case kGroupArt: + error = sArt->GetArtFirstChild(art, &child); + if (error) return error; + error = doArtAndSiblings(message, child); + if (error) return error; + break; + ... + @endcode + @param art The art object. + @param child [out] A buffer in which to return the child object, or a null object if + the specified art object is not a container such as a group, a graph, or a text frame, + or is an empty container. + */ + AIAPI AIErr (*GetArtFirstChild) ( AIArtHandle art, AIArtHandle *child ); + + /** Retrieves the next object in the same group. This is the opposite of \c #GetArtPriorSibling(). + Use with \c #GetArtFirstChild() and \c #GetArtParent() to look at + all of the objects in a container. For example: + @code +... +// see if parent has sibling +error = sArt->GetArtParent(nextart, &nextart); +if (error) return error; +error = sArt->GetArtSibling(nextart, &nextart); +if (error) return error; +if (nextart) { // parent has sibling +... +} + @endcode + @param art The art object. + @param sibling [out] A buffer in which to return the sibling object, or a null object if + the specified art object is the last child in its container. + */ + AIAPI AIErr (*GetArtSibling) ( AIArtHandle art, AIArtHandle *sibling ); + + /** Retrieves the previous object in the same group. This is the opposite of \c #GetArtSibling(). +
Example: + @code +// get the previous art +error = sArt->GetArtPriorSibling(art, &art); +if (error) return error; +if (!art){ + // art was first in group + // see if parent has previous art + error = sArt->GetArtParent(art, &art); + if (error) return error; + ... +@endcode + @param art The art object. + @param sibling [out] A buffer in which to return the sibling objector a null object if + the specified art object is the first child in its container. + */ + AIAPI AIErr (*GetArtPriorSibling) ( AIArtHandle art, AIArtHandle *sibling ); + + + /** Retrieves the enclosing rectangle of an art object. + @param art The art object. + @param bounds [out] A buffer in which to return the value. + @note This function has the same behavior as \c #GetArtTransformBounds() with + a null transform and \c kVisibleBounds|kExcludeGuideBounds. + Call \c #GetArtTransformBounds() with a null transform to + specify non-default flags. + */ + AIAPI AIErr (*GetArtBounds) ( AIArtHandle art, AIRealRect *bounds ); + + /** Updates cached information for the enclosing rectangle (bounding box) + of an art object. + @param art The art object. + */ + AIAPI AIErr (*SetArtBounds) ( AIArtHandle art ); + + /** Checks whether the center point of an art object is visible. + This option can be set by the user using the Attributes dialog. +
Example: + @code +error = sArt->GetArtCenterPointVisible (art, &visible); +if (error) return error; +if (!visible) { + // its not visible so we do something based on that fact + ... + @endcode + @param art The art object. + @param visible [out] A buffer in which to return the value, true if the center point is visible. + */ + AIAPI AIErr (*GetArtCenterPointVisible) ( AIArtHandle art, AIBoolean *visible ); + + /** Makes the center point of an art object visible or invisible when the object is selected. + @param art The art object. + @param visible True to make the center point visible, false to make it invisible. + */ + AIAPI AIErr (*SetArtCenterPointVisible) ( AIArtHandle art, AIBoolean visible ); + + /** Retrieves the geometric bounds of an art object after applying a transformation matrix. + Returns single-precision coordinates. + @param art The art object. + @param transform A pointer to a transformation matrix to apply. + Can be \c NULL to indicate the identity matrix. You cannot use a non-null matrix + if the \c #kControlBounds option is set in \c flags. + @param flags Bit flags that specify which bounds to return. A logical OR of \c #AIArtBoundsOptions constants. + The flags must include either \c kVisibleBounds or \c kControlBounds, + and can include additional flags depending on which of these is included. + @param bounds [out] A buffer in which to return the bounds value containing single-precision coordinates. + @see \c #GetPreciseArtTransformBounds(), \c #GetArtRotatedBounds() + */ + AIAPI AIErr (*GetArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIRealRect *bounds ); + + /* Introduced in Illustrator 7.0 */ + + /** Checks whether any linked objects (linked images or placed objects) + contained in the subtree of a given container need updating, and updates them if needed. + A linked object needs updating if its file has been modified since the contents were + last read. + + @param art The art object. + @param force When true, objects are updated regardless of whether they have changed. + @param updated [out] Optional, a buffer in which the output as to return true if any objects were updated. */ + AIAPI AIErr (*UpdateArtworkLink) ( AIArtHandle art, AIBoolean force, AIBoolean *updated ); + + /* Introduced in Illustrator 8.0 */ + + /** Returns true if an art object reference is valid. + (Note that the function returns a boolean value, not an error code.) + A reference can test as invalid and still refer to an object that exists in the document, + if that object is not found in the searched layer. + @param art The art object. + @param searchAllLayerLists When true, searches through all layers in + all layer lists. Otherwise, searches only the current layer list. */ + AIAPI AIBoolean (*ValidArt) ( AIArtHandle art, AIBoolean searchAllLayerLists ); + + /** Get the paint order or containment relation of two art objects. + This function reflects the order in which the objects are encountered + in a \c #GetArtSibling() tree traversal. "Before" means above + or in front in the paint order, and "After" means behind or below in the paint order. + @param art1 The first art object. + @param art2 The second art object. + @param order [out] A buffer in which to return the result. + See \c #AIArtOrder for the possible ordering values. */ + AIAPI AIErr (*GetArtOrder) ( AIArtHandle art1, AIArtHandle art2, short *order ); + + /** Selects specified artwork of a layer by matching a string to the contents + of art object notes. You can select multiple art objects by specifying a partial + string and a matching style. + @param layer The layer object. See \c #AILayerSuite. + @param name A string to match to the note contents of art objects in the layer. + If the empty string, matches all leaf objects without notes. + @param matchWholeWord When true, an art object is selected if its note contents + exactly matches the \c name string. + When false, an art object is selected if any part of its note contents + matches the \c name string. + @param caseSensitive When true, perform case-sensitive matching. When false, ignore case. + */ + AIAPI AIErr (*SelectNamedArtOfLayer) ( AILayerHandle layer, const ai::UnicodeString& name, + AIBoolean matchWholeWord, AIBoolean caseSensitive ); + + /** Retrieves the enclosing rectangle of an art object after rotation. + This is the same as \c #GetArtTransformBounds(), except that the + transformation is specified by a rotation angle rather than a matrix. + @param art The art object. + @param angle The rotation angle in radians. + @param flags Option flags for which bounds to return. + A logical OR of \c #AIArtBoundsOptions constant values. + @param bounds [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetArtRotatedBounds) ( AIArtHandle art, AIReal angle, ai::int32 flags, AIRealRect *bounds ); + + /** Returns true if an art object or a descendent object draws something that + should be considered a fill. The distinguishing property of a fill is that + it is drawn behind all other objects when applied to an object that is part + of a clipping mask. (Note that the function returns a boolean value, not an error code.) + @param art The art object. + @return True if the object or a descendant has fill. + */ + AIAPI AIBoolean (*ArtHasFill) ( AIArtHandle art ); + + /** Returns true if an art object or a descendent object draws something that + should be considered a stroke. The distinguishing property of a stroke is that + it is drawn in front of all other objects when applied to an object that is part + of a clipping mask. + (Note that the function returns a boolean value, not an error code.) + @param art The art object. + @return True if the object or a descendant has stroke. + */ + AIAPI AIBoolean (*ArtHasStroke) ( AIArtHandle art ); + + /** Returns true if two art objects contain nothing other than groups, paths and + compound paths and they have identical geometry (control points). The path styles + and other appearance attributes may be different. + (Note that the function returns a boolean value, not an error code.) + @param art1 The first art object. + @param art2 The second art object. + @return True if the objects have equal paths. + @see also \c #ObjectsAreEquivalent + */ + AIAPI AIBoolean (*ArtsHaveEqualPaths) ( AIArtHandle art1, AIArtHandle art2 ); + + /** Not implemented in AI11 and later; returns \c kNotImplementedErr. */ + AIAPI AIErr (*ArtCopyFillStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt ); + /** Not implemented in AI11 and later; returns \c kNotImplementedErr. */ + AIAPI AIErr (*ArtCopyStrokeStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt ); + + /* New in Illustrator 9.0 */ + + /** Retrieves the insertion point for a document. + This is the position in the art tree at which a drawing tool should create new art. + + @param art The art object. + @param paintorder The position in the paint order, relative to the specified art object. + See \c #AITypes::AIPaintOrder for the possible positions. + @param editable [out] A buffer in which to return the output as true if it is possible to create art + at the returned position. For example, you cannot create art in a locked layer. + Pass null if not needed. + */ + AIAPI AIErr (*GetInsertionPoint) ( AIArtHandle *art, short *paintorder, AIBoolean *editable ); + + /** Sets the insertion point in a document. + This is the position in the art tree at which a drawing tool should create new art. + The new position is a paint-order position with respect to the given art object. + See \c #AITypes::AIPaintOrder for details. + If the object is a group, the new position is \c kPlaceInsideOnTop; + otherwise it is \c kPlaceAbove. If the art object is in a position where an + insertion point cannot be set (for example, inside a plug-in group) + the position is set relative to the nearest parent defining a valid insertion point. + If no valid insertion point can be determined, the function returns an error. + + @param art The art object. + */ + AIAPI AIErr (*SetInsertionPoint) ( AIArtHandle art ); + + /** Retrieves the key object for object alignment. The key object is the one to which + other objects are aligned. It is usually the object most recently clicked with the Select tool. + @param art [out] A buffer in which to return the art object, or a null object if there is no key object. + */ + AIAPI AIErr (*GetKeyArt) ( AIArtHandle *art ); + + + /** Clears the key object for object alignment. The key object is the one to which + other objects are aligned. It is usually the object that is most recently clicked using the + Selection tool. + @deprecated */ + AIAPI AIErr (*CancelKeyArt) (void); + + /** Retrieves the dictionary associated with an art object. Creates a new, empty + dictionary if one is not found. + + Arbitrary data can be attached to an art object in its dictionary. + See the \c #AIDictionarySuite. + The same dictionary is accessed by the \c #AITagSuite for + setting and getting string values. + + Dictionaries are reference counted. You must call \c sAIDictionary->Release() + when you no longer need the reference. It is recommended that you use the C++ + \c #ai::Ref template class, which takes care memory management. + @param art The art object. + @param dictionary [out] A buffer in which to return a pointer to the dictionary reference. + + @note This call creates an empty dictionary if one is not found. + To check for the existence of an item in the art dictionary, + first check that the dictionary exists and is not empty. + @see \c #IsDictionaryEmpty() and \c #HasDictionary() + */ + AIAPI AIErr (*GetDictionary) ( AIArtHandle art, struct _AIDictionary** dictionary ); + + /** Reports whether a dictionary is associated with an art object. + (Note that the function returns a boolean value, not an error code.) + + @param art The art object. + @return True if a dictionary is associated with the art object, false otherwise. + @note If you need to check for the existence of an item in the art dictionary, + first check that the dictionary exists and is not empty. Calling \c #GetDictionary() + when no dictionary exists creates an unneeded dictionary object. + + @see \c #IsDictionaryEmpty() and \c #GetDictionary() + */ + AIAPI AIBoolean (*HasDictionary) ( AIArtHandle art ); + + /** Reports whether the dictionary associated with an art object is empty or does not exist. + (Note that the function returns a boolean value, not an error code.) + + @param art The art object. + @return True if a dictionary exists and is empty or if no dictionary exists. + False if a dictionary associated with the art object contains any entries. + @note For best performance, check for existence of a dictionary before calling \c #GetDictionary(). + Calling \c #GetDictionary() when no dictionary exists creates an unneeded dictionary object. + + @see \c #HasDictionary() and \c #GetDictionary() + */ + AIAPI AIBoolean (*IsDictionaryEmpty) ( AIArtHandle art ); + + /** Sets the name of an art object. This is the name that appears in the Layers + palette. + @param art The art object. + @param name The new name. Use the empty string to reset the name to + the default for the object type. */ + AIAPI AIErr (*SetArtName) (AIArtHandle art, const ai::UnicodeString& name); + + /** Retrieves the name of an art object. This is the name that appears in the Layers + palette. + @param art The art object. + @param name [out] A buffer in which to return the name. + @param isDefaultName [out] A buffer in which to return the output as true if the returned name is a + default descriptive name, rather than a user-assigned name. May be null. + */ + AIAPI AIErr (*GetArtName) (AIArtHandle art, ai::UnicodeString& name, ASBoolean *isDefaultName); + + /** Reports whether an art object is a group that corresponds to a layer or a sublayer. + @param art The art object. + @param name [out] A buffer in which to return true if the art object is a layer group. + */ + AIAPI AIErr (*IsArtLayerGroup) (AIArtHandle art, ASBoolean *isLayerGroup); + + /** Releases elements of a layer, group, or plug-in group to separate layers. + Plug-in groups can be inside styled art. In this case: + \li If the art style consists of only the plug-in group, the plug-in group is + expanded and the original art deleted. + \li If there is more than one plug-in group or other element in the styled art, + the specified art is left in place and the remaining styled art is left intact. + + @param art The art object. + @param build When true, new layers are built upon one another such that + the topmost released layer contains everything in the original art and + the bottommost released layer contains only the highest object in the + stacking order. This order is used because the Flash exporter takes the + bottommost layer as the first animation frame and the topmost layer as the + last frame. */ + AIAPI AIErr (*ReleaseToLayers) (const AIArtHandle art, ASBoolean build); + + /** Modifies the set of targeted objects in the document using a specified action. + @param list A set of objects to be used as an additional parameter, for actions that need it. + @param count The number of objects in \c list. + @param action The action to take; see \c #AIArtTargettingAction for the possible actions. + */ + AIAPI AIErr (*ModifyTargetedArtSet) (AIArtHandle *list, ai::int32 count, ai::int32 action); + + /** Returns true if art is part of the styled art of another object. + (Note that the function returns a boolean value, not an error code.) + @param art The art object; + @return True if the object is part of the style art of another object. + */ + AIAPI AIBoolean (*IsArtStyledArt) (AIArtHandle art); + + /** Returns true if \c art adds to clipping. (Note that the function returns + a boolean value, not an error code.) Call this function only on descendents + of a clip group or a mask object. + @param art The art object. + @return True if the specified object is an appropriate art object with the + \c kArtIsClipMask flag set, or if it is a non-clip group with a clipping descendent + that is not bounded by another clip group. + */ + AIAPI AIBoolean (*IsArtClipping) (AIArtHandle art); + + + /* Introduced in Illustrator 10.0 */ + + /** Transfers attributes from a source art object to a destination art object. + Use, for example, when converting an art object from one type to another. + @param srcart The art object from which to copy attributes. + @param dstart The art object to which to copy attributes. + @param which The attributes to transfer, a logical OR of + \c #AIArtTransferAttrsOptions values. */ + AIAPI AIErr (*TransferAttributes) (AIArtHandle srcart, AIArtHandle dstart, ai::uint32 which); + + /* Introduced in Illustrator 11.0 */ + + /** Retrieves the last child of a container art object. Applies to container + objects such as groups, graphs and text frame objects. + @param art The art object. + @param child [out] A buffer in which to return the last child art object, or nullptr if + the specified art object is not a container or is an empty container. + */ + AIAPI AIErr (*GetArtLastChild) ( AIArtHandle art, AIArtHandle *child ); + + /** Sets the properties that affect how text wraps around a text wrap object; + that is, one in which the \c kArtIsTextWrap attribute is set. + Use \c #GetArtUserAttr() and \c #SetArtUserAttr() to inspect and set the \c kArtIsTextWrap attribute. + + @param art The art object. + @param offset The distance in points from the geometric outline of an object + that defines an offset for wrapping. + @param invert When true, text wraps inside the outline of the offset object. + When false, text wraps around the outside of the offset object. + @return \c kBadParameterErr if the object does not have the \c kArtIsTextWrap attribute set. + */ + AIAPI AIErr (*SetArtTextWrapProperty) ( AIArtHandle art, AIReal offset, AIBoolean invert ); + + /** Retrieves the properties that affect how text wraps around a text wrap object; + that is, one in which the \c kArtIsTextWrap attribute is set. + Use \c #GetArtUserAttr() and \c #SetArtUserAttr() to inspect and set the + \c kArtIsTextWrap attribute. + + @param art The art object. + @param offset [out] A buffer in which to return the distance in points from + the geometric outline of an object that defines an offset for wrapping. + @param invert [out] A buffer in which to return the output as true if text wraps inside the outline + of the offset object, or false if text wraps around the outside of the offset object. + @return \c kBadParameterErr if the object does not have the \c kArtIsTextWrap attribute set. */ + AIAPI AIErr (*GetArtTextWrapProperty) ( AIArtHandle art, AIReal *offset, AIBoolean *invert ); + + /** Creates and instates a copy scope. Scopes are reference counted. You must + use \c #DestroyCopyScope to release the reference when it is no longer needed. + It is recommended that you use the C++ wrapper \c #ai::CopyScope, which takes + care of memory management. + + @param kind The type of scope to create, an \c ::AICopyScopeKind value. + @param scope [out] A buffer in which to return the new scope reference. */ + AIAPI AIErr (*CreateCopyScope) (enum AICopyScopeKind kind, AICopyScopeHandle* scope); + + /** Uninstates and destroys a copy scope. It is recommended that you use the + C++ wrapper \c #ai::CopyScope, which takes care of memory management. + @param scope The scope reference, as returned by \c #CreateCopyScope(). + */ + AIAPI AIErr (*DestroyCopyScope) (AICopyScopeHandle scope); + + /* Introduced in Illustrator 12.0 */ + + /** Checks to see if it is OK to create or insert an art object of a given type at a given insertion point. + @param paintOrder The insertion point in the paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object for the paint order. + @param artType The type of art object, an \c #AIArtType value. + + @return \c kNoErr if it is OK, and \c #kInvalidArtTypeForDestErr if it is not. + */ + AIAPI AIErr (*InsertionPointBadForArtType) (ai::int16 paintOrder, AIArtHandle prep, ai::int16 artType); + + /** Check to see if it is OK to insert an art object or a duplicate copy of it at the indicated + insertion point, based on attributes of the insertion context and the candidate art, without actually + attempting the insertion. This is mainly intended for use during drag-drop mouseover, + to give proper cursor feedback, and so that an insertion is not attempted if it will fail. + @param candidateArt The art object to test. + @param paintOrder The position for the insertion point, with respect to \c prep, an \c AITypes::AIPaintOrder value. + @param prep The prepositional object for the \c paintOrder position. + @return \c kNoErr if it is OK. Possible non-OK returns are \c #kTooDeepNestingErr, + \c #kInvalidArtTypeForDestErr, and \c #kUntouchableArtObjectErr. + */ + AIAPI AIErr (*PreinsertionFlightCheck) (AIArtHandle candidateArt, ai::int16 paintOrder, AIArtHandle prep); + + /** Sets the note attribute for an art object, which typically contains text entered by the user. + To attach private data to an art object, plug-ins should use the art dictionary interface (see \c #GetDictionary()) + rather than using the note. + @param art The art object. + @param inNote The new text for the note. + */ + AIAPI AIErr (*SetNote) (AIArtHandle art, const ai::UnicodeString& inNote); + + /** Retrieves the note attribute text for an art object, which typically contains text entered by the user. + @param art The art object + @param outNote [out] A buffer in which to return the contents of the note. + Returns an empty string if the art object has no note. + @see \c #SetNote() + */ + AIAPI AIErr (*GetNote) (AIArtHandle art, ai::UnicodeString& outNote); + + /** Checks whether an art object has a note attached. (Note this function returns a boolean value, not an error code.) + @param art The art object. + @return True if there is a note attached. */ + AIAPI AIBoolean (*HasNote) (AIArtHandle art); + + /** Deletes the note attached to an art object, if there is one. No error code is returned. + @param art The art object. */ + AIAPI void (*DeleteNote) (AIArtHandle art); + + /** Gets the size of the XMP metadata associated with an art object. + @param art The art object. + @param size [out] A buffer in which to return the number of bytes, or 0 if there is no XMP metadata. + */ + AIAPI AIErr (*GetArtXMPSize)(AIArtHandle art, size_t* size); + + /** Retrieves the XML packet associated with an art object's XMP metadata. The format is UTF-8 + Unicode. + @param art The art object. + @param xmp [out] A buffer in which to return the XML packet. Allocate a buffer using \c #GetArtXMPSize(). + @param size The number of bytes in the \c xmp buffer. + */ + AIAPI AIErr (*GetArtXMP)(AIArtHandle art, char *xmp, size_t size); + + /** Sets XMP metadata for an art object, replacing any existing data. Format must be UTF-8 + Unicode. + @param art The art object. + @param xmp The new XML packet.Use a null XMP pointer or empty one to remove the existing metadata. + */ + AIAPI AIErr (*SetArtXMP)(AIArtHandle art, const char *xmp); + + /** Retrieves the geometric bounds of an art object after applying a transformation matrix. + Returns double-precision coordinates. + @param art The art object. + @param transform A pointer to a transformation matrix to apply. + @param flags Bit flags that specify which bounds to return. A logical OR of \c #AIArtBoundsOptions constants. + The flags must include either \c kVisibleBounds or \c kControlBounds, + and can include additional flags depending on which of these is included. + @param bounds [out] A buffer in which to return the bounds value, containing double-precision coordinates. + @see \c #GetArtTransformBounds() + */ + AIAPI AIErr (*GetPreciseArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIDoubleRect *bounds ); + + /** Removes an art object from the art tree, performing minimal checks for validity of the input + in order to maximize performance. Disposing of a group or compound path + also removes the children. + @param art The art object. Upon return, the reference is no longer valid. + */ + AIAPI AIErr (*UncheckedDisposeArt) ( AIArtHandle art ); + + /* Introduced in Illustrator 13.0 */ + + /** Reports whether an art object is a graph object type. + Graphs (for historical reasons) have no specific art type in + \c #AIArtType enum, and get the type \c #kUnknownArt. + @param art The art object to query. + @param artisgraph [out] A buffer in which to return the output as true if the object + is a graph. + */ + AIAPI AIErr (*ArtIsGraph)(AIArtHandle art, AIBoolean *artisgraph); + + /* Introduced in Illustrator 14.0 */ + + /** Sets the art as KeyArt for object alignment. The key object is the one to which other objects are aligned. + If art is NULL, it cancels key art. Use this API to Cancel KeyArt instead of CancelKeyArt(). + @param art [in] The art object to be set as Key Art + The art needs to be currently selected. + @return an AIErr. In case of success returns kNoErr else give kBadParameterErr + @see \c #GetKeyArt() + */ + AIAPI AIErr (*SetKeyArt)(AIArtHandle art); + + /* New in Illustrator 15.0 */ + + /** Retrieves the drawing mode for current document. + @param mode [out] A buffer in which to return the drawing mode, an \c #AIDrawingMode constant. + */ + AIAPI AIErr (*GetDrawingMode)(ai::int32* mode); + + /** Sets the drawing mode for current document. + @param mode [in] The drawing mode to be set for a document, an \c #AIDrawingMode constant. + */ + AIAPI AIErr (*SetDrawingMode)(ai::int32 mode); + + /** Retrieves the insertion point for current document based on the drawing mode. + This is the position in the art tree at which a drawing tool should create new art. + @param mode [in] The drawing mode, an \c #AIDrawingMode constant. + @param art [out] The art object. + @param paintorder [out] The position in the paint order, relative to the specified art object. + See \c #AITypes::AIPaintOrder for the possible positions. + @param editable [out] A buffer in which to return the output as true if it is possible to create art + at the returned position. For example, you cannot create art in a locked layer. + Pass null if not needed. + */ + AIAPI AIErr (*GetInsertionPointForDrawingMode) (ai::int32 mode, AIArtHandle *art, short *paintorder, AIBoolean *editable); + + /** Retrieves the insertion point for current document based on the current drawing mode. + This is the position in the art tree at which a drawing tool should create new art. + @param art [out] The art object. + @param paintorder [out] The position in the paint order, relative to the specified art object. + See \c #AITypes::AIPaintOrder for the possible positions. + @param editable [out] A buffer in which to return the output as true if it is possible to create art + at the returned position. For example, you cannot create art in a locked layer. + Pass null if not needed. + */ + AIAPI AIErr (*GetInsertionPointForCurrentDrawingMode) (AIArtHandle *art, short *paintorder, AIBoolean *editable); + /** Retrieves the path polarity of an art object. + + @param art The art object. + @param polarity [out] A buffer in which to return the polarity value. + Value of polarity is set to \c #kAIPolarPath or \c #kAINonPolarPath. + */ + + AIAPI AIErr (*GetPathPolarity) (AIArtHandle art, ai::int32* polarity); + + /** Reports whether an art object is in pixel-perfect mode. + @param art [in]: The art object + Note that this API returns a boolean value and not an error. + @return True of the pixel-perfect property is on, false if it is off. + */ + AIAPI AIBoolean (*IsPixelPerfect) (AIArtHandle art); + + /** Turns the pixel-perfect mode on or off for an art object. + @param art [in] The art object + @param isPixelPerfect [in] True to turn pixel-perfect mode on, false to turn it off. + */ + AIAPI AIErr (*SetPixelPerfect) (AIArtHandle art, AIBoolean isPixelPerfect); + + /** Compare two art objects to determine if they are equivalent in geometry, appearance attributes, + and dictionary contents. Typically, one object is in the current document and the other + is in another document. This function uses the same sense of equivalence in which two patterns + or symbol definitions are considered equivalent when retargeting an external symbol or pattern + to the current document. In particular, if one object is in a document with a different color + mode than the other, then non-global process colors are converted to the color mode of the + first object before comparison, and named global objects are considered equivalent if the + definitions match and the names are equal except for trailing numerical suffixes. + (Note that this function returns a Boolean value, not an error code.) + + @param art1 The first art object. + @param art2The second art object. + @return True if the objects are equivalent, false otherwise. + + @see \c #AISymbolSuite::RetargetForCurrentDocument() and \c #AIPathStyleSuite::RetargetForCurrentDoc() + */ + AIAPI AIBoolean (*ObjectsAreEquivalent) ( AIArtHandle art1, AIArtHandle art2 ); + + /** Reports whether an art object acts as a layer within a symbol pattern. + This is a simulated layer that functions as a group, except when isolated or expanded. + It is not a layer object and cannot be manipulated with the \c #AILayerSuite. + @param art [in] The art object + @param isLayerInSymbol [out] A buffer in which to return the output as true if + this is a simulated layer in a symbol pattern; false otherwise. + */ + AIAPI AIErr (*IsArtALayerInSymbol) ( AIArtHandle art, AIBoolean* isLayerInSymbol ); + + /** Retrieves the modification time stamp for an art object. + @param art [in] The art object + @param option [in] The type of timeStamp to get, an \c ::AIArtTimeStampOptions value. + @param timeStamp [out] A buffer in which to return the modification time stamp. + */ + AIAPI AIErr (*GetArtTimeStamp) ( AIArtHandle art, enum AIArtTimeStampOptions option, size_t* timeStamp ); + + /* Retrieves the global art edit timestamp. This value is a counter that is incremented on each art edit (0 at the beginning + of the session). A comparison between the global timestamp and an art timestamp could reveal when the art was edited last. + @return The global art edit time stamp for this session. + */ + AIAPI size_t (*GetGlobalTimeStamp) (); + + AIAPI AIErr (*ConvertPointTypeToAreaType) ( AIArtHandle art, AIArtHandle* newArtHandle ); + + AIAPI AIErr (*ConvertAreaTypeToPointType) ( AIArtHandle art, AIArtHandle* newArtHandle ); + + /** Marks an art object for redraw by incrementing the modification time stamp. + @param art[in] The art object + @param markStyleDirty[in] Pass true to dirty the artstyle of the object otherwise artstyle will not be re-executed + */ + AIAPI AIErr (*MarkDirty) ( AIArtHandle art, AIBoolean markStyleDirty ); + + /** Retrieves the SafeArt object associated with an art object. The SafeArt object + can be cached for the lifetime of the document. Use \c #GetArtHandle() to + retrieve the art object if it is still valid, or report if the art has been + deleted or moved to the undo stack. + @param art [in] The art object. + @param safeArt [out] A buffer in which to return the SafeArt object. + @see \c #GetArtHandle() + */ + AIAPI AIErr (*GetSafeArtHandle) ( AIArtHandle art, AISafeArtHandle* safeArt ); + + /** Retrieves the art object associated with a SafeArt object, if the art + is still in scope. + @param safeArt [in] The SafeArt object. + @param art [in] A buffer in which to return the valid art object, + or a null pointer if the art object has been deleted or + has moved to the undo stack. + @return \c #kAIArtHandleOutOfScopeErr if the associated art is + no longer valid. + */ + AIAPI AIErr (*GetArtHandle) ( AISafeArtHandle safeArt, AIArtHandle* art ); + + + /** Retrieves the default name of an art object. + @param art The art object. + @param name [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetArtDefaultName) ( AIArtHandle art, ai::UnicodeString &name ); + + /** Retrieves an art object's document. + @param art The art object. + @param document [out] A buffer in which to return the document object. See \c #AIDocumentSuite + */ + AIAPI AIErr (*GetDocumentOfArt) ( AIArtHandle art, AIDocumentHandle *document ); + +} AIArtSuite; + +#include "AIHeaderEnd.h" // __cplusplus + +#endif // __AIArt__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtConverter.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtConverter.h index c40c875..cd7967c 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtConverter.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtConverter.h @@ -1,193 +1,193 @@ -/* - * - * AIArtConverter.h - * ADOBE SYSTEMS INCORPORATED - * Copyright 2002-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __ArtConverterSuite__ -#define __ArtConverterSuite__ - - -/* Imports */ - -#include "AIArt.h" - - -#include "AIHeaderBegin.h" - - -/* Constants */ - -#define kAIArtConverterSuite "AI Art Converter Suite" -#define kAIArtConverterSuiteVersion3 AIAPI_VERSION(3) -#define kAIArtConverterSuiteVersion kAIArtConverterSuiteVersion3 -#define kAIArtConverterVersion kAIArtConverterSuiteVersion - -/** Option bit flags that control how the "footprint" of a path is treated - when converting to outlines. See \c #AIArtConverterSuite, \c #AISymbolSuite. */ -enum { - /** Expands source art before converting to outlines. */ - kOutlineExpandAppearance = 0x0001, - /** Strips paths with no fill and no stroke before converting to outlines. */ - kOutlineEliminateUnpainted = 0x0002, - /** Adds strokes when converting to outlines; see \c #kOutlineAlwaysIncludeFillArea. */ - kOutlineAddStrokes = 0x0004, - /** Subtracts strokes when converting to outlines; see \c #kOutlineAlwaysIncludeFillArea.*/ - kOutlineSubtractStrokes = 0x0008, - /** Controls how the inner fillable area of unfilled but - stroked paths is combined with the stroke area, if either - \c #kOutlineAddStrokes or \c #kOutlineSubtractStrokes - is set. - - For example, assume an original path of a closed figure that - contains another closed figure, which in turn contains another - closed figure, with no fill and wide stroke: - - @verbatim - +-------+ - |+-----+| - ||+---+|| - ||| ||| - ||+---+|| - |+-----+| - +-------+ - @endverbatim - - With \c #kOutlineAlwaysIncludeFillArea set, but both stroke flags off, - stroke is ignored and the outline is that of the fillable area: - @verbatim - +-----+ - | | - | | - | | - +-----+ - @endverbatim - - \c #kOutlineAddStrokes only creates a filled compound path with a hole in the middle: - @verbatim - +-------+ - | | - | +---+ | - | | | | - | +---+ | - | | - +-------+ - @endverbatim - - With both \c #kOutlineAddStrokes and \c #kOutlineAlwaysIncludeFillArea set, the - fill area is added to the stroke area: - @verbatim - +-------+ - | | - | | - | | - | | - | | - +-------+ - @endverbatim - - With both \c #kOutlineSubtractStrokes and \c #kOutlineAlwaysIncludeFillArea set, - the fill area is added, and the stroke area is subtracted: - @verbatim - +---+ - | | - +---+ - @endverbatim - - This can be used to get the inner region of a path, the part that would show in the fill color - if it were filled. - - With \c #kOutlineSubtractStrokes only, the inner-area path is created on paths that are both filled and stroked, - but paths that are stroked only are either stripped (if \c #kOutlineEliminateUnpainted is on) - or left alone (if it is off). */ - kOutlineAlwaysIncludeFillArea = 0x0010, - /** If input art includes straight lines (which have no area and would be - excluded by Pathfinder even if they have a fill), they are given a - hair-line stroke so that they will be included in the union. Use only when - \c #kOutlineAddStrokes is set. - - The addition of a stroke happens after the test for unpainted paths, so if - \c #kOutlineEliminateUnpainted is set, it happens only to straight line segments - that have a fill but no stroke and does not prevent the elimination of completely - unpainted line segments. If \c #kOutlineEliminateUnpainted is off, it also - happens to unpainted straight line segments. */ - kOutlineAlwaysStrokeStraightLines = 0x0020 -}; - -/** How strokes are expanded while creating outlines; see \c #kOutlineAlwaysIncludeFillArea. */ -#define kOutlineExpandStrokes (kOutlineAddStrokes|kOutlineSubtractStrokes) - - -/** @ingroup Suites - This suite allows you to convert art to paths or outlines. - @see \c #AISymbolSuite::CopySymbolPatternOutline(), - \c #AISymbolSuite::InsertSymbolArtOutline(), - \c #AISymbolSuite::PeekCachedPatternOutline() - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIArtConverterSuite and \c #kAIArtConverterVersion. -*/ - -typedef struct { - - /** Converts artwork to a path, a compound path, or a group of paths and compound paths. - This function does not combine multiple paths. - @param art The art object. This object is deleted, and the new object or objects - are inserted into the art tree in its place. - */ - AIAPI AIErr (*ArtConvertToPaths)( AIArtHandle *art ); - - /** Creates a new path or compound path that is an outline of the given artwork, and - inserts it into the artwork tree at a given location. Combines multiple paths into - a single path or compound path. Some of the style is ignored (only the shape is important - to the outline), but the art style of the result object is generally derived from that of - the top element, possibly modified by stroke expansion, depending on the options. - @param art The art object. - @param paintOrder The paint order position, relative to the \c destination object, - an \c #AITypes::AIPaintOrder value. - @param destination The prepositional art object for the paint order. - @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: -
\c #kOutlineExpandAppearance -
\c #kOutlineEliminateUnpainted -
\c #kOutlineAddStrokes -
\c #kOutlineSubtractStrokes -
\c #kOutlineAlwaysIncludeFillArea -
\c #kOutlineAlwaysStrokeStraightLines - @param outlineArt Optional, a buffer in which to return the new path art object. - */ - AIAPI AIErr (*GetOutlineArt) ( AIArtHandle art, ai::int16 paintOrder, AIArtHandle destination, - ai::int32 options, AIArtHandle *outlineArt ); - - /** Converts a given art object in place to a single path or compound path, disposing of the original - art object. Resulting single path or compound path will be placed at the same position in the art - tree as of original art object. Some of the style is ignored (only the shape is important - to the outline), but the art style of the result object is generally derived from that of - the top element, possibly modified by stroke expansion, depending on the options. Use this method - instead of GetOutlineArt when original art object needs to be replaced by outlined art object. - @param art The art object. - @param convertToOutlineOptions Option flags for conversion, a logical OR of these values -
\c #kOutlineExpandAppearance -
\c #kOutlineEliminateUnpainted -
\c #kOutlineAddStrokes -
\c #kOutlineSubtractStrokes -
\c #kOutlineAlwaysIncludeFillArea -
\c #kOutlineAlwaysStrokeStraightLines - */ - AIAPI AIErr (*ArtConvertToOutline) ( AIArtHandle *art, ai::int32 options ); - -} AIArtConverterSuite; - - -#include "AIHeaderEnd.h" - -#endif // __ArtConverterSuite__ - +/* + * + * AIArtConverter.h + * ADOBE SYSTEMS INCORPORATED + * Copyright 2002-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __ArtConverterSuite__ +#define __ArtConverterSuite__ + + +/* Imports */ + +#include "AIArt.h" + + +#include "AIHeaderBegin.h" + + +/* Constants */ + +#define kAIArtConverterSuite "AI Art Converter Suite" +#define kAIArtConverterSuiteVersion3 AIAPI_VERSION(3) +#define kAIArtConverterSuiteVersion kAIArtConverterSuiteVersion3 +#define kAIArtConverterVersion kAIArtConverterSuiteVersion + +/** Option bit flags that control how the "footprint" of a path is treated + when converting to outlines. See \c #AIArtConverterSuite, \c #AISymbolSuite. */ +enum { + /** Expands source art before converting to outlines. */ + kOutlineExpandAppearance = 0x0001, + /** Strips paths with no fill and no stroke before converting to outlines. */ + kOutlineEliminateUnpainted = 0x0002, + /** Adds strokes when converting to outlines; see \c #kOutlineAlwaysIncludeFillArea. */ + kOutlineAddStrokes = 0x0004, + /** Subtracts strokes when converting to outlines; see \c #kOutlineAlwaysIncludeFillArea.*/ + kOutlineSubtractStrokes = 0x0008, + /** Controls how the inner fillable area of unfilled but + stroked paths is combined with the stroke area, if either + \c #kOutlineAddStrokes or \c #kOutlineSubtractStrokes + is set. + + For example, assume an original path of a closed figure that + contains another closed figure, which in turn contains another + closed figure, with no fill and wide stroke: + + @verbatim + +-------+ + |+-----+| + ||+---+|| + ||| ||| + ||+---+|| + |+-----+| + +-------+ + @endverbatim + + With \c #kOutlineAlwaysIncludeFillArea set, but both stroke flags off, + stroke is ignored and the outline is that of the fillable area: + @verbatim + +-----+ + | | + | | + | | + +-----+ + @endverbatim + + \c #kOutlineAddStrokes only creates a filled compound path with a hole in the middle: + @verbatim + +-------+ + | | + | +---+ | + | | | | + | +---+ | + | | + +-------+ + @endverbatim + + With both \c #kOutlineAddStrokes and \c #kOutlineAlwaysIncludeFillArea set, the + fill area is added to the stroke area: + @verbatim + +-------+ + | | + | | + | | + | | + | | + +-------+ + @endverbatim + + With both \c #kOutlineSubtractStrokes and \c #kOutlineAlwaysIncludeFillArea set, + the fill area is added, and the stroke area is subtracted: + @verbatim + +---+ + | | + +---+ + @endverbatim + + This can be used to get the inner region of a path, the part that would show in the fill color + if it were filled. + + With \c #kOutlineSubtractStrokes only, the inner-area path is created on paths that are both filled and stroked, + but paths that are stroked only are either stripped (if \c #kOutlineEliminateUnpainted is on) + or left alone (if it is off). */ + kOutlineAlwaysIncludeFillArea = 0x0010, + /** If input art includes straight lines (which have no area and would be + excluded by Pathfinder even if they have a fill), they are given a + hair-line stroke so that they will be included in the union. Use only when + \c #kOutlineAddStrokes is set. + + The addition of a stroke happens after the test for unpainted paths, so if + \c #kOutlineEliminateUnpainted is set, it happens only to straight line segments + that have a fill but no stroke and does not prevent the elimination of completely + unpainted line segments. If \c #kOutlineEliminateUnpainted is off, it also + happens to unpainted straight line segments. */ + kOutlineAlwaysStrokeStraightLines = 0x0020 +}; + +/** How strokes are expanded while creating outlines; see \c #kOutlineAlwaysIncludeFillArea. */ +#define kOutlineExpandStrokes (kOutlineAddStrokes|kOutlineSubtractStrokes) + + +/** @ingroup Suites + This suite allows you to convert art to paths or outlines. + @see \c #AISymbolSuite::CopySymbolPatternOutline(), + \c #AISymbolSuite::InsertSymbolArtOutline(), + \c #AISymbolSuite::PeekCachedPatternOutline() + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIArtConverterSuite and \c #kAIArtConverterVersion. +*/ + +typedef struct { + + /** Converts artwork to a path, a compound path, or a group of paths and compound paths. + This function does not combine multiple paths. + @param art The art object. This object is deleted, and the new object or objects + are inserted into the art tree in its place. + */ + AIAPI AIErr (*ArtConvertToPaths)( AIArtHandle *art ); + + /** Creates a new path or compound path that is an outline of the given artwork, and + inserts it into the artwork tree at a given location. Combines multiple paths into + a single path or compound path. Some of the style is ignored (only the shape is important + to the outline), but the art style of the result object is generally derived from that of + the top element, possibly modified by stroke expansion, depending on the options. + @param art The art object. + @param paintOrder The paint order position, relative to the \c destination object, + an \c #AITypes::AIPaintOrder value. + @param destination The prepositional art object for the paint order. + @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: +
\c #kOutlineExpandAppearance +
\c #kOutlineEliminateUnpainted +
\c #kOutlineAddStrokes +
\c #kOutlineSubtractStrokes +
\c #kOutlineAlwaysIncludeFillArea +
\c #kOutlineAlwaysStrokeStraightLines + @param outlineArt Optional, a buffer in which to return the new path art object. + */ + AIAPI AIErr (*GetOutlineArt) ( AIArtHandle art, ai::int16 paintOrder, AIArtHandle destination, + ai::int32 options, AIArtHandle *outlineArt ); + + /** Converts a given art object in place to a single path or compound path, disposing of the original + art object. Resulting single path or compound path will be placed at the same position in the art + tree as of original art object. Some of the style is ignored (only the shape is important + to the outline), but the art style of the result object is generally derived from that of + the top element, possibly modified by stroke expansion, depending on the options. Use this method + instead of GetOutlineArt when original art object needs to be replaced by outlined art object. + @param art The art object. + @param convertToOutlineOptions Option flags for conversion, a logical OR of these values +
\c #kOutlineExpandAppearance +
\c #kOutlineEliminateUnpainted +
\c #kOutlineAddStrokes +
\c #kOutlineSubtractStrokes +
\c #kOutlineAlwaysIncludeFillArea +
\c #kOutlineAlwaysStrokeStraightLines + */ + AIAPI AIErr (*ArtConvertToOutline) ( AIArtHandle *art, ai::int32 options ); + +} AIArtConverterSuite; + + +#include "AIHeaderEnd.h" + +#endif // __ArtConverterSuite__ + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtSet.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtSet.h index cdbe20a..55bf4b6 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtSet.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtSet.h @@ -1,250 +1,250 @@ -#ifndef __AIArtSet__ -#define __AIArtSet__ - -/* - * Name: AIArtSet.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Art Set Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AILayer__ -#include "AILayer.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIArtSet.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIArtSetSuite "AI Art Set Suite" -#define kAIArtSetSuiteVersion AIAPI_VERSION(9) -#define kAIArtSetVersion kAIArtSetSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** An \c AIArtSpec is a filter for matching art objects that have specific - properties. Pass an array of these to \c #AIArtSetSuite::MatchingArtSet() - to specify the art objects that should be returned. - Specify the type of art object to match, then filter objects of that type - based on their user attributes. - \li Use the special type \c kAnyArt to match any kind of art object. - \li \c whichAttr specifies the collection of attributes to be considered when filtering objects. - \li \c attr specifies the values those attributes must have to match an object. - - For example, specify \c kSelected for both \c whichAttr and \c attr to match - only art objects that are selected. - - Some \c #AIArtSuite::AIArtUserAttr values are not art attributes - but instead specify additional matching options. Use such a value - in the \c whichAttr field; it only needs to be in one of the art specifications. - */ -typedef struct { - /** The type of art object to match, an \c #AIArtSuite::AIArtType value. */ - ai::int16 type; - /** \c #AIArtSuite::AIArtUserAttr values for which attributes to consider (\c whichAttr) - and for the matching value (\c attr). - */ - ai::int32 whichAttr, attr; -} AIArtSpec; - -/** Opaque type for an ordered list of art object handles. */ -typedef struct _t_AIArt *AIArtSet; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - An art set is an ordered list of art object handles. An art object handle should - appear at most once in the list. This is enforced by most but not all of the - functions for manipulating the set. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIArtSetSuite and \c #kAIArtSetVersion. -*/ - -typedef struct { - - /** Creates a new, empty art set. - This is an opaque pointer and cannot be dereferenced. - Use functions in this suite to fill the set with art objects and access them. - @param artSet [out] A buffer in which to return the new art set. - */ - AIAPI AIErr (*NewArtSet) ( AIArtSet *artSet ); - - /** Frees memory associated with an art set and makes the reference null. - Does not affect any artwork referenced by the set. - @param artSet A pointer to the art set. Upon return, this reference is invalid. - */ - AIAPI AIErr (*DisposeArtSet) ( AIArtSet *artSet ); - - /** Gets the number of art handles stored in an art set. Use with \c #IndexArtSet() to - iterate through a set. - @param artSet The art set. - @param count [out] A buffer in which to return the number of art handles. - */ - AIAPI AIErr (*CountArtSet) ( AIArtSet artSet, size_t *count ); - - /** Retrieves the art object at a given index within an art set. - Use with \c #CountArtSet() to iterate through a set. This is the - most efficient way to access elements of an art set. Access speed is O(1). - @param artSet The art set. - @param index The 0-based position index, in the range \c [0..count-1]. - @param art [out] A buffer in which to return the art object. - @note \c #ReplaceArtInArtSet() can put \c NULL entries into an art set. - \c #NextInArtSet() iterates through the set skipping \c NULL entries, but - is not a efficient as this function. */ - AIAPI AIErr (*IndexArtSet) ( AIArtSet artSet, size_t index, AIArtHandle *art ); - - /** Fills an art set with an array of art objects. - The previous contents of the art set, if any, are lost. It is the - caller's responsibility to ensure that the array does not contain duplicates. - @param artSet The art set. - @param artArray A pointer to an array of art objects. - You must allocate memory for this array, and free it when it is - no longer needed. - @param count The number of entries in \c artArray. - */ - AIAPI AIErr (*ArrayArtSet) ( AIArtSet artSet, AIArtHandle *artArray, size_t count ); - - /** Fills an art set with currently selected art. - The previous contents of the art set, if any, are lost. - Many filters operate on the selected objects in a document. Use this function - to collect the selected art objects without having to iterate through the - artwork tree to find them.It is the same as calling \c #MatchingArtSet() - with a request for { kAnyArt, kArtSelected, kArtSelected } - @param artSet The art set. - */ - AIAPI AIErr (*SelectedArtSet) ( AIArtSet artSet ); - - /** Fills an art set with the art objects in the current document - that match the criteria given in a list of art specifications; see \c #AIArtSpec. - The art objects are added to the set in the order they are encountered by a pre-order - traversal of the document tree. An art object is included - if it matches any of the art specifications. - @param spec A pointer to an array of \c #AIArtSpec structures. - @param numSpecs The number of entries in \c specs. - @param artSet The art set. - */ - AIAPI AIErr (*MatchingArtSet) ( AIArtSpec *specs, ai::int16 numSpecs, AIArtSet artSet ); - - /** Fills an art set with all art objects that belong to a specific layer. - The previous contents of the art set, if any, are lost. - @param layer The layer. - @param artSet The art set. - */ - AIAPI AIErr (*LayerArtSet) ( AILayerHandle layer, AIArtSet artSet ); - - - /** Deprecated. Fills an art set \c dst with all artwork in the - document that is not in the art set \c src. - @note This function has not been kept up - to date with changes to the object model. */ - AIAPI AIErr (*NotArtSet) ( AIArtSet src, AIArtSet dst ); - - /** Fills an art set with all art objects contained in two art sets without duplicating - common art objects. - @param src0 The first source art set. - @param src1 The second source art set. - @param dst The destination art set. - */ - AIAPI AIErr (*UnionArtSet) ( AIArtSet src0, AIArtSet src1, AIArtSet dst ); - - /** Fills an art set with all art objects that are common to two art sets. - @param src0 The first source art set. - @param src1 The second source art set. - @param dst The destination art set. - */ - AIAPI AIErr (*IntersectArtSet) ( AIArtSet src0, AIArtSet src1, AIArtSet dst ); - - /** Retrieves an art object from an art set. - Use this function to iterate through the objects in an art set. - Unlike \c #IndexArtSet() this function skips \c NULL entries in the set, but it - is not as efficient; access speed is \c O(n). Use \c #IndexArtSet() if possible. - @param artSet The art set. - @param prevArt An art object contained in the set, or \c NULL to get the first object. - @param nextArt [out] A buffer in which to return the next art object, or a null object - if \c prevArt is not in the set or is the last member. - */ - AIAPI AIErr (*NextInArtSet) ( AIArtSet artSet, AIArtHandle prevArt, AIArtHandle *nextArt ); - - /* AI 9 additions. */ - - /** Appends an art object to an art set if it is not already there. - @param artSet The art set. - @param art The art object. - */ - AIAPI AIErr (*AddArtToArtSet) (AIArtSet artSet, AIArtHandle art); - - /** Removes all occurrences of an art object from an art set. - @param artSet The art set. - @param art The art object. - */ - AIAPI AIErr (*RemoveArtFromArtSet) (AIArtSet artSet, AIArtHandle art); - - /* AI 9.01 addition */ - - /** Replaces the first occurrence of one art object in a set with another, or, if - \c oldArt is not found, appends \c newArt to the set. - @param artSet The art set. - @param oldArt The art object to replace, if found. - @param newArt The art object to add. Can be \c NULL, - in which case a null entry is inserted or added to the set - */ - AIAPI AIErr (*ReplaceArtInArtSet) (AIArtSet artSet, AIArtHandle oldArt, AIArtHandle newArt); - - /* AI 18.1 addition */ - - /** Clears the art set. - @param artSet The art set. - */ - AIAPI AIErr (*ClearArtSet) (AIArtSet artSet); - -} AIArtSetSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIArtSet__ +#define __AIArtSet__ + +/* + * Name: AIArtSet.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Art Set Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2014 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AILayer__ +#include "AILayer.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIArtSet.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIArtSetSuite "AI Art Set Suite" +#define kAIArtSetSuiteVersion AIAPI_VERSION(9) +#define kAIArtSetVersion kAIArtSetSuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** An \c AIArtSpec is a filter for matching art objects that have specific + properties. Pass an array of these to \c #AIArtSetSuite::MatchingArtSet() + to specify the art objects that should be returned. + Specify the type of art object to match, then filter objects of that type + based on their user attributes. + \li Use the special type \c kAnyArt to match any kind of art object. + \li \c whichAttr specifies the collection of attributes to be considered when filtering objects. + \li \c attr specifies the values those attributes must have to match an object. + + For example, specify \c kSelected for both \c whichAttr and \c attr to match + only art objects that are selected. + + Some \c #AIArtSuite::AIArtUserAttr values are not art attributes + but instead specify additional matching options. Use such a value + in the \c whichAttr field; it only needs to be in one of the art specifications. + */ +typedef struct { + /** The type of art object to match, an \c #AIArtSuite::AIArtType value. */ + ai::int16 type; + /** \c #AIArtSuite::AIArtUserAttr values for which attributes to consider (\c whichAttr) + and for the matching value (\c attr). + */ + ai::int32 whichAttr, attr; +} AIArtSpec; + +/** Opaque type for an ordered list of art object handles. */ +typedef struct _t_AIArt *AIArtSet; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + An art set is an ordered list of art object handles. An art object handle should + appear at most once in the list. This is enforced by most but not all of the + functions for manipulating the set. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIArtSetSuite and \c #kAIArtSetVersion. +*/ + +typedef struct { + + /** Creates a new, empty art set. + This is an opaque pointer and cannot be dereferenced. + Use functions in this suite to fill the set with art objects and access them. + @param artSet [out] A buffer in which to return the new art set. + */ + AIAPI AIErr (*NewArtSet) ( AIArtSet *artSet ); + + /** Frees memory associated with an art set and makes the reference null. + Does not affect any artwork referenced by the set. + @param artSet A pointer to the art set. Upon return, this reference is invalid. + */ + AIAPI AIErr (*DisposeArtSet) ( AIArtSet *artSet ); + + /** Gets the number of art handles stored in an art set. Use with \c #IndexArtSet() to + iterate through a set. + @param artSet The art set. + @param count [out] A buffer in which to return the number of art handles. + */ + AIAPI AIErr (*CountArtSet) ( AIArtSet artSet, size_t *count ); + + /** Retrieves the art object at a given index within an art set. + Use with \c #CountArtSet() to iterate through a set. This is the + most efficient way to access elements of an art set. Access speed is O(1). + @param artSet The art set. + @param index The 0-based position index, in the range \c [0..count-1]. + @param art [out] A buffer in which to return the art object. + @note \c #ReplaceArtInArtSet() can put \c NULL entries into an art set. + \c #NextInArtSet() iterates through the set skipping \c NULL entries, but + is not a efficient as this function. */ + AIAPI AIErr (*IndexArtSet) ( AIArtSet artSet, size_t index, AIArtHandle *art ); + + /** Fills an art set with an array of art objects. + The previous contents of the art set, if any, are lost. It is the + caller's responsibility to ensure that the array does not contain duplicates. + @param artSet The art set. + @param artArray A pointer to an array of art objects. + You must allocate memory for this array, and free it when it is + no longer needed. + @param count The number of entries in \c artArray. + */ + AIAPI AIErr (*ArrayArtSet) ( AIArtSet artSet, AIArtHandle *artArray, size_t count ); + + /** Fills an art set with currently selected art. + The previous contents of the art set, if any, are lost. + Many filters operate on the selected objects in a document. Use this function + to collect the selected art objects without having to iterate through the + artwork tree to find them.It is the same as calling \c #MatchingArtSet() + with a request for { kAnyArt, kArtSelected, kArtSelected } + @param artSet The art set. + */ + AIAPI AIErr (*SelectedArtSet) ( AIArtSet artSet ); + + /** Fills an art set with the art objects in the current document + that match the criteria given in a list of art specifications; see \c #AIArtSpec. + The art objects are added to the set in the order they are encountered by a pre-order + traversal of the document tree. An art object is included + if it matches any of the art specifications. + @param spec A pointer to an array of \c #AIArtSpec structures. + @param numSpecs The number of entries in \c specs. + @param artSet The art set. + */ + AIAPI AIErr (*MatchingArtSet) ( AIArtSpec *specs, ai::int16 numSpecs, AIArtSet artSet ); + + /** Fills an art set with all art objects that belong to a specific layer. + The previous contents of the art set, if any, are lost. + @param layer The layer. + @param artSet The art set. + */ + AIAPI AIErr (*LayerArtSet) ( AILayerHandle layer, AIArtSet artSet ); + + + /** Deprecated. Fills an art set \c dst with all artwork in the + document that is not in the art set \c src. + @note This function has not been kept up + to date with changes to the object model. */ + AIAPI AIErr (*NotArtSet) ( AIArtSet src, AIArtSet dst ); + + /** Fills an art set with all art objects contained in two art sets without duplicating + common art objects. + @param src0 The first source art set. + @param src1 The second source art set. + @param dst The destination art set. + */ + AIAPI AIErr (*UnionArtSet) ( AIArtSet src0, AIArtSet src1, AIArtSet dst ); + + /** Fills an art set with all art objects that are common to two art sets. + @param src0 The first source art set. + @param src1 The second source art set. + @param dst The destination art set. + */ + AIAPI AIErr (*IntersectArtSet) ( AIArtSet src0, AIArtSet src1, AIArtSet dst ); + + /** Retrieves an art object from an art set. + Use this function to iterate through the objects in an art set. + Unlike \c #IndexArtSet() this function skips \c NULL entries in the set, but it + is not as efficient; access speed is \c O(n). Use \c #IndexArtSet() if possible. + @param artSet The art set. + @param prevArt An art object contained in the set, or \c NULL to get the first object. + @param nextArt [out] A buffer in which to return the next art object, or a null object + if \c prevArt is not in the set or is the last member. + */ + AIAPI AIErr (*NextInArtSet) ( AIArtSet artSet, AIArtHandle prevArt, AIArtHandle *nextArt ); + + /* AI 9 additions. */ + + /** Appends an art object to an art set if it is not already there. + @param artSet The art set. + @param art The art object. + */ + AIAPI AIErr (*AddArtToArtSet) (AIArtSet artSet, AIArtHandle art); + + /** Removes all occurrences of an art object from an art set. + @param artSet The art set. + @param art The art object. + */ + AIAPI AIErr (*RemoveArtFromArtSet) (AIArtSet artSet, AIArtHandle art); + + /* AI 9.01 addition */ + + /** Replaces the first occurrence of one art object in a set with another, or, if + \c oldArt is not found, appends \c newArt to the set. + @param artSet The art set. + @param oldArt The art object to replace, if found. + @param newArt The art object to add. Can be \c NULL, + in which case a null entry is inserted or added to the set + */ + AIAPI AIErr (*ReplaceArtInArtSet) (AIArtSet artSet, AIArtHandle oldArt, AIArtHandle newArt); + + /* AI 18.1 addition */ + + /** Clears the art set. + @param artSet The art set. + */ + AIAPI AIErr (*ClearArtSet) (AIArtSet artSet); + +} AIArtSetSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtSetGenerator.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtSetGenerator.h new file mode 100644 index 0000000..545ace5 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtSetGenerator.h @@ -0,0 +1,102 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AIArtSet.h" +#include "AIArtboard.h" +#include "AIHeaderBegin.h" + +/** @file AIArtSetGenerator.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIArtSetGeneratorSuite "AI Art Set Generator Suite" +#define kAIArtSetGeneratorSuiteVersion3 AIAPI_VERSION(3) +#define kAIArtSetGeneratorSuiteVersion kAIArtSetGeneratorSuiteVersion3 +#define kAIArtSetGeneratorVersion kAIArtSetGeneratorSuiteVersion + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +struct AIArtSetGeneratorSuite +{ + /** Each art in the output is a direct child of the layer group. + */ + AIAPI AIErr (*GenerateForAllLayers) ( AIArtSet outArtSet ); + + /** Each art in the output is a direct child of the layer group of the + specified layer. + */ + AIAPI AIErr (*GenerateForNthLayer) ( ai::int32 inLayerIndex, + AIArtSet outArtSet ); + + /** Each art in the output would is a direct child of the layer group of the + specified layer. + */ + AIAPI AIErr (*GenerateForNamedLayer) ( const ai::UnicodeString& inLayerName, + AIArtSet outArtSet ); + + /** Each art in the output is a direct child of a layer group such that the + art intersects with the artboard at the given index. + */ + AIAPI AIErr (*GenerateForNthArtboard) ( ai::ArtboardID inArtboardIndex, + AIArtSet outArtSet, AIBoolean skipHiddenArts ); + + /** Each art in the output is a direct child of a layer group such that the + art intersects with the artboard of the given name. + */ + AIAPI AIErr (*GenerateForNamedArtboard) ( const ai::UnicodeString& inArtboardName, + AIArtSet outArtSet, AIBoolean skipHiddenArts ); + + /** Each art in the output is a top level layer in the current document. + @param skipHiddenLayers [in] skip hidden layers + */ + AIAPI AIErr (*GenerateForTopLevelLayers) ( AIArtSet outArtSet, AIBoolean skipHiddenLayers ); + + /** Each selected art in output would be a direct child of layer group. + @param outArtSet [out] Art set to return selected top level objects in. + @see \c #GenerateNSelectedAtTopLevel(). + */ + AIAPI AIErr (*GenerateSelectedAtTopLevel) ( AIArtSet outArtSet ); + + /** Each selected art in output would be a direct child of layer group. + @param inMaxSelectedArtsToReturn [in] Maximum number of objects that should be returned. + @param outArtSet [out] Art set to return selected top level objects in. + The returned art set may have fewer objects than \c #inMaxSelectedArtsToReturn. + @param outHasMoreSelectedArts [out] Boolean value indicating if more arts were available + but not returned due to limit specified by \c #inMaxSelectedArtsToReturn. + Can be \c NULL. + */ + AIAPI AIErr (*GenerateNSelectedAtTopLevel) ( size_t inMaxSelectedArtsToReturn, + AIArtSet outArtSet, + AIBoolean *outHasMoreSelectedArts ); + + /** Each art in output would be a direct or a nested child of the art. + */ + AIAPI AIErr (*GenerateForArt) (AIArtHandle inArt, AIArtSet outArtSet); + +}; + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyle.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyle.h index 38cea0e..ba1a55c 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyle.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyle.h @@ -1,619 +1,628 @@ -#ifndef __AIArtStyle__ -#define __AIArtStyle__ - -/* - * Name: AIArtStyle.h - * Purpose: Adobe Illustrator Art Style Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2015 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIDict__ -#include "AIDictionary.h" -#endif - -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif - -#ifndef __AIPaintStyle__ -#include "AIPaintStyle.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIArtStyle.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIArtStyleSuite "AI Art Style Suite" -#define kAIArtStyleSuiteVersion7 AIAPI_VERSION(7) - -/* Latest version */ -#define kAIArtStyleSuiteVersion kAIArtStyleSuiteVersion7 -#define kAIArtStyleVersion kAIArtStyleSuiteVersion - -/** Focus types, sent in notify data for \c #kAIArtStyleFocusChangedNotifier.*/ -enum AIArtStyleFocusValue { - /** focus changed to fill or stroke */ - kAIFocusOnFillStroke, - /** focus changed to object */ - kAIFocusOnObject, - kAIDummyFocus = 0xFFFFFF -}; - -/** @ingroup Notifiers - Sent when the list of styles in the Graphic Styles palette changes - in any way, such as the order of the list, the names of the styles, - deletions, additions, and so on. Also sent when such changes are - undone or redone. - */ -#define kAINamedStyleListChangedNotifier "AI Named Style List Changed Notifier" - -/** @ingroup Notifiers - Sent when the focus changes from the entire object to just the fill or stroke - of the object, or the reverse. The notify data includes the current focus - as an \c #AIArtStyleFocusValue. The current focus controls whether transparency - and Live Effects applied by the user affect the targeted object as a whole - or just the fill or stroke of the targeted object. */ -#define kAIArtStyleFocusChangedNotifier "AI Art Style Focus Changed Notifier" - -/** @ingroup Notifiers - Sent by the Appearance palette when the user double-clicks a transparency entry. - Used mainly to bring up the transparency palette. */ -#define kAIArtStyleEditTransparencyNotifier "AI Edit Transparency Notifier" - -/** An art style Preference key, a value for a \c suffix parameter in the - \c #AIPreferenceSuite functions, with a \c prefix value of \c NULL. - This preference controls whether new objects created - by the user with the shape, brush, pen, or pencil tools inherits the full - appearance currently displayed in the Appearance palette, or inherit only - the current fill and stroke (with no transparency). This is tied to the - "New Art Has Basic Appearance" option in the Appearance palette flyout menu. */ -#define kAINewArtBasicAppearancePref "AI New Art Basic Appearance" - -/** An art style Preference key, a value for a \c suffix parameter in the - \c #AIPreferenceSuite functions, with a \c prefix value of \c NULL. - This preference controls whether Illustrator strips - the fill and stroke colors off all the text runs (that is. all the characters) - when a user applies a graphic style to a text object. Controls the - "Override Character Color" option in the Graphic Styles palette. */ -#define kAIContainerOverridesObjectAppearancePref "AI Container Overrides Object" - -/** @ingroup Errors - Returned if an art style handle passed in does not - exist in the current document. Can be returned by \c #AIArtStyleSuite::SetArtStyle(), - \c #AIArtStyleSuite::SetCurrentArtStyle(), \c #AIArtStyleSuite::SetArtStyleName(), - \c #AIArtStyleSuite::RemoveNamedStyle(), \c #AIArtStyleSuite::RedefineNamedStyle(), and - \c #AIArtStyleSuite::MoveNamedStyle(). */ -#define kStyleNotInCurrentDocument 'STYD' - -/** @ingroup Errors - Returned by \c #AIArtStyleSuite::RedefineNamedStyle() if the style passed in - is not a named style. */ -#define kStyleTypeNotCompatible 'STYP' - -/** Maximum number of real characters in a style name. */ -#define kMaxStyleNameLength 63 - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Art style types */ -enum AIArtStyleType { - /** Style contains only one fill and one stroke and can have transparency - applied only at the object level.*/ - kAIArtStyleSimple = 1, - /** Style can contain multiple fills and strokes, can have different - transparency applied to each fill or stroke as well as to the object as a - whole, and can contain Live Effects.*/ - kAIArtStyleActive -}; - - -/** Return type for \c #AIArtStyleSuite::ExamineStyle(). - See \c #AIArtStyleHasAttrsBits for values. - */ -typedef ai::uint32 AIArtStyleHasAttrs; -/** Bit flag value for style properties. -A logical OR of these is returned by \c #AIArtStyleSuite::ExamineStyle(). -*/ -enum AIArtStyleHasAttrsBits { - /** null value */ - kStyleHasNothing = 0, - /** Style has fill */ - kStyleHasFill = 0x0001, - /** Style has stroke */ - kStyleHasStroke = 0x0002, - /** Style has patterns */ - kStyleHasPatterns = 0x0004, - /** Style has custom colors */ - kStyleHasCustomColors = 0x0008, - /** Style has gradients on Fill*/ - kStyleHasFillGradients = 0x0010, - /** Style has radial gradients on Fill*/ - kStyleHasRadialGradientsOnFill = 0x0020, - /** Style has transparency */ - kStyleHasTransparency = 0x0040, - /** Style has brushes */ - kStyleHasBrushes = 0x0080, - - /** Style has gradients on Stroke*/ - kStyleHasStrokeGradients = 0x0100, - /** Style has radial gradients on Stoke*/ - kStyleHasRadialGradientsOnStroke = 0x0200, - - /** Style has effects. - Transparency does not count as an effect, but brushes do. - If a style reports that it has no transparency or effects, but the - type is \c #kAIArtStyleActive, it has either multiple fills or strokes, - or a stroke that is below the fill.*/ - kStyleHasEffects = 0x010000, - /** Style has scalable effects */ - kStyleHasScalableEffects = 0x020000, - - /** Pass to \c #AIArtStyleSuite::ExamineStyle() to check for all possible attributes. */ - kStyleCheckForAll = 0xffffffff -}; - -/** Gradient information for \c #AIArtStyleSuite::NewStyle() and - \c #AIArtStyleSuite::GetPaintAttributes(). */ -struct AIArtStylePaintData { - AIArtStylePaintData() { InitToUnknown(); } - void InitToUnknown() { InitFillToUnknown(); InitStrokeToUnknown(); } - void InitFillToUnknown(); - void InitStrokeToUnknown(); - void Copy(const AIArtStylePaintData &src) { CopyFill(src); CopyStroke(src); } - void CopyFill(const AIArtStylePaintData &src); - void CopyStroke(const AIArtStylePaintData &src); - - /** The gradient origin, relative to the bounding box - of the object to which the style would be applied. */ - AIRealPoint fillRelativeGradientOrigin; - /** The gradient length, in points.*/ - AIReal fillRelativeGradientLength; - /** The gradient aspect ratio, for radial gradients */ - AIReal fillGradientAspectRatio; - - /** The stroke gradient origin, relative to the bounding box - of the object to which the style would be applied. */ - AIRealPoint strokeRelativeGradientOrigin; - /** The stroke gradient length, in points.*/ - AIReal strokeRelativeGradientLength; - /** The stroke gradient aspect ratio, for radial gradients */ - AIReal strokeGradientAspectRatio; -}; - -inline void AIArtStylePaintData::InitFillToUnknown() -{ - fillRelativeGradientOrigin.h = fillRelativeGradientOrigin.v = kAIRealUnknown; - fillRelativeGradientLength = kAIRealUnknown; - fillGradientAspectRatio = kAIRealUnknown; -} - -inline void AIArtStylePaintData::InitStrokeToUnknown() -{ - strokeRelativeGradientOrigin.h = strokeRelativeGradientOrigin.v = kAIRealUnknown; - strokeRelativeGradientLength = kAIRealUnknown; - strokeGradientAspectRatio = kAIRealUnknown; -} - -inline void AIArtStylePaintData::CopyFill(const AIArtStylePaintData &src) -{ - fillRelativeGradientOrigin = src.fillRelativeGradientOrigin; - fillRelativeGradientLength = src.fillRelativeGradientLength; - fillGradientAspectRatio = src.fillGradientAspectRatio; -} - -inline void AIArtStylePaintData::CopyStroke(const AIArtStylePaintData &src) -{ - strokeRelativeGradientOrigin = src.strokeRelativeGradientOrigin; - strokeRelativeGradientLength = src.strokeRelativeGradientLength; - strokeGradientAspectRatio = src.strokeGradientAspectRatio; -} - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - The functions in the Art Style suite are used to access and modify - art styles on artwork in Illustrator documents. - - In AI8, Illustrator introduced the concept of plug-in groups, where the art - that was actually printed (result art) was separate from the art that the - user edited (edit art). This concept was extended in AI9 with the introduction - of art styles. Now, any art object in the document (including groups and - text objects) can optionally have "styled art" attached to it. It is this - "styled art" that gets printed, not the original "source art". - - The art style applied to an art object controls how styled - art is generated. A plug-in should not directly modify styled art itself, - which can be regenerated at any time, but should instead work with the art styles. - - Export plug-ins should export the styled art, if any, applied to an object, - rather than the original source art. - - In the UI, the art style applied to an Illustrator art object is known as the - object's \e appearance, and is manipulated through the Appearance - palette. Appearances can also be saved and reused on other objects through the - Graphic Styles palette. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIArtStyleSuite and \c #kAIArtStyleVersion. - -*/ -struct AIArtStyleSuite { - - /** Retrieves the styled art for an art object. - The objects that comprise the styled art cannot themselves have - styled art. - @param art The art object. - @param styleArt [out] A buffer in which to return the styled art object, or - the original art object if there is no special style applied. - Returns \c NULL in case of error; for example, if a Live Effect failed - to execute because of memory constraints. - */ - AIAPI AIErr (*GetStyledArt) ( AIArtHandle art, AIArtHandle* styledArt ); - - /** Retrieves the art style associated with an art object. - @param art The art object. - @param artStyle [out] A buffer in which to return the art style reference, or - \c NULL if no art style is applied. Null art styles are common - for objects of type \c kGroupArt, \c kPlacedArt, and \c kPluginArt. */ - AIAPI AIErr (*GetArtStyle) ( AIArtHandle art, AIArtStyleHandle* artStyle ); - - /** Retrieves the art style currently displayed in the Appearance palette. - @param artStyle [out] A buffer in which to return the art style reference. - @param mixedState [out] A buffer in which to return true if the Appearance - palette shows "Mixed". In this case, the returned art style - is a simple style which is an attempt to gather the common attributes - of the art styles attached to the currently selected objects in the - current document. - */ - AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* artStyle, AIBoolean* mixedState ); - - /** Retrieves an art style by its unique name from the current document. - @param artStyle [out] A buffer in which to return the art style reference. - @param name The unique name. - @param searchAllStyles When true, search all styles in the current document, - including anonymous styles. - When false, search only named styles (those shown in the Graphic Styles - palette). - @see \c #GetArtStyleByNameFromDocument() - */ - AIAPI AIErr (*GetArtStyleByName) ( AIArtStyleHandle* artStyle, const ai::UnicodeString& name, - AIBoolean searchAllStyles ); - - /** Gets the number of art styles currently listed in the Graphic Styles palette. - Use with \c #GetNthNamedArtStyle() to iterate through art styles in the current document. - @param count [out] A buffer in which to return the number of styles. - @see \c #CountNamedArtStylesFromDocument() - */ - AIAPI AIErr (*CountNamedArtStyles) ( ai::int32* count ); - - /** Retrieves a named art style by index. Use with \c #CountNamedArtStyles() - to iterate through art styles that are currently shown in the Graphic Styles palette. - @param n The position index, in the range [0..numStyles-1]. - @param artStyle [out] A buffer in which to return the art style reference. - @see \c #GetNthNamedArtStyleFromDocument() - */ - AIAPI AIErr (*GetNthNamedArtStyle) ( ai::int32 n, AIArtStyleHandle* artStyle ); - - /** Applies an art style to an art object. - @param art The art object. - @param artStyle The art style, or \c NULL to remove any art style - currently associated with the art object. - @return \c #kStyleNotInCurrentDocument if the given art style is not in - the current document. - */ - AIAPI AIErr (*SetArtStyle) ( AIArtHandle art, AIArtStyleHandle artStyle ); - - /** Applies an art style to the currently targeted objects on the artboard. This - is the same clicking the style in the Graphic Styles palette. - @param artStyle The art style. - @return \c #kStyleNotInCurrentDocument if the given art style is not in the - current document. - */ - AIAPI AIErr (*SetCurrentArtStyle) ( AIArtStyleHandle artStyle ); - - /** Retrieves the unique name of an art style. - @param artStyle The art style. - @param name [out] A buffer in which to return the name. - @param isAnonymous [out] A buffer in which to return true if the style is anonymous, - or false if it is named (shown in the Graphic Styles palette). - */ - AIAPI AIErr (*GetArtStyleName) ( AIArtStyleHandle artStyle, ai::UnicodeString& name, - AIBoolean* isAnonymous ); - - /** Sets the unique name of a named art style; that is, one that is shown - in the Graphic Styles palette. Anonymous styles cannot be renamed. You can use - \c #AddNamedStyle() to convert an anonymous style to a named style. - @param artStyle The art style. This must be a named art style - @param name The new name. Style names are limited to 64 characters - (including the terminating \c NULL character). Empty ("") names are not allowed. - @return \c #kStyleNotInCurrentDocument if the given art style is not in - the current document.
\c #kNameInUseErr if another art style already exists - with the given name. - */ - AIAPI AIErr (*SetArtStyleName) ( AIArtStyleHandle artStyle, const ai::UnicodeString& name ); - - /** Retrieves the paint information for an art style. - - @param artStyle The art style. - @param aiPathStyle [out] A buffer in which to return an \c #AIPathStyle structure - that contains information about the fill, stroke and the even-odd fill rule. - @param paintData [out] A buffer in which to return an \c #AIArtStylePaintData structure - that contains the gradient vector and origin relative to the object's bounding box. - */ - AIAPI AIErr (*GetPaintAttributes) ( AIArtStyleHandle artStyle, AIPathStyle* aiPathStyle, - AIArtStylePaintData* paintData ); - - /** Creates a new art style. - @param aiPathStyle An \c #AIPathStyle structure that contains information about - the fill, stroke and the even-odd fill rule. - @param paintData An \c #AIArtStylePaintData structure that contains the - gradient vector and origin relative to the object's bounding box. Can be \c NULL. - @param blendDict A dictionary that contains the transparency information. Can be \c NULL. - @param newStyle [out] A buffer in which to return the new art style reference. - */ - AIAPI AIErr (*NewStyle) ( AIPathStyle* aiPathStyle, AIArtStylePaintData* paintData, - AIDictionaryRef blendDict, AIArtStyleHandle* newStyle ); - - /** Converts an anonymous style to a named style, which is shown in the Graphic Styles palette. - @param artStyle The anonymous art style. - @param name The new name. Style names are limited to 64 characters - (including the terminating \c NULL character). Empty ("") names are not allowed. - @param uniquify When true, the function appends a numeric string to make the name unique, if - it is already in use. When false, if the name is in use, the function fails. - @param namedStyle [out] A buffer in which to return the new art style reference. - @return \c #kNameInUseErr if the name is already in use and \c uniquify is false. - */ - AIAPI AIErr (*AddNamedStyle) ( AIArtStyleHandle artStyle, const ai::UnicodeString& name, AIBoolean uniquify, - AIArtStyleHandle* namedStyle ); - - /** Converts a named style, which is shown in the Graphic Styles palette, to an anonymous style, which is not. - Removes the named style from the palette. - @param namedStyle The named art style. - @param anonStyle [out] A buffer in which to return the new art style reference. - @return \c #kStyleNotInCurrentDocument if the art style is not in the current document. */ - AIAPI AIErr (*RemoveNamedStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle* anonStyle ); - - /** Creates an anonymous copy of a named art style (one shown in the Graphics Styles palette). - The named style remains in the palette. - @param namedStyle The named style. (If this is an anonymous style, it is copied to \c anonStyle.) - @param anonStyle [out] A buffer in which to return the new art style reference. - */ - AIAPI AIErr (*CreateAnonymousStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle* anonStyle ); - - /** Redefines a named art style to have the same characteristics as another style. - @param namedStyle The named style to redefine. - @param dstStyle The style to copy attributes from. - @return The error \c #kStyleNotInCurrentDocument if \c namedStyle is not in the current document. - */ - AIAPI AIErr (*RedefineNamedStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle dstStyle ); - - /** Moves a named art style to a position in the Graphic Styles palette. - @param namedStyle The named art style. - @param index The new position index. Use -1 to move the art style to the end - of the list. */ - AIAPI AIErr (*MoveNamedStyle) (AIArtStyleHandle namedStyle, ai::int32 index); - - /** Retrieves a named art style by its unique name from a specified document. Searches - only named styles (those that are shown in the Graphic Styles palette when - the specified document is current). - @param artStyle [out] A buffer in which to return the art style reference. - @param name The unique name. - @param document The document. - @see \c #GetArtStyleByName()*/ - AIAPI AIErr (*GetArtStyleByNameFromDocument) ( AIArtStyleHandle* artStyle, const ai::UnicodeString& name, - AIDocumentHandle document ); - /** Gets the number of named art styles in a specified document (those shown - in the Graphic Styles palette when that document is current). - Use with \c #GetNthNamedArtStyleFromDocument() to iterate through art styles - in a particular document. - @param count [out] A buffer in which to return the number of styles - @param document The document. - @see \c #CountNamedArtStyles() - */ - AIAPI AIErr (*CountNamedArtStylesFromDocument) ( ai::int32* count, AIDocumentHandle document ); - - /** Retrieves a named art style by index for a specified document. - Use with \c #CountNamedArtStylesFromDocument() to iterate through art styles - that are shown in the Graphic Styles palette when that document is current. - @param n The position index, in the range [0..numStyles-1]. - @param artStyle [out] A buffer in which to return the art style reference. - @param document The document. - @see \c #GetNthNamedArtStyle() - */ - AIAPI AIErr (*GetNthNamedArtStyleFromDocument) ( ai::int32 n, AIArtStyleHandle* artStyle, - AIDocumentHandle document ); - - /** Tests equivalence between two art styles. - @param artStyle1 The first art style. - @param artStyle2 The second art style. - @param result [out] A buffer in which to return true if the styles are equivalent. - @note A false result does not guarantee that the two styles are not equivalent. - */ - AIAPI AIErr (*Equiv) ( AIArtStyleHandle artStyle1, AIArtStyleHandle artStyle2, - AIBoolean* result ); - - /** Sorts the named art styles in the current document alphabetically by name. The order - is reflected in the Graphic Styles palette. - */ - AIAPI AIErr (*SortNamedStyles) ( void ); - - /** Retrieves the default art style of the current document, which is always - listed first in the Graphic Styles palette. - @param artStyle [out] A buffer in which to return the art style reference. - */ - AIAPI AIErr (*GetDefaultArtStyle) (AIArtStyleHandle* artStyle); - - /** Retrieves the name of the default art style of the current document, which is always - listed first in the Graphic Styles palette. - @param name [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetDefaultArtStyleName) ( ai::UnicodeString& name); - - /** Reports whether an art style exists in the current document. - (Note that the function returns a boolean value, not an error code.) - @param artStyle The art style. - @return True if the art style is in the current document. - */ - AIAPI AIBoolean (*ValidateArtStyle) ( AIArtStyleHandle artStyle ); - - /** Expands the style of an art object, replacing the art object with the art - that would be returned by \c #GetStyledArt(). Transfers opacity masks, - URLs, tags, and so on from the input art to the flattened art. - @param art The art object. Upon return, this reference is no longer valid. - @note This function is maintained for compatibility with older plug-ins, - but is superseded by \c #GetFlattenedArt() - */ - AIAPI AIErr (*FlattenStyle) ( AIArtHandle art ); - - /** Retrieves the type of an art style. - @param artStyle The art style. - @param type [out] A buffer in which to return the type; a \c #AIArtStyleType value. */ - AIAPI AIErr (*GetArtStyleType) ( AIArtStyleHandle artStyle, ai::int16* type ); - - /** Reports whether an art style contains all the pieces it needs in order - to execute. (Note that this function returns a boolean value, not an error code.) - @param artStyle The art style. - @return True if the style can be successfully applied. -
False if the style contains an effect provided by a plug-in that - cannot be found in the Plug-Ins folder. */ - AIAPI AIBoolean (*CanExecute) ( AIArtStyleHandle artStyle ); - - /** Returns the scale factor for an art object's style. (Note that the function returns a - numeric value, not an error code.)
- The option "Scale Strokes & Effects" allows you to scale the stroke weight - and effects attached to an art object.The scale factor is stored with the - art object, and applied after the style is applied. For example, if the style attached - to an object has a stroke with a weight of 2 pt, and the object's scale factor is 2.5, - the visual stroke weight is 5 pt. - - @note \c #GetPaintAttributes() gets the unscaled parameter values,as do functions from the - \c #AIArtStyleParserSuite. -
However, the \c #AIPathStyleSuite calls return the scaled stroke weights - attached to the objects. - - @param art The art object. - @return The scale factor. - @see \c #SetArtStyleScaleFactor()
\c #ResetArtStyleScaleFactor() - */ - AIAPI AIReal (*GetArtStyleScaleFactor) ( AIArtHandle art ); - - /** Sets the scale factor for an art object's style. The scale factor is stored with the - art object, and applied after the style is applied. - @param art The art object. - @param scaleFactor The new scale factor. - @see \c #GetArtStyleScaleFactor()
\c #ResetArtStyleScaleFactor() - */ - AIAPI AIErr (*SetArtStyleScaleFactor) ( AIArtHandle art, AIReal scaleFactor ); - - /** Applies a new style to an art object that is scaled by the object's current scale factor, - and resets the scale factor for the object to 1. - @param art The art object. - @see \c #GetArtStyleScaleFactor()
\c #ResetArtStyleScaleFactor() - */ - AIAPI AIErr (*ResetArtStyleScaleFactor) ( AIArtHandle art ); - - /** Transforms the art style of an object. - @param art The art object. - @param matrix A pointer to the transformation matrix. - @param lineScale The scale factor to apply to the line-drawing style values - specified in the art object’s current style. - @param flags Bit flags that control how the transformation is performed. - A logical OR of \c #AITransformArtOptions values. - If the \c kTransformObjects flag is on, it is assumed that the art object itself - has also been transformed by the same matrix, and that any transformation of the points, - descendant art, and so on, has already been performed. This allows gradient vectors and - other style attributes that are dependent upon object bounds to be adjusted immediately - rather than deferred until artwork synchronization. - */ - AIAPI AIErr (*TransformObjectArtStyle) ( AIArtHandle art, AIRealMatrix *matrix, AIReal lineScale, ai::int32 flags ); - - /** Examines an art style for specific attributes, and returns the ones found. - (Note that the function returns an attribute structure, not an error code.) - @param artStyle The art style. - @param checkFor A logical OR of \c #AIArtStyleHasAttrsBits values, - specifying which attributes to check for. Pass \c #kStyleCheckForAll - to check all attributes. - @return A logical OR of \c #AIArtStyleHasAttrsBits values for those attributes found in the style. - */ - AIAPI AIArtStyleHasAttrs (*ExamineStyle) ( AIArtStyleHandle artStyle, AIArtStyleHasAttrs checkFor ); - - /** Retrieves the art style that will be used for new art created by a tool, based on - application preferences. - @param artStyle [out] A buffer in which to return the style reference. - */ - AIAPI AIErr (*GetToolArtStyle) ( AIArtStyleHandle* artStyle ); - - // ===================== NEW FOR Illustrator 10.0 ========================= - - /** Expands the style of an art object, replacing the art object with the art - that would be returned by \c #GetStyledArt(). Transfers opacity masks, - URLs, tags, and so on from the input art to the flattened art. - @param art The art object. Upon return, this reference is no longer valid, - unless no flattening was needed. - @param flattenedArt [out] A buffer in which to return the flattened art object. - */ - AIAPI AIErr (*GetFlattenedArt) ( AIArtHandle art, AIArtHandle *flattenedArt ); - - /** Reports whether an art object has a style that would be equivalent to a null style. - This is the same as verifying that the style has no fill, no stroke, - no effects, and default transparency attributes. (Note that the function returns a - boolean value, not an error code.) - @param art The art object. - @return True if the art's style is effectively null.*/ - AIAPI AIBoolean (*HasEffectiveNullStyle) ( AIArtHandle art ); - - /** Retrieves the map for the path style of an art style, as retrieved - by \c #GetPaintAttributes(). The map indicates which fields of an \c #AIPathStyle - are specified by a partial style. A path style can contain unknown or mixed - attributes (indicated by a value of false for that attribute in the map) only - when it is associated with a graph object, not when it is associated with an art object. - @param artStyle The art style. - @param aiPathStyleMap [out] A buffer in which to return the path style map. */ - AIAPI AIErr (*GetPaintMap) ( AIArtStyleHandle artStyle, AIPathStyleMap* aiPathStyleMap ); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIArtStyle__ +#define __AIArtStyle__ + +/* + * Name: AIArtStyle.h + * Purpose: Adobe Illustrator Art Style Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2016 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIDict__ +#include "AIDictionary.h" +#endif + +#ifndef __AIPathStyle__ +#include "AIPathStyle.h" +#endif + +#ifndef __AIPaintStyle__ +#include "AIPaintStyle.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIArtStyle.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIArtStyleSuite "AI Art Style Suite" +#define kAIArtStyleSuiteVersion8 AIAPI_VERSION(8) + +/* Latest version */ +#define kAIArtStyleSuiteVersion kAIArtStyleSuiteVersion8 +#define kAIArtStyleVersion kAIArtStyleSuiteVersion + +/** Focus types, sent in notify data for \c #kAIArtStyleFocusChangedNotifier.*/ +enum AIArtStyleFocusValue { + /** focus changed to fill or stroke */ + kAIFocusOnFillStroke, + /** focus changed to object */ + kAIFocusOnObject, + kAIDummyFocus = 0xFFFFFF +}; + +/** @ingroup Notifiers + Sent when the list of styles in the Graphic Styles palette changes + in any way, such as the order of the list, the names of the styles, + deletions, additions, and so on. Also sent when such changes are + undone or redone. + */ +#define kAINamedStyleListChangedNotifier "AI Named Style List Changed Notifier" + +/** @ingroup Notifiers + Sent when the focus changes from the entire object to just the fill or stroke + of the object, or the reverse. The notify data includes the current focus + as an \c #AIArtStyleFocusValue. The current focus controls whether transparency + and Live Effects applied by the user affect the targeted object as a whole + or just the fill or stroke of the targeted object. */ +#define kAIArtStyleFocusChangedNotifier "AI Art Style Focus Changed Notifier" + +/** @ingroup Notifiers + Sent by the Appearance palette when the user double-clicks a transparency entry. + Used mainly to bring up the transparency palette. */ +#define kAIArtStyleEditTransparencyNotifier "AI Edit Transparency Notifier" + +/** An art style Preference key, a value for a \c suffix parameter in the + \c #AIPreferenceSuite functions, with a \c prefix value of \c NULL. + This preference controls whether new objects created + by the user with the shape, brush, pen, or pencil tools inherit the full + appearance currently displayed in the Appearance palette, or inherit only + the current fill and stroke (with no transparency). This is tied to the + "New Art Has Basic Appearance" option in the Appearance palette flyout menu. */ +#define kAINewArtBasicAppearancePref "AI New Art Basic Appearance" + +/** An art style Preference key, a value for a \c suffix parameter in the + \c #AIPreferenceSuite functions, with a \c prefix value of \c NULL. + This preference controls whether Illustrator strips + the fill and stroke colors off for all the text runs (that is, all the characters) + when a user applies a graphic style to a text object. Controls the + "Override Character Color" option in the Graphic Styles palette. */ +#define kAIContainerOverridesObjectAppearancePref "AI Container Overrides Object" + +/** @ingroup Errors + Returned if an art style handle passed in does not + exist in the current document. Can be returned by \c #AIArtStyleSuite::SetArtStyle(), + \c #AIArtStyleSuite::SetCurrentArtStyle(), \c #AIArtStyleSuite::SetArtStyleName(), + \c #AIArtStyleSuite::RemoveNamedStyle(), \c #AIArtStyleSuite::RedefineNamedStyle(), and + \c #AIArtStyleSuite::MoveNamedStyle(). */ +#define kStyleNotInCurrentDocument 'STYD' + +/** @ingroup Errors + Returned by \c #AIArtStyleSuite::RedefineNamedStyle() if the style passed in + is not a named style. */ +#define kStyleTypeNotCompatible 'STYP' + +/** Maximum number of real characters in a style name. */ +#define kMaxStyleNameLength 63 + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Art style types */ +enum AIArtStyleType { + /** Style contains only one fill and one stroke and can have transparency + applied only at the object level.*/ + kAIArtStyleSimple = 1, + /** Style can contain multiple fills and strokes, can have different + transparency applied to each fill or stroke as well as to the object as a + whole, and can contain Live Effects.*/ + kAIArtStyleActive +}; + + +/** Return type for \c #AIArtStyleSuite::ExamineStyle(). + See \c #AIArtStyleHasAttrsBits for values. + */ +typedef ai::uint32 AIArtStyleHasAttrs; +/** Bit flag value for style properties. +A logical OR of these is returned by \c #AIArtStyleSuite::ExamineStyle(). +*/ +enum AIArtStyleHasAttrsBits { + /** null value */ + kStyleHasNothing = 0, + /** Style has fill */ + kStyleHasFill = 0x0001, + /** Style has stroke */ + kStyleHasStroke = 0x0002, + /** Style has patterns */ + kStyleHasPatterns = 0x0004, + /** Style has custom colors */ + kStyleHasCustomColors = 0x0008, + /** Style has gradients on Fill*/ + kStyleHasFillGradients = 0x0010, + /** Style has radial gradients on Fill*/ + kStyleHasRadialGradientsOnFill = 0x0020, + /** Style has transparency */ + kStyleHasTransparency = 0x0040, + /** Style has brushes */ + kStyleHasBrushes = 0x0080, + + /** Style has gradients on Stroke*/ + kStyleHasStrokeGradients = 0x0100, + /** Style has radial gradients on Stoke*/ + kStyleHasRadialGradientsOnStroke = 0x0200, + + /** Style has effects. + Transparency does not count as an effect, but brushes do. + If a style reports that it has no transparency or effects, but the + type is \c #kAIArtStyleActive, it has either multiple fills or strokes, + or a stroke that is below the fill.*/ + kStyleHasEffects = 0x010000, + /** Style has scalable effects */ + kStyleHasScalableEffects = 0x020000, + + /** Pass to \c #AIArtStyleSuite::ExamineStyle() to check for all possible attributes. */ + kStyleCheckForAll = 0xffffffff +}; + +/** Gradient information for \c #AIArtStyleSuite::NewStyle() and + \c #AIArtStyleSuite::GetPaintAttributes(). */ +struct AIArtStylePaintData { + AIArtStylePaintData() { InitToUnknown(); } + void InitToUnknown() { InitFillToUnknown(); InitStrokeToUnknown(); } + void InitFillToUnknown(); + void InitStrokeToUnknown(); + void Copy(const AIArtStylePaintData &src) { CopyFill(src); CopyStroke(src); } + void CopyFill(const AIArtStylePaintData &src); + void CopyStroke(const AIArtStylePaintData &src); + + /** The gradient origin, relative to the bounding box + of the object to which the style would be applied. */ + AIRealPoint fillRelativeGradientOrigin; + /** The gradient length, in points.*/ + AIReal fillRelativeGradientLength; + /** The gradient aspect ratio, for radial gradients */ + AIReal fillGradientAspectRatio; + + /** The stroke gradient origin, relative to the bounding box + of the object to which the style would be applied. */ + AIRealPoint strokeRelativeGradientOrigin; + /** The stroke gradient length, in points.*/ + AIReal strokeRelativeGradientLength; + /** The stroke gradient aspect ratio, for radial gradients */ + AIReal strokeGradientAspectRatio; +}; + +inline void AIArtStylePaintData::InitFillToUnknown() +{ + fillRelativeGradientOrigin.h = fillRelativeGradientOrigin.v = kAIRealUnknown; + fillRelativeGradientLength = kAIRealUnknown; + fillGradientAspectRatio = kAIRealUnknown; +} + +inline void AIArtStylePaintData::InitStrokeToUnknown() +{ + strokeRelativeGradientOrigin.h = strokeRelativeGradientOrigin.v = kAIRealUnknown; + strokeRelativeGradientLength = kAIRealUnknown; + strokeGradientAspectRatio = kAIRealUnknown; +} + +inline void AIArtStylePaintData::CopyFill(const AIArtStylePaintData &src) +{ + fillRelativeGradientOrigin = src.fillRelativeGradientOrigin; + fillRelativeGradientLength = src.fillRelativeGradientLength; + fillGradientAspectRatio = src.fillGradientAspectRatio; +} + +inline void AIArtStylePaintData::CopyStroke(const AIArtStylePaintData &src) +{ + strokeRelativeGradientOrigin = src.strokeRelativeGradientOrigin; + strokeRelativeGradientLength = src.strokeRelativeGradientLength; + strokeGradientAspectRatio = src.strokeGradientAspectRatio; +} + + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + The functions in the Art Style suite are used to access and modify + art styles on artwork in Illustrator documents. + + In AI8, Illustrator introduced the concept of plug-in groups, where the art + that was actually printed (result art) was separate from the art that the + user edited (edit art). This concept was extended in AI9 with the introduction + of art styles. Now, any art object in the document (including groups and + text objects) can optionally have "styled art" attached to it. It is this + "styled art" that gets printed, not the original "source art". + + The art style applied to an art object controls how styled + art is generated. A plug-in should not directly modify styled art itself, + which can be regenerated at any time, but should instead work with the art styles. + + Export plug-ins should export the styled art, if any, applied to an object, + rather than the original source art. + + In the UI, the art style applied to an Illustrator art object is known as the + object's \e appearance, and is manipulated through the Appearance + palette. Appearances can also be saved and reused on other objects through the + Graphic Styles palette. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIArtStyleSuite and \c #kAIArtStyleVersion. + +*/ +struct AIArtStyleSuite { + + /** Retrieves the styled art for an art object. + The objects that comprise the styled art cannot themselves have + styled art. + @param art The art object. + @param styleArt [out] A buffer in which to return the styled art object, or + the original art object if there is no special style applied. + Returns \c NULL in case of error; for example, if a Live Effect failed + to execute because of memory constraints. + */ + AIAPI AIErr (*GetStyledArt) ( AIArtHandle art, AIArtHandle* styledArt ); + + /** Retrieves the art style associated with an art object. + @param art The art object. + @param artStyle [out] A buffer in which to return the art style reference, or + \c NULL if no art style is applied. Null art styles are common + for objects of type \c kGroupArt, \c kPlacedArt, and \c kPluginArt. */ + AIAPI AIErr (*GetArtStyle) ( AIArtHandle art, AIArtStyleHandle* artStyle ); + + /** Retrieves the art style currently displayed in the Appearance palette. + @param artStyle [out] A buffer in which to return the art style reference. + @param mixedState [out] A buffer in which to return true if the Appearance + palette shows "Mixed". In this case, the returned art style + is a simple style which is an attempt to gather the common attributes + of the art styles attached to the currently selected objects in the + current document. + */ + AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* artStyle, AIBoolean* mixedState ); + + /** Retrieves an art style by its unique name from the current document. + @param artStyle [out] A buffer in which to return the art style reference. + @param name The unique name. + @param searchAllStyles When true, search all styles in the current document, + including anonymous styles. + When false, search only named styles (those shown in the Graphic Styles + palette). + @see \c #GetArtStyleByNameFromDocument() + */ + AIAPI AIErr (*GetArtStyleByName) ( AIArtStyleHandle* artStyle, const ai::UnicodeString& name, + AIBoolean searchAllStyles ); + + /** Gets the number of art styles currently listed in the Graphic Styles palette. + Use with \c #GetNthNamedArtStyle() to iterate through art styles in the current document. + @param count [out] A buffer in which to return the number of styles. + @see \c #CountNamedArtStylesFromDocument() + */ + AIAPI AIErr (*CountNamedArtStyles) ( ai::int32* count ); + + /** Retrieves a named art style by index. Use with \c #CountNamedArtStyles() + to iterate through art styles that are currently shown in the Graphic Styles palette. + @param n The position index, in the range [0..numStyles-1]. + @param artStyle [out] A buffer in which to return the art style reference. + @see \c #GetNthNamedArtStyleFromDocument() + */ + AIAPI AIErr (*GetNthNamedArtStyle) ( ai::int32 n, AIArtStyleHandle* artStyle ); + + /** Applies an art style to an art object. + @param art The art object. + @param artStyle The art style, or \c NULL to remove any art style + currently associated with the art object. + @return \c #kStyleNotInCurrentDocument if the given art style is not in + the current document. + */ + AIAPI AIErr (*SetArtStyle) ( AIArtHandle art, AIArtStyleHandle artStyle ); + + /** Applies an art style to the currently targeted objects on the artboard. This + is the same clicking the style in the Graphic Styles palette. + @param artStyle The art style. + @return \c #kStyleNotInCurrentDocument if the given art style is not in the + current document. + */ + AIAPI AIErr (*SetCurrentArtStyle) ( AIArtStyleHandle artStyle ); + + /** Reports whether an art style is anonymous. Named art styles appear in the + Graphic Styles palette. + (Note that the function returns a boolean value, not an error code.) + + @param artStyle The art style object. + @return True if the style is anonymous; false if it is named. + */ + AIAPI AIBoolean (*IsArtStyleAnonymous) ( AIArtStyleHandle artStyle ); + + /** Retrieves the unique name of an art style. + @param artStyle The art style. + @param name [out] A buffer in which to return the name. + @param isAnonymous [out] A buffer in which to return the output as true if the style is anonymous, + or false if it is named (shown in the Graphic Styles palette). + */ + AIAPI AIErr (*GetArtStyleName) ( AIArtStyleHandle artStyle, ai::UnicodeString& name, + AIBoolean* isAnonymous ); + + /** Sets the unique name of a named art style; that is, one that is shown + in the Graphic Styles palette. Anonymous styles cannot be renamed. You can use + \c #AddNamedStyle() to convert an anonymous style to a named style. + @param artStyle The art style. This must be a named art style + @param name The new name. Style names are limited to 64 characters + (including the terminating \c NULL character). Empty ("") names are not allowed. + @return \c #kStyleNotInCurrentDocument if the given art style is not in + the current document.
\c #kNameInUseErr if another art style already exists + with the given name. + */ + AIAPI AIErr (*SetArtStyleName) ( AIArtStyleHandle artStyle, const ai::UnicodeString& name ); + + /** Retrieves the paint information for an art style. + + @param artStyle The art style. + @param aiPathStyle [out] A buffer in which to return an \c #AIPathStyle structure + that contains information about the fill, stroke and the even-odd fill rule. + @param paintData [out] A buffer in which to return an \c #AIArtStylePaintData structure + that contains the gradient vector and origin relative to the object's bounding box. + */ + AIAPI AIErr (*GetPaintAttributes) ( AIArtStyleHandle artStyle, AIPathStyle* aiPathStyle, + AIArtStylePaintData* paintData ); + + /** Creates a new art style. + @param aiPathStyle An \c #AIPathStyle structure that contains information about + the fill, stroke and the even-odd fill rule. + @param paintData An \c #AIArtStylePaintData structure that contains the + gradient vector and origin relative to the object's bounding box. Can be \c NULL. + @param blendDict A dictionary that contains the transparency information. Can be \c NULL. + @param newStyle [out] A buffer in which to return the new art style reference. + */ + AIAPI AIErr (*NewStyle) ( AIPathStyle* aiPathStyle, AIArtStylePaintData* paintData, + AIDictionaryRef blendDict, AIArtStyleHandle* newStyle ); + + /** Converts an anonymous style to a named style, which is shown in the Graphic Styles palette. + @param artStyle The anonymous art style. + @param name The new name. Style names are limited to 64 characters + (including the terminating \c NULL character). Empty ("") names are not allowed. + @param uniquify When true, the function appends a numeric string to make the name unique, if + it is already in use. When false, if the name is in use, the function fails. + @param namedStyle [out] A buffer in which to return the new art style reference. + @return \c #kNameInUseErr if the name is already in use and \c uniquify is false. + */ + AIAPI AIErr (*AddNamedStyle) ( AIArtStyleHandle artStyle, const ai::UnicodeString& name, AIBoolean uniquify, + AIArtStyleHandle* namedStyle ); + + /** Converts a named style, which is shown in the Graphic Styles palette, to an anonymous style, which is not. + Removes the named style from the palette. + @param namedStyle The named art style. + @param anonStyle [out] A buffer in which to return the new art style reference. + @return \c #kStyleNotInCurrentDocument if the art style is not in the current document. */ + AIAPI AIErr (*RemoveNamedStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle* anonStyle ); + + /** Creates an anonymous copy of a named art style (one shown in the Graphics Styles palette). + The named style remains in the palette. + @param namedStyle The named style. (If this is an anonymous style, it is copied to \c anonStyle.) + @param anonStyle [out] A buffer in which to return the new art style reference. + */ + AIAPI AIErr (*CreateAnonymousStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle* anonStyle ); + + /** Redefines a named art style to have the same characteristics as another style. + @param namedStyle The named style to redefine. + @param dstStyle The style to copy attributes from. + @return The error \c #kStyleNotInCurrentDocument if \c namedStyle is not in the current document. + */ + AIAPI AIErr (*RedefineNamedStyle) ( AIArtStyleHandle namedStyle, AIArtStyleHandle dstStyle ); + + /** Moves a named art style to a position in the Graphic Styles palette. + @param namedStyle The named art style. + @param index The new position index. Use -1 to move the art style to the end + of the list. */ + AIAPI AIErr (*MoveNamedStyle) (AIArtStyleHandle namedStyle, ai::int32 index); + + /** Retrieves a named art style by its unique name from a specified document. Searches + only named styles (those that are shown in the Graphic Styles palette when + the specified document is current). + @param artStyle [out] A buffer in which to return the art style reference. + @param name The unique name. + @param document The document. + @see \c #GetArtStyleByName()*/ + AIAPI AIErr (*GetArtStyleByNameFromDocument) ( AIArtStyleHandle* artStyle, const ai::UnicodeString& name, + AIDocumentHandle document ); + /** Gets the number of named art styles in a specified document (those shown + in the Graphic Styles palette when that document is current). + Use with \c #GetNthNamedArtStyleFromDocument() to iterate through art styles + in a particular document. + @param count [out] A buffer in which to return the number of styles + @param document The document. + @see \c #CountNamedArtStyles() + */ + AIAPI AIErr (*CountNamedArtStylesFromDocument) ( ai::int32* count, AIDocumentHandle document ); + + /** Retrieves a named art style by index for a specified document. + Use with \c #CountNamedArtStylesFromDocument() to iterate through art styles + that are shown in the Graphic Styles palette when that document is current. + @param n The position index, in the range [0..numStyles-1]. + @param artStyle [out] A buffer in which to return the art style reference. + @param document The document. + @see \c #GetNthNamedArtStyle() + */ + AIAPI AIErr (*GetNthNamedArtStyleFromDocument) ( ai::int32 n, AIArtStyleHandle* artStyle, + AIDocumentHandle document ); + + /** Tests equivalence between two art styles. + @param artStyle1 The first art style. + @param artStyle2 The second art style. + @param result [out] A buffer in which to return the output as true if the styles are equivalent. + @note A false result does not guarantee that the two styles are not equivalent. + */ + AIAPI AIErr (*Equiv) ( AIArtStyleHandle artStyle1, AIArtStyleHandle artStyle2, + AIBoolean* result ); + + /** Sorts the named art styles in the current document alphabetically. The order + is reflected in the Graphic Styles palette. + */ + AIAPI AIErr (*SortNamedStyles) ( void ); + + /** Retrieves the default art style of the current document, which is always + listed first in the Graphic Styles palette. + @param artStyle [out] A buffer in which to return the art style reference. + */ + AIAPI AIErr (*GetDefaultArtStyle) (AIArtStyleHandle* artStyle); + + /** Retrieves the name of the default art style of the current document, which is always + listed first in the Graphic Styles palette. + @param name [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetDefaultArtStyleName) ( ai::UnicodeString& name); + + /** Reports whether an art style exists in the current document. + (Note that the function returns a boolean value, not an error code.) + @param artStyle The art style. + @return True if the art style is in the current document. + */ + AIAPI AIBoolean (*ValidateArtStyle) ( AIArtStyleHandle artStyle ); + + /** Expands the style of an art object, replacing the art object with the art + that would be returned by \c #GetStyledArt(). Transfers opacity masks, + URLs, tags, and so on from the input art to the flattened art. + @param art The art object. Upon return, this reference is no longer valid. + @note This function is maintained for compatibility with older plug-ins, + but is superseded by \c #GetFlattenedArt() + */ + AIAPI AIErr (*FlattenStyle) ( AIArtHandle art ); + + /** Retrieves the type of an art style. + @param artStyle The art style. + @param type [out] A buffer in which to return the type; a \c #AIArtStyleType value. */ + AIAPI AIErr (*GetArtStyleType) ( AIArtStyleHandle artStyle, ai::int16* type ); + + /** Reports whether an art style contains all the pieces it needs in order + to execute. (Note that this function returns a boolean value, not an error code.) + @param artStyle The art style. + @return True if the style can be successfully applied. +
False if the style contains an effect provided by a plug-in that + cannot be found in the Plug-Ins folder. */ + AIAPI AIBoolean (*CanExecute) ( AIArtStyleHandle artStyle ); + + /** Returns the scale factor for an art object's style. (Note that the function returns a + numeric value, not an error code.)
+ The option "Scale Strokes & Effects" allows you to scale the stroke weight + and effects attached to an art object.The scale factor is stored with the + art object, and applied after the style is applied. For example, if the style attached + to an object has a stroke with a weight of 2 pt, and the object's scale factor is 2.5, + the visual stroke weight is 5 pt. + + @note \c #GetPaintAttributes() gets the unscaled parameter values,as do functions from the + \c #AIArtStyleParserSuite. +
However, the \c #AIPathStyleSuite calls return the scaled stroke weights + attached to the objects. + + @param art The art object. + @return The scale factor. + @see \c #SetArtStyleScaleFactor()
\c #ResetArtStyleScaleFactor() + */ + AIAPI AIReal (*GetArtStyleScaleFactor) ( AIArtHandle art ); + + /** Sets the scale factor for an art object's style. The scale factor is stored with the + art object, and applied after the style is applied. + @param art The art object. + @param scaleFactor The new scale factor. + @see \c #GetArtStyleScaleFactor()
\c #ResetArtStyleScaleFactor() + */ + AIAPI AIErr (*SetArtStyleScaleFactor) ( AIArtHandle art, AIReal scaleFactor ); + + /** Applies a new style to an art object that is scaled by the object's current scale factor, + and resets the scale factor for the object to 1. + @param art The art object. + @see \c #GetArtStyleScaleFactor()
\c #ResetArtStyleScaleFactor() + */ + AIAPI AIErr (*ResetArtStyleScaleFactor) ( AIArtHandle art ); + + /** Transforms the art style of an object. + @param art The art object. + @param matrix A pointer to the transformation matrix. + @param lineScale The scale factor to apply to the line-drawing style values + specified in the art object’s current style. + @param flags Bit flags that control how the transformation is performed. + A logical OR of \c #AITransformArtOptions values. + If the \c kTransformObjects flag is on, it is assumed that the art object itself + has also been transformed by the same matrix, and that any transformation of the points, + descendant art, and so on, have already been performed. This allows gradient vectors and + other style attributes that are dependent upon object bounds to be adjusted immediately, + rather than deferred until artwork synchronization. + */ + AIAPI AIErr (*TransformObjectArtStyle) ( AIArtHandle art, AIRealMatrix *matrix, AIReal lineScale, ai::int32 flags ); + + /** Examines an art style for specific attributes, and returns the ones found. + (Note that the function returns an attribute structure, not an error code.) + @param artStyle The art style. + @param checkFor A logical OR of \c #AIArtStyleHasAttrsBits values, + specifying which attributes to check for. Pass \c #kStyleCheckForAll + to check all attributes. + @return A logical OR of \c #AIArtStyleHasAttrsBits values for those attributes found in the style. + */ + AIAPI AIArtStyleHasAttrs (*ExamineStyle) ( AIArtStyleHandle artStyle, AIArtStyleHasAttrs checkFor ); + + /** Retrieves the art style that will be used for new art created by a tool, based on + application preferences. + @param artStyle [out] A buffer in which to return the style reference. + */ + AIAPI AIErr (*GetToolArtStyle) ( AIArtStyleHandle* artStyle ); + + // ===================== Introduced in Illustrator 10.0 ========================= + + /** Expands the style of an art object, replacing the art object with the art + that would be returned by \c #GetStyledArt(). Transfers opacity masks, + URLs, tags, and so on from the input art to the flattened art. + @param art The art object. Upon return, this reference is no longer valid, + unless no flattening was needed. + @param flattenedArt [out] A buffer in which to return the flattened art object. + */ + AIAPI AIErr (*GetFlattenedArt) ( AIArtHandle art, AIArtHandle *flattenedArt ); + + /** Reports whether an art object has a style that would be equivalent to a null style. + This is the same as verifying that the style has no fill, no stroke, + no effects, and default transparency attributes. (Note that the function returns a + boolean value, not an error code.) + @param art The art object. + @return True if the art's style is effectively null.*/ + AIAPI AIBoolean (*HasEffectiveNullStyle) ( AIArtHandle art ); + + /** Retrieves the map for the path style of an art style, as retrieved + by \c #GetPaintAttributes(). The map indicates which fields of an \c #AIPathStyle + are specified by a partial style. A path style can contain unknown or mixed + attributes (indicated by a value of false for that attribute in the map) only + when it is associated with a graph object, not when it is associated with an art object. + @param artStyle The art style. + @param aiPathStyleMap [out] A buffer in which to return the path style map. */ + AIAPI AIErr (*GetPaintMap) ( AIArtStyleHandle artStyle, AIPathStyleMap* aiPathStyleMap ); + +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyleParser.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyleParser.h index fe39f5e..5d0f7e8 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyleParser.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtStyleParser.h @@ -1,911 +1,949 @@ -#ifndef __AIArtStyleParser__ -#define __AIArtStyleParser__ - -/* - * Name: AIArtStyleParser.h - * Purpose: Adobe Illustrator Art Style Parser Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIArtStyle__ -#include "AIArtStyle.h" -#endif - -#ifndef __AILiveEffect__ -#include "AILiveEffect.h" -#endif - -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIArtStyleParser.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIArtStyleParserSuite "AI Art Style Parser Suite" -#define kAIArtStyleParserSuiteVersion8 AIAPI_VERSION(8) -#define kAIArtStyleParserSuiteVersion kAIArtStyleParserSuiteVersion8 -#define kAIArtStyleParserVersion kAIArtStyleParserSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -// Opaque references to data structures inside app. -/** Opaque reference to an art style parser. */ -typedef struct _t_AIStyleParser* AIStyleParser; - -/** Opaque reference to a Live Effect data structure in an art style parser. - \li Pre-effects are Live Effects that show up before any fills and strokes in the - Appearance palette. - \li Post-effects are Live Effects that show up after all the fills and strokes in the - Appearance palette. - */ -typedef struct _t_AIParserLiveEffect* AIParserLiveEffect; - -/** Opaque reference to a paint field data structure in an art style parser. - A paint field corresponds to either a fill or a stroke in the art style. It - can contain Live Effects and a blend field.

- @note A paint field can contain effects that affect only that paint field and not the entire art style. - Effects are executed in sequence, and the output of one becomes the input of the next. - Filling or stroking is performed within this order. A Color Position is the spot - in a paint field's effect order at which painting occurs. - */ -typedef struct _t_AIParserPaintField* AIParserPaintField; - -/** Opaque reference to a blend field in a paint field data structure in an art style parser. - Controls the overall transparency of the style. This is listed last in the Appearance palette. - */ -typedef struct _t_AIParserBlendField* AIParserBlendField; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - The \c AIArtStyleParser allows you to manipulate art styles, and access - information typically shown in the Appearance palette. - - The parser constructs its own data structures when asked to parse an art style, which - are tied to that art style unless modified. When parser data structures are modified, - the relationship between the parser structure and art style becomes unreliable, and you should - avoid making calls to \c #SetFocus() and \c #EditEffectParameters(), which depend on - that relationship. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIArtStyleParserSuite and \c #kAIArtStyleParserVersion. - - You can call \c #CreateNewStyle() to build a new style from an existing parser data structure, - using a workflow like this: - -@code -NewParser(&parser) -ParseStyle(parser, artStyle) -... - - ... -CreateNewStyle(parser, &newArtStyle) -DisposeParser(parser) -@endcode - -*/ -struct AIArtStyleParserSuite { - - /** Constructs a new parser. - @param parser [out] A buffer in which to return the new parser reference. - */ - AIAPI AIErr (*NewParser) ( AIStyleParser* parser ); - - /** Frees memory associated with a parser that is no longer needed. - @param The parser. Upon return, this reference in no longer valid. - */ - AIAPI AIErr (*DisposeParser) ( AIStyleParser parser ); - - /** Parses the contents of an art style, creating parser data structures accordingly. - @param parser The parser. - @param artStyle The art style. - */ - AIAPI AIErr (*ParseStyle) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - - /** Merges the properties of an art style into a parser. The same as the - "Merge Graphic Styles" option in the Graphic Styles palette flyout menu. - @param parser The parser. - @param artStyle The art style. - */ - AIAPI AIErr (*MergeStyleIntoParser) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - - /** Reports whether a parser was able to successfully parse an art style. - Valid only immediately after a call to \c #ParseStyle() using this parser. - (Note that this function returns a boolean value, not an error code.) - @param parser The parser. - @return True if the most recent parsing operation was successful. - */ - AIAPI AIBoolean (*IsStyleParseable) ( AIStyleParser parser ); - - /** Counts the number of pre-effects in a parser. Pre-effects are Live - Effects that show up before any fills and strokes in the Appearance palette. - (Note that this function returns a numeric value, not an error code.) - @param parser The parser. - @return The number of pre-effects. - */ - AIAPI ai::int32 (*CountPreEffects) ( AIStyleParser parser ); - - /** Counts the number of post-effects in a parser. Post-effects are Live - Effects that show up after all the fills and strokes in the Appearance palette. - (Note that this function returns a numeric value, not an error code.) - @param parser The parser. - @return The number of post-Effects. - */ - AIAPI ai::int32 (*CountPostEffects) ( AIStyleParser parser ); - - /** Counts the number of paint fields in a parser. A paint field corresponds - to either a fill or a stroke in the art style. Each paint field can also - contain Live Effects and transparency information. - (Note that this function returns a numeric value, not an error code.) - @param parser The parser. - @return The number of paint fields.*/ - AIAPI ai::int32 (*CountPaintFields) ( AIStyleParser parser ); - - /** Counts the number of Live Effects in a paint field. - (Note that this function returns a numeric value, not an error code.) - @param parser The paint field. - @return The number of Live Effects. - */ - AIAPI ai::int32 (*CountEffectsOfPaintField) ( AIParserPaintField paintField ); - - /** Retrieves a Pre-Effect from a parser by position index. Use with \c #CountPreEffects() - to iterate through PreEffects. - @param parser The parser. - @param n The position index, in the range [0..numEffects-1]. - @param effect [out] A buffer in which to return the effect. - */ - AIAPI AIErr (*GetNthPreEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect* effect ); - - /** Retrieves a Post-Effect from a parser by position index. Use with \c #CountPostEffects() - to iterate through PostEffects. - @param parser The parser. - @param n The position index, in the range [0..numEffects-1]. - @param effect [out] A buffer in which to return the effect. - */ - AIAPI AIErr (*GetNthPostEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect* effect ); - - /**Retrieves a paint field from a parser by position index. Use with \c #CountPaintFields() - to iterate through paint fields. - @param parser The parser. - @param n The position index, in the range [0..numFields-1]. - @param paintField [out] A buffer in which to return the paint field. - */ - AIAPI AIErr (*GetNthPaintField) ( AIStyleParser parser, ai::int32 n, AIParserPaintField* paintField ); - - /** Retrieves a Live Effect from a paint field by position index. Use with \c #CountEffectsOfPaintField() - to iterate through Live Effects. - @param paintField The paint field. - @param n The position index, in the range [0..numEffects-1]. - @param effect [out] A buffer in which to return the effect.*/ - AIAPI AIErr (*GetNthEffectOfPaintField) ( AIParserPaintField paintField, ai::int32 n, - AIParserLiveEffect* effect ); - - /** Retrieves the overall art style transparency from a parser in the form of a blend field. - @param parser The parser. - @param blendField [out] A buffer in which to return the blend field. - */ - AIAPI AIErr (*GetStyleBlendField) ( AIStyleParser parser, AIParserBlendField* blendField ); - - /** Inserts a Pre-Effect into a parser at a specified index. - @param parser The parser. - @param n The position index, in the range [0..numEffects-1]. Use -1 to - insert element at the end. - @param effect The effect. - */ - AIAPI AIErr (*InsertNthPreEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect effect ); - - /** Inserts a Post-Effect into the parser at a specified index. - @param parser The parser. - @param n The position index, in the range [0..numEffects-1]. Use -1 to - insert element at the end. - @param effect The effect. - */ - AIAPI AIErr (*InsertNthPostEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect effect ); - - /** Inserts a paint field into a parser at a specified index. - @param parser The parser. - @param n The position index, in the range [0..numFields-1]. Use -1 to - insert element at the end. - @param paintField The paint field. - */ - AIAPI AIErr (*InsertNthPaintField) ( AIStyleParser parser, ai::int32 n, AIParserPaintField paintField ); - - /** Inserts a Live Effect into a paint field in a parser at specified index. - @param parser The parser. - @param paintField The paint field. - @param n The position index, in the range [0..numEffects-1]. Use -1 to - insert element at the end. - @param effect The Live Effect. - */ - AIAPI AIErr (*InsertNthEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ai::int32 n, - AIParserLiveEffect effect ); - - /** Removes a Pre-Effect from a parser. - @param parser The parser. - @param effect The effect. - @param doDelete When true, dispose of the memory associated with the element. - You might not want to do this if you are moving elements from one position to another. - */ - AIAPI AIErr (*RemovePreEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); - - /** Removes a Post-Effect from a parser. - @param parser The parser. - @param effect The effect. - @param doDelete When true, dispose of the memory associated with the element. - You might not want to do this if you are moving elements from one position to another. - */ - AIAPI AIErr (*RemovePostEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); - - /** Removes a paint field from a parser. - @param parser The parser. - @param paintField The paint field. - @param doDelete When true, dispose of the memory associated with the element. - You might not want to do this if you are moving elements from one position to another. - */ - AIAPI AIErr (*RemovePaintField) ( AIStyleParser parser, AIParserPaintField paintField, AIBoolean doDelete ); - - /** Removes a Live Effect from a paint field in a parser. - @param parser The parser. - @param paintField The paint field. - @param effect The effect. - @param doDelete When true, dispose of the memory associated with the element. - You might not want to do this if you are moving elements from one position to another. - */ - AIAPI AIErr (*RemoveEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, - AIParserLiveEffect effect, AIBoolean doDelete ); - - /** Removes all the effects from a parser. - @param parser The parser. - */ - AIAPI AIErr (*RemoveAllEffects) ( AIStyleParser parser ); - - /** Removes all the effects and all the paint fields from a parser, except the focus fill and stroke. - These are the ones that the user is currently editing, which show in the fill and stroke - proxies in the Tool and Color palettes. The function also resets all transparency - to normal 100% opaque and places the focus stroke on top of the focus fill - in the stacking order. - @param parser The parser. - */ - AIAPI AIErr (*Simplify) ( AIStyleParser parser ); - - /** Retrieves the focus fill from a parser. If an art style has multiple fills, - the user can only edit one at a time. The one currently being edited is the focus fill, - and it is shown in the fill/stroke proxies on the Tool and Color palettes. - @param parser The parser. - @param paintField [out] A buffer in which to return the focus fill. - */ - AIAPI AIErr (*GetFocusFill) ( AIStyleParser parser, AIParserPaintField* paintField ); - - /** Retrieves the focus stroke from a parser. If an art style has multiple strokes, - the user can only edit one at a time. The one currently being edited is the focus stroke, - and it is shown in the fill/stroke proxies on the Tool and Color palettes. - @param parser The parser. - @param paintField [out] A buffer in which to return the focus stroke. - */ - AIAPI AIErr (*GetFocusStroke) ( AIStyleParser parser, AIParserPaintField* paintField ); - - /** Sets the focus fill or focus stroke for a parser. - @param parser The parser. - @param paintField The fill or stroke. - @see \c #SetFocus() - */ - AIAPI AIErr (*SetParserFocus) ( AIStyleParser parser, AIParserPaintField paintField ); - - /** Sets the focus fill or focus stroke for a parser, and also modifies the art style - from which the parser's data structures were constructed. - Use when the data structures in the given parser have not been - modified since the call to \c #ParseStyle(). - @param artStyle The art style that was passed to \c #ParseStyle() for this parser - @param parser The parser - @param paintField The fill or stroke. - @see \c #SetParserFocus() - */ - AIAPI AIErr (*SetFocus) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserPaintField paintField ); - - /** Retrieves the position in the stacking order (from top to bottom) where the Group - Contents for a parser would be rendered. (Note that this function returns a numeric value, - not an error code.) - - Group Contents affects the generation of styled art when applied to art container objects - like groups or text. The Group Contents controls where the original contents inside - the group are rendered relative to the stacking order of the fills and strokes - in the art styles. - @param parser The parser. - @return The position in the stacking order. - */ - AIAPI ai::int32 (*GetGroupContentsPosition) ( AIStyleParser parser ); - - /** Move the Group Contents position in a parser. - @param parser The parser. - @param position The new position in the stacking order, from top to bottom. - @see \c #GetGroupContentsPosition() - */ - AIAPI AIErr (*MoveGroupContentsPosition) ( AIStyleParser parser, ai::int32 position ); - - /** Constructs a new art style based on the elements in a parser. - Call \c #ParseStyle() with the new style before using \c #SetFocus() - or \c #EditEffectParameters(). - @param parser The parser. - @param artStyle [out] A buffer in which to return the new art style reference. - */ - AIAPI AIErr (*CreateNewStyle) ( AIStyleParser parser, AIArtStyleHandle* artStyle ); - - /** Reports whether a style is invisible; that is, there are no effects, - all the paint fields have a color of \c none, and the overall transparency - contains default values. (Note that this function returns a boolean value, - not an error code.) - @param parser The parser. - @return True if the associated style is invisible. - */ - AIAPI AIBoolean (*IsStyleVisible) ( AIStyleParser parser ); - - /** Reports whether a parser has fill or stroke. (Note that this function - returns a boolean value, not an error code.) - @param parser The parser. - @return True if the parser contains any non-empty fill or stroke values. - */ - AIAPI AIBoolean (*ContainsPaint) ( AIStyleParser parser ); - - /** Reports whether a parser has any Live Effects. (Note that this function - returns a boolean value, not an error code.) - @param parser The parser. - @return True if the parser contains any effects. - */ - AIAPI AIBoolean (*ContainsEffects) ( AIStyleParser parser ); - - /** Reports whether a parser has transparency. (Note that this function - returns a boolean value, not an error code.) - @param parser The parser. - @return True if the parser contains any non-default transparency information. - */ - AIAPI AIBoolean (*ContainsTransparency) ( AIStyleParser parser ); - - /** Retrieves the Live Effect object reference from a parser. - @param parser The parser. - @param liveEffectHandle [out] A buffer in which to return the Live Effect reference. - */ - AIAPI AIErr (*GetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle* liveEffectHandle ); - - /** Retrieves the LiveEffect parameters data structure from a parser. - @param effect The effect. - @param params [out] A buffer in which to return the Live Effect parameters. - */ - AIAPI AIErr (*GetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters* params ); - - /** Sets the Live Effect object reference in a parser. - @param parser The parser. - @param liveEffectHandle The Live Effect reference. - */ - AIAPI AIErr (*SetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle liveEffectHandle ); - - /** Sets the Live Effect parameters data structure in a parser. - @param effect The effect. - @param params The Live Effect parameters. - */ - AIAPI AIErr (*SetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters params ); - - /** Copies a Live Effect data structure into a new equivalent structure. Used by - the Appearance palette when users duplicate a Live Effect. - @param effect The effect. - @param clonedEffect [out] A buffer in which to return the new Live Effect. - */ - AIAPI AIErr (*CloneLiveEffect) ( AIParserLiveEffect effect, AIParserLiveEffect* clonedEffect ); - - /** Opens the editing dialog, allowing the user to edit the parameters - of an effect in an art style, and creates a new art style with the user's choices, - which is applied to all the art objects currently targeted in the document. - - @note Use this function with caution. - - @param artStyle The art style, as previously passed to \c #ParseStyle(). - @param effect The effect, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - */ - AIAPI AIErr (*EditEffectParameters) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect ); - - /** Reports whether a paint field corresponds to a fill. (Note that this function - returns a boolean value, not an error code.) - @param paintField The paint field. - @return True if the paint field is for a fill. - */ - AIAPI AIBoolean (*IsFill) ( AIParserPaintField paintField ); - - /** Reports whether a paint field corresponds to a stroke. (Note that this function - returns a boolean value, not an error code.) - @param paintField The paint field. - @return True if the paint field is for a stroke. - */ - AIAPI AIBoolean (*IsStroke) ( AIParserPaintField paintField ); - - /** Retrieves fill information from a paint field. - @param paintField The paint field. - @param fill [out] A buffer in which to return the fill style. - @param paintData [out] A buffer in which to return additional paint data. - */ - AIAPI AIErr (*GetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); - - /** Retrieves stroke information from a paint field. - @param paintField The paint field. - @param stroke [out] A buffer in which to return the stroke style. - @param paintData [out] A buffer in which to return additional paint data. - */ - AIAPI AIErr (*GetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); - - /** Sets fill information for a paint field. - @param paintField The paint field. - @param fill The new fill style. - @param paintData Additional paint data. - */ - AIAPI AIErr (*SetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); - - /** Sets stroke information for a paint field. - @param paintField The paint field. - @param stroke The new stroke style. - @param paintData Additional paint data. */ - AIAPI AIErr (*SetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); - - /** Retrieves transparency information from a paint field. See \c AIMask.h for the - keys used to get information from the dictionary. - @param paintField The paint field. - @param blendDict [out] A buffer in which to return the dictionary containing transparency information. - */ - AIAPI AIErr (*GetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); - - /** Sets the transparency information for a paint field. See \c AIMask.h for the - keys used to set information in the dictionary. - @param paintField The paint field. - @param blendDict The dictionary containing transparency information. - */ - AIAPI AIErr (*SetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); - - /** Retrieves the color position of a paint field (the point in effect order at which painting occurs). - @param paintField The paint field. - */ - AIAPI ai::int32 (*GetColorPosn) ( AIParserPaintField paintField ); - - /** Sets the color position of a paint field (the point in the effect order at which painting occurs). - @param paintField The paint field. - */ - AIAPI AIErr (*SetColorPosn) ( AIParserPaintField paintField, ai::int32 colorPosn ); - - /** Copies a paint field data structure into a newly created equivalent structure. Used by - the Appearance palette when users duplicate a fill or stroke. - @param paintField The paint field. - @param clonedPaintField [out] A buffer in which to return the new paint field. - - */ - AIAPI AIErr (*ClonePaintField) ( AIParserPaintField paintField, AIParserPaintField* clonedPaintField ); - - /** Retrieves LiveEffect and/or parameter references for Live Effects in - a paint field that substitute for the built-in fill or stroke behavior. The returned parameters can - be non-null even when the Live Effect reference is null, in the case where the built-in fill or stroke filter - has a parameter dictionary that contains non-basic options other than transparency. - - @note Current examples of strokes with an effect handle are Brushes and Inside/Outside Aligned - strokes, which are implemented as Live Effects that replace the default stroking behavior. - The only current example of a paint field that returns a null Live Effect reference but non-null - parameters are strokes with dash adjustment, arrowheads, or other Beautiful Strokes - options. (See \c AIBeautifulStrokes.h). - @param paintField The paint field - @param liveEffectHandle [out] A buffer in which to return the Live Effect reference. Can be \c NULL. - @param params [out] A buffer in which to return the Live Effect parameters. Can be \c NULL. - */ - AIAPI AIErr (*GetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle* liveEffectHandle, - AILiveEffectParameters* params ); - - /** Sets the LiveEffect and/or parameter references for Live Effects in a paint field - that substitute for the built-in fill or stroke behavior. - - @param paintField The paint field - @param liveEffectHandle The Live Effect reference. Pass null to remove the live effect. - @param params The Live Effect parameters. Pass null to remove the live effect parameters. - */ - AIAPI AIErr (*SetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle liveEffectHandle, - AILiveEffectParameters params ); - - /** Retrieves the transparency information for a blend field. See \c AIMask.h for the keys used - to access information in the dictionary. - @param blendField The blend field. - @param blendDict The dictionary in which to return the transparency information. - */ - AIAPI AIErr (*GetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); - - /** Sets the transparency information for a blend field. See \c AIMask.h for the keys used - to access information in the dictionary. - @param blendField The blend field. - @param blendDict The dictionary containing the transparency information. - */ - AIAPI AIErr (*SetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); - - // NEW FOR AI10 - - /** Retrieves the even-odd fill rule for a paint field. - (See the \c evenodd field in the \c #AIPathStyle structure.) - @param paintField The paint field. - @param evenodd [out] A buffer in which to return true if the even-odd rule is used to determine path insideness. - @return An error \c #kBadParameterErr if the paint field does not correspond to a fill. - */ - AIAPI AIErr (*GetEvenOdd) ( AIParserPaintField paintField, AIBoolean* evenodd ); - - /** Sets the even-odd fill rule for a paint field. - (See the \c evenodd field in the \c #AIPathStyle structure.) - @param paintField The paint field. - @param evenodd True if the even-odd rule should be used to determine path insideness. - @return An error \c #kBadParameterErr if the paint field does not correspond to a fill. */ - AIAPI AIErr (*SetEvenOdd) ( AIParserPaintField paintField, AIBoolean evenodd ); - - /** Constructs a new paint field with a given fill, even-odd fill rule, and - gradient vector information. The new paint field is not associated with any parser. - @param fill The fill style. - @param evenOdd True if the even-odd rule should be used to determine path insideness. - @param paintData The paint data structure containing the gradient vector information. Can be \c NULL. - @param paintField [out] A buffer in which to return the new paint field. - */ - AIAPI AIErr (*NewPaintFieldFill) ( const AIFillStyle* fill, AIBoolean evenOdd, const AIArtStylePaintData* paintData, - AIParserPaintField* paintField ); - - /** Constructs a new paint field with a given stroke. The new paint field is not associated with any parser. - @param stroke The stroke style. - @param paintData Not used, pass \c NULL. - @param paintField [out] A buffer in which to return the new paint field. - */ - AIAPI AIErr (*NewPaintFieldStroke) ( const AIStrokeStyle* stroke, const AIArtStylePaintData* paintData, - AIParserPaintField* paintField ); - - /** Frees the memory associated with a paint field. - @note Do not use on paint fields that are retrieved from or inserted into a parser. - Freeing the parser with \c #DisposeParser() frees its contained data structures. - @param paintField The paint field. Upon return, this reference is no longer valid. - */ - AIAPI AIErr (*DisposePaintField) ( AIParserPaintField paintField ); - - /** Constructs a new Live Effect parser data structure from Live Effect and - parameters references. The new data structure is not associated - with any parser. - @param liveEffectHandle The Live Effect reference. - @param params The parameters reference. - @param effect [out] A buffer in which to return the new effect. - */ - AIAPI AIErr (*NewParserLiveEffect) ( AILiveEffectHandle liveEffectHandle, AILiveEffectParameters params, - AIParserLiveEffect* effect ); - - /** Frees the memory associated with a Live Effect parser data structure. - @note Do not use on effects that are retrieved from or inserted into a parser. - Freeing the parser with \c #DisposeParser() frees its contained data structures. - @param effect The Live Effect data structure. Upon return, this reference is no longer valid. */ - AIAPI AIErr (*DisposeParserLiveEffect) ( AIParserLiveEffect effect ); - - - /** Retrieves the art style that is currently selected in the Graphic Styles palette. Gets the first of - multiple selected styles. - @param style [out] A buffer in which to return the art style, or \c NULL if no style is selected. - */ - AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* style ); - - // NEW FOR AI13 - - /** Opens the editing dialog, allowing the user to edit the parameters of an effect that is substituting - for a fill or stroke. Creates a new art style with the user's choices, and applies it to all the art - objects currently targeted in the document. - @note Use this function with caution. - - @param artStyle The art style, as previously passed to \c #ParseStyle(). - @param paintField The paint field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @see \c #EditEffectParameters() - */ - AIAPI AIErr (*EditPaintEffectParameters) ( AIArtStyleHandle artStyle, AIParserPaintField paintField ); - - /** Reports whether a paint field has normal 100% opacity. Does not check other - transparency attributes, such as knockout or isolated blending. (Note that this - function returns a boolean value, not an error code.) - @param paintField The paint field. - @return True if the paint field is opaque. - */ - AIAPI AIBoolean (*IsNormalOpaquePaintBlend) ( AIParserPaintField paintField ); - - /** Reports whether a blend field has normal 100% opacity. Does not check other - transparency attributes, such as knockout or isolated blending. (Note that this - function returns a boolean value, not an error code.) - @param blendField The blend field. - @return True if the blend field is opaque. - */ - AIAPI AIBoolean (*IsNormalOpaqueBlend) ( AIParserBlendField blendField ); - - /** Reports whether a paint field has a default blend, that is, normal 100% opacity - with non-isolated blending and the knockout attribute set to either off or inherit. (Note that this - function returns a boolean value, not an error code.) - @param paintField The paint field. - @return True if the paint field has a default blend. - */ - AIAPI AIBoolean (*IsDefaultPaintBlend) ( AIParserPaintField paintField ); - - /** Sets a paint field to have a default blend; that is, normal 100% opacity, with non-isolated blending - and the knockout attribute set to off. - @param paintField The paint field. - */ - AIAPI AIErr (*SetDefaultPaintBlend) ( AIParserPaintField paintField ); - - /** Reports whether a blend field is a default blend; that is, normal 100% opacity, - with non-isolated blending and the knockout attribute set to either off or inherit. (Note that this - function returns a boolean value, not an error code.) - @param blendField The blend field. - @return True if the blend field is a default blend. - */ - AIAPI AIBoolean (*IsDefaultBlend) ( AIParserBlendField blendField ); - - /** Sets a blend field to a default blend; that is, normal 100% opacity, with non-isolated blending - and the knockout attribute either set to off or maintained at the inherited value. - @param blendField The blend field to set. - @param knockoutOff True to turn knockout off. False to maintain the inherited knockout value, - unless that value is on, in which case it is set to off. - */ - AIAPI AIErr (*SetDefaultBlend) ( AIParserBlendField blendField, AIBoolean knockoutOff ); - - /** Reports whether the style parsed by a parser is a simple style; that is, a style - with no effects, only one normal fully opaque fill and one normal fully opaque stroke, and the stroke - stacked on top of the fill. (Note that this function returns a boolean value, not an error code.) - @param parser The parser. - @return True if the parsed style is simple. - */ - AIAPI AIBoolean (*IsStyleSimple) ( AIStyleParser parser ); - - /** Retrieves the name and major and minor versions of the Live Effect data structure in a parser. - Gets the name and version numbers even if the plug-in that provides the effect is - missing and there is no LiveEffect object reference associated with the data structure. - @param effect The Live Effect data structure. - @param name [out] A buffer in which to return the internal name of the effect. - @param major [out] A buffer in which to return the major version of the effect. - @param minor [out] A buffer in which to return the minor version of the effect. - */ - AIAPI AIErr (*GetLiveEffectNameAndVersion) ( AIParserLiveEffect effect, const char** name, ai::int32* major, ai::int32* minor ); - - /** Retrieves the name and major and minor versions of the Live Effect in a paint field data structure in a parser. - Gets the name and version numbers even if the plug-in that provides the effect is missing. - @param paintField The paint field data structure. - @param name [out] A buffer in which to return the internal name of the effect, - or \c NULL if no Live Effect is substituting for the built-in fill or stroke behavior. - @param major [out] A buffer in which to return the major version of the effect, - or 0 if no Live Effect is substituting for the built-in fill or stroke behavior. - @param minor [out] A buffer in which to return the minor version of the effect, - or 0 if no Live Effect is substituting for the built-in fill or stroke behavior. - */ - AIAPI AIErr (*GetPaintLiveEffectNameAndVersion) ( AIParserPaintField paintField, const char** name, ai::int32* major, ai::int32* minor ); - - // NEW FOR AI14 - - /** Compares two parsed styles to check if they are equivalent. - (Note that this function returns a boolean value, not an error code.) - To compare two styles, create two \c #AIStyleParser objects, - call \c #ParseStyle() for each object, then call this function. - @param parserStyle1 The first style parser. - @param parserStyle2 The second style parser. - @return True if the parsed styles are equivalent, false otherwise. - */ - AIAPI AIBoolean (*CompareStyles) ( AIStyleParser parserStyle1, AIStyleParser parserStyle2); - - /** Reports the visibility status of an effect, which affects whether it is drawn. - @param effect The effect, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible [out] A buffer in which to return true if the effect is visible. - */ - AIAPI AIErr (*GetEffectVisible) ( AIParserLiveEffect effect, AIBoolean *visible); - - /** Sets the visibility status of an effect, which affects whether it is drawn. - This is applied to all the art objects currently targeted in the document. - @param artStyle The art style that contains the effect (as previously passed to \c #ParseStyle()). - @param effect The effect, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible True to show, false to hide the effect. - */ - AIAPI AIErr (*SetEffectVisible) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect, AIBoolean visible ); - - - /** Reports the visibility status of a paint field, which affects whether it is drawn. - @param paintField The paint field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible [out] A buffer in which to return true if the paint field is visible, false otherwise. - */ - AIAPI AIErr (*GetPaintFieldVisible) ( AIParserPaintField paintField, AIBoolean *visible); - - - /** Sets the visibility status of a paint field, which affects whether it is drawn. - This is applied to all the art objects currently targeted in the document. - @param artStyle The art style that contains the paint field (as previously passed to \c #ParseStyle()). - @param paintField The paint field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible True to show, false to hide the paint field. - */ - AIAPI AIErr (*SetPaintFieldVisible) ( AIArtStyleHandle artStyle, AIParserPaintField paintField, AIBoolean visible ); - - /** Reports the visibility status of a blend field, which affects whether it is drawn. - @param blendField The blend field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible [out] A buffer in which to return true if the blend field is visible. - */ - AIAPI AIErr (*GetBlendFieldVisible) ( AIParserBlendField blendField, AIBoolean *visible); - - - /** Sets the visibility status of a blend field, which affects whether it is drawn. - This is applied to all the art objects currently targeted in the document. - @param artStyle The art style that contains the blend field (as previously passed to \c #ParseStyle()). - @param blendField The blend field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible True to show, false to hide the blend field. - */ - AIAPI AIErr (*SetBlendFieldVisible) ( AIArtStyleHandle artStyle, AIParserBlendField blendField, AIBoolean visible ); - - - - /** Reports the visibility status of blend of a paint field (fill/stroke), which affects whether the blend - is drawn. - @param paintField The paint field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible [out] A buffer in which to return true if the blend field is visible, false otherwise. - */ - AIAPI AIErr (*GetPaintBlendVisible) ( AIParserPaintField paintField, AIBoolean *visible); - - - /** Sets the visibility status of blend of a paint field (fill/stroke), which affects whether the blend - is drawn. This is applied to all the art objects currently targeted in the document. - @param artStyle The art style that contains the blend field (as previously passed to \c #ParseStyle()). - @param paintField The paint field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible True to show, false to hide the blend field. - */ - AIAPI AIErr (*SetPaintBlendVisible) ( AIArtStyleHandle artStyle, AIParserPaintField paintField, AIBoolean visible ); - - /** Modifies the properties of a parser, retaining properties that are common to both - the parser and the given style, and discarding all other properties. - - You can use this to determine the common properties of two styles. - - @param parser The parser. - @param artStyle The art style. - */ - AIAPI AIErr (*IntersectStyleWithParser) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - - - /** Retrieves a paint field from a parser that is equivalent to a given paint field, starting at - a given index in the parser. - @param parser The parser in which to search. - @param paintField The paint field to search for. - @param startIndex The 0-based index into the parser at which to begin the search. - @param index A buffer in which to return the 0-based index of the equivalent paint field, or -1 if none is found. - */ - - AIAPI AIErr (*FindEquivalentPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ai::int32 startIndex, ai::int32* index ); - - /** Retrieves the focus effect from a parser. If an art style has multiple effects, - the user can only edit one at a time; the one currently being edited is the focus effect. - @param parser The parser. - @param effectField [out] A buffer in which to return the focus effect. - @see \c #SetParserFocusEffect() - */ - AIAPI AIErr (*GetFocusEffect) ( AIStyleParser parser, AIParserLiveEffect* effectField ); - - /** Sets the focus effect for a parser, and also modifies the art style - from which the parser's data structures were constructed. - Use when the data structures in the given parser have not been - modified since the call to \c #ParseStyle(). - @param artStyle The art style that was passed to \c #ParseStyle() for this parser - @param parser The parser. - @param effectField The new focus effect. - @see \c #SetParserFocusEffect() - */ - AIAPI AIErr (*SetFocusEffect) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserLiveEffect effectField ); - - /** Sets the focus effect for a parser. - @param parser The parser. - @param effectField The new focus effect. - @see \c #SetFocusEffect() - */ - AIAPI AIErr (*SetParserFocusEffect) ( AIStyleParser parser, AIParserLiveEffect effectField ); - - /** Opens the editing dialog, allowing the user to edit the parameters of an effect. Sets this - as the focus effect, and updates the art styles of all the art objects currently targeted - in the document with the user's choices. - - Use this function with caution. - - @param effectField The effect, as retrieved from a parser whose data structures have - not been modified since a call to \c #ParseStyle(). - */ - AIAPI AIErr (*EditEffectParametersInSelection) ( AIParserLiveEffect effectField ); - - - /** Searches a parser for an equivalent effect. Searches post-effects by default; you can - also choose to search pre-effects and/or paint fields. - @param parser The parser object. - @param paintField A paint field in which to search, or null to search only in pre- and/or post-effects. - @param effectField The effect for which an equivalent is wanted. - @param preEffect True to search pre-effects as well as post-effects. - @param startIndex The 0-based index into the parser at which to begin the search. - @param index [out] A buffer in which to return the 0-based index of the equivalent effect, or -1 if none is found. - */ - AIAPI AIErr (*FindEquivalentEffect) ( AIStyleParser parser, AIParserPaintField paintField, AIParserLiveEffect effectField, AIBoolean preEffect, ai::int32 startIndex, ai::int32* index ); - - - - /** Reports whether a style contains given attributes. - - @param artStyle The art style. - @param attributes The parser that contains the attributes to be matched. - @param includeTransparency True to include the transparency field in the attributes to be matched. . - */ - AIAPI AIBoolean (*StyleContainsAttributes) ( AIArtStyleHandle artStyle, AIStyleParser attributes, AIBoolean includeTransparency ); - - /** Sets the visibility of an effect for a parser. - - @param effect The effect, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible True to show, false to hide the effect. - */ - AIAPI AIErr (*SetParserEffectVisible) ( AIParserLiveEffect effect, AIBoolean visible); - - /** Sets the visibility of a paint field for a parser. - - @param paintField The paint field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible True to show, false to hide the paint field - */ - AIAPI AIErr (*SetParserPaintFieldVisible) ( AIParserPaintField paintField, AIBoolean visible); - - /** Sets the visibility of a blend field for a parser. - - @param blendField The blend field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible True to show, false to hide the blend field. - */ - AIAPI AIErr (*SetParserBlendFieldVisible) ( AIParserBlendField blendField, AIBoolean visible); - - /** Sets the visibility of a blend of a paint field (fill/stroke) for a parser. - - @param paintField The paint field, as retrieved from a parser whose data structures - have not been modified since the call \c #ParseStyle(). - @param visible True to show, false to hide the paint blend - */ - AIAPI AIErr (*SetParserPaintBlendVisible) ( AIParserPaintField paintField, AIBoolean visible); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIArtStyleParser__ +#define __AIArtStyleParser__ + +/* + * Name: AIArtStyleParser.h + * Purpose: Adobe Illustrator Art Style Parser Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIArtStyle__ +#include "AIArtStyle.h" +#endif + +#ifndef __AILiveEffect__ +#include "AILiveEffect.h" +#endif + +#ifndef __AIPathStyle__ +#include "AIPathStyle.h" +#endif + +#include "AISmoothShadingStyle.h" + +#include "AIHeaderBegin.h" + +/** @file AIArtStyleParser.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIArtStyleParserSuite "AI Art Style Parser Suite" +#define kAIArtStyleParserSuiteVersion9 AIAPI_VERSION(9) +#define kAIArtStyleParserSuiteVersion kAIArtStyleParserSuiteVersion9 +#define kAIArtStyleParserVersion kAIArtStyleParserSuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + +// Opaque references to data structures inside app. +/** Opaque reference to an art style parser. */ +typedef struct _t_AIStyleParser* AIStyleParser; + +/** Opaque reference to a Live Effect data structure in an art style parser. + \li Pre-effects are Live Effects that show up before any fills and strokes in the + Appearance palette. + \li Post-effects are Live Effects that show up after all the fills and strokes in the + Appearance palette. + */ +typedef struct _t_AIParserLiveEffect* AIParserLiveEffect; + +/** Opaque reference to a paint field data structure in an art style parser. + A paint field corresponds to either a fill or a stroke in the art style. It + can contain Live Effects and a blend field.

+ @note A paint field can contain effects that affect only that paint field and not the entire art style. + Effects are executed in sequence, and the output of one becomes the input of the next. + Filling or stroking is performed within this order. A Color Position is the spot + in a paint field's effect order at which painting occurs. + */ +typedef struct _t_AIParserPaintField* AIParserPaintField; + +/** Opaque reference to a blend field in a paint field data structure in an art style parser. + Controls the overall transparency of the style. This is listed last in the Appearance palette. + */ +typedef struct _t_AIParserBlendField* AIParserBlendField; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + The \c AIArtStyleParser allows you to manipulate art styles, and access + information typically shown in the Appearance palette. + + The parser constructs its own data structures when asked to parse an art style, which + are tied to that art style unless modified. When parser data structures are modified, + the relationship between the parser structure and art style becomes unreliable, and you should + avoid making calls to \c #SetFocus() and \c #EditEffectParameters(), which depend on + that relationship. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIArtStyleParserSuite and \c #kAIArtStyleParserVersion. + + You can call \c #CreateNewStyle() to build a new style from an existing parser data structure, + using a workflow like this: + +@code +NewParser(&parser) +ParseStyle(parser, artStyle) +... + + ... +CreateNewStyle(parser, &newArtStyle) +DisposeParser(parser) +@endcode + +*/ +struct AIArtStyleParserSuite { + + /** Constructs a new parser. + @param parser [out] A buffer in which to return the new parser reference. + */ + AIAPI AIErr (*NewParser) ( AIStyleParser* parser ); + + /** Frees memory associated with a parser that is no longer needed. + @param The parser. Upon return, this reference in no longer valid. + */ + AIAPI AIErr (*DisposeParser) ( AIStyleParser parser ); + + /** Parses the contents of an art style, creating parser data structures accordingly. + @param parser The parser. + @param artStyle The art style. + */ + AIAPI AIErr (*ParseStyle) ( AIStyleParser parser, AIArtStyleHandle artStyle ); + + /** Merges the properties of an art style into a parser. The same as the + "Merge Graphic Styles" option in the Graphic Styles palette flyout menu. + @param parser The parser. + @param artStyle The art style. + */ + AIAPI AIErr (*MergeStyleIntoParser) ( AIStyleParser parser, AIArtStyleHandle artStyle ); + + /** Reports whether a parser was able to successfully parse an art style. + Valid only immediately after a call to \c #ParseStyle() using this parser. + (Note that this function returns a boolean value, not an error code.) + @param parser The parser. + @return True if the most recent parsing operation was successful. + */ + AIAPI AIBoolean (*IsStyleParseable) ( AIStyleParser parser ); + + /** Counts the number of pre-effects in a parser. Pre-effects are Live + Effects that show up before any fills and strokes in the Appearance palette. + (Note that this function returns a numeric value, not an error code.) + @param parser The parser. + @return The number of pre-effects. + */ + AIAPI ai::int32 (*CountPreEffects) ( AIStyleParser parser ); + + /** Counts the number of post-effects in a parser. Post-effects are Live + Effects that show up after all the fills and strokes in the Appearance palette. + (Note that this function returns a numeric value, not an error code.) + @param parser The parser. + @return The number of post-Effects. + */ + AIAPI ai::int32 (*CountPostEffects) ( AIStyleParser parser ); + + /** Counts the number of paint fields in a parser. A paint field corresponds + to either a fill or a stroke in the art style. Each paint field can also + contain Live Effects and transparency information. + (Note that this function returns a numeric value, not an error code.) + @param parser The parser. + @return The number of paint fields.*/ + AIAPI ai::int32 (*CountPaintFields) ( AIStyleParser parser ); + + /** Counts the number of Live Effects in a paint field. + (Note that this function returns a numeric value, not an error code.) + @param parser The paint field. + @return The number of Live Effects. + */ + AIAPI ai::int32 (*CountEffectsOfPaintField) ( AIParserPaintField paintField ); + + /** Retrieves a Pre-Effect from a parser by position index. Use with \c #CountPreEffects() + to iterate through PreEffects. + @param parser The parser. + @param n The position index, in the range [0..numEffects-1]. + @param effect [out] A buffer in which to return the effect. + */ + AIAPI AIErr (*GetNthPreEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect* effect ); + + /** Retrieves a Post-Effect from a parser by position index. Use with \c #CountPostEffects() + to iterate through PostEffects. + @param parser The parser. + @param n The position index, in the range [0..numEffects-1]. + @param effect [out] A buffer in which to return the effect. + */ + AIAPI AIErr (*GetNthPostEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect* effect ); + + /**Retrieves a paint field from a parser by position index. Use with \c #CountPaintFields() + to iterate through paint fields. + @param parser The parser. + @param n The position index, in the range [0..numFields-1]. + @param paintField [out] A buffer in which to return the paint field. + */ + AIAPI AIErr (*GetNthPaintField) ( AIStyleParser parser, ai::int32 n, AIParserPaintField* paintField ); + + /** Retrieves a Live Effect from a paint field by position index. Use with \c #CountEffectsOfPaintField() + to iterate through Live Effects. + @param paintField The paint field. + @param n The position index, in the range [0..numEffects-1]. + @param effect [out] A buffer in which to return the effect.*/ + AIAPI AIErr (*GetNthEffectOfPaintField) ( AIParserPaintField paintField, ai::int32 n, + AIParserLiveEffect* effect ); + + /** Retrieves the overall art style transparency from a parser in the form of a blend field. + @param parser The parser. + @param blendField [out] A buffer in which to return the blend field. + */ + AIAPI AIErr (*GetStyleBlendField) ( AIStyleParser parser, AIParserBlendField* blendField ); + + /** Inserts a Pre-Effect into a parser at a specified index. + @param parser The parser. + @param n The position index, in the range [0..numEffects-1]. Use -1 to + insert element at the end. + @param effect The effect. + */ + AIAPI AIErr (*InsertNthPreEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect effect ); + + /** Inserts a Post-Effect into the parser at a specified index. + @param parser The parser. + @param n The position index, in the range [0..numEffects-1]. Use -1 to + insert element at the end. + @param effect The effect. + */ + AIAPI AIErr (*InsertNthPostEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect effect ); + + /** Inserts a paint field into a parser at a specified index. + @param parser The parser. + @param n The position index, in the range [0..numFields-1]. Use -1 to + insert element at the end. + @param paintField The paint field. + */ + AIAPI AIErr (*InsertNthPaintField) ( AIStyleParser parser, ai::int32 n, AIParserPaintField paintField ); + + /** Inserts a Live Effect into a paint field in a parser at specified index. + @param parser The parser. + @param paintField The paint field. + @param n The position index, in the range [0..numEffects-1]. Use -1 to + insert element at the end. + @param effect The Live Effect. + */ + AIAPI AIErr (*InsertNthEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ai::int32 n, + AIParserLiveEffect effect ); + + /** Removes a Pre-Effect from a parser. + @param parser The parser. + @param effect The effect. + @param doDelete When true, dispose of the memory associated with the element. + You might not want to do this if you are moving elements from one position to another. + */ + AIAPI AIErr (*RemovePreEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); + + /** Removes a Post-Effect from a parser. + @param parser The parser. + @param effect The effect. + @param doDelete When true, dispose of the memory associated with the element. + You might not want to do this if you are moving elements from one position to another. + */ + AIAPI AIErr (*RemovePostEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); + + /** Removes a paint field from a parser. + @param parser The parser. + @param paintField The paint field. + @param doDelete When true, dispose of the memory associated with the element. + You might not want to do this if you are moving elements from one position to another. + */ + AIAPI AIErr (*RemovePaintField) ( AIStyleParser parser, AIParserPaintField paintField, AIBoolean doDelete ); + + /** Removes a Live Effect from a paint field in a parser. + @param parser The parser. + @param paintField The paint field. + @param effect The effect. + @param doDelete When true, dispose of the memory associated with the element. + You might not want to do this if you are moving elements from one position to another. + */ + AIAPI AIErr (*RemoveEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, + AIParserLiveEffect effect, AIBoolean doDelete ); + + /** Removes all the effects from a parser. + @param parser The parser. + */ + AIAPI AIErr (*RemoveAllEffects) ( AIStyleParser parser ); + + /** Removes all the effects and all the paint fields from a parser, except the focus fill and stroke. + These are the ones that the user is currently editing, which show in the fill and stroke + proxies in the Tool and Color palettes. The function also resets all transparency + to normal 100% opaque and places the focus stroke on top of the focus fill + in the stacking order. + @param parser The parser. + */ + AIAPI AIErr (*Simplify) ( AIStyleParser parser ); + + /** Retrieves the focus fill from a parser. If an art style has multiple fills, + the user can only edit one at a time. The one currently being edited is the focus fill, + and it is shown in the fill/stroke proxies on the Tool and Color palettes. + @param parser The parser. + @param paintField [out] A buffer in which to return the focus fill. + */ + AIAPI AIErr (*GetFocusFill) ( AIStyleParser parser, AIParserPaintField* paintField ); + + /** Retrieves the focus stroke from a parser. If an art style has multiple strokes, + the user can only edit one at a time. The one currently being edited is the focus stroke, + and it is shown in the fill/stroke proxies on the Tool and Color palettes. + @param parser The parser. + @param paintField [out] A buffer in which to return the focus stroke. + */ + AIAPI AIErr (*GetFocusStroke) ( AIStyleParser parser, AIParserPaintField* paintField ); + + /** Sets the focus fill or focus stroke for a parser. + @param parser The parser. + @param paintField The fill or stroke. + @see \c #SetFocus() + */ + AIAPI AIErr (*SetParserFocus) ( AIStyleParser parser, AIParserPaintField paintField ); + + /** Sets the focus fill or focus stroke for a parser, and also modifies the art style + from which the parser's data structures were constructed. + Use when the data structures in the given parser have not been + modified since the call to \c #ParseStyle(). + @param artStyle The art style that was passed to \c #ParseStyle() for this parser + @param parser The parser + @param paintField The fill or stroke. + @see \c #SetParserFocus() + */ + AIAPI AIErr (*SetFocus) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserPaintField paintField ); + + /** Retrieves the position in the stacking order (from top to bottom) where the Group + Contents for a parser would be rendered. (Note that this function returns a numeric value, + not an error code.) + + Group Contents affects the generation of styled art when applied to art container objects + like groups or text. The Group Contents controls where the original contents inside + the group are rendered relative to the stacking order of the fills and strokes + in the art styles. + @param parser The parser. + @return The position in the stacking order. + */ + AIAPI ai::int32 (*GetGroupContentsPosition) ( AIStyleParser parser ); + + /** Move the Group Contents position in a parser. + @param parser The parser. + @param position The new position in the stacking order, from top to bottom. + @see \c #GetGroupContentsPosition() + */ + AIAPI AIErr (*MoveGroupContentsPosition) ( AIStyleParser parser, ai::int32 position ); + + /** Constructs a new art style based on the elements in a parser. + Call \c #ParseStyle() with the new style before using \c #SetFocus() + or \c #EditEffectParameters(). + @param parser The parser. + @param artStyle [out] A buffer in which to return the new art style reference. + */ + AIAPI AIErr (*CreateNewStyle) ( AIStyleParser parser, AIArtStyleHandle* artStyle ); + + /** Reports whether a style is invisible; that is, there are no effects, + all the paint fields have a color of \c none, and the overall transparency + contains default values. (Note that this function returns a boolean value, + not an error code.) + @param parser The parser. + @return True if the associated style is invisible. + */ + AIAPI AIBoolean (*IsStyleVisible) ( AIStyleParser parser ); + + /** Reports whether a parser has fill or stroke. (Note that this function + returns a boolean value, not an error code.) + @param parser The parser. + @return True if the parser contains any non-empty fill or stroke values. + */ + AIAPI AIBoolean (*ContainsPaint) ( AIStyleParser parser ); + + /** Reports whether a parser has any Live Effects. (Note that this function + returns a boolean value, not an error code.) + @param parser The parser. + @return True if the parser contains any effects. + */ + AIAPI AIBoolean (*ContainsEffects) ( AIStyleParser parser ); + + /** Reports whether a parser has transparency. (Note that this function + returns a boolean value, not an error code.) + @param parser The parser. + @return True if the parser contains any non-default transparency information. + */ + AIAPI AIBoolean (*ContainsTransparency) ( AIStyleParser parser ); + + /** Retrieves the Live Effect object reference from a parser. + @param parser The parser. + @param liveEffectHandle [out] A buffer in which to return the Live Effect reference. + */ + AIAPI AIErr (*GetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle* liveEffectHandle ); + + /** Retrieves the LiveEffect parameters data structure from a parser. + @param effect The effect. + @param params [out] A buffer in which to return the Live Effect parameters. + */ + AIAPI AIErr (*GetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters* params ); + + /** Sets the Live Effect object reference in a parser. + @param parser The parser. + @param liveEffectHandle The Live Effect reference. + */ + AIAPI AIErr (*SetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle liveEffectHandle ); + + /** Sets the Live Effect parameters data structure in a parser. + @param effect The effect. + @param params The Live Effect parameters. + */ + AIAPI AIErr (*SetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters params ); + + /** Copies a Live Effect data structure into a new equivalent structure. Used by + the Appearance palette when users duplicate a Live Effect. + @param effect The effect. + @param clonedEffect [out] A buffer in which to return the new Live Effect. + */ + AIAPI AIErr (*CloneLiveEffect) ( AIParserLiveEffect effect, AIParserLiveEffect* clonedEffect ); + + /** Opens the editing dialog, allowing the user to edit the parameters + of an effect in an art style, and creates a new art style with the user's choices, + which is applied to all the art objects currently targeted in the document. + + @note Use this function with caution. + + @param artStyle The art style, as previously passed to \c #ParseStyle(). + @param effect The effect, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + */ + AIAPI AIErr (*EditEffectParameters) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect ); + + /** Reports whether a paint field corresponds to a fill. (Note that this function + returns a boolean value, not an error code.) + @param paintField The paint field. + @return True if the paint field is for a fill. + */ + AIAPI AIBoolean (*IsFill) ( AIParserPaintField paintField ); + + /** Reports whether a paint field corresponds to a stroke. (Note that this function + returns a boolean value, not an error code.) + @param paintField The paint field. + @return True if the paint field is for a stroke. + */ + AIAPI AIBoolean (*IsStroke) ( AIParserPaintField paintField ); + + /** Retrieves fill information from a paint field. + @param paintField The paint field. + @param fill [out] A buffer in which to return the fill style. + @param paintData [out] A buffer in which to return additional paint data. + */ + AIAPI AIErr (*GetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); + + /** Retrieves stroke information from a paint field. + @param paintField The paint field. + @param stroke [out] A buffer in which to return the stroke style. + @param paintData [out] A buffer in which to return additional paint data. + */ + AIAPI AIErr (*GetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); + + /** Sets fill information for a paint field. + @param paintField The paint field. + @param fill The new fill style. + @param paintData Additional paint data. + */ + AIAPI AIErr (*SetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); + + /** Sets stroke information for a paint field. + @param paintField The paint field. + @param stroke The new stroke style. + @param paintData Additional paint data. */ + AIAPI AIErr (*SetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); + + /** Retrieves transparency information from a paint field. See \c AIMask.h for the + keys used to get information from the dictionary. + @param paintField The paint field. + @param blendDict [out] A buffer in which to return the dictionary containing transparency information. + */ + AIAPI AIErr (*GetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); + + /** Sets the transparency information for a paint field. See \c AIMask.h for the + keys used to set information in the dictionary. + @param paintField The paint field. + @param blendDict The dictionary containing transparency information. + */ + AIAPI AIErr (*SetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); + + /** Retrieves the color position of a paint field (the point in effect order at which painting occurs). + @param paintField The paint field. + */ + AIAPI ai::int32 (*GetColorPosn) ( AIParserPaintField paintField ); + + /** Sets the color position of a paint field (the point in the effect order at which painting occurs). + @param paintField The paint field. + */ + AIAPI AIErr (*SetColorPosn) ( AIParserPaintField paintField, ai::int32 colorPosn ); + + /** Copies a paint field data structure into a newly created equivalent structure. Used by + the Appearance palette when users duplicate a fill or stroke. + @param paintField The paint field. + @param clonedPaintField [out] A buffer in which to return the new paint field. + + */ + AIAPI AIErr (*ClonePaintField) ( AIParserPaintField paintField, AIParserPaintField* clonedPaintField ); + + /** Retrieves LiveEffect and/or parameter references for Live Effects in + a paint field that substitute for the built-in fill or stroke behavior. The returned parameters can + be non-null even when the Live Effect reference is null, in the case where the built-in fill or stroke filter + has a parameter dictionary that contains non-basic options other than transparency. + + @note Current examples of strokes with an effect handle are Brushes and Inside/Outside Aligned + strokes, which are implemented as Live Effects that replace the default stroking behavior. + The only current example of a paint field that returns a null Live Effect reference but non-null + parameters are strokes with dash adjustment, arrowheads, or other Beautiful Strokes + options. (See \c AIBeautifulStrokes.h). + @param paintField The paint field + @param liveEffectHandle [out] A buffer in which to return the Live Effect reference. Can be \c NULL. + @param params [out] A buffer in which to return the Live Effect parameters. Can be \c NULL. + */ + AIAPI AIErr (*GetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle* liveEffectHandle, + AILiveEffectParameters* params ); + + /** Sets the LiveEffect and/or parameter references for Live Effects in a paint field + that substitute for the built-in fill or stroke behavior. + + @param paintField The paint field + @param liveEffectHandle The Live Effect reference. Pass null to remove the live effect. + @param params The Live Effect parameters. Pass null to remove the live effect parameters. + */ + AIAPI AIErr (*SetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle liveEffectHandle, + AILiveEffectParameters params ); + + /** Retrieves the transparency information for a blend field. See \c AIMask.h for the keys used + to access information in the dictionary. + @param blendField The blend field. + @param blendDict The dictionary in which to return the transparency information. + */ + AIAPI AIErr (*GetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); + + /** Sets the transparency information for a blend field. See \c AIMask.h for the keys used + to access information in the dictionary. + @param blendField The blend field. + @param blendDict The dictionary containing the transparency information. + */ + AIAPI AIErr (*SetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); + + // NEW FOR AI10 + + /** Retrieves the even-odd fill rule for a paint field. + (See the \c evenodd field in the \c #AIPathStyle structure.) + @param paintField The paint field. + @param evenodd [out] A buffer in which to return true if the even-odd rule is used to determine path insideness. + @return An error \c #kBadParameterErr if the paint field does not correspond to a fill. + */ + AIAPI AIErr (*GetEvenOdd) ( AIParserPaintField paintField, AIBoolean* evenodd ); + + /** Sets the even-odd fill rule for a paint field. + (See the \c evenodd field in the \c #AIPathStyle structure.) + @param paintField The paint field. + @param evenodd True if the even-odd rule should be used to determine path insideness. + @return An error \c #kBadParameterErr if the paint field does not correspond to a fill. */ + AIAPI AIErr (*SetEvenOdd) ( AIParserPaintField paintField, AIBoolean evenodd ); + + /** Constructs a new paint field with a given fill, even-odd fill rule, and + gradient vector information. The new paint field is not associated with any parser. + @param fill The fill style. + @param evenOdd True if the even-odd rule should be used to determine path insideness. + @param paintData The paint data structure containing the gradient vector information. Can be \c NULL. + @param paintField [out] A buffer in which to return the new paint field. + */ + AIAPI AIErr (*NewPaintFieldFill) ( const AIFillStyle* fill, AIBoolean evenOdd, const AIArtStylePaintData* paintData, + AIParserPaintField* paintField ); + + /** Constructs a new paint field with a given stroke. The new paint field is not associated with any parser. + @param stroke The stroke style. + @param paintData Not used, pass \c NULL. + @param paintField [out] A buffer in which to return the new paint field. + */ + AIAPI AIErr (*NewPaintFieldStroke) ( const AIStrokeStyle* stroke, const AIArtStylePaintData* paintData, + AIParserPaintField* paintField ); + + /** Frees the memory associated with a paint field. + @note Do not use on paint fields that are retrieved from or inserted into a parser. + Freeing the parser with \c #DisposeParser() frees its contained data structures. + @param paintField The paint field. Upon return, this reference is no longer valid. + */ + AIAPI AIErr (*DisposePaintField) ( AIParserPaintField paintField ); + + /** Constructs a new Live Effect parser data structure from Live Effect and + parameters references. The new data structure is not associated + with any parser. + @param liveEffectHandle The Live Effect reference. + @param params The parameters reference. + @param effect [out] A buffer in which to return the new effect. + */ + AIAPI AIErr (*NewParserLiveEffect) ( AILiveEffectHandle liveEffectHandle, AILiveEffectParameters params, + AIParserLiveEffect* effect ); + + /** Frees the memory associated with a Live Effect parser data structure. + @note Do not use on effects that are retrieved from or inserted into a parser. + Freeing the parser with \c #DisposeParser() frees its contained data structures. + @param effect The Live Effect data structure. Upon return, this reference is no longer valid. */ + AIAPI AIErr (*DisposeParserLiveEffect) ( AIParserLiveEffect effect ); + + + /** Retrieves the art style that is currently selected in the Graphic Styles palette. Gets the first of + multiple selected styles. + @param style [out] A buffer in which to return the art style, or \c NULL if no style is selected. + */ + AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* style ); + + // NEW FOR AI13 + + /** Opens the editing dialog, allowing the user to edit the parameters of an effect that is substituting + for a fill or stroke. Creates a new art style with the user's choices, and applies it to all the art + objects currently targeted in the document. + @note Use this function with caution. + + @param artStyle The art style, as previously passed to \c #ParseStyle(). + @param paintField The paint field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @see \c #EditEffectParameters() + */ + AIAPI AIErr (*EditPaintEffectParameters) ( AIArtStyleHandle artStyle, AIParserPaintField paintField ); + + /** Reports whether a paint field has normal 100% opacity. Does not check other + transparency attributes, such as knockout or isolated blending. (Note that this + function returns a boolean value, not an error code.) + @param paintField The paint field. + @return True if the paint field is opaque. + */ + AIAPI AIBoolean (*IsNormalOpaquePaintBlend) ( AIParserPaintField paintField ); + + /** Reports whether a blend field has normal 100% opacity. Does not check other + transparency attributes, such as knockout or isolated blending. (Note that this + function returns a boolean value, not an error code.) + @param blendField The blend field. + @return True if the blend field is opaque. + */ + AIAPI AIBoolean (*IsNormalOpaqueBlend) ( AIParserBlendField blendField ); + + /** Reports whether a paint field has a default blend, that is, normal 100% opacity + with non-isolated blending and the knockout attribute set to either off or inherit. (Note that this + function returns a boolean value, not an error code.) + @param paintField The paint field. + @return True if the paint field has a default blend. + */ + AIAPI AIBoolean (*IsDefaultPaintBlend) ( AIParserPaintField paintField ); + + /** Sets a paint field to have a default blend; that is, normal 100% opacity, with non-isolated blending + and the knockout attribute set to off. + @param paintField The paint field. + */ + AIAPI AIErr (*SetDefaultPaintBlend) ( AIParserPaintField paintField ); + + /** Reports whether a blend field is a default blend; that is, normal 100% opacity, + with non-isolated blending and the knockout attribute set to either off or inherit. (Note that this + function returns a boolean value, not an error code.) + @param blendField The blend field. + @return True if the blend field is a default blend. + */ + AIAPI AIBoolean (*IsDefaultBlend) ( AIParserBlendField blendField ); + + /** Sets a blend field to a default blend; that is, normal 100% opacity, with non-isolated blending + and the knockout attribute either set to off or maintained at the inherited value. + @param blendField The blend field to set. + @param knockoutOff True to turn knockout off. False to maintain the inherited knockout value, + unless that value is on, in which case it is set to off. + */ + AIAPI AIErr (*SetDefaultBlend) ( AIParserBlendField blendField, AIBoolean knockoutOff ); + + /** Reports whether the style parsed by a parser is a simple style; that is, a style + with no effects, only one normal fully opaque fill and one normal fully opaque stroke, and the stroke + stacked on top of the fill. (Note that this function returns a boolean value, not an error code.) + @param parser The parser. + @return True if the parsed style is simple. + */ + AIAPI AIBoolean (*IsStyleSimple) ( AIStyleParser parser ); + + /** Retrieves the name and major and minor versions of the Live Effect data structure in a parser. + Gets the name and version numbers even if the plug-in that provides the effect is + missing and there is no LiveEffect object reference associated with the data structure. + @param effect The Live Effect data structure. + @param name [out] A buffer in which to return the internal name of the effect. + @param major [out] A buffer in which to return the major version of the effect. + @param minor [out] A buffer in which to return the minor version of the effect. + */ + AIAPI AIErr (*GetLiveEffectNameAndVersion) ( AIParserLiveEffect effect, const char** name, ai::int32* major, ai::int32* minor ); + + /** Retrieves the name and major and minor versions of the Live Effect in a paint field data structure in a parser. + Gets the name and version numbers even if the plug-in that provides the effect is missing. + @param paintField The paint field data structure. + @param name [out] A buffer in which to return the internal name of the effect, + or \c NULL if no Live Effect is substituting for the built-in fill or stroke behavior. + @param major [out] A buffer in which to return the major version of the effect, + or 0 if no Live Effect is substituting for the built-in fill or stroke behavior. + @param minor [out] A buffer in which to return the minor version of the effect, + or 0 if no Live Effect is substituting for the built-in fill or stroke behavior. + */ + AIAPI AIErr (*GetPaintLiveEffectNameAndVersion) ( AIParserPaintField paintField, const char** name, ai::int32* major, ai::int32* minor ); + + // NEW FOR AI14 + + /** Compares two parsed styles to check if they are equivalent. + (Note that this function returns a boolean value, not an error code.) + To compare two styles, create two \c #AIStyleParser objects, + call \c #ParseStyle() for each object, then call this function. + @param parserStyle1 The first style parser. + @param parserStyle2 The second style parser. + @return True if the parsed styles are equivalent, false otherwise. + */ + AIAPI AIBoolean (*CompareStyles) ( AIStyleParser parserStyle1, AIStyleParser parserStyle2); + + /** Reports the visibility status of an effect, which affects whether it is drawn. + @param effect The effect, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible [out] A buffer in which to return true if the effect is visible. + */ + AIAPI AIErr (*GetEffectVisible) ( AIParserLiveEffect effect, AIBoolean *visible); + + /** Sets the visibility status of an effect, which affects whether it is drawn. + This is applied to all the art objects currently targeted in the document. + @param artStyle The art style that contains the effect (as previously passed to \c #ParseStyle()). + @param effect The effect, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible True to show, false to hide the effect. + */ + AIAPI AIErr (*SetEffectVisible) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect, AIBoolean visible ); + + + /** Reports the visibility status of a paint field, which affects whether it is drawn. + @param paintField The paint field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible [out] A buffer in which to return true if the paint field is visible, false otherwise. + */ + AIAPI AIErr (*GetPaintFieldVisible) ( AIParserPaintField paintField, AIBoolean *visible); + + + /** Sets the visibility status of a paint field, which affects whether it is drawn. + This is applied to all the art objects currently targeted in the document. + @param artStyle The art style that contains the paint field (as previously passed to \c #ParseStyle()). + @param paintField The paint field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible True to show, false to hide the paint field. + */ + AIAPI AIErr (*SetPaintFieldVisible) ( AIArtStyleHandle artStyle, AIParserPaintField paintField, AIBoolean visible ); + + /** Reports the visibility status of a blend field, which affects whether it is drawn. + @param blendField The blend field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible [out] A buffer in which to return true if the blend field is visible. + */ + AIAPI AIErr (*GetBlendFieldVisible) ( AIParserBlendField blendField, AIBoolean *visible); + + + /** Sets the visibility status of a blend field, which affects whether it is drawn. + This is applied to all the art objects currently targeted in the document. + @param artStyle The art style that contains the blend field (as previously passed to \c #ParseStyle()). + @param blendField The blend field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible True to show, false to hide the blend field. + */ + AIAPI AIErr (*SetBlendFieldVisible) ( AIArtStyleHandle artStyle, AIParserBlendField blendField, AIBoolean visible ); + + + + /** Reports the visibility status of blend of a paint field (fill/stroke), which affects whether the blend + is drawn. + @param paintField The paint field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible [out] A buffer in which to return true if the blend field is visible, false otherwise. + */ + AIAPI AIErr (*GetPaintBlendVisible) ( AIParserPaintField paintField, AIBoolean *visible); + + + /** Sets the visibility status of blend of a paint field (fill/stroke), which affects whether the blend + is drawn. This is applied to all the art objects currently targeted in the document. + @param artStyle The art style that contains the blend field (as previously passed to \c #ParseStyle()). + @param paintField The paint field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible True to show, false to hide the blend field. + */ + AIAPI AIErr (*SetPaintBlendVisible) ( AIArtStyleHandle artStyle, AIParserPaintField paintField, AIBoolean visible ); + + /** Modifies the properties of a parser, retaining properties that are common to both + the parser and the given style, and discarding all other properties. + + You can use this to determine the common properties of two styles. + + @param parser The parser. + @param artStyle The art style. + */ + AIAPI AIErr (*IntersectStyleWithParser) ( AIStyleParser parser, AIArtStyleHandle artStyle ); + + + /** Retrieves a paint field from a parser that is equivalent to a given paint field, starting at + a given index in the parser. + @param parser The parser in which to search. + @param paintField The paint field to search for. + @param startIndex The 0-based index into the parser at which to begin the search. + @param index A buffer in which to return the 0-based index of the equivalent paint field, or -1 if none is found. + */ + + AIAPI AIErr (*FindEquivalentPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ai::int32 startIndex, ai::int32* index ); + + /** Retrieves the focus effect from a parser. If an art style has multiple effects, + the user can only edit one at a time; the one currently being edited is the focus effect. + @param parser The parser. + @param effectField [out] A buffer in which to return the focus effect. + @see \c #SetParserFocusEffect() + */ + AIAPI AIErr (*GetFocusEffect) ( AIStyleParser parser, AIParserLiveEffect* effectField ); + + /** Sets the focus effect for a parser, and also modifies the art style + from which the parser's data structures were constructed. + Use when the data structures in the given parser have not been + modified since the call to \c #ParseStyle(). + @param artStyle The art style that was passed to \c #ParseStyle() for this parser + @param parser The parser. + @param effectField The new focus effect. + @see \c #SetParserFocusEffect() + */ + AIAPI AIErr (*SetFocusEffect) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserLiveEffect effectField ); + + /** Sets the focus effect for a parser. + @param parser The parser. + @param effectField The new focus effect. + @see \c #SetFocusEffect() + */ + AIAPI AIErr (*SetParserFocusEffect) ( AIStyleParser parser, AIParserLiveEffect effectField ); + + /** Opens the editing dialog, allowing the user to edit the parameters of an effect. Sets this + as the focus effect, and updates the art styles of all the art objects currently targeted + in the document with the user's choices. + + Use this function with caution. + + @param effectField The effect, as retrieved from a parser whose data structures have + not been modified since a call to \c #ParseStyle(). + */ + AIAPI AIErr (*EditEffectParametersInSelection) ( AIParserLiveEffect effectField ); + + + /** Searches a parser for an equivalent effect. Searches post-effects by default; you can + also choose to search pre-effects and/or paint fields. + @param parser The parser object. + @param paintField A paint field in which to search, or null to search only in pre- and/or post-effects. + @param effectField The effect for which an equivalent is wanted. + @param preEffect True to search pre-effects as well as post-effects. + @param startIndex The 0-based index into the parser at which to begin the search. + @param index [out] A buffer in which to return the 0-based index of the equivalent effect, or -1 if none is found. + */ + AIAPI AIErr (*FindEquivalentEffect) ( AIStyleParser parser, AIParserPaintField paintField, AIParserLiveEffect effectField, AIBoolean preEffect, ai::int32 startIndex, ai::int32* index ); + + + + /** Reports whether a style contains given attributes. + + @param artStyle The art style. + @param attributes The parser that contains the attributes to be matched. + @param includeTransparency True to include the transparency field in the attributes to be matched. . + */ + AIAPI AIBoolean (*StyleContainsAttributes) ( AIArtStyleHandle artStyle, AIStyleParser attributes, AIBoolean includeTransparency ); + + /** Sets the visibility of an effect for a parser. + + @param effect The effect, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible True to show, false to hide the effect. + */ + AIAPI AIErr (*SetParserEffectVisible) ( AIParserLiveEffect effect, AIBoolean visible); + + /** Sets the visibility of a paint field for a parser. + + @param paintField The paint field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible True to show, false to hide the paint field + */ + AIAPI AIErr (*SetParserPaintFieldVisible) ( AIParserPaintField paintField, AIBoolean visible); + + /** Sets the visibility of a blend field for a parser. + + @param blendField The blend field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible True to show, false to hide the blend field. + */ + AIAPI AIErr (*SetParserBlendFieldVisible) ( AIParserBlendField blendField, AIBoolean visible); + + /** Sets the visibility of a blend of a paint field (fill/stroke) for a parser. + + @param paintField The paint field, as retrieved from a parser whose data structures + have not been modified since the call \c #ParseStyle(). + @param visible True to show, false to hide the paint blend + */ + AIAPI AIErr (*SetParserPaintBlendVisible) ( AIParserPaintField paintField, AIBoolean visible); + + + /** Constructs a new paint field with a given smooth shading. + The new paint field is not associated with any parser. + @param smoothStyle The smoothStyle style. + @param paintField [out] A buffer in which to return the new paint field. + */ + AIAPI AIErr(*NewPaintFieldSmoothShading) ( AISmoothShadingStyle smoothStyle/*move aware*/, AIParserPaintField& paintField); + + /** Reports whether a paint field corresponds to a smooth shading style. (Note that this function + returns a boolean value, not an error code.) + @param paintField The paint field. + @return True if the paint field is for a smooth shading style. + */ + AIAPI AIBoolean (*IsSmoothShadingStyle) ( AIParserPaintField paintField ); + + /** Retrieves SmoothShadingStyle information from a paint field. + @param paintField The paint field. + @param outSmoothStyle [out] A buffer in which to return the SmoothShadingStyle style. + */ + + AIAPI AIErr (*GetSmoothShadingStyle)(AIParserPaintField paintField, AISmoothShadingStylePtr &outSmoothStyle); + + /** + Clone all the effect from fromPaintField field to toPaintField. All existing effects on toPaintField will be lost. + @param parser : The parser. + @param fromPaintField : Source paint field from which effects should be applied. + @param toPaintField : Destination paint field on which effects will be applied. + **/ + AIAPI AIErr (*CloneEffectsList) (AIStyleParser parser, AIParserPaintField &fromPaintField, AIParserPaintField &toPaintField); + + /** Sets SmoothShadingStyle information for a paint field. + @param paintField The paint field. + @param inSmoothShadingStyle: The new smooths shading style. + @returns error if paintField kind is not smooth shading. + */ + AIAPI AIErr (*SetSmoothShadingStyle) (AIParserPaintField paintField, AISmoothShadingStylePtr inSmoothShadingStyle); +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboard.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboard.h index 5c5302a..4089bb0 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboard.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboard.h @@ -1,241 +1,312 @@ -#ifndef __AIArtboards__ -#define __AIArtboards__ -/* -* Name: AIArtboard.h -* Author: Started by Pushp -* Date: November, 2008 -* Purpose: Adobe Illustrator Artboard Suite -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2008 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -/******************************************************************************* -** -** Imports -** -**/ - -#include "IAIArtboards.hpp" - - -#include "AIHeaderBegin.h" - -/** @file AIArtboard.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIArtboardSuite "AI Artboard Suite" -#define kAIArtboardSuiteVersion AIAPI_VERSION(3) -#define kAIArtboardVersion kAIArtboardSuiteVersion - -/******************************************************************************* -** -** Types -** -**/ - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides utilities that allow you to create and manipulate -Artboards in a document. A document is associated with an \c ArtboardList object -that contains multiple \c Artboard objects, each of which is associated with and -\c ArtboardProperties object. -@note It is recommended that you use the wrapper class, \c #ai::ArtboardProperties and \c #ai::ArtboardList -rather than calling these functions directly. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIArtboardSuite and \c #kAIArtboardSuiteVersion. - -*/ -typedef struct -{ - /** Initializes an artboard properties object with default values. - @param artboard The artboard properties object. - */ - AIAPI AIErr (*Init)(ai::ArtboardProperties& artboard); - - /** Duplicates an artboard object. - @param artboard The artboard properties object to clone. - @param newArtboard [out] A buffer in which to return the new artboard properties object. - */ - AIAPI AIErr (*CloneArtboard)(ai::ArtboardProperties& artboard,const ai::ArtboardProperties& newArtboard); - - /** - Disposes of an artboard properties object. - @param artboard The artboard properties object. - */ - AIAPI AIErr (*Dispose)(ai::ArtboardProperties& properties); - - /** Retrieves the position and bounds of an artboard. - @param properties The artboard properties object. - @param bounds [out] A rectangle object in which to return the position and bounds of the artboard. - */ - AIAPI AIErr (*GetPosition)(const ai::ArtboardProperties& properties, AIRealRect& bounds); - - /** Modifies the position and bounds of an artboard. - Call \c #AIArtboardSuite::Update() with this object to make the change. - @param properties The artboard properties object. - @param bounds The new position and bounds. - */ - AIAPI AIErr (*SetPosition)(ai::ArtboardProperties& properties,const AIRealRect& bounds); - - /** Retrieves the pixel aspect ratio of the artboard ruler. - @param properties The artboard properties object. - @param par [out] A buffer in which to return the pixel aspect ratio. - */ - AIAPI AIErr (*GetPAR)(const ai::ArtboardProperties& properties, AIReal& par); - - /** Modifies the pixel aspect ratio of the artboard ruler. - Call \c #AIArtboardSuite::Update() with this object to make the change. - @param properties The artboard properties object. - @param par The new pixel aspect ratio. - */ - AIAPI AIErr (*SetPAR)(ai::ArtboardProperties& properties,AIReal par); - - /* Retrieves the name associated with an artboard. - @param properties The artboard properties object. - @param name [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetName)(const ai::ArtboardProperties& properties, ai::UnicodeString& name); - - /* Sets the name associated with an artboard. - @param properties The artboard properties object. - @param name The new name. - */ - AIAPI AIErr (*SetName)(ai::ArtboardProperties& properties, const ai::UnicodeString& name); - - /** Reports whether a particular type of artboard annotation is currently shown. - @param properties The artboard properties object. - @param type The annotation type. - @param show A buffer in which to return true if the type is shown, false if it is hidden. - */ - AIAPI AIErr (*GetShowDisplayMark)(const ai::ArtboardProperties& properties,ai::ArtboardProperties::DisplayMarkType type, AIBoolean& show); - - /* Sets the display state of a particular type of artboard annotation. - @param properties The artboard properties object. - @param type The annotation type. - @param show True to show, false to hide the annotation type. - */ - AIAPI AIErr (*SetShowDisplayMark)(ai::ArtboardProperties& properties,ai::ArtboardProperties::DisplayMarkType type, AIBoolean show); - /** Retrieves the artboard list of the current document. - @param artboardList [out] A buffer in which to return the artboard list object. - */ - AIAPI AIErr (*GetArtboardList)(ai::ArtboardList& artboardList); - - /** Releases an artboard list object. - @param artboardList The artboard list object. - */ - AIAPI AIErr (*ReleaseArtboardList)(ai::ArtboardList& artboardList); - - /** Adds a new artboard to the current document and reports its index position in the artboard list. - @param artboardList The artboard list object. - @param newArtboard The new artboard's properties object. - @param index [out] A buffer in which to return the 0-based index position of the new artboard. - @return The error \c #kAIExceededMaxArtboardLimitErr if list size exceeds the application-defined limit. - */ - AIAPI AIErr (*AddNew)(ai::ArtboardList& artboardList,ai::ArtboardProperties& newArtboard, ai::ArtboardID& index); - - /** Deletes an artboard from an artboard list, and makes the next one in the list active. - The last artboard cannot be deleted. - @param artboardList The artboard list object. - @param index The 0-based index position of the artboard to delete from the list. - @return The error \c #kAICantDeleteLastArtboardErr if you attempt to delete the last artboard. - */ - AIAPI AIErr (*Delete)(ai::ArtboardList& artboardList,ai::ArtboardID index); - - /** Retrieves the number of artboards defined in an artboard list. - @param artboardList The artboard list object. - @param count [out] A buffer in which to return the number of artboards. - */ - AIAPI AIErr (*GetCount)(const ai::ArtboardList& artboardList,ai::ArtboardID& count); - - /** Retrieves the index position of the active artboard in the document's list. - @param artboardList The artboard list object. - @param index [out] A buffer in which to return the 0-based index of the active artboard, or - -1 if there are no artboards in the current document. - */ - AIAPI AIErr (*GetActive)(const ai::ArtboardList& artboardList,ai::ArtboardID& index); - - /** Makes a specific artboard active, and makes it current in the iteration order. - @param artboardList The artboard list object. - @param index The 0-based index position of the artboard in the list. - */ - AIAPI AIErr (*SetActive)(ai::ArtboardList& artboardList, ai::ArtboardID index); - - /** Updates the properties of an artboard. Use with \c #GetCount() and \c #GetArtboardProperties() - to modify the artboard without changing which artboard is active in the document. - @param artboardList The artboard list object. - @param index The 0-based index position of the artboard in the document list. - @param properties The object containing the new artboard properties. - */ - AIAPI AIErr (*Update)(ai::ArtboardList& artboardList, ai::ArtboardID index, const ai::ArtboardProperties& properties); - - /** Retrieves the properties of an artboard from an artboard list. - Use with \c #GetCount() and \c #Update() to modify an artboard without - changing which artboard is active in the document. - @param artboardList The artboard list object. - @param index The 0-based index position of the artboard in the list. - @param properties [out] A buffer in which to return the artboard properties object. - On error, returns an invalid object - */ - AIAPI AIErr (*GetArtboardProperties)(ai::ArtboardList& artboardList, ai::ArtboardID index, ai::ArtboardProperties& properties); - - /** Retrieves the ruler origin of an artboard, relative to left-bottom corner. - @param properties The artboard properties object. - @param rulerOrigin [out] A buffer in which to return ruler origin. - */ - AIAPI AIErr (*GetRulerOrigin)(const ai::ArtboardProperties& properties, AIRealPoint& rulerOrigin); - - /** Sets the ruler origin of the artboard, relative to left-bottom corner. - @param properties The artboard properties object. - @param rulerOrigin The new ruler origin. - */ - AIAPI AIErr (*SetRulerOrigin)(ai::ArtboardProperties& properties, const AIRealPoint& rulerOrigin); - - /** Inserts a new Artboard at the specified location. - @param artboardList The ArtboardList object. - @param artboard The new artboard's properties. - @param index 0-based index position of the new artboard. - @return The error \c #kAIExceededMaxArtboardLimitErr if maximum number of allowed artboards is exceeded. - */ - AIAPI AIErr (*Insert)(ai::ArtboardList& artboardList,ai::ArtboardProperties& artboard, ai::ArtboardID& index); - - /** Reports whether an artboard's current name is application-generated. When this is the case, - and the user chooses to export art as JPEG, and to save artboards as separate files, the files - are distinguished only by number, rather than the full generated name; for example, myArt-01.jpg. - When an artboard name has been explicitly set, that name is used in the exported JPEG filename. - - @param properties The artboard properties object. - @param isDefault A buffer in which to return true if the name is generated, false - if it has been explicitly set. - */ - AIAPI AIErr (*IsDefaultName)(const ai::ArtboardProperties& properties, AIBoolean& isDefault); - - /** Internal. Do not use. - */ - AIAPI AIErr (*SetIsDefaultName)(ai::ArtboardProperties& properties,const AIBoolean& isDefault); - -} AIArtboardSuite; -#include "AIHeaderEnd.h" - - - -#endif // __AIArtboards__ \ No newline at end of file +#ifndef __AIArtboards__ +#define __AIArtboards__ +/* +* Name: AIArtboard.h +* Author: Started by Pushp +* Date: November, 2008 +* Purpose: Adobe Illustrator Artboard Suite +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2008 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +/******************************************************************************* +** +** Imports +** +**/ + +#include "IAIArtboards.hpp" +#include "IAIAutoBuffer.h" + +#include "AIHeaderBegin.h" + +/** @file AIArtboard.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIArtboardSuite "AI Artboard Suite" +#define kAIArtboardSuiteVersion AIAPI_VERSION(6) +#define kAIArtboardVersion kAIArtboardSuiteVersion + +/******************************************************************************* +** +** Types +** +**/ + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +This suite provides utilities that allow you to create and manipulate +Artboards in a document. A document is associated with an \c ArtboardList object +that contains multiple \c Artboard objects, each of which is associated with and +\c ArtboardProperties object. +@note It is recommended that you use the wrapper class, \c #ai::ArtboardProperties and \c #ai::ArtboardList +rather than calling these functions directly. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIArtboardSuite and \c #kAIArtboardSuiteVersion. + +*/ +struct AIArtboardSuite{ + /** Initializes an artboard properties object with default values. + @param artboard The artboard properties object. + */ + AIAPI AIErr (*Init)(ai::ArtboardProperties& artboard); + + /** Duplicates an artboard object. + @param artboard The artboard properties object to clone. + @param newArtboard [out] A buffer in which to return the new artboard properties object. + */ + AIAPI AIErr (*CloneArtboard)(ai::ArtboardProperties& artboard,const ai::ArtboardProperties& newArtboard); + + /** + Disposes of an artboard properties object. + @param artboard The artboard properties object. + */ + AIAPI AIErr (*Dispose)(ai::ArtboardProperties& properties); + + /** Retrieves the position and bounds of an artboard. + @param properties The artboard properties object. + @param bounds [out] A rectangle object in which to return the position and bounds of the artboard. + */ + AIAPI AIErr (*GetPosition)(const ai::ArtboardProperties& properties, AIRealRect& bounds); + + /** Modifies the position and bounds of an artboard. + Call \c #AIArtboardSuite::Update() with this object to make the change. + @param properties The artboard properties object. + @param bounds The new position and bounds. + */ + AIAPI AIErr (*SetPosition)(ai::ArtboardProperties& properties,const AIRealRect& bounds); + + /** Retrieves the pixel aspect ratio of the artboard ruler. + @param properties The artboard properties object. + @param par [out] A buffer in which to return the pixel aspect ratio. + */ + AIAPI AIErr (*GetPAR)(const ai::ArtboardProperties& properties, AIReal& par); + + /** Modifies the pixel aspect ratio of the artboard ruler. + Call \c #AIArtboardSuite::Update() with this object to make the change. + @param properties The artboard properties object. + @param par The new pixel aspect ratio. + */ + AIAPI AIErr (*SetPAR)(ai::ArtboardProperties& properties,AIReal par); + + /* Retrieves the name associated with an artboard. + @param properties The artboard properties object. + @param name [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetName)(const ai::ArtboardProperties& properties, ai::UnicodeString& name); + + /* Sets the name associated with an artboard. + @param properties The artboard properties object. + @param name The new name. + */ + AIAPI AIErr (*SetName)(ai::ArtboardProperties& properties, const ai::UnicodeString& name); + + /** Reports whether a particular type of artboard annotation is currently shown. + @param properties The artboard properties object. + @param type The annotation type. + @param show A buffer in which to return true if the type is shown, false if it is hidden. + */ + AIAPI AIErr (*GetShowDisplayMark)(const ai::ArtboardProperties& properties,ai::ArtboardProperties::DisplayMarkType type, AIBoolean& show); + + /* Sets the display state of a particular type of artboard annotation. + @param properties The artboard properties object. + @param type The annotation type. + @param show True to show, false to hide the annotation type. + */ + AIAPI AIErr (*SetShowDisplayMark)(ai::ArtboardProperties& properties,ai::ArtboardProperties::DisplayMarkType type, AIBoolean show); + /** Retrieves the artboard list of the current document. + @param artboardList [out] A buffer in which to return the artboard list object. + */ + AIAPI AIErr (*GetArtboardList)(ai::ArtboardList& artboardList); + + /** Releases an artboard list object. + @param artboardList The artboard list object. + */ + AIAPI AIErr (*ReleaseArtboardList)(ai::ArtboardList& artboardList); + + /** Adds a new artboard to the current document and reports its index position in the artboard list. + @param artboardList The artboard list object. + @param newArtboard The new artboard's properties object. + @param index [out] A buffer in which to return the 0-based index position of the new artboard. + @return The error \c #kAIExceededMaxArtboardLimitErr if list size exceeds the application-defined limit. + */ + AIAPI AIErr (*AddNew)(ai::ArtboardList& artboardList,ai::ArtboardProperties& newArtboard, ai::ArtboardID& index); + + /** Deletes an artboard from an artboard list, and makes the next one in the list active. + The last artboard cannot be deleted. + @param artboardList The artboard list object. + @param index The 0-based index position of the artboard to delete from the list. + @return The error \c #kAICantDeleteLastArtboardErr if you attempt to delete the last artboard. + */ + AIAPI AIErr (*Delete)(ai::ArtboardList& artboardList,ai::ArtboardID index); + + /** Retrieves the number of artboards defined in an artboard list. + @param artboardList The artboard list object. + @param count [out] A buffer in which to return the number of artboards. + */ + AIAPI AIErr (*GetCount)(const ai::ArtboardList& artboardList,ai::ArtboardID& count); + + /** Retrieves the index position of the active artboard in the document's list. + @param artboardList The artboard list object. + @param index [out] A buffer in which to return the 0-based index of the active artboard, or + -1 if there are no artboards in the current document. + */ + AIAPI AIErr (*GetActive)(const ai::ArtboardList& artboardList,ai::ArtboardID& index); + + /** Makes a specific artboard active, and makes it current in the iteration order. + @param artboardList The artboard list object. + @param index The 0-based index position of the artboard in the list. + */ + AIAPI AIErr (*SetActive)(ai::ArtboardList& artboardList, ai::ArtboardID index); + + /** Updates the properties of an artboard. Use with \c #GetCount() and \c #GetArtboardProperties() + to modify the artboard without changing which artboard is active in the document. + @param artboardList The artboard list object. + @param index The 0-based index position of the artboard in the document list. + @param properties The object containing the new artboard properties. + */ + AIAPI AIErr (*Update)(ai::ArtboardList& artboardList, ai::ArtboardID index, const ai::ArtboardProperties& properties); + + /** Retrieves the properties of an artboard from an artboard list. + Use with \c #GetCount() and \c #Update() to modify an artboard without + changing which artboard is active in the document. + @param artboardList The artboard list object. + @param index The 0-based index position of the artboard in the list. + @param properties [out] A buffer in which to return the artboard properties object. + On error, returns an invalid object + */ + AIAPI AIErr (*GetArtboardProperties)(ai::ArtboardList& artboardList, ai::ArtboardID index, ai::ArtboardProperties& properties); + + /** Retrieves the ruler origin of an artboard, relative to left-bottom corner. + @param properties The artboard properties object. + @param rulerOrigin [out] A buffer in which to return ruler origin. + */ + AIAPI AIErr (*GetRulerOrigin)(const ai::ArtboardProperties& properties, AIRealPoint& rulerOrigin); + + /** Sets the ruler origin of the artboard, relative to left-bottom corner. + @param properties The artboard properties object. + @param rulerOrigin The new ruler origin. + */ + AIAPI AIErr (*SetRulerOrigin)(ai::ArtboardProperties& properties, const AIRealPoint& rulerOrigin); + + /** Inserts a new Artboard at the specified location. + @param artboardList The ArtboardList object. + @param artboard The new artboard's properties. + @param index 0-based index position of the new artboard. + @return The error \c #kAIExceededMaxArtboardLimitErr if maximum number of allowed artboards is exceeded. + Note : It will override the UUID in artboardProperties. In case you want to preserve the UUID in artboard properties use \c #InsertUsingArtboardPropertiesUUID() + */ + AIAPI AIErr (*Insert)(ai::ArtboardList& artboardList,ai::ArtboardProperties& artboard, ai::ArtboardID& index); + + /** Reports whether an artboard's current name is application-generated. When this is the case, + and the user chooses to export art as JPEG, and to save artboards as separate files, the files + are distinguished only by number, rather than the full generated name; for example, myArt-01.jpg. + When an artboard name has been explicitly set, that name is used in the exported JPEG filename. + + @param properties The artboard properties object. + @param isDefault A buffer in which to return true if the name is generated, false + if it has been explicitly set. + */ + AIAPI AIErr (*IsDefaultName)(const ai::ArtboardProperties& properties, AIBoolean& isDefault); + + /** Internal. Do not use. + */ + AIAPI AIErr (*SetIsDefaultName)(ai::ArtboardProperties& properties,const AIBoolean& isDefault); + + /** Query artboard selection + @param properties The artboard properties object. + @param isSelected [out] A buffer in which to return the selection + */ + AIAPI AIErr (*IsSelected)(const ai::ArtboardProperties& properties, AIBoolean &isSelected); + + /** Select one artboard + @param artboardList The ArtboardList object. + @param artboardID The artboard to select. + @param exclusively if true, clear existing selection first. + */ + AIAPI AIErr (*SelectArtboard)(ai::ArtboardList& artboardList, ai::ArtboardID artboardID, AIBoolean exclusively); + + /** Select multiple artboards + @param artboardList The ArtboardList object. + @param artboardIDs The artboards to select. + @param exclusively if true, clear existing selection first. + */ + AIAPI AIErr (*SelectArtboards)(ai::ArtboardList& artboardList, const ai::AutoBuffer& artboardIDs, AIBoolean exclusively); + + /** Select all artboards + @param artboardList The ArtboardList object. + */ + AIAPI AIErr (*SelectAllArtboards)(ai::ArtboardList& artboardList); + + /** Delete set of artboards + @param artboardList The ArtboardList object. + @param artboardIDs The artboards to delete. + */ + AIAPI AIErr (*DeleteArtboards)(ai::ArtboardList& artboardList, const ai::AutoBuffer& artboardIDs); + + /** Deselect an artboard + @param artboardList The ArtboardList object. + @param artboardID The artboard to de-select. + */ + AIAPI AIErr (*DeselectArtboard)(ai::ArtboardList& artboardList, ai::ArtboardID artboardID); + + /** Deselect all artboards + @param artboardList The ArtboardList object. + */ + AIAPI AIErr (*DeselectAllArtboards)(ai::ArtboardList& artboardList); + + AIAPI AIErr(*AreAnyArtboardsOverlapping)(ai::ArtboardList &artboardList, AIBoolean &isOverlapping); + +#if defined(ILLUSTRATOR_MINIMAL) + /** Retrieves Artboard UUID + @param properties The artboard properties to retrieve from. + @param uuid The uuid to fetch. + */ + AIAPI AIErr (*GetUUID)(const ai::ArtboardProperties& properties, ai::ArtboardUUID& uuid); + + /** Clones artboard properties with unique UUID. + @param source The artboard whose property is to be cloned + @param dest Cloned properties + */ + AIAPI AIErr (*CloneWithUniqueUUID)(ai::ArtboardProperties& dest, const ai::ArtboardProperties& source); +#endif + + /** Retrieves Artboard UUID as Unicode String + @param properties The artboard properties to retrieve from. + @param uuid The uuid to fetch. + */ + AIAPI AIErr (*GetUUIDAsString)(const ai::ArtboardProperties& properties, ai::UnicodeString& uuid); + + + /** Inserts a new Artboard at the specified location using the UUID in artboard properties. + @param artboardList The ArtboardList object. + @param artboard The new artboard's properties. + @param index 0-based index position of the new artboard. + @return The error \c #kAIExceededMaxArtboardLimitErr if maximum number of allowed artboards is exceeded. + */ + AIAPI AIErr(*InsertUsingArtboardPropertiesUUID)(ai::ArtboardList& artboardList, ai::ArtboardProperties& artboard, ai::ArtboardID& index); +}; + +#include "AIHeaderEnd.h" + +#endif // __AIArtboards__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboardRange.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboardRange.h index 10ddab1..25ea37e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboardRange.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIArtboardRange.h @@ -1,150 +1,157 @@ -/************************************************************************* -* -*ADOBE SYSTEMS INCORPORATED -* Copyright 2007 Adobe Systems Incorporated -* All Rights Reserved. -* -*NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the -*terms of the Adobe license agreement accompanying it. If you have received this file from a -*source other than Adobe, then your use, modification, or distribution of it requires the prior -*written permission of Adobe. -* -**************************************************************************/ - -#ifndef _AI_ARTBOARD_RANGE_H_ -#define _AI_ARTBOARD_RANGE_H_ - -/******************************************************************************* -** -** Imports -** -**/ -#include "ASTypes.h" -#include "AIPlugin.h" - -#include "AIHeaderBegin.h" - -/** @file AIArtboardRange.h */ - -#define kAIArtboardRangeSuite "AI Artboard Range Suite" -#define kAIArtboardRangeSuiteVersion3 AIAPI_VERSION(3) - -/* Latest version */ -#define kAIArtboardRangeSuiteVersion kAIArtboardRangeSuiteVersion3 -#define kAIArtboardRangeVersion kAIArtboardRangeSuiteVersion - - -/** @ingroup Errors -See \c #AIArtboardRangeSuite */ -#define kStdExceptionCaughtError ('SECE') -/** @ingroup Errors -Returned by \c #AIArtboardRangeSuite iteration functions if the end of a -range has been reached. */ -#define kEndOfRangeErr ('ECRG') - - -/** Opaque artboard range reference. See \c #AIArtboardRangeSuite */ -typedef struct _t_Opaque_ArtboardRange* AIArtboardRangeHandle; -/** Opaque artboard range iteration object. See \c #AIArtboardRangeSuite */ -typedef struct _t_Opaque_ArtboardRangeIterator* AIArtboardRangeIterator; - -/** @ingroup Suites -This suite allows you to validate a string containing a range of artboard indices and -sequentially iterate over the range. A range of artboards -is typically provided by the user in the Print, Save and Export dialogs. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIArtboardRangeSuite and \c #kAIArtboardRangeSuiteVersion. -*/ -typedef struct -{ - /** Creates an artboard range reference. - - @param allArtboards True to include all defined artboards in the range. False to use a range string. - @param rangeStr A valid artboard range string. Ignored if \c allArtboards is true. - @param range [out] A buffer in which to return the new artboard range reference. - @see \c #ValidateString() - */ - AIAPI AIErr (*Create)(ASBoolean allArtboards, ai::UnicodeString *rangeStr, AIArtboardRangeHandle* range); - - /** - Retrieves the number of artboards in an artboard range. - - @param range An artboard range reference. - @param count [out] A buffer in which to return the number of artboards. - */ - AIAPI AIErr (*GetCount)(AIArtboardRangeHandle range, ASInt32 *count); - - /** - Creates a bi-directional iterator for an artboard range. - - @param range An artboard range reference. - @param rangeItr [out] A buffer in which to return the iterator, which initially - points to the first element of the artboard range. - @see \c #DisposeIterator() - */ - AIAPI AIErr (*Begin)(AIArtboardRangeHandle range, AIArtboardRangeIterator *rangeItr); - - /** - Retrieves the next element in an artboard range and increments the iterator. - - @param rangeItr The artboard range iterator. - @param artboardNumber [out] A buffer in which to return the 0-based index of the next artboard. - @return The error \c #kEndOfRangeErr if the iterator has reached the end of the range. - */ - AIAPI AIErr (*Next)(AIArtboardRangeIterator rangeItr, ASInt32 *artboardNumber); - - /** - Retrieves the previous element in an artboard range and decrements the iterator. - - @param rangeItr The artboard range iterator. - @param artboardNumber [out] A buffer in which to return the 0-based index of the previous artboard. - @return The error \c #kEndOfRangeErr if the iterator has reached the beginning of the range. - */ - AIAPI AIErr (*Previous)(AIArtboardRangeIterator rangeItr, ASInt32 *artboardNumber); - - /** - Disposes of an artboard range iterator created by \c #Begin(). - - @param rangeItr An artboard range iterator. - */ - AIAPI AIErr (*DisposeIterator)(AIArtboardRangeIterator rangeItr); - - /** - Disposes of an artboard range handle created by \c #Create(). - - @param range An artboard range reference. - */ - AIAPI AIErr (*Dispose) (AIArtboardRangeHandle); - - /** - Validates an artboard range string. A valid range string contains a comma-separated - list of artboard index numbers and index ranges (n-m). The index is 0-based. - A valid string could be, for example, "1,2,3-5,8". - - @param rangeStr The string containing the artboard range. - @return The error \c #kBadParameterErr if the range string is invalid. - */ - AIAPI AIErr (*ValidateString)(ai::UnicodeString *rangeStr); - - /** - Reports whether an artboard range includes all defined artboards. - @param range An artboard range reference. - @param result [out] A buffer in which to return true if the range includes all artboards, false otherwise. - @return The error \c #kBadParameterErr if any parameter is NULL. - */ - AIAPI AIErr (*IsAllSelected)(AIArtboardRangeHandle range,ASBoolean * result); - - /** - Removes duplicate crop areas from an artboard range. This call re-sorts the range - and invalidates all iterators for this range. - @param range An artboard range reference. - @return The error \c #kBadParameterErr if any parameter is NULL. - */ - AIAPI AIErr (*RemoveDuplicate)(AIArtboardRangeHandle range); - -} AIArtboardRangeSuite; - -#include "AIHeaderEnd.h" - -#endif // _AI_ARTBOARD_RANGE_H_ \ No newline at end of file +/************************************************************************* +* +*ADOBE SYSTEMS INCORPORATED +* Copyright 2007 Adobe Systems Incorporated +* All Rights Reserved. +* +*NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the +*terms of the Adobe license agreement accompanying it. If you have received this file from a +*source other than Adobe, then your use, modification, or distribution of it requires the prior +*written permission of Adobe. +* +**************************************************************************/ + +#ifndef _AI_ARTBOARD_RANGE_H_ +#define _AI_ARTBOARD_RANGE_H_ + +/******************************************************************************* +** +** Imports +** +**/ +#include "ASTypes.h" +#include "AIPlugin.h" + +#include "AIHeaderBegin.h" + +/** @file AIArtboardRange.h */ + +#define kAIArtboardRangeSuite "AI Artboard Range Suite" +#define kAIArtboardRangeSuiteVersion4 AIAPI_VERSION(4) + +/* Latest version */ +#define kAIArtboardRangeSuiteVersion kAIArtboardRangeSuiteVersion4 +#define kAIArtboardRangeVersion kAIArtboardRangeSuiteVersion + + +/** @ingroup Errors +See \c #AIArtboardRangeSuite */ +#define kStdExceptionCaughtError ('SECE') +/** @ingroup Errors +Returned by \c #AIArtboardRangeSuite iteration functions if the end of a +range has been reached. */ +#define kEndOfRangeErr ('ECRG') + + +/** Opaque artboard range reference. See \c #AIArtboardRangeSuite */ +typedef struct _t_Opaque_ArtboardRange* AIArtboardRangeHandle; +/** Opaque artboard range iteration object. See \c #AIArtboardRangeSuite */ +typedef struct _t_Opaque_ArtboardRangeIterator* AIArtboardRangeIterator; + +/** @ingroup Suites +This suite allows you to validate a string containing a range of artboard indices and +sequentially iterate over the range. A range of artboards +is typically provided by the user in the Print, Save and Export dialogs. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIArtboardRangeSuite and \c #kAIArtboardRangeSuiteVersion. +*/ +typedef struct +{ + /** Creates an artboard range reference. + + @param allArtboards True to include all defined artboards in the range. False to use a range string. + @param rangeStr A valid artboard range string. Ignored if \c allArtboards is true. + @param range [out] A buffer in which to return the new artboard range reference. + @see \c #ValidateString() + */ + AIAPI AIErr (*Create)(ASBoolean allArtboards, const ai::UnicodeString *rangeStr, AIArtboardRangeHandle* range); + + /** + Retrieves the number of artboards in an artboard range. + + @param range An artboard range reference. + @param count [out] A buffer in which to return the number of artboards. + */ + AIAPI AIErr (*GetCount)(AIArtboardRangeHandle range, ASInt32 *count); + + /** + Creates a bi-directional iterator for an artboard range. + + @param range An artboard range reference. + @param rangeItr [out] A buffer in which to return the iterator, which initially + points to the first element of the artboard range. + @see \c #DisposeIterator() + */ + AIAPI AIErr (*Begin)(AIArtboardRangeHandle range, AIArtboardRangeIterator *rangeItr); + + /** + Retrieves the next element in an artboard range and increments the iterator. + + @param rangeItr The artboard range iterator. + @param artboardNumber [out] A buffer in which to return the 0-based index of the next artboard. + @return The error \c #kEndOfRangeErr if the iterator has reached the end of the range. + */ + AIAPI AIErr (*Next)(AIArtboardRangeIterator rangeItr, ASInt32 *artboardNumber); + + /** + Retrieves the previous element in an artboard range and decrements the iterator. + + @param rangeItr The artboard range iterator. + @param artboardNumber [out] A buffer in which to return the 0-based index of the previous artboard. + @return The error \c #kEndOfRangeErr if the iterator has reached the beginning of the range. + */ + AIAPI AIErr (*Previous)(AIArtboardRangeIterator rangeItr, ASInt32 *artboardNumber); + + /** + Sets the iterator to the last element in an artboard range. + + @param rangeItr The artboard range iterator. + */ + AIAPI AIErr(*Back)(AIArtboardRangeIterator rangeItr); + + /** + Disposes of an artboard range iterator created by \c #Begin(). + + @param rangeItr An artboard range iterator. + */ + AIAPI AIErr (*DisposeIterator)(AIArtboardRangeIterator rangeItr); + + /** + Disposes of an artboard range handle created by \c #Create(). + + @param range An artboard range reference. + */ + AIAPI AIErr (*Dispose) (AIArtboardRangeHandle); + + /** + Validates an artboard range string. A valid range string contains a comma-separated + list of artboard index numbers and index ranges (n-m). The index is 0-based. + A valid string could be, for example, "1,2,3-5,8". + + @param rangeStr The string containing the artboard range. + @return The error \c #kBadParameterErr if the range string is invalid. + */ + AIAPI AIErr (*ValidateString)(const ai::UnicodeString *rangeStr); + + /** + Reports whether an artboard range includes all defined artboards. + @param range An artboard range reference. + @param result [out] A buffer in which to return the output as true if the range includes all artboards, false otherwise. + @return The error \c #kBadParameterErr if any parameter is NULL. + */ + AIAPI AIErr (*IsAllSelected)(AIArtboardRangeHandle range,ASBoolean * result); + + /** + Removes duplicate crop areas from an artboard range. This call re-sorts the range + and invalidates all iterators for this range. + @param range An artboard range reference. + @return The error \c #kBadParameterErr if any parameter is NULL. + */ + AIAPI AIErr (*RemoveDuplicate)(AIArtboardRangeHandle range); + +} AIArtboardRangeSuite; + +#include "AIHeaderEnd.h" + +#endif // _AI_ARTBOARD_RANGE_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.cpp new file mode 100644 index 0000000..92e8b1b --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.cpp @@ -0,0 +1,80 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2018 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#include "AIAssert.hpp" + +#if AI_ASSERTS_ENABLED + +#ifdef WIN_ENV +#include +namespace ai +{ + void ShowPlatformAssert(const bool success, const char* message) + { + if (success) + return; + bool shouldBreak = IDYES == ::MessageBoxA(nullptr, message, "Assertion failure, Do you want to Debug?", MB_YESNO | MB_ICONSTOP | MB_TASKMODAL | MB_TOPMOST); + if (shouldBreak) + { + __debugbreak(); + } + } +} +#elif defined(LINUX_ENV) +#include +#include +namespace ai +{ + void ShowPlatformAssert(const bool success, const char* message) + { + if (!success) + std::cout << "Assertion failed: " << message << std::endl; + assert(false); + } +} +#elif !defined(IOS_ENV) + #include +namespace ai +{ + void ShowPlatformAssert(const bool success, const char* message) + { + if (success) + return; + bool shouldBreak = false; + @autoreleasepool + { + NSAlert *alert = [[[NSAlert alloc] init] autorelease]; + if(alert) + { + [alert setMessageText:@"Assertion failure, Do you want to Debug?"]; + [alert addButtonWithTitle:@"Yes"]; + [alert addButtonWithTitle:@"No"]; + NSString *msgStr = [NSString stringWithCString:message encoding:NSASCIIStringEncoding]; + [alert setInformativeText:msgStr]; + [alert setAlertStyle:NSAlertStyleWarning]; + shouldBreak = [alert runModal] == NSAlertFirstButtonReturn; + } + } + if(shouldBreak) + { + __builtin_debugtrap(); + } + } +} +#endif//WIN_ENV + +#endif // AI_ASSERTS_ENABLED + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.hpp new file mode 100644 index 0000000..be6c54d --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssert.hpp @@ -0,0 +1,94 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2018 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "./config/AIAssertConfig.h" + +#if AI_ASSERTS_ENABLED + +#include "AIAssertion.h" + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIAssertion) +#elif defined(_AIASSERT_SUITE_INCLUDE_H_) + #include _AIASSERT_SUITE_INCLUDE_H_ +#else + extern "C" AIAssertionSuite *sAIAssertion; +#endif // AI_AUTO_SUITE_AVAILABLE + +#endif // AI_ASSERTS_ENABLED + +#include "AIHeaderBegin.h" + +#if AI_ASSERTS_ENABLED +namespace ai +{ + void ShowPlatformAssert(const bool success, const char* message); +} +#define AIAssert(_success) \ + do \ + { \ + try \ + { \ + if(sAIAssertion) \ + { \ + sAIAssertion->AssertProc((_success), nullptr, __FILE__, __LINE__); \ + } \ + else \ + { \ + ai::ShowPlatformAssert((_success),nullptr); \ + } \ + } \ + catch(...) {} \ + } while (0) \ + + + + +#define AIMsgAssert(_success, _message) \ + do \ + { \ + try \ + { \ + if(sAIAssertion) \ + { \ + sAIAssertion->AssertProc((_success), (_message), __FILE__, __LINE__); \ + } \ + else \ + { \ + ai::ShowPlatformAssert((_success), _message); \ + } \ + } \ + catch (...) {} \ + } while (0) \ + +#else + +#define AIAssert(_success) \ + do \ + { \ + } while (0) \ + +#define AIMsgAssert(_success, _message) \ + do \ + { \ + } while (0) \ + +#endif // AI_ASSERTS_ENABLED + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssertion.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssertion.h new file mode 100644 index 0000000..4072478 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssertion.h @@ -0,0 +1,54 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AITypes.h" + +#include "AIHeaderBegin.h" + + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIAssertionSuite "AI Assertion Suite" +#define kAIAssertionSuiteVersion1 AIAPI_VERSION(1) +#define kAIAssertionSuiteVersion kAIAssertionSuiteVersion1 +#define kAIAssertionVersion kAIAssertionSuiteVersion + +/******************************************************************************* +** +** Suite +** +**/ + +struct AIAssertionSuite +{ + /** Show an assert. + @param success : condition of assert. + @param message : Message to be displayed in Assert. Can be NULL. + @param inFile : Name of the file from where the assertion is thrown. Can be NULL. + @param inLine : Line number from where the assertion is thrown. + This value is ignored if inFile is NULL. + */ + AIAPI void (*AssertProc)(AIBoolean success, const char* message, const char* inFile, ai::int32 inLine); + +}; + +#include "AIHeaderEnd.h" \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssetMgmt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssetMgmt.h index b7276ff..f6fa593 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssetMgmt.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAssetMgmt.h @@ -1,239 +1,239 @@ -#ifndef __AIAssetMgmt__ -#define __AIAssetMgmt__ - -/* - * Name: AIAssetMgmt.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Asset Management Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1999-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "IAIFilePath.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIAssetMgmt.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIAssetMgmtSuite "AI Asset Management Suite" -#define kAIAssetMgmtSuiteVersion9 AIAPI_VERSION(9) -#define kAIAssetMgmtSuiteVersion kAIAssetMgmtSuiteVersion9 -#define kAIAssetMgmtVersion kAIAssetMgmtSuiteVersion - -/** @ingroup Notifiers */ -#define kAILaunchProjectBridgeNotifier "AI Launch Project Bridge Notifier" - -/** Metadata selectors for \c #AIAssetMgmtSuite::UpdateDynamicMetadata(), - controls the types of metadata that are updated. */ -enum AIXMPMetadataSelector { - /** Generate the default XMP metadata */ - kAIXMPDefault = 0x00000000, - /** Preserve the original DocumentID (128-bit uuid), rather than creating a new one. */ - kAIXMPPreserveDocumentID = 0x00000001, - /** Do not generate page info metadata */ - kAIXMPNoPageInfo = 0x00000002, - /** Do not generate document swatches metadata */ - kAIXMPNoDocumentSwatches = 0x00000004, - /** Do not generate ink plate usage data */ - kAIXMPNoPlateUsages = 0x00000008, - /** Do not generate used-font metadata */ - kAIXMPNoUsedFonts = 0x00000010, - /** Do not generate XMP thumbnail metadata */ - kAIXMPNoThumbnail = 0x00000020 -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ -/** The XMP session object, which allows you to manipulate metadata in the XMP buffer. -You must have XMP data to create a session object. - */ -typedef struct _AIXMPSession *AIXMPSession; - -/** Information for updating XMP metadata using \c #AIAssetMgmtSuite::UpdateDynamicMetadataFields() - */ -typedef struct AIXMPDataFieldMap { - /** Name of the XMP property, such as "CreateDate", "CreatorTool", "Format" */ - const char *name; - /** New value of the XMP property. A null pointer value means to - remove the XMP property from the XMP packet if the \c replace flag is true; - for example, to remove the XMP "Thumbnails" data from the original packet. */ - const char *value; - /** When true, reset the value of the XMP property if it already - exists in the input XMP metadata buffer. */ - AIBoolean replace; -} AIXMPDataFieldMap; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides simple XMP metadata manipulation routines and - Adobe Version Cue(TM) functionality. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIAssetMgmtSuite and \c #kAIAssetMgmtVersion. -*/ - -typedef struct AIAssetMgmtSuite { - /** Reports whether Version Cue is enabled. - (Note that this function returns a boolean value, not an error code.) - @return True if Version Cue is enabled. - */ - AIAPI AIBoolean (*IsAssetMgmtEnabled)(); - - /** Updates XMP metadata. Creates a new XMP metadata buffer. - @param xapIn The buffer containing the XMP metadata for the current document. - @param fields A pointer to an array of structures containing the - new or changed metadata property name/value pairs. - @param length The number of structures in \c fields. - @param xapOut [out] A buffer in which to return the new XMP metadata. - The caller is responsible for allocating and releasing the returned output buffer. - @note For details of the XMP properties, see the Adobe "XMP Specification", - @see \c #AIDocumentSuite::GetDocumentXAP(), \c #AIDocumentSuite::SetDocumentXAP() - for getting and setting the XMP metadata buffer for the current document. - */ - AIAPI AIErr (*UpdateDynamicMetadataFields) (const char *xapIn, - const AIXMPDataFieldMap *fields, const ai::int32 length, - char **xapOut); - - /** Used internally to update the current document's XMP metadata. - @param mimeType The MIME type of the file being updated. - Updates the "Format" property. - @param managedURL The URL of the file being updated, or \c NULL - for local (unmanaged) files.Updates the "ManageTo" field of \c kXMP_NS_XMP_MM namespace. - @param metadataSelectors A logical OR of \c #AIXMPMetadataSelector constants - that specifies which types of metadata to update. - */ - AIAPI AIErr (*UpdateDynamicMetadata) (const char *mimeType, const char* managedURL /* = NULL */, ai::uint32 metadataSelectors); - - /** @deprecated - Used internally. Progress callback for Version Cue network operations. - @return True to continue the operation, false to cancel. - */ - AIAPI AIBoolean (*Progress) ( ai::int32 bytesTransferred, ai::int32 contentLength, - char *server, char *uri, char *method, - char *contentType, const ai::FilePath &localFile); - /** @deprecated - Creates a new XMP session, which you can use to manipulate XMP metadata for the current document. - @param xmpIn A buffer containing the UTF-8 encoded XMP metadata for the current document. - If null, a session object is still created and can be used with \c #SetProperty(). - @param xmp [out] A buffer in which to return the new XMP session object. - @return The error \c #kBadParameterErr for any failure, including insufficient memory. - @see \c #AIDocumentSuite::GetDocumentXAP() - */ - AIAPI AIErr (*CreateXMPSession) (const char *xmpIn , AIXMPSession* xmp); - - /** @deprecated - Frees memory associated with the XMP session object that is no longer needed. - @param xmp The session object, as returned by \c #CreateXMPSession(). - Upon return, this reference is no longer valid.*/ - AIAPI AIErr (*DisposeXMPSession) (AIXMPSession xmp); - - /** @deprecated - Gets the size of an XMP session object. Use this size to allocate memory before - calling \c #GetXMPSessionBuffer(). - @param xmp The XMP session object. - @param xmpSize [out] A buffer in which to return the number of bytes in the session buffer. - */ - AIAPI AIErr (*GetXMPSessionSize) (AIXMPSession xmp , int* xmpSize); - - /** @deprecated - Retrieves the buffer of the XMP session object. - @param xmp The XMP session object. - @param xmpOUT [out] A buffer in which to return the session buffer. Allocate sufficient memory using - \c #GetXMPSessionSize(). - */ - AIAPI AIErr (*GetXMPSessionBuffer) (AIXMPSession xmp , char *xmpOut); - - /** @deprecated - Gets the size of an XMP key value. Use this size to allocate memory before - calling \c #GetProperty(). - @param xmp The XMP session object. - @param nameSpace The XMP namespace for the desired property. - @param key The key name for the desired property. - @param valueSize [out] A buffer in which to return the number of bytes in the key value. - @return The error \c kNoSuchKey if key does not exist. - */ - AIAPI AIErr (*GetPropertySize) (AIXMPSession xmp, const char *nameSpace, const char* key, ai::int32* valueSize); - - /** @deprecated - Retrieves the value of an XMP property. - @param xmp The XMP session object. - @param nameSpace The XMP namespace for the desired property. - @param key The key name for the desired property. - @param value [out] A buffer in which to return the value. Allocate sufficient memory using - \c #GetPropertySize(). - */ - AIAPI AIErr (*GetProperty) (AIXMPSession xmp, const char *nameSpace, const char* key , char* value); - - /** @deprecated - Sets the value of an XMP property. - @param xmp The XMP session object. - @param nameSpace The XMP namespace for the desired property. - @param key The key name for the desired property. - @param value The new value. - */ - AIAPI AIErr (*SetProperty) (AIXMPSession xmp, const char *nameSpace, const char* key , const char* value); - - /** @deprecated - Removes a property from XMP metadata. - @param xmp The XMP session object. - @param nameSpace The XMP namespace for the property. - @param key The key name for the property. - */ - AIAPI AIErr (*DeleteProperty) (AIXMPSession xmp, const char *nameSpace, const char* key); - - // Currently used by StockPhoto. - /** Shows the FileInfo dialog for an XMP packet. - @param xmpIn The current XMP metadata packet. - @param xmpOUT [out] A buffer in which to return the new XMP packet, - allocated by \c #SPBasicSuite::AllocateBlock(). Caller must free memory when no longer needed. - If \c NULL, the function shows a read-only FileInfo dialog. - @param dialogTitle A UTF-8 title string for the dialog, typically the name of the artwork - associated with the metadata. If a \c NULL pointer, the default title is "File Info". - - @note The function does not check whether UserInteraction is on or off, the caller must do so.. - */ - AIAPI AIErr (*ShowMetadataDialog) (const char *xmpIn, char **xmpOut, const char *dialogTitle); -} AIAssetMgmtSuite; - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIAssetMgmt__ +#define __AIAssetMgmt__ + +/* + * Name: AIAssetMgmt.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator Asset Management Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1999-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "IAIFilePath.hpp" + +#include "AIHeaderBegin.h" + +/** @file AIAssetMgmt.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIAssetMgmtSuite "AI Asset Management Suite" +#define kAIAssetMgmtSuiteVersion9 AIAPI_VERSION(9) +#define kAIAssetMgmtSuiteVersion kAIAssetMgmtSuiteVersion9 +#define kAIAssetMgmtVersion kAIAssetMgmtSuiteVersion + +/** @ingroup Notifiers */ +#define kAILaunchProjectBridgeNotifier "AI Launch Project Bridge Notifier" + +/** Metadata selectors for \c #AIAssetMgmtSuite::UpdateDynamicMetadata(), + controls the types of metadata that are updated. */ +enum AIXMPMetadataSelector { + /** Generate the default XMP metadata */ + kAIXMPDefault = 0x00000000, + /** Preserve the original DocumentID (128-bit uuid), rather than creating a new one. */ + kAIXMPPreserveDocumentID = 0x00000001, + /** Do not generate page info metadata */ + kAIXMPNoPageInfo = 0x00000002, + /** Do not generate document swatches metadata */ + kAIXMPNoDocumentSwatches = 0x00000004, + /** Do not generate ink plate usage data */ + kAIXMPNoPlateUsages = 0x00000008, + /** Do not generate used-font metadata */ + kAIXMPNoUsedFonts = 0x00000010, + /** Do not generate XMP thumbnail metadata */ + kAIXMPNoThumbnail = 0x00000020 +}; + + +/******************************************************************************* + ** + ** Types + ** + **/ +/** The XMP session object, which allows you to manipulate metadata in the XMP buffer. +You must have XMP data to create a session object. + */ +typedef struct _AIXMPSession *AIXMPSession; + +/** Information for updating XMP metadata using \c #AIAssetMgmtSuite::UpdateDynamicMetadataFields() + */ +typedef struct AIXMPDataFieldMap { + /** Name of the XMP property, such as "CreateDate", "CreatorTool", "Format" */ + const char *name; + /** New value of the XMP property. A null pointer value means to + remove the XMP property from the XMP packet if the \c replace flag is true; + for example, to remove the XMP "Thumbnails" data from the original packet. */ + const char *value; + /** When true, reset the value of the XMP property if it already + exists in the input XMP metadata buffer. */ + AIBoolean replace; +} AIXMPDataFieldMap; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides simple XMP metadata manipulation routines and + Adobe Version Cue(TM) functionality. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIAssetMgmtSuite and \c #kAIAssetMgmtVersion. +*/ + +typedef struct AIAssetMgmtSuite { + /** Reports whether Version Cue is enabled. + (Note that this function returns a boolean value, not an error code.) + @return True if Version Cue is enabled. + */ + AIAPI AIBoolean (*IsAssetMgmtEnabled)(); + + /** Updates XMP metadata. Creates a new XMP metadata buffer. + @param xapIn The buffer containing the XMP metadata for the current document. + @param fields A pointer to an array of structures containing the + new or changed metadata property name/value pairs. + @param length The number of structures in \c fields. + @param xapOut [out] A buffer in which to return the new XMP metadata. + The caller is responsible for allocating and releasing the returned output buffer. + @note For details of the XMP properties, see the Adobe "XMP Specification", + @see \c #AIDocumentSuite::GetDocumentXAP(), \c #AIDocumentSuite::SetDocumentXAP() + for getting and setting the XMP metadata buffer for the current document. + */ + AIAPI AIErr (*UpdateDynamicMetadataFields) (const char *xapIn, + const AIXMPDataFieldMap *fields, const ai::int32 length, + char **xapOut); + + /** Used internally to update the current document's XMP metadata. + @param mimeType The MIME type of the file being updated. + Updates the "Format" property. + @param managedURL The URL of the file being updated, or \c NULL + for local (unmanaged) files.Updates the "ManageTo" field of \c kXMP_NS_XMP_MM namespace. + @param metadataSelectors A logical OR of \c #AIXMPMetadataSelector constants + that specifies which types of metadata to update. + */ + AIAPI AIErr (*UpdateDynamicMetadata) (const char *mimeType, const char* managedURL /* = NULL */, ai::uint32 metadataSelectors); + + /** @deprecated + Used internally. Progress callback for Version Cue network operations. + @return True to continue the operation, false to cancel. + */ + AIAPI AIBoolean (*Progress) ( ai::int32 bytesTransferred, ai::int32 contentLength, + char *server, char *uri, char *method, + char *contentType, const ai::FilePath &localFile); + /** @deprecated + Creates a new XMP session, which you can use to manipulate XMP metadata for the current document. + @param xmpIn A buffer containing the UTF-8 encoded XMP metadata for the current document. + If null, a session object is still created and can be used with \c #SetProperty(). + @param xmp [out] A buffer in which to return the new XMP session object. + @return The error \c #kBadParameterErr for any failure, including insufficient memory. + @see \c #AIDocumentSuite::GetDocumentXAP() + */ + AIAPI AIErr (*CreateXMPSession) (const char *xmpIn , AIXMPSession* xmp); + + /** @deprecated + Frees memory associated with the XMP session object that is no longer needed. + @param xmp The session object, as returned by \c #CreateXMPSession(). + Upon return, this reference is no longer valid.*/ + AIAPI AIErr (*DisposeXMPSession) (AIXMPSession xmp); + + /** @deprecated + Gets the size of an XMP session object. Use this size to allocate memory before + calling \c #GetXMPSessionBuffer(). + @param xmp The XMP session object. + @param xmpSize [out] A buffer in which to return the number of bytes in the session buffer. + */ + AIAPI AIErr (*GetXMPSessionSize) (AIXMPSession xmp , int* xmpSize); + + /** @deprecated + Retrieves the buffer of the XMP session object. + @param xmp The XMP session object. + @param xmpOUT [out] A buffer in which to return the session buffer. Allocate sufficient memory using + \c #GetXMPSessionSize(). + */ + AIAPI AIErr (*GetXMPSessionBuffer) (AIXMPSession xmp , char *xmpOut); + + /** @deprecated + Gets the size of an XMP key value. Use this size to allocate memory before + calling \c #GetProperty(). + @param xmp The XMP session object. + @param nameSpace The XMP namespace for the desired property. + @param key The key name for the desired property. + @param valueSize [out] A buffer in which to return the number of bytes in the key value. + @return The error \c kNoSuchKey if key does not exist. + */ + AIAPI AIErr (*GetPropertySize) (AIXMPSession xmp, const char *nameSpace, const char* key, ai::int32* valueSize); + + /** @deprecated + Retrieves the value of an XMP property. + @param xmp The XMP session object. + @param nameSpace The XMP namespace for the desired property. + @param key The key name for the desired property. + @param value [out] A buffer in which to return the value. Allocate sufficient memory using + \c #GetPropertySize(). + */ + AIAPI AIErr (*GetProperty) (AIXMPSession xmp, const char *nameSpace, const char* key , char* value); + + /** @deprecated + Sets the value of an XMP property. + @param xmp The XMP session object. + @param nameSpace The XMP namespace for the desired property. + @param key The key name for the desired property. + @param value The new value. + */ + AIAPI AIErr (*SetProperty) (AIXMPSession xmp, const char *nameSpace, const char* key , const char* value); + + /** @deprecated + Removes a property from XMP metadata. + @param xmp The XMP session object. + @param nameSpace The XMP namespace for the property. + @param key The key name for the property. + */ + AIAPI AIErr (*DeleteProperty) (AIXMPSession xmp, const char *nameSpace, const char* key); + + // Currently used by StockPhoto. + /** Shows the FileInfo dialog for an XMP packet. + @param xmpIn The current XMP metadata packet. + @param xmpOUT [out] A buffer in which to return the new XMP packet, + allocated by \c #SPBasicSuite::AllocateBlock(). Caller must free memory when no longer needed. + If \c NULL, the function shows a read-only FileInfo dialog. + @param dialogTitle A UTF-8 title string for the dialog, typically the name of the artwork + associated with the metadata. If a \c NULL pointer, the default title is "File Info". + + @note The function does not check whether UserInteraction is on or off, the caller must do so.. + */ + AIAPI AIErr (*ShowMetadataDialog) (const char *xmpIn, char **xmpOut, const char *dialogTitle); +} AIAssetMgmtSuite; + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAutoCoordinateSystem.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAutoCoordinateSystem.h index 3332137..bd37179 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAutoCoordinateSystem.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIAutoCoordinateSystem.h @@ -1,85 +1,94 @@ -/* -* Name: AIAutoCoordinateSystem.h -* Author: Started by Pushp -* Date: January, 2009 -* Purpose: Adobe Illustrator AutoCoordinateSystem Auto object -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2008 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ -#pragma once - -#ifndef _AIAutoCoordinateSystem_H_ -#define _AIAutoCoordinateSystem_H_ - -#include "AIHardSoft.h" - -#ifdef _AI_AUTO_COORDINATE_SYSTEM_INCLUDE_H_ -#include _AI_AUTO_COORDINATE_SYSTEM_INCLUDE_H_ -#else -#ifndef _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ -#define _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ 1 -#endif -#if _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ -extern "C" -{ -#endif - /** A plug-in using the \c #ai::AutoCoordinateSystem class is required to provide - these global suite pointers. These pointers must be valid prior - to any call to \c #ai::AutoCoordinateSystem methods. - */ - extern AIHardSoftSuite* sAIHardSoft; - -#if _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ -} -#endif // _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ - -#endif - -namespace ai -{ - /** A stack object used to change the coordinate system - to be used by Illustrator API functions. The coordinate - system remains in use until the destruction of this object. - @see \c #kAIHardSoftSuite - */ - - class AutoCoordinateSystem - { - public: - /** - Changes the coordinate system to be used by Illustrator API functions. - The coordinate system remains in use until the destruction of this object, - at which time the previous system is restored. - @see \c #kAIHardSoftSuite - - @param coordinateSystem [in] The new coordinate system constant, an \c #AICoordinateSystem value. - - */ - AutoCoordinateSystem(AICoordinateSystem coordinateSystem= kAICurrentCoordinateSystem) - { - sAIHardSoft->GetCoordinateSystem(fCoordinateSystem); - sAIHardSoft->SetCoordinateSystem(coordinateSystem); - } - /** - Destructor. Resets the coordinate system used by Illustrator API functions - to the one that was saved when this object was created. - */ - ~AutoCoordinateSystem() - { - sAIHardSoft->SetCoordinateSystem(fCoordinateSystem); - } - private: - ai::int32 fCoordinateSystem; - }; -} - +/* +* Name: AIAutoCoordinateSystem.h +* Author: Started by Pushp +* Date: January, 2009 +* Purpose: Adobe Illustrator AutoCoordinateSystem Auto object +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2008 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ +#pragma once + +#ifndef _AIAutoCoordinateSystem_H_ +#define _AIAutoCoordinateSystem_H_ + +#include "AIHardSoft.h" + +#ifdef _AI_AUTO_COORDINATE_SYSTEM_INCLUDE_H_ +#include _AI_AUTO_COORDINATE_SYSTEM_INCLUDE_H_ +#elif AI_AUTO_SUITE_AVAILABLE +#include "AutoSuite.h" +extern_declare_suite(AIHardSoft); +#else +#ifndef _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ +#define _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ 1 +#endif +#if _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ +extern "C" +{ +#endif + /** A plug-in using the \c #ai::AutoCoordinateSystem class is required to provide + these global suite pointers. These pointers must be valid prior + to any call to \c #ai::AutoCoordinateSystem methods. + */ + extern AIHardSoftSuite* sAIHardSoft; + +#if _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ +} +#endif // _AI_AUTO_COORDINATE_SYSTEM_USE_C_LINKAGE_ + +#endif + +namespace ai +{ + /** A stack object used to change the coordinate system + to be used by Illustrator API functions. The coordinate + system remains in use until the destruction of this object. + @see \c #kAIHardSoftSuite + */ + + class AutoCoordinateSystem + { + public: + /** + Changes the coordinate system to be used by Illustrator API functions. + The coordinate system remains in use until the destruction of this object, + at which time the previous system is restored. + @see \c #kAIHardSoftSuite + + @param coordinateSystem [in] The new coordinate system constant, an \c #AICoordinateSystem value. + + */ + AutoCoordinateSystem(AICoordinateSystem coordinateSystem= kAICurrentCoordinateSystem) + { + sAIHardSoft->GetCoordinateSystem(fCoordinateSystem); + sAIHardSoft->SetCoordinateSystem(coordinateSystem); + } + /** + Destructor. Resets the coordinate system used by Illustrator API functions + to the one that was saved when this object was created. + */ + ~AutoCoordinateSystem() + { + try + { + sAIHardSoft->SetCoordinateSystem(fCoordinateSystem); + } + catch (...) + { + } + } + private: + ai::int32 fCoordinateSystem; + }; +} + #endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicTypes.h index ea34a7e..897bd95 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicTypes.h @@ -1,59 +1,122 @@ -#ifndef _AI_BASIC_TYPES_ -#define _AI_BASIC_TYPES_ - -/* -* Name: AIBasicTypes.h -* Author: Started by Pushp -* Date: November, 2008 -* Purpose: Adobe Illustrator Definitions of Basic Types -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2008 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -//TODO: To use C99 data types instead of raw data types and defined new data types for 64 bit readiness [Pushp] - -#include -#include "ASConfig.h" -#if defined(MAC_ENV) -#include -#include -#endif - - - -namespace ai -{ - typedef signed char int8; - typedef unsigned char uint8; - typedef signed short int16; - typedef unsigned short uint16; - -#if defined(_WIN32) - typedef __int64 int64; - typedef unsigned __int64 uint64; - typedef __int32 int32; - typedef unsigned __int32 uint32; -#endif - -#if defined(MAC_ENV) - typedef int64_t int64; - typedef u_int64_t uint64; - typedef int32_t int32; - typedef u_int32_t uint32; -#endif - typedef ptrdiff_t sizediff_t; - typedef intptr_t intptr; - typedef uintptr_t uintptr; - typedef size_t SizeType; -} - -#endif // _AI_BASIC_TYPES_ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2008 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#ifndef _AI_BASIC_TYPES_ +#define _AI_BASIC_TYPES_ + +#include "ASConfig.h" + +#include +#include + +namespace ai +{ + using int8 = int8_t; + using uint8 = uint8_t; + using int16 = int16_t; + using uint16 = uint16_t; + using int32 = int32_t; + using uint32 = uint32_t; + using int64 = int64_t; + using uint64 = uint64_t; + + using sizediff_t = ptrdiff_t; + using intptr = intptr_t; + using uintptr = uintptr_t; + using SizeType = size_t; + +} // namespace ai + +using AIReal = double; +using AIFloat = float; + +/** Double-byte numeric value */ +using AIDouble = double; + +/** Rectangle specified with \c #AIDouble coordinates.*/ +struct AIDoubleRect { + AIDouble left, top, right, bottom; +}; + +using AIRealRect = AIDoubleRect; +using AIRealRectPtr = AIRealRect*; + +typedef struct _t_AIFloatRect { + AIFloat left, top, right, bottom; +} AIFloatRect, *AIFloatRectPtr; + +typedef struct _t_AIRealMatrix { + AIReal a, b, c, d, tx, ty; + /** Sets to Identity.*/ + void Init() + { + a = 1.0; b = 0.0; + c = 0.0; d = 1.0; + tx = 0.0; ty = 0.0; + } + bool operator==(const _t_AIRealMatrix& other) const + { + return a == other.a && b == other.b && + c == other.c && d == other.d && + tx == other.tx && ty == other.ty; + } +} AIRealMatrix, *AIRealMatrixPtr; + +typedef struct _t_AIRealPoint { + AIReal h, v; + bool operator==(const _t_AIRealPoint& other) const + { + return h == other.h && v == other.v; + } +} AIRealPoint, *AIRealPointPtr; + +// AIRect is the same size and layout as a Windows RECT. +/** Rectangle value in Windows (same as \c RECT) */ +typedef struct _t_AIRect { + /** Coordinate values */ + ai::int32 left, top, right, bottom; +} AIRect; + +// AIPoint is the same size and layout as a Windows POINT. +/** Point value in Windows (same as \c Point) */ +typedef struct _t_AIPoint { + /** Coordinate values */ + ai::int32 h, v; +} AIPoint; + +// +// +// Platform dependant natively aligned structures +// +// + +/** True (1) or false (0) */ +#ifdef MAC_ENV +/** Mac OS only. the same as Mac OS \c Boolean. */ +typedef unsigned char AIBoolean; +#endif + +#ifdef WIN_ENV +/** Windows only. the same as Windows \c BOOL. */ +typedef int AIBoolean; +#endif + +#ifdef LINUX_ENV +typedef unsigned char AIBoolean; +#endif + +#endif // _AI_BASIC_TYPES_ + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicUtilities.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicUtilities.h index 19e88c5..cc8a160 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicUtilities.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBasicUtilities.h @@ -1,36 +1,36 @@ -/* -* Name: AIBasicUtilities.h -* $Revision: 1 $ -* Author: -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2008 Adobe Systems Incorporated -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#ifndef __AIBasicUtilities__ -#define __AIBasicUtilities__ - -namespace ai -{ - template - inline const T& Min ( const T& obj1, const T& obj2 ) - { - return obj1 < obj2 ? obj1 : obj2; - } - - template - inline const T& Max ( const T& obj1, const T& obj2 ) - { - return obj1 > obj2 ? obj1 : obj2; - } -} - +/* +* Name: AIBasicUtilities.h +* $Revision: 1 $ +* Author: +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2008 Adobe Systems Incorporated +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +#ifndef __AIBasicUtilities__ +#define __AIBasicUtilities__ + +namespace ai +{ + template + inline const T& Min ( const T& obj1, const T& obj2 ) + { + return obj1 < obj2 ? obj1 : obj2; + } + + template + inline const T& Max ( const T& obj1, const T& obj2 ) + { + return obj1 > obj2 ? obj1 : obj2; + } +} + #endif //__AIBasicUtilities__ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBeautifulStrokes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBeautifulStrokes.h index a0bac46..cf514ac 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBeautifulStrokes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBeautifulStrokes.h @@ -1,1276 +1,1276 @@ -#ifndef __AIBeautifulStrokes__ -#define __AIBeautifulStrokes__ - -/* -* Date: Started 2009 -* Purpose: Adobe Illustrator Beautiful Strokes suite. This suite lets -* clients control effects that can be applied to strokes such as -* art and pattern brushes, arrowheads, and dash adjustments. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#include "AITypes.h" -#include "AIEntry.h" -#include "AILiveEffect.h" -#include "AITabletData.h" -#include "AIPath.h" -#include "AIHeaderBegin.h" - -/******************************************************************************* -** -** Types -** -**/ - -/** Constants for \c #AIBeautifulStrokesSuite::SetArtPatternPaint() and - /c #AIBeautifulStrokesSuite::GetArtPatternPaint() that determine how to - apply art along a path. -*/ -enum RepeatedArtAdjustment -{ - /// Stretch art to fit path - kStretch, - /// Add space between art to fit path - kAddSpace, - /// Adjust length of path to fit art - kAdjustPath, - - /// Special return value to indicate mixed values when the params dict represents an - /// accumulation of the values from multiple objects, such as returned by - /// \c #AIPathStyleSuite::GetCurrentPathStyle(). - /// Passing this in as a value to "set" in a params dictionary means that the - /// existing value, if any, should not change. - kUnknownRepeatedArtAdjustment = 0xFFFFFFFF, - - /// Dummy value to ensure 32-bit enum value size. - RepeatedArtAdjustment_dummy = 0xFFFFFFFF -}; - -enum RepeatedArtCorner { - - /// For not using an Auto Generated Corner - kNoCorner, - - /// Creates a corner centered around the border/side tile - kAutoCentered, - - /// Creates a corner by cutting the border/side tile into 2 halves. - kAutoBetween, - - /// Creates a corner by slicing the border/side tile - kAutoSliced, - - /// Creates a corner by overlapping the border/side tile - kAutoOverlap -}; - -/** Constants for \c #AIBeautifulStrokesSuite functions that set stroke widths. - The first three values are used to set the stroke width source for an entire path or Beautiful Strokes dictionary. - The "centered" values further specify the source of a requested width at a specific location on a path, - as returned by \c #AIBeautifulStrokesSuite::GetWidthsAtDistance() and parallel functions. -*/ -enum StrokeWidthSource -{ - /// Use a constant width derived from the \c #AIPathStyle stroke width setting. - kConstantWidth, - - /// Use width from tablet data; set specific channel with \c #AIBeautifulStrokesSuite::SetWidthTabletDataSource(). - kTabletData, - - /// Use variable width from user-provided profile. See \c #AIBeautifulStrokesSuite::SetCenteredWidthProfile() - /// and \c #AIBeautifulStrokesSuite::SetUncenteredWidthProfile(). - kUserProfile, - - /// Get width from this location on the path. - kCenteredProfileMark = 0x0000FF01, - /// Get width from this location on the path. - kUncenteredProfileMark, - /// Get width from this location on the path. - kCenteredProfileInterpolation, - /// Get width from this location on the path. - kUncenteredProfileInterpolation, - - /// Special return value to indicate mixed values when the params dict represents an - /// accumulation of the values from multiple objects, such as returned by \c #AIPathStyleSuite::GetCurrentPathStyle(). - /// Passing this in as a value to "set" in a params dictionary means that that the existing value, if any, should not change. - kUnknownStrokeWidthSource = 0xFFFFFFFF, - - /// Dummy value to ensure 32-bit enum value size. - StrokeWidthSource_dummy = 0xFFFFFFFF -}; - -enum GradientStrokeApplication -{ - /// Use the stroke to mask the gradient as if the stroke were outlined - /// and filled (default). - kGradientStrokeMask, - - /// Apply the gradient along the length of the stroke. - kGradientStrokeAlong, - - /// Apply the gradient across the width of the stroke. - kGradientStrokeAcross, - - /// Dummy value to ensure 32-bit enum value size. - kGradientStroke_dummy = 0xFFFFFFFF -}; - -/** Constants for \c #AIBeautifulStrokesSuite::SetArrowheadOptions() - that determine how to position the arrows at the ends of the path. -*/ -enum ArrowTipAlignment -{ - /// Put the tip of the arrow at the end of the path. - /// The attachment point is placed on the path, and the path then cut at the truncation point. - kArrowTipAtEnd, - /// Put the attachment point of the arrow at the end of the path. - /// The line between the attachment point and the tip is aligned with the path's tangent at that end. - kArrowAttachmentPtAtEnd, - /// Put the truncation point of the arrow at the end of the path. - /// The line between the truncation point and the tip is aligned with the path's tangent at that end. - kArrowTruncationPtAtEnd, - - /// Special return value to indicate mixed values when the params dict represents an - /// accumulation of the values from multiple objects, such as returned by \c #AIPathStyleSuite::GetCurrentPathStyle(). - /// Passing this in as a value to "set" in a params dictionary means that the existing value, if any, should not change. - kUnknownArrowAlignment = 0xFFFFFFFF -}; - - -/// See \c #WidthMarkerFlagValues -typedef ai::uint32 WidthMarkerFlags; // so that the compiler will allow doing bitwise operations - -// Bit flags that modify and/or report information about width markers, other than their -// location (t value) and width. -enum WidthMarkerFlagValues -{ - /// No flags set. - kNoWidthMarkerFlags = 0, - - // -------- Flags for describing marker types --------- // - - /** The marker indicates the incoming width only, that is, it is the width for interpolating - to the previous marker. The next marker should be an outgoing width only, and is - typically a different width value on at least one side of the stroke. - If passed to a width-changing function, indicates that only the incoming width - at that t value should be changed, with the outgoing width staying the same. - */ - kIncomingWidthMarker = 0x1, - // 0x2 is reserved in case we decide to distinguish between left stroke side and right stroke side incoming widths - - /** The marker indicates the outgoing width only, that is, it is the width for interpolating - to the next marker. The previous marker should be an incoming width only, and is - typically a different width value. If passed to a width-changing function, - indicates that only the outgoing width at that t value should be changed, - with the incoming width staying the same. - */ - kOutgoingWidthMarker = 0x4, - // 0x8 is reserved in case we decide to distinguish between left stroke side and right stroke side outgoing widths - - /** The width at the indicated point forms a corner; that is, if the adjacent markers are - at a different width, it starts interpolating linearly to the adjacent value, rather than - spreading smoothly. - */ - kCornerWidthMarker = 0x10, - /** If the width is uncentered, set the corner vs smooth attribute separately - for the left width. - */ - kCornerLeftWidthMarker = 0x10, - /** If the width is uncentered, set the corner vs smooth attribute separately - for the right width. - */ - kCornerRightWidthMarker = 0x20, - - /** The width marker at the indicated point prefers to be tied to a position on the path expressed - as as an anchor point index, rather than being placed at the t value in the t values array. - - Width profiles can be shared by multiple paths, since they are part of art style definitions, - and multiple paths can carry the same art style. So the actual profile contains only the - flags that say which of the width marks should be shifted to the anchored places, if they - exist on the path to which it is applied. The paths then in turn carry data that records - which of the positions on the path want to have width markers anchored to them. - - For example, if there are three interior width markers in the profile that prefer to be tied to - anchor points, and only one interior anchor point on a path to which that profile is applied, - then not all the anchor requests can be honored. - - When a width profile contains anchored width marks, the t values are adjusted when the - stroke is generated, so that the widths at those marks move to the anchor positions, - and any unanchored width markers between them are shifted proportionally. (The first and - last width mark in a profile are always anchored respectively to the start and end of the - path, so this flag is ignored for those width marks.) - - Left and right widths must always be anchored together, as must incoming and outgoing width - markers, since the left and right markers share the same tValues array and are always at the - same offsets along the path. - - */ - kAnchoredWidthMarker = 0x40, - - // (values from 0x80 to 0x8000 are reserved for future enhancements to saved options) - - // -------- Flags for describing options to functions that modify profiles --------- // - - /** When passed to functions that take an art object and modify the width at a given t value, - propagate the changes across multiple adjacent markers. Scope depends on selection state, - and by default is bounded by corner points. If not set, only the width at the given t value changes, - and all other markers stay the same.
- The way the changes propagate can be modified by setting \c #kUniformChangeAcrossSpread - or \c #kProportionalChangeAcrossSpread. If both are off, the amount of change - tapers down logarithmically with distance from the t value at which the - change is specified, until it reaches 0 at the ends of the spread. - */ - kSpreadWidthChanges = 0x10000, - - /** When passed to \c #AIBeautifulStrokesSuite::SlideWidthMarkerToNewT(), specifies - that the marker should be duplicated and the new marker dragged while the old one is - left behind. - */ - kCopyMarker = 0x20000, - - /** When passed to \c #AIBeautifulStrokesSuite::SlideWidthMarkerToNewT(), specifies - that markers are not allowed to move past adjacent ones. Ignored if \c #kSpreadWidthChanges - is also on. - */ - kLimitAtNeighbors = 0x40000, - - /** Refines the meaning of \c #kSpreadWidthChanges; ignored if that flag is off. - If on, the same offset is added or subtracted from all other markers in the affected - spread, subject to remaining in the valid range. - */ - kUniformChangeAcrossSpread = 0x80000, - - /** Refines the meaning of \c #kSpreadWidthChanges; ignored if that flag is off. - If on, and \c #kUniformChangeAcrossSpread is off, other markers in the affected - spread change by the same proportion that the one being directly modified does. - For example, if the width at the directly modified t value is doubled, then all - other widths in the affected spread are doubled. - */ - kProportionalChangeAcrossSpread = 0x100000 - -}; - -/// A logical OR of \c #WidthMarkerFlagValues. */ -typedef ai::uint32 WidthMarkerFlags; - -/** Callback for progress reports during a call to \c #AIBeautifulStrokeSuite::GenerateArt(). - @param current The current progress, a value between 0 and \c total. Always equal to 0 currently. - @param total A value at which the operation is complete. Always equal to 1 currently. - @return False if user cancels the operation, otherwise true. */ -typedef AIAPI AIBoolean (*AIGenerateArtProgressProc)(ai::int32 current, ai::int32 total); - -/** Filled out by \c #AIBeautifulStrokesSuite::StrokeHitTest(), to report the results of a hit test - on the focal stroke of a given path. -
Note that when \c hitSomething is true, any combination of the other three hit results can hold. - For example, if a width marker is hit, the target point may also be within the hit tolerance - of the path centerline and/or within the hit tolerance of the stroke edge. Or on wide strokes, - it might be inside a region of the stroke that is not near the path centerline, the stroke edge, - nor any width point marker. -*/ -struct StrokeHitResults -{ - /** True if any portion of the focal stroke was hit. */ - AIBoolean hitSomething; - /** True if one of the width markers was hit anywhere along its extent. */ - AIBoolean hitWidthMarker; - /** True if the target point was within the hit tolerance of the path centerline. */ - AIBoolean hitCenterline; - /** True if the target point was within the hit tolerance of the stroke edge. */ - AIBoolean hitStrokeEdge; - - /** If \c hitWidthMarker is true, the point on the path at which that width marker is positioned. - Else if \c hitCenterline is true, the nearest point on the path, subject to anchor point snapping.
- Else if within the stroked area, the first point on the path that would cause a width marker hit - if a new width marker were to be inserted at that point. Note that this is not necessarily - the nearest point on the path; for example, the path may have a U-shaped curve in which the stroke - is wide on one side and narrow on the other, so that the cursur is closer to the left centerline, - but outside the left stroked area, while it is farther from the right centerline, but within the - right stroked area. - */ - AIRealPoint pointOnPath; - - /** If \c hitStrokeEdge is true, the point on the stroke edge closest to the cursor, possibly snapped - to a marker end point. This is useful even if \c hitCenterline is also true, since the point on the - centerline can be obtained from \c pointOnPath.
- If \c hitStrokeEdge is false and \c hitCenterline is true, it is the same as \c pointOnPath.
- If \c hitStrokeEdge and \c hitCenterline are both false and \c hitWidthMarker is true, it is the closest - point along the marker's extent to the mouse.
- If \c hitSomething is true and \c hitStrokeEdge, \c hitCenterline and \c hitWidthMarker are all false (that is, - if the cursor was within the stroked area but not within tolerance of any of the above), then it - is the same as \c pointOnPath.
- If \c hitSomething is false it is the original mouse position. - */ - AIRealPoint snappedPoint; - - /** If \c hitSomething is true, the distance from the original mouse point to \c snappedPoint. - If \c hitSomething is false, so that \c snappedPoint is the original mouse position, it is - NOT zero, but a meaningless large number. */ - AIReal hitDistance; - - /** If \c hitWidthMark is true, the index of the width marker that was hit, otherwise 0. */ - ai::int16 widthMarkerIndex; - - /** The fraction of the path length from the beginning of the path to \c pointOnPath. */ - AIReal lengthFraction; - /** The p0 index of the bezier segment that contains \c pointOnPath. */ - ai::int16 segIndex; - /** The bezier t value within that segment of the \c pointOnPath. 0 for anchor point hits. */ - AIReal bezierT; -}; - - -/** An overview of the kind of path edit being performed, included as part of a \c #PathEditDescription -*/ -enum PathEditType -{ - /** Remove any width profile anchors from the path, but do not modify the art style */ - kClearProfileAnchorsOnly = 0, - - /** Remove any width profile anchors from the path, and apply a new art style in which - the width profile distances have been reset to their values according to the current - path distance. This is appropriate when a path is about to be edited in a way that - keeps the path distances roughly the same proportionally, but changes the number - of anchor points in a way that is too complex to attempt moving the anchors to new - indexes, such as Offset Path or Simplify. See also \c kCopyAndResetAnchors, below. */ - kClearAnchorsAndResetProfile, - - /** Transfer any profile anchors from the source path in the \c #PathEditDescription onto - the art dictionary of the path, copying them exactly if the number of segments on - the two paths are the same and they are either both open or both closed, otherwise - resetting the profile anchors so that they maintain approximately the same fractional - path distances, but are relative to the segment indices of the new path. This is an - alternative to \c kClearAnchorsAndResetProfile, for situations where the destination path - is a duplicate or a modified duplicate of the source path, especially useful for contexts - where the path being modified is an input path to an effect under execution, and hence - has been stripped of its paint. The art style of the path is not modified. */ - kCopyAndResetAnchors, - - /** A single anchor point (which may or may not be selected) is about to be moved. */ - kTranslate1Anchor, - - /** A single anchor point (which may or may not be selected) is about to be removed, - while preserving the path continuity (that is, the path is not split). */ - kRemove1Anchor, - - /** A single anchor point is about to be added. */ - kAdd1Anchor, - - /** A bezier segment is about to be adjusted, while leaving the bounding anchor points alone. */ - kAdjustBezier, - - /** The selected components of the path are about to be transformed. - It is not necessary to notify of this if the transformation preserves relative distances - between anchor points, such as a rotation, translation, or uniform scale of a fully - selected path. Should be notified if either the path is partially selected, or the - transformation changes the relative lengths of bezier segments, such as a shear or - non-uniform scale. */ - kTransformSelection, - - /** The anchor points of the path are about to be reversed. */ - kReversePathDirection, - - /** A new path has been constructed from a portion of another path (with, for instance, Delete, - Copy, or Scissor on a partially selected path). For this type of edit, the path - parameter to \c #AIBeautifulStrokesSuite::AdjustWidthAnchorsBeforePathEdit() - should be the new path; the original path is passed as the source path in the - \c #PathEditDescription.*/ - kSplitPath, - - /** A new art style is about to be applied to the path .*/ - kApplyStyle -}; - - -/** The details of an edit description, passed as a parameter to \c #AIBeautifulStrokesSuite::AdjustWidthAnchorsBeforePathEdit() -*/ -struct PathEditDescription -{ - PathEditType editType; - - /** For \c #kTranslate1Anchor or \c #kRemove1Anchor, the index of the anchor point being moved or removed.
- For \c #kAdjustBezier, the index of the anchor point before the bezier segment being adjusted.
- For \c #kAdd1Anchor, the index of the new anchor point after insertion.
- For \c #kSplitPath, the index in the source path of the anchor point that was given index 0 - in the new path.
- The index is allowed to be -1 if the new path was constructed by cutting - the closing bezier segment of a closed path and copying anchor point 0 of the source - path to anchor point 1 of the new path. You can find the number of anchor points copied - by examining the new path. If the new path is longer than the number of anchor points - remaining after this index in the source path, the code checks for wraparound, as would result - from cutting open a closed path. - */ - ai::int16 segIndex; - - /** For \c #kApplyStyle, the new art style that is about to be applied to the path. - The message must be sent while the old art style is still on the path, so that - the width profiles can be compared. - */ - AIArtStyleHandle newStyle; - - /** For \c #kAdd1Anchor, the coordinates and direction handles of the anchor point about to be added. */ - AIPathSegment newAnchor; - - /** For \c #kSplitPath or \c #kCopyAndResetAnchors, the original path that was used to as the source of anchor points for the new path. */ - AIArtHandle sourcePath; - -}; - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIBeautifulStrokesSuite "AI Beautiful Strokes Suite" -#define kAIBeautifulStrokesSuiteVersion3 AIAPI_VERSION(3) -#define kAIBeautifulStrokesSuiteVersion kAIBeautifulStrokesSuiteVersion3 -#define kAIBeautifulStrokesVersion kAIBeautifulStrokesSuiteVersion - -/** @ingroup DictKeys - Dictionary key for the Beautiful Strokes dictionary inside an \c #AILiveEffectParameters dictionary. - See \c #AILiveEffectSuite. -*/ -#define kAIBeautifulStrokesParamsDictKey "kAIBeautifulStrokesParamsDictKey" - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites - This suite allows you to control advanced features for stroking paths. Setting are - kept in a BeautifulStrokes params dictionary, which is contained in an \c #AILiveEffectParameters - dictionary, such as one returned by \c #AIPathStyleSuite::GetCurrentPathStyle().
- One way to use this suite is to create a BeautifulStrokes params dictionary, - add the stroke settings to the dictionary, then use that dictionary to apply - the settings to source art. This generates new art in a destination group. - For example: - - @code - void Fn(AIArtHandle srcPath, AIArtHandle dstGroup) - { - AIDictionaryRef params = 0; - sAIBeautifulStrokes->CreateParamsDict(NULL, params); - sAIBeautifulStrokes->SetDashAdjustment(params, true); - sAIBeautifulStrokes->GenerateArt(params, srcPath, NULL, TRUE, dstGroup, NULL); - sAIDictionary->Release(params); - } - @endcode - - Counted object note: Suite functions that return counted object types such as - \c #AIDictionarySuite::AIDictionaryRef and \c #AIArraySuite::AIArrayRef increment - the reference count and the caller must release unneeded references to avoid memory - leaks, as shown in the examples. Documentation for individual parameters mentions those - that are reference counted and need to be released. See also \c #AICountedObjectSuite - and the \c ai::Ref C++ class. - - The example above uses the \c #AIDictionarySuite::Release() directly. - The following example uses the \c ai::Ref C++ class to manage the counted - object. (Note that \c #AICountedObjectSuite::Release() is equivalent to - \c #AIDictionarySuite::Release()): - - @code - void Fn_Ref(AILiveEffectParameters effectParams) - { - ai::Ref params; - sAIBeautifulStrokes->CreateParamsDict(NULL, *(params << ai::Replace)); - sAIBeautifulStrokes->SetDashAdjustment(params, true); - sAIBeautifulStrokes->GenerateArt(params, srcPath, NULL, TRUE, dstGroup, NULL); - } - @endcode - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIBeautifulStrokesSuite and \c #kAIBeautifulStrokesVersion. - -*/ - -struct AIBeautifulStrokesSuite -{ - - // General parameter management and stroke generation - - /** Applies settings in a BeautifulStrokes parameters dictionary to the focal stroke on source art - to generate new stroked art in the output group. - - @param effectParams An effect parameters dictionary that contains a BeautifulStrokes params - dictionary in which BeautifulStrokes settings are defined. This can also - be a BeautifulStrokes params dictionary. - @param inArt The art (path) to which the parameters are to be applied. - @param sourceArt [optional] The non-styled art (path) possibly containing width anchors that can be - used to adjust the width profile placement. (See \c #AIBeautifulStrokesSuite::GetPathAdjustedWidthDistances().) - This parameter is ignored if inArt is not styled art (see \c #AIArtSuite::IsArtStyledArt()), - since non-styled art will carry its own anchors. But art dictionaries are stripped - from the input art to live effects. Thus, if \c inArt is the input art to a live effect - execution for a stroke filter, and the art style being executed was attached to a path, - then passing \c sourceArt as the non-styled path art object to which that art style was - attached will allow access to the width anchors. (If there are no vector pre-effects - before the stroke filter, then \c inArt will generally be a duplicate of \c sourceArt, - but if there are vector pre-effects, then it may be substantially different.) - Passing this parameter as null when inArt is styled art will cause any width profile - in the effectParams to be applied without width anchor adjustment. - @param outputOnTop True to place the output art into the output group on top, false to place - it inside the output group on the bottom. - @param outGroup The destination group for the generated output art. - @param outArt [optional] A pointer to an AIArtHandle in which to return the AIArtHandle for the generated output art. - @param progressProc A callback procedure for displaying a progress bar during - computation (from which the user can cancel the operation) - or \c nil to show no progress bar. - */ - AIAPI AIErr (*GenerateArt)(ConstAILiveEffectParameters effectParams, AIArtHandle inArt, AIArtHandle sourceArt, - AIBoolean outputOnTop, AIArtHandle outGroup, AIArtHandle *outArt, AIGenerateArtProgressProc progressProc); - - /** Creates a new BeautifulStrokes params dictionary. You must release the dictionary when no longer needed using - \c #AIDictionarySuite::Release(). - - @param effectParams [optional] A set of LiveEffect parameters. If supplied, the new BeautifulStrokes - params dictionary is added to this dictionary, or, if a BeautifulStrokes dictionary - already exists, \c params is set to this existing dictionary. - @param params A reference to a new or the existing BeautifulStrokes params dictionary. - The reference count on this dictionary is incremented on return and - must be released when no longer needed. - - */ - AIAPI AIErr (*CreateParamsDict)(AILiveEffectParameters effectParams, AIDictionaryRef ¶ms); - - /** Retrieves a BeautifulStrokes parameters dictionary from a set of LiveEffect parameters. - - @param effectParams A set of LiveEffect parameters for an art object. - @param params A reference to the BeautifulStrokes params dictionary or - NULL if one does not exist. The reference count on this - dictionary is incremented on return and must be released - when no longer needed. - - @return No error is returned if the dictionary does not exist. - */ - AIAPI AIErr (*GetParamsDict)(ConstAILiveEffectParameters effectParams, AIDictionaryRef ¶ms); - - /** Reports whether two parameters dictionaries are equivalent. - - @param params1 The first dictionary. - @param params2 The second dictionary. - @return True if equivalent. - */ - AIAPI AIBoolean (*Equiv)(ConstAIDictionaryRef params1, ConstAIDictionaryRef params2); - - /** Accumulates common parameters in a dictionary to be used later with \c #ApplyParams(). - Call repeatedly with different parameter sets to collect the combined BeautifulStrokes - attributes of multiple objects (or multiple art styles). You can use this to collect - common attributes of objects that are not necessarily selected, or to ignore some of - the selected objects, such as finding the combined BeautifulStrokes attributes of - all the objects on a layer, whether they are selected or not. - - @param effectParams A set of LiveEffect parameters containing a Beautiful Strokes params dictionary. - @param accumulator Common parameters being accumulated. - */ - AIAPI AIErr (*AccumulateParams)(ConstAILiveEffectParameters effectParams, AIDictionaryRef accumulator); - - /** Applies a set of parameters from one dictionary to another. For keys that exist in both dictionaries, - the value from the source overwrites the value in the destination. - - @param params The source dictionary containing a set of parameters to be applied. - Typically obtained from \c #AIPathStyleSuite::GetCurrentPathStyle(), from an art object or art style. - If an accumulated dictionary is passed as the source, values that vary (were mixed in the selection) - do not change value in the target dictionary. This is consistent with the behavior of - \c #AIPathStyleSuite::SetCurrentPathStyle(). See also \c #AccumulateParams(). - @param target The target dictionary. - */ - AIAPI AIErr (*ApplyParams)(ConstAIDictionaryRef params, AIDictionaryRef target); - - /** Reports whether a dictionary contains meaningful Beautiful Strokes parameters. - (Note that this function returns a Boolean value, not an error code.) - Call on an accumulator to check whether it contains any BeautifulStrokes parameters; - if not, it can be freed or ignored. See \c #AccumulateParams(). - Both a used accumulator and a new dictionary contain some bookkeeping entries, so you cannot just - check for the dictionary being empty of all keys. A new dictionary just created by - \c #CreateParamsDict() returns false to this call.
- - This does not recurse into sub-dictionaries. To test for nested dictionaries, - call \c #GetParamsDict(), and if it is non-null check the contained dictionary. - - @param paramsDict Dictionary to be examined. - @return True if the dictionary contains Beautiful Strokes parameters. - */ - AIAPI AIBoolean (*ContainsParams)(ConstAIDictionaryRef paramsDict); - - /** Retrieves the BeautifulStrokes params dictionary, if any, associated with the focal stroke of an art object. Optionally - retrieves the stroke style and other information about the stroke attributes. - - @param art The art object. - @param paramDict [out] A reference in which to return the BeautifulStrokes params dictionary, or null if none. - The reference count on this dictionary is incremented on return and must be released when - no longer needed. - @param strokeStyle [out][optional] A buffer in which to return the focal stroke style from the paint attributes. - @param hasBrush [out][optional] A buffer in which to return true if the focal stroke carries a brush effect. - @param scaleFactor [out][optional] A buffer in which to return the combined scale factor that incorporates: - the object scale factor reported by \c #AIArtStyleSuite::GetArtStyleScaleFactor(), - the width of the art design on art brushes or the side tile on pattern brushes, - and the scale factor from the brush options for brushes.
- Multiplying these widths by this factor gives the width that the stroke edges - preview at, assuming that any brush art fills the brush tile boundaries.
- (Does not include the stroke weight or the width returned by \c #GetWidthsAtDistance(), and so on.) - @param canAccept [out][optional] A buffer in which to return true if the art object has a style that can accept - BeautifulStrokes parameters. - (For CS5, it has a stroke, and the focal stroke is not a Calligraphic or Scatter brush, and is - not inside/outside aligned.) - */ - AIAPI AIErr (*GetArtStrokeParams)(AIArtHandle art, AIDictionaryRef ¶mDict, - AIStrokeStyle *strokeStyle, AIBoolean *hasBrush, - AIReal *scaleFactor, AIBoolean *canAccept); - - /** Interpolates beautiful stroke parameters between two appearances. - - @param effectParams1 [optional] The effects parameters dictionary of a stroke filter, - which may (or may not) contain a Beautiful Strokes params dictionary. - @param effectParams2 [optional] The effects parameters dictionary of a stroke filter - which may (or may not) contain a Beautiful Strokes params dictionary. - @param effectParamsOut The effects parameters dictionary of a stroke filter that represents the results - of interpolating between effectParams1 and effectParams2. - @param dist A number in the range [0-1], where 0 is interpreted as matching effectParams1, - and 1 is interpreted as matching effectParams2. (Negative values are interpreted - as if they were 0, and values greater than 1 as if they were 1.) - - If either effectParams1 or effectParams2 contains a Beautiful Strokes parameter dictionary, then those parameters - will be interpolated, and the results placed in effectParamsOut (which should not be null if either input parameter - is null.) - */ - AIAPI AIErr (*InterpolateParams)(ConstAILiveEffectParameters effectParams1, ConstAILiveEffectParameters effectParams2, - AILiveEffectParameters effectParamsOut, AIReal dist); - - // General brush settings - - /** Sets the option in a Beautiful Strokes dictionary to flip art across path to reverse vertical orientation. - - @param params The parameters dictionary. - @param flipAcross True to set the option, false to clear it. - */ - AIAPI AIErr (*SetFlipAcross)(AIDictionaryRef params, AIBoolean flipAcross); - - /** Retrieves the option from a Beautiful Strokes dictionary to flip art across path to reverse vertical orientation. - Note that this function returns a Boolean value, not an error code. - - @param params The parameters dictionary. - @return True if the option is set, false if it is clear. - */ - AIAPI AIBoolean (*GetFlipAcross)(ConstAIDictionaryRef params); - - /** Sets the option in a Beautiful Strokes dictionary to flip art along path to reverse lateral orientation. - - @param params The parameters dictionary. - @param flipAlong True to set the option, false to clear it. - */ - AIAPI AIErr (*SetFlipAlong)(AIDictionaryRef params, AIBoolean flipAlong); - - /** Retrieves the option from a Beautiful Strokes dictionary to flip art along path to reverse lateral orientation. - Note that this function returns a Boolean value, not an error code. - - @param params The parameters dictionary. - @return True if the option is set, false if it is clear. - */ - AIAPI AIBoolean (*GetFlipAlong)(ConstAIDictionaryRef params); - - /** Sets the scale (width) of art applied to path in a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param scale Single scale for art not using tablet data. - @param mnScale [optional] Minimum scale for art using tablet data. - @param mxScale [optional] Maximum scale for art using tablet data. - */ - AIAPI AIErr (*SetScale)(AIDictionaryRef params, AIReal scale, const AIReal *mnScale, const AIReal *mxScale); - - /** Retrieves the scale (width) of art applied to path from a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param scale [out] A reference in which to return the single scale for art not using tablet data. - @param mnScale [optional] [out] A buffer in which to return the minimum scale for art using tablet data. - @param mxScale [optional] [out] A buffer in which to return the maximum scale for art using tablet data. - */ - AIAPI AIErr (*GetScale)(ConstAIDictionaryRef params, AIReal &scale, AIReal *mnScale, AIReal *mxScale); - - /** Set fold adjustment on or off. This adjusts the brush folding across corners or bends. - */ - AIAPI AIErr (*SetFoldAdjustment)(AIDictionaryRef params, AIBoolean adjust); - - /** Retrieves the fold adjustment status from a Beautiful Strokes dictionary. - This adjusts the folding across corners or bends. - Note that this function returns a Boolean value, not an error code. - - @param params The parameters dictionary. - @param mixed [optional] [out] A buffer in which to return true if the dictionary represents an accumulation - returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed. - By convention, mixed values return false. - @return True if the option is set, false if it is clear. - */ - AIAPI AIBoolean (*GetFoldAdjustment)(ConstAIDictionaryRef params, AIBoolean *mixed); - - // Art Brushes - - /** Sets the pattern to be applied along path in a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param art The brush pattern. - */ - AIAPI AIErr (*SetArtPaint)(AIDictionaryRef params, AIPatternHandle art); - - /** Retrieves the pattern to be applied along path from a Beautiful Strokes dictionary. - Note that this function returns an object, not an error code. - - @param params The parameters dictionary. - @return The brush pattern. - */ - AIAPI AIPatternHandle (*GetArtPaint)(ConstAIDictionaryRef params); - - /** Sets the stretching option in a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param stretch True to stretch tiles non-uniformly along the path, false to scale - up uniformly for the path length. - */ - AIAPI AIErr (*SetStretch)(AIDictionaryRef params, AIBoolean stretch); - - /** Retrieves the stretching option from a Beautiful Strokes dictionary. - Note that this function returns a Boolean value, not an error code. - - @param params The parameters dictionary. - @return True if the option is set (stretch tiles non-uniformly along the path), - false if it is clear (scale up uniformly for the path length). - */ - AIAPI AIBoolean (*GetStretch)(ConstAIDictionaryRef params); - - /** Sets the lengths of non-stretching start and end segments for a segmented brush in a Beautiful Strokes dictionary. - Lengths are expressed as absolute values in document points. If both values are zero, the brush is a non-segmented brush. - - @param params The parameters dictionary. - @param startSegmentLength Length of start segment. - @param endSegmentLength Length of end segment. - */ - AIAPI AIErr (*SetStartEndSegmentLength)(AIDictionaryRef params, AIReal startSegmentLength, AIReal endSegmentLength); - - /** Retrieves the lengths of non-stretching start and end segments for a segmented brush from a Beautiful Strokes dictionary. - Lengths are expressed as absolute values in document points. - - @param params The parameters dictionary. - @param startSegmentLength [out] A reference in which to return the start-segment length. - @param endSegmentLength [out] A reference in which to return the end-segment length. - */ - AIAPI AIErr (*GetStartEndSegmentLength)(ConstAIDictionaryRef params, AIReal &startSegmentLength, AIReal &endSegmentLength); - - // Pattern Brushes - - /** Sets options for repeating pattern tiles along a path in a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param beginArt Brush pattern tile art to be applied to the beginning of the path. May be NULL. - @param endArt Brush pattern tile art to be applied to the end of the path. May be NULL. - @param sideArt Brush pattern tile art to be applied to the main part of the path. May be NULL. - @param insideCornerArt Brush pattern tile art to be applied to inside corners of the path. May be NULL. - @param outsideCornerArt Brush pattern tile art to be applied to outside corners of the path. May be NULL. - @param adjustment Method to use to apply art along path; see \c #RepeatedArtAdjustment(). - @param spacing Relative spacing between tiles; for example, 0.5 sets spacing to half - the width of the tile. Relevant only when adjustment method is \c #kAddSpace. - @param insideAutoCornerOption Method to use to generate insideCornerArt automatically; see \c #RepeatedArtCorner(). - @param outsideAutoCornerOption Method to use to generate outsideCornerArt automatically; see \c #RepeatedArtCorner(). - */ - AIAPI AIErr (*SetArtPatternPaint)(AIDictionaryRef params, AIPatternHandle beginArt, AIPatternHandle endArt, - AIPatternHandle sideArt, - AIPatternHandle insideCornerArt, AIPatternHandle outsideCornerArt, - RepeatedArtAdjustment adjustment, AIReal spacing, - RepeatedArtCorner insideAutoCornerOption, RepeatedArtCorner outsideAutoCornerOption); - - /** Retrieves options for repeating pattern tiles along a path from a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param beginArt [out] A reference in which to return the brush pattern tile art to be - applied to the beginning of the path. May be NULL. - @param endArt [out] A reference in which to return the brush pattern tile art to be - applied to the end of the path. May be NULL. - @param sideArt [out] A reference in which to return the brush pattern tile art to be - applied to the main part of the path. May be NULL. - @param insideCornerArt [out] A reference in which to return the brush pattern tile art - to be applied to inside corners of the path. May be NULL. - @param outsideCornerArt [out] A reference in which to return the brush pattern tile art - to be applied to outside corners of the path. May be NULL. - @param adjustment [out] A reference in which to return the method to use to apply art along path; - see \c #RepeatedArtAdjustment(). - @param spacing [out] A reference in which to return the relative spacing between tiles. - For example, 0.5 sets spacing to half the width of the tile. - Relevant only when adjustment method is \c #kAddSpace. - @param insideAutoCornerOption [out] A reference in which to return the type of Automatically Generated Corner - to be used for Inside Corner. - see \c #RepeatedArtCorner(). - @param outsideAutoCornerOption [out] A reference in which to return the type of Automatically Generated Corner - to be used for Outside Corner. - see \c #RepeatedArtCorner(). - */ - AIAPI AIErr (*GetArtPatternPaint)(ConstAIDictionaryRef params, AIPatternHandle &beginArt, AIPatternHandle &endArt, - AIPatternHandle &sideArt, - AIPatternHandle &insideCornerArt, AIPatternHandle &outsideCornerArt, - RepeatedArtAdjustment &adjustment, AIReal &spacing, - RepeatedArtCorner &insideAutoCornerOption, RepeatedArtCorner &outsideAutoCornerOption); - - // Dashing - - /** Sets or clears the dash adjustment option in a Beautiful Strokes dictionary. - When on, adjusts dashes so a certain fraction of the dash length always appears - at the ends, corners, and intersections of dashed lines. - (Note that dash/gap intervals are obtained from the art.) - - @param params The parameters dictionary. - @param adjust True to set the option, false to clear it. - */ - AIAPI AIErr (*SetDashAdjustment)(AIDictionaryRef params, AIBoolean adjust); - - /** Retrieves the dash adjustment status from a Beautiful Strokes dictionary. - See \c #SetDashAdjustment(). - (Note that this function returns a Boolean value, not an error code.) - - @param params The parameters dictionary. - @param mixed [optional] [out] A buffer in which to return true if the dictionary represents an accumulation - returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed. - By convention, mixed values return false. - @return True if the option is set, false if it is clear. - */ - AIAPI AIBoolean (*GetDashAdjustment)(ConstAIDictionaryRef params, AIBoolean *mixed); - - // Gradient Stroke - - /** Sets the gradient stroke application method. This determines how the - current stroke color, if a gradient, will be applied to the stroke. - Not applicable to some objects such as art brushes, etc. - - @param params The parameters dictionary. - @param type The type of gradient stroke application. Pass kGradientStroke_dummy - to clear the corresponding dictionary entry. - */ - AIAPI AIErr (*SetGradientStrokeApplication)(AIDictionaryRef params, GradientStrokeApplication application); - - /** Retrieves the gradient stroke application method status from a - Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param type The type of gradient stroke application. - @param mixed [optional] [out] A buffer in which to return true if the dictionary represents an accumulation - returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed. - By convention, mixed values return false. - */ - AIAPI AIErr (*GetGradientStrokeApplication)(ConstAIDictionaryRef params, GradientStrokeApplication &application, AIBoolean *mixed); - - // Arrowheads - - /** Sets arrowhead-related stroke options in a Beautiful Strokes dictionary. - The arrowhead symbols can be in a library rather than the current document. If so, they are retargeted to the - document that the params dictionary is attached to, and placed in the "hidden symbols" of that document; - that is, they do not appear in the Symbols panel. The symbols are parsed to determine the alignment - parameters and the default scale. - - Any unpainted closed rectangle in the back of the symbol definition is ignored and stripped from - the art that is used to determine the "tip" of the arrow and placed on the path. These unpainted - rectangles are assumed to be only for the purpose of making the symbol thumbnails a uniform size. - - Arrowhead art inside the symbol is assumed to be positioned the way it would be when applied as an - end arrow to a horizontal open path that started at the left and ended at the right. - If applied as a start arrow, it is reflected horizontally before it is applied. - - If there is a stroked open straight line in the back of the symbol definition (either above or below - the bounding rectangle if there is one), then the right endpoint of that line is used to specify the - truncation point. If it additionally has an internal anchor point, the furthest right such anchor point - is used to specify the attachment point, otherwise the attachment point is the same as the truncation point. - - The tip is treated as the point along the right edge of the bounding box (after removing the bounding tile, - if any) which is at the same height as the positioning line. The stroke weight of the positioning line - is used to determine the default scale of the arrowhead. For example, if the positioning stroke is 2 pts, then - the arrowhead is scaled 50% when it is applied to a path with a 1 pt stroke, and scaled 150% when it - is applied to a path with a 3 pt stroke. The begin-scale or end-scale factors are applied additionally. - - If there is no positioning line, the default is to use a 100% default scale; that is, to treat the symbol - as if it were scaled appropriately for a 1 pt line, and to put both the attachment and truncation points - in the center of the symbol. - - @param params The parameters dictionary. - @param beginSymbol A pointer to the symbol to apply as the arrowhead at the beginning of the path. - To not change the existing settings, pass null. To remove the arrowhead, - pass a pointer to null. - @param endSymbol The symbol to apply as the arrowhead at the end of the path, null if none - To not change the existing settings, pass null. To remove the arrowhead, - pass a pointer to null. - @param beginScale The factor by which to scale the begin arrow by, as a percentage relative - to the default scale. To not change the existing settings, pass \c #kAIRealUnknown. - @param endScale The factor by which to scale the end arrow by, as a percentage relative - to the default scale. To not change the existing settings, pass \c #kAIRealUnknown. - @param alignment The rule for positioning the arrows at the ends of the path. - To not change the existing settings, pass \c #kUnknownArrowAlignment. - */ - AIAPI AIErr (*SetArrowheadOptions)(AIDictionaryRef params, AIPatternHandle *beginSymbol, AIPatternHandle *endSymbol, - AIReal beginScale, AIReal endScale, ArrowTipAlignment alignment); - - /** Retrieves arrowhead-related stroke options from a Beautiful Strokes dictionary. - All pointer arguments are optional and may be null if those options are not being queried. - - @param params The parameters dictionary to be searched. May be an accumulation of multiple paths, if - returned from \c #AIPathStyleSuite::GetCurrentPathStyle(). - @param beginSymbol [out] A buffer in which to return the symbol used as the arrowhead at the beginning of the path, null if none. - @param endSymbol [out] A buffer in which to return the symbol used as the arrowhead at the end of the path, null if none. - @param beginScale [out] A buffer in which to return the factor to uniformly scale the begin arrow by, as a percentage relative to the default scale. - Returns \c #kAIRealUnknown if the params dict represents an accumulation with mixed values. - @param endScale [out] A buffer in which to return the factor to scale the end arrow by, as a percentage relative to the default scale - Returns \c #kAIRealUnknown if the params dict represents an accumulation with mixed values. - @param alignment [out] A buffer in which to return the rule for positioning the arrows at the ends of the path. Must be the same for both ends. - Returns \c #kUnknownArrowAlignment if the params dict represents an accumulation - and the selection is mixed (including if some paths have no arrowheads). - @param mixedBeginArrows [out] A buffer in which to return true if there are different choices for the begin-symbol in a mixed selection - (including if some paths have no begin arrow and some do.) - @param mixedEndArrows [out] A buffer in which to return true if there are different choices for the end-symbol in a mixed selection - (including if some paths have no begin arrow and some do.) - */ - AIAPI AIErr (*GetArrowheadOptions)(ConstAIDictionaryRef params, AIPatternHandle *beginSymbol, AIPatternHandle *endSymbol, - AIReal *beginScale, AIReal *endScale, ArrowTipAlignment *alignment, - AIBoolean *mixedBeginArrows, AIBoolean *mixedEndArrows); - - // Variable Widths - - /** Sets the source of stroke width in a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param source Source of width information for stroke. If \c #kTabletData, set related values - with \c #SetWidthTabletDataSource() and \c and #SetScale(), particularly minimum and maximum.
- If \c #kUserProfile, call \c #SetCenteredWidthProfile() to set centered width values or - \c #SetUncenteredWidthProfile() to set independent left and right width values. - */ - AIAPI AIErr (*SetWidthSource)(AIDictionaryRef params, StrokeWidthSource source); - - /** Retrieves the source of stroke width from a Beautiful Strokes dictionary. - (Note that this function returns a constant value, not an error code.) - - @param params The parameters dictionary. - @return The width source constant. - */ - AIAPI StrokeWidthSource (*GetWidthSource)(ConstAIDictionaryRef params); - - /** Sets the type of tablet data to use for stroke width in the art passed to \c #GenerateArt(), - in a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param dataType The type of tablet data. - @see \c #AITabletDataType - */ - AIAPI AIErr (*SetWidthTabletDataSource)(AIDictionaryRef params, AITabletDataType dataType); - - /** Retrieves the tablet-data type option from a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param dataType The type of tablet data to use for stroke width in the art passed to \c #GenerateArt(). - @see \c #AITabletDataType - */ - AIAPI AIErr (*GetWidthTabletDataSource)(ConstAIDictionaryRef params, AITabletDataType &dataType); - - /** Sets centered width profile for output art in a Beautiful Strokes dictionary. Pass NULL for both arrays to clear the profile. - A style cannot carry both an uncentered and centered width profile, so if there is an existing - centered width profile, this function removes it. - - Other than length, the array values are not examined for validity at the time they are set. - Instead, they are examined when used, and any invalid entries are ignored. - A width profile in which all the array entries are used to form the stroke contour - has the following properties: -
  • The first distance is 0
  • -
  • The last distance is 1
  • -
  • Every distance value should be no less than the previous distance, and no more than the next one
  • -
  • There should be no more than two consecutive distance values at the same distance
- When interpreting the width profile: -
  • If the first distance value is not zero, the function acts as if there was an additional value - at the beginning of both arrays, with the distance being zero and the width being whatever - the width is in the first entry in the widths array.
  • -
  • If any distance value is more than 1, or less than the preceding distance value, or equal - to both the preceding distance value and the following distance value, the function ignores - the array entries at that index
  • -
  • If the last distance value is not 1, the function acts as if there were an additional pair of - entries with the distance equal to 1, and the width equal to the width at the last valid - distance entry
  • -
  • Negative values are interpreted as if they were 0. Values greater than 1 are allowed, but cause - the stroke to be wider at those places than the width shown in the Stroke panel, so should be avoided. - - Note that this differs from the interpretation of widths in the functions such as \c #SetCenteredWidthAtDistance() - that take a path object and query or modify the width at specific offsets; these incorporate the stroke weight scaling. - This is because the functions that manage entire width arrays may be dealing with profiles that are shared across multiple - paths of different weights or belong to unattached preset dictionaries.
- - @param params The parameters dictionary. - @param tVals An array of \c AIReal values ranging from [0-1] representing fractional distances - along the path. - @param widths An array of \c AIReal values the same size as \c tVals representing the fractional stroke width - at the corresponding offset in the \c tVals array. Values are fractions of the stroke weight - as shown in the Stroke panel, in the range [0-1]. - @return The error \c #kBadParameterErr if the arrays are of different lengths, or if one is null and the other is not. - */ - AIAPI AIErr (*SetCenteredWidthProfile)(AIDictionaryRef params, AIArrayRef tVals, AIArrayRef widths); - - /** Retrieves the centered width profile for output art from a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param distances A reference in which to return an array of \c AIReal values ranging from [0-1] representing fractional distances - along the path. - @param widths A reference in which to return an array of \c AIReal values the same size as \c tVals representing the fractional stroke width - at the corresponding offset in the \c tVals array. - */ - AIAPI AIErr (*GetCenteredWidthProfile)(ConstAIDictionaryRef params, AIArrayRef &distances, AIArrayRef &widths); - - /** Sets an uncentered width profile for output art in a Beautiful Strokes dictionary, with independent - left and right width values. Left and right are interpreted by following the path - from the start point to the end point. - A path cannot carry both an uncentered and centered width profile, so if there is an existing - centered width profile, this function removes it. - - @param params The parameters dictionary. - @param tVals An array of \c AIReal values ranging from [0-1] representing fractional distances - along the path. - @param leftWidths An array of \c AIReal the same size as \c tVals representing the width of the left side - of the stroke at corresponding distances in \c tVals. - @param rightWidths An array of \c AIReal the same size as \c tVals representing the width of the right side - of the stroke at corresponding distances in \c tVals. - */ - AIAPI AIErr (*SetUncenteredWidthProfile)(AIDictionaryRef params, AIArrayRef tVals, AIArrayRef leftWidths, AIArrayRef rightWidths); - - /** Retrieves the uncentered width profile for output art from a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param tVals A reference in which to return an array of \c AIReal values ranging from [0-1] representing fractional distances - along the path. - The reference count on this array is incremented on return and must be released when no longer needed. - @param leftWidths A reference in which to return an array of \c AIReal the same size as \c tVals representing the width of the left side - of the stroke at corresponding distances in \c tVals. - The reference count on this array is incremented on return and must be released when no longer needed. - @param rightWidths A reference in which to return an array of \c AIReal the same size as \c tVals representing the width of the right side - of the stroke at corresponding distances in \c tVals. - The reference count on this array is incremented on return and must be released when no longer needed. - */ - AIAPI AIErr (*GetUncenteredWidthProfile)(ConstAIDictionaryRef params, AIArrayRef &tVals, AIArrayRef &leftWidths, AIArrayRef &rightWidths); - - /** INTENDED FOR FUTURE ENHANCEMENTS - All non-default options are currently ignored. - Can only be called after setting the width profile with \c #SetCenteredWidthProfile() or \c #SetUncenteredWidthProfile(). - If not present (the usual case), all width markers use default options, which are dependent upon the context. All arrays can be null. - The defaults are for markers that are concurrent with corner anchor points of the path to be treated as - tethered corner width markers, and for all other markers to be untethered smooth markers, with the - default smoothness values. - - To save space, there is a single array of marker options for both centered and uncentered width profiles, - with different flag values to distinguish when the options are different for the left and right sides - of the stroke (for example, if it is smooth on the left side but cornered on the right.) - If an incoming smoothness array exists but the outgoing smoothness array does not exist on that side - of the path, then the outgoing smoothness is inherited from the incoming smoothness. - Similarly, if the left smoothness array(s) exist but the right smoothness arrays do not, then - the right smoothness is inherited from the left smoothness. - - You must only call this function AFTER either \c #SetCenteredWidthProfile() or \c #SetUncenteredWidthProfile(); - it returns /c #kBadParameterErr if any of the arrays are non-null and either there is no width profile, - or the existing width profile has a different number of markers than the size of the detail arrays. - No validation is done on the contents of the arrays, other than their lengths. - - @param params The parameters dictionary. - @param markerOptions An array of integers parallel to the t values, interpreted as a bit vector - of WidthMarkerFlagValues - @param incomingLeftSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, - ranging from minimally smooth at 0 to maximally smooth at 1. - @param outgoingLeftSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, - ranging from minimally smooth at 0 to maximally smooth at 1. - @param incomingRightSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, - ranging from minimally smooth at 0 to maximally smooth at 1. - @param outgoingRightSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, - ranging from minimally smooth at 0 to maximally smooth at 1. - @return The error \c #kBadParameterErr if any of the arrays are non-null - and either there is no width profile, or the existing width profile - has a different number of markers than the size of the detail arrays. - */ - AIAPI AIErr (*SetWidthProfileDetails)(AIDictionaryRef params, AIArrayRef markerOptions, - AIArrayRef incomingLeftSmoothness, AIArrayRef outgoingLeftSmoothness, - AIArrayRef incomingRightSmoothness, AIArrayRef outgoingRightSmoothness); - - /** Retrieves the options for the width profile markers from a Beautiful Strokes dictionary. - - @param params The parameters dictionary. - @param markerOptions A reference in which to return an array of integers parallel to the t values, interpreted as a bit vector of \c #WidthMarkerFlagValues. - The reference count on this array is incremented on return and must be released when no longer needed. - @param incomingLeftSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. - The reference count on this array is incremented on return and must be released when no longer needed. - @param outgoingLeftSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. - The reference count on this array is incremented on return and must be released when no longer needed. - @param incomingRightSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. - The reference count on this array is incremented on return and must be released when no longer needed. - @param outgoingRightSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. - The reference count on this array is incremented on return and must be released when no longer needed. - */ - AIAPI AIErr (*GetWidthProfileDetails)(ConstAIDictionaryRef params, AIArrayRef &markerOptions, - AIArrayRef &incomingLeftSmoothness, AIArrayRef &outgoingLeftSmoothness, - AIArrayRef &incomingRightSmoothness, AIArrayRef &outgoingRightSmoothness); - - /** If a path has variable widths (either centered or uncentered), retrieves a vector of the values - from the distance array, after adjustment to shift any anchored width points to the relative - distance along that path of the path positions they are anchored to. -
  • If the path has no variable widths, the returned vector is empty.
  • -
  • If the path has variable widths but no width profile anchors, the returned vector contains - the same distance values that are in the distance array returned - by \c #GetCenteredWidthProfile() or \c #GetUncenteredWidthProfile().
- - @param path The path. - @param adjustedDistances A reference in which to return the result vector. The reference - count on this array is incremented on return and must be released - when no longer needed. - */ - AIAPI AIErr (*GetPathAdjustedWidthDistances)(AIArtHandle path, AIArrayRef &adjustedDistances); - - /** Retrieves the left, right, and combined widths of the focal stroke at a fraction of the distance along a path, - and reports the source of the widths. - The widths are analogous to the stroke weights as returned by the \c #AIArtStyleSuite::GetPaintAttributes(). - As such, they include the stroke weight scaling, but do not include the impact of pattern or art brush - scale options or pattern or art brush tile sizes. - - @param path [in] The path to be examined for width data. - @param lengthFraction [in/out] Upon input, the fraction of the path length at which the width is being queried. - Upon output, if the width source is \c #kCenteredProfileMark or \c #kUncenteredProfileMark, the - possibly snapped position of that mark. To find whether snapping has occurred, - cache the original length fraction and compare it to the returned value. - @param tolerance [in] If positive and the path has a user-specified variable width profile, - and the input length fraction is within this tolerance of one of the t values in the - width array, then the length fraction is snapped to that t value. If zero - or negative, a tolerance of .001 is used. - @param totalWidth [out][optional] A buffer in which to return the total width at the given position, - as obtained from the width source. - @param leftWidth [out][optional] A buffer in which to return the stroke width on the left side of the path - at the given position, as obtained from the width source. - @param rightWidth [out][optional] A buffer in which to return the stroke width on the right side of the path - at the given position, as obtained from the width source. - @param widthSource [out][optional] A buffer in which to return the width-source constant. It will be one of kConstantWidth, kTabletData, - kCenteredProfileMark, kUncenteredProfileMark, kCenteredProfileInterpolation, kUncenteredProfileInterpolation. - @param markerIndex [out][optional] A buffer in which to return the marker index. If width source is from a centered - or uncentered profile, the index into the parallel t and width arrays of the marker. - For \c #kCenteredProfileMark and \c #kUncenteredProfileMark, - it is the index of the marker at that location; for \c #kCenteredProfileInterpolation and - \c #kUncenteredProfileInterpolation, it is the index of the preceding marker. - @param markerDetails [in/out][optional] On input, the only meaningful flag values are \c #kIncomingWidthMarker and - \c #kOutgoingWidthMarker. These specify which of the two markers should be returned in - the event that there are two markers at exactly the input length fraction. (If snapping - occurs, then the flags are ignored; the incoming marker is returned when - it snaps upward, and the outgoing when it snaps downward.) If null - or if neither or both of those flags are on, and there are two markers - at exactly the input length fraction, then the larger of the two is returned. - On output, if width source is \c #kCenteredProfileMark or \c #kUncenteredProfileMark, can - contain one of \c #kIncomingWidthMarker or \c #kOutgoingWidthMarker, and/or \c #kCornerWidthMarker. - */ - AIAPI AIErr (*GetWidthsAtDistance)(AIArtHandle path, AIReal &lengthFraction, AIReal tolerance, - AIReal *totalWidth, AIReal *leftWidth, AIReal *rightWidth, - StrokeWidthSource *widthSource, ai::int16 *markerIndex, WidthMarkerFlags *markerDetails); - - /** Sets the total width of the focal stroke at a given fraction of the distance along the path. (If lengthFraction is within - 0.001 of an existing t value in the width profile, modifies the existing width at that t value rather than - inserting a new one.) -
  • If there is already a centered width profile, inserts the indicated value into it.
  • -
  • If there is already an uncentered profile, this is equivalent to setting the left and right widths to half the input width.
  • -
  • If there is not yet any user specified width profile, creates a centered width profile from the current stroke source - and then modifies it and sets the stroke-width source to \c #kUserProfile.
- - @param path The path. - @param lengthFraction A fraction of the distance along the path at which to set the width. If within 0.001 of an existing t value - in the width profile, modifies the existing width at that t value rather than inserting a new one. - @param width The new width. - @param options A logical OR of bit flags that determine how to perform the operation. - */ - AIAPI AIErr (*SetCenteredWidthAtDistance)(AIArtHandle path, AIReal lengthFraction, AIReal width, WidthMarkerFlags options); - - /** Sets the left and right widths of the focal stroke at a given fraction of the distance along the given path. (If lengthFraction - is within 0.001 of an existing t value in the width profile, modifies the existing width at that t value - rather than inserting a new one.) -
  • If there is already an uncentered width profile, it inserts the indicated values into it.
  • -
  • If left and right widths are equal and there is already a centered width profile, inserts their sum into it.
  • -
  • If left and right widths are unequal and there is not yet an uncentered width profile, or if they are equal - and there is not yet any width profile, it creates one from the current stroke source and then modifies it - and sets the stroke-width source to \c #kUserProfile.
- - @param path The path. - @param lengthFraction A fraction of the distance along the path at which to set the width. If within 0.001 of an existing t value - in the width profile, modifies the existing width at that t value rather than inserting a new one. - @param leftWidth The new left width. - @param rightWidth The new right width. - @param options A logical OR of bit flags that determine how to perform the operation. - */ - AIAPI AIErr (*SetUncenteredWidthsAtDistance)(AIArtHandle path, AIReal lengthFraction, - AIReal leftWidth, AIReal rightWidth, WidthMarkerFlags options); - - /** Moves the width marker at the given index to a new t value. If the given marker is incoming-only or - outgoing-only due to two markers being at the same t value, both are moved together. - Only the content of the tValue array changes, so this works for either centered or non-centered widths. - - @param path The path. - @param markerIndex The 0-based index position of the marker to move. - @param newTValue [in, out] Fraction of length along whole path to which the marker should be moved. - In the range [0-1]. - @param options A logical OR of bit flags that determine how to perform the operation: -
  • If \c #kCopyMarker is on, the marker is duplicated and the new copy moved, while the old - one remains at the prior location. There must always be a marker at 0 and one at 1, - so any movement of the first or last marker is implicitly a duplication even if this flag is off.
  • -
  • If \c #kSpreadWidthChanges is on, the other markers on the side that this marker is moving - away from are spread out proportionally to cover the larger distance, and the other markers - on the side that this marker is moving towards are compressed proportionally to fit in the - smaller distance. The scope of the spreading is limited by the selection state and corner - status of the adjacent anchor points.
  • -
  • If \c #kSpreadWidthChanges is off and \c #kLimitAtNeighbors is on, and there is another width marker - between the current t value at the given index and the new t value, then the marker stops - when it hits the adjacent marker. No error code is returned in this case, but \c newTValue - is updated to the actual destination. To determine whether it stopped, cache the original - value and compare with the returned value. - (Note that this causes the two markers at the same location to become an incoming-only - outgoing only pair where the width may jump discontinuously.)
  • -
  • If \c #kSpreadWidthChanges and \c #kLimitAtNeighbors are both off, then the moved marker is allowed - to jump past other markers as if they were not there.
  • -
- @return The error \c #kBadParameterErr if the path does not have a user width profile or - if the new t value is not in the range [0-1]. - */ - AIAPI AIErr (*SlideWidthMarkerToNewT)(AIArtHandle path, ai::int16 markerIndex, AIReal &newTValue, WidthMarkerFlags options); - - /** Deletes the width point at the given index position from the given path. The first and last width points cannot be deleted. - - @param path The path. - @param markerIndex The index position of the point to delete. - */ - AIAPI AIErr (*DeleteWidthPoint)(AIArtHandle path, ai::int16 markerIndex); - - /** Adds, removes, or reindexes width profile anchors as needed before editing a path. - An editing tool or command calls this before modifying the geometry of a path - or applying a different art style. - - Modifies anchors at a subset of the same places that cause \c #kSelectorAINotifyEdits - to be sent to plug-in groups ancestral to the edited path. It is not necessary to send this message - if the path is being transformed in its entirety in a way that does not change the relative lengths - of path segments. - - If width anchors already exist at the relevant anchor points, and the numbers of anchor points are - not changing, does nothing. - - @param path The path to be edited. - @param editDescription The type of edit to be done. - */ - AIAPI AIErr (*AdjustWidthAnchorsBeforePathEdit)(AIArtHandle path, const PathEditDescription &editDescription); - - /** Tests whether a cursor point on a path is within a given tolerance of the region covered by the stroke, and if - so, reports additional details about what part of the stroke was hit; see \c #StrokeHitResults. - For brush strokes, the entire region within the brush design's tile box is considered to be stroked. - - @param path The path. - @param cursor The cursor point. - @param tolerance The tolerance value. - @param hitResults A buffer in which to return the result. - */ - AIAPI AIErr (*StrokeHitTest)(AIArtHandle path, const AIRealPoint &cursor, AIReal tolerance, StrokeHitResults *hitResults); - -}; - -#include "AIHeaderEnd.h" -#endif +#ifndef __AIBeautifulStrokes__ +#define __AIBeautifulStrokes__ + +/* +* Date: Started 2009 +* Purpose: Adobe Illustrator Beautiful Strokes suite. This suite lets +* clients control effects that can be applied to strokes such as +* art and pattern brushes, arrowheads, and dash adjustments. +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2009 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +#include "AITypes.h" +#include "AIEntry.h" +#include "AILiveEffect.h" +#include "AITabletData.h" +#include "AIPath.h" +#include "AIHeaderBegin.h" + +/******************************************************************************* +** +** Types +** +**/ + +/** Constants for \c #AIBeautifulStrokesSuite::SetArtPatternPaint() and + /c #AIBeautifulStrokesSuite::GetArtPatternPaint() that determine how to + apply art along a path. +*/ +enum RepeatedArtAdjustment +{ + /// Stretch art to fit path + kStretch, + /// Add space between art to fit path + kAddSpace, + /// Adjust length of path to fit art + kAdjustPath, + + /// Special return value to indicate mixed values when the params dict represents an + /// accumulation of the values from multiple objects, such as returned by + /// \c #AIPathStyleSuite::GetCurrentPathStyle(). + /// Passing this in as a value to "set" in a params dictionary means that the + /// existing value, if any, should not change. + kUnknownRepeatedArtAdjustment = 0xFFFFFFFF, + + /// Dummy value to ensure 32-bit enum value size. + RepeatedArtAdjustment_dummy = 0xFFFFFFFF +}; + +enum RepeatedArtCorner { + + /// For not using an Auto Generated Corner + kNoCorner, + + /// Creates a corner centered around the border/side tile + kAutoCentered, + + /// Creates a corner by cutting the border/side tile into 2 halves. + kAutoBetween, + + /// Creates a corner by slicing the border/side tile + kAutoSliced, + + /// Creates a corner by overlapping the border/side tile + kAutoOverlap +}; + +/** Constants for \c #AIBeautifulStrokesSuite functions that set stroke widths. + The first three values are used to set the stroke width source for an entire path or Beautiful Strokes dictionary. + The "centered" values further specify the source of a requested width at a specific location on a path, + as returned by \c #AIBeautifulStrokesSuite::GetWidthsAtDistance() and parallel functions. +*/ +enum StrokeWidthSource +{ + /// Use a constant width derived from the \c #AIPathStyle stroke width setting. + kConstantWidth, + + /// Use width from tablet data; set specific channel with \c #AIBeautifulStrokesSuite::SetWidthTabletDataSource(). + kTabletData, + + /// Use variable width from user-provided profile. See \c #AIBeautifulStrokesSuite::SetCenteredWidthProfile() + /// and \c #AIBeautifulStrokesSuite::SetUncenteredWidthProfile(). + kUserProfile, + + /// Get width from this location on the path. + kCenteredProfileMark = 0x0000FF01, + /// Get width from this location on the path. + kUncenteredProfileMark, + /// Get width from this location on the path. + kCenteredProfileInterpolation, + /// Get width from this location on the path. + kUncenteredProfileInterpolation, + + /// Special return value to indicate mixed values when the params dict represents an + /// accumulation of the values from multiple objects, such as returned by \c #AIPathStyleSuite::GetCurrentPathStyle(). + /// Passing this in as a value to "set" in a params dictionary means that that the existing value, if any, should not change. + kUnknownStrokeWidthSource = 0xFFFFFFFF, + + /// Dummy value to ensure 32-bit enum value size. + StrokeWidthSource_dummy = 0xFFFFFFFF +}; + +enum GradientStrokeApplication +{ + /// Use the stroke to mask the gradient as if the stroke were outlined + /// and filled (default). + kGradientStrokeMask, + + /// Apply the gradient along the length of the stroke. + kGradientStrokeAlong, + + /// Apply the gradient across the width of the stroke. + kGradientStrokeAcross, + + /// Dummy value to ensure 32-bit enum value size. + kGradientStroke_dummy = 0xFFFFFFFF +}; + +/** Constants for \c #AIBeautifulStrokesSuite::SetArrowheadOptions() + that determine how to position the arrows at the ends of the path. +*/ +enum ArrowTipAlignment +{ + /// Put the tip of the arrow at the end of the path. + /// The attachment point is placed on the path, and the path then cut at the truncation point. + kArrowTipAtEnd, + /// Put the attachment point of the arrow at the end of the path. + /// The line between the attachment point and the tip is aligned with the path's tangent at that end. + kArrowAttachmentPtAtEnd, + /// Put the truncation point of the arrow at the end of the path. + /// The line between the truncation point and the tip is aligned with the path's tangent at that end. + kArrowTruncationPtAtEnd, + + /// Special return value to indicate mixed values when the params dict represents an + /// accumulation of the values from multiple objects, such as returned by \c #AIPathStyleSuite::GetCurrentPathStyle(). + /// Passing this in as a value to "set" in a params dictionary means that the existing value, if any, should not change. + kUnknownArrowAlignment = 0xFFFFFFFF +}; + + +/// See \c #WidthMarkerFlagValues +typedef ai::uint32 WidthMarkerFlags; // so that the compiler will allow doing bitwise operations + +// Bit flags that modify and/or report information about width markers, other than their +// location (t value) and width. +enum WidthMarkerFlagValues +{ + /// No flags set. + kNoWidthMarkerFlags = 0, + + // -------- Flags for describing marker types --------- // + + /** The marker indicates the incoming width only, that is, it is the width for interpolating + to the previous marker. The next marker should be an outgoing width only, and is + typically a different width value on at least one side of the stroke. + If passed to a width-changing function, indicates that only the incoming width + at that t value should be changed, with the outgoing width staying the same. + */ + kIncomingWidthMarker = 0x1, + // 0x2 is reserved in case we decide to distinguish between left stroke side and right stroke side incoming widths + + /** The marker indicates the outgoing width only, that is, it is the width for interpolating + to the next marker. The previous marker should be an incoming width only, and is + typically a different width value. If passed to a width-changing function, + indicates that only the outgoing width at that t value should be changed, + with the incoming width staying the same. + */ + kOutgoingWidthMarker = 0x4, + // 0x8 is reserved in case we decide to distinguish between left stroke side and right stroke side outgoing widths + + /** The width at the indicated point forms a corner; that is, if the adjacent markers are + at a different width, it starts interpolating linearly to the adjacent value, rather than + spreading smoothly. + */ + kCornerWidthMarker = 0x10, + /** If the width is uncentered, set the corner vs smooth attribute separately + for the left width. + */ + kCornerLeftWidthMarker = 0x10, + /** If the width is uncentered, set the corner vs smooth attribute separately + for the right width. + */ + kCornerRightWidthMarker = 0x20, + + /** The width marker at the indicated point prefers to be tied to a position on the path expressed + as as an anchor point index, rather than being placed at the t value in the t values array. + + Width profiles can be shared by multiple paths, since they are part of art style definitions, + and multiple paths can carry the same art style. So the actual profile contains only the + flags that say which of the width marks should be shifted to the anchored places, if they + exist on the path to which it is applied. The paths then in turn carry data that records + which of the positions on the path want to have width markers anchored to them. + + For example, if there are three interior width markers in the profile that prefer to be tied to + anchor points, and only one interior anchor point on a path to which that profile is applied, + then not all the anchor requests can be honored. + + When a width profile contains anchored width marks, the t values are adjusted when the + stroke is generated, so that the widths at those marks move to the anchor positions, + and any unanchored width markers between them are shifted proportionally. (The first and + last width mark in a profile are always anchored respectively to the start and end of the + path, so this flag is ignored for those width marks.) + + Left and right widths must always be anchored together, as must incoming and outgoing width + markers, since the left and right markers share the same tValues array and are always at the + same offsets along the path. + + */ + kAnchoredWidthMarker = 0x40, + + // (values from 0x80 to 0x8000 are reserved for future enhancements to saved options) + + // -------- Flags for describing options to functions that modify profiles --------- // + + /** When passed to functions that take an art object and modify the width at a given t value, + propagate the changes across multiple adjacent markers. Scope depends on selection state, + and by default is bounded by corner points. If not set, only the width at the given t value changes, + and all other markers stay the same.
+ The way the changes propagate can be modified by setting \c #kUniformChangeAcrossSpread + or \c #kProportionalChangeAcrossSpread. If both are off, the amount of change + tapers down logarithmically with distance from the t value at which the + change is specified, until it reaches 0 at the ends of the spread. + */ + kSpreadWidthChanges = 0x10000, + + /** When passed to \c #AIBeautifulStrokesSuite::SlideWidthMarkerToNewT(), specifies + that the marker should be duplicated and the new marker dragged while the old one is + left behind. + */ + kCopyMarker = 0x20000, + + /** When passed to \c #AIBeautifulStrokesSuite::SlideWidthMarkerToNewT(), specifies + that markers are not allowed to move past adjacent ones. Ignored if \c #kSpreadWidthChanges + is also on. + */ + kLimitAtNeighbors = 0x40000, + + /** Refines the meaning of \c #kSpreadWidthChanges; ignored if that flag is off. + If on, the same offset is added or subtracted from all other markers in the affected + spread, subject to remaining in the valid range. + */ + kUniformChangeAcrossSpread = 0x80000, + + /** Refines the meaning of \c #kSpreadWidthChanges; ignored if that flag is off. + If on, and \c #kUniformChangeAcrossSpread is off, other markers in the affected + spread change by the same proportion that the one being directly modified does. + For example, if the width at the directly modified t value is doubled, then all + other widths in the affected spread are doubled. + */ + kProportionalChangeAcrossSpread = 0x100000 + +}; + +/// A logical OR of \c #WidthMarkerFlagValues. */ +typedef ai::uint32 WidthMarkerFlags; + +/** Callback for progress reports during a call to \c #AIBeautifulStrokeSuite::GenerateArt(). + @param current The current progress, a value between 0 and \c total. Always equal to 0 currently. + @param total A value at which the operation is complete. Always equal to 1 currently. + @return False if user cancels the operation, otherwise true. */ +typedef AIAPI AIBoolean (*AIGenerateArtProgressProc)(ai::int32 current, ai::int32 total); + +/** Filled out by \c #AIBeautifulStrokesSuite::StrokeHitTest(), to report the results of a hit test + on the focal stroke of a given path. +
Note that when \c hitSomething is true, any combination of the other three hit results can hold. + For example, if a width marker is hit, the target point may also be within the hit tolerance + of the path centerline and/or within the hit tolerance of the stroke edge. Or on wide strokes, + it might be inside a region of the stroke that is not near the path centerline, the stroke edge, + nor any width point marker. +*/ +struct StrokeHitResults +{ + /** True if any portion of the focal stroke was hit. */ + AIBoolean hitSomething; + /** True if one of the width markers was hit anywhere along its extent. */ + AIBoolean hitWidthMarker; + /** True if the target point was within the hit tolerance of the path centerline. */ + AIBoolean hitCenterline; + /** True if the target point was within the hit tolerance of the stroke edge. */ + AIBoolean hitStrokeEdge; + + /** If \c hitWidthMarker is true, the point on the path at which that width marker is positioned. + Else if \c hitCenterline is true, the nearest point on the path, subject to anchor point snapping.
+ Else if within the stroked area, the first point on the path that would cause a width marker hit + if a new width marker were to be inserted at that point. Note that this is not necessarily + the nearest point on the path; for example, the path may have a U-shaped curve in which the stroke + is wide on one side and narrow on the other, so that the cursur is closer to the left centerline, + but outside the left stroked area, while it is farther from the right centerline, but within the + right stroked area. + */ + AIRealPoint pointOnPath; + + /** If \c hitStrokeEdge is true, the point on the stroke edge closest to the cursor, possibly snapped + to a marker end point. This is useful even if \c hitCenterline is also true, since the point on the + centerline can be obtained from \c pointOnPath.
+ If \c hitStrokeEdge is false and \c hitCenterline is true, it is the same as \c pointOnPath.
+ If \c hitStrokeEdge and \c hitCenterline are both false and \c hitWidthMarker is true, it is the closest + point along the marker's extent to the mouse.
+ If \c hitSomething is true and \c hitStrokeEdge, \c hitCenterline and \c hitWidthMarker are all false (that is, + if the cursor was within the stroked area but not within tolerance of any of the above), then it + is the same as \c pointOnPath.
+ If \c hitSomething is false it is the original mouse position. + */ + AIRealPoint snappedPoint; + + /** If \c hitSomething is true, the distance from the original mouse point to \c snappedPoint. + If \c hitSomething is false, so that \c snappedPoint is the original mouse position, it is + NOT zero, but a meaningless large number. */ + AIReal hitDistance; + + /** If \c hitWidthMark is true, the index of the width marker that was hit, otherwise 0. */ + ai::int16 widthMarkerIndex; + + /** The fraction of the path length from the beginning of the path to \c pointOnPath. */ + AIReal lengthFraction; + /** The p0 index of the bezier segment that contains \c pointOnPath. */ + ai::int16 segIndex; + /** The bezier t value within that segment of the \c pointOnPath. 0 for anchor point hits. */ + AIReal bezierT; +}; + + +/** An overview of the kind of path edit being performed, included as part of a \c #PathEditDescription +*/ +enum PathEditType +{ + /** Remove any width profile anchors from the path, but do not modify the art style */ + kClearProfileAnchorsOnly = 0, + + /** Remove any width profile anchors from the path, and apply a new art style in which + the width profile distances have been reset to their values according to the current + path distance. This is appropriate when a path is about to be edited in a way that + keeps the path distances roughly the same proportionally, but changes the number + of anchor points in a way that is too complex to attempt moving the anchors to new + indexes, such as Offset Path or Simplify. See also \c kCopyAndResetAnchors, below. */ + kClearAnchorsAndResetProfile, + + /** Transfer any profile anchors from the source path in the \c #PathEditDescription onto + the art dictionary of the path, copying them exactly if the number of segments on + the two paths are the same and they are either both open or both closed, otherwise + resetting the profile anchors so that they maintain approximately the same fractional + path distances, but are relative to the segment indices of the new path. This is an + alternative to \c kClearAnchorsAndResetProfile, for situations where the destination path + is a duplicate or a modified duplicate of the source path, especially useful for contexts + where the path being modified is an input path to an effect under execution, and hence + has been stripped of its paint. The art style of the path is not modified. */ + kCopyAndResetAnchors, + + /** A single anchor point (which may or may not be selected) is about to be moved. */ + kTranslate1Anchor, + + /** A single anchor point (which may or may not be selected) is about to be removed, + while preserving the path continuity (that is, the path is not split). */ + kRemove1Anchor, + + /** A single anchor point is about to be added. */ + kAdd1Anchor, + + /** A bezier segment is about to be adjusted, while leaving the bounding anchor points alone. */ + kAdjustBezier, + + /** The selected components of the path are about to be transformed. + It is not necessary to notify of this if the transformation preserves relative distances + between anchor points, such as a rotation, translation, or uniform scale of a fully + selected path. Should be notified if either the path is partially selected, or the + transformation changes the relative lengths of bezier segments, such as a shear or + non-uniform scale. */ + kTransformSelection, + + /** The anchor points of the path are about to be reversed. */ + kReversePathDirection, + + /** A new path has been constructed from a portion of another path (with, for instance, Delete, + Copy, or Scissor on a partially selected path). For this type of edit, the path + parameter to \c #AIBeautifulStrokesSuite::AdjustWidthAnchorsBeforePathEdit() + should be the new path; the original path is passed as the source path in the + \c #PathEditDescription.*/ + kSplitPath, + + /** A new art style is about to be applied to the path .*/ + kApplyStyle +}; + + +/** The details of an edit description, passed as a parameter to \c #AIBeautifulStrokesSuite::AdjustWidthAnchorsBeforePathEdit() +*/ +struct PathEditDescription +{ + PathEditType editType; + + /** For \c #kTranslate1Anchor or \c #kRemove1Anchor, the index of the anchor point being moved or removed.
+ For \c #kAdjustBezier, the index of the anchor point before the bezier segment being adjusted.
+ For \c #kAdd1Anchor, the index of the new anchor point after insertion.
+ For \c #kSplitPath, the index in the source path of the anchor point that was given index 0 + in the new path.
+ The index is allowed to be -1 if the new path was constructed by cutting + the closing bezier segment of a closed path and copying anchor point 0 of the source + path to anchor point 1 of the new path. You can find the number of anchor points copied + by examining the new path. If the new path is longer than the number of anchor points + remaining after this index in the source path, the code checks for wraparound, as would result + from cutting open a closed path. + */ + ai::int16 segIndex; + + /** For \c #kApplyStyle, the new art style that is about to be applied to the path. + The message must be sent while the old art style is still on the path, so that + the width profiles can be compared. + */ + AIArtStyleHandle newStyle; + + /** For \c #kAdd1Anchor, the coordinates and direction handles of the anchor point about to be added. */ + AIPathSegment newAnchor; + + /** For \c #kSplitPath or \c #kCopyAndResetAnchors, the original path that was used to as the source of anchor points for the new path. */ + AIArtHandle sourcePath; + +}; + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIBeautifulStrokesSuite "AI Beautiful Strokes Suite" +#define kAIBeautifulStrokesSuiteVersion3 AIAPI_VERSION(3) +#define kAIBeautifulStrokesSuiteVersion kAIBeautifulStrokesSuiteVersion3 +#define kAIBeautifulStrokesVersion kAIBeautifulStrokesSuiteVersion + +/** @ingroup DictKeys + Dictionary key for the Beautiful Strokes dictionary inside an \c #AILiveEffectParameters dictionary. + See \c #AILiveEffectSuite. +*/ +#define kAIBeautifulStrokesParamsDictKey "kAIBeautifulStrokesParamsDictKey" + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites + This suite allows you to control advanced features for stroking paths. Setting are + kept in a BeautifulStrokes params dictionary, which is contained in an \c #AILiveEffectParameters + dictionary, such as one returned by \c #AIPathStyleSuite::GetCurrentPathStyle().
+ One way to use this suite is to create a BeautifulStrokes params dictionary, + add the stroke settings to the dictionary, then use that dictionary to apply + the settings to source art. This generates new art in a destination group. + For example: + + @code + void Fn(AIArtHandle srcPath, AIArtHandle dstGroup) + { + AIDictionaryRef params = 0; + sAIBeautifulStrokes->CreateParamsDict(NULL, params); + sAIBeautifulStrokes->SetDashAdjustment(params, true); + sAIBeautifulStrokes->GenerateArt(params, srcPath, NULL, TRUE, dstGroup, NULL); + sAIDictionary->Release(params); + } + @endcode + + Counted object note: Suite functions that return counted object types such as + \c #AIDictionarySuite::AIDictionaryRef and \c #AIArraySuite::AIArrayRef increment + the reference count and the caller must release unneeded references to avoid memory + leaks, as shown in the examples. Documentation for individual parameters mentions those + that are reference counted and need to be released. See also \c #AICountedObjectSuite + and the \c ai::Ref C++ class. + + The example above uses the \c #AIDictionarySuite::Release() directly. + The following example uses the \c ai::Ref C++ class to manage the counted + object. (Note that \c #AICountedObjectSuite::Release() is equivalent to + \c #AIDictionarySuite::Release()): + + @code + void Fn_Ref(AILiveEffectParameters effectParams) + { + ai::Ref params; + sAIBeautifulStrokes->CreateParamsDict(NULL, *(params << ai::Replace)); + sAIBeautifulStrokes->SetDashAdjustment(params, true); + sAIBeautifulStrokes->GenerateArt(params, srcPath, NULL, TRUE, dstGroup, NULL); + } + @endcode + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIBeautifulStrokesSuite and \c #kAIBeautifulStrokesVersion. + +*/ + +struct AIBeautifulStrokesSuite +{ + + // General parameter management and stroke generation + + /** Applies settings in a BeautifulStrokes parameters dictionary to the focal stroke on source art + to generate new stroked art in the output group. + + @param effectParams An effect parameters dictionary that contains a BeautifulStrokes params + dictionary in which BeautifulStrokes settings are defined. This can also + be a BeautifulStrokes params dictionary. + @param inArt The art (path) to which the parameters are to be applied. + @param sourceArt [optional] The non-styled art (path) possibly containing width anchors that can be + used to adjust the width profile placement. (See \c #AIBeautifulStrokesSuite::GetPathAdjustedWidthDistances().) + This parameter is ignored if inArt is not styled art (see \c #AIArtSuite::IsArtStyledArt()), + since non-styled art will carry its own anchors. But art dictionaries are stripped + from the input art to live effects. Thus, if \c inArt is the input art to a live effect + execution for a stroke filter, and the art style being executed was attached to a path, + then passing \c sourceArt as the non-styled path art object to which that art style was + attached will allow access to the width anchors. (If there are no vector pre-effects + before the stroke filter, then \c inArt will generally be a duplicate of \c sourceArt, + but if there are vector pre-effects, then it may be substantially different.) + Passing this parameter as null when inArt is styled art will cause any width profile + in the effectParams to be applied without width anchor adjustment. + @param outputOnTop True to place the output art into the output group on top, false to place + it inside the output group on the bottom. + @param outGroup The destination group for the generated output art. + @param outArt [optional] A pointer to an AIArtHandle in which to return the AIArtHandle for the generated output art. + @param progressProc A callback procedure for displaying a progress bar during + computation (from which the user can cancel the operation) + or \c nullptr to show no progress bar. + */ + AIAPI AIErr (*GenerateArt)(ConstAILiveEffectParameters effectParams, AIArtHandle inArt, AIArtHandle sourceArt, + AIBoolean outputOnTop, AIArtHandle outGroup, AIArtHandle *outArt, AIGenerateArtProgressProc progressProc); + + /** Creates a new BeautifulStrokes params dictionary. You must release the dictionary when no longer needed using + \c #AIDictionarySuite::Release(). + + @param effectParams [optional] A set of LiveEffect parameters. If supplied, the new BeautifulStrokes + params dictionary is added to this dictionary, or, if a BeautifulStrokes dictionary + already exists, \c params is set to this existing dictionary. + @param params A reference to a new or the existing BeautifulStrokes params dictionary. + The reference count on this dictionary is incremented on return and + must be released when no longer needed. + + */ + AIAPI AIErr (*CreateParamsDict)(AILiveEffectParameters effectParams, AIDictionaryRef ¶ms); + + /** Retrieves a BeautifulStrokes parameters dictionary from a set of LiveEffect parameters. + + @param effectParams A set of LiveEffect parameters for an art object. + @param params A reference to the BeautifulStrokes params dictionary or + NULL if one does not exist. The reference count on this + dictionary is incremented on return and must be released + when no longer needed. + + @return No error is returned if the dictionary does not exist. + */ + AIAPI AIErr (*GetParamsDict)(ConstAILiveEffectParameters effectParams, AIDictionaryRef ¶ms); + + /** Reports whether two parameters dictionaries are equivalent. + + @param params1 The first dictionary. + @param params2 The second dictionary. + @return True if equivalent. + */ + AIAPI AIBoolean (*Equiv)(ConstAIDictionaryRef params1, ConstAIDictionaryRef params2); + + /** Accumulates common parameters in a dictionary to be used later with \c #ApplyParams(). + Call repeatedly with different parameter sets to collect the combined BeautifulStrokes + attributes of multiple objects (or multiple art styles). You can use this to collect + common attributes of objects that are not necessarily selected, or to ignore some of + the selected objects, such as finding the combined BeautifulStrokes attributes of + all the objects on a layer, whether they are selected or not. + + @param effectParams A set of LiveEffect parameters containing a Beautiful Strokes params dictionary. + @param accumulator Common parameters being accumulated. + */ + AIAPI AIErr (*AccumulateParams)(ConstAILiveEffectParameters effectParams, AIDictionaryRef accumulator); + + /** Applies a set of parameters from one dictionary to another. For keys that exist in both dictionaries, + the value from the source overwrites the value in the destination. + + @param params The source dictionary containing a set of parameters to be applied. + Typically obtained from \c #AIPathStyleSuite::GetCurrentPathStyle(), from an art object or art style. + If an accumulated dictionary is passed as the source, values that vary (were mixed in the selection) + do not change value in the target dictionary. This is consistent with the behavior of + \c #AIPathStyleSuite::SetCurrentPathStyle(). See also \c #AccumulateParams(). + @param target The target dictionary. + */ + AIAPI AIErr (*ApplyParams)(ConstAIDictionaryRef params, AIDictionaryRef target); + + /** Reports whether a dictionary contains meaningful Beautiful Strokes parameters. + (Note that this function returns a Boolean value, not an error code.) + Call on an accumulator to check whether it contains any BeautifulStrokes parameters; + if not, it can be freed or ignored. See \c #AccumulateParams(). + Both a used accumulator and a new dictionary contain some bookkeeping entries, so you cannot just + check for the dictionary being empty of all keys. A new dictionary just created by + \c #CreateParamsDict() returns false to this call.
+ + This does not recurse into sub-dictionaries. To test for nested dictionaries, + call \c #GetParamsDict(), and if it is non-null check the contained dictionary. + + @param paramsDict Dictionary to be examined. + @return True if the dictionary contains Beautiful Strokes parameters. + */ + AIAPI AIBoolean (*ContainsParams)(ConstAIDictionaryRef paramsDict); + + /** Retrieves the BeautifulStrokes params dictionary, if any, associated with the focal stroke of an art object. Optionally + retrieves the stroke style and other information about the stroke attributes. + + @param art The art object. + @param paramDict [out] A reference in which to return the BeautifulStrokes params dictionary, or null if none. + The reference count on this dictionary is incremented on return and must be released when + no longer needed. + @param strokeStyle [out][optional] A buffer in which to return the focal stroke style from the paint attributes. + @param hasBrush [out][optional] A buffer in which to return true if the focal stroke carries a brush effect. + @param scaleFactor [out][optional] A buffer in which to return the combined scale factor that incorporates: + the object scale factor reported by \c #AIArtStyleSuite::GetArtStyleScaleFactor(), + the width of the art design on art brushes or the side tile on pattern brushes, + and the scale factor from the brush options for brushes.
+ Multiplying these widths by this factor gives the width that the stroke edges + preview at, assuming that any brush art fills the brush tile boundaries.
+ (Does not include the stroke weight or the width returned by \c #GetWidthsAtDistance(), and so on.) + @param canAccept [out][optional] A buffer in which to return true if the art object has a style that can accept + BeautifulStrokes parameters. + (For CS5, it has a stroke, and the focal stroke is not a Calligraphic or Scatter brush, and is + not inside/outside aligned.) + */ + AIAPI AIErr (*GetArtStrokeParams)(AIArtHandle art, AIDictionaryRef ¶mDict, + AIStrokeStyle *strokeStyle, AIBoolean *hasBrush, + AIReal *scaleFactor, AIBoolean *canAccept); + + /** Interpolates beautiful stroke parameters between two appearances. + + @param effectParams1 [optional] The effects parameters dictionary of a stroke filter, + which may (or may not) contain a Beautiful Strokes params dictionary. + @param effectParams2 [optional] The effects parameters dictionary of a stroke filter + which may (or may not) contain a Beautiful Strokes params dictionary. + @param effectParamsOut The effects parameters dictionary of a stroke filter that represents the results + of interpolating between effectParams1 and effectParams2. + @param dist A number in the range [0-1], where 0 is interpreted as matching effectParams1, + and 1 is interpreted as matching effectParams2. (Negative values are interpreted + as if they were 0, and values greater than 1 as if they were 1.) + + If either effectParams1 or effectParams2 contains a Beautiful Strokes parameter dictionary, then those parameters + will be interpolated, and the results placed in effectParamsOut (which should not be null if either input parameter + is null.) + */ + AIAPI AIErr (*InterpolateParams)(ConstAILiveEffectParameters effectParams1, ConstAILiveEffectParameters effectParams2, + AILiveEffectParameters effectParamsOut, AIReal dist); + + // General brush settings + + /** Sets the option in a Beautiful Strokes dictionary to flip art across path to reverse vertical orientation. + + @param params The parameters dictionary. + @param flipAcross True to set the option, false to clear it. + */ + AIAPI AIErr (*SetFlipAcross)(AIDictionaryRef params, AIBoolean flipAcross); + + /** Retrieves the option from a Beautiful Strokes dictionary to flip art across path to reverse vertical orientation. + Note that this function returns a Boolean value, not an error code. + + @param params The parameters dictionary. + @return True if the option is set, false if it is clear. + */ + AIAPI AIBoolean (*GetFlipAcross)(ConstAIDictionaryRef params); + + /** Sets the option in a Beautiful Strokes dictionary to flip art along path to reverse lateral orientation. + + @param params The parameters dictionary. + @param flipAlong True to set the option, false to clear it. + */ + AIAPI AIErr (*SetFlipAlong)(AIDictionaryRef params, AIBoolean flipAlong); + + /** Retrieves the option from a Beautiful Strokes dictionary to flip art along path to reverse lateral orientation. + Note that this function returns a Boolean value, not an error code. + + @param params The parameters dictionary. + @return True if the option is set, false if it is clear. + */ + AIAPI AIBoolean (*GetFlipAlong)(ConstAIDictionaryRef params); + + /** Sets the scale (width) of art applied to path in a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param scale Single scale for art not using tablet data. + @param mnScale [optional] Minimum scale for art using tablet data. + @param mxScale [optional] Maximum scale for art using tablet data. + */ + AIAPI AIErr (*SetScale)(AIDictionaryRef params, AIReal scale, const AIReal *mnScale, const AIReal *mxScale); + + /** Retrieves the scale (width) of art applied to path from a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param scale [out] A reference in which to return the single scale for art not using tablet data. + @param mnScale [optional] [out] A buffer in which to return the minimum scale for art using tablet data. + @param mxScale [optional] [out] A buffer in which to return the maximum scale for art using tablet data. + */ + AIAPI AIErr (*GetScale)(ConstAIDictionaryRef params, AIReal &scale, AIReal *mnScale, AIReal *mxScale); + + /** Set fold adjustment on or off. This adjusts the brush folding across corners or bends. + */ + AIAPI AIErr (*SetFoldAdjustment)(AIDictionaryRef params, AIBoolean adjust); + + /** Retrieves the fold adjustment status from a Beautiful Strokes dictionary. + This adjusts the folding across corners or bends. + Note that this function returns a Boolean value, not an error code. + + @param params The parameters dictionary. + @param mixed [optional] [out] A buffer in which to return true if the dictionary represents an accumulation + returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed. + By convention, mixed values return false. + @return True if the option is set, false if it is clear. + */ + AIAPI AIBoolean (*GetFoldAdjustment)(ConstAIDictionaryRef params, AIBoolean *mixed); + + // Art Brushes + + /** Sets the pattern to be applied along path in a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param art The brush pattern. + */ + AIAPI AIErr (*SetArtPaint)(AIDictionaryRef params, AIPatternHandle art); + + /** Retrieves the pattern to be applied along path from a Beautiful Strokes dictionary. + Note that this function returns an object, not an error code. + + @param params The parameters dictionary. + @return The brush pattern. + */ + AIAPI AIPatternHandle (*GetArtPaint)(ConstAIDictionaryRef params); + + /** Sets the stretching option in a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param stretch True to stretch tiles non-uniformly along the path, false to scale + up uniformly for the path length. + */ + AIAPI AIErr (*SetStretch)(AIDictionaryRef params, AIBoolean stretch); + + /** Retrieves the stretching option from a Beautiful Strokes dictionary. + Note that this function returns a Boolean value, not an error code. + + @param params The parameters dictionary. + @return True if the option is set (stretch tiles non-uniformly along the path), + false if it is clear (scale up uniformly for the path length). + */ + AIAPI AIBoolean (*GetStretch)(ConstAIDictionaryRef params); + + /** Sets the lengths of non-stretching start and end segments for a segmented brush in a Beautiful Strokes dictionary. + Lengths are expressed as absolute values in document points. If both values are zero, the brush is a non-segmented brush. + + @param params The parameters dictionary. + @param startSegmentLength Length of start segment. + @param endSegmentLength Length of end segment. + */ + AIAPI AIErr (*SetStartEndSegmentLength)(AIDictionaryRef params, AIReal startSegmentLength, AIReal endSegmentLength); + + /** Retrieves the lengths of non-stretching start and end segments for a segmented brush from a Beautiful Strokes dictionary. + Lengths are expressed as absolute values in document points. + + @param params The parameters dictionary. + @param startSegmentLength [out] A reference in which to return the start-segment length. + @param endSegmentLength [out] A reference in which to return the end-segment length. + */ + AIAPI AIErr (*GetStartEndSegmentLength)(ConstAIDictionaryRef params, AIReal &startSegmentLength, AIReal &endSegmentLength); + + // Pattern Brushes + + /** Sets options for repeating pattern tiles along a path in a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param beginArt Brush pattern tile art to be applied to the beginning of the path. May be NULL. + @param endArt Brush pattern tile art to be applied to the end of the path. May be NULL. + @param sideArt Brush pattern tile art to be applied to the main part of the path. May be NULL. + @param insideCornerArt Brush pattern tile art to be applied to inside corners of the path. May be NULL. + @param outsideCornerArt Brush pattern tile art to be applied to outside corners of the path. May be NULL. + @param adjustment Method to use to apply art along path; see \c #RepeatedArtAdjustment(). + @param spacing Relative spacing between tiles; for example, 0.5 sets spacing to half + the width of the tile. Relevant only when adjustment method is \c #kAddSpace. + @param insideAutoCornerOption Method to use to generate insideCornerArt automatically; see \c #RepeatedArtCorner(). + @param outsideAutoCornerOption Method to use to generate outsideCornerArt automatically; see \c #RepeatedArtCorner(). + */ + AIAPI AIErr (*SetArtPatternPaint)(AIDictionaryRef params, AIPatternHandle beginArt, AIPatternHandle endArt, + AIPatternHandle sideArt, + AIPatternHandle insideCornerArt, AIPatternHandle outsideCornerArt, + RepeatedArtAdjustment adjustment, AIReal spacing, + RepeatedArtCorner insideAutoCornerOption, RepeatedArtCorner outsideAutoCornerOption); + + /** Retrieves options for repeating pattern tiles along a path from a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param beginArt [out] A reference in which to return the brush pattern tile art to be + applied to the beginning of the path. May be NULL. + @param endArt [out] A reference in which to return the brush pattern tile art to be + applied to the end of the path. May be NULL. + @param sideArt [out] A reference in which to return the brush pattern tile art to be + applied to the main part of the path. May be NULL. + @param insideCornerArt [out] A reference in which to return the brush pattern tile art + to be applied to inside corners of the path. May be NULL. + @param outsideCornerArt [out] A reference in which to return the brush pattern tile art + to be applied to outside corners of the path. May be NULL. + @param adjustment [out] A reference in which to return the method to use to apply art along path; + see \c #RepeatedArtAdjustment(). + @param spacing [out] A reference in which to return the relative spacing between tiles. + For example, 0.5 sets spacing to half the width of the tile. + Relevant only when adjustment method is \c #kAddSpace. + @param insideAutoCornerOption [out] A reference in which to return the type of Automatically Generated Corner + to be used for Inside Corner. + see \c #RepeatedArtCorner(). + @param outsideAutoCornerOption [out] A reference in which to return the type of Automatically Generated Corner + to be used for Outside Corner. + see \c #RepeatedArtCorner(). + */ + AIAPI AIErr (*GetArtPatternPaint)(ConstAIDictionaryRef params, AIPatternHandle &beginArt, AIPatternHandle &endArt, + AIPatternHandle &sideArt, + AIPatternHandle &insideCornerArt, AIPatternHandle &outsideCornerArt, + RepeatedArtAdjustment &adjustment, AIReal &spacing, + RepeatedArtCorner &insideAutoCornerOption, RepeatedArtCorner &outsideAutoCornerOption); + + // Dashing + + /** Sets or clears the dash adjustment option in a Beautiful Strokes dictionary. + When on, adjusts dashes so a certain fraction of the dash length always appears + at the ends, corners, and intersections of dashed lines. + (Note that dash/gap intervals are obtained from the art.) + + @param params The parameters dictionary. + @param adjust True to set the option, false to clear it. + */ + AIAPI AIErr (*SetDashAdjustment)(AIDictionaryRef params, AIBoolean adjust); + + /** Retrieves the dash adjustment status from a Beautiful Strokes dictionary. + See \c #SetDashAdjustment(). + (Note that this function returns a Boolean value, not an error code.) + + @param params The parameters dictionary. + @param mixed [optional] [out] A buffer in which to return true if the dictionary represents an accumulation + returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed. + By convention, mixed values return false. + @return True if the option is set, false if it is clear. + */ + AIAPI AIBoolean (*GetDashAdjustment)(ConstAIDictionaryRef params, AIBoolean *mixed); + + // Gradient Stroke + + /** Sets the gradient stroke application method. This determines how the + current stroke color, if a gradient, will be applied to the stroke. + Not applicable to some objects such as art brushes, etc. + + @param params The parameters dictionary. + @param type The type of gradient stroke application. Pass kGradientStroke_dummy + to clear the corresponding dictionary entry. + */ + AIAPI AIErr (*SetGradientStrokeApplication)(AIDictionaryRef params, GradientStrokeApplication application); + + /** Retrieves the gradient stroke application method status from a + Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param type The type of gradient stroke application. + @param mixed [optional] [out] A buffer in which to return true if the dictionary represents an accumulation + returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed. + By convention, mixed values return false. + */ + AIAPI AIErr (*GetGradientStrokeApplication)(ConstAIDictionaryRef params, GradientStrokeApplication &application, AIBoolean *mixed); + + // Arrowheads + + /** Sets arrowhead-related stroke options in a Beautiful Strokes dictionary. + The arrowhead symbols can be in a library rather than the current document. If so, they are retargeted to the + document that the params dictionary is attached to, and placed in the "hidden symbols" of that document; + that is, they do not appear in the Symbols panel. The symbols are parsed to determine the alignment + parameters and the default scale. + + Any unpainted closed rectangle in the back of the symbol definition is ignored and stripped from + the art that is used to determine the "tip" of the arrow and placed on the path. These unpainted + rectangles are assumed to be only for the purpose of making the symbol thumbnails a uniform size. + + Arrowhead art inside the symbol is assumed to be positioned the way it would be when applied as an + end arrow to a horizontal open path that started at the left and ended at the right. + If applied as a start arrow, it is reflected horizontally before it is applied. + + If there is a stroked open straight line in the back of the symbol definition (either above or below + the bounding rectangle if there is one), then the right endpoint of that line is used to specify the + truncation point. If it additionally has an internal anchor point, the furthest right such anchor point + is used to specify the attachment point, otherwise the attachment point is the same as the truncation point. + + The tip is treated as the point along the right edge of the bounding box (after removing the bounding tile, + if any) which is at the same height as the positioning line. The stroke weight of the positioning line + is used to determine the default scale of the arrowhead. For example, if the positioning stroke is 2 pts, then + the arrowhead is scaled 50% when it is applied to a path with a 1 pt stroke, and scaled 150% when it + is applied to a path with a 3 pt stroke. The begin-scale or end-scale factors are applied additionally. + + If there is no positioning line, the default is to use a 100% default scale; that is, to treat the symbol + as if it were scaled appropriately for a 1 pt line, and to put both the attachment and truncation points + in the center of the symbol. + + @param params The parameters dictionary. + @param beginSymbol A pointer to the symbol to apply as the arrowhead at the beginning of the path. + To not change the existing settings, pass null. To remove the arrowhead, + pass a pointer to null. + @param endSymbol The symbol to apply as the arrowhead at the end of the path, null if none + To not change the existing settings, pass null. To remove the arrowhead, + pass a pointer to null. + @param beginScale The factor by which to scale the begin arrow by, as a percentage relative + to the default scale. To not change the existing settings, pass \c #kAIRealUnknown. + @param endScale The factor by which to scale the end arrow by, as a percentage relative + to the default scale. To not change the existing settings, pass \c #kAIRealUnknown. + @param alignment The rule for positioning the arrows at the ends of the path. + To not change the existing settings, pass \c #kUnknownArrowAlignment. + */ + AIAPI AIErr (*SetArrowheadOptions)(AIDictionaryRef params, AIPatternHandle *beginSymbol, AIPatternHandle *endSymbol, + AIReal beginScale, AIReal endScale, ArrowTipAlignment alignment); + + /** Retrieves arrowhead-related stroke options from a Beautiful Strokes dictionary. + All pointer arguments are optional and may be null if those options are not being queried. + + @param params The parameters dictionary to be searched. May be an accumulation of multiple paths, if + returned from \c #AIPathStyleSuite::GetCurrentPathStyle(). + @param beginSymbol [out] A buffer in which to return the symbol used as the arrowhead at the beginning of the path, null if none. + @param endSymbol [out] A buffer in which to return the symbol used as the arrowhead at the end of the path, null if none. + @param beginScale [out] A buffer in which to return the factor to uniformly scale the begin arrow by, as a percentage relative to the default scale. + Returns \c #kAIRealUnknown if the params dict represents an accumulation with mixed values. + @param endScale [out] A buffer in which to return the factor to scale the end arrow by, as a percentage relative to the default scale + Returns \c #kAIRealUnknown if the params dict represents an accumulation with mixed values. + @param alignment [out] A buffer in which to return the rule for positioning the arrows at the ends of the path. Must be the same for both ends. + Returns \c #kUnknownArrowAlignment if the params dict represents an accumulation + and the selection is mixed (including if some paths have no arrowheads). + @param mixedBeginArrows [out] A buffer in which to return true if there are different choices for the begin-symbol in a mixed selection + (including if some paths have no begin arrow and some do.) + @param mixedEndArrows [out] A buffer in which to return true if there are different choices for the end-symbol in a mixed selection + (including if some paths have no begin arrow and some do.) + */ + AIAPI AIErr (*GetArrowheadOptions)(ConstAIDictionaryRef params, AIPatternHandle *beginSymbol, AIPatternHandle *endSymbol, + AIReal *beginScale, AIReal *endScale, ArrowTipAlignment *alignment, + AIBoolean *mixedBeginArrows, AIBoolean *mixedEndArrows); + + // Variable Widths + + /** Sets the source of stroke width in a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param source Source of width information for stroke. If \c #kTabletData, set related values + with \c #SetWidthTabletDataSource() and \c and #SetScale(), particularly minimum and maximum.
+ If \c #kUserProfile, call \c #SetCenteredWidthProfile() to set centered width values or + \c #SetUncenteredWidthProfile() to set independent left and right width values. + */ + AIAPI AIErr (*SetWidthSource)(AIDictionaryRef params, StrokeWidthSource source); + + /** Retrieves the source of stroke width from a Beautiful Strokes dictionary. + (Note that this function returns a constant value, not an error code.) + + @param params The parameters dictionary. + @return The width source constant. + */ + AIAPI StrokeWidthSource (*GetWidthSource)(ConstAIDictionaryRef params); + + /** Sets the type of tablet data to use for stroke width in the art passed to \c #GenerateArt(), + in a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param dataType The type of tablet data. + @see \c #AITabletDataType + */ + AIAPI AIErr (*SetWidthTabletDataSource)(AIDictionaryRef params, AITabletDataType dataType); + + /** Retrieves the tablet-data type option from a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param dataType The type of tablet data to use for stroke width in the art passed to \c #GenerateArt(). + @see \c #AITabletDataType + */ + AIAPI AIErr (*GetWidthTabletDataSource)(ConstAIDictionaryRef params, AITabletDataType &dataType); + + /** Sets centered width profile for output art in a Beautiful Strokes dictionary. Pass NULL for both arrays to clear the profile. + A style cannot carry both an uncentered and centered width profile, so if there is an existing + centered width profile, this function removes it. + + Other than length, the array values are not examined for validity at the time they are set. + Instead, they are examined when used, and any invalid entries are ignored. + A width profile in which all the array entries are used to form the stroke contour + has the following properties: +
  • The first distance is 0
  • +
  • The last distance is 1
  • +
  • Every distance value should be no less than the previous distance, and no more than the next one
  • +
  • There should be no more than two consecutive distance values at the same distance
+ When interpreting the width profile: +
  • If the first distance value is not zero, the function acts as if there was an additional value + at the beginning of both arrays, with the distance being zero and the width being whatever + the width is in the first entry in the widths array.
  • +
  • If any distance value is more than 1, or less than the preceding distance value, or equal + to both the preceding distance value and the following distance value, the function ignores + the array entries at that index
  • +
  • If the last distance value is not 1, the function acts as if there were an additional pair of + entries with the distance equal to 1, and the width equal to the width at the last valid + distance entry
  • +
  • Negative values are interpreted as if they were 0. Values greater than 1 are allowed, but cause + the stroke to be wider at those places than the width shown in the Stroke panel, so should be avoided. + + Note that this differs from the interpretation of widths in the functions such as \c #SetCenteredWidthAtDistance() + that take a path object and query or modify the width at specific offsets; these incorporate the stroke weight scaling. + This is because the functions that manage entire width arrays may be dealing with profiles that are shared across multiple + paths of different weights or belong to unattached preset dictionaries.
+ + @param params The parameters dictionary. + @param tVals An array of \c AIReal values ranging from [0-1] representing fractional distances + along the path. + @param widths An array of \c AIReal values the same size as \c tVals representing the fractional stroke width + at the corresponding offset in the \c tVals array. Values are fractions of the stroke weight + as shown in the Stroke panel, in the range [0-1]. + @return The error \c #kBadParameterErr if the arrays are of different lengths, or if one is null and the other is not. + */ + AIAPI AIErr (*SetCenteredWidthProfile)(AIDictionaryRef params, AIArrayRef tVals, AIArrayRef widths); + + /** Retrieves the centered width profile for output art from a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param distances A reference in which to return an array of \c AIReal values ranging from [0-1] representing fractional distances + along the path. + @param widths A reference in which to return an array of \c AIReal values the same size as \c tVals representing the fractional stroke width + at the corresponding offset in the \c tVals array. + */ + AIAPI AIErr (*GetCenteredWidthProfile)(ConstAIDictionaryRef params, AIArrayRef &distances, AIArrayRef &widths); + + /** Sets an uncentered width profile for output art in a Beautiful Strokes dictionary, with independent + left and right width values. Left and right are interpreted by following the path + from the start point to the end point. + A path cannot carry both an uncentered and centered width profile, so if there is an existing + centered width profile, this function removes it. + + @param params The parameters dictionary. + @param tVals An array of \c AIReal values ranging from [0-1] representing fractional distances + along the path. + @param leftWidths An array of \c AIReal the same size as \c tVals representing the width of the left side + of the stroke at corresponding distances in \c tVals. + @param rightWidths An array of \c AIReal the same size as \c tVals representing the width of the right side + of the stroke at corresponding distances in \c tVals. + */ + AIAPI AIErr (*SetUncenteredWidthProfile)(AIDictionaryRef params, AIArrayRef tVals, AIArrayRef leftWidths, AIArrayRef rightWidths); + + /** Retrieves the uncentered width profile for output art from a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param tVals A reference in which to return an array of \c AIReal values ranging from [0-1] representing fractional distances + along the path. + The reference count on this array is incremented on return and must be released when no longer needed. + @param leftWidths A reference in which to return an array of \c AIReal the same size as \c tVals representing the width of the left side + of the stroke at corresponding distances in \c tVals. + The reference count on this array is incremented on return and must be released when no longer needed. + @param rightWidths A reference in which to return an array of \c AIReal the same size as \c tVals representing the width of the right side + of the stroke at corresponding distances in \c tVals. + The reference count on this array is incremented on return and must be released when no longer needed. + */ + AIAPI AIErr (*GetUncenteredWidthProfile)(ConstAIDictionaryRef params, AIArrayRef &tVals, AIArrayRef &leftWidths, AIArrayRef &rightWidths); + + /** INTENDED FOR FUTURE ENHANCEMENTS - All non-default options are currently ignored. + Can only be called after setting the width profile with \c #SetCenteredWidthProfile() or \c #SetUncenteredWidthProfile(). + If not present (the usual case), all width markers use default options, which are dependent upon the context. All arrays can be null. + The defaults are for markers that are concurrent with corner anchor points of the path to be treated as + tethered corner width markers, and for all other markers to be untethered smooth markers, with the + default smoothness values. + + To save space, there is a single array of marker options for both centered and uncentered width profiles, + with different flag values to distinguish when the options are different for the left and right sides + of the stroke (for example, if it is smooth on the left side but cornered on the right.) + If an incoming smoothness array exists but the outgoing smoothness array does not exist on that side + of the path, then the outgoing smoothness is inherited from the incoming smoothness. + Similarly, if the left smoothness array(s) exist but the right smoothness arrays do not, then + the right smoothness is inherited from the left smoothness. + + You must only call this function AFTER either \c #SetCenteredWidthProfile() or \c #SetUncenteredWidthProfile(); + it returns /c #kBadParameterErr if any of the arrays are non-null and either there is no width profile, + or the existing width profile has a different number of markers than the size of the detail arrays. + No validation is done on the contents of the arrays, other than their lengths. + + @param params The parameters dictionary. + @param markerOptions An array of integers parallel to the t values, interpreted as a bit vector + of WidthMarkerFlagValues + @param incomingLeftSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, + ranging from minimally smooth at 0 to maximally smooth at 1. + @param outgoingLeftSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, + ranging from minimally smooth at 0 to maximally smooth at 1. + @param incomingRightSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, + ranging from minimally smooth at 0 to maximally smooth at 1. + @param outgoingRightSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, + ranging from minimally smooth at 0 to maximally smooth at 1. + @return The error \c #kBadParameterErr if any of the arrays are non-null + and either there is no width profile, or the existing width profile + has a different number of markers than the size of the detail arrays. + */ + AIAPI AIErr (*SetWidthProfileDetails)(AIDictionaryRef params, AIArrayRef markerOptions, + AIArrayRef incomingLeftSmoothness, AIArrayRef outgoingLeftSmoothness, + AIArrayRef incomingRightSmoothness, AIArrayRef outgoingRightSmoothness); + + /** Retrieves the options for the width profile markers from a Beautiful Strokes dictionary. + + @param params The parameters dictionary. + @param markerOptions A reference in which to return an array of integers parallel to the t values, interpreted as a bit vector of \c #WidthMarkerFlagValues. + The reference count on this array is incremented on return and must be released when no longer needed. + @param incomingLeftSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. + The reference count on this array is incremented on return and must be released when no longer needed. + @param outgoingLeftSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. + The reference count on this array is incremented on return and must be released when no longer needed. + @param incomingRightSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. + The reference count on this array is incremented on return and must be released when no longer needed. + @param outgoingRightSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. + The reference count on this array is incremented on return and must be released when no longer needed. + */ + AIAPI AIErr (*GetWidthProfileDetails)(ConstAIDictionaryRef params, AIArrayRef &markerOptions, + AIArrayRef &incomingLeftSmoothness, AIArrayRef &outgoingLeftSmoothness, + AIArrayRef &incomingRightSmoothness, AIArrayRef &outgoingRightSmoothness); + + /** If a path has variable widths (either centered or uncentered), retrieves a vector of the values + from the distance array, after adjustment to shift any anchored width points to the relative + distance along that path of the path positions they are anchored to. +
  • If the path has no variable widths, the returned vector is empty.
  • +
  • If the path has variable widths but no width profile anchors, the returned vector contains + the same distance values that are in the distance array returned + by \c #GetCenteredWidthProfile() or \c #GetUncenteredWidthProfile().
+ + @param path The path. + @param adjustedDistances A reference in which to return the result vector. The reference + count on this array is incremented on return and must be released + when no longer needed. + */ + AIAPI AIErr (*GetPathAdjustedWidthDistances)(AIArtHandle path, AIArrayRef &adjustedDistances); + + /** Retrieves the left, right, and combined widths of the focal stroke at a fraction of the distance along a path, + and reports the source of the widths. + The widths are analogous to the stroke weights as returned by the \c #AIArtStyleSuite::GetPaintAttributes(). + As such, they include the stroke weight scaling, but do not include the impact of pattern or art brush + scale options or pattern or art brush tile sizes. + + @param path [in] The path to be examined for width data. + @param lengthFraction [in/out] Upon input, the fraction of the path length at which the width is being queried. + Upon output, if the width source is \c #kCenteredProfileMark or \c #kUncenteredProfileMark, the + possibly snapped position of that mark. To find whether snapping has occurred, + cache the original length fraction and compare it to the returned value. + @param tolerance [in] If positive and the path has a user-specified variable width profile, + and the input length fraction is within this tolerance of one of the t values in the + width array, then the length fraction is snapped to that t value. If zero + or negative, a tolerance of .001 is used. + @param totalWidth [out][optional] A buffer in which to return the total width at the given position, + as obtained from the width source. + @param leftWidth [out][optional] A buffer in which to return the stroke width on the left side of the path + at the given position, as obtained from the width source. + @param rightWidth [out][optional] A buffer in which to return the stroke width on the right side of the path + at the given position, as obtained from the width source. + @param widthSource [out][optional] A buffer in which to return the width-source constant. It will be one of kConstantWidth, kTabletData, + kCenteredProfileMark, kUncenteredProfileMark, kCenteredProfileInterpolation, kUncenteredProfileInterpolation. + @param markerIndex [out][optional] A buffer in which to return the marker index. If width source is from a centered + or uncentered profile, the index into the parallel t and width arrays of the marker. + For \c #kCenteredProfileMark and \c #kUncenteredProfileMark, + it is the index of the marker at that location; for \c #kCenteredProfileInterpolation and + \c #kUncenteredProfileInterpolation, it is the index of the preceding marker. + @param markerDetails [in/out][optional] On input, the only meaningful flag values are \c #kIncomingWidthMarker and + \c #kOutgoingWidthMarker. These specify which of the two markers should be returned in + the event that there are two markers at exactly the input length fraction. (If snapping + occurs, then the flags are ignored; the incoming marker is returned when + it snaps upward, and the outgoing when it snaps downward.) If null + or if neither or both of those flags are on, and there are two markers + at exactly the input length fraction, then the larger of the two is returned. + On output, if width source is \c #kCenteredProfileMark or \c #kUncenteredProfileMark, can + contain one of \c #kIncomingWidthMarker or \c #kOutgoingWidthMarker, and/or \c #kCornerWidthMarker. + */ + AIAPI AIErr (*GetWidthsAtDistance)(AIArtHandle path, AIReal &lengthFraction, AIReal tolerance, + AIReal *totalWidth, AIReal *leftWidth, AIReal *rightWidth, + StrokeWidthSource *widthSource, ai::int16 *markerIndex, WidthMarkerFlags *markerDetails); + + /** Sets the total width of the focal stroke at a given fraction of the distance along the path. (If lengthFraction is within + 0.001 of an existing t value in the width profile, modifies the existing width at that t value rather than + inserting a new one.) +
  • If there is already a centered width profile, inserts the indicated value into it.
  • +
  • If there is already an uncentered profile, this is equivalent to setting the left and right widths to half the input width.
  • +
  • If there is not yet any user specified width profile, creates a centered width profile from the current stroke source + and then modifies it and sets the stroke-width source to \c #kUserProfile.
+ + @param path The path. + @param lengthFraction A fraction of the distance along the path at which to set the width. If within 0.001 of an existing t value + in the width profile, modifies the existing width at that t value rather than inserting a new one. + @param width The new width. + @param options A logical OR of bit flags that determine how to perform the operation. + */ + AIAPI AIErr (*SetCenteredWidthAtDistance)(AIArtHandle path, AIReal lengthFraction, AIReal width, WidthMarkerFlags options); + + /** Sets the left and right widths of the focal stroke at a given fraction of the distance along the given path. (If lengthFraction + is within 0.001 of an existing t value in the width profile, modifies the existing width at that t value + rather than inserting a new one.) +
  • If there is already an uncentered width profile, it inserts the indicated values into it.
  • +
  • If left and right widths are equal and there is already a centered width profile, inserts their sum into it.
  • +
  • If left and right widths are unequal and there is not yet an uncentered width profile, or if they are equal + and there is not yet any width profile, it creates one from the current stroke source and then modifies it + and sets the stroke-width source to \c #kUserProfile.
+ + @param path The path. + @param lengthFraction A fraction of the distance along the path at which to set the width. If within 0.001 of an existing t value + in the width profile, modifies the existing width at that t value rather than inserting a new one. + @param leftWidth The new left width. + @param rightWidth The new right width. + @param options A logical OR of bit flags that determine how to perform the operation. + */ + AIAPI AIErr (*SetUncenteredWidthsAtDistance)(AIArtHandle path, AIReal lengthFraction, + AIReal leftWidth, AIReal rightWidth, WidthMarkerFlags options); + + /** Moves the width marker at the given index to a new t value. If the given marker is incoming-only or + outgoing-only due to two markers being at the same t value, both are moved together. + Only the content of the tValue array changes, so this works for either centered or non-centered widths. + + @param path The path. + @param markerIndex The 0-based index position of the marker to move. + @param newTValue [in, out] Fraction of length along whole path to which the marker should be moved. + In the range [0-1]. + @param options A logical OR of bit flags that determine how to perform the operation: +
  • If \c #kCopyMarker is on, the marker is duplicated and the new copy moved, while the old + one remains at the prior location. There must always be a marker at 0 and one at 1, + so any movement of the first or last marker is implicitly a duplication even if this flag is off.
  • +
  • If \c #kSpreadWidthChanges is on, the other markers on the side that this marker is moving + away from are spread out proportionally to cover the larger distance, and the other markers + on the side that this marker is moving towards are compressed proportionally to fit in the + smaller distance. The scope of the spreading is limited by the selection state and corner + status of the adjacent anchor points.
  • +
  • If \c #kSpreadWidthChanges is off and \c #kLimitAtNeighbors is on, and there is another width marker + between the current t value at the given index and the new t value, then the marker stops + when it hits the adjacent marker. No error code is returned in this case, but \c newTValue + is updated to the actual destination. To determine whether it stopped, cache the original + value and compare with the returned value. + (Note that this causes the two markers at the same location to become an incoming-only + outgoing only pair where the width may jump discontinuously.)
  • +
  • If \c #kSpreadWidthChanges and \c #kLimitAtNeighbors are both off, then the moved marker is allowed + to jump past other markers as if they were not there.
  • +
+ @return The error \c #kBadParameterErr if the path does not have a user width profile or + if the new t value is not in the range [0-1]. + */ + AIAPI AIErr (*SlideWidthMarkerToNewT)(AIArtHandle path, ai::int16 markerIndex, AIReal &newTValue, WidthMarkerFlags options); + + /** Deletes the width point at the given index position from the given path. The first and last width points cannot be deleted. + + @param path The path. + @param markerIndex The index position of the point to delete. + */ + AIAPI AIErr (*DeleteWidthPoint)(AIArtHandle path, ai::int16 markerIndex); + + /** Adds, removes, or reindexes width profile anchors as needed before editing a path. + An editing tool or command calls this before modifying the geometry of a path + or applying a different art style. + + Modifies anchors at a subset of the same places that cause \c #kSelectorAINotifyEdits + to be sent to plug-in groups ancestral to the edited path. It is not necessary to send this message + if the path is being transformed in its entirety in a way that does not change the relative lengths + of path segments. + + If width anchors already exist at the relevant anchor points, and the numbers of anchor points are + not changing, does nothing. + + @param path The path to be edited. + @param editDescription The type of edit to be done. + */ + AIAPI AIErr (*AdjustWidthAnchorsBeforePathEdit)(AIArtHandle path, const PathEditDescription &editDescription); + + /** Tests whether a cursor point on a path is within a given tolerance of the region covered by the stroke, and if + so, reports additional details about what part of the stroke was hit; see \c #StrokeHitResults. + For brush strokes, the entire region within the brush design's tile box is considered to be stroked. + + @param path The path. + @param cursor The cursor point. + @param tolerance The tolerance value. + @param hitResults A buffer in which to return the result. + */ + AIAPI AIErr (*StrokeHitTest)(AIArtHandle path, const AIRealPoint &cursor, AIReal tolerance, StrokeHitResults *hitResults); + +}; + +#include "AIHeaderEnd.h" +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBlock.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBlock.h index 540e49c..ab458c6 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBlock.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIBlock.h @@ -1,112 +1,112 @@ -#ifndef __AIBlock__ -#define __AIBlock__ - -/* - * Name: AIBlock.h - * $Revision: 5 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Memory Management Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIBlock.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIBlockSuite "AI Block Suite" -#define kAIBlockSuiteVersion AIAPI_VERSION(4) -#define kAIBlockVersion kAIBlockSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides a cross-platform way to manage memory. - Use it to request, release, and resize blocks of memory. - The functions are analogous to the standard C library memory allocation - routines or the Mac OS pointer routines. - - In some situations, Illustrator expects memory to be allocated with this suite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIBlockSuite and \c #kAIBlockVersion. -*/ -typedef struct { - /** Allocates new block of memory. - This call is similar to the standard C library \c malloc routine and - the Macintosh Toolbox \c NewPtr. - @param size The number of bytes to allocate. - @param block [out] A buffer in which to return the pointer to - the newly allocated block. - @return The error \c kOutOfMemoryErr if the function fails - due to lack of memory. - */ - AIAPI AIErr (*AllocateBlock) ( size_t size, void **block ); - /** Releases a block of memory previously allocated with \c #AllocateBlock(). - This call is similar to the standard C library \c free function and - the Macintosh Toolbox \c DisposPtr. - @param block A pointer to the allocated block. - */ - AIAPI AIErr (*DisposeBlock) ( void *block ); - - /** Changes the size of a previously allocated memory block. - This function is similar to the standard C library \c realloc function - and the Macintosh Toolbox \c SetPtrSize. - The function tries to increase the size of the block without changing - its location. If there is not room on the heap, the block is moved and - the new location returned. - @param block A pointer to the previously allocated block. - @param size The number of bytes to allocate. - @param NewBlock [out] A buffer in which to return the pointer to - the newly allocated block. - @return The error \c kOutOfMemoryErr if the function fails - due to lack of memory. - */ - AIAPI AIErr (*ReallocateBlock) ( void *block, size_t newSize, void **newBlock ); - - /** Gets number of bytes in a memory block. - @param block A pointer to the previously allocated block. - @param size [out] A buffer in which to return the number of bytes. - */ - AIAPI AIErr (*SizeOfMemoryBlock) ( void *block, size_t *size ); - -} AIBlockSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIBlock__ +#define __AIBlock__ + +/* + * Name: AIBlock.h + * $Revision: 5 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Memory Management Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIBlock.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIBlockSuite "AI Block Suite" +#define kAIBlockSuiteVersion AIAPI_VERSION(4) +#define kAIBlockVersion kAIBlockSuiteVersion + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides a cross-platform way to manage memory. + Use it to request, release, and resize blocks of memory. + The functions are analogous to the standard C library memory allocation + routines or the Mac OS pointer routines. + + In some situations, Illustrator expects memory to be allocated with this suite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIBlockSuite and \c #kAIBlockVersion. +*/ +typedef struct { + /** Allocates new block of memory. + This call is similar to the standard C library \c malloc routine and + the Macintosh Toolbox \c NewPtr. + @param size The number of bytes to allocate. + @param block [out] A buffer in which to return the pointer to + the newly allocated block. + @return The error \c kOutOfMemoryErr if the function fails + due to lack of memory. + */ + AIAPI AIErr (*AllocateBlock) ( size_t size, void **block ); + /** Releases a block of memory previously allocated with \c #AllocateBlock(). + This call is similar to the standard C library \c free function and + the Macintosh Toolbox \c DisposPtr. + @param block A pointer to the allocated block. + */ + AIAPI AIErr (*DisposeBlock) ( void *block ); + + /** Changes the size of a previously allocated memory block. + This function is similar to the standard C library \c realloc function + and the Macintosh Toolbox \c SetPtrSize. + The function tries to increase the size of the block without changing + its location. If there is not room on the heap, the block is moved and + the new location returned. + @param block A pointer to the previously allocated block. + @param size The number of bytes to allocate. + @param NewBlock [out] A buffer in which to return the pointer to + the newly allocated block. + @return The error \c kOutOfMemoryErr if the function fails + due to lack of memory. + */ + AIAPI AIErr (*ReallocateBlock) ( void *block, size_t newSize, void **newBlock ); + + /** Gets number of bytes in a memory block. + @param block A pointer to the previously allocated block. + @param size [out] A buffer in which to return the number of bytes. + */ + AIAPI AIErr (*SizeOfMemoryBlock) ( void *block, size_t *size ); + +} AIBlockSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICMS.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICMS.h index 2f5b698..c9bcd52 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICMS.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICMS.h @@ -1,75 +1,75 @@ -#ifndef __AICMS__ -#define __AICMS__ - -/* - * Name: AICMS.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Color Management System (CMS) Suite - * (Currently just a notifier) - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1996-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ -#include "AITypes.h" - - -#include "AIHeaderBegin.h" - -/** @file AICMS.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ -#define kAICMSSuite "AI Color Management System Suite" -#define kAICMSSuiteVersion AIAPI_VERSION(3) -#define kAICMSVersion kAICMSSuiteVersion - -/** @ingroup Notifiers - Sent whenever the color management settings for are changed. - */ -#define kAIColorCalibrationChangedNotifier "AI Color Calibration Changed Notifier" - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -// Internal (placeholder for further development) -/* -typedef struct { - AIAPI AIErr (*NothingDefinedYet) ( void ); -} AICMSSuite; -*/ - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AICMS__ +#define __AICMS__ + +/* + * Name: AICMS.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Color Management System (CMS) Suite + * (Currently just a notifier) + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1996-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ +#include "AITypes.h" + + +#include "AIHeaderBegin.h" + +/** @file AICMS.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ +#define kAICMSSuite "AI Color Management System Suite" +#define kAICMSSuiteVersion AIAPI_VERSION(3) +#define kAICMSVersion kAICMSSuiteVersion + +/** @ingroup Notifiers + Sent whenever the color management settings for are changed. + */ +#define kAIColorCalibrationChangedNotifier "AI Color Calibration Changed Notifier" + +/******************************************************************************* + ** + ** Types + ** + **/ + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +// Internal (placeholder for further development) +/* +typedef struct { + AIAPI AIErr (*NothingDefinedYet) ( void ); +} AICMSSuite; +*/ + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXS.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXS.h index d02d977..245d70b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXS.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXS.h @@ -1,25 +1,25 @@ -#ifndef _AICSXS_H_ -#define _AICSXS_H_ -/* -* Name: AICSXS.h -* Date: Started 2010 -* Purpose: Adobe Illustrator CSXS Header. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -/** @ingroup Notifiers -Sent after CSXS PlugPlug setup completion. -*/ -#define kAICSXSPlugPlugSetupCompleteNotifier "AI CSXS PlugPlug Setup Complete" - -#endif //_AICSXS_H_ +#ifndef _AICSXS_H_ +#define _AICSXS_H_ +/* +* Name: AICSXS.h +* Date: Started 2010 +* Purpose: Adobe Illustrator CSXS Header. +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2009 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +/** @ingroup Notifiers +Sent after CSXS PlugPlug setup completion. +*/ +#define kAICSXSPlugPlugSetupCompleteNotifier "AI CSXS PlugPlug Setup Complete" + +#endif //_AICSXS_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXSExtension.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXSExtension.h index 3a67def..70c4564 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXSExtension.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICSXSExtension.h @@ -1,139 +1,139 @@ -#ifndef _AICSXSExtension_H_ -#define _AICSXSExtension_H_ -//======================================================================================== -// -// ADOBE CONFIDENTIAL -// -// Owner: -// -// Author: -// -// $DateTime: $ -// -// $Revision: $ -// -// $Change: $ -// -// Copyright 2015 Adobe Systems Incorporated -// All Rights Reserved. -// -// NOTICE: All information contained herein is, and remains -// the property of Adobe Systems Incorporated and its suppliers, -// if any. The intellectual and technical concepts contained -// herein are proprietary to Adobe Systems Incorporated and its -// suppliers and are protected by trade secret or copyright law. -// Dissemination of this information or reproduction of this material -// is strictly forbidden unless prior written permission is obtained -// from Adobe Systems Incorporated. -// -//======================================================================================== - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AICSXSExtension.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAICSXSExtensionSuite "AI CSXS Extension Suite" -#define kAICSXSExtensionSuiteVersion AIAPI_VERSION(4) -#define kAICSXSExtensionVersion kAICSXSExtensionSuiteVersion - -#define kAICSXSExtensionUnloadNotifier "Extension Unloaded Notifier" - -#define kAICSXSExtensionLoadNotifier "Extension Loaded Notifier" - -#define kAICSXSPanelVisibilityChangeNotifier "Extension Panel Visibility Changed Notifier" -/** - Constants for reporting the status of Creative Suite extensions. - See \c #AICSXSExtensionSuite::GetExtensionState(). -*/ -enum AICSXSExtensionState -{ - /** Extension is not registered in Illustrator. */ - kAICSXSExtensionNotRegisteredState, - /** Extension is registered in Illustrator and ready to load. */ - kAICSXSExtensionRegisteredState, - /** Extension is loaded. */ - kAICSXSExtensionLoadedState, - /** Extension is loaded and Visible , valid for Panel and Dashboard Extension as of AI 19.2. */ - kAICSXSExtensionLoadedVisibleState, - /** Extension is loaded but inVisible , valid for Panel and Dashboard Extension as of AI 19.2. */ - kAICSXSExtensionLoadedInvisibleState, - /** Extension is unloaded. */ - kAICSXSExtensionUnLoadedState, - /** Internal use */ - kCSXSExtensionMaximumState = 0xffff - -}; - -typedef struct AICSXSExtensionNotifierMsg -{ - AICSXSExtensionState state; - const char* extensionId; -}AICSXSExtensionNotifierMsg; - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites - This suite provides access to information about the status of Creative Suite - extensions that might be loaded into Illustrator. - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICSXSExtensionSuite and \c #kAICSXSExtensionVersion. -*/ -typedef struct { - - /** Retrieves the current registration and load state of an extension. - @param extensionId [in] The unique identifier of the extension. - @param state [out] A buffer in which to return the current state, an \c #AICSXSExtensionState constant value. - */ - AIAPI AIErr (*GetExtensionState) (const char* extensionId, ai::int32& state); - - /** Reports whether an extension's main window is currently visible in the UI. - @param extensionId [in] The unique identifier of the extension. - @param isVisible [out] True if the extension's main window appears in the UI, false otherwise. - */ - AIAPI AIErr (*IsPrimaryStageVisible) (const char* extensionId, AIBoolean& isVisible); - - /** Launches extension of specified extension ID - @param extensionId [in] The unique identifier of the extension. - */ - AIAPI AIErr (*LaunchExtension) (const char* extensionId); - - /** Sends Provided Event To Extension with the provided data - @param extensionId [in] The unique identifier of the extension. - @param eventID [in] The unique identifier of the event. - @param appId [in] The unique identifier of Application. - @param data [in] data is optional. it can be used to send some data to extension along with the event - */ - AIAPI AIErr (*SendEventToExtension) (const char* extensionId, const char* eventID, const char* appId, const char* data); - - /** Sets the visibility of a panel. - NOTE: This suite function does not "launch" any extension. It simply changes visibility state of container of the input extension - If you need to know the "launch" status of an extension use GetExtensionState. - @param extensionId [in] The unique identifier of the extension. - @param show [in] weather to show/hide the extension panel. - **/ - AIAPI AIErr (*ShowExtension) (const char* extensionId, bool show); - - /** Unloads extension of specified extension ID - @param extensionId [in] The unique identifier of the extension. - */ - AIAPI AIErr(*UnloadExtension) (const char* extensionId); -} AICSXSExtensionSuite; - -#include "AIHeaderEnd.h" - -#endif //_AICSXSExtension_H_ +#ifndef _AICSXSExtension_H_ +#define _AICSXSExtension_H_ +//======================================================================================== +// +// ADOBE CONFIDENTIAL +// +// Owner: +// +// Author: +// +// $DateTime: $ +// +// $Revision: $ +// +// $Change: $ +// +// Copyright 2015 Adobe Systems Incorporated +// All Rights Reserved. +// +// NOTICE: All information contained herein is, and remains +// the property of Adobe Systems Incorporated and its suppliers, +// if any. The intellectual and technical concepts contained +// herein are proprietary to Adobe Systems Incorporated and its +// suppliers and are protected by trade secret or copyright law. +// Dissemination of this information or reproduction of this material +// is strictly forbidden unless prior written permission is obtained +// from Adobe Systems Incorporated. +// +//======================================================================================== + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AICSXSExtension.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAICSXSExtensionSuite "AI CSXS Extension Suite" +#define kAICSXSExtensionSuiteVersion AIAPI_VERSION(4) +#define kAICSXSExtensionVersion kAICSXSExtensionSuiteVersion + +#define kAICSXSExtensionUnloadNotifier "Extension Unloaded Notifier" + +#define kAICSXSExtensionLoadNotifier "Extension Loaded Notifier" + +#define kAICSXSPanelVisibilityChangeNotifier "Extension Panel Visibility Changed Notifier" +/** + Constants for reporting the status of Creative Suite extensions. + See \c #AICSXSExtensionSuite::GetExtensionState(). +*/ +enum AICSXSExtensionState +{ + /** Extension is not registered in Illustrator. */ + kAICSXSExtensionNotRegisteredState, + /** Extension is registered in Illustrator and ready to load. */ + kAICSXSExtensionRegisteredState, + /** Extension is loaded. */ + kAICSXSExtensionLoadedState, + /** Extension is loaded and Visible , valid for Panel and Dashboard Extension as of AI 19.2. */ + kAICSXSExtensionLoadedVisibleState, + /** Extension is loaded but inVisible , valid for Panel and Dashboard Extension as of AI 19.2. */ + kAICSXSExtensionLoadedInvisibleState, + /** Extension is unloaded. */ + kAICSXSExtensionUnLoadedState, + /** Internal use */ + kCSXSExtensionMaximumState = 0xffff + +}; + +typedef struct AICSXSExtensionNotifierMsg +{ + AICSXSExtensionState state; + const char* extensionId; +}AICSXSExtensionNotifierMsg; + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites + This suite provides access to information about the status of Creative Suite + extensions that might be loaded into Illustrator. + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAICSXSExtensionSuite and \c #kAICSXSExtensionVersion. +*/ +typedef struct { + + /** Retrieves the current registration and load state of an extension. + @param extensionId [in] The unique identifier of the extension. + @param state [out] A buffer in which to return the current state, an \c #AICSXSExtensionState constant value. + */ + AIAPI AIErr (*GetExtensionState) (const char* extensionId, ai::int32& state); + + /** Reports whether an extension's main window is currently visible in the UI. + @param extensionId [in] The unique identifier of the extension. + @param isVisible [out] True if the extension's main window appears in the UI, false otherwise. + */ + AIAPI AIErr (*IsPrimaryStageVisible) (const char* extensionId, AIBoolean& isVisible); + + /** Launches extension of specified extension ID + @param extensionId [in] The unique identifier of the extension. + */ + AIAPI AIErr (*LaunchExtension) (const char* extensionId); + + /** Sends Provided Event To Extension with the provided data + @param extensionId [in] The unique identifier of the extension. + @param eventID [in] The unique identifier of the event. + @param appId [in] The unique identifier of Application. + @param data [in] data is optional. it can be used to send some data to extension along with the event + */ + AIAPI AIErr (*SendEventToExtension) (const char* extensionId, const char* eventID, const char* appId, const char* data); + + /** Sets the visibility of a panel. + NOTE: This suite function does not "launch" any extension. It simply changes visibility state of container of the input extension + If you need to know the "launch" status of an extension use GetExtensionState. + @param extensionId [in] The unique identifier of the extension. + @param show [in] weather to show/hide the extension panel. + **/ + AIAPI AIErr (*ShowExtension) (const char* extensionId, bool show); + + /** Unloads extension of specified extension ID + @param extensionId [in] The unique identifier of the extension. + */ + AIAPI AIErr(*UnloadExtension) (const char* extensionId); +} AICSXSExtensionSuite; + +#include "AIHeaderEnd.h" + +#endif //_AICSXSExtension_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICharacterEncoding.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICharacterEncoding.h index 77b7ee3..0f167d1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICharacterEncoding.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICharacterEncoding.h @@ -1,267 +1,267 @@ -#ifndef __AICharacterEncoding__ -#define __AICharacterEncoding__ - -/* - * Name: AICharacterEncoding.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Character Encoding Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2003-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AICharacterEncoding.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAICharacterEncodingSuite "AI Character Encoding Suite" -#define kAICharacterEncodingSuiteVersion5 AIAPI_VERSION(5) -#define kAICharacterEncodingSuiteVersion kAICharacterEncodingSuiteVersion5 -#define kAICharacterEncodingVersion kAICharacterEncodingSuiteVersion - - -/** Constant values for the various character encodings supported by this suite. - The character sets for the specific language encodings (Roman, Japanese, and so on) - are platform specific. The character sets for the specific East Asian encodings - (GB, JISX0213, and so on) are standard. - See \c #AICharacterEncodingSuite::ConvertBuffer().*/ -typedef enum { - - /** The character set currently supported by the system. */ - kAIPlatformCharacterEncoding = 0, - /** UTF8 encoding */ - kAIUTF8CharacterEncoding, - /** UTF16 encoding (formerly \c kAIUCS2CharacterEncoding) */ - kAIUTF16CharacterEncoding, - // The encodings below are new in Illustrator 11.0 - /** Roman */ - kAIRomanCharacterEncoding = 0x10, - /** Japanese, encoded using Shift-JIS */ - kAIJapaneseCharacterEncoding, - /** Traditional Chinese */ - kAITraditionalChineseCharacterEncoding, - /** Simplified Chinese */ - kAISimplifiedChineseCharacterEncoding, - /** Korean */ - kAIKoreanCharacterEncoding, - /** Arabic */ - kAIArabicCharacterEncoding, - /** Hebrew */ - kAIHebrewCharacterEncoding, - /** Greek */ - kAIGreekCharacterEncoding, - /** Cyrillic */ - kAICyrillicCharacterEncoding, - /** Central European Roman (also known as Eastern European Roman) */ - kAICentralEuroRomanCharacterEncoding, - /** Turkish */ - kAITurkishCharacterEncoding, - /** Baltic */ - kAIBalticCharacterEncoding, - /** Romanian */ - kAIRomanianCharacterEncoding, - /** Ukrainian */ - kAIUkrainianCharacterEncoding, - - //dsvoboda: let's add multiplatform encodings - kAICentralEuropeanRomanCharacterEncoding = kAICentralEuroRomanCharacterEncoding, // for WR naming compatibility - kAIIcelandicCharacterEncoding = 0x1C, // kAICentralEuroRomanCharacterEncoding + 2 - kAICroatianCharacterEncoding, - kAIMacRomanCharacterEncoding, - kAIWinRomanCharacterEncoding, - kAIMacArabicCharacterEncoding, - kAIWinArabicCharacterEncoding, - kAIMacHebrewCharacterEncoding, - kAIWinHebrewCharacterEncoding, - kAIMacGreekCharacterEncoding, - kAIWinGreekCharacterEncoding, - kAIMacCyrillicCharacterEncoding, - kAIWinCyrillicCharacterEncoding, - kAIMacCentralEuroRomanCharacterEncoding, - kAIMacCentralEuropeanRomanCharacterEncoding = kAIMacCentralEuroRomanCharacterEncoding, // for WR naming compatibility - kAIWinCentralEuroRomanCharacterEncoding, - kAIWinCentralEuropeanRomanCharacterEncoding = kAIWinCentralEuroRomanCharacterEncoding, // for WR naming compatibility - kAIMacIcelandicCharacterEncoding, - kAIWinIcelandicCharacterEncoding, - kAIMacTurkishCharacterEncoding, - kAIWinTurkishCharacterEncoding, - kAIMacCroatianCharacterEncoding, - kAIWinCroatianCharacterEncoding, - kAIMacRomanianCharacterEncoding, - kAIWinRomanianCharacterEncoding, - kAIMacUkrainianCharacterEncoding, - kAIWinUkrainianCharacterEncoding, - kAIMacBalticCharacterEncoding, - kAIWinBalticCharacterEncoding, - - - - // Platform-independent encodings - East Asian character standards - /** Japanese, JISX0213:2000 + JISX0208:1997, using Shift-JIS */ - kAIJapaneseX0213CharacterEncoding = 0x00000100, - /** Chinese, GB 18030-2000 */ - kAIChineseGB18030CharacterEncoding, - /** Chinese, HKSCS */ - kAIChineseHKSCSCharacterEncoding, - /** SymbolEnCoding */ - kAISymbolCharacterEncoding, - - kAIDummyCharacterEncoding = 0xFFFFFFFF - -} AICharacterEncoding; - - -/** Constant values for ways to encode characters in the JIS character set. - See \c #AICharacterEncodingSuite::ConvertJapaneseChar(). */ -typedef enum { - /** Shift-JIS */ - kAISJISEncoding, - /** JISX0208:1997 */ - kAIJISEncoding, - /** Kuten */ - kAIKutenEncoding, - - kAIDummyJapaneseEncoding = 0xFFFFFFFF - -} AIJapaneseEncoding; - -/* Error codes */ - -/** @ingroup Errors - Returned from \c #AICharacterEncodingSuite::ConvertBuffer() - when the conversion requires more bytes than specified in - \c dstBytes. */ -#define kDstBufferTooShortErr 'Shrt' - -/** Returned from \c #AICharacterEncodingSuite::ConvertBuffer() - when \c srcBuffer contains bytes that are invalid in the - given \c srcEncoding. */ -#define kSrcHasInvalidBytesErr 'InvB' - -/** Returned from \c #AICharacterEncodingSuite::ConvertBuffer() - when \c srcBuffer contains bytes that cannot be mapped to - the destination encodings. */ -#define kSrcCantMapBytesErr '!Map' - -/** Returned from \c #AICharacterEncodingSuite::ConvertBuffer() - when \c srcBuffer contains bytes that cannot be mapped exactly. */ -#define kSrcCantMapBytesExactlyErr '~Map' - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - The character encoding suite provides facilities for translating between different - encodings of textual data. See also \c ai::EncodedString, which provides a C++ class - for translating between platform encoding, UTF8, and UTF16. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICharacterEncodingSuite and \c #kAICharacterEncodingVersion. -*/ - -typedef struct AICharacterEncodingSuite { - - /** Converts text from one encoding to another. - - Unicode 3 values are always used as the intermediate representation - during the translation between the source and the destination encodings. - Byte order of UTF16 Unicode values are dictated by the current platform - (big-endian in Mac OS, little-endian in Windows). - - If some characters do not map exactly, a loose or fallback mapping is used. - If some characters cannot be mapped, the source characters are dropped from - the destination buffer. - @param srcBuffer The buffer containing the text. - @param srcBytes The number of bytes in \c srcBuffer. - @param srcEncoding The encoding used by the text in \c srcBuffer. - @param dstBuffer [out] A buffer in which to return the converted text. - @param dstBytes The number of bytes in \c dstBuffer. - @param dstEncoding The encoding to which to convert the text. - @param dstLength [out] A buffer in which to return the number of bytes - written to \c dstBuffer. - @param errIfCantMap When true, return error codes when characters do not - map exactly. - */ - AIAPI AIErr (*ConvertBuffer) ( - const void* srcBuffer, size_t srcBytes, AICharacterEncoding srcEncoding, - void* dstBuffer, size_t dstBytes, AICharacterEncoding dstEncoding, - size_t* dstLength, AIBoolean errIfCantMap); - - /* New in Illustrator 11.0 */ - - /** Converts a Japanese character from one Japanese encoding to another. - @param srcEncoding The encoding currently used for \c ch. - @param dstEncoding The encoding to which to convert the character. - @param ch [in, out] A pointer to the Japanese character, represented as an unsigned short. - @return The error \c #kBadParameterErr if \c ch is not within a valid range for \c srcEncoding. -
The error \c #kBadParameterErr if \c ch is a single-byte Shift-JIS character - (used to represent ASCII and half-width katakana characters). Such characters cannot be - converted to JIS X 0208 or Kuten. - */ - AIAPI AIErr (*ConvertJapaneseChar) ( - AIJapaneseEncoding srcEncoding, AIJapaneseEncoding dstEncoding, ai::uint16* ch ); - - // The following two functions provide limited cross-platform support for classifying - // Unicode characters. - - /** Reports whether a given Unicode (UTF16) character is categorized as a punctuation - character. Only supports characters in the BMP (Basic Multilingual Plane). - (Note that this function returns a Boolean value, not an error code) - @param inChar The character. - @return True if the character is punctuation. - */ - AIAPI AIBool8 (*IsPunct)(ASUnicode inChar); - - /** Reports whether a given Unicode (UTF16) character is categorized as a spacing - character. Only supports characters in the BMP (Basic Multilingual Plane). - (Note that this function returns a Boolean value, not an error code) - @param inChar The character. - @return True if the character is spacing. - */ - AIAPI AIBool8 (*IsSpace)(ASUnicode inChar); - - /** Finds the preferred encoding for a given Unicode String. - @param inUnicodeText The Unicode String. - @param inDefaultEncoding The default encoding - @param outMBCSEncoding [out] A buffer in which to return the most suitable encoding. - */ - AIAPI AIErr (*GetCheckedPreferredEncoding)(const ASUnicode* inUnicodeText, AICharacterEncoding inDefaultEncoding, AICharacterEncoding* outMBCSEncoding); - -} AICharacterEncodingSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AICharacterEncoding__ +#define __AICharacterEncoding__ + +/* + * Name: AICharacterEncoding.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator Character Encoding Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2003-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AICharacterEncoding.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAICharacterEncodingSuite "AI Character Encoding Suite" +#define kAICharacterEncodingSuiteVersion5 AIAPI_VERSION(5) +#define kAICharacterEncodingSuiteVersion kAICharacterEncodingSuiteVersion5 +#define kAICharacterEncodingVersion kAICharacterEncodingSuiteVersion + + +/** Constant values for the various character encodings supported by this suite. + The character sets for the specific language encodings (Roman, Japanese, and so on) + are platform specific. The character sets for the specific East Asian encodings + (GB, JISX0213, and so on) are standard. + See \c #AICharacterEncodingSuite::ConvertBuffer().*/ +typedef enum { + + /** The character set currently supported by the system. */ + kAIPlatformCharacterEncoding = 0, + /** UTF8 encoding */ + kAIUTF8CharacterEncoding, + /** UTF16 encoding (formerly \c kAIUCS2CharacterEncoding) */ + kAIUTF16CharacterEncoding, + // The encodings below are new in Illustrator 11.0 + /** Roman */ + kAIRomanCharacterEncoding = 0x10, + /** Japanese, encoded using Shift-JIS */ + kAIJapaneseCharacterEncoding, + /** Traditional Chinese */ + kAITraditionalChineseCharacterEncoding, + /** Simplified Chinese */ + kAISimplifiedChineseCharacterEncoding, + /** Korean */ + kAIKoreanCharacterEncoding, + /** Arabic */ + kAIArabicCharacterEncoding, + /** Hebrew */ + kAIHebrewCharacterEncoding, + /** Greek */ + kAIGreekCharacterEncoding, + /** Cyrillic */ + kAICyrillicCharacterEncoding, + /** Central European Roman (also known as Eastern European Roman) */ + kAICentralEuroRomanCharacterEncoding, + /** Turkish */ + kAITurkishCharacterEncoding, + /** Baltic */ + kAIBalticCharacterEncoding, + /** Romanian */ + kAIRomanianCharacterEncoding, + /** Ukrainian */ + kAIUkrainianCharacterEncoding, + + //dsvoboda: let's add multiplatform encodings + kAICentralEuropeanRomanCharacterEncoding = kAICentralEuroRomanCharacterEncoding, // for WR naming compatibility + kAIIcelandicCharacterEncoding = 0x1C, // kAICentralEuroRomanCharacterEncoding + 2 + kAICroatianCharacterEncoding, + kAIMacRomanCharacterEncoding, + kAIWinRomanCharacterEncoding, + kAIMacArabicCharacterEncoding, + kAIWinArabicCharacterEncoding, + kAIMacHebrewCharacterEncoding, + kAIWinHebrewCharacterEncoding, + kAIMacGreekCharacterEncoding, + kAIWinGreekCharacterEncoding, + kAIMacCyrillicCharacterEncoding, + kAIWinCyrillicCharacterEncoding, + kAIMacCentralEuroRomanCharacterEncoding, + kAIMacCentralEuropeanRomanCharacterEncoding = kAIMacCentralEuroRomanCharacterEncoding, // for WR naming compatibility + kAIWinCentralEuroRomanCharacterEncoding, + kAIWinCentralEuropeanRomanCharacterEncoding = kAIWinCentralEuroRomanCharacterEncoding, // for WR naming compatibility + kAIMacIcelandicCharacterEncoding, + kAIWinIcelandicCharacterEncoding, + kAIMacTurkishCharacterEncoding, + kAIWinTurkishCharacterEncoding, + kAIMacCroatianCharacterEncoding, + kAIWinCroatianCharacterEncoding, + kAIMacRomanianCharacterEncoding, + kAIWinRomanianCharacterEncoding, + kAIMacUkrainianCharacterEncoding, + kAIWinUkrainianCharacterEncoding, + kAIMacBalticCharacterEncoding, + kAIWinBalticCharacterEncoding, + + + + // Platform-independent encodings - East Asian character standards + /** Japanese, JISX0213:2000 + JISX0208:1997, using Shift-JIS */ + kAIJapaneseX0213CharacterEncoding = 0x00000100, + /** Chinese, GB 18030-2000 */ + kAIChineseGB18030CharacterEncoding, + /** Chinese, HKSCS */ + kAIChineseHKSCSCharacterEncoding, + /** SymbolEnCoding */ + kAISymbolCharacterEncoding, + + kAIDummyCharacterEncoding = 0xFFFFFFFF + +} AICharacterEncoding; + + +/** Constant values for ways to encode characters in the JIS character set. + See \c #AICharacterEncodingSuite::ConvertJapaneseChar(). */ +typedef enum { + /** Shift-JIS */ + kAISJISEncoding, + /** JISX0208:1997 */ + kAIJISEncoding, + /** Kuten */ + kAIKutenEncoding, + + kAIDummyJapaneseEncoding = 0xFFFFFFFF + +} AIJapaneseEncoding; + +/* Error codes */ + +/** @ingroup Errors + Returned from \c #AICharacterEncodingSuite::ConvertBuffer() + when the conversion requires more bytes than specified in + \c dstBytes. */ +#define kDstBufferTooShortErr 'Shrt' + +/** Returned from \c #AICharacterEncodingSuite::ConvertBuffer() + when \c srcBuffer contains bytes that are invalid in the + given \c srcEncoding. */ +#define kSrcHasInvalidBytesErr 'InvB' + +/** Returned from \c #AICharacterEncodingSuite::ConvertBuffer() + when \c srcBuffer contains bytes that cannot be mapped to + the destination encodings. */ +#define kSrcCantMapBytesErr '!Map' + +/** Returned from \c #AICharacterEncodingSuite::ConvertBuffer() + when \c srcBuffer contains bytes that cannot be mapped exactly. */ +#define kSrcCantMapBytesExactlyErr '~Map' + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + The character encoding suite provides facilities for translating between different + encodings of textual data. See also \c ai::EncodedString, which provides a C++ class + for translating between platform encoding, UTF8, and UTF16. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAICharacterEncodingSuite and \c #kAICharacterEncodingVersion. +*/ + +typedef struct AICharacterEncodingSuite { + + /** Converts text from one encoding to another. + + Unicode 3 values are always used as the intermediate representation + during the translation between the source and the destination encodings. + Byte order of UTF16 Unicode values are dictated by the current platform + (big-endian in Mac OS, little-endian in Windows). + + If some characters do not map exactly, a loose or fallback mapping is used. + If some characters cannot be mapped, the source characters are dropped from + the destination buffer. + @param srcBuffer The buffer containing the text. + @param srcBytes The number of bytes in \c srcBuffer. + @param srcEncoding The encoding used by the text in \c srcBuffer. + @param dstBuffer [out] A buffer in which to return the converted text. + @param dstBytes The number of bytes in \c dstBuffer. + @param dstEncoding The encoding to which to convert the text. + @param dstLength [out] A buffer in which to return the number of bytes + written to \c dstBuffer. + @param errIfCantMap When true, return error codes when characters do not + map exactly. + */ + AIAPI AIErr (*ConvertBuffer) ( + const void* srcBuffer, size_t srcBytes, AICharacterEncoding srcEncoding, + void* dstBuffer, size_t dstBytes, AICharacterEncoding dstEncoding, + size_t* dstLength, AIBoolean errIfCantMap); + + /* New in Illustrator 11.0 */ + + /** Converts a Japanese character from one Japanese encoding to another. + @param srcEncoding The encoding currently used for \c ch. + @param dstEncoding The encoding to which to convert the character. + @param ch [in, out] A pointer to the Japanese character, represented as an unsigned short. + @return The error \c #kBadParameterErr if \c ch is not within a valid range for \c srcEncoding. +
The error \c #kBadParameterErr if \c ch is a single-byte Shift-JIS character + (used to represent ASCII and half-width katakana characters). Such characters cannot be + converted to JIS X 0208 or Kuten. + */ + AIAPI AIErr (*ConvertJapaneseChar) ( + AIJapaneseEncoding srcEncoding, AIJapaneseEncoding dstEncoding, ai::uint16* ch ); + + // The following two functions provide limited cross-platform support for classifying + // Unicode characters. + + /** Reports whether a given Unicode (UTF16) character is categorized as a punctuation + character. Only supports characters in the BMP (Basic Multilingual Plane). + (Note that this function returns a Boolean value, not an error code) + @param inChar The character. + @return True if the character is punctuation. + */ + AIAPI AIBool8 (*IsPunct)(ASUnicode inChar); + + /** Reports whether a given Unicode (UTF16) character is categorized as a spacing + character. Only supports characters in the BMP (Basic Multilingual Plane). + (Note that this function returns a Boolean value, not an error code) + @param inChar The character. + @return True if the character is spacing. + */ + AIAPI AIBool8 (*IsSpace)(ASUnicode inChar); + + /** Finds the preferred encoding for a given Unicode String. + @param inUnicodeText The Unicode String. + @param inDefaultEncoding The default encoding + @param outMBCSEncoding [out] A buffer in which to return the most suitable encoding. + */ + AIAPI AIErr (*GetCheckedPreferredEncoding)(const ASUnicode* inUnicodeText, AICharacterEncoding inDefaultEncoding, AICharacterEncoding* outMBCSEncoding); + +} AICharacterEncodingSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIClipboard.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIClipboard.h index 0fb1107..e0384a6 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIClipboard.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIClipboard.h @@ -1,328 +1,242 @@ -#ifndef __AIClipboard__ -#define __AIClipboard__ - -/* - * Name: AIClipboard.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Clipboard Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2015 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIClipboard.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIClipboardSuite "AI Clipboard Suite" -#define kAIClipboardSuiteVersion4 AIAPI_VERSION(4) // In AI 20.0 -// latest version -#define kAIClipboardSuiteVersion kAIClipboardSuiteVersion4 -#define kAIClipboardVersion kAIClipboardSuiteVersion - -/** @ingroup Callers - The clipboard caller. See \c #AIClipboardSuite. */ -#define kCallerAIClipboard "AI Clipboard" - -/** @ingroup Selectors - Execute a clipboard operation. - The \c option field of the \c #AIClipboardMessage is either - \c #kClipboardCopy or \c #kClipboardPaste. Perform the - requested operation on the data in the \c ClipboardData field. - \li For paste, the data in the message is in a format handled - by your plug-in. Read the data and convert it to artwork in - the current document, but do not delete the data. - \li For copy, convert the data to the format your plug-in handles, - and store a pointer to the result in the \c ClipboardData field - of the message. - */ -#define kSelectorAIGoClipboard "AI Go" - -/** @ingroup Selectors - Prepare clipboard data asynchronously. - The \c option field of the \c #AIClipboardAsyncMessage is currently - \c #kClipboardCopy only. -*/ -#define kSelectorAIPrepareAsyncClipboard "AI Prepare Async" - -/** @ingroup Selectors - Check if you can copy the data in the current document to your format. - Return \c #kNoErr if you can and \c #kCantCopyErr - if you cannot. The \c #AIClipboardMessage does not contain meaningful data. */ -#define kSelectorAICanCopyClipboard "AI Can Copy" -/** @ingroup Selectors - Requests a duplicate of the data in the \c ClipboardData field of - \c #AIClipboardMessage, which is in a format your plug-in handles. - Make a copy, replace the \c ClipboardData with the copy, - and return \c #kNoErr. If you cannot make the copy, return an error code. -*/ -#define kSelectorAICloneClipboard "AI Clone" -/** @ingroup Selectors - Delete the data in the \c ClipboardData field of the - \c #AIClipboardMessage, which is in a format your plug-in handles. */ -#define kSelectorAIDisposeClipboard "AI Dispose" - -/** Option flags for registering a clipboard format handler with - \c #AIClipboardSuite::AddClipboard(), specifies which operations - are supported. - */ -enum AIClipboardFormatOptions { - /** This format knows how to copy to the clipboard. */ - kClipboardCopy = (1<<1), - /** This format knows how to paste from the clipboard. */ - kClipboardPaste = (1<<2), - /** This format cannot copy data to the clipboard. - If set, user cannot enable the preference - for copying data on exit. This is needed because - the \c kClipboardCopy flag is also used internally - to track the state of the user preference. - */ - kClipboardCannotCopy = (1<<3) -}; - -/** Data-preparation status values for asynchronous clipboard write operations. -See \c #AIClipboardSuite::SetClipboardDataAsyncStatus() and -\c #AIClipboardSuite::GetClipboardDataAsyncStatus(). */ -enum AIClipboardDataAsyncStatus{ - - /** Default sentinel value */ - kAICBAsyncStatus_None = 0, - - /** Clipboard data is in the process of preparation. */ - kAICBAsyncStatus_InProgress, - - /** Clipboard data preparation is cancelled by user. */ - kAICBAsyncStatus_Cancelled, - - /** Clipboard data preparation has encountered some error. */ - kAICBAsyncStatus_Error, - - /** Clipboard data preparation is successful. */ - kAICBAsyncStatus_Success, - - /** Clipboard data preparation has timed out - because the asynchronous operation failed to respond. */ - kAICBAsyncStatus_Timeout -}; - -/** @ingroup Errors - Return from \c kSelectorAICanCopyClipboard if you cannot perform copy. */ -#define kCantCopyErr 'CLP?' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Identifies a registered clipboard format handler. */ -typedef struct _t_AIClipboardOpaque *AIClipboardHandle; - -/** Identifies a resource type. */ -typedef ai::uint32 DDType; - -/** Data used to register a clipboard format handler. See - \c #AIClipboardSuite::AddClipboard(). */ -typedef struct { - /** The format name, such as "myCompany File Format" or "Rich Text Format"*/ - const char* clipboardName; - /** In Windows, the OLE data type, such as \c CF_TEXT or \c CF_BITMAP */ - ai::int32 OleType; - /** In Mac OS, the unique data resource type (\c ResType), - such as \c 'TEXT' or \c 'PICT'. Check \c AIDragDropTypes.h - to make sure it is unique. - */ - DDType uniqueType; -} AIClipboardData; - - -/** The message structure received when the clipboard format handler's main - entry point receives a message with caller \c #kCallerAIClipboard */ -typedef struct { - /** The message data */ - SPMessageData d; - /** The clipboard object. */ - AIClipboardHandle Clipboard; - /** The clipboard data */ - AIStream ClipboardData; - /** The supported clipboard operations. - A logical OR of \c #AIClipboardFormatOptions values. */ - ai::int32 option; -} AIClipboardMessage; - -/** The message structure received when the clipboard format handler's main -entry point receives a message with caller \c #kCallerAIClipboard and -selector \c #kSelectorAIPrepareAsyncClipboard. */ -struct AIClipboardAsyncMessage{ - - /** The message data. */ - SPMessageData d; - - /** The clipboard object. */ - AIClipboardHandle Clipboard; - - /** The supported clipboard operations, - a logical OR of \c #AIClipboardFormatOptions values. */ - ai::int32 option; // Currently, only kClipboardCopy is supported. -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - The clipboard suite enables plug-ins to register new clipboard format handlers. - The handler's main entry point will then receive messages requesting it to - copy data to and from the clipboard as needed. The messages have caller - \c #kCallerAIClipboard. The possible selectors are: - - \li \c #kSelectorAIGoClipboard - \li \c #kSelectorAICanCopyClipboard - \li \c #kSelectorAICloneClipboard - \li \c #kSelectorAIDisposeClipboard - - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIClipboardSuite and \c #kAIClipboardVersion. -*/ -typedef struct { - - /** Registers a new clipboard format handler. - @param self This plug-in. - @param data The types of clipboard data handled. - @param options The capabilities of the format handler. - A logical OR of \c #AIClipboardFormatOptions values. - @param Clipboard [out] A buffer in which to return the clipboard handler reference. - */ - AIAPI AIErr (*AddClipboard) ( SPPluginRef self, AIClipboardData *data, - ai::int32 options, AIClipboardHandle *Clipboard ); - /** Unregisters a clipboard format handler. - @param Clipboard The clipboard handler reference. - */ - AIAPI AIErr (*RemoveClipboard) (AIClipboardHandle Clipboard); - - /** Retrieves the registered name of a clipboard format handler. - @param Clipboard The clipboard handler reference. - @param name [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetClipboardName) (AIClipboardHandle Clipboard, const char* *name); - - /** Retrieves the Windows OLE type of the data handled by the format handler. - @param Clipboard The clipboard handler reference. - @param OleType [out] A buffer in which to return the OLE data type. - */ - AIAPI AIErr (*GetClipboardOleType) (AIClipboardHandle Clipboard, ai::int32* OleType); - - /** Retrieves the plug-in reference for the plug-in supplying the format handler. - @param Clipboard The clipboard handler reference. - @param plugin [out] A buffer in which to return the plug-in reference. - */ - AIAPI AIErr (*GetClipboardPlugin) (AIClipboardHandle Clipboard, SPPluginRef *plugin); - - /** Retrieves the Mac OS resource type of the data handled by the format handler. - @param Clipboard The clipboard handler reference. - @param uniqueType [out] A buffer in which to return the data resource type. - */ - AIAPI AIErr (*GetClipboardType) (AIClipboardHandle Clipboard, DDType *uniqueType); - - /** Retrieves the options describing the capabilities of the format handler. - @param Clipboard The clipboard handler reference. - @param options [out] A buffer in which to return the capabilities of the - format handler. A logical OR of \c #AIClipboardFormatOptions values. - */ - AIAPI AIErr (*GetClipboardOptions) (AIClipboardHandle Clipboard, ai::int32 *options); - - /** Sets the options describing the capabilities of the format handler. - @param Clipboard The clipboard handler reference. - @param options The capabilities of the format handler. - A logical OR of \c #AIClipboardFormatOptions values. - */ - AIAPI AIErr (*SetClipboardOptions) (AIClipboardHandle Clipboard, ai::int32 options); - - /** Counts the number of registered clipboard format handlers. Use with - \c #GetNthClipboard() to iterate through handlers. - @param count [out] A buffer in which to return the number of handlers. - */ - AIAPI AIErr (*CountClipboards) (ai::int32 *count); - - /** Retrieves a clipboard format handler by position index. Use with - \c #CountClipboards() to iterate through handlers. - @param n The index, in the range [0..numHandlers-1] . - @param Clipboard [out] A buffer in which to return the clipboard handler reference.*/ - AIAPI AIErr (*GetNthClipboard) (ai::int32 n, AIClipboardHandle *Clipboard); - - /** Sets the data-preparation status of an asynchronous clipboard write operation. - @param Clipboard The clipboard handler reference. - @param asyncOperationStatus The status of clipboard data, - an \c #AIClipboardDataAsyncStatus value. - */ - AIAPI AIErr(*SetClipboardDataAsyncStatus) (AIClipboardHandle Clipboard, ai::int32 asyncOperationStatus); - - /** Retrieves the data-preparation status of an asynchronous clipboard write operation. - @param Clipboard The clipboard handler reference. - @param asyncOperationStatus [out] A buffer in which to return the status of clipboard data, - an \c #AIClipboardDataAsyncStatus value. - */ - AIAPI AIErr(*GetClipboardDataAsyncStatus) (AIClipboardHandle Clipboard, ai::int32& asyncOperationStatus); - - /** Sets the value to show in the progress bar during an asynchronous clipboard write operation. - Calls \c #ResetClipboardDataAsyncOperationTimer() internally. - @param Clipboard The clipboard handler reference. - @param current A number between 0 and the specified maximum that represents how far the operation has progressed. - @param max The maximum value, representing 100% progress. - @param progressText A text message to display in the progress bar. - */ - AIAPI AIErr(*SetClipboardDataAsyncProgress) (AIClipboardHandle Clipboard, size_t current, size_t max, const ai::UnicodeString& progressText); - - /** Sets a timeout for an asynchronous clipboard write operation. - If the async operation does not communicate with the parent process within this period, - it is assumed that the process has encountered some error, and the operation is aborted. - @param Clipboard The clipboard handler reference. - @param timeout A number of seconds. <> - */ - AIAPI AIErr(*SetClipboardDataAsyncTimeout) (AIClipboardHandle Clipboard, AIReal timeout); - - /** Resets the timeout timer to 0. A client should use this to tell Illustrator that the async process - is still alive, and the clipboard write operation should continue. - @param Clipboard The clipboard handler reference. - */ - AIAPI AIErr(*ResetClipboardDataAsyncOperationTimer) (AIClipboardHandle Clipboard); - - -} AIClipboardSuite; - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIClipboard__ +#define __AIClipboard__ + +/* + * Name: AIClipboard.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Clipboard Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2015 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIClipboard.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIClipboardSuite "AI Clipboard Suite" +#define kAIClipboardSuiteVersion5 AIAPI_VERSION(5) // In AI 20.1 +// latest version +#define kAIClipboardSuiteVersion kAIClipboardSuiteVersion5 +#define kAIClipboardVersion kAIClipboardSuiteVersion + +/** @ingroup Callers + The clipboard caller. See \c #AIClipboardSuite. */ +#define kCallerAIClipboard "AI Clipboard" + +/** @ingroup Selectors + Execute a clipboard operation. + The \c option field of the \c #AIClipboardMessage is either + \c #kClipboardCopy or \c #kClipboardPaste. Perform the + requested operation on the data in the \c ClipboardData field. + \li For paste, the data in the message is in a format handled + by your plug-in. Read the data and convert it to artwork in + the current document, but do not delete the data. + \li For copy, convert the data to the format your plug-in handles, + and store a pointer to the result in the \c ClipboardData field + of the message. + */ +#define kSelectorAIGoClipboard "AI Go" + + +/** @ingroup Selectors + Check if you can copy the data in the current document to your format. + Return \c #kNoErr if you can and \c #kCantCopyErr + if you cannot. The \c #AIClipboardMessage does not contain meaningful data. */ +#define kSelectorAICanCopyClipboard "AI Can Copy" +/** @ingroup Selectors + Requests a duplicate of the data in the \c ClipboardData field of + \c #AIClipboardMessage, which is in a format your plug-in handles. + Make a copy, replace the \c ClipboardData with the copy, + and return \c #kNoErr. If you cannot make the copy, return an error code. +*/ +#define kSelectorAICloneClipboard "AI Clone" +/** @ingroup Selectors + Delete the data in the \c ClipboardData field of the + \c #AIClipboardMessage, which is in a format your plug-in handles. */ +#define kSelectorAIDisposeClipboard "AI Dispose" + +/** Option flags for registering a clipboard format handler with + \c #AIClipboardSuite::AddClipboard(), specifies which operations + are supported. + */ +enum AIClipboardFormatOptions { + /** This format knows how to copy to the clipboard. */ + kClipboardCopy = (1<<1), + /** This format knows how to paste from the clipboard. */ + kClipboardPaste = (1<<2), + /** This format cannot copy data to the clipboard. + If set, user cannot enable the preference + for copying data on exit. This is needed because + the \c kClipboardCopy flag is also used internally + to track the state of the user preference. + */ + kClipboardCannotCopy = (1<<3) +}; + +/** @ingroup Errors + Return from \c kSelectorAICanCopyClipboard if you cannot perform copy. */ +#define kCantCopyErr 'CLP?' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Identifies a registered clipboard format handler. */ +typedef struct _t_AIClipboardOpaque *AIClipboardHandle; + +/** Identifies a resource type. */ +typedef ai::uint32 DDType; + +/** Data used to register a clipboard format handler. See + \c #AIClipboardSuite::AddClipboard(). */ +typedef struct { + /** The format name, such as "myCompany File Format" or "Rich Text Format"*/ + const char* clipboardName; + /** In Windows, the OLE data type, such as \c CF_TEXT or \c CF_BITMAP */ + ai::int32 OleType; + /** In Mac OS, the unique data resource type (\c ResType), + such as \c 'TEXT' or \c 'PICT'. Check \c AIDragDropTypes.h + to make sure it is unique. + */ + DDType uniqueType; +} AIClipboardData; + +/** The message structure received when the clipboard format handler's main + entry point receives a message with caller \c #kCallerAIClipboard */ +typedef struct { + /** The message data */ + SPMessageData d; + /** The clipboard object. */ + AIClipboardHandle Clipboard; + /** The clipboard data */ + AIStream ClipboardData; + /** The supported clipboard operations. + A logical OR of \c #AIClipboardFormatOptions values. */ + ai::int32 option; +} AIClipboardMessage; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + The clipboard suite enables plug-ins to register new clipboard format handlers. + The handler's main entry point then receives messages requesting it to + copy data to and from the clipboard as needed. The messages have caller + \c #kCallerAIClipboard. The possible selectors are: + + \li \c #kSelectorAIGoClipboard + \li \c #kSelectorAICanCopyClipboard + \li \c #kSelectorAICloneClipboard + \li \c #kSelectorAIDisposeClipboard + + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIClipboardSuite and \c #kAIClipboardVersion. +*/ +typedef struct { + + /** Registers a new clipboard format handler. + @param self The plug-in. + @param data The types of clipboard data handled. + @param options The capabilities of the format handler. + A logical OR of \c #AIClipboardFormatOptions values. + @param Clipboard [out] A buffer in which to return the clipboard handler reference. + */ + AIAPI AIErr (*AddClipboard) ( SPPluginRef self, AIClipboardData *data, + ai::int32 options, AIClipboardHandle *Clipboard ); + /** Unregisters a clipboard format handler. + @param Clipboard The clipboard handler reference. + */ + AIAPI AIErr (*RemoveClipboard) (AIClipboardHandle Clipboard); + + /** Retrieves the registered name of a clipboard format handler. + @param Clipboard The clipboard handler reference. + @param name [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetClipboardName) (AIClipboardHandle Clipboard, const char* *name); + + /** Retrieves Windows OLE type of the data handled by the format handler. + @param Clipboard The clipboard handler reference. + @param OleType [out] A buffer in which to return the OLE data type. + */ + AIAPI AIErr (*GetClipboardOleType) (AIClipboardHandle Clipboard, ai::int32* OleType); + + /** Retrieves the plug-in reference for the plug-in supplying the format handler. + @param Clipboard The clipboard handler reference. + @param plugin [out] A buffer in which to return the plug-in reference. + */ + AIAPI AIErr (*GetClipboardPlugin) (AIClipboardHandle Clipboard, SPPluginRef *plugin); + + /** Retrieves Mac OS resource type of the data handled by the format handler. + @param Clipboard The clipboard handler reference. + @param uniqueType [out] A buffer in which to return the data resource type. + */ + AIAPI AIErr (*GetClipboardType) (AIClipboardHandle Clipboard, DDType *uniqueType); + + /** Retrieves the options describing the capabilities of the format handler. + @param Clipboard The clipboard handler reference. + @param options [out] A buffer in which to return the capabilities of the + format handler. A logical OR of \c #AIClipboardFormatOptions values. + */ + AIAPI AIErr (*GetClipboardOptions) (AIClipboardHandle Clipboard, ai::int32 *options); + + /** Sets the options describing the capabilities of the format handler. + @param Clipboard The clipboard handler reference. + @param options The capabilities of the format handler. + A logical OR of \c #AIClipboardFormatOptions values. + */ + AIAPI AIErr (*SetClipboardOptions) (AIClipboardHandle Clipboard, ai::int32 options); + + /** Counts the number of registered clipboard format handlers. Use with + \c #GetNthClipboard() to iterate through handlers. + @param count [out] A buffer in which to return the number of handlers. + */ + AIAPI AIErr (*CountClipboards) (ai::int32 *count); + + /** Retrieves a clipboard format handler by position index. Use with + \c #CountClipboards() to iterate through handlers. + @param n The index, in the range [0..numHandlers-1] . + @param Clipboard [out] A buffer in which to return the clipboard handler reference.*/ + AIAPI AIErr (*GetNthClipboard) (ai::int32 n, AIClipboardHandle *Clipboard); + +} AIClipboardSuite; + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICloudDocument.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICloudDocument.h new file mode 100644 index 0000000..ebc10b0 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICloudDocument.h @@ -0,0 +1,106 @@ +/************************************************************************* + * + * ADOBE CONFIDENTIAL + * + * Copyright 2020 Adobe + * + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. If you have received this file from a source other than Adobe, + * then your use, modification, or distribution of it requires the prior + * written permission of Adobe. + * + **************************************************************************/ + +#pragma once + +#include "IAIAutoBuffer.h" +#include "IAIUnicodeString.h" + +#include "AIHeaderBegin.h" + +#define kAICloudDocumentSuite "AI Cloud Document Suite" +#define kAICloudDocumentSuiteVersion AIAPI_VERSION(1) +#define kAICloudDocumentVersion kAICloudDocumentSuiteVersion + + +typedef struct _t_AICloudRecentsBookmark* AICloudRecentsBookmarkHandle; + + +struct AICloudDocumentSuite +{ + /** Saves the currently open document to cloud. + @param cloudPath The relative path to save the document. + Could simply be the name of the document. + */ + AIAPI AIErr (*SaveToCloud) ( const ai::UnicodeString& cloudPath ); + + /** Saves the currently open cloud document if it is dirty, to its existing location.*/ + AIAPI AIErr (*SaveCurrentDocument) (); + + /** Opens a cloud document present at the specified path. + @param cloudAssetRef The path of the cloud document to be opened. + @param outDocument [out] A buffer in which to return the document reference. + */ + AIAPI AIErr (*OpenCloudDocument) ( const ai::UnicodeString& cloudAssetRef, AIDocumentHandle& outDocument ); + + /** Deletes the cloud document present at the specified path. + @param cloudAssetRef The path of the cloud document to be deleted. + */ + AIAPI AIErr (*DeleteCloudDocument) ( const ai::UnicodeString& cloudAssetRef ); + + /** Gets the path to the currently open cloud document. + @param cloudAssetRef [out] The buffer in which to return the cloud path. + */ + AIAPI AIErr (*GetCloudDocumentAssetRef) ( ai::UnicodeString& cloudAssetRef ); + + /** Gets the cloud paths to the n most recently saved cloud documents. + @param numRecentDocuments The number of recent documents for which the cloud path is to be fetched. + Not more than 100 recent documents could be fetched at a time. + @param cloudAssetRefs [out] The list of the requested cloud paths. + @param queryBookmark [out] Reference to the data that is to be preserved and passed in the call to GetNextNRecentCloudDocuments. + */ + AIAPI AIErr (*GetFirstNRecentCloudDocuments) ( ai::uint32 numRecentDocuments, ai::AutoBuffer& cloudAssetRefs, AICloudRecentsBookmarkHandle& queryBookmark ); + + /** Gets the cloud paths to the next n recently saved cloud documents when the API GetFirstNRecentCloudDocuments has been called once. + This API could be used in an iterative fashion to access the next n recent documents. + @param numRecentDocuments The number of recent documents for which the cloud path is to be fetched. + @param cloudAssetRefs [out] The list of the requested cloud paths. + Not more than 100 recent documents could be fetched at a time. + @param queryBookmarkIn Reference to the data that was fetched from the call to GetFirstNRecentCloudDocuments + or from the previous call to GetNextNRecentCloudDocuments. + @param queryBookmarkOut [out] Reference to the data that is to be preserved for the next call to GetNextNRecentCloudDocuments. + + Example: + + ai::AutoBuffer recentDocRefs; + AICloudRecentsBookmarkHandle reqHandleIn = nullptr, reqHandleOut = nullptr; + + //Here we are fetching 10 recent documents, but we can fetch any number less than 100 + error = sAICloudDocument->GetFirstNRecentCloudDocuments(10, recentDocRefs, reqHandleOut); + + //Get next set of recent documents + while(reqHandleOut) + { + reqHandleIn = reqHandleOut; + error = sAICloudDocument->GetNextNRecentCloudDocuments(10, recentDocRefs, reqHandleIn, reqHandleOut); + //Always dispose the AICloudRecentsBookmarkHandle after it has been used + sAICloudDocument->DisposeRecentBookmarkHandle(reqHandleIn); + + //Work with the recent document refs + } + */ + AIAPI AIErr (*GetNextNRecentCloudDocuments) ( ai::uint32 numRecentDocuments, ai::AutoBuffer& cloudAssetRefs, AICloudRecentsBookmarkHandle queryBookmarkIn, AICloudRecentsBookmarkHandle& queryBookmarkOut ); + + /** Disposes the bookmark handle that was fetched from the call to GetCloudDocumentAssetRef or GetFirstNRecentCloudDocuments. + Should be called when no more recent documents are to be fetched by the user. + @param queryBookmark Reference to the data that was fetched from GetCloudDocumentAssetRef or GetFirstNRecentCloudDocuments + and is to be disposed. + */ + AIAPI AIErr (*DisposeRecentBookmarkHandle) (AICloudRecentsBookmarkHandle queryBookmark); + +}; + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColor.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColor.h index d3e4c25..090dd70 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColor.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColor.h @@ -1,588 +1,728 @@ -#ifndef __AIColor__ -#define __AIColor__ - -/* - * Name: AIColor.h - * Author: - * Date: - * Purpose: Adobe Illustrator Color type definitions (not a suite) - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIColor.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** Types of colors, patterns, and gradients, - that can be used to fill or stroke Illustrator art objects. - */ -typedef enum { - /** Grayscale color. */ - kGrayColor = 0, - /** Solid ink, expressed in four CMYK process colors. */ - kFourColor, - /** Color with a pattern from the art's pattern list. */ - kPattern, - /** Solid ink, expressed as a custom ink color. See \c #AICustomColorSuite.*/ - kCustomColor, - /** Gradient, also called a blend. See \c #AIGradientSuite.*/ - kGradient, - /** Solid color, expressed as three RGB values. */ - kThreeColor, - /** Null color, If art is painted with \c kNoneColor, the - \c fillPaint or \c strokePaint of the \c #AIPathStyle must be false */ - kNoneColor -} AIColorTag; - -/** Defines a named custom color, whose appearance is - defined by a color of one of these types. See \c #AICustomColorSuite. */ -typedef enum { - /** Solid ink, expressed in four process colors */ - kCustomFourColor = 0, - /** Solid color, expressed as three RGB values. */ - kCustomThreeColor, - /** Lab color. Only valid for spot colors. */ - kCustomLabColor -} AICustomColorTag; - -/** Types of gradients, or color blends. See \c #AIGradientStyle. */ -enum { - /** A linear gradient extends in a straight line for a given length at a - given angle from an origin point. */ - kLinearGradient = 0, - /** A radial gradient is circular, and extends for a given radius around a highlight point. */ - kRadialGradient -}; - -/** Option flags for properties of a named custom color. - A logical OR of \c #kCustomSpotColor and \c #kCustomRegistrationColor. */ -typedef short AICustomColorFlags; - -/** A \c #AICustomColorFlags bit flag indicating that a custom color is - a spot color rather than a global process color. */ -#define kCustomSpotColor 0x0001 -/** A \c #AICustomColorFlags bit flag indicating that a custom color is - a registration color. */ -#define kCustomRegistrationColor 0x0002 - - -/** @ingroup Errors - Attempt to define a spot color with one of the reserved names - Cyan, Magenta, Yellow, Black, None or All. */ -#define kNameInvalidForSpotColorErr 'NA~.' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** A grayscale color. */ -typedef struct { - AIReal gray; -} AIGrayColorStyle; - -/** The valid fields of a partial gray color. */ -typedef struct { - AIBoolean gray; -} AIGrayColorStyleMap; - - -/** A CMYK color. */ -typedef struct { - AIReal cyan, magenta, yellow, black; -} AIFourColorStyle; - -/** The valid fields of a partial CMYK color. */ -typedef struct { - AIBoolean cyan, magenta, yellow, black; -} AIFourColorStyleMap; - - -/** An RGB color. */ -typedef struct { - AIReal red, green, blue; -} AIThreeColorStyle; - -/** The valid fields of a partial RGB color. */ -typedef struct { - AIBoolean red, green, blue; -} AIThreeColorStyleMap; - - -/** A Lab color. */ -typedef struct { - AIReal l, a, b; -} AILabColorStyle; - -/** The valid fields of a partial Lab color. */ -typedef struct { - AIBoolean l, a, b; -} AILabColorStyleMap; - - -/** The union of all possible process colors that can be associated with - a custom color. See \c #AICustomColorSuite. */ -typedef union { - /** A CMYK color */ - AIFourColorStyle f; - /** An RGB color */ - AIThreeColorStyle rgb; - /** A grayscale color */ - AIGrayColorStyle gray; - /** A Lab color */ - AILabColorStyle lab; -} AICustomColorUnion; - -/** A named custom color. A custom color can be a spot (actual ink) - or a global process color. In either case, it has an associated - process color. See \c #AICustomColorSuite. */ -typedef struct { - /** The type of the associated process color (CMYK or RGB) */ - AICustomColorTag kind; - /** The color values, in an appropriate structure. */ - AICustomColorUnion c; - /** Option flags for properties of the custom color. - A logical OR of \c #kCustomSpotColor and \c #kCustomRegistrationColor. */ - AICustomColorFlags flag; -} AICustomColor; - -/** Opaque reference to a custom color. See \c #AICustomColorSuite. */ -typedef void *AICustomColorHandle; - -/** An instance of a custom color paint. */ -typedef struct { - /** Reference to the custom color. See \c #AICustomColorSuite. */ - AICustomColorHandle color; - /** Amount of the custom color to be applied. Value is in the range - 0 to 1 where ((1 - tint) * 100) is the percentage of ink to apply. */ - AIReal tint; -} AICustomColorStyle; - -/** The valid fields of a partial custom color paint. */ -typedef struct { - AIBoolean color; - AIBoolean tint; -} AICustomColorStyleMap; - -/** Obsolete */ -typedef struct { - AIBoolean not_implemented; -} AIPattern; - -/** Opaque reference to a pattern.See \c #AIPatternSuite. */ -typedef void *AIPatternHandle; - -/** The pattern style record defines a pattern instance, or an application of a - pattern to an art object. The instance includes a reference to the pattern to - use in the fill or stroke and information about how it is transformed, such - as scale value. - - When a pattern is applied to an object, the pattern's defining art is tiled to - paint that object. The pattern fill is tiled from the ruler origin rather - than relative to the object. Before the tiling is done, the transformations - in the \c AIPatternStyle record are applied to the pattern art. - -*/ -typedef struct { - /** An opaque reference to the pattern object, accessed through the - \c #AIPatternSuite, whose functions get and set a pattern’s name - and defining art object or objects. - */ - AIPatternHandle pattern; - /** Distance to translate the unscaled prototype before filling, - measured from the ruler origin.*/ - AIReal shiftDist; - /** Angle to translate the unscaled prototype before filling, - in degrees. */ - AIReal shiftAngle; - /** Fraction to scale the prototype before filling. */ - AIRealPoint scale; - /** Angle to rotate the prototype before filling. */ - AIReal rotate; - /** When true, the prototype is reflected before filling */ - AIBoolean reflect; - /** Axis around which to reflect. */ - AIReal reflectAngle; - /** Angle to slant the shear by. */ - AIReal shearAngle; - /** Axis to shear with respect to. */ - AIReal shearAxis; - /** Additional transformation arising from manipulating the path. */ - AIRealMatrix transform; -} AIPatternStyle; - -/** The valid fields of a partial pattern style. */ -typedef struct { - AIBoolean pattern; - AIBoolean shiftDist; - AIBoolean shiftAngle; - AIBoolean scale; - AIBoolean rotate; - AIBoolean reflect; - AIBoolean reflectAngle; - AIBoolean shearAngle; - AIBoolean shearAxis; - AIBoolean transform; -} AIPatternStyleMap; - - /** Opaque reference to a gradient color. See \c #AIGradientSuite. */ -typedef void *AIGradientHandle; - -/** The gradient style record defines a gradient instance (also called a blend). - It includes a reference to a gradient definition, and the origin point - and transformation matrix for the blend. - - A gradient has a name, and a gradient \e ramp, which describes where the - color changes of the gradient occur. A gradient can be linear or - radial. See the \c #AIGradientSuite. Radial blends have an additional - attribute called a blend \e hilight, which is the starting point - for the gradient ramp as it expands outward. - */ -typedef struct { - /** An opaque reference to the gradient. Access using functions in the - \c #AIGradientSuite. It contains a \c name, \c type (linear or radial), - and a ramp defined by a set of \e stops. */ - AIGradientHandle gradient; - /** \li For a linear gradient, the origin of the gradient in page coordinates, - which is 0 on the gradient ramp. - \li For a radial gradient, the center of the containing circle.*/ - AIRealPoint gradientOrigin; - /** \li For a linear gradient, the angle of the gradient in degrees from the X axis. - The ramp extends from the origin at this angle. Positive values are counterclockwise. - \li Not used for radial gradients, but the value is preserved in case - the gradient is changed back to linear.*/ - AIReal gradientAngle; - /** \li For a linear gradient, the distance in points over which the gradient ramp - is applied. The ramp is scaled so that 100% of its value is this length. - \li For a radial gradient, the radius of the containing circle. */ - AIReal gradientLength; - /** The accumulated transformations of the gradient. It is not necessarily the same - as the transformation matrix of the object containing the gradient. - When a gradient is first applied to an object, the value is set to the - identity matrix. When the user transforms the object, the user - transformation matrix is concatenated to the gradient instance’s matrix. */ - AIRealMatrix matrix; - /** \li For a radial gradient, the angle to the blend highlight point. - \li Not used for linear gradients. */ - AIReal hiliteAngle; - /** \li For a radial gradient, the distance of the hilight from the origin - expressed as a fraction of the radius, a value between 0 and 1. - \li Not used for linear gradients. */ - AIReal hiliteLength; - void Init() - { - gradient = NULL; - gradientOrigin.h = kAIRealZero; - gradientOrigin.v = kAIRealZero; - gradientAngle = kAIRealZero; - gradientLength = kAIRealZero; - matrix.Init(); - hiliteAngle = kAIRealZero; - hiliteLength = kAIRealZero; - } -} AIGradientStyle; - -/** The valid fields of a partial gradient style. */ -typedef struct { - AIBoolean gradient; - AIBoolean gradientOrigin; - AIBoolean gradientAngle; - AIBoolean gradientLength; - AIBoolean matrix; - AIBoolean hiliteAngle; - AIBoolean hiliteLength; - void Init() - { - gradient = false; - gradientOrigin = false; - gradientAngle = false; - gradientLength = false; - matrix = false; - hiliteAngle = false; - hiliteLength = false; - } -} AIGradientStyleMap; - - -/** The union of all possible types of color specification. */ -typedef union { - /** A grayscale color */ - AIGrayColorStyle g; - /** A CMYK color */ - AIFourColorStyle f; - /** An RGB color */ - AIThreeColorStyle rgb; - /** A custom color */ - AICustomColorStyle c; - /** A pattern */ - AIPatternStyle p; - /** A gradient (blend) */ - AIGradientStyle b; -} AIColorUnion; - -/** The valid fields of a partial color union. */ -typedef union { - /** A grayscale color */ - AIGrayColorStyleMap g; - /** A CMYK color */ - AIFourColorStyleMap f; - /** An RGB color */ - AIThreeColorStyleMap rgb; - /** A custom color */ - AICustomColorStyleMap c; - /** A pattern */ - AIPatternStyleMap p; - /** A gradient (blend) */ - AIGradientStyleMap b; -} AIColorUnionMap; - -/** A color specification, which describes a solid color, pattern, or gradient. - A color can be partially specified, as when retrieving the common color attributes - of a collection of objects or when modifying a specific subset of color attributes - for one or more objects. When a color is partially specified an associated - \c #AIColorMap contains boolean values indicating which fields are valid. */ -typedef struct { - /** The type of color being described. */ - AIColorTag kind; - /** Contains the detailed specification of the color as appropriate for - the \c kind. */ - AIColorUnion c; -} AIColor; - -/** The valid fields of a partial color specification. For - example, if \c kind is true, the associated \c AIColor has - a valid value for \c kind. */ -typedef struct { - AIBoolean kind; - AIColorUnionMap c; -} AIColorMap; - - -/** Defines a gradient stop. Each stop is place where the color changes in a blend. - A set of stops defines the gradient \e ramp. - See \c #AIGradientStyle and \c #AIGradientSuite. - */ -typedef struct { - /** The location between two ramp points where there is an equal mix of this - color and the color of the next stop. This value is a percentage of the - distance between the two ramp points, between 13 and 87. The midpoint - for the previous color stop is not considered. */ - AIReal midPoint; - /** The position on the blend ramp where this color begins, in the range - [0..100]. The first point does not have to be at 0, but the first - color begins at 0. Similarly, the last does not have to be at 100. */ - AIReal rampPoint; - /** The type and specification of the color for the gradient stop; - a gray color, a process color, an RGB color, or a custom color. */ - AIColor color; - /** The opacity value for the gradient stop, in the range [0,1], - 0 for completely transparent and 1 for completely opaque. */ - AIReal opacity; - void Init() - { - midPoint = kAIRealZero; - rampPoint = kAIRealZero; - color.kind = kNoneColor; - opacity = kAIRealZero; - } -} AIGradientStop; - - -/** Result return type for \c #AIPathStyleSuite::ObjectUsesAIColor(). */ -typedef unsigned short AIColorUsedHow; - -/** Values for \c #AIColorUsedHow type, returned from - \c #AIPathStyleSuite::ObjectUsesAIColor(). */ -enum AIColorUsedHowValues { - /** The target color is not used. */ - kAIColorNotUsed = 0x0000, - /** The stroke is painted, and is the target \c #AIColor */ - kAIColorUsedOnStroke = 0x0001, - /** The fill is painted, and is the target \c #AIColor */ - kAIColorUsedInFill = 0x0002, - /* The target \c #AIColor is used inside a gradient or pattern - that is used in the object, or for graphs in a - graph design or transform (which can be expressed or not - in the graph art objects.) */ - kAIColorUsedIndirectly = 0x0004 -}; - -/** Callback function prototype used to iterate through colors, applying a modification - and returning the modified color. - This is used for situations where one component (such as a Color plug-in filter) - knows how to modify colors, and another component knows how to apply them - to a specify kind of object or other color collection such as a swatch book. - See \c AIPluginGroup.h and \c AIPluginSelection.h - This supersedes \c #AIMeshColorMap in \c AIMesh.h, which is deprecated. - @param color [in, out] The color to modify and return. - @param userData A pointer to data needed for the modification. - @param result [out] A buffer in which to return an error if the iteration should stop. - (This is a parameter rather than a return value, so that the communication can go both ways. - If the component handling the objects wants the component making the color adjustments to stop - processing other objects and report an error back to the user, it should set \c result to that - error code BEFORE calling the callback function.) - @param altered [out] A buffer in which to return true if the color was modified (and - should therefore be applied to the objects or color collection). - - @see \c #AIPluginGroupSuite::PluginArtAdjustColors(), \c #AIPluginGroupAdjustColorsData - */ -typedef void (*AIAdjustColorFunc) (AIColor *color, void *userData, AIErr *result, AIBoolean *altered); - -/** Callback function prototype used to iterate through colors, applying a modification - and returning the modified color. This version can also access and modify the - overprint setting for fills and/or strokes. - @param color [in, out] The color to modify and return. - @param userData A pointer to data needed for the modification. - @param result [out] A buffer in which to return an error if the iteration should stop. - (This is a parameter rather than a return value, so that the communication can go both ways. - If the component handling the objects wants the component making the color adjustments to stop - processing other objects and report an error back to the user, it should set \c result to that - error code BEFORE calling the callback function.) - @param altered [out] A buffer in which to return true if the color or overprint was modified, - (and should therefore be applied to the objects or color collection). - @param usedWhere Whether to make overprint changes to fill or stroke. - Either \c #kAIColorUsedInFill or \c #kAIColorUsedOnStroke. For any other - value, overprint is ignored. - @param overprint [out] A buffer in which to return true if overprint was modified, - (and should therefore be applied to the objects or color collection). - */ -typedef void (*AIAdjustColorsWithOPFunc) (AIColor *color, void *userData, AIErr *result, AIBoolean *altered, - AIColorUsedHow usedWhere, AIBoolean *overprint ); - -/** Callback function prototype used to adjust or extract colors from pattern handles contained - in the dictionary of an effect or plug-in group. The patterns are expected to be - brush patterns, symbol patterns or graph designs; other fill patterns can be recolored - with the \c #AIAdjustColorFunc() callback, passing a pattern \c #AIColor. - - Used in \c #AILiveEffectAdjustColorsMessage and \c #AIPluginGroupAdjustColorsData. - @param oldPattern [in] The pattern to be examined. This object is not altered. - @param newPattern [out] A buffer in which to return the pattern after color adjustment. - If no colors are changed, contains the input pattern. - @param userData A pointer to developer-defined data needed for the modification, acquired from the message data. - */ -typedef AIErr (*AIAdjustPatternHandleFunc) ( AIPatternHandle oldPattern, AIPatternHandle *newPattern, void *userData ); - - -/** Control options for \c #AIPathStyleSuite::AdjustObjectAIColors() */ -typedef unsigned short VisitAIColorFlags; - -/** Bit flags for \c #VisitAIColorFlags, options for \c #AIPathStyleSuite::AdjustObjectAIColors. - Controls which colors are passed to the \c #AIAdjustColorFunc callback. -*/ -enum VisitAIColorFlagValues { - /** Turn all flags off. */ - kVisitColorsNullFlags = 0x0000, - /** When on, iterate only colors used in selected objects - (includes text selections and plug-in selections).
- When on, implies that \c #kVisitColorsUniversally is off. */ - kVisitColorsSelectedOnly = 0x0001, - - /** When on, iterate all the palette content as well as the artwork, even if unused. - If a color used inside a gradient or pattern is modified, the iterator modifies - that gradient or pattern in place, rather than creating a new one with the modified - color.
- When off, skip color used only in the palette, such as unused symbols, brushes, - gradients, and patterns. If a color used inside a gradient or pattern is modified, - the iterator creates a new gradient or pattern using the modified color.
- Ignored and considered off if \c #kVisitColorsSelectedOnly is on. */ - kVisitColorsUniversally = 0x0002, - - /** When on, do not iterate into definition of symbols, patterns, gradients, and brushes. - Ignored and considered off if \c #kVisitColorsUniversally is on. */ - kVisitColorsDirectOnly = 0x0004, - - /** When on, pass only solid colors to the callback function. - Interacts with \c #kVisitColorsDirectOnly: - \li If both this and \c #kVisitColorsDirectOnly are on, pass solid colors that are used directly, - but not those used in patterns and gradients. - \li If this is on and \c #kVisitColorsDirectOnly is off, pass solid colors that are used directly, - and those used by patterns and gradients. - \li If this is off and \c #kVisitColorsDirectOnly is on, pass only directly-used gradients and patterns. - The callback must handle any internal iteration, if needed. - \li If both this and \c #kVisitColorsDirectOnly are off, before iterating a pattern or gradient, - pass colors used inside that pattern or gradient. This ensures that any patterns or gradients - modified or created by the iterator are also passed. See \c #kVisitColorsUniversally. - */ - kVisitColorsSolidOnly = 0x0008, - - /** When on, iterates colors used in fills, but not those used in strokes. */ - kVisitColorsFillsOnly = 0x0010, - - /** When on, iterates colors used in strokes, but not those used in fills. */ - kVisitColorsStrokesOnly = 0x0020, - - /** When on, the callback examines the iterated colors but does not modify them. - Setting this allows the iterator to skip setup for Undo processing and so on, making - it faster and less memory intensive. */ - kVisitColorsReadOnly = 0x0040, - - /** When on, iterates the result art of plug-in groups. (The result art is regenerated, - so this is only useful for examination, not for modification.) */ - kVisitColorsInResultArt = 0x0080, - - /** When on, if the selection includes multiple uses of the same global object, - passes that object to the callback only once, and uses the resulting - replacement object for all subsequent occurrences.
- When off, passes each occurrence to the callback. Useful for statistical applications, - or, for example, random color replacements, so that objects initially - painted with the same color become different colors. - */ - kVisitGlobalObjectsOnceOnly = 0x0100, - - /** When on, the operation is occurring during a modal dialog's preview of interim settings. - This allows the iterator and/or the callback function to skip processing that is only - needed for ordinary final state edits, such as action recording, graph change recording, - inserting new global objects into palettes, and so on. */ - kVisitColorsForModalPreview = 0x0200, - - /** When on, new global objects are always made anonymous and not inserted into panels, even - if the original color is named and has a swatch. Also affects the behavior of symbol colorization. - By default (even when kVisitColorsForModalPreview is on), recoloring symbol instances recolors - the symbol definition, thus affecting all instances of the symbol, even those that are NOT in - the visited art. When kVisitColorsForceAnonymous is on, a new anonymous symbol is created instead. - Ignored and considered off if \c #kVisitColorsUniversally is on (since that flag causes - colorization of all existing panel content instead of the input art.) - */ - kVisitColorsForceAnonymous = 0x0400, - - /** When on, the Registration color is not filtered out. (By default this color is not visited.) */ - kVisitColorsIncludeRegistration = 0x0800 -}; - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIColor__ +#define __AIColor__ + +/************************************************************************* + * + * ADOBE CONFIDENTIAL + * + * Copyright 2018 Adobe + * + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. If you have received this file from a source other than Adobe, + * then your use, modification, or distribution of it requires the prior + * written permission of Adobe. + * + **************************************************************************/ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIRealMath__ +#include "AIRealMath.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIColor.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** Types of colors, patterns, and gradients, + that can be used to fill or stroke Illustrator art objects. + */ +enum AIColorTag { + /** Grayscale color. */ + kGrayColor = 0, + /** Solid ink, expressed in four CMYK process colors. */ + kFourColor, + /** Color with a pattern from the art's pattern list. */ + kPattern, + /** Solid ink, expressed as a custom ink color. See \c #AICustomColorSuite.*/ + kCustomColor, + /** Gradient, also called a blend. See \c #AIGradientSuite.*/ + kGradient, + /** Solid color, expressed as three RGB values. */ + kThreeColor, + /** Null color, If art is painted with \c kNoneColor, the + \c fillPaint or \c strokePaint of the \c #AIPathStyle must be false */ + kNoneColor, + /** + Advance color can not be represented in AIColor and need to used with parser. + **/ + kAdvanceColor +}; + +/** Defines a named custom color, whose appearance is + defined by a color of one of these types. See \c #AICustomColorSuite. */ +enum AICustomColorTag { + /** Solid ink, expressed in four process colors */ + kCustomFourColor = 0, + /** Solid color, expressed as three RGB values. */ + kCustomThreeColor, + /** Lab color. Only valid for spot colors. */ + kCustomLabColor +}; + +/** Types of gradients, or color blends. See \c #AIGradientStyle. */ +enum { + /** A linear gradient extends in a straight line for a given length at a + given angle from an origin point. */ + kLinearGradient = 0, + /** A radial gradient is circular, and extends for a given radius around a highlight point. */ + kRadialGradient +}; + +/** Option flags for properties of a named custom color. + A logical OR of \c #kCustomSpotColor and \c #kCustomRegistrationColor. */ +typedef short AICustomColorFlags; + +/** A \c #AICustomColorFlags bit flag indicating that a custom color is + a spot color rather than a global process color. */ +#define kCustomSpotColor 0x0001 +/** A \c #AICustomColorFlags bit flag indicating that a custom color is + a registration color. */ +#define kCustomRegistrationColor 0x0002 + + +/** @ingroup Errors + Attempt to define a spot color with one of the reserved names + Cyan, Magenta, Yellow, Black, None or All. */ +#define kNameInvalidForSpotColorErr 'NA~.' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** A grayscale color. */ +struct AIGrayColorStyle { + AIReal gray; + void Init() + { + gray = 0; + } +}; + +/** The valid fields of a partial gray color. */ +struct AIGrayColorStyleMap { + AIBoolean gray; + void Init() + { + gray = false; + } +}; + + +/** A CMYK color. */ +struct AIFourColorStyle { + AIReal cyan, magenta, yellow, black; + void Init() + { + cyan = 0; + magenta = 0; + yellow = 0; + black = 0; + } +}; + +/** The valid fields of a partial CMYK color. */ +struct AIFourColorStyleMap { + AIBoolean cyan, magenta, yellow, black; + void Init() + { + cyan = false; + magenta = false; + yellow = false; + black = false; + } +}; + + +/** An RGB color. */ +struct AIThreeColorStyle { + AIReal red, green, blue; + void Init() + { + red = 0; + green = 0; + blue = 0; + } +}; + +/** The valid fields of a partial RGB color. */ +struct AIThreeColorStyleMap { + AIBoolean red, green, blue; + void Init() + { + red = false; + green = false; + blue = false; + } +}; + + +/** A Lab color. */ +struct AILabColorStyle { + AIReal l, a, b; + void Init() + { + l = 0; + a = 0; + b = 0; + } +}; + +/** The valid fields of a partial Lab color. */ +struct AILabColorStyleMap { + AIBoolean l, a, b; + void Init() + { + l = false; + a = false; + b = false; + } +}; + + +/** The union of all possible process colors that can be associated with + a custom color. See \c #AICustomColorSuite. */ +union AICustomColorUnion { + /** A CMYK color */ + AIFourColorStyle f; + /** An RGB color */ + AIThreeColorStyle rgb; + /** A grayscale color */ + AIGrayColorStyle gray; + /** A Lab color */ + AILabColorStyle lab; +}; + +/** A named custom color. A custom color can be a spot (actual ink) + or a global process color. In either case, it has an associated + process color. See \c #AICustomColorSuite. */ +struct AICustomColor { + /** The type of the associated process color (CMYK or RGB) */ + AICustomColorTag kind; + /** The color values, in an appropriate structure. */ + AICustomColorUnion c; + /** Option flags for properties of the custom color. + A logical OR of \c #kCustomSpotColor and \c #kCustomRegistrationColor. */ + AICustomColorFlags flag; + + void Init() + { + flag = 0; + kind = kCustomFourColor; + c = {}; + } +}; + +/** Opaque reference to a custom color. See \c #AICustomColorSuite. */ +typedef void *AICustomColorHandle; + +/** An instance of a custom color paint. */ +struct AICustomColorStyle { + /** Reference to the custom color. See \c #AICustomColorSuite. */ + AICustomColorHandle color; + /** Amount of the custom color to be applied. Value is in the range + 0 to 1 where ((1 - tint) * 100) is the percentage of ink to apply. */ + AIReal tint; + + void Init() + { + color = nullptr; + tint = 0; + } +}; + +/** The valid fields of a partial custom color paint. */ +struct AICustomColorStyleMap { + AIBoolean color; + AIBoolean tint; + void Init() + { + color = false; + tint = false; + } +}; + +/** Obsolete */ +struct AIPattern { + AIBoolean not_implemented; +}; + +/** Opaque reference to a pattern.See \c #AIPatternSuite. */ +typedef void *AIPatternHandle; + +/** The pattern style record defines a pattern instance, or an application of a + pattern to an art object. The instance includes a reference to the pattern to + use in the fill or stroke and information about how it is transformed, such + as scale value. + + When a pattern is applied to an object, the pattern's defining art is tiled to + paint that object. The pattern fill is tiled from the ruler origin rather + than relative to the object. Before the tiling is done, the transformations + in the \c AIPatternStyle record are applied to the pattern art. + +*/ +struct AIPatternStyle { + /** An opaque reference to the pattern object, accessed through the + \c #AIPatternSuite, whose functions get and set a patterns name + and defining art object or objects. + */ + AIPatternHandle pattern; + /** Distance to translate the unscaled prototype before filling, + measured from the ruler origin.*/ + AIReal shiftDist; + /** Angle to translate the unscaled prototype before filling, + in degrees. */ + AIReal shiftAngle; + /** Fraction to scale the prototype before filling. */ + AIRealPoint scale; + /** Angle to rotate the prototype before filling. */ + AIReal rotate; + /** When true, the prototype is reflected before filling */ + AIBoolean reflect; + /** Axis around which to reflect. */ + AIReal reflectAngle; + /** Angle to slant the shear by. */ + AIReal shearAngle; + /** Axis to shear with respect to. */ + AIReal shearAxis; + /** Additional transformation arising from manipulating the path. */ + AIRealMatrix transform; + + void Init() + { + pattern = nullptr; + shiftDist = 0; + shiftAngle = 0; + scale = {0, 0}; + rotate = 0; + reflect = false; + reflectAngle = 0; + shearAngle = 0; + shearAxis = 0; + transform.Init(); + } + +}; + +/** The valid fields of a partial pattern style. */ +struct AIPatternStyleMap { + AIBoolean pattern; + AIBoolean shiftDist; + AIBoolean shiftAngle; + AIBoolean scale; + AIBoolean rotate; + AIBoolean reflect; + AIBoolean reflectAngle; + AIBoolean shearAngle; + AIBoolean shearAxis; + AIBoolean transform; + void Init() + { + pattern = false; + shiftDist = false; + shiftAngle = false; + scale = false; + rotate = false; + reflect = false; + reflectAngle = false; + shearAngle = false; + shearAxis = false; + transform = false; + } +}; + + /** Opaque reference to a gradient color. See \c #AIGradientSuite. */ +typedef void *AIGradientHandle; + +/** The gradient style record defines a gradient instance (also called a blend). + It includes a reference to a gradient definition, and the origin point + and transformation matrix for the blend. + + A gradient has a name, and a gradient \e ramp, which describes where the + color changes of the gradient occur. A gradient can be linear or + radial. See the \c #AIGradientSuite. Radial blends have an additional + attribute called a blend \e hilight, which is the starting point + for the gradient ramp as it expands outward. + */ +struct AIGradientStyle { + /** An opaque reference to the gradient. Access using functions in the + \c #AIGradientSuite. It contains a \c name, \c type (linear or radial), + and a ramp defined by a set of \e stops. */ + AIGradientHandle gradient; + /** \li For a linear gradient, the origin of the gradient in page coordinates, + which is 0 on the gradient ramp. + \li For a radial gradient, the center of the containing circle.*/ + AIRealPoint gradientOrigin; + /** \li For a linear gradient, the angle of the gradient in degrees from the X axis. + The ramp extends from the origin at this angle. Positive values are counterclockwise. + \li Not used for radial gradients, but the value is preserved in case + the gradient is changed back to linear.*/ + AIReal gradientAngle; + /** \li For a linear gradient, the distance in points over which the gradient ramp + is applied. The ramp is scaled so that 100% of its value is this length. + \li For a radial gradient, the radius of the containing circle. */ + AIReal gradientLength; + /** The accumulated transformations of the gradient. It is not necessarily the same + as the transformation matrix of the object containing the gradient. + When a gradient is first applied to an object, the value is set to the + identity matrix. When the user transforms the object, the user + transformation matrix is concatenated to the gradient instances matrix. */ + AIRealMatrix matrix; + /** \li For a radial gradient, the angle to the blend highlight point. + \li Not used for linear gradients. */ + AIReal hiliteAngle; + /** \li For a radial gradient, the distance of the hilight from the origin + expressed as a fraction of the radius, a value between 0 and 1. + \li Not used for linear gradients. */ + AIReal hiliteLength; + void Init() + { + gradient = NULL; + gradientOrigin.h = kAIRealZero; + gradientOrigin.v = kAIRealZero; + gradientAngle = kAIRealZero; + gradientLength = kAIRealZero; + matrix.Init(); + hiliteAngle = kAIRealZero; + hiliteLength = kAIRealZero; + } +}; + +/** The valid fields of a partial gradient style. */ +struct AIGradientStyleMap { + AIBoolean gradient; + AIBoolean gradientOrigin; + AIBoolean gradientAngle; + AIBoolean gradientLength; + AIBoolean matrix; + AIBoolean hiliteAngle; + AIBoolean hiliteLength; + void Init() + { + gradient = false; + gradientOrigin = false; + gradientAngle = false; + gradientLength = false; + matrix = false; + hiliteAngle = false; + hiliteLength = false; + } +}; + + +/** The union of all possible types of color specification. */ +union AIColorUnion { + /** A grayscale color */ + AIGrayColorStyle g; + /** A CMYK color */ + AIFourColorStyle f; + /** An RGB color */ + AIThreeColorStyle rgb; + /** A custom color */ + AICustomColorStyle c; + /** A pattern */ + AIPatternStyle p; + /** A gradient (blend) */ + AIGradientStyle b; + +}; + +/** The valid fields of a partial color union. */ +union AIColorUnionMap { + /** A grayscale color */ + AIGrayColorStyleMap g; + /** A CMYK color */ + AIFourColorStyleMap f; + /** An RGB color */ + AIThreeColorStyleMap rgb; + /** A custom color */ + AICustomColorStyleMap c; + /** A pattern */ + AIPatternStyleMap p; + /** A gradient (blend) */ + AIGradientStyleMap b; + +}; + +/** A color specification, which describes a solid color, pattern, or gradient. + A color can be partially specified, as when retrieving the common color attributes + of a collection of objects or when modifying a specific subset of color attributes + for one or more objects. When a color is partially specified an associated + \c #AIColorMap contains boolean values indicating which fields are valid. */ +struct AIColor { + /** The type of color being described. */ + AIColorTag kind; + /** Contains the detailed specification of the color as appropriate for + the \c kind. */ + AIColorUnion c; + + void Init() + { + kind = kNoneColor; + c = {}; + } +}; + +/** The valid fields of a partial color specification. For + example, if \c kind is true, the associated \c AIColor has + a valid value for \c kind. */ +struct AIColorMap { + AIBoolean kind; + AIColorUnionMap c; + void Init() + { + kind = false; + c = {}; + } +}; + + +/** Defines a gradient stop. Each stop is place where the color changes in a blend. + A set of stops defines the gradient \e ramp. + See \c #AIGradientStyle and \c #AIGradientSuite. + */ +struct AIGradientStop { + /** The location between two ramp points where there is an equal mix of this + color and the color of the next stop. This value is a percentage of the + distance between the two ramp points, between 13 and 87. The midpoint + for the previous color stop is not considered. */ + AIReal midPoint; + /** The position on the blend ramp where this color begins, in the range + [0..100]. The first point does not have to be at 0, but the first + color begins at 0. Similarly, the last does not have to be at 100. */ + AIReal rampPoint; + /** The type and specification of the color for the gradient stop; + a gray color, a process color, an RGB color, or a custom color. */ + AIColor color; + /** The opacity value for the gradient stop, in the range [0,1], + 0 for completely transparent and 1 for completely opaque. */ + AIReal opacity; + void Init() + { + midPoint = kAIRealZero; + rampPoint = kAIRealZero; + color.Init(); + opacity = kAIRealZero; + } +}; + + +/** Result return type for \c #AIPathStyleSuite::ObjectUsesAIColor(). */ +typedef unsigned short AIColorUsedHow; + +/** Values for \c #AIColorUsedHow type, returned from + \c #AIPathStyleSuite::ObjectUsesAIColor(). */ +enum AIColorUsedHowValues { + /** The target color is not used. */ + kAIColorNotUsed = 0x0000, + /** The stroke is painted, and is the target \c #AIColor */ + kAIColorUsedOnStroke = 0x0001, + /** The fill is painted, and is the target \c #AIColor */ + kAIColorUsedInFill = 0x0002, + /* The target \c #AIColor is used inside a gradient or pattern + that is used in the object, or for graphs in a + graph design or transform (which can be expressed or not + in the graph art objects.) */ + kAIColorUsedIndirectly = 0x0004 +}; + +/** Callback function prototype used to iterate through colors, applying a modification + and returning the modified color. + This is used for situations where one component (such as a Color plug-in filter) + knows how to modify colors, and another component knows how to apply them + to a specify kind of object or other color collection such as a swatch book. + See \c AIPluginGroup.h and \c AIPluginSelection.h + This supersedes \c #AIMeshColorMap in \c AIMesh.h, which is deprecated. + @param color [in, out] The color to modify and return. + @param userData A pointer to data needed for the modification. + @param result [out] A buffer in which to return an error if the iteration should stop. + (This is a parameter rather than a return value, so that the communication can go both ways. + If the component handling the objects wants the component making the color adjustments to stop + processing other objects and report an error back to the user, it should set \c result to that + error code BEFORE calling the callback function.) + @param altered [out] A buffer in which to return true if the color was modified (and + should therefore be applied to the objects or color collection). + + @see \c #AIPluginGroupSuite::PluginArtAdjustColors(), \c #AIPluginGroupAdjustColorsData + */ +typedef void (*AIAdjustColorFunc) (AIColor *color, void *userData, AIErr *result, AIBoolean *altered); + +/** Callback function prototype used to iterate through colors, applying a modification + and returning the modified color. This version can also access and modify the + overprint setting for fills and/or strokes. + @param color [in, out] The color to modify and return. + @param userData A pointer to data needed for the modification. + @param result [out] A buffer in which to return an error if the iteration should stop. + (This is a parameter rather than a return value, so that the communication can go both ways. + If the component handling the objects wants the component making the color adjustments to stop + processing other objects and report an error back to the user, it should set \c result to that + error code BEFORE calling the callback function.) + @param altered [out] A buffer in which to return true if the color or overprint was modified, + (and should therefore be applied to the objects or color collection). + @param usedWhere Whether to make overprint changes to fill or stroke. + Either \c #kAIColorUsedInFill or \c #kAIColorUsedOnStroke. For any other + value, overprint is ignored. + @param overprint [out] A buffer in which to return true if overprint was modified, + (and should therefore be applied to the objects or color collection). + */ +typedef void (*AIAdjustColorsWithOPFunc) (AIColor *color, void *userData, AIErr *result, AIBoolean *altered, + AIColorUsedHow usedWhere, AIBoolean *overprint ); + +/** Callback function prototype used to adjust or extract colors from pattern handles contained + in the dictionary of an effect or plug-in group. The patterns are expected to be + brush patterns, symbol patterns or graph designs; other fill patterns can be recolored + with the \c #AIAdjustColorFunc() callback, passing a pattern \c #AIColor. + + Used in \c #AILiveEffectAdjustColorsMessage and \c #AIPluginGroupAdjustColorsData. + @param oldPattern [in] The pattern to be examined. This object is not altered. + @param newPattern [out] A buffer in which to return the pattern after color adjustment. + If no colors are changed, contains the input pattern. + @param userData A pointer to developer-defined data needed for the modification, acquired from the message data. + */ +typedef AIErr (*AIAdjustPatternHandleFunc) ( AIPatternHandle oldPattern, AIPatternHandle *newPattern, void *userData ); + + +/** Control options for \c #AIPathStyleSuite::AdjustObjectAIColors() */ +typedef unsigned short VisitAIColorFlags; + +/** Bit flags for \c #VisitAIColorFlags, options for \c #AIPathStyleSuite::AdjustObjectAIColors. + Controls which colors are passed to the \c #AIAdjustColorFunc callback. +*/ +enum VisitAIColorFlagValues { + /** Turn all flags off. */ + kVisitColorsNullFlags = 0x0000, + /** When on, iterate only colors used in selected objects + (includes text selections and plug-in selections).
+ When on, implies that \c #kVisitColorsUniversally is off. */ + kVisitColorsSelectedOnly = 0x0001, + + /** When on, iterate all the palette content as well as the artwork, even if unused. + If a color used inside a gradient or pattern is modified, the iterator modifies + that gradient or pattern in place, rather than creating a new one with the modified + color.
+ When off, skip color used only in the palette, such as unused symbols, brushes, + gradients, and patterns. If a color used inside a gradient or pattern is modified, + the iterator creates a new gradient or pattern using the modified color.
+ Ignored and considered off if \c #kVisitColorsSelectedOnly is on. */ + kVisitColorsUniversally = 0x0002, + + /** When on, do not iterate into definition of symbols, patterns, gradients, and brushes. + Ignored and considered off if \c #kVisitColorsUniversally is on. */ + kVisitColorsDirectOnly = 0x0004, + + /** When on, pass only solid colors to the callback function. + Interacts with \c #kVisitColorsDirectOnly: + \li If both this and \c #kVisitColorsDirectOnly are on, pass solid colors that are used directly, + but not those used in patterns and gradients. + \li If this is on and \c #kVisitColorsDirectOnly is off, pass solid colors that are used directly, + and those used by patterns and gradients. + \li If this is off and \c #kVisitColorsDirectOnly is on, pass only directly-used gradients and patterns. + The callback must handle any internal iteration, if needed. + \li If both this and \c #kVisitColorsDirectOnly are off, before iterating a pattern or gradient, + pass colors used inside that pattern or gradient. This ensures that any patterns or gradients + modified or created by the iterator are also passed. See \c #kVisitColorsUniversally. + */ + kVisitColorsSolidOnly = 0x0008, + + /** When on, iterates colors used in fills, but not those used in strokes. */ + kVisitColorsFillsOnly = 0x0010, + + /** When on, iterates colors used in strokes, but not those used in fills. */ + kVisitColorsStrokesOnly = 0x0020, + + /** When on, the callback examines the iterated colors but does not modify them. + Setting this allows the iterator to skip setup for Undo processing and so on, making + it faster and less memory intensive. */ + kVisitColorsReadOnly = 0x0040, + + /** When on, iterates the result art of plug-in groups. (The result art is regenerated, + so this is only useful for examination, not for modification.) */ + kVisitColorsInResultArt = 0x0080, + + /** When on, if the selection includes multiple uses of the same global object, + passes that object to the callback only once, and uses the resulting + replacement object for all subsequent occurrences.
+ When off, passes each occurrence to the callback. Useful for statistical applications, + or, for example, random color replacements, so that objects initially + painted with the same color become different colors. + */ + kVisitGlobalObjectsOnceOnly = 0x0100, + + /** When on, the operation is occurring during a modal dialog's preview of interim settings. + This allows the iterator and/or the callback function to skip processing that is only + needed for ordinary final state edits, such as action recording, graph change recording, + inserting new global objects into palettes, and so on. */ + kVisitColorsForModalPreview = 0x0200, + + /** When on, new global objects are always made anonymous and not inserted into panels, even + if the original color is named and has a swatch. Also affects the behavior of symbol colorization. + By default (even when kVisitColorsForModalPreview is on), recoloring symbol instances recolors + the symbol definition, thus affecting all instances of the symbol, even those that are NOT in + the visited art. When kVisitColorsForceAnonymous is on, a new anonymous symbol is created instead. + Ignored and considered off if \c #kVisitColorsUniversally is on (since that flag causes + colorization of all existing panel content instead of the input art.) + */ + kVisitColorsForceAnonymous = 0x0400, + + /** When on, the Registration color is not filtered out. (By default this color is not visited.) */ + kVisitColorsIncludeRegistration = 0x0800 +}; + + +/******************************************************************************* + ** + ** Constants + ** + *******************************************************************************/ + +#define kAIColorSuite "AI Color Suite" +#define kAIColorSuiteVersion1 AIAPI_VERSION(1) +#define kAIColorSuiteVersion kAIColorSuiteVersion1 + +/******************************************************************************* + ** + ** Suite + ** + ********************************************************************************/ +/** @ingroup Suites + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIColorSuite and \c #kAIColorSuiteVersion. + */ + + +struct AIColorSuite { + + /** returns true if colors are equal otherwise false. + @param color1 : First AIColor + + @param color2 : Second AIColor. + */ + AIAPI AIBoolean (*IsEqual) (const AIColor& color1, const AIColor &color2); + +}; + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorConversion.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorConversion.h index d06c0c4..9b059d0 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorConversion.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorConversion.h @@ -1,252 +1,252 @@ -#ifndef __AIColorConversion__ -#define __AIColorConversion__ - -/* - * Name: AIColorConversion.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Color Conversion Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "IAIColorSpace.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIColorConversion.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIColorConversionSuite "AI Color Conversion Suite" -#define kAIColorConversionVersion10 AIAPI_VERSION(10) -#define kAIColorConversionSuiteVersion kAIColorConversionVersion10 -#define kAIColorConversionVersion kAIColorConversionSuiteVersion - -/** Color spaces that are available for conversion. See \c #AIColorConversionSuite::ConvertImageColor - and \c #AIColorConversionSuite::ConvertSampleColor */ -enum AIColorConversionSpaceValue { - kAIMonoColorSpace = 0, - kAIGrayColorSpace = 1, - kAIRGBColorSpace = 2, - kAIARGBColorSpace = 3, - kAICMYKColorSpace = 4, - kAIACMYKColorSpace = 5, - kAIAGrayColorSpace = 6, - kAILabColorSpace = 7 -}; - - -/** @ingroup Errors - See \c #AIColorConversionSuite. */ -#define kColorConversionErr 'CCER' - - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** A color sample pixel value. See \c #AIColorConversionSuite::ConvertSampleColorEx(). */ -typedef AIReal AISampleComponent; -typedef AIFloat AIFloatSampleComponent; -/** An image pixel value. See \c #AIColorConversionSuite::ConvertImageColorEx(). */ -typedef unsigned char AIImageComponent; - -/** Color-space conversion options. When converting CMYK to gray or RGB for - preview or export, the constructor sets the appropriate black preservation - value-- that is, whether a CMYK to RGB/Gray color transformation maps - CMYK 0,0,0,1 to the darkest black: - \li By default, the operation uses the standard conversion, - which never uses black preservation. - \li For export, the operation uses the black-preservation setting - that is currently configured in the print and export preferences. - \li For preview, the operation uses the black-preservation setting - that is currently configured in the screen-display preferences. - */ -class AIColorConvertOptions { -public: - /** The purpose for performing a color-space conversion. */ - enum Purpose { - /** Do standard conversion, without black preservation. */ - kDefault, - /** Use conversion options appropriate to creating an image - for screen display. */ - kForPreview, - /** Use conversion options appropriate to creating an image - for print or export. */ - kForExport, - kDummy = 0xFFFFFFFF - }; - /** Default color-space conversion option. - The operation uses the standard conversion, - which never uses black preservation. */ - AIColorConvertOptions () : - purpose(kDefault) - { - } - - /** Creates a color-conversion structure. - @param _purpose The intended purpose of the conversion. - When converting CMYK to gray or RGB for preview or export, - sets the appropriate black preservation value. - @return A color-conversion structure to pass to conversion - functions. - @see \c #AIColorConversionSuite::ConvertImageColor()
- \c #AIColorConversionSuite::ConvertImageColorEx()
- \c #AIColorConversionSuite::ConvertSampleColor()
- \c #AIColorConversionSuite::ConvertSampleColorEx() - */ - AIColorConvertOptions (const Purpose& _purpose) : - purpose(_purpose) - { - } - /** Copy constructor */ - AIColorConvertOptions (const AIColorConvertOptions& src) : - purpose(src.purpose) - { - } - - /** Assignment operator */ - AIColorConvertOptions& operator= (const AIColorConvertOptions& src) - { - purpose = src.purpose; - return *this; - } - /** The purpose for performing a color-space conversion. - \c #kDefault, \c #kForPreview or \c #kForExport */ - Purpose purpose; -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Provides functions for converting color values and image sample values - between color spaces. - - \li If color management is on, the functions use the document profile if it has one, - otherwise they use the profiles from the Color Settings dialog. - \li If color management is off, the functions perform device conversions. - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIColorConversionSuite and \c #kAIColorConversionVersion. - -*/ -typedef struct { - - /** Converts a sample-component color from one color space to another. - (This version uses colorspace data types.) - @param srcSpace The source color space. - @param srcColor The color to convert, a color sample object. - @param dstSpace The destination color space. - @param dstColor [out] A buffer in which to return the converted color sample object. - @param options The options structure appropriate to the purpose - of the conversion (preview or export). See \c #AIColorConvertOptions. - @param inGamut [out] A buffer in which to return true if the source color was - within the gamut of the destination space. Can be \c NULL. - */ - AIAPI AIErr (*ConvertSampleColorEx) ( const ai::ColorSpace &srcSpace, AIFloatSampleComponent *srcColor, - const ai::ColorSpace &dstSpace, AIFloatSampleComponent *dstColor, - const AIColorConvertOptions& options, - ASBoolean *inGamut); - - /** Converts an array of image pixels from one color space to another. - (This version uses the colorspace data type and specific bits-per-pixel values.) - @param srcSpace The source color space. - @param srcBitsPerPixel The bits-per-pixel in the source color. - @param srcColor The color to convert, an array containing the number of pixels - specified by \c pixelCount, using the bits-per-pixel specified by \c srcBitsPerPixel. - @param dstSpace The destination color space. - @param dstBitsPerPixel The bits-per-pixel in the destination color. - @param dstColor [out] A buffer in which to return the converted image, an array big enough - to contain the number of pixels specified by \c pixelCount, using the bits-per-pixel - specified by \c dstBitsPerPixel. - @param pixelCount The number of pixels in the image. - @param flags To specify that the bits of a 1-bit color space (\c #kAIMonoColorSpace) - are inverted, pass the constant \c kRasterInvertBits. - @param options The options structure appropriate to the purpose - of the conversion (preview or export). See \c #AIColorConvertOptions. - */ - AIAPI AIErr (*ConvertImageColorEx) ( const ai::ColorSpace &srcSpace, - ai::int32 srcBitsPerPixel, - AIImageComponent *srcColor, - const ai::ColorSpace &dstSpace, - ai::int32 dstBitsPerPixel, - AIImageComponent *dstColor, - ai::int32 pixelCount, ai::uint16 flags, - const AIColorConvertOptions& options); - - /** Converts a sample-component color from one color space to another. - @param srcSpace The source color space, an \c #AIColorConversionSpaceValue. - @param srcColor The color to convert, an array containing the number of color - values appropriate to the source color space. - @param dstSpace The destination color space, an \c #AIColorConversionSpaceValue. - @param dstColor [out] A buffer in which to return the converted color, an array big enough - to hold the number of color values appropriate to the destination color space. - @param options The options structure appropriate to the purpose - of the conversion (preview or export). See \c #AIColorConvertOptions. - @param inGamut [out] A buffer in which to return true if the source color was - within the gamut of the destination space. - */ - AIAPI AIErr (*ConvertSampleColor) ( ai::int32 srcSpace, AIFloatSampleComponent *srcColor, - ai::int32 dstSpace, AIFloatSampleComponent *dstColor, - const AIColorConvertOptions& options, - AIBoolean *inGamut); - - /** Converts an array of image pixels from one color space to another. - @param srcSpace The source color space, an \c #AIColorConversionSpaceValue. - @param srcColor The color to convert, an array containing the number of pixels - specified by \c pixelCount, where each pixel contains the number of color - values appropriate to the source color space. - @param dstSpace The destination color space, an \c #AIColorConversionSpaceValue. - @param dstColor [out] A buffer in which to return the converted color, an array big enough - to hold \c pixelCount pixels using the number of color values appropriate to the - destination color space. - @param pixelCount The number of pixels in the source image. - @param flags To specify that the bits of a 1-bit color space (\c #kAIMonoColorSpace) - are inverted, pass the constant \c kRasterInvertBits. - @param options The options structure appropriate to the purpose - of the conversion (preview or export). See \c #AIColorConvertOptions. - */ - AIAPI AIErr (*ConvertImageColor) ( ai::int32 srcSpace, AIImageComponent *srcColor, - ai::int32 dstSpace, AIImageComponent *dstColor, - ai::int32 pixelCount, ai::uint16 flags, - const AIColorConvertOptions& options); -} AIColorConversionSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIColorConversion__ +#define __AIColorConversion__ + +/* + * Name: AIColorConversion.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Color Conversion Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "IAIColorSpace.hpp" + +#include "AIHeaderBegin.h" + +/** @file AIColorConversion.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIColorConversionSuite "AI Color Conversion Suite" +#define kAIColorConversionVersion10 AIAPI_VERSION(10) +#define kAIColorConversionSuiteVersion kAIColorConversionVersion10 +#define kAIColorConversionVersion kAIColorConversionSuiteVersion + +/** Color spaces that are available for conversion. See \c #AIColorConversionSuite::ConvertImageColor + and \c #AIColorConversionSuite::ConvertSampleColor */ +enum AIColorConversionSpaceValue { + kAIMonoColorSpace = 0, + kAIGrayColorSpace = 1, + kAIRGBColorSpace = 2, + kAIARGBColorSpace = 3, + kAICMYKColorSpace = 4, + kAIACMYKColorSpace = 5, + kAIAGrayColorSpace = 6, + kAILabColorSpace = 7 +}; + + +/** @ingroup Errors + See \c #AIColorConversionSuite. */ +#define kColorConversionErr 'CCER' + + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** A color sample pixel value. See \c #AIColorConversionSuite::ConvertSampleColorEx(). */ +typedef AIReal AISampleComponent; +typedef AIFloat AIFloatSampleComponent; +/** An image pixel value. See \c #AIColorConversionSuite::ConvertImageColorEx(). */ +typedef unsigned char AIImageComponent; + +/** Color-space conversion options. When converting CMYK to gray or RGB for + preview or export, the constructor sets the appropriate black preservation + value-- that is, whether a CMYK to RGB/Gray color transformation maps + CMYK 0,0,0,1 to the darkest black: + \li By default, the operation uses the standard conversion, + which never uses black preservation. + \li For export, the operation uses the black-preservation setting + that is currently configured in the print and export preferences. + \li For preview, the operation uses the black-preservation setting + that is currently configured in the screen-display preferences. + */ +class AIColorConvertOptions { +public: + /** The purpose for performing a color-space conversion. */ + enum Purpose { + /** Do standard conversion, without black preservation. */ + kDefault, + /** Use conversion options appropriate to creating an image + for screen display. */ + kForPreview, + /** Use conversion options appropriate to creating an image + for print or export. */ + kForExport, + kDummy = 0xFFFFFFFF + }; + /** Default color-space conversion option. + The operation uses the standard conversion, + which never uses black preservation. */ + AIColorConvertOptions () : + purpose(kDefault) + { + } + + /** Creates a color-conversion structure. + @param _purpose The intended purpose of the conversion. + When converting CMYK to gray or RGB for preview or export, + sets the appropriate black preservation value. + @return A color-conversion structure to pass to conversion + functions. + @see \c #AIColorConversionSuite::ConvertImageColor()
+ \c #AIColorConversionSuite::ConvertImageColorEx()
+ \c #AIColorConversionSuite::ConvertSampleColor()
+ \c #AIColorConversionSuite::ConvertSampleColorEx() + */ + AIColorConvertOptions (const Purpose& _purpose) : + purpose(_purpose) + { + } + /** Copy constructor */ + AIColorConvertOptions (const AIColorConvertOptions& src) : + purpose(src.purpose) + { + } + + /** Assignment operator */ + AIColorConvertOptions& operator= (const AIColorConvertOptions& src) + { + purpose = src.purpose; + return *this; + } + /** The purpose for performing a color-space conversion. + \c #kDefault, \c #kForPreview or \c #kForExport */ + Purpose purpose; +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Provides functions for converting color values and image sample values + between color spaces. + + \li If color management is on, the functions use the document profile if it has one, + otherwise they use the profiles from the Color Settings dialog. + \li If color management is off, the functions perform device conversions. + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIColorConversionSuite and \c #kAIColorConversionVersion. + +*/ +typedef struct { + + /** Converts a sample-component color from one color space to another. + (This version uses colorspace data types.) + @param srcSpace The source color space. + @param srcColor The color to convert, a color sample object. + @param dstSpace The destination color space. + @param dstColor [out] A buffer in which to return the converted color sample object. + @param options The options structure appropriate to the purpose + of the conversion (preview or export). See \c #AIColorConvertOptions. + @param inGamut [out] A buffer in which to return true if the source color was + within the gamut of the destination space. Can be \c NULL. + */ + AIAPI AIErr (*ConvertSampleColorEx) ( const ai::ColorSpace &srcSpace, AIFloatSampleComponent *srcColor, + const ai::ColorSpace &dstSpace, AIFloatSampleComponent *dstColor, + const AIColorConvertOptions& options, + ASBoolean *inGamut); + + /** Converts an array of image pixels from one color space to another. + (This version uses the colorspace data type and specific bits-per-pixel values.) + @param srcSpace The source color space. + @param srcBitsPerPixel The bits-per-pixel in the source color. + @param srcColor The color to convert, an array containing the number of pixels + specified by \c pixelCount, using the bits-per-pixel specified by \c srcBitsPerPixel. + @param dstSpace The destination color space. + @param dstBitsPerPixel The bits-per-pixel in the destination color. + @param dstColor [out] A buffer in which to return the converted image, an array big enough + to contain the number of pixels specified by \c pixelCount, using the bits-per-pixel + specified by \c dstBitsPerPixel. + @param pixelCount The number of pixels in the image. + @param flags To specify that the bits of a 1-bit color space (\c #kAIMonoColorSpace) + are inverted, pass the constant \c kRasterInvertBits. + @param options The options structure appropriate to the purpose + of the conversion (preview or export). See \c #AIColorConvertOptions. + */ + AIAPI AIErr (*ConvertImageColorEx) ( const ai::ColorSpace &srcSpace, + ai::int32 srcBitsPerPixel, + AIImageComponent *srcColor, + const ai::ColorSpace &dstSpace, + ai::int32 dstBitsPerPixel, + AIImageComponent *dstColor, + ai::int32 pixelCount, ai::uint16 flags, + const AIColorConvertOptions& options); + + /** Converts a sample-component color from one color space to another. + @param srcSpace The source color space, an \c #AIColorConversionSpaceValue. + @param srcColor The color to convert, an array containing the number of color + values appropriate to the source color space. + @param dstSpace The destination color space, an \c #AIColorConversionSpaceValue. + @param dstColor [out] A buffer in which to return the converted color, an array big enough + to hold the number of color values appropriate to the destination color space. + @param options The options structure appropriate to the purpose + of the conversion (preview or export). See \c #AIColorConvertOptions. + @param inGamut [out] A buffer in which to return true if the source color was + within the gamut of the destination space. + */ + AIAPI AIErr (*ConvertSampleColor) ( ai::int32 srcSpace, AIFloatSampleComponent *srcColor, + ai::int32 dstSpace, AIFloatSampleComponent *dstColor, + const AIColorConvertOptions& options, + AIBoolean *inGamut); + + /** Converts an array of image pixels from one color space to another. + @param srcSpace The source color space, an \c #AIColorConversionSpaceValue. + @param srcColor The color to convert, an array containing the number of pixels + specified by \c pixelCount, where each pixel contains the number of color + values appropriate to the source color space. + @param dstSpace The destination color space, an \c #AIColorConversionSpaceValue. + @param dstColor [out] A buffer in which to return the converted color, an array big enough + to hold \c pixelCount pixels using the number of color values appropriate to the + destination color space. + @param pixelCount The number of pixels in the source image. + @param flags To specify that the bits of a 1-bit color space (\c #kAIMonoColorSpace) + are inverted, pass the constant \c kRasterInvertBits. + @param options The options structure appropriate to the purpose + of the conversion (preview or export). See \c #AIColorConvertOptions. + */ + AIAPI AIErr (*ConvertImageColor) ( ai::int32 srcSpace, AIImageComponent *srcColor, + ai::int32 dstSpace, AIImageComponent *dstColor, + ai::int32 pixelCount, ai::uint16 flags, + const AIColorConvertOptions& options); +} AIColorConversionSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorHarmony.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorHarmony.h index 3824e07..bc398c2 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorHarmony.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorHarmony.h @@ -1,194 +1,194 @@ -#ifndef __AIColorHarmony__ -#define __AIColorHarmony__ -/* - * Name: AIColorHarmony.h - * Author: - * Date: - * Purpose: Suite for other plug-ins to access Adobe Illustrator Color Harmony dialogs and functionality. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1990-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AISwatchList__ -#include "AISwatchList.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIColorHarmony.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIColorHarmonySuite "AI Color Harmony Suite" -#define kAIColorHarmonySuiteVersion3 AIAPI_VERSION(3) -#define kAIColorHarmonySuiteVersion kAIColorHarmonySuiteVersion3 -#define kAIColorHarmonyVersion kAIColorHarmonySuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -// New in Illustrator 13.0 - -/** @ingroup Suites - These functions allow you to use the three Color Harmony dialogs: - \li The Color Guide, a floating dialog (palette) that displays a single color scheme. - \li The Color Harmony modal dialog that allows a user to modify color schemes and - harmony rules and to recolorize art. - \li The Variations modal dialog that applies variations of a single color scheme - to the selected art (and provides access to the Color Harmony dialog.) - The Variations dialog is currently an unsupported engineering prototype and - should not be displayed. - - These dialogs share the concept of a current \e color \e scheme, which is a set of colors with - various rules controlling how the other colors in the set are adjusted when one of the colors - is changed. A color scheme can be associated with a swatch group, so that when the color - scheme is changed, the swatch group is redefined (see the #AISwatchGroupSuite.) - - The Color Harmony dialog has two panels that can be displayed side-by-side, a primary panel - on the left side that is always open, and a storage panel on the right that can be closed. - The left side can show the Edit panel, which allows you to edit multiple colors in parallel, - or the Assign panel (when artwork containing colors is selected), which allows precise control - over how the colors of the scheme are used to replace the original colors of the selected artwork. - - The modal dialogs can modify the document art and the contents of the swatches palette. - Upon return from invoking one of these dialogs, you must not assume that the art or swatch - content is unchanged. Although you can control some of the initial state of the dialog, - it is possible for the user to make changes to state that you initialized. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIColorHarmonySuite and \c #kAIColorHarmonyVersion. -*/ -typedef struct -{ - /** Retrieves the swatch group for the current document that is currently - associated with the Color Harmony dialogs, if any. - (Note that this function returns an object value, not an error code.) - @return The swatch group object, or \c NULL if there is no active - document. - */ - AIAPI AISwatchGroupRef (*GetCurrentSwatchGroup) ( void ); - - /** Associates the current color scheme with a swatch group, setting the scheme's colors - to those in the swatch group. Does not show any dialogs or modify any art, but if the - Color Guide palette is visible, it is refreshed. - @param swatchGroup The swatch group object. - @return The error \c #kBadParameterErr if the swatch group - does not belong to the current document's swatch list. - */ - AIAPI AIErr (*SetCurrentSwatchGroup) ( AISwatchGroupRef swatchGroup ); - - /** Shows the Color Guide palette, displaying the current color scheme. */ - AIAPI AIErr (*ShowColorGuide) ( void ); - - /** Reports whether the Color Guide palette is currently shown, that is, - the palette has been created and the containing dialog is visible. - (Note that this function returns a boolean value, not an error code.) - @return True if the palette is shown, false otherwise. - @see \c #ADMDialogSuite10::IsVisible(). - */ - AIAPI AIBoolean (*IsColorGuideVisible) ( void ); - - /** Shows the Color Harmony modal dialog with default settings (typically - what was last shown). The current color scheme is whatever colors - are currently or were last shown in the Color Guide palette. - @param loadAllDocumentColorGroups When true, loads and displays color - schemes for all swatch groups in the current document. - When false, loads and displays only the swatch groups that are - selected in the Swatches palette. If this is true and there are - no color groups in the current document, or if it is false and - no swatch groups are selected, then the Storage panel is empty. - */ - AIAPI AIErr (*ShowHarmonyDialog) ( ASBoolean loadAllDocumentColorGroups ); - - /** Shows the Color Harmony modal dialog with a given swatch group loaded as the only color scheme. - @param swatchGroup The swatch group object. - @param forRecolor When true, if some art is selected, the Assign panel is active, - the Recolor Art option is checked, and the original colors are reduced - to the number of colors in the swatch group. -
When false, The Edit panel is active (in most recent state), - and the Storage panel is closed. - @note Upon return, the swatch group may have been redefined, renamed, or otherwise modified. - */ - AIAPI AIErr (*ShowWithColorGroup) ( AISwatchGroupRef swatchGroup, ASBoolean forRecolor ); - - /** Shows the Color Harmony modal dialog, loading schemes for specific swatch groups. - @param swatchGroupIndices Pointer to an array of 0-based index positions for - the swatch groups. See \c #AISwatchGroupSuite::GetNthSwatchGroup(). - @param ctSwatchGroups The size of the index array. - @param makeCurrent A 0-based index position in the index array. The color scheme - for that swatch group becomes current. In the range [0..ctSwatchGroups]. - Note that this is an index into the array of indices, \e not an index into the swatch list. - @param showStorage True to open the Storage panel. - */ - AIAPI AIErr (*ShowWithMultipleColorGroups) ( int *swatchGroupIndices, int ctSwatchGroups, int makeCurrent, ASBoolean showStorage ); - - /** Shows the Color Harmony modal dialog with the Assign panel active, the Recolor Art option checked, - all the colors collected into the same bucket (row), and a given color loaded into the new color. - The mapping method is initialized to Scale Tints. - @param tintColor The initial new color. - @param includeWhite When true, includes process white. (Always includes black and grays.) - */ - AIAPI AIErr (*ShowToTintArt) ( const AIColor &tintColor, ASBoolean includeWhite ); - - /** Shows the Color Harmony modal dialog with the Assign panel active, - the Recolor Art option checked, each color from the original art - in its own bucket (color row), all the buckets active, and all the new colors - set to the same as the original color and loaded into one scheme. - If the user saves the scheme immediately to the Swatches palette, it - will create a color group containing all the colors in the selected art. - This can also be used as a starting point for fine-tuning individual art colors. - @param combineTints True to load all tints of the same global or spot color into the - same bucket, and set the mapping method to Scale Tints. False to load each tint into - its own bucket and set the mapping method to Exact Colors. - */ - AIAPI AIErr (*ShowToExtractArtColors) ( ASBoolean combineTints ); - - /** Sets the base color of the Color Guide palette. The base color is the color from - which the displayed harmony colors are derived. The harmony rule display and - color grid update to reflect the new base color. - - Generally, if you set the current path style you should also set the base color. - The Swatches palette, Color palette, and Color Picker all set both the current path style and - the Color Guide's base color. Selection changes do not change the base color. - @param color The new base color. - */ - AIAPI AIErr (*SetColorGuideBaseColor) ( const AIColor *color ); - -} AIColorHarmonySuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIColorHarmony__ +#define __AIColorHarmony__ +/* + * Name: AIColorHarmony.h + * Author: + * Date: + * Purpose: Suite for other plug-ins to access Adobe Illustrator Color Harmony dialogs and functionality. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1990-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AISwatchList__ +#include "AISwatchList.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIColorHarmony.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIColorHarmonySuite "AI Color Harmony Suite" +#define kAIColorHarmonySuiteVersion3 AIAPI_VERSION(3) +#define kAIColorHarmonySuiteVersion kAIColorHarmonySuiteVersion3 +#define kAIColorHarmonyVersion kAIColorHarmonySuiteVersion + +/******************************************************************************* + ** + ** Suite + ** + **/ + +// New in Illustrator 13.0 + +/** @ingroup Suites + These functions allow you to use the three Color Harmony dialogs: + \li The Color Guide, a floating dialog (palette) that displays a single color scheme. + \li The Color Harmony modal dialog that allows a user to modify color schemes and + harmony rules and to recolorize art. + \li The Variations modal dialog that applies variations of a single color scheme + to the selected art (and provides access to the Color Harmony dialog.) + The Variations dialog is currently an unsupported engineering prototype and + should not be displayed. + + These dialogs share the concept of a current \e color \e scheme, which is a set of colors with + various rules controlling how the other colors in the set are adjusted when one of the colors + is changed. A color scheme can be associated with a swatch group, so that when the color + scheme is changed, the swatch group is redefined (see the #AISwatchGroupSuite.) + + The Color Harmony dialog has two panels that can be displayed side-by-side, a primary panel + on the left side that is always open, and a storage panel on the right that can be closed. + The left side can show the Edit panel, which allows you to edit multiple colors in parallel, + or the Assign panel (when artwork containing colors is selected), which allows precise control + over how the colors of the scheme are used to replace the original colors of the selected artwork. + + The modal dialogs can modify the document art and the contents of the swatches palette. + Upon return from invoking one of these dialogs, you must not assume that the art or swatch + content is unchanged. Although you can control some of the initial state of the dialog, + it is possible for the user to make changes to state that you initialized. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIColorHarmonySuite and \c #kAIColorHarmonyVersion. +*/ +typedef struct +{ + /** Retrieves the swatch group for the current document that is currently + associated with the Color Harmony dialogs, if any. + (Note that this function returns an object value, not an error code.) + @return The swatch group object, or \c NULL if there is no active + document. + */ + AIAPI AISwatchGroupRef (*GetCurrentSwatchGroup) ( void ); + + /** Associates the current color scheme with a swatch group, setting the scheme's colors + to those in the swatch group. Does not show any dialogs or modify any art, but if the + Color Guide palette is visible, it is refreshed. + @param swatchGroup The swatch group object. + @return The error \c #kBadParameterErr if the swatch group + does not belong to the current document's swatch list. + */ + AIAPI AIErr (*SetCurrentSwatchGroup) ( AISwatchGroupRef swatchGroup ); + + /** Shows the Color Guide palette, displaying the current color scheme. */ + AIAPI AIErr (*ShowColorGuide) ( void ); + + /** Reports whether the Color Guide palette is currently shown, that is, + the palette has been created and the containing dialog is visible. + (Note that this function returns a boolean value, not an error code.) + @return True if the palette is shown, false otherwise. + @see \c #ADMDialogSuite10::IsVisible(). + */ + AIAPI AIBoolean (*IsColorGuideVisible) ( void ); + + /** Shows the Color Harmony modal dialog with default settings (typically + what was last shown). The current color scheme is whatever colors + are currently or were last shown in the Color Guide palette. + @param loadAllDocumentColorGroups When true, loads and displays color + schemes for all swatch groups in the current document. + When false, loads and displays only the swatch groups that are + selected in the Swatches palette. If this is true and there are + no color groups in the current document, or if it is false and + no swatch groups are selected, then the Storage panel is empty. + */ + AIAPI AIErr (*ShowHarmonyDialog) ( ASBoolean loadAllDocumentColorGroups ); + + /** Shows the Color Harmony modal dialog with a given swatch group loaded as the only color scheme. + @param swatchGroup The swatch group object. + @param forRecolor When true, if some art is selected, the Assign panel is active, + the Recolor Art option is checked, and the original colors are reduced + to the number of colors in the swatch group. +
When false, The Edit panel is active (in most recent state), + and the Storage panel is closed. + @note Upon return, the swatch group may have been redefined, renamed, or otherwise modified. + */ + AIAPI AIErr (*ShowWithColorGroup) ( AISwatchGroupRef swatchGroup, ASBoolean forRecolor ); + + /** Shows the Color Harmony modal dialog, loading schemes for specific swatch groups. + @param swatchGroupIndices Pointer to an array of 0-based index positions for + the swatch groups. See \c #AISwatchGroupSuite::GetNthSwatchGroup(). + @param ctSwatchGroups The size of the index array. + @param makeCurrent A 0-based index position in the index array. The color scheme + for that swatch group becomes current. In the range [0..ctSwatchGroups]. + Note that this is an index into the array of indices, \e not an index into the swatch list. + @param showStorage True to open the Storage panel. + */ + AIAPI AIErr (*ShowWithMultipleColorGroups) ( int *swatchGroupIndices, int ctSwatchGroups, int makeCurrent, ASBoolean showStorage ); + + /** Shows the Color Harmony modal dialog with the Assign panel active, the Recolor Art option checked, + all the colors collected into the same bucket (row), and a given color loaded into the new color. + The mapping method is initialized to Scale Tints. + @param tintColor The initial new color. + @param includeWhite When true, includes process white. (Always includes black and grays.) + */ + AIAPI AIErr (*ShowToTintArt) ( const AIColor &tintColor, ASBoolean includeWhite ); + + /** Shows the Color Harmony modal dialog with the Assign panel active, + the Recolor Art option checked, each color from the original art + in its own bucket (color row), all the buckets active, and all the new colors + set to the same as the original color and loaded into one scheme. + If the user saves the scheme immediately to the Swatches palette, it + will create a color group containing all the colors in the selected art. + This can also be used as a starting point for fine-tuning individual art colors. + @param combineTints True to load all tints of the same global or spot color into the + same bucket, and set the mapping method to Scale Tints. False to load each tint into + its own bucket and set the mapping method to Exact Colors. + */ + AIAPI AIErr (*ShowToExtractArtColors) ( ASBoolean combineTints ); + + /** Sets the base color of the Color Guide palette. The base color is the color from + which the displayed harmony colors are derived. The harmony rule display and + color grid update to reflect the new base color. + + Generally, if you set the current path style you should also set the base color. + The Swatches palette, Color palette, and Color Picker all set both the current path style and + the Color Guide's base color. Selection changes do not change the base color. + @param color The new base color. + */ + AIAPI AIErr (*SetColorGuideBaseColor) ( const AIColor *color ); + +} AIColorHarmonySuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorSpace.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorSpace.h index e62961f..a50b6b1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorSpace.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIColorSpace.h @@ -1,295 +1,295 @@ - -#ifndef __AIColorSpace__ -#define __AIColorSpace__ - -/* - * Name: AIColorSpace.h - * $Revision: 1 $ - * Author: Simon Chen - * Date: - * Purpose: Adobe Illustrator Color Space Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "IAIColorSpace.hpp" -#include "AITypes.h" - -#include "AIHeaderBegin.h" - -/** @file AIColorSpace.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** Color space suite name */ -#define kAIColorSpaceSuite "AI Color Space Suite" -/** Color space suite version */ -#define kAIColorSpaceSuiteVersion AIAPI_VERSION(7) -/** Color space suite version */ -#define kAIColorSpaceVersion kAIColorSpaceSuiteVersion - -/******************************************************************************* - ** - ** Types - ** - **/ - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These function allow you to manipulate color-space objects and the - application's global list of color spaces. - @see ai::ColorSpace class, \c AIColor,h, \c #AIColorConversionSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIColorSpaceSuite and \c #kAIColorSpaceVersion. - -*/ -typedef struct { - /* Color Space List related APIs */ - - /** Creates a new color-space list containing a given color space. - @param csList [out] A buffer in which to return the new color-space list object. - @param The color space object. - */ - AIAPI AIErr (*NewColorSpaceList) (ai::ColorSpaceList &csList, const ai::ColorSpace &cs); - /** Adds a color space to a color-space list. - @param csList The color-space list object. - @param The color space object. - */ - AIAPI AIErr (*AddColorSpace) (ai::ColorSpaceList &csList, const ai::ColorSpace &cs); - /** Reports the number of color space objects in a color-space list. - Use with \c #GetNthColorSpace() to iterate through the list. - (Note that this function returns an integer value, not an error code.) - @param csList The color-space list object. - @return The number of color space objects. - */ - AIAPI ai::int32 (*GetNumColorSpaces) (const ai::ColorSpaceList &csList); - /** Retrieves a color space object from a color-space list. - Use with \c #GetNumColorSpaces() to iterate through the list. - @param csList The color-space list object. - @param n The 0-based position index of the color space object. - @param cs [out] A buffer in which to return the color-space object. - This is an invalid object if the index is out of range. - */ - AIAPI AIErr (*GetNthColorSpace) (const ai::ColorSpaceList &csList, ai::int32 n, ai::ColorSpace &cs); - /** Duplicates a color space list. - @param out [out] A buffer in which to return the new color-space list object. - @param in The color-space list object to duplicate. - */ - AIAPI AIErr (*CopyColorSpaceList) (ai::ColorSpaceList &out, const ai::ColorSpaceList &in); - /** Frees a color-space list object. - @param csList The color-space list object. Upon return, this is an invalid object. - */ - AIAPI AIErr (*DeleteColorSpaceList) (ai::ColorSpaceList& csList); - - /** Normalizes a color space list by flattening any NChannel color space, - removing duplicates, compacting 4-process separation color spaces - into a single CMYK-process color space, and sorting the color spaces. - The order of the spot-separation color spaces in the original list is preserved. - @param csList [in, out] The color-space list object. - @param docColorModel The document color model, an \c #AIDocumentSuite::AIDocumentColorModelValue. - @param convertGrayToFullProcess When false, if the color model is - \c #kDocCMYKColor, a gray color space is converted to separation Black. - Otherwise, a gray color space is converted to the full process - in the document color space. - */ - AIAPI AIErr (*Normalize)(ai::ColorSpaceList& csList, ai::int16 docColorModel, AIBoolean convertGrayToFullProcess); - - /* Color Space related APIs */ - - /** Creates a standard color space (Gray, RGB, CMYK, or LAB) with optional alpha channel. - @param cs [out] A buffer in which to return the new color-space object. - @param family The color family constant, Gray, RGB, CMYK, or LAB. - @param hasAlpha True to create a color space with an alpha channel, false otherwise. - */ - AIAPI AIErr (*NewSimpleColorSpace) (ai::ColorSpace &cs, ai::ColorSpace::Family family, AIBoolean hasAlpha); - /** Creates a process-separation CMYK color space. - @param cs [out] A buffer in which to return the new color-space object. - @param separationNum The process-separation plate of the base color space. - The separation is never a spot color plate. - @param hasAlpha True to create a color space with an alpha channel, false otherwise. - */ - AIAPI AIErr (*NewProcessSeparationColorSpace) (ai::ColorSpace &cs, ai::int32 separationNum, AIBoolean hasAlpha); - /** Creates a color space based on a global custom color. This can be a spot color. - or a global process color. - @param cs [out] A buffer in which to return the new color-space object. - @param customColor The custom color. - @param hasAlpha True to create a color space with an alpha channel, false otherwise. - */ - AIAPI AIErr (*NewGlobalColorSpace) (ai::ColorSpace &cs, const AICustomColorHandle customColor, AIBoolean hasAlpha); - /** Creates an NChannel color space using a fully specified color space list. - The list must conform to all requirements of an NChannel color space, - including at most one process color space and no duplicate channels, - with all RGB and Lab channels present and in order. - @param cs [out] A buffer in which to return the new color-space object. - @param csList The color-space list. - @param hasAlpha True to create a color space with an alpha channel, false otherwise. - @param promoteToProcess True to construct an equivalent process color space instead - of an NChannel color space, if possible. For example, if the input color - space list contains the full process components and has no spot components, - an equivalent process color space representation exists and is returned. - */ - AIAPI AIErr (*NewNChannelColorSpace) (ai::ColorSpace &cs, const ai::ColorSpaceList &csList, AIBoolean hasAlpha, AIBoolean promoteToProcess); - /** Creates an indexed color space from a base color space, which can be any valid color space - except indexed, including Separation and NChannel. - @param cs [out] A buffer in which to return the new color-space object. - @param baseCs The base color-space object. - @param numComponents The number of components in the base color space, 3 or 4. - A 4-component RGB table is in 0RGB order. - @param numEntries The number of entries in the lookup table. - @param lookup [out] A buffer in which to return the lookup table. The table size - must be numEntries * numComponents. - */ - AIAPI AIErr (*NewIndexedColorSpace) (ai::ColorSpace &cs, const ai::ColorSpace &baseCs, ai::int32 numComponents, - ai::int32 numEntries, const ASUInt8 *lookup); - /** Creates a color space based on another color space, ignoring the alpha channel if present. - @param cs [out] A buffer in which to return the new color-space object. - @param baseCs The color-space objectto copy. - @param hasAlpha True to create a color space with an alpha channel, false otherwise. - */ - AIAPI AIErr (*NewColorSpace) (ai::ColorSpace &cs, const ai::ColorSpace &baseCs, AIBoolean hasAlpha); - /** Duplicates a color space. - @param out [out] A buffer in which to return the new color-space object. - @param in The color-space object to copy. - */ - AIAPI AIErr (*CopyColorSpace) (ai::ColorSpace& out, const ai::ColorSpace& in); - /** Frees a color-space object. - @param cs The color-space object. Upon return, this is an invalid object. - */ - AIAPI AIErr (*DeleteColorSpace) (ai::ColorSpace& cs); - /** Retrieves the family of a color space (Gray, RGB, CMYK, or LAB). - (Note that this function returns a constant value, not an error code.) - @param cs The color-space object. - @return The color-space family constant. - */ - AIAPI ai::ColorSpace::Family (*GetFamily) (const ai::ColorSpace &cs); - /** Reports whether a color space has an alpha component. - An Indexed color space has an alpha component if and only if - its base color space has an alpha component. - (Note that this function returns a boolean value, not an error code.) - @param cs The color-space object. - @return True if the color space has an alpha component. - */ - AIAPI AIBoolean (*HasAlpha) (const ai::ColorSpace &cs); - /** Reports the number of components in a color space, including the alpha channel if it exists. - An Indexed color space is considered to have only one component in addition to the - possible alpha component (\e not the number of color components in the base color space). - (Note that this function returns an integer value, not an error code.) - @param cs The color-space object. - @return The number of components. - @see \c #GetNumColorComponents() - */ - AIAPI ai::int32 (*GetNumComponents) (const ai::ColorSpace &cs); - /** Reports the number of color components in a color space. Does not count the alpha channel, if any. - For the Indexed color space, this is the number of color components in its base color space. - (Note that this function returns an integer value, not an error code.) - @param cs The color-space object. - @return The number of color components. - @see \c #GetNumComponents() - */ - AIAPI ai::int32 (*GetNumColorComponents) (const ai::ColorSpace &cs); - /** Reports the number of spot components in a color space. Does not count the alpha channel, if any. - This is 0 for CMYK, RGB, Gray, Lab, and for "process" separations. - It is 1 for "spot" separations. For the Indexed color space, this is the - number of spot color components in its base color space. - (Note that this function returns an integer value, not an error code.) - @param cs The color-space object. - @return The number of spot components. - */ - AIAPI ai::int32 (*GetNumSpotComponents) (const ai::ColorSpace &cs); - /** Returns the base color space for an Indexed color space, - or the alternate color space for a Separation/NChannel color space. - For a standard color space, returns the color space itself. - @param cs The color-space object. - @param baseCs [out] A buffer in which to return the base color-space object. - */ - AIAPI AIErr (*GetBaseColorSpace) (const ai::ColorSpace &cs, ai::ColorSpace &baseCs); - /** Reports the number of components in an indexed color table. - (Note that this function returns an integer value, not an error code.) - @param cs The color-space object. - @return The number of components, or 0 for non-indexed color spaces. - */ - AIAPI ai::int32 (*GetIndexedNumComponents) (const ai::ColorSpace &cs); - /** Reports the number of color table entries in an indexed color table. - (Note that this function returns an integer value, not an error code.) - @param cs The color-space object. - @return The number of entries, or 0 for non-indexed color spaces. - */ - AIAPI ai::int32 (*GetIndexedNumEntries) (const ai::ColorSpace &cs); - /** Retrieves the color table of an indexed color space. - (Note that this function returns an numeric value, not an error code.) - @param cs The color-space object. - @return The number of entries, or \c NULL for non-indexed color spaces. - */ - AIAPI const ASUInt8* (*GetIndexedTable) (const ai::ColorSpace &cs); - /** Retrieves the alternate color values in the alternate color space for a separation color space. - (Note that this function returns an numeric array value, not an error code.) - @param cs The color-space object. - @return A pointer to an array of color values, or \c NULL for non-separation color spaces. - */ - AIAPI const AIFloat* (*GetSeparationAltColors) (const ai::ColorSpace &cs); - /** Retrieves the fully-specified color-space list that contains a non-indexed color space. - @param cs The color-space object. - @param csList [out] A buffer in which to return the color-space list object. - This is an invalid object if the color space is indexed. - */ - AIAPI AIErr (*GetColorSpaceList) (const ai::ColorSpace &cs, ai::ColorSpaceList &csList); - /** Retrieves the colorant name of a component of a color space. Use with - \c #GetNumColorComponents() to iterate through components. - @param cs The color-space object. - @param n The 0-based position index of the color component. - @param name [out] A buffer in which to return the name string, or the empty string - if the index is out of range. The names are: - \li "Gray" for Gray colorspaces - \li "Red","Green","Blue" for RGB colorspaces - \li "Cyan","Magenta","Yellow","Black" for CMYK colorspaces - \li Empty for LAB colorspaces - */ - AIAPI AIErr (*GetNthColorant) (const ai::ColorSpace &cs, ai::int32 n, ai::UnicodeString& name); - /** Reports whether a color space has all process components. - (Note that this function returns an boolean value, not an error code.) - @param cs The color-space object. - @return True if the CMYK, RGB, Gray, or Lab color space has all process components. - False if the color space has no process components, or the - color space is a spot or process separation. - */ - AIAPI AIBoolean (*HasFullSetOfProcessComponents) (const ai::ColorSpace &cs); - /** Reports whether two color spaces are identical. - (Note that this function returns an boolean value, not an error code.) - @param cs1 The first color-space object. - @param cs2 The second color-space object. - @return True if the objects are identical, false otherwise. - */ - AIAPI AIBoolean (*Equal) (const ai::ColorSpace &cs1, const ai::ColorSpace &cs2); -} AIColorSpaceSuite; - - -#include "AIHeaderEnd.h" - - - -#endif // __AIColorSpace__ + +#ifndef __AIColorSpace__ +#define __AIColorSpace__ + +/* + * Name: AIColorSpace.h + * $Revision: 1 $ + * Author: Simon Chen + * Date: + * Purpose: Adobe Illustrator Color Space Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2005-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "IAIColorSpace.hpp" +#include "AITypes.h" + +#include "AIHeaderBegin.h" + +/** @file AIColorSpace.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** Color space suite name */ +#define kAIColorSpaceSuite "AI Color Space Suite" +/** Color space suite version */ +#define kAIColorSpaceSuiteVersion AIAPI_VERSION(7) +/** Color space suite version */ +#define kAIColorSpaceVersion kAIColorSpaceSuiteVersion + +/******************************************************************************* + ** + ** Types + ** + **/ + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + These function allow you to manipulate color-space objects and the + application's global list of color spaces. + @see ai::ColorSpace class, \c AIColor,h, \c #AIColorConversionSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIColorSpaceSuite and \c #kAIColorSpaceVersion. + +*/ +typedef struct { + /* Color Space List related APIs */ + + /** Creates a new color-space list containing a given color space. + @param csList [out] A buffer in which to return the new color-space list object. + @param The color space object. + */ + AIAPI AIErr (*NewColorSpaceList) (ai::ColorSpaceList &csList, const ai::ColorSpace &cs); + /** Adds a color space to a color-space list. + @param csList The color-space list object. + @param The color space object. + */ + AIAPI AIErr (*AddColorSpace) (ai::ColorSpaceList &csList, const ai::ColorSpace &cs); + /** Reports the number of color space objects in a color-space list. + Use with \c #GetNthColorSpace() to iterate through the list. + (Note that this function returns an integer value, not an error code.) + @param csList The color-space list object. + @return The number of color space objects. + */ + AIAPI ai::int32 (*GetNumColorSpaces) (const ai::ColorSpaceList &csList); + /** Retrieves a color space object from a color-space list. + Use with \c #GetNumColorSpaces() to iterate through the list. + @param csList The color-space list object. + @param n The 0-based position index of the color space object. + @param cs [out] A buffer in which to return the color-space object. + This is an invalid object if the index is out of range. + */ + AIAPI AIErr (*GetNthColorSpace) (const ai::ColorSpaceList &csList, ai::int32 n, ai::ColorSpace &cs); + /** Duplicates a color space list. + @param out [out] A buffer in which to return the new color-space list object. + @param in The color-space list object to duplicate. + */ + AIAPI AIErr (*CopyColorSpaceList) (ai::ColorSpaceList &out, const ai::ColorSpaceList &in); + /** Frees a color-space list object. + @param csList The color-space list object. Upon return, this is an invalid object. + */ + AIAPI AIErr (*DeleteColorSpaceList) (ai::ColorSpaceList& csList); + + /** Normalizes a color space list by flattening any NChannel color space, + removing duplicates, compacting 4-process separation color spaces + into a single CMYK-process color space, and sorting the color spaces. + The order of the spot-separation color spaces in the original list is preserved. + @param csList [in, out] The color-space list object. + @param docColorModel The document color model, an \c #AIDocumentSuite::AIDocumentColorModelValue. + @param convertGrayToFullProcess When false, if the color model is + \c #kDocCMYKColor, a gray color space is converted to separation Black. + Otherwise, a gray color space is converted to the full process + in the document color space. + */ + AIAPI AIErr (*Normalize)(ai::ColorSpaceList& csList, ai::int16 docColorModel, AIBoolean convertGrayToFullProcess); + + /* Color Space related APIs */ + + /** Creates a standard color space (Gray, RGB, CMYK, or LAB) with optional alpha channel. + @param cs [out] A buffer in which to return the new color-space object. + @param family The color family constant, Gray, RGB, CMYK, or LAB. + @param hasAlpha True to create a color space with an alpha channel, false otherwise. + */ + AIAPI AIErr (*NewSimpleColorSpace) (ai::ColorSpace &cs, ai::ColorSpace::Family family, AIBoolean hasAlpha); + /** Creates a process-separation CMYK color space. + @param cs [out] A buffer in which to return the new color-space object. + @param separationNum The process-separation plate of the base color space. + The separation is never a spot color plate. + @param hasAlpha True to create a color space with an alpha channel, false otherwise. + */ + AIAPI AIErr (*NewProcessSeparationColorSpace) (ai::ColorSpace &cs, ai::int32 separationNum, AIBoolean hasAlpha); + /** Creates a color space based on a global custom color. This can be a spot color. + or a global process color. + @param cs [out] A buffer in which to return the new color-space object. + @param customColor The custom color. + @param hasAlpha True to create a color space with an alpha channel, false otherwise. + */ + AIAPI AIErr (*NewGlobalColorSpace) (ai::ColorSpace &cs, const AICustomColorHandle customColor, AIBoolean hasAlpha); + /** Creates an NChannel color space using a fully specified color space list. + The list must conform to all requirements of an NChannel color space, + including at most one process color space and no duplicate channels, + with all RGB and Lab channels present and in order. + @param cs [out] A buffer in which to return the new color-space object. + @param csList The color-space list. + @param hasAlpha True to create a color space with an alpha channel, false otherwise. + @param promoteToProcess True to construct an equivalent process color space instead + of an NChannel color space, if possible. For example, if the input color + space list contains the full process components and has no spot components, + an equivalent process color space representation exists and is returned. + */ + AIAPI AIErr (*NewNChannelColorSpace) (ai::ColorSpace &cs, const ai::ColorSpaceList &csList, AIBoolean hasAlpha, AIBoolean promoteToProcess); + /** Creates an indexed color space from a base color space, which can be any valid color space + except indexed, including Separation and NChannel. + @param cs [out] A buffer in which to return the new color-space object. + @param baseCs The base color-space object. + @param numComponents The number of components in the base color space, 3 or 4. + A 4-component RGB table is in 0RGB order. + @param numEntries The number of entries in the lookup table. + @param lookup [out] A buffer in which to return the lookup table. The table size + must be numEntries * numComponents. + */ + AIAPI AIErr (*NewIndexedColorSpace) (ai::ColorSpace &cs, const ai::ColorSpace &baseCs, ai::int32 numComponents, + ai::int32 numEntries, const ASUInt8 *lookup); + /** Creates a color space based on another color space, ignoring the alpha channel if present. + @param cs [out] A buffer in which to return the new color-space object. + @param baseCs The color-space objectto copy. + @param hasAlpha True to create a color space with an alpha channel, false otherwise. + */ + AIAPI AIErr (*NewColorSpace) (ai::ColorSpace &cs, const ai::ColorSpace &baseCs, AIBoolean hasAlpha); + /** Duplicates a color space. + @param out [out] A buffer in which to return the new color-space object. + @param in The color-space object to copy. + */ + AIAPI AIErr (*CopyColorSpace) (ai::ColorSpace& out, const ai::ColorSpace& in); + /** Frees a color-space object. + @param cs The color-space object. Upon return, this is an invalid object. + */ + AIAPI AIErr (*DeleteColorSpace) (ai::ColorSpace& cs); + /** Retrieves the family of a color space (Gray, RGB, CMYK, or LAB). + (Note that this function returns a constant value, not an error code.) + @param cs The color-space object. + @return The color-space family constant. + */ + AIAPI ai::ColorSpace::Family (*GetFamily) (const ai::ColorSpace &cs); + /** Reports whether a color space has an alpha component. + An Indexed color space has an alpha component if and only if + its base color space has an alpha component. + (Note that this function returns a boolean value, not an error code.) + @param cs The color-space object. + @return True if the color space has an alpha component. + */ + AIAPI AIBoolean (*HasAlpha) (const ai::ColorSpace &cs); + /** Reports the number of components in a color space, including the alpha channel if it exists. + An Indexed color space is considered to have only one component in addition to the + possible alpha component (\e not the number of color components in the base color space). + (Note that this function returns an integer value, not an error code.) + @param cs The color-space object. + @return The number of components. + @see \c #GetNumColorComponents() + */ + AIAPI ai::int32 (*GetNumComponents) (const ai::ColorSpace &cs); + /** Reports the number of color components in a color space. Does not count the alpha channel, if any. + For the Indexed color space, this is the number of color components in its base color space. + (Note that this function returns an integer value, not an error code.) + @param cs The color-space object. + @return The number of color components. + @see \c #GetNumComponents() + */ + AIAPI ai::int32 (*GetNumColorComponents) (const ai::ColorSpace &cs); + /** Reports the number of spot components in a color space. Does not count the alpha channel, if any. + This is 0 for CMYK, RGB, Gray, Lab, and for "process" separations. + It is 1 for "spot" separations. For the Indexed color space, this is the + number of spot color components in its base color space. + (Note that this function returns an integer value, not an error code.) + @param cs The color-space object. + @return The number of spot components. + */ + AIAPI ai::int32 (*GetNumSpotComponents) (const ai::ColorSpace &cs); + /** Returns the base color space for an Indexed color space, + or the alternate color space for a Separation/NChannel color space. + For a standard color space, returns the color space itself. + @param cs The color-space object. + @param baseCs [out] A buffer in which to return the base color-space object. + */ + AIAPI AIErr (*GetBaseColorSpace) (const ai::ColorSpace &cs, ai::ColorSpace &baseCs); + /** Reports the number of components in an indexed color table. + (Note that this function returns an integer value, not an error code.) + @param cs The color-space object. + @return The number of components, or 0 for non-indexed color spaces. + */ + AIAPI ai::int32 (*GetIndexedNumComponents) (const ai::ColorSpace &cs); + /** Reports the number of color table entries in an indexed color table. + (Note that this function returns an integer value, not an error code.) + @param cs The color-space object. + @return The number of entries, or 0 for non-indexed color spaces. + */ + AIAPI ai::int32 (*GetIndexedNumEntries) (const ai::ColorSpace &cs); + /** Retrieves the color table of an indexed color space. + (Note that this function returns an numeric value, not an error code.) + @param cs The color-space object. + @return The number of entries, or \c NULL for non-indexed color spaces. + */ + AIAPI const ASUInt8* (*GetIndexedTable) (const ai::ColorSpace &cs); + /** Retrieves the alternate color values in the alternate color space for a separation color space. + (Note that this function returns an numeric array value, not an error code.) + @param cs The color-space object. + @return A pointer to an array of color values, or \c NULL for non-separation color spaces. + */ + AIAPI const AIFloat* (*GetSeparationAltColors) (const ai::ColorSpace &cs); + /** Retrieves the fully-specified color-space list that contains a non-indexed color space. + @param cs The color-space object. + @param csList [out] A buffer in which to return the color-space list object. + This is an invalid object if the color space is indexed. + */ + AIAPI AIErr (*GetColorSpaceList) (const ai::ColorSpace &cs, ai::ColorSpaceList &csList); + /** Retrieves the colorant name of a component of a color space. Use with + \c #GetNumColorComponents() to iterate through components. + @param cs The color-space object. + @param n The 0-based position index of the color component. + @param name [out] A buffer in which to return the name string, or the empty string + if the index is out of range. The names are: + \li "Gray" for Gray colorspaces + \li "Red","Green","Blue" for RGB colorspaces + \li "Cyan","Magenta","Yellow","Black" for CMYK colorspaces + \li Empty for LAB colorspaces + */ + AIAPI AIErr (*GetNthColorant) (const ai::ColorSpace &cs, ai::int32 n, ai::UnicodeString& name); + /** Reports whether a color space has all process components. + (Note that this function returns an boolean value, not an error code.) + @param cs The color-space object. + @return True if the CMYK, RGB, Gray, or Lab color space has all process components. + False if the color space has no process components, or the + color space is a spot or process separation. + */ + AIAPI AIBoolean (*HasFullSetOfProcessComponents) (const ai::ColorSpace &cs); + /** Reports whether two color spaces are identical. + (Note that this function returns an boolean value, not an error code.) + @param cs1 The first color-space object. + @param cs2 The second color-space object. + @return True if the objects are identical, false otherwise. + */ + AIAPI AIBoolean (*Equal) (const ai::ColorSpace &cs1, const ai::ColorSpace &cs2); +} AIColorSpaceSuite; + + +#include "AIHeaderEnd.h" + + + +#endif // __AIColorSpace__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICommandManager.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICommandManager.h index a05c4a2..477bec3 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICommandManager.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICommandManager.h @@ -1,227 +1,227 @@ -#ifndef __AICommandManager__ -#define __AICommandManager__ - -/* - * Name: AICommandManager.h - * $Revision: 6 $ - * Author: Grace Ge - * Date: - * Purpose: . - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#include "AIUnicodeString.h" - -#include "AIHeaderBegin.h" - -/** @file AICommandManager.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAICommandManagerSuite "AI Command Manager Suite" - -//deleting the previous version numbers so that they are not used -#define kAICommandManagerSuiteVersion5 AIAPI_VERSION(5) -#define kAICommandManagerSuiteVersion kAICommandManagerSuiteVersion5 -#define kAICommandManagerVersion kAICommandManagerSuiteVersion - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** @deprecated Use \c #AIMenuSuite instead. */ -typedef struct { - /** The message data. */ - SPMessageData d; - /** Command ID is always zero for plug-ins */ - AICommandID commandID; - /** Keyboard shortcut key code. */ - ai::int32 key; - /** AI style modifiers. */ - ai::uint32 aiModifiers; - /** Unique identifying name string for the command. */ - char *commandStr; - /** Localized display label for the command. */ - char *localizedStr; -} AICommandMessage; - -typedef struct { - /** The message data. */ - SPMessageData d; - /** When receiving the clear event, the client should set the handled parameter - depending on whether the client handled the event. - Setting this value to true prevents the event from being sent to other clients. - */ - AIBoolean handled; -} AIClearCommandMessage; - -/* - * PluginCommand Message - */ - -/** @ingroup Callers - Caller for deprecated \c #AICommandManagerSuite. - @deprecated Use \c #AIMenuSuite instead. */ -#define kCallerAICommand "Plugin Command Manager" -/** @ingroup Selectors - Execute a \c #AICommandManagerSuite command. - @deprecated Use \c #AIMenuSuite instead. */ -#define kSelectorAICommand "Do Plugin Command" - -#define kSelectorAIClearCommand "Do Clear Command" - -/** @deprecated Use \c #AIMenuSuite instead. */ -#define kAICommandNormalContext 0x0000 -/** @deprecated Use \c #AIMenuSuite instead. */ -#define kAICommandTextEditContext 0x0001 -/** @deprecated Use \c #AIMenuSuite instead.*/ -#define kAICommandToolBoxContext 0x0002 -/** @deprecated Use \c #AIMenuSuite instead. */ -#define kAICommandPluginContext 0x0004 - -/******************************************************************************* - ** - ** Suite - ** - **/ - - /** @deprecated Use \c #AIMenuSuite instead. - This suite provides an older mechanism for manipulating Illustrator menu commands, - It is provided for compatibility, but has been superseded by - \c #AIMenuSuite. */ - -typedef struct { - - /** For internal use only. Creates a menu command. - @param commandID The unique identifier for the command. - @param name The unique identifying name string of the command. - @param localizedName The localized display label for the command, - which appears in the menu. - */ - AIAPI AIErr (*AddCommand) (AICommandID commandID, const char *name, const ai::UnicodeString& localizedName); - - /** Retrieves a command identifier from the name. - @param name The unique identifying name string of the command. - @param commandID [out] A buffer in which to return the ID. - */ - AIAPI AIErr (*GetCommandIDFromName) (const char *name, AICommandID *commandID); - - /** Retrieves a command identifier from the display label. - @param localizedName The localized label string of the command. - @param commandID [out] A buffer in which to return the ID. - */ - AIAPI AIErr (*GetCommandIDFromLocalizedName) (const ai::UnicodeString& localizedName, AICommandID *commandID); - - /** Retrieves a command name from the identifier. - @param commandID The command ID. - @param name [out] A buffer in which to return the unique identifying - name string. - */ - AIAPI AIErr (*GetCommandName) (AICommandID commandID, char *name); - - /** Retrieves a command display label from the identifier. - @param commandID The command ID. - @param localizedName [out] A buffer in which to return the localized - display label string. - */ - AIAPI AIErr (*GetCommandLocalizedName) (AICommandID commandID, ai::UnicodeString& localizedName); - - /** Not implemented */ - AIAPI AIErr (*TestFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers, AIBoolean *used); - /** Not implemented */ - AIAPI AIErr (*SetActionFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers); - /** Not implemented */ - AIAPI AIErr (*ClearActionFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers); - - /** Retrieves a command identifier from the keyboard shortcut. - @param key The keyboard shortcut key code. See AI documentation. - @param aiModifiers A logical OR of modifier key flags. See AI documentation. - @param commandID [out] A buffer in which to return the command ID. - @return The error \c #kBadParameterErr if no command ID exists for - this shortcut. - */ - AIAPI AIErr (*GetCommandIDFromShortCutKey) (int key, ai::uint32 aiModifiers, AICommandID *commandID); - - /** Retrieves a command display label by matching a string containing a partial version - of the name. - @param partialName The string to match. - @param localizedName [out] A buffer in which to return the localized - display label string of a command. - */ - AIAPI AIErr (*SearchCommandLocalizedName) (const ai::UnicodeString& partialName, ai::UnicodeString& localizedName); - - /** Not implemented */ - AIAPI AIErr (*GetShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 *key, ai::uint32 *aiModifiers, ai::int32 *represent); - /** Not implemented */ - AIAPI AIErr (*SetShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent); - /** Not implemented */ - AIAPI AIErr (*DeleteShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent); - - /** Not implemented */ - AIAPI AIErr (*GetShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, char *commandStr, ai::int32 *key, ai::uint32 *aiModifiers, ai::int32 *represent); - /** Not implemented */ - AIAPI AIErr (*SetShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent, - const char *commandStr, char *localizedStr, SPPluginRef pluginRef); - /** Not implemented */ - AIAPI AIErr (*DeleteShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, char *commandStr, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent); - /** Not implemented */ - AIAPI AIErr (*GetCommandExFromShortCutKey) (ai::int32 key, ai::uint32 aiModifiers, ai::int32 context, AICommandID *commandID, - SPPluginRef *pluginRef, char *commandStr, ai::int32 maxCommandStr, char *localizedStr, ai::int32 maxLocalizedStr); - - /** Not implemented */ - AIAPI AIErr (*SetActionFunctionKeyEx) (ai::int32 fkey, ai::uint32 aiModifiers, char *commandStr); - - /** Not implemented */ - AIAPI AIErr (*CountCommands)(ai::int32 *totalCommands); - /** Not implemented */ - AIAPI AIErr (*GetNthCommandInfo)(ai::int32 index, AICommandID *commandID, ai::int32 *context, ai::int32 *key, ai::int32 *represent, ai::uint32 *aiModifiers, - SPPluginRef *pluginRef, char *commandStr, ai::int32 maxCommandStr, char *localizedStr, ai::int32 maxLocalizedStr); - - /** For internal use only. Deletes a menu command. - @param commandID The command identifier. - */ - AIAPI AIErr (*DeleteCommand) (AICommandID commandID); - - /** Retrieves a command notifier name from the identifier. - @param commandID The command ID. - @param name [out] A buffer in which to return the unique command notifier string. - */ - AIAPI AIErr (*GetCommandNotifierName) (AICommandID commandID, ai::UnicodeString& notifierName); - -} AICommandManagerSuite; - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AICommandManager__ +#define __AICommandManager__ + +/* + * Name: AICommandManager.h + * $Revision: 6 $ + * Author: Grace Ge + * Date: + * Purpose: . + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#include "AIUnicodeString.h" + +#include "AIHeaderBegin.h" + +/** @file AICommandManager.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAICommandManagerSuite "AI Command Manager Suite" + +//deleting the previous version numbers so that they are not used +#define kAICommandManagerSuiteVersion5 AIAPI_VERSION(5) +#define kAICommandManagerSuiteVersion kAICommandManagerSuiteVersion5 +#define kAICommandManagerVersion kAICommandManagerSuiteVersion + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** @deprecated Use \c #AIMenuSuite instead. */ +typedef struct { + /** The message data. */ + SPMessageData d; + /** Command ID is always zero for plug-ins */ + AICommandID commandID; + /** Keyboard shortcut key code. */ + ai::int32 key; + /** AI style modifiers. */ + ai::uint32 aiModifiers; + /** Unique identifying name string for the command. */ + char *commandStr; + /** Localized display label for the command. */ + char *localizedStr; +} AICommandMessage; + +typedef struct { + /** The message data. */ + SPMessageData d; + /** When receiving the clear event, the client should set the handled parameter + depending on whether the client handled the event. + Setting this value to true prevents the event from being sent to other clients. + */ + AIBoolean handled; +} AIClearCommandMessage; + +/* + * PluginCommand Message + */ + +/** @ingroup Callers + Caller for deprecated \c #AICommandManagerSuite. + @deprecated Use \c #AIMenuSuite instead. */ +#define kCallerAICommand "Plugin Command Manager" +/** @ingroup Selectors + Execute a \c #AICommandManagerSuite command. + @deprecated Use \c #AIMenuSuite instead. */ +#define kSelectorAICommand "Do Plugin Command" + +#define kSelectorAIClearCommand "Do Clear Command" + +/** @deprecated Use \c #AIMenuSuite instead. */ +#define kAICommandNormalContext 0x0000 +/** @deprecated Use \c #AIMenuSuite instead. */ +#define kAICommandTextEditContext 0x0001 +/** @deprecated Use \c #AIMenuSuite instead.*/ +#define kAICommandToolBoxContext 0x0002 +/** @deprecated Use \c #AIMenuSuite instead. */ +#define kAICommandPluginContext 0x0004 + +/******************************************************************************* + ** + ** Suite + ** + **/ + + /** @deprecated Use \c #AIMenuSuite instead. + This suite provides an older mechanism for manipulating Illustrator menu commands, + It is provided for compatibility, but has been superseded by + \c #AIMenuSuite. */ + +typedef struct { + + /** For internal use only. Creates a menu command. + @param commandID The unique identifier for the command. + @param name The unique identifying name string of the command. + @param localizedName The localized display label for the command, + which appears in the menu. + */ + AIAPI AIErr (*AddCommand) (AICommandID commandID, const char *name, const ai::UnicodeString& localizedName); + + /** Retrieves a command identifier from the name. + @param name The unique identifying name string of the command. + @param commandID [out] A buffer in which to return the ID. + */ + AIAPI AIErr (*GetCommandIDFromName) (const char *name, AICommandID *commandID); + + /** Retrieves a command identifier from the display label. + @param localizedName The localized label string of the command. + @param commandID [out] A buffer in which to return the ID. + */ + AIAPI AIErr (*GetCommandIDFromLocalizedName) (const ai::UnicodeString& localizedName, AICommandID *commandID); + + /** Retrieves a command name from the identifier. + @param commandID The command ID. + @param name [out] A buffer in which to return the unique identifying + name string. + */ + AIAPI AIErr (*GetCommandName) (AICommandID commandID, char *name); + + /** Retrieves a command display label from the identifier. + @param commandID The command ID. + @param localizedName [out] A buffer in which to return the localized + display label string. + */ + AIAPI AIErr (*GetCommandLocalizedName) (AICommandID commandID, ai::UnicodeString& localizedName); + + /** Not implemented */ + AIAPI AIErr (*TestFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers, AIBoolean *used); + /** Not implemented */ + AIAPI AIErr (*SetActionFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers); + /** Not implemented */ + AIAPI AIErr (*ClearActionFunctionKey) (ai::int32 fkey, ai::uint32 aiModifiers); + + /** Retrieves a command identifier from the keyboard shortcut. + @param key The keyboard shortcut key code. See AI documentation. + @param aiModifiers A logical OR of modifier key flags. See AI documentation. + @param commandID [out] A buffer in which to return the command ID. + @return The error \c #kBadParameterErr if no command ID exists for + this shortcut. + */ + AIAPI AIErr (*GetCommandIDFromShortCutKey) (int key, ai::uint32 aiModifiers, AICommandID *commandID); + + /** Retrieves a command display label by matching a string containing a partial version + of the name. + @param partialName The string to match. + @param localizedName [out] A buffer in which to return the localized + display label string of a command. + */ + AIAPI AIErr (*SearchCommandLocalizedName) (const ai::UnicodeString& partialName, ai::UnicodeString& localizedName); + + /** Not implemented */ + AIAPI AIErr (*GetShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 *key, ai::uint32 *aiModifiers, ai::int32 *represent); + /** Not implemented */ + AIAPI AIErr (*SetShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent); + /** Not implemented */ + AIAPI AIErr (*DeleteShortCutKeyFromCommandID) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent); + + /** Not implemented */ + AIAPI AIErr (*GetShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, char *commandStr, ai::int32 *key, ai::uint32 *aiModifiers, ai::int32 *represent); + /** Not implemented */ + AIAPI AIErr (*SetShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent, + const char *commandStr, char *localizedStr, SPPluginRef pluginRef); + /** Not implemented */ + AIAPI AIErr (*DeleteShortCutKeyOfCommandEx) (AICommandID commandID, ai::int32 context, char *commandStr, ai::int32 key, ai::uint32 aiModifiers, ai::int32 represent); + /** Not implemented */ + AIAPI AIErr (*GetCommandExFromShortCutKey) (ai::int32 key, ai::uint32 aiModifiers, ai::int32 context, AICommandID *commandID, + SPPluginRef *pluginRef, char *commandStr, ai::int32 maxCommandStr, char *localizedStr, ai::int32 maxLocalizedStr); + + /** Not implemented */ + AIAPI AIErr (*SetActionFunctionKeyEx) (ai::int32 fkey, ai::uint32 aiModifiers, char *commandStr); + + /** Not implemented */ + AIAPI AIErr (*CountCommands)(ai::int32 *totalCommands); + /** Not implemented */ + AIAPI AIErr (*GetNthCommandInfo)(ai::int32 index, AICommandID *commandID, ai::int32 *context, ai::int32 *key, ai::int32 *represent, ai::uint32 *aiModifiers, + SPPluginRef *pluginRef, char *commandStr, ai::int32 maxCommandStr, char *localizedStr, ai::int32 maxLocalizedStr); + + /** For internal use only. Deletes a menu command. + @param commandID The command identifier. + */ + AIAPI AIErr (*DeleteCommand) (AICommandID commandID); + + /** Retrieves a command notifier name from the identifier. + @param commandID The command ID. + @param name [out] A buffer in which to return the unique command notifier string. + */ + AIAPI AIErr (*GetCommandNotifierName) (AICommandID commandID, ai::UnicodeString& notifierName); + +} AICommandManagerSuite; + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContext.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContext.h index a1539d2..fcefb4d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContext.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContext.h @@ -1,199 +1,216 @@ -#ifndef __AIContext__ -#define __AIContext__ - -/* - * Name: AIContext.h - * $Revision: 2 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Runtime Context Environment. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIDocument__ -#include "AIDocument.h" -#endif - -#ifndef __SPPlugins__ -#include "SPPlugs.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIContext.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIAppContextSuite "AI Context Suite" -#define kAIAppContextSuiteVersion AIAPI_VERSION(7) -#define kAIAppContextVersion kAIAppContextSuiteVersion - -enum AIAppContextKind -{ - kAIAppContextStandardKind = 0, - kAIAppContextUndoRedoKind = 1, - kAIAppContextBetaUpdateKind = 2 -}; - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to the application context. It is never dereferenced. */ -typedef struct _t_AIAppContextOpaque *AIAppContextHandle; - -/** Opaque reference to an application context stack. It is never dereferenced. */ -typedef struct _t_AISuspendedAppContextOpaque *AISuspendedAppContext; - -/** Opaque reference to an application context stack. It is never dereferenced. */ -typedef struct _t_AIAppMenuContextOpaque *AIAppMenuContext; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Use these functions to manage the application context. The application - context does two things: - - \li It establishes the current document and view. Most SDK - functions do not take a document or a view as a parameter, but - use the current document or view as defined by the application context. - - \li It establishes the scope of a single undoable operation. All the - changes that occur during a single application context are grouped - together into a single operation, which can then be undone and redone. - - Most plug-ins will not need to use these functions because Illustrator - manages the context. In rare situations, however, a plug-in may need - to make changes to the context. For example, if a plug-in can - be called directly by the operating system, Illustrator will not have - established the context. If the plug-in wants to make SDK calls - in response, it should use \c #PushAppContext() and \c #PopAppContext(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIAppContextSuite and \c #kAIAppContextVersion. - */ -typedef struct { - - /** Retrieves the parent application window in Windows. - Does nothing in Mac OS. - @param appWindow [out] A buffer in which to return the window reference. - */ - AIAPI AIErr (*GetPlatformAppWindow) ( AIWindowRef *appWindow ); - - /** Stores an application context for the calling plug-in. - @param plugin This plug-in. - @param appContext [out] A buffer in which to return the application - context reference. Pass this to \c #PopAppContext() upon completion - of the context-sensitive procedure. - - */ - AIAPI AIErr (*PushAppContext) ( SPPluginRef plugin, AIAppContextHandle *appContext ); - - /** Restores the previous application context. - @param appContext The application context reference, as returned by - \c #PushAppContext(). - */ - AIAPI AIErr (*PopAppContext) ( AIAppContextHandle appContext ); - - /** @deprecated No longer needed. */ - AIAPI AIErr (*MacGetAppQDGlobal) ( void **appQD ); - - /** Suspends the current application context stack. This is equivalent to popping - all current open contexts, except that they can later be restored all at once - by \c #ResumeAppContext(). Use before an operation that may change the current document. - @param appContext [out] A buffer in which to return the application - context stack reference. Pass this to \c #ResumeAppContext() upon completion - of the context-sensitive procedure. - */ - AIAPI AIErr (*SuspendAppContext) ( AISuspendedAppContext* appContext ); - - /** Resumes the application context stack for the document of - the frontmost window. This might be a different document from the one - at the time the context stack was suspended. - @param appContext The application context stack reference, as returned by - \c #SuspendAppContext(). - */ - AIAPI AIErr (*ResumeAppContext) ( AISuspendedAppContext appContext, AIDocumentHandle document ); - - /** Allows or disallows plug-ins to operate on artwork within locked and/or hidden - parent contexts. The call modifies the allow-changes state of the current context. The - state persists until you specifically reset it, or until the context is popped. - This allows you to make modifications without having to save, set, and restore - visibility and locked attributes on the whole parent chain. - @param allowAllChanges True to allow changes, false to disallow changes. - @param previousState [out] A buffer in which to return true if changes were previously allowed, - false if they were not. - */ - AIAPI AIErr (*AllowAllChanges) ( ASBoolean allowAllChanges, ASBoolean *previousState ); - - /** Allows or disallows use of the progress bar for the current context. - @param showProgress True to show the progress bar, false to hide it. - */ - AIAPI AIErr (*AllowProgress)(bool showProgress); - - /** Retrieves the main menu application handle in Windows. - Does nothing in Mac OS. - @param appMenu [out] A buffer in which to return the menu reference. - */ - AIAPI AIErr (*GetPlatformAppMenu) ( AIAppMenuContext *appMenu ); - - /** Sets the ContextKind for current context. - @param kind The Context kind can either be
- \c kAIAppContextStandardKind, \c kAIAppContextUndoRedoKind, \c kAIAppContextBetaUpdateKind - which are mutually exclusive. See \c enum AIAppContextKind - */ - AIAPI AIErr (*SetAppContextKind) (AIAppContextKind kind ); - - - /** Synchronize the current global context and then draws. - */ - AIAPI AIErr (*SyncAndDraw) (); - - /** Get Ruler width for the current document. - ** - ** Returns width of the vertical ruler and height of the horizontal ruler - ** Returns 0 if rulers are hidden - */ - AIAPI AIErr (*GetRulerWidthOffsetOnActiveDocument) (AIRect *horzRulerBounds, AIRect *vertRulerBounds, AIRect *cntrRulerBounds); - - -} AIAppContextSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIContext__ +#define __AIContext__ + +/* + * Name: AIContext.h + * $Revision: 2 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Runtime Context Environment. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIDocument__ +#include "AIDocument.h" +#endif + +#ifndef __SPPlugins__ +#include "SPPlugs.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIContext.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIAppContextSuite "AI Context Suite" +#define kAIAppContextSuiteVersion AIAPI_VERSION(10) +#define kAIAppContextVersion kAIAppContextSuiteVersion + +enum AIAppContextKind +{ + kAIAppContextStandardKind = 0, + kAIAppContextUndoRedoKind = 1, + kAIAppContextBetaUpdateKind = 2 +}; + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to the application context. It is never dereferenced. */ +typedef struct _t_AIAppContextOpaque *AIAppContextHandle; + +/** Opaque reference to an application context stack. It is never dereferenced. */ +typedef struct _t_AISuspendedAppContextOpaque *AISuspendedAppContext; + +/** Opaque reference to an application context stack. It is never dereferenced. */ +typedef struct _t_AIAppMenuContextOpaque *AIAppMenuContext; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Use these functions to manage the application context. The application + context does two things: + + \li It establishes the current document and view. Most SDK + functions do not take a document or a view as a parameter, but + use the current document or view as defined by the application context. + + \li It establishes the scope of a single undoable operation. All the + changes that occur during a single application context are grouped + together into a single operation, which can then be undone and redone. + + Most plug-ins don't need to use these functions, because Illustrator + manages the context. In rare situations, however, a plug-in may need + to make changes to the context. For example, if a plug-in is called directly + by the operating system, Illustrator has not established the context. + If the plug-in wants to make SDK calls in response, it should use + \c #PushAppContext() and \c #PopAppContext(). + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIAppContextSuite and \c #kAIAppContextVersion. + */ +typedef struct { + + /** Retrieves the parent application window in Windows. + Does nothing in Mac OS. + @param appWindow [out] A buffer in which to return the window reference. + */ + AIAPI AIErr (*GetPlatformAppWindow) ( AIWindowRef *appWindow ); + + /** Stores an application context for the calling plug-in. + @param plugin This plug-in. + @param appContext [out] A buffer in which to return the application + context reference. Pass this to \c #PopAppContext() upon completion + of the context-sensitive procedure. + + */ + AIAPI AIErr (*PushAppContext) ( SPPluginRef plugin, AIAppContextHandle *appContext ); + + /** Restores the previous application context. + @param appContext The application context reference, as returned by + \c #PushAppContext(). + */ + AIAPI AIErr (*PopAppContext) ( AIAppContextHandle appContext ); + + /** @deprecated No longer needed. */ + AIAPI AIErr (*MacGetAppQDGlobal) ( void **appQD ); + + /** Suspends the current application context stack. This is equivalent to popping + all current open contexts, except that they can later be restored all at once + by \c #ResumeAppContext(). Use before an operation that may change the current document. + @param appContext [out] A buffer in which to return the application + context stack reference. Pass this to \c #ResumeAppContext() upon completion + of the context-sensitive procedure. + */ + AIAPI AIErr (*SuspendAppContext) ( AISuspendedAppContext* appContext ); + + /** Resumes the application context stack for the document of + the frontmost window. This might be a different document from the one + at the time the context stack was suspended. + @param appContext The application context stack reference, as returned by + \c #SuspendAppContext(). + */ + AIAPI AIErr (*ResumeAppContext) ( AISuspendedAppContext appContext, AIDocumentHandle document ); + + /** Allows or disallows plug-ins to operate on artwork within locked and/or hidden + parent contexts. The call modifies the allow-changes state of the current context. The + state persists until you specifically reset it, or until the context is popped. + This allows you to make modifications without having to save, set, and restore + visibility and locked attributes on the whole parent chain. + @param allowAllChanges True to allow changes, false to disallow changes. + @param previousState [out] A buffer in which to return true if changes were previously allowed, + false if they were not. + */ + AIAPI AIErr (*AllowAllChanges) ( ASBoolean allowAllChanges, ASBoolean *previousState ); + + /** Allows or disallows use of the progress bar for the current context. + @param showProgress True to show the progress bar, false to hide it. + */ + AIAPI AIErr (*AllowProgress)(bool showProgress); + + /** Retrieves the main menu application handle in Windows. + Does nothing in Mac OS. + @param appMenu [out] A buffer in which to return the menu reference. + */ + AIAPI AIErr (*GetPlatformAppMenu) ( AIAppMenuContext *appMenu ); + + /** Sets the ContextKind for current context. + @param kind The Context kind can either be
+ \c kAIAppContextStandardKind, \c kAIAppContextUndoRedoKind, \c kAIAppContextBetaUpdateKind + which are mutually exclusive. See \c enum AIAppContextKind + */ + AIAPI AIErr (*SetAppContextKind) (AIAppContextKind kind ); + + + /** Synchronize the current global context and then draws. + */ + AIAPI AIErr (*SyncAndDraw) (); + + /** Get Ruler width for the current document. + ** + ** Returns width of the vertical ruler and height of the horizontal ruler + ** Returns 0 if rulers are hidden + */ + AIAPI AIErr (*GetRulerWidthOffsetOnActiveDocument) (AIRect *horzRulerBounds, AIRect *vertRulerBounds, AIRect *cntrRulerBounds); + + /** Tells if Application context is present or not. + ** + ** @return A buffer returning whether application context is present or not. + */ + AIAPI AIBoolean (*DoesAppContextExist)(); + + /** Gets the current AppContextKind. + @param kind [out] A buffer in which to return the kind + \c kAIAppContextStandardKind, \c kAIAppContextUndoRedoKind, \c kAIAppContextBetaUpdateKind + which are mutually exclusive. See \c enum AIAppContextKind + */ + AIAPI AIErr (*GetAppContextKind) (AIAppContextKind &kind); + + /** Tells if kAPIContextShowProgressOption flag is set or not in APIContext options. + returns true/false whether progress bar is allowed or not. + */ + AIAPI AIErr (*IsProgressBarAllowed) (AIBoolean &result); + +} AIAppContextSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContract.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContract.hpp new file mode 100644 index 0000000..217d67c --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIContract.hpp @@ -0,0 +1,151 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AITypes.h" +#include "AIAssert.hpp" +#include "IAILiteralString.h" + +/** + Usage: + + struct Widget + { + ai::int32 id = -1; + bool processed = false; + std::string name; + }; + + std::unique_ptr CreateWidget(); + + void ProcessWidget() + { + auto widget1 = CreateWidget(); + auto widget2 = CreateWidget(); + + ai::Expects(widget1 != nullptr); // Throws by default + + ai::Expects(widget2 != nullptr, "Widget should not be NULL"); // Throws with custom message + + ai::Expects(widget1->id != -1, "Wrong widget id", ai::ContractPolicy::kAssert); // Only Assert + + ai::Expects(!widget1->name.empty(), "Wrong widget name", ai::ContractPolicy::kAssert); // Only Assert + + // ... + // ... + + ai::Ensures(widget1->processed == true, "Widget should be processed", ai::ContractPolicy::kAssertAndThrow); // Assert and Throw + + ai::Ensures(widget2->processed == true, ai::ContractPolicy::kAssertAndThrow); // Assert and Throw + } +*/ + +namespace ai +{ + namespace Contract + { + constexpr ai::LiteralString kDefaultPreconditionMsg {"Failed Precondition"}; + constexpr ai::LiteralString kDefaultPostconditionMsg {"Failed Postcondition"}; + + /** + Exception class for Contract violation + */ + struct Violation : public ai::LogicError + { + explicit Violation(const char* message) : ai::LogicError(kBadParameterErr, message) + { + } + }; + + /** + Contract policy types + */ + struct AssertPolicy {}; + struct ThrowPolicy {}; + struct AssertAndThrowPolicy {}; + + /** + Contract verification + */ + template /* Assert */ + void Check(T condition, const char* msg, AssertPolicy) + { + AIMsgAssert(condition, msg); + } + + template /* Throw */ + constexpr void Check(T condition, const char* msg, ThrowPolicy) + { + if (!condition) + { + throw Violation{msg}; + } + } + + template /* Assert and Throw */ + void Check(T condition, const char* msg, AssertAndThrowPolicy) + { + if (!condition) + { + AIMsgAssert(false, msg); + throw Violation{msg}; + } + } + + } // namespace Contract + + namespace ContractPolicy + { + // Instances of the Contract policy types + constexpr Contract::AssertPolicy kAssert {}; + constexpr Contract::ThrowPolicy kThrow {}; + constexpr Contract::AssertAndThrowPolicy kAssertAndThrow {}; + + } // namespace ContractPolicy + + template + constexpr void Expects(T condition, const char* msg = Contract::kDefaultPreconditionMsg, Policy policy = ContractPolicy::kThrow) + { + Contract::Check(condition, msg, policy); + } + + template + constexpr void Expects(T condition, Policy policy) + { + Contract::Check(condition, Contract::kDefaultPreconditionMsg, policy); + } + + template + constexpr void Ensures(T condition, const char* msg = Contract::kDefaultPostconditionMsg, Policy policy = ContractPolicy::kThrow) + { + Contract::Check(condition, msg, policy); + } + + template + constexpr void Ensures(T condition, Policy policy) + { + Contract::Check(condition, Contract::kDefaultPostconditionMsg, policy); + } + + template + constexpr void EnsureRange(const T& value, const char* msg = Contract::kDefaultPostconditionMsg, Policy policy = ContractPolicy::kThrow) + { + Ensures(value > T::kUnknown && value < T::kLast, msg, policy); + } + + +} // namespace ai \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIControlBar.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIControlBar.h index 5674c2d..713683d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIControlBar.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIControlBar.h @@ -1,221 +1,221 @@ -/************************************************************************/ -/* */ -/* Name : AIControlbar.h */ -/* $Revision : 1$ */ -/* Author : */ -/* Date : 7 Sep 2011 */ -/* Purpose : Suite for Creating and Managing Control bars */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 2011 Adobe Systems Incorporated. */ -/* All rights reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/************************************************************************/ - -#ifndef __AICONTROLBAR_H__ -#define __AICONTROLBAR_H__ - -#include "AITypes.h" -#include "IAIUnicodeString.h" - -#include "AIHeaderBegin.h" - -/** @file AIControlBar.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIControlBarSuite "AI Control Bar Suite" -#define kAIControlBarSuiteVersion2 AIAPI_VERSION(2) -#define kAIControlBarSuiteVersion kAIControlBarSuiteVersion2 -#define kAIControlBarVersion kAIControlBarSuiteVersion - -/******************************************************************************* -** -** Types -** -**/ -#ifdef WIN_ENV -typedef HWND AIControlBarPlatformWindow; -#elif MAC_ENV - #ifdef __OBJC__ - @class NSView; - typedef NSView* AIControlBarPlatformWindow; - #else - typedef void* AIControlBarPlatformWindow; - #endif -#else -#error unknown configuration -#endif - -/** Reference to a control-bar object. */ -typedef struct _opaque_AIControlBar* AIControlBarRef; - -/** A developer-defined data object associated with a control bar. */ -typedef void* AIControlBarUserData; - -/** Prototype of a function to be called when the visibility of a Control Bar has changed. - @param inControlBar The control-bar object. - @param isVisible The new visibility state of the Control Bar, true if visible -*/ -typedef void AIAPI (*AIControlBarVisibilityChangedNotifyProc)(AIControlBarRef inControlBar, AIBoolean isVisible); - -/** Prototype of a function to be called when the size of a Control Bar has changed. - @param inControlBar The control-bar object. -*/ -typedef void AIAPI (*AIControlBarSizeChangedNotifyProc)(AIControlBarRef inControlBar); - - -/******************************************************************************* -** -** Error Values returned by suite. -** -**/ -/** @ingroup Errors - See \c #AIControlBarSuite */ -#define kAIInvalidControlBarRef 'INVD' - - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides functions for creating and managing control bars. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIControlBarSuite and \c #kAIControlBarSuiteVersion. -*/ -struct AIControlBarSuite{ - - /** Creates a new control-bar object - @param inPluginRef The plug-in that is creating the control bar. - @param inControlBarSize Size of the new control bar. - @param inMinWidth Minimum width of the new control bar. - @param inMaxWidth Maximum width of the new control bar. - @param inUserData Developer-defined data to be associated with the control bar. - @param outControlBar [out] A buffer in which to return the new control-bar object. - */ - AIAPI AIErr (*Create)(SPPluginRef inPluginRef, const AISize& inControlBarSize, AIReal inMinWidth, AIReal inMaxWidth, - AIControlBarUserData inUserData, AIControlBarRef& outControlBar); - - - /** Deletes a control bar object. - This must be called when the plug-in receives a shutdown notification, \c #kAIApplicationShutdownNotifier. - @param inControlBar The control bar object. - */ - AIAPI AIErr (*Destroy)(AIControlBarRef inControlBar); - - - /** Retrieves developer-defined data associates with a control bar. - @param inControlBar The control Bar object. - @param outUserData [out] A buffer in which to return the developer-defined data. - */ - AIAPI AIErr (*GetUserData)(AIControlBarRef inControlBar, AIControlBarUserData& outUserData); - - - /** Associates developer-defined data with a control bar, which can be used in developer-defined callbacks. - @param inControlBar The control bar object. - @param inUserData The developer-defined data. - */ - AIAPI AIErr (*SetUserData)(AIControlBarRef inControlBar, AIControlBarUserData inUserData); - - - /** Retrieves the platform-specific window or view used for the control bar. - @param inControlBar The control bar object. - @param outControlBarPlatformWindow [out] A buffer in which to return the platform-specific window or view. - */ - AIAPI AIErr (*GetPlatformWindow)(AIControlBarRef inControlBar, AIControlBarPlatformWindow& outControlBarPlatformWindow); - - - /** Shows or hides a control bar. - @param inControlBar The control bar object. - @param inShow True to make the control bar visible, false to hide it. - */ - AIAPI AIErr (*Show)(AIControlBarRef inControlBar, AIBoolean inShow); - - - /** Reports the current visibility state of a control bar. - @param inControlBar The control bar object. - @param outIsShown [out] A buffer in which to return true if the control bar is visible, false otherwise. - */ - AIAPI AIErr (*IsShown)(AIControlBarRef inControlBar, AIBoolean& outIsShown); - - - /** Retrieves the current width of control bar. - @param inControlBar The control bar object. - @param outControlBarWidth [out] A buffer in which to return the width value in pixels. - */ - AIAPI AIErr (*GetWidth)(AIControlBarRef inControlBar, AIReal& outControlBarWidth); - - - /** Sets the width of control bar. If the width is out of allowed bounds, returns an error. - @param inControlBar The control bar object. - @param inControlBarWidth The new width value in pixels. Must be >= minWidth and <= maxWidth. - */ - AIAPI AIErr (*SetWidth)(AIControlBarRef inControlBar, AIReal inControlBarWidth); - - - /** Retrieves the current minimum width of a control bar. - @param inControlBar The control bar object. - @param outMinWidth [out] A buffer in which to return the minimum width value in pixels. - */ - AIAPI AIErr (*GetMinimumWidth)(AIControlBarRef inControlBar, AIReal& outMinWidth); - - - /** Sets the minimum width of a control bar. - @param inControlBar The control bar object. - @param inMinWidth The new minimum width in pixels; must be > 0 and <= maxWidth. - */ - AIAPI AIErr (*SetMinimumWidth)(AIControlBarRef inControlBar, AIReal inMinWidth); - - - /** Retrieves the current maximum width of a control bar. - @param inControlBar The control bar object. - @param outMaxWidth [out] A buffer in which to return the maximum width value in pixels. - */ - AIAPI AIErr (*GetMaximumWidth)(AIControlBarRef inControlBar, AIReal& outMaxWidth); - - - /** Sets the maximum width of a control bar. - @param inControlBar The control bar object. - @param inMaxWidth The new maximum width in pixels; must be >= minWidth. - */ - AIAPI AIErr (*SetMaximumWidth)(AIControlBarRef inControlBar, AIReal inMaxWidth); - - - /** Moves a control bar to a specific location. If the control bar is docked, does nothing. - @param inControlBar The control bar object. - @param inPoint The new position in global screen coordinates. - */ - AIAPI AIErr (*Move)(AIControlBarRef inControlBar, const AIPoint& inPoint); - - - /** Sets a callback procedure to call when the visibility of a control bar has changed. - @param inControlBar The control bar object. - @param inVisibilityChangedNotifyProc The new callback procedure. - */ - AIAPI AIErr (*SetVisibilityChangedNotifyProc)(AIControlBarRef inControlBar, AIControlBarVisibilityChangedNotifyProc inVisibilityChangedNotifyProc); - - - /** Sets a callback procedure to call when the size of a control bar has changed. - @param inControlBar The control bar object. - @param inSizeChangedNotifyProc The new callback procedure. - */ - AIAPI AIErr (*SetSizeChangedNotifyProc)(AIControlBarRef inControlBar, AIControlBarSizeChangedNotifyProc inSizeChangedNotifyProc); -}; - -#include "AIHeaderEnd.h" - +/************************************************************************/ +/* */ +/* Name : AIControlbar.h */ +/* $Revision : 1$ */ +/* Author : */ +/* Date : 7 Sep 2011 */ +/* Purpose : Suite for Creating and Managing Control bars */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 2011 Adobe Systems Incorporated. */ +/* All rights reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/************************************************************************/ + +#ifndef __AICONTROLBAR_H__ +#define __AICONTROLBAR_H__ + +#include "AITypes.h" +#include "IAIUnicodeString.h" + +#include "AIHeaderBegin.h" + +/** @file AIControlBar.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIControlBarSuite "AI Control Bar Suite" +#define kAIControlBarSuiteVersion2 AIAPI_VERSION(2) +#define kAIControlBarSuiteVersion kAIControlBarSuiteVersion2 +#define kAIControlBarVersion kAIControlBarSuiteVersion + +/******************************************************************************* +** +** Types +** +**/ +#ifdef WIN_ENV +typedef HWND AIControlBarPlatformWindow; +#elif defined(MAC_ENV) + #ifdef __OBJC__ + @class NSView; + typedef NSView* AIControlBarPlatformWindow; + #else + typedef void* AIControlBarPlatformWindow; + #endif +#else +#error unknown configuration +#endif + +/** Reference to a control-bar object. */ +typedef struct _opaque_AIControlBar* AIControlBarRef; + +/** A developer-defined data object associated with a control bar. */ +typedef void* AIControlBarUserData; + +/** Prototype of a function to be called when the visibility of a Control Bar has changed. + @param inControlBar The control-bar object. + @param isVisible The new visibility state of the Control Bar, true if visible +*/ +typedef void AIAPI (*AIControlBarVisibilityChangedNotifyProc)(AIControlBarRef inControlBar, AIBoolean isVisible); + +/** Prototype of a function to be called when the size of a Control Bar has changed. + @param inControlBar The control-bar object. +*/ +typedef void AIAPI (*AIControlBarSizeChangedNotifyProc)(AIControlBarRef inControlBar); + + +/******************************************************************************* +** +** Error Values returned by suite. +** +**/ +/** @ingroup Errors + See \c #AIControlBarSuite */ +#define kAIInvalidControlBarRef 'INVD' + + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +This suite provides functions for creating and managing control bars. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIControlBarSuite and \c #kAIControlBarSuiteVersion. +*/ +struct AIControlBarSuite{ + + /** Creates a new control-bar object + @param inPluginRef The plug-in that is creating the control bar. + @param inControlBarSize Size of the new control bar. + @param inMinWidth Minimum width of the new control bar. + @param inMaxWidth Maximum width of the new control bar. + @param inUserData Developer-defined data to be associated with the control bar. + @param outControlBar [out] A buffer in which to return the new control-bar object. + */ + AIAPI AIErr (*Create)(SPPluginRef inPluginRef, const AISize& inControlBarSize, AIReal inMinWidth, AIReal inMaxWidth, + AIControlBarUserData inUserData, AIControlBarRef& outControlBar); + + + /** Deletes a control bar object. + This must be called when the plug-in receives a shutdown notification, \c #kAIApplicationShutdownNotifier. + @param inControlBar The control bar object. + */ + AIAPI AIErr (*Destroy)(AIControlBarRef inControlBar); + + + /** Retrieves developer-defined data associates with a control bar. + @param inControlBar The control Bar object. + @param outUserData [out] A buffer in which to return the developer-defined data. + */ + AIAPI AIErr (*GetUserData)(AIControlBarRef inControlBar, AIControlBarUserData& outUserData); + + + /** Associates developer-defined data with a control bar, which can be used in developer-defined callbacks. + @param inControlBar The control bar object. + @param inUserData The developer-defined data. + */ + AIAPI AIErr (*SetUserData)(AIControlBarRef inControlBar, AIControlBarUserData inUserData); + + + /** Retrieves the platform-specific window or view used for the control bar. + @param inControlBar The control bar object. + @param outControlBarPlatformWindow [out] A buffer in which to return the platform-specific window or view. + */ + AIAPI AIErr (*GetPlatformWindow)(AIControlBarRef inControlBar, AIControlBarPlatformWindow& outControlBarPlatformWindow); + + + /** Shows or hides a control bar. + @param inControlBar The control bar object. + @param inShow True to make the control bar visible, false to hide it. + */ + AIAPI AIErr (*Show)(AIControlBarRef inControlBar, AIBoolean inShow); + + + /** Reports the current visibility state of a control bar. + @param inControlBar The control bar object. + @param outIsShown [out] A buffer in which to return true if the control bar is visible, false otherwise. + */ + AIAPI AIErr (*IsShown)(AIControlBarRef inControlBar, AIBoolean& outIsShown); + + + /** Retrieves the current width of control bar. + @param inControlBar The control bar object. + @param outControlBarWidth [out] A buffer in which to return the width value in pixels. + */ + AIAPI AIErr (*GetWidth)(AIControlBarRef inControlBar, AIReal& outControlBarWidth); + + + /** Sets the width of control bar. If the width is out of allowed bounds, returns an error. + @param inControlBar The control bar object. + @param inControlBarWidth The new width value in pixels. Must be >= minWidth and <= maxWidth. + */ + AIAPI AIErr (*SetWidth)(AIControlBarRef inControlBar, AIReal inControlBarWidth); + + + /** Retrieves the current minimum width of a control bar. + @param inControlBar The control bar object. + @param outMinWidth [out] A buffer in which to return the minimum width value in pixels. + */ + AIAPI AIErr (*GetMinimumWidth)(AIControlBarRef inControlBar, AIReal& outMinWidth); + + + /** Sets the minimum width of a control bar. + @param inControlBar The control bar object. + @param inMinWidth The new minimum width in pixels; must be > 0 and <= maxWidth. + */ + AIAPI AIErr (*SetMinimumWidth)(AIControlBarRef inControlBar, AIReal inMinWidth); + + + /** Retrieves the current maximum width of a control bar. + @param inControlBar The control bar object. + @param outMaxWidth [out] A buffer in which to return the maximum width value in pixels. + */ + AIAPI AIErr (*GetMaximumWidth)(AIControlBarRef inControlBar, AIReal& outMaxWidth); + + + /** Sets the maximum width of a control bar. + @param inControlBar The control bar object. + @param inMaxWidth The new maximum width in pixels; must be >= minWidth. + */ + AIAPI AIErr (*SetMaximumWidth)(AIControlBarRef inControlBar, AIReal inMaxWidth); + + + /** Moves a control bar to a specific location. If the control bar is docked, does nothing. + @param inControlBar The control bar object. + @param inPoint The new position in global screen coordinates. + */ + AIAPI AIErr (*Move)(AIControlBarRef inControlBar, const AIPoint& inPoint); + + + /** Sets a callback procedure to call when the visibility of a control bar has changed. + @param inControlBar The control bar object. + @param inVisibilityChangedNotifyProc The new callback procedure. + */ + AIAPI AIErr (*SetVisibilityChangedNotifyProc)(AIControlBarRef inControlBar, AIControlBarVisibilityChangedNotifyProc inVisibilityChangedNotifyProc); + + + /** Sets a callback procedure to call when the size of a control bar has changed. + @param inControlBar The control bar object. + @param inSizeChangedNotifyProc The new callback procedure. + */ + AIAPI AIErr (*SetSizeChangedNotifyProc)(AIControlBarRef inControlBar, AIControlBarSizeChangedNotifyProc inSizeChangedNotifyProc); +}; + +#include "AIHeaderEnd.h" + #endif //__AICONTROLBAR_H__ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICountedObject.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICountedObject.h index a9439c9..b268f68 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICountedObject.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICountedObject.h @@ -1,112 +1,112 @@ -#ifndef __AICountedObject__ -#define __AICountedObject__ - -/* - * Name: AICountedObject.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Counted Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1999-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AICountedObject.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAICountedObjectSuite "AI Counted Object Suite" -#define kAICountedObjectSuiteVersion3 AIAPI_VERSION(3) -#define kAICountedObjectSuiteVersion kAICountedObjectSuiteVersion3 -#define kAICountedObjectVersion kAICountedObjectSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - These functions allow you to maintain the reference count for Illustrator - object types that are returned through plug-in APIs. Suites for object types - that are reference counted provide their own functions for incrementing and - decrementing the count. You can use either those functions, or the functions - in this suite, which work with any reference-counted object type. - - Reference-counted objects follow these conventions: - - \li A function that returns a pointer to a reference-counted object - increments the count before returning the object. The caller must - decrement the count when the object is no longer needed. - - \li If a plug-in passes a reference-counted object in a message to - another plug-in or as a parameter to a callback function, the plug-in should - not decrement the count. - - \li If a plug-in passes a reference counted-object to a function that needs - to keep the object beyond the duration of the call, that function - increments the count. The plug-in should still decrement its count - if necessary when done with the object. - - @see \c #AIEntrySuite for an exception to these rules. - - @note Correctly managing reference counts can be difficult. Failure to do - so results in memory leaks. It is recommended that C++ client code - use the \c #ai::Ref template class to automatically manage these counts. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICountedObjectSuite and \c #kAICountedObjectVersion. -*/ - -typedef struct { - - /** Increments an object reference count. (Note that this - function returns a numeric value, not an error code.) - @param object The object. Can be \c null. - @return The number of references after the increment. - */ - AIAPI ai::int32 (*AddRef) ( void* object ); - - /** Decrements an object reference count. (Note that this - function returns a numeric value, not an error code.) - @param object The object. Can be \c null. - @return The number of references after the decrement. - */ - AIAPI ai::int32 (*Release) ( void* object ); - -} AICountedObjectSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AICountedObject__ +#define __AICountedObject__ + +/* + * Name: AICountedObject.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator Counted Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1999-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AICountedObject.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAICountedObjectSuite "AI Counted Object Suite" +#define kAICountedObjectSuiteVersion3 AIAPI_VERSION(3) +#define kAICountedObjectSuiteVersion kAICountedObjectSuiteVersion3 +#define kAICountedObjectVersion kAICountedObjectSuiteVersion + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + These functions allow you to maintain the reference count for Illustrator + object types that are returned through plug-in APIs. Suites for object types + that are reference counted provide their own functions for incrementing and + decrementing the count. You can use either those functions, or the functions + in this suite, which work with any reference-counted object type. + + Reference-counted objects follow these conventions: + + \li A function that returns a pointer to a reference-counted object + increments the count before returning the object. The caller must + decrement the count when the object is no longer needed. + + \li If a plug-in passes a reference-counted object in a message to + another plug-in or as a parameter to a callback function, the plug-in should + not decrement the count. + + \li If a plug-in passes a reference counted-object to a function that needs + to keep the object beyond the duration of the call, that function + increments the count. The plug-in should still decrement its count + if necessary when done with the object. + + @see \c #AIEntrySuite for an exception to these rules. + + @note Correctly managing reference counts can be difficult. Failure to do + so results in memory leaks. It is recommended that C++ client code + use the \c #ai::Ref template class to automatically manage these counts. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAICountedObjectSuite and \c #kAICountedObjectVersion. +*/ + +typedef struct { + + /** Increments an object reference count. (Note that this + function returns a numeric value, not an error code.) + @param object The object. Can be \c null. + @return The number of references after the increment. + */ + AIAPI ai::int32 (*AddRef) ( void* object ); + + /** Decrements an object reference count. (Note that this + function returns a numeric value, not an error code.) + @param object The object. Can be \c null. + @return The number of references after the decrement. + */ + AIAPI ai::int32 (*Release) ( void* object ); + +} AICountedObjectSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICursorSnap.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICursorSnap.h index 3830816..b695bd2 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICursorSnap.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICursorSnap.h @@ -1,380 +1,391 @@ -#ifndef __AICursorSnap__ -#define __AICursorSnap__ - -/* - * Name: AICursorSnap.h - * Author: - * Date: - * Purpose: Adobe Illustrator Cursor Snapping Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif -#ifndef __AIDocumentView__ -#include "AIDocumentView.h" -#endif -#ifndef __AITool__ -#include "AITool.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AICursorSnap.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAICursorSnapSuite "AI Cursor Snap Suite" -#define kAICursorSnapSuiteVersion16 AIAPI_VERSION(16) -#define kAICursorSnapSuiteVersion kAICursorSnapSuiteVersion16 -#define kAICursorSnapVersion kAICursorSnapSuiteVersion - - -/** - Kinds of custom constraints for \c #AICursorSnapSuite. - */ -enum { - /** Single point */ - kPointConstraint = 1, - /** A line whose angle is relative to the page coordinates */ - kLinearConstraintAbs, - /** A line whose angle is relative to the constraint angle */ - kLinearConstraintRel -}; - - -/** Flags for custom constraints: - See \c #AICursorSnapSuite. */ -/* Snap to constraint when shift key is down. */ -#define kShiftConstraint (1<<0L) -/* Override drawing the default annotation when a custom constraint is hit, - * and draw custom constraints based on the callback - */ -#define kDrawCustomAnnotations (1<<1L) - - -/** Boundary editors for the transformation tools. -See \c #AICursorSnapSuite. */ -enum { - kTranslateBoundaryEditor = 1 -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ -/* - * AICustomAnnotationLine - * represents a line segment by a start and end point which -*/ -struct AICustomAnnotationLine -{ - AIRealPoint startPoint; - AIRealPoint endPoint; -}; - -typedef AICustomAnnotationLine* AICustomAnnotationLinePtr; - -/** Function pointer type to retrieve details of custom annotations -* to be drawn (if kDrawCustomAnnotations flag is set). -* The function pointer is set in AICursorConstraint struct during constraint addition -* When the custom constraint is hit and annotations are ready to be drawn, the callback is invoked. -* @param inId ConstraintId of the custom constraint hit -* @param inSnappedPt The point we snapped to -* @param outNumberOfLines Number Of Annotation Lines to be drawn (To be Filled by the callback) -* @param outAnnotationLines An array of custom annotations lines to be drawn (To be Filled by the callback) -* The calling function is responsible to destroy the array of points. -*/ -typedef AIErr(*CustomAnnotationsCallback)(ai::uint32 inId, const AIRealPoint& inSnappedPt, size_t* outNumberOfLines, AICustomAnnotationLine** outAnnotationLines); - -/** - Structure describing a custom constraint for \c #AICursorSnapSuite.. - */ -struct AICursorConstraint { - /** Type of constraint, one of: - \li \c kPointConstraint: A single point. - \li \c kLinearConstraintAbs: A line whose angle is relative to - the page coordinates. - \li \c kLinearConstraintRel: A line whose angle is relative - to the constraint \c angle. - */ - ai::int32 kind; - /** Flags for the constraint. The only flag is \c #kShiftConstraint, - which means snap to the constraint when the shift key is down.*/ - ai::int32 flags; - /** Origin point for the constraint. */ - AIRealPoint point; - /** When \c kind is \c kLinearConstraintRel, the angle of the line. */ - AIReal angle; - /** Label for the constraint presented to the user. Keep the max size to be 256 bytes */ - ai::UnicodeString label; - /** Callback function registered by client to retrieve details for drawing custom annotations. */ - CustomAnnotationsCallback getCustomAnnotationDetails; - - /* Constructors */ - AICursorConstraint(const ai::int32 inKind, - const ai::int32 inFlags, - const AIRealPoint& inPoint, - const AIReal inAngle, - const ai::UnicodeString& inLabel, - const CustomAnnotationsCallback inCustomAnnotationsCallback) : - kind(inKind), - flags(inFlags), - point(inPoint), - angle(inAngle), - label(inLabel), - getCustomAnnotationDetails(inCustomAnnotationsCallback) - {} - - AICursorConstraint() : - kind(0), - flags(0), - angle(kAIRealZero), - getCustomAnnotationDetails(NULL) - { - point.h = kAIRealZero; - point.v = kAIRealZero; - } - - /* Destructor */ - ~AICursorConstraint() - {} -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Tools that use the Smart Guides snapping facility use these - functions in the cursor-tracking code. The suite provides functions - for snapping the cursor to various things, called \e constraints. - Constraints include art objects, page boundaries - and the automatically generated guide lines. You can also define your own - constraints, using \c #SetCustom(), although most tools do not do so. - - @note Turning on the grid turns smart guides off, so you never use - this facility to snap to the grid. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICursorSnapSuite and \c #kAICursorSnapVersion. - - Snap the cursor using the \c #Track() function, which - takes a current cursor location and returns the snapped location. - A control string contains a series of Smart Guide commands - that control how the snap is performed; that is, what kind of - object is snapped to, and what kind of location to look for in - each kind of object. - - You can find out what object is under the snapped location: -@code -AIHitRef hit; -long option = <> -result = sAIHitTest->HitTest(NULL, &p, option, &hit); -if (result) - throw ai::Error(result); -@endcode - - These are the control strings used by the various tools built - into Illustrator, as saved in the preferences file. - The first entry in each line is the key used in preferences. The second - is the control string for when the mouse is up and the third is the control - string for when the mouse is down. - - - "Blend", "A v", "A v" - - "Select", "A v o f", "ATFGP v i o f" - - "RangeSelect", "", "" - - "Zoom", "", "" - - "Page", "ATFGP v i o", "ATFGP v i o" - - "Ruler", "ATFGP v i o", "ATFGP v i o" - - "Guide", "ATFGP v i o", "ATFGP v i o" - - "Scissor", "ATFGP v i o", "ATFGP v i o" - - "SquareCircle", "ATFGP v i o", "ATFGP v i o" - - "Pen", "ATFGP v i o", "ATFGP v i o" - - "Translate", "ATFGP v i o", "ATFGPB v i o" - - "Scale", "ATFGP v i o", "ATFGPB v i o" - - "Rotate", "ATFGP v i o", "ATFGP v i o" - - "Reflect", "ATFGP v i o", "ATFGP v i o" - - "Shear", "ATFGP v i o", "ATFGP v i o" - - "Eyebucket", "A v o f", "A v o f" -*/ - -struct AICursorSnapSuite { - - /** Reports whether Smart Guides should be used to snap the - cursor in a given view. (Note that this function returns - a Boolean value, not an error code.) - @param view The document view. - @return True if Smart Guides should be used. - */ - AIAPI AIBoolean (*UseSmartGuides) (AIDocumentViewHandle view); - - /** Resets the Smart Guides snapping engine. This clears all custom constraints - and all automatically generated constraint lines. - */ - AIAPI AIErr (*Reset) (void); - - /** Clears all custom constraints without clearing automatically - generated constraint lines. - */ - AIAPI AIErr (*ClearCustom) (void); - - /** Replaces the current set of custom constraints with the specified set. - @param count The number of constraints being defined. - @param constraints An array of custom constraints. The function makes a - copy, so the caller can free this memory after making the call. - */ - AIAPI AIErr(*SetCustom) (const ai::AutoBuffer& constraints); - - /** Snaps the cursor to a specified constraint, using a specified technique, using - the "Snap To Point" application preference. - @param view The document view in which to snap the cursor. - @param srcpoint The actual cursor location in view coordinates. - Typically passed in the \c #AIToolMessage member \c cursor. - @param event The state of modifier keys. - @param control How snapping is performed, a string containing - a sequence of uppercase and lowercase characters, and spaces. - Each character in the string is a command to the snapping engine. - They are processed sequentially from left to right. - \li An uppercase character enables a constraint: - - A: Enable snapping to art objects (if the "Snap To Point" application - preference is set). Uses the Snapping tolerance preference - (rather than the Selection tolerance). - - T: Enable snapping to custom constraints defined by the current tool. - - F: Enable snapping to automatically generated guidelines. - - P: Enable snapping to the page boundaries. - - L: Enable snapping to automatically generated guidelines along the center and edges - of geometric box of all visible art objects in view. - - M: Enable snapping to automatically generated guidelines along the center and edges - of all artboards in the view. - - S: Enable snapping to automatically generated Perspective guidelines. - - U: Enable snapping to Perspective Grid visible in the current document. - - \li A lower case character is an instruction to look for the best snap location. - of a particular type among the currently enabled constraints. - - i: Look for intersections of two or more constraints. - - o: Try to snap onto a constraint line - - v: Try to snap to a point (vertex). - - f: Look for filled objects. - \li A space character is an instruction to return the best snap location found - so far. If no snap location has been found, the search continues. - - @param dstpoint [out] A buffer in which to return the snapped cursor position. - */ - AIAPI AIErr (*Track) (AIDocumentViewHandle view, const AIRealPoint& srcpoint, - const AIEvent* event, const char* control, - AIRealPoint* dstpoint); - - /** Snaps the cursor to a specified constraint, using a specified technique. Does not - consider the "Snap To Point" application preference, and uses the Selection - tolerance to identify hits on art objects. This function is used for direct - selection of anchor points. - @param view The document view in which to snap the cursor. - @param srcpoint The actual cursor location in view coordinates. - Typically passed in the \c #AIToolMessage member \c cursor. - @param event The state of modifier keys. - @param control How snapping is performed, a string containing - a sequence of uppercase and lowercase characters, and spaces. - Each character in the string is a command to the snapping engine. - They are processed sequentially from left to right. - \li An uppercase character enables a constraint: - - A: Enable snapping to art objects (without regard to the - "Snap To Point" application preference). Uses the Selection - tolerance preference (rather than the Snapping tolerance). - - T: Enable snapping to custom constraints defined by the current tool. - - F: Enable snapping to automatically generated guidelines. - - P: Enable snapping to the page boundaries. - \li A lower case character is an instruction to look for the best snap location - of a particular type among the currently enabled constraints. - - i: Look for intersections of two or more constraints. - - o: Try to snap onto a constraint line. - - v: Try to snap to a point (vertex). - - f: Look for filled objects. - \li A space character is an instruction to return the best snap location found - so far. If no snap location has been found, the search continues. - - @param dstpoint [out] A buffer in which to return the snapped cursor position. - @param magnifyAnchorPoint [in] True to magnify an anchor point whose hotspot is under the - mouse cursor, as the direct selection tool does. - */ - AIAPI AIErr (*HitTrack) (AIDocumentViewHandle view, const AIRealPoint &srcpoint, - const AIEvent* event, const char* control, - AIRealPoint* dstpoint, AIBoolean magnifyAnchorPoint); - - - /** Snaps the rectangle supplied to a specified constraint, using a specified technique and - the "Snap To Point" application preference. This method returns the new snapped rectangle and - new mouse location. If no snapping is done then returned point and rectangle would be same as - the passed values for source point and rectangle. - - @param view The document view in which to snap the cursor. - @param srcpoint The actual cursor location in view coordinates. - Typically passed in the \c #AIToolMessage member \c cursor. - @param event The state of modifier keys. - @param control How snapping is performed, a string containing - a sequence of uppercase and lowercase characters, and spaces. - Each character in the string is a command to the snapping engine. - They are processed sequentially from left to right. - \li An uppercase character enables a constraint: - - A: Enable snapping to art objects (if the "Snap To Point" application - preference is set). Uses the Snapping tolerance preference - (rather than the Selection tolerance). - - T: Enable snapping to custom constraints defined by the current tool. - - F: Enable snapping to automatically generated guidelines. - - P: Enable snapping to the page boundaries. - - L: Enable snapping to automatically generated guidelines along the center and edges - of geometric box of all visible art objects in view. - - M: Enable snapping to automatically generated guidelines along the center and edges - of all artboards in the view. - - S: Enable snapping to automatically generated Perspective guidelines. - - U: Enable snapping to Perspective Grid visible in the current document. - - \li A lower case character is an instruction to look for the best snap location. - of a particular type among the currently enabled constraints. - - i: Look for intersections of two or more constraints. - - o: Try to snap onto a constraint line - - v: Try to snap to a point (vertex). - - f: Look for filled objects. - \li A space character is an instruction to return the best snap location found - so far. If no snap location has been found, the search continues. - - @param dstpoint [out] A buffer in which to return the snapped cursor position. - @param srcRect The rectangle to be snapped. - @param dstRect [out] A buffer in which to return the new snapped rectangle bounds. - */ - AIAPI AIErr (*TrackInRect) (AIDocumentViewHandle view, const AIRealPoint& srcpoint, - const AIEvent* event, const char* control, - AIRealPoint* dstpoint, const AIRealRect* srcrect, - AIRealRect* dstrect); -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AICursorSnap__ +#define __AICursorSnap__ + +/* + * Name: AICursorSnap.h + * Author: + * Date: + * Purpose: Adobe Illustrator Cursor Snapping Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif +#ifndef __AIDocumentView__ +#include "AIDocumentView.h" +#endif +#ifndef __AITool__ +#include "AITool.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AICursorSnap.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAICursorSnapSuite "AI Cursor Snap Suite" +#define kAICursorSnapSuiteVersion16 AIAPI_VERSION(16) +#define kAICursorSnapSuiteVersion kAICursorSnapSuiteVersion16 +#define kAICursorSnapVersion kAICursorSnapSuiteVersion + + +/** + Kinds of custom constraints for \c #AICursorSnapSuite. + */ +enum { + /** Single point */ + kPointConstraint = 1, + /** A line whose angle is relative to the page coordinates */ + kLinearConstraintAbs, + /** A line whose angle is relative to the constraint angle */ + kLinearConstraintRel +}; + + +/** Flags for custom constraints: + See \c #AICursorSnapSuite. */ +/* Snap to constraint when shift key is down. */ +#define kShiftConstraint (1<<0L) +/* Override drawing the default annotation when a custom constraint is hit, + * and draw custom constraints based on the callback + */ +#define kDrawCustomAnnotations (1<<1L) + + +/** Boundary editors for the transformation tools. +See \c #AICursorSnapSuite. */ +enum { + kTranslateBoundaryEditor = 1 +}; + + +/******************************************************************************* + ** + ** Types + ** + **/ +/* + * AICustomAnnotationLine + * represents a line segment by a start and end point which +*/ +struct AICustomAnnotationLine +{ + AIRealPoint startPoint; + AIRealPoint endPoint; +}; + +typedef AICustomAnnotationLine* AICustomAnnotationLinePtr; + +/** Function pointer type to retrieve details of custom annotations +* to be drawn (if kDrawCustomAnnotations flag is set). +* The function pointer is set in AICursorConstraint struct during constraint addition. +* When the custom constraint is hit and annotations are ready to be drawn, the callback is invoked. +* @param inId ConstraintId of the custom constraint hit +* @param inSnappedPt The point we snapped to +* @param outNumberOfLines Number Of Annotation Lines to be drawn (To be Filled by the callback) +* @param outAnnotationLines An array of custom annotation lines to be drawn (To be Filled by the callback) +* The calling function is responsible to destroy the array of points. +*/ +typedef AIErr(*CustomAnnotationsCallback)(ai::uint32 inId, const AIRealPoint& inSnappedPt, size_t* outNumberOfLines, AICustomAnnotationLine** outAnnotationLines); + +/** + Structure describing a custom constraint for \c #AICursorSnapSuite.. + */ +struct AICursorConstraint { + /** Type of constraint, one of: + \li \c kPointConstraint: A single point. + \li \c kLinearConstraintAbs: A line whose angle is relative to + the page coordinates. + \li \c kLinearConstraintRel: A line whose angle is relative + to the constraint \c angle. + */ + ai::int32 kind; + /** Flags for the constraint. The only flag is \c #kShiftConstraint, + which means snap to the constraint when the shift key is down.*/ + ai::int32 flags; + /** Origin point for the constraint. */ + AIRealPoint point; + /** When \c kind is \c kLinearConstraintRel, the angle of the line. */ + AIReal angle; + /** Label for the constraint presented to the user. Keep the maximum size to be 256 bytes */ + ai::UnicodeString label; + /** Callback function registered by client to retrieve details for drawing custom annotations. */ + CustomAnnotationsCallback getCustomAnnotationDetails; + + /* Constructors */ + AICursorConstraint(const ai::int32 inKind, + const ai::int32 inFlags, + const AIRealPoint& inPoint, + const AIReal inAngle, + const ai::UnicodeString& inLabel, + const CustomAnnotationsCallback inCustomAnnotationsCallback) : + kind(inKind), + flags(inFlags), + point(inPoint), + angle(inAngle), + label(inLabel), + getCustomAnnotationDetails(inCustomAnnotationsCallback) + {} + + AICursorConstraint() : + kind(0), + flags(0), + angle(kAIRealZero), + getCustomAnnotationDetails(NULL) + { + point.h = kAIRealZero; + point.v = kAIRealZero; + } + + /* Destructor */ + ~AICursorConstraint() + {} +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Tools that use the Smart Guides snapping facility use these + functions in the cursor-tracking code. The suite provides functions + for snapping the cursor to various things, called \e constraints. + Constraints include art objects, page boundaries, + and automatically generated guide lines. You can also define your own + constraints, using \c #SetCustom(), although most tools do not do so. + + @note Turning on the grid turns smart guides off, so you never use + this facility to snap to the grid. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAICursorSnapSuite and \c #kAICursorSnapVersion. + + Snap the cursor using the \c #Track() function, which + takes a current cursor location and returns the snapped location. + A control string contains a series of Smart Guide commands + that control how the snap is performed; that is, what kind of + object is snapped to and what kind of location to look for in + each kind of object. + + You can find out what object is under the snapped location: +@code +AIHitRef hit; +long option = <> +result = sAIHitTest->HitTest(NULL, &p, option, &hit); +if (result) + throw ai::Error(result); +@endcode + + These are the control strings used by various tools built + into Illustrator, as saved in the preferences file. + The first entry in each line is the key used in preferences. The second + is the control string for the time when the mouse is up. The third is the control + string for the time when the mouse is down. + + - "Blend", "A v", "A v", + - "Select", "A v o f", "ATFGPLM v i o f", + - "RangeSelect", "", "", + - "Zoom", "", "", + - "Page", "ATFGP v i o", "ATFGP v i o", + - "Ruler", "ATFGPX v i o", "ATFGPMX v i o", + - "Guide", "ATFGPX v i o", "ATFGPX v i o", + - "Scissor", "ATFL v i o", "ATFGPL v i o", + - "SquareCircle", "ATFGP v i o", "ATFGP v i o", + - "Pen", "ATFGPLMSU v i o", "ATF v i o", + - "Translate", "ATFGP v i o", "ATFGPBLM v i o", + - "Scale", "ATFGPXY v i o", "ATFGPBLMXY v i o", + - "Rotate", "ATFGPXY v i o", "ATFGPLMXY v i o", + - "Reflect", "ATFGPXY v i o", "ATFGPLMXY v i o", + - "Shear", "ATFGP v i o", "ATFGPLM v i o", + - "Eyebucket", "A v o f", "A v o f", +*/ + +struct AICursorSnapSuite { + + /** Reports whether Smart Guides should be used to snap the + cursor in a given view. (Note that this function returns + a Boolean value, not an error code.) + @param view The document view. + @return True if Smart Guides should be used. + */ + AIAPI AIBoolean (*UseSmartGuides) (AIDocumentViewHandle view); + + /** Resets the Smart Guides snapping engine. This clears all custom constraints + and all automatically generated constraint lines. + */ + AIAPI AIErr (*Reset) (void); + + /** Clears all custom constraints without clearing automatically + generated constraint lines. + */ + AIAPI AIErr (*ClearCustom) (void); + + /** Replaces the current set of custom constraints with the specified set. + @param count The number of constraints being defined. + @param constraints An array of custom constraints. The function makes a + copy, so the caller can free this memory after making the call. + */ + AIAPI AIErr(*SetCustom) (const ai::AutoBuffer& constraints); + + /** Snaps the cursor to a specified constraint, using a specified technique, using + the "Snap To Point" application preference. + @param view The document view in which to snap the cursor. + @param srcpoint The actual cursor location in artwork coordinates. + Typically passed in the \c #AIToolMessage member \c cursor. + @param event The state of modifier keys. + @param control How snapping is performed, a string containing + a sequence of uppercase and lowercase characters, and spaces. + Each character in the string is a command to the snapping engine. + They are processed sequentially from left to right. + \li An uppercase character enables a constraint: + - A: Enable snapping to art objects (if the "Snap To Point" application + preference is set). Uses the Snapping tolerance preference + (rather than the Selection tolerance). + - T: Enable snapping to custom constraints defined by the current tool. + - F: Enable snapping to automatically generated guidelines. + - P: Enable snapping to the page boundaries. + - L: Enable snapping to automatically generated guidelines along the center and the edges + of geometric box of all visible art objects in view. + - M: Enable snapping to automatically generated guidelines along the center and the edges + - N: Enable angular snapping to automatically generated guidelines along the angular regions on canvas (currently support only for text objects) + of all artboards in the view. + - S: Enable snapping to automatically generated Perspective guidelines. + - U: Enable snapping to Perspective Grid visible in the current document. + - X: Enable snapping to pixel grid (if "snap to pixel" document preference is set) + - Y: Enable snapping to sub-pixel grid (if "snap to pixel" document preference is set) + - Z: Enable snapping to pixel/sub-pixel grid in a stroke-aware fashion (if "snap to pixel" document preference is set) + + \li A lower case character is an instruction to look for the best snap location. + of a particular type among the currently enabled constraints. + - i: Look for intersections of two or more constraints. + - o: Try to snap onto a constraint line. + - v: Try to snap to a point (vertex). + - f: Look for filled objects. + \li A space character is an instruction to return the best snap location found + so far. If no snap location has been found, the search continues. + + @param dstpoint [out] A buffer in which to return the snapped cursor position. + */ + AIAPI AIErr (*Track) (AIDocumentViewHandle view, const AIRealPoint& srcpoint, + const AIEvent* event, const char* control, + AIRealPoint* dstpoint); + + /** Snaps the cursor to a specified constraint, using a specified technique. Does not + consider the "Snap To Point" application preference, and uses the Selection + tolerance to identify hits on art objects. This function is used for direct + selection of anchor points. + @param view The document view in which to snap the cursor. + @param srcpoint The actual cursor location in artwork coordinates. + Typically passed in the \c #AIToolMessage member \c cursor. + @param event The state of modifier keys. + @param control How snapping is performed, a string containing + a sequence of uppercase and lowercase characters, and spaces. + Each character in the string is a command to the snapping engine. + They are processed sequentially from left to right. + \li An uppercase character enables a constraint: + - A: Enable snapping to art objects (without regard to the + "Snap To Point" application preference). Uses the Selection + tolerance preference (rather than the Snapping tolerance). + - T: Enable snapping to custom constraints defined by the current tool. + - F: Enable snapping to automatically generated guidelines. + - P: Enable snapping to the page boundaries. + - X: Enable snapping to pixel grid (if "snap to pixel" document preference is set) + - Y: Enable snapping to sub-pixel grid (if "snap to pixel" document preference is set) + - Z: Enable snapping to pixel/sub-pixel grid in a stroke-aware fashion (if "snap to pixel" document preference is set) + + \li A lower case character is an instruction to look for the best snap location + of a particular type among the currently enabled constraints. + - i: Look for intersections of two or more constraints. + - o: Try to snap onto a constraint line. + - v: Try to snap to a point (vertex). + - f: Look for filled objects. + \li A space character is an instruction to return the best snap location found + so far. If no snap location has been found, the search continues. + + @param dstpoint [out] A buffer in which to return the snapped cursor position. + @param magnifyAnchorPoint [in] True to magnify an anchor point whose hotspot is under the + mouse cursor, as the direct selection tool does. + */ + AIAPI AIErr (*HitTrack) (AIDocumentViewHandle view, const AIRealPoint &srcpoint, + const AIEvent* event, const char* control, + AIRealPoint* dstpoint, AIBoolean magnifyAnchorPoint); + + + /** Snaps the rectangle supplied to a specified constraint, using a specified technique and + the "Snap To Point" application preference. This method returns the new snapped rectangle and + new mouse location. If no snapping is done, then the returned point and the rectangle would be same as + the passed values for source point and rectangle. + + @param view The document view in which to snap the cursor. + @param srcpoint The actual cursor location in artwork coordinates. + Typically passed in the \c #AIToolMessage member \c cursor. + @param event The state of modifier keys. + @param control How snapping is performed, a string containing + a sequence of uppercase and lowercase characters, and spaces. + Each character in the string is a command to the snapping engine. + They are processed sequentially from left to right. + \li An uppercase character enables a constraint: + - A: Enable snapping to art objects (if the "Snap To Point" application + preference is set). Uses the Snapping tolerance preference + (rather than the Selection tolerance). + - T: Enable snapping to custom constraints defined by the current tool. + - F: Enable snapping to automatically generated guidelines. + - P: Enable snapping to the page boundaries. + - L: Enable snapping to automatically generated guidelines along the center and the edges + of geometric box of all visible art objects in view. + - M: Enable snapping to automatically generated guidelines along the center and the edges + of all artboards in the view. + - S: Enable snapping to automatically generated Perspective guidelines. + - U: Enable snapping to Perspective Grid visible in the current document. + - X: Enable snapping to pixel grid (if "snap to pixel" document preference is set) + - Y: Enable snapping to sub-pixel grid (if "snap to pixel" document preference is set) + - Z: Enable snapping to pixel/sub-pixel grid in a stroke-aware fashion (if "snap to pixel" document preference is set) + + \li A lower case character is an instruction to look for the best snap location. + of a particular type among the currently enabled constraints. + - i: Look for intersections of two or more constraints. + - o: Try to snap onto a constraint line + - v: Try to snap to a point (vertex). + - f: Look for filled objects. + \li A space character is an instruction to return the best snap location found + so far. If no snap location has been found, the search continues. + + @param dstpoint [out] A buffer in which to return the snapped cursor position. + @param srcRect The rectangle to be snapped. + @param dstRect [out] A buffer in which to return the new snapped rectangle bounds. + */ + AIAPI AIErr (*TrackInRect) (AIDocumentViewHandle view, const AIRealPoint& srcpoint, + const AIEvent* event, const char* control, + AIRealPoint* dstpoint, const AIRealRect* srcrect, + AIRealRect* dstrect); +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICurveFittingSuite.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICurveFittingSuite.h index 54ed9ef..31f8a64 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICurveFittingSuite.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICurveFittingSuite.h @@ -1,180 +1,180 @@ -#ifndef __AICurveFittingSuite__ -#define __AICurveFittingSuite__ - -/* - * Name: AICurveFittingSuite.h - * Purpose: Adobe Illustrator bezier suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPath__ -#include "AIPath.h" -#endif - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAICurveFittingSuite "AI Curve Fitting Suite" -#define kAICurveFittingSuiteVersion AIAPI_VERSION(11) -#define kAICurveFittingVersion kAICurveFittingSuiteVersion - -/** Parameter constants for \c #AICurveFittingSuite::FitTrajectoryWithPreset() */ -enum AICurveFittingPreset { - /** Preset that results in the most accurate fitting of the curve */ - kAICurveFittingAccuraterPreset, - - /** Other presets in order of decreasing accuracy/increasing smoothness */ - kAICurveFittingAccuratePreset, - kAICurveFittingDefaultPreset, - kAICurveFittingSmoothPreset, - - /** Preset that results in the most smooth fitting of the curve */ - kAICurveFittingSmootherPreset, - - /** Number of preset constants */ - kAICurveFittingNoOfPresets -}; - -/** How to enforce cuts for a sample during fitting. -Used only for the more general \c #AICurveFittingSuite::FitTrajectory() function. -Ignored for \c #AICurveFittingSuite::FitTrajectoryWithPreset() */ -enum AICurveFittingCutType { - kAICurveFittingNoCut, - kAICurveFittingSmoothCut, - kAICurveFittingCornerCut -}; - -/******************************************************************************* - ** - ** Data Structures - ** - **/ - -/** Sample consisting of position and cut type */ -struct AICurveFittingTrajectorySample { - AICurveFittingCutType cut; - AIReal x; - AIReal y; -}; - -/** Vector of /c #AICurveFittingTrajectorySample */ -struct AICurveFittingTrajectorySampleVector { - ai::int32 size; - AICurveFittingTrajectorySample* first; -}; - -/** Vector of /c #AIPathSegment */ -struct AICurveFittingPathSegmentVector { - AIBoolean open; - ai::int32 size; - AIPathSegment* first; -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions to fit a vector of sample points to a cubic Bezier - curve. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICurveFittingSuite and \c #kAICurveFittingVersion. - */ - -struct AICurveFittingSuite { - /** Fits a vector of sample points to a cubic Bezier curve using a preset, as opposed - to the more general function FitTrajectory(...) below. Some, and not all, of the - presets are equivalent to sets of parameters of the general function. There are no - equivalent sets for presets towards the smoother end of the spectrum that use a different - algorithm to give better results. Use the general function only when none of the provided - presets give the required fit. - - @param trajectory The vector of sample points. It is the client's - responsibility to manage this vector. - - @param preset The preset for fitting. - - @param close Whether the fitted path will be closed (true) or open (false). - - @param zoomAware True to take the the zoom factor of the document into - account during the fitting. - - @param path [out] A buffer in which to return the vector of fitted path segments. - Memory for this buffer is allocated internally using SPBasic->AllocateBlock. It - is the client's responsibility to free it using SPBasic->FreeBlock. - */ - AIAPI AIErr (*FitTrajectoryWithPreset)( - AICurveFittingTrajectorySampleVector* trajectory, - AICurveFittingPreset preset, - AIBoolean close, - AIBoolean zoomAware, - AICurveFittingPathSegmentVector* path - ); - - /** Fits a vector of sample points to a cubic Bezier curve. - - @param trajectory The vector of sample points. It is the client's - responsibility to manage this vector. - - @param noiseFilterDegree An even integer [0, 2, 4, ...] that determines the - amount of noise filtering to apply. 4 is typically used, 0 means - no filtering. - - @param cornerAngleTolerance A real number [-1 1] equal to - -cos(angle A in radians) such that if an angle less than A occurs in the - trajectory, a corner is formed there. - - @param smoothnessTolerance A percentage [0 100] for the amount - of smoothing to perform on the samples. 0 means no smoothing, 100 - is the maximum amount of smoothing. - - @param fidelityTolerance A positive number for the constant that determines - the maximum amount by which a fitting is allowed to deviate from the sample points. - - @param path [out] A buffer in which to return the vector of fitted path segments. - Memory for this buffer is allocated internally - using SPBasic->AllocateBlock. It is the client's responsibility to free it - using SPBasic->FreeBlock. - */ - AIAPI AIErr (*FitTrajectory)( - AICurveFittingTrajectorySampleVector* trajectory, - ai::int32 noiseFilterDegree, - AIReal cornerAngleTolerance, - AIReal smoothnessTolerance, - AIReal fidelityTolerance, - AICurveFittingPathSegmentVector* path - ); -}; - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AICurveFittingSuite__ +#define __AICurveFittingSuite__ + +/* + * Name: AICurveFittingSuite.h + * Purpose: Adobe Illustrator bezier suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2014 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPath__ +#include "AIPath.h" +#endif + +#include "AIHeaderBegin.h" + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAICurveFittingSuite "AI Curve Fitting Suite" +#define kAICurveFittingSuiteVersion AIAPI_VERSION(11) +#define kAICurveFittingVersion kAICurveFittingSuiteVersion + +/** Parameter constants for \c #AICurveFittingSuite::FitTrajectoryWithPreset() */ +enum AICurveFittingPreset { + /** Preset that results in the most accurate fitting of the curve */ + kAICurveFittingAccuraterPreset, + + /** Other presets in order of decreasing accuracy/increasing smoothness */ + kAICurveFittingAccuratePreset, + kAICurveFittingDefaultPreset, + kAICurveFittingSmoothPreset, + + /** Preset that results in the most smooth fitting of the curve */ + kAICurveFittingSmootherPreset, + + /** Number of preset constants */ + kAICurveFittingNoOfPresets +}; + +/** How to enforce cuts for a sample during fitting. +Used only for the more general \c #AICurveFittingSuite::FitTrajectory() function. +Ignored for \c #AICurveFittingSuite::FitTrajectoryWithPreset() */ +enum AICurveFittingCutType { + kAICurveFittingNoCut, + kAICurveFittingSmoothCut, + kAICurveFittingCornerCut +}; + +/******************************************************************************* + ** + ** Data Structures + ** + **/ + +/** Sample consisting of position and cut type */ +struct AICurveFittingTrajectorySample { + AICurveFittingCutType cut; + AIReal x; + AIReal y; +}; + +/** Vector of /c #AICurveFittingTrajectorySample */ +struct AICurveFittingTrajectorySampleVector { + ai::int32 size; + AICurveFittingTrajectorySample* first; +}; + +/** Vector of /c #AIPathSegment */ +struct AICurveFittingPathSegmentVector { + AIBoolean open; + ai::int32 size; + AIPathSegment* first; +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions to fit a vector of sample points to a cubic Bezier + curve. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAICurveFittingSuite and \c #kAICurveFittingVersion. + */ + +struct AICurveFittingSuite { + /** Fits a vector of sample points to a cubic Bezier curve using a preset, as opposed + to the more general function FitTrajectory(...) below. Some, and not all, of the + presets are equivalent to sets of parameters of the general function. There are no + equivalent sets for presets towards the smoother end of the spectrum that use a different + algorithm to give better results. Use the general function only when none of the provided + presets give the required fit. + + @param trajectory The vector of sample points. It is the client's + responsibility to manage this vector. + + @param preset The preset for fitting. + + @param close Whether the fitted path will be closed (true) or open (false). + + @param zoomAware True to take the the zoom factor of the document into + account during the fitting. + + @param path [out] A buffer in which to return the vector of fitted path segments. + Memory for this buffer is allocated internally using SPBasic->AllocateBlock. It + is the client's responsibility to free it using SPBasic->FreeBlock. + */ + AIAPI AIErr (*FitTrajectoryWithPreset)( + AICurveFittingTrajectorySampleVector* trajectory, + AICurveFittingPreset preset, + AIBoolean close, + AIBoolean zoomAware, + AICurveFittingPathSegmentVector* path + ); + + /** Fits a vector of sample points to a cubic Bezier curve. + + @param trajectory The vector of sample points. It is the client's + responsibility to manage this vector. + + @param noiseFilterDegree An even integer [0, 2, 4, ...] that determines the + amount of noise filtering to apply. 4 is typically used, 0 means + no filtering. + + @param cornerAngleTolerance A real number [-1 1] equal to + -cos(angle A in radians) such that if an angle less than A occurs in the + trajectory, a corner is formed there. + + @param smoothnessTolerance A percentage [0 100] for the amount + of smoothing to perform on the samples. 0 means no smoothing, 100 + is the maximum amount of smoothing. + + @param fidelityTolerance A positive number for the constant that determines + the maximum amount by which a fitting is allowed to deviate from the sample points. + + @param path [out] A buffer in which to return the vector of fitted path segments. + Memory for this buffer is allocated internally + using SPBasic->AllocateBlock. It is the client's responsibility to free it + using SPBasic->FreeBlock. + */ + AIAPI AIErr (*FitTrajectory)( + AICurveFittingTrajectorySampleVector* trajectory, + ai::int32 noiseFilterDegree, + AIReal cornerAngleTolerance, + AIReal smoothnessTolerance, + AIReal fidelityTolerance, + AICurveFittingPathSegmentVector* path + ); +}; + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICustomColor.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICustomColor.h index ca1ba5b..0a6d40e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICustomColor.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AICustomColor.h @@ -1,244 +1,244 @@ -#ifndef __AICustomColor__ -#define __AICustomColor__ - -/* - * Name: AICustomColor.h - * $Revision: 10 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Custom Color Fill Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIColorConversion__ -#include "AIColorConversion.h" -#endif - -#include "IAIUnicodeString.h" - - -#include "AIHeaderBegin.h" - -/** @file AICustomColor.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAICustomColorSuite "AI Custom Color Suite" -#define kAICustomColorSuiteVersion AIAPI_VERSION(8) -#define kAICustomColorVersion kAICustomColorSuiteVersion - -/** @ingroup Notifiers - Sent when there is a change to custom colors, including adding a new color or - deleting an existing one. No is data sent with the notifier, so the plug-in - must determine what change occurred using the \c #AICustomColorSuite functions. */ -#define kAIArtCustomColorChangedNotifier "AI Art Custom Color Changed Notifier" - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Use the functions in this suite to access, create, delete, and modify - custom colors. Custom colors represent both spot colors and global process colors. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICustomColorSuite and \c #kAICustomColorVersion. - */ -typedef struct { - - /** Creates a new custom color. The color is not added to the swatch list. - @param color The color specification. - @param name The color name. The PostScript/PDF language reserves the names - \c All, \c None, \c Cyan, \c Magenta, \c Yellow and \c Black. - These names cannot be used for spot colors. - @param customColor [out] A buffer in which to return the new custom color reference. - */ - AIAPI AIErr (*NewCustomColor) ( AICustomColor *color, const ai::UnicodeString& name, AICustomColorHandle *customColor ); - - /** Deletes a custom color. Deletes it from the swatches palette if present - and replaces any usages by the process equivalent. - @param customColor The custom color reference. Upon return, this reference is invalid. - */ - AIAPI AIErr (*DeleteCustomColor) ( AICustomColorHandle customColor ); - - /** Retrieves the color specification from a custom color, which includes the CMYK or - RGB values. - @param customColor The custom color reference. - @param color [out] A buffer in which to return the color information. - */ - AIAPI AIErr (*GetCustomColor) ( AICustomColorHandle customColor, AICustomColor *color ); - /** Sets the color specification for a custom color, which includes the CMYK or - RGB values. - @param customColor The custom color reference. - @param color The new color information. - */ - AIAPI AIErr (*SetCustomColor) ( AICustomColorHandle customColor, AICustomColor *color ); - - /** Retrieves the unique name of a custom color. - @param customColor The custom color reference. - @param name [out] A buffer in which to return the color name. - */ - AIAPI AIErr (*GetCustomColorName) ( AICustomColorHandle customColor, ai::UnicodeString& name ); - - /** Sets the name of a custom color. - @param customColor The custom color reference. - @param name The new name. The PostScript/PDF language reserves the names - \c All, \c None, \c Cyan, \c Magenta, \c Yellow and \c Black. - These names cannot be used for spot colors. - */ - AIAPI AIErr (*SetCustomColorName) ( AICustomColorHandle customColor, const ai::UnicodeString& name ); - - /** Gets the number of defined custom colors currently available. - Use with \c #GetNthCustomColor() to iterate through the list of custom colors. - @param count [out] A buffer in which to return the number of custom colors. - */ - AIAPI AIErr (*CountCustomColors) ( ai::int32 *count ); - - /** Retrieves a custom color by position index. - Use with \c #CountCustomColors() to iterate through the list of custom colors. - @param n The position index, in the range [0..numColors-1]. - @param customColor [out] A buffer in which to return the custom color reference. - */ - AIAPI AIErr (*GetNthCustomColor) ( ai::int32 n, AICustomColorHandle *customColor ); - - /** Retrieves a custom color by name. - @param name The name. - @param customColor [out] A buffer in which to return the custom color reference. - */ - AIAPI AIErr (*GetCustomColorByName) ( const ai::UnicodeString& name, AICustomColorHandle *customColor ); - - /** Generates a unique name for a custom color If the specified base name does not already exist, - it is returned. If the base name already exists, the function concatenates the string - \c "\nxxx", where \c xxx is an integer, starting at 000 and incrementing as necessary - to create a unique name. This allows you to keep track of multiple versions of the - same color name.. - @param name [in, out] A string containing the base name. The string is modified - in place if needed. - */ - AIAPI AIErr (*NewCustomColorName) ( ai::UnicodeString& name ); - - /** @deprecated This function is now a no-op. An earlier version of Illustrator - stored unique internal names for custom colors different from those displayed in the UI. */ - AIAPI AIErr (*GetCustomColorDisplayName) ( ai::UnicodeString& name ); - - /** Retrieves the custom color currently used as the registration color. - @param customColor [out] A buffer in which to return the custom color reference. - */ - AIAPI AIErr (*GetCurrentRegistrationColor) ( AICustomColorHandle *customColor ); - - /** Retrieves the registration color for the current document, or - creates a new registration color if needed, using default values. - Ignores the color and kind input parameters. - @param customColor [out] A buffer in which to return the - current registration color, or the new registration color. - */ - AIAPI AIErr (*NewRegistrationColor)(AICustomColorHandle *customColor, AIReal cyan /*red*/, - AIReal magenta /*green*/,AIReal yellow/*blue*/, AIReal black, AICustomColorTag kind); - - /** Reports whether a custom color handle represents a valid custom - color in the current document. (Note that this function returns a - boolean value, not an error code.) - @param customColor The custom color reference. - @return True if the reference is valid. - */ - AIAPI AIBoolean (*ValidateCustomColor)(AICustomColorHandle customColor); - /** Reports whether a custom color is a spot color that is used by a linked file. - If this is the case it cannot be modified. (Note that this function returns a - boolean value, not an error code.) - @param customColor The custom color reference. - @return True if the custom color is used externally. - */ - AIAPI AIBoolean (*HasExternalUses)(AICustomColorHandle customColor); - - /** Converts a tint of a custom color to its closest non-global approximation - that is consistent with the document color model. For example, - in a CMYK document, Lab and RGB based spot colors are converted - to CMYK. - \li If the custom color is a global process color, the returned color - is the process - equivalent. - \li If the custom color is a spot color, the returned color - is the process approximation - of the appearance of the spot color. - \li If the custom color is a registration color, the returned color - is the process color used to represent the registration color. - - @param customColor The custom color reference. - @param tint The amount of the color used in paint, a percentage value - in the range [0..1], where 0 is full tint and 1 is white. - @param color [out] A buffer in which to return the converted color. - */ - AIAPI AIErr (*ConvertToNonGlobal)(AICustomColorHandle customColor, AIReal tint, AIColor* color); - - /** Converts a tint of a custom color to its best appearance approximation, - a color that approximates the way the custom color looks. - \li For global process colors, returns the process color with the given tint. - \li For spot colors, returns a color that approximates the appearance of the - tint of the spot ink. - - This differs from \c #ConvertToNonGlobal() in that the resulting color - need not be consistent with the document color model. - @param customColor The custom color reference. - @param tint The amount of the color used in paint, a percentage value - in the range [[0..1], where 0 is full tint and 1 is white. - @param space [out] A buffer in which to return the color space, a - \c #AIColorConversionSpaceValue. - @param color [out] A buffer in which to return the converted color. - */ - AIAPI AIErr (*GetAppearanceApproximation)(AICustomColorHandle customColor, AIReal tint, - ai::int32* space, AIFloatSampleComponent* values); - - /** Sets the book id for global spot color. If color is not spot then this method - returns an error. - @param customColor The custom color reference. - @param bookid The custom color source book id. - */ - AIAPI AIErr (*SetCustomColorBookID)(AICustomColorHandle customColor, ai::int32 bookid); - - - /** Gets the source book id for global spot color. If color is not spot then this - method returns -1 - @param customColor The custom color reference. - */ - AIAPI ai::int32 (*GetCustomColorBookID)(AICustomColorHandle customColor); - - -} AICustomColorSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AICustomColor__ +#define __AICustomColor__ + +/* + * Name: AICustomColor.h + * $Revision: 10 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Custom Color Fill Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIColorConversion__ +#include "AIColorConversion.h" +#endif + +#include "IAIUnicodeString.h" + + +#include "AIHeaderBegin.h" + +/** @file AICustomColor.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAICustomColorSuite "AI Custom Color Suite" +#define kAICustomColorSuiteVersion AIAPI_VERSION(8) +#define kAICustomColorVersion kAICustomColorSuiteVersion + +/** @ingroup Notifiers + Sent when there is a change to custom colors, including adding a new color or + deleting an existing one. No is data sent with the notifier, so the plug-in + must determine what change occurred using the \c #AICustomColorSuite functions. */ +#define kAIArtCustomColorChangedNotifier "AI Art Custom Color Changed Notifier" + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Use the functions in this suite to access, create, delete, and modify + custom colors. Custom colors represent both spot colors and global process colors. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAICustomColorSuite and \c #kAICustomColorVersion. + */ +typedef struct { + + /** Creates a new custom color. The color is not added to the swatch list. + @param color The color specification. + @param name The color name. The PostScript/PDF language reserves the names + \c All, \c None, \c Cyan, \c Magenta, \c Yellow and \c Black. + These names cannot be used for spot colors. + @param customColor [out] A buffer in which to return the new custom color reference. + */ + AIAPI AIErr (*NewCustomColor) ( AICustomColor *color, const ai::UnicodeString& name, AICustomColorHandle *customColor ); + + /** Deletes a custom color. Deletes it from the swatches palette if present + and replaces any usages by the process equivalent. + @param customColor The custom color reference. Upon return, this reference is invalid. + */ + AIAPI AIErr (*DeleteCustomColor) ( AICustomColorHandle customColor ); + + /** Retrieves the color specification from a custom color, which includes the CMYK or + RGB values. + @param customColor The custom color reference. + @param color [out] A buffer in which to return the color information. + */ + AIAPI AIErr (*GetCustomColor) ( AICustomColorHandle customColor, AICustomColor *color ); + /** Sets the color specification for a custom color, which includes the CMYK or + RGB values. + @param customColor The custom color reference. + @param color The new color information. + */ + AIAPI AIErr (*SetCustomColor) ( AICustomColorHandle customColor, AICustomColor *color ); + + /** Retrieves the unique name of a custom color. + @param customColor The custom color reference. + @param name [out] A buffer in which to return the color name. + */ + AIAPI AIErr (*GetCustomColorName) ( AICustomColorHandle customColor, ai::UnicodeString& name ); + + /** Sets the name of a custom color. + @param customColor The custom color reference. + @param name The new name. The PostScript/PDF language reserves the names + \c All, \c None, \c Cyan, \c Magenta, \c Yellow and \c Black. + These names cannot be used for spot colors. + */ + AIAPI AIErr (*SetCustomColorName) ( AICustomColorHandle customColor, const ai::UnicodeString& name ); + + /** Gets the number of defined custom colors currently available. + Use with \c #GetNthCustomColor() to iterate through the list of custom colors. + @param count [out] A buffer in which to return the number of custom colors. + */ + AIAPI AIErr (*CountCustomColors) ( ai::int32 *count ); + + /** Retrieves a custom color by position index. + Use with \c #CountCustomColors() to iterate through the list of custom colors. + @param n The position index, in the range [0..numColors-1]. + @param customColor [out] A buffer in which to return the custom color reference. + */ + AIAPI AIErr (*GetNthCustomColor) ( ai::int32 n, AICustomColorHandle *customColor ); + + /** Retrieves a custom color by name. + @param name The name. + @param customColor [out] A buffer in which to return the custom color reference. + */ + AIAPI AIErr (*GetCustomColorByName) ( const ai::UnicodeString& name, AICustomColorHandle *customColor ); + + /** Generates a unique name for a custom color If the specified base name does not already exist, + it is returned. If the base name already exists, the function concatenates the string + \c "\nxxx", where \c xxx is an integer, starting at 000 and incrementing as necessary + to create a unique name. This allows you to keep track of multiple versions of the + same color name.. + @param name [in, out] A string containing the base name. The string is modified + in place if needed. + */ + AIAPI AIErr (*NewCustomColorName) ( ai::UnicodeString& name ); + + /** @deprecated This function is now a no-op. An earlier version of Illustrator + stored unique internal names for custom colors different from those displayed in the UI. */ + AIAPI AIErr (*GetCustomColorDisplayName) ( ai::UnicodeString& name ); + + /** Retrieves the custom color currently used as the registration color. + @param customColor [out] A buffer in which to return the custom color reference. + */ + AIAPI AIErr (*GetCurrentRegistrationColor) ( AICustomColorHandle *customColor ); + + /** Retrieves the registration color for the current document, or + creates a new registration color if needed, using default values. + Ignores the color and kind input parameters. + @param customColor [out] A buffer in which to return the + current registration color, or the new registration color. + */ + AIAPI AIErr (*NewRegistrationColor)(AICustomColorHandle *customColor, AIReal cyan /*red*/, + AIReal magenta /*green*/,AIReal yellow/*blue*/, AIReal black, AICustomColorTag kind); + + /** Reports whether a custom color handle represents a valid custom + color in the current document. (Note that this function returns a + boolean value, not an error code.) + @param customColor The custom color reference. + @return True if the reference is valid. + */ + AIAPI AIBoolean (*ValidateCustomColor)(AICustomColorHandle customColor); + /** Reports whether a custom color is a spot color that is used by a linked file. + If this is the case it cannot be modified. (Note that this function returns a + boolean value, not an error code.) + @param customColor The custom color reference. + @return True if the custom color is used externally. + */ + AIAPI AIBoolean (*HasExternalUses)(AICustomColorHandle customColor); + + /** Converts a tint of a custom color to its closest non-global approximation + that is consistent with the document color model. For example, + in a CMYK document, Lab and RGB based spot colors are converted + to CMYK. + \li If the custom color is a global process color, the returned color + is the process + equivalent. + \li If the custom color is a spot color, the returned color + is the process approximation + of the appearance of the spot color. + \li If the custom color is a registration color, the returned color + is the process color used to represent the registration color. + + @param customColor The custom color reference. + @param tint The amount of the color used in paint, a percentage value + in the range [0..1], where 0 is full tint and 1 is white. + @param color [out] A buffer in which to return the converted color. + */ + AIAPI AIErr (*ConvertToNonGlobal)(AICustomColorHandle customColor, AIReal tint, AIColor* color); + + /** Converts a tint of a custom color to its best appearance approximation, + a color that approximates the way the custom color looks. + \li For global process colors, returns the process color with the given tint. + \li For spot colors, returns a color that approximates the appearance of the + tint of the spot ink. + + This differs from \c #ConvertToNonGlobal() in that the resulting color + need not be consistent with the document color model. + @param customColor The custom color reference. + @param tint The amount of the color used in paint, a percentage value + in the range [[0..1], where 0 is full tint and 1 is white. + @param space [out] A buffer in which to return the color space, a + \c #AIColorConversionSpaceValue. + @param color [out] A buffer in which to return the converted color. + */ + AIAPI AIErr (*GetAppearanceApproximation)(AICustomColorHandle customColor, AIReal tint, + ai::int32* space, AIFloatSampleComponent* values); + + /** Sets the book id for global spot color. If color is not spot then this method + returns an error. + @param customColor The custom color reference. + @param bookid The custom color source book id. + */ + AIAPI AIErr (*SetCustomColorBookID)(AICustomColorHandle customColor, ai::int32 bookid); + + + /** Gets the source book id for global spot color. If color is not spot then this + method returns -1 + @param customColor The custom color reference. + */ + AIAPI ai::int32 (*GetCustomColorBookID)(AICustomColorHandle customColor); + + +} AICustomColorSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDataFilter.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDataFilter.h index 1c9d92d..a5d2c3a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDataFilter.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDataFilter.h @@ -1,308 +1,322 @@ -#ifndef __AIDataFilter__ -#define __AIDataFilter__ - -/* - * Name: AIDataFilter.h - * $Revision: 7 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Data Filter Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIFilePath.h" - -#include "AIHeaderBegin.h" - -/** @file AIDataFilter.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** Data filter suite name. */ -#define kAIDataFilterSuite "AI Data Filter Suite" -/** Data filter suite version. */ -#define kAIDataFilterSuiteVersion8 AIAPI_VERSION(8) - -/** Data filter suite version. */ -#define kAIDataFilterSuiteVersion kAIDataFilterSuiteVersion8 -#define kAIDataFilterVersion kAIDataFilterSuiteVersion - - -/** @ingroup Errors */ -#define kDataFilterErr 'DFER' - - -/******************************************************************************* - ** - ** Types - ** - **/ -/** Opaque reference to a data filter. */ -typedef struct DataFilter AIDataFilter; - -/** This structure allows a plug-in to implement a stream by supplying - the stream methods. A method can be \c NULL. If a null method is - invoked, the calling function returns \c #kDataFilterErr. */ -typedef struct _t_AIPluginStream { - /** Reads data from a stream. Reads up to \c count bytes into \c buffer, - returning the number of bytes that were read. - @param stream The stream. - @param buffer [out] A buffer in which to return the data. - @param count [in, out] A pointer to the maximum number of bytes to read. - Returns the number of bytes actually read. - */ - AIAPI AIErr (*ReadProc) ( struct _t_AIPluginStream* stream, char* buffer, size_t* count ); - /** Writes data to a stream. - @param stream The stream. - @param buffer A buffer containing the data. - @param count The number of bytes in \c buffer. - */ - AIAPI AIErr (*WriteProc) ( struct _t_AIPluginStream* stream, const char* buffer, size_t count ); - /** Seeks to a position in a stream. - @param stream The stream. - @param count The offset into the stream. - */ - AIAPI AIErr (*SeekProc) ( struct _t_AIPluginStream* stream, ai::sizediff_t count ); - /** Marks the current position in a stream - @param stream The stream. - @param count [out] A buffer in which to return the offset into the stream. - */ - AIAPI AIErr (*MarkProc) ( struct _t_AIPluginStream* stream, ai::sizediff_t *count ); - /** Terminates a stream. - @param The stream. - */ - AIAPI AIErr (*TerminateProc) ( struct _t_AIPluginStream* stream ); -} AIPluginStream; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - A data filter is an object that bytes of data can be read from or written to. - The filter usually does something interesting with those bytes. For example, - it might write them to a disk file, send them over a network or it could - perform JPEG encoding and decoding. - - This suite provides functions to create filters that read and write files, buffers, - or memory blocks, and that encode/decode and compress/decompress data. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDataFilterSuite and \c #kAIDataFilterVersion. - - Data filters can be linked together. Each filter in the linked chain gets data from - or puts data to the previous filter. A file filter could, for example, be linked - to an ASCII encoding filter which is in turn linked to a binary compression filter. - The result is a composite filter that compresses and ASCII-encodes data before writing - it to a file. - - The following code shows how to set up a data filter that performs buffered - writes to a file. Note that \c #LinkDataFilter() must be called even for the - first filter as it initializes the filter. -@code -AIErr result = kNoErr; -AIDataFilter* dstfilter = NULL; -AIDataFilter* filter; -if (!result) - result = sAIDataFilter->NewFileDataFilter(file, "write", 'ART5', 'TEXT', &filter); -if (!result) { - result = sAIDataFilter->LinkDataFilter(dstfilter, filter); - dstfilter = filter; -} -if (!result) - result = sAIDataFilter->NewBufferDataFilter(32*1024, &filter); -if (!result) { - result = sAIDataFilter->LinkDataFilter(dstfilter, filter); - dstfilter = filter; -} -@endcode - - When you have finished with a filter, you can use the following code to close it. -@code -AIErr result = kNoErr; -while (dstfilter) { - AIErr tmpresult = sAIDataFilter->UnlinkDataFilter(dstfilter, &dstfilter); - if (!result) - result = tmpresult; -} -@endcode -*/ -struct AIDataFilterSuite { - - /** Initializes a filter and links it to the previous filter for input - or output. - @param prev A pointer to the previous filter (the source or - destination of data read or written by this filter). Can be - null for the first filter in a chain, or a filter that is not linked. - @param next A pointer to the filter to initialize and link. - */ - AIAPI AIErr (*LinkDataFilter) ( AIDataFilter *prev, AIDataFilter *next ); - - /** Terminates a filter. If the filter is writing, flushes any writes. - @param next A pointer to the filter to terminate. - @param prev [out] A buffer in which to return a pointer to the - previous linked filter, which contains any data written - before termination. - */ - AIAPI AIErr (*UnlinkDataFilter) ( AIDataFilter *next, AIDataFilter **prev ); - - /** Reads data from the filter's source stream. - @param filter A pointer to the filter. - @param store [out] A buffer in which to return the data. - @param count [in, out] A pointer to the maximum number of bytes to read. - Returns the number of bytes actually read, 0 if the stream - is exhausted. - */ - AIAPI AIErr (*ReadDataFilter) ( AIDataFilter *filter, char *store, size_t *count ); - - /** Writes data to the filter's destination stream. - @param filter A pointer to the filter. - @param store A buffer containing the data. - @param count A pointer to the number of bytes in \c store. - */ - AIAPI AIErr (*WriteDataFilter) ( AIDataFilter *filter, const char *store, size_t *count ); - - /** Seeks to a position in a filter's stream, as returned by \c #MarkDataFilter(). - Not all data filters support random access. - @param filter A pointer to the filter. - @param count A pointer to the new position, an offset into the stream. - */ - AIAPI AIErr (*SeekDataFilter) ( AIDataFilter *filter, ai::sizediff_t *count ); - - /** Reports the current position in a filter's stream. - @param filter A pointer to the filter. - @param count [out] A buffer in which to return the position, an offset - into the stream. - */ - AIAPI AIErr (*MarkDataFilter) ( AIDataFilter *filter, ai::sizediff_t *count ); - - /** Creates a new file data filter that reads to or writes from a file. - @param spec The file associated with the filter. - @param mode How the filter is used, one of \c "read", \c "write", - or \c "append". - @param creator The file creator (for Mac OS) - @param type The file type (for Mac OS) - @param filter [out] A buffer in which to return the new filter reference. - */ - AIAPI AIErr (*NewFileDataFilter) ( const ai::FilePath &spec, const char *mode, size_t creator, ai::int32 type, AIDataFilter **filter ); - - /** Creates a new buffer data filter that reads from or writes to a - linked filter, buffering data into chunks of a specified size. - @param size The number of bytes to read or write at a time. - @param filter [out] A buffer in which to return the new filter reference. - */ - AIAPI AIErr (*NewBufferDataFilter) ( size_t size, AIDataFilter **filter ); - - /** Creates a new ASCIIHEX data filter that encodes or decodes data from a linked - filter using ASCII Hex. That is, it uses the characters 0-9 and A-F to represent - hexadecimal numbers. The resulting sequence of characters is broken up - into lines by inserting line break characters as needed. Each line can - additionally be preceded by a number of tab characters. - @param state Whether the filter is encoding or decoding, one of: - \li \c "write" (encoding) - \li \c "read" (decoding) - - @param shift The number of tab characters to insert before each line. - @param filter [out] A buffer in which to return the new filter reference. - */ - AIAPI AIErr (*NewHexdecDataFilter) ( char *state, ai::int32 shift, AIDataFilter **filter ); - - /** Creates a new block data filter that reads from and writes to - a specified block of memory. - @param address The address of the block. - @param size The number of bytes in the block. - @param filter [out] A buffer in which to return the new filter reference. - */ - AIAPI AIErr (*NewBlockDataFilter) ( void *address, size_t size, AIDataFilter **filter ); - - /** Creates a new random access data filter that reads from and writes to - Illustrator's virtual memory. Use to create a temporary file that is - paged to and from memory as needed. - @param initialsize The end of the initial stream, a number of bytes. - If \c NULL, the initial stream is empty. - @param filter [out] A buffer in which to return the new filter reference. - */ - AIAPI AIErr (*NewVMDataFilter) (size_t initialsize, AIDataFilter **filter ); - - /** Creates a new ASCII85 data filter that encodes or decodes data from - a linked filter. The resulting sequence of characters is broken up - into lines by inserting line break characters as needed. Each line can - additionally be preceded by a prefix string. - @param statestr Whether the filter is encoding or decoding, one of: - \li \c "write" (encoding) - \li \c "read" (decoding) - - @param prefix The string to insert at the start of each line. - @param filter [out] A buffer in which to return the new filter reference. - */ - AIAPI AIErr (*NewA85DataFilter) ( char *statestr, const char* prefix, AIDataFilter **filter ); - - /** Creates a new ZLib data filter that compresses or decompresses data from a linked filter. - @param statestr Whether the filter is compressing or decompressing, one of: - \li \c "write" (compressing) - \li \c "read" (decompressing) - - @param filter [out] A buffer in which to return the new filter reference. - */ - AIAPI AIErr (*NewZDataFilter) ( const char *statestr, AIDataFilter **filter ); - - /* New in Illustrator 10.0 */ - - /** Creates a new data filter for a stream with specified methods. - It is typically at one end of a filter chain, to act as a data source or - sink. - @param stream The stream, which you have initialized with - a set of data-handling procedures. - @param filter [out] A buffer in which to return the new filter reference, . - */ - AIAPI AIErr (*NewPluginStream) ( AIPluginStream* stream, AIDataFilter **filter ); - - /* New in Illustrator 13.0 */ - - /** Creates a data filter for streaming data from a plug-in resource. - Searches for a resource of a given type in the plug-in's resource file. - Identify the specific resource using either a numeric ID or name string. - The type, ID, and name are defined by the plug-in that owns the resource - @param plugin The plug-in object for the plug-in that owns the resource. - @param type The resource type constant, a 4-byte value. - @param id The unique resource identifier. - @param name The resource name. - @param filter [out] A buffer in which to return the new filter reference, . - */ - AIAPI AIErr (*NewResourceDataFilter) ( SPPluginRef plugin, ai::int32 type, ai::int32 id, const char *name, AIDataFilter **filter); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#pragma once + +/* + * Name: AIDataFilter.h + * Author: + * Date: + * Purpose: Adobe Illustrator Data Filter Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2018 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIFilePath.h" + +#include "AIHeaderBegin.h" + +/** @file AIDataFilter.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** Data filter suite name. */ +#define kAIDataFilterSuite "AI Data Filter Suite" +/** Data filter suite version. */ +#define kAIDataFilterSuiteVersion9 AIAPI_VERSION(9) + +/** Data filter suite version. */ +#define kAIDataFilterSuiteVersion kAIDataFilterSuiteVersion9 +#define kAIDataFilterVersion kAIDataFilterSuiteVersion + + +/** @ingroup Errors */ +#define kDataFilterErr 'DFER' + + +/******************************************************************************* + ** + ** Types + ** + **/ +/** Opaque reference to a data filter. */ +typedef struct DataFilter AIDataFilter; + +/** This structure allows a plug-in to implement a stream by supplying + the stream methods. A method can be \c NULL. If a null method is + invoked, the calling function returns \c #kDataFilterErr. */ +typedef struct _t_AIPluginStream { + /** Reads data from a stream. Reads up to \c count bytes into \c buffer, + returning the number of bytes that were read. + @param stream The stream. + @param buffer [out] A buffer in which to return the data. + @param count [in, out] A pointer to the maximum number of bytes to read. + Returns the number of bytes actually read. + */ + AIAPI AIErr (*ReadProc) ( struct _t_AIPluginStream* stream, char* buffer, size_t* count ); + /** Writes data to a stream. + @param stream The stream. + @param buffer A buffer containing the data. + @param count The number of bytes in \c buffer. + */ + AIAPI AIErr (*WriteProc) ( struct _t_AIPluginStream* stream, const char* buffer, size_t count ); + /** Seeks to a position in a stream. + @param stream The stream. + @param count The offset into the stream. + */ + AIAPI AIErr (*SeekProc) ( struct _t_AIPluginStream* stream, ai::sizediff_t count ); + /** Marks the current position in a stream + @param stream The stream. + @param count [out] A buffer in which to return the offset into the stream. + */ + AIAPI AIErr (*MarkProc) ( struct _t_AIPluginStream* stream, ai::sizediff_t *count ); + /** Terminates a stream. + @param The stream. + */ + AIAPI AIErr (*TerminateProc) ( struct _t_AIPluginStream* stream ); +} AIPluginStream; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + A data filter is an object that bytes of data can be read from or written to. + The filter usually does something interesting with those bytes. For example, + it might write them to a disk file, send them over a network or it could + perform JPEG encoding and decoding. + + This suite provides functions to create filters that read and write files, buffers, + or memory blocks, and that encode/decode and compress/decompress data. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIDataFilterSuite and \c #kAIDataFilterVersion. + + Data filters can be linked together. Each filter in the linked chain gets data from + or puts data to the previous filter. A file filter could, for example, be linked + to an ASCII encoding filter which is in turn linked to a binary compression filter. + The result is a composite filter that compresses and ASCII-encodes data before writing + it to a file. + + The following code shows how to set up a data filter that performs buffered + writes to a file. Note that \c #LinkDataFilter() must be called even for the + first filter as it initializes the filter. +@code +AIErr result = kNoErr; +AIDataFilter* dstfilter = NULL; +AIDataFilter* filter; +if (!result) + result = sAIDataFilter->NewFileDataFilter(file, "write", 'ART5', 'TEXT', &filter); +if (!result) { + result = sAIDataFilter->LinkDataFilter(dstfilter, filter); + dstfilter = filter; +} +if (!result) + result = sAIDataFilter->NewBufferDataFilter(32*1024, &filter); +if (!result) { + result = sAIDataFilter->LinkDataFilter(dstfilter, filter); + dstfilter = filter; +} +@endcode + + When you have finished with a filter, you can use the following code to close it. +@code +AIErr result = kNoErr; +while (dstfilter) { + AIErr tmpresult = sAIDataFilter->UnlinkDataFilter(dstfilter, &dstfilter); + if (!result) + result = tmpresult; +} +@endcode +*/ +struct AIDataFilterSuite { + + /** Initializes a filter and links it to the previous filter for input + or output. + @param prev A pointer to the previous filter (the source or + destination of data read or written by this filter). Can be + null for the first filter in a chain, or a filter that is not linked. + @param next A pointer to the filter to initialize and link. + */ + AIAPI AIErr (*LinkDataFilter) ( AIDataFilter *prev, AIDataFilter *next ); + + /** Terminates a filter. If the filter is writing, flushes any writes. + @param next A pointer to the filter to terminate. + @param prev [out] A buffer in which to return a pointer to the + previous linked filter, which contains any data written + before termination. + */ + AIAPI AIErr (*UnlinkDataFilter) ( AIDataFilter *next, AIDataFilter **prev ); + + /** Reads data from the filter's source stream. + @param filter A pointer to the filter. + @param store [out] A buffer in which to return the data. + @param count [in, out] A pointer to the maximum number of bytes to read. + Returns the number of bytes actually read, 0 if the stream + is exhausted. + */ + AIAPI AIErr (*ReadDataFilter) ( AIDataFilter *filter, char *store, size_t *count ); + + /** Writes data to the filter's destination stream. + @param filter A pointer to the filter. + @param store A buffer containing the data. + @param count A pointer to the number of bytes in \c store. + */ + AIAPI AIErr (*WriteDataFilter) ( AIDataFilter *filter, const char *store, size_t *count ); + + /** Seeks to a position in a filter's stream, as returned by \c #MarkDataFilter(). + Not all data filters support random access. + @param filter A pointer to the filter. + @param count A pointer to the new position, an offset into the stream. + */ + AIAPI AIErr (*SeekDataFilter) ( AIDataFilter *filter, ai::sizediff_t *count ); + + /** Reports the current position in a filter's stream. + @param filter A pointer to the filter. + @param count [out] A buffer in which to return the position, an offset + into the stream. + */ + AIAPI AIErr (*MarkDataFilter) ( AIDataFilter *filter, ai::sizediff_t *count ); + + /** Creates a new file data filter that reads to or writes from a file. + @param spec The file associated with the filter. + @param mode How the filter is used, one of \c "read", \c "write", + or \c "append". + @param creator The file creator (for Mac OS) + @param type The file type (for Mac OS) + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewFileDataFilter) ( const ai::FilePath &spec, const char *mode, size_t creator, ai::int32 type, AIDataFilter **filter ); + + /** Creates a new buffer data filter that reads from or writes to a + linked filter, buffering data into chunks of a specified size. + @param size The number of bytes to read or write at a time. + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewBufferDataFilter) ( size_t size, AIDataFilter **filter ); + + /** Creates a new ASCIIHEX data filter that encodes or decodes data from a linked + filter using ASCII Hex. That is, it uses the characters 0-9 and A-F to represent + hexadecimal numbers. The resulting sequence of characters is broken up + into lines by inserting line break characters as needed. Each line can + additionally be preceded by a number of tab characters. + @param state Whether the filter is encoding or decoding, one of: + \li \c "write" (encoding) + \li \c "read" (decoding) + + @param shift The number of tab characters to insert before each line. + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewHexdecDataFilter) ( const char *state, ai::int32 shift, AIDataFilter **filter ); + + /** Creates a new block data filter that reads from and writes to + a specified block of memory. + @param address The address of the block. + @param size The number of bytes in the block. + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewBlockDataFilter) ( void *address, size_t size, AIDataFilter **filter ); + + /** Creates a new random access data filter that reads from and writes to + Illustrator's virtual memory. Use to create a temporary file that is + paged to and from memory as needed. + @param initialsize The end of the initial stream, a number of bytes. + If \c NULL, the initial stream is empty. + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewVMDataFilter) (size_t initialsize, AIDataFilter **filter ); + + /** Creates a new ASCII85 data filter that encodes or decodes data from + a linked filter. The resulting sequence of characters is broken up + into lines by inserting line break characters as needed. Each line can + additionally be preceded by a prefix string. + @param statestr Whether the filter is encoding or decoding, one of: + \li \c "write" (encoding) + \li \c "read" (decoding) + + @param prefix The string to insert at the start of each line. + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewA85DataFilter) ( const char *statestr, const char* prefix, AIDataFilter **filter ); + + /** Creates a new ZLib data filter that compresses or decompresses data from a linked filter. + @param statestr Whether the filter is compressing or decompressing, one of: + \li \c "write" (compressing) + \li \c "read" (decompressing) + + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewZDataFilter) ( const char *statestr, AIDataFilter **filter ); + + /** Creates a new Zstandard data filter that compresses or decompresses data from a linked filter. + @param statestr Whether the filter is compressing or decompressing, one of: + \li \c "write" (compressing) + \li \c "read" (decompressing) + + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewZStdDataFilter) ( const char *statestr, AIDataFilter **filter ); + + /** Creates a new data filter for a stream with specified methods. + It is typically at one end of a filter chain, to act as a data source or + sink. + @param stream The stream, which you have initialized with + a set of data-handling procedures. + @param filter [out] A buffer in which to return the new filter reference, . + */ + AIAPI AIErr (*NewPluginStream) ( AIPluginStream* stream, AIDataFilter **filter ); + + /** Creates a data filter for streaming data from a plug-in resource. + Searches for a resource of a given type in the plug-in's resource file. + Identify the specific resource using either a numeric ID or name string. + The type, ID, and name are defined by the plug-in that owns the resource + @param plugin The plug-in object for the plug-in that owns the resource. + @param type The resource type constant, a 4-byte value. + @param id The unique resource identifier. + @param name The resource name. + @param filter [out] A buffer in which to return the new filter reference, . + */ + AIAPI AIErr (*NewResourceDataFilter) ( SPPluginRef plugin, ai::int32 type, ai::int32 id, const char *name, AIDataFilter **filter); + + /** Creates a new Asnyc data filter that Takes a AIDataFilter *asyncFilter and runs it on Background thread. + execution of asyncFilter should be possible on a background thread + @param [in] asyncFilter the filters that will be running on a background thread.This filter should not be linked to any other filter. + asyncFilter's ownership will be with the filter returned by this API + @param statestr [in] Whether the filter is compressing or decompressing, one of: + \li \c "write" (compressing) [Not Supported for this version] + \li \c "read" (decompressing) + + @param prefetchSize [in] size of a buffer typically fetched from the next filter(next of the filter returned by this API). + @param outputSize [in] size of a buffer typically asked from this filter. + @param filter [out] A buffer in which to return the new filter reference. + */ + AIAPI AIErr (*NewAsyncDataFilter) (const char *statestr, AIDataFilter *asyncFilter, const ai::uint32 prefetchSize, const ai::uint32 outputSize, AIDataFilter **filter); +}; + + +#include "AIHeaderEnd.h" + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDeviceInfo.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDeviceInfo.h index d797d5f..ab2880d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDeviceInfo.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDeviceInfo.h @@ -1,80 +1,80 @@ -#ifndef __AIDeviceInfo__ -#define __AIDeviceInfo__ - -/******************************************************************************** -* ADOBE SYSTEMS INCORPORATED -* Copyright 2015 Adobe Systems Incorporated -* All Rights Reserved. - -* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the -* terms of the Adobe license agreement accompanying it. If you have received this file from a -* source other than Adobe, then your use, modification, or distribution of it requires the prior -* written permission of Adobe. -* -* -* Author: Vivek Agrawal -* Created: 09/10/2015 -* Purpose: Adobe Illustrator Device Info Suite -**************************************************************************/ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIDeviceInfo.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIDeviceInfoSuite "AI DeviceInfo Suite" -#define kAIDeviceInfoSuiteVersion1 AIAPI_VERSION(1) -#define kAIDeviceInfoSuiteVersion kAIDeviceInfoSuiteVersion1 -#define kAIDeviceInfoVersion kAIDeviceInfoSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions that allow you to access various informations about the - device on which illustrator is running or the device which is being connected for - using illustrator through it. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDeviceInfoSuite and \c #kAIDeviceInfoVersion. - */ -struct AIDeviceInfoSuite { - - /* - function: To be used to check whether a tablet is connected or not. This only works for Wacom tablets. - @param: - @out out: An AIBoolean reference in which to return the status whether a tablet is connected or not. - */ - AIAPI AIErr(*IsTabletConnected) (AIBoolean& out); - -}; - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIDeviceInfo__ +#define __AIDeviceInfo__ + +/******************************************************************************** +* ADOBE SYSTEMS INCORPORATED +* Copyright 2015 Adobe Systems Incorporated +* All Rights Reserved. + +* NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the +* terms of the Adobe license agreement accompanying it. If you have received this file from a +* source other than Adobe, then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +* +* Author: Vivek Agrawal +* Created: 09/10/2015 +* Purpose: Adobe Illustrator Device Info Suite +**************************************************************************/ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIDeviceInfo.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIDeviceInfoSuite "AI DeviceInfo Suite" +#define kAIDeviceInfoSuiteVersion1 AIAPI_VERSION(1) +#define kAIDeviceInfoSuiteVersion kAIDeviceInfoSuiteVersion1 +#define kAIDeviceInfoVersion kAIDeviceInfoSuiteVersion + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides functions that allow you to access various informations about the + device on which illustrator is running or the device which is being connected for + using illustrator through it. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIDeviceInfoSuite and \c #kAIDeviceInfoVersion. + */ +struct AIDeviceInfoSuite { + + /* + function: To be used to check whether a tablet is connected or not. This only works for Wacom tablets. + @param: + @out out: An AIBoolean reference in which to return the status whether a tablet is connected or not. + */ + AIAPI AIErr(*IsTabletConnected) (AIBoolean& out); + +}; + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDictionary.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDictionary.h index 7e491f9..f905179 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDictionary.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDictionary.h @@ -1,545 +1,573 @@ -#ifndef __AIDict__ -#define __AIDict__ - -/* - * Name: AIDictionary.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Dictionary Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1999-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIEntry__ -#include "AIEntry.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIDictionary.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIDictionarySuite "AI Dictionary Suite" -#define kAIDictionarySuiteVersion8 AIAPI_VERSION(8) -#define kAIDictionarySuiteVersion kAIDictionarySuiteVersion8 -#define kAIDictionaryVersion kAIDictionarySuiteVersion - -#define kAIDictionaryIteratorSuite "AI Dictionary Iterator Suite" -#define kAIDictionaryIteratorSuiteVersion3 AIAPI_VERSION(3) -#define kAIDictionaryIteratorSuiteVersion kAIDictionaryIteratorSuiteVersion3 -#define kAIDictionaryIteratorVersion kAIDictionaryIteratorSuiteVersion - - -/** @ingroup Errors */ -#define kNoSuchKey 'NOKY' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** A key that identifies a dictionary entry. */ -typedef const struct _t_AIDictKey *AIDictKey; - - -/** An iterator that allows you to enumerate the contents of a dictionary. See - the \c #AIDictionaryIteratorSuite for iteration functions. */ -typedef struct _AIDictionaryIterator* AIDictionaryIterator; - - -/** The data for the dictionary key-changed notifier. (Not currently sent). */ -typedef struct _AIDictionaryKeyChangedNotifyData { - /** Current notification sequence timestamp */ - ai::int32 refStamp; - /** The dictionary that changed */ - AIDictionaryRef dictionary; - /** The key whose value changed */ - AIDictKey key; -} AIDictionaryKeyChangedNotifyData; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides function to create and manage Illustrator data dictionaries. - A dictionary is a heterogeneous container whose elements, called \e entries, - are accessed by \e keys. - - Entries are of type \c #AIEntryRef. The \c #AIEntrySuite provides methods - to construct and query entries of different types. Entries can contain - values of various data types; simple types such as booleans, integers, floats, - and strings; and complex types such as arrays, other dictionaries, and - references to document objects including art objects, - brushes and styles. This makes dictionaries very flexible and - powerful containers. - - Dictionaries can themselves be stored in other containers such as arrays - or other dictionaries. In particular they can be stored in the dictionaries - attached to art objects and to the document. When a dictionary is stored in - one of these places (directly or indirectly) it is read and written as - a part of the document. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDictionarySuite and \c #kAIDictionaryVersion. - */ -struct AIDictionarySuite { - - /** Creates a new dictionary. Dictionaries are reference counted; - the initial reference count is 1. - @param dictionary [out] A buffer in which to return the new dictionary reference. - @see \c #AddRef(), \c #Release() - */ - AIAPI AIErr (*CreateDictionary) ( AIDictionaryRef* dictionary ); - - - /** Increments the reference count of a dictionary. - @param dictionary The dictionary reference. - */ - AIAPI ai::int32 (*AddRef) ( AIDictionaryRef dictionary ); - - /** Frees the memory associated with a dictionary - when it is no longer needed (the reference count is 0). - @param dictionary The dictionary reference. Upon return, the reference is - no longer valid. - */ - AIAPI ai::int32 (*Release) ( AIDictionaryRef dictionary ); - - /** Creates a new dictionary that is an exact duplicate of an existing dictionary. - Performs a deep copy. - @param src The dictionary to copy. - @param dst [out] A buffer in which to return the new dictionary reference. - */ - AIAPI AIErr (*Clone) ( ConstAIDictionaryRef src, AIDictionaryRef* dst ); - - /** Makes a copy of a dictionary, replacing the current contents of an existing dictionary. - @param dict The dictionary into which to copy contents. - @param src The dictionary to copy. - */ - AIAPI AIErr (*Copy) ( AIDictionaryRef dict, ConstAIDictionaryRef src ); - - /** Gets the number of entries in a dictionary. (Note that this function returns - a numeric value, not an error code.) - @param dict The dictionary. - @return The number of entries. - */ - AIAPI ai::uint32 (*Size) ( ConstAIDictionaryRef dict ); - - /** Creates a new iterator object for visiting dictionary entries. Iterators are - reference counted. - @param dict The dictionary. - @param iterator [out] A buffer in which to return the iterator object. - @see \c #AIDictionaryIteratorSuite::AddRef(), \c #AIDictionaryIteratorSuite::Release() - */ - AIAPI AIErr (*Begin) ( ConstAIDictionaryRef dict, AIDictionaryIterator* iterator ); - - /** Finds a dictionary key, or creates a new one if the specified key does not - exist. (Note that this function returns a key object, not an error code.) - @param key The name of the key. - @return The key object. - */ - AIAPI AIDictKey (*Key) ( const char* keyString ); - - /** Retrieves the name string of a key. (Note that this function returns a string value, - not an error code.) - @param key The key object. - @return The key name. - */ - AIAPI const char* (*GetKeyString) ( AIDictKey key ); - - /** Reports whether there is an entry with a given key in a dictionary. - (Note that this function returns a boolean value, not an error code.) - @param dict The dictionary. - @param key The key object. - */ - AIAPI AIBoolean (*IsKnown) ( ConstAIDictionaryRef dictionary, AIDictKey key ); - - /** Removes the entry with a given key from a dictionary. - @param dict The dictionary. - @param key The key object. - */ - AIAPI AIErr (*DeleteEntry) ( AIDictionaryRef dictionary, AIDictKey key ); - - /** Retrieves the data type of an entry. - @param dict The dictionary. - @param key The key object. - @param entryType [out] A buffer in which to return the entry type. - @see \c #AIEntrySuite - */ - AIAPI AIErr (*GetEntryType) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIEntryType* entryType ); - - - /** Copies an entry from one dictionary to another, or to another key in the same - dictionary. - @param dictionary1 The source dictionary. - @param dictionary2 The destination dictionary. - @param key1 The key for the entry to copy. - @param key2 The key for the new entry. - */ - AIAPI AIErr (*CopyEntry) ( ConstAIDictionaryRef dictionary1, AIDictionaryRef dictionary2, - AIDictKey key1, AIDictKey key2 ); - - /** Moves an entry from one dictionary to another (or to another key in the same - dictionary), removing the source entry. - @param dictionary1 The source dictionary. - @param dictionary2 The destination dictionary. - @param key1 The key for the entry to copy and remove. - @param key2 The key for the new entry. - */ - AIAPI AIErr (*MoveEntry) ( AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, - AIDictKey key1, AIDictKey key2 ); - - /** Swaps two entries in two dictionaries, or in the same dictionary. - @param dictionary1 The source dictionary. - @param dictionary2 The destination dictionary. - @param key1 The first key (in \c dictionary1, moved to \c dictionary2). - @param key2 The second key (in \c dictionary2, moved to \c dictionary1). - - */ - AIAPI AIErr (*SwapEntries) ( AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, - AIDictKey key1, AIDictKey key2 ); - - - /** Retrieves an art object from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param art [out] A buffer in which to return the art object. - */ - AIAPI AIErr (*GetArtEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIArtHandle* art ); - - /** Creates an entry which is a new art object of a specified type. - @param dictionary The dictionary. - @param key The entry key. - @param art The art type, an \c #AIArtType value. - */ - AIAPI AIErr (*NewArtEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::int16 type ); - - - /** Moves an art object from the artwork tree into a dictionary, removing it from - the artwork tree. - @param dictionary The dictionary. - @param key The entry key. - @param art The art object. - */ - AIAPI AIErr (*MoveArtToEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art ); - - /** Moves an art object from a dictionary into the artwork tree, removing the entry from - the dictionary. - @param dictionary The dictionary. - @param key The entry key. - @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, - or a compound path or group that might contain this path. - @param art [out] A buffer in which to return a pointer to the art object. - @see \c #AIArtSuite - */ - AIAPI AIErr (*MoveEntryToArt) ( AIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, - AIArtHandle prep, AIArtHandle* art ); - - - /** Copies an art object from the artwork tree into a dictionary. - @param dictionary The dictionary. - @param key The entry key. - @param art The art object. - */ - AIAPI AIErr (*CopyArtToEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art ); - - /** Copies an art object from a dictionary into the artwork tree. - @param dictionary The dictionary. - @param key The entry key. - @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, - or a compound path or group that might contain this path. - @param art [out] A buffer in which to return a pointer to the art object. - @see \c #AIArtSuite - */ - AIAPI AIErr (*CopyEntryToArt) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, - AIArtHandle prep, AIArtHandle* art ); - - /** Sets an entry in a dictionary to refer to the topmost group of a layer. - @param dictionary The dictionary. - @param key The entry key. - @param layer The layer. - */ - AIAPI AIErr (*SetEntryToLayer) ( AIDictionaryRef dictionary, AIDictKey key, AILayerHandle layer ); - - /** Inserts a new layer in the current document, whose topmost group is the group referenced by - a dictionary entry. - @param dictionary The dictionary. - @param key The entry key, which must reference an art object that is a group. - @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - Valid values are \c #kPlaceDefault, \c #kPlaceAbove, \c #kPlaceBelow, \c #kPlaceAboveAll and \c #kPlaceBelowAll. - @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, - or a compound path or group that might contain this path. - @param art [out] A buffer in which to return the layer object. - @see \c #AIArtSuite, \c #AILayerSuite - */ - AIAPI AIErr (*SetLayerToEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, - AILayerHandle prep, AILayerHandle *layer ); - - /** Retrieves a dictionary entry. - (Note that this function returns an entry object, not an error code.) - @param dictionary The dictionary. - @param key The entry key. - @return The entry object or a nil entry if an entry with the given key does not exist.. - */ - AIAPI AIEntryRef (*Get) ( ConstAIDictionaryRef dictionary, AIDictKey key ); - - /** Sets a dictionary entry. Entries whose keys are prefixed with - the character '-' are temporary, and are not saved to file. - @param dictionary The dictionary. - @param key The entry key. - @param entry The entry object. - */ - AIAPI AIErr (*Set) ( AIDictionaryRef dictionary, AIDictKey key, AIEntryRef entry ); - - - // the following are convenience APIs for getting and setting entries of the basic types - /** Retrieves a boolean value from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetBooleanEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIBoolean* value ); - - /** Sets a boolean value for a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value The new value. - */ - AIAPI AIErr (*SetBooleanEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIBoolean value ); - - /** Retrieves an integer value from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetIntegerEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int32* value ); - - /** Sets an integer value for a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value The new value. - */ - AIAPI AIErr (*SetIntegerEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::int32 value ); - - /** Retrieves a pointer value from a dictionary entry (pointers may be 64-bit or 32-bit depending on platform). - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetPointerEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::intptr* value ); - - /** Sets a pointer value for a temporary dictionary entry. If the key is not temporary i.e. does not begin with "-", it returns kBadParameterErr - @param dictionary The dictionary. - @param key The entry key. - @param value The new value. - */ - AIAPI AIErr (*SetPointerEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::intptr value ); - - /** Retrieves a real-number value from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRealEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIReal* value ); - - /** Sets a real-number value for a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value The new value. - */ - AIAPI AIErr (*SetRealEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIReal value ); - - /** Retrieves a string value from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetStringEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, const char** value ); - - /** Sets a string value for a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value The new value. - */ - AIAPI AIErr (*SetStringEntry) ( AIDictionaryRef dictionary, AIDictKey key, const char* value ); - - /** Retrieves a binary value from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - @param size [out] A buffer in which to return the number of bytes in the \c value buffer. - */ - AIAPI AIErr (*GetBinaryEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, void* value, size_t* size ); - - /** Sets a binary value for a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value The pointer to the buffer containing the new value. - @param size The number of bytes in the \c value buffer. - */ - AIAPI AIErr (*SetBinaryEntry) ( AIDictionaryRef dictionary, AIDictKey key, void* value, size_t size ); - - /** Retrieves a dictionary value from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDictEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef* value ); - - /** Sets a dictionary value for a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value The new value. - */ - AIAPI AIErr (*SetDictEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef value ); - - /** Retrieves an array value from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetArrayEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIArrayRef* value ); - - /** Sets an array value for a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value The new value. - */ - AIAPI AIErr (*SetArrayEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArrayRef value ); - - /** Retrieves a Unicode string value from a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetUnicodeStringEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::UnicodeString& value ); - - /** Sets a Unicode string value for a dictionary entry. - @param dictionary The dictionary. - @param key The entry key. - @param value The new value. - */ - AIAPI AIErr (*SetUnicodeStringEntry) ( AIDictionaryRef dictionary, AIDictKey key, const ai::UnicodeString& value ); - - /** Marks art as changed when a change has been made to the dictionary that affects - a user-visible property of any associated art object. This causes any styles or plug-in groups - containing the affected object to execute. - @param dictionary The dictionary. - */ - AIAPI AIErr (*TouchArt) ( ConstAIDictionaryRef dictionary ); - -}; - - -/** Use these functions to iterate through the contents of a dictionary. - Obtain the iterator object with \c #AIDictionarySuite::Begin(), and - get the number of entries with \c #AIDictionarySuite::Size(). - - Iterators are reference counted. The initial count is 1. -*/ -struct AIDictionaryIteratorSuite { - - /** Increments the reference count of an iterator. - @param iterator The iterator object. - */ - AIAPI ai::int32 (*AddRef) ( AIDictionaryIterator iterator ); - - /** Frees the memory associated with an iterator when it is no - longer used (the reference count is 0). - @param iterator The iterator object. Upon return, this - reference is no longer valid. - */ - AIAPI ai::int32 (*Release) ( AIDictionaryIterator iterator ); - - /** Reports whether an iterator is valid. (Not yet implemented) - @param iterator The iterator object. - @return True if the iterator is valid, false if the dictionary has - changed due to insertion or deletion of elements since the - iterator was constructed. */ - AIAPI AIBoolean (*IsValid) ( AIDictionaryIterator iterator ); - - /** Makes an iterator refer to the same dictionary entry as another iterator. - @param iterator The iterator object. - @param from Another iterator object, whose current entry reference is copied. - */ - AIAPI AIErr (*Copy) ( AIDictionaryIterator iterator, AIDictionaryIterator from ); - - /** Creates a new iterator which is a copy of another iterator. - @param iterator The iterator object to copy. - @param clone [out] A buffer in which to return the new iterator object. - */ - AIAPI AIErr (*Clone) ( AIDictionaryIterator iterator, AIDictionaryIterator* clone ); - - /** Reports whether two iterators refer to the same entry of the same dictionary. - (Note that this function returns a boolean value, not an error code.) - @param iterator1 The first iterator. - @param iterator2 The second iterator. - @return True if both iterators refer to the same entry of the same dictionary. - */ - AIAPI AIBoolean (*IsEqual) ( AIDictionaryIterator iterator1, AIDictionaryIterator iterator2 ); - - /** Reports whether an iterator has exhausted all dictionary entries. - (Note that this function returns a boolean value, not an error code.) - @param iterator The iterator object. - @return True if the iteration has reached the end. - */ - AIAPI AIBoolean (*AtEnd) ( AIDictionaryIterator iterator ); - - /** Advance an iterator's current-entry reference to the next entry. - (Note that this function does not return an error code. Use \c #AtEnd() - to determine if the iterator has exhausted all entries.) - @param iterator The iterator object. - */ - AIAPI void (*Next) ( AIDictionaryIterator iterator ); - - /** Back up an iterator's current-entry reference to the previous entry. - (Note that this function does not return an error code. Calling it - on the first entry has undefined results.) - @param iterator The iterator object. - */ - AIAPI void (*Prev) ( AIDictionaryIterator iterator ); - - /** Retrieves the key of an iterator's current entry. - (Note that this function returns a key object, not an error code.) - @param iterator The iterator object. - @return The key object. - */ - AIAPI AIDictKey (*GetKey) ( AIDictionaryIterator iterator ); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIDict__ +#define __AIDict__ + +/* + * Name: AIDictionary.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator Dictionary Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1999-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIEntry__ +#include "AIEntry.h" +#endif + + +#include "IAIFilePath.hpp" + +#include "AIHeaderBegin.h" + +/** @file AIDictionary.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIDictionarySuite "AI Dictionary Suite" +#define kAIDictionarySuiteVersion10 AIAPI_VERSION(10) +#define kAIDictionarySuiteVersion kAIDictionarySuiteVersion10 +#define kAIDictionaryVersion kAIDictionarySuiteVersion + +#define kAIDictionaryIteratorSuite "AI Dictionary Iterator Suite" +#define kAIDictionaryIteratorSuiteVersion5 AIAPI_VERSION(5) +#define kAIDictionaryIteratorSuiteVersion kAIDictionaryIteratorSuiteVersion5 +#define kAIDictionaryIteratorVersion kAIDictionaryIteratorSuiteVersion + + +/** @ingroup Errors */ +#define kNoSuchKey 'NOKY' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** A key that identifies a dictionary entry. */ +typedef const struct _t_AIDictKey *AIDictKey; + + +/** An iterator that allows you to enumerate the contents of a dictionary. See + the \c #AIDictionaryIteratorSuite for iteration functions. */ +typedef struct _AIDictionaryIterator* AIDictionaryIterator; + + +/** The data for the dictionary key-changed notifier. (Not currently sent). */ +typedef struct _AIDictionaryKeyChangedNotifyData { + /** Current notification sequence timestamp */ + ai::int32 refStamp; + /** The dictionary that changed */ + AIDictionaryRef dictionary; + /** The key whose value changed */ + AIDictKey key; +} AIDictionaryKeyChangedNotifyData; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides function to create and manage Illustrator data dictionaries. + A dictionary is a heterogeneous container whose elements, called \e entries, + are accessed by \e keys. + + Entries are of type \c #AIEntryRef. The \c #AIEntrySuite provides methods + to construct and query entries of different types. Entries can contain + values of various data types; simple types such as booleans, integers, floats, + and strings; and complex types such as arrays, other dictionaries, and + references to document objects including art objects, + brushes and styles. This makes dictionaries very flexible and + powerful containers. + + Dictionaries can themselves be stored in other containers such as arrays + or other dictionaries. In particular they can be stored in the dictionaries + attached to art objects and to the document. When a dictionary is stored in + one of these places (directly or indirectly) it is read and written as + a part of the document. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIDictionarySuite and \c #kAIDictionaryVersion. + */ +struct AIDictionarySuite { + + /** Creates a new dictionary. Dictionaries are reference counted; + the initial reference count is 1. + @param dictionary [out] A buffer in which to return the new dictionary reference. + @see \c #AddRef(), \c #Release() + */ + AIAPI AIErr (*CreateDictionary) ( AIDictionaryRef* dictionary ); + + /** Opens a JSON file from the provided path and parses it to a newly created dictionary. + The JSON file must have an object as top-level element. + Dictionaries are reference counted; + the initial reference count is 1. + @param dictionary [out] A buffer in which to return the new dictionary reference. + @param file The path to the JSON file + @see \c #AddRef(), \c #Release() + */ + AIAPI AIErr (*CreateDictionaryFromJSONFile) ( AIDictionaryRef* dictionary, const ai::FilePath &file ); + + /** Increments the reference count of a dictionary. + @param dictionary The dictionary reference. + */ + AIAPI ai::int32 (*AddRef) ( AIDictionaryRef dictionary ); + + /** Frees the memory associated with a dictionary + when it is no longer needed (the reference count is 0). + @param dictionary The dictionary reference. Upon return, the reference is + no longer valid. + */ + AIAPI ai::int32 (*Release) ( AIDictionaryRef dictionary ); + + /** Creates a new dictionary that is an exact duplicate of an existing dictionary. + Performs a deep copy. + @param src The dictionary to copy. + @param dst [out] A buffer in which to return the new dictionary reference. + */ + AIAPI AIErr (*Clone) ( ConstAIDictionaryRef src, AIDictionaryRef* dst ); + + /** Makes a copy of a dictionary, replacing the current contents of an existing dictionary. + @param dict The dictionary into which to copy contents. + @param src The dictionary to copy. + */ + AIAPI AIErr (*Copy) ( AIDictionaryRef dict, ConstAIDictionaryRef src ); + + /** Gets the number of entries in a dictionary. (Note that this function returns + a numeric value, not an error code.) + @param dict The dictionary. + @return The number of entries. + */ + AIAPI ai::uint32 (*Size) ( ConstAIDictionaryRef dict ); + + /** Creates a new iterator object for visiting dictionary entries. Iterators are + reference counted. + @param dict The dictionary. + @param iterator [out] A buffer in which to return the iterator object. + @see \c #AIDictionaryIteratorSuite::AddRef(), \c #AIDictionaryIteratorSuite::Release() + */ + AIAPI AIErr (*Begin) ( ConstAIDictionaryRef dict, AIDictionaryIterator* iterator ); + + /** Finds a dictionary key, or creates a new one if the specified key does not + exist. (Note that this function returns a key object, not an error code.) + @param key The name of the key. + @return The key object. + */ + AIAPI AIDictKey (*Key) ( const char* keyString ); + + /** Retrieves the name string of a key. (Note that this function returns a string value, + not an error code.) + @param key The key object. + @return The key name. + */ + AIAPI const char* (*GetKeyString) ( AIDictKey key ); + + /** Reports whether there is an entry with a given key in a dictionary. + (Note that this function returns a boolean value, not an error code.) + @param dict The dictionary. + @param key The key object. + */ + AIAPI AIBoolean (*IsKnown) ( ConstAIDictionaryRef dictionary, AIDictKey key ); + + /** Removes the entry with a given key from a dictionary. + @param dict The dictionary. + @param key The key object. + */ + AIAPI AIErr (*DeleteEntry) ( AIDictionaryRef dictionary, AIDictKey key ); + + /** Retrieves the data type of an entry. + @param dict The dictionary. + @param key The key object. + @param entryType [out] A buffer in which to return the entry type. + @see \c #AIEntrySuite + */ + AIAPI AIErr (*GetEntryType) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIEntryType* entryType ); + + + /** Copies an entry from one dictionary to another, or to another key in the same + dictionary. + @param dictionary1 The source dictionary. + @param dictionary2 The destination dictionary. + @param key1 The key for the entry to copy. + @param key2 The key for the new entry. + */ + AIAPI AIErr (*CopyEntry) ( ConstAIDictionaryRef dictionary1, AIDictionaryRef dictionary2, + AIDictKey key1, AIDictKey key2 ); + + /** Moves an entry from one dictionary to another (or to another key in the same + dictionary), removing the source entry. + @param dictionary1 The source dictionary. + @param dictionary2 The destination dictionary. + @param key1 The key for the entry to copy and remove. + @param key2 The key for the new entry. + */ + AIAPI AIErr (*MoveEntry) ( AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, + AIDictKey key1, AIDictKey key2 ); + + /** Swaps two entries in two dictionaries, or in the same dictionary. + @param dictionary1 The source dictionary. + @param dictionary2 The destination dictionary. + @param key1 The first key (in \c dictionary1, moved to \c dictionary2). + @param key2 The second key (in \c dictionary2, moved to \c dictionary1). + + */ + AIAPI AIErr (*SwapEntries) ( AIDictionaryRef dictionary1, AIDictionaryRef dictionary2, + AIDictKey key1, AIDictKey key2 ); + + + /** Retrieves an art object from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param art [out] A buffer in which to return the art object. + */ + AIAPI AIErr (*GetArtEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIArtHandle* art ); + + /** Creates an entry which is a new art object of a specified type. + @param dictionary The dictionary. + @param key The entry key. + @param art The art type, an \c #AIArtType value. + */ + AIAPI AIErr (*NewArtEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::int16 type ); + + + /** Moves an art object from the artwork tree into a dictionary, removing it from + the artwork tree. + @param dictionary The dictionary. + @param key The entry key. + @param art The art object. + */ + AIAPI AIErr (*MoveArtToEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art ); + + /** Moves an art object from a dictionary into the artwork tree, removing the entry from + the dictionary. + @param dictionary The dictionary. + @param key The entry key. + @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, + or a compound path or group that might contain this path. + @param art [out] A buffer in which to return a pointer to the art object. + @see \c #AIArtSuite + */ + AIAPI AIErr (*MoveEntryToArt) ( AIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, + AIArtHandle prep, AIArtHandle* art ); + + + /** Copies an art object from the artwork tree into a dictionary. + @param dictionary The dictionary. + @param key The entry key. + @param art The art object. + */ + AIAPI AIErr (*CopyArtToEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArtHandle art ); + + /** Copies an art object from a dictionary into the artwork tree. + @param dictionary The dictionary. + @param key The entry key. + @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, + or a compound path or group that might contain this path. + @param art [out] A buffer in which to return a pointer to the art object. + @see \c #AIArtSuite + */ + AIAPI AIErr (*CopyEntryToArt) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, + AIArtHandle prep, AIArtHandle* art ); + + /** Sets an entry in a dictionary to refer to the topmost group of a layer. + @param dictionary The dictionary. + @param key The entry key. + @param layer The layer. + */ + AIAPI AIErr (*SetEntryToLayer) ( AIDictionaryRef dictionary, AIDictKey key, AILayerHandle layer ); + + /** Inserts a new layer in the current document, whose topmost group is the group referenced by + a dictionary entry. + @param dictionary The dictionary. + @param key The entry key, which must reference an art object that is a group. + @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. + Valid values are \c #kPlaceDefault, \c #kPlaceAbove, \c #kPlaceBelow, \c #kPlaceAboveAll and \c #kPlaceBelowAll. + @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, + or a compound path or group that might contain this path. + @param art [out] A buffer in which to return the layer object. + @see \c #AIArtSuite, \c #AILayerSuite + */ + AIAPI AIErr (*SetLayerToEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int16 paintOrder, + AILayerHandle prep, AILayerHandle *layer ); + + /** Retrieves a dictionary entry. + (Note that this function returns an entry object, not an error code.) + @param dictionary The dictionary. + @param key The entry key. + @return The entry object or a null entry if an entry with the given key does not exist.. + */ + AIAPI AIEntryRef (*Get) ( ConstAIDictionaryRef dictionary, AIDictKey key ); + + /** Sets a dictionary entry. Entries whose keys are prefixed with + the character '-' are temporary, and are not saved to file. + @param dictionary The dictionary. + @param key The entry key. + @param entry The entry object. + */ + AIAPI AIErr (*Set) ( AIDictionaryRef dictionary, AIDictKey key, AIEntryRef entry ); + + + // the following are convenience APIs for getting and setting entries of the basic types + /** Retrieves a boolean value from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetBooleanEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIBoolean* value ); + + /** Sets a boolean value for a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value The new value. + */ + AIAPI AIErr (*SetBooleanEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIBoolean value ); + + /** Retrieves an integer value from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetIntegerEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::int32* value ); + + /** Sets an integer value for a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value The new value. + */ + AIAPI AIErr (*SetIntegerEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::int32 value ); + + /** Retrieves a pointer value from a dictionary entry (pointers may be 64-bit or 32-bit depending on platform). + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetPointerEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::intptr* value ); + + /** Sets a pointer value for a temporary dictionary entry. If the key is not temporary i.e. does not begin with "-", it returns kBadParameterErr + @param dictionary The dictionary. + @param key The entry key. + @param value The new value. + */ + AIAPI AIErr (*SetPointerEntry) ( AIDictionaryRef dictionary, AIDictKey key, ai::intptr value ); + + /** Retrieves a real-number value from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRealEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIReal* value ); + + /** Sets a real-number value for a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value The new value. + */ + AIAPI AIErr (*SetRealEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIReal value ); + + /** Retrieves a string value from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetStringEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, const char** value ); + + /** Sets a string value for a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value The new value. + */ + AIAPI AIErr (*SetStringEntry) ( AIDictionaryRef dictionary, AIDictKey key, const char* value ); + + /** Retrieves a binary value from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + @param size [out] A buffer in which to return the number of bytes in the \c value buffer. + */ + AIAPI AIErr (*GetBinaryEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, void* value, size_t* size ); + + /** Sets a binary value for a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value The pointer to the buffer containing the new value. + @param size The number of bytes in the \c value buffer. + */ + AIAPI AIErr (*SetBinaryEntry) ( AIDictionaryRef dictionary, AIDictKey key, void* value, size_t size ); + + /** Retrieves a dictionary value from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetDictEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef* value ); + + /** Sets a dictionary value for a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value The new value. + */ + AIAPI AIErr (*SetDictEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIDictionaryRef value ); + + /** Retrieves an array value from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetArrayEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, AIArrayRef* value ); + + /** Sets an array value for a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value The new value. + */ + AIAPI AIErr (*SetArrayEntry) ( AIDictionaryRef dictionary, AIDictKey key, AIArrayRef value ); + + /** Retrieves a Unicode string value from a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetUnicodeStringEntry) ( ConstAIDictionaryRef dictionary, AIDictKey key, ai::UnicodeString& value ); + + /** Sets a Unicode string value for a dictionary entry. + @param dictionary The dictionary. + @param key The entry key. + @param value The new value. + */ + AIAPI AIErr (*SetUnicodeStringEntry) ( AIDictionaryRef dictionary, AIDictKey key, const ai::UnicodeString& value ); + + /** Marks art as changed when a change has been made to the dictionary that affects + a user-visible property of any associated art object. This causes any styles or plug-in groups + containing the affected object to execute. + @param dictionary The dictionary. + */ + AIAPI AIErr (*TouchArt) ( ConstAIDictionaryRef dictionary ); + + /** Creates a new iterator object for the matched key. Iterators are reference counted. + @param dict The dictionary. + @param key The key to find + @param iterator [out] A buffer in which to return the iterator object. + use AIDictionaryIteratorSuite::GetEntry to get value directly from iterator + returns kNoSuchKey if the key is not found. + @see \c #AIDictionaryIteratorSuite::AddRef(), \c #AIDictionaryIteratorSuite::Release() + */ + AIAPI AIErr(*Find) (ConstAIDictionaryRef dict, AIDictKey key, AIDictionaryIterator* iterator); + + +}; + + +/** Use these functions to iterate through the contents of a dictionary. + Obtain the iterator object with \c #AIDictionarySuite::Begin(), and + get the number of entries with \c #AIDictionarySuite::Size(). + + Iterators are reference counted. The initial count is 1. +*/ +struct AIDictionaryIteratorSuite { + + /** Increments the reference count of an iterator. + @param iterator The iterator object. + */ + AIAPI ai::int32 (*AddRef) ( AIDictionaryIterator iterator ); + + /** Frees the memory associated with an iterator when it is no + longer used (the reference count is 0). + @param iterator The iterator object. Upon return, this + reference is no longer valid. + */ + AIAPI ai::int32 (*Release) ( AIDictionaryIterator iterator ); + + /** Reports whether an iterator is valid. (Not yet implemented) + @param iterator The iterator object. + @return True if the iterator is valid, false if the dictionary has + changed due to insertion or deletion of elements since the + iterator was constructed. */ + AIAPI AIBoolean (*IsValid) ( AIDictionaryIterator iterator ); + + /** Makes an iterator refer to the same dictionary entry as another iterator. + @param iterator The iterator object. + @param from Another iterator object, whose current entry reference is copied. + */ + AIAPI AIErr (*Copy) ( AIDictionaryIterator iterator, AIDictionaryIterator from ); + + /** Creates a new iterator which is a copy of another iterator. + @param iterator The iterator object to copy. + @param clone [out] A buffer in which to return the new iterator object. + */ + AIAPI AIErr (*Clone) ( AIDictionaryIterator iterator, AIDictionaryIterator* clone ); + + /** Reports whether two iterators refer to the same entry of the same dictionary. + (Note that this function returns a boolean value, not an error code.) + @param iterator1 The first iterator. + @param iterator2 The second iterator. + @return True if both iterators refer to the same entry of the same dictionary. + */ + AIAPI AIBoolean (*IsEqual) ( AIDictionaryIterator iterator1, AIDictionaryIterator iterator2 ); + + /** Reports whether an iterator has exhausted all dictionary entries. + (Note that this function returns a boolean value, not an error code.) + @param iterator The iterator object. + @return True if the iteration has reached the end. + */ + AIAPI AIBoolean (*AtEnd) ( AIDictionaryIterator iterator ); + + /** Advance an iterator's current-entry reference to the next entry. + (Note that this function does not return an error code. Use \c #AtEnd() + to determine if the iterator has exhausted all entries.) + @param iterator The iterator object. + */ + AIAPI void (*Next) ( AIDictionaryIterator iterator ); + + /** Back up an iterator's current-entry reference to the previous entry. + (Note that this function does not return an error code. Calling it + on the first entry has undefined results.) + @param iterator The iterator object. + */ + AIAPI void (*Prev) ( AIDictionaryIterator iterator ); + + /** Retrieves the key of an iterator's current entry. + (Note that this function returns a key object, not an error code.) + @param iterator The iterator object. + @return The key object. + */ + AIAPI AIDictKey (*GetKey) ( AIDictionaryIterator iterator ); + + /** Retrieves a dictionary entry for the dictionary iterator + (Note that this function returns an entry object, not an error code.) + @param iterator The iterator object. + @return The entry object or a null entry if the iterator is at the end + */ + AIAPI AIEntryRef(*GetEntry) (AIDictionaryIterator iterator); +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDictionaryKeyHelper.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDictionaryKeyHelper.hpp new file mode 100644 index 0000000..40dbb30 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDictionaryKeyHelper.hpp @@ -0,0 +1,152 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AIDictionary.h" +#include +#include "AIAssert.hpp" + +/** + For frequent access to the dictionary using the AIDictionarySuite::Key() + method, generating a key every time can be costly as it results in a + search in the string pool. + + Thess set of macros are provided to avoid paying that cost for each access. + + How to use... + Rather than passing in a key like "AI9_Mask", declare the key in either a + header or a source file with: + DictionaryKeyDeclare(kMask, "AI9_Mask"); + + Then define the global variable in the source file with: + DictionaryKeyDefine(kMask); + + Alternatively, if the key is only required in a source file, declare and + define with: + DictionaryKeyDeclareAndDefine(kMask, "AI9_Mask"); + + In either of above cases, access AIDictKey by specifying the variable kMask. + + You can skip specifying a variable name (kMask above) and generated one + automatically by using a combination of: + InternalFromExternalKeyDeclare("AI9_Mask"); + and + InternalFromExternalKeyDefine("AI9_Mask"); + or the convenience macro: + InternalFromExternalKeyDeclareAndDefine("AI9_Mask"); + + In these cases AIDictKey can be accessed by variable name DictKey_AI9_Mask. + + You can specify an array of key strings to create an array of keys. + You need to specify array of key string (with or without name) as given in + the following code: + DictionaryKeyArrayDeclareAndDefine(kRounding, kRoundingStrArray); + or + InternalFromExternalKeyArrayDeclareAndDefine(kRoundingStrArray); + + In the second version, variable name generated is DictKey_kRoundingStrArray. + + kRoundingStrArray needs to be an array of key strings defined by any of the + following syntaxes: + const char* const kRoundingStrArray[]{"a", "b", "c"}; + or + constexpr std::array kRoundingStrArray{"a", "b", "c"}; + or + constexpr ai::LiteralString kRoundingStrArray[]{"a", "b", "c"}; + or + constexpr std::array kRoundingStrArray{"a", "b", "c"}; + + Individual keys are accessible by specifying the index using the [] operator + like the following: + kRounding[0] + or + DictKey_kRoundingStrArray[0] +*/ + + +#define DictionaryKeyDeclare(keyName, keyStr) \ +class DictionaryKey##keyName \ +{ \ +public: \ + inline const AIDictKey & GetAIDictKey() \ + { \ + if (fKey == nullptr) \ + { \ + fKey = sAIDictionary->Key(keyStr); \ + } \ + return fKey; \ + } \ + inline operator const AIDictKey & () { return GetAIDictKey(); } \ + DictionaryKey##keyName() {} \ + DictionaryKey##keyName(const DictionaryKey##keyName &) = delete; \ + DictionaryKey##keyName(DictionaryKey##keyName &&) = delete; \ + DictionaryKey##keyName & operator = (const DictionaryKey##keyName &) = delete; \ + DictionaryKey##keyName & operator = (DictionaryKey##keyName &&) = delete; \ +private: \ + AIDictKey fKey{}; \ +}; \ +extern class DictionaryKey##keyName keyName + + +#define DictionaryKeyDefine(keyName) \ +class DictionaryKey##keyName keyName + + +#define DictionaryKeyDeclareAndDefine(keyName, keyStr) \ +DictionaryKeyDeclare(keyName, keyStr); \ +DictionaryKeyDefine(keyName) + + +#define InternalFromExternalKeyDeclare(externalKeyName) \ +DictionaryKeyDeclare(DictKey_##externalKeyName, externalKeyName) + + +#define InternalFromExternalKeyDefine(externalKeyName) \ +DictionaryKeyDefine(DictKey_##externalKeyName) + + +#define InternalFromExternalKeyDeclareAndDefine(externalKeyName) \ +DictionaryKeyDeclareAndDefine(DictKey_##externalKeyName, externalKeyName) + + +#define DictionaryKeyArrayDeclareAndDefine(keyName, keyStrArrayName) \ +template < size_t N > class DictionaryKeyArray##keyName \ +{ \ +public: \ + inline const AIDictKey & operator [] (size_t index) \ + { \ + AIMsgAssert(index < fKeys.size(), "Index out of bounds when trying to access dictionary key!"); \ + auto& key(fKeys.at(index)); \ + if (key == nullptr) \ + { \ + key = sAIDictionary->Key(keyStrArrayName[index]); \ + } \ + return key; \ + } \ + DictionaryKeyArray##keyName() {} \ + DictionaryKeyArray##keyName(const DictionaryKeyArray##keyName &) = delete; \ + DictionaryKeyArray##keyName(DictionaryKeyArray##keyName &&) = delete; \ + DictionaryKeyArray##keyName & operator = (const DictionaryKeyArray##keyName &) = delete; \ + DictionaryKeyArray##keyName & operator = (DictionaryKeyArray##keyName &&) = delete; \ +private: \ + std::array < AIDictKey, N > fKeys{}; \ +}; \ +class DictionaryKeyArray##keyName < sizeof(keyStrArrayName) / sizeof(keyStrArrayName[0]) > keyName + + +#define InternalFromExternalKeyArrayDeclareAndDefine(externalKeyStrArrayName) \ +DictionaryKeyArrayDeclareAndDefine(DictKey_##externalKeyStrArrayName, externalKeyStrArrayName) diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocument.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocument.h index b1825ba..d7a5789 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocument.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocument.h @@ -1,865 +1,1069 @@ -#ifndef __AIDocument__ -#define __AIDocument__ - -/* - * Name: AIDocument.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Document Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#ifndef __AIFileFormat__ -#include "AIFileFormat.h" -#endif - -#ifndef __ATESuites__ -#include "ATETypesDef.h" -#endif - -#ifdef __cplusplus -using ATE::TextRangesRef; -using ATE::StoriesRef; -using ATE::StoryRef; -using ATE::DocumentTextResourcesRef; -#endif - -#include "AIHeaderBegin.h" - -/** @file AIDocument.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIDocumentSuite "AI Document Suite" -#define kAIDocumentSuiteVersion16 AIAPI_VERSION(16) - -// latest version -#define kAIDocumentSuiteVersion kAIDocumentSuiteVersion16 -#define kAIDocumentVersion kAIDocumentSuiteVersion - -/** @ingroup Notifiers - Sent when the contents of a document have changed. */ -#define kAIDocumentChangedNotifier "AI Document Changed Notifier" -/** @ingroup Notifiers - Sent right before the last document window of the artwork is about to be closed. */ -#define kAIDocumentAboutToCloseNotifier "AI Document About To Close Notifier" -/** @ingroup Notifiers - Sent when a document has been closed. */ -#define kAIDocumentClosedNotifier "AI Document Closed Notifier" -/** @ingroup Notifiers - Sent when a document has been opened. */ -#define kAIDocumentOpenedNotifier "AI Document Opened Notifier" -/** @ingroup Notifiers - Sent when a document has been saved. */ -#define kAIDocumentSavedNotifier "AI Document Saved Notifier" -/** @ingroup Notifiers - Sent when a new document has been created. */ -#define kAIDocumentNewNotifier "AI Document New Notifier" -/** @ingroup Notifiers - Sent when the color model for a document has changed. */ -#define kAIDocumentClrMdlChangedNotifier "AI Document Color Model Changed Notifier" -/** @ingroup Notifiers - Sent when document profiles have been changed. */ -#define kAIDocumentProfilesChangedNotifier "AI Document Profiles Changed Notifier" -/** @ingroup Notifiers - Sent whenever the spot color mode of a document has been changed. - The document is not necessarily an open document being edited by - a user. For example, swatch libraries are considered documents. */ -#define kAIDocumentSpotColorModeChangedNotifier "AI Document Spot Color Mode Changed Notifier" -/** @ingroup Notifiers - Sent when ruler unit has changed. */ -#define kAIDocumentRulerUnitChangedNotifier "AI Document Ruler Unit Changed Notifier" -/** @ingroup Notifiers - Sent just before the document is saved, along with the AI Version information - to allow any data conversion required for saving to legacy files. - For example, Unicode data must be converted to Platform encoding before saving to - AI versions less than version 12. */ -#define kAIDocumentWritePreprocessNotifier "AI Document Write Preprocess Notifier" -/** @ingroup Notifiers - Sent just after serializing a document to an Illustrator file format, and before the flattening - layer is removed (if the document was flattened). Allows plug-ins to clean up anything that - was done during preprocessing. */ -#define kAIDocumentWritePostprocessNotifier "AI Document Write Postprocess Notifier" -/** @ingroup Notifiers - Sent when a crop area has been modified, deleted, or created. */ -#define kAIDocumentCropAreaModifiedNotifier "AI Document Crop Area Modified Notifier" -/** @ingroup Notifiers - Sent when the document ruler origin has been changed or reset. See \c #AIDocumentSuite. */ -#define kAIDocumentRulerOriginChangedNotifier "AI Document Ruler Origin Changed Notifier" -/** @ingroup Notifiers -Sent when the document bleed values have been changed. See \c #AIDocumentSuite. */ -#define kAIDocumentBleedsChangedNotifier "AI Document Bleed Value Changed Notifier" -/** @ingroup Notifiers -Sent when the transparency grid is toggled.*/ -#define kAIDocumentTransparencyGridNotifier "AI Document Transparency Grid Notifier" - -/** Ruler unit values, see \c #AIDocumentSuite::GetDocumentRulerUnits() */ -enum AIDocumentRulerUnitValue { - kUnknownUnits = 0, - /** inches */ - kInchesUnits, - /** centimeters */ - kCentimetersUnits, - /** points */ - kPointsUnits, - /** picas */ - kPicasUnits, - /** millimeters */ - kMillimetersUnits, - /** pixels */ - kPixelsUnits, - /** Q units */ - kQUnits -}; - -/** Color models that can be used to specify artwork colors - for a specific document. See \c #AIDocumentSuite::GetDocumentColorModel() */ -enum AIDocumentColorModelValue { - kDocUnknownColor = -1, - kDocGrayColor = 0, - kDocRGBColor, - kDocCMYKColor -}; - -/** Document targeting types. - See \c #AIDocumentSuite::GetDocumentTargeting() (Not yet implemented.) */ -enum { - kDocTargetGroups, - kDocTargetLeaves, - kDocTargetPainted, - kDocTargetExplicit -}; - -/** A \e book \e color is one of the named spot colors defined in files - installed in the "Presets/Color Books" directory. - The appearance definition of a book color specifies how to simulate - the appearance of the spot ink when the physical ink is not available. - - This mode value indicates whether new book colors added to - a document should use the standard or legacy appearance definition. It affects - new spot colors that are added from a swatch library, by placing a file, or - by cut and paste. See \c #AIDocumentSuite::GetDocumentSpotColorMode() and - \c #AIDocumentSuite::GetDocumentSpotColorMode(). - - @note Illustrator does not enforce the mode setting for new spot colors. - However, the import code automatically resolves spot color conflicts. - */ -enum AISpotColorMode { - /** The legacy definition matches prior versions of Illustrator, - typically given using CMYK.*/ - kAILegacySpotColorMode = 0, - /** The standard definition is the most accurate, typically given - using Lab.*/ - kAIStandardSpotColorMode = 1, - kAIDummySpotColorMode = 0xFFFFFFFF -}; - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Document setup information. */ -typedef struct { - /** The document height and width, in points */ - AIReal width, height; - /** When true, show placed images in the document. */ - AIBoolean showPlacedImages; - /** The output resolution for the document, in dots-per-inch (DPI). Available only through API. - Controls how fine a detail bezier curves are flattened to when output to print. Default is 800. */ - AIReal outputResolution; - /** When true, split long paths. Available only through API. - Controls whether long paths are split into multiple separate paths when saved or printed. - Which paths are split also depends on output resolution. Default is false. */ - AIBoolean splitLongPaths; - /** (For compatibility with earlier versions.) - When true, use printer default halftone screens when printing to Illustrator 8 or earlier EPS, - rather than Illustrator 5 screens. The screens define the shapes of ink dots. - Default is true. */ - AIBoolean useDefaultScreen; - /** (For compatibility with earlier versions.) - When true, printing to Illustrator 8 or earlier EPS emits PostScript Level 1-compatible gradients - that do not use smooth shading (a Level 2 feature), but synthesize gradients by drawing many - thin rectangular fills. Default is false. Available in UI through Graphics tab of Print dialog. */ - AIBoolean compatibleGradients; - /** When true, print multiple tiled pages for this document. When false, print a single page. - \c #AIDocumentSuite::SetDocumentSetup() does not set this value, - but available in UI through Setup tab of Print dialog.*/ - AIBoolean printTiles; - /** When \c printTiles is true, if this is also true, create as many tiles - as needed to print the entire art board. When false, tile only the - imageable area of a page. Ignored when \c printTiles is false. - \c #AIDocumentSuite::SetDocumentSetup() does not set this value, - but available in UI through Setup tab of Print dialog. */ - AIBoolean tileFullPages; - -} AIDocumentSetup; - -/** Styles of crop marks. */ -typedef enum { - kStandardCropStyle, - kJapaneseCropStyle -} AICropMarkStyle; - - -/** Not supported. */ -typedef void *AIDocumentPlatformPrintRecord; - -// AIDocumentPrintRecord -#define kAIDocumentMiPrintRecordVersion 1 - -/** @deprecated - Information about how a document will print. - No longer used. */ -typedef struct AIDocumentMiPrintRecord -{ - ai::int32 version; // kAIDocumentMiPrintRecordVersion - ai::int32 recordSize; // sizeof(AIDocumentMiPrintRecord) - AIRect paperRect; - AIRect imageRect; -} *AIDocumentMiPrintRecordPtr; - -/** Version information for the document being processed. - Passed with \c #kAIDocumentWritePreprocessNotifier to allow - conversion of data based on the AI Version of the document being saved. */ -typedef struct -{ - AIVersion aiVersion; -} AIDocumentVersionInfo; - - -/** Opaque reference to a file format's parameters. */ -typedef void *AIDocumentFileFormatParameters; - -/** Opaque reference to a document. */ -typedef struct _t_AIDocument *AIDocumentHandle; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Use these functions to get and set information about the current document. - - Some functions are only applicable while reading a file format. - Some are intended for use during a file format write, but can - be used at any time. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDocumentSuite and \c #kAIDocumentVersion. - */ -struct AIDocumentSuite { - - /** Retrieves the file specification for the current document. - @param file [out] A buffer in which to return the file specification. - */ - AIAPI AIErr (*GetDocumentFileSpecification) ( ai::FilePath &file ); - - /** Retrieves the coordinates of the lower left corner of the imageable - page, specified relative to the ruler origin. - @param origin [out] A buffer in which to return the origin point. - */ - AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin ); - - /** Sets the coordinates of the lower left corner of the imageable - page. The origin for artwork - coordinates is not changed; affects only what is printed. - @param origin The new imageable page origin, specified relative - to the ruler origin. - */ - AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin ); - - /** Sets the ruler origin for the current document. Positive ruler values - go the right and above the origin. Negative values go the left and below the - origin, - @param origin The new ruler origin, specified relative to the lower left - of the artboard page, which is always (0,0). - */ - AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin ); - - /** Retrieves the current unit of measurement, shown in the ruler and - displayed in dialog boxes. - @param units The new ruler unit, an \c #AIDocumentRulerUnitValue. - */ - AIAPI AIErr (*GetDocumentRulerUnits) ( ai::int16 *units ); - - /** Sets the current unit of measurement, shown in the ruler and - displayed in dialog boxes. Can be used only when reading - a document. - @param units [out] A buffer in which to return the ruler unit, - an \c #AIDocumentRulerUnitValue. - */ - AIAPI AIErr (*SetDocumentRulerUnits) ( ai::int16 units ); - - /** Retrieves the style of crop marks that are created by the Create Crop Marks command - and filter. This is not a document setting; it is an application preference. - In AI11 and later this no longer affects separations printing. - @param cropStyle [out] A buffer in which to return the style. - */ - AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle ); - - /** Sets the style of crop marks that are created by the Create Crop Marks command - and filter. This is not a document setting. It is an application preference. - In AI11 and later this no longer affects separations printing. */ - AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle ); - - /** Not implemented. */ - AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print ); - - /** Not implemented. */ - AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print ); - - /** Retrieves information about the current document that is set through the - document Setup dialog. - @param setup [out] A buffer in which to return the setup information. - */ - AIAPI AIErr (*GetDocumentSetup) ( AIDocumentSetup *setup ); - - /** Sets the document setup information, as set through the document Setup dialog. - Can be used only when reading a document. - @param setup A pointer to a structure containing the new setup information. - */ - AIAPI AIErr (*SetDocumentSetup) ( AIDocumentSetup *setup ); - - /** Reports whether the document has been edited since it was last saved. - When it has, the user is prompted to save the document before closing it. - @param modified [out] A buffer in which to return true if the document has - been modified. - */ - AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified ); - - /** Sets the modification state of the current document. When a document is marked - as modified, the user is prompted to save before closing it. - @param modified True to mark the document as modified, false to mark it - as unmodified. - */ - AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified ); - - /** Retrieves the file format to be used when saving the current document. - By default, this is the format that opened the document - or the latest native file format for a new document. - If the user changes the file format from the Save As dialog, the new format - is assigned to the document. - @param fileFormat [out] A buffer in which to return the file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat ); - - /** Sets the file format to be used when saving the current document. - @param fileFormat The file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat ); - - /** Retrieves the block of user parameters associated with the current document's - associated file format. - @param parameters [out] A buffer in which to return the parameter block. - This is a \c void* pointer. The actual format of the parameter block - is determined by the file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters ); - - /** Sets the block of user parameters associated with the current document's - associated file format. - @param parameters [out] A buffer in which to return the parameter block. - This is a \c void* pointer. The actual format of the parameter block - is determined by the file format. Use the \c #AIBlockSuite functions - to allocate this memory, so that Illustrator can release it when - it is no longer needed. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters ); - - /** Forces the current document to be redrawn. Illustrator automatically redraws - the document when a plug-in returns, so this function is not usually needed. - */ - AIAPI AIErr (*RedrawDocument) ( void ); - - /** Retrieves an opaque reference for the current document, to use with functions - that can operate on documents other than the current one. - @param document [out] A buffer in which to return the document reference. - */ - AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document ); - - /** Writes the current document to a file without modifying the document - or changing its modification status. - @param file The file specification. - @param fileFormatName The file format name. - @param askForParms When true, show a dialog to query user for file-format parameters. - If no format parameters are available, the function queries the user even if this - value is false. - @see \c #WriteDocumentWithOptions() - */ - AIAPI AIErr (*WriteDocument) ( const ai::FilePath &file, const char *fileFormatName, AIBoolean askForParms); - - /** Retrieves the print record for the current document. - @param print [in, out] A print record with the \c version and \c recordSize - members initialized, in which to return the print information. - */ - AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - - /** Not implemented.*/ - AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - - /** Retrieves the ruler origin for the current document. Positive ruler values - go the right and above the origin. Negative values go the left and below the - origin. - @param origin [out] A buffer in which to return the ruler origin, - relative to the lower left of the artboard page, which is always (0,0). - */ - AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin ); - - /** Updates linked objects in the current document, if needed. - @param updatedSomething [out] Optional. A buffer in which to - return true if any links were found that needed update. - */ - AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething ); - - /** Retrieves the limits of zooming as scale factors. - @param min [out] A buffer in which to return the minimum zoom scale factor. - @param max [out] A buffer in which to return the maximum zoom scale factor. - */ - AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max ); - - /** Retrieves the maximum valid bounds of any artboard, expressed relative to - the ruler origin of the current document, regardless of the current - size of the document's artboard. - @param bounds [out] A buffer in which to return the rectangle, - */ - AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds ); - - /** Reports whether a document exists; that is, is an open document or a clipboard document. - @param document The document reference. - @param exists [out] A buffer in which to return true if the document - is open or in the clipboard. - */ - AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists ); - - /** Retrieves the recorded dictionary associated with the current document. - Changes in this dictionary and its contents are recorded in the undo history. - - Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() - when you no longer need the reference. - @param dictionary [out] A buffer in which to return a pointer to - the dictionary reference. - @see \c #GetNonRecordedDictionary() - */ - AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary ); - - /** Retrieves the document color model. - @param colorModel [out] A buffer in which to return the color model, - an \c #AIDocumentColorModelValue. - */ - AIAPI AIErr (*GetDocumentColorModel) ( ai::int16 *colorModel); - - /** Sets the intended color model for documents upon load. - Use when reading a file. This function does not convert artwork in - the current document to the new model. After Illustrator reads - a file, it processes artwork in the document to ensure it matches - the model. - @param colorModel The color model, an \c #AIDocumentColorModelValue. - */ - AIAPI AIErr (*SetDocumentColorModel) ( ai::int16 colorModel); - - /** Retrieves the color calibration profiles for the current document. - @param rgbProfile [out] A buffer in which to return the RGB profile or \c NULL. - @param cmykProfile [out] A buffer in which to return the CMYK profile or \c NULL. - @param grayProfile [out] A buffer in which to return the grayscale profile or \c NULL. - */ - AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile* rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile ); - - /** Sets the color calibration profiles for the current document. - @param rgbProfile The RGB profile. Can be \c NULL. - @param cmykProfile The CMYK profile. Can be \c NULL. - @param grayProfile The grayscale profile. Can be \c NULL. - */ - AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile ); - - /** Copies the currently selected objects to the clipboard. This is the same as - the Copy menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Copy) (); - - /** Cuts the currently selected objects to the clipboard. This is the same as - the Cut menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Cut) (); - - /** Pastes the contents of the clipboard into the document. This is the same as - the Paste menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Paste) (); - - /** Updates cached artwork properties. For example, the selection state - of a group is cached, and is determined from the states of its children. - You do not typically need to call this function. Illustrator recomputes - cached properties as needed. - */ - AIAPI AIErr (*SyncDocument) ( void ); - - /** Unimplemented. Always returns \c #kDocTargetExplicit */ - AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget ); - /** Unimplemented. A no-op. */ - AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget ); - - /** Retrieves the non-recorded dictionary associated with the current document. - Changes to this dictionary and its contents are not recorded in the undo - history. - - Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() - when you no longer need the reference. - @param dictionary [out] A buffer in which to return a pointer to - the dictionary reference. - @see \c #GetNonRecordedDictionary() - */ - AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary ); - - /** Retrieves the version of the Illustrator file format in which - the current document was last saved. (Note that this function returns - a constant value, not an error code.) - @return The version number, an \c #AIVersion value, or 0 if the - version is unknown or the file is not an AI file. - */ - AIAPI int (*GetAIVersion) (); - - /** Reports whether rendering the current document according to its current - view settings requires any non-opaque drawing operations. - @param hasTransparency [out] A buffer in which to return true if the - document has transparency. - @param detectOverprint When true, drawing an overprinted object - is considered a non-opaque operation. - */ - AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint ); - - /** Reports whether rendering the current document according to its current - view settings requires painting any spot colors. - @param hasSpotColorArt [out] A buffer in which to return true if the - document has art that uses spot colors. - */ - AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt ); - - // New for AI 10 - - /** Retrieves asset management information. Pass \c null for any parameter whose - state you do not want to retrieve. - @param managed [out] A buffer in which to return true if the file has an associated server URL. - @param pNAlternates [out] A buffer in which to return the number - of alternates for a document that is part of Version Cue project, - or 0 if it is not part of a Version Cue project. - @param checkedOut [out] A buffer in which to return true if the document is being - managed by a version-control system and is currently checked out (that is, - editable and locked by the current user). - @param URL [out] A buffer in which to return the server URL of a managed file. - @param canEdit Deprecated, pass \c null. - @param fileType [out] A buffer in which to return the name of the plug-in - used to open the current document, or to perform the last Save As operation. - */ - AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, ai::int32* pNAlternates, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType); - - /** Sets asset management information. Pass \c null for any parameter whose - state you do not want to set. - @param managed When true, the file has an associated server URL. - @param checkedOut Deprecated, pass \c null. - @param URL The server URL of a managed file. - @param canEdit Deprecated, pass \c null. - */ - AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit); - - /** Retrieves the URL associated with a document. - @param document The document reference. - @param URL [out] A buffer in which to return the URL. - */ - AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL); - - /** Retrieves the XMP metadata for the current the document. - @param xap [out] A buffer in which to return the XML packet - (in UTF-8 Unicode format). - */ - AIAPI AIErr (*GetDocumentXAP)(const char **xap); - - /** Sets the XMP metadata of the current document. Replaces any existing XMP metadata - @param xap The new XML packet (must be in UTF-8 Unicode format). This is - copied into the document, and can be deleted after the call. Pass \c null - to clear metadata. - */ - AIAPI AIErr (*SetDocumentXAP)(const char *xap); - - /** Halts any text reflow for all text objects in the current document. - Match this call with a call to \c #ResumeTextReflow(). - - If you manipulate \c #kTextFrameArt objects and do not need text reflow - after each access, this speeds up the manipulation process. - Some functions that causes text reflow are:
- \c #ATE::ITextRange::InsertAfter(), \c #ATE::ITextRange::InsertBefore()
- \c #ATE::ITextRange::SetLocalCharFeatures(), \c #ATE::ITextRange::SetLocalParaFeatures()
- \c #ATE::ITextRange::Remove() - - @return The error \c #kNoDocumentErr if no document is open. - */ - AIAPI AIErr (*SuspendTextReflow)(); - - /** Resumes text reflow. Reflows any text objects that modified after the - call to \c #SuspendTextReflow(). - @return The error \c #kNoDocumentErr if no document is open. - */ - AIAPI AIErr (*ResumeTextReflow)(); - - /** Retrieves the text selection object for the current document. - You must release the object when it is no longer needed. - It is recommended that you use \c ITextRanges to wrap this object, - which takes care of memory management. For example: - @code -ATE::TextRangesRef selectionRef = NULL; -sAIDocument->GetTextSelection(&selectionRef); -{ - ITextRanges mySelection(selectionRef); - ... -} - @endcode - At this point \c selectionRef is released.The reference is invalid, and you must - call \c #GetTextSelection() again to get a valid object. - - The text selection can describe multiple discontiguous ranges of text across multiple art objects. - \li If the document is in text editing mode, the result is a range representing the caret - or the user selection. - \li If the document is not in text editing mode, there are multiple ranges - for the selected text frame objects. - - @param pTextSelection [out] A buffer in which to return the text selection object. - */ - AIAPI AIErr (*GetTextSelection)( TextRangesRef* pTextSelection ); - - /** Reports whether the current document is in text editing mode. - @param focus [out] A buffer in which to return true if the document has the text focus. - */ - AIAPI AIErr (*HasTextFocus)( AIBoolean *focus); - - /** Reports whether the current document is in text editing mode and the caret - is blinking (as opposed to a range of text being selected). - @param caret [out] A buffer in which to return true if the document has - the text focus and the caret is blinking. - */ - AIAPI AIErr (*HasTextCaret)( AIBoolean *caret); - - /** Retrieves the current story that is in editing mode. - You must release the object when it is no longer needed. - It is recommended that you use \c IStory to wrap this object, - which takes care of memory management. - @param pStory [out] A buffer in which to return the story object, - or \c NULL if the current document is not in text editing mode. - */ - AIAPI AIErr (*GetTextFocus)( StoryRef* pStory); - - /** Sets a story to be in editing mode. The insertion point is positioned at the - start of the story. - @param story The story object. - */ - AIAPI AIErr (*SetTextFocus)( StoryRef story); - - /** Exits text editing mode. */ - AIAPI AIErr (*LoseTextFocus)(); - - /** Retrieves the text resource object for the current document. - You must release the object when it is no longer needed. - It is recommended that you use \c IDocumentTextResource to wrap this object, - which takes care of memory management. - - The document text resources object contains various document-wide - utilities and objects such as the character and paragraph styles. - - @param pDocResources [out] A buffer in which to return the text resources object. - @see \c ATE suites and \c IText.h. - */ - AIAPI AIErr (*GetDocumentTextResources)( DocumentTextResourcesRef* pDocResources); - - /** @deprecated Does nothing in AI13 (CS3) - - Attaches a thumbnail of the current document to the resources of the specified file. This - is the thumbnail displayed in the Finder in Mac OS. - @param file The file. - */ - AIAPI AIErr (*WriteDocumentMacInformationResource)( const ai::FilePath &file ); - - /** Writes the current document to a file with specified write options, - without modifying the document or changing its modification status. - @param file The file specification. - @param fileFormatName The file format name. - @param fileFormatOptions The write options, a logical OR of \c #AIFileFormatOptions values. - @param additionalOptionsDict Additional file format specific options to customize import/export. - @param askForParms When true, show a dialog to query user for file-format parameters. - If no format parameters are available, the function queries the user - even if this value is false. - @see \c #WriteDocument() - */ - AIAPI AIErr (*WriteDocumentWithOptions) (const ai::FilePath &file, const char *fileFormatName, - ai::int32 fileFormatOptions, AIDictionaryRef additionalOptionsDict, AIBoolean askForParms); - - /** Reports whether rendering the current document according to its current - view settings requires painting any overprinted objects. - @param hasOverprint [out] A buffer in which to return true if the - document has overprint. - */ - AIAPI AIErr (*DocumentHasOverprint)(AIBoolean *hasOverprint); - - /** Reports whether a document contains any managed links. - A managed link is a URL to an Adobe Workgroup Server where - one can share and keep versions of the linked document. - @param document The document reference. - @param hasManagedLinks [out] A buffer in which to return true if the document - has managed links. - @see \c #GetDocumentAssetMgmtInfo(), \c #GetDocumentURL() - - @note In AI 10, only a managed document could have managed links. In later versions, - non-managed documents can also have managed links. - */ - AIAPI AIErr (*DocumentHasManagedLinks)(AIDocumentHandle document, AIBoolean *hasManagedLinks); - - /** Retrieves the spot color mode of a document, which controls the - appearance definitions of new spot colors that are added to the document. - @param document The document reference, or \c NULL for the current document. - @param mode [out] A buffer in which to return the mode, an \c #AISpotColorMode value. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no - current document. - */ - AIAPI AIErr (*GetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode *mode); - - /** Sets the spot color mode of a document, which controls the appearance - definitions of new spot colors that are added to the document. - @param document The document reference, or \c NULL for the current document. - @param mode The new mode, an \c #AISpotColorMode value. - @param convert When true, converts existing spot color definitions to the new mode. - @param converted [out] Optional. A buffer in which to return true if any colors - were actually modified. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no - current document. - */ - AIAPI AIErr (*SetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode mode, - AIBoolean convert, AIBoolean* converted); - - /** Undoes the most recent undoable transaction. This is the same as the Undo menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Undo) (); - - /** Redoes the most recent redoable transaction. This is the same as the Redo menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Redo) (); - /** Reports whether the current document contains any DeviceN or overprinting rasters. - @param hasDeviceNRasters [out] A buffer in which to return true if the - the document has DeviceN rasters. - @param hasOverprint [out] A buffer in which to return true if the - the document has overprinting rasters. - */ - AIAPI AIErr (*DocumentRasterAttributes) (AIBoolean *hasDeviceNRasters, AIBoolean *hasOverprint); - - /** Retrieves the document startup profile. - @param document The document reference, or \c NULL for the current document. - @param startupProfile [out] A buffer in which to return the document startup profile. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no current document. - */ - AIAPI AIErr (*GetDocumentStartupProfile) (AIDocumentHandle document, AIDocumentStartupProfile *startupProfile ); - - /** Retrieves the document's bleed values. - @param bleedOffset [out] A buffer in which to return the bleed values. - */ - - AIAPI AIErr (*GetDocumentBleeds) (AIRealRect *bleedOffset); - - /** Sets the document's bleed values. - @param bleedOffset A rectangle containing the new bleed values. - */ - - AIAPI AIErr (*SetDocumentBleeds) (const AIRealRect& bleedOffset); - - /** Turns Pixel Perfect mode on or off for the document. - @param isPixelPerfect True to turn Pixel Perfect mode on, false to turn it off. - */ - - AIAPI AIErr (*SetDocumentPixelPerfectStatus)(AIBoolean isPixelPerfect); - - /** Reports whether the document is currently in Pixel Perfect mode. - @return True if Pixel Perfect mode is on, false otherwise. - */ - - AIAPI AIBoolean (*GetDocumentPixelPerfectStatus)(); - - /** Deletes the current Selection. This is the same as pressing delete key. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - - AIAPI AIErr (*DeleteSelection)(); - - /** Controls whether UIDs are automatically assigned to art objects of a given type on - creation, in the current document. - @param autoAssignUIDOnArtCreation True to turn behavior on, false to turn it off. - @param artType The art type. - @see \c #AIUIDUtilsSuite::GetArtUID() - */ - - AIAPI AIErr(*SetAutoAssignUIDOnArtCreation)(ai::int16 artType, AIBoolean autoAssignUIDOnArtCreation); - - /** Reports whether UIDs are being automatically assigned on creation to art objects of a given type. - @param artType The art type. - @param outAutoAssignUIDOnArtCreation [out] A buffer in which to return true if auto-assignment is on - for this art type, false otherwise. - @see \c #AIUIDUtilsSuite::GetArtUID() - */ - - AIAPI AIErr(*GetAutoAssignUIDOnArtCreation)(ai::int16 artType, AIBoolean &outAutoAssignUIDOnArtCreation); -}; - - -#include "AIHeaderEnd.h" - - -#endif +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 1986 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#ifndef __AIDocument__ +#define __AIDocument__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIRealMath__ +#include "AIRealMath.h" +#endif + +#ifndef __AIFileFormat__ +#include "AIFileFormat.h" +#endif + +#ifndef __ATESuites__ +#include "ATETypesDef.h" +#endif + +#ifdef __cplusplus +using ATE::TextRangesRef; +using ATE::StoriesRef; +using ATE::StoryRef; +using ATE::DocumentTextResourcesRef; +#endif + +#include "AIHeaderBegin.h" +#if defined(ILLUSTRATOR_MINIMAL) + #include "AIDocumentBasicTypes.h" +#endif + +/** @file AIDocument.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIDocumentSuite "AI Document Suite" +#define kAIDocumentSuiteVersion19 AIAPI_VERSION(19) + +// latest version +#define kAIDocumentSuiteVersion kAIDocumentSuiteVersion19 +#define kAIDocumentVersion kAIDocumentSuiteVersion + +/** @ingroup Notifiers + Sent when the contents of a document have changed. */ +#define kAIDocumentChangedNotifier "AI Document Changed Notifier" +/** @ingroup Notifiers + Sent when the active document window is about to be changed. */ +#define kAIActiveDocumentWindowAboutToBeChangedNotifier "AI Active Document Window About To be Changed Notifier" +/** @ingroup Notifiers + Sent right before the last document window of the artwork is about to be closed. */ +#define kAIDocumentAboutToCloseNotifier "AI Document About To Close Notifier" +/** @ingroup Notifiers + Sent when a document has been closed. */ +#define kAIDocumentClosedNotifier "AI Document Closed Notifier" +/** @ingroup Notifiers + Sent when a document has been opened. */ +#define kAIDocumentOpenedNotifier "AI Document Opened Notifier" +/** @ingroup Notifiers + Sent when serialization part of saving process is done. This notifier will be followed + by \c #kAIDocumentWriteOnDiskCompleteNotifier or \c #kAIDocumentWriteOnDiskFailedNotifier*/ +#define kAIDocumentSavedNotifier "AI Document Saved Notifier" +/** @ingroup Notifiers + Sent when a document has been written to the disk successfully. See \c #AIDocumentWriteOnDiskCompleteNotifyData + \c #kAIDocumentSavedNotifier*/ +#define kAIDocumentWriteOnDiskCompleteNotifier "AI Document Write On Disk Complete Notifier" +/** @ingroup Notifiers + Sent when a document writing to the disk get failed. See \c #AIDocumentWriteOnDiskFailedNotifyData + \c #kAIDocumentSavedNotifier*/ +#define kAIDocumentWriteOnDiskFailedNotifier "AI Document Write On Disk Failed Notifier" +/** @ingroup Notifiers + Sent when a new document has been created. */ +#define kAIDocumentNewNotifier "AI Document New Notifier" +/** @ingroup Notifiers + Sent when the color model for a document has changed. */ +#define kAIDocumentClrMdlChangedNotifier "AI Document Color Model Changed Notifier" +/** @ingroup Notifiers + Sent when document profiles have been changed. */ +#define kAIDocumentProfilesChangedNotifier "AI Document Profiles Changed Notifier" +/** @ingroup Notifiers + Sent whenever the spot color mode of a document has been changed. + The document is not necessarily an open document being edited by + a user. For example, swatch libraries are considered documents. */ +#define kAIDocumentSpotColorModeChangedNotifier "AI Document Spot Color Mode Changed Notifier" +/** @ingroup Notifiers + Sent when ruler unit has changed. */ +#define kAIDocumentRulerUnitChangedNotifier "AI Document Ruler Unit Changed Notifier" +/** @ingroup Notifiers + Sent just before the document is saved, along with the AI Version information + to allow any data conversion required for saving to legacy files. + For example, Unicode data must be converted to Platform encoding before saving to + AI versions less than version 12. */ +#define kAIDocumentWritePreprocessNotifier "AI Document Write Preprocess Notifier" +/** @ingroup Notifiers + Sent just after serializing a document to an Illustrator file format, and before the flattening + layer is removed (if the document was flattened). Allows plug-ins to clean up anything that + was done during preprocessing. */ +#define kAIDocumentWritePostprocessNotifier "AI Document Write Postprocess Notifier" +/** @ingroup Notifiers + Sent when a crop area has been modified, deleted, or created. */ +#define kAIDocumentCropAreaModifiedNotifier "AI Document Crop Area Modified Notifier" +/** @ingroup Notifiers + Sent when the document ruler origin has been changed or reset. See \c #AIDocumentSuite. */ +#define kAIDocumentRulerOriginChangedNotifier "AI Document Ruler Origin Changed Notifier" +/** @ingroup Notifiers +Sent when the document bleed values have been changed. See \c #AIDocumentSuite. */ +#define kAIDocumentBleedsChangedNotifier "AI Document Bleed Value Changed Notifier" +/** @ingroup Notifiers +Sent when the transparency grid is toggled.*/ +#define kAIDocumentTransparencyGridNotifier "AI Document Transparency Grid Notifier" + +/** + * Data passed in kAIDocumentScaleConvertedNotifier and kAIActiveDocumentScaleChangedNotifier + */ +struct AIDocumentScaleNotifyData +{ + /** Old document Scale */ + AIReal oldScale{ kAIRealOne }; + + /** New Document Scale */ + AIReal newScale{ kAIRealOne }; +}; + +/** @ingroup Notifiers + Sent when we start the document scale conversion to a new scale. See \c #AIDocumentScaleNotifyData, + \c #kAIDocumentScaleConvertedNotifier and \c #kAIActiveDocumentScaleChangedNotifier + @Notify data is a pointer to AIDocumentScaleNotifyData +*/ +#define kAIDocumentScaleConversionStartedNotifier "AI Document Scale Conversion Started Notifier" + +/** @ingroup Notifiers + Sent when current document scale is converted to a new scale. + Plug-ins are required to change objects etc, which are not part of art tree and/or is not converted by app. + @Notify data is a pointer to AIDocumentScaleNotifyData +*/ +#define kAIDocumentScaleConvertedNotifier "AI Document Scale Converted Notifier" + +/** @ingroup Notifiers + Sent when a document become active which has a different document scale then the last active document. + Plug-ins are required to change globals/preferences etc. to match the new document scale of active document. + @note: Plug-ins should NOT change any art object in this notification, they should be changed in kAIDocumentScaleConvertedNotifier, + as this notification is sent on just switching the active document. + @Notify data is a pointer to AIDocumentScaleNotifyData +*/ +#define kAIActiveDocumentScaleChangedNotifier "AI Active Document Scale Changed Notifier" + + +/** + * @ingroup Errors + * Sent when the document scale passed in SetDocument Scale is out of range. + */ +#define kAIDocumentScaleOutOfRangeErr 'DSOR' + +#if !defined(ILLUSTRATOR_MINIMAL) +/** Ruler unit values, see \c #AIDocumentSuite::GetDocumentRulerUnits() */ +enum AIDocumentRulerUnitValue { + kUnknownUnits = 0, + /** inches */ + kInchesUnits, + /** centimeters */ + kCentimetersUnits, + /** points */ + kPointsUnits, + /** picas */ + kPicasUnits, + /** millimeters */ + kMillimetersUnits, + /** pixels */ + kPixelsUnits, + /** Q units */ + kQUnits, + /** feet-inch */ + kFeetInchesUnits, + /** meters */ + kMetersUnits, + /** yards */ + kYardsUnits, + /** feet */ + kFeetsUnits, + /**last */ + kLastUnit = kFeetsUnits +}; + +/** Color models that can be used to specify artwork colors + for a specific document. See \c #AIDocumentSuite::GetDocumentColorModel() */ +enum AIDocumentColorModelValue { + kDocUnknownColor = -1, + kDocGrayColor = 0, + kDocRGBColor, + kDocCMYKColor +}; + +/** Document targeting types. + See \c #AIDocumentSuite::GetDocumentTargeting() (Not yet implemented.) */ +enum { + kDocTargetGroups, + kDocTargetLeaves, + kDocTargetPainted, + kDocTargetExplicit +}; + +/** A \e book \e color is one of the named spot colors defined in files + installed in the "Presets/Color Books" directory. + The appearance definition of a book color specifies how to simulate + the appearance of the spot ink when the physical ink is not available. + + This mode value indicates whether new book colors added to + a document should use the standard or legacy appearance definition. It affects + new spot colors that are added from a swatch library, by placing a file, or + by cut and paste. See \c #AIDocumentSuite::GetDocumentSpotColorMode() and + \c #AIDocumentSuite::GetDocumentSpotColorMode(). + + @note Illustrator does not enforce the mode setting for new spot colors. + However, the import code automatically resolves spot color conflicts. + */ +enum AISpotColorMode { + /** The legacy definition matches prior versions of Illustrator, + typically given using CMYK.*/ + kAILegacySpotColorMode = 0, + /** The standard definition is the most accurate, typically given + using Lab.*/ + kAIStandardSpotColorMode = 1, + kAIDummySpotColorMode = 0xFFFFFFFF +}; +#endif +/** Export can be triggered from Export as, Export for screens and Save for web. + We have maintained different default settings for each export. + GetLastExportedFilePath() + SetLastExportedFilePath() + require this parameter of type AIExportTriggeredFrom to know which export was used + */ +enum AIExportTriggeredFrom : ai::uint8 +{ + kAIExportAs, + kAIExportForScreen, + kAISaveForWeb +}; + +/** Struct for notification data of kAIDocumentWriteOnDiskCompleteNotifier*/ +struct AIDocumentWriteOnDiskCompleteNotifyData +{ + ai::FilePath documentFilepath; +}; + +/** Struct for notification data of kAIDocumentWriteOnDiskFailedNotifier*/ +struct AIDocumentWriteOnDiskFailedNotifyData +{ + AIErr error = kCantHappenErr; + ai::FilePath documentFilepath; +}; + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Document setup information. */ +typedef struct { + /** The document height and width, in points */ + AIReal width, height; + /** When true, show placed images in the document. */ + AIBoolean showPlacedImages; + /** The output resolution for the document, in dots-per-inch (DPI). Available only through API. + Controls how fine a detail bezier curves are flattened to when output to print. Default is 800. */ + AIReal outputResolution; + /** When true, split long paths. Available only through API. + Controls whether long paths are split into multiple separate paths when saved or printed. + Which paths are split also depends on output resolution. Default is false. */ + AIBoolean splitLongPaths; + /** (For compatibility with earlier versions.) + When true, use printer default halftone screens when printing to Illustrator 8 or earlier EPS, + rather than Illustrator 5 screens. The screens define the shapes of ink dots. + Default is true. */ + AIBoolean useDefaultScreen; + /** (For compatibility with earlier versions.) + When true, printing to Illustrator 8 or earlier EPS emits PostScript Level 1-compatible gradients + that do not use smooth shading (a Level 2 feature), but synthesize gradients by drawing many + thin rectangular fills. Default is false. Available in UI through Graphics tab of Print dialog. */ + AIBoolean compatibleGradients; + /** When true, print multiple tiled pages for this document. When false, print a single page. + \c #AIDocumentSuite::SetDocumentSetup() does not set this value, + but available in UI through Setup tab of Print dialog.*/ + AIBoolean printTiles; + /** When \c printTiles is true, if this is also true, create as many tiles + as needed to print the entire art board. When false, tile only the + imageable area of a page. Ignored when \c printTiles is false. + \c #AIDocumentSuite::SetDocumentSetup() does not set this value, + but available in UI through Setup tab of Print dialog. */ + AIBoolean tileFullPages; + +} AIDocumentSetup; + +/** Styles of crop marks. */ +typedef enum { + kStandardCropStyle, + kJapaneseCropStyle +} AICropMarkStyle; + +/** Types of libraries. */ +enum class AILibraryType : ai::uint8 { + kAIBrushLibraryType, + kAIStyleLibraryType, + kAISwatchLibraryType, + kAISymbolLibraryType, +}; + +/** It supposed to be used as value for dictionary key #kAIPDFDictKeyInsertPagesIndex.*/ +enum InsertPagesIndex : ai::int32 +{ + kAIPDFInsertBeforeFirstPage = -1, + kAIPDFInsertAfterLastPage = -2 +}; + +/** Dictionary keys supposed to be used while saving the PDF file via API + #WriteDocumentWithOptions for parameter additionalOptionsDict*/ + +/** This key should have a boolean value. On setting it true, all the + Artboards being saved will be inserted as new pages in the existing PDF.*/ +#define kAIPDFDictKeyInsertPages "AIPDFDictKeyInsertPages" + +/** This key should have used if #kAIPDFDictKeyInsertPages is true. Integer + value passed corresponding to this key should be less than the number of + pages in the existing PDF. See #InsertPagesIndex*/ +#define kAIPDFDictKeyInsertPagesIndex "AIPDFDictKeyInsertPagesIndex" + +/** Not supported. */ +typedef void *AIDocumentPlatformPrintRecord; + +// AIDocumentPrintRecord +#define kAIDocumentMiPrintRecordVersion 1 + +/** @deprecated + Information about how a document will print. + No longer used. */ +typedef struct AIDocumentMiPrintRecord +{ + ai::int32 version; // kAIDocumentMiPrintRecordVersion + ai::int32 recordSize; // sizeof(AIDocumentMiPrintRecord) + AIRect paperRect; + AIRect imageRect; +} *AIDocumentMiPrintRecordPtr; + +/** Version information for the document being processed. + Passed with \c #kAIDocumentWritePreprocessNotifier to allow + conversion of data based on the AI Version of the document being saved. */ +typedef struct +{ + AIVersion aiVersion; +} AIDocumentVersionInfo; + + +/** Opaque reference to a file format's parameters. */ +typedef void *AIDocumentFileFormatParameters; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Use these functions to get and set information about the current document. + + Some functions are only applicable while reading a file format. + Some are intended for use during a file format write, but can + be used at any time. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIDocumentSuite and \c #kAIDocumentVersion. + */ +struct AIDocumentSuite { + + /** Retrieves the file specification for the current document. + @param file [out] A buffer in which to return the file specification. + */ + AIAPI AIErr (*GetDocumentFileSpecification) ( ai::FilePath &file ); + + /** Retrieves the file specification associated with the given document. + @param document The document reference. + @param file [out] A buffer in which to return the file specification. + */ + AIAPI AIErr(*GetDocumentFileSpecificationFromHandle) (AIDocumentHandle document, ai::FilePath &file); + + /** Retrieves the coordinates of the lower left corner of the imageable + page, specified relative to the ruler origin. + @param origin [out] A buffer in which to return the origin point. + */ + AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin ); + + /** Sets the coordinates of the lower left corner of the imageable + page. The origin for artwork + coordinates is not changed; affects only what is printed. + @param origin The new imageable page origin, specified relative + to the ruler origin. + */ + AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin ); + + /** Sets the ruler origin for the current document. Positive ruler values + go the right and above the origin. Negative values go the left and below the + origin, + @param origin The new ruler origin, specified relative to the lower left + of the artboard page, which is always (0,0). + */ + AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin ); + + /** Retrieves the current unit of measurement, shown in the ruler and + displayed in dialog boxes. + @param units The new ruler unit, an \c #AIDocumentRulerUnitValue. + */ + AIAPI AIErr (*GetDocumentRulerUnits) ( ai::int16 *units ); + + /** Sets the current unit of measurement, shown in the ruler and + displayed in dialog boxes. Can be used only when reading + a document. + @param units [out] A buffer in which to return the ruler unit, + an \c #AIDocumentRulerUnitValue. + */ + AIAPI AIErr (*SetDocumentRulerUnits) ( ai::int16 units ); + + /** Retrieves the style of crop marks that are created by the Create Crop Marks command + and filter. This is not a document setting; it is an application preference. + In AI11 and later this no longer affects separations printing. + @param cropStyle [out] A buffer in which to return the style. + */ + AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle ); + + /** Sets the style of crop marks that are created by the Create Crop Marks command + and filter. This is not a document setting. It is an application preference. + In AI11 and later this no longer affects separations printing. */ + AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle ); + + /** Not implemented. */ + AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print ); + + /** Not implemented. */ + AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print ); + + /** Retrieves information about the current document that is set through the + document Setup dialog. + @param setup [out] A buffer in which to return the setup information. + */ + AIAPI AIErr (*GetDocumentSetup) ( AIDocumentSetup *setup ); + + /** Sets the document setup information, as set through the document Setup dialog. + Can be used only when reading a document. + @param setup A pointer to a structure containing the new setup information. + */ + AIAPI AIErr (*SetDocumentSetup) ( AIDocumentSetup *setup ); + + /** Reports whether the document has been edited since it was last saved. + When it has, the user is prompted to save the document before closing it. + @param modified [out] A buffer in which to return true if the document has + been modified. + */ + AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified ); + + /** Sets the modification state of the current document. When a document is marked + as modified, the user is prompted to save before closing it. + @param modified True to mark the document as modified, false to mark it + as unmodified. + */ + AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified ); + + /** Retrieves the file format to be used when saving the current document. + By default, this is the format that opened the document + or the latest native file format for a new document. + If the user changes the file format from the Save As dialog, the new format + is assigned to the document. + @param fileFormat [out] A buffer in which to return the file format. + @see \c #AIFileFormatSuite + */ + AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat ); + + /** Sets the file format to be used when saving the current document. + @param fileFormat The file format. + @see \c #AIFileFormatSuite + */ + AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat ); + + /** Retrieves the block of user parameters associated with the current document's + associated file format. + @param parameters [out] A buffer in which to return the parameter block. + This is a \c void* pointer. The actual format of the parameter block + is determined by the file format. + @see \c #AIFileFormatSuite + */ + AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters ); + + /** Sets the block of user parameters associated with the current document's + associated file format. + @param parameters [out] A buffer in which to return the parameter block. + This is a \c void* pointer. The actual format of the parameter block + is determined by the file format. Use the \c #AIBlockSuite functions + to allocate this memory, so that Illustrator can release it when + it is no longer needed. + @see \c #AIFileFormatSuite + */ + AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters ); + + /** Forces the current document to be redrawn. Illustrator automatically redraws + the document when a plug-in returns, so this function is not usually needed. + */ + AIAPI AIErr (*RedrawDocument) ( void ); + + /** Retrieves an opaque reference for the current document, to use with functions + that can operate on documents other than the current one. + @param document [out] A buffer in which to return the document reference. + */ + AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document ); + + /** Writes the current document to a file without modifying the document + or changing its modification status. + @param file The file specification. + @param fileFormatName The file format name. + @param askForParms When true, show a dialog to query user for file-format parameters. + If no format parameters are available, the function queries the user even if this + value is false. + @see \c #WriteDocumentWithOptions() and \c #WriteDocumentAsLibrary() + */ + AIAPI AIErr (*WriteDocument) ( const ai::FilePath &file, const char *fileFormatName, AIBoolean askForParms); + + /** Retrieves the print record for the current document. + @param print [in, out] A print record with the \c version and \c recordSize + members initialized, in which to return the print information. + */ + AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); + + /** Not implemented.*/ + AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); + + /** Retrieves the ruler origin for the current document. Positive ruler values + go the right and above the origin. Negative values go the left and below the + origin. + @param origin [out] A buffer in which to return the ruler origin, + relative to the lower left of the artboard page, which is always (0,0). + */ + AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin ); + + /** Updates linked objects in the current document, if needed. + @param updatedSomething [out] Optional. A buffer in which to + return true if any links were found that needed update. + */ + AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething ); + + /** Retrieves the limits of zooming as scale factors. + @param min [out] A buffer in which to return the minimum zoom scale factor. + @param max [out] A buffer in which to return the maximum zoom scale factor. + */ + AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max ); + + /** Retrieves the maximum valid bounds of any artboard, expressed relative to + the ruler origin of the current document, regardless of the current + size of the document's artboard. + @param bounds [out] A buffer in which to return the rectangle, + */ + AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds ); + + /** Reports whether a document exists; that is, is an open document or a clipboard document. + @param document The document reference. + @param exists [out] A buffer in which to return true if the document + is open or in the clipboard. + */ + AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists ); + + /** Retrieves the recorded dictionary associated with the current document. + Changes in this dictionary and its contents are recorded in the undo history. + + Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() + when you no longer need the reference. + @param dictionary [out] A buffer in which to return a pointer to + the dictionary reference. + @see \c #GetNonRecordedDictionary() + */ + AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary ); + + /** Retrieves the document color model. + @param colorModel [out] A buffer in which to return the color model, + an \c #AIDocumentColorModelValue. + */ + AIAPI AIErr (*GetDocumentColorModel) ( ai::int16 *colorModel); + + /** Sets the intended color model for documents upon load. + Use when reading a file. This function does not convert artwork in + the current document to the new model. After Illustrator reads + a file, it processes artwork in the document to ensure it matches + the model. + @param colorModel The color model, an \c #AIDocumentColorModelValue. + */ + AIAPI AIErr (*SetDocumentColorModel) ( ai::int16 colorModel); + + /** Retrieves the color calibration profiles for the current document. + @param rgbProfile [out] A buffer in which to return the RGB profile or \c NULL. + @param cmykProfile [out] A buffer in which to return the CMYK profile or \c NULL. + @param grayProfile [out] A buffer in which to return the grayscale profile or \c NULL. + */ + AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile* rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile ); + + /** Sets the color calibration profiles for the current document. + @param rgbProfile The RGB profile. Can be \c NULL. + @param cmykProfile The CMYK profile. Can be \c NULL. + @param grayProfile The grayscale profile. Can be \c NULL. + */ + AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile ); + + /** Copies the currently selected objects to the clipboard. This is the same as + the Copy menu command. + @note Use only when this plug-in is issuing a command and is entirely + in control of that command. Do not call when responding to messages + invoked by other commands, such as save, close, update, and so on. + */ + AIAPI AIErr (*Copy) (); + + /** Cuts the currently selected objects to the clipboard. This is the same as + the Cut menu command. + @note Use only when this plug-in is issuing a command and is entirely + in control of that command. Do not call when responding to messages + invoked by other commands, such as save, close, update, and so on. + */ + AIAPI AIErr (*Cut) (); + + /** Pastes the contents of the clipboard into the document. This is the same as + the Paste menu command. + @note Use only when this plug-in is issuing a command and is entirely + in control of that command. Do not call when responding to messages + invoked by other commands, such as save, close, update, and so on. + */ + AIAPI AIErr (*Paste) (); + + /** Updates cached artwork properties. For example, the selection state + of a group is cached, and is determined from the states of its children. + You do not typically need to call this function. Illustrator recomputes + cached properties as needed. + */ + AIAPI AIErr (*SyncDocument) ( void ); + + /** Unimplemented. Always returns \c #kDocTargetExplicit */ + AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget ); + /** Unimplemented. A no-op. */ + AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget ); + + /** Retrieves the non-recorded dictionary associated with the current document. + Changes to this dictionary and its contents are not recorded in the undo + history. + + Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() + when you no longer need the reference. + @param dictionary [out] A buffer in which to return a pointer to + the dictionary reference. + @see \c #GetNonRecordedDictionary() + */ + AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary ); + + /** Retrieves the non-recorded dictionary associated with the document passed as input. + Changes to this dictionary and its contents are not recorded in the undo + history. + + Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() + when you no longer need the reference. + @param document The document reference whose non-recorded dictionary is being asked for. + @param dictionary [out] A buffer in which to return a pointer to + the dictionary reference. + @see \c #GetNonRecordedDictionary() + */ + + AIAPI AIErr(*GetNonRecordedDictionaryForDocument)(AIDocumentHandle document, struct _AIDictionary** dictionary); + + /** Retrieves the version of the Illustrator file format in which + the current document was last saved. (Note that this function returns + a constant value, not an error code.) + @return The version number, an \c #AIVersion value, or 0 if the + version is unknown or the file is not an AI file. + */ + AIAPI int (*GetAIVersion) (); + + /** Reports whether rendering the current document according to its current + view settings requires any non-opaque drawing operations. + @param hasTransparency [out] A buffer in which to return true if the + document has transparency. + @param detectOverprint When true, drawing an overprinted object + is considered a non-opaque operation. + */ + AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint ); + + /** Reports whether rendering the current document according to its current + view settings requires painting any spot colors. + @param hasSpotColorArt [out] A buffer in which to return true if the + document has art that uses spot colors. + */ + AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt ); + + // New for AI 10 + + /** @deprecated + Retrieves asset management information. Pass \c null for any parameter whose + state you do not want to retrieve. + @param managed [out] A buffer in which to return true if the file has an associated server URL. + @param pNAlternates [out] A buffer in which to return the number + of alternates for a document that is part of Version Cue project, + or 0 if it is not part of a Version Cue project. + @param checkedOut [out] A buffer in which to return true if the document is being + managed by a version-control system and is currently checked out (that is, + editable and locked by the current user). + @param URL [out] A buffer in which to return the server URL of a managed file. + @param canEdit Deprecated, pass \c null. + @param fileType [out] A buffer in which to return the name of the plug-in + used to open the current document, or to perform the last Save As operation. + */ + AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, ai::int32* pNAlternates, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType); + + /** @deprecated + Sets asset management information. Pass \c null for any parameter whose + state you do not want to set. + @param managed When true, the file has an associated server URL. + @param checkedOut Deprecated, pass \c null. + @param URL The server URL of a managed file. + @param canEdit Deprecated, pass \c null. + */ + AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit); + + /** Retrieves the URL associated with a document. + @param document The document reference. + @param URL [out] A buffer in which to return the URL. + */ + AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL); + + /** Retrieves the XMP metadata for the current the document. + @param xap [out] A buffer in which to return the XML packet + (in UTF-8 Unicode format). + */ + AIAPI AIErr (*GetDocumentXAP)(const char **xap); + + /** Sets the XMP metadata of the current document. Replaces any existing XMP metadata + @param xap The new XML packet (must be in UTF-8 Unicode format). This is + copied into the document, and can be deleted after the call. Pass \c null + to clear metadata. + */ + AIAPI AIErr (*SetDocumentXAP)(const char *xap); + + /** Halts any text reflow for all text objects in the current document. + Match this call with a call to \c #ResumeTextReflow(). + + If you manipulate \c #kTextFrameArt objects and do not need text reflow + after each access, this speeds up the manipulation process. + Some functions that causes text reflow are:
+ \c #ATE::ITextRange::InsertAfter(), \c #ATE::ITextRange::InsertBefore()
+ \c #ATE::ITextRange::SetLocalCharFeatures(), \c #ATE::ITextRange::SetLocalParaFeatures()
+ \c #ATE::ITextRange::Remove() + + @return The error \c #kNoDocumentErr if no document is open. + */ + AIAPI AIErr (*SuspendTextReflow)(); + + /** Resumes text reflow. Reflows any text objects that modified after the + call to \c #SuspendTextReflow(). + @return The error \c #kNoDocumentErr if no document is open. + */ + AIAPI AIErr (*ResumeTextReflow)(); + + /** Retrieves the text selection object for the current document. + You must release the object when it is no longer needed. + It is recommended that you use \c ITextRanges to wrap this object, + which takes care of memory management. For example: + @code +ATE::TextRangesRef selectionRef = NULL; +sAIDocument->GetTextSelection(&selectionRef); +{ + ITextRanges mySelection(selectionRef); + ... +} + @endcode + At this point \c selectionRef is released.The reference is invalid, and you must + call \c #GetTextSelection() again to get a valid object. + + The text selection can describe multiple discontiguous ranges of text across multiple art objects. + \li If the document is in text editing mode, the result is a range representing the caret + or the user selection. + \li If the document is not in text editing mode, there are multiple ranges + for the selected text frame objects. + + @param pTextSelection [out] A buffer in which to return the text selection object. + */ + AIAPI AIErr (*GetTextSelection)( TextRangesRef* pTextSelection ); + + /** Reports whether the current document is in text editing mode. + @param focus [out] A buffer in which to return true if the document has the text focus. + */ + AIAPI AIErr (*HasTextFocus)( AIBoolean *focus); + + /** Reports whether the current document is in text editing mode and the caret + is blinking (as opposed to a range of text being selected). + @param caret [out] A buffer in which to return true if the document has + the text focus and the caret is blinking. + */ + AIAPI AIErr (*HasTextCaret)( AIBoolean *caret); + + /** Retrieves the current story that is in editing mode. + You must release the object when it is no longer needed. + It is recommended that you use \c IStory to wrap this object, + which takes care of memory management. + @param pStory [out] A buffer in which to return the story object, + or \c NULL if the current document is not in text editing mode. + */ + AIAPI AIErr (*GetTextFocus)( StoryRef* pStory); + + /** Sets a story to be in editing mode. The insertion point is positioned at the + start of the story. + @param story The story object. + */ + AIAPI AIErr (*SetTextFocus)( StoryRef story); + + /** Exits text editing mode. */ + AIAPI AIErr (*LoseTextFocus)(); + + /** Retrieves the text resource object for the current document. + You must release the object when it is no longer needed. + It is recommended that you use \c IDocumentTextResource to wrap this object, + which takes care of memory management. + + The document text resources object contains various document-wide + utilities and objects such as the character and paragraph styles. + + @param pDocResources [out] A buffer in which to return the text resources object. + @see \c ATE suites and \c IText.h. + */ + AIAPI AIErr (*GetDocumentTextResources)( DocumentTextResourcesRef* pDocResources); + + /** @deprecated Does nothing in AI13 (CS3) + + Attaches a thumbnail of the current document to the resources of the specified file. This + is the thumbnail displayed in the Finder in Mac OS. + @param file The file. + */ + AIAPI AIErr (*WriteDocumentMacInformationResource)( const ai::FilePath &file ); + + /** Writes the current document to a file with specified write options, + without modifying the document or changing its modification status. + @param file The file specification. + @param fileFormatName The file format name. + @param fileFormatOptions The write options, a logical OR of \c #AIFileFormatOptions values. + @param additionalOptionsDict Additional file format specific options to customize import/export. + @param askForParms When true, show a dialog to query user for file-format parameters. + If no format parameters are available, the function queries the user + even if this value is false. + @see \c #WriteDocument() and \c #WriteDocumentAsLibrary() + */ + AIAPI AIErr (*WriteDocumentWithOptions) (const ai::FilePath &file, const char *fileFormatName, + ai::int32 fileFormatOptions, AIDictionaryRef additionalOptionsDict, AIBoolean askForParms); + + /** Writes the current document to a file as a library of specified type without modifying the document + or changing its modification status. + @param file The file specification. + @param libraryType The library type. See \c #AILibraryType for possible values. + @see \c #WriteDocument() and \c #WriteDocumentWithOptions() + */ + AIAPI AIErr (*WriteDocumentAsLibrary) (const ai::FilePath &file, AILibraryType libraryType); + + /** Reports whether rendering the current document according to its current + view settings requires painting any overprinted objects. + @param hasOverprint [out] A buffer in which to return true if the + document has overprint. + */ + AIAPI AIErr (*DocumentHasOverprint)(AIBoolean *hasOverprint); + + /** @deprecated + Reports whether a document contains any managed links. + A managed link is a URL to an Adobe Workgroup Server where + one can share and keep versions of the linked document. + @param document The document reference. + @param hasManagedLinks [out] A buffer in which to return true if the document + has managed links. + @see \c #GetDocumentAssetMgmtInfo(), \c #GetDocumentURL() + + @note In AI 10, only a managed document could have managed links. In later versions, + non-managed documents can also have managed links. + */ + AIAPI AIErr (*DocumentHasManagedLinks)(AIDocumentHandle document, AIBoolean *hasManagedLinks); + + /** Retrieves the spot color mode of a document, which controls the + appearance definitions of new spot colors that are added to the document. + @param document The document reference, or \c NULL for the current document. + @param mode [out] A buffer in which to return the mode, an \c #AISpotColorMode value. + @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no + current document. + */ + AIAPI AIErr (*GetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode *mode); + + /** Sets the spot color mode of a document, which controls the appearance + definitions of new spot colors that are added to the document. + @param document The document reference, or \c NULL for the current document. + @param mode The new mode, an \c #AISpotColorMode value. + @param convert When true, converts existing spot color definitions to the new mode. + @param converted [out] Optional. A buffer in which to return true if any colors + were actually modified. + @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no + current document. + */ + AIAPI AIErr (*SetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode mode, + AIBoolean convert, AIBoolean* converted); + + /** Undoes the most recent undoable transaction. This is the same as the Undo menu command. + @note Use only when this plug-in is issuing a command and is entirely + in control of that command. Do not call when responding to messages + invoked by other commands, such as save, close, update, and so on. + */ + AIAPI AIErr (*Undo) (); + + /** Redoes the most recent redoable transaction. This is the same as the Redo menu command. + @note Use only when this plug-in is issuing a command and is entirely + in control of that command. Do not call when responding to messages + invoked by other commands, such as save, close, update, and so on. + */ + AIAPI AIErr (*Redo) (); + /** Reports whether the current document contains any DeviceN or overprinting rasters. + @param hasDeviceNRasters [out] A buffer in which to return true if the + the document has DeviceN rasters. + @param hasOverprint [out] A buffer in which to return true if the + the document has overprinting rasters. + */ + AIAPI AIErr (*DocumentRasterAttributes) (AIBoolean *hasDeviceNRasters, AIBoolean *hasOverprint); + + /** Retrieves the document startup profile. + @param document The document reference, or \c NULL for the current document. + @param startupProfile [out] A buffer in which to return the document startup profile. + @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no current document. + */ + AIAPI AIErr (*GetDocumentStartupProfile) (AIDocumentHandle document, AIDocumentStartupProfile *startupProfile ); + + /** Retrieves the document's bleed values. + @param bleedOffset [out] A buffer in which to return the bleed values. + */ + + AIAPI AIErr (*GetDocumentBleeds) (AIRealRect *bleedOffset); + + /** Sets the document's bleed values. + @param bleedOffset A rectangle containing the new bleed values. + */ + + AIAPI AIErr (*SetDocumentBleeds) (const AIRealRect& bleedOffset); + + /** Turns Pixel Perfect mode on or off for the document. + @param isPixelPerfect True to turn Pixel Perfect mode on, false to turn it off. + */ + + AIAPI AIErr (*SetDocumentPixelPerfectStatus)(AIBoolean isPixelPerfect); + + /** Reports whether the document is currently in Pixel Perfect mode. + @return True if Pixel Perfect mode is on, false otherwise. + */ + + AIAPI AIBoolean (*GetDocumentPixelPerfectStatus)(); + + /** Deletes the current Selection. This is the same as pressing delete key. + @note Use only when this plug-in is issuing a command and is entirely + in control of that command. Do not call when responding to messages + invoked by other commands, such as save, close, update, and so on. + */ + + AIAPI AIErr (*DeleteSelection)(); + + /** Controls whether UIDs are automatically assigned to art objects of a given type on + creation, in the current document. + @param autoAssignUIDOnArtCreation True to turn behavior on, false to turn it off. + @param artType The art type. + @see \c #AIUIDUtilsSuite::GetArtUID() + */ + + AIAPI AIErr(*SetAutoAssignUIDOnArtCreation)(ai::int16 artType, AIBoolean autoAssignUIDOnArtCreation); + + /** Reports whether UIDs are being automatically assigned on creation to art objects of a given type. + @param artType The art type. + @param outAutoAssignUIDOnArtCreation [out] A buffer in which to return true if auto-assignment is on + for this art type, false otherwise. + @see \c #AIUIDUtilsSuite::GetArtUID() + */ + + AIAPI AIErr(*GetAutoAssignUIDOnArtCreation)(ai::int16 artType, AIBoolean &outAutoAssignUIDOnArtCreation); + + /** returns scale factor applied on the document + It considers os scale factor as well as app scale factor + returns always integral scale factor. + */ + AIAPI AIReal (*GetEffectiveScaleFactor)(); + + /** + * With each document there is a scale factor associated with it, + * So for a document with document scale factor X, each object's dimension have to multiplied by X to get the + * correct dimensions of the object in UI + * For example, if document scale factor is X, then a 10x10 rectangle will actually will be displayed as + * (10*X)x(10*X) rectangle in UI + */ + AIAPI AIErr(*GetDocumentScale)(AIReal& docScale); + + /** + Reports whether the current document is a Cloud AI document. + (Note that this function returns a constant value, not an error code.) + @return true if the current document is a Cloud AI document, else false. + */ + AIAPI AIBoolean(*IsCloudAIDocument)(); + + /** + * Retrieves the file name associated with the current document. + @param fileName [out]: A buffer in which to return the file name. + */ + AIAPI AIErr(*GetDocumentFileName)(ai::UnicodeString &fileName); + + /** + * Retrieves the file name associated with the current document without extension + @param fileName [out]: A buffer in which to return the file name without extension + */ + AIAPI AIErr(*GetDocumentFileNameNoExt)(ai::UnicodeString &fileName); + + /** Retrieves the file name associated with the given document. + @param document The document reference. + @param fileName [out] A buffer in which to return the file name. + */ + AIAPI AIErr(*GetDocumentFileNameFromHandle)(AIDocumentHandle document, ai::UnicodeString &fileName); + + /** Retrieves the file name associated with the given document without extension + @param document The document reference. + @param fileName [out] A buffer in which to return the file name without extension + */ + AIAPI AIErr(*GetDocumentFileNameNoExtFromHandle)(AIDocumentHandle document, ai::UnicodeString &fileName); + + /** Retrieves the file path that was used for last export operation for current file + @param file [in] option to know whether export was triggered from Export As, Export for screens or Save for Web. + @param file [out] A buffer in which to return the file path. + */ + AIAPI AIErr (*GetLastExportedFilePath) ( const AIExportTriggeredFrom option, ai::FilePath &file); + + /** Set file path that was used for last export operation for current file + @param file [in] option to know whether export was triggered from Export As, Export for screens or Save for Web. + @param file [in] file path used for last export. + */ + AIAPI AIErr (*SetLastExportedFilePath) ( const AIExportTriggeredFrom option, ai::FilePath file); +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentBasicTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentBasicTypes.h new file mode 100644 index 0000000..1925392 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentBasicTypes.h @@ -0,0 +1,183 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2008 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ +// +// AIDocumentBasicTypes.h +// +// TritiumLib.mp.64 +// +// Created by Anukriti Bajpai on 13/02/20. +// + +#ifndef AIDocumentBasicTypes_h +#define AIDocumentBasicTypes_h + +#include "AIBasicTypes.h" + +/** Ruler unit values, see \c #AIDocumentSuite::GetDocumentRulerUnits() */ +enum AIDocumentRulerUnitValue { + kUnknownUnits = 0, + /** inches */ + kInchesUnits, + /** centimeters */ + kCentimetersUnits, + /** points */ + kPointsUnits, + /** picas */ + kPicasUnits, + /** millimeters */ + kMillimetersUnits, + /** pixels */ + kPixelsUnits, + /** Q units */ + kQUnits, + /** feet-inch */ + kFeetInchesUnits, + /** meters */ + kMetersUnits, + /** yards */ + kYardsUnits, + /** feet */ + kFeetsUnits, + /**last */ + kLastUnit = kFeetsUnits +}; + +/** The document color model used when creating a new document or opening + a document, set in \c #AINewDocumentPreset::docColorMode.*/ +typedef enum +{ + kAIUnknownColorModel = -1, + /** Grayscale (Unimplemented. If specified, an RGB document is created.) */ + kAIGrayColorModel = 0, + /** RGB */ + kAIRGBColorModel, + /** CMYK */ + kAICMYKColorModel +} AIColorModel; + +/** The preferred grid style for a new document, + set in \c #AINewDocumentPreset::docTransparencyGrid. */ +typedef enum +{ + /** No grid */ + kAITransparencyGridNone = 0, + /** Light gray lines */ + kAITransparencyGridLight, + /** Medium gray lines */ + kAITransparencyGridMedium, + /** Dark gray lines */ + kAITransparencyGridDark, + /** Red lines */ + kAITransparencyGridRed, + /** Orange lines */ + kAITransparencyGridOrange, + /** Green lines */ + kAITransparencyGridGreen, + /** Blue lines */ + kAITransparencyGridBlue, + /** Purple lines */ + kAITransparencyGridPurple +} AITransparencyGrid; + +/** The preferred preview mode for a new document, + set in \c #AINewDocumentPreset::docPreviewMode. */ +typedef enum +{ + /* The default preview mode */ + kAIPreviewModeDefault = 0, + /* Pixel preview mode */ + kAIPreviewModePixelPreview, + /* Overprint preview mode */ + kAIPreviewModeOverprintPreview +} AIPreviewMode; + +/** Raster resolution values for creating a new document, + set in \c #AINewDocumentPreset::docRasterResolution. + Values are in pixels-per-inch. This becomes the + Raster Effect Settings value for the document. */ +typedef enum +{ + /** Low or screen resolution, 72 PPI. This is the default. */ + kAIRasterResolutionScreen = 0, + /** Medium resolution, 150 PPI. */ + kAIRasterResolutionMedium, + /** High resolution, 300 PPI. */ + kAIRasterResolutionHigh +} AIRasterResolution; + +/** Artboard Layout for placing artboards while creating a new document, +set in \c #AINewDocumentPreset::docArtboardLayout.*/ +typedef enum +{ + /** Arrange artboards in grid by row pattern*/ + kAIArtboardLayoutGridByRow = 0 , + /** Arrange artboards in grid by column pattern*/ + kAIArtboardLayoutGridByCol, + /** Arrange artboards in a single row*/ + kAIArtboardLayoutRow, + /** Arrange artboards in a single column*/ + kAIArtboardLayoutCol, + /** Arrange artboards in grid by row pattern from right to left*/ + kAIArtboardLayoutRLGridByRow, + /** Arrange artboards in grid by column pattern from right to left*/ + kAIArtboardLayoutRLGridByCol, + /** Arrange artboards in single row from right to left*/ + kAIArtboardLayoutRLRow +}AIArtboardLayout; + +/** Color models that can be used to specify artwork colors + for a specific document. See \c #AIDocumentSuite::GetDocumentColorModel() */ +enum AIDocumentColorModelValue { + kDocUnknownColor = -1, + kDocGrayColor = 0, + kDocRGBColor, + kDocCMYKColor +}; + +/** Document targeting types. + See \c #AIDocumentSuite::GetDocumentTargeting() (Not yet implemented.) */ +enum { + kDocTargetGroups, + kDocTargetLeaves, + kDocTargetPainted, + kDocTargetExplicit +}; + +/** A \e book \e color is one of the named spot colors defined in files + installed in the "Presets/Color Books" directory. + The appearance definition of a book color specifies how to simulate + the appearance of the spot ink when the physical ink is not available. + + This mode value indicates whether new book colors added to + a document should use the standard or legacy appearance definition. It affects + new spot colors that are added from a swatch library, by placing a file, or + by cut and paste. See \c #AIDocumentSuite::GetDocumentSpotColorMode() and + \c #AIDocumentSuite::GetDocumentSpotColorMode(). + + @note Illustrator does not enforce the mode setting for new spot colors. + However, the import code automatically resolves spot color conflicts. + */ +enum AISpotColorMode { + /** The legacy definition matches prior versions of Illustrator, + typically given using CMYK.*/ + kAILegacySpotColorMode = 0, + /** The standard definition is the most accurate, typically given + using Lab.*/ + kAIStandardSpotColorMode = 1, + kAIDummySpotColorMode = 0xFFFFFFFF +}; + +#endif /* AIDocumentBasicTypes_h */ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentList.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentList.h index 4beb2f1..21f6f0b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentList.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentList.h @@ -1,370 +1,382 @@ -#ifndef __AIDocumentList__ -#define __AIDocumentList__ - -/* - * Name: AIDocumentList.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Document Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#ifndef __AIDocument__ -#include "AIDocument.h" -#endif - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - -#ifndef __AIUnicodeString__ -#include "AIUnicodeString.h" -#endif - -#include "IAIFilePath.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIDocumentList.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIDocumentListSuite "AI Document List Suite" -#define kAIDocumentListSuiteVersion9 AIAPI_VERSION(9) - -// latest version -#define kAIDocumentListSuiteVersion kAIDocumentListSuiteVersion9 -#define kAIDocumentListVersion kAIDocumentListSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** @ingroup Errors - See \c #AIDocumentListSuite */ -#define kCantCreateNewDocumentErr 'ENEW' - -/** @ingroup Errors - Thrown by \c #AIDocumentListSuite::New() when negative value of docArtboardSpacing - (spacing between artboards, See \c #AINewDocumentPreset) is invalid. Negative value of docArtboardSpacing should - be less than or equal to MIN(artboard height, artboard width) depending on the artboard layout, so that artboards - can at most overlap. */ -#define kAIInvalidNegativeSpacingErr 'InNS' - -/** @ingroup Errors - Thrown by \c #AIDocumentListSuite::New() when artboards cannot fit into available canvas size - (14000x14000 pts or 16383 x 16383 pts) */ -#define kAICantFitArtboardsErr 'CFCE' - - -/** The document color model used when creating a new document or opening - a document, set in \c #AINewDocumentPreset::docColorMode.*/ -typedef enum -{ - kAIUnknownColorModel = -1, - /** Grayscale (Unimplemented. If specified, an RGB document is created.) */ - kAIGrayColorModel = 0, - /** RGB */ - kAIRGBColorModel, - /** CMYK */ - kAICMYKColorModel -} AIColorModel; - -/** The preferred grid style for a new document, - set in \c #AINewDocumentPreset::docTransparencyGrid. */ -typedef enum -{ - /** No grid */ - kAITransparencyGridNone = 0, - /** Light gray lines */ - kAITransparencyGridLight, - /** Medium gray lines */ - kAITransparencyGridMedium, - /** Dark gray lines */ - kAITransparencyGridDark, - /** Red lines */ - kAITransparencyGridRed, - /** Orange lines */ - kAITransparencyGridOrange, - /** Green lines */ - kAITransparencyGridGreen, - /** Blue lines */ - kAITransparencyGridBlue, - /** Purple lines */ - kAITransparencyGridPurple -} AITransparencyGrid; - -/** The preferred preview mode for a new document, - set in \c #AINewDocumentPreset::docPreviewMode. */ -typedef enum -{ - /* The default preview mode */ - kAIPreviewModeDefault = 0, - /* Pixel preview mode */ - kAIPreviewModePixelPreview, - /* Overprint preview mode */ - kAIPreviewModeOverprintPreview -} AIPreviewMode; - -/** Raster resolution values for creating a new document, - set in \c #AINewDocumentPreset::docRasterResolution. - Values are in pixels-per-inch. This becomes the - Raster Effect Settings value for the document. */ -typedef enum -{ - /** Low or screen resolution, 72 PPI. This is the default. */ - kAIRasterResolutionScreen = 0, - /** Medium resolution, 150 PPI. */ - kAIRasterResolutionMedium, - /** High resolution, 300 PPI. */ - kAIRasterResolutionHigh -} AIRasterResolution; - -/** Artboard Layout for placing artboards while creating a new document, -set in \c #AINewDocumentPreset::docArtboardLayout.*/ -typedef enum -{ - /** Arrange artboards in grid by row pattern*/ - kAIArtboardLayoutGridByRow = 0 , - /** Arrange artboards in grid by column pattern*/ - kAIArtboardLayoutGridByCol, - /** Arrange artboards in a single row*/ - kAIArtboardLayoutRow, - /** Arrange artboards in a single column*/ - kAIArtboardLayoutCol, - /** Arrange artboards in grid by row pattern from right to left*/ - kAIArtboardLayoutRLGridByRow, - /** Arrange artboards in grid by column pattern from right to left*/ - kAIArtboardLayoutRLGridByCol, - /** Arrange artboards in single row from right to left*/ - kAIArtboardLayoutRLRow -}AIArtboardLayout; - -/** Parameters for creating a new document with \c #AIDocumentListSuite::New(). */ -typedef struct { - /** The title of the new document. An empty string results in the default - title, "Untitled \e nn". */ - ai::UnicodeString docTitle; - /** The width of the new document in document points. - Should be less than or equal to document canvas size*/ - AIReal docWidth; - /** The height of the new document in document points. - Should be less than or equal to document canvas size*/ - AIReal docHeight; - /** Number of artboards for new document. - Range (1:100).*/ - ai::int32 docNumArtboards; - /** Layout for artboards. See \c #AIDocumentSuite::AIArtboardLayout*/ - AIArtboardLayout docArtboardLayout; - /** Spacing between artboards. For one artboard spacing value is ignored*/ - AIReal docArtboardSpacing; - /** Number of rows (For rows layout) OR column(For column layouts)of artboards - For docArtboardLayout = kAIArtboardLayoutRow or - docArtboardLayout = kAIArtboardLayoutCol or - docArtboardLayout = kAIArtboardLayoutRLRow - docArtboardRowsOrCols value is ignored (if specified) & taken as 1 - For other layouts its range is - 1 to (docNumArtboards - 1), otherwise default value is taken - which is sqrt(docNumArtboards)*/ - ai::int32 docArtboardRowsOrCols; - /** The color mode of the new document, an \c #AIColorModel value. */ - AIColorModel docColorMode; - /** Ruler unit type for the new document. See \c #AIDocumentSuite::GetDocumentRulerUnits() */ - AIDocumentRulerUnitValue docUnits; - /** The preview mode for the new document, an \c #AIPreviewMode value. */ - AIPreviewMode docPreviewMode; - /** The style of transparency grid for the new document, an \c #AITransparencyGrid value. */ - AITransparencyGrid docTransparencyGrid; - /** The raster resolution for the new document, an \c AIRasterResolution value. */ - AIRasterResolution docRasterResolution; -} AINewDocumentPreset; - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These functions enumerate and operate on the list of open Illustrator documents. - - Many functions act on the current document and document view, which is - usually, but not always, the document and view of the active document window. - Use \c #Activate() to change the current document. Documents that you create - or open become current. - - Switching the current document or view commits any modifications that have been made. - This means that an undo entry is added to the list of undoable operations, any - deferred notifications are sent, and the document windows are updated. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDocumentListSuite and \c #kAIDocumentListVersion. -*/ -struct AIDocumentListSuite { - - /** Counts the number of open document windows. Multiple windows can be - open for a single document, so this is not a count of the number of open - documents. Use with \c #GetNthDocument() to retrieve documents. - @param count [out] A buffer in which to return the number of windows. - */ - AIAPI AIErr (*Count)( ai::int32* count ); - - /** Retrieves a document by position index in the list of open document windows. - Use with \c #Count() to iterate through windows. - @param document [out] A buffer in which to return the document reference. - @param lIndex The 0-based position index, in the range [0..numWindows-1]. - */ - AIAPI AIErr (*GetNthDocument)( AIDocumentHandle* document, ai::int32 lIndex ); - - /** Creates a new document and makes it the current document, and opens a window - for the new document, which becomes the front most document window. - @param preset (New in AICS3) The name of a startup preset to - use when creating the new document. If empty or invalid, the function uses the - startup template for the color mode specified in the \c parameter overrides. - Preset names are those that appear in the New Document dialog. - such as "Mobile", "Print", and so on. - @param parameter (New in AICS3) The parameters for the new document. These values - override those in the preset. When a parameter has a \c NULL value here, - the function uses the value from the preset.In case it is not NULL,It is required to - initialize all parameters of structure. - @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New - dialog to query user for parameters. - @param document [out] A buffer in which to return the document reference. - @note The parameters for this function changed in Illustrator 13 (Creative Suite 3). - */ - AIAPI AIErr (*New)( ai::UnicodeString& preset, AINewDocumentPreset *parameter, ActionDialogStatus dialogStatus, AIDocumentHandle* document ); - - /** Opens a document from a file in a new window, and makes the new document and view current. - If the document is already open, opens a new view for the document, - and makes that document and view current. - @param fileSpec The file. - @param colorMode The color mode for the new document. - @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New - dialog to query user for parameters. Otherwise, allows no user interaction. - @param forceCopy When true, duplicates the file and names the copy "Untitled", - regardless of whether it is marked as a template file. - @param document [out] A buffer in which to return the document reference. - */ - AIAPI AIErr (*Open)( const ai::FilePath &fileSpec, AIColorModel colorMode, - ActionDialogStatus dialogStatus, AIBoolean forceCopy, AIDocumentHandle* document ); - - /** Opens a document from a file in a new window, and makes the new document and view current. - This does not add this file to the recent files list. - If the document is already open, opens a new view for the document, - and makes that document and view current. - @param fileSpec The file. - @param colorMode The color mode for the new document. - @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New - dialog to query user for parameters. Otherwise, allows no user interaction. - @param forceCopy When true, duplicates the file and names the copy "Untitled", - regardless of whether it is marked as a template file. - @param document [out] A buffer in which to return the document reference. - */ - AIAPI AIErr (*OpenNoHistory)( const ai::FilePath &fileSpec, AIColorModel colorMode, - ActionDialogStatus dialogStatus, AIBoolean forceCopy, AIDocumentHandle* document ); - - /** Saves a document. If the document has not been saved before, prompts - the user for a location and save options. - @param document The document reference. - */ - AIAPI AIErr (*Save)( AIDocumentHandle document ); - - /** Closes a view for a document. If the document has only one open window, - this closes the document. If the document has been modified since last saved. - prompts the user to save. Switches the current document - to the active document window, regardless of whether it was the current view that - was closed. - @param document The document reference. - */ - AIAPI AIErr (*Close)( AIDocumentHandle document ); - - /** Closes all open document windows. This is equivalent to calling \c #Close() - for each open window. - */ - AIAPI AIErr (*CloseAll)(); - - /** Activates a window for a document, and makes that document and view current. - @param document The document reference. - @param bSetFocus Must be true. If false, the function does nothing. - */ - AIAPI AIErr (*Activate)( AIDocumentHandle document, ASBoolean bSetFocus ); - - /** Prints a document. - @param document The document reference. - @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the - Print dialog to query user for parameters. - */ - AIAPI AIErr (*Print)( AIDocumentHandle document, ActionDialogStatus dialogStatus ); - - // New in Illustrator 13.0 - - /** Retrieves the preset settings from one of the startup template documents. - @param preset The preset name. Preset names are those that appear in the - New Document dialog. such as "Mobile", "Basic RGB", and so on. - @param param [out] A buffer in which to return the settings. - */ - AIAPI AIErr (*GetPresetSettings)( ai::UnicodeString &preset, AINewDocumentPreset *param ); - - /** Reports the number of recent documents. Use with \c #GetNthRecentDocument() - to iterate through recent-documents list. - (Note that this function returns a numeric value, not an error code.) - @return The number of recent documents in the list. - */ - AIAPI ai::int32 (*CountRecentDocuments)(); - - /** Retrieves the location of a document from the recent-documents list. - Use with \c #CountRecentDocuments() to iterate through recent-document list. - @param index The 0-based position index of the document in the list. - @param document [out] The path of the document. - */ - AIAPI AIErr (*GetNthRecentDocument)( ai::int32 index, ai::FilePath& document ); - - /** Opens a document in the recent-documents list. - @param index The 0-based position index of the document in the list. - */ - AIAPI AIErr (*OpenNthRecentDocument)(ai::int32 index); - - /** Adds a file to the most-recently-used-files list - @param document The file to add. - */ - AIAPI AIErr (*AddToRecentFiles)(const ai::FilePath &document); -}; - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIDocumentList__ +#define __AIDocumentList__ + +/* + * Name: AIDocumentList.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Document Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIRealMath__ +#include "AIRealMath.h" +#endif + +#ifndef __AIDocument__ +#include "AIDocument.h" +#endif + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + +#ifndef __AIUnicodeString__ +#include "AIUnicodeString.h" +#endif + +#include "IAIFilePath.hpp" + +#include "AIHeaderBegin.h" + +#if defined(ILLUSTRATOR_MINIMAL) + #include "AIDocumentBasicTypes.h" +#endif + +/** @file AIDocumentList.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIDocumentListSuite "AI Document List Suite" +#define kAIDocumentListSuiteVersion11 AIAPI_VERSION(11) + +// latest version +#define kAIDocumentListSuiteVersion kAIDocumentListSuiteVersion11 +#define kAIDocumentListVersion kAIDocumentListSuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** @ingroup Errors + See \c #AIDocumentListSuite */ +#define kCantCreateNewDocumentErr 'ENEW' + +/** @ingroup Errors + Thrown by \c #AIDocumentListSuite::New() when negative value of docArtboardSpacing + (spacing between artboards, See \c #AINewDocumentPreset) is invalid. Negative value of docArtboardSpacing should + be less than or equal to MIN(artboard height, artboard width) depending on the artboard layout, so that artboards + can at most overlap. */ +#define kAIInvalidNegativeSpacingErr 'InNS' + +/** @ingroup Errors + Thrown by \c #AIDocumentListSuite::New() when artboards cannot fit into available canvas size + (14000x14000 pts or 16383 x 16383 pts) */ +#define kAICantFitArtboardsErr 'CFCE' + +#if !defined(ILLUSTRATOR_MINIMAL) +/** The document color model used when creating a new document or opening + a document, set in \c #AINewDocumentPreset::docColorMode.*/ +typedef enum +{ + kAIUnknownColorModel = -1, + /** Grayscale (Unimplemented. If specified, an RGB document is created.) */ + kAIGrayColorModel = 0, + /** RGB */ + kAIRGBColorModel, + /** CMYK */ + kAICMYKColorModel +} AIColorModel; + +/** The preferred grid style for a new document, + set in \c #AINewDocumentPreset::docTransparencyGrid. */ +typedef enum +{ + /** No grid */ + kAITransparencyGridNone = 0, + /** Light gray lines */ + kAITransparencyGridLight, + /** Medium gray lines */ + kAITransparencyGridMedium, + /** Dark gray lines */ + kAITransparencyGridDark, + /** Red lines */ + kAITransparencyGridRed, + /** Orange lines */ + kAITransparencyGridOrange, + /** Green lines */ + kAITransparencyGridGreen, + /** Blue lines */ + kAITransparencyGridBlue, + /** Purple lines */ + kAITransparencyGridPurple +} AITransparencyGrid; + +/** The preferred preview mode for a new document, + set in \c #AINewDocumentPreset::docPreviewMode. */ +typedef enum +{ + /* The default preview mode */ + kAIPreviewModeDefault = 0, + /* Pixel preview mode */ + kAIPreviewModePixelPreview, + /* Overprint preview mode */ + kAIPreviewModeOverprintPreview +} AIPreviewMode; + +/** Raster resolution values for creating a new document, + set in \c #AINewDocumentPreset::docRasterResolution. + Values are in pixels-per-inch. This becomes the + Raster Effect Settings value for the document. */ +typedef enum +{ + /** Low or screen resolution, 72 PPI. This is the default. */ + kAIRasterResolutionScreen = 0, + /** Medium resolution, 150 PPI. */ + kAIRasterResolutionMedium, + /** High resolution, 300 PPI. */ + kAIRasterResolutionHigh, + /** Low resolution, 36 PPI. */ + kAIRasterResolution36PPI +} AIRasterResolution; + +/** Artboard Layout for placing artboards while creating a new document, +set in \c #AINewDocumentPreset::docArtboardLayout.*/ +typedef enum +{ + /** Arrange artboards in grid by row pattern*/ + kAIArtboardLayoutGridByRow = 0 , + /** Arrange artboards in grid by column pattern*/ + kAIArtboardLayoutGridByCol, + /** Arrange artboards in a single row*/ + kAIArtboardLayoutRow, + /** Arrange artboards in a single column*/ + kAIArtboardLayoutCol, + /** Arrange artboards in grid by row pattern from right to left*/ + kAIArtboardLayoutRLGridByRow, + /** Arrange artboards in grid by column pattern from right to left*/ + kAIArtboardLayoutRLGridByCol, + /** Arrange artboards in single row from right to left*/ + kAIArtboardLayoutRLRow +}AIArtboardLayout; +#endif +/** Parameters for creating a new document with \c #AIDocumentListSuite::New(). */ +typedef struct { + /** The title of the new document. An empty string results in the default + title, "Untitled \e nn". */ + ai::UnicodeString docTitle; + /** The width of the new document in document points. + Should be less than or equal to document canvas size*/ + AIReal docWidth; + /** The height of the new document in document points. + Should be less than or equal to document canvas size*/ + AIReal docHeight; + /** Number of artboards for new document. + Range (1:100).*/ + ai::int32 docNumArtboards; + /** Layout for artboards. See \c #AIDocumentSuite::AIArtboardLayout*/ + AIArtboardLayout docArtboardLayout; + /** Spacing between artboards. For one artboard spacing value is ignored*/ + AIReal docArtboardSpacing; + /** Number of rows (For rows layout) OR column(For column layouts)of artboards + For docArtboardLayout = kAIArtboardLayoutRow or + docArtboardLayout = kAIArtboardLayoutCol or + docArtboardLayout = kAIArtboardLayoutRLRow + docArtboardRowsOrCols value is ignored (if specified) & taken as 1 + For other layouts its range is + 1 to (docNumArtboards - 1), otherwise default value is taken + which is sqrt(docNumArtboards)*/ + ai::int32 docArtboardRowsOrCols; + /** The color mode of the new document, an \c #AIColorModel value. */ + AIColorModel docColorMode; + /** Ruler unit type for the new document. See \c #AIDocumentSuite::GetDocumentRulerUnits() */ + AIDocumentRulerUnitValue docUnits; + /** The preview mode for the new document, an \c #AIPreviewMode value. */ + AIPreviewMode docPreviewMode; + /** The style of transparency grid for the new document, an \c #AITransparencyGrid value. */ + AITransparencyGrid docTransparencyGrid; + /** The raster resolution for the new document, an \c AIRasterResolution value. */ + AIRasterResolution docRasterResolution; + /** The bleed settings for the new document*/ + AIRealRect docBleedOffset; + /**Lock status for bleed settings */ + AIBoolean docBleedLinkStatus; + /**Custom filepath**/ + ai::FilePath docCustomFile; +} AINewDocumentPreset; + + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + These functions enumerate and operate on the list of open Illustrator documents. + + Many functions act on the current document and document view, which is + usually, but not always, the document and view of the active document window. + Use \c #Activate() to change the current document. Documents that you create + or open become current. + + Switching the current document or view commits any modifications that have been made. + This means that an undo entry is added to the list of undoable operations, any + deferred notifications are sent, and the document windows are updated. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIDocumentListSuite and \c #kAIDocumentListVersion. +*/ +struct AIDocumentListSuite { + + /** Counts the number of open document windows. Multiple windows can be + open for a single document, so this is not a count of the number of open + documents. Use with \c #GetNthDocument() to retrieve documents. + @param count [out] A buffer in which to return the number of windows. + */ + AIAPI AIErr (*Count)( ai::int32* count ); + + /** Retrieves a document by position index in the list of open document windows. + Use with \c #Count() to iterate through windows. + @param document [out] A buffer in which to return the document reference. + @param lIndex The 0-based position index, in the range [0..numWindows-1]. + */ + AIAPI AIErr (*GetNthDocument)( AIDocumentHandle* document, ai::int32 lIndex ); + + /** Creates a new document, makes it the current document, and opens a window + for the new document, which becomes the front most document window. + @param preset (New in AICS3) The name of a startup preset to + create a new document. If empty or invalid, the function uses the + startup template for the color mode specified in the \c parameter overrides. + Preset names are those that appear in the New Document dialog, + such as "Mobile", "Print", and so on. + @param parameter (New in AICS3) The parameters for the new document. These values + override those in the preset. When a parameter has a \c NULL value here, + the function uses the value from the preset.In case it is not NULL,It is required to + initialize all parameters of structure. + @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New + dialog to query user for parameters. + @param document [out] A buffer in which to return the document reference. + @note The parameters for this function changed in Illustrator 13 (Creative Suite 3). + */ + AIAPI AIErr (*New)( ai::UnicodeString& preset, AINewDocumentPreset *parameter, ActionDialogStatus dialogStatus, AIDocumentHandle* document ); + + /** Opens a document from a file in a new window, and makes the new document and view current. + If the document is already open, opens a new view for the document, + and makes that document and view current. + @param fileSpec The file. + @param colorMode The color mode for the new document. + @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New + dialog to query user for parameters. Otherwise, does not allow user interaction. + @param forceCopy When true, duplicates the file and names the copy "Untitled", + regardless of whether it is marked as a template file. + @param document [out] A buffer in which to return the document reference. + */ + AIAPI AIErr (*Open)( const ai::FilePath &fileSpec, AIColorModel colorMode, + ActionDialogStatus dialogStatus, AIBoolean forceCopy, AIDocumentHandle* document ); + + /** Opens a document from a file in a new window, and makes the new document and view current. + This does not add this file to the recent files list. + If the document is already open, opens a new view for the document, + and makes that document and view current. + @param fileSpec The file. + @param colorMode The color mode for the new document. + @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New + dialog to query user for parameters. Otherwise, does not allow user interaction. + @param forceCopy When true, duplicates the file and names the copy "Untitled", + regardless of whether it is marked as a template file. + @param document [out] A buffer in which to return the document reference. + */ + AIAPI AIErr (*OpenNoHistory)( const ai::FilePath &fileSpec, AIColorModel colorMode, + ActionDialogStatus dialogStatus, AIBoolean forceCopy, AIDocumentHandle* document ); + + /** Saves a document. If the document has not been saved before, prompts + the user for a location and save options. + @param document The document reference. + */ + AIAPI AIErr (*Save)( AIDocumentHandle document ); + + /** Closes a view for a document. If the document has only one open window, + this closes the document. If the document has been modified since last saved, + prompts the user to save. Switches the current document + to the active document window, regardless of whether it was the current view that + was closed. + @param document The document reference. + */ + AIAPI AIErr (*Close)( AIDocumentHandle document ); + + /** Closes all open document windows. This is equivalent to calling \c #Close() + for each open window. + */ + AIAPI AIErr (*CloseAll)(); + + /** Activates a window for a document, and makes that document and view current. + @param document The document reference. + @param bSetFocus Must be true. If false, the function does nothing. + */ + AIAPI AIErr (*Activate)( AIDocumentHandle document, ASBoolean bSetFocus ); + + /** Prints a document. + @param document The document reference. + @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the + Print dialog to query user for parameters. + */ + AIAPI AIErr (*Print)( AIDocumentHandle document, ActionDialogStatus dialogStatus ); + + // Introduced in Illustrator 13.0 + + /** Retrieves the preset settings from one of the startup template documents. + @param preset The preset name. Preset names are those that appear in the + New Document dialog. such as "Mobile", "Basic RGB", and so on. + @param param [out] A buffer in which to return the settings. + */ + AIAPI AIErr (*GetPresetSettings)( ai::UnicodeString &preset, AINewDocumentPreset *param ); + + /** Reports the number of recent documents. Use with \c #GetNthRecentDocument() + to iterate through recent-documents list. + (Note that this function returns a numeric value, not an error code.) + @return The number of recent documents in the list. + */ + AIAPI ai::int32 (*CountRecentDocuments)(); + + /** Retrieves the location of a document from the recent-documents list. + Use with \c #CountRecentDocuments() to iterate through recent-document list. + @param index The 0-based position index of the document in the list. + @param document [out] The path of the document. + */ + AIAPI AIErr (*GetNthRecentDocument)( ai::int32 index, ai::UnicodeString& document ); + + /** Opens a document in the recent-documents list. + @param index The 0-based position index of the document in the list. + */ + AIAPI AIErr (*OpenNthRecentDocument)(ai::int32 index); + + /** Adds a file to the most-recently-used-files list + @param document The file to add. + */ + AIAPI AIErr (*AddToRecentFiles)(const ai::FilePath &document); +}; + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentView.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentView.h index 4622e7f..3dd80f8 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentView.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDocumentView.h @@ -1,494 +1,640 @@ -#ifndef __AIDocumentView__ -#define __AIDocumentView__ - -/* - * Name: AIDocumentView.h - * Purpose: Adobe Illustrator Document View Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2008 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#ifndef __AIDocument__ -#include "AIDocument.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIDocumentView.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIDocumentViewSuite "AI Document View Suite" -#define kAIDocumentViewSuiteVersion13 AIAPI_VERSION(13) - -// latest version -#define kAIDocumentViewSuiteVersion kAIDocumentViewSuiteVersion13 -#define kAIDocumentViewVersion kAIDocumentViewSuiteVersion - -/** @ingroup Notifiers - Sent when the document view changes. See \c #AIDocumentViewSuite. */ -#define kAIDocumentViewChangedNotifier "AI Document View Changed Notifier" -/** @ingroup Notifiers - See \c #AIDocumentViewSuite::GetDocumentViewInvalidRect() */ -#define kAIDocumentViewInvalidRectChangedNotifier "AI Document View Invalid Rect Changed Notifier" -/** @ingroup Notifiers - Sent when the document view style changes. See \c #AIDocumentViewSuite. */ -#define kAIDocumentViewStyleChangedNotifier "AI Document View Style Changed Notifier" -/** @ingroup Notifiers - Sent when the active view switches from one view window to another. See \c #AIDocumentViewSuite. */ -#define kAIDocumentViewActiveViewChangedNotifier "AI Document View Style Active View Changed Notifier" -/** @ingroup Notifiers - Sent when the active view's plate set's state changes. See \c #AIDocumentViewSuite. */ -#define kAIDocumentViewOPPPlateStateChangedNotifier "AI Document View Plate State Changed Notifier" -/** @ingroup Notifiers -Sent when the edges visibility on the document is toggled.*/ -#define kAIDocumentViewEdgesVisibilityChangeNotifier "AI Document View Edges Visibility Change Notifier" -/** @ingroup Notifiers -Sent when title of the active document view is changed.*/ -#define kAIActiveDocViewTitleChangedNotifier "AI Document View Title Changed Notifier" - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** The same as a Macintosh GWorldPtr. Applies only to version 2 of this suite. */ -typedef void *AIDocumentPlatformViewBitmap; - -/** An opaque reference for a document view. */ -typedef struct _t_AIDocumentViewOpaque *AIDocumentViewHandle; - -/** Screen mode values, see \c #AIDocumentViewSuite::GetScreenMode(), - \c #AIDocumentViewSuite::SetScreenMode() */ -enum AIScreenMode { - /** Null mode, used only when there is no visible document */ - kNoScreenMode, - /** The normal display mode. Multiple windows are visible. */ - kNormalScreenMode, - /** A single view takes up the whole screen but the menu is visible. */ - kFullScreenWithMenuMode, - /** A single view takes up the whole screen, the menu is not visible. */ - kFullScreenNoMenuMode, - /** DEPRECATED: This mode behaves exactly like kNormalScreenMode. - Only one window on screen, edges flush with top and side panes. - Valid only for suite version 9. */ - kMaximizedWindowMode_deprecated, - /** Large dummy value ensures enum is 32-bits. */ - kDummyWindowMode = 0xffffffff -}; - -/** The page tiling structure that describes how artwork is printed - on one or more pages. See \c #AIDocumentViewSuite::GetPageTiling(). - Tiling operates on an \e art \e piece, which can be a set of art objects, - the entire art board, or a crop box. */ -struct AIPageTiling { - /** Horizontal and vertical number of page tiles on the art piece. A tile counts - if and only if some of its imageable area intersects the art piece bounds. */ - AIPoint tilesPerArt; - /** The total number of page tiles, tilesPerArt.x * tilesPerArt.y */ - ASInt16 tilesPerArtPiece; - /** The bounds of the artboard, whose dimensions are configured when - creating a new document or through document setup. - Page tiles may extend beyond these bounds, but they must intersect it. */ - AIRealRect bounds; - /** Size of paper, in points. */ - AIRealPoint paperSize; - /** Top left of first piece of paper, in page coordinates. */ - AIRealPoint paperOrigin; - /** Size of imageable page area, in points */ - AIRealPoint imageSize; - /** Top left of first imageable page area, in page coordinates. */ - AIRealPoint imageOrigin; - /** Unused. Art size plus gap */ - AIRealPoint pieceDelta; - /* When true, show outlines of page tiles. */ - AIBoolean showTiling; -}; - - -/** Outline mode view style; see \c #AIDocumentViewSuite::GetDocumentViewStyle(). - */ -#define kVsArtwork 0x0001 -/** Preview mode view style; see \c #AIDocumentViewSuite::GetDocumentViewStyle(). - */ -#define kVsPreview 0x0002 -/** Pixel preview mode view style; see \c #AIDocumentViewSuite::GetDocumentViewStyle(). - */ -#define kVsRaster 0x0040 -/** Unimplemented. Transparency attributes and masks are ignored. - */ -#define kVsOpaque 0x0080 -/** OPP preview mode view style; see \c #AIDocumentViewSuite::GetDocumentViewStyle(). - */ -#define kVsInk 0x0100 - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - Use these functions to get and set properties of a document view, - including the bounds, center, zoom, and screen mode. - - To operate on the current view, you can usually pass \c NULL for - the \c view parameter. To get a view reference for the current - view, pass 0 to \c #AIDocumentViewSuite::GetNthDocumentView(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDocumentViewSuite and \c #kAIDocumentViewVersion. -*/ -struct AIDocumentViewSuite { - - /** Retrieves the bounds of a document view in artwork coordinates (that is, - the portion of the artboard that is visible in the window). - @param view The view reference, or \c NULL for the current view. - @param bounds [out] A buffer in which to return the bounding box. - */ - AIAPI AIErr (*GetDocumentViewBounds) ( AIDocumentViewHandle view, AIRealRect *bounds ); - - /** Retrieves the center of a document view in artwork coordinates (that is, the - point of the artboard that maps to the center of the window). - @param view The view reference, or \c NULL for the current view. - @param center [out] A buffer in which to return the center point. - */ - AIAPI AIErr (*GetDocumentViewCenter) ( AIDocumentViewHandle view, AIRealPoint *center ); - - /** Sets the point of the artboard that maps to the center of the window for a view. - @param view The view reference, or \c NULL for the current view. - @param center The new center point. - */ - AIAPI AIErr (*SetDocumentViewCenter) ( AIDocumentViewHandle view, const AIRealPoint *center ); - - /** Retrieves the zoom factor for a view. This is the scale factor from artwork - coordinates to window coordinates. - @param view The view reference, or \c NULL for the current view. - @param zoom [out] A buffer in which to return the zoom factor, a percentage - value where 1 is 100% (actual size), 0.5 is 50% and 2 is 200%. - */ - AIAPI AIErr (*GetDocumentViewZoom) ( AIDocumentViewHandle view, AIReal *zoom ); - - /** Sets the scale factor from artwork coordinates to window coordinates for a view. - The scale factor is silently clamped to lie between the minimum and maximum values - supported (currently between 1/32 and 64). After adjusting the zoom, the document view - center remains unchanged. - @param view The view reference, or \c NULL for the current view. - @param zoom The new zoom factor, a percentage value where - 1 is 100% (actual size), 0.5 is 50% and 2 is 200%. - */ - AIAPI AIErr (*SetDocumentViewZoom) ( AIDocumentViewHandle view, AIReal zoom ); - - /** Converts a point from artwork coordinates to view (window) coordinates. The resulting - view coordinate is rounded to the nearest pixel. - @param view The view reference, or \c NULL for the current view. - @param artworkPoint The point to convert, in artwork coordinates. - @param viewPoint [out] A buffer in which to return the converted point, in window coordinates. - @see \c #FixedArtworkPointToViewPoint() (does not round) - */ - AIAPI AIErr (*ArtworkPointToViewPoint) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIPoint *viewPoint ); - - /** Converts a point from view coordinates to artwork coordinates. - @param view The view reference, or \c NULL for the current view. - @param viewPoint The point to convert, in window pixel coordinates. - @param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates. - @see \c #FixedViewPointToArtworkPoint() (takes floating-point coordinate values) - */ - AIAPI AIErr (*ViewPointToArtworkPoint) ( AIDocumentViewHandle view, const AIPoint *viewPoint, AIRealPoint *artworkPoint ); - - /** Gets the number of open views for the current document. Use with - \c #GetNthDocumentView() to iterate through views. - @param count [out] A buffer in which to return the number of views. - */ - AIAPI AIErr (*CountDocumentViews)( ai::int32 *count ); - - /** Retrieves a document view for the current document by position index. Use with - \c #CountDocumentViews() to iterate through views. - @param n The index, in the range [1..numViews], or 0 to get the current view. - @param view [out] A buffer in which to return the view reference. - */ - AIAPI AIErr (*GetNthDocumentView)( ai::int32 n, AIDocumentViewHandle *view ); - - /** Converts a point from artwork coordinates to view (window) coordinates. Does \e not round - the result. - @param view The view reference, or \c NULL for the current view. - @param artworkPoint The point to convert, in artwork coordinates. - @param viewPoint [out] A buffer in which to return the converted point, in window coordinates. - @see \c #ArtworkPointToViewPoint() (rounds result to nearest pixel) - */ - AIAPI AIErr (*FixedArtworkPointToViewPoint) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIRealPoint *viewPoint ); - - /** Converts a point from view coordinates to artwork coordinates. - @param view The view reference, or \c NULL for the current view. - @param viewPoint The point to convert, in window floating-point coordinates. - @param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates. - @see \c #ViewPointToArtworkPoint() (takes pixel coordinate values) - */ - AIAPI AIErr (*FixedViewPointToArtworkPoint) ( AIDocumentViewHandle view, const AIRealPoint *viewPoint, AIRealPoint *artworkPoint ); - - /** Sets the screen mode of a view. In the UI, the screen mode is - selected with icons at the bottom of the Tool palette. - @param view The view reference, or \c NULL for the current view. - @param mode The new screen mode. - */ - AIAPI AIErr (*SetScreenMode) ( AIDocumentViewHandle view, AIScreenMode mode ); - - /** Retrieves the screen mode of a view. In the UI, the screen mode is - shown by icons at the bottom of the Tool palette. - @param view The view reference, or \c NULL for the current view. - @param mode [out] A buffer in which to return the screen mode. - */ - AIAPI AIErr (*GetScreenMode) ( AIDocumentViewHandle view, AIScreenMode *mode ); - - /** Retrieves the page tiling information that describes how the artwork is printed - onto one or more pages. - @param pageTiling [out] A buffer in which to return the tiling information. - */ - AIAPI AIErr (*GetPageTiling) ( AIPageTiling *pageTiling ); - - /** Reports whether there is a visible template layer. - @param view The view reference, or \c NULL for the current view. - @param visible [out] A buffer in which to return true if the template layer is shown. - */ - AIAPI AIErr (*GetTemplateVisible) ( AIDocumentViewHandle view, AIBoolean *visible ); - - /** Scrolls a document window. - @param view The view reference, or \c NULL for the current view. - @param delta The vector by which to scroll, a horizontal and vertical - distance in points. - */ - AIAPI AIErr (*DocumentViewScrollDelta)( AIDocumentViewHandle view, AIRealPoint *delta); - - /** Retrieves a rectangle that encloses (at least) the portions of the viewed - document that have been changed and so need to be redrawn. This rectangle is reset to - be empty each time the \c #kAIDocumentViewInvalidRectChangedNotifier is sent. - @param view The view reference, or \c NULL for the current view. - @param invalidRect [out] A buffer in which to return the invalid area, in artwork coordinates. - */ - AIAPI AIErr (*GetDocumentViewInvalidRect)( AIDocumentViewHandle view, AIRealRect *invalidRect ); - - /** Sets the invalid rectangle for a view. This is the area that encloses - (at least) the portions of the viewed document that have been changed - and so need to be redrawn in the given view. - @param view The view reference, or \c NULL for the current view. - @param invalidRect The new area, in artwork coordinates. - @see \c #GetDocumentViewInvalidRect(), \c #SetDocumentViewInvalidDocumentRect() - */ - AIAPI AIErr (*SetDocumentViewInvalidRect)( AIDocumentViewHandle view, const AIRealRect *invalidRect ); - - /** Retrieves the display mode for a view. - @param view The view reference, or \c NULL for the current view. - @param style [out] A buffer in which to return the style, a logical OR of these bit flags:
- \c #kVsArtwork, \c #kVsPreview, \c #kVsRaster, \c #kVsOpaque, \c #kVsInk - */ - AIAPI AIErr (*GetDocumentViewStyle)( AIDocumentViewHandle view, ai::int16 *style ); - - /** Sets the invalid rectangle for all views of a viewed document. This is the area - that encloses (at least) the portions of the viewed document that have been - changed and so need to be redrawn in all views of that document. - @param view The view reference, or \c NULL for the current view. - @param invalidRect The new area, in artwork coordinates. - @see \c #SetDocumentViewInvalidRect() - */ - AIAPI AIErr (*SetDocumentViewInvalidDocumentRect)( AIDocumentViewHandle view, const AIRealRect *invalidRect ); - - /** Reports whether page tiling is shown for the current view. Each view has its own setting. - @param show [out] A buffer in which to return true if page tiling is shown. - */ - AIAPI AIErr (*GetShowPageTiling) ( AIBoolean *show ); - - /** Sets the page tiling mode for the current view. Each view has its own setting. - @param show True to turn page tiling on, false to turn it off. - */ - AIAPI AIErr (*SetShowPageTiling) ( AIBoolean show ); - - /** Retrieves grid options for a view. - @param view The view reference, or \c NULL for the current view. - @param show [out] A buffer in which to return true if the grid is visible. - @param snap [out] A buffer in which to return true if the snap-to-grid is on. - */ - AIAPI AIErr (*GetGridOptions) ( AIDocumentViewHandle view, AIBoolean* show, AIBoolean* snap ); - - /** Sets grid options for a view - @param view The view reference, or \c NULL for the current view. - @param show True to make the grid visible, false to hide it. - @param snap True to turn snap-to-grid on, false to turn it off. - */ - AIAPI AIErr (*SetGridOptions) ( AIDocumentViewHandle view, AIBoolean show, AIBoolean snap ); - - /** Reports whether the transparency grid is shown in a view. - @param view The view reference, or \c NULL for the current view. - @param show [out] A buffer in which to return true if the transparency grid is visible. - */ - AIAPI AIErr (*GetShowTransparencyGrid) ( AIDocumentViewHandle view, AIBoolean* show ); - - /** Sets whether the transparency grid is shown in the view. - @param view The view reference, or \c NULL for the current view. - @param show True to make the transparency grid visible, false to hide it. - */ - AIAPI AIErr (*SetShowTransparencyGrid) ( AIDocumentViewHandle view, AIBoolean show ); - - /** Retrieves the document displayed in a view. - @param view The view reference, or \c NULL for the current view. - @param document [out] A buffer in which to return the document reference. - */ - AIAPI AIErr (*GetDocumentViewDocument) ( AIDocumentViewHandle view, AIDocumentHandle *document ); - - /** Forces all document views to not be obscured by the Control palette. - */ - AIAPI AIErr (*ForceDocumentViewsOnScreen) ( void ); - - /** Retrieves the visibility state of the guides. - @param view The view reference, or \c NULL for the current view. - @param show [out] A buffer in which to return true if the guides are visible. - */ - AIAPI AIErr (*GetShowGuides) ( AIDocumentViewHandle view, AIBoolean* show ); - - /** Sets the visibility state of the guides. - @param view The view reference, or \c NULL for the current view. - @param show True to make the guides visible, false to hide them. - */ - AIAPI AIErr (*SetShowGuides) ( AIDocumentViewHandle view, AIBoolean show ); - - /** Retrieves the visibility state of the edges of the selection. - @param view The view reference, or \c NULL for the current view. - @param show True to make the edges visible, false to hide them. - */ - AIAPI AIErr (*GetShowEdges) ( AIDocumentViewHandle view, AIBoolean* show ); - - /** Sets the visibility state of the edges of the selection. - @param view The view reference, or \c NULL for the current view. - @param show True to make the edges visible, false to hide them. - */ - AIAPI AIErr (*SetShowEdges) ( AIDocumentViewHandle view, AIBoolean show ); - - /** Captures the contents of the view window (excluding scrollbars, etc.) to - a TIFF file. Artboards are centered in window before capture. - @param view The view reference, or \c NULL for the current view. - @param saveFilename Full path and name of TIFF file to create. - @param windowSize Size to set window before capture. Will restore - original window size before returning. - */ - AIAPI AIErr (*SaveImage) ( AIDocumentViewHandle view, const ai::UnicodeString &saveFilename, - const AIPoint &windowSize ); - - /** Determines the current state of video rulers if they are visible or not. - @param view The view reference, or \c NULL for the current view. - @param visible True if the artboard rulers are visible, false otherwise. - */ - AIAPI AIErr (*IsArtboardRulerVisible) ( const AIDocumentViewHandle view, AIBoolean *visible ); - - /** Sets the video rulers visibility on or off. - @param view The view reference, or \c NULL for the current view. - @param visible True if artboard ruler visibility is to be turned on, false otherwise. - */ - AIAPI AIErr (*SetArtboardRulerVisible) ( const AIDocumentViewHandle view, const AIBoolean visible ); - - /** Returns the number plates in the plate set for the view. The plate set is only relevant for OPP - view mode. - @param view The view reference, or \c NULL for the current view. - @param count [out] The number of plates. - */ - AIAPI AIErr (*CountOPPPlates) ( AIDocumentViewHandle view, ai::int32& count ); - - /** Get an identifier for the nth plate in the view's plate set. - @param view The view reference, or \c NULL for the current view. - @param plate [out] The plate identifier. - */ - AIAPI AIErr (*GetNthOPPPlate) ( AIDocumentViewHandle view, ai::int32 n, ai::ColorSpace& plate ); - - /** Get the visibility state for \c plate in the current view's plate state. Visibility is only - recognized for OPP view mode. - @param view The view reference, or \c NULL for the current view. - @param plate Identifier for the plate to get the state of. - @param isOn [out] The current visibility state of \c plate. - */ - AIAPI AIErr (*GetOPPPlateState) ( AIDocumentViewHandle view, const ai::ColorSpace& plate, AIBoolean& isOn ); - - /** Set the visibility state for \c plate in the current view's plate state. Visibility is only - recognized for OPP view mode. Invalid \c plate identifiers are ignored. - @param view The view reference, or \c NULL for the current view. - @param plate Identifier for the plate to get the state of. - @param isOn The new visibility state of \c plate. - */ - AIAPI AIErr (*SetOPPPlateState) ( AIDocumentViewHandle view, const ai::ColorSpace& plate, const AIBoolean isOn ); - - /** Sets the display mode for a view. Currently these flags are mostly mutually exclusive. \c #kVsInk - only makes sense combined with \c #kVsPreview. \c #kVsArtwork, \c #kVsPreview, and \c #kVsRaster are - mutually exclusive. - @param view The view reference, or \c NULL for the current view. - @param style A logical OR of these bit flags:
- \c #kVsArtwork, \c #kVsPreview, \c #kVsRaster, \c #kVsOpaque, \c #kVsInk - @param mask A logical OR of the same bit values as style indicating which - bits from style to change. - */ - AIAPI AIErr (*SetDocumentViewStyle)( AIDocumentViewHandle view, ai::int16 style, ai::int16 mask ); - - /** Determines whether the rulers are shown in Artboard co-ordinates. - @param view The view reference, or \c NULL for the current view. - @param isYes True if the rulers are shown in Artboard co-ordinates, false otherwise. - */ - AIAPI AIErr (*IsRulerInArtboardCoordinates)( const AIDocumentViewHandle view, ASBoolean *isYes ); - - /** Sets the rulers to use Artboard co-ordinates. - @param view The view reference, or \c NULL for the current view. - @param state True if the rulers are shown in Artboard co-ordinates, false otherwise. - */ - AIAPI AIErr (*UseArtboardCoordinatesInRuler) ( const AIDocumentViewHandle view, const ASBoolean state ); - - /** Returns whether GPU Preview mode is enabled for the view. [WIN Only] - @param view The view reference, or \c NULL for the current view. - @return True if Accelerated Preview mode is ON, false if CPU rendering mode is on. - */ - AIAPI AIBoolean (*IsGPUPreviewModeOn)(const AIDocumentViewHandle view); - - /** Returns color value of location inside document window. - If location or window does not correspond to any document window of AI which is in GPU preview mode, bad parameter error is returned - Only implemented for windows platform. - */ - AIAPI AIErr (*GetGPUPixel)(AIWindowRef window, AIPoint location, AIColor& color); - - /** Returns the bounds of the area visible to the user, ie after excluding the area covered by ruler and isolation mode UI. - @param view The view reference, or \c NULL for the current view. - @param bounds [out] A buffer in which to return the bounding box. - */ - AIAPI AIErr (*GetDocumentViewVisibleArea)(AIDocumentViewHandle view, AIRealRect *bounds); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIDocumentView__ +#define __AIDocumentView__ + +/* + * Name: AIDocumentView.h + * Purpose: Adobe Illustrator Document View Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2017 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIRealMath__ +#include "AIRealMath.h" +#endif + +#ifndef __AIDocument__ +#include "AIDocument.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIDocumentView.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIDocumentViewSuite "AI Document View Suite" +#define kAIDocumentViewSuiteVersion15 AIAPI_VERSION(15) + +// latest version +#define kAIDocumentViewSuiteVersion kAIDocumentViewSuiteVersion15 +#define kAIDocumentViewVersion kAIDocumentViewSuiteVersion + +/** @ingroup Notifiers + Sent when the document view changes. See \c #AIDocumentViewSuite. */ +#define kAIDocumentViewChangedNotifier "AI Document View Changed Notifier" +/** @ingroup Notifiers + See \c #AIDocumentViewSuite::GetDocumentViewInvalidRect() */ +#define kAIDocumentViewInvalidRectChangedNotifier "AI Document View Invalid Rect Changed Notifier" +/** @ingroup Notifiers + Sent when the document view style changes. See \c #AIDocumentViewSuite. */ +#define kAIDocumentViewStyleChangedNotifier "AI Document View Style Changed Notifier" +/** @ingroup Notifiers + Sent when the active view switches from one view window to another. See \c #AIDocumentViewSuite. */ +#define kAIDocumentViewActiveViewChangedNotifier "AI Document View Style Active View Changed Notifier" +/** @ingroup Notifiers + Sent when the active view's plate set's state changes. See \c #AIDocumentViewSuite. */ +#define kAIDocumentViewOPPPlateStateChangedNotifier "AI Document View Plate State Changed Notifier" +/** @ingroup Notifiers +Sent when the edges visibility on the document is toggled.*/ +#define kAIDocumentViewEdgesVisibilityChangeNotifier "AI Document View Edges Visibility Change Notifier" +/** @ingroup Notifiers +Sent when title of the active document view is changed.*/ +#define kAIActiveDocViewTitleChangedNotifier "AI Document View Title Changed Notifier" +/** @Notifiers + Sent when the trim view state of a document is toggled. */ +#define kAIDocViewTrimViewStateChangedNotifier "AI Document View Trim View State Changed Notifier" + +/** @Notifiers + Sent when Document view render mode is changed */ +#define kAIDocViewRenderModeChangedNotifier "AI Document View Render Mode Changed Notifier" +/******************************************************************************* + ** + ** Types + ** + **/ + +/** The same as a Macintosh GWorldPtr. Applies only to version 2 of this suite. */ +typedef void *AIDocumentPlatformViewBitmap; + +/** An opaque reference for a document view. */ +typedef struct _t_AIDocumentViewOpaque *AIDocumentViewHandle; + +/** Screen mode values, see \c #AIDocumentViewSuite::GetScreenMode(), + \c #AIDocumentViewSuite::SetScreenMode() */ +enum AIScreenMode { + /** Null mode, used only when there is no visible document */ + kNoScreenMode, + /** The normal display mode. Multiple windows are visible. */ + kNormalScreenMode, + /** A single view takes up the whole screen but the menu is visible. */ + kFullScreenWithMenuMode, + /** A single view takes up the whole screen, the menu is not visible. */ + kFullScreenNoMenuMode, + /** A single artboard takes up the whole screen, annotations are not visible. */ + kAIPresentationMode, + /** Large dummy value ensures enum is 32-bits. */ + kDummyWindowMode = 0xffffffff +}; + +/** The page tiling structure that describes how artwork is printed + on one or more pages. See \c #AIDocumentViewSuite::GetPageTiling(). + Tiling operates on an \e art \e piece, which can be a set of art objects, + the entire art board, or a crop box. */ +struct AIPageTiling { + /** Horizontal and vertical number of page tiles on the art piece. A tile counts + if and only if some of its imageable area intersects the art piece bounds. */ + AIPoint tilesPerArt; + /** The total number of page tiles, tilesPerArt.x * tilesPerArt.y */ + ASInt16 tilesPerArtPiece; + /** The bounds of the artboard, whose dimensions are configured when + creating a new document or through document setup. + Page tiles may extend beyond these bounds, but they must intersect it. */ + AIRealRect bounds; + /** Size of paper, in points. */ + AIRealPoint paperSize; + /** Top left of first piece of paper, in page coordinates. */ + AIRealPoint paperOrigin; + /** Size of imageable page area, in points */ + AIRealPoint imageSize; + /** Top left of first imageable page area, in page coordinates. */ + AIRealPoint imageOrigin; + /** Unused. Art size plus gap */ + AIRealPoint pieceDelta; + /* When true, show outlines of page tiles. */ + AIBoolean showTiling; +}; + + +/** Outline mode view style; see \c #AIDocumentViewSuite::GetDocumentViewStyle(). + */ +#define kVsArtwork 0x0001 +/** Preview mode view style; see \c #AIDocumentViewSuite::GetDocumentViewStyle(). + */ +#define kVsPreview 0x0002 +/** Pixel preview mode view style; see \c #AIDocumentViewSuite::GetDocumentViewStyle(). + */ +#define kVsRaster 0x0040 +/** Unimplemented. Transparency attributes and masks are ignored. + */ +#define kVsOpaque 0x0080 +/** OPP preview mode view style; see \c #AIDocumentViewSuite::GetDocumentViewStyle(). + */ +#define kVsInk 0x0100 + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + Use these functions to get and set properties of a document view, + including the bounds, center, zoom, and screen mode. + + To operate on the current view, you can usually pass \c NULL for + the \c view parameter. To get a view reference for the current + view, pass 0 to \c #AIDocumentViewSuite::GetNthDocumentView(). + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIDocumentViewSuite and \c #kAIDocumentViewVersion. +*/ +struct AIDocumentViewSuite { + + /** Retrieves the bounds of a document view in artwork coordinates (that is, + the portion of the artboard that is visible in the window). + @param view The view reference, or \c NULL for the current view. + @param bounds [out] A buffer in which to return the bounding box. + */ + AIAPI AIErr (*GetDocumentViewBounds) ( AIDocumentViewHandle view, AIRealRect *bounds ); + + /** Retrieves the center of a document view in artwork coordinates (that is, the + point of the artboard that maps to the center of the window). + @param view The view reference, or \c NULL for the current view. + @param center [out] A buffer in which to return the center point. + */ + AIAPI AIErr (*GetDocumentViewCenter) ( AIDocumentViewHandle view, AIRealPoint *center ); + + /** Sets the point of the artboard that maps to the center of the window for a view. + @param view The view reference, or \c NULL for the current view. + @param center The new center point. + */ + AIAPI AIErr (*SetDocumentViewCenter) ( AIDocumentViewHandle view, const AIRealPoint *center ); + + /** Retrieves the zoom factor for a view that the user is seeing. This is the zoom value that + the user is seeing on the status bar. + @param view The view reference, or \c NULL for the current view. + @param zoom [out] A buffer in which to return the zoom factor, a percentage + value where 1 is 100% (actual size), 0.5 is 50% and 2 is 200%. + */ + AIAPI AIErr(*GetDocumentViewUserVisibleZoom) (AIDocumentViewHandle view, AIReal *zoom); + + /** Retrieves the zoom factor for a view. This is the scale factor from artwork + coordinates to window coordinates. + @param view The view reference, or \c NULL for the current view. + @param zoom [out] A buffer in which to return the zoom factor, a percentage + value where 1 is 100% (actual size), 0.5 is 50% and 2 is 200%. + */ + AIAPI AIErr (*GetDocumentViewZoom) ( AIDocumentViewHandle view, AIReal *zoom ); + + /** Sets the scale factor from artwork coordinates to window coordinates for a view. + The scale factor is silently clamped to lie between the minimum and maximum values + supported (currently between 1/32 and 64). After adjusting the zoom, the document view + center remains unchanged. + @param view The view reference, or \c NULL for the current view. + @param zoom The new zoom factor, a percentage value where + 1 is 100% (actual size), 0.5 is 50% and 2 is 200%. + */ + AIAPI AIErr (*SetDocumentViewZoom) ( AIDocumentViewHandle view, AIReal zoom ); + + /** Sets the zoom factor of the view that the user is seeing on the status bar. + The scale factor is silently clamped to lie between the minimum and maximum values + supported (currently between 1/32 and 64). After adjusting the zoom, the document view + center remains unchanged. + @param view The view reference, or \c NULL for the current view. + @param zoom The new zoom factor, a percentage value where + 1 is 100% (actual size), 0.5 is 50% and 2 is 200%. + */ + AIAPI AIErr(*SetDocumentViewUserVisibleZoom) (AIDocumentViewHandle view, AIReal zoom); + + /** Converts a point from artwork coordinates to view (window) coordinates. The resulting + view coordinate is rounded to the nearest pixel. + @param view The view reference, or \c NULL for the current view. + @param artworkPoint The point to convert, in artwork coordinates. + @param viewPoint [out] A buffer in which to return the converted point, in window coordinates. + @see \c #FixedArtworkPointToViewPoint() (does not round) + */ + AIAPI AIErr (*ArtworkPointToViewPoint) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIPoint *viewPoint ); + + /** Converts a point from view coordinates to artwork coordinates. + @param view The view reference, or \c NULL for the current view. + @param viewPoint The point to convert, in window pixel coordinates. + @param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates. + @see \c #FixedViewPointToArtworkPoint() (takes floating-point coordinate values) + */ + AIAPI AIErr (*ViewPointToArtworkPoint) ( AIDocumentViewHandle view, const AIPoint *viewPoint, AIRealPoint *artworkPoint ); + + /** Gets the number of open views for the current document. Use with + \c #GetNthDocumentView() to iterate through views. + @param count [out] A buffer in which to return the number of views. + */ + AIAPI AIErr (*CountDocumentViews)( ai::int32 *count ); + + /** Retrieves a document view for the current document by position index. Use with + \c #CountDocumentViews() to iterate through views. + @param n The index, in the range [1..numViews], or 0 to get the current view. + @param view [out] A buffer in which to return the view reference. + */ + AIAPI AIErr (*GetNthDocumentView)( ai::int32 n, AIDocumentViewHandle *view ); + + /** Converts a point from artwork coordinates to view (window) coordinates. Does \e not round + the result. + @param view The view reference, or \c NULL for the current view. + @param artworkPoint The point to convert, in artwork coordinates. + @param viewPoint [out] A buffer in which to return the converted point, in window coordinates. + @see \c #ArtworkPointToViewPoint() (rounds result to nearest pixel) + */ + AIAPI AIErr (*FixedArtworkPointToViewPoint) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIRealPoint *viewPoint ); + + /** Converts a point from view coordinates to artwork coordinates. + @param view The view reference, or \c NULL for the current view. + @param viewPoint The point to convert, in window floating-point coordinates. + @param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates. + @see \c #ViewPointToArtworkPoint() (takes pixel coordinate values) + */ + AIAPI AIErr (*FixedViewPointToArtworkPoint) ( AIDocumentViewHandle view, const AIRealPoint *viewPoint, AIRealPoint *artworkPoint ); + + /** Sets the screen mode of a view. In the UI, the screen mode is + selected with icons at the bottom of the Tool palette. + @param view The view reference, or \c NULL for the current view. + @param mode The new screen mode. + */ + AIAPI AIErr (*SetScreenMode) ( AIDocumentViewHandle view, AIScreenMode mode ); + + /** Retrieves the screen mode of a view. In the UI, the screen mode is + shown by icons at the bottom of the Tool palette. + @param view The view reference, or \c NULL for the current view. + @param mode [out] A buffer in which to return the screen mode. + */ + AIAPI AIErr (*GetScreenMode) ( AIDocumentViewHandle view, AIScreenMode *mode ); + + /** Retrieves the page tiling information that describes how the artwork is printed + onto one or more pages. + @param pageTiling [out] A buffer in which to return the tiling information. + */ + AIAPI AIErr (*GetPageTiling) ( AIPageTiling *pageTiling ); + + /** Reports whether there is a visible template layer. + @param view The view reference, or \c NULL for the current view. + @param visible [out] A buffer in which to return true if the template layer is shown. + */ + AIAPI AIErr (*GetTemplateVisible) ( AIDocumentViewHandle view, AIBoolean *visible ); + + /** Scrolls a document window. + @param view The view reference, or \c NULL for the current view. + @param delta The vector by which to scroll, a horizontal and vertical + distance in points. + */ + AIAPI AIErr (*DocumentViewScrollDelta)( AIDocumentViewHandle view, AIRealPoint *delta); + + /** Retrieves a rectangle that encloses (at least) the portions of the viewed + document that have been changed and so need to be redrawn. This rectangle is reset to + be empty each time the \c #kAIDocumentViewInvalidRectChangedNotifier is sent. + @param view The view reference, or \c NULL for the current view. + @param invalidRect [out] A buffer in which to return the invalid area, in artwork coordinates. + */ + AIAPI AIErr (*GetDocumentViewInvalidRect)( AIDocumentViewHandle view, AIRealRect *invalidRect ); + + /** Sets the invalid rectangle for a view. This is the area that encloses + (at least) the portions of the viewed document that have been changed + and so need to be redrawn in the given view. + @param view The view reference, or \c NULL for the current view. + @param invalidRect The new area, in artwork coordinates. + @see \c #GetDocumentViewInvalidRect(), \c #SetDocumentViewInvalidDocumentRect() + */ + AIAPI AIErr (*SetDocumentViewInvalidRect)( AIDocumentViewHandle view, const AIRealRect *invalidRect ); + + /** Retrieves the display mode for a view. + @param view The view reference, or \c NULL for the current view. + @param style [out] A buffer in which to return the style, a logical OR of these bit flags:
+ \c #kVsArtwork, \c #kVsPreview, \c #kVsRaster, \c #kVsOpaque, \c #kVsInk + */ + AIAPI AIErr (*GetDocumentViewStyle)( AIDocumentViewHandle view, ai::int16 *style ); + + /** Sets the invalid rectangle for all views of a viewed document. This is the area + that encloses (at least) the portions of the viewed document that have been + changed and so need to be redrawn in all views of that document. + @param view The view reference, or \c NULL for the current view. + @param invalidRect The new area, in artwork coordinates. + @see \c #SetDocumentViewInvalidRect() + */ + AIAPI AIErr (*SetDocumentViewInvalidDocumentRect)( AIDocumentViewHandle view, const AIRealRect *invalidRect ); + + /** Reports whether page tiling is shown for the current view. Each view has its own setting. + @param show [out] A buffer in which to return true if page tiling is shown. + */ + AIAPI AIErr (*GetShowPageTiling) ( AIBoolean *show ); + + /** Sets the page tiling mode for the current view. Each view has its own setting. + @param show True to turn page tiling on, false to turn it off. + */ + AIAPI AIErr (*SetShowPageTiling) ( AIBoolean show ); + + /** Retrieves grid options for a view. + @param view The view reference, or \c NULL for the current view. + @param show [out] A buffer in which to return true if the grid is visible. + @param snap [out] A buffer in which to return true if the snap-to-grid is on. + */ + AIAPI AIErr (*GetGridOptions) ( AIDocumentViewHandle view, AIBoolean* show, AIBoolean* snap ); + + /** Sets grid options for a view + @param view The view reference, or \c NULL for the current view. + @param show True to make the grid visible, false to hide it. + @param snap True to turn snap-to-grid on, false to turn it off. + */ + AIAPI AIErr (*SetGridOptions) ( AIDocumentViewHandle view, AIBoolean show, AIBoolean snap ); + + /** Reports whether the transparency grid is shown in a view. + @param view The view reference, or \c NULL for the current view. + @param show [out] A buffer in which to return true if the transparency grid is visible. + */ + AIAPI AIErr (*GetShowTransparencyGrid) ( AIDocumentViewHandle view, AIBoolean* show ); + + /** Sets whether the transparency grid is shown in the view. + @param view The view reference, or \c NULL for the current view. + @param show True to make the transparency grid visible, false to hide it. + */ + AIAPI AIErr (*SetShowTransparencyGrid) ( AIDocumentViewHandle view, AIBoolean show ); + + /** Retrieves the document displayed in a view. + @param view The view reference, or \c NULL for the current view. + @param document [out] A buffer in which to return the document reference. + */ + AIAPI AIErr (*GetDocumentViewDocument) ( AIDocumentViewHandle view, AIDocumentHandle *document ); + + /** Forces all document views to not be obscured by the Control palette. + */ + AIAPI AIErr (*ForceDocumentViewsOnScreen) ( void ); + + /** Retrieves the visibility state of the guides. + @param view The view reference, or \c NULL for the current view. + @param show [out] A buffer in which to return true if the guides are visible. + */ + AIAPI AIErr (*GetShowGuides) ( AIDocumentViewHandle view, AIBoolean* show ); + + /** Sets the visibility state of the guides. + @param view The view reference, or \c NULL for the current view. + @param show True to make the guides visible, false to hide them. + */ + AIAPI AIErr (*SetShowGuides) ( AIDocumentViewHandle view, AIBoolean show ); + + /** Retrieves the visibility state of the edges of the selection. + @param view The view reference, or \c NULL for the current view. + @param show True to make the edges visible, false to hide them. + */ + AIAPI AIErr (*GetShowEdges) ( AIDocumentViewHandle view, AIBoolean* show ); + + /** Sets the visibility state of the edges of the selection. + @param view The view reference, or \c NULL for the current view. + @param show True to make the edges visible, false to hide them. + */ + AIAPI AIErr (*SetShowEdges) ( AIDocumentViewHandle view, AIBoolean show ); + + /** Captures the contents of the view window (excluding scrollbars, etc.) to + a TIFF file. Artboards are centered in window before capture. + @param view The view reference, or \c NULL for the current view. + @param saveFilename Full path and name of TIFF file to create. + @param windowSize Size to set window before capture. Will restore + original window size before returning. + */ + AIAPI AIErr (*SaveImage) ( AIDocumentViewHandle view, const ai::UnicodeString &saveFilename, + const AIPoint &windowSize ); + + /** Determines the current state of video rulers if they are visible or not. + @param view The view reference, or \c NULL for the current view. + @param visible True if the artboard rulers are visible, false otherwise. + */ + AIAPI AIErr (*IsArtboardRulerVisible) ( const AIDocumentViewHandle view, AIBoolean *visible ); + + /** Sets the video rulers visibility on or off. + @param view The view reference, or \c NULL for the current view. + @param visible True if artboard ruler visibility is to be turned on, false otherwise. + */ + AIAPI AIErr (*SetArtboardRulerVisible) ( const AIDocumentViewHandle view, const AIBoolean visible ); + + /** Returns the number plates in the plate set for the view. The plate set is only relevant for OPP + view mode. + @param view The view reference, or \c NULL for the current view. + @param count [out] The number of plates. + */ + AIAPI AIErr (*CountOPPPlates) ( AIDocumentViewHandle view, ai::int32& count ); + + /** Get an identifier for the nth plate in the view's plate set. + @param view The view reference, or \c NULL for the current view. + @param plate [out] The plate identifier. + */ + AIAPI AIErr (*GetNthOPPPlate) ( AIDocumentViewHandle view, ai::int32 n, ai::ColorSpace& plate ); + + /** Get the visibility state for \c plate in the current view's plate state. Visibility is only + recognized for OPP view mode. + @param view The view reference, or \c NULL for the current view. + @param plate Identifier for the plate to get the state of. + @param isOn [out] The current visibility state of \c plate. + */ + AIAPI AIErr (*GetOPPPlateState) ( AIDocumentViewHandle view, const ai::ColorSpace& plate, AIBoolean& isOn ); + + /** Set the visibility state for \c plate in the current view's plate state. Visibility is only + recognized for OPP view mode. Invalid \c plate identifiers are ignored. + @param view The view reference, or \c NULL for the current view. + @param plate Identifier for the plate to get the state of. + @param isOn The new visibility state of \c plate. + */ + AIAPI AIErr (*SetOPPPlateState) ( AIDocumentViewHandle view, const ai::ColorSpace& plate, const AIBoolean isOn ); + + /** Sets the display mode for a view. Currently these flags are mostly mutually exclusive. \c #kVsInk + only makes sense combined with \c #kVsPreview. \c #kVsArtwork, \c #kVsPreview, and \c #kVsRaster are + mutually exclusive. + @param view The view reference, or \c NULL for the current view. + @param style A logical OR of these bit flags:
+ \c #kVsArtwork, \c #kVsPreview, \c #kVsRaster, \c #kVsOpaque, \c #kVsInk + @param mask A logical OR of the same bit values as style indicating which + bits from style to change. + */ + AIAPI AIErr (*SetDocumentViewStyle)( AIDocumentViewHandle view, ai::int16 style, ai::int16 mask ); + + /** Determines whether the rulers are shown in Artboard co-ordinates. + @param view The view reference, or \c NULL for the current view. + @param isYes True if the rulers are shown in Artboard co-ordinates, false otherwise. + */ + AIAPI AIErr (*IsRulerInArtboardCoordinates)( const AIDocumentViewHandle view, ASBoolean *isYes ); + + /** Sets the rulers to use Artboard co-ordinates. + @param view The view reference, or \c NULL for the current view. + @param state True if the rulers are shown in Artboard co-ordinates, false otherwise. + */ + AIAPI AIErr (*UseArtboardCoordinatesInRuler) ( const AIDocumentViewHandle view, const ASBoolean state ); + + /** Returns whether GPU Preview mode is enabled for the view. + @param view The view reference, or \c NULL for the current view. + @return True if Accelerated Preview mode is ON, false if CPU rendering mode is on. + */ + AIAPI AIBoolean (*IsGPUPreviewModeOn)(const AIDocumentViewHandle view); + + /** Returns whether GPU Rendering is enabled for the view. + @param view The view reference, or \c NULL for the current view. + @return True if GPU Rendering is ON, false if CPU rendering mode is on. + */ + AIAPI AIBoolean(*IsGPURenderingOn)(const AIDocumentViewHandle view); + + /** Returns color value of location inside document window. + If location or window does not correspond to any document window of AI which is in GPU preview mode, bad parameter error is returned + Only implemented for windows platform. + */ + AIAPI AIErr (*GetGPUPixel)(AIWindowRef window, AIPoint location, AIColor& color); + + /** Returns the bounds of the area visible to the user, ie after excluding the area covered by ruler and isolation mode UI. + @param view The view reference, or \c NULL for the current view. + @param bounds [out] A buffer in which to return the bounding box. + */ + AIAPI AIErr (*GetDocumentViewVisibleArea)(AIDocumentViewHandle view, AIRealRect *bounds); + + /** + Sets whether view should clip objects to Artboards. + */ + AIAPI AIErr (*SetClipViewToArtboards) (AIDocumentViewHandle view, AIBoolean clipToActiveArtboard); + + /** + Returns whether the view is clipped to artboards. + */ + AIAPI AIErr(*GetClipViewToArtboards)(AIDocumentViewHandle view, AIBoolean& clipToActiveArtboard); + + /** Captures the contents of the view window (excluding scrollbars, etc.) to + a PNG file. + @param view The view reference. + @param saveFilePath Full path along with name of PNG file to create. + */ + AIAPI AIErr (*ScreenShot)(AIDocumentViewHandle view, const ai::UnicodeString &saveFilePath); + + /** Rotates document view, will send kAIDocumentViewChangedNotifier. + @param view The view reference. + @param rotationPoint Point of rotation in artwork coordinates. + @param rotationAngle Angle of rotation in degree(angle should be w.r.t horizontal axis) + */ + AIAPI AIErr(*SetDocumentViewRotation)(AIDocumentViewHandle view, const AIRealPoint& rotationPoint, AIReal rotationAngle); + + /** Get document view rotation properties. + @param view The view reference. + @param rotationPoint Point of rotation in artwork coordinates. + @param rotationAngle Angle of rotation in degree(angle will be w.r.t horizontal axis) + */ + AIAPI AIErr(*GetDocumentViewRotation)(AIDocumentViewHandle view, AIRealPoint& rotationPoint, AIReal& rotationAngle); + + /** Resets document view rotation to 0 degree. + @param view The view reference. + */ + AIAPI AIErr(*ResetDocumentViewRotation)(AIDocumentViewHandle view); + + /** Converts a point from artwork coordinates to view (window) coordinates without taking into account the view rotation. + The resulting view coordinate is rounded to the nearest pixel. + @param view The view reference, or \c NULL for the current view. + @param artworkPoint The point to convert, in artwork coordinates. + @param viewPoint [out] A buffer in which to return the converted point, in window coordinates. + */ + AIAPI AIErr (*ArtworkPointToViewPointUnrotated) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIPoint *viewPoint ); + + /** Converts a point from view coordinates to artwork coordinates without taking into account the view rotation. + @param view The view reference, or \c NULL for the current view. + @param viewPoint The point to convert, in window pixel coordinates. + @param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates. + */ + AIAPI AIErr (*ViewPointToArtworkPointUnrotated) ( AIDocumentViewHandle view, const AIPoint *viewPoint, AIRealPoint *artworkPoint ); + + /** Converts a rect from artwork coordinates to view (window) coordinates with rotation. The resulting + view coordinate is rounded to the nearest pixel. + @param view The view reference, or \c NULL for the current view. + @param artworkRect The rect to convert, in artwork coordinates. + @param viewRect [out] A buffer in which to return the converted rect, in window coordinates. This will be bounding box rect of points after rotation + @see \c #FixedArtworkRectToViewRectUnrotated() (does not round) + */ + AIAPI AIErr (*ArtworkRectToViewRect) ( AIDocumentViewHandle view, const AIRealRect *artworkRect, AIRect *viewRect ); + + /** Converts a Rect from view coordinates to artwork coordinates with inverse rotation. + @param view The view reference, or \c NULL for the current view. + @param viewRect The point to convert, in window pixel coordinates. + @param artworkRect [out] A buffer in which to return the converted point, in artboard coordinates. . This will be bounding box rect of points after inverse rotation + @see \c #FixedViewRectToArtworkRectUnrotated() (takes floating-point coordinate values) + */ + AIAPI AIErr (*ViewRectToArtworkRect) ( AIDocumentViewHandle view, const AIRect *viewRect, AIRealRect *artworkRect ); + + /** Converts a rect from artwork coordinates to view (window) coordinates. The resulting + view coordinate is rounded to the nearest pixel. + @param view The view reference, or \c NULL for the current view. + @param artworkRect The rect to convert, in artwork coordinates. + @param viewRect [out] A buffer in which to return the converted rect, in window coordinates. + @see \c #FixedArtworkRectToViewRectUnrotated() (does not round) + */ + AIAPI AIErr (*ArtworkRectToViewRectUnrotated) ( AIDocumentViewHandle view, const AIRealRect *artworkRect, AIRect *viewRect ); + + /** Converts a Rect from view coordinates to artwork coordinates. + @param view The view reference, or \c NULL for the current view. + @param viewRect The point to convert, in window pixel coordinates. + @param artworkRect [out] A buffer in which to return the converted point, in artboard coordinates. + @see \c #FixedViewRectToArtworkRectUnrotated() (takes floating-point coordinate values) + */ + AIAPI AIErr (*ViewRectToArtworkRectUnrotated) ( AIDocumentViewHandle view, const AIRect *viewRect, AIRealRect *artworkRect ); + /** Converts a point from artwork coordinates to view (window) coordinates without considering canvas rotation. Does \e not round + the result. + @param view The view reference, or \c NULL for the current view. + @param artworkPoint The point to convert, in artwork coordinates. + @param viewPoint [out] A buffer in which to return the converted point, in window coordinates. + @see \c #ArtworkPointToViewPointUnrotated() (rounds result to nearest pixel) + */ + AIAPI AIErr (*FixedArtworkPointToViewPointUnrotated) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIRealPoint *viewPoint ); + + /** Converts a point from view coordinates to artwork coordinates without considering canvas rotation. Does \e not round + the result. + @param view The view reference, or \c NULL for the current view. + @param viewPoint The point to convert, in window floating-point coordinates. + @param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates. + @see \c #ViewPointToArtworkPointUnrotated() (takes pixel coordinate values) + */ + AIAPI AIErr (*FixedViewPointToArtworkPointUnrotated) ( AIDocumentViewHandle view, const AIRealPoint *viewPoint, AIRealPoint *artworkPoint ); + + /** Converts a Rect from view coordinates to artwork coordinates. + @param view The view reference, or \c NULL for the current view. + @param viewRect The point to convert, in window floating-point coordinates. + @param artworkRect [out] A buffer in which to return the converted point, in artboard coordinates. + @see \c #ViewRectToArtworkRectUnrotated() (takes pixel coordinate values) + */ + AIAPI AIErr (*FixedViewRectToArtworkRectUnrotated) ( AIDocumentViewHandle view, const AIRealRect *viewRect, AIRealRect *artworkRect ); + + /** Converts a rect from artwork coordinates to view (window) coordinates. Does \e not round + the result. + @param view The view reference, or \c NULL for the current view. + @param artworkRect The point to convert, in artwork coordinates. + @param viewRect [out] A buffer in which to return the converted point, in window coordinates. + @see \c #ArtworkRectToViewRectUnrotated() (rounds result to nearest pixel) + */ + AIAPI AIErr (*FixedArtworkRectToViewRectUnrotated) ( AIDocumentViewHandle view, const AIRealRect *artworkRect, AIRealRect *viewRect ); +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDrawArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDrawArt.h index 00517a0..6485f4e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDrawArt.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDrawArt.h @@ -1,495 +1,509 @@ -#ifndef __AIDrawArt__ -#define __AIDrawArt__ - -/* - * Name: AIDrawArt.h - * $Revision: $ - * Author: - * Date: - * Purpose: Adobe Illustrator Draw Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIColorConversion__ -#include "AIColorConversion.h" -#endif - -#ifndef __AIRaster__ -#include "AIRaster.h" -#endif - -#include "AIAGMTypes.h" - -#include "AIHeaderBegin.h" - -/** @file AIDrawArt.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIDrawArtSuite "AI Draw Art Suite" -#define kAIDrawArtSuiteVersion11 AIAPI_VERSION(11) -#define kAIDrawArtSuiteVersion kAIDrawArtSuiteVersion11 -#define kAIDrawArtVersion kAIDrawArtSuiteVersion - - -/** Flag bits for \c #AIDrawArtFlags. */ -enum AIDrawArtFlagBitPos { - /** When set, draws for preview mode, otherwise draws in outline mode. */ - kAIDrawArtPreviewBit = 0, - /** Obsolete. */ - kAIDrawArtPreviewImagesBit = 1, - /** When set, draws dimmed images if \c #kAIDrawArtPreviewBit is set. - Dimmed images have colors shifted toward white. */ - kAIDrawArtPreviewDimmedImagesBit = 2, - /** Obsolete. */ - kAIDrawArtPreviewPatternsBit = 3, - /** Obsolete. */ - kAIDrawArtSelectObjectsBit = 4, - /** When set, draws guides. */ - kAIDrawArtShowGuidesBit = 5, - /** (Not recommended.) When set, if drawing a single art object of type - \c #kPlacedArt or \c #kRasterArt, the transformation - applied to the object is set to identity before drawing. - A better way to achieve the same effect is to use - \c #AIDrawArtSuite::DrawThumbnail(). - */ - kAIDrawArtIgnoreArtTransformBit = 6, - /** Obsolete. */ - kAIDrawArtPreviewCropBit = 7, - /** When set, a lengthy drawing operation can be interrupted - in response to user activity. If previewing is interrupted, - \c #AIDrawArtSuite::DrawArt() returns \c #kDrawArtInterruptedErr - and the \c interruptedArt member of the \c #AIDrawArtData is - set to the object where drawing stopped. - */ - kAIDrawArtPreviewInterrupt = 8, - /** When set, continues an interrupted drawing operation from the - point at which it was stopped. */ - kAIDrawArtPreviewContinue = 9, - /** (Not recommended.) When set, ignores dashes on strokes when - drawing. */ - kAIDrawArtIgnoreDashedLines = 10, - /** Obsolete. */ - kAIDrawArtDontColorCalibration = 11, - /** When set, the artwork is in an isolated transparency group that uses the - document color space. A plug-in that draws into a dialog or palette must - isolate the artwork to ensure that transparency blending is in the document - color space. */ - kAIDrawArtIsolate = 12, - /** When set, ignores the transparency aspects (blend mode, opacity, and opacity mask) - of the object being drawn. Does not ignore knockout and alpha in shape setting. - If the object is an image, does not ignore the opacity of pixels. */ - kAIDrawArtIgnoreTopLevelTransparency = 13, - /** When set, modifies the color as if the image were printed - on colored paper. The paper color is specified in the transparency - panel of the document setup dialog. In that panel there are two color - swatches that normally define the colors for the transparency grid. - The topmost swatch also defines the color that is used when simulating - colored paper. */ - kAIDrawArtSimulateColoredPaper = 14, - /** When set, any overprint specification on objects is ignored, - so that colors do not overprint. */ - kAIDrawArtIgnoreOverprint = 15, - /** When set, placed EPS files are drawn by parsing and rendering their - PostScript contents instead of drawing their low resolution image proxies. - The result is the same as turning off the preference "Use Low Resolution - Proxy for Linked EPS". */ - kAIDrawArtPlayEPS = 16, - /** When set, color conversion uses a faster but possibly less accurate - algorithm. Use for interactive display but not for rasterization. */ - kAIDrawArtFastColorTransform = 17, - /** When set, disposes of cached patterns and regenerates them when rendering. - Converting patterns into a renderable form for display takes time, so - Illustrator normally caches the converted results. However, the results - of conversion can depend on current application or document settings, such as - the color settings and document profile. */ - kAIDrawArtDontCachePatterns = 18, - /** When set, draws the specified object regardless of whether it is hidden. */ - kAIDrawArtIgnoreTopLevelInvisibility = 19, - /** When set, the initial state (that is, the state of the topmost object) - for inherited knockout states is assumed to be on, rather than the default state of off. - To use this flag, you must start a knockout transparency group before calling - \c #AIDrawArtSuite::DrawArt(). */ - kAIDrawArtKnockoutAlreadyOn = 20, - /** Not used. */ - kAIDrawArtRunInBackground = 21, - /** When set, does not attempt to continue an interrupted render. - Allows for more interruptability. */ - kAIDrawArtPreviewCannotContinue = 22, - /** When set, draws the object only if it is a clipping object, - in order to establish a clip in the target port. - By default, a clipping object passed to AIDrawArtSuite::DrawArt() - is not drawn. */ - kAIDrawArtClipOnly = 23, - /** When set, draws to OPP port, simulating the appearance of spot colors. - As with #kAIDrawArtIsolate, this isolates any blending modes - from the backdrop. - If the objects drawn should not be isolated from one another. - and if multiple calls to \c #AIDrawArtSuite::DrawArt() are required, - use \c #AIDrawArtSuite::BeginDrawArt(). - The spot plates needed are determined from the artwork - that is to be drawn. */ - kAIDrawArtOPP = 24, - /** When set, ingnores overprint attribute applied to white objects. - This works only for process colors and document model CMYK. - */ - kAISuppressWhiteOP = 25 -}; - -/** Flag masks for #AIDrawArtFlags. See #AIDrawArtFlagBitPos. */ -enum AIDrawArtFlagsValue { - kAIDrawArtPreviewMask = (1 << kAIDrawArtPreviewBit), - kAIDrawArtPreviewImagesMask = (1 << kAIDrawArtPreviewImagesBit), - kAIDrawArtPreviewDimmedImagesMask = (1 << kAIDrawArtPreviewDimmedImagesBit), - kAIDrawArtPreviewImageOrDimImageMask = (kAIDrawArtPreviewImagesMask | kAIDrawArtPreviewDimmedImagesMask), - kAIDrawArtPreviewPatternsMask = (1 << kAIDrawArtPreviewPatternsBit), - kAIDrawArtSelectObjectsMask = (1 << kAIDrawArtSelectObjectsBit), - kAIDrawArtShowGuidesMask = (1 << kAIDrawArtShowGuidesBit), - kAIDrawArtIgnoreArtTransformMask = (1 << kAIDrawArtIgnoreArtTransformBit), - kAIDrawArtPreviewCropMask = (1 << kAIDrawArtPreviewCropBit), - kAIDrawArtPreviewInterruptMask = (1 << kAIDrawArtPreviewInterrupt), - kAIDrawArtPreviewContinueMask = (1 << kAIDrawArtPreviewContinue), - kAIDrawArtIgnoreDashedLinesMask = (1 << kAIDrawArtIgnoreDashedLines), - kAIDrawArtDontColorCalibrationMask = (1 << kAIDrawArtDontColorCalibration), - kAIDrawArtIsolateMask = (1 << kAIDrawArtIsolate), - kAIDrawArtIgnoreTopLevelTransparencyMask = (1 << kAIDrawArtIgnoreTopLevelTransparency), - kAIDrawArtSimulateColoredPaperMask = (1 << kAIDrawArtSimulateColoredPaper), - kAIDrawArtIgnoreOverprintMask = (1 << kAIDrawArtIgnoreOverprint), - kAIDrawArtPlayEPSMask = (1 << kAIDrawArtPlayEPS), - kAIDrawArtFastColorTransformMask = (1 << kAIDrawArtFastColorTransform), - kAIDrawArtDontCachePatternsMask = (1 << kAIDrawArtDontCachePatterns), - kAIDrawArtIgnoreTopLevelInvisibilityMask = (1 << kAIDrawArtIgnoreTopLevelInvisibility), - kAIDrawArtKnockoutAlreadyOnMask = (1 << kAIDrawArtKnockoutAlreadyOn), - kAIDrawArtRunInBackgroundMask = (1 << kAIDrawArtRunInBackground), - kAIDrawArtPreviewCannotContinueMask = (1 << kAIDrawArtPreviewCannotContinue), - kAIDrawArtClipOnlyMask = (1 << kAIDrawArtClipOnly), - kAIDrawArtOPPMask = (1 << kAIDrawArtOPP), - kAISuppressWhiteOPMask = (1 << kAISuppressWhiteOP) -}; - - -/** Values for \c #AIDrawArtOutputType, specified in the \c type field - of \c #AIDrawArtData structure.
Indicates the type of port - that is specified as \c output, using an \c #AIDrawArtOutputUnion structure. */ -enum AIDrawArtOutputTypeValue { - kAIDrawArtUnknownOutput = 0, - /** Draw destination is a Mac OS GWorld in the \c gWorld member. - This type is no longer supported and returns error*/ - kAIDrawArtGWorldOutput = 1, - /** Draw destination is an \c AGMPort* in the \c port member.*/ - kAIDrawArtAGMPortOutput = 2, - /** Draw destination is an \c AGMPort* in the \c portV6 member. */ - kAIDrawArtAGMPortOutputV6 = 3, - /** Draw destination is an \c AIStructuredPort* in the \c structPort member */ - kAIDrawArtStructuredPortOutput = 4 -}; - -/** Values for #AIDrawColorStyle */ -enum AIDrawColorStyleValue { - /** Fill style */ - kAIDrawColorStyleFill = 0, - /** Frame style */ - kAIDrawColorStyleFrame = 1 -}; - - -/** Values for #AIDrawColorOptions */ -enum AIDrawColorOptionsValue { - /** Draw gradients as linear, even if they are radial. */ - kAIDrawArtGradientForceLinear = (1 << 0), - /** Do not convert colors to the document color model prior to drawing them. - This allows drawing of out of gamut RGB colors when the current document - color space is CMYK. */ - kAIDrawColorNoDocCsConversion = (1 << 1) -}; - - -/** @ingroup Errors */ -#define kUnknownDrawArtErr 'DHUH' -/** @ingroup Errors */ -#define KUnknownDrawArtOutputTypeErr 'DOUT' -/** @ingroup Errors */ -#define kBadDrawArtPreviewMatrixErr 'DMTX' -/** @ingroup Errors */ -#define kDrawArtInterruptedErr 'DITR' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** See \c #AIDrawArtFlagsValue for possible values. */ -typedef ai::uint32 AIDrawArtFlags; -/** See \c #AIDrawArtOutputTypeValue for possible values. */ -typedef ai::int32 AIDrawArtOutputType; - -/** Information needed for drawing into a GWorld in Mac OS. */ -typedef struct AIDrawArtGWorld { - void *worldPointer; -} AIDrawArtGWorld; - -/** Information needed for drawing into an AGM port. */ -typedef struct AIDrawArtAGMPort { - AIAGMPort *port; - AIRect portBounds; -} AIDrawArtAGMPort; - -/** Information needed for drawing into an AGM version 6 port. */ -typedef struct AIDrawArtAGMPortV6 { - void *port; - AIRect portBounds; -} AIDrawArtAGMPortV6; - -/** The possible output targets for drawing art. */ -typedef union { - - AIDrawArtGWorld gWorld; - AIDrawArtAGMPort port; - AIDrawArtAGMPortV6 portV6; - struct AIStructuredPort* structPort; -} AIDrawArtOutputUnion; - -/** Drawing data, defines an art object to be drawn, the object it is - to be drawn into and parameters affecting how it is to be - drawn. See \c #AIDrawArtSuite::DrawArt(), \c #AIDrawArtSuite::BeginDrawArt() */ -typedef struct AIDrawArtData { - /** The version of \c #AIDrawArtSuite in use, a \c #kAIDrawArtVersion value. */ - ai::int16 version; - /** Flags that modify drawing behavior, a logical OR of - \c #AIDrawArtFlagBitPos values. */ - AIDrawArtFlags flags; - /** The type of port that is the destination for the draw operation. */ - AIDrawArtOutputType type; - /** The point in the source artwork coordinates that is mapped to (0,0) in - the destination port.*/ - AIRealPoint origin; - /** The transformation matrix to be applied after placement - at the origin. */ - AIRealMatrix matrix; - /** The art object to be drawn. */ - AIArtHandle art; - /** The destination clipping bounds. */ - AIRealRect destClipRect; - /** When true, \c destClipRect is erased before the art is drawn. */ - AIBoolean eraseDestClipRect; - /** The art object that was being drawn when the operation was - interrupted. See \c #kAIDrawArtPreviewInterrupt and \c #kAIDrawArtPreviewContinue. */ - AIArtHandle interruptedArt; - /** The greeking threshold. If the point size of text, - after transformation to the coordinate system of the - destination port, is smaller than this value, the text - is greeked. Use -1 to indicate no greeking. */ - AIReal greekThreshold; - /** Not used */ - AIExtendedRGBColorRec selectionColor; - /** The port that is the destination for the draw operation.*/ - AIDrawArtOutputUnion output; - /** When true, draw only art overlapping \c #srcClipRect on the port */ - AIBoolean doSrcClip; - /** If doSrcClip is true. Draw only art having an overlap between srcClipRect - and visual bound of the art.*/ - AIRealRect srcClipRect; -public: - /** Default constructor. It initialize only doSrcClip.Rest of the initialization to be done by client*/ - AIDrawArtData():doSrcClip(false) // This ensures no porting effort for the change - { - } -} AIDrawArtData; - - -/** See #AIDrawColorStyleValue for possible values. */ -typedef ai::int32 AIDrawColorStyle; -/** See #AIDrawColorOptionsValue for possible values. */ -typedef ai::int32 AIDrawColorOptions; - -/** Structure defining a color to be drawn, the object it is - to be drawn into and parameters affecting how it is to be - drawn. */ -typedef struct AIDrawColorData { - AIDrawArtOutputType type; - - AIDrawColorStyle style; - AIDrawColorOptions options; - AIColor color; - AIRealRect rect; - AIReal width; // when style is frame - - union { - AIDrawArtGWorld gWorld; - AIDrawArtAGMPort port; - AIDrawArtAGMPortV6 portV6; - } output; -} AIDrawColorData; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These functions draw Illustrator artwork to an \e output \e port - (drawing surface). The port can be a screen window, or it can be - an offscreen drawing surface used to rasterize artwork. - - The many drawing options are controlled by values in an \c #AIDrawArtData - structure and related option structures \c #AIColorConvertOptions and - \c #AIDrawArtFlags. - - When drawing to a port whose color space does not match the - document color space, bracket a sequence of calls - to \c #DrawArt() with calls to.\c #BeginDrawArt() and \c #EndDrawArt(). - Examples are drawing a CMYK document to an RGB window, - or an RGB document to a window with a different profile. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDrawArtSuite and \c #kAIDrawArtVersion. - */ -typedef struct { - - /** Draws artwork as specified - @param data A pointer to the structure that specifies an art object - to be drawn, the object it is to be drawn into, and - parameters affecting how it is to be drawn. - @param options An \c #AIColorConvertOptions object that sets - the appropriate black preservation value--that is, whether - a CMYK to RGB/Gray color transformation maps CMYK 0,0,0,1 - to the darkest black: - \li By default, the operation uses the standard conversion, - which never uses black preservation. - \li For export, the operation uses the black-preservation setting - that is currently configured in the print and export preferences. - \li For preview, the operation uses the black-preservation setting - that is currently configured in the screen-display preferences. - */ - AIAPI AIErr (*DrawArt)(AIDrawArtData *data, const AIColorConvertOptions& options ); - - /** Establishes a temporary drawing surface whose color space matches the - document space. Must be paired with a call to \c #EndDrawArt() at the end - of a sequence of calls \c #DrawArt(). - @param data A pointer to the structure that specifies an art object - to be drawn, the object it is to be drawn into, and - parameters affecting how it is to be drawn. Can be \c NULL. - @param options An \c #AIColorConvertOptions object; see \c #DrawArt(). - @param flags A set of options that modify drawing behavior, a logical - OR of \c #AIDrawArtFlagBitPos values. - @note If you set the \c #kAIDrawArtOPP flag to draw to an OPP port, - the "begin" call temporarily changes the target port in the \c data - structure. The call to \c #EndDrawArt() restores the - original port. In this case, the set of spot colors needed for the - OPP port are determined from the art object specified in \c data, or - from the entire document if no art object is specified. - - */ - AIAPI AIErr (*BeginDrawArt)(AIDrawArtData * data, const AIColorConvertOptions& options, AIDrawArtFlags flags ); - - /** Copies the contents of the temporary drawing surface to the final destination. - @param data A pointer to the drawing data structure that was passed to - the corresponding call to \c #BeginDrawArt(). - @param options The \c #AIColorConvertOptions object that was passed to - the corresponding call to \c #BeginDrawArt(). - */ - AIAPI AIErr (*EndDrawArt)(AIDrawArtData *data, const AIColorConvertOptions& options ); - - /** Draws a color swatch. Color swatches are always assumed to be drawn for the - purpose of screen display. - @param data A pointer to the structure that specifies an art object - to be drawn, the object it is to be drawn into, and - parameters affecting how it is to be drawn. - */ - AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data ); - - /** Draws the highlighting annotations for an art object. Call only in the response - to an annotator's Draw Annotations message. - @param art The art object. - @param color The highlight color. - @param lineWidth The stroke width. - */ - AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color, float lineWidth ); - - /** Draws a thumbnail of an art object to the AGM port. Thumbnails are always assumed - to be drawn for the purpose of screen display. No transformations are applied, and - the image is drawn to fit into the destination rectangle. - @param art The art object, of type \c #kRasterArt or \c #kPlacedArt. - @param port A pointer to the AGM port. - @param dstrect The destination rectangle, a bounding box for the thumbnail image. - */ - AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect ); - - /** Creates an AGM port for an image of given dimensions. - @param width Width of the image. - @param height Height of the image. - @param outRport [out] A buffer in which to return the new raster port. - */ - AIAPI AIErr (*CreateImagePort) (ai::uint32 width, ai::uint32 height, AIAGMPort **outRport); - - /** Retrieves the pixel data corresponding to the image created through \c #CreateImagePort(). - This is the read-only pixel data owned by the implementation; - the caller should not allocate memory for the data. This pixel data - is valid until you call \c #DestroyImagePort() (see example). - Data of a particular pixel is in the form of ARGB (alpha, red, green and blue). The total length of pixel data - is equal to 4 * width * height. - - @code - //Example on how to call this method. - size_t length = 0; - const ai::uint8* pixelData = NULL; - AIErr error = sAIDrawArt->GetImagePixelData(rport, &pixelData, &length, NULL, NULL); - @endcode - - @param rport A pointer to the AGM port. - @param outPixedData [out] A buffer in which to return a pointer to the pixel data bytes. - @param outLength [out] A buffer in which to return the length of the pixel data in bytes. - @param outWidth [out] A buffer in which to return the width of the image, or NULL if this information is not required. - @param outHeight [out] A buffer in which to return the height of the image, or NULL if this information is not required. - */ - AIAPI AIErr (*GetImagePixelData) (AIAGMPort *rport, const ai::uint8** outPixedData, size_t* outLength, ai::uint32* outWidth, ai::uint32* outHeight); - - /** Destroys the supplied AIAGMPort. - @param rport A pointer to the AGM port. - */ - AIAPI AIErr (*DestroyImagePort) (AIAGMPort *rport); - -} AIDrawArtSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIDrawArt__ +#define __AIDrawArt__ + +/* + * Name: AIDrawArt.h + * $Revision: $ + * Author: + * Date: + * Purpose: Adobe Illustrator Draw Art Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIColorConversion__ +#include "AIColorConversion.h" +#endif + +#ifndef __AIRaster__ +#include "AIRaster.h" +#endif + +#include "AIAGMTypes.h" + +#include "AIHeaderBegin.h" + +/** @file AIDrawArt.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIDrawArtSuite "AI Draw Art Suite" +#define kAIDrawArtSuiteVersion11 AIAPI_VERSION(11) +#define kAIDrawArtSuiteVersion kAIDrawArtSuiteVersion11 +#define kAIDrawArtVersion kAIDrawArtSuiteVersion + +/** Flag bits for \c #AIDrawArtFlags. */ +enum AIDrawArtFlagBitPos { + /** When set, draws in the preview mode, otherwise draws in the outline mode. */ + kAIDrawArtPreviewBit = 0, + /** Obsolete. */ + kAIDrawArtPreviewImagesBit = 1, + /** When set, draws dimmed images if \c #kAIDrawArtPreviewBit is set. + Dimmed images have colors shifted towards white. */ + kAIDrawArtPreviewDimmedImagesBit = 2, + /** Obsolete. */ + kAIDrawArtPreviewPatternsBit = 3, + /** Obsolete. */ + kAIDrawArtSelectObjectsBit = 4, + /** When set, draws guides. */ + kAIDrawArtShowGuidesBit = 5, + /** (Not recommended.) When set, if drawing a single art object of type + \c #kPlacedArt or \c #kRasterArt, the transformation + applied to the object is set to identity before drawing. + A better way to achieve the same effect is to use + \c #AIDrawArtSuite::DrawThumbnail(). + */ + kAIDrawArtIgnoreArtTransformBit = 6, + /** Obsolete. */ + kAIDrawArtPreviewCropBit = 7, + /** When set, a lengthy drawing operation can be interrupted + in response to user activity. If previewing is interrupted, + \c #AIDrawArtSuite::DrawArt() returns \c #kDrawArtInterruptedErr + and the \c interruptedArt member of the \c #AIDrawArtData is + set to the object where drawing stopped. + */ + kAIDrawArtPreviewInterrupt = 8, + /** When set, continues an interrupted drawing operation from the + point at which it was stopped. */ + kAIDrawArtPreviewContinue = 9, + /** (Not recommended.) When set, ignores dashes on strokes when + drawing. */ + kAIDrawArtIgnoreDashedLines = 10, + /** Obsolete. */ + kAIDrawArtDontColorCalibration = 11, + /** When set, the artwork is in an isolated transparency group that uses the + document color space. A plug-in that draws into a dialog or palette must + isolate the artwork to ensure that transparency blending is in the document + color space. */ + kAIDrawArtIsolate = 12, + /** When set, ignores the transparency aspects (blend mode, opacity, and opacity mask) + of the object being drawn. Does not ignore knockout and alpha in shape setting. + If the object is an image, does not ignore the opacity of pixels. */ + kAIDrawArtIgnoreTopLevelTransparency = 13, + /** When set, modifies the color as if the image were printed + on colored paper. The paper color is specified in the transparency + panel of the document setup dialog. In that panel, there are two color + swatches that normally define the colors for the transparency grid. + The topmost swatch also defines the color that is used when simulating + colored paper. */ + kAIDrawArtSimulateColoredPaper = 14, + /** When set, any overprint specification on objects is ignored, + so that colors do not overprint. */ + kAIDrawArtIgnoreOverprint = 15, + /** When set, placed EPS files are drawn by parsing and rendering their + PostScript contents instead of drawing their low resolution image proxies. + The result is the same as turning off the preference "Use Low Resolution + Proxy for Linked EPS". */ + kAIDrawArtPlayEPS = 16, + /** When set, color conversion uses a faster but possibly less accurate + algorithm. Use for interactive display but not for rasterization. */ + kAIDrawArtFastColorTransform = 17, + /** When set, disposes off cached patterns and regenerates them when rendering. + Converting patterns into a renderable form for display takes time, so + Illustrator normally caches the converted results. However, the results + of conversion can depend on current application or document settings, such as + color settings and document profile. */ + kAIDrawArtDontCachePatterns = 18, + /** When set, draws the specified object regardless of whether it is hidden. */ + kAIDrawArtIgnoreTopLevelInvisibility = 19, + /** When set, the initial state (that is, the state of the topmost object) + for inherited knockout states is assumed to be on, rather than the default state of off. + To use this flag, you must start a knockout transparency group before calling + \c #AIDrawArtSuite::DrawArt(). */ + kAIDrawArtKnockoutAlreadyOn = 20, + /** Not used. */ + kAIDrawArtRunInBackground = 21, + /** When set, does not attempt to continue an interrupted render. + Allows for more interruptability. */ + kAIDrawArtPreviewCannotContinue = 22, + /** When set, draws the object only if it is a clipping object, + in order to establish a clip in the target port. + By default, a clipping object passed to AIDrawArtSuite::DrawArt() + is not drawn. */ + kAIDrawArtClipOnly = 23, + /** When set, draws to OPP port, simulating the appearance of spot colors. + As with #kAIDrawArtIsolate, this isolates any blending modes + from the backdrop. + If the objects drawn should not be isolated from one another, + and if multiple calls to \c #AIDrawArtSuite::DrawArt() are required, + use \c #AIDrawArtSuite::BeginDrawArt(). + The spot plates needed are determined from the artwork + that is to be drawn. */ + kAIDrawArtOPP = 24, + /** When set, ingnores overprint attribute applied to white objects. + This works only for process colors and document model CMYK. + */ + kAISuppressWhiteOP = 25, + /** When set, text characters over which any SVG font is applied + will be drawn as outline + */ + kAIDrawSVGTextAsOutline = 26, + /** When set, text characters over which any color font is applied + will be drawn as Image, this will be used for color fonts other + than SVG color fonts + */ + kAIDrawColorTextAsImage = 27, + /** When set, fill path and stroke with black color and ignore transparency + */ + kAIDrawArtShadow = 28 +}; + +/** Flag masks for #AIDrawArtFlags. See #AIDrawArtFlagBitPos. */ +enum AIDrawArtFlagsValue { + kAIDrawArtPreviewMask = (1 << kAIDrawArtPreviewBit), + kAIDrawArtPreviewImagesMask = (1 << kAIDrawArtPreviewImagesBit), + kAIDrawArtPreviewDimmedImagesMask = (1 << kAIDrawArtPreviewDimmedImagesBit), + kAIDrawArtPreviewImageOrDimImageMask = (kAIDrawArtPreviewImagesMask | kAIDrawArtPreviewDimmedImagesMask), + kAIDrawArtPreviewPatternsMask = (1 << kAIDrawArtPreviewPatternsBit), + kAIDrawArtSelectObjectsMask = (1 << kAIDrawArtSelectObjectsBit), + kAIDrawArtShowGuidesMask = (1 << kAIDrawArtShowGuidesBit), + kAIDrawArtIgnoreArtTransformMask = (1 << kAIDrawArtIgnoreArtTransformBit), + kAIDrawArtPreviewCropMask = (1 << kAIDrawArtPreviewCropBit), + kAIDrawArtPreviewInterruptMask = (1 << kAIDrawArtPreviewInterrupt), + kAIDrawArtPreviewContinueMask = (1 << kAIDrawArtPreviewContinue), + kAIDrawArtIgnoreDashedLinesMask = (1 << kAIDrawArtIgnoreDashedLines), + kAIDrawArtDontColorCalibrationMask = (1 << kAIDrawArtDontColorCalibration), + kAIDrawArtIsolateMask = (1 << kAIDrawArtIsolate), + kAIDrawArtIgnoreTopLevelTransparencyMask = (1 << kAIDrawArtIgnoreTopLevelTransparency), + kAIDrawArtSimulateColoredPaperMask = (1 << kAIDrawArtSimulateColoredPaper), + kAIDrawArtIgnoreOverprintMask = (1 << kAIDrawArtIgnoreOverprint), + kAIDrawArtPlayEPSMask = (1 << kAIDrawArtPlayEPS), + kAIDrawArtFastColorTransformMask = (1 << kAIDrawArtFastColorTransform), + kAIDrawArtDontCachePatternsMask = (1 << kAIDrawArtDontCachePatterns), + kAIDrawArtIgnoreTopLevelInvisibilityMask = (1 << kAIDrawArtIgnoreTopLevelInvisibility), + kAIDrawArtKnockoutAlreadyOnMask = (1 << kAIDrawArtKnockoutAlreadyOn), + kAIDrawArtRunInBackgroundMask = (1 << kAIDrawArtRunInBackground), + kAIDrawArtPreviewCannotContinueMask = (1 << kAIDrawArtPreviewCannotContinue), + kAIDrawArtClipOnlyMask = (1 << kAIDrawArtClipOnly), + kAIDrawArtOPPMask = (1 << kAIDrawArtOPP), + kAISuppressWhiteOPMask = (1 << kAISuppressWhiteOP), + kAIDrawSVGTextAsOutlineMask = (1 << kAIDrawSVGTextAsOutline), + kAIDrawColorTextAsImageMask = (1 << kAIDrawColorTextAsImage), + kAIDrawArtShadowMask = (1 << kAIDrawArtShadow), +}; + + +/** Values for \c #AIDrawArtOutputType, specified in the \c type field + of \c #AIDrawArtData structure.
Indicates the type of port + that is specified as \c output, using an \c #AIDrawArtOutputUnion structure. */ +enum AIDrawArtOutputTypeValue { + kAIDrawArtUnknownOutput = 0, + /** Draw destination is a Mac OS GWorld in the \c gWorld member. + This type is no longer supported and returns error*/ + kAIDrawArtGWorldOutput = 1, + /** Draw destination is an \c AGMPort* in the \c port member.*/ + kAIDrawArtAGMPortOutput = 2, + /** Draw destination is an \c AGMPort* in the \c portV6 member. */ + kAIDrawArtAGMPortOutputV6 = 3, + /** Draw destination is an \c AIStructuredPort* in the \c structPort member */ + kAIDrawArtStructuredPortOutput = 4 +}; + +/** Values for #AIDrawColorStyle */ +enum AIDrawColorStyleValue { + /** Fill style */ + kAIDrawColorStyleFill = 0, + /** Frame style */ + kAIDrawColorStyleFrame = 1 +}; + + +/** Values for #AIDrawColorOptions */ +enum AIDrawColorOptionsValue { + /** Draws gradients as linear, even if they are radial. */ + kAIDrawArtGradientForceLinear = (1 << 0), + /** Does not convert colors to the document color model prior to drawing them. + This allows drawing of out of gamut RGB colors when the current document + color space is CMYK. */ + kAIDrawColorNoDocCsConversion = (1 << 1) +}; + + +/** @ingroup Errors */ +#define kUnknownDrawArtErr 'DHUH' +/** @ingroup Errors */ +#define KUnknownDrawArtOutputTypeErr 'DOUT' +/** @ingroup Errors */ +#define kBadDrawArtPreviewMatrixErr 'DMTX' +/** @ingroup Errors */ +#define kDrawArtInterruptedErr 'DITR' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** See \c #AIDrawArtFlagsValue for possible values. */ +typedef ai::uint32 AIDrawArtFlags; +/** See \c #AIDrawArtOutputTypeValue for possible values. */ +typedef ai::int32 AIDrawArtOutputType; + +/** Information needed for drawing into a GWorld in Mac OS. */ +typedef struct AIDrawArtGWorld { + void *worldPointer; +} AIDrawArtGWorld; + +/** Information needed for drawing into an AGM port. */ +typedef struct AIDrawArtAGMPort { + AIAGMPort *port; + AIRect portBounds; +} AIDrawArtAGMPort; + +/** Information needed for drawing into an AGM version 6 port. */ +typedef struct AIDrawArtAGMPortV6 { + void *port; + AIRect portBounds; +} AIDrawArtAGMPortV6; + +/** The possible output targets for drawing art. */ +typedef union { + + AIDrawArtGWorld gWorld; + AIDrawArtAGMPort port; + AIDrawArtAGMPortV6 portV6; + struct AIStructuredPort* structPort; +} AIDrawArtOutputUnion; + +/** Drawing data, defines an art object to be drawn, the object it is + to be drawn into, and parameters affecting how it is to be + drawn. See \c #AIDrawArtSuite::DrawArt(), \c #AIDrawArtSuite::BeginDrawArt() */ +typedef struct AIDrawArtData { + /** The version of \c #AIDrawArtSuite in use, a \c #kAIDrawArtVersion value. */ + ai::int16 version; + /** Flags that modify drawing behavior, a logical OR of + \c #AIDrawArtFlagBitPos values. */ + AIDrawArtFlags flags; + /** The type of port that is the destination for the draw operation. */ + AIDrawArtOutputType type; + /** The point in the source artwork coordinates that is mapped to (0,0) in + the destination port.*/ + AIRealPoint origin; + /** The transformation matrix to be applied after placement + at the origin. */ + AIRealMatrix matrix; + /** The art object to be drawn. */ + AIArtHandle art; + /** The destination clipping bounds. */ + AIRealRect destClipRect; + /** When true, \c destClipRect is erased before the art is drawn. */ + AIBoolean eraseDestClipRect; + /** The art object that was being drawn when the operation was + interrupted. See \c #kAIDrawArtPreviewInterrupt and \c #kAIDrawArtPreviewContinue. */ + AIArtHandle interruptedArt; + /** The greeking threshold. If the point size of text, + after transformation to the coordinate system of the + destination port, is smaller than this value, the text + is greeked. Use -1 to indicate no greeking. */ + AIReal greekThreshold; + /** Not used */ + AIExtendedRGBColorRec selectionColor; + /** The port that is the destination for the draw operation.*/ + AIDrawArtOutputUnion output; + /** When true, draws only art overlapping \c #srcClipRect on the port */ + AIBoolean doSrcClip; + /** If doSrcClip is true, draws only art having an overlap between srcClipRect + and visual bound of the art.*/ + AIRealRect srcClipRect; +public: + /** Default constructor. It initializes only doSrcClip. Rest of the initialization to be done by client*/ + AIDrawArtData():doSrcClip(false) // This ensures no porting effort for the change + { + } +} AIDrawArtData; + + +/** See #AIDrawColorStyleValue for possible values. */ +typedef ai::int32 AIDrawColorStyle; +/** See #AIDrawColorOptionsValue for possible values. */ +typedef ai::int32 AIDrawColorOptions; + +/** Structure defining a color to draw the object, it is + to be drawn into and parameters affecting how it is to be + drawn. */ +typedef struct AIDrawColorData { + AIDrawArtOutputType type; + + AIDrawColorStyle style; + AIDrawColorOptions options; + AIColor color; + AIRealRect rect; + AIReal width; // when style is frame + + union { + AIDrawArtGWorld gWorld; + AIDrawArtAGMPort port; + AIDrawArtAGMPortV6 portV6; + } output; +} AIDrawColorData; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + These functions draw Illustrator artwork to an \e output \e port + (drawing surface). The port can be a screen window, or it can be + an offscreen drawing surface used to rasterize artwork. + + The drawing options are controlled by values in an \c #AIDrawArtData + structure and related option structures \c #AIColorConvertOptions and + \c #AIDrawArtFlags. + + When drawing to a port whose color space does not match the + document color space, bracket a sequence of calls + to \c #DrawArt() with calls to.\c #BeginDrawArt() and \c #EndDrawArt(). + Examples are drawing a CMYK document to an RGB window, + or an RGB document to a window with a different profile. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIDrawArtSuite and \c #kAIDrawArtVersion. + */ +typedef struct { + + /** Draws artwork as specified + @param data A pointer to the structure that specifies an art object + to be drawn, the object it is to be drawn into, and + parameters affecting how it is to be drawn. + @param options An \c #AIColorConvertOptions object that sets + the appropriate black preservation value--that is, whether + a CMYK to RGB/Gray color transformation maps CMYK 0,0,0,1 + to the darkest black: + \li By default, the operation uses the standard conversion, + which never uses black preservation. + \li For export, the operation uses the black-preservation setting + that is currently configured in the print and export preferences. + \li For preview, the operation uses the black-preservation setting + that is currently configured in the screen-display preferences. + */ + AIAPI AIErr (*DrawArt)(AIDrawArtData *data, const AIColorConvertOptions& options ); + + /** Establishes a temporary drawing surface whose color space matches the + document space. Must be paired with a call to \c #EndDrawArt() at the end + of a sequence of calls \c #DrawArt(). + @param data A pointer to the structure that specifies an art object + to be drawn, the object it is to be drawn into, and + parameters affecting how it is to be drawn. Can be \c NULL. + @param options An \c #AIColorConvertOptions object; see \c #DrawArt(). + @param flags A set of options that modify drawing behavior, a logical + OR of \c #AIDrawArtFlagBitPos values. + @note If you set the \c #kAIDrawArtOPP flag to draw to an OPP port, + the "begin" call temporarily changes the target port in the \c data + structure. The call to \c #EndDrawArt() restores the + original port. In this case, the set of spot colors needed for the + OPP port are determined from the art object specified in \c data, or + from the entire document if no art object is specified. + + */ + AIAPI AIErr (*BeginDrawArt)(AIDrawArtData * data, const AIColorConvertOptions& options, AIDrawArtFlags flags ); + + /** Copies the contents of the temporary drawing surface to the final destination. + @param data A pointer to the drawing data structure that was passed to + the corresponding call to \c #BeginDrawArt(). + @param options The \c #AIColorConvertOptions object that was passed to + the corresponding call to \c #BeginDrawArt(). + */ + AIAPI AIErr (*EndDrawArt)(AIDrawArtData *data, const AIColorConvertOptions& options ); + + /** Draws a color swatch. Color swatches are always assumed to be drawn for the + purpose of screen display. + @param data A pointer to the structure that specifies an art object + to be drawn, the object it is to be drawn into, and + parameters affecting how it is to be drawn. + */ + AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data ); + + /** Draws the highlighting annotations for an art object. Call only in the response + to an annotator's Draw Annotations message. + @param art The art object. + @param color The highlight color. + @param lineWidth The stroke width. + */ + AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color, float lineWidth ); + + /** Draws a thumbnail of an art object to the AGM port. Thumbnails are always assumed + to be drawn for the purpose of screen display. No transformations are applied, and + the image is drawn to fit into the destination rectangle. + @param art The art object, of type \c #kRasterArt or \c #kPlacedArt. + @param port A pointer to the AGM port. + @param dstrect The destination rectangle, a bounding box for the thumbnail image. + */ + AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect ); + + /** Creates an AGM port for an image of given dimensions. + @param width Width of the image. + @param height Height of the image. + @param outRport [out] A buffer in which to return the new raster port. + */ + AIAPI AIErr (*CreateImagePort) (ai::uint32 width, ai::uint32 height, AIAGMPort **outRport); + + /** Retrieves the pixel data corresponding to the image created through \c #CreateImagePort(). + This is the read-only pixel data owned by the implementation; + the caller should not allocate memory for the data. This pixel data + is valid until you call \c #DestroyImagePort() (see example). + Data of a particular pixel is in the form of ARGB (alpha, red, green and blue). The total length of pixel data + is equal to 4 * width * height. + + @code + //Example on how to call this method. + size_t length = 0; + const ai::uint8* pixelData = NULL; + AIErr error = sAIDrawArt->GetImagePixelData(rport, &pixelData, &length, NULL, NULL); + @endcode + + @param rport A pointer to the AGM port. + @param outPixedData [out] A buffer in which to return a pointer to the pixel data bytes. + @param outLength [out] A buffer in which to return the length of the pixel data in bytes. + @param outWidth [out] A buffer in which to return the width of the image, or NULL if this information is not required. + @param outHeight [out] A buffer in which to return the height of the image, or NULL if this information is not required. + */ + AIAPI AIErr (*GetImagePixelData) (AIAGMPort *rport, const ai::uint8** outPixedData, size_t* outLength, ai::uint32* outWidth, ai::uint32* outHeight); + + /** Destroys the supplied AIAGMPort. + @param rport A pointer to the AGM port. + */ + AIAPI AIErr (*DestroyImagePort) (AIAGMPort *rport); + +} AIDrawArtSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDxfDwgPrefs.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDxfDwgPrefs.h index 7ea810a..7cd14e7 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDxfDwgPrefs.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDxfDwgPrefs.h @@ -1,263 +1,273 @@ -/* - * Name: AIDxfDwgPrefs.h - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2006-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -//----------------------------------------------------------------------------- - -#ifndef __AIDXFDWGPREFS_h__ -#define __AIDXFDWGPREFS_h__ - -// includes -#include "AIHeaderBegin.h" - - -// ------------------------------------------------------------------ -// enumerations - - -/** AutoCAD file filter preference constants: file format. */ -enum DxfDwgAutoCADFileFormat -{ - /** AutoCAD Drawing Exchange Format (.dxf) */ - eFormatDxf = 0, - /** AutoCAD Drawing Format (.dwg) */ - eFormatDwg -}; - -/** AutoCAD file filter preference constants: version. */ -enum DxfDwgAutoCADVersion -{ - /** AutoCAD version R13/LT95 */ - eR13 = 0, - /** AutoCAD version R14/LT98/LT97 */ - eR14, - /** AutoCAD version 2000/LT2000 */ - eR15, - /** AutoCAD version 2004/2005/2006 */ - eR18, - /** AutoCAD version 2007/2008/2009 */ - eR21, - /** AutoCad version 2010/2011/2012(Not all the features of 2012 though) */ - eR24 -}; - -/** AutoCAD file filter preference constants: measurement units. */ -enum DxfDwgUnit -{ - ePoints = 0, - ePicas, - eInches, - eMillimeters, - eCentimeters, - ePixels, - eNumberOfUnits -}; - -/** AutoCAD file filter preference constants: color depth. */ -enum DxfDwgColors -{ - eColors8 = 0, - eColors16, - eColors256, - eColorsTrueColor -}; - -/** AutoCAD file filter preference constants: scale options. */ -enum DxfDwgGlobalScaleOption -{ - /** Do not apply scaling. */ - eOriginalSize = 0, - /** Scale by optimum amount so as to fit the artboard size. */ - eFitArtboard, - /** Scale by value specified in \c #DxfDwgExportPrefs::m_unitScaleRatio. */ - eScaleByValue -}; - -/** AutoCAD file filter preference constants: raster format. */ -enum DxfDwgRasterFormat -{ - /** PNG */ - eRasterPNG = 0, - /** JPEG */ - eRasterJPEG -}; - -/** AutoCAD file filter preference constants: editability level.*/ -enum DxfDwgExportOption -{ - ePreserveAppearance = 0, - eMaximumEditability -}; - -// ------------------------------------------------------------------ -// constants - -/** AutoCAD file filter preference constants: prefix. */ -#define kDxfDwgPreferencePrefix "DxfDwg" - -/** AutoCAD file filter preference constants: default AutoCAD name. */ -#define kFormatAutoCADName "AutoCAD file" - -/** AutoCAD file filter preference constants: DFX format name. */ -#define kFormatDxfName "DXF" -#define kDxfExportFileFormatName "DXF Export" -#define kDxfImportFileFormatName "DXF Import" - -/** AutoCAD file filter preference constants: DFX format file extension. */ -#define kFormatDxfExtn "dxf" - -/** AutoCAD file filter preference constants: DWG format name. */ -#define kFormatDwgName "DWG" -#define kDwgExportFileFormatName "DWG Export" -#define kDwgImportFileFormatName "DWG Import" - -/** AutoCAD file filter preference constants: DWG format file extension */ -#define kFormatDwgExtn "dwg" - -// export related -/** AutoCAD file filter preference constants: file format for export */ -#define kDxfDwgExportAutoCADFileFormat "ExportAutoCADFileFormat" -/** AutoCAD file filter preference constants: default file format for export */ -#define kDxfDwgDefaultExportAutoCADFileFormat eFormatDwg - -/** AutoCAD file filter preference constants: AutoCAD version for export */ -#define kDxfDwgExportAutoCADVersion "ExportAutoCADVersion" -/** AutoCAD file filter preference constants: default AutoCAD version for export */ -#define kDxfDwgDefaultExportAutoCADVersion eR24 - -/** AutoCAD file filter preference constants: scale ratio for export */ -#define kDxfDwgExportUnitScaleRatio "ExportUnitScaleRatio" -/** AutoCAD file filter preference constants: default scale ratio for export, a percentage where 1.0=100% */ -#define kDxfDwgDefaultExportUnitScaleRatio 1.0 - -/** AutoCAD file filter preference constants: measurement units for export */ -#define kDxfDwgExportUnit "ExportUnit" -/** AutoCAD file filter preference constants: default measurement units for export */ -#define kDxfDwgDefaultExportUnit eMillimeters - -/** AutoCAD file filter preference constants: color depth for export */ -#define kDxfDwgExportColors "Colors" -/** AutoCAD file filter preference constants: default color depth for export */ -#define kDxfDwgDefaultExportColors eColorsTrueColor - -/** AutoCAD file filter preference constants: raster format for export (PNG or JPEG) */ -#define kDxfDwgExportRasterFormat "ExportRasterFormat" -/** AutoCAD file filter preference constants: default raster format for export */ -#define kDxfDwgDefaultExportRasterFormat eRasterPNG - -/** AutoCAD file filter preference constants: editability level for export */ -#define kDxfDwgExportOption "ExportOption" -/** AutoCAD file filter preference constants: default editability level for export */ -#define kDxfDwgDefaultExportOption eMaximumEditability - -/** AutoCAD file filter preference constants: whether to export only selected art. */ -#define kDxfDwgExportSelectedArtOnly "ExportSelectedArtOnly" -/** AutoCAD file filter preference constants: default for whether to export only selected art. */ -#define kDxfDwgDefaultExportSelectedArtOnly false - -/** AutoCAD file filter preference constants: whether to alter paths for appearance */ -#define kDxfDwgExportAlterPathsForAppearance "ExportAlterPathsForAppearance" -/** AutoCAD file filter preference constants: default for whether to alter paths for appearance */ -#define kDxfDwgDefaultExportAlterPathsForAppearance false - -/** AutoCAD file filter preference constants: whether to export outline text */ -#define kDxfDwgExportOutlineText "ExportOutlineText" -/** AutoCAD file filter preference constants: default for whether to export outline text */ -#define kDxfDwgDefaultExportOutlineText false - -/** AutoCAD file filter preference constants: whether to scale line weights on export */ -#define kDxfDwgExportScaleLineweights "ExportScaleLineweights" -/** AutoCAD file filter preference constants: default for whether to scale line weights on export */ -#define kDxfDwgDefaultExportScaleLineweights false - -// import related -/** AutoCAD file filter preference constants: scaling type for import */ -#define kDxfDwgImportGlobalScaleOption "ImportGlobalScaleOption" -/** AutoCAD file filter preference constants: default scaling type for import */ -#define kDxfDwgDefaultImportGlobalScaleOption eFitArtboard - -/** AutoCAD file filter preference constants: global scale value for import */ -#define kDxfDwgImportGlobalScaleValue "ImportGlobalScaleValue" -/** AutoCAD file filter preference constants: default global scale value for import, a percentage. */ -#define kDxfDwgDefaultImportGlobalScaleValue 100 - -/** AutoCAD file filter preference constants: scale ratio for import, */ -#define kDxfDwgImportUnitScaleRatio "ImportUnitScaleRatio" -/** AutoCAD file filter preference constants: default scale ratio for import, a percentage where 1.0=100% */ -#define kDxfDwgDefaultImportUnitScaleRatio 1.0 - -/** AutoCAD file filter preference constants: measurement units for import */ -#define kDxfDwgImportUnit "ImportUnit" -/** AutoCAD file filter preference constants: default measurement units for import */ -#define kDxfDwgDefaultImportUnit eMillimeters - -/** AutoCAD file filter preference constants: layout for import, a descriptive string - defined in the DWG or DXF file.*/ -#define kDxfDwgImportLayout "ImportLayout" -/** AutoCAD file filter preference constants: default layout for import */ -#define kDxfDwgDefaultImportLayout "" - -/** AutoCAD file filter preference constants: whether to center art on import. */ -#define kDxfDwgImportCenterArtwork "ImportCenterArtwork" - -/** AutoCAD file filter preference constants: whether to center art on import. */ -#define kDxfDwgImportMergeLayers "ImportMergeLayers" - -/** AutoCAD file filter preference constants: default for whether to center art on import. */ -#define kDxfDwgDefaultImportCenterArtwork true - -/** AutoCAD file filter preference constants: default for whether to merge layers on import. */ -#define kDxfDwgDefaultImportMergeLayers false - -/** AutoCAD file filter preference constants: whether to scale line weights on import. */ -#define kDxfDwgImportScaleLineweights "ImportScaleLineweights" -/** AutoCAD file filter preference constants: default for whether to scale line weights on import. */ -#define kDxfDwgDefaultImportScaleLineweights false - -// ------------------------------------------------------------------ -// structures - -/** AutoCAD file filter preferences. */ -struct DxfDwgExportPrefs -{ - /** File format (DXF or DWG). */ - DxfDwgAutoCADFileFormat m_fileFormat; - /** AutoCAD version */ - DxfDwgAutoCADVersion m_version; - /** Scale ration to use when scale option is \c #eScaleByValue. */ - AIReal m_unitScaleRatio; - /** Measurement units. */ - DxfDwgUnit m_unit; - /** Color depth. */ - DxfDwgColors m_colors; - /** Raster format (PNG or JPEG) */ - DxfDwgRasterFormat m_rasterFormat; - /** Editability level of exported file. */ - DxfDwgExportOption m_exportOption; - /** Whether to export only selected art. */ - AIBoolean m_isExportSelectedArtOnly; - /** Whether to alter path appearance by applying the \c #AIPathfinderData - options and parameters. */ - AIBoolean m_isAlterPathForAppearance; - /** Whether to export text as outline text. */ - AIBoolean m_isOutlineText; - /** Whether to scale line weights on export. */ - AIBoolean m_isScaleLineweights; - -}; - - -#include "AIHeaderEnd.h" - -#endif //__AIDXFDWGPREFS_h__ +/* + * Name: AIDxfDwgPrefs.h + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2006-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +//----------------------------------------------------------------------------- + +#ifndef __AIDXFDWGPREFS_h__ +#define __AIDXFDWGPREFS_h__ + +// includes +#include "AIHeaderBegin.h" + + +// ------------------------------------------------------------------ +// enumerations + + +/** AutoCAD file filter preference constants: file format. */ +enum DxfDwgAutoCADFileFormat +{ + /** AutoCAD Drawing Exchange Format (.dxf) */ + eFormatDxf = 0, + /** AutoCAD Drawing Format (.dwg) */ + eFormatDwg +}; + +/** AutoCAD file filter preference constants: version. */ +enum DxfDwgAutoCADVersion +{ + /** AutoCAD version R13/LT95 */ + eR13 = 0, + /** AutoCAD version R14/LT98/LT97 */ + eR14, + /** AutoCAD version 2000/LT2000 */ + eR15, + /** AutoCAD version 2004/2005/2006 */ + eR18, + /** AutoCAD version 2007/2008/2009 */ + eR21, + /** AutoCad version 2010/2011/2012 */ + eR24, + /** Autocad version 2013*/ + eR27, + /* Autocad version 2018*/ + eR32 +}; + +/** AutoCAD file filter preference constants: measurement units. */ +enum DxfDwgUnit +{ + ePoints = 0, + ePicas, + eInches, + eMillimeters, + eCentimeters, + ePixels, + eFeets, + eNumberOfUnits +}; + +/** AutoCAD file filter preference constants: color depth. */ +enum DxfDwgColors +{ + eColors8 = 0, + eColors16, + eColors256, + eColorsTrueColor +}; + +/** AutoCAD file filter preference constants: scale options. */ +enum DxfDwgGlobalScaleOption +{ + /** Do not apply scaling. */ + eOriginalSize = 0, + /** Scale by optimum amount so as to fit the artboard size. */ + eFitArtboard, + /** Scale by value specified in \c #DxfDwgExportPrefs::m_unitScaleRatio. */ + eScaleByValue +}; + +/** AutoCAD file filter preference constants: raster format. */ +enum DxfDwgRasterFormat +{ + /** PNG */ + eRasterPNG = 0, + /** JPEG */ + eRasterJPEG +}; + +/** AutoCAD file filter preference constants: editability level.*/ +enum DxfDwgExportOption +{ + ePreserveAppearance = 0, + eMaximumEditability +}; + +// ------------------------------------------------------------------ +// constants + +/** AutoCAD file filter preference constants: prefix. */ +#define kDxfDwgPreferencePrefix "DxfDwg" + +/** AutoCAD file filter preference constants: default AutoCAD name. */ +#define kFormatAutoCADName "AutoCAD file" + +/** AutoCAD file filter preference constants: DFX format name. */ +#define kFormatDxfName "DXF" +#define kDxfExportFileFormatName "DXF Export" +#define kDxfImportFileFormatName "DXF Import" + +/** AutoCAD file filter preference constants: DFX format file extension. */ +#define kFormatDxfExtn "dxf" + +/** AutoCAD file filter preference constants: DWG format name. */ +#define kFormatDwgName "DWG" +#define kDwgExportFileFormatName "DWG Export" +#define kDwgImportFileFormatName "DWG Import" + +/** AutoCAD file filter preference constants: DWG format file extension */ +#define kFormatDwgExtn "dwg" + +// export related +/** AutoCAD file filter preference constants: file format for export */ +#define kDxfDwgExportAutoCADFileFormat "ExportAutoCADFileFormat" +/** AutoCAD file filter preference constants: default file format for export */ +#define kDxfDwgDefaultExportAutoCADFileFormat eFormatDwg + +/** AutoCAD file filter preference constants: AutoCAD version for export */ +#define kDxfDwgExportAutoCADVersion "ExportAutoCADVersion" +/** AutoCAD file filter preference constants: default AutoCAD version for export */ +#define kDxfDwgDefaultExportAutoCADVersion eR32 + +/** AutoCAD file filter preference constants: scale ratio for export */ +#define kDxfDwgExportUnitScaleRatio "ExportUnitScaleRatio" +/** AutoCAD file filter preference constants: default scale ratio for export, a percentage where 1.0=100% */ +#define kDxfDwgDefaultExportUnitScaleRatio 1.0 + +/** AutoCAD file filter preference constants: measurement units for export */ +#define kDxfDwgExportUnit "ExportUnit" +/** AutoCAD file filter preference constants: default measurement units for export */ +#define kDxfDwgDefaultExportUnit eMillimeters + +/** AutoCAD file filter preference constants: color depth for export */ +#define kDxfDwgExportColors "Colors" +/** AutoCAD file filter preference constants: default color depth for export */ +#define kDxfDwgDefaultExportColors eColorsTrueColor + +/** AutoCAD file filter preference constants: raster format for export (PNG or JPEG) */ +#define kDxfDwgExportRasterFormat "ExportRasterFormat" +/** AutoCAD file filter preference constants: default raster format for export */ +#define kDxfDwgDefaultExportRasterFormat eRasterPNG + +/** AutoCAD file filter preference constants: editability level for export */ +#define kDxfDwgExportOption "ExportOption" +/** AutoCAD file filter preference constants: default editability level for export */ +#define kDxfDwgDefaultExportOption eMaximumEditability + +/** AutoCAD file filter preference constants: whether to export only selected art. */ +#define kDxfDwgExportSelectedArtOnly "ExportSelectedArtOnly" +/** AutoCAD file filter preference constants: default for whether to export only selected art. */ +#define kDxfDwgDefaultExportSelectedArtOnly false + +/** AutoCAD file filter preference constants: whether to alter paths for appearance */ +#define kDxfDwgExportAlterPathsForAppearance "ExportAlterPathsForAppearance" +/** AutoCAD file filter preference constants: default for whether to alter paths for appearance */ +#define kDxfDwgDefaultExportAlterPathsForAppearance false + +/** AutoCAD file filter preference constants: whether to export outline text */ +#define kDxfDwgExportOutlineText "ExportOutlineText" +/** AutoCAD file filter preference constants: default for whether to export outline text */ +#define kDxfDwgDefaultExportOutlineText false + +/** AutoCAD file filter preference constants: whether to scale line weights on export */ +#define kDxfDwgExportScaleLineweights "ExportScaleLineweights" +/** AutoCAD file filter preference constants: default for whether to scale line weights on export */ +#define kDxfDwgDefaultExportScaleLineweights false + +// import related +/** AutoCAD file filter preference constants: scaling type for import */ +#define kDxfDwgImportGlobalScaleOption "ImportGlobalScaleOption" +/** AutoCAD file filter preference constants: default scaling type for import */ +#define kDxfDwgDefaultImportGlobalScaleOption eFitArtboard + +/** AutoCAD file filter preference constants: global scale value for import */ +#define kDxfDwgImportGlobalScaleValue "ImportGlobalScaleValue" +/** AutoCAD file filter preference constants: default global scale value for import, a percentage. */ +#define kDxfDwgDefaultImportGlobalScaleValue 100 + +/** AutoCAD file filter preference constants: scale ratio for import, */ +#define kDxfDwgImportUnitScaleRatio "ImportUnitScaleRatio" +/** AutoCAD file filter preference constants: default scale ratio for import, a percentage where 1.0=100% */ +#define kDxfDwgDefaultImportUnitScaleRatio 1.0 + +/** AutoCAD file filter preference constants: measurement units for import */ +#define kDxfDwgImportUnit "ImportUnit" +/** AutoCAD file filter preference constants: default measurement units for import */ +#define kDxfDwgDefaultImportUnit eMillimeters + +/** AutoCAD file filter preference constants: layout for import, a descriptive string + defined in the DWG or DXF file.*/ +#define kDxfDwgImportLayout "ImportLayout" +/** AutoCAD file filter preference constants: default layout for import */ +#define kDxfDwgDefaultImportLayout "" + +/** AutoCAD file filter preference constants: whether to center art on import. */ +#define kDxfDwgImportCenterArtwork "ImportCenterArtwork" + +/** AutoCAD file filter preference constants: whether to center art on import. */ +#define kDxfDwgImportMergeLayers "ImportMergeLayers" + +/** AutoCAD file filter preference constants: default for whether to center art on import. */ +#define kDxfDwgDefaultImportCenterArtwork true + +/** AutoCAD file filter preference constants: default for whether to merge layers on import. */ +#define kDxfDwgDefaultImportMergeLayers false + +/** AutoCAD file filter preference constants: whether to scale line weights on import. */ +#define kDxfDwgImportScaleLineweights "ImportScaleLineweights" +/** AutoCAD file filter preference constants: default for whether to scale line weights on import. */ +#define kDxfDwgDefaultImportScaleLineweights false + +/** AutoCAD file filter preference constants: whether to always convert AI group to Autocad Block Reference */ +#define kDxfDwgExportGroupAsBlockRef "ExportGroupAsBlockRef" +/** AutoCAD file filter preference constants: default for whether to always convert AI group to Autocad Block Reference */ +#define kDxfDwgDefaultExportGroupAsBlockRef false +// ------------------------------------------------------------------ +// structures + +/** AutoCAD file filter preferences. */ +struct DxfDwgExportPrefs +{ + /** File format (DXF or DWG). */ + DxfDwgAutoCADFileFormat m_fileFormat; + /** AutoCAD version */ + DxfDwgAutoCADVersion m_version; + /** Scale ration to use when scale option is \c #eScaleByValue. */ + AIReal m_unitScaleRatio; + /** Measurement units. */ + DxfDwgUnit m_unit; + /** Color depth. */ + DxfDwgColors m_colors; + /** Raster format (PNG or JPEG) */ + DxfDwgRasterFormat m_rasterFormat; + /** Editability level of exported file. */ + DxfDwgExportOption m_exportOption; + /** Whether to export only selected art. */ + AIBoolean m_isExportSelectedArtOnly; + /** Whether to alter path appearance by applying the \c #AIPathfinderData + options and parameters. */ + AIBoolean m_isAlterPathForAppearance; + /** Whether to export text as outline text. */ + AIBoolean m_isOutlineText; + /** Whether to scale line weights on export. */ + AIBoolean m_isScaleLineweights; + /* whether to always convert AI group to Autocad Block Reference */ + AIBoolean m_isExportGroupAsBlockRef; +}; + + +#include "AIHeaderEnd.h" + +#endif //__AIDXFDWGPREFS_h__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDynamicSymbol.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDynamicSymbol.h index cff0734..6a60568 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDynamicSymbol.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIDynamicSymbol.h @@ -1,74 +1,74 @@ -/************************************************************************* -ADOBE SYSTEMS INCORPORATED -Copyright 2015 Adobe Systems Incorporated -All Rights Reserved. - -NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the -terms of the Adobe license agreement accompanying it. If you have received this file from a -source other than Adobe, then your use, modification, or distribution of it requires the prior -written permission of Adobe. -**************************************************************************/ - -#ifndef _AI_DYNAMIC_SYMBOL_H_ -#define _AI_DYNAMIC_SYMBOL_H_ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#include "AIHeaderBegin.h" - -#define kAIDynamicSymbolSuite "AI Dynamic Symbol Suite" -#define kAIDynamicSymbolSuiteVersion AIAPI_VERSION(1) - -/** Symbol type.*/ -/**Symbol Type constants for symbols that mark whether a user has made the symbol dynamic, -using the symbol dialog. When a symbol has been marked as dynamic, users can -use the direct selection tool to override the appearance for specific instance. -@see \c #AIDynamicSymbolSuite::GetSymbolType() -*/ -enum AISymbolType -{ - /** Marks a static symbol, whose appearance is the same for all instances. */ - kAISymbolStaticType = 0x01, - /** Marks a dynamic symbol, whose appearance can be overridden for specific instances. */ - kAISymbolDynamicType = 0x02 -}; - -/******************************************************************************* -** -** AIDynamicSymbol Suite -** -**/ -struct AIDynamicSymbolSuite -{ - /** Retrieves the expanded art for the overridden appearance of a symbol, if the appearance has been overridden. - @param symbolArt [in] The symbol art object reference. - @param art [out] A buffer in which to return the overridden art, or NULL if the art is not overridden. - @see \c #GetSymbolArtHasOverride() - */ - AIAPI AIErr(*GetSymbolOverriddenArt) (AIArtHandle inSymbolArt, AIArtHandle *outArt); - - /** Reports whether the appearance of a symbol instance has been overridden. - @param SymbolArt [in] The symbol art object reference. - @param outHasOverridden [out] A boolean in which to return true if the art in the symbol instance has been overridden. - */ - AIAPI AIErr(*GetSymbolArtHasOverride)(AIArtHandle inSymbolArt, AIBoolean &outHasOverride); - - /* - Retrieves the type of a symbol, static or dynamic. Only dynamic symbols can have an overridden appearance. - @param symbolPattern [in] The symbol pattern reference. - @param outSymbolType [out] A buffer in which to return the symbol type. - */ - AIAPI AIErr(*GetSymbolType) (const AIPatternHandle inSymbolArt, AISymbolType& outSymbolType); - -}; - -#include "AIHeaderEnd.h" - -#endif // _AI_DYNAMIC_SYMBOL_H_ - +/************************************************************************* +ADOBE SYSTEMS INCORPORATED +Copyright 2015 Adobe Systems Incorporated +All Rights Reserved. + +NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the +terms of the Adobe license agreement accompanying it. If you have received this file from a +source other than Adobe, then your use, modification, or distribution of it requires the prior +written permission of Adobe. +**************************************************************************/ + +#ifndef _AI_DYNAMIC_SYMBOL_H_ +#define _AI_DYNAMIC_SYMBOL_H_ + +#ifndef __ASTypes__ +#include "ASTypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#include "AIHeaderBegin.h" + +#define kAIDynamicSymbolSuite "AI Dynamic Symbol Suite" +#define kAIDynamicSymbolSuiteVersion AIAPI_VERSION(1) + +/** Symbol type.*/ +/**Symbol Type constants for symbols that mark whether a user has made the symbol dynamic, +using the symbol dialog. When a symbol has been marked as dynamic, users can +use the direct selection tool to override the appearance for specific instance. +@see \c #AIDynamicSymbolSuite::GetSymbolType() +*/ +enum AISymbolType +{ + /** Marks a static symbol, whose appearance is the same for all instances. */ + kAISymbolStaticType = 0x01, + /** Marks a dynamic symbol, whose appearance can be overridden for specific instances. */ + kAISymbolDynamicType = 0x02 +}; + +/******************************************************************************* +** +** AIDynamicSymbol Suite +** +**/ +struct AIDynamicSymbolSuite +{ + /** Retrieves the expanded art for the overridden appearance of a symbol, if the appearance has been overridden. + @param symbolArt [in] The symbol art object reference. + @param art [out] A buffer in which to return the overridden art, or NULL if the art is not overridden. + @see \c #GetSymbolArtHasOverride() + */ + AIAPI AIErr(*GetSymbolOverriddenArt) (AIArtHandle inSymbolArt, AIArtHandle *outArt); + + /** Reports whether the appearance of a symbol instance has been overridden. + @param SymbolArt [in] The symbol art object reference. + @param outHasOverridden [out] A boolean in which to return true if the art in the symbol instance has been overridden. + */ + AIAPI AIErr(*GetSymbolArtHasOverride)(AIArtHandle inSymbolArt, AIBoolean &outHasOverride); + + /* + Retrieves the type of a symbol, static or dynamic. Only dynamic symbols can have an overridden appearance. + @param symbolPattern [in] The symbol pattern reference. + @param outSymbolType [out] A buffer in which to return the symbol type. + */ + AIAPI AIErr(*GetSymbolType) (const AIPatternHandle inSymbolArt, AISymbolType& outSymbolType); + +}; + +#include "AIHeaderEnd.h" + +#endif // _AI_DYNAMIC_SYMBOL_H_ + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEntry.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEntry.h index afaad33..36d1a46 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEntry.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEntry.h @@ -1,711 +1,717 @@ -#ifndef __AIEntry__ -#define __AIEntry__ - -/* - * Name: AIEntry.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Dictionary Entry Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif -#ifndef __AIArt__ -#include "AIArt.h" -#endif -#ifndef __AILayer__ -#include "AILayer.h" -#endif -#ifndef __AICustomColor__ -#include "AICustomColor.h" -#endif -#ifndef __AIObjectSet__ -#include "AIObjectSet.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIEntry.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIEntrySuite "AI Entry Suite" -#define kAIEntrySuiteVersion7 AIAPI_VERSION(7) -#define kAIEntrySuiteVersion kAIEntrySuiteVersion7 -#define kAIEntryVersion kAIEntrySuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/** - A reference to a container dictionary entry, which associates a string key - with a value of a given type (\c #AIEntryType). - \li Use the \c #AIDictionarySuite functions to get and set keys, - and to get and set entries by key. - \li Use the \c #AIEntrySuite functions to get and set entry values - of specific data types. - */ -typedef struct _AIEntry* AIEntryRef; - -/** An array is a heterogeneous sequence of entries indexed by integers. - @see \c #AIArraySuite */ -typedef struct _AIArray* AIArrayRef; - -/** A dictionary is a heterogeneous collection of entries indexed by keys that are character strings. - @see \c #AIDictionarySuite */ -typedef struct _AIDictionary* AIDictionaryRef; -typedef const struct _AIDictionary* ConstAIDictionaryRef; - -/** A unique identifier, which can be stored in dictionaries and arrays. - A unique identifier cannot occur in more than one container, - or more than once in a container. - @see \c #AIUIDREFSuite */ -typedef struct _AIUID* AIUIDRef; - -/** An opaque reference to a unique identifier. - The \c #AIEntrySuite provides methods to convert between - \c #AIEntryRef and \c #AIUIDRef. - @see \c #AIUIDREFSuite */ -typedef struct _AIUIDREF* AIUIDREFRef; - -/** A reference to an XML element. - @see \c #AIXMLElementSuite */ -typedef struct _AIXMLNode* AIXMLNodeRef; - -/** A reference to an SVG filter - @see \c #AISVGFilterSuite */ -typedef struct _t_AISVGFilterOpaque* AISVGFilterHandle; - -/** A reference to an art style. - @see \c #AIArtStyleSuite. */ -typedef struct _t_AIArtStyle* AIArtStyleHandle; - - /** Container entry type, the data type for the value of an entry. */ -typedef ai::int32 AIEntryType; -/** The container entry types. Some correspond directly to data types, and - some to objects defined in other suites. */ -enum -{ - /** Value type is unknown to this version of the API */ - UnknownType, - /** Integer (32 bit signed) */ - IntegerType, - /** Boolean */ - BooleanType, - /** Real (single precision floating point) */ - RealType, - /** String (null terminated sequence of 8-bit values) */ - StringType, - /** Dictionary. An art object is stored in a container by storing its dictionary. */ - DictType, - /** Array */ - ArrayType, - /** Binary data. If you store the data to file, you are responsible - for the byte order of the data. */ - BinaryType, - /** An (x,y) location. A convenience over an \c ArrayType of 2 \c Reals */ - PointType, - /** A transformation matrix. A convenience over an \c ArrayType of 6 \c Reals */ - MatrixType, - /** A reference to a pattern. See \c #AIPatternSuite. */ - PatternRefType, - /** A reference to a brush pattern */ - BrushPatternRefType, - /** A reference to a custom color (either spot or global process). See \c #AICustomColorSuite.*/ - CustomColorRefType, - /** A reference to a gradient. See \c #AIGradientSuite. */ - GradientRefType, - /** A reference to a plug-in global object. See \c #AIPluginSuite. */ - PluginObjectRefType, - /** A fill style. See \c #AIArtStyleSuite. */ - FillStyleType, - /** A stroke style. See \c #AIArtStyleSuite. */ - StrokeStyleType, - /** A unique identifier. See \c #AIUIDSuite. */ - UIDType, - /** A unique identifier reference. See \c #AIUIDSuite.*/ - UIDREFType, - /** An XML node. See \c #AIXMLElementSuite. */ - XMLNodeType, - /** An SVG filter. See \c #AISVGFilterSuite.*/ - SVGFilterType, - /** An art style. See \c #AIArtStyleSuite.*/ - ArtStyleType, - /** A symbol definition reference. See \c #AISymbolSuite. */ - SymbolPatternRefType, - /** A graph design reference. */ - GraphDesignRefType, - /** A blend style (transparency attributes). See \c #AIGradientSuite. */ - BlendStyleType, - /** A graphical object. */ - GraphicObjectType, - /** A UnicodeString object. See \c #AIUnicodeStringSuite. */ - UnicodeStringType, - /** A pointer which is 8-bytes in 64-bit and 4-bytes in 32 bit.**/ - PointerType, - /** PointType which is written as relative to ruler origin in document*/ - ArtworkPointType -}; - - -/** @ingroup Errors */ -#define kNoSuchEntry 'EnNS' -/** @ingroup Errors - Returned when trying to access an entries value and the entry is not of - the requested type. - */ -#define kWrongEntryType 100 -/** @ingroup Errors - Returned when trying to convert an entry to a particular value type and - the underlying value of the entry is not convertible. For example, an integer can - be converted to a real but not to a UID. - */ -#define kNoConversionErr 'NoCV' - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - - This suite provides functions for constructing and inspecting dictionary - and array entries. - - Entry objects associate a string key with a value of a given type - (\c #AIEntryType). Access array entries by integer index. - Access dictionary entries by key, using the functions of the - \c #AIDictionarySuite. - - \li Functions with names "To" create entries of certain - data types; for example, \c #ToInteger() creates an integer entry from - an integer value. - \li Functions with names "From" retrieve the values of entries; for - example, use \c #FromInteger() to get an integer entry value. - - @see \c #AIArraySuite::MoveArtToEntry(),
- \c #AIArraySuite::MoveEntryToArt(),
- \c #AIDictionarySuite::MoveArtToEntry(),
- \c #AIDictionarySuite::MoveEntryToArt() - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIEntrySuite and \c #kAIEntryVersion. - - - Entries, like the dictionaries and arrays that contain them, are reference - counted. A function that returns an entry increments the count first. The - caller must decrement the count when that entry is no longer needed to avoid - memory leaks. For convenience, the "To" and \c #AIDictionarySuite::Set() - functions automatically decrement the reference count of the entry you pass in. - This allows you to get the value of an entry in a container such as - a dictionary with code like this: - @code -ASBoolean value; -result = sAIEntry->ToBoolean(sAIDictionary->Get(dict, "MyKey"), &value); - @endcode - - Similarly, you can set an entry value in a container such as a dictionary - with code like this: - @code -result = sAIDictionary->Set(dict, "MyKey", sAIEntry->FromReal(15)); - @endcode - - The \c #GetType() and \c #Equiv() functions do not consume the parameter; - manage reference counts accordingly. -*/ - -struct AIEntrySuite -{ - - /** Reference count maintenance. increments the count of references to an entry. - @param entry The entry object. - */ - AIAPI ai::int32 (*AddRef) ( AIEntryRef entry ); - - /** Reference count maintenance. decrements the count of references to an entry. - @param entry The entry object. - */ - AIAPI ai::int32 (*Release) ( AIEntryRef entry ); - - /** Retrieves the type of an entry. Does not affect the reference count of the passed - entry. (Note that this function returns a type value, not an error code.) - @param entry The entry object - @return The entry type. - */ - AIAPI AIEntryType (*GetType) ( AIEntryRef entry ); - - - // the various entry types - - /** Retrieves the boolean value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToBoolean) ( AIEntryRef entry, ASBoolean* value ); - - /** Constructs an entry from a boolean value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromBoolean) ( ASBoolean value ); - - /** Retrieves the integer value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToInteger) ( AIEntryRef entry, ai::int32* value ); - - /** Constructs an entry from an integer value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromInteger) ( ai::int32 value ); - - /** Retrieves the real-number value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToReal) ( AIEntryRef entry, AIReal* value ); - - /** Constructs an entry from a real-number value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromReal) ( AIReal value ); - - /** Retrieves the point value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToRealPoint) ( AIEntryRef entry, AIRealPoint* value ); - - /** Constructs an entry from a point value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromRealPoint) ( const AIRealPoint *value ); - - /** Retrieves the transformation-matrix value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToRealMatrix) ( AIEntryRef entry, AIRealMatrix* value ); - - /** Constructs an entry from a transformation-matrix value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromRealMatrix) ( const AIRealMatrix *value ); - - /** Retrieves the string value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToString) ( AIEntryRef entry, const char** value ); - - /** Constructs an entry from a string value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromString) ( const char* value ); - - /** Retrieves the dictionary value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToDict) ( AIEntryRef entry, AIDictionaryRef* value ); - - /** Constructs an entry from a dictionary value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromDict) ( AIDictionaryRef value ); - - /** Retrieves the art object value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - @see \c #AIArraySuite::MoveArtToEntry()
\c #AIDictionarySuite::MoveArtToEntry(). - */ - AIAPI AIErr (*ToArt) ( AIEntryRef entry, AIArtHandle* art ); - - /** Retrieves the array value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToArray) ( AIEntryRef entry, AIArrayRef* value ); - - /** Constructs an entry from an array value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromArray) ( AIArrayRef value ); - - /** Retrieves the binary data value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value, or \c NULL to - retrieve the size needed for the value. - @param size [out] A buffer in which to return the number of bytes - written to the \c value buffer, or the size needed if \c value is \c NULL. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - @note If you call the function twice to get the size needed and then retrieve the - value, keep in mind that each call decrements the reference count of the entry. - */ - AIAPI AIErr (*ToBinary) ( AIEntryRef entry, void* value, size_t* size ); - - /** Constructs an entry from a binary data value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @param size The number of bytes in the \c value buffer. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromBinary) ( void* value, size_t size ); - - /** Retrieves the pattern object value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToPattern) ( AIEntryRef entry, AIPatternHandle* value ); - - /** Constructs an entry from a pattern object value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromPattern) ( AIPatternHandle value ); - - /** Retrieves the brush pattern object value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToBrushPattern) ( AIEntryRef entry, AIPatternHandle* value ); - - /** Constructs an entry from a brush pattern object value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromBrushPattern) ( AIPatternHandle value ); - - /** Retrieves the gradient object value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToGradient) ( AIEntryRef entry, AIGradientHandle* value ); - - /** Constructs an entry from a gradient object value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromGradient) ( AIGradientHandle value ); - - /** Retrieves the custom color object value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToCustomColor) ( AIEntryRef entry, AICustomColorHandle* value ); - - /** Constructs an entry from a custom color object value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromCustomColor) ( AICustomColorHandle value ); - - /** Retrieves the plug-in global object value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToPluginObject) ( AIEntryRef entry, AIObjectHandle* value ); - - /** Constructs an entry from a plug-in global object value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - - AIAPI AIEntryRef (*FromPluginObject) ( AIObjectHandle value ); - - /** Retrieves the fill style value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToFillStyle) ( AIEntryRef entry, struct AIFillStyle *value ); - - /** Constructs an entry from a fill style value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromFillStyle) ( const struct AIFillStyle *value ); - - /** Retrieves the stroke style value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToStrokeStyle) ( AIEntryRef entry, struct AIStrokeStyle *value ); - - /** Constructs an entry from a stroke style value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromStrokeStyle) ( const struct AIStrokeStyle *value ); - - /* New in Illustrator 10.0 */ - - /** Retrieves the unique identifier value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToUID) ( AIEntryRef entry, AIUIDRef* value ); - - /** Constructs an entry from a unique identifier value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromUID) ( AIUIDRef value ); - - /** Retrieves the unique identifier reference value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToUIDREF) ( AIEntryRef entry, AIUIDREFRef* value ); - - /** Constructs an entry from a unique identifier reference value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromUIDREF) ( AIUIDREFRef value ); - - /** Retrieves the XML node value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToXMLNode) ( AIEntryRef entry, AIXMLNodeRef* value ); - - /** Constructs an entry from an XML node value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromXMLNode) ( AIXMLNodeRef value ); - - /** Retrieves the SVG filter value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToSVGFilterHandle) ( AIEntryRef entry, AISVGFilterHandle* value ); - - /** Constructs an entry from an SVG filter value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromSVGFilterHandle) ( AISVGFilterHandle value ); - - /** Retrieves the symbol pattern object value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToSymbolPattern) ( AIEntryRef entry, AIPatternHandle* value ); - - /** Constructs an entry from a symbol pattern object value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromSymbolPattern) ( AIPatternHandle value ); - - // Type conversion routines. - // Conversion rules are the same as for \c std::basic_[io]stream. - - /** Retrieves a string entry as a boolean if possible. Only valid for entries with - value "1", "0", "true", or "false". - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the new value. - @return The error \c #kNoConversionErr if conversion is not possible. - */ - AIAPI AIErr (*AsBoolean) ( AIEntryRef entry, ASBoolean* value ); - - /** Retrieves a string entry as an integer if possible. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the new value. - @return The error \c #kNoConversionErr if conversion is not possible. - */ - AIAPI AIErr (*AsInteger) ( AIEntryRef entry, ai::int32* value ); - - /** Retrieves a string entry as a real number if possible. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the new value. - @return The error \c #kNoConversionErr if conversion is not possible. - */ - AIAPI AIErr (*AsReal) ( AIEntryRef entry, AIReal* value ); - - /** Retrieves an entry as a string if possible. Converts an integer, boolean, - real, UID, UID reference, or Unicode string value to a platform-encoded string. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the new value. - This block of memory is reused by the next call to this function; do not delete - it. If needed, make a copy of the returned string before making another call - to this function. - @return The error \c #kNoConversionErr if conversion is not possible. - */ - AIAPI AIErr (*AsString) ( AIEntryRef entry, const char** value ); - - /** Retrieves a string entry as a unique identifier if possible. The string - value must be in the form "id(\e uid )". - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the new value. - @return The error \c #kNoConversionErr if conversion is not possible. - */ - AIAPI AIErr (*AsUIDREF) ( AIEntryRef entry, AIUIDREFRef* value ); - - /** Retrieves the art style object value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToArtStyle) ( AIEntryRef entry, AIArtStyleHandle* value ); - - /** Constructs an entry from a art style object value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromArtStyle) ( AIArtStyleHandle value ); - - /* New in Illustrator 12.0 */ - - /** Retrieves the Unicode string value of an entry. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the value. - @return The error \c #kBadParameterErr if the entry is not of the correct type. - */ - AIAPI AIErr (*ToUnicodeString) ( AIEntryRef entry, ai::UnicodeString& value ); - - /** Constructs an entry from a Unicode string value. - (Note that this function returns an entry object, not an error code.) - @param value The entry value. - @return The new entry object. The initial reference count is 1. - */ - AIAPI AIEntryRef (*FromUnicodeString) ( const ai::UnicodeString& value ); - - /** Retrieves an entry as a Unicode string, if possible. Converts an integer, boolean, - real, UID, UID reference, or platform-encoded string value to a Unicode string. - @param entry The entry object. This call automatically decrements - the reference count. - @param value [out] A buffer in which to return the new value. - @return The error \c #kNoConversionErr if conversion is not possible. - */ - AIAPI AIErr (*AsUnicodeString) ( AIEntryRef entry, ai::UnicodeString& value ); - - /* New in Illustrator 15.0 */ - - /** Reports whether two entries are equivalent. - Equivalent entries have the same type and value. - Two NULL entries are considered equivalent. - @param entry1 The first entry. - @param entry2 The second entry. - @return True if the entries are equivalent, false otherwise. - */ - AIAPI ASBoolean(*Equiv) (AIEntryRef entry1, AIEntryRef entry2); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIEntry__ +#define __AIEntry__ + +/* + * Name: AIEntry.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator Dictionary Entry Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2001-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif +#ifndef __AIArt__ +#include "AIArt.h" +#endif +#ifndef __AILayer__ +#include "AILayer.h" +#endif +#ifndef __AICustomColor__ +#include "AICustomColor.h" +#endif +#ifndef __AIObjectSet__ +#include "AIObjectSet.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIEntry.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIEntrySuite "AI Entry Suite" +#define kAIEntrySuiteVersion7 AIAPI_VERSION(7) +#define kAIEntrySuiteVersion kAIEntrySuiteVersion7 +#define kAIEntryVersion kAIEntrySuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + + +/** + A reference to a container dictionary entry, which associates a string key + with a value of a given type (\c #AIEntryType). + \li Use the \c #AIDictionarySuite functions to get and set keys, + and to get and set entries by key. + \li Use the \c #AIEntrySuite functions to get and set entry values + of specific data types. + */ +typedef struct _AIEntry* AIEntryRef; + +/** An array is a heterogeneous sequence of entries indexed by integers. + @see \c #AIArraySuite */ +typedef struct _AIArray* AIArrayRef; + +/** A dictionary is a heterogeneous collection of entries indexed by keys that are character strings. + @see \c #AIDictionarySuite */ +typedef struct _AIDictionary* AIDictionaryRef; +typedef const struct _AIDictionary* ConstAIDictionaryRef; + +/** A unique identifier, which can be stored in dictionaries and arrays. + A unique identifier cannot occur in more than one container, + or more than once in a container. + @see \c #AIUIDREFSuite */ +typedef struct _AIUID* AIUIDRef; + +/** An opaque reference to a unique identifier. + The \c #AIEntrySuite provides methods to convert between + \c #AIEntryRef and \c #AIUIDRef. + @see \c #AIUIDREFSuite */ +typedef struct _AIUIDREF* AIUIDREFRef; + +/** A reference to an XML element. + @see \c #AIXMLElementSuite */ +typedef struct _AIXMLNode* AIXMLNodeRef; + +/** A reference to an SVG filter + @see \c #AISVGFilterSuite */ +typedef struct _t_AISVGFilterOpaque* AISVGFilterHandle; + +/** A reference to an art style. + @see \c #AIArtStyleSuite. */ +typedef struct _t_AIArtStyle* AIArtStyleHandle; + + /** Container entry type, the data type for the value of an entry. */ +typedef ai::int32 AIEntryType; +/** The container entry types. Some correspond directly to data types, and + some to objects defined in other suites. */ +enum +{ + /** Value type is unknown to this version of the API */ + UnknownType, + /** Integer (32 bit signed) */ + IntegerType, + /** Boolean */ + BooleanType, + /** Real (single precision floating point) */ + RealType, + /** String (null terminated sequence of 8-bit values) */ + StringType, + /** Dictionary. An art object is stored in a container by storing its dictionary. */ + DictType, + /** Array */ + ArrayType, + /** Binary data. If you store the data to file, you are responsible + for the byte order of the data. */ + BinaryType, + /** An (x,y) location. A convenience over an \c ArrayType of 2 \c Reals */ + PointType, + /** A transformation matrix. A convenience over an \c ArrayType of 6 \c Reals */ + MatrixType, + /** A reference to a pattern. See \c #AIPatternSuite. */ + PatternRefType, + /** A reference to a brush pattern */ + BrushPatternRefType, + /** A reference to a custom color (either spot or global process). See \c #AICustomColorSuite.*/ + CustomColorRefType, + /** A reference to a gradient. See \c #AIGradientSuite. */ + GradientRefType, + /** A reference to a plug-in global object. See \c #AIPluginSuite. */ + PluginObjectRefType, + /** A fill style. See \c #AIArtStyleSuite. */ + FillStyleType, + /** A stroke style. See \c #AIArtStyleSuite. */ + StrokeStyleType, + /** A unique identifier. See \c #AIUIDSuite. */ + UIDType, + /** A unique identifier reference. See \c #AIUIDSuite.*/ + UIDREFType, + /** An XML node. See \c #AIXMLElementSuite. */ + XMLNodeType, + /** An SVG filter. See \c #AISVGFilterSuite.*/ + SVGFilterType, + /** An art style. See \c #AIArtStyleSuite.*/ + ArtStyleType, + /** A symbol definition reference. See \c #AISymbolSuite. */ + SymbolPatternRefType, + /** A graph design reference. */ + GraphDesignRefType, + /** A blend style (transparency attributes). See \c #AIGradientSuite. */ + BlendStyleType, + /** A graphical object. */ + GraphicObjectType, + /** A UnicodeString object. See \c #AIUnicodeStringSuite. */ + UnicodeStringType, + /** A pointer which is 8-bytes in 64-bit and 4-bytes in 32 bit.**/ + PointerType, + /** PointType which is written as relative to ruler origin in document*/ + ArtworkPointType, + /** A Smooth Shading Style. See ToDo \c #AIArtStyleSuite. */ + SmoothShadingType +#if defined(ILLUSTRATOR_MINIMAL) + /** A Boost uuid Type*/ + ,BoostUUIDType +#endif +}; + + +/** @ingroup Errors */ +#define kNoSuchEntry 'EnNS' +/** @ingroup Errors + Returned when trying to access an entries value and the entry is not of + the requested type. + */ +#define kWrongEntryType 100 +/** @ingroup Errors + Returned when trying to convert an entry to a particular value type and + the underlying value of the entry is not convertible. For example, an integer can + be converted to a real but not to a UID. + */ +#define kNoConversionErr 'NoCV' + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + + This suite provides functions for constructing and inspecting dictionary + and array entries. + + Entry objects associate a string key with a value of a given type + (\c #AIEntryType). Access array entries by integer index. + Access dictionary entries by key, using the functions of the + \c #AIDictionarySuite. + + \li Functions with names "To" create entries of certain + data types; for example, \c #ToInteger() creates an integer entry from + an integer value. + \li Functions with names "From" retrieve the values of entries; for + example, use \c #FromInteger() to get an integer entry value. + + @see \c #AIArraySuite::MoveArtToEntry(),
+ \c #AIArraySuite::MoveEntryToArt(),
+ \c #AIDictionarySuite::MoveArtToEntry(),
+ \c #AIDictionarySuite::MoveEntryToArt() + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIEntrySuite and \c #kAIEntryVersion. + + + Entries, like the dictionaries and arrays that contain them, are reference + counted. A function that returns an entry increments the count first. The + caller must decrement the count when that entry is no longer needed to avoid + memory leaks. For convenience, the "To" and \c #AIDictionarySuite::Set() + functions automatically decrement the reference count of the entry you pass in. + This allows you to get the value of an entry in a container such as + a dictionary with code like this: + @code +ASBoolean value; +result = sAIEntry->ToBoolean(sAIDictionary->Get(dict, "MyKey"), &value); + @endcode + + Similarly, you can set an entry value in a container such as a dictionary + with code like this: + @code +result = sAIDictionary->Set(dict, "MyKey", sAIEntry->FromReal(15)); + @endcode + + The \c #GetType() and \c #Equiv() functions do not consume the parameter; + manage reference counts accordingly. +*/ + +struct AIEntrySuite +{ + + /** Reference count maintenance. increments the count of references to an entry. + @param entry The entry object. + */ + AIAPI ai::int32 (*AddRef) ( AIEntryRef entry ); + + /** Reference count maintenance. decrements the count of references to an entry. + @param entry The entry object. + */ + AIAPI ai::int32 (*Release) ( AIEntryRef entry ); + + /** Retrieves the type of an entry. Does not affect the reference count of the passed + entry. (Note that this function returns a type value, not an error code.) + @param entry The entry object + @return The entry type. + */ + AIAPI AIEntryType (*GetType) ( AIEntryRef entry ); + + + // the various entry types + + /** Retrieves the boolean value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToBoolean) ( AIEntryRef entry, ASBoolean* value ); + + /** Constructs an entry from a boolean value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromBoolean) ( ASBoolean value ); + + /** Retrieves the integer value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToInteger) ( AIEntryRef entry, ai::int32* value ); + + /** Constructs an entry from an integer value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromInteger) ( ai::int32 value ); + + /** Retrieves the real-number value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToReal) ( AIEntryRef entry, AIReal* value ); + + /** Constructs an entry from a real-number value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromReal) ( AIReal value ); + + /** Retrieves the point value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToRealPoint) ( AIEntryRef entry, AIRealPoint* value ); + + /** Constructs an entry from a point value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromRealPoint) ( const AIRealPoint *value ); + + /** Retrieves the transformation-matrix value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToRealMatrix) ( AIEntryRef entry, AIRealMatrix* value ); + + /** Constructs an entry from a transformation-matrix value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromRealMatrix) ( const AIRealMatrix *value ); + + /** Retrieves the string value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToString) ( AIEntryRef entry, const char** value ); + + /** Constructs an entry from a string value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromString) ( const char* value ); + + /** Retrieves the dictionary value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToDict) ( AIEntryRef entry, AIDictionaryRef* value ); + + /** Constructs an entry from a dictionary value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromDict) ( AIDictionaryRef value ); + + /** Retrieves the art object value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + @see \c #AIArraySuite::MoveArtToEntry()
\c #AIDictionarySuite::MoveArtToEntry(). + */ + AIAPI AIErr (*ToArt) ( AIEntryRef entry, AIArtHandle* art ); + + /** Retrieves the array value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToArray) ( AIEntryRef entry, AIArrayRef* value ); + + /** Constructs an entry from an array value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromArray) ( AIArrayRef value ); + + /** Retrieves the binary data value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value, or \c NULL to + retrieve the size needed for the value. + @param size [out] A buffer in which to return the number of bytes + written to the \c value buffer, or the size needed if \c value is \c NULL. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + @note If you call the function twice to get the size needed and then retrieve the + value, keep in mind that each call decrements the reference count of the entry. + */ + AIAPI AIErr (*ToBinary) ( AIEntryRef entry, void* value, size_t* size ); + + /** Constructs an entry from a binary data value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @param size The number of bytes in the \c value buffer. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromBinary) ( void* value, size_t size ); + + /** Retrieves the pattern object value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToPattern) ( AIEntryRef entry, AIPatternHandle* value ); + + /** Constructs an entry from a pattern object value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromPattern) ( AIPatternHandle value ); + + /** Retrieves the brush pattern object value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToBrushPattern) ( AIEntryRef entry, AIPatternHandle* value ); + + /** Constructs an entry from a brush pattern object value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromBrushPattern) ( AIPatternHandle value ); + + /** Retrieves the gradient object value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToGradient) ( AIEntryRef entry, AIGradientHandle* value ); + + /** Constructs an entry from a gradient object value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromGradient) ( AIGradientHandle value ); + + /** Retrieves the custom color object value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToCustomColor) ( AIEntryRef entry, AICustomColorHandle* value ); + + /** Constructs an entry from a custom color object value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromCustomColor) ( AICustomColorHandle value ); + + /** Retrieves the plug-in global object value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToPluginObject) ( AIEntryRef entry, AIObjectHandle* value ); + + /** Constructs an entry from a plug-in global object value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + + AIAPI AIEntryRef (*FromPluginObject) ( AIObjectHandle value ); + + /** Retrieves the fill style value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToFillStyle) ( AIEntryRef entry, struct AIFillStyle *value ); + + /** Constructs an entry from a fill style value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromFillStyle) ( const struct AIFillStyle *value ); + + /** Retrieves the stroke style value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToStrokeStyle) ( AIEntryRef entry, struct AIStrokeStyle *value ); + + /** Constructs an entry from a stroke style value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromStrokeStyle) ( const struct AIStrokeStyle *value ); + + /* New in Illustrator 10.0 */ + + /** Retrieves the unique identifier value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToUID) ( AIEntryRef entry, AIUIDRef* value ); + + /** Constructs an entry from a unique identifier value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromUID) ( AIUIDRef value ); + + /** Retrieves the unique identifier reference value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToUIDREF) ( AIEntryRef entry, AIUIDREFRef* value ); + + /** Constructs an entry from a unique identifier reference value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromUIDREF) ( AIUIDREFRef value ); + + /** Retrieves the XML node value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToXMLNode) ( AIEntryRef entry, AIXMLNodeRef* value ); + + /** Constructs an entry from an XML node value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromXMLNode) ( AIXMLNodeRef value ); + + /** Retrieves the SVG filter value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToSVGFilterHandle) ( AIEntryRef entry, AISVGFilterHandle* value ); + + /** Constructs an entry from an SVG filter value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromSVGFilterHandle) ( AISVGFilterHandle value ); + + /** Retrieves the symbol pattern object value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToSymbolPattern) ( AIEntryRef entry, AIPatternHandle* value ); + + /** Constructs an entry from a symbol pattern object value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromSymbolPattern) ( AIPatternHandle value ); + + // Type conversion routines. + // Conversion rules are the same as for \c std::basic_[io]stream. + + /** Retrieves a string entry as a boolean if possible. Only valid for entries with + value "1", "0", "true", or "false". + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the new value. + @return The error \c #kNoConversionErr if conversion is not possible. + */ + AIAPI AIErr (*AsBoolean) ( AIEntryRef entry, ASBoolean* value ); + + /** Retrieves a string entry as an integer if possible. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the new value. + @return The error \c #kNoConversionErr if conversion is not possible. + */ + AIAPI AIErr (*AsInteger) ( AIEntryRef entry, ai::int32* value ); + + /** Retrieves a string entry as a real number if possible. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the new value. + @return The error \c #kNoConversionErr if conversion is not possible. + */ + AIAPI AIErr (*AsReal) ( AIEntryRef entry, AIReal* value ); + + /** Retrieves an entry as a string if possible. Converts an integer, boolean, + real, UID, UID reference, or Unicode string value to a platform-encoded string. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the new value. + This block of memory is reused by the next call to this function; do not delete + it. If needed, make a copy of the returned string before making another call + to this function. + @return The error \c #kNoConversionErr if conversion is not possible. + */ + AIAPI AIErr (*AsString) ( AIEntryRef entry, const char** value ); + + /** Retrieves a string entry as a unique identifier if possible. The string + value must be in the form "id(\e uid )". + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the new value. + @return The error \c #kNoConversionErr if conversion is not possible. + */ + AIAPI AIErr (*AsUIDREF) ( AIEntryRef entry, AIUIDREFRef* value ); + + /** Retrieves the art style object value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToArtStyle) ( AIEntryRef entry, AIArtStyleHandle* value ); + + /** Constructs an entry from a art style object value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromArtStyle) ( AIArtStyleHandle value ); + + /* New in Illustrator 12.0 */ + + /** Retrieves the Unicode string value of an entry. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the value. + @return The error \c #kBadParameterErr if the entry is not of the correct type. + */ + AIAPI AIErr (*ToUnicodeString) ( AIEntryRef entry, ai::UnicodeString& value ); + + /** Constructs an entry from a Unicode string value. + (Note that this function returns an entry object, not an error code.) + @param value The entry value. + @return The new entry object. The initial reference count is 1. + */ + AIAPI AIEntryRef (*FromUnicodeString) ( const ai::UnicodeString& value ); + + /** Retrieves an entry as a Unicode string, if possible. Converts an integer, boolean, + real, UID, UID reference, or platform-encoded string value to a Unicode string. + @param entry The entry object. This call automatically decrements + the reference count. + @param value [out] A buffer in which to return the new value. + @return The error \c #kNoConversionErr if conversion is not possible. + */ + AIAPI AIErr (*AsUnicodeString) ( AIEntryRef entry, ai::UnicodeString& value ); + + /* New in Illustrator 15.0 */ + + /** Reports whether two entries are equivalent. + Equivalent entries have the same type and value. + Two NULL entries are considered equivalent. + @param entry1 The first entry. + @param entry2 The second entry. + @return True if the entries are equivalent, false otherwise. + */ + AIAPI ASBoolean(*Equiv) (AIEntryRef entry1, AIEntryRef entry2); + +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEnvelope.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEnvelope.h index 7980471..9ba8b57 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEnvelope.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEnvelope.h @@ -1,384 +1,384 @@ -#ifndef __AIEnvelope__ -#define __AIEnvelope__ - -/* - * Name: AIEnvelope.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Envelope Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2013 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIDict__ -#include "AIDictionary.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIEnvelope.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIEnvelopeSuite "AI Envelope Suite" -#define kAIEnvelopeSuiteVersion4 AIAPI_VERSION(4) -#define kAIEnvelopeSuiteVersion kAIEnvelopeSuiteVersion4 -#define kAIEnvelopeVersion kAIEnvelopeSuiteVersion - -/** Envelope options bit flag. - When set, expand and distort the appearance of an object - (such as applied effects or styles) and not just the object's - underlying geometry. - When false, the appearance is applied after the envelope - distorts the underlying geometry. */ -#define kDeformExpandAppearance (1 << 0) -/** Envelope options bit flag. - When set, expand and distort pattern fill. */ -#define kDeformExpandPatternFills (1 << 1) -/** Envelope options bit flag. - When set, expand and distort gradient fill. */ -#define kDeformExpandLinearGradients (1 << 2) - -/** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). - When set, expand and deform text. - (Envelopes do this automatically, regardless of flag value.) - */ -#define kDeformExpandText (1 << 3) - /** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). - When set, deform objects in any opacity masks associated with the - source art (as created with the Transparency palette). - (Envelopes do this automatically, regardless of flag value.) */ -#define kDeformOpacityMasks (1 << 4) -/** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). - When set, expand and deform plug-in groups. - (Envelopes do this automatically, regardless of flag value.)*/ -#define kDeformExpandPluginGroups (1 << 5) -/** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). - When set, expand and deform symbols. - (Envelopes do this automatically, regardless of flag value.)*/ -#define kDeformExpandSymbols (1 << 6) -/** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). - Sets all flags except \c #kDeformNonAARaster and \c #kDeformRasterMakeClip. */ -#define kDeformAll (0x0000FFFF) -/** Envelope options bit flag. - When set, anti-alias is \e not used to smooth - raster images that are distorted in envelopes. */ -#define kDeformNonAARaster (1 << 16) -/** Envelope options bit flag. - How to preserve raster shapes when they are distorted by non-rectangular envelopes. - \li When set, apply an alpha channel (transparency) to the raster image. - \li When clear, use a clipping mask on the raster image. - */ -#define kDeformRasterMakeClip (1 << 17) - - -/** @ingroup DictKeys - Dictionary key for \c mesh value \c #AIEnvelopeSuite::DeformArt(). - Entry value is an \c #AIArtHandle of \c #kMeshArt type */ -#define kAIDeformMeshKey "DeformMesh" -/** @ingroup DictKeys - Dictionary key for \c fidelity value in \c #AIEnvelopeSuite::DeformArt(). - Controls how closely the deformed object fits into the envelope region. - Higher values add more points to the distorted paths, and take longer - to calculate. Entry value is an \c ASInt32 in the range [0..100] */ -#define kAIDeformFidelityKey "DeformFidelity" // ASInt32 [0..100] -/** @ingroup DictKeys - Dictionary key for \c options value in \c #AIEnvelopeSuite::DeformArt(). - Entry value is a logical OR of option values; see \c #AIEnvelopeOptions. */ -#define kAIDeformOptionsKey "DeformOptions" // ASInt32 - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Envelope deformation options that control how art is deformed. - @see \c #AIEnvelopeSuite::MakeEnvelope() */ -typedef struct -{ - /** Options, a logical OR of option values: -
\c #kDeformExpandAppearance -
\c #kDeformExpandPatternFills -
\c #kDeformExpandLinearGradients -
\c #kDeformNonAARaster -
\c #kDeformRasterMakeClip - */ - ai::int32 envOptions; - /** Controls how closely the deformed object fits into the envelope region. - Higher values add more points to the distorted paths, and take longer - to calculate. An \c ASInt32 n the range [0..100] */ - ai::int32 fidelity; - -} AIEnvelopeOptions; - -/** Callback for progress reports during a call to \c #AIEnvelopeSuite::DeformArt(). - @param current The current progress, a value between 0 and \c total. - @param total A value at which the operation is complete. - @return False if user cancels the operation, otherwise true. */ -typedef AIAPI AIBoolean (*AIDeformProgressProc)(ai::int32 current, ai::int32 total); - -/** Predefined warp styles for \c #AIEnvelopeSuite::WarpEnvelope(). */ -typedef enum -{ - kWarpStyleArc = 1, - kWarpStyleArcLower, - kWarpStyleArcUpper, - kWarpStyleArch, - kWarpStyleBulge, - kWarpStyleShellLower, - kWarpStyleShellUpper, - kWarpStyleFlag, - kWarpStyleWave, - kWarpStyleFish, - kWarpStyleRise, - kWarpStyleFisheye, - kWarpStyleInflate, - kWarpStyleSqueeze, - kWarpStyleTwist - -} AIWarpStyle; - -/** Envelope types; see \c #AIEnvelopeSuite::GetEnvelopeType(). */ -typedef enum -{ - kEnvelopeWarp = 1, - kEnvelopeMesh, - kEnvelopeObject -} AIEnvelopeType; - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions to create and manage \e envelopes, which allow you to apply - a set of deformations to a set of source art objects. The name derives from the idea of - putting paper artworks into an envelope, then bending or distorting the envelope. - - The source art can be warped or deformed in various ways, as defined by an \c #AIWarpStyle, - with respect to a \e mesh, or grid. The envelope actions are available in the UI - through the Object > Envelope Distort menu. - - Deformations can only be applied directly to paths, compound paths, meshes, and images. - To apply a distortion to other types of art objects in the source art, those objects must - first be \e expanded; that is, converted to paths. Deformation options allow you - to specify which types of art to expand and deform along with the paths and - images. - - The envelope for an art group, which encapsulates the deformation options, - is represented as an art object of type \c #kMeshArt. See also the \c #AIMeshSuite. - - The function \c #DeformArt() allows you to apply the same kinds of deformations - directly to a source art group, without creating an envelope object. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIEnvelopeSuite and \c #kAIEnvelopeVersion. - -*/ -typedef struct { - - /** Creates an envelope for a given set of source art objects, or for the currently - selected art if \c art is \c nil or \c numArt is 0. By default, the new envelope - is fully selected, and placed above the enveloped art object or objects in the paint order. - @param art An array of art objects to be enveloped, or \c nil to create an envelope - for the current selection. Cannot be an art object stored in a dictionary, - but can be the child of art stored in a dictionary. - @param numArt The number of objects in \c art, or 0 to create an - envelope for the current selection. - @param envelopeObject The path art object to use as the new envelope, - or \c nil to use the bounding box of \c art (or of the current selection) - to create a new envelope object. (This would be the topmost selected - object if you create the envelope using Object > Envelope Distort > Make - with Top Object.) - @param options A pointer to the structure that specifies deformation options - for the new envelope. Pass \c nil to use the default options, as specified - by application preferences. - @param envelope [out] A buffer in which to return the new envelope object. - */ - AIAPI AIErr (*MakeEnvelope) ( AIArtHandle* art, ai::int32 numArt, AIArtHandle envelopeObject, - AIEnvelopeOptions* options, AIArtHandle* envelope ); - - /** Redefines an envelope to use a predefined warp style. - The envelope must be in process of mesh-editing; that is, - \c #EditingMesh() would return true for \c envelope. - Upon return the envelope is fully selected. - @param envelope The envelope object. - @param warpStyle The new warp style. - @param bend the new bend amount. - @param horizDistort The horizontal distortion amount. - @param vertDistort The vertical distortion amount. - @param rotate90 When true, apply bend horizontally, when false, apply bend vertically. - */ - AIAPI AIErr (*WarpEnvelope) ( AIArtHandle envelope, AIWarpStyle warpStyle, AIReal bend, - AIReal horizDistort, AIReal vertDistort, AIBoolean rotate90 ); - - /** Replaces an envelope in the document with its source contents (in the original, - undistorted state) and a mesh object. Moves both objects into the art tree, with the mesh object - placed above the content object in the paint order. The content object is selected. - - You cannot release envelopes stored directly in dictionaries, - but you can release the children of envelopes stored in dictionaries. - @param envelope The envelope object. Upon return, this reference is no longer valid. - */ - AIAPI AIErr (*ReleaseEnvelope) ( AIArtHandle envelope ); - - /** Retrieves the distortion options for an envelope. (Note that this function does not - return an error code.) - @param envelope The envelope object. - @param options [out] A buffer in which to return the options structure, - */ - AIAPI void (*GetEnvelopeOptions) ( AIArtHandle envelope, AIEnvelopeOptions* options ); - - /** Sets the distortion options for an envelope. (Note that this function does not - return an error code.) - @param envelope The envelope object. - @param options The new options structure, */ - AIAPI void (*SetEnvelopeOptions) ( AIArtHandle envelope, AIEnvelopeOptions* options ); - - /** Retrieves the default distortion options stored in application preferences. - @param options [out] A buffer in which to return the default options structure, - */ - AIAPI void (*GetCurrentEnvelopeOptions) ( AIEnvelopeOptions* options ); - - /** Reports whether an art object is an envelope. - (Note that this function returns a boolean value, not an error code.) - @param envelope The art object. - @return True if the art object is an envelope. - */ - AIAPI AIBoolean (*IsEnvelope) ( AIArtHandle envelope ); - - /** Reports whether the mesh defining the distortion of an envelope is being edited. - (Note that this function returns a boolean value, not an error code.) - @param envelope The envelope object. - @return True if the mesh is being edited. - @see \c #ToggleEditability(), \c #EditingContents() - */ - AIAPI AIBoolean (*EditingMesh) ( AIArtHandle envelope ); - - /** Reports whether the contents of an envelope are being edited. - (Note that this function returns a boolean value, not an error code.) - @param envelope The envelope object. - @return True if the contents of the envelope are being edited. - @see \c #ToggleEditability(), \c #EditingMesh() - */ - AIAPI AIBoolean (*EditingContents) ( AIArtHandle envelope ); - - /** Switches between editing the mesh and the contents of an envelope. - This is the same as choosing Object > Envelope Distort > Edit Contents - or Object > Envelope Distort > Edit Envelope in the UI. - @param envelope The envelope object. - @see \c #EditingMesh(), \c #EditingContents() - */ - AIAPI AIErr (*ToggleEditability) ( AIArtHandle envelope ); - - /** Retrieves the envelope object for an art group. - @param envelope The art group. - @param envelopeObject [out] A buffer in which to return the envelope object. - - */ - AIAPI AIErr (*GetEnvelopeObject) ( AIArtHandle envelope, AIArtHandle* envelopeObject ); - - /** Sets the envelope object for an art group. - @param envelope The art group. - @param envelopeObject The envelope object, which must be of type \c #kPathArt or - \c #kMeshArt and must not be directly stored in a dictionary. - */ - AIAPI AIErr (*SetEnvelopeObject) ( AIArtHandle envelope, AIArtHandle envelopeObject ); - - /** Retrieves the art objects being deformed by an envelope. - @param envelope The envelope object. - @param objects [out] A buffer in which to return the art group. This can be - the edit group of envelope's source art group if the contents are being - edited (that is, if \c #EditingContents() would return true for \c envelope). - */ - AIAPI AIErr (*GetObjectsInEnvelope) ( AIArtHandle envelope, AIArtHandle* objects ); - - /** Deforms an art object or group using the parameters in a dictionary. Does not - make an envelope object, but deforms the art in the same way an envelope would. - The resulting art object is inserted in the art tree above the original - art object in the paint order. - @param artToDeform The source art object or group, which must have a parent. - The function does not modify this object in any way. - @param deformParams A dictionary containing the deformation parameters. - Contains entries for these keys: \c #kAIDeformMeshKey, \c #kAIDeformFidelityKey, - \c #kAIDeformOptionsKey. - @param srcRect The bounding box of the source space (that is, the size the envelope - would be), or \c nil to use the bounds of the source art. - @param deformedArt [out] A buffer in which to return the resulting art object. - @param progressProc A callback procedure for displaying a progress bar during - computation (from which the user can cancel the operation) - or \c nil to show no progress bar. - @return The error \c #kCanceledErr if user cancels the operation from the - progress bar. - */ - AIAPI AIErr (*DeformArt) ( AIArtHandle artToDeform, - AIDictionaryRef deformParams, - AIRealRect* srcRect, - AIArtHandle* deformedArt, - AIDeformProgressProc progressProc ); - - /** not implemented */ - AIAPI AIErr (*GenerateDeformMeshFromPath)( AIArtHandle pathArt, - AIArtHandle *meshArt ); - - /** Retrieves the type of an envelope (warp, mesh, or object). - @param envelope The envelope object. - @param type [out] A buffer in which to return the envelope type constant. - @note Added in AI13. Previously, the type was not stored with the object. - For envelope objects created in earlier versions, returns - \c #kEnvelopeWarp for Envelope Warp and \c #kEnvelopeMesh for all - other types. - */ - AIAPI AIErr (*GetEnvelopeType) ( AIArtHandle envelope, AIEnvelopeType* type ); - - /** Reshapes a path object. - @param inPath The path object. - @param param The t value for the curve from where the reshape is to be done. - @param delta The delta value that has to be translated to the path object. - @param shiftPressed If true, for straight line segments, the control handles are generated perpendicular to the segment. - Otherwise, they are generated along the line segment. - */ - AIAPI AIErr (*UnconstrainedReshapePath) ( const AIArtHandle inPath, const AIReal& param, const AIRealPoint& delta, bool shiftPressed ); - - /** Retrieves the t value for a point on a bezier curve. - @param pathHandle The path object. - @param pointOnCurve The point for which the t value has to be found. - @param segmentIndex The index of the path segment on which this point lies. - @param param [out] The calculated t value for the point. - */ - AIAPI AIErr (*GetParamFromPathHitPoint) ( const AIArtHandle pathHandle, AIRealPoint pointOnCurve, int segmentIndex, AIReal ¶m ); - -} AIEnvelopeSuite; - -#include "AIHeaderEnd.h" - +#ifndef __AIEnvelope__ +#define __AIEnvelope__ + +/* + * Name: AIEnvelope.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Envelope Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2013 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIDict__ +#include "AIDictionary.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIEnvelope.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIEnvelopeSuite "AI Envelope Suite" +#define kAIEnvelopeSuiteVersion4 AIAPI_VERSION(4) +#define kAIEnvelopeSuiteVersion kAIEnvelopeSuiteVersion4 +#define kAIEnvelopeVersion kAIEnvelopeSuiteVersion + +/** Envelope options bit flag. + When set, expand and distort the appearance of an object + (such as applied effects or styles) and not just the object's + underlying geometry. + When false, the appearance is applied after the envelope + distorts the underlying geometry. */ +#define kDeformExpandAppearance (1 << 0) +/** Envelope options bit flag. + When set, expand and distort pattern fill. */ +#define kDeformExpandPatternFills (1 << 1) +/** Envelope options bit flag. + When set, expand and distort gradient fill. */ +#define kDeformExpandLinearGradients (1 << 2) + +/** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). + When set, expand and deform text. + (Envelopes do this automatically, regardless of flag value.) + */ +#define kDeformExpandText (1 << 3) + /** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). + When set, deform objects in any opacity masks associated with the + source art (as created with the Transparency palette). + (Envelopes do this automatically, regardless of flag value.) */ +#define kDeformOpacityMasks (1 << 4) +/** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). + When set, expand and deform plug-in groups. + (Envelopes do this automatically, regardless of flag value.)*/ +#define kDeformExpandPluginGroups (1 << 5) +/** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). + When set, expand and deform symbols. + (Envelopes do this automatically, regardless of flag value.)*/ +#define kDeformExpandSymbols (1 << 6) +/** Options bit flag for \c #AIEnvelopeSuite::DeformArt(). + Sets all flags except \c #kDeformNonAARaster and \c #kDeformRasterMakeClip. */ +#define kDeformAll (0x0000FFFF) +/** Envelope options bit flag. + When set, anti-alias is \e not used to smooth + raster images that are distorted in envelopes. */ +#define kDeformNonAARaster (1 << 16) +/** Envelope options bit flag. + How to preserve raster shapes when they are distorted by non-rectangular envelopes. + \li When set, apply an alpha channel (transparency) to the raster image. + \li When clear, use a clipping mask on the raster image. + */ +#define kDeformRasterMakeClip (1 << 17) + + +/** @ingroup DictKeys + Dictionary key for \c mesh value \c #AIEnvelopeSuite::DeformArt(). + Entry value is an \c #AIArtHandle of \c #kMeshArt type */ +#define kAIDeformMeshKey "DeformMesh" +/** @ingroup DictKeys + Dictionary key for \c fidelity value in \c #AIEnvelopeSuite::DeformArt(). + Controls how closely the deformed object fits into the envelope region. + Higher values add more points to the distorted paths, and take longer + to calculate. Entry value is an \c ASInt32 in the range [0..100] */ +#define kAIDeformFidelityKey "DeformFidelity" // ASInt32 [0..100] +/** @ingroup DictKeys + Dictionary key for \c options value in \c #AIEnvelopeSuite::DeformArt(). + Entry value is a logical OR of option values; see \c #AIEnvelopeOptions. */ +#define kAIDeformOptionsKey "DeformOptions" // ASInt32 + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Envelope deformation options that control how art is deformed. + @see \c #AIEnvelopeSuite::MakeEnvelope() */ +typedef struct +{ + /** Options, a logical OR of option values: +
\c #kDeformExpandAppearance +
\c #kDeformExpandPatternFills +
\c #kDeformExpandLinearGradients +
\c #kDeformNonAARaster +
\c #kDeformRasterMakeClip + */ + ai::int32 envOptions; + /** Controls how closely the deformed object fits into the envelope region. + Higher values add more points to the distorted paths, and take longer + to calculate. An \c ASInt32 n the range [0..100] */ + ai::int32 fidelity; + +} AIEnvelopeOptions; + +/** Callback for progress reports during a call to \c #AIEnvelopeSuite::DeformArt(). + @param current The current progress, a value between 0 and \c total. + @param total A value at which the operation is complete. + @return False if user cancels the operation, otherwise true. */ +typedef AIAPI AIBoolean (*AIDeformProgressProc)(ai::int32 current, ai::int32 total); + +/** Predefined warp styles for \c #AIEnvelopeSuite::WarpEnvelope(). */ +typedef enum +{ + kWarpStyleArc = 1, + kWarpStyleArcLower, + kWarpStyleArcUpper, + kWarpStyleArch, + kWarpStyleBulge, + kWarpStyleShellLower, + kWarpStyleShellUpper, + kWarpStyleFlag, + kWarpStyleWave, + kWarpStyleFish, + kWarpStyleRise, + kWarpStyleFisheye, + kWarpStyleInflate, + kWarpStyleSqueeze, + kWarpStyleTwist + +} AIWarpStyle; + +/** Envelope types; see \c #AIEnvelopeSuite::GetEnvelopeType(). */ +typedef enum +{ + kEnvelopeWarp = 1, + kEnvelopeMesh, + kEnvelopeObject +} AIEnvelopeType; + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides functions to create and manage \e envelopes, which allow you to apply + a set of deformations to a set of source art objects. The name derives from the idea of + putting paper artworks into an envelope, then bending or distorting the envelope. + + The source art can be warped or deformed in various ways, as defined by an \c #AIWarpStyle, + with respect to a \e mesh, or grid. The envelope actions are available in the UI + through the Object > Envelope Distort menu. + + Deformations can only be applied directly to paths, compound paths, meshes, and images. + To apply a distortion to other types of art objects in the source art, those objects must + first be \e expanded; that is, converted to paths. Deformation options allow you + to specify which types of art to expand and deform along with the paths and + images. + + The envelope for an art group, which encapsulates the deformation options, + is represented as an art object of type \c #kMeshArt. See also the \c #AIMeshSuite. + + The function \c #DeformArt() allows you to apply the same kinds of deformations + directly to a source art group, without creating an envelope object. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIEnvelopeSuite and \c #kAIEnvelopeVersion. + +*/ +typedef struct { + + /** Creates an envelope for a given set of source art objects, or for the currently + selected art if \c art is \c nullptr or \c numArt is 0. By default, the new envelope + is fully selected, and placed above the enveloped art object or objects in the paint order. + @param art An array of art objects to be enveloped, or \c nullptr to create an envelope + for the current selection. Cannot be an art object stored in a dictionary, + but can be the child of art stored in a dictionary. + @param numArt The number of objects in \c art, or 0 to create an + envelope for the current selection. + @param envelopeObject The path art object to use as the new envelope, + or \c nullptr to use the bounding box of \c art (or of the current selection) + to create a new envelope object. (This would be the topmost selected + object if you create the envelope using Object > Envelope Distort > Make + with Top Object.) + @param options A pointer to the structure that specifies deformation options + for the new envelope. Pass \c nullptr to use the default options, as specified + by application preferences. + @param envelope [out] A buffer in which to return the new envelope object. + */ + AIAPI AIErr (*MakeEnvelope) ( AIArtHandle* art, ai::int32 numArt, AIArtHandle envelopeObject, + AIEnvelopeOptions* options, AIArtHandle* envelope ); + + /** Redefines an envelope to use a predefined warp style. + The envelope must be in process of mesh-editing; that is, + \c #EditingMesh() would return true for \c envelope. + Upon return the envelope is fully selected. + @param envelope The envelope object. + @param warpStyle The new warp style. + @param bend the new bend amount. + @param horizDistort The horizontal distortion amount. + @param vertDistort The vertical distortion amount. + @param rotate90 When true, apply bend horizontally, when false, apply bend vertically. + */ + AIAPI AIErr (*WarpEnvelope) ( AIArtHandle envelope, AIWarpStyle warpStyle, AIReal bend, + AIReal horizDistort, AIReal vertDistort, AIBoolean rotate90 ); + + /** Replaces an envelope in the document with its source contents (in the original, + undistorted state) and a mesh object. Moves both objects into the art tree, with the mesh object + placed above the content object in the paint order. The content object is selected. + + You cannot release envelopes stored directly in dictionaries, + but you can release the children of envelopes stored in dictionaries. + @param envelope The envelope object. Upon return, this reference is no longer valid. + */ + AIAPI AIErr (*ReleaseEnvelope) ( AIArtHandle envelope ); + + /** Retrieves the distortion options for an envelope. (Note that this function does not + return an error code.) + @param envelope The envelope object. + @param options [out] A buffer in which to return the options structure, + */ + AIAPI void (*GetEnvelopeOptions) ( AIArtHandle envelope, AIEnvelopeOptions* options ); + + /** Sets the distortion options for an envelope. (Note that this function does not + return an error code.) + @param envelope The envelope object. + @param options The new options structure, */ + AIAPI void (*SetEnvelopeOptions) ( AIArtHandle envelope, AIEnvelopeOptions* options ); + + /** Retrieves the default distortion options stored in application preferences. + @param options [out] A buffer in which to return the default options structure, + */ + AIAPI void (*GetCurrentEnvelopeOptions) ( AIEnvelopeOptions* options ); + + /** Reports whether an art object is an envelope. + (Note that this function returns a boolean value, not an error code.) + @param envelope The art object. + @return True if the art object is an envelope. + */ + AIAPI AIBoolean (*IsEnvelope) ( AIArtHandle envelope ); + + /** Reports whether the mesh defining the distortion of an envelope is being edited. + (Note that this function returns a boolean value, not an error code.) + @param envelope The envelope object. + @return True if the mesh is being edited. + @see \c #ToggleEditability(), \c #EditingContents() + */ + AIAPI AIBoolean (*EditingMesh) ( AIArtHandle envelope ); + + /** Reports whether the contents of an envelope are being edited. + (Note that this function returns a boolean value, not an error code.) + @param envelope The envelope object. + @return True if the contents of the envelope are being edited. + @see \c #ToggleEditability(), \c #EditingMesh() + */ + AIAPI AIBoolean (*EditingContents) ( AIArtHandle envelope ); + + /** Switches between editing the mesh and the contents of an envelope. + This is the same as choosing Object > Envelope Distort > Edit Contents + or Object > Envelope Distort > Edit Envelope in the UI. + @param envelope The envelope object. + @see \c #EditingMesh(), \c #EditingContents() + */ + AIAPI AIErr (*ToggleEditability) ( AIArtHandle envelope ); + + /** Retrieves the envelope object for an art group. + @param envelope The art group. + @param envelopeObject [out] A buffer in which to return the envelope object. + + */ + AIAPI AIErr (*GetEnvelopeObject) ( AIArtHandle envelope, AIArtHandle* envelopeObject ); + + /** Sets the envelope object for an art group. + @param envelope The art group. + @param envelopeObject The envelope object, which must be of type \c #kPathArt or + \c #kMeshArt and must not be directly stored in a dictionary. + */ + AIAPI AIErr (*SetEnvelopeObject) ( AIArtHandle envelope, AIArtHandle envelopeObject ); + + /** Retrieves the art objects being deformed by an envelope. + @param envelope The envelope object. + @param objects [out] A buffer in which to return the art group. This can be + the edit group of envelope's source art group if the contents are being + edited (that is, if \c #EditingContents() would return true for \c envelope). + */ + AIAPI AIErr (*GetObjectsInEnvelope) ( AIArtHandle envelope, AIArtHandle* objects ); + + /** Deforms an art object or group using the parameters in a dictionary. Does not + make an envelope object, but deforms the art in the same way an envelope would. + The resulting art object is inserted in the art tree above the original + art object in the paint order. + @param artToDeform The source art object or group, which must have a parent. + The function does not modify this object in any way. + @param deformParams A dictionary containing the deformation parameters. + Contains entries for these keys: \c #kAIDeformMeshKey, \c #kAIDeformFidelityKey, + \c #kAIDeformOptionsKey. + @param srcRect The bounding box of the source space (that is, the size the envelope + would be), or \c nullptr to use the bounds of the source art. + @param deformedArt [out] A buffer in which to return the resulting art object. + @param progressProc A callback procedure for displaying a progress bar during + computation (from which the user can cancel the operation) + or \c nullptr to show no progress bar. + @return The error \c #kCanceledErr if user cancels the operation from the + progress bar. + */ + AIAPI AIErr (*DeformArt) ( AIArtHandle artToDeform, + AIDictionaryRef deformParams, + AIRealRect* srcRect, + AIArtHandle* deformedArt, + AIDeformProgressProc progressProc ); + + /** not implemented */ + AIAPI AIErr (*GenerateDeformMeshFromPath)( AIArtHandle pathArt, + AIArtHandle *meshArt ); + + /** Retrieves the type of an envelope (warp, mesh, or object). + @param envelope The envelope object. + @param type [out] A buffer in which to return the envelope type constant. + @note Added in AI13. Previously, the type was not stored with the object. + For envelope objects created in earlier versions, returns + \c #kEnvelopeWarp for Envelope Warp and \c #kEnvelopeMesh for all + other types. + */ + AIAPI AIErr (*GetEnvelopeType) ( AIArtHandle envelope, AIEnvelopeType* type ); + + /** Reshapes a path object. + @param inPath The path object. + @param param The t value for the curve from where the reshape is to be done. + @param delta The delta value that has to be translated to the path object. + @param shiftPressed If true, for straight line segments, the control handles are generated perpendicular to the segment. + Otherwise, they are generated along the line segment. + */ + AIAPI AIErr (*UnconstrainedReshapePath) ( const AIArtHandle inPath, const AIReal& param, const AIRealPoint& delta, bool shiftPressed ); + + /** Retrieves the t value for a point on a bezier curve. + @param pathHandle The path object. + @param pointOnCurve The point for which the t value has to be found. + @param segmentIndex The index of the path segment on which this point lies. + @param param [out] The calculated t value for the point. + */ + AIAPI AIErr (*GetParamFromPathHitPoint) ( const AIArtHandle pathHandle, AIRealPoint pointOnCurve, int segmentIndex, AIReal ¶m ); + +} AIEnvelopeSuite; + +#include "AIHeaderEnd.h" + #endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEraserTool.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEraserTool.h new file mode 100644 index 0000000..68e1182 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEraserTool.h @@ -0,0 +1,49 @@ +//======================================================================================== +// +// ADOBE CONFIDENTIAL +// +// File: AIEraserTool.h +// +// Copyright 2016 Adobe Systems Incorporated +// All Rights Reserved. +// +// NOTICE: All information contained herein is, and remains +// the property of Adobe Systems Incorporated and its suppliers, +// if any. The intellectual and technical concepts contained +// herein are proprietary to Adobe Systems Incorporated and its +// suppliers and are protected by trade secret or copyright law. +// Dissemination of this information or reproduction of this material +// is strictly forbidden unless prior written permission is obtained +// from Adobe Systems Incorporated. +// +//======================================================================================== + +#ifndef __AIEraserTool__ +#define __AIEraserTool__ + +#include "AITypes.h" + +#include "AIHeaderBegin.h" + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIEraserToolSuite "AI Eraser Tool Suite" +#define kAIEraserToolSuiteVersion2 AIAPI_VERSION(2) +#define kAIEraserToolSuiteVersion kAIEraserToolSuiteVersion2 +#define kAIEraserToolVersion kAIEraserToolSuiteVersion + +struct AIEraserToolSuite +{ + /*Erases the art under the given panPoints like an eraser */ + AIErr (*Erase)(const AIRealPoint* panPoints, const size_t count); + /* Sets the diameter for the eraser based on the value provided. */ + AIErr (*SetDiameter)(const AIReal diameter); +}; + +#include "AIHeaderEnd.h" + +#endif // __AIEraserTool__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIErrorCodes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIErrorCodes.h new file mode 100644 index 0000000..aad47dd --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIErrorCodes.h @@ -0,0 +1,111 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2019 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +enum AIErrorCode : ai::int32 +{ + kAICoreErrorRangeStart = 0x00000001, // = 1. Start of Error Range used by Illustrator core (app) only + kAICoreErrorRangeEnd = 0x00000800, // = 2048. End of Error Range used by Illustrator core (app) only + + //---------------------------------------------------------------------------------------------------------- + kAICommonErrorRangeStart = kAICoreErrorRangeEnd + 1, // = 2049. Start of Error Range used by Illustrator plugins and core (app) + + kAIAlreadyExportingSameDocument = kAICommonErrorRangeStart + 1, // = 2050 //Returned if there is already a request being processed to export the same document. + kAIOriginalNetworkPathDoesNotExist = kAICommonErrorRangeStart + 2, //Original network path is not found, may be it is called when optimized open/save is not being performed + kAIScratchFolderNotAvailable = kAICommonErrorRangeStart + 3, //Scratch folder is not accessible + kAISufficientScratchDiskSpaceNotAvailable = kAICommonErrorRangeStart + 4, //Scratch folder does not have enough space + kAIMultipleArtboardInASingleArtboardWorkflow = kAICommonErrorRangeStart + 5, //Work flow does not support Multiple artboard documents + kAIPreConditionNotMet = kAICommonErrorRangeStart + 6, //Pre-condition for an work-flow is not met + kAIFeatureNotOptedIn = kAICommonErrorRangeStart + 7, //Feature not opted-in + kAIFeatureNotEnabled = kAICommonErrorRangeStart + 8, //Feature not enabled + kAIFileCopyToNetworkLocationFailed = kAICommonErrorRangeStart + 9, //File could not be copied to a network location, may be due to network failure + kAIJSONParsingFailed = kAICommonErrorRangeStart + 10, //Error When Parsing A JSON value + kAIVerificationFailedErr = kAICommonErrorRangeStart + 11, // = 2060 //Error when Document Corruption Verification is failed + kAIFileReadError = kAICommonErrorRangeStart + 12, //Error when reading a file + kAIFileRenameError = kAICommonErrorRangeStart + 13, //Error while renaming file + kAICorruptLinkErr = kAICommonErrorRangeStart + 14, //Error while opening a linked file due to Corruption + kAICantCutAllArtboardsErr = kAICommonErrorRangeStart + 15, //Artboard Copy-Paste Error + kAINoSpaceToPasteArtboardErr = kAICommonErrorRangeStart + 16, //Artboard Copy-Paste Error - No Space left after copy + kAIHTTPErr = kAICommonErrorRangeStart + 17, + kAIDXFDWGSDKErr = kAICommonErrorRangeStart + 18, // Error when calling RealDWG api + kAILiveEditTimeExceededErr = kAICommonErrorRangeStart + 19, // Error in case of live edit fallback occured during operation. + kAIJsonValueNotAMapErr = kAICommonErrorRangeStart + 20, + kAIFileNotFoundErr = kAICommonErrorRangeStart + 21, // = 2070 + kAIFileGenratedByForegroundSaveNotFoundErr = kAICommonErrorRangeStart + 22, + kAINotACloudDocumentErr = kAICommonErrorRangeStart + 23, + kAINotALocalDocumentErr = kAICommonErrorRangeStart + 24, + kCloudDocumentAlreadyOpeningErr = kAICommonErrorRangeStart + 25, //The cloud document is already in open + kAINotOnMainThreadError = kAICommonErrorRangeStart + 26, + kAINoFeatureFound = kAICommonErrorRangeStart + 27, + kAISignatureNotValid = kAICommonErrorRangeStart + 28, + kAIUserNotRegisteredWithCloudErr = kAICommonErrorRangeStart + 29, + kAIInvalidToolBoxDrawerTileViewErr = kAICommonErrorRangeStart + 30, + kAIRepeatArtIsolationModeNotActiveErr = kAICommonErrorRangeStart + 31, // = 2080 + kAIFileDeleteError = kAICommonErrorRangeStart + 32, + kAIDirectoryDeleteError = kAICommonErrorRangeStart + 33, + kAIFastExportFailedErr = kAICommonErrorRangeStart + 34, + kAICantHibernateInvalidDocType = kAICommonErrorRangeStart + 35, + kAICantHibernatePreferenceOff = kAICommonErrorRangeStart + 36, + kAIInvalidHibernateInfoFile = kAICommonErrorRangeStart + 37, + kAIFileFormatNotFoundErr = kAICommonErrorRangeStart + 38, + kAITaskCantBeScheduledErr = kAICommonErrorRangeStart + 39, + kAILiveEffectNotFoundErr = kAICommonErrorRangeStart + 40, + kAIUserNotLoggedInToCCErr = kAICommonErrorRangeStart + 41, // = 2090 + kAILiveEffectParamsNotFoundErr = kAICommonErrorRangeStart + 42, + kAILiveEffectVisibilityHiddenErr = kAICommonErrorRangeStart + 43, + kAIFileCopyErr = kAICommonErrorRangeStart + 44, + kUITaskGroupExistsError = kAICommonErrorRangeStart + 45, + kUITaskGroupDoesNotExistError = kAICommonErrorRangeStart + 46, + kUITaskGroupInvalidHandle = kAICommonErrorRangeStart + 47, + kAIUnsupportedSkiaFeatureErr = kAICommonErrorRangeStart + 48, + kAIUnsupportedAGMGPUFeatureErr = kAICommonErrorRangeStart + 49, + kAISkipEffectExecutionErr = kAICommonErrorRangeStart + 50, + kAICodecNotAvailableErr = kAICommonErrorRangeStart + 51, + kAIPDFFormatUnknownErr = kAICommonErrorRangeStart + 52, + kAICantErr = kAICommonErrorRangeStart + 53, + kAINotEnoughRAMErr = kAICommonErrorRangeStart + 54, + kAIBrokenJPEGErr = kAICommonErrorRangeStart + 55, + kAIPluginLoadingErr = kAICommonErrorRangeStart + 56, + kAIFileReadWriteErr = kAICommonErrorRangeStart + 57, + + + + //Robin Specific errors + kAIRobinErrorCodeStarted = kAICommonErrorRangeStart + 1100, // = 3149 + kAIRobinClientNotRegisteredWithVulcanErr = kAIRobinErrorCodeStarted + 1, // = 3150 + kAIRobinServiceIsDownErr = kAIRobinErrorCodeStarted + 2, + kAIRobinCommunicationBrokenErr = kAIRobinErrorCodeStarted + 3, + kAIRobinServiceFailedToOpenFileErr = kAIRobinErrorCodeStarted + 4, + kAIRobinJobFailedUptoMaxTimesErr = kAIRobinErrorCodeStarted + 5, + kAIRobinNoErrorCodeInFailedResponseMsgErr = kAIRobinErrorCodeStarted + 6, + kAIRobinAckOfMessageNotReceivedErr = kAIRobinErrorCodeStarted + 7, + kAIRobinFallbackAllAsServiceInactiveErr = kAIRobinErrorCodeStarted + 8, + kAIRobinFallbackAllAsServiceNotRunningErr = kAIRobinErrorCodeStarted + 9, + kAIRobinCommandFallbackNotImplementedErr = kAIRobinErrorCodeStarted + 10, + kAIRobinCrashedWhileExecutingJobErr = kAIRobinErrorCodeStarted + 11, // = 3160 + kAIRobinRealErrorConvertedToCancelErr = kAIRobinErrorCodeStarted + 12, + + kAIRobinErrorCodeEnded = kAICommonErrorRangeStart + 1200, + + kAICommonErrorRangeEnd = 0x0000FFFF, //End of Error Range used by Illustrator plugins and core (app) + + //---------------------------------------------------------------------------------------------------------- + + kAIThirdPartySDKErrorRangeStart = 0x00010000, //Start of Error range reserved for use by SDK + kAIThirdPartySDKErrorRangeEnd = 0x0001FFFF, //End of Error range reserved for use by SDK +}; + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIErrorHandler.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIErrorHandler.h new file mode 100644 index 0000000..663b4c7 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIErrorHandler.h @@ -0,0 +1,423 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AITypes.h" +#include "AIAssert.hpp" + +#if defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) +#include "IAILiteralString.h" +#endif + + +/** + A helper class to handle AIErr when code is designed to handle exceptions. + Throws an error if the returned value is != kNoErr + No explicit error handling is required on each statement. + + Usage + + AIErrorThrower error = sAIArt->GetArtType(art, &artType); // Throws if returned value is != kNoErr + error = sAIArt->GetArtName(...); + error = sAIPathStyle->GetPathStyle(...); + +*/ +class AIErrorThrower +{ +public: + AIErrorThrower(AIErr err = kNoErr) : fError(err) + { + check_throw(fError); + } + + AIErrorThrower& operator=(AIErr err) + { + fError = err; + check_throw(fError); + return (*this); + } + + AIErrorThrower& operator=(AIErrorThrower err) + { + *this = err.fError; + return (*this); + } + + operator AIErr() const AINOEXCEPT { return fError; } + +private: + void check_throw(AIErr err) + { + if (err != kNoErr) + { + throw ai::Error(err); + } + } + +private: + AIErr fError; +}; + +/** + A helper class to handle AIErr. Shows an assert if the error is != kNoErr + + Usage + + AIErrorHandler error = sAIArt->GetArtType(art, &artType); // would assert if error != kNoErr + +*/ +class AIErrorHandler +{ +public: + AIErrorHandler(AIErr err = kNoErr) : fError(err) + { + check_assert(fError); + } + + AIErrorHandler& operator=(AIErr err) + { + fError = err; + check_assert(fError); + return (*this); + } + + AIErrorHandler& operator=(AIErrorHandler err) + { + *this = err.fError; + return (*this); + } + + operator AIErr() const AINOEXCEPT { return fError; } + +private: + void check_assert(AIErr err) + { + AIAssert(err == kNoErr || err == kCanceledErr); + } + +private: + AIErr fError; +}; + +namespace ai +{ +#if defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) + /** @ingroup Errors (debugging) */ + constexpr AIErr kUnknownExceptionErr { 'UNEX' }; + + /** @ingroup Errors (debugging) */ + constexpr AIErr kStdExceptionErr { 'STEX' }; + + /** @ingroup Errors (debugging) */ + constexpr LiteralString kAIErrExceptionStr { "AIErr Exception" }; + + /** @ingroup Errors (debugging) */ + constexpr LiteralString kUnknownExceptionStr { "Unknown Exception" }; +#else // defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) + /** @ingroup Errors (debugging) */ + const AIErr kUnknownExceptionErr = 'UNEX'; + + /** @ingroup Errors (debugging) */ + const AIErr kStdExceptionErr = 'STEX'; +#endif // defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) + +} //namespace ai + +#define AI_CATCH_RETURN \ + catch (const ai::Error& e) { return (AIErr)e; } \ + catch (const std::exception&) { return ai::kStdExceptionErr; } \ + catch (AIErr e) { return e; } \ + catch (...) { return ai::kUnknownExceptionErr; } + +#define AI_CATCH_FUNCTION(fn) \ + catch (const ai::Error& e) \ + { \ + fn(e); \ + } \ + catch (const std::exception& e) \ + { \ + ai::NOTUSED(e); \ + fn(ai::kStdExceptionErr); \ + } \ + catch (AIErr e) \ + { \ + fn(e); \ + } \ + catch (...) \ + { \ + fn(ai::kUnknownExceptionErr); \ + } + +#define AI_CATCH_ASSERT_FUNCTION(fn) \ + catch (const ai::Error& e) \ + { \ + AIMsgAssert((AIErr)e == kNoErr || (AIErr)e == kCanceledErr, e.what()); \ + fn(e); \ + } \ + catch (const std::exception& e) \ + { \ + AIMsgAssert(false, e.what()); \ + ai::NOTUSED(e); \ + fn(ai::kStdExceptionErr); \ + } \ + catch (AIErr e) \ + { \ + AIMsgAssert(e == kNoErr || e == kCanceledErr, ai::kAIErrExceptionStr.c_str()); \ + fn(e); \ + } \ + catch (...) \ + { \ + AIMsgAssert(false, ai::kUnknownExceptionStr.c_str()); \ + fn(ai::kUnknownExceptionErr); \ + } + +#define AI_CATCH_RETURN_FUNCTION(fn) \ + catch (const ai::Error& e) \ + { \ + return fn(e); \ + } \ + catch (const std::exception& e) \ + { \ + ai::NOTUSED(e); \ + return fn(ai::kStdExceptionErr); \ + } \ + catch (AIErr e) \ + { \ + return fn(e); \ + } \ + catch (...) \ + { \ + return fn(ai::kUnknownExceptionErr); \ + } + +#define AI_CATCH_ASSERT_RETURN_FUNCTION(fn) \ + catch (const ai::Error& e) \ + { \ + AIMsgAssert((AIErr)e == kNoErr || (AIErr)e == kCanceledErr, e.what()); \ + return fn(e); \ + } \ + catch (const std::exception& e) \ + { \ + AIMsgAssert(false, e.what()); \ + ai::NOTUSED(e); \ + return fn(ai::kStdExceptionErr); \ + } \ + catch (AIErr e) \ + { \ + AIMsgAssert(e == kNoErr || e == kCanceledErr, ai::kAIErrExceptionStr.c_str()); \ + return fn(e); \ + } \ + catch (...) \ + { \ + AIMsgAssert(false, ai::kUnknownExceptionStr.c_str()); \ + return fn(ai::kUnknownExceptionErr); \ + } + +#define AI_CATCH_ASSERT_RETURN \ + catch (const ai::Error& e) \ + { \ + AIMsgAssert((AIErr)e == kNoErr || (AIErr)e == kCanceledErr, e.what()); \ + return (AIErr)e; \ + } \ + catch (const std::exception& e) \ + { \ + AIMsgAssert(false, e.what()); \ + ai::NOTUSED(e); \ + return ai::kStdExceptionErr; \ + } \ + catch (AIErr e) \ + { \ + AIMsgAssert(e == kNoErr || e == kCanceledErr, ai::kAIErrExceptionStr.c_str()); \ + return e; \ + } \ + catch (...) \ + { \ + AIMsgAssert(false, ai::kUnknownExceptionStr.c_str()); \ + return ai::kUnknownExceptionErr; \ + } + +#define AI_CATCH_ASSERT_THROW \ + catch (const ai::Error& e) \ + { \ + AIMsgAssert((AIErr)e == kNoErr || (AIErr)e == kCanceledErr, e.what()); \ + ai::NOTUSED(e); \ + throw; \ + } \ + catch (const std::exception& e) \ + { \ + AIMsgAssert(false, e.what()); \ + ai::NOTUSED(e); \ + throw; \ + } \ + catch (AIErr e) \ + { \ + AIMsgAssert(e == kNoErr || e == kCanceledErr, ai::kAIErrExceptionStr.c_str()); \ + ai::NOTUSED(e); \ + throw; \ + } \ + catch (...) \ + { \ + AIMsgAssert(false, ai::kUnknownExceptionStr.c_str()); \ + throw; \ + } + +//Fail compilation for non const errors +#if defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) + +#define AI_CATCH_ASSERT_RETURN_ERROR(error) \ + catch (const ai::Error& e) \ + { \ + constexpr AIErr e1{ error }; \ + ai::NOTUSED(e1); \ + bool isCovered = (AIErr)e == kNoErr || (AIErr)e == kCanceledErr; \ + AIMsgAssert(isCovered, e.what()); \ + if (!isCovered) \ + return error; \ + return e; \ + } \ + catch (const std::exception& e) \ + { \ + AIMsgAssert(false, e.what()); \ + ai::NOTUSED(e); \ + return error; \ + } \ + catch (AIErr e) \ + { \ + bool isCovered = e == kNoErr || e == kCanceledErr; \ + AIMsgAssert(isCovered, ai::kAIErrExceptionStr.c_str()); \ + if (!isCovered) \ + return error; \ + return e; \ + } \ + catch (...) \ + { \ + AIMsgAssert(false, ai::kUnknownExceptionStr.c_str()); \ + return error; \ + } + +//Fail compilation for non const errors +#define AI_CATCH_RETURN_ERROR(error) \ + catch (const ai::Error& e) \ + { \ + constexpr AIErr e1{ error };\ + ai::NOTUSED(e1);\ + if ((AIErr)e != kNoErr && (AIErr)e != kCanceledErr) \ + return error; \ + return e; \ + } \ + catch (const std::exception&) \ + { \ + return error; \ + } \ + catch (AIErr e) \ + { \ + if (e != kNoErr && e != kCanceledErr) \ + return error; \ + return e; \ + } \ + catch (...) \ + { \ + return error; \ + } + +#else // defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) +#define AI_CATCH_ASSERT_RETURN_ERROR(error) \ + catch (const ai::Error& e) \ + { \ + bool isCovered = (AIErr)e == kNoErr || (AIErr)e == kCanceledErr; \ + AIMsgAssert(isCovered, e.what()); \ + if (!isCovered) \ + return error; \ + return e; \ + } \ + catch (const std::exception& e) \ + { \ + AIMsgAssert(false, e.what()); \ + ai::NOTUSED(e); \ + return error; \ + } \ + catch (AIErr e) \ + { \ + bool isCovered = e == kNoErr || e == kCanceledErr; \ + AIMsgAssert(isCovered, ai::kAIErrExceptionStr.c_str()); \ + if (!isCovered) \ + return error; \ + return e; \ + } \ + catch (...) \ + { \ + AIMsgAssert(false, ai::kUnknownExceptionStr.c_str()); \ + return error; \ + } + +#define AI_CATCH_RETURN_ERROR(error) \ + catch (const ai::Error& e) \ + { \ + if ((AIErr)e != kNoErr && (AIErr)e != kCanceledErr) \ + return error; \ + return e; \ + } \ + catch (const std::exception&) \ + { \ + return error; \ + } \ + catch (AIErr e) \ + { \ + if (e != kNoErr && e != kCanceledErr) \ + return error; \ + return e; \ + } \ + catch (...) \ + { \ + return error; \ + } +#endif //defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) + +#define AI_CATCH_NO_RETURN \ + catch (const ai::Error& ) \ + { \ + } \ + catch (const std::exception& ) \ + { \ + } \ + catch (AIErr) \ + { \ + } \ + catch (...) \ + { \ + } + +#define AI_CATCH_ASSERT_NO_RETURN \ + catch (const ai::Error& e) \ + { \ + AIMsgAssert((AIErr)e == kNoErr || (AIErr)e == kCanceledErr, e.what()); \ + ai::NOTUSED(e); \ + } \ + catch (const std::exception& e) \ + { \ + AIMsgAssert(false, e.what()); \ + ai::NOTUSED(e); \ + } \ + catch (AIErr e) \ + { \ + AIMsgAssert(e == kNoErr || e == kCanceledErr, ai::kAIErrExceptionStr.c_str());\ + ai::NOTUSED(e); \ + } \ + catch (...) \ + { \ + AIMsgAssert(false, ai::kUnknownExceptionStr.c_str()); \ + } diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEvent.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEvent.h index 737d732..d15229e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEvent.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIEvent.h @@ -1,126 +1,126 @@ -#ifndef __AIEvent__ -#define __AIEvent__ - -/* - * Name: AIEvent.h - * $Revision: 5 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Event Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIEvent.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** Modifier keys for an event. See \c #AIEventModifersValue. - Used in the \c #AIToolSuite and \c #AICursorSnapSuite. */ -typedef ASUInt16 AIEventModifiers; - -// Originally based on Mac OS EventRecord -/** Event modifier key masks and bit flags, used in deprecated ADM functions. - Use masks to check values, bit flags to bit-shift values to a position.*/ -enum AIEventModifersValue { - /** Not used. */ - aiEventModifiers_activeFlag = 0x0001, - /** Mask. Main mouse button down. */ - aiEventModifiers_btnState = 0x0080, - /** Mask. Either Cmd key is pressed in Mac OS, or the Ctrl key in Windows. */ - aiEventModifiers_cmdKey = 0x0100, - /** Mask. Either Shift key is pressed. */ - aiEventModifiers_shiftKey = 0x0200, - /** Not used. */ - aiEventModifiers_alphaLock = 0x0400, - /** Mask. The Alt or Option key is pressed. */ - aiEventModifiers_optionKey = 0x0800, /* Alt key on MSWIndows */ - /** Mask. The Ctrl key is pressed in Mac OS. Not used in Windows. */ - aiEventModifiers_controlKey = 0x1000, - /** Mask. The right Shift key is pressed. */ - aiEventModifiers_rightShiftKey = 0x2000, - /** Mask. The right Alt or Option key is pressed. */ - aiEventModifiers_rightOptionKey = 0x4000, - /** Mask. The right Ctrl key is pressed in Mac OS. Not used in Windows. */ - aiEventModifiers_rightControlKey = 0x8000, - /** Not used. */ - aiEventModifiers_activeFlagBit = 0, - /** Bit flag. When set, the main mouse button is down. */ - aiEventModifiers_btnStateBit = 7, - /** Bit flag. When set, either the Cmd key is pressed in Mac OS, or the Ctrl key in Windows. */ - aiEventModifiers_cmdKeyBit = 8, - /** Bit flag. When set, either Shift key is pressed. */ - aiEventModifiers_shiftKeyBit = 9, - /** Not used. */ - aiEventModifiers_alphaLockBit = 10, - /** Bit flag. When set, the Alt or Option key is pressed. */ - aiEventModifiers_optionKeyBit = 11, - /** Bit flag. The Ctrl key is pressed in Mac OS. Not used in Windows. */ - aiEventModifiers_controlKeyBit = 12, - /** Bit flag. When set, the right Shift key is pressed. */ - aiEventModifiers_rightShiftKeyBit = 13, - /** Bit flag. When set, the right Alt or Option key is pressed. */ - aiEventModifiers_rightOptionKeyBit = 14, - /** Bit flag. When set, the right Ctrl key is pressed in Mac OS. Not used in Windows. */ - aiEventModifiers_rightControlKeyBit = 15, - -// additional information used by ADM tracker modifiers - /** Mask. Space bar is pressed. */ - aiEventModifiers_spaceKey = 0x0002, - /** Mask. Tab key is pressed. */ - aiEventModifiers_tabKey = 0x0004, - /** Mask. Caps Lock is on. */ - aiEventModifiers_capsLockOn = 0x0008, - /** Mask. Double click. */ - aiEventModifiers_doubleClick = 0x0010, - /** Mask. Triple click. */ - aiEventModifiers_tripleClick = 0x0020, - /** Bit flag. When set, the space bar is pressed. */ - aiEventModifiers_spaceKeyBit = 1, - /** Bit flag. When set, the tab key is pressed. */ - aiEventModifiers_tabKeyBit = 2, - /** Bit flag. When set, Caps Lock is on. */ - aiEventModifiers_capsLcokBit = 3, - /** Bit flag. When set, there was a double click. */ - aiEventModifiers_doubleClickBit = 4, - /** Bit flag. When set, there was a triple click. */ - aiEventModifiers_tripleClickBit = 5 -}; - - - - - - - - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIEvent__ +#define __AIEvent__ + +/* + * Name: AIEvent.h + * $Revision: 5 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Event Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIEvent.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** Modifier keys for an event. See \c #AIEventModifersValue. + Used in the \c #AIToolSuite and \c #AICursorSnapSuite. */ +typedef ASUInt16 AIEventModifiers; + +// Originally based on Mac OS EventRecord +/** Event modifier key masks and bit flags, used in deprecated ADM functions. + Use masks to check values, bit flags to bit-shift values to a position.*/ +enum AIEventModifersValue { + /** Not used. */ + aiEventModifiers_activeFlag = 0x0001, + /** Mask. Main mouse button down. */ + aiEventModifiers_btnState = 0x0080, + /** Mask. Either Cmd key is pressed in Mac OS, or the Ctrl key in Windows. */ + aiEventModifiers_cmdKey = 0x0100, + /** Mask. Either Shift key is pressed. */ + aiEventModifiers_shiftKey = 0x0200, + /** Not used. */ + aiEventModifiers_alphaLock = 0x0400, + /** Mask. The Alt or Option key is pressed. */ + aiEventModifiers_optionKey = 0x0800, /* Alt key on MSWIndows */ + /** Mask. The Ctrl key is pressed in Mac OS. Not used in Windows. */ + aiEventModifiers_controlKey = 0x1000, + /** Mask. The right Shift key is pressed. */ + aiEventModifiers_rightShiftKey = 0x2000, + /** Mask. The right Alt or Option key is pressed. */ + aiEventModifiers_rightOptionKey = 0x4000, + /** Mask. The right Ctrl key is pressed in Mac OS. Not used in Windows. */ + aiEventModifiers_rightControlKey = 0x8000, + /** Not used. */ + aiEventModifiers_activeFlagBit = 0, + /** Bit flag. When set, the main mouse button is down. */ + aiEventModifiers_btnStateBit = 7, + /** Bit flag. When set, either the Cmd key is pressed in Mac OS, or the Ctrl key in Windows. */ + aiEventModifiers_cmdKeyBit = 8, + /** Bit flag. When set, either Shift key is pressed. */ + aiEventModifiers_shiftKeyBit = 9, + /** Not used. */ + aiEventModifiers_alphaLockBit = 10, + /** Bit flag. When set, the Alt or Option key is pressed. */ + aiEventModifiers_optionKeyBit = 11, + /** Bit flag. The Ctrl key is pressed in Mac OS. Not used in Windows. */ + aiEventModifiers_controlKeyBit = 12, + /** Bit flag. When set, the right Shift key is pressed. */ + aiEventModifiers_rightShiftKeyBit = 13, + /** Bit flag. When set, the right Alt or Option key is pressed. */ + aiEventModifiers_rightOptionKeyBit = 14, + /** Bit flag. When set, the right Ctrl key is pressed in Mac OS. Not used in Windows. */ + aiEventModifiers_rightControlKeyBit = 15, + +// additional information used by ADM tracker modifiers + /** Mask. Space bar is pressed. */ + aiEventModifiers_spaceKey = 0x0002, + /** Mask. Tab key is pressed. */ + aiEventModifiers_tabKey = 0x0004, + /** Mask. Caps Lock is on. */ + aiEventModifiers_capsLockOn = 0x0008, + /** Mask. Double click. */ + aiEventModifiers_doubleClick = 0x0010, + /** Mask. Triple click. */ + aiEventModifiers_tripleClick = 0x0020, + /** Bit flag. When set, the space bar is pressed. */ + aiEventModifiers_spaceKeyBit = 1, + /** Bit flag. When set, the tab key is pressed. */ + aiEventModifiers_tabKeyBit = 2, + /** Bit flag. When set, Caps Lock is on. */ + aiEventModifiers_capsLcokBit = 3, + /** Bit flag. When set, there was a double click. */ + aiEventModifiers_doubleClickBit = 4, + /** Bit flag. When set, there was a triple click. */ + aiEventModifiers_tripleClickBit = 5 +}; + + + + + + + + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExpand.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExpand.h index f9a6d01..94b6b32 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExpand.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExpand.h @@ -1,162 +1,164 @@ -/* - * - * AIExpand.h - * ADOBE SYSTEMS INCORPORATED - * Copyright 1995-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __ExpandSuite__ -#define __ExpandSuite__ - -/** @file AIExpand.h */ - -/* Imports */ - -#include "AIArt.h" - - -/* Constants */ - -#define kAIExpandSuite "AI Expand Suite" -#define kAI70ExpandSuite kAIExpandSuite -#define kAIExpandSuiteVersion4 AIAPI_VERSION(4) -#define kAI70ExpandSuiteVersion AIAPI_VERSION(1) - -/* Latest version */ -#define kAIExpandSuiteVersion kAIExpandSuiteVersion4 -#define kAIExpandVersion kAIExpandSuiteVersion - -/** Flag values for what should be expanded and how the operation - is performed. The order of priority for expansion is as - follows: - \verbatim - #kExpandPluginArt - #kExpandSymbolInstances - #kExpandText - \endverbatim - If any of these flags causes an expansion, the operation stops - there. For example, if you call \c #AIExpandSuite::Expand() on - a text object inside a symbol instance, with options - \c #kExpandSymbolInstances and \c #kExpandText set, - the symbol is expanded, but the text object is not. - - Otherwise, the expansion continues with the following - priority: - \verbatim - #kExpandStroke - #kExpandPattern - #kExpandGradientToMesh - #kExpandGradientToPaths - \endverbatim - - These expansions can all occur in one call, unless - \c #kExpandOneAtATime is set. In this case, the expansion - operation stops as soon as any expansion occurs. - */ -enum AIExpandFlagValue { - /** Expand plug-in art */ - kExpandPluginArt = 0x0001, - /** Expand text */ - kExpandText = 0x0002, - /** Expand strokes */ - kExpandStroke = 0x0004, - /** Expand patterns */ - kExpandPattern = 0x0008, - /** Expand gradient as a mesh */ - kExpandGradientToMesh = 0x0010, - /** Expand gradient as a path */ - kExpandGradientToPaths = 0x0020, - /** Expand symbols */ - kExpandSymbolInstances = 0x0040, - /** Expand charts */ - kExpandChartArt = 0x0080, - /** Stop the expansion operation after the first expansion occurs. */ - kExpandOneAtATime = 0x4000, - /** Show a progress bar during the operation. */ - kExpandShowProgress = 0x8000, - /** Expand locked objects (such as those on a locked layer). - By default, modifications are not made on objects in locked layers.*/ - kExpandLockedObjects = 0x10000 -}; - -/* Suite */ - -/** @ingroup Suites - This suite provides a legacy version of a single function that - expands an art object into a set of objects with equivalent appearance. - The current version is in \c #AIExpandSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI70ExpandSuite and \c #kAI70ExpandSuiteVersion. - */ -typedef struct { - /** Breaks artwork up into individual parts, creating a set of objects - with equivalent appearance. This is the same as calling the newer - \c #AIExpandSuite::Expand() with the flags \c #kExpandPattern and - \c #kExpandGradientToPaths. - @param art The art object. - \li For path art with a fill of CMYK or RGB color, has no effect. - \li For artwork filled with a gradient, breaks the artwork up into - \c steps number of objects between each of the gradients stops. - The resulting artwork contains a mask. - \li For text art, turns the text into outlines. - \li For stroked objects, outlines the stroke and creates a closed path. - This is especially useful for art objects created using brushes. - \li For objects filled with a pattern, draws the entire pattern tile - on the page with the original object acting as a mask. - @param steps For artwork filled with a gradient, the number of objects to - create between gradient stops. For example an artwork with four stops - and a \c steps value of 2 results in an artwork that has two steps - between each of the four stops. - @see \c #AIExpandSuite::Expand() for a version with additional options. - */ - AIAPI AIErr (*Expand)( AIArtHandle art, ai::int32 steps ); - -} AI70ExpandSuite; - -/** @ingroup Suites - This suite provides a single function that expands an art object - into a set of objects with equivalent appearance. For backward - compatibility, an older version is provided in \c #AI70ExpandSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIExpandSuite and \c #kAIExpandSuiteVersion. - */ -typedef struct { - - /** Breaks artwork up into individual parts, creating a set of objects - with equivalent appearance. It is the same as choosing Expand from - the Object menu. - \li For path art with a fill of CMYK or RGB color, has no effect. - \li For artwork filled with a gradient, breaks the artwork up into - \c steps number of objects between each of the gradients stops. - The resulting artwork contains a mask. - \li For text art, turns the text into outlines. - \li For stroked objects, outlines the stroke and creates a closed path. - This is especially useful for art objects created using brushes. - \li For objects filled with a pattern, draws the entire pattern tile - on the page with the original object acting as a mask. - - @param art The art object. - @param flags Options that control how the expansion is done. A logical - OR of \c #AIExpandFlagValue values. - @param steps For artwork filled with a gradient, the number of objects to - create between gradient stops. For example an artwork with four stops - and a \c steps value of 2 results in an artwork that has two steps - between each of the four stops. - */ - AIAPI AIErr (*Expand)( AIArtHandle art, ai::int32 flags, ai::int32 steps ); - -} AIExpandSuite; - - -#endif // __ExpandSuite__ - +/* + * + * AIExpand.h + * ADOBE SYSTEMS INCORPORATED + * Copyright 1995-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __ExpandSuite__ +#define __ExpandSuite__ + +/** @file AIExpand.h */ + +/* Imports */ + +#include "AIArt.h" + + +/* Constants */ + +#define kAIExpandSuite "AI Expand Suite" +#define kAI70ExpandSuite kAIExpandSuite +#define kAIExpandSuiteVersion4 AIAPI_VERSION(4) +#define kAI70ExpandSuiteVersion AIAPI_VERSION(1) + +/* Latest version */ +#define kAIExpandSuiteVersion kAIExpandSuiteVersion4 +#define kAIExpandVersion kAIExpandSuiteVersion + +/** Flag values for what should be expanded and how the operation + is performed. The order of priority for expansion is as + follows: + \verbatim + #kExpandPluginArt + #kExpandSymbolInstances + #kExpandText + \endverbatim + If any of these flags causes an expansion, the operation stops + there. For example, if you call \c #AIExpandSuite::Expand() on + a text object inside a symbol instance, with options + \c #kExpandSymbolInstances and \c #kExpandText set, + the symbol is expanded, but the text object is not. + + Otherwise, the expansion continues with the following + priority: + \verbatim + #kExpandStroke + #kExpandPattern + #kExpandGradientToMesh + #kExpandGradientToPaths + \endverbatim + + These expansions can all occur in one call, unless + \c #kExpandOneAtATime is set. In this case, the expansion + operation stops as soon as any expansion occurs. + */ +enum AIExpandFlagValue { + /** Expand plug-in art */ + kExpandPluginArt = 0x0001, + /** Expand text */ + kExpandText = 0x0002, + /** Expand strokes */ + kExpandStroke = 0x0004, + /** Expand patterns */ + kExpandPattern = 0x0008, + /** Expand gradient as a mesh */ + kExpandGradientToMesh = 0x0010, + /** Expand gradient as a path */ + kExpandGradientToPaths = 0x0020, + /** Expand symbols */ + kExpandSymbolInstances = 0x0040, + /** Expand charts */ + kExpandChartArt = 0x0080, + /** Expand repeats */ + kExpandRepeatArt = 0x0100, + /** Stop the expansion operation after the first expansion occurs. */ + kExpandOneAtATime = 0x4000, + /** Show a progress bar during the operation. */ + kExpandShowProgress = 0x8000, + /** Expand locked objects (such as those on a locked layer). + By default, modifications are not made on objects in locked layers.*/ + kExpandLockedObjects = 0x10000 +}; + +/* Suite */ + +/** @ingroup Suites + This suite provides a legacy version of a single function that + expands an art object into a set of objects with equivalent appearance. + The current version is in \c #AIExpandSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAI70ExpandSuite and \c #kAI70ExpandSuiteVersion. + */ +typedef struct { + /** Breaks artwork up into individual parts, creating a set of objects + with equivalent appearance. This is the same as calling the newer + \c #AIExpandSuite::Expand() with the flags \c #kExpandPattern and + \c #kExpandGradientToPaths. + @param art The art object. + \li For path art with a fill of CMYK or RGB color, has no effect. + \li For artwork filled with a gradient, breaks the artwork up into + \c steps number of objects between each of the gradients stops. + The resulting artwork contains a mask. + \li For text art, turns the text into outlines. + \li For stroked objects, outlines the stroke and creates a closed path. + This is especially useful for art objects created using brushes. + \li For objects filled with a pattern, draws the entire pattern tile + on the page with the original object acting as a mask. + @param steps For artwork filled with a gradient, the number of objects to + create between gradient stops. For example an artwork with four stops + and a \c steps value of 2 results in an artwork that has two steps + between each of the four stops. + @see \c #AIExpandSuite::Expand() for a version with additional options. + */ + AIAPI AIErr (*Expand)( AIArtHandle art, ai::int32 steps ); + +} AI70ExpandSuite; + +/** @ingroup Suites + This suite provides a single function that expands an art object + into a set of objects with equivalent appearance. For backward + compatibility, an older version is provided in \c #AI70ExpandSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIExpandSuite and \c #kAIExpandSuiteVersion. + */ +typedef struct { + + /** Breaks artwork up into individual parts, creating a set of objects + with equivalent appearance. It is the same as choosing Expand from + the Object menu. + \li For path art with a fill of CMYK or RGB color, has no effect. + \li For artwork filled with a gradient, breaks the artwork up into + \c steps number of objects between each of the gradients stops. + The resulting artwork contains a mask. + \li For text art, turns the text into outlines. + \li For stroked objects, outlines the stroke and creates a closed path. + This is especially useful for art objects created using brushes. + \li For objects filled with a pattern, draws the entire pattern tile + on the page with the original object acting as a mask. + + @param art The art object. + @param flags Options that control how the expansion is done. A logical + OR of \c #AIExpandFlagValue values. + @param steps For artwork filled with a gradient, the number of objects to + create between gradient stops. For example an artwork with four stops + and a \c steps value of 2 results in an artwork that has two steps + between each of the four stops. + */ + AIAPI AIErr (*Expand)( AIArtHandle art, ai::int32 flags, ai::int32 steps ); + +} AIExpandSuite; + + +#endif // __ExpandSuite__ + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExternDef.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExternDef.h new file mode 100644 index 0000000..418f0b6 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIExternDef.h @@ -0,0 +1,38 @@ +//======================================================================================== +// +// ADOBE CONFIDENTIAL +// +// File: PluginCommon.hpp +// Author: Angad Gupta +// DateTime: 07-June-2021 +// Change: Macros to maching c/c++ externs. +// +// Copyright 2021 Adobe Systems Incorporated +// All Rights Reserved. +// +// NOTICE: All information contained herein is, and remains +// the property of Adobe Systems Incorporated and its suppliers, +// if any. The intellectual and technical concepts contained +// herein are proprietary to Adobe Systems Incorporated and its +// suppliers and are protected by trade secret or copyright law. +// Dissemination of this information or reproduction of this material +// is strictly forbidden unless prior written permission is obtained +// from Adobe Systems Incorporated. +// +//======================================================================================== + +#pragma once + +#if defined(STATIC_LINKED_PLUGIN) + #define AI_EXTERN_C_BEGIN + #define AI_EXTERN_C_END +#else + #if defined(__cplusplus) + #define AI_EXTERN_C_BEGIN extern "C" { + #define AI_EXTERN_C_END } //extern "C" + #else + #define AI_EXTERN_C_BEGIN + #define AI_EXTERN_C_END + #endif +#endif //!STATIC_LINKED_PLUGIN + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFOConversion.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFOConversion.h index 5554bd6..7263cf0 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFOConversion.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFOConversion.h @@ -1,375 +1,414 @@ -#ifndef __AIFOConversion__ -#define __AIFOConversion__ - -/* - * Name: AIFOConversion.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Foreign Object Conversion Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2002-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIForeignObject__ -#include "AIForeignObject.h" -#endif - -#ifndef __AIFont__ -#include "AIFont.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIFOConversion.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIFOConversionSuite "AI FO Conversion Suite" -#define kAIFOConversionSuiteVersion3 AIAPI_VERSION(3) -#define kAIFOConversionSuiteVersion kAIFOConversionSuiteVersion3 -#define kAIFOConversionVersion kAIFOConversionSuiteVersion - - -/** @ingroup Errors - Error in foreign-object conversion; see \c #AIFOConversionSuite. */ -#define kAIFOConversionErr '!FOc' - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Wrap this \c AGMColorSpace* as a \c CAGMColorSpace - or some baseclass in order to use it. */ -typedef struct _AIAGMColorSpace *AIAGMColorSpaceHandle; - - -/** Types of errors that can occur during the conversion process, - sent to a callback from \c #AIFOConversionSuite::ConvertToNative(), - Depending on the type, the callback can also receive - additional information about - as \c info, a void * which you must - cast to an appropriate type as specified. - */ -typedef enum AIFOConversionInfoSelector -{ - /** No problem occurred. - No \c info is passed; pointer is \c NULL. */ - kAIFOConversionInfoNone, - /** Conversion encountered a problem with fauxed fonts. - \c info contains the missing font name, as char *. */ - kAIFOConversionInfoFauxedFont, - /** Conversion encountered a problem with axial shading. - No \c info is passed; pointer is \c NULL.*/ - kAIFOConversionInfoUnknownAxialShading, - /**Conversion encountered a problem with radial shading. - No \c info is passed; pointer is \c NULL. */ - kAIFOConversionInfoUnknownRadialShading, - /** Conversion encountered a problem with an unknown AIM construct. - No \c info is passed; pointer is \c NULL. */ - kAIFOConversionInfoUnknownAIMConstruct, - /** Conversion encountered a problem with outlined text. - No \c info is passed; pointer is \c NULL. */ - kAIFOConversionInfoTextOutlined, - /** Conversion encountered a problem with rasterized text. - No \c info is passed; pointer is \c NULL. */ - kAIFOConversionInfoTextRasterized - -} AIFOConversionInfoSelector; - - -/** Types of information about the contents of foreign object that can - be collected and sent to a callback from - \c #AIFOConversionSuite::EnumerateContents(), */ -typedef enum AIFOContentInfoSelector -{ - /** No information is collected. - No \c info is passed; pointer is \c NULL. */ - kAIFOContentInfoNone, - /** Passes transparency state of contained art in - \c info as const AIBoolean* */ - kAIFOContentInfoHasTransparency, - /** Collects information on marks process plate state of contained art - in \c info as const AIBoolean* */ - kAIFOContentInfoMarksProcessPlates, - /** Passes marks CMYK plate state of contained art; - \c info contains the value as - const AIBoolean [4] c,m,y,k - */ - kAIFOContentInfoMarksCMYKPlates, - /** Passes overprint state of contained art in \c info as - const AIBoolean* */ - kAIFOContentInfoHasOverPrint, - /** Passes text state of contained art in \c info as - const AIBoolean* */ - kAIFOContentInfoHasText, - /** Passes gradient state of contained art in \c info as - const AIBoolean* */ - kAIFOContentInfoHasGradient, - /** Passes gradient mesh state of contained art in \c info as - const AIBoolean* */ - kAIFOContentInfoHasGradientMesh, - /** Passes spot colors in contained art in \c info as - \c #AICustomColorHandle */ - kAIFOContentInfoSpotColor, - /** Each time a drawing operation involves an image as the source of color data, - passes the transformation matrix applied in \c info as \c #AIRealMatrix. */ - kAIFOContentInfoRasterTransform, - /** Each time a drawing operation involves an image as the source of color data, - passes image information in \c info as \c #AIRasterRecord. - */ - kAIFOContentInfoPaintServerRasterRecord, - /** Passes true if the object contains anything other - than images and clipping operations, false otherwise. - Value passed in \c info as const AIBoolean* - */ - kAIFOContentInfoHasNonImage - -} AIFOContentInfoSelector; - - -/** Flags for conversion of a foreign object. A logical OR of - \c #AIFOConversionFlagValue bit flags. */ -typedef ai::int32 AIFOConversionFlags; - -/** Flag values that specify how the conversion of a foreign object to - native artwork is performed. */ -enum AIFOConversionFlagValue { - /** Preserves full visual fidelity and spot colors. - May create other foreign objects. */ - kAIFOConversionDefault = 0, - /** Performs full, but possibly lossy, conversion, - converts spot colors to process colors. - Does not create other foreign objects. - Rasterizes objects that cannot be represented as native art, - including objects filled with PDF shading types, - device-n (spot) rasters, and so on. */ - kAIFOConversionFull = 1 << 0, - /** Replaces paths with stroked versions. */ - kAIFOConversionStrokePaths = 1 << 1, - /** Simplifies paths so that no subpaths intersect. */ - kAIFOConversionSimplifyPaths = 1 << 2, - /** Suppresses object-level attributes, such as visibility, Live Effects, - transparency, and so on. Use this to convert only the \e contents of - the foreign object (such as the display list). - - Specify only for \c #AIFOConversionSuite::ConvertToNative(). - This is the default behavior for \c #AIFOConversionSuite::OutlineLegacyText(). */ - kAIFOConversionSuppressAttributes = 1 << 3, - /** Disallows colorized grayscale images in the output from conversion. */ - kAIFOConversionNoColorizedGray = 1 << 4, - /** Forces use of Newell mixing to convert spot colors to process colors. - Newell mixing preserves the numbers of the spot color alternates. */ - kAIFOConversionUseNewellMixing = 1 << 5, - /** Disallows NChannel/Separation/Indexed color space images in the output from conversion. */ - kAIFOConversionNoNChannelIndexedImages = 1 << 6 -}; - - -/** The prototype for a callback function from \c #AIFOConversionSuite::ConvertToNative() - that acts on information about the conversion. - @param selector Identifies the type of information being supplied. - @param info A pointer to information specific to the \c selector. To inspect its - contents, cast it to an appropriate type, according to the \c selector. - @param data A pointer to developer-defined data, passed back from - \c #AIFOConversionSuite::ConvertToNative() - */ -typedef void (*AIConversionInfoProc)(AIFOConversionInfoSelector selector, void *info, void *data); - -/** The prototype for a callback function from \c #AIFOConversionSuite::EnumerateFonts() - that acts on fonts used by a foreign object. - @param fontkey A font in the enumeration. - @param data A pointer to developer-defined data, passed back from - \c #AIFOConversionSuite::EnumerateFonts(). - */ -typedef void (*AIVisitFontProc)(AIFontKey fontkey, void *data); - -/** For internal use only. The prototype for a callback function from \c #AIFOConversionSuite::EnumerateEmbeddedFonts() - that acts on fonts used by a foreign object. - @param fontkey A font in the enumeration. - @param wasEmbedded set true if the font is embedded in PDF or EPS - @param data A pointer to developer-defined data, passed back from - \c #AIFOConversionSuite::EnumerateFonts(). - */ -typedef void (*AIVisitFontExtendedProc)(AIFontKey fontkey, AIBoolean wasEmbedded, void *data); - -/** The prototype for a callback function from \c #AIFOConversionSuite::EnumerateContents() - that acts on information about the contents of a foreign object. - @param selector Identifies the type of information being supplied. - @param info A pointer to information specific to the \c selector. To inspect its - contents, cast it to an appropriate type according to the \c selector. - @param data A pointer to developer-defined data, passed back from - \c #AIFOConversionSuite::EnumerateContents(). - */ -typedef void (*AIVisitContentProc)(AIFOContentInfoSelector selector, void *info, void *data); - -/** Specify as the \c info value in the \c #AIFOConversionOptions passed to - \c #AIFOConversionSuite::ConvertToNative(), to provide information about the - conversion process to a callback. - */ -typedef struct AIFOConversionInfoCollector -{ - /** The callback procedure you have defined to act on the collected information. - \c NULL if no information desired. */ - AIConversionInfoProc proc; - /** A pointer to developer-defined data that is passed back to the callback. */ - void *data; - -} AIFOConversionInfoCollector; - -/** Drawing options for \c #AIFOConversionSuite::ConvertToNative() */ -typedef struct -{ - /** Controls how the conversion of foreign objects is performed. - A logical OR of \c #AIFOConversionFlagValue bit flags.*/ - AIFOConversionFlags flags; - /** Specifies a callback procedure and data to be passed to it. The - callback can act on information of various types collected during - the conversion or enumeration process.*/ - AIFOConversionInfoCollector info; - - /** Rasterization resolution for high frequency areas. - Set to 0 to use document flattener settings. - @see \c #AIMaskFlattenerSuite.*/ - AIReal rasterResolution; - - /** Rasterization resolution for low frequency areas (smooth shades). - Set to 0 to use document flattener settings. - @see \c #AIMaskFlattenerSuite.*/ - AIReal meshResolution; - - /** A custom color space for blending of spot colors upon conversion to process - colors. Set to \c NULL to use the default document color space */ - AIAGMColorSpaceHandle conversionCS; - -} AIFOConversionOptions; - - - -/******************************************************************************* - ** - ** Suites - ** - **/ - -/** @ingroup Suites - These functions allows you to convert artwork and collect information about - its contents. The suite was originally intended for use with - foreign objects (see \c #AIForeignObjectSuite). However, you can use - the functions with any type of artwork. For example, you can use - \c #AIFOConversionSuite::ConvertToNative() to convert artwork in such a - way that the resulting art does not contain self-intersecting paths. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIFOConversionSuite and \c #kAIFOConversionVersion. - */ -typedef struct AIFOConversionSuite { - - /** Creates native Illustrator art objects by drawing a source art - object to a conversion port. The source art can be any type; however, - clipping objects (such as clip paths, clipping text, or clipping legacy text) - have no marking commands, so nothing is drawn. - @param art The source art object. This object is not deleted. - @param options Drawing options for the operation. - @param paintOrder The position for the new artwork in the - paint order, relative to the \c prep object. - See \c AITypes::AIPaintOrder. - @param prep The prepositional art object. - @see \c #AIArtSuite::NewArt() for paint order details. -
\c #AILegacyTextConversionSuite for - converting legacy text clips to native clips. - */ - AIAPI AIErr (*ConvertToNative)(AIArtHandle art, AIFOConversionOptions *options, ai::int16 paintOrder, AIArtHandle prep); - - /** Retrieves the conversion port that would be used to perform a specific conversion. - For AGM clients only. - @param options Drawing options for the operation. - @param paintOrder The position for the new artwork in the - paint order, relative to the \c prep object. - See \c AITypes::AIPaintOrder. - @param prep The prepositional art object. - @param port [out] A buffer in which to return the port. Caller must release with - \c #ReleaseConversionPort() - */ - AIAPI AIErr (*GetConversionPort)(AIFOConversionOptions *options, ai::int16 paintOrder, AIArtHandle prep, AIDisplayPortHandle *port); - - /** Releases a conversion port. For AGM clients only. - @param port The port returned by \c #GetConversionPort() - */ - AIAPI AIErr (*ReleaseConversionPort)(AIDisplayPortHandle port); - - /** Enumerates the fonts used to draw an art object, passing them to a callback - along with developer-defined data. - @param art The art object. - @param visitor The callback procedure. - @param data The developer-defined data to pass to the callback. - */ - AIAPI AIErr (*EnumerateFonts)(AIArtHandle art, AIVisitFontProc visitor, void *data); - - /** Enumerates information about the contents of an art object needed in order - to draw it, passing it to a callback along with developer-defined data. - @param art The art object. - @param visitor The callback procedure. - @param data The developer-defined data to pass to the callback. - */ - AIAPI AIErr (*EnumerateContents)(AIArtHandle art, AIVisitContentProc visitor, void *data); - - /** Converts a legacy text object to outlines. Attempts to perform the - conversion in such a way that the result is identical to the result - that would be obtained by doing the conversion in the legacy version of - the application. This is intended for use by plug-in groups or - Live Effects that need to execute against legacy text, - to ensure that the results of execution are the same as in the legacy - version. - @param art The art object. - @param paintOrder The position for the new artwork in the - paint order, relative to the \c prep object. - See \c AITypes::AIPaintOrder. - @param prep The prepositional art object. - @see \c #kAIFOConversionSuppressAttributes flag on application to object-level attributes. - */ - AIAPI AIErr (*OutlineLegacyText)(AIArtHandle art, ai::int16 paintOrder, AIArtHandle prep); - - /** For internal use only. Enumerates the fonts used to draw an art object, passing them to a callback - along with information of whether the font is embedded in PDF or EPSdeveloper-defined data. - @param art The art object. - @param visitor The callback procedure. - @param data The developer-defined data to pass to the callback. - */ - AIAPI AIErr (*EnumerateEmbeddedFonts)(AIArtHandle art, AIVisitFontExtendedProc visitor, void *data); - -} AIFOConversionSuite; - - - -#include "AIHeaderEnd.h" - - -#endif // __AIFOConversion__ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2002 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AITypes.h" +#include "AIForeignObject.h" +#include "AIFont.h" + +#include "AIHeaderBegin.h" + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIFOConversionSuite "AI FO Conversion Suite" +#define kAIFOConversionSuiteVersion4 AIAPI_VERSION(4) +#define kAIFOConversionSuiteVersion kAIFOConversionSuiteVersion4 +#define kAIFOConversionVersion kAIFOConversionSuiteVersion + + +/** @ingroup Errors + Error in foreign-object conversion; see \c #AIFOConversionSuite. */ +#define kAIFOConversionErr '!FOc' + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Wrap this \c AGMColorSpace* as a \c CAGMColorSpace + or some baseclass in order to use it. */ +typedef struct _AIAGMColorSpace *AIAGMColorSpaceHandle; + + +/** Types of errors that can occur during the conversion process, + sent to a callback from \c #AIFOConversionSuite::ConvertToNative(), + Depending on the type, the callback can also receive + additional information about + as \c info, a void * which you must + cast to an appropriate type as specified. + */ +typedef enum AIFOConversionInfoSelector +{ + /** No problem occurred. + No \c info is passed; pointer is \c NULL. */ + kAIFOConversionInfoNone, + /** Conversion encountered a problem with fauxed fonts. + \c info contains the missing font name, as char *. */ + kAIFOConversionInfoFauxedFont, + /** Conversion encountered a problem with axial shading. + No \c info is passed; pointer is \c NULL.*/ + kAIFOConversionInfoUnknownAxialShading, + /**Conversion encountered a problem with radial shading. + No \c info is passed; pointer is \c NULL. */ + kAIFOConversionInfoUnknownRadialShading, + /** Conversion encountered a problem with an unknown AIM construct. + No \c info is passed; pointer is \c NULL. */ + kAIFOConversionInfoUnknownAIMConstruct, + /** Conversion encountered a problem with outlined text. + No \c info is passed; pointer is \c NULL. */ + kAIFOConversionInfoTextOutlined, + /** Conversion encountered a problem with rasterized text. + No \c info is passed; pointer is \c NULL. */ + kAIFOConversionInfoTextRasterized + +} AIFOConversionInfoSelector; + + +/** Types of information about the contents of foreign object that can be collected + and sent to a callback from \c #AIFOConversionSuite::EnumerateContents() or + \c #AIFOConversionSuite::EnumerateContentsEx(). */ +typedef enum AIFOContentInfoSelector +{ + /** No information is collected. + No \c info is passed; pointer is \c NULL. */ + kAIFOContentInfoNone, + /** Passes transparency state of contained art in + \c info as const AIBoolean* */ + kAIFOContentInfoHasTransparency, + /** Collects information on marks process plate state of contained art + in \c info as const AIBoolean* */ + kAIFOContentInfoMarksProcessPlates, + /** Passes marks CMYK plate state of contained art; + \c info contains the value as + const AIBoolean [4] c,m,y,k + */ + kAIFOContentInfoMarksCMYKPlates, + /** Passes overprint state of contained art in \c info as + const AIBoolean* */ + kAIFOContentInfoHasOverPrint, + /** Passes text state of contained art in \c info as + const AIBoolean* */ + kAIFOContentInfoHasText, + /** Passes gradient state of contained art in \c info as + const AIBoolean* */ + kAIFOContentInfoHasGradient, + /** Passes gradient mesh state of contained art in \c info as + const AIBoolean* */ + kAIFOContentInfoHasGradientMesh, + /** Passes spot colors in contained art in \c info as + \c #AICustomColorHandle */ + kAIFOContentInfoSpotColor, + /** Each time a drawing operation involves an image as the source of color data, + passes the transformation matrix applied in \c info as \c #AIRealMatrix. */ + kAIFOContentInfoRasterTransform, + /** Each time a drawing operation involves an image as the source of color data, + passes image information in \c info as \c #AIRasterRecord. + */ + kAIFOContentInfoPaintServerRasterRecord, + /** Passes true if the object contains anything other + than images and clipping operations, false otherwise. + Value passed in \c info as const AIBoolean* + */ + kAIFOContentInfoHasNonImage + +} AIFOContentInfoSelector; + + + +/** Flags to indicate the type of information about the foreign object + contents that needs to be collected and sent to a callback from + \c #AIFOConversionSuite::EnumerateContentsEx(), */ +#define AI_FO_MAKE_CONTENT_INFO_FLAG(f) ((f) == 0 ? 0 : (1 << (f))) +typedef enum AIFOContentInfoSelectorFlag : ai::uint32 +{ + /** \c #kAIFOContentInfoNone needs to be sent. */ + kAIFOContentInfoNoneFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoNone), + /** \c #kAIFOContentInfoHasTransparency needs to be sent. */ + kAIFOContentInfoHasTransparencyFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoHasTransparency), + /** \c #kAIFOContentInfoMarksProcessPlates needs to be sent. */ + kAIFOContentInfoMarksProcessPlatesFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoMarksProcessPlates), + /** \c #kAIFOContentInfoMarksCMYKPlates needs to be sent. */ + kAIFOContentInfoMarksCMYKPlatesFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoMarksCMYKPlates), + /** \c #kAIFOContentInfoHasOverPrint needs to be sent. */ + kAIFOContentInfoHasOverPrintFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoHasOverPrint), + /** \c #kAIFOContentInfoHasText needs to be sent. */ + kAIFOContentInfoHasTextFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoHasText), + /** \c #kAIFOContentInfoHasGradient needs to be sent. */ + kAIFOContentInfoHasGradientFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoHasGradient), + /** \c #kAIFOContentInfoHasGradientMesh needs to be sent. */ + kAIFOContentInfoHasGradientMeshFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoHasGradientMesh), + /** \c #kAIFOContentInfoSpotColor needs to be sent. */ + kAIFOContentInfoSpotColorFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoSpotColor), + /** \c #kAIFOContentInfoRasterTransform needs to be sent. */ + kAIFOContentInfoRasterTransformFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoRasterTransform), + /** \c #kAIFOContentInfoPaintServerRasterRecord needs to be sent. */ + kAIFOContentInfoPaintServerRasterRecordFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoPaintServerRasterRecord), + /** \c #kAIFOContentInfoHasNonImage needs to be sent. */ + kAIFOContentInfoHasNonImageFlag = AI_FO_MAKE_CONTENT_INFO_FLAG(kAIFOContentInfoHasNonImage), + /** All supported types of information need to be sent. */ + kAIFOContentInfoAllFlag = kAIFOContentInfoHasTransparencyFlag | + kAIFOContentInfoMarksProcessPlatesFlag | + kAIFOContentInfoMarksCMYKPlatesFlag | + kAIFOContentInfoHasOverPrintFlag | + kAIFOContentInfoHasTextFlag | + kAIFOContentInfoHasGradientFlag | + kAIFOContentInfoHasGradientMeshFlag | + kAIFOContentInfoSpotColorFlag | + kAIFOContentInfoRasterTransformFlag | + kAIFOContentInfoPaintServerRasterRecordFlag | + kAIFOContentInfoHasNonImageFlag, + +} AIFOContentInfoSelectorFlag; + +/** Flags for conversion of a foreign object. A logical OR of + \c #AIFOConversionFlagValue bit flags. */ +typedef ai::int32 AIFOConversionFlags; + +/** Flag values that specify how the conversion of a foreign object to + native artwork is performed. */ +enum AIFOConversionFlagValue { + /** Preserves full visual fidelity and spot colors. + May create other foreign objects. */ + kAIFOConversionDefault = 0, + /** Performs full, but possibly lossy, conversion, + converts spot colors to process colors. + Does not create other foreign objects. + Rasterizes objects that cannot be represented as native art, + including objects filled with PDF shading types, + device-n (spot) rasters, and so on. */ + kAIFOConversionFull = 1 << 0, + /** Replaces paths with stroked versions. */ + kAIFOConversionStrokePaths = 1 << 1, + /** Simplifies paths so that no subpaths intersect. */ + kAIFOConversionSimplifyPaths = 1 << 2, + /** Suppresses object-level attributes, such as visibility, Live Effects, + transparency, and so on. Use this to convert only the \e contents of + the foreign object (such as the display list). + + Specify only for \c #AIFOConversionSuite::ConvertToNative(). + This is the default behavior for \c #AIFOConversionSuite::OutlineLegacyText(). */ + kAIFOConversionSuppressAttributes = 1 << 3, + /** Disallows colorized grayscale images in the output from conversion. */ + kAIFOConversionNoColorizedGray = 1 << 4, + /** Forces use of Newell mixing to convert spot colors to process colors. + Newell mixing preserves the numbers of the spot color alternates. */ + kAIFOConversionUseNewellMixing = 1 << 5, + /** Disallows NChannel/Separation/Indexed color space images in the output from conversion. */ + kAIFOConversionNoNChannelIndexedImages = 1 << 6 +}; + + +/** The prototype for a callback function from \c #AIFOConversionSuite::ConvertToNative() + that acts on information about the conversion. + @param selector Identifies the type of information being supplied. + @param info A pointer to information specific to the \c selector. To inspect its + contents, cast it to an appropriate type, according to the \c selector. + @param data A pointer to developer-defined data, passed back from + \c #AIFOConversionSuite::ConvertToNative() + */ +typedef void (*AIConversionInfoProc)(AIFOConversionInfoSelector selector, void *info, void *data); + +/** The prototype for a callback function from \c #AIFOConversionSuite::EnumerateFonts() + that acts on fonts used by a foreign object. + @param fontkey A font in the enumeration. + @param data A pointer to developer-defined data, passed back from + \c #AIFOConversionSuite::EnumerateFonts(). + */ +typedef void (*AIVisitFontProc)(AIFontKey fontkey, void *data); + +/** For internal use only. The prototype for a callback function from \c #AIFOConversionSuite::EnumerateEmbeddedFonts() + that acts on fonts used by a foreign object. + @param fontkey A font in the enumeration. + @param wasEmbedded set true if the font is embedded in PDF or EPS + @param data A pointer to developer-defined data, passed back from + \c #AIFOConversionSuite::EnumerateFonts(). + */ +typedef void (*AIVisitFontExtendedProc)(AIFontKey fontkey, AIBoolean wasEmbedded, void *data); + +/** The prototype for a callback function from \c #AIFOConversionSuite::EnumerateContents() and + \c #AIFOConversionSuite::EnumerateContentsEx() that acts on information about the contents of a foreign object. + @param selector Identifies the type of information being supplied. + @param info A pointer to information specific to the \c selector. To inspect its + contents, cast it to an appropriate type according to the \c selector. + @param data A pointer to developer-defined data, passed back from \c #AIFOConversionSuite::EnumerateContents() + or \c #AIFOConversionSuite::EnumerateContentsEx(). + */ +typedef void (*AIVisitContentProc)(AIFOContentInfoSelector selector, void *info, void *data); + +/** Specify as the \c info value in the \c #AIFOConversionOptions passed to + \c #AIFOConversionSuite::ConvertToNative(), to provide information about the + conversion process to a callback. + */ +typedef struct AIFOConversionInfoCollector +{ + /** The callback procedure you have defined to act on the collected information. + \c NULL if no information desired. */ + AIConversionInfoProc proc; + /** A pointer to developer-defined data that is passed back to the callback. */ + void *data; + +} AIFOConversionInfoCollector; + +/** Drawing options for \c #AIFOConversionSuite::ConvertToNative() */ +typedef struct +{ + /** Controls how the conversion of foreign objects is performed. + A logical OR of \c #AIFOConversionFlagValue bit flags.*/ + AIFOConversionFlags flags; + /** Specifies a callback procedure and data to be passed to it. The + callback can act on information of various types collected during + the conversion or enumeration process.*/ + AIFOConversionInfoCollector info; + + /** Rasterization resolution for high frequency areas. + Set to 0 to use document flattener settings. + @see \c #AIMaskFlattenerSuite.*/ + AIReal rasterResolution; + + /** Rasterization resolution for low frequency areas (smooth shades). + Set to 0 to use document flattener settings. + @see \c #AIMaskFlattenerSuite.*/ + AIReal meshResolution; + + /** A custom color space for blending of spot colors upon conversion to process + colors. Set to \c NULL to use the default document color space */ + AIAGMColorSpaceHandle conversionCS; + +} AIFOConversionOptions; + + + +/******************************************************************************* + ** + ** Suites + ** + **/ + +/** @ingroup Suites + These functions allows you to convert artwork and collect information about + its contents. The suite was originally intended for use with + foreign objects (see \c #AIForeignObjectSuite). However, you can use + the functions with any type of artwork. For example, you can use + \c #AIFOConversionSuite::ConvertToNative() to convert artwork in such a + way that the resulting art does not contain self-intersecting paths. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIFOConversionSuite and \c #kAIFOConversionVersion. + */ +typedef struct AIFOConversionSuite { + + /** Creates native Illustrator art objects by drawing a source art + object to a conversion port. The source art can be any type; however, + clipping objects (such as clip paths, clipping text, or clipping legacy text) + have no marking commands, so nothing is drawn. + @param art The source art object. This object is not deleted. + @param options Drawing options for the operation. + @param paintOrder The position for the new artwork in the + paint order, relative to the \c prep object. + See \c AITypes::AIPaintOrder. + @param prep The prepositional art object. + @see \c #AIArtSuite::NewArt() for paint order details. +
\c #AILegacyTextConversionSuite for + converting legacy text clips to native clips. + */ + AIAPI AIErr (*ConvertToNative)(AIArtHandle art, AIFOConversionOptions *options, ai::int16 paintOrder, AIArtHandle prep); + + /** Retrieves the conversion port that would be used to perform a specific conversion. + For AGM clients only. + @param options Drawing options for the operation. + @param paintOrder The position for the new artwork in the + paint order, relative to the \c prep object. + See \c AITypes::AIPaintOrder. + @param prep The prepositional art object. + @param port [out] A buffer in which to return the port. Caller must release with + \c #ReleaseConversionPort() + */ + AIAPI AIErr (*GetConversionPort)(AIFOConversionOptions *options, ai::int16 paintOrder, AIArtHandle prep, AIDisplayPortHandle *port); + + /** Releases a conversion port. For AGM clients only. + @param port The port returned by \c #GetConversionPort() + */ + AIAPI AIErr (*ReleaseConversionPort)(AIDisplayPortHandle port); + + /** Enumerates the fonts used to draw an art object, passing them to a callback + along with developer-defined data. + @param art The art object. + @param visitor The callback procedure. + @param data The developer-defined data to pass to the callback. + */ + AIAPI AIErr (*EnumerateFonts)(AIArtHandle art, AIVisitFontProc visitor, void *data); + + /** Enumerates information about the contents of an art object needed in order + to draw it, passing it to a callback along with developer-defined data. + @param art The art object. + @param visitor The callback procedure. + @param data The developer-defined data to pass to the callback. + @note If client is interested in only some of the types of information from + \c #AIFOContentInfoSelector (not all), then caling \c #EnumerateContentsEx() + with appropriate flags is recommended for better performance. + @see \c #EnumerateContentsEx(). + */ + AIAPI AIErr (*EnumerateContents)(AIArtHandle art, AIVisitContentProc visitor, void *data); + + /** Enumerates only the requested information required to draw the contents of the art object. + Pass on this information to a callback along with the developer-defined data. + @param art The art object. + @param visitor The callback procedure. + @param flags The type of information that the callback procedure needs to receive, + a logical OR of \c #AIFOContentInfoSelectorFlag values. + @param data The developer-defined data for the callback. + */ + AIAPI AIErr (*EnumerateContentsEx)(AIArtHandle art, AIVisitContentProc visitor, AIFOContentInfoSelectorFlag flags, void *data); + + /** Converts a legacy text object to outlines. Attempts to perform the conversion in a way + such that the result is identical with the result in the legacy application version. + This is intended for use by plug-in groups or Live Effects that need to be executed + against the legacy text. It ensures that the execution results are the same as that of + the legacy version. + @param art The art object. + @param paintOrder The position for the new artwork in the + paint order, relative to the \c prep object. + See \c AITypes::AIPaintOrder. + @param prep The prepositional art object. + @see \c #kAIFOConversionSuppressAttributes flag on application to object-level attributes. + */ + AIAPI AIErr (*OutlineLegacyText)(AIArtHandle art, ai::int16 paintOrder, AIArtHandle prep); + + /** For internal use only. Enumerates the fonts used to draw an art object, passing them to a callback + along with information of whether the font is embedded in PDF or EPSdeveloper-defined data. + @param art The art object. + @param visitor The callback procedure. + @param data The developer-defined data to pass to the callback. + */ + AIAPI AIErr (*EnumerateEmbeddedFonts)(AIArtHandle art, AIVisitFontExtendedProc visitor, void *data); + +} AIFOConversionSuite; + + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFXGFileFormat.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFXGFileFormat.h index cf78534..45cde21 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFXGFileFormat.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFXGFileFormat.h @@ -1,621 +1,621 @@ -#ifndef __AIFXGFileFormat__ -#define __AIFXGFileFormat__ - -/* -* Name: AIFXGFileFormat.h -* Author: -* Date: -* Purpose: Adobe Illustrator FXG Suite. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2007-2008 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - - -/******************************************************************************* -** -** Imports -** -**/ - -#ifndef __AIDict__ -#include "AIDictionary.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __IAIFilePath__ -#include "IAIFilePath.hpp" -#endif - -#ifndef __AIArray__ -#include "AIArray.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIFXGFileFormat.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIFXGFileFormatSuite "AI FXG File Format Suite" -#define kAIFXGFileFormatSuiteVersion AIAPI_VERSION(4) -#define kAIFXGFileFormatVersion kAIFXGFileFormatSuiteVersion - -/** - FXG Version constants -*/ -enum AIFXGVersion -{ - /** - FXG version 1.0 - */ - kAIFXGVersion1pt0 = 1, - - /** - FXG version 2.0 - */ - kAIFXGVersion2pt0 = 2, - - /** - Default FXG Version - */ - kAIFXGDefaultVersion = kAIFXGVersion2pt0 -}; - -/** - Preserve policies to be used for object which may result in visual differences. - See \c #AIFXGFileFormatSuite -*/ -enum AIFXGPreservePolicy -{ - /** Preserves the appearance of AI art object by expanding it. - */ - kAIFXGPreserveAppearanceExpand = 1, - - /** Preserves the appearance of AI art object by rasterizing it. - */ - kAIFXGPreserveAppearanceRasterize, - - /** Preserves the editibility of AI Art object by mapping directly to corresponding FXG tag. - It may result in loss of appearance in target application. - */ - kAIFXGPreserveEditibility, - - /** Perserves editability whenever possible without altering the appearance. If appearance cannot be matched, expands or rasterizes art. - */ - kAIFXGPreserveAuto, - - /** Default preserve policy for Text - */ - kAIFXGDefaultTextPreservePolicy = kAIFXGPreserveAuto, - - /** Default preserve policy for FXG Filters - */ - kAIFXGDefaultFiltersPreservePolicy = kAIFXGPreserveEditibility, - - /** Default preserve policy for Gradients - */ - kAIFXGDefaultGradientsPreservePolicy = kAIFXGPreserveAuto, - -}; - -/** - Rasterize resolution to be used when an object will be rasterized if its appearance can not be preserved - otherwise. See \c #AIFXGFileFormatSuite -*/ -enum AIFXGRasterizeResolution -{ - /** Resolution at 72 ppi - */ - kAIFXGResolutionScreen = 72, - - /** Resolution at 150 ppi - */ - kAIFXGResolutionMedium = 150, - - /** Resolution at 300 ppi - */ - kAIFXGResolutionHigh = 300, - - /** Custom resolution, specified by another parameter of \c #AIFXGFileFormatSuite::SetFXGSaveRasterizeResolution() - */ - kAIFXGResolutionCustom = -1, - - /** Default resolution - */ - kAIFXGDefaultRasterizeResoultion = kAIFXGResolutionScreen -}; - -/** Type to hold FXG Save warnings. See \c #AIFXGFileFormatSuite -*/ -typedef AIArrayRef AIFXGSaveWarnings; - -/** Type to hold FXG Save options. See \c #AIFXGFileFormatSuite -*/ -typedef AIDictionaryRef AIFXGFileFormatSaveParams; - -/// Error codes -/** - @ingroup Errors - Invalid index is passed to \c #AIFXGFileFormatSuite::GetNthFXGSaveWarning() -*/ -#define kFXGWarningNotFoundErr '!FND' - -/** - Asset types that can be generated on save. See \c #AIFXGFileFormatSuite -*/ -enum AIFXGAssetTypeEnum -{ - /** Main File - */ - kAIFXGAssetTypeMasterFile = 0, - - /** Artboard specific file - */ - kAIFXGAssetTypeArtboardFile = 1, - - /** Image file, either JPG, PNG or GIF - */ - kAIFXGAssetTypeImage = 2, - - /** XMP file - */ - kAIFXGAssetXMP = 3, - - /** Maximum allowed value - */ - kAIFXGAssetTypeMax = 0xFFFF -}; - -/** - Expand option to be used for a particular art object. See \c #AIFXGWriteStreamInterface::GetExpandOptionForArt() -*/ -enum AIFXGExpandArtOptionEnum -{ - /** Art will not be modified - */ - kAIFXGExpandArtOptionNone = 0, - - /** Art will be rasterized - */ - kAIFXGExpandArtOptionRasterize = 1, - - /** Art will be expanded using \c #AIExpandSuite::Expand() - */ - kAIFXGExpandArtOptionExpand = 2, - - /** Art will be played without preserving appearance, will try to map editability in consuming app - */ - kAIFXGExpandArtOptionStructure = 3, - - /** Art will only have a placeholder group tag, this placeholder group will be replaced by - another object on round-trip. - */ - kAIFXGExpandArtOptionPlaceholder = 4, - - /** Art will either be expanded, or rasterized based on the complexity of the art. - */ - kAIFXGExpandArtOptionAuto = 5, - - /** Default Expand option for Blends. - */ - kAIFXGDefaultExpandArtOptionBlends = kAIFXGExpandArtOptionAuto, - - - /** Maximum allowed value - */ - kAIFXGExpandArtOptionMax = 0xFFFF -}; - -/** - Export flag to be used while exporting file to FXG. -*/ -enum AIFXGExportFlagEnum -{ - /** Export the main file - */ - kAIFXGExportFlagMasterFile = 1, - - /** Export the Artboard- specific files. - */ - kAIFXGExportFlagArtboards = 1 << 1, - - /** Export Main file as well as Artboard-specific files. - */ - kAIFXGExportFlagBoth = kAIFXGExportFlagMasterFile | kAIFXGExportFlagArtboards, - - /** Default value of this flag that can be used if you are not sure. - */ - kAIFXGExportFlagDefault = kAIFXGExportFlagMasterFile, - - /** Maximum allowed value */ - kAIFXGExportFlagMax = 0xFFFF -}; - -/******************************************************************************* -** -** Types -** -**/ - -/** - Streaming interface to be supplied by the client, to be used when calling - \c #AIFXGFileFormatSuite::ExportFXGToStream() -*/ -struct AIFXGWriteStreamInterface { - - /** - Callback to client to check whether an asset currently exists in an asset folder. - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream(). - @param assetType [in] The type of the asset, an \c #AIFXGAssetTypeEnum value. - @param assetPath [in] The asset path. - @return True if the asset exists in the asset folder, false otherwise. - */ - AIAPI AIBoolean (*IsExistingAsset) (AIFXGWriteStreamInterface* stream, ai::int16 assetType, const ai::UnicodeString& assetPath); - - /** - Callback to client to open an asset. - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param assetType [in] Type of asset See \c AIFXGAssetTypeEnum - @param assetName [in/out] Name of asset. Client can change the input name, so that the export plug-in can use the changed name. - @param mimeType [in] Mime type of asset - @return \c #kCanceledErr if client does not want to receive further write and close calls for this particular open-asset call. - */ - AIAPI AIErr (*BeginAsset) (AIFXGWriteStreamInterface* stream, ai::int16 assetType, const ai::UnicodeString& assetName, const ai::UnicodeString& mimeType); - - /** - Callback to client to close an opened asset. - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param assetType [in] The asset type to close. - @return \c #kNoErr on success - */ - AIAPI AIErr (*EndAsset) (AIFXGWriteStreamInterface* stream, ai::int16 assetType); - - /** - Callback to client to write bytes to current stream. (Note that this function returns - a constant value, not an error code.) - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param buffer [in] A buffer to write to current stream - @param maxToWrite [in] The maximum number of bytes to write - @return actual bytes written - */ - AIAPI size_t (*WriteBytes) (AIFXGWriteStreamInterface* stream, const ai::uint8* buffer, const size_t maxToWrite); - - - /** - Callback to determine the appropriate expand setting for an art object. - If client returns \c #kAIFXGExpandArtOptionExpand, it must fill \c expandFlags; see \c #AIExpandSuite::Expand() for flags, - (Note that this function returns a constant value, not an error code.) - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param art [in] The art for which an expand setting is needed. - @param expandFlag [out] The expand flags setting when \c #kAIFXGExpandArtOptionExpand is returned. - @return One of the values of \c #AIFXGExpandArtOptionEnum, \c #kAIFXGExpandArtOptionNone for default processing. - */ - AIAPI ai::int16 (*GetExpandOptionForArt) (AIFXGWriteStreamInterface* stream, AIArtHandle art, ai::int32* expandFlags); - - /** - Callback to report whether client wants private data generation for an art object. - If not, application private data corresponding to the art is not written. - (Note that this function returns a constant value, not an error code.) - @param stream [in] The stream pointer which the client has passed to AIFXGFileFormatSuite::ExportFXGToStream - @param art [in] The art for which private data should be generated. - @return True if client wants private data generation for this particular art, false otherwise. - */ - AIAPI AIBoolean (*GeneratePrivateDataForArt)(AIFXGWriteStreamInterface* stream, AIArtHandle art); - - /** - Callback to retrieve the filepath/name of the current stream - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param pulicID [out] The filepath/name of the current stream. This is used in open-asset calls. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*GetPublicID) (AIFXGWriteStreamInterface* stream, ai::UnicodeString& publicID); - - /** - Callback to retrieve the relative Image folder path, so that the \c BitmapGraphic FXG tag can create the - proper relative path of the image source. For example, if client returns the path "MyFile.assets/images" and the image file name is MyImage.png, - the entry in the \c BitmapGrapic tag is source="\@Embed('MyFile.assets/images/MyImage.png')". - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param relImageFolderPath [out] The relative path to the image folder. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*GetRelativeImageFolderPath) (AIFXGWriteStreamInterface* stream, ai::UnicodeString& relImageFolderPath); - - /** Internal */ - AIAPI AIErr (*DeleteAutoGeneratedImage)(AIFXGWriteStreamInterface* stream,const ai::UnicodeString& imageName); -}; -/** -Stream interface to be passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() -*/ - - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides functions that allow you to export an AI document or art object to FXG. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIFXGFileFormatSuite and \c #kAIFXGFileFormatVersion. -*/ -struct AIFXGFileFormatSuite{ - /** - Creates an FXG save-options object with default values. This should be freed when no longer needed, - using \c #DisposeFXGSaveParams() - @param fxgSaveParams [out] Save options with default values. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*CreateFXGSaveParams) ( AIFXGFileFormatSaveParams* fxgSaveParams ); - - /** - Destroys the FXG save-options object created with \c #CreateFXGSaveParams() - @param fxgSaveParams [in] The save-options object. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*DisposeFXGSaveParams) ( AIFXGFileFormatSaveParams fxgSaveParams ); - - /** - Retrieves the current FXG version value from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The FXG version, an \c #AIFXGVersion value. - */ - AIAPI ai::int16 (*GetFXGSaveVersion) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the FXG save version value in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgVersion [in] The FXG version, an \c #AIFXGVersion value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveVersion) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgVersion); - - /** - Retrieves the current "Save Illustrator Private Data" flag value from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if AI editing capabilities should be preserved using application private data. - */ - AIAPI AIBoolean (*GetFXGSavePreserveAIEditCapability) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Preserve AI Editing capabilities" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param aiEditCap [in] true if editing capabilities should be preserved, false other wise. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSavePreserveAIEditCapability) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiEditCap); - - /** - Retrieves the current preserve policy for Text from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The preserve policy for Text, an \c #AIFXGPreservePolicy value. - */ - AIAPI ai::int16 (*GetFXGSaveTextPolicy) (const AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the preserve policy for Text in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgTextPreservePolicy [in] The preserve policy for Text, an \c #AIFXGPreservePolicy value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveTextPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgTextPreservePolicy); - - /** - Retrieves the current preserve policy for FXG Filters from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The preserve policy for FXG Filters, an \c #AIFXGPreservePolicy value. - */ - AIAPI ai::int16 (*GetFXGSaveFilterPolicy) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the preserve policy for FXG Filters in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgFilterPreservePolicy [in] The preserve policy for FXG Filters, an \c #AIFXGPreservePolicy value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveFilterPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgFilterPreservePolicy); - - /** - Retrieves the current preserve policy for Gradients from an FXG save-options object. - (Note that this function returns - a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The preserve policy for Gradients, an \c #AIFXGPreservePolicy value. - */ - AIAPI ai::int16 (*GetFXGSaveGradientPolicy) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the preserve policy for Gradients in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgFilterPreservePolicy [in] The preserve policy for Gradients, an \c #AIFXGPreservePolicy value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveGradientPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgGradientPreservePolicy); - - /** - Retrieves the "Include Symbols" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if All Symbols should be written in FXG, whether they are used or not. - */ - AIAPI AIBoolean (*GetFXGSaveIncludeSymbol) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Include Symbols" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param aiIncludeSymbol [in] True if all symbols should be exported, false if only used symbols should be exported - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveIncludeSymbol) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiIncludeSymbol); - - /** - Retrieves the "Include XMP" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if XMP should be written in FXG, - */ - AIAPI AIBoolean (*GetFXGSaveIncludeXMP) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Include Symbols" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param aiIncludeXMP [in] True if XMP should be exported. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveIncludeXMP) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiIncludeXMP); - - /** - Retrieves the rasterize resolution from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param outCustomResolution [out] A custom resolution value if the returned value is \c #kAIFXGResolutionCustom - @return The rasterize resolution, an \c #AIFXGRasterizeResolution value. - */ - AIAPI ai::int16 (*GetFXGSaveRasterizeResolution) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int32* outCustomResolution); - - /** - Sets the rasterize resolution in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgRasterizeResolution [in] The rasterize resolution, an \c #AIFXGRasterizeResolution value. - @param customResolution [in] A custom resolution if the resolution value is \c #kAIFXGResolutionCustom - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveRasterizeResolution) (AIFXGFileFormatSaveParams fxgSaveParams, - ai::int16 fxgRasterizeResolution, ai::int32 customResolution); - - /** - Retrieves the "Downsample Linked Images" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if linked images should be downsampled to 72 ppi, false otherwise. - */ - AIAPI AIBoolean (*GetFXGSaveDownsampleLinkedImages) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Downsample Linked Images" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param aiDownSampleLinkedImages [in] True if Linked images should be downsampled to 72 ppi, false otherwise. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveDownsampleLinkedImages) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiDownSampleLinkedImages); - - /** - Retrieves the "WriteImages" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if images should also be written while exporting FXG. If false, images are not written, which is useful - when user is interested in only the XML code. - */ - AIAPI AIBoolean (*GetFXGSaveWriteImages) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "WriteImages" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param writeImages [in] True if images should be written while exporting FXG, false otherwise. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveWriteImages) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean writeImages); - - /** - Generates FXG to a file. - @param art [in] Art which you want to export as FXG. Pass NULL to generate FXG for entire document. - @param filepath [in] The file path for the master document FXG - @param fxgSaveParams [in] The FXG save options parameters. See \c #AIFXGFileFormatSaveParams - @param fxgExportFlags [in] The export flags. See \c #AIFXGExportFlagEnum - @param artBoardRange [in] If the export flag \c #kAIFXGExportFlagArtboards is passed, the artboard range. - @param customProgressText [in] An optional message to display in the progress bar. If NULL, a default message is displayed. - @param saveWarnings [out] A list to store warning message ids, which gets generated while saving to FXG. Dispose it via \c #DisposeFXGSaveWarnings(). - Pass NULL if you do not want to receive any warning messages. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*ExportFXGToFile) (AIArtHandle art, const ai::FilePath& filePath, AIFXGFileFormatSaveParams fxgSaveParams, ai::int32 fxgExportFlags, const ai::UnicodeString& artBoardRange, const ai::UnicodeString& customProgressText, AIFXGSaveWarnings* saveWarnings); - - /** - Generates FXG to a stream through callbacks. - @param art [in] The art which you want to export as FXG. Pass NULL to generate FXG for entire document. - @param streamInterface [in] The stream implementation with callbacks, See \c #AIFXGWriteStreamInterface - @param fxgSaveParams [in] The FXG save options parameters. See \c #AIFXGFileFormatSaveParams - @param fxgExportFlags [in] The export flags. See \c #AIFXGExportFlagEnum - @param artBoardRange [in] If the export flag \c #kAIFXGExportFlagArtboards is passed, the artboard range. - @param customProgressText [in] An optional message to display in the progress bar. If NULL, a default message is displayed. - @param saveWarnings [out] A list to store warning message ids, which gets generated while saving to FXG. Dispose it via \c #DisposeFXGSaveWarnings(). - Pass NULL if you do not want to receive any warning messages. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*ExportFXGToStream) (AIArtHandle art, AIFXGWriteStreamInterface* streamInterface, AIFXGFileFormatSaveParams fxgSaveParams, ai::int32 fxgExportFlags, const ai::UnicodeString& artBoardRange, const ai::UnicodeString& customProgressText, AIFXGSaveWarnings* saveWarnings); - - /** - Retrieves the current expand option for Blends from an FXG save-options object. - (Note that this function returns - a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The expand option for Blends, an \c #AIFXGExpandArtOptionEnum value. - */ - AIAPI ai::int16 (*GetFXGSaveExpandOptionBlends) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the expand option for Blends in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgBlendsExpandOption [in] The preserve policy for Gradients, an \c #AIFXGExpandArtOptionEnum value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveExpandOptionBlends) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgBlendsExpandOption); - - /** - Destroys the FXG save-warnings object created with \c #ExportFXGToFile() or \c #ExportFXGToStream() - @param saveWarnings [in] The save-warnings object. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*DisposeFXGSaveWarnings)(AIFXGSaveWarnings saveWarnings); - - /** - Retrieves the number of warnings stored in the FXG save-warnings object. - (Note that this function returns a number, not an error code.) - @param saveWarnings [in] The save-warnings object. - @return The number of warnings. - */ - AIAPI ai::int32 (*GetFXGSaveWarningCount) (AIFXGSaveWarnings saveWarnings); - - /** Retrieves a warning from the FXG save-warnings object. - @param saveWarnings The save-warnings object. - @param index The 0-based position index of the warning. - @param warningZStr [out] A buffer in which to return the warning string, in ZString format. - Developer is responsible for translating to the appropriate language. - @return \c #kNoErr if a warning is found at the given index, \c #kBadParameterErr if the index is invalid, - \c #kFXGWarningNotFoundErr if index is valid but the warning string is empty. - */ - AIAPI AIErr (*GetNthFXGSaveWarning) (AIFXGSaveWarnings saveWarnings, ai::int32 index, ai::UnicodeString& warningZStr); - -} ; - - -#include "AIHeaderEnd.h" - - - -#endif //__AIFXGFileFormat__ +#ifndef __AIFXGFileFormat__ +#define __AIFXGFileFormat__ + +/* +* Name: AIFXGFileFormat.h +* Author: +* Date: +* Purpose: Adobe Illustrator FXG Suite. +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2007-2008 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + + +/******************************************************************************* +** +** Imports +** +**/ + +#ifndef __AIDict__ +#include "AIDictionary.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __IAIFilePath__ +#include "IAIFilePath.hpp" +#endif + +#ifndef __AIArray__ +#include "AIArray.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIFXGFileFormat.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIFXGFileFormatSuite "AI FXG File Format Suite" +#define kAIFXGFileFormatSuiteVersion AIAPI_VERSION(4) +#define kAIFXGFileFormatVersion kAIFXGFileFormatSuiteVersion + +/** + FXG Version constants +*/ +enum AIFXGVersion +{ + /** + FXG version 1.0 + */ + kAIFXGVersion1pt0 = 1, + + /** + FXG version 2.0 + */ + kAIFXGVersion2pt0 = 2, + + /** + Default FXG Version + */ + kAIFXGDefaultVersion = kAIFXGVersion2pt0 +}; + +/** + Preserve policies to be used for object which may result in visual differences. + See \c #AIFXGFileFormatSuite +*/ +enum AIFXGPreservePolicy +{ + /** Preserves the appearance of AI art object by expanding it. + */ + kAIFXGPreserveAppearanceExpand = 1, + + /** Preserves the appearance of AI art object by rasterizing it. + */ + kAIFXGPreserveAppearanceRasterize, + + /** Preserves the editibility of AI Art object by mapping directly to corresponding FXG tag. + It may result in loss of appearance in target application. + */ + kAIFXGPreserveEditibility, + + /** Perserves editability whenever possible without altering the appearance. If appearance cannot be matched, expands or rasterizes art. + */ + kAIFXGPreserveAuto, + + /** Default preserve policy for Text + */ + kAIFXGDefaultTextPreservePolicy = kAIFXGPreserveAuto, + + /** Default preserve policy for FXG Filters + */ + kAIFXGDefaultFiltersPreservePolicy = kAIFXGPreserveEditibility, + + /** Default preserve policy for Gradients + */ + kAIFXGDefaultGradientsPreservePolicy = kAIFXGPreserveAuto, + +}; + +/** + Rasterize resolution to be used when an object will be rasterized if its appearance can not be preserved + otherwise. See \c #AIFXGFileFormatSuite +*/ +enum AIFXGRasterizeResolution +{ + /** Resolution at 72 ppi + */ + kAIFXGResolutionScreen = 72, + + /** Resolution at 150 ppi + */ + kAIFXGResolutionMedium = 150, + + /** Resolution at 300 ppi + */ + kAIFXGResolutionHigh = 300, + + /** Custom resolution, specified by another parameter of \c #AIFXGFileFormatSuite::SetFXGSaveRasterizeResolution() + */ + kAIFXGResolutionCustom = -1, + + /** Default resolution + */ + kAIFXGDefaultRasterizeResoultion = kAIFXGResolutionScreen +}; + +/** Type to hold FXG Save warnings. See \c #AIFXGFileFormatSuite +*/ +typedef AIArrayRef AIFXGSaveWarnings; + +/** Type to hold FXG Save options. See \c #AIFXGFileFormatSuite +*/ +typedef AIDictionaryRef AIFXGFileFormatSaveParams; + +/// Error codes +/** + @ingroup Errors + Invalid index is passed to \c #AIFXGFileFormatSuite::GetNthFXGSaveWarning() +*/ +#define kFXGWarningNotFoundErr '!FND' + +/** + Asset types that can be generated on save. See \c #AIFXGFileFormatSuite +*/ +enum AIFXGAssetTypeEnum +{ + /** Main File + */ + kAIFXGAssetTypePrimaryFile = 0, + + /** Artboard specific file + */ + kAIFXGAssetTypeArtboardFile = 1, + + /** Image file, either JPG, PNG or GIF + */ + kAIFXGAssetTypeImage = 2, + + /** XMP file + */ + kAIFXGAssetXMP = 3, + + /** Maximum allowed value + */ + kAIFXGAssetTypeMax = 0xFFFF +}; + +/** + Expand option to be used for a particular art object. See \c #AIFXGWriteStreamInterface::GetExpandOptionForArt() +*/ +enum AIFXGExpandArtOptionEnum +{ + /** Art will not be modified + */ + kAIFXGExpandArtOptionNone = 0, + + /** Art will be rasterized + */ + kAIFXGExpandArtOptionRasterize = 1, + + /** Art will be expanded using \c #AIExpandSuite::Expand() + */ + kAIFXGExpandArtOptionExpand = 2, + + /** Art will be played without preserving appearance, will try to map editability in consuming app + */ + kAIFXGExpandArtOptionStructure = 3, + + /** Art will only have a placeholder group tag, this placeholder group will be replaced by + another object on round-trip. + */ + kAIFXGExpandArtOptionPlaceholder = 4, + + /** Art will either be expanded, or rasterized based on the complexity of the art. + */ + kAIFXGExpandArtOptionAuto = 5, + + /** Default Expand option for Blends. + */ + kAIFXGDefaultExpandArtOptionBlends = kAIFXGExpandArtOptionAuto, + + + /** Maximum allowed value + */ + kAIFXGExpandArtOptionMax = 0xFFFF +}; + +/** + Export flag to be used while exporting file to FXG. +*/ +enum AIFXGExportFlagEnum +{ + /** Export the main file + */ + kAIFXGExportFlagPrimaryFile = 1, + + /** Export the Artboard- specific files. + */ + kAIFXGExportFlagArtboards = 1 << 1, + + /** Export Main file as well as Artboard-specific files. + */ + kAIFXGExportFlagBoth = kAIFXGExportFlagPrimaryFile | kAIFXGExportFlagArtboards, + + /** Default value of this flag that can be used if you are not sure. + */ + kAIFXGExportFlagDefault = kAIFXGExportFlagPrimaryFile, + + /** Maximum allowed value */ + kAIFXGExportFlagMax = 0xFFFF +}; + +/******************************************************************************* +** +** Types +** +**/ + +/** + Streaming interface to be supplied by the client, to be used when calling + \c #AIFXGFileFormatSuite::ExportFXGToStream() +*/ +struct AIFXGWriteStreamInterface { + + /** + Callback to client to check whether an asset currently exists in an asset folder. + @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream(). + @param assetType [in] The type of the asset, an \c #AIFXGAssetTypeEnum value. + @param assetPath [in] The asset path. + @return True if the asset exists in the asset folder, false otherwise. + */ + AIAPI AIBoolean (*IsExistingAsset) (AIFXGWriteStreamInterface* stream, ai::int16 assetType, const ai::UnicodeString& assetPath); + + /** + Callback to client to open an asset. + @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() + @param assetType [in] Type of asset See \c AIFXGAssetTypeEnum + @param assetName [in/out] Name of asset. Client can change the input name, so that the export plug-in can use the changed name. + @param mimeType [in] Mime type of asset + @return \c #kCanceledErr if client does not want to receive further write and close calls for this particular open-asset call. + */ + AIAPI AIErr (*BeginAsset) (AIFXGWriteStreamInterface* stream, ai::int16 assetType, const ai::UnicodeString& assetName, const ai::UnicodeString& mimeType); + + /** + Callback to client to close an opened asset. + @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() + @param assetType [in] The asset type to close. + @return \c #kNoErr on success + */ + AIAPI AIErr (*EndAsset) (AIFXGWriteStreamInterface* stream, ai::int16 assetType); + + /** + Callback to client to write bytes to current stream. (Note that this function returns + a constant value, not an error code.) + @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() + @param buffer [in] A buffer to write to current stream + @param maxToWrite [in] The maximum number of bytes to write + @return actual bytes written + */ + AIAPI size_t (*WriteBytes) (AIFXGWriteStreamInterface* stream, const ai::uint8* buffer, const size_t maxToWrite); + + + /** + Callback to determine the appropriate expand setting for an art object. + If client returns \c #kAIFXGExpandArtOptionExpand, it must fill \c expandFlags; see \c #AIExpandSuite::Expand() for flags, + (Note that this function returns a constant value, not an error code.) + @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() + @param art [in] The art for which an expand setting is needed. + @param expandFlag [out] The expand flags setting when \c #kAIFXGExpandArtOptionExpand is returned. + @return One of the values of \c #AIFXGExpandArtOptionEnum, \c #kAIFXGExpandArtOptionNone for default processing. + */ + AIAPI ai::int16 (*GetExpandOptionForArt) (AIFXGWriteStreamInterface* stream, AIArtHandle art, ai::int32* expandFlags); + + /** + Callback to report whether client wants private data generation for an art object. + If not, application private data corresponding to the art is not written. + (Note that this function returns a constant value, not an error code.) + @param stream [in] The stream pointer which the client has passed to AIFXGFileFormatSuite::ExportFXGToStream + @param art [in] The art for which private data should be generated. + @return True if client wants private data generation for this particular art, false otherwise. + */ + AIAPI AIBoolean (*GeneratePrivateDataForArt)(AIFXGWriteStreamInterface* stream, AIArtHandle art); + + /** + Callback to retrieve the filepath/name of the current stream + @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() + @param pulicID [out] The filepath/name of the current stream. This is used in open-asset calls. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*GetPublicID) (AIFXGWriteStreamInterface* stream, ai::UnicodeString& publicID); + + /** + Callback to retrieve the relative Image folder path, so that the \c BitmapGraphic FXG tag can create the + proper relative path of the image source. For example, if client returns the path "MyFile.assets/images" and the image file name is MyImage.png, + the entry in the \c BitmapGrapic tag is source="\@Embed('MyFile.assets/images/MyImage.png')". + @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() + @param relImageFolderPath [out] The relative path to the image folder. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*GetRelativeImageFolderPath) (AIFXGWriteStreamInterface* stream, ai::UnicodeString& relImageFolderPath); + + /** Internal */ + AIAPI AIErr (*DeleteAutoGeneratedImage)(AIFXGWriteStreamInterface* stream,const ai::UnicodeString& imageName); +}; +/** +Stream interface to be passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() +*/ + + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +This suite provides functions that allow you to export an AI document or art object to FXG. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIFXGFileFormatSuite and \c #kAIFXGFileFormatVersion. +*/ +struct AIFXGFileFormatSuite{ + /** + Creates an FXG save-options object with default values. This should be freed when no longer needed, + using \c #DisposeFXGSaveParams() + @param fxgSaveParams [out] Save options with default values. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*CreateFXGSaveParams) ( AIFXGFileFormatSaveParams* fxgSaveParams ); + + /** + Destroys the FXG save-options object created with \c #CreateFXGSaveParams() + @param fxgSaveParams [in] The save-options object. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*DisposeFXGSaveParams) ( AIFXGFileFormatSaveParams fxgSaveParams ); + + /** + Retrieves the current FXG version value from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return The FXG version, an \c #AIFXGVersion value. + */ + AIAPI ai::int16 (*GetFXGSaveVersion) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the FXG save version value in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param fxgVersion [in] The FXG version, an \c #AIFXGVersion value. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveVersion) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgVersion); + + /** + Retrieves the current "Save Illustrator Private Data" flag value from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return True if AI editing capabilities should be preserved using application private data. + */ + AIAPI AIBoolean (*GetFXGSavePreserveAIEditCapability) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the "Preserve AI Editing capabilities" flag in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param aiEditCap [in] true if editing capabilities should be preserved, false other wise. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSavePreserveAIEditCapability) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiEditCap); + + /** + Retrieves the current preserve policy for Text from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return The preserve policy for Text, an \c #AIFXGPreservePolicy value. + */ + AIAPI ai::int16 (*GetFXGSaveTextPolicy) (const AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the preserve policy for Text in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param fxgTextPreservePolicy [in] The preserve policy for Text, an \c #AIFXGPreservePolicy value. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveTextPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgTextPreservePolicy); + + /** + Retrieves the current preserve policy for FXG Filters from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return The preserve policy for FXG Filters, an \c #AIFXGPreservePolicy value. + */ + AIAPI ai::int16 (*GetFXGSaveFilterPolicy) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the preserve policy for FXG Filters in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param fxgFilterPreservePolicy [in] The preserve policy for FXG Filters, an \c #AIFXGPreservePolicy value. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveFilterPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgFilterPreservePolicy); + + /** + Retrieves the current preserve policy for Gradients from an FXG save-options object. + (Note that this function returns + a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return The preserve policy for Gradients, an \c #AIFXGPreservePolicy value. + */ + AIAPI ai::int16 (*GetFXGSaveGradientPolicy) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the preserve policy for Gradients in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param fxgFilterPreservePolicy [in] The preserve policy for Gradients, an \c #AIFXGPreservePolicy value. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveGradientPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgGradientPreservePolicy); + + /** + Retrieves the "Include Symbols" flag from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return True if All Symbols should be written in FXG, whether they are used or not. + */ + AIAPI AIBoolean (*GetFXGSaveIncludeSymbol) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the "Include Symbols" flag in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param aiIncludeSymbol [in] True if all symbols should be exported, false if only used symbols should be exported + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveIncludeSymbol) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiIncludeSymbol); + + /** + Retrieves the "Include XMP" flag from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return True if XMP should be written in FXG, + */ + AIAPI AIBoolean (*GetFXGSaveIncludeXMP) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the "Include Symbols" flag in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param aiIncludeXMP [in] True if XMP should be exported. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveIncludeXMP) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiIncludeXMP); + + /** + Retrieves the rasterize resolution from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param outCustomResolution [out] A custom resolution value if the returned value is \c #kAIFXGResolutionCustom + @return The rasterize resolution, an \c #AIFXGRasterizeResolution value. + */ + AIAPI ai::int16 (*GetFXGSaveRasterizeResolution) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int32* outCustomResolution); + + /** + Sets the rasterize resolution in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param fxgRasterizeResolution [in] The rasterize resolution, an \c #AIFXGRasterizeResolution value. + @param customResolution [in] A custom resolution if the resolution value is \c #kAIFXGResolutionCustom + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveRasterizeResolution) (AIFXGFileFormatSaveParams fxgSaveParams, + ai::int16 fxgRasterizeResolution, ai::int32 customResolution); + + /** + Retrieves the "Downsample Linked Images" flag from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return True if linked images should be downsampled to 72 ppi, false otherwise. + */ + AIAPI AIBoolean (*GetFXGSaveDownsampleLinkedImages) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the "Downsample Linked Images" flag in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param aiDownSampleLinkedImages [in] True if Linked images should be downsampled to 72 ppi, false otherwise. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveDownsampleLinkedImages) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiDownSampleLinkedImages); + + /** + Retrieves the "WriteImages" flag from an FXG save-options object. + (Note that this function returns a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return True if images should also be written while exporting FXG. If false, images are not written, which is useful + when user is interested in only the XML code. + */ + AIAPI AIBoolean (*GetFXGSaveWriteImages) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the "WriteImages" flag in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param writeImages [in] True if images should be written while exporting FXG, false otherwise. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveWriteImages) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean writeImages); + + /** + Generates FXG to a file. + @param art [in] Art which you want to export as FXG. Pass NULL to generate FXG for entire document. + @param filepath [in] The file path for the Primary document FXG + @param fxgSaveParams [in] The FXG save options parameters. See \c #AIFXGFileFormatSaveParams + @param fxgExportFlags [in] The export flags. See \c #AIFXGExportFlagEnum + @param artBoardRange [in] If the export flag \c #kAIFXGExportFlagArtboards is passed, the artboard range. + @param customProgressText [in] An optional message to display in the progress bar. If NULL, a default message is displayed. + @param saveWarnings [out] A list to store warning message ids, which gets generated while saving to FXG. Dispose it via \c #DisposeFXGSaveWarnings(). + Pass NULL if you do not want to receive any warning messages. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*ExportFXGToFile) (AIArtHandle art, const ai::FilePath& filePath, AIFXGFileFormatSaveParams fxgSaveParams, ai::int32 fxgExportFlags, const ai::UnicodeString& artBoardRange, const ai::UnicodeString& customProgressText, AIFXGSaveWarnings* saveWarnings); + + /** + Generates FXG to a stream through callbacks. + @param art [in] The art which you want to export as FXG. Pass NULL to generate FXG for entire document. + @param streamInterface [in] The stream implementation with callbacks, See \c #AIFXGWriteStreamInterface + @param fxgSaveParams [in] The FXG save options parameters. See \c #AIFXGFileFormatSaveParams + @param fxgExportFlags [in] The export flags. See \c #AIFXGExportFlagEnum + @param artBoardRange [in] If the export flag \c #kAIFXGExportFlagArtboards is passed, the artboard range. + @param customProgressText [in] An optional message to display in the progress bar. If NULL, a default message is displayed. + @param saveWarnings [out] A list to store warning message ids, which gets generated while saving to FXG. Dispose it via \c #DisposeFXGSaveWarnings(). + Pass NULL if you do not want to receive any warning messages. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*ExportFXGToStream) (AIArtHandle art, AIFXGWriteStreamInterface* streamInterface, AIFXGFileFormatSaveParams fxgSaveParams, ai::int32 fxgExportFlags, const ai::UnicodeString& artBoardRange, const ai::UnicodeString& customProgressText, AIFXGSaveWarnings* saveWarnings); + + /** + Retrieves the current expand option for Blends from an FXG save-options object. + (Note that this function returns + a constant value, not an error code.) + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @return The expand option for Blends, an \c #AIFXGExpandArtOptionEnum value. + */ + AIAPI ai::int16 (*GetFXGSaveExpandOptionBlends) (AIFXGFileFormatSaveParams fxgSaveParams); + + /** + Sets the expand option for Blends in an FXG save-options object. + @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). + @param fxgBlendsExpandOption [in] The preserve policy for Gradients, an \c #AIFXGExpandArtOptionEnum value. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*SetFXGSaveExpandOptionBlends) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgBlendsExpandOption); + + /** + Destroys the FXG save-warnings object created with \c #ExportFXGToFile() or \c #ExportFXGToStream() + @param saveWarnings [in] The save-warnings object. + @return \c #kNoErr on success. + */ + AIAPI AIErr (*DisposeFXGSaveWarnings)(AIFXGSaveWarnings saveWarnings); + + /** + Retrieves the number of warnings stored in the FXG save-warnings object. + (Note that this function returns a number, not an error code.) + @param saveWarnings [in] The save-warnings object. + @return The number of warnings. + */ + AIAPI ai::int32 (*GetFXGSaveWarningCount) (AIFXGSaveWarnings saveWarnings); + + /** Retrieves a warning from the FXG save-warnings object. + @param saveWarnings The save-warnings object. + @param index The 0-based position index of the warning. + @param warningZStr [out] A buffer in which to return the warning string, in ZString format. + Developer is responsible for translating to the appropriate language. + @return \c #kNoErr if a warning is found at the given index, \c #kBadParameterErr if the index is invalid, + \c #kFXGWarningNotFoundErr if index is valid but the warning string is empty. + */ + AIAPI AIErr (*GetNthFXGSaveWarning) (AIFXGSaveWarnings saveWarnings, ai::int32 index, ai::UnicodeString& warningZStr); + +} ; + + +#include "AIHeaderEnd.h" + + + +#endif //__AIFXGFileFormat__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFileFormat.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFileFormat.h index d5240d3..cebc354 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFileFormat.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFileFormat.h @@ -1,973 +1,1014 @@ -#ifndef __AIFileFormat__ -#define __AIFileFormat__ - -/* - * Name: AIFileFormat.h - * Purpose: Adobe Illustrator File Format Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIPlaced__ -#include "AIPlaced.h" -#endif - -#include "AIEntry.h" - -#include "IAIFilePath.hpp" -#include "AIArtboardRange.h" -#include "AIActionManager.h" - -#include "AIHeaderBegin.h" - - - -/** @file AIFileFormat.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ -#define kAIFileFormatSuite "AI File Format Suite" -#define kAIFileFormatSuiteVersion14 AIAPI_VERSION(14) // From AI 20.0 -#define kAIFileFormatSuiteVersion kAIFileFormatSuiteVersion14 -#define kAIFileFormatVersion kAIFileFormatSuiteVersion - - -#define kAIMacFileFormatSuite "AI Mac File Format Suite" -#define kAIMacFileFormatSuiteVersion AIAPI_VERSION(4) -#define kAIMacFileFormatVersion kAIMacFileFormatSuiteVersion - - -/** @ingroup Callers - The file format caller. See \c #AIFileFormatSuite. - */ -#define kCallerAIFileFormat "AI File Format" - -/** @ingroup Selectors - Sent to file format plug-ins to allow the plug-in to show any dialogs necessary - to gather parameters. - \li When reading a file this is sent after \c #kSelectorAICheckFileFormat. - \li Whether reading or writing it is sent before \c #kSelectorAIGoFileFormat. - - Not always sent; for example, when re-saving a document with the Save command, - only the Go message is sent. In this case, the operation uses the parameters - from the last time the document was saved. - - The data is an \c #AIFileFormatMessage. - */ -#define kSelectorAIGetFileFormatParameters "AI Get Parameters" - -/** @ingroup Selectors - Sent to file format plug-ins to allow the plug-in to customize import/export - based on client provided options. - \li Currently this is not sent during reading a file. - \li When writing it is sent before \c #kSelectorAIGetFileFormatParameters. - - This is only sent if the client has provided some options to customize - import/export and the plugin had registered the file format with the - \c #kFileFormatHasExtendedData option. - - The data is an \c #AIFileFormatMessage. - */ -#define kSelectorAISetFileFormatParameters "AI Set Parameters" - -/** @ingroup Selectors - Sent to file format plug-ins to execute the read or write operation. - \li A read operation creates art according to what is in the specified file - \li A write operation scans the artwork database and writes out appropriately - formatted information. - - The data is an \c #AIFileFormatMessage. - */ -#define kSelectorAIGoFileFormat "AI Go" - -/** @ingroup Selectors - Sent to file format plug-ins after the user has selected a file, - to allow a reader to open the file and check for header - information in order to verify that it can be opened. If your plug-in cannot - read the specified file, it should return \c #kUnknownFormatErr. - - The data is an \c #AIFileFormatMessage. - */ -#define kSelectorAICheckFileFormat "AI Check" - -/** @ingroup Selectors - Obsolete. Linked raster art is now implemented as placed art. - Sent to file format plug-ins to request an update for a linked object in - the document. The data is an \c #AIUpdateFileFormatMessage. - @note Handle this or the legacy versions, \c kAI110SelectorAIUpdateFileFormat, - kAI130SelectorAIUpdateFileFormat, - not both. - */ -#define kSelectorAIUpdateFileFormat "AI Update AI140" - -/** @ingroup Notifiers - If a notifier plug-in requests this type of notification, it - receives this selector when any open-file action - has been completed. See the \c #AINotifierSuite. - */ -#define kAIFileFormatDocumentOpenedNotifier "AI File Format Document Opened Notifier" - -/** @ingroup Notifiers - If a notifier plug-in requests this type of notification, it - receives this selector when Illustrator cannot find a linked file - for the current document. - The notification data sent is of type \c #AILinkUpdateNotifyData. - */ -#define kAIFileFormatLinkUpdateNotifier "AI File Format Link Update Notifier" - - -/** These options specify the capabilities of a file format plug-in. - A subset of options are used with \c #AIFileFormatSuite::AddFileFormat() - to specify which operations are supported, and are also sent in the - \c #AIFileFormatMessage to indicate the requested action. - Additional options can be set in the Go selector message to provide - more information about the requested operation. - - @note The read, embed (import/place), and link operations - are very similar in execution. In all cases, Illustrator - creates an empty artwork and send the plug-in a message to - read the file into the artwork. Special handling is required - only if the plug-in needs to do different things depending - on the type of operation; for example the Photoshop file format - plug-in has options for preserving Photoshop's layers if it is - not linking. - */ -enum AIFileFormatOptions { - /** Read the file, creating artwork in a new document. - The format is included in the File > Open file types. - Use when adding a format. */ - kFileFormatRead = (1<<0), - /** Write the documents contents to a file - in a non-Illustrator format. - The format is included in the File > Export file types. - Use when adding a format. */ - kFileFormatExport = (1<<1), - /** Write the documents contents to a file - in a format from which is can be read back into - Illustrator without loss of data. - The format is included in the File > Save As file types. - Use when adding a format.*/ - kFileFormatWrite = (1<<9), - /** Read the file and embed artwork to the current document. - The format is included in the File > Import file types. - Use when adding a format.*/ - kFileFormatImportArt = (1<<2), - /** Read the file and embed artwork to the current document. - This is the same as \c #kFileFormatImportArt. - Use when adding a format.*/ - kFileFormatPlaceArt = (1<<3), - /** Allows "Template" to be checked in the Place dialog when - linking or embedding a file of this type, so the art is - placed in a template layer. - Use when adding a format.*/ - kFileFormatConvertTemplate = (1<<7), - /** Make a link from the contents of a file to an Illustrator - document. - Use when adding a format.*/ - kFileFormatLinkArt = (1<<8), - /** Not used. */ - kFileFormatImportStyles = (1<<4), - /** When reading, the plug-in sets the print record. See - \c #AIDocumentSuite::SetDocumentPrintRecord(). - Use when adding a format.*/ - kFileFormatSuppliesPrintRecordOption = (1<<5), - - /** Makes this the default format for all documents. If specified - by more than one plug-in, the last one becomes the default. - Use when adding a format.*/ - kFileFormatIsDefaultOption = (1<<6), - - /** The plug-in will not respond to the \c #kSelectorAICheckFileFormat - selector. (For example, the PhotoShop adapter plug-in always returns - \c #kNoErr.) - Use when adding a format.*/ - kFileFormatNoAutoCheckFormat = (1<<10), - /** Read the file, creating artwork in a new template layer in - the current document. - Not used for adding a format. */ - kFileFormatCreateTemplateLayer = (1<<11), - /** Handle the extended data passed in a Go message for a placement request - or in the Set Parameters message for additional options. - Use when adding a format.*/ - kFileFormatHasExtendedData = (1<<12), - - /** This file format supplies its own startup objects (colors, patterns, - and so on), Illustrator does not copy the startup file - Use when adding a format.*/ - kFileFormatSkipStartupObjectsOption = (1<<13), - - /** Disable warning dialogs upon read and write. - Not used for adding a format.*/ - kFileFormatNoWarningOption = (1<<14), - /** Write the current document to a copy of the file it was - loaded from. - Not used for adding a format. */ - kFileFormatSaveCopyOption = (1<<15), - - /** Write the contents of selected artwork in a document to a file - in a non-Illustrator format. - The format is included in the File > Export Selection file types. - Use when adding a format. */ - kFileFormatExportSelection = (1 << 16), - - /** Enables Batch Export mode which prevents certain actions like: - 1. Prevent individual file format plugins from showing File Replace Dialog. - 2. Prevent individual file format plugins to add exported files to Recent File Menu Items. - Not used when adding a format. */ - kFileFormatBatchExport = (1 << 17), - - /** Prevent a file format plugin from uniquifying file name. - Not used when adding a format. */ - kFileFormatSuppressPluginFileNameUniquify = (1 << 18), - - /** Prevents this file format from appearing in the file - selection menu of the Open, Place, Save and Export dialogs. - Use when adding a format. */ - kFileFormatSuppressUI = (1<<21), - /** Set in combination with \c #kFileFormatWrite for a - Save As operation, to distinguish it from Save. - Not used for adding a format. */ - kFileFormatWriteAs = (1<<22), - - /** Always receive the Check message, even for operations this plug-in - does not support. Allows an opportunity to explicitly reject operations - on files matching this plug-in's type. - Use when adding a format.*/ - kFileFormatCheckAlways = (1<<23), - - /** Handle additional parameters passed in \c #AIFileFormatMessage::actionParm. - These supplement the usual parameters of the file format, - and may not be complete. Can be used, for instance, for scripting or optimizing. - - If set in the Go message for a plug-in that does not handle the option, - you can ignore it. - Not used for adding a format. */ - kFileFormatContainsPartialParameters = (1<<24), - - /** Import only the SLO composite fonts. - Do not import artwork or other global objects, and - do not perform font fauxing. - Not used for adding a format.*/ - kFileFormatImportCompositeFonts = (1<<25), - - /** Treat the file as stationary--that is, open a copy with an Untitled name. - Use only in conjunction with \c #kFileFormatRead - Not used for adding a format. */ - kFileFormatOpenUntitledCopy = (1<<26), - - /** An option for the native (PGF) AI File Format Writer, - telling it to write out only the indicated palettes and the global objects, - directly or indirectly. Not used for adding a format. */ - kFileFormatWriteSwatchLibrary = (1<<27), - /** An option for the native (PGF) AI File Format Writer, - telling it to write out only the indicated palettes and the global objects, - directly or indirectly. Not used for adding a format. */ - kFileFormatWriteBrushLibrary = (1<<28), - /** An option for the native (PGF) AI File Format Writer, - telling it to write out only the indicated palettes and the global objects, - directly or indirectly. Not used for adding a format. */ - kFileFormatWriteStyleLibrary = (1<<29), - /** An option for the native (PGF) AI File Format Writer, - telling it to write out only the indicated palettes and the global objects, - directly or indirectly. Not used for adding a format. */ - kFileFormatWriteSymbolLibrary = (1<<30), - /** Write the documents contents to a file - in a format from which it can be read back into - Illustrator without loss of data. - The format should be added if this format can be saved - in touch workspace. - Use when adding a format.*/ - kFileFormatWriteInTouch = (1<<31) -}; - -/** Used internally to test for matches to any of the options - indicating that only specific palettes should be written. - */ -#define kFileFormatWritePalettesOnly (kFileFormatWriteSwatchLibrary|kFileFormatWriteBrushLibrary|kFileFormatWriteStyleLibrary|kFileFormatWriteSymbolLibrary) - - -/** Maximum length of the extension string in \c #PlatformAddFileFormatData. - */ -#define kFileFormatExtensionStrMaxLength 31 -/** Maximum length for each extension within the extension string in \c #PlatformAddFileFormatData. - */ -#define kFileFormatExtMaxLength 5 - -/** @ingroup Errors - Plug-in file format does not recognize the file type. Should be returned from - check-file-format if the file cannot be opened and read. - */ -#define kUnknownFormatErr 'FMT?' -/** @ingroup Errors - Plug-in file format recognizes the file type but explicitly disallows processing - it with the options specified. - */ -#define kInvalidFormatErr 'FMTi' - -/** @ingroup Errors - Plug-in file format could not complete the operation at current resolution, either - because the resolution is invalid or its too high. Trying at a lower resolution may - eliminate this error*/ - -#define kBadResolutionErr 'RES!' - -/** File format priorities, which determine the order in which Illustrator - searches through formats in deciding which one to use to open a file. - The first format found that handles a file type is used to open the file. - @see \c #AIFileFormatSuite::SetFileFormatPriority() - */ -enum AIFileFormatPriority { - /** Highest priority */ - kAIFileFormatPriorityNative = 10000, - /** Normal priority. This is the value assigned when a file format is added. */ - kAIFileFormatPriorityNormal = 0, - /** Lowest priority */ - kAIFileFormatPriorityLowest = -10000 -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a file format. Never dereferenced. - Use the functions in \c #AIFileFormatSuite to access it.*/ -typedef struct _t_AIFileFormatOpaque *AIFileFormatHandle; - - -/** Legacy structure for \c kAIFileFormatVersion4 */ -typedef struct PlatformAddFileFormatData4 { - ai::int32 type; - unsigned char *title; - ai::int32 titleOrder; -} PlatformAddFileFormatData4; - -/** Information needed to add a file format. - @see \c #PlatformAddFileFormatExData. */ -typedef struct PlatformAddFileFormatData { - /** The variable type is the 4 digit Macintosh file type identifier. Windows - plug-ins can ignore this. */ - ai::int32 type; - /** The Pascal-type string shown in the file type menu of - the Save As and Open dialog. */ - unsigned char* title; - /** The order of menu items if a plug-in adds multiple file formats. - Use 0 if the plug-in adds only one filter. */ - ai::int32 titleOrder; - /** A comma-delimited list of DOS-style extensions that - are filtered in the Open dialog, or appended to the file name in the - Saves As dialog. For example, \c "ai,eps". - - The list has a maximum of 31 characters, and each - extension has a maximum of 5 characters. */ - const char* extension; -} PlatformAddFileFormatData; - - -/** Information needed to add a file format. - Extends \c #PlatformAddFileFormatData by allowing a list of Mac OS file types. */ -typedef struct PlatformAddFileFormatExData { - /** Number of elements in \c typeList. */ - ai::int32 numTypes; - /** Address of list of Mac OS file types. */ - ai::int32* typeList; - /** The Pascal-type string shown in the file type menu of - the Save As and Open dialog. */ - unsigned char* title; - /** The order of menu items if a plug-in adds multiple file formats. - Use 0 if the plug-in adds only one filter. */ - ai::int32 titleOrder; - /** A comma-delimited list of DOS-style extensions that - are filtered in the Open dialog, or appended to the file name in the - Saves As dialog. For example, \c "ai,eps". - - The list has a maximum of 31 characters, and each - extension has a maximum of 5 characters. */ - const char* extension; -} PlatformAddFileFormatExData; - - -/** A Mac OS file creator/type pair */ -typedef struct AICreatorTypePair { - /** The file creator. */ - long creator; - /** The Mac OS file type */ - ai::int32 type; -} AICreatorTypePair; - - -//////////////////////////////////////////////////////////////// -// Extend File Format Message with -// usage-specific data type. -//////////////////////////////////////////////////////////////// - -/** Selector for extended file format datatype */ -enum eFFExtType { - /* No additional data required for this request */ - kFFExtNone, - /* This is a placement request, which requires additional data */ - kFFExtPlaceRequest, - /* This is a import/export request, where additional data is - provided by the client to customize the request */ - kFFExtAdditionalOptions -}; - -//////////////////////////////////////////////////////////////// -// Extended options of plug-ins -//////////////////////////////////////////////////////////////// -/** Extended options of various file formats*/ -enum AIFFExtendedOptions{ - /* No Extended options is supported*/ - kNoExtendedOptions= (0), - /* Save/Export of Multiple Artboards is supported */ - kSaveMultiArtboards= (1<<0), - /** Used internally to request app not to exit "Text Editing Mode" before calling this File format plugin for save/export. */ - kDoNotExitTextEditingModeOption = ( 1 << 1), - /** Read the file and embed artwork to the current document. - Use when adding a format, this option should be added - if this format can be placed in touch workspace.*/ - kFileFormatPlaceInTouch = (1<<2) -}; - - -/** The flags passed by the application to the plugins in the AIFileFormatMessage */ -enum eFFOperationOptions{ - /* Save/Export Multiple Artboards selected by the user*/ - kSaveMultiArtboardsSelected= (1<<0), -}; - -/** Union of extended file format datatypes. */ -union FileFormatExtUnion { - /** Additional options to be used during import/export. - Entries in the dictionary are file format specific. - Currently this is used only for SVG export. */ - AIDictionaryRef m_AdditionalOptionsDict; - /** Additional data needed for a placement request */ - AIPlaceRequestData *m_pPlaceRequestData; -}; - -/** Extended file format message data. */ -typedef struct FileFormatExtData { - /** The type of union. See \c #eFFExtType for valid values. */ - ai::int32 m_lExtType; - /** The placement data for a placement request */ - union FileFormatExtUnion m_unExt; - /** Constructor */ - FileFormatExtData() : m_lExtType(kFFExtNone) - { - m_unExt.m_AdditionalOptionsDict = NULL; - } -} FileFormatExtData; - -//////////////////////////////////////////////////////////////// -// File Format message structure. -//////////////////////////////////////////////////////////////// - -/** Message data sent by the file format selectors. */ -struct AIFileFormatMessage { - /** The message data */ - SPMessageData d; - /** The file format for which the message is intended. If your - plug-in handles more than one type, compare to the format handle - returned when the format was added. */ - AIFileFormatHandle fileFormat; - - public: - /** The requested operation (such as read or write). A logical OR of - \c #AIFileFormatOptions values. */ - ai::int32 option; - /** Additional information required for specific operation (currently - for placement and export). Used if the plug-in registered - the format as handling extended data (\c #kFileFormatHasExtendedData) */ - FileFormatExtData *m_pExtData; - /** A pointer to additional parameter data, if - \c #kFileFormatContainsPartialParameters is set in the \c option field. */ - void *actionParm; - - private: - /** The file to read, write or check. Get and set with public functions - \c #SetFilePath() and \c #GetFilePath(), - to maintain compatibility with deprecated file spec type. */ - ai::FilePath filePath; - - public: - /** Use this function to set the file path of the file to read, write, or check - (allows for deprecated file spec type). */ - void SetFilePath(const ai::FilePath &fp); - /** Use this function to retrieve the file path of the file to read, write, or check - (allows for deprecated file spec type). */ - const ai::FilePath &GetFilePath() const; - - public: - /** Requested save/export file types. Values \c # AIFFExtendedOptions */ - ai::int32 operationOptions; - /** Handle of the artboard range specified by the user */ - AIArtboardRangeHandle rangeHandle; - - public: - AIFileFormatMessage() : fileFormat(NULL), option(0), m_pExtData(NULL), - actionParm(NULL), operationOptions(kNoExtendedOptions), rangeHandle(NULL) - {} -}; - -/** Obsolete - linked raster art is now implemented as placed art. - Message structure for \c #kSelectorAIUpdateFileFormat. */ -struct AIUpdateFileFormatMessage { - /** The message data. */ - struct AIFileFormatMessage ffm; - /** The art object to be updated. */ - AIArtHandle art; - /** A pointer to the update data. Not used, always \c NULL. */ - void* data; -}; - - -//////////////////////////////////////////////////////////////// -// The following enum and struct can be used to convey -// information in conjunction with the Link Update -// Artwork Notifier. -//////////////////////////////////////////////////////////////// -/** The type of link update that triggered - the \c #kAIFileFormatLinkUpdateNotifier. */ -enum eLinkUpdateType { - /** Perform a normal update. Sent when illustrator detects that - a linked file inside an artboard has been updated by an external program. */ - kNormalUpdate, - /** The link that pointed to a missing file - was changed to point to a new file. */ - kLinkReplaced, - /** A link points to a missing file, and has not been - changed. */ - kMissingLinkIgnored -}; - -/** Notification data sent with the \c #kAIFileFormatLinkUpdateNotifier. */ -struct AILinkUpdateNotifyData { - /** The type of link update that occurred, an \c #eLinkUpdateType value. */ - ai::int32 m_iUpdateType; - /** A pointer to update parameters. Currently unused. */ - void *m_pvParam; -}; - -/** Document startup profile types, returned by - \c #AIDocumentSuite::GetDocumentStartupProfile() - and \c #AIFileFormatSuite::GetFileStartupProfileType().*/ -enum AIDocumentStartupProfile -{ - kAIStartupProfileUnknown = 0, - kAIStartupProfilePrint = 1, - kAIStartupProfileWeb, - kAIStartupProfileVideo, - /* Unused. Not returned. Use \c kAIStartupProfilePrint instead. */ - kAIStartupProfileCMYK, - /* Unused. Not returned. Use \c kAIStartupProfileWeb instead. */ - kAIStartupProfileRGB, - kAIStartupProfileMobile -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions for creating and managing file-format plug-ins, - which extend the number of file formats that Illustrator can read and write. - - Reading a format can be transparent to the user; when a file of the - defined type is selected in the Open dialog, your file format plug-in - creates artwork in the Illustrator document. If there is a plug-in that writes - a file format, that format appears in the Save As dialog as an option for the user - to select. If it is selected, the plug-in walks the artwork tree and writes out - information on the artwork in the appropriate manner. If your plug-in needs more - parameters for either reading or writing, it defines a modal dialog to interact - with the user. - - Plug-ins tell Illustrator about the file formats they - support by specifying platform file information: the type (such as \c 'ART3') - in Mac OS, or the extension (such as \c '.AI') in Windows. Plug-ins also indicate - what read/write capabilities they support. - - One plug-in can register multiple formats. Illustrator handles some parts of the - file I/O process, and the plug-in does the rest. - - A file-format plug-in receives message actions telling it to: - - \li Check if a file can be read, The Check selector is sent only to plug-ins - that can read files. It extends the simple type checking done by the Open dialog. - \li Ask for parameters. This selector can be ignored if the plug-in does not need - user input. - \li Go. In response, your plug-in executes the read or write operation. - - If a file format plug-in can read, files of its registered file type appear - in the file list of the Open dialog. In addition to screening by file type, - Illustrator sends a selector giving a plug-in a chance to check that the - file can be read. This is useful in the case of text files or files from a - different file system. If more than one format matches the type, Illustrator - determines which plug-in should actually open the file, asking the user if necessary. - - If a file format plug-in supports both reading and writing, when reading it should - store any information about the file needed to write the file back to disk. It can - store data (for example, the pixel depth of an EPS preview) in the plug-ins globals, - or in a parameter block. The reference to a block should be attached to the document - using \c #AIDocumentSuite::SetDocumentFileFormatParameters(). Illustrator keeps this - parameter-block reference with the document. The plug-in can retrieve it when the - document is being saved. - - When the user does a Save, by default Illustrator uses the same file format that was - used to read the file. If the file format does not support writing, the Save As - dialog appears to let the user choose the save format. All file format plug-ins - that support saving appear in the format menu of this dialog. - - If you need information from the user to open or save a file, you can present a - dialog when the ask-for-parameters message is received. When saving files, this - will be after the Save As dialog has appeared. Your plug-in should save the - information it collects, keeping it with the document to use for later saves. - - When the go message is received, file formats that read files typically parse - the input file and create Illustrator artwork using API calls. File formats for - saving Illustrator artwork traverse the artwork database and write out all - pertinent information. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIFileFormatSuite and \c #kAIFileFormatVersion. - -*/ -struct AIFileFormatSuite { - - /** Adds a file format to the standard file dialog. - Call during startup to install a plug-in file format. - @param self A reference to this plug-in, which adds the format. - @param name The unique name of the new file format. You can use - your company name with a descriptor to make it unique. - Not displayed or localized. - @param data Information about the file format. - @param options File format operations that this plug-in supports. - A logical OR of these \c #AIFileFormatOptions values: - \verbatim -kFileFormatRead -kFileFormatImportArt -kFileFormatExport -kFileFormatExportSelection -kFileFormatPlaceArt -kFileFormatImportStyles -kFileFormatSuppliesPrintRecordOption -kFileFormatIsDefaultOption -kFileFormatConvertTemplate -kFileFormatLinkArt -kFileFormatWrite -kFileFormatNoAutoCheckFormat -kFileFormatSkipStartupObjectsOption -kFileFormatHasExtendedData -kFileFormatSuppressUI -kFileFormatCheckAlways -\endverbatim - @param fileFormat [out] A buffer in which to return the handle of - the new plug-in file format. If you install multiple file formats, - store this reference in the plug-ins \c globals record, so that your - plug-in can use it to determine which file format command is to be processed. - @param extendedOptions File format extended operations that this plug-in supports. A logical OR of these \c #AIFFExtendedOptions values: - \verbatim - kNoExtendedOptions - kSaveMultiArtboards - kFileFormatPlaceInTouch - \endverbatim - - - @see \c #AddFileFormatEx() - */ - AIAPI AIErr (*AddFileFormat) ( SPPluginRef self, const char *name, - PlatformAddFileFormatData *data, ai::int32 options, AIFileFormatHandle *fileFormat , ai::int32 extendedOptions); - - /** Retrieves the name of a file format. - @param fileFormat The file format. - @param name [out] A buffer in which to return the name string, as - passed to \c #AddFileFormat(). Do not modify this string. - */ - AIAPI AIErr (*GetFileFormatName) ( AIFileFormatHandle fileFormat, char **name ); - - /** Retrieves the option flags of a file format. - @param fileFormat The file format. - @param options [out] A buffer in which to return the options, a logical OR of - \c #AIFileFormatOptions values - */ - AIAPI AIErr (*GetFileFormatOptions) ( AIFileFormatHandle fileFormat, ai::int32 *options ); - - /** Sets the option flags of a file format, which specify what file operations can be handled. - @param fileFormat The file format. - @param options The options, a logical OR of \c #AIFileFormatOptions values - */ - AIAPI AIErr (*SetFileFormatOptions) ( AIFileFormatHandle fileFormat, ai::int32 options ); - - /** Retrieves a reference to the plug-in that installed a file format, - to be passed to \c #AIPluginSuite functions. - @param fileFormat The file format. - @param plugin [out] A buffer in which to return the plug-in reference. - */ - AIAPI AIErr (*GetFileFormatPlugin) ( AIFileFormatHandle fileFormat, - SPPluginRef *plugin ); - - /** Gets the number of installed plug-in file formats. - Use with \c #GetNthFileFormat() to iterate through all plug-in formats. - @param count [out] A buffer in which to return the number of formats. - */ - AIAPI AIErr (*CountFileFormats) ( ai::int32 *count ); - - /** Retrieves a plug-in file format reference by position index. - Use with \c #CountFileFormats() to iterate through all installed formats. - @param n The index, in the range [1..numFormats]. - @param fileFormat [out] A buffer in which to return the file format reference. - - */ - AIAPI AIErr (*GetNthFileFormat) ( ai::int32 n, AIFileFormatHandle *fileFormat ); - - /** Retrieves the file extension for a plug-in file format. - @param fileFormat The file format. - @param extension [out] A buffer in which to return the file extension string. - */ - AIAPI AIErr (*GetFileFormatExtension) ( AIFileFormatHandle fileFormat, char *extension ); - - /** Adds a plug-in file format. This extended version allows you to specify - a list of Mac OS file types. Call during startup to install a plug-in file format. - @param self A reference to this plug-in, which adds the format. - @param name The unique name of the new file format. You can use - your company name with a descriptor to make it unique. - Not displayed or localized. - @param dataEx Information about the file format. This extended version - uses a data structure with additional fields that allow you to - specify a list of Mac OS file types. Use \c #SetFileFormatFilter() - to specify a creator/type pair as the file filter. - @param options File format operations that this plug-in supports. - A logical OR of \c #AIFileFormatOptions values. - When the format is called with a Go selector, - one of these flags is set in the \c option field to indicate the - requested operation. - @param fileFormat [out] A buffer in which to return the handle of - the new plug-in file format. If you install multiple file formats, - store this reference in the plug-ins \c globals record, so that your - plug-in can use it to determine which file format command is to be processed. - @param extendedOptions File format extended operations that this plug-in supports. A logical OR of these \c #AIFFExtendedOptions values: - \verbatim - kNoExtendedOptions - kSaveMultiArtboards - kFileFormatPlaceInTouch - \endverbatim - - @see \c #AddFileFormat(), \c #SetFileFormatFilter() - */ - AIAPI AIErr (*AddFileFormatEx) ( SPPluginRef self, const char *name, - PlatformAddFileFormatExData *dataEx, ai::int32 options, AIFileFormatHandle *fileFormat, ai::int32 extendedOptions ); - - /** Retrieves the localizable display name of a plug-in file format. - @param fileFormat The file format. - @param szTitle [out] A buffer in which to return the display name. - */ - AIAPI AIErr (*GetFileFormatTitle) ( AIFileFormatHandle fileFormat, char *szTitle ); - - /** Retrieves the Mac OS file types for a plug-in file format. - @param fileFormat The file format. - @param maxNumTypes [in, out] A buffer in which to specify the maximum number - and return the actual number of values in \c typeList. - @param typeList [out] A buffer in which to return the 4-character Mac OS type codes. - @see \c #GetFileFormatCreatorType() to get the full Mac OS file information. - */ - AIAPI AIErr (*GetFileFormatType) ( AIFileFormatHandle fileFormat, ai::int32 *maxNumTypes, ai::int32 *typeList ); - - /** Associates a file format with a file type filter. File types are specified by (creator, type) - pairs in Mac OS, and by filename extensions in Windows. - @note This function extends the \c #AddFileFormat() and \c #AddFileFormatEx() functions - by allowing filters based on (creator, type) pairs in Mac OS, rather than simple type values. - @param fileFormat The file format. - @param numPairs In Mac OS, the number of (creator, type) pairs specified in \c pairList. - Ignored in Windows. - @param pairList In Mac OS, a pointer to an array of (creator, type) pairs. These can use - the Mac OS wild-card value '****' for creator or type. Ignored in Windows. - @param extensions In Windows, a comma-delimited list of DOS-style extensions that - are filtered in the Open dialog, or appended to the file name in the - Saves As dialog. For example, \c "ai,eps". - */ - AIAPI AIErr (*SetFileFormatFilter) ( AIFileFormatHandle fileFormat, ai::int32 numPairs, AICreatorTypePair *pairList, const char* extensions ); - - /** Retrieves the file type filter for a file format, as specified by (creator, type) - pairs for Mac OS. - @param fileFormat The file format. - @param maxNumTypes [in, out] A buffer in which to specify the maximum number - and return the actual number of (creator, type) pairs specified in \c pairList. - @param pairList [out] A buffer in which to return the array of (creator, type) pairs. - */ - AIAPI AIErr (*GetFileFormatCreatorType) ( AIFileFormatHandle fileFormat, ai::int32 *maxNumPairs, AICreatorTypePair *pairList ); - - /** Invokes the File > Save dialog, allowing you to filter the available file formats. - @param options Limits available file formats to those that support these - write operations. A logical OR of write operation constants:
- \c #kFileFormatExport<
- \c #kFileFormatWrite - @param dlgTitle The title for the Save dialog. - @param fileSpec [in, out] A buffer in which to pass the initial file specification - and return the user-chosen specification. - @param fileFormat [out] A buffer in which to return the user-chosen file format. - @param good [out] A buffer in which to return true if the user clicked Save, - or false if the user clicked Cancel. - */ - AIAPI AIErr (*PutFile) (ai::int32 options, const unsigned char *dlgTitle, ai::FilePath &fileSpec, AIFileFormatHandle *fileFormat, AIBoolean *good ); - - /** Sets the priority of a file format. which determines the order in which Illustrator - searches through formats in deciding which one to use to open a file. The first format - found that handles a file type is used to open the file. - @param fileFormat The file format. - @param priority The new priority, an \c #AIFileFormatPriority value, - */ - AIAPI AIErr (*SetFileFormatPriority) ( AIFileFormatHandle fileFormat, ai::int32 priority ); - - /** Finds all plug-in file formats that can perform a specified operation for a file. - @param options The operation, a \c #AIFileFormatOptions value. - @param file The file. - @param maxMatches The maximum number of formats to return. - @param matchingFormats [out] An array of size \c maxMatches in which to return the matching file formats. - @param numMatches [out] A buffer in which to return the number of matching file formats found. - */ - AIAPI AIErr (*FindMatchingFileFormats) ( ai::int32 options, const ai::FilePath &file, ai::int32 maxMatches, AIFileFormatHandle matchingFormats[], ai::int32* numMatches ); - - /** Obsolete */ - AIAPI AIErr (*ResolveImportConflicts) (); - - /** Reports the version of Illustrator in which a raster file - format, for example the JPEG file format plug-in, was converted from - using raster art to using placed art in order to perform a place link - operation. The information is needed so that Illustrator knows when it - should convert placed linked art back to raster art when saving to a - legacy file format. For example, if the JPEG file format used raster art - in version 10 and started using placed art in version 11 then - Illustrator must convert placed linked JPEG images back to raster art - when saving to a version 10 or earlier Illustrator file. - (Note that this function returns a version value, not an error code.) - @param fileFormat The file format. - @return The Illustrator version. The default version is 0, - meaning that placed objects are not converted on export. - @see \c #SetFirstVersionUsingPlacedArt() to set the version. - */ - AIAPI AIVersion (*GetFirstVersionUsingPlacedArt) (AIFileFormatHandle fileFormat); - - /** Sets the version of Illustrator in which a raster file - format was converted from using raster art to using placed art - in order to perform a place link operation. - @param fileFormat The file format. - @param The Illustrator version value. The default version is 0, - meaning that placed objects are not converted on export. - @see \c #GetFirstVersionUsingPlacedArt(). - */ - AIAPI AIErr (*SetFirstVersionUsingPlacedArt) (AIFileFormatHandle fileFormat, AIVersion version); - - /** Retrieves the Illustrator startup profile type from the XMP metadata embedded in a file. - @param file The file path. - @param docStartupProfile [out] A buffer in which to return the Illustrator - startup profile constant. If the information is not in the metadata, - or if the file does not contain XMP metadata, this is \c #kAIStartupProfileUnknown. - @return The error \c #kBadParameterErr if file is empty or does not exist. - */ - AIAPI AIErr (*GetFileStartupProfileType) (const ai::FilePath &file, AIDocumentStartupProfile *docStartupProfile); - - /** Retrieves the Illustrator default document profile from the startup-profile type. - @param docStartupProfile The startup profile type. - @param profile [out] A buffer in which to return the file-path object for the default document profile. - @return The error \c #kCantHappenErr if the file does not exists.
- The error \c #kBadParameterErr if the startup profile is invalid, - */ - AIAPI AIErr (*GetStartupFileOfType) (const AIDocumentStartupProfile docStartupProfile, ai::FilePath &profile); - - /** Retrieves the extended option flags of a file format. - @param fileFormat The file format. - @param extendedOptions [out] A buffer in which to return the extended options - \c #AIFFExtendedOptions values - \verbatim - kNoExtendedOptions - kSaveMultiArtboards - kFileFormatPlaceInTouch - \endverbatim - */ - AIAPI AIErr (*GetFileFormatExtendedOptions) ( AIFileFormatHandle fileFormat, ai::int32 *extendedOptions ); - - /** Sets the extended option flags of a file format, which specify what file operations can be handled. - @param fileFormat The file format. - @param extendedOptions File format operations that this plug-in supports. A logical OR of these - \c #AIFFExtendedOptions values: - \verbatim - kNoExtendedOptions - kSaveMultiArtboards - kFileFormatPlaceInTouch - \endverbatim - */ - AIAPI AIErr (*SetFileFormatExtendedOptions) ( AIFileFormatHandle fileFormat, ai::int32 extendedOptions); - - /** Used for exporting the current document as one whole file or as multiple artBoards - @param actionParam An action parameter block containing keys "name", "frmt", "ext", "smab", "sall", "sran" as defined in AIDocumentAction.h - Will return error (and not throw a dialog) if the above action keys are missing. - */ - AIAPI AIErr(*GoExport) (AIActionParamValueRef actionParam); -} ; - - -/** @deprecated. Obsolete platform-specific functions. Use functions in \c #AIFileFormatSuite. */ -typedef struct { - - AIAPI AIErr (*MacXGetFileFormatTitle) ( AIFileFormatHandle fileFormat, unsigned char *title ); - AIAPI AIErr (*MacXSetFileFormatTitle) ( AIFileFormatHandle fileFormat, const unsigned char *title ); - AIAPI AIErr (*MacXGetFileFormatType) ( AIFileFormatHandle fileFormat, ai::int32 *type ); - AIAPI AIErr (*MacXSetFileFormatType) ( AIFileFormatHandle fileFormat, ai::int32 type ); - -} AIMacFileFormatSuite; - - -#include "AIHeaderEnd.h" - -/******************************************************************************* - ** - ** Inline members - ** - **/ -inline void AIFileFormatMessage::SetFilePath(const ai::FilePath &fp) -{ - filePath = fp; -} - -inline const ai::FilePath &AIFileFormatMessage::GetFilePath() const -{ - return filePath; -} - -#endif +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 1986 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#ifndef __AIFileFormat__ +#define __AIFileFormat__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIPlaced__ +#include "AIPlaced.h" +#endif + +#include "AIEntry.h" + +#include "IAIFilePath.hpp" +#include "AIArtboardRange.h" +#include "AIActionManager.h" + +#include "AIHeaderBegin.h" + + + +/** @file AIFileFormat.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ +#define kAIFileFormatSuite "AI File Format Suite" +#define kAIFileFormatSuiteVersion15 AIAPI_VERSION(15) // From AI 23.1 +#define kAIFileFormatSuiteVersion kAIFileFormatSuiteVersion15 +#define kAIFileFormatVersion kAIFileFormatSuiteVersion + + +#define kAIMacFileFormatSuite "AI Mac File Format Suite" +#define kAIMacFileFormatSuiteVersion AIAPI_VERSION(5) +#define kAIMacFileFormatVersion kAIMacFileFormatSuiteVersion + + +/** @ingroup Callers + The file format caller. See \c #AIFileFormatSuite. + */ +#define kCallerAIFileFormat "AI File Format" + +/** @ingroup Selectors + Sent to file format plug-ins to allow the plug-in to show any dialogs necessary + to gather parameters. + \li When reading a file this is sent after \c #kSelectorAICheckFileFormat. + \li Whether reading or writing it is sent before \c #kSelectorAIGoFileFormat. + + Not always sent; for example, when re-saving a document with the Save command, + only the Go message is sent. In this case, the operation uses the parameters + from the last time the document was saved. + + The data is an \c #AIFileFormatMessage. + */ +#define kSelectorAIGetFileFormatParameters "AI Get Parameters" + +/** @ingroup Selectors + Sent to file format plug-ins to allow the plug-in to customize import/export + based on client provided options. + \li Currently this is not sent during reading a file. + \li When writing it is sent before \c #kSelectorAIGetFileFormatParameters. + + This is only sent if the client has provided some options to customize + import/export and the plugin had registered the file format with the + \c #kFileFormatHasExtendedData option. + + The data is an \c #AIFileFormatMessage. + */ +#define kSelectorAISetFileFormatParameters "AI Set Parameters" + +/** @ingroup Selectors + Sent to file format plug-ins to execute the read or write operation. + \li A read operation creates art according to what is in the specified file + \li A write operation scans the artwork database and writes out appropriately + formatted information. + + The data is an \c #AIFileFormatMessage. + */ +#define kSelectorAIGoFileFormat "AI Go" + +/** @ingroup Selectors + Sent to file format plug-ins after the user has selected a file, + to allow a reader to open the file and check for header + information in order to verify that it can be opened. If your plug-in cannot + read the specified file, it should return \c #kUnknownFormatErr. + + The data is an \c #AIFileFormatMessage. + */ +#define kSelectorAICheckFileFormat "AI Check" + +/** @ingroup Selectors + Obsolete. Linked raster art is now implemented as placed art. + Sent to file format plug-ins to request an update for a linked object in + the document. The data is an \c #AIUpdateFileFormatMessage. + @note Handle this or the legacy versions, \c kAI110SelectorAIUpdateFileFormat, + kAI130SelectorAIUpdateFileFormat, + not both. + */ +#define kSelectorAIUpdateFileFormat "AI Update AI140" + +/** @ingroup Notifiers + If a notifier plug-in requests this type of notification, it + receives this selector when any open-file action + has been completed. See the \c #AINotifierSuite. + */ +#define kAIFileFormatDocumentOpenedNotifier "AI File Format Document Opened Notifier" + +/** @ingroup Notifiers + If a notifier plug-in requests this type of notification, it + receives this selector when Illustrator cannot find a linked file + for the current document. + The notification data sent is of type \c #AILinkUpdateNotifyData. + */ +#define kAIFileFormatLinkUpdateNotifier "AI File Format Link Update Notifier" + + +/** These options specify the capabilities of a file format plug-in. + A subset of options are used with \c #AIFileFormatSuite::AddFileFormat() + to specify which operations are supported, and are also sent in the + \c #AIFileFormatMessage to indicate the requested action. + Additional options can be set in the Go selector message to provide + more information about the requested operation. + + @note The read, embed (import/place), and link operations + are very similar in execution. In all cases, Illustrator + creates an empty artwork and send the plug-in a message to + read the file into the artwork. Special handling is required + only if the plug-in needs to do different things depending + on the type of operation; for example the Photoshop file format + plug-in has options for preserving Photoshop's layers if it is + not linking. + */ +enum AIFileFormatOptions { + /** Read the file, creating artwork in a new document. + The format is included in the File > Open file types. + Use when adding a format. */ + kFileFormatRead = (1 << 0), + + /** Write the documents contents to a file + in a non-Illustrator format. + The format is included in the File > Export file types. + Use when adding a format. */ + kFileFormatExport = (1 << 1), + + /** Read the file and embed artwork to the current document. + The format is included in the File > Import file types. + Use when adding a format.*/ + kFileFormatImportArt = (1 << 2), + + /** Read the file and embed artwork to the current document. + This is the same as \c #kFileFormatImportArt. + Use when adding a format.*/ + kFileFormatPlaceArt = (1 << 3), + + /** Not used. */ + kFileFormatImportStyles = (1 << 4), + + /** When reading, the plug-in sets the print record. See + \c #AIDocumentSuite::SetDocumentPrintRecord(). + Use when adding a format.*/ + kFileFormatSuppliesPrintRecordOption = (1 << 5), + + /** Makes this the default format for all documents. If specified + by more than one plug-in, the last one becomes the default. + Use when adding a format.*/ + kFileFormatIsDefaultOption = (1 << 6), + + /** Allows "Template" to be checked in the Place dialog when + linking or embedding a file of this type, so the art is + placed in a template layer. + Use when adding a format.*/ + kFileFormatConvertTemplate = (1 << 7), + + /** Make a link from the contents of a file to an Illustrator + document. + Use when adding a format.*/ + kFileFormatLinkArt = (1 << 8), + + /** Write the documents contents to a file + in a format from which is can be read back into + Illustrator without loss of data. + The format is included in the File > Save As file types. + Use when adding a format.*/ + kFileFormatWrite = (1 << 9), + + /** The plug-in will not respond to the \c #kSelectorAICheckFileFormat + selector. (For example, the PhotoShop adapter plug-in always returns + \c #kNoErr.) + Use when adding a format.*/ + kFileFormatNoAutoCheckFormat = (1 << 10), + + /** Read the file, creating artwork in a new template layer in + the current document. + Not used for adding a format. */ + kFileFormatCreateTemplateLayer = (1 << 11), + + /** Handle the extended data passed in a Go message for a placement request + or in the Set Parameters message for additional options. + Use when adding a format.*/ + kFileFormatHasExtendedData = (1 << 12), + + /** This file format supplies its own startup objects (colors, patterns, + and so on), Illustrator does not copy the startup file + Use when adding a format.*/ + kFileFormatSkipStartupObjectsOption = (1 << 13), + + /** Disable warning dialogs upon read and write. + Not used for adding a format.*/ + kFileFormatNoWarningOption = (1 << 14), + + /** Write the current document to a copy of the file it was + loaded from. + Not used for adding a format. */ + kFileFormatSaveCopyOption = (1 << 15), + + /** Write the contents of selected artwork in a document to a file + in a non-Illustrator format. + The format is included in the File > Export Selection file types. + Use when adding a format. */ + kFileFormatExportSelection = (1 << 16), + + /** Enables Batch Export mode which prevents certain actions like: + 1. Prevent individual file format plugins from showing File Replace Dialog. + 2. Prevent individual file format plugins to add exported files to Recent File Menu Items. + Not used when adding a format. */ + kFileFormatBatchExport = (1 << 17), + + /** Prevent a file format plugin from uniquifying file name. + Not used when adding a format. */ + kFileFormatSuppressPluginFileNameUniquify = (1 << 18), + + /** Optimize Save on network locations by first saving the file to a local scratch disk + and then copying this saved file to network. + Note: During the file save and export, if the format saves some additional files along with the main file, + this flag should not be used. This is because the format plugins will have a path to the + local disk location, which will be different from the final network location. + Use when adding a format. + */ + kFileFormatOptimizeNetworkOperation = (1 << 19), + + /* Enables save of AI file in background if possible */ + + kFileFormatSaveInBackground = (1 << 20), + + /** Prevents this file format from appearing in the file + selection menu of the Open, Place, Save and Export dialogs. + Use when adding a format. */ + kFileFormatSuppressUI = (1 << 21), + + /** Set in combination with \c #kFileFormatWrite for a + Save As operation, to distinguish it from Save. + Not used for adding a format. */ + kFileFormatWriteAs = (1 << 22), + + /** Always receive the Check message, even for operations this plug-in + does not support. Allows an opportunity to explicitly reject operations + on files matching this plug-in's type. + Use when adding a format.*/ + kFileFormatCheckAlways = (1 << 23), + + /** Handle additional parameters passed in \c #AIFileFormatMessage::actionParm. + These supplement the usual parameters of the file format, + and may not be complete. Can be used, for instance, for scripting or optimizing. + + If set in the Go message for a plug-in that does not handle the option, + you can ignore it. + Not used for adding a format. */ + kFileFormatContainsPartialParameters = (1 << 24), + + /** Import only the SLO composite fonts. + Do not import artwork or other global objects, and + do not perform font fauxing. + Not used for adding a format.*/ + kFileFormatImportCompositeFonts = (1 << 25), + + /** Treat the file as stationary--that is, open a copy with an Untitled name. + Use only in conjunction with \c #kFileFormatRead + Not used for adding a format. */ + kFileFormatOpenUntitledCopy = (1 << 26), + + /** An option for the native (PGF) AI File Format Writer, + telling it to write out only the indicated palettes and the global objects, + directly or indirectly. Not used for adding a format. */ + kFileFormatWriteSwatchLibrary = (1 << 27), + + /** An option for the native (PGF) AI File Format Writer, + telling it to write out only the indicated palettes and the global objects, + directly or indirectly. Not used for adding a format. */ + kFileFormatWriteBrushLibrary = (1 << 28), + + /** An option for the native (PGF) AI File Format Writer, + telling it to write out only the indicated palettes and the global objects, + directly or indirectly. Not used for adding a format. */ + kFileFormatWriteStyleLibrary = (1 << 29), + + /** An option for the native (PGF) AI File Format Writer, + telling it to write out only the indicated palettes and the global objects, + directly or indirectly. Not used for adding a format. */ + kFileFormatWriteSymbolLibrary = (1 << 30), + + /** Write the documents contents to a file + in a format from which it can be read back into + Illustrator without loss of data. + The format should be added if this format can be saved + in touch workspace. + Use when adding a format.*/ + kFileFormatWriteInTouch = (1 << 31) +}; + +/** Used internally to test for matches to any of the options + indicating that only specific palettes should be written. + */ +#define kFileFormatWritePalettesOnly (kFileFormatWriteSwatchLibrary|kFileFormatWriteBrushLibrary|kFileFormatWriteStyleLibrary|kFileFormatWriteSymbolLibrary) + + +/** Maximum length of the extension string in \c #PlatformAddFileFormatData. + */ +#define kFileFormatExtensionStrMaxLength 31 +/** Maximum length for each extension within the extension string in \c #PlatformAddFileFormatData. + */ +#define kFileFormatExtMaxLength 5 + +/** @ingroup Errors + Plug-in file format does not recognize the file type. Should be returned from + check-file-format if the file cannot be opened and read. + */ +#define kUnknownFormatErr 'FMT?' +/** @ingroup Errors + Plug-in file format recognizes the file type but explicitly disallows processing + it with the options specified. + */ +#define kInvalidFormatErr 'FMTi' + +/** @ingroup Errors + Plug-in file format could not complete the operation at current resolution, either + because the resolution is invalid or its too high. Trying at a lower resolution may + eliminate this error*/ +#define kBadResolutionErr 'RES!' + +/** @ingroup Errors + Optimized Save or export could not be completed because of an error in the file format plug-in. + The save or export operation will be retried directly on the network. +*/ +#define kOptimizedNetworkSaveFailedErr 'ONSF' + +/** File format priorities, which determine the order in which Illustrator + searches through formats in deciding which one to use to open a file. + The first format found that handles a file type is used to open the file. + @see \c #AIFileFormatSuite::SetFileFormatPriority() + */ +enum AIFileFormatPriority { + /** Highest priority */ + kAIFileFormatPriorityNative = 10000, + /** Normal priority. This is the value assigned when a file format is added. */ + kAIFileFormatPriorityNormal = 0, + /** Lowest priority */ + kAIFileFormatPriorityLowest = -10000 +}; + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a file format. Never dereferenced. + Use the functions in \c #AIFileFormatSuite to access it.*/ +typedef struct _t_AIFileFormatOpaque *AIFileFormatHandle; + + +/** Legacy structure for \c kAIFileFormatVersion4 */ +typedef struct PlatformAddFileFormatData4 { + ai::int32 type; + unsigned char *title; + ai::int32 titleOrder; +} PlatformAddFileFormatData4; + +/** Information needed to add a file format. + @see \c #PlatformAddFileFormatExData. */ +typedef struct PlatformAddFileFormatData { + /** The variable type is the 4 digit Macintosh file type identifier. Windows + plug-ins can ignore this. */ + ai::int32 type; + /** The Pascal-type string shown in the file type menu of + the Save As and Open dialog. */ + ai::UnicodeString title; + /** The order of menu items if a plug-in adds multiple file formats. + Use 0 if the plug-in adds only one filter. */ + ai::int32 titleOrder; + /** A comma-delimited list of DOS-style extensions that + are filtered in the Open dialog, or appended to the file name in the + Saves As dialog. For example, \c "ai,eps". + + The list has a maximum of 31 characters, and each + extension has a maximum of 5 characters. */ + ai::UnicodeString extension; +} PlatformAddFileFormatData; + + +/** Information needed to add a file format. + Extends \c #PlatformAddFileFormatData by allowing a list of Mac OS file types. */ +typedef struct PlatformAddFileFormatExData { + /** Number of elements in \c typeList. */ + ai::int32 numTypes; + /** Address of list of Mac OS file types. */ + ai::int32* typeList; + /** The Pascal-type string shown in the file type menu of + the Save As and Open dialog. */ + ai::UnicodeString title; + /** The order of menu items if a plug-in adds multiple file formats. + Use 0 if the plug-in adds only one filter. */ + ai::int32 titleOrder; + /** A comma-delimited list of DOS-style extensions that + are filtered in the Open dialog, or appended to the file name in the + Saves As dialog. For example, \c "ai,eps". + + The list has a maximum of 31 characters, and each + extension has a maximum of 5 characters. */ + ai::UnicodeString extension; +} PlatformAddFileFormatExData; + + +/** A Mac OS file creator/type pair */ +typedef struct AICreatorTypePair { + /** The file creator. */ + long creator; + /** The Mac OS file type */ + ai::int32 type; +} AICreatorTypePair; + + +//////////////////////////////////////////////////////////////// +// Extend File Format Message with +// usage-specific data type. +//////////////////////////////////////////////////////////////// + +/** Selector for extended file format datatype */ +enum eFFExtType { + /* No additional data required for this request */ + kFFExtNone, + /* This is a placement request, which requires additional data */ + kFFExtPlaceRequest, + /* This is a import/export request, where additional data is + provided by the client to customize the request */ + kFFExtAdditionalOptions +}; + +//////////////////////////////////////////////////////////////// +// Extended options of plug-ins +//////////////////////////////////////////////////////////////// +/** Extended options of various file formats*/ +enum AIFFExtendedOptions{ + /* No Extended options is supported*/ + kNoExtendedOptions= (0), + /* Save/Export of Multiple Artboards is supported */ + kSaveMultiArtboards= (1<<0), + /** Used internally to request app not to exit "Text Editing Mode" before calling this File format plugin for save/export. */ + kDoNotExitTextEditingModeOption = ( 1 << 1), + /** Read the file and embed artwork to the current document. + Use when adding a format, this option should be added + if this format can be placed in touch workspace.*/ + kFileFormatPlaceInTouch = (1<<2), + /** On placing the content on the scaled document, if this flag won't be set, content will be scaled by the scale factor of the document.*/ + kDoNotHonourDocumentScaleOnPlace = (1<<3), + /*This is a export request, primarily for a format which can be + exported in a large Canvas document i.e, with document scale as 10x + Large Canvas is supported*/ + kFileFormatSupportsLargeCanvas = (1 << 4) +}; + + +/** The flags passed by the application to the plugins in the AIFileFormatMessage */ +enum eFFOperationOptions{ + /* Save/Export Multiple Artboards selected by the user*/ + kSaveMultiArtboardsSelected= (1<<0), +}; + +/** Union of extended file format datatypes. */ +union FileFormatExtUnion { + /** Additional options to be used during import/export. + Entries in the dictionary are file format specific. + Currently this is used for AI save and SVG export. */ + AIDictionaryRef m_AdditionalOptionsDict; + /** Additional data needed for a placement request */ + AIPlaceRequestData *m_pPlaceRequestData; +}; + +/** Extended file format message data. */ +typedef struct FileFormatExtData { + /** The type of union. See \c #eFFExtType for valid values. */ + ai::int32 m_lExtType; + /** The placement data for a placement request */ + + union FileFormatExtUnion m_unExt; + /** Constructor */ + FileFormatExtData() : m_lExtType(kFFExtNone) + { + m_unExt.m_AdditionalOptionsDict = NULL; + } +} FileFormatExtData; + +//////////////////////////////////////////////////////////////// +// File Format message structure. +//////////////////////////////////////////////////////////////// + +/** Message data sent by the file format selectors. */ +struct AIFileFormatMessage { + /** The message data */ + SPMessageData d; + /** The file format for which the message is intended. If your + plug-in handles more than one type, compare to the format handle + returned when the format was added. */ + AIFileFormatHandle fileFormat; + + public: + /** The requested operation (such as read or write). A logical OR of + \c #AIFileFormatOptions values. */ + ai::int32 option; + /** Additional information required for specific operation (currently + for placement and export). Used if the plug-in registered + the format as handling extended data (\c #kFileFormatHasExtendedData) */ + FileFormatExtData *m_pExtData; + /** A pointer to additional parameter data, if + \c #kFileFormatContainsPartialParameters is set in the \c option field. */ + void *actionParm; + + private: + /** The file to read, write or check. Get and set with public functions + \c #SetFilePath() and \c #GetFilePath(), + to maintain compatibility with deprecated file spec type. */ + ai::FilePath filePath; + + public: + /** Use this function to set the file path of the file to read, write, or check + (allows for deprecated file spec type). */ + void SetFilePath(const ai::FilePath &fp); + /** Use this function to retrieve the file path of the file to read, write, or check + (allows for deprecated file spec type). */ + const ai::FilePath &GetFilePath() const; + + public: + /** Requested save/export file types. Values \c # AIFFExtendedOptions */ + ai::int32 operationOptions; + /** Handle of the artboard range specified by the user */ + AIArtboardRangeHandle rangeHandle; + + public: + AIFileFormatMessage() : fileFormat(NULL), option(0), m_pExtData(NULL), + actionParm(NULL), operationOptions(kNoExtendedOptions), rangeHandle(NULL) + {} +}; + +/** Obsolete - linked raster art is now implemented as placed art. + Message structure for \c #kSelectorAIUpdateFileFormat. */ +struct AIUpdateFileFormatMessage { + /** The message data. */ + struct AIFileFormatMessage ffm; + /** The art object to be updated. */ + AIArtHandle art; + /** A pointer to the update data. Not used, always \c NULL. */ + void* data; +}; + + +//////////////////////////////////////////////////////////////// +// The following enum and struct can be used to convey +// information in conjunction with the Link Update +// Artwork Notifier. +//////////////////////////////////////////////////////////////// +/** The type of link update that triggered + the \c #kAIFileFormatLinkUpdateNotifier. */ +enum eLinkUpdateType { + /** Perform a normal update. Sent when illustrator detects that + a linked file inside an artboard has been updated by an external program. */ + kNormalUpdate, + /** The link that pointed to a missing file + was changed to point to a new file. */ + kLinkReplaced, + /** A link points to a missing file, and has not been + changed. */ + kMissingLinkIgnored +}; + +/** Notification data sent with the \c #kAIFileFormatLinkUpdateNotifier. */ +struct AILinkUpdateNotifyData { + /** The type of link update that occurred, an \c #eLinkUpdateType value. */ + ai::int32 m_iUpdateType; + /** A pointer to update parameters. Currently unused. */ + void *m_pvParam; +}; + +/** Document startup profile types, returned by + \c #AIDocumentSuite::GetDocumentStartupProfile() + and \c #AIFileFormatSuite::GetFileStartupProfileType().*/ +enum AIDocumentStartupProfile +{ + kAIStartupProfileUnknown = 0, + kAIStartupProfilePrint = 1, + kAIStartupProfileWeb, + kAIStartupProfileVideo, + /* Unused. Not returned. Use \c kAIStartupProfilePrint instead. */ + kAIStartupProfileCMYK, + /* Unused. Not returned. Use \c kAIStartupProfileWeb instead. */ + kAIStartupProfileRGB, + kAIStartupProfileMobile +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions for creating and managing file-format plug-ins, + which extend the number of file formats that Illustrator can read and write. + + Reading a format can be transparent to the user; when a file of the + defined type is selected in the Open dialog, your file format plug-in + creates artwork in the Illustrator document. If there is a plug-in that writes + a file format, that format appears in the Save As dialog as an option for the user + to select. If it is selected, the plug-in walks the artwork tree and writes out + information on the artwork in the appropriate manner. If your plug-in needs more + parameters for either reading or writing, it defines a modal dialog to interact + with the user. + + Plug-ins tell Illustrator about the file formats they + support by specifying platform file information: the type (such as \c 'ART3') + in Mac OS, or the extension (such as \c '.AI') in Windows. Plug-ins also indicate + what read/write capabilities they support. + + One plug-in can register multiple formats. Illustrator handles some parts of the + file I/O process, and the plug-in does the rest. + + A file-format plug-in receives message actions telling it to: + + \li Check if a file can be read, The Check selector is sent only to plug-ins + that can read files. It extends the simple type checking done by the Open dialog. + \li Ask for parameters. This selector can be ignored if the plug-in does not need + user input. + \li Go. In response, your plug-in executes the read or write operation. + + If a file format plug-in can read, files of its registered file type appear + in the file list of the Open dialog. In addition to screening by file type, + Illustrator sends a selector giving a plug-in a chance to check that the + file can be read. This is useful in the case of text files or files from a + different file system. If more than one format matches the type, Illustrator + determines which plug-in should actually open the file, asking the user if necessary. + + If a file format plug-in supports both reading and writing, when reading it should + store any information about the file needed to write the file back to disk. It can + store data (for example, the pixel depth of an EPS preview) in the plug-ins globals, + or in a parameter block. The reference to a block should be attached to the document + using \c #AIDocumentSuite::SetDocumentFileFormatParameters(). Illustrator keeps this + parameter-block reference with the document. The plug-in can retrieve it when the + document is being saved. + + When the user does a Save, by default Illustrator uses the same file format that was + used to read the file. If the file format does not support writing, the Save As + dialog appears to let the user choose the save format. All file format plug-ins + that support saving appear in the format menu of this dialog. + + If you need information from the user to open or save a file, you can present a + dialog when the ask-for-parameters message is received. When saving files, this + will be after the Save As dialog has appeared. Your plug-in should save the + information it collects, keeping it with the document to use for later saves. + + When the go message is received, file formats that read files typically parse + the input file and create Illustrator artwork using API calls. File formats for + saving Illustrator artwork traverse the artwork database and write out all + pertinent information. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIFileFormatSuite and \c #kAIFileFormatVersion. + +*/ +struct AIFileFormatSuite { + + /** Adds a file format to the standard file dialog. + Call during startup to install a plug-in file format. + @param self A reference to this plug-in, which adds the format. + @param name The unique name of the new file format. You can use + your company name with a descriptor to make it unique. + Not displayed or localized. + @param data Information about the file format. + @param options File format operations that this plug-in supports. + A logical OR of these \c #AIFileFormatOptions values: + \verbatim +kFileFormatRead +kFileFormatImportArt +kFileFormatExport +kFileFormatExportSelection +kFileFormatPlaceArt +kFileFormatImportStyles +kFileFormatSuppliesPrintRecordOption +kFileFormatIsDefaultOption +kFileFormatConvertTemplate +kFileFormatLinkArt +kFileFormatWrite +kFileFormatNoAutoCheckFormat +kFileFormatSkipStartupObjectsOption +kFileFormatHasExtendedData +kFileFormatSuppressUI +kFileFormatCheckAlways +\endverbatim + @param fileFormat [out] A buffer in which to return the handle of + the new plug-in file format. If you install multiple file formats, + store this reference in the plug-ins \c globals record, so that your + plug-in can use it to determine which file format command is to be processed. + @param extendedOptions File format extended operations that this plug-in supports. A logical OR of these \c #AIFFExtendedOptions values: + \verbatim + kNoExtendedOptions + kSaveMultiArtboards + kFileFormatPlaceInTouch + \endverbatim + + + @see \c #AddFileFormatEx() + */ + AIAPI AIErr (*AddFileFormat) ( SPPluginRef self, const char* name, + PlatformAddFileFormatData *data, ai::int32 options, AIFileFormatHandle *fileFormat , ai::int32 extendedOptions); + + /** Retrieves the name of a file format. + @param fileFormat The file format. + @param name [out] A buffer in which to return the name string, as + passed to \c #AddFileFormat(). Do not modify this string. + */ + AIAPI AIErr (*GetFileFormatName) ( AIFileFormatHandle fileFormat, const char **name ); + + /** Retrieves the option flags of a file format. + @param fileFormat The file format. + @param options [out] A buffer in which to return the options, a logical OR of + \c #AIFileFormatOptions values + */ + AIAPI AIErr (*GetFileFormatOptions) ( AIFileFormatHandle fileFormat, ai::int32 *options ); + + /** Sets the option flags of a file format, which specify what file operations can be handled. + @param fileFormat The file format. + @param options The options, a logical OR of \c #AIFileFormatOptions values + */ + AIAPI AIErr (*SetFileFormatOptions) ( AIFileFormatHandle fileFormat, ai::int32 options ); + + /** Retrieves a reference to the plug-in that installed a file format, + to be passed to \c #AIPluginSuite functions. + @param fileFormat The file format. + @param plugin [out] A buffer in which to return the plug-in reference. + */ + AIAPI AIErr (*GetFileFormatPlugin) ( AIFileFormatHandle fileFormat, + SPPluginRef *plugin ); + + /** Gets the number of installed plug-in file formats. + Use with \c #GetNthFileFormat() to iterate through all plug-in formats. + @param count [out] A buffer in which to return the number of formats. + */ + AIAPI AIErr (*CountFileFormats) ( ai::int32 *count ); + + /** Retrieves a plug-in file format reference by position index. + Use with \c #CountFileFormats() to iterate through all installed formats. + @param n The index, in the range [1..numFormats]. + @param fileFormat [out] A buffer in which to return the file format reference. + + */ + AIAPI AIErr (*GetNthFileFormat) ( ai::int32 n, AIFileFormatHandle *fileFormat ); + + /** Retrieves the file extension for a plug-in file format. + @param fileFormat The file format. + @param extension [out] A buffer in which to return the file extension string. + */ + AIAPI AIErr (*GetFileFormatExtension) ( AIFileFormatHandle fileFormat, ai::UnicodeString& extension ); + + /** Adds a plug-in file format. This extended version allows you to specify + a list of Mac OS file types. Call during startup to install a plug-in file format. + @param self A reference to this plug-in, which adds the format. + @param name The unique name of the new file format. You can use + your company name with a descriptor to make it unique. + Not displayed or localized. + @param dataEx Information about the file format. This extended version + uses a data structure with additional fields that allow you to + specify a list of Mac OS file types. Use \c #SetFileFormatFilter() + to specify a creator/type pair as the file filter. + @param options File format operations that this plug-in supports. + A logical OR of \c #AIFileFormatOptions values. + When the format is called with a Go selector, + one of these flags is set in the \c option field to indicate the + requested operation. + @param fileFormat [out] A buffer in which to return the handle of + the new plug-in file format. If you install multiple file formats, + store this reference in the plug-ins \c globals record, so that your + plug-in can use it to determine which file format command is to be processed. + @param extendedOptions File format extended operations that this plug-in supports. A logical OR of these \c #AIFFExtendedOptions values: + \verbatim + kNoExtendedOptions + kSaveMultiArtboards + kFileFormatPlaceInTouch + \endverbatim + + @see \c #AddFileFormat(), \c #SetFileFormatFilter() + */ + AIAPI AIErr (*AddFileFormatEx) ( SPPluginRef self, const char* name, + PlatformAddFileFormatExData *dataEx, ai::int32 options, AIFileFormatHandle *fileFormat, ai::int32 extendedOptions ); + + /** Retrieves the localizable display name of a plug-in file format. + @param fileFormat The file format. + @param szTitle [out] A buffer in which to return the display name. + */ + AIAPI AIErr (*GetFileFormatTitle) ( AIFileFormatHandle fileFormat, ai::UnicodeString& szTitle ); + + /** Retrieves the Mac OS file types for a plug-in file format. + @param fileFormat The file format. + @param maxNumTypes [in, out] A buffer in which to specify the maximum number + and return the actual number of values in \c typeList. + @param typeList [out] A buffer in which to return the 4-character Mac OS type codes. + @see \c #GetFileFormatCreatorType() to get the full Mac OS file information. + */ + AIAPI AIErr (*GetFileFormatType) ( AIFileFormatHandle fileFormat, ai::int32 *maxNumTypes, ai::int32 *typeList ); + + /** Associates a file format with a file type filter. File types are specified by (creator, type) + pairs in Mac OS, and by filename extensions in Windows. + @note This function extends the \c #AddFileFormat() and \c #AddFileFormatEx() functions + by allowing filters based on (creator, type) pairs in Mac OS, rather than simple type values. + @param fileFormat The file format. + @param numPairs In Mac OS, the number of (creator, type) pairs specified in \c pairList. + Ignored in Windows. + @param pairList In Mac OS, a pointer to an array of (creator, type) pairs. These can use + the Mac OS wild-card value '****' for creator or type. Ignored in Windows. + @param extensions In Windows, a comma-delimited list of DOS-style extensions that + are filtered in the Open dialog, or appended to the file name in the + Saves As dialog. For example, \c "ai,eps". + */ + AIAPI AIErr (*SetFileFormatFilter) ( AIFileFormatHandle fileFormat, ai::int32 numPairs, AICreatorTypePair *pairList, const ai::UnicodeString& extensions ); + + /** Retrieves the file type filter for a file format, as specified by (creator, type) + pairs for Mac OS. + @param fileFormat The file format. + @param maxNumTypes [in, out] A buffer in which to specify the maximum number + and return the actual number of (creator, type) pairs specified in \c pairList. + @param pairList [out] A buffer in which to return the array of (creator, type) pairs. + */ + AIAPI AIErr (*GetFileFormatCreatorType) ( AIFileFormatHandle fileFormat, ai::int32 *maxNumPairs, AICreatorTypePair *pairList ); + + /** Invokes the File > Save dialog, allowing you to filter the available file formats. + @param options Limits available file formats to those that support these + write operations. A logical OR of write operation constants:
+ \c #kFileFormatExport<
+ \c #kFileFormatWrite + @param dlgTitle The title for the Save dialog. + @param fileSpec [in, out] A buffer in which to pass the initial file specification + and return the user-chosen specification. + @param fileFormat [out] A buffer in which to return the user-chosen file format. + @param good [out] A buffer in which to return true if the user clicked Save, + or false if the user clicked Cancel. + */ + AIAPI AIErr (*PutFile) (ai::int32 options, const unsigned char *dlgTitle, ai::FilePath &fileSpec, AIFileFormatHandle *fileFormat, AIBoolean *good ); + + /** Sets the priority of a file format. which determines the order in which Illustrator + searches through formats in deciding which one to use to open a file. The first format + found that handles a file type is used to open the file. + @param fileFormat The file format. + @param priority The new priority, an \c #AIFileFormatPriority value, + */ + AIAPI AIErr (*SetFileFormatPriority) ( AIFileFormatHandle fileFormat, ai::int32 priority ); + + /** Finds all plug-in file formats that can perform a specified operation for a file. + @param options The operation, a \c #AIFileFormatOptions value. + @param file The file. + @param maxMatches The maximum number of formats to return. + @param matchingFormats [out] An array of size \c maxMatches in which to return the matching file formats. + @param numMatches [out] A buffer in which to return the number of matching file formats found. + */ + AIAPI AIErr (*FindMatchingFileFormats) ( ai::int32 options, const ai::FilePath &file, ai::int32 maxMatches, AIFileFormatHandle matchingFormats[], ai::int32* numMatches ); + + /** Obsolete */ + AIAPI AIErr (*ResolveImportConflicts) (); + + /** Reports the version of Illustrator in which a raster file + format, for example the JPEG file format plug-in, was converted from + using raster art to using placed art in order to perform a place link + operation. The information is needed so that Illustrator knows when it + should convert placed linked art back to raster art when saving to a + legacy file format. For example, if the JPEG file format used raster art + in version 10 and started using placed art in version 11 then + Illustrator must convert placed linked JPEG images back to raster art + when saving to a version 10 or earlier Illustrator file. + (Note that this function returns a version value, not an error code.) + @param fileFormat The file format. + @return The Illustrator version. The default version is 0, + meaning that placed objects are not converted on export. + @see \c #SetFirstVersionUsingPlacedArt() to set the version. + */ + AIAPI AIVersion (*GetFirstVersionUsingPlacedArt) (AIFileFormatHandle fileFormat); + + /** Sets the version of Illustrator in which a raster file + format was converted from using raster art to using placed art + in order to perform a place link operation. + @param fileFormat The file format. + @param The Illustrator version value. The default version is 0, + meaning that placed objects are not converted on export. + @see \c #GetFirstVersionUsingPlacedArt(). + */ + AIAPI AIErr (*SetFirstVersionUsingPlacedArt) (AIFileFormatHandle fileFormat, AIVersion version); + + /** Retrieves the Illustrator startup profile type from the XMP metadata embedded in a file. + @param file The file path. + @param docStartupProfile [out] A buffer in which to return the Illustrator + startup profile constant. If the information is not in the metadata, + or if the file does not contain XMP metadata, this is \c #kAIStartupProfileUnknown. + @return The error \c #kBadParameterErr if file is empty or does not exist. + */ + AIAPI AIErr (*GetFileStartupProfileType) (const ai::FilePath &file, AIDocumentStartupProfile *docStartupProfile); + + /** Retrieves the Illustrator default document profile from the startup-profile type. + @param docStartupProfile The startup profile type. + @param profile [out] A buffer in which to return the file-path object for the default document profile. + @return The error \c #kCantHappenErr if the file does not exists.
+ The error \c #kBadParameterErr if the startup profile is invalid, + */ + AIAPI AIErr (*GetStartupFileOfType) (const AIDocumentStartupProfile docStartupProfile, ai::FilePath &profile); + + /** Retrieves the extended option flags of a file format. + @param fileFormat The file format. + @param extendedOptions [out] A buffer in which to return the extended options + \c #AIFFExtendedOptions values + \verbatim + kNoExtendedOptions + kSaveMultiArtboards + kFileFormatPlaceInTouch + \endverbatim + */ + AIAPI AIErr (*GetFileFormatExtendedOptions) ( AIFileFormatHandle fileFormat, ai::int32 *extendedOptions ); + + /** Sets the extended option flags of a file format, which specify what file operations can be handled. + @param fileFormat The file format. + @param extendedOptions File format operations that this plug-in supports. A logical OR of these + \c #AIFFExtendedOptions values: + \verbatim + kNoExtendedOptions + kSaveMultiArtboards + kFileFormatPlaceInTouch + \endverbatim + */ + AIAPI AIErr (*SetFileFormatExtendedOptions) ( AIFileFormatHandle fileFormat, ai::int32 extendedOptions); + + /** Used for exporting the current document as one whole file or as multiple artBoards + @param actionParam An action parameter block containing keys "name", "frmt", "ext", "smab", "sall", "sran" as defined in AIDocumentAction.h + Will return error (and not throw a dialog) if the above action keys are missing. + */ + AIAPI AIErr(*GoExport) (AIActionParamValueRef actionParam); +} ; + + +/** @deprecated. Obsolete platform-specific functions. Use functions in \c #AIFileFormatSuite. */ +typedef struct { + + AIAPI AIErr (*MacXGetFileFormatTitle) ( AIFileFormatHandle fileFormat, ai::UnicodeString& title ); + AIAPI AIErr (*MacXSetFileFormatTitle) ( AIFileFormatHandle fileFormat, ai::UnicodeString title ); + AIAPI AIErr (*MacXGetFileFormatType) ( AIFileFormatHandle fileFormat, ai::int32 *type ); + AIAPI AIErr (*MacXSetFileFormatType) ( AIFileFormatHandle fileFormat, ai::int32 type ); + +} AIMacFileFormatSuite; + + +#include "AIHeaderEnd.h" + +/******************************************************************************* + ** + ** Inline members + ** + **/ +inline void AIFileFormatMessage::SetFilePath(const ai::FilePath &fp) +{ + filePath = fp; +} + +inline const ai::FilePath &AIFileFormatMessage::GetFilePath() const +{ + return filePath; +} + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFilePath.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFilePath.h index a1a702e..8d712fb 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFilePath.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFilePath.h @@ -1,368 +1,352 @@ -#ifndef __AIFilePath__ -#define __AIFilePath__ - -/* - * Name: AIFilePath.h - * Purpose: Adobe Illustrator File Path Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "IAIFilePath.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIFilePath.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIFilePathSuite "AI File Path Suite" - -#define kAIFilePathSuiteVersion AIAPI_VERSION(5) - -#define kAIFilePathVersion kAIFilePathSuiteVersion - -/** @ingroup Suites - Provides cross-platform file referencing. Use the \c ai::FilePath - wrapper class rather than calling these functions directly. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIFilePathSuite and \c #kAIFilePathVersion. -*/ -struct AIFilePathSuite -{ - /** Creates a new, empty file path object. - @param path [out] A buffer in which to return the - file path object. - */ - AIErr AIAPI (*NewFilePath)(ai::FilePath &path); - - /** Disposes of a file path object. Does not affect the referenced file. - @param path The file path object. - */ - AIErr AIAPI (*DeleteFilePath)(ai::FilePath &path); - - /** Copies a file path object. Does not affect the referenced file. - @param src The file path object to copy. - @param dest [out] A buffer in which to return the - new file path object, which references the same file. - */ - AIErr AIAPI (*Copy)(const ai::FilePath &src, ai::FilePath &dest); - - /** Reports whether a file path object references a file. - (Note that this function returns a boolean value, not an error code.) - @param path The file path object. - @return True if the object is empty (does not reference a file). - */ - AIBool8 AIAPI (*IsEmpty)(const ai::FilePath &path); - - /** Sets a file path object to reference a null path. - (Note that this function has no return value.) - @param path The file path object. - */ - void AIAPI (*MakeEmpty)(ai::FilePath &path); - - - /** Reports whether two file path object reference the same file, - regardless of whether that file exists. - (Note that this function returns a boolean value, not an error code.) - @param a The first file path object. - @param b The second file path object. - @param resolveLinks When true, determine if the two objects refer to the - same file through links, aliases, or shortcuts by querying the - file system. - @return True if the objects are identical, or if \c resolveLinks is true - and the objects reference the same file. -
False if \c resolveLinks is false and the objects are not identical, - or if \c resolveLinks is true and the objects reference different files, - */ - AIBool8 AIAPI (*Equal)(const ai::FilePath &a, const ai::FilePath &b, const AIBool8 resolveLinks); - - /** Reports whether one file path string is before another, alphabetically. - (Note that this function returns a boolean value, not an error code.) - @param a The first file path object. - @param b The second file path object. - @return True if a < b in a string comparison of file path names. - */ - AIBool8 AIAPI (*LessThan)(const ai::FilePath &a, const ai::FilePath &b); - - /** Reports whether a file path string starts with a delimiter. - (Note that this function returns a boolean value, not an error code.) - @param path The file path object. - @return True if the file path name starts with a delimiter. - */ - AIBool8 AIAPI (*StartsWithDelimiter)(const ai::FilePath &path); - - /** Reports whether a file path string ends with a delimiter. - @param path The file path object. - @return True if the file path name ends with a delimiter. - */ - AIBool8 AIAPI (*EndsWithDelimiter)(const ai::FilePath &path); - - /** Adds a component to the path of a file path object, inserting the appropriate - delimiter character as necessary. Does not add a delimiter at the end - unless it is explicitly specified in the \c addend string. - @param addend The component to add. - @param augend [in, out] The file path object. - */ - AIErr AIAPI (*AddComponent)(const ai::UnicodeString &addend, ai::FilePath &augend); - - /** Removes the end component from the path of a file path object. - (Note that this function has no return value.) - @param path The file path object. - */ - void AIAPI (*RemoveComponent)(ai::FilePath &path); - - /** Adds a file extension to the path of a file path object. - Adds or ignores dots as needed so that one dot appears before the extension. - (Note that this function has no return value.) - @param ext The extension string. - @param path [in, out] The file path object. - */ - void AIAPI (*AddExtension)(const ai::UnicodeString &ext, ai::FilePath &path); - - /** Removes the file extension from the path of a file path object. - (Note that this function has no return value.) - @param path [in, out] The file path object. - */ - void AIAPI (*RemoveExtension)(ai::FilePath &path); - - /** Reports whether the file or directory referenced by a file path object - exists in the file system. - (Note that this function returns a boolean value, not an error code.) - - @param path The file path object. - @param resolveLinks When true, resolve links, aliases, and shortcuts for \c longPath. - @param longPath [out] Optional. A buffer in which to return a full long, Unicode version - of the path. Use to convert short path names to their long counterparts. Can be null. - Returns undefined if the file or directory does not exist. - @param isFile [out] Optional. A buffer in which to return true if the object - references an existing file, false if it references an existing directory. Can be null. - Returns undefined if the file or directory does not exist. - @return True if the referenced file or directory exists. - */ - AIBool8 AIAPI (*Exists)(const ai::FilePath &path, const AIBool8 resolveLinks, - ai::UnicodeString *longPath, AIBool8 *isFile); - - /** Resolves an alias or shortcut by querying the file system. - The referenced file or directory must exist. - @param path [in, out] The file path object to resolve and return. - Upon return, the path object points directly to the target file. - */ - AIErr AIAPI (*Resolve)(ai::FilePath &path); - - /*****************************************************************************/ - /* Set operations */ - - /** Sets a file path from a Unicode string. - @param pathString The new path, can be a path native to Windows, UNIX, or Mac OS, or a URL. - @param expandName When true, the function attempts to expand the - provided path string into a full name (for example, for a short, - truncated name in Windows). - @param path The file path object. - */ - AIErr AIAPI (*Set)(const ai::UnicodeString &pathString, AIBool8 expandName, ai::FilePath &path); - - /** Sets a file path from a file specification. - @param file The new file. - @param path The file path object. - */ - void AIAPI (*SetFromSPFileRef)(const SPPlatformFileReference&, ai::FilePath &path); - - #ifdef MAC_ENV - - /** Sets a file path from a \c CFString string specification (in Mac OS only). - @param string The new path. - @param path The file path object. - */ - AIErr AIAPI (*SetFromCFString)(const CFStringRef, ai::FilePath &path); - - /** Sets a file path from an \c FSRef file specification (in Mac OS only). - @param file The new file. - @param path The file path object. - */ - AIErr AIAPI (*SetFromFSRef)(const FSRef&, ai::FilePath &path); - - /** Sets a file path from an \c CFURL URL specification (in Mac OS only). - @param url The new URL. - @param path The file path object. - */ - void AIAPI (*SetFromCFURL)(const CFURLRef, ai::FilePath &path); - - #endif // MAC_ENV - - /*****************************************************************************/ - /* Get operations */ - - /** Retrieves the file name from a file path object. Includes the extension, if any, but - does not include the path. - @param path The file path object - @param displayName When true, get the display name. Attempts to translate a - truncated short name to the full name. - @param fileName [out] A buffer in which to return the file name string. - */ - AIErr AIAPI (*GetFileName)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &fileName); - - /** Retrieves the file name from a file path object, without any extension or path. - @param path The file path object - @param fileNameNoExt [out] A buffer in which to return the file name string. - */ - AIErr AIAPI (*GetFileNameNoExt)(const ai::FilePath &path, ai::UnicodeString &fileNameNoExt); - - /** Retrieves the file extension from a file path object. Does not include the dot. - @param path The file path object - @param ext [out] A buffer in which to return the file extension string. - */ - AIErr AIAPI (*GetFileExtension)(const ai::FilePath &path, ai::UnicodeString &ext); - - /** Retrieves the full path from a file path object, in platform-specific notation. - @param path The file path object - @param displayName When true, get the display name. Attempts to translate a - truncated short name to the full name. - @param fullPath [out] A buffer in which to return the path string. - */ - AIErr AIAPI (*GetFullPath)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &fullPath); - - /** Retrieves the directory or folder from a file path object, in platform-specific notation. - The string ends with a delimiter. If the path represents a directory or folder, this - result is the same as for \c #GetFullPath(). - @param path The file path object - @param displayName When true, get the display name. Attempts to translate a - truncated short name to the full name. - @param directory [out] A buffer in which to return the directory name string. - */ - AIErr AIAPI (*GetDirectory)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &directory); - - /** Retrieves the short version of the path from a file path object, in platform-specific notation. - The referenced file or folder must exist. - @param path The file path object - @param shortPath [out] A buffer in which to return the path string, or an - empty string in case of error.. - \li In Windows, conforms to 8.3 format. - \li In Mac OS X, name can be truncated and a file ID appended. - If the file ID is needed, the path is not valid across processes. - */ - AIErr AIAPI (*GetShortPath)(const ai::FilePath &path, ai::UnicodeString &shortPath); - - /** Retrieves the parent directory or folder for a file path object, as a file path object. - If the path is a directory, retrieves its parent directory. Does not access the file system. - Use \c #Exists() or \c #Resolve() to ensure a path is valid. - @param path The file path object. - @param parent [out] A buffer in which to return the path object for the parent. - Can be the same instance passed in, in which case it is modified to - reference the parent. Returns an empty path if the given path is - for a top-level volume. - */ - AIErr AIAPI (*GetParent)(const ai::FilePath &path, ai::FilePath &parent); - - /** Retrieves the path component delimiter for the current platform. - (Note that this function returns a character, not an error code. - @return The delimiter character ("/" or "\"), - */ - char AIAPI (*GetDelimiter)(void); - - #ifdef MAC_ENV - /** Retrieves the volume and parent of a file path (in Mac OS only). - (Note that this function does not return an error code.) - @param path The file path object. - @param vol [out] A buffer in which to return the volume. Can be \c null. - @param parent [out] A buffer in which to return the parent. Can be \c null. - */ - void AIAPI (*GetVolumeAndParent)(const ai::FilePath &path, FSVolumeRefNum *vol, ai::uint32 *parent); - #endif - - /** Retrieves the file creator and type of a file path as a four-character code - (in Mac OS only, outside Illustrator core). - @param path The file path object. - @param creator [out] A buffer in which to return the creator code. - @param type [out] A buffer in which to return the type code. - */ - AIErr AIAPI (*GetCreatorAndType)(const ai::FilePath &path, ai::uint32 *creator, ai::uint32 *type); - - /** Retrieves the path as a URL from a file path object. The URL contains only ASCII characters - and special characters escaped with URL percent (\\%) encoding. - @param path The file path object - @param displayName When true, get the display name. Attempts to translate a - truncated short name to the full name. - @param url [out] A buffer in which to return the URL string. - */ - AIErr AIAPI (*GetAsURL)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &url); - - /** Retrieves the path as a file specification from a file path object. - @param path The file path object - @param spPlatformFileSpec [out] A buffer in which to return the file specification. - */ - - AIErr AIAPI (*GetAsSPPlatformFileRef)(const ai::FilePath &path, SPPlatformFileReference &spPlatformFileRef); - - #ifdef MAC_ENV - - /** Retrieves a file path as a \c CFString string specification (in Mac OS only). - (Note that this function returns a string value, not an error code.) - @param path The file path object. - @return The path string. The caller is responsible for releasing it. - */ - CFStringRef AIAPI (*GetAsCFString)(const ai::FilePath &path); - - /** Retrieves a file path as an \c FSRef file specification (in Mac OS only). - (Note that this function returns an OS status value, not an error code.) - @param path The file path object. - @param fsRef [out] A buffer in which to return the file specification. - @return The OS status. - */ - OSStatus AIAPI (*GetAsFSRef)(const ai::FilePath &path, FSRef &fsRef); - - /** Retrieves a file path as a \c CFURL specification (in Mac OS only). - (Note that this function returns a string value, not an error code.) - @param path The file path object. - @return The URL specification. - */ - CFURLRef AIAPI (*GetAsCFURL)(const ai::FilePath &path); - - #endif // MAC_ENV - - /** Resets the volume cache. Does not return an error code. */ - void AIAPI (*ResetVolumeCache)(void); - -#ifdef MAC_ENV -#ifdef __OBJC__ - - NSString* AIAPI (*GetAsNSString) (const ai::FilePath &path); - - NSURL* AIAPI (*GetAsNSURL) (const ai::FilePath &path); - - NSData* AIAPI (*GetAsBookmarkData) (const ai::FilePath &path, const ai::FilePath& inRelativeToPath, NSError** outError ); - - NSData* AIAPI (*GetAsMinimalBookmarkData) (const ai::FilePath &path, const ai::FilePath& inRelativeToPath, NSError** outError ); - - BOOL AIAPI (*SetFromBookmarkData) (ai::FilePath &path, NSData* inBookmarkData, const ai::FilePath& inRelativeToPath, NSError** outError ); - - void AIAPI (*GetVolumeAndParentFromFilePath) (const ai::FilePath &path, NSURL **outVolume, NSURL **outParent); - - BOOL AIAPI (*IsAlias) (const ai::FilePath &path); - - BOOL AIAPI (*IsOnNetwork) (const ai::FilePath &path); - - BOOL AIAPI (*IsEjectable) (const ai::FilePath &path); - -#endif //__OBJC__ -#endif //MAC_ENV - -}; - -#include "AIHeaderEnd.h" - -#endif // __AIFilePath__ +#ifndef __AIFilePath__ +#define __AIFilePath__ + +/* + * Name: AIFilePath.h + * Purpose: Adobe Illustrator File Path Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "IAIFilePath.hpp" + +#include "AIHeaderBegin.h" + +/** @file AIFilePath.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIFilePathSuite "AI File Path Suite" + +#define kAIFilePathSuiteVersion AIAPI_VERSION(8) + +#define kAIFilePathVersion kAIFilePathSuiteVersion + +/** @ingroup Suites + Provides cross-platform file referencing. Use the \c ai::FilePath + wrapper class rather than calling these functions directly. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIFilePathSuite and \c #kAIFilePathVersion. +*/ +struct AIFilePathSuite +{ + /** Creates a new, empty file path object. + @param path [out] A buffer in which to return the + file path object. + */ + AIErr AIAPI (*NewFilePath)(ai::FilePath &path); + + /** Disposes of a file path object. Does not affect the referenced file. + @param path The file path object. + */ + AIErr AIAPI (*DeleteFilePath)(ai::FilePath &path); + + /** Copies a file path object. Does not affect the referenced file. + @param src The file path object to copy. + @param dest [out] A buffer in which to return the + new file path object, which references the same file. + */ + AIErr AIAPI (*Copy)(const ai::FilePath &src, ai::FilePath &dest); + + /** Reports whether a file path object references a file. + (Note that this function returns a boolean value, not an error code.) + @param path The file path object. + @return True if the object is empty (does not reference a file). + */ + AIBool8 AIAPI (*IsEmpty)(const ai::FilePath &path); + + /** Sets a file path object to reference a null path. + (Note that this function has no return value.) + @param path The file path object. + */ + void AIAPI (*MakeEmpty)(ai::FilePath &path); + + + /** Reports whether two file path object reference the same file, + regardless of whether that file exists. + (Note that this function returns a boolean value, not an error code.) + @param a The first file path object. + @param b The second file path object. + @param resolveLinks When true, determine if the two objects refer to the + same file through links, aliases, or shortcuts by querying the + file system. + @return True if the objects are identical, or if \c resolveLinks is true + and the objects reference the same file. +
False if \c resolveLinks is false and the objects are not identical, + or if \c resolveLinks is true and the objects reference different files, + */ + AIBool8 AIAPI (*Equal)(const ai::FilePath &a, const ai::FilePath &b, const AIBool8 resolveLinks); + + /** Reports whether one file path string is before another, alphabetically. + (Note that this function returns a boolean value, not an error code.) + @param a The first file path object. + @param b The second file path object. + @return True if a < b in a string comparison of file path names. + */ + AIBool8 AIAPI (*LessThan)(const ai::FilePath &a, const ai::FilePath &b); + + /** Reports whether a file path string starts with a delimiter. + (Note that this function returns a boolean value, not an error code.) + @param path The file path object. + @return True if the file path name starts with a delimiter. + */ + AIBool8 AIAPI (*StartsWithDelimiter)(const ai::FilePath &path); + + /** Reports whether a file path string ends with a delimiter. + @param path The file path object. + @return True if the file path name ends with a delimiter. + */ + AIBool8 AIAPI (*EndsWithDelimiter)(const ai::FilePath &path); + + /** Adds a component to the path of a file path object, inserting the appropriate + delimiter character as necessary. Does not add a delimiter at the end + unless it is explicitly specified in the \c addend string. + @param addend The component to add. + @param augend [in, out] The file path object. + */ + AIErr AIAPI (*AddComponent)(const ai::UnicodeString &addend, ai::FilePath &augend); + + /** Removes the end component from the path of a file path object. + (Note that this function has no return value.) + @param path The file path object. + */ + void AIAPI (*RemoveComponent)(ai::FilePath &path); + + /** Adds a file extension to the path of a file path object. + Adds or ignores dots as needed so that one dot appears before the extension. + (Note that this function has no return value.) + @param ext The extension string. + @param path [in, out] The file path object. + */ + void AIAPI (*AddExtension)(const ai::UnicodeString &ext, ai::FilePath &path); + + /** Removes the file extension from the path of a file path object. + (Note that this function has no return value.) + @param path [in, out] The file path object. + */ + void AIAPI (*RemoveExtension)(ai::FilePath &path); + + /** Reports whether the file or directory referenced by a file path object + exists in the file system. + (Note that this function returns a boolean value, not an error code.) + + @param path The file path object. + @param resolveLinks When true, resolve links, aliases, and shortcuts for \c longPath. + @param longPath [out] Optional. A buffer in which to return a full long, Unicode version + of the path. Use to convert short path names to their long counterparts. Can be null. + Returns undefined if the file or directory does not exist. + @param isFile [out] Optional. A buffer in which to return true if the object + references an existing file, false if it references an existing directory. Can be null. + Returns undefined if the file or directory does not exist. + @return True if the referenced file or directory exists. + */ + AIBool8 AIAPI (*Exists)(const ai::FilePath &path, const AIBool8 resolveLinks, + ai::UnicodeString *longPath, AIBool8 *isFile); + + /** Resolves an alias or shortcut by querying the file system. + The referenced file or directory must exist. + @param path [in, out] The file path object to resolve and return. + Upon return, the path object points directly to the target file. + */ + AIErr AIAPI (*Resolve)(ai::FilePath &path); + + /*****************************************************************************/ + /* Set operations */ + + /** Sets a file path from a Unicode string. + @param pathString The new path, can be a path native to Windows, UNIX, or Mac OS, or a URL. + @param expandName When true, the function attempts to expand the + provided path string into a full name (for example, for a short, + truncated name in Windows). + @param dontStripTrailingSpace When true, the function will not strip any + trailing whitespace in the provided path string + @param path The file path object. + */ + AIErr AIAPI (*Set)(const ai::UnicodeString &pathString, AIBool8 expandName, + AIBool8 dontStripTrailingSpace, ai::FilePath &path); + + /** Sets a file path from a file specification. + @param file The new file. + @param path The file path object. + */ + void AIAPI (*SetFromSPFileRef)(const SPPlatformFileReference&, ai::FilePath &path); + + #ifdef MAC_ENV + + /** Sets a file path from a \c CFString string specification (in Mac OS only). + @param string The new path. + @param path The file path object. + */ + AIErr AIAPI (*SetFromCFString)(const CFStringRef, ai::FilePath &path); + + /** Sets a file path from an \c CFURL URL specification (in Mac OS only). + @param url The new URL. + @param path The file path object. + */ + void AIAPI (*SetFromCFURL)(const CFURLRef, ai::FilePath &path); + + #endif // MAC_ENV + + /*****************************************************************************/ + /* Get operations */ + + /** Retrieves the file name from a file path object. Includes the extension, if any, but + does not include the path. + @param path The file path object + @param displayName When true, get the display name. Attempts to translate a + truncated short name to the full name. + @param fileName [out] A buffer in which to return the file name string. + */ + AIErr AIAPI (*GetFileName)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &fileName); + + /** Retrieves the file name from a file path object, without any extension or path. + @param path The file path object + @param fileNameNoExt [out] A buffer in which to return the file name string. + */ + AIErr AIAPI (*GetFileNameNoExt)(const ai::FilePath &path, ai::UnicodeString &fileNameNoExt); + + /** Retrieves the file extension from a file path object. Does not include the dot. + @param path The file path object + @param ext [out] A buffer in which to return the file extension string. + */ + AIErr AIAPI (*GetFileExtension)(const ai::FilePath &path, ai::UnicodeString &ext); + + /** Retrieves the full path from a file path object, in platform-specific notation. + @param path The file path object + @param displayName When true, get the display name. Attempts to translate a + truncated short name to the full name. + @param fullPath [out] A buffer in which to return the path string. + */ + AIErr AIAPI (*GetFullPath)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &fullPath); + + /** Retrieves the directory or folder from a file path object, in platform-specific notation. + The string ends with a delimiter. If the path represents a directory or folder, this + result is the same as for \c #GetFullPath(). + @param path The file path object + @param displayName When true, get the display name. Attempts to translate a + truncated short name to the full name. + @param directory [out] A buffer in which to return the directory name string. + */ + AIErr AIAPI (*GetDirectory)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &directory); + + /** Retrieves the short version of the path from a file path object, in platform-specific notation. + The referenced file or folder must exist. + @param path The file path object + @param shortPath [out] A buffer in which to return the path string, or an + empty string in case of error.. + \li In Windows, conforms to 8.3 format. + \li In Mac OS X, name can be truncated and a file ID appended. + If the file ID is needed, the path is not valid across processes. + */ + AIErr AIAPI (*GetShortPath)(const ai::FilePath &path, ai::UnicodeString &shortPath); + + /** Retrieves the parent directory or folder for a file path object, as a file path object. + If the path is a directory, retrieves its parent directory. Does not access the file system. + Use \c #Exists() or \c #Resolve() to ensure a path is valid. + @param path The file path object. + @param parent [out] A buffer in which to return the path object for the parent. + Can be the same instance passed in, in which case it is modified to + reference the parent. Returns an empty path if the given path is + for a top-level volume. + */ + AIErr AIAPI (*GetParent)(const ai::FilePath &path, ai::FilePath &parent); + + /** Retrieves the path component delimiter for the current platform. + (Note that this function returns a character, not an error code. + @return The delimiter character ("/" or "\"), + */ + char AIAPI (*GetDelimiter)(void); + + /** Retrieves the file creator and type of a file path as a four-character code + (in Mac OS only, outside Illustrator core). + @param path The file path object. + @param creator [out] A buffer in which to return the creator code. + @param type [out] A buffer in which to return the type code. + */ + AIErr AIAPI (*GetCreatorAndType)(const ai::FilePath &path, ai::uint32 *creator, ai::uint32 *type); + + /** Retrieves the path as a URL from a file path object. The URL contains only ASCII characters + and special characters escaped with URL percent (\\%) encoding. + @param path The file path object + @param displayName When true, get the display name. Attempts to translate a + truncated short name to the full name. + @param url [out] A buffer in which to return the URL string. + */ + AIErr AIAPI (*GetAsURL)(const ai::FilePath &path, const AIBool8 displayName, ai::UnicodeString &url); + + /** Retrieves the path as a file specification from a file path object. + @param path The file path object + @param spPlatformFileSpec [out] A buffer in which to return the file specification. + */ + + AIErr AIAPI (*GetAsSPPlatformFileRef)(const ai::FilePath &path, SPPlatformFileReference &spPlatformFileRef); + + /** Retrieves the path as a file specification from a file path object. + @param path The file path object + return if file path is on network or not. + */ + AIBoolean AIAPI(*IsOnNetwork)(const ai::FilePath &path); + + #ifdef MAC_ENV + + /** Retrieves a file path as a \c CFString string specification (in Mac OS only). + (Note that this function returns a string value, not an error code.) + @param path The file path object. + @return The path string. The caller is responsible for releasing it. + */ + CFStringRef AIAPI (*GetAsCFString)(const ai::FilePath &path); + + + /** Retrieves a file path as a \c CFURL specification (in Mac OS only). + (Note that this function returns a string value, not an error code.) + @param path The file path object. + @return The URL specification. + */ + CFURLRef AIAPI (*GetAsCFURL)(const ai::FilePath &path); + + #endif // MAC_ENV + + /** Resets the volume cache. Does not return an error code. */ + void AIAPI (*ResetVolumeCache)(void); + +#ifdef MAC_ENV +#ifdef __OBJC__ + + NSString* AIAPI (*GetAsNSString) (const ai::FilePath &path); + + NSURL* AIAPI (*GetAsNSURL) (const ai::FilePath &path); + + NSData* AIAPI (*GetAsBookmarkData) (const ai::FilePath &path, const ai::FilePath& inRelativeToPath, NSError** outError ); + + NSData* AIAPI (*GetAsMinimalBookmarkData) (const ai::FilePath &path, const ai::FilePath& inRelativeToPath, NSError** outError ); + + BOOL AIAPI (*SetFromBookmarkData) (ai::FilePath &path, NSData* inBookmarkData, const ai::FilePath& inRelativeToPath, NSError** outError ); + + void AIAPI (*GetVolumeAndParentFromFilePath) (const ai::FilePath &path, NSURL **outVolume, NSURL **outParent); + + BOOL AIAPI (*IsAlias) (const ai::FilePath &path); + + BOOL AIAPI (*IsEjectable) (const ai::FilePath &path); + +#endif //__OBJC__ +#endif //MAC_ENV + +}; + +#include "AIHeaderEnd.h" + +#endif // __AIFilePath__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFilter.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFilter.h index ce86791..ddde126 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFilter.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFilter.h @@ -1,262 +1,262 @@ -#ifndef __AIFilter__ -#define __AIFilter__ - -/* - * Name: AIFilter.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Filter Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIMenu__ -#include "AIMenu.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIFilter.h */ - -/** @deprecated - This suite is deprecated as of AI 14 (CS4), in favor of AILiveEffectSuite. - See \c #AILiveEffectSuite. -*/ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIFilterSuite "AI Filter Suite" -#define kAIFilterSuiteVersion AIAPI_VERSION(4) -#define kAIFilterVersion kAIFilterSuiteVersion - -/** @ingroup Callers - The filter caller. See \c #AIFilterSuite. - */ -#define kCallerAIFilter "AI Filter" - -/** @ingroup Selectors - Sent when the user chooses a filter from the Filter menu. - The filter should get any user parameters, which are returned to - Illustrator in the \c #AIFilterMessage structure. You can ignore this selector - if the filter does not require user input. - You might want to check the artwork state to know whether - you can proceed with the Go selector. - */ -#define kSelectorAIGetFilterParameters "AI Get Parameters" - -/** @ingroup Selectors - Tells your filter to execute. Do not query for parameters in the processing - of this message; parameters are passed in the \c #AIFilterMessage structure. - \li If the user selects the filter from the menu, the parameters are from - the immediately preceding response to \c #kSelectorAIGetFilterParameters. - \li If the user chooses to apply the last filter, the parameters are - the last ones used. - */ -#define kSelectorAIGoFilter "AI Go" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a filter. It is never dereferenced. - Use the functions in the \c #AIFilterSuite to access it. */ -typedef struct _t_AIFilterOpaque *AIFilterHandle; - - -#if Macintosh || MSWindows -/** A developer-defined structure that holds parameters required - for your filter. It is a platform handle; allocate space with - \c #AIMdMemorySuite::MdMemoryNewHandle().*/ -typedef void *PlatformFilterParameters; - -/** The menu category and display name for a plug-in filter. - Filters in the same category are added to a submenu of the Filter menu. - \li In Windows, either or both can have a keyboard shortcut. - Precede the shortcut character with an ampersand (&). - Take care that the shortcut key does not conflict with - other menu items. -*/ -typedef struct { - /** The menu category (submenu) to which the filter is added, - a Pascal-style string. */ - unsigned char *category; - /** The display name for the filter's menu item, a Pascal-style string. - By convention, the name is a descriptive verb,such as "Rotate". - If the filter requires parameters, the name should end - with three dots. - */ - unsigned char *title; -} PlatformAddFilterData; -#endif - -/** The message for a filter Get Parameters or Go selector. */ -typedef struct { - /** The message data. */ - SPMessageData d; - /** The filter object. If your plug-in defines more than one filter, - save the handles in \c globals and compare to determine which - was activated. */ - AIFilterHandle filter; - /** The parameter values, in a developer-defined parameter structure. - Fill with values in response to a Get Parameters selector. */ - PlatformFilterParameters parameters; -} AIFilterMessage; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions to add and manage menu items in the Filter menu. - Plug-in filters are added to the Filter menu in a separate section - from native Illustrator filters and Photoshop filters supported by - Illustrator. You can specify a \e category, or submenu, for a group of filters. - - When the user selects a filter, it typically displays an - options dialog and then manipulates the artwork in some fashion - according to those options. - - Filter plug-ins are similar in many ways to the more general - menu plug-ins (see \c #AIMenuSuite). Filters differ in that: - \li Filters are added to the Filter menu, while menu plug-ins can - add commands to any menu. - \li Menu plug-ins can set command keys and control their appearance. - \li Both plug-in types receive a Go selector, but filters also receive - \c #kSelectorAIGetFilterParameters. The user interface is typically - a modal dialog, while a menu plug-in can interact with other - plug-in types, or trigger other events. - \li Filters automatically set the Repeat and Undo menus, while menu plug-ins - must set the Undo menu item text. The filter plug-in must remove - the Undo context if the user cancels the action. Use - \c #AIUndoSuite::UndoChanges() to remove any changes to - the artwork the plug-in made, and do any other necessary clean up, - such as disposing of allocated memory. - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIFilterSuite and \c #kAIFilterVersion. - */ -typedef struct { - - /** Installs a filter plug-in. Call this during startup to place the name - of your filter in the Filter menu. - @param self A reference to this plug-in, which adds the filter. - @param name The unique name of the new filter. You can use your - company name with a descriptor to make it unique. Not displayed or localized. - @param data The structure containing the category (submenu) and localizable - menu-item label. - @param options Not currently used. Pass 0. - @param filter [out] A buffer in which to return the filter reference. - If you install multiple filters, store this reference in the - plug-in’s \c globals record, so that your plug-in can use it - to determine which filter command is to be processed. - */ - AIAPI AIErr (*AddFilter) ( SPPluginRef self, char *name, - PlatformAddFilterData *data, ai::int32 options, AIFilterHandle *filter ); - - /** Retrieves the unique name of a filter. - @param filter The filter reference. - @param name [out] A buffer in which to return the name string, as - originally passed to \c #AddFilter(). Do not modify this string. - */ - AIAPI AIErr (*GetFilterName) ( AIFilterHandle filter, char **name ); - - /** Retrieves the option flags of a filter. (The options flags are not - currently used, and the returned value is always 0). - @param filter The filter reference. - @param options [out] A buffer in which to return the options value. - */ - AIAPI AIErr (*GetFilterOptions) ( AIFilterHandle filter, ai::int32 *options ); - - /** Sets the option flags of a filter. (The options flags are not - currently used.) - @param filter The filter reference. - @param options The options value. - */ - AIAPI AIErr (*SetFilterOptions) ( AIFilterHandle filter, ai::int32 options ); - - /** Retrieves the stored reference to a parameter block for a filter. - This block contains the parameter values that were set by the user - in the most recent call to this filter. - @param filter The filter reference. - @param parameters [out] A buffer in which to return the stored parameters block. - */ - AIAPI AIErr (*GetFilterParameters) ( AIFilterHandle filter, PlatformFilterParameters *parameters ); - - /** Sets the stored reference to a parameter block for a filter. The plug-in manager - normally keeps this reference to the parameter values that were set by the user - in the most recent call to a filter. You can use this function after a call to - \c #AIPluginSuite::CallPlugin(), to store a new set of parameters. - @param filter The filter reference. - @param parameters The new parameters block. - @see \c #GetFilterParameters() - */ - AIAPI AIErr (*SetFilterParameters) ( AIFilterHandle filter, PlatformFilterParameters parameters ); - - /** Retrieves the menu-item reference for a filter. Your plug-in can then modify - the menu item’s appearance using the \c #AIMenuSuite functions. - @param filter The filter reference. - @param menuItem [out] A buffer in which to return the menu item reference. - */ - AIAPI AIErr (*GetFilterMenuItem) ( AIFilterHandle filter, AIMenuItemHandle *menuItem ); - - /** Retrieves a reference to the plug-in that installed a filter. - @param filter The filter reference. - @param plugin [out] A buffer in which to return the plug-in reference. - */ - AIAPI AIErr (*GetFilterPlugin) ( AIFilterHandle filter, SPPluginRef *plugin ); - - /** Gets number of installed filters. Use this with \c #GetNthFilter() - to iterate through installed filters. - @param count [out] A buffer in which to return the number of filters. - */ - AIAPI AIErr (*CountFilters) ( ai::int32 *count ); - - /** Retrieves a plug-in filter reference by position index. Use with - \c #CountFilters() to iterate through all installed filters. - @param n The index, in the range [1..numFilters]. - @param filter [out] A buffer in which to return the filter reference. - */ - AIAPI AIErr (*GetNthFilter) ( ai::int32 n, AIFilterHandle *filter ); - -} AIFilterSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIFilter__ +#define __AIFilter__ + +/* + * Name: AIFilter.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Filter Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#ifndef __AIMenu__ +#include "AIMenu.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIFilter.h */ + +/** @deprecated + This suite is deprecated as of AI 14 (CS4), in favor of AILiveEffectSuite. + See \c #AILiveEffectSuite. +*/ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIFilterSuite "AI Filter Suite" +#define kAIFilterSuiteVersion AIAPI_VERSION(4) +#define kAIFilterVersion kAIFilterSuiteVersion + +/** @ingroup Callers + The filter caller. See \c #AIFilterSuite. + */ +#define kCallerAIFilter "AI Filter" + +/** @ingroup Selectors + Sent when the user chooses a filter from the Filter menu. + The filter should get any user parameters, which are returned to + Illustrator in the \c #AIFilterMessage structure. You can ignore this selector + if the filter does not require user input. + You might want to check the artwork state to know whether + you can proceed with the Go selector. + */ +#define kSelectorAIGetFilterParameters "AI Get Parameters" + +/** @ingroup Selectors + Tells your filter to execute. Do not query for parameters in the processing + of this message; parameters are passed in the \c #AIFilterMessage structure. + \li If the user selects the filter from the menu, the parameters are from + the immediately preceding response to \c #kSelectorAIGetFilterParameters. + \li If the user chooses to apply the last filter, the parameters are + the last ones used. + */ +#define kSelectorAIGoFilter "AI Go" + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a filter. It is never dereferenced. + Use the functions in the \c #AIFilterSuite to access it. */ +typedef struct _t_AIFilterOpaque *AIFilterHandle; + + +#if Macintosh || MSWindows || LINUX_ENV +/** A developer-defined structure that holds parameters required + for your filter. It is a platform handle; allocate space with + \c #AIMdMemorySuite::MdMemoryNewHandle().*/ +typedef void *PlatformFilterParameters; + +/** The menu category and display name for a plug-in filter. + Filters in the same category are added to a submenu of the Filter menu. + \li In Windows, either or both can have a keyboard shortcut. + Precede the shortcut character with an ampersand (&). + Take care that the shortcut key does not conflict with + other menu items. +*/ +typedef struct { + /** The menu category (submenu) to which the filter is added, + a Pascal-style string. */ + unsigned char *category; + /** The display name for the filter's menu item, a Pascal-style string. + By convention, the name is a descriptive verb,such as "Rotate". + If the filter requires parameters, the name should end + with three dots. + */ + unsigned char *title; +} PlatformAddFilterData; +#endif + +/** The message for a filter Get Parameters or Go selector. */ +typedef struct { + /** The message data. */ + SPMessageData d; + /** The filter object. If your plug-in defines more than one filter, + save the handles in \c globals and compare to determine which + was activated. */ + AIFilterHandle filter; + /** The parameter values, in a developer-defined parameter structure. + Fill with values in response to a Get Parameters selector. */ + PlatformFilterParameters parameters; +} AIFilterMessage; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions to add and manage menu items in the Filter menu. + Plug-in filters are added to the Filter menu in a separate section + from native Illustrator filters and Photoshop filters supported by + Illustrator. You can specify a \e category, or submenu, for a group of filters. + + When the user selects a filter, it typically displays an + options dialog and then manipulates the artwork in some fashion + according to those options. + + Filter plug-ins are similar in many ways to the more general + menu plug-ins (see \c #AIMenuSuite). Filters differ in that: + \li Filters are added to the Filter menu, while menu plug-ins can + add commands to any menu. + \li Menu plug-ins can set command keys and control their appearance. + \li Both plug-in types receive a Go selector, but filters also receive + \c #kSelectorAIGetFilterParameters. The user interface is typically + a modal dialog, while a menu plug-in can interact with other + plug-in types, or trigger other events. + \li Filters automatically set the Repeat and Undo menus, while menu plug-ins + must set the Undo menu item text. The filter plug-in must remove + the Undo context if the user cancels the action. Use + \c #AIUndoSuite::UndoChanges() to remove any changes to + the artwork the plug-in made, and do any other necessary clean up, + such as disposing of allocated memory. + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIFilterSuite and \c #kAIFilterVersion. + */ +typedef struct { + + /** Installs a filter plug-in. Call this during startup to place the name + of your filter in the Filter menu. + @param self A reference to this plug-in, which adds the filter. + @param name The unique name of the new filter. You can use your + company name with a descriptor to make it unique. Not displayed or localized. + @param data The structure containing the category (submenu) and localizable + menu-item label. + @param options Not currently used. Pass 0. + @param filter [out] A buffer in which to return the filter reference. + If you install multiple filters, store this reference in the + plug-in�s \c globals record, so that your plug-in can use it + to determine which filter command is to be processed. + */ + AIAPI AIErr (*AddFilter) ( SPPluginRef self, char *name, + PlatformAddFilterData *data, ai::int32 options, AIFilterHandle *filter ); + + /** Retrieves the unique name of a filter. + @param filter The filter reference. + @param name [out] A buffer in which to return the name string, as + originally passed to \c #AddFilter(). Do not modify this string. + */ + AIAPI AIErr (*GetFilterName) ( AIFilterHandle filter, char **name ); + + /** Retrieves the option flags of a filter. (The options flags are not + currently used, and the returned value is always 0). + @param filter The filter reference. + @param options [out] A buffer in which to return the options value. + */ + AIAPI AIErr (*GetFilterOptions) ( AIFilterHandle filter, ai::int32 *options ); + + /** Sets the option flags of a filter. (The options flags are not + currently used.) + @param filter The filter reference. + @param options The options value. + */ + AIAPI AIErr (*SetFilterOptions) ( AIFilterHandle filter, ai::int32 options ); + + /** Retrieves the stored reference to a parameter block for a filter. + This block contains the parameter values that were set by the user + in the most recent call to this filter. + @param filter The filter reference. + @param parameters [out] A buffer in which to return the stored parameters block. + */ + AIAPI AIErr (*GetFilterParameters) ( AIFilterHandle filter, PlatformFilterParameters *parameters ); + + /** Sets the stored reference to a parameter block for a filter. The plug-in manager + normally keeps this reference to the parameter values that were set by the user + in the most recent call to a filter. You can use this function after a call to + \c #AIPluginSuite::CallPlugin(), to store a new set of parameters. + @param filter The filter reference. + @param parameters The new parameters block. + @see \c #GetFilterParameters() + */ + AIAPI AIErr (*SetFilterParameters) ( AIFilterHandle filter, PlatformFilterParameters parameters ); + + /** Retrieves the menu-item reference for a filter. Your plug-in can then modify + the menu item�s appearance using the \c #AIMenuSuite functions. + @param filter The filter reference. + @param menuItem [out] A buffer in which to return the menu item reference. + */ + AIAPI AIErr (*GetFilterMenuItem) ( AIFilterHandle filter, AIMenuItemHandle *menuItem ); + + /** Retrieves a reference to the plug-in that installed a filter. + @param filter The filter reference. + @param plugin [out] A buffer in which to return the plug-in reference. + */ + AIAPI AIErr (*GetFilterPlugin) ( AIFilterHandle filter, SPPluginRef *plugin ); + + /** Gets number of installed filters. Use this with \c #GetNthFilter() + to iterate through installed filters. + @param count [out] A buffer in which to return the number of filters. + */ + AIAPI AIErr (*CountFilters) ( ai::int32 *count ); + + /** Retrieves a plug-in filter reference by position index. Use with + \c #CountFilters() to iterate through all installed filters. + @param n The index, in the range [1..numFilters]. + @param filter [out] A buffer in which to return the filter reference. + */ + AIAPI AIErr (*GetNthFilter) ( ai::int32 n, AIFilterHandle *filter ); + +} AIFilterSuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFixedMath.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFixedMath.h index 9aedf0f..ac77323 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFixedMath.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFixedMath.h @@ -1,212 +1,212 @@ -#ifndef __AIFixedMath__ -#define __AIFixedMath__ - -/* - * Name: AIFixedMath.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Fixed-Point Math Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIFixedMath.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIFixedMathSuite "AI Fixed Math Suite" -#define kAIFixedMathSuiteVersion AIAPI_VERSION(4) -#define kAIFixedMathVersion kAIFixedMathSuiteVersion - - -// common AIFixed constants -#define kFixedMin ((AIFixed) 0x80000000) -#define kFixedMax ((AIFixed) 0x7FFFFFFF) -#define kFixedUnknown ((AIFixed) 0x80000000) - -#ifndef kFixedOne -#define kFixedOne ((AIFixed) 0x00010000) -#endif -#ifndef kFixedZero -#define kFixedZero ((AIFixed) 0x00000000) -#endif -#define kFixedHundredth ((AIFixed) 0x0000028F) -#define kFixedSixteenth ((AIFixed) 0x00001000) -#define kFixedTenth ((AIFixed) 0x00001999) -#define kFixedEighth ((AIFixed) 0x00002000) -#ifndef kFixedQuarter -#define kFixedQuarter ((AIFixed) 0x00004000) -#endif -#ifndef kFixedHalf -#define kFixedHalf ((AIFixed) 0x00008000) -#endif -#define kFixedSevenEighths ((AIFixed) 0x0000E000) -#define kFixedOne1 ((AIFixed) 0x0000FFFF) -#define kFixedOneThird ((AIFixed) 0x00005555) -#define kFixedFourThirds ((AIFixed) 0x00015555) -#define kFixedThreeHalves ((AIFixed) 0x00018000) - -#define kFixedPi4 ((AIFixed) 0x0000C910) -#define kFixedPi2 ((AIFixed) 0x00019220) -#define kFixedPi ((AIFixed) 0x00032440) -#define kFixedTwoPi ((AIFixed) 0x00064880) -#define kFixedGolden ((AIFixed) 0x00019E37) - -// common AIFract constants -#define kFractZero ((AIFract) 0x00000000) -#define kFractFixedRound ((AIFract) 0x00002000) -#define kFractPi180 ((AIFract) 0x011DF4A0) -#define kFractQuarter ((AIFract) 0x10000000) -#define kFractHalf ((AIFract) 0x20000000) -#define kFractOne ((AIFract) 0x40000000) -#define kFractFourThirds ((AIFract) 0x55555555) -#define kFractSqrtTwo ((AIFract) 0x5A82799A) -#define kFractUnknown ((AIFract) 0x80000000) - - -/******************************************************************************* - ** - ** Macros - ** - **/ - -#if __BUILD_PLUGIN__ - -// type conversion macros -#define _FixedToFract(a) ((AIFract)(a) << 14) -#define _FractRoundToFixed(a) ((AIFixed) (((a) + kFractFixedRound) >> 14)) -#define _FractTruncToFixed(a) ((AIFixed) ((a) >> 14)) - -#define _ShortToFixed(a) ((AIFixed)(a) << 16) -#define _FixedRoundToShort(a) ((ai::int16) (((a) + kFixedHalf) >> 16)) -#define _FixedTruncToShort(a) ((ai::int16) ((a) >> 16)) - -#define _FloatToFixed(a) ((AIFixed)((a) * 65536.0)) // useful for constants; eg, _FloatToFixed(1.5) generates 0x00018000 - - -// other macros -#define _FixedFloor(a) ((AIFixed) ((a) & 0xFFFF0000L)) -#define _FixedCeiling(a) _FixedFloor((a) + kFixedOne1) -#define _FixedRound(a) _FixedFloor((a) + kFixedHalf) -#define _FixedFraction(a) ((a) & 0x0000FFFFL) -#define _FixedAverage(a, b) (((a) + (b) + 1) >> 1) -#define _FixedHalf(a) (((a) + 1) >> 1) -#define _FixedOverflow(a) ((a) == kFixedMax || (a) == kFixedMin) - -#endif - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Use these functions to work with fixed-point numbers. These - exist primarily for use by older plug-ins that were fixed-point based. Modern - plug-ins should use the \c #AIRealMathSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIFixedMathSuite and \c #kAIFixedMathVersion. - */ -typedef struct { - - AIAPI AIFixed (*FixedAdd) ( AIFixed a, AIFixed b ); - AIAPI AIFixed (*FixedMul) ( AIFixed a, AIFixed b ); - AIAPI AIFract (*FractMul) ( AIFract a, AIFract b ); - AIAPI AIFixed (*FractFixedMul) ( AIFract a, AIFixed b ); - AIAPI AIFixed (*FixedDiv) ( AIFixed a, AIFixed b ); - AIAPI AIFract (*FractDiv) ( AIFract a, AIFract b ); - AIAPI AIFixed (*ShortRatio) ( ai::int16 a, ai::int16 b ); - AIAPI AIFract (*FixedRatio) ( AIFixed a, AIFixed b ); - AIAPI AIFixed (*FractRatio) ( AIFract a, AIFract b ); - AIAPI AIFixed (*FixedMulAdd) ( AIFixed a, AIFixed b, AIFixed c, AIFixed d ); - AIAPI AIFixed (*FixedMultiple) (AIFixed a, AIFixed multiple, AIBoolean ceiling ); - - AIAPI AIFract (*FixedSin) ( AIFixed a ); - AIAPI AIFract (*FixedCos) ( AIFixed a ); - AIAPI AIFixed (*FixedATan) ( AIFixed a, AIFixed b ); - AIAPI AIFixed (*DegreeToRadian) ( AIFixed degree ); - AIAPI AIFixed (*RadianToDegree) ( AIFixed radian ); - - AIAPI AIUFract (*FractSqrt) ( AIUFract a ); - AIAPI AIFixed (*FixedLength) ( AIFixed a, AIFixed b ); - AIAPI AIFixed (*FixedInterpolate) ( AIFixed a, AIFixed b, AIFixed t ); - - AIAPI AIFloat (*FixedToFloat) ( AIFixed a ); - AIAPI AIFixed (*FloatToFixed) ( AIFloat a ); - AIAPI AIFloat (*FractToFloat) ( AIFract a ); - AIAPI AIFract (*FloatToFract) ( AIFloat a ); - - AIAPI void (*FixedPointAdd) ( AIFixedPoint *a, AIFixedPoint *b, AIFixedPoint *result ); - AIAPI void (*FixedPointSubtract) ( AIFixedPoint *a, AIFixedPoint *b, AIFixedPoint *result ); - AIAPI AIBoolean (*FixedPointEqual) ( AIFixedPoint *a, AIFixedPoint *b ); - AIAPI AIBoolean (*FixedPointClose) ( AIFixedPoint *a, AIFixedPoint *b, AIFixed tolerance ); - AIAPI AIFixed (*FixedPointAngle) ( AIFixedPoint *a, AIFixedPoint *b ); - AIAPI AIFixed (*FixedPointLength) ( AIFixedPoint *a, AIFixedPoint *b ); - AIAPI void (*FixedPointLengthAngle) ( AIFixed length, AIFixed angle, AIFixedPoint *result ); - AIAPI void (*FixedPointInterpolate) ( AIFixedPoint *a, AIFixedPoint *b, AIFixed t, AIFixedPoint *result ); - - AIAPI void (*FixedRectSet) ( AIFixedRect *a, AIFixed left, AIFixed top, AIFixed right, AIFixed bottom ); - AIAPI AIBoolean (*FixedRectEqual) ( AIFixedRect *a, AIFixedRect *b ); - AIAPI AIBoolean (*FixedRectEmpty) ( AIFixedRect *a ); - AIAPI void (*FixedRectInset) ( AIFixedRect *a, AIFixed h, AIFixed v ); - AIAPI void (*FixedRectOffset) ( AIFixedRect *a, AIFixed h, AIFixed v ); - AIAPI void (*FixedRectUnion) ( AIFixedRect *a, AIFixedRect *b, AIFixedRect *result ); - AIAPI void (*FixedPointUnion) ( AIFixedPoint *a, AIFixedRect *b, AIFixedRect *result ); - AIAPI AIBoolean (*FixedRectOverlap) ( AIFixedRect *a, AIFixedRect *b ); - AIAPI AIBoolean (*FixedRectIntersect) ( AIFixedRect *a, AIFixedRect *b, AIFixedRect *result ); - AIAPI AIBoolean (*FixedRectInFixedRect) ( AIFixedRect *a, AIFixedRect *b ); - AIAPI AIBoolean (*FixedPointInFixedRect) ( AIFixedPoint *a, AIFixedRect *b ); - AIAPI void (*FixedRectAlign) ( AIFixedRect *a, AIFixedRect *result ); - - AIAPI void (*FixedMatrixSet) ( AIFixedMatrix *m, AIFixed a, AIFixed b, AIFixed c, AIFixed d, AIFixed tx, AIFixed ty ); - AIAPI void (*FixedMatrixSetIdentity) ( AIFixedMatrix *m ); - AIAPI AIBoolean (*FixedMatrixEqual) ( AIFixedMatrix *m, AIFixedMatrix *n ); - AIAPI AIBoolean (*FixedMatrixIdentity) ( AIFixedMatrix *m ); - AIAPI AIBoolean (*FixedMatrixSingular) ( AIFixedMatrix *m ); - AIAPI void (*FixedMatrixSetTranslate) ( AIFixedMatrix *m, AIFixed tx, AIFixed ty ); - AIAPI void (*FixedMatrixSetScale) ( AIFixedMatrix *m, AIFixed h, AIFixed v ); - AIAPI void (*FixedMatrixSetRotate) ( AIFixedMatrix *m, AIFixed angle ); - AIAPI void (*FixedMatrixConcatTranslate) ( AIFixedMatrix *m, AIFixed tx, AIFixed ty ); - AIAPI void (*FixedMatrixConcatScale) ( AIFixedMatrix *m, AIFixed h, AIFixed v ); - AIAPI void (*FixedMatrixConcatRotate) ( AIFixedMatrix *m, AIFixed angle ); - AIAPI void (*FixedMatrixConcat) (AIFixedMatrix *m, AIFixedMatrix *n, AIFixedMatrix *result ); - AIAPI short (*FixedMatrixInvert) (AIFixedMatrix *m ); - AIAPI void (*FixedMatrixXformPoint) ( AIFixedMatrix *m, AIFixedPoint *a, AIFixedPoint *result ); - -} AIFixedMathSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIFixedMath__ +#define __AIFixedMath__ + +/* + * Name: AIFixedMath.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Fixed-Point Math Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIFixedMath.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIFixedMathSuite "AI Fixed Math Suite" +#define kAIFixedMathSuiteVersion AIAPI_VERSION(4) +#define kAIFixedMathVersion kAIFixedMathSuiteVersion + + +// common AIFixed constants +#define kFixedMin ((AIFixed) 0x80000000) +#define kFixedMax ((AIFixed) 0x7FFFFFFF) +#define kFixedUnknown ((AIFixed) 0x80000000) + +#ifndef kFixedOne +#define kFixedOne ((AIFixed) 0x00010000) +#endif +#ifndef kFixedZero +#define kFixedZero ((AIFixed) 0x00000000) +#endif +#define kFixedHundredth ((AIFixed) 0x0000028F) +#define kFixedSixteenth ((AIFixed) 0x00001000) +#define kFixedTenth ((AIFixed) 0x00001999) +#define kFixedEighth ((AIFixed) 0x00002000) +#ifndef kFixedQuarter +#define kFixedQuarter ((AIFixed) 0x00004000) +#endif +#ifndef kFixedHalf +#define kFixedHalf ((AIFixed) 0x00008000) +#endif +#define kFixedSevenEighths ((AIFixed) 0x0000E000) +#define kFixedOne1 ((AIFixed) 0x0000FFFF) +#define kFixedOneThird ((AIFixed) 0x00005555) +#define kFixedFourThirds ((AIFixed) 0x00015555) +#define kFixedThreeHalves ((AIFixed) 0x00018000) + +#define kFixedPi4 ((AIFixed) 0x0000C910) +#define kFixedPi2 ((AIFixed) 0x00019220) +#define kFixedPi ((AIFixed) 0x00032440) +#define kFixedTwoPi ((AIFixed) 0x00064880) +#define kFixedGolden ((AIFixed) 0x00019E37) + +// common AIFract constants +#define kFractZero ((AIFract) 0x00000000) +#define kFractFixedRound ((AIFract) 0x00002000) +#define kFractPi180 ((AIFract) 0x011DF4A0) +#define kFractQuarter ((AIFract) 0x10000000) +#define kFractHalf ((AIFract) 0x20000000) +#define kFractOne ((AIFract) 0x40000000) +#define kFractFourThirds ((AIFract) 0x55555555) +#define kFractSqrtTwo ((AIFract) 0x5A82799A) +#define kFractUnknown ((AIFract) 0x80000000) + + +/******************************************************************************* + ** + ** Macros + ** + **/ + +#if __BUILD_PLUGIN__ + +// type conversion macros +#define _FixedToFract(a) ((AIFract)(a) << 14) +#define _FractRoundToFixed(a) ((AIFixed) (((a) + kFractFixedRound) >> 14)) +#define _FractTruncToFixed(a) ((AIFixed) ((a) >> 14)) + +#define _ShortToFixed(a) ((AIFixed)(a) << 16) +#define _FixedRoundToShort(a) ((ai::int16) (((a) + kFixedHalf) >> 16)) +#define _FixedTruncToShort(a) ((ai::int16) ((a) >> 16)) + +#define _FloatToFixed(a) ((AIFixed)((a) * 65536.0)) // useful for constants; eg, _FloatToFixed(1.5) generates 0x00018000 + + +// other macros +#define _FixedFloor(a) ((AIFixed) ((a) & 0xFFFF0000L)) +#define _FixedCeiling(a) _FixedFloor((a) + kFixedOne1) +#define _FixedRound(a) _FixedFloor((a) + kFixedHalf) +#define _FixedFraction(a) ((a) & 0x0000FFFFL) +#define _FixedAverage(a, b) (((a) + (b) + 1) >> 1) +#define _FixedHalf(a) (((a) + 1) >> 1) +#define _FixedOverflow(a) ((a) == kFixedMax || (a) == kFixedMin) + +#endif + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Use these functions to work with fixed-point numbers. These + exist primarily for use by older plug-ins that were fixed-point based. Modern + plug-ins should use the \c #AIRealMathSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIFixedMathSuite and \c #kAIFixedMathVersion. + */ +typedef struct { + + AIAPI AIFixed (*FixedAdd) ( AIFixed a, AIFixed b ); + AIAPI AIFixed (*FixedMul) ( AIFixed a, AIFixed b ); + AIAPI AIFract (*FractMul) ( AIFract a, AIFract b ); + AIAPI AIFixed (*FractFixedMul) ( AIFract a, AIFixed b ); + AIAPI AIFixed (*FixedDiv) ( AIFixed a, AIFixed b ); + AIAPI AIFract (*FractDiv) ( AIFract a, AIFract b ); + AIAPI AIFixed (*ShortRatio) ( ai::int16 a, ai::int16 b ); + AIAPI AIFract (*FixedRatio) ( AIFixed a, AIFixed b ); + AIAPI AIFixed (*FractRatio) ( AIFract a, AIFract b ); + AIAPI AIFixed (*FixedMulAdd) ( AIFixed a, AIFixed b, AIFixed c, AIFixed d ); + AIAPI AIFixed (*FixedMultiple) (AIFixed a, AIFixed multiple, AIBoolean ceiling ); + + AIAPI AIFract (*FixedSin) ( AIFixed a ); + AIAPI AIFract (*FixedCos) ( AIFixed a ); + AIAPI AIFixed (*FixedATan) ( AIFixed a, AIFixed b ); + AIAPI AIFixed (*DegreeToRadian) ( AIFixed degree ); + AIAPI AIFixed (*RadianToDegree) ( AIFixed radian ); + + AIAPI AIUFract (*FractSqrt) ( AIUFract a ); + AIAPI AIFixed (*FixedLength) ( AIFixed a, AIFixed b ); + AIAPI AIFixed (*FixedInterpolate) ( AIFixed a, AIFixed b, AIFixed t ); + + AIAPI AIFloat (*FixedToFloat) ( AIFixed a ); + AIAPI AIFixed (*FloatToFixed) ( AIFloat a ); + AIAPI AIFloat (*FractToFloat) ( AIFract a ); + AIAPI AIFract (*FloatToFract) ( AIFloat a ); + + AIAPI void (*FixedPointAdd) ( AIFixedPoint *a, AIFixedPoint *b, AIFixedPoint *result ); + AIAPI void (*FixedPointSubtract) ( AIFixedPoint *a, AIFixedPoint *b, AIFixedPoint *result ); + AIAPI AIBoolean (*FixedPointEqual) ( AIFixedPoint *a, AIFixedPoint *b ); + AIAPI AIBoolean (*FixedPointClose) ( AIFixedPoint *a, AIFixedPoint *b, AIFixed tolerance ); + AIAPI AIFixed (*FixedPointAngle) ( AIFixedPoint *a, AIFixedPoint *b ); + AIAPI AIFixed (*FixedPointLength) ( AIFixedPoint *a, AIFixedPoint *b ); + AIAPI void (*FixedPointLengthAngle) ( AIFixed length, AIFixed angle, AIFixedPoint *result ); + AIAPI void (*FixedPointInterpolate) ( AIFixedPoint *a, AIFixedPoint *b, AIFixed t, AIFixedPoint *result ); + + AIAPI void (*FixedRectSet) ( AIFixedRect *a, AIFixed left, AIFixed top, AIFixed right, AIFixed bottom ); + AIAPI AIBoolean (*FixedRectEqual) ( AIFixedRect *a, AIFixedRect *b ); + AIAPI AIBoolean (*FixedRectEmpty) ( AIFixedRect *a ); + AIAPI void (*FixedRectInset) ( AIFixedRect *a, AIFixed h, AIFixed v ); + AIAPI void (*FixedRectOffset) ( AIFixedRect *a, AIFixed h, AIFixed v ); + AIAPI void (*FixedRectUnion) ( AIFixedRect *a, AIFixedRect *b, AIFixedRect *result ); + AIAPI void (*FixedPointUnion) ( AIFixedPoint *a, AIFixedRect *b, AIFixedRect *result ); + AIAPI AIBoolean (*FixedRectOverlap) ( AIFixedRect *a, AIFixedRect *b ); + AIAPI AIBoolean (*FixedRectIntersect) ( AIFixedRect *a, AIFixedRect *b, AIFixedRect *result ); + AIAPI AIBoolean (*FixedRectInFixedRect) ( AIFixedRect *a, AIFixedRect *b ); + AIAPI AIBoolean (*FixedPointInFixedRect) ( AIFixedPoint *a, AIFixedRect *b ); + AIAPI void (*FixedRectAlign) ( AIFixedRect *a, AIFixedRect *result ); + + AIAPI void (*FixedMatrixSet) ( AIFixedMatrix *m, AIFixed a, AIFixed b, AIFixed c, AIFixed d, AIFixed tx, AIFixed ty ); + AIAPI void (*FixedMatrixSetIdentity) ( AIFixedMatrix *m ); + AIAPI AIBoolean (*FixedMatrixEqual) ( AIFixedMatrix *m, AIFixedMatrix *n ); + AIAPI AIBoolean (*FixedMatrixIdentity) ( AIFixedMatrix *m ); + AIAPI AIBoolean (*FixedMatrixSingular) ( AIFixedMatrix *m ); + AIAPI void (*FixedMatrixSetTranslate) ( AIFixedMatrix *m, AIFixed tx, AIFixed ty ); + AIAPI void (*FixedMatrixSetScale) ( AIFixedMatrix *m, AIFixed h, AIFixed v ); + AIAPI void (*FixedMatrixSetRotate) ( AIFixedMatrix *m, AIFixed angle ); + AIAPI void (*FixedMatrixConcatTranslate) ( AIFixedMatrix *m, AIFixed tx, AIFixed ty ); + AIAPI void (*FixedMatrixConcatScale) ( AIFixedMatrix *m, AIFixed h, AIFixed v ); + AIAPI void (*FixedMatrixConcatRotate) ( AIFixedMatrix *m, AIFixed angle ); + AIAPI void (*FixedMatrixConcat) (AIFixedMatrix *m, AIFixedMatrix *n, AIFixedMatrix *result ); + AIAPI short (*FixedMatrixInvert) (AIFixedMatrix *m ); + AIAPI void (*FixedMatrixXformPoint) ( AIFixedMatrix *m, AIFixedPoint *a, AIFixedPoint *result ); + +} AIFixedMathSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFlashPrefs.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFlashPrefs.h deleted file mode 100644 index 7f535f4..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFlashPrefs.h +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Name: AIFlashPrefs.h - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1999-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -//----------------------------------------------------------------------------- - -#ifndef AIFLASHPREFS_H -#define AIFLASHPREFS_H - -#include "AIUnicodeString.h" -#include "AIHeaderBegin.h" - -/** @file AIFlashPrefs.h */ - -/** Export options for layers */ -typedef enum _FlashExportOption -{ - /** Export file to SWF file */ - exportAIFileToSWFFile = 1, - /** Export layers to SWF frames */ - exportAILayersToSWFFrames, - /** Export layers to SWF file */ - exportAILayersToSWFFiles, - /** Export layers to SWF symbols */ - exportAILayersToSWFSymbols, - /** Multiple Artboards */ - exportMultipleArtboards -} FlashExportOption; - - /** The version for the exported SWF File */ - typedef enum _FlashExportVersion - { - swfVersion1 = 1, - swfVersion2, - swfVersion3, - swfVersion4, - swfVersion5, - swfVersion6, - swfVersion7, - swfVersion8, - swfVersion9 - } FlashExportVersion; - -/** Output area */ -typedef enum _FlashOutputSize -{ - /** Entire art bounds */ - outputArtBounds = 1, - /** Bounds of crop area contents */ - outputCropAreaBounds, - /** Bounds of art board contents */ - outputArtboardBounds -} FlashOutputSize; - -/** Image format */ -typedef enum _FlashImageFormat -{ - /** ZLIB */ - formatZLIB = 1, - /** JPEG (trailing underscore to distinguish from SVG value). */ - formatJPEG_ -} FlashImageFormat; - -/** JPEG image quality options */ -typedef enum _FlashJPEGQuality -{ - qualityLow = 1, - qualityMedium, - qualityHigh, - qualityMaximum -} FlashJPEGQuality; - -/** JPEG rasterization method */ -typedef enum _FlashJPEGMethod -{ - methodBaseline = 1, - methodOptimized -} FlashJPEGMethod; - -/** Flash local-playback security level */ -typedef enum _FlashPlaybackSecurity -{ - methodLocalFilesOnly = 1, - methodNetworkFilesOnly -} FlashPlaybackSecurity; - - -/** Whether and how to overwrite an existing file. */ -typedef enum _FlashOverwriteOption -{ - kAskBeforeReplacingFile = 1, - kAlwaysReplaceExistingFile, - kNeverReplaceExistingFile -} FlashOverwriteOption; - -/** Animation blending options */ -typedef enum _FlashAnimateBlendOption { - kAnimateBlendNone = 0, - kAnimateBlendInSequence = 1, - kAnimateBlendInBuild -} FlashAnimateBlendOption ; - -/** Conversion and export options */ -typedef struct _FlashOptions -{ - /** SWF preset name. Set to empty string to use [Default] */ - ASUnicode m_presetName[256]; - /** Export options */ - FlashExportOption m_exportOption; - /** Version of the exported SWF file*/ - FlashExportVersion m_exportVersion; - /** The number of frames per second that the player will use in rendering - the SWF file. In the range [0.01..120] */ - AIReal m_frameRate; - /** When true, make a loop. */ - AIBoolean m_looping; - /** When true, write an SWF file that cannot be imported by other - applications, but only read by the flash player for rendering. - Corresponds to "Protect from Import" in the UI.*/ - AIBoolean m_readOnly; - /** Output area (artboard or page) */ - FlashOutputSize m_outputSize; - /** Curve quality, a value in the range [0..10], which controls the tolerance as - cubic bezier curves are converted to quadratic curves. 0 is the highest tolerance - resulting in lowest quality, 10 is the lowest tolerance resulting in highest quality.*/ - int m_curveQuality; - /** Image format (JPEG or ZLIB) */ - FlashImageFormat m_imageFormat; - /** Image quality for JPEG */ - FlashJPEGQuality m_jpegQuality; - /** Rasterization method for JPEG */ - FlashJPEGMethod m_jpegMethod; - /** Image resolution in pixels per inch */ - AIReal m_imageResolution; - /** Whether and how to overwrite an existing file */ - FlashOverwriteOption m_overwriteOption; - /** When true, flatten layers before conversion */ - AIBoolean m_flattenArtwork; - /** When true, \c m_bgLayerIndex specifies a list of layers to use as - static contents in the animated SWF file. The contents of those layers - is included in every SWF frame. */ - AIBoolean m_useBackground; - /** Pointer to an array of layers to use as static contents in the animated SWF file - if \c m_useBackground is true. - The contents of those layers is included in every SWF frame. */ - ai::int32 *m_bgLayerIndex; - /** When animating blends, the animation method. Default is \c #kAnimateBlendNone. */ - FlashAnimateBlendOption m_animateBlendOption; - /** When true, convert layers from the top down */ - AIBoolean m_orderLayersTopDown; - /** The background color */ - AIRGBColor m_backgoundColor; - /** When true, export text as outlines */ - AIBoolean m_exportTextAsOutlines; - /** When true, compress the output file */ - AIBoolean m_compressFile; - /** When true, export all symbols in Symbols palette to the SWF File */ - AIBoolean m_exportArtboardSymbols; - /** When true, ignore kerning in the text objects */ - AIBoolean m_ignoreTextKerning; - /** Whether the SWF file can access local files only, or network files only */ - FlashPlaybackSecurity m_playbackSecurity; - /** When true, include some metadata information for the SWF file - (such as Author, Title, Description). */ - AIBoolean m_includeMetadata; -} FlashOptions; - -//----------------------------------------------------------------------------- - -#define kFlashPrefPrefix "FlashFormat" - -#define kFlashPrefPresetName "FlashExportPreset" - -#define kFlashPrefAdvancedOptions "FlashAdvancedOptions" -#define kFlashPrefDefaultAdvancedOptions false - -#define kFlashPrefExportOption "FlashExportOption" -#define kFlashPrefDefaultExportOption exportAIFileToSWFFile - -#define kFlashPrefExportVersion "FlashExportVersion" -#define kFlashPrefDefaultExportVersion swfVersion9 - -#define kFlashPrefFrameRate "FlashFrameRate" -#define kFlashPrefDefaultFrameRate 12.0 - -#define kFlashPrefLooping "FlashLooping" -#define kFlashPrefDefaultLooping false - -#define kFlashPrefReadOnly "FlashReadOnly" -#define kFlashPrefDefaultReadOnly false - -#define kFlashPrefOutputSize "FlashOutputSize" -#define kFlashPrefDefaultOutputSize outputArtBounds - -#define kFlashPrefCurveQuality "FlashCurveQuality" -#define kFlashPrefDefaultCurveQuality 7 - -#define kFlashPrefImageFormat "FlashImageFormat" -#define kFlashPrefDefaultImageFormat formatZLIB - -#define kFlashPrefJPEGQuality "FlashJPEGQuality" -#define kFlashPrefDefaultJPEGQuality (FlashJPEGQuality)3 - -#define kFlashPrefJPEGMethod "FlashJPEGMethod" -#define kFlashPrefDefaultJPEGMethod methodBaseline - -#define kFlashPrefImageResolution "FlashImageResolution" -#define kFlashPrefDefaultImageResolution 72.0 - -#define kFlashPrefOverwriteOption "FlashOverwriteOption" -#define kFlashPrefDefaultOverwriteOption kAskBeforeReplacingFile - -#define kFlashPrefPreserveAppearance "FlashPreserveAppearance" -#define kFlashPrefDefaultPreserveAppearance false - -#define kFlashPrefUseBackground "FlashUseBackground" -#define kFlashPrefDefaultUseBackground false - -#define kFlashPrefAnimateBlendOption "FlashAnimateBlendOption" -#define kFlashPrefDefaultAnimateBlendOption kAnimateBlendNone - -#define kFlashPrefOrderLayersOption "FlashOrderLayersTopDown" -#define kFlashPrefDefaultOrderLayersOption false - -#define kFlashPrefTextAsOutlines "FlashTextAsOutlines" -#define kFlashPrefDefaultTextAsOutlines true - -#define kFlashPrefBackgroundColorRed "FlashBackgroundColorRed" -#define kFlashPrefDefaultBackGroundRed 0xFFFF - -#define kFlashPrefBackgroundColorGreen "FlashBackgroundColorGreen" -#define kFlashPrefDefaultBackGroundGreen 0xFFFF - -#define kFlashPrefBackgroundColorBlue "FlashBackgroundColorBlue" -#define kFlashPrefDefaultBackGroundBlue 0xFFFF - -#define kFlashPrefCompressFile "FlashCompressFile" -#define kFlashPrefDefaultCompressFile false - - -#define kFlashPrefExportArtboardSymbols "FlashArtboardSymbols" -#define kFlashPrefDefaultExportArtboardSymbols false - -#define kFlashPrefIgnoreTextKerning "FlashIgnoreTextKerning" -#define kFlashPrefDefaultIgnoreTextKerning false - -#define kFlashPrefPlaybackSecurity "FlashLocalPlaybackSecurity" -#define kFlashPrefDefaultPlaybackSecurity methodLocalFilesOnly - -#define kFlashPrefIncludeMetadata "FlashXMPMetadata" -#define kFlashPrefDefaultIncludeMetadata false - - -#include "AIHeaderEnd.h" // __cplusplus - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFolders.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFolders.h index 381300f..bd3f0ac 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFolders.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFolders.h @@ -1,416 +1,421 @@ -#ifndef __AIFolders__ -#define __AIFolders__ - -/* - * Name: AIFolders.h - * $Revision: 1 $ - * Author: dmaclach - * Date: - * Purpose: Adobe Illustrator Folders Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIFilePath.h" - -#include "AIHeaderBegin.h" - -/** @file AIFolders.h */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAIFoldersSuite "AI Folders Suite" -#define kAIFoldersSuiteVersion5 AIAPI_VERSION(5) -#define kAIFoldersSuiteVersion kAIFoldersSuiteVersion5 -#define kAIFoldersVersion kAIFoldersSuiteVersion - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** @ingroup Errors - Folder error, see \c #AIFoldersSuite. */ -#define kFolderNotFoundErr 'D!FD' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** - Identifiers for Illustrator folders. See \c #AIFoldersSuite. -*/ -typedef enum AIFolderType -{ - kAIApplicationFolderType = 0, - kAIPluginsFolderType = 1, - kAIPrimaryScratchFolderType = 2, - kAISecondaryScratchFolderType = 3, - kAIPreferencesFolderType = 4, - kAIUserSupportFolderType = 5, - kAIUserSupportAIFolderType = 6, - kAIUserSupportAIPluginsFolderType = 7, - kAIApplicationSupportCommonFolderType = 8, - kAIApplicationSupportCommonColorFolderType = 9, - kAIApplicationSupportCommonTypeSupportFolderType = 10, - kAIApplicationSupportCommonFontsFolderType = 11, - kAIApplicationSupportCommonFontsReqrdFolderType = 12, - kAIApplicationSupportCommonFontsReqrdCMapsFolderType = 13, - kAIRequiredFontsFolderType = 14, - kAIFontsFolderType = 15, - kAIMyDocumentsFolderType = 16, - kAIApplicationSupportCommonWorkflowFolderType = 17, - kAIPrinterDescriptionsFolderType = 18, - kAIRequiredPluginsFolderType = 19, - kAISettingsFolderType = 20, - kAIColorTableSettingsFolderType = 21, - kAIOptimizeSettingsFolderType = 22, - kAIHelpFolderType = 23, - kAIRootFolderType = 24, - kAIPresetsFolderType = 25, - /* The presets folder and all folders within it are in the application directory and may not be writable, especially on Vista. */ - /* If your code intends to write settings files, please use one of the kAIUserSupport folders or the kAIUserWritable folders */ - /* instead of the kAIPreset folders. */ - kAIPresetActionsFolderType = 26, - kAIPresetBrushesFolderType = 27, - kAIPresetGradientsFolderType = 28, - kAIPresetKeyboardShortcutsFolderType = 29, - kAIPresetPatternsFolderType = 30, - kAIPresetScriptsFolderType = 31, - kAIPresetStylesFolderType = 32, - kAIPresetSwatchesFolderType = 33, - kAIDictionariesFolderType = 34, - kAILegalFolderType = 35, - kAISampleFilesFolderType = 36, - kAIUtilitiesFolderType = 37, - kAIPackageFolderType = 38, - kAIApplicationSupportCommonFontsReqrdBaseFolderType = 39, - kAIHelpersFolderType = 40, - kAIPreviewInFolderType = 41, - /** LEGACY USE ONLY. Templates available to developers are now in \c #kAIUserWritableStartupFileFolderType */ - kAIStartupFileFolderType = 42, - kAIRidersFileFolderType = 43, - kAIHyphenationDictFolderType = 44, - kAIApplicationSupportCommonPDFLFolderType = 45, - kAIApplicationSupportCommonPDFL5FolderType = 46, - kAIApplicationSupportCommonPDFL5CMapsFolderType = 47, - kAIApplicationSupportCommonPDFL5FontsFolderType = 48, - kAIApplicationSupportCommonPrintSupportFolderType = 49, - kAIApplicationSupportCommonColorProfilesFolderType = 50, - kAIApplicationSupportCommonColorSettingsFolderType = 51, - kAIContentsFolderType = 52, - kAIHelpImagesFolderType = 53, - kAIFontsCMapsFolderType = 54, - kAIPresetSymbolsFolderType = 55, - kAITsumeFolderType = 56, - kAISpellingDictFolderType = 57, - kAIPresetTemplatesFolderType = 58, - kAIFontsCFFolderType = 59, - kAIApplicationSupportCommonKinsokuSetFolderType = 60, - kAIApplicationSupportCommonMojikumeSetFolderType = 61, - kAIPresetBlankDocumentsFolderType = 62, - kAIUserSupportCommonFontsFolderType = 63, - kAIFontsCFTempFolderType = 64, - kAILogsFolderType = 65, - kAISampleArtFolderType = 66, - kAISampleSVGFolderType = 67, - kAISampleGraphDesignsFolderType = 68, - kAISampleDataDrivenGraphicsFolderType = 69, - kAIWorkspacesFolderType = 70, - kAIPresetColorBooksFolderType = 71, - kAIPresetLegacyColorBooksFolderType = 72, - kAIPresetSwatchExchangeFolderType = 73, - kAIApplicationSupportCommonLinguisticsFolderType = 74, - kAIApplicationSupportCommonLinguisticsProvidersFolderType = 75, - kAIVersionCueFolderType = 76, // Deprecated. - kAIDemonstratorFolderType = 77, - kAIResourcesFolderType = 78, - kAICoolExtrasFolderType = 79, - kAIOutputSettingsFolderType = 80, - kAIStartupScriptsFolderType = 81, - kAIDesktopFolderType = 82, - kAIIllustratorFormatsFolderType = 83, - kAIAdditionalAIPluginsFolderType = 84, - kAIUserWritableStartupFileFolderType = 85, - kAIUserWritablePresetBrushesFolderType = 86, - kAIUserWritablePresetStylesFolderType = 87, - kAIUserWritablePresetSwatchesFolderType = 88, - kAIUserWritablePresetSwatchExchangeFolderType = 89, - kAIUserWritablePresetSymbolsFolderType = 90, - kAIPresetFlashPanelsFolderType = 91, - kAIPresetKnowhowFolderType = 92, //Deprecated - kAIUserWritablePresetSettingsFolderType = 93, - kAIUserWritablePresetOptimizeSettingsFolderType = 94, - kAIUserWritablePresetOutputSettingsFolderType = 95, - kAIUserWritablePresetColorTableSettingsFolderType = 96, - kAIRequiredStartupProfilesFolderType = 97, - kAIPresetWorkspacesFolderType = 98, - kAIPresetKulerFolderType = 99, //Deprecated - kAIPresetWelcomeScreenFolderType = 100, - kAIRequiredFolderType = 101, - kAIRequiredResourcesFolderType = 102, - kAIRequiredLocalizedResourcesFolderType = 103, - kAIWSMgrCfgFolderType = 104, - kAIModifiedWorkspacesFolderType = 105, - kAIToolsFolderType = 106, - kAIPreferencesRootFolderType = 107, - kAIRequiredLinguisticsFolderType = 108, - kAITemporayFolder = 109, - kAIPresetChartsFolderType = 110, - kAIMACSupportFilesFolderType = 111, - kAIFrameworksDllsPath = 112, - kAIUserLocalSupportFolderType = 113, - kAIAMTParentFolderType = 114, - -} AIFolderType; - -/** Types of files that can be acquired by \c #AIFoldersSuite::GetFileName() */ -typedef enum -{ - /** Temporary file */ - kAITemporaryFileType = 1 - -} AIFileType; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions to get the locations of the - standard folders used by Illustrator. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIFoldersSuite and \c #kAIFoldersVersion. - - The following shows the layout of these folders and the corresponding identifiers. - -Local Hierarchy - -@verbatim -Adobe Illustrator x <- kAIRootFolderType - Adobe Illustrator x: <- kAIPackageFolderType - Contents: <- kAIContentsFolderType - Windows/MacOSClassic: <- kAIApplicationFolderType - +Executable - +Shared libraries - Help: <- kAIHelpFolderType - +HTML Help Files - images: <- kAIHelpImagesFolderType - +Help graphics - Helpers: <- kAIHelpersFolderType - Preview In: <- kAIPreviewInFolderType - Required: <- kAIRequiredFolderType - +Required plug-ins - Fonts: <- kAIRequiredFontsFolderType - +Required fonts - Startup Profiles <- kAIRequiredStartupProfilesFolderType - +Startup files - - Legal: <- kAILegalFolderType - +EULA - - Plug-ins: <- kAIPluginsFolderType (user can not change as of AI13) - (kAIStartupFileFolderType, kAIRidersFileFolderType both point here) - Extensions: - Illustrator Filters: - Illustrator Formats: <- kAIIllustratorFormatsFolderType - Photoshop Effects: - Photoshop Filters: - Photoshop Formats: - Text Filters: - Tools: <- kAIToolsFolderType - Tsume: <- kAITsumeFolderType - - Presets: <- kAIPresetsFolderType - (Note: The presets folder and subfolders are in the application directory and may not be writable. - To write settings files, use one of the kAIUserSupport folders or the kAIUserWritable folders.) - Actions: <- kAIPresetActionsFolderType - Brushes: <- kAIPresetBrushesFolderType - Keyboard Shortcuts: <- kAIPresetKeyboardShortcutsFolderType - Save for Web Settings: <- kAISettingsFolderType - Color Tables: <- kAIColorTableSettingsFolderType - +Color tables - Optimize: <- kAIOptimizeSettingsFolderType - +Optimize settings - Output Settings: - +Output settings <- kAIOutputSettingsFolderType - Scripts: <- kAIPresetScriptsFolderType - Styles: <- kAIPresetStylesFolderType - Swatches: <- kAIPresetSwatchesFolderType + kAIPresetSwatchExchangeFolderType - Color Systems: <- kAIPresetColorSystemsFolderType - Color Books: <- kAIPresetColorBooksFolderType - Legacy: <- kAIPresetLegacyColorBooksFolderType - Gradients: <- kAIPresetGradientsFolderType - Patterns: <- kAIPresetPatternsFolderType - Symbols: <- kAIPresetSymbolsFolderType - Templates: <- kAIPresetTemplatesFolderType - Blank Documents: <- kAIPresetBlankDocumentsFolderType - Flash Panels: <- kAIPresetFlashPanelsFolderType - Welcome Screen: <- kAIPresetWelcomeScreenFolderType - Workspaces: <- kAIPresetWorkspacesFolderType - - Fonts: <- kAIFontsFolderType - CMaps: <- kAIFontsCMapsFolderType - - Sample Files: <- kAISampleFilesFolderType - Graph Designs: <- kAISampleGraphDesignsFolderType - Sample Art: <- kAISampleArtFolderType - SVG: <- kAISampleSVGFolderType - Data-Driven Graphics: <- kAIDataDrivenGraphicsFolderType - - StartupScripts: <- kAIStartupScriptsFolderType - - Utilities: <- kAIUtilitiesFolderType - @endverbatim - - System Hierarchies - - The following describes the parts of the Illustrator directory hierarchy - that are located under system folders. The platform-specific directory - names are shown following. - - @verbatim - [PrimaryScratch] <- kAIPrimaryScratchFolderType + primary scratch file location - [SecondaryScratch] <- kAISecondaryScratchFolderType + secondary scratch file location - [AIPreferences] <- kAIPreferencesFolderType + preferences file location + plug-in cache file location - [UserSupport] <- kAIUserSupportFolderType - Adobe Illustrator X <- kAIUserSupportAIFolderType - Startup Templates: <- kAIUserWritableStartupFileFolderType - Plug-ins <- kAIUserSupportAIPluginsFolderType + plug-ins available to current user - Composite Fonts <- kAIFontsCFFolderType - Temp <- kAIFontsCFTempFolderType - Brushes <- kAIUserWritablePresetBrushesFolderType - Graphic Styles <- kAIUserWritablePresetStylesFolderType - Swatches <- kAIUserWritablePresetSwatchesFolderType + kAIUserWritablePresetSwatchExchangeFolderType - Symbols <- kAIUserWritablePresetSymbolsFolderType - Save for Web Settings <- kAIUserWritablePresetSettingsFolderType - Color Tables <- kAIUserWritablePresetColorTableSettingsFolderType - Optimize <- kAIUserWritablePresetOptimizeSettingsFolderType - Output Settings <- kAIUserWritablePresetOutputSettingsFolderType - Fonts <- kAIUserSupportCommonFontsFolderType - [ApplicationSupportCommon] <- kAIApplicationSupportCommonFolderType - Color <- kAIApplicationSupportCommonColorFolderType - Profiles <- kAIApplicationSupportCommonColorProfilesFolderType - Settings <- kAIApplicationSupportCommonColorSettingsFolderType - typeSpt <- kAIApplicationSupportCommonTypeSupportFolderType - Kinsoku Sets <- kAIApplicationSupportCommonKinsokuSetFolderType - Mojikume Sets <- kAIApplicationSupportCommonMojikumeSetFolderType - Fonts <- kAIApplicationSupportCommonFontsFolderType - Reqrd <- kAIApplicationSupportCommonFontsReqrdFolderType - Base <- kAIApplicationSupportCommonFontsReqrdBaseFolderType - cmaps <- kAIApplicationSupportCommonFontsReqrdCMapsFolderType - PDFL <- kAIApplicationSupportCommonPDFLFolderType - PDFL5.0 <- kAIApplicationSupportCommonPDFL5FolderType - cmaps <- kAIApplicationSupportCommonPDFL5CMapsFolderType - fonts <- kAIApplicationSupportCommonPDFL5FontsFolderType - Printspt <- kAIApplicationSupportCommonPrintSupportFolderType - Workflow <- kAIApplicationSupportCommonWorkflowFolderType - Linguistics <- kAIApplicationSupportCommonLinguisticsFolderType - Providers <- kAIApplicationSupportCommonLinguisticsProvidersFolderType - Proximity <- kAIDictionariesFolderType, kAIHyphenationDictFolderType,kAISpellingDictFolderType (all point at same folder) - [MyDocuments] <- kAIMyDocumentsFolderType + default documents file location - [PPDs] <- kAIPrinterDescriptionsFolderType + PPD location - [Logs] <- kAILogsFolderType - [AdditionalPlugins] <- kAIAdditionalAIPluginsFolderType + additional plug-ins location (new in AI13, user can change in Preferences) - @endverbatim - - Platform-specific Directories - - \li Windows 2000 - @verbatim - PrimaryScratch = System definition of temporary but can be changed by user - SecondaryScratch = System definition of temporary but can be changed by user - AIPreferences = Documents and Settings\username\Application Data\Adobe\Adobe Illustrator X - UserSupport = Documents and Settings\username\Application Data\Adobe - ApplicationSupportCommon = Program Files\Common Files\Adobe - MyDocuments = Documents and Settings\username\My Documents - PPDs = unknown - Logs = Documents and Settings\username\Application Data\Adobe\Logs - kAIResourcesFolderType = kAIApplicationFolderType - kAIDesktopFolderType = CSIDL_DESKTOPDIRECTORY: The file system directory used - to physically store file objects on the desktop (not to - be confused with the desktop folder itself). A typical - path is C:\Documents and Settings\username\Desktop. - AdditionalPlugins = Arbitrary location can be specified by user in Preferences - @endverbatim - - \li Mac OS X - @verbatim - PrimaryScratch = System definition of temporary but can be changed by user - SecondaryScratch = System definition of temporary but can be changed by user - AIPreferences = ~/Library/Preferences/Adobe Illustrator X - UserSupport = ~/Library/Application Support/Adobe - ApplicationSupportCommon = /Library/Application Support/Adobe - MyDocuments = ~/Documents - PPDs = Libraries/Printers/PPDs - Logs = ~/Library/Logs/Adobe Illustrator CS - kAIResourcesFolderType = kAIApplicationFolderType/Resources - kAIDesktopFolderType = ~/Desktop - AdditionalPlugins = Arbitrary location can be specified by user in Preferences - @endverbatim - -*/ -struct AIFoldersSuite { - - /** Gets a path for an Illustrator folder. - @param type The Illustrator folder to find. - @param createFolder When true, creates a folder of the given type if it - does not already exist. - @param folder [out] A buffer in which to return the folder path. - */ - AIAPI AIErr (*FindFolder)(AIFolderType type, AIBoolean createFolder, ai::FilePath &folder); - - /** Retrieves the file-system name of an Illustrator folder. - @param type The Illustrator folder. - @param name [out] A buffer in which to return the name of the folder - (not the full path). Must be of size \c #kMaxPathLength. - */ - AIAPI AIErr (*GetFolderName)(AIFolderType type, ai::UnicodeString &name); - - /** Creates a file path object for a temporary file. Generates a unique, - temporary file name. Does not check whether the file exists. - @param type The file type, must be \c #kAITemporaryFileType. - @param file [out] A buffer in which to return the file path. - */ - AIAPI AIErr (*GetFileName)(AIFileType type, ai::FilePath &file); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIFolders__ +#define __AIFolders__ + +/* + * Name: AIFolders.h + * $Revision: 1 $ + * Author: dmaclach + * Date: + * Purpose: Adobe Illustrator Folders Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIFilePath.h" + +#include "AIHeaderBegin.h" + +/** @file AIFolders.h */ + +/******************************************************************************* + ** + ** Suite name and version + ** + **/ + +#define kAIFoldersSuite "AI Folders Suite" +#define kAIFoldersSuiteVersion5 AIAPI_VERSION(5) +#define kAIFoldersSuiteVersion kAIFoldersSuiteVersion5 +#define kAIFoldersVersion kAIFoldersSuiteVersion + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** @ingroup Errors + Folder error, see \c #AIFoldersSuite. */ +#define kFolderNotFoundErr 'D!FD' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** + Identifiers for Illustrator folders. See \c #AIFoldersSuite. +*/ +typedef enum AIFolderType +{ + kAIApplicationFolderType = 0, + kAIPluginsFolderType = 1, + kAIPrimaryScratchFolderType = 2, + kAISecondaryScratchFolderType = 3, + kAIPreferencesFolderType = 4, + kAIUserSupportFolderType = 5, + kAIUserSupportAIFolderType = 6, + kAIUserSupportAIPluginsFolderType = 7, + kAIApplicationSupportCommonFolderType = 8, + kAIApplicationSupportCommonColorFolderType = 9, + kAIApplicationSupportCommonTypeSupportFolderType = 10, + kAIApplicationSupportCommonFontsFolderType = 11, + kAIApplicationSupportCommonFontsReqrdFolderType = 12, + kAIApplicationSupportCommonFontsReqrdCMapsFolderType = 13, + kAIRequiredFontsFolderType = 14, + kAIFontsFolderType = 15, + kAIMyDocumentsFolderType = 16, + kAIApplicationSupportCommonWorkflowFolderType = 17, + kAIPrinterDescriptionsFolderType = 18, + kAIRequiredPluginsFolderType = 19, + kAISettingsFolderType = 20, + kAIColorTableSettingsFolderType = 21, + kAIOptimizeSettingsFolderType = 22, + kAIHelpFolderType = 23, + kAIRootFolderType = 24, + kAIPresetsFolderType = 25, + /* The presets folder and all folders within it are in the application directory and may not be writable, especially on Vista. */ + /* If your code intends to write settings files, please use one of the kAIUserSupport folders or the kAIUserWritable folders */ + /* instead of the kAIPreset folders. */ + kAIPresetActionsFolderType = 26, + kAIPresetBrushesFolderType = 27, + kAIPresetGradientsFolderType = 28, + kAIPresetKeyboardShortcutsFolderType = 29, + kAIPresetPatternsFolderType = 30, + kAIPresetScriptsFolderType = 31, + kAIPresetStylesFolderType = 32, + kAIPresetSwatchesFolderType = 33, + kAIDictionariesFolderType = 34, + kAILegalFolderType = 35, + kAISampleFilesFolderType = 36, + kAIUtilitiesFolderType = 37, + kAIPackageFolderType = 38, + kAIApplicationSupportCommonFontsReqrdBaseFolderType = 39, + kAIHelpersFolderType = 40, + kAIPreviewInFolderType = 41, + /** LEGACY USE ONLY. Templates available to developers are now in \c #kAIUserWritableStartupFileFolderType */ + kAIStartupFileFolderType = 42, + kAIRidersFileFolderType = 43, + kAIHyphenationDictFolderType = 44, + kAIApplicationSupportCommonPDFLFolderType = 45, + kAIApplicationSupportCommonPDFL5FolderType = 46, + kAIApplicationSupportCommonPDFL5CMapsFolderType = 47, + kAIApplicationSupportCommonPDFL5FontsFolderType = 48, + kAIApplicationSupportCommonPrintSupportFolderType = 49, + kAIApplicationSupportCommonColorProfilesFolderType = 50, + kAIApplicationSupportCommonColorSettingsFolderType = 51, + kAIContentsFolderType = 52, + kAIHelpImagesFolderType = 53, + kAIFontsCMapsFolderType = 54, + kAIPresetSymbolsFolderType = 55, + kAITsumeFolderType = 56, + kAISpellingDictFolderType = 57, + kAIPresetTemplatesFolderType = 58, + kAIFontsCFFolderType = 59, + kAIApplicationSupportCommonKinsokuSetFolderType = 60, + kAIApplicationSupportCommonMojikumeSetFolderType = 61, + kAIPresetBlankDocumentsFolderType = 62, + kAIUserSupportCommonFontsFolderType = 63, + kAIFontsCFTempFolderType = 64, + kAILogsFolderType = 65, + kAISampleArtFolderType = 66, + kAISampleSVGFolderType = 67, + kAISampleGraphDesignsFolderType = 68, + kAISampleDataDrivenGraphicsFolderType = 69, + kAIWorkspacesFolderType = 70, + kAIPresetColorBooksFolderType = 71, + kAIPresetLegacyColorBooksFolderType = 72, + kAIPresetSwatchExchangeFolderType = 73, + kAIApplicationSupportCommonLinguisticsFolderType = 74, + kAIApplicationSupportCommonLinguisticsProvidersFolderType = 75, + kAIVersionCueFolderType = 76, // Deprecated. + kAIDemonstratorFolderType = 77, + kAIResourcesFolderType = 78, + kAICoolExtrasFolderType = 79, + kAIOutputSettingsFolderType = 80, + kAIStartupScriptsFolderType = 81, + kAIDesktopFolderType = 82, + kAIIllustratorFormatsFolderType = 83, + kAIAdditionalAIPluginsFolderType = 84, + kAIUserWritableStartupFileFolderType = 85, + kAIUserWritablePresetBrushesFolderType = 86, + kAIUserWritablePresetStylesFolderType = 87, + kAIUserWritablePresetSwatchesFolderType = 88, + kAIUserWritablePresetSwatchExchangeFolderType = 89, + kAIUserWritablePresetSymbolsFolderType = 90, + kAIPresetFlashPanelsFolderType = 91, + kAIPresetKnowhowFolderType = 92, //Deprecated + kAIUserWritablePresetSettingsFolderType = 93, + kAIUserWritablePresetOptimizeSettingsFolderType = 94, + kAIUserWritablePresetOutputSettingsFolderType = 95, + kAIUserWritablePresetColorTableSettingsFolderType = 96, + kAIRequiredStartupProfilesFolderType = 97, + kAIPresetWorkspacesFolderType = 98, + kAIPresetKulerFolderType = 99, //Deprecated + kAIPresetWelcomeScreenFolderType = 100, + kAIRequiredFolderType = 101, + kAIRequiredResourcesFolderType = 102, + kAIRequiredLocalizedResourcesFolderType = 103, + kAIWSMgrCfgFolderType = 104, + kAIModifiedWorkspacesFolderType = 105, + kAIToolsFolderType = 106, + kAIPreferencesRootFolderType = 107, + kAIRequiredLinguisticsFolderType = 108, + kAITemporayFolder = 109, + kAIPresetChartsFolderType = 110, + kAIMACSupportFilesFolderType = 111, + kAIFrameworksDllsPath = 112, + kAIUserLocalSupportFolderType = 113, + kAIAMTParentFolderType = 114, + kAIApplicationSupportCommonx86FolderType = 115, + kAILibraryHostPluginsFolderType = 116, + kAIModifiedPresetsToolsFolderType = 117, + kAIPresetToolsFolderType = 118, + kAISubstanceMaterialFolderType = 119, +} AIFolderType; + +/** Types of files that can be acquired by \c #AIFoldersSuite::GetFileName() */ +typedef enum +{ + /** Temporary file */ + kAITemporaryFileType = 1 + +} AIFileType; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides functions to get the locations of the + standard folders used by Illustrator. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIFoldersSuite and \c #kAIFoldersVersion. + + The following shows the layout of these folders and the corresponding identifiers. + +Local Hierarchy + +@verbatim +Adobe Illustrator x <- kAIRootFolderType + Adobe Illustrator x: <- kAIPackageFolderType + Contents: <- kAIContentsFolderType + Windows/MacOSClassic: <- kAIApplicationFolderType + +Executable + +Shared libraries + Help: <- kAIHelpFolderType + +HTML Help Files + images: <- kAIHelpImagesFolderType + +Help graphics + Helpers: <- kAIHelpersFolderType + Preview In: <- kAIPreviewInFolderType + Required: <- kAIRequiredFolderType + +Required plug-ins + Fonts: <- kAIRequiredFontsFolderType + +Required fonts + Startup Profiles <- kAIRequiredStartupProfilesFolderType + +Startup files + + Legal: <- kAILegalFolderType + +EULA + + Plug-ins: <- kAIPluginsFolderType (user can not change as of AI13) + (kAIStartupFileFolderType, kAIRidersFileFolderType both point here) + Extensions: + Illustrator Filters: + Illustrator Formats: <- kAIIllustratorFormatsFolderType + Photoshop Effects: + Photoshop Filters: + Photoshop Formats: + Text Filters: + Tools: <- kAIToolsFolderType + Tsume: <- kAITsumeFolderType + + Presets: <- kAIPresetsFolderType + (Note: The presets folder and subfolders are in the application directory and may not be writable. + To write settings files, use one of the kAIUserSupport folders or the kAIUserWritable folders.) + Actions: <- kAIPresetActionsFolderType + Brushes: <- kAIPresetBrushesFolderType + Keyboard Shortcuts: <- kAIPresetKeyboardShortcutsFolderType + Save for Web Settings: <- kAISettingsFolderType + Color Tables: <- kAIColorTableSettingsFolderType + +Color tables + Optimize: <- kAIOptimizeSettingsFolderType + +Optimize settings + Output Settings: + +Output settings <- kAIOutputSettingsFolderType + Scripts: <- kAIPresetScriptsFolderType + Styles: <- kAIPresetStylesFolderType + Swatches: <- kAIPresetSwatchesFolderType + kAIPresetSwatchExchangeFolderType + Color Systems: <- kAIPresetColorSystemsFolderType + Color Books: <- kAIPresetColorBooksFolderType + Legacy: <- kAIPresetLegacyColorBooksFolderType + Gradients: <- kAIPresetGradientsFolderType + Patterns: <- kAIPresetPatternsFolderType + Symbols: <- kAIPresetSymbolsFolderType + Templates: <- kAIPresetTemplatesFolderType + Blank Documents: <- kAIPresetBlankDocumentsFolderType + Flash Panels: <- kAIPresetFlashPanelsFolderType + Welcome Screen: <- kAIPresetWelcomeScreenFolderType + Workspaces: <- kAIPresetWorkspacesFolderType + Tools: <- kAIPresetToolsFolderType + + Fonts: <- kAIFontsFolderType + CMaps: <- kAIFontsCMapsFolderType + + Sample Files: <- kAISampleFilesFolderType + Graph Designs: <- kAISampleGraphDesignsFolderType + Sample Art: <- kAISampleArtFolderType + SVG: <- kAISampleSVGFolderType + Data-Driven Graphics: <- kAIDataDrivenGraphicsFolderType + + StartupScripts: <- kAIStartupScriptsFolderType + + Utilities: <- kAIUtilitiesFolderType + @endverbatim + + System Hierarchies + + The following describes the parts of the Illustrator directory hierarchy + that are located under system folders. The platform-specific directory + names are shown following. + + @verbatim + [PrimaryScratch] <- kAIPrimaryScratchFolderType + primary scratch file location + [SecondaryScratch] <- kAISecondaryScratchFolderType + secondary scratch file location + [AIPreferences] <- kAIPreferencesFolderType + preferences file location + plug-in cache file location + [UserSupport] <- kAIUserSupportFolderType + Adobe Illustrator X <- kAIUserSupportAIFolderType + Startup Templates: <- kAIUserWritableStartupFileFolderType + Plug-ins <- kAIUserSupportAIPluginsFolderType + plug-ins available to current user + Composite Fonts <- kAIFontsCFFolderType + Temp <- kAIFontsCFTempFolderType + Brushes <- kAIUserWritablePresetBrushesFolderType + Graphic Styles <- kAIUserWritablePresetStylesFolderType + Swatches <- kAIUserWritablePresetSwatchesFolderType + kAIUserWritablePresetSwatchExchangeFolderType + Symbols <- kAIUserWritablePresetSymbolsFolderType + Save for Web Settings <- kAIUserWritablePresetSettingsFolderType + Color Tables <- kAIUserWritablePresetColorTableSettingsFolderType + Optimize <- kAIUserWritablePresetOptimizeSettingsFolderType + Output Settings <- kAIUserWritablePresetOutputSettingsFolderType + Fonts <- kAIUserSupportCommonFontsFolderType + [ApplicationSupportCommon] <- kAIApplicationSupportCommonFolderType + Color <- kAIApplicationSupportCommonColorFolderType + Profiles <- kAIApplicationSupportCommonColorProfilesFolderType + Settings <- kAIApplicationSupportCommonColorSettingsFolderType + typeSpt <- kAIApplicationSupportCommonTypeSupportFolderType + Kinsoku Sets <- kAIApplicationSupportCommonKinsokuSetFolderType + Mojikume Sets <- kAIApplicationSupportCommonMojikumeSetFolderType + Fonts <- kAIApplicationSupportCommonFontsFolderType + Reqrd <- kAIApplicationSupportCommonFontsReqrdFolderType + Base <- kAIApplicationSupportCommonFontsReqrdBaseFolderType + cmaps <- kAIApplicationSupportCommonFontsReqrdCMapsFolderType + PDFL <- kAIApplicationSupportCommonPDFLFolderType + PDFL5.0 <- kAIApplicationSupportCommonPDFL5FolderType + cmaps <- kAIApplicationSupportCommonPDFL5CMapsFolderType + fonts <- kAIApplicationSupportCommonPDFL5FontsFolderType + Printspt <- kAIApplicationSupportCommonPrintSupportFolderType + Workflow <- kAIApplicationSupportCommonWorkflowFolderType + Linguistics <- kAIApplicationSupportCommonLinguisticsFolderType + Providers <- kAIApplicationSupportCommonLinguisticsProvidersFolderType + Proximity <- kAIDictionariesFolderType, kAIHyphenationDictFolderType,kAISpellingDictFolderType (all point at same folder) + [MyDocuments] <- kAIMyDocumentsFolderType + default documents file location + [PPDs] <- kAIPrinterDescriptionsFolderType + PPD location + [Logs] <- kAILogsFolderType + [AdditionalPlugins] <- kAIAdditionalAIPluginsFolderType + additional plug-ins location (new in AI13, user can change in Preferences) + @endverbatim + + Platform-specific Directories + + \li Windows 2000 + @verbatim + PrimaryScratch = System definition of temporary but can be changed by user + SecondaryScratch = System definition of temporary but can be changed by user + AIPreferences = Documents and Settings\username\Application Data\Adobe\Adobe Illustrator X + UserSupport = Documents and Settings\username\Application Data\Adobe + ApplicationSupportCommon = Program Files\Common Files\Adobe + MyDocuments = Documents and Settings\username\My Documents + PPDs = unknown + Logs = Documents and Settings\username\Application Data\Adobe\Logs + kAIResourcesFolderType = kAIApplicationFolderType + kAIDesktopFolderType = CSIDL_DESKTOPDIRECTORY: The file system directory used + to physically store file objects on the desktop (not to + be confused with the desktop folder itself). A typical + path is C:\Documents and Settings\username\Desktop. + AdditionalPlugins = Arbitrary location can be specified by user in Preferences + @endverbatim + + \li Mac OS X + @verbatim + PrimaryScratch = System definition of temporary but can be changed by user + SecondaryScratch = System definition of temporary but can be changed by user + AIPreferences = ~/Library/Preferences/Adobe Illustrator X + UserSupport = ~/Library/Application Support/Adobe + ApplicationSupportCommon = /Library/Application Support/Adobe + MyDocuments = ~/Documents + PPDs = Libraries/Printers/PPDs + Logs = ~/Library/Logs/Adobe Illustrator CS + kAIResourcesFolderType = kAIApplicationFolderType/Resources + kAIDesktopFolderType = ~/Desktop + AdditionalPlugins = Arbitrary location can be specified by user in Preferences + @endverbatim + +*/ +struct AIFoldersSuite { + + /** Gets a path for an Illustrator folder. + @param type The Illustrator folder to find. + @param createFolder When true, creates a folder of the given type if it + does not already exist. + @param folder [out] A buffer in which to return the folder path. + */ + AIAPI AIErr (*FindFolder)(AIFolderType type, AIBoolean createFolder, ai::FilePath &folder); + + /** Retrieves the file-system name of an Illustrator folder. + @param type The Illustrator folder. + @param name [out] A buffer in which to return the name of the folder + (not the full path). Must be of size \c #kMaxPathLength. + */ + AIAPI AIErr (*GetFolderName)(AIFolderType type, ai::UnicodeString &name); + + /** Creates a file path object for a temporary file. Generates a unique, + temporary file name. Does not check whether the file exists. + @param type The file type, must be \c #kAITemporaryFileType. + @param file [out] A buffer in which to return the file path. + */ + AIAPI AIErr (*GetFileName)(AIFileType type, ai::FilePath &file); + +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFont.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFont.h index 4427562..7e5a7f1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFont.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIFont.h @@ -1,985 +1,992 @@ -/* - * Name: AIFont.h - * $Revision: 1 $ - * Author: Adam Lane - * Date: 7/10/2002 - * Purpose: Adobe Illustrator Font Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIFont__ -#define __AIFont__ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "ATETypesDef.h" -#include "IAIFilePath.hpp" - -#include "ATETypes.h" - - -#ifdef __cplusplus -using ATE::FontRef; -#endif - -#include "AIHeaderBegin.h" - -/** @file AIFont.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIFontSuite "AI Font Suite" -#define kAIFontSuiteVersion6 AIAPI_VERSION(6) -#define kAIFontSuiteVersion kAIFontSuiteVersion6 -#define kAIFontVersion kAIFontSuiteVersion - - -/** @ingroup Notifiers - Sent before a font import operation is executed. See \c #AIFontSuite. */ -#define kAIBeginImportCompFontNotifier "AI Begin Import CompFont Notifier" -/** @ingroup Notifiers - Sent after a font import operation is executed. See \c #AIFontSuite.*/ -#define kAIEndImportCompFontNotifier "AI End Import CompFont Notifier" - -/** @ingroup Errors - Cannot import a font. See \c #AIFontSuite. */ -#define kCantImportCompFont '!ICF' -/** @ingroup Errors - Glyph is not defined. See \c #AIFontSuite. */ -#define kGlyphNotDefinedErr '!Gly' - -// Opaque data types -/** Opaque font key; see \c #AIFontSuite */ -typedef struct __AIFontKey* AIFontKey; -/** Opaque typeface (font family) key; see \c #AIFontSuite */ -typedef struct _t_AITypefaceKey* AITypefaceKey; -/** Opaque glyph set; see \c #AIFontSuite */ -typedef struct _t_AIGlyphSet* AIGlyphSet; -/** Opaque glyph information; see \c #AIFontSuite */ -typedef struct _t_AIGlyphInfo* AIGlyphInfo; -/** Opaque font instance; see \c #AIFontSuite */ -typedef struct _t_AIFontInst* AIFontInst; -/** Opaque glyph identifier; see \c #AIFontSuite */ -typedef int AIGlyphID; -/** Opaque byte code; see \c #AIFontSuite */ -typedef unsigned char AIByteCode; -/** Opaque character code; see \c #AIFontSuite */ -typedef ai::uint16 AICharCode; -/** Opaque font face metrics; see \c #AIFontSuite */ -typedef struct _t_AIFaceMetrics* AIFaceMetrics; -/** Not used. */ -typedef struct _t_LOGFONTA* AILOGFONTA; - -typedef ai::uint32 AIMacFontRef; - -// Public data types -/** Font family format types */ -typedef enum AIFaceFormat { - kUnknownFormat = -1, - kTypeOneFormat, - kTrueTypeFormat -} AIFaceFormat; - -/** Type face encodings */ -typedef enum AIFaceEncoding { - kUnknownEncoding = -1, - kDontCareEncoding, - kStandardEncoding, - kSpecialEncoding -} AIFaceEncoding; - -/** Type face language scripts */ -typedef enum AIFaceScript { - kNativeAIScript = -2, - kUnknownAIScript = -1, - kRomanAIScript = 0, - kJapaneseAIScript = 1, - kTraditionalChineseAIScript = 2, - kKoreanAIScript = 3, - - kArabicAIScript = 4, - kHebrewAIScript = 5, - - kGreekAIScript = 6, - kCyrillicAIScript = 7, - - // the script number should be same as in Cool type Script Enum - kDevanagariAIScript = 9, - kGurmukhiAIScript = 10, - kGujaratiAIScript = 11, - kOriyaAIScript = 12, - kBengaliAIScript = 13, - kTamilAIScript = 14, - kTeluguAIScript = 15, - kKannadaAIScript = 16, - kMalayalamAIScript = 17, - - kSimplifiedChineseAIScript = 25, - kEastEuropeanRomanAIScript = 29, - kSymbolAIScript = 32, - kTurkishAIScript = 81, - kBalticAIScript = 85 -} AIFaceScript; - -/** MojiZume types */ -enum AIMojiZumeType { - kMojiZumeNone, - kMojiZumeGXTrueType, - kMojiZumePageMakerJ, - kMojiZumeSfntATM -}; - -/** Font style */ -struct AIFontStyle { - /** Font retrieval key */ - AIFontKey fontKey; - /** Font family format */ - enum AIFaceFormat format; - /** Font face encoding */ - enum AIFaceEncoding encoding; - /** Font face script */ - enum AIFaceScript script; - /** When true, this is the original encoding */ - AIBoolean originalEncoding; - /** When true, the font family is installed */ - AIBoolean familyInstalled; - /** Not used. */ - AIBoolean strikeInstalled; - /** When true, the font is fauxed for a missing font */ - AIBoolean fauxedInstalled; - /** When true, the font is a Character ID-keyed font */ - AIBoolean isCID; - /** The MojiZume type of the font */ - enum AIMojiZumeType mojiZumeType; - /** When true, this is an Open Type font */ - AIBoolean isOTF; - /** When true, this is a bitmap font */ - AIBoolean isBitmapFont; - /** When true, this is an Original Composite Format font*/ - AIBoolean isOCF; - /** When true, this is an Adobe Type Composer font*/ - AIBoolean isATC; - /** When true, this is an Adobe Multiple Master font*/ - AIBoolean isMultipleMaster; -}; - -/** Font orientations (writing directions). */ -enum AIMetricOrientation { - kAIUnknownMetricOrientation = 0, - kAIHorizontalMetricOrientation, - kAIVerticalMetricOrientation -}; - -/** Font metrics */ -struct AIFontMetrics { - /** Leading space in points */ - AIReal leading; - /** Ascent in points */ - AIReal ascent; - /** descent in points */ - AIReal descent; - /** Character bounding box */ - AIRealRect bbox; -}; - -/** Text orientation */ -typedef enum AITextOrientation { - kHorizontalTextOrientation, - kVerticalTextOrientation -} AITextOrientation; - - -/** Font technologies. */ -enum AIFontTechnology { - kAIUnknownFontTechnology = 0, - kAIAnyFontTechnology, - - kAIAdobeFontTechnology = 100, - kAITrueTypeFontTechnology -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions to access the set of fonts that is - available to Illustrator documents, and provide information about - individual fonts. - - The set of available fonts includes those from the operating - system, those installed with Illustrator, and substitute fonts for - missing fonts in open documents. The set of fonts can change during - a session as fonts are activated or deleted, and as documents are - opened or closed. - - There are several different types of font names: - \li The PostScript name is a unique, ASCII name that can - be stored in files to identify a font. For multiple master - instances, it includes the specific design axis values. - \li The Illustrator PostScript name is the PostScript name with - a suffix identifying the encoding. It can also be stored in - a file to identify a font. - \li A user name is a display name, which can be in ASCII or - a localized encoding. There can be several such names; for - example a full name describing the font, and the font family name. - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIFontSuite and \c #kAIFontVersion. - -*/ -struct AIFontSuite { - - /** Gets the total number of available fonts. Variations, such as - "Times Roman Regular" and "Times Roman Italic" are counted as - distinct fonts. Use with \c #IndexFontList() to iterate through - available fonts. - @param count [out] A buffer in which to return the number of fonts. - */ - AIAPI AIErr (*CountFonts)( ai::int32 *count ); - - /** Retrieves a font by index position. Use with \c #CountFonts() to - iterate through available fonts. Font indices can change as - fonts are added and removed. - @param index The 0-based position index. - @param fontKey [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*IndexFontList)( ai::int32 index, AIFontKey *fontKey ); - - /** Gets the total number of font families. Variants, such as italic - and bold, are counted as a single family. Use with \c #IndexTypefaceList() to - iterate through available font families. - @param count [out] A buffer in which to return the number of font families. - */ - AIAPI AIErr (*CountTypefaces)( ai::int32 *count ); - - /** Retrieves a font family by index position. Use with \c #CountTypefaces() to - iterate through available font families. Indices can change as - fonts are added and removed. - @param index The 0-based position index. - @param typeFaceKey [out] A buffer in which to return the font family key. - */ - AIAPI AIErr (*IndexTypefaceList)( ai::int32 index, AITypefaceKey *typeFaceKey ); - - /** Gets the total number of variants (such as bold and italic) of a font family. - Use with \c #IndexTypefaceStyleList() to iterate through variants. - @param typeface The font family, as returned by \c #IndexTypefaceList(). - @param count [out] A buffer in which to return the number of variants. - */ - AIAPI AIErr (*CountTypefaceStyles)( AITypefaceKey typeface, ai::int32 *count ); - - /** Retrieves a variant of a font family by index position. Use with - \c #CountTypefaceStyles() to iterate through variants. - @param typeface The font family, as returned by \c #IndexTypefaceList(). - @param index The 0-based position index. - @param fontKey [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*IndexTypefaceStyleList)( AITypefaceKey typeface, ai::int32 index, AIFontKey *fontKey ); - - /** Retrieves the family and variant of a font. - @param theKey The font key. - @param typefaceResult [out] A buffer in which to return the font family key. - @param styleResult [out] A buffer in which to return the index position - of the family variant (such as bold or italic). - */ - AIAPI AIErr (*TypefaceAndStyleFromFontKey)(AIFontKey theKey, AITypefaceKey *typefaceResult, ai::int16 *styleResult); - - /** Finds a font matching specific criteria. - @param postscriptName The PostScript font name, such as "Times-Roman", - or Illustrator PostScript font name. - @param fontTechnology The font type, such as Adobe or TrueType, an \c #AIFontTechnology value. - @param script The language for which the font was designed; an \c #AIFaceScript value. - @param substituteFlag When true, returns a substitute if an exact match is not found. - @param result [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*FindFont)(const char *postscriptName, enum AIFontTechnology fontTechnology, AIFaceScript script, - AIBoolean substituteFlag, AIFontKey *result); - - /** Finds an Illustrator font matching a Mac OS system font. - @param fontRef The Mac OS ATS font ref - @param result [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*FindMacFontFromMacFontRef)(AIMacFontRef macFontRef, AIFontKey *result); - - /** Not implemented. */ - AIAPI AIErr (*FindWinFont)(AILOGFONTA *logFont, AIFontKey *result); - - /** Retrieves the Mac OS ATS font ref for an Illustrator font. If the given font does not - correspond to a system font, gets the default system font. - @param fontKey The font key. - @param macFontRef [out] A buffer in which to return the Mac OS ATS font ref. - */ - AIAPI AIErr (*GetMacFontRef)(AIFontKey fontKey, AIMacFontRef& macFontRef); - - /** Retrieves typeface name of a font, or the system name for a system font in Windows. - @param fontKey The font key. - @param result [out] A buffer in which to return the typeface name, or, - in Windows only, the face name of the WindowsLogFont if the font is a system font.. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetSystemFontName)(AIFontKey fontKey, char *result, ai::int16 maxName); - - /** Sets the character widths for a fauxed, single-byte, horizontal font. - @param fontKey The font key. - @param charWidths A pointer to the new array of width values, in points. - This is an array of 256 values where each entry is the advance override - for the corresponding glyph. - */ - AIAPI AIErr (*SetCharWidths)(AIFontKey fontKey, AIReal *charWidths); - - // Accessing various attributes of a font...except the name...that's different - - /** Retrieves the font information for a font. - @param theKey The font key. - @param result [out] A buffer in which to return the font information structure. - */ - AIAPI AIErr (*GetFontInfo)( AIFontKey font, struct AIFontStyle *result); - - /** Retrieves the font metrics for a font. - @param theKey The font key. - @param result [out] A buffer in which to return the font metrics structure. - */ - AIAPI AIErr (*GetFontMetrics)( AIFontKey font, struct AIFontMetrics *result); - - /** Retrieves the default pen displacement for a glyph in a given orientation, - for a 1-point font. - @param font The font key. - @param glyphID The glyph identifier. - @param orientation The text orientation (horizontal or vertical). - @param hResult [out] A buffer in which to return the horizontal displacement, in points, - or \c NULL if the orientation is vertical. - @param vResult [out] A buffer in which to return the vertical displacement, in points, - or \c NULL if the orientation is horizontal. - */ - AIAPI AIErr (*GetGlyphDimensions)( AIFontKey font, AIGlyphID glyphID, enum AIMetricOrientation orientation, - AIReal *hResult, AIReal *vResult); - - /** Retrieves the default pen displacement for a UTF8-encoded character - in a given orientation, for a 1-point font. - @param font The font key. - @param charPtr A pointer to the platform-encoded character. - @param orientation The text orientation (horizontal or vertical). - @param hResult [out] A buffer in which to return the horizontal displacement, in points, - or 0 if the orientation is vertical. - @param vResult [out] A buffer in which to return the vertical displacement, in points, - or 0 if the orientation is horizontal. - */ - AIAPI AIErr (*GetCharDimensions)( AIFontKey font, const char *charPtr, enum AIMetricOrientation orientation, - AIReal *hResult, AIReal *vResult); - - /** Retrieves the default font for a language script. - @param script The language script. - @param result [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*GetDefaultFont)( AIFaceScript script, AIFontKey *result); - - // Various ways to get the name of a font - - /** Retrieves the PostScript name of a font, with the encoding - information that Illustrator appends. This name is always encoded in ASCII. - @param font The font key. - @param fontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFullFontName)( AIFontKey font, char *fontName, ai::int16 maxName ); - - /** Retrieves the Illustrator PostScript name of a font (with encoding information - appended). This uniquely identifies a font, for example, in a file. - This name is always encoded in ASCII. - @param font The font key. - @param postScriptFontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetPostScriptFontName)( AIFontKey fontKey, char* postScriptFontName, ai::int16 maxName ); - - /** Retrieves the ASCII-encoded name for the variant of a font (for example, "Bold Italic") - @param font The font key. - @param styleName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontStyleName)( AIFontKey font, char *styleName, ai::int16 maxName ); - - /** Retrieves the display name for the family of a font (for example, "Times Roman"). - The name is encoded either in ASCII or in the encoding of the font, - depending on the preference setting for using English font names. - @param font The font key. - @param familyName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontFamilyUIName)( AIFontKey font, char *familyName, ai::int16 maxName ); - - /** Retrieves the display name for the variant of a font (for example, "Bold Italic"). - The name is encoded either in ASCII or in the encoding of the font, - depending on the preference setting for using English font names. - @param font The font key. - @param styleName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontStyleUIName)( AIFontKey font, char *styleName, ai::int16 maxName ); - - /** Retrieves the ASCII-encoded name for a font family (for example, "Times Roman"). - @param typeface The font family key. - @param name [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetTypefaceName)( AITypefaceKey typeface, char *name, ai::int16 maxName ); - - /** Retrieves the full ASCII-encoded name for a font (for example, "Times Roman Bold Italic"). - The name is always encoded in ASCII. - @param font The font key. - @param userfontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetUserFontName)( AIFontKey font, char *userfontName, ai::int16 maxName ); - - /** Retrieves the full display name for a font (for example, "Times Roman Bold Italic") - The name is encoded either in ASCII or in the encoding of the font, - depending on the preference setting for using English font names. - @param font The font key. - @param userfontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetUserFontUIName)( AIFontKey font, char *userfontName, ai::int16 maxName ); - - - /** Converts an Illustrator font key to an Adobe Text Engine (ATE) - font reference, for use with ATE functions. - @param font The font key. - @param result [out] A buffer in which to return the ATE font reference. - @see \c ATETypes.h - */ - AIAPI AIErr (*FontFromFontKey)(AIFontKey font, FontRef *result); - - /** Converts an Adobe Text Engine (ATE) font reference to an Illustrator font key. - @param font The ATE font reference. - @param result [out] A buffer in which to return the font key. - @see \c ATETypes.h - */ - AIAPI AIErr (*FontKeyFromFont)(FontRef font, AIFontKey *result); - - /** Retrieves whether a font is substituted or not. - @param fontKey The font key. - @param outIsSubstituted [out] A buffer in which to return the boolean value. - */ - AIAPI AIErr (*GetFontIsSubstituted)(AIFontKey fontKey, AIBoolean& outIsSubstituted); - - // The following methods deal with accessing alternate glyph information - - /** Retrieves a glyph set, which contains information about alternate - glyphs within an OpenType font. - @param theFont An OpenType font. - @param otFeature When zero, gets information about all glyphs. Otherwise, - specify the feature of interest, as a 4-byte character sequence (in a \c ai::int32) - for an OpenType feature tag. - @param result [out] A buffer in which to return the glyph set. You must release - this object using \c #ReleaseGlyphSet() when it is no longer needed. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI AIErr (*GetGlyphSet)(AIFontKey theFont, ai::int32 otFeature, AIGlyphSet *result); - - /** Disposes of a glyph set object. - @param theSet The object, as returned by \c #GetGlyphSet(). */ - AIAPI AIErr (*ReleaseGlyphSet)(AIGlyphSet theSet); - - /** Gets the number of glyphs within a glyph set. Use with \c #GetGlyphInfo() to iterate - through glyphs. - @param theSet The glyph set object. - @param glyphCountResult [out] A buffer in which to return the number of glyphs. - */ - AIAPI AIErr (*CountGlyphs)(AIGlyphSet theSet, int *glyphCountResult); - - /** Retrieves information about a specific glyph. Use with \c #CountGlyphs() to iterate - through glyphs. - @param theSet The glyph set object. - @param glyphIndex The index position of the glyph, in the range [1..numGlyphs]. - @param glyphInfoResult [out] A buffer in which to return the glyph information. - */ - AIAPI AIErr (*GetGlyphInfo)(AIGlyphSet theSet, ai::int32 glyphIndex, AIGlyphInfo *glyphInfoResult); - - /** Gets the ordinal position of a given glyph within a glyph set. - @param theSet The glyph set object. - @param glyphID The unique identifier of the glyph. - @param glyphIndex [out] A buffer in which to return the index position - of the glyph, in the range [1..numGlyphs]. - */ - AIAPI AIErr (*GlyphIDToIndex)(AIGlyphSet theSet, AIGlyphID glyphID, int *glyphIndexResult); - - /** Retrieves all OpenType features supported by a particular font. - @param theFont The font key. - @param featureList [in, out] An array of OpenType features of length \c featureCount. - Each value is a 4-byte character sequence (in a \c ai::int32) representing - an OpenType feature tag. - Caller must provide the array. Pass NULL to obtain the size of the array required. - @param featureCount [out] A buffer in which to return the size of array required for - \c featureList. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI AIErr (*GetOTFeatures)(AIFontKey theFont, ai::int32 *featureList, ai::int32 *featureCount); - - /** Reports whether there are any glyphs for a given Open Type feature in a given font, or retrieves - the glyph set containing the glyphs, if any. - (Note that this function returns a numeric value, not an error code.) - @param theFeature The feature, a 4-byte character sequence (in a \c ai::int32) representing - an OpenType feature tag. - @param fontKey The font key. - @param existFlag When true, the function reports on whether the font contains any glyphs - for the feature. A font can define an OpenType feature, but assign no - glyphs to that feature. Use this assure that at least one glyph is present. -
When false, the function retrieves the glyph set - containing the glyphs (if any). This is the same as using \c #GetGlyphSet(). - @param result [out] A buffer in which to return the glyph set. You must release - this object using \c #ReleaseGlyphSet() when it is no longer needed. - @return Non-zero (true) if the font contains at least one glyph for the given feature, - zero (false) otherwise. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI ai::int32 (*GetGlyphsForFeatureAccessInfo)(ai::int32 theFeature, AIFontKey fontKey, AIBoolean existFlag, - AIGlyphSet *glyphSet); - - /** Retrieves the font that contains a glyph set. - @param glyphSetOpaque The glyph set. - @param result [out] A buffer in which to return the font object. - */ - AIAPI AIErr (*GetFontInstance)(AIGlyphSet glyphSetOpaque, AIFontInst **result); - - /** Retrieves the unique identifier of a glyph. - @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param result [out] A buffer in which to return the glyph identifier. - */ - AIAPI AIErr (*GetGlyphID)(AIGlyphInfo glyphInfo, AIGlyphID *result); - - /** Retrieves the set of alternate glyphs for a given glyph. - @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param result [out] A buffer in which to return the alternative glyph set. - */ - AIAPI AIErr (*GetAlternateGlyphs)(AIGlyphInfo glyphInfo, AIGlyphSet *result); - - /** Retrieves the OpenType features associated with a given glyph. - @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param otFeatures [out] A buffer in which to return the features. Do not modify the returned - character array (which is not a null-terminated string). The array contains - a set of 4-character feature codes; for example "vertswsh" for a glyph - to which 'vert' and 'swsh' features can be applied. - @param otFeatureCount [out] A buffer in which to return the number of features in \c otFeatures. - @param otFeatureIndex [out] A buffer in which to return an array of length - \c otFeatureCount containing the number of alternates available for each - feature listed in the \c otFeatures array. - */ - AIAPI AIErr (*GetGlyphOTFeatures)(AIGlyphInfo glyphInfo, const char **otFeatures, ai::int32 *otFeatureCount, - ai::int32 **otFeatureIndex); - - /** Retrieves the Unicode character for a given glyph in a given font, with information about - what OpenType features were applied. - @param mGlyphID The glyph identifier. - @param fontKey The font key. - @param desiredOTFeature A string containing the OpenType features of interest. See - \c #GetGlyphOTFeatures(). The mapping of glyphs and feature sets to characters - is not 1:1, so the returned character can have a different set of features than those - requested. - @param theChar [out] A buffer in which to return the Unicode character. - @param resultLength [out] A buffer in which to return the number of features in \c theChar. - @param otFeatures [out] A buffer in which to return the OpenType features set that was - applied to \c theChar. See \c #GetGlyphOTFeatures(). You must release this memory with - \c #SPBasicSuite::FreeBlock() when it is no longer needed. - @param otFeatureCount [out] A buffer in which to return the number of features in \c otFeatures. - @param otFeatureIndex [out] A buffer in which to return an array of length - \c otFeatureCount containing the number of alternates available for each - feature listed in the \c otFeatures array. - You must release this memory with \c #SPBasicSuite::FreeBlock() when it is no longer needed. - */ - AIAPI AIErr (*GetGlyphUnicodeValue)(AIGlyphID mGlyphID, AIFontKey fontKey, const char *desiredOTFeature, - ASUnicode *theChar, int *resultLength, char **otFeatures, ai::int32 *otFeatureCount, ai::int32 **otFeatureIndex); - - /** Retrieves the font for a glyph. - @param theGlyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param result [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*GetGlyphFontKey)(AIGlyphInfo theGlyphInfo, AIFontKey *result); - - /** Retrieves the number of alternate glyphs for a given glyph. - @param theGlyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param result [out] A buffer in which to return the number of alternative glyphs. - */ - AIAPI AIErr (*GetGlyphAlternateCount)(AIGlyphInfo theGlyphInfo, int *result); - - /** Retrieves the \e undefined glyph for a glyph set. Each font has one undefined glyph, but not every - glyph set contains one. Use \c #HasUndefinedGlyph() to check. - @param theSet The glyph set. - @param undefinedGlyphIDResult [out] A buffer in which to return the glyph identifier. - */ - AIAPI AIErr (*GetUndefinedGlyphID)(AIGlyphSet theSet, AIGlyphID *undefinedGlyphIDResult); - - /** Reports whether a glyph set contains an undefined glyph. Each font has one undefined glyph, - but not every glyph set contains one. Use \c #GetUndefinedGlyphID to retrieve it if there is one. - (Note that this function returns a boolean value, not an error code.) - @param theSet The glyph set. - @return True if the set contains an undefined glyph. - */ - AIAPI AIBoolean (*HasUndefinedGlyph)(AIGlyphSet theSet); - - /** Imports composite fonts from an AI or ATC file into the current document. - @param source The AI or ATC file path. - */ - AIAPI AIErr (*ImportCompositeFonts)(const ai::FilePath &source); - - /** Translates a character value to a single glyph in a given font. - @param fontKey The font key. - @param ch A string containing the character. Extracts at most - one glyph, using as many bytes as needed to form one glyph, - starting with the first byte pointed to by \c ch. - Derives the encoding from the font. - @param srcLen The number of bytes in \c ch. - @param orientation The text orientation, vertical or horizontal. - @param glyphID [out] A buffer in which to return the glyph identifier, or - undefined glyph for the font if a glyph is not defined for this character. - @return The error \c #kGlyphNotDefinedErr if a glyph is not defined for - this character. - */ - AIAPI AIErr (*ConvertCharacterToGlyphID) ( AIFontKey fontKey, const char* ch, ai::int32 srcLen, - enum AIMetricOrientation orientation, AIGlyphID* glyphID ); - - /** Translates a Unicode character value to a single glyph in a given font. - @param fontKey The font key. - @param ch A UTF16-encoded string containing the character. Extracts at most - one glyph, using as many characters as needed to form one glyph, - starting with the first character pointed to by \c ch. - @param srcLen The number of \c ASUnicode characters (not bytes) in \c ch. - @param orientation The text orientation, vertical or horizontal. - @param glyphID [out] A buffer in which to return the glyph identifier, or - undefined glyph for the font if a glyph is not defined for this character. - @return The error \c #kGlyphNotDefinedErr if a glyph is not defined for - this character. - */ - AIAPI AIErr (*ConvertUnicodeToGlyphID) ( AIFontKey fontKey, const ASUnicode* ch, ai::int32 srcLen, - enum AIMetricOrientation orientation, AIGlyphID* glyphID ); - - /** Retrieves the full display name for a font (for example, "Times Roman Bold Italic") - in Unicode (UTF16). - The name is either in English or the native language of the font depending on the - setting of the preference to use English font names. - @param fontKey The font key. - @param userfontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetUserFontUINameUnicode)( AIFontKey fontKey, ASUnicode* userfontName, ai::int32 maxName ); - - /** Retrieves the display name for the family of a font (for example, "Times Roman") - in Unicode (UTF16). - The name is either in English or the native language of the font depending on the - setting of the preference to use English font names. - @param fontKey The font key. - @param familyName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontFamilyUINameUnicode)( AIFontKey fontKey, ASUnicode* familyName, ai::int32 maxName ); - - /** Retrieves the display name for the variant of a font (for example, "Bold Italic") - in Unicode (UTF16). - The name is either in English or the native language of the font depending on the - setting of the preference to use English font names. - @param fontKey The font key. - @param styleName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontStyleUINameUnicode)( AIFontKey fontKey, ASUnicode* styleName, ai::int32 maxName ); - - // New for Illustrator 12.0 - - /** Retrieves the ideographic character face (IFC) bounds of a font. - The ICF-box is the maximum bounding box of the ideographic portion of a CJK font, - usually centered within the em-box. The value is also defined also for non-CJK fonts. - The coordinate values are relative to the font coordinate system's origin. - X values increase to the right and Y values increase downward. - @param fontKey The font key. - @param icfBox [out] A buffer in which to return the bounding box - @see Baseline tags \c icfb and \c icft in the OpenType tag registry. - */ - AIAPI AIErr (*GetICFBox) ( AIFontKey fontKey, AIRealRect& icfBox ); - - // New for Illustrator 13.0 - - /** Retrieves the version string for a font file. If the font object is fauxed, - gets version information for the underlying font. - You can check whether the font is fauxed using \c #GetFontInfo(). - @param fontKey The font key. - @param versionString [out] A buffer in which to return the version string. - */ - AIAPI AIErr (*GetVersionString) ( AIFontKey fontKey, ai::UnicodeString& versionString ); - - /** Reports how many files constitute a font. For example, a Windows Type 1 font has a PFB - and a PFM file, and a Mac Type 1 font has a suitcase and an outline file, but an OpenType - font has only a single file. Use with \c #GetNthFilePath() to access the files. - - If the font is fauxed, returns the information for the underlying font used to faux - the missing font. Check whether the font is fauxed using \c #GetFontInfo(). - @param fontKey The font key. - @param count [out] A buffer in which to return the number of files. - This can be 0 for some fonts; see \c #GetNthFilePath(). - @note This function does not distinguish between two identical font files - and two different files for the same font. - */ - AIAPI AIErr (*GetFontFilePathCount) ( AIFontKey fontKey, ai::uint32& count ); - - /** Retrieves a file path associated with a font. Use with \c #GetFontFilePathCount() - to access font files. - - This method does not work for fonts whose paths Illustrator does not know, - such as Windows bitmap fonts, and Mac OS bitmap-only fonts. For an ATC font, - gets the location of the top-level rearrangement file only. - To get the paths of component fonts, iterate over the component dictionaries. - - If the font is fauxed, returns the information for the underlying font used to faux - the missing font. Check whether the font is fauxed using \c #GetFontInfo(). - - @param fontKey The font key. - @param n The position index of the file path, the range [0..pathCount-1]. - @param filePath [out] A buffer in which to return the path. - */ - AIAPI AIErr (*GetNthFilePath) ( AIFontKey fontKey, ai::uint32 n, ai::FilePath& filePath ); - - /** Gets the number of ATC components for a font. If the font is fauxed, - returns the information for the underlying font used to faux - the missing font. Check whether the font is fauxed, and that it - is an ATC font, using \c #GetFontInfo(). - @param fontKey The font key. - @param count [out] A buffer in which to return the number of ATC components. - This is 0 for a non-ATC font. - */ - AIAPI AIErr (*GetNumATCComponents) ( AIFontKey fontKey, ai::uint32& count ); - - /** Retrieves a component for an ATC font, by position index. Use with - \c #GetNumATCComponents() to access font components. - - If the font is fauxed, returns the information for the underlying font used to faux - the missing font. Check whether the font is fauxed, and that it - is an ATC font, using \c #GetFontInfo(). - - @param fontKey The font key. - @param n The position index of the component, the range [0..numATCComponents-1]. - @param componentFontKey [out] A buffer in which to return the component font key. - */ - AIAPI AIErr (*GetNthATCComponent) ( AIFontKey fontKey, ai::uint32 n, AIFontKey& componentFontKey ); - - /** Retrieves the full user name for a font (for example, "Times Roman Bold Italic"). - This might not be the same as the display name; retrieve the display name with - \c #GetUserFontUINameUnicode(). - @param fontKey The font key. - @param name [out] A buffer in which to return the name string. - @param native True to get the name in the native language of the font, false - to get the name in English, regardless of the font's language. - */ - AIAPI AIErr (*GetUserFontNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, - AIBoolean native); - - /** Retrieves the user name for the family of a font (for example, "Times Roman"). - This might not be the same as the display name; retrieve the display name with - \c #GetFontFamilyUINameUnicode(). - @param fontKey The font key. - @param name [out] A buffer in which to return the name string. - @param native True to get the name in the native language of the font, false - to get the name in English, regardless of the font's language. - */ - AIAPI AIErr (*GetFontFamilyNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, - AIBoolean native); - - /** Retrieves the user name for the style of a font (for example, "Bold Italic"). - This might not be the same as the display name; retrieve the display name with - \c #GetFontStyleUINameUnicode(). - @param fontKey The font key. - @param name [out] A buffer in which to return the name string. - @param native True to get the name in the native language of the font, false - to get the name in English, regardless of the font's language. - */ - AIAPI AIErr (*GetFontStyleNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, - AIBoolean native); - - /** Retrieves the ideographic em-box of a font, also known as an ideographic font's design space. - This defines a standard monospaced escapement around the glyphs of the font, for both horizontal and - vertical writing modes. It is one em high and one em wide unless the vendor explicitly indicates - otherwise in the font. The OpenType specification strongly recommends against this being other than an - em wide, but there are legitimate reasons for it to be other than one em high: some fonts used in - Japanese newspaper layout, for example, have a vertically compressed ideographic em-box. - - The returned value, an array with the left, top, right, and bottom edges - (in horizontal writing mode) of the ideographic em-box of a 1-unit-em font, - is defined for every font (including non-CJK fonts, where it can be used to em-box-align - these fonts alongside CJK fonts). - - The coordinate values are relative to the font coordinate system's origin. - X values increase to the right and Y values increase downward. - @param fontKey The font key. - @param ideoEmBox [out] A buffer in which to return the bounding box, - @see Baseline tag \c ideo in the OpenType tag registry for more information. - */ - AIAPI AIErr (*GetIdeoEmBox) ( AIFontKey fontKey, AIRealRect& ideoEmBox ); - - /** Retrieves a font from a given family that is the closest match for a given font from - another family. If the same style is present in the new family, it is selected; otherwise, - selects the closest match from the new family. - @param old_Family The typeface of a previously selected font family. - @param old_style The 0-based index of the font style to match within the old family. - @param new_Family The typeface of a new font family, in which to find a match. - - @param new_style [out] A bufffer in which to return the 0-based index of the best-match font in the new family. - */ - - AIAPI AIErr (*GetCloselyMatchingFontStyle) (AITypefaceKey old_Family, short* old_Style, AITypefaceKey new_Family, short* new_Style); - - /** Retrieves a font family by index position, from the list of all available font families. - Use with \c #CountTypefaces() to iterate through available font families. Indices can change as fonts are added and removed. - @param index The 0-based position index. - @param typeFaceKey [out] A buffer in which to return the font family key. - */ - - AIAPI AIErr (*IndexTypefaceListSortedByDefaultScript)(AITypefaceKey* typeface, ai::int32 index); - - AIAPI AIErr (*GetTypefaceUnicodeMenuName)(AITypefaceKey typeface, ai::UnicodeString& typefaceName); -}; - - -/** @ingroup Notifiers - Sent when the system language has changed. See \c #AIMEFontSuite. */ -#define kAICurrentLanguageChangedNotifier "AI Current Language Changed Notifier" - -#define kAIMEFontSuite "AI ME Font Suite" -#define kAIMEFontSuiteVersion1 AIAPI_VERSION(1) -#define kAIMEFontSuiteVersion kAIMEFontSuiteVersion1 -#define kAIMEFontVersion kAIMEFontSuiteVersion - -typedef struct { - - /** Retrieves a glyph set, which contains information about alternate - glyphs within an OpenType font. - @param theFont An OpenType font. - @param AILanguage The language code for the current system language. - @param otFeature When zero, gets information about all glyphs. Otherwise, - specify the feature of interest, as a 4-byte character sequence (in a \c ai::int32) - for an OpenType feature tag. - @param result [out] A buffer in which to return the glyph set. You must release - this object using \c #ReleaseGlyphSet() when it is no longer needed. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI AIErr (*GetGlyphSet)(AIFontKey theFont, int AILanguage, ai::int32 otFeature, AIGlyphSet *result); - /** Retrieves all OpenType features supported by a particular font. - @param theFont The font key. - @param AILanguage The language code for the current system language. - @param featureList [in, out] An array of OpenType features of length \c featureCount. - Each value is a 4-byte character sequence (in a \c ai::int32) representing - an OpenType feature tag. - Caller must provide the array. Pass NULL to obtain the size of the array required. - @param featureCount [out] A buffer in which to return the size of array required for - \c featureList. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI AIErr (*GetOTFeatures)(AIFontKey theFont, int AILanguage, ai::int32 *featureList, ai::int32 *featureCount); - - /** Reports whether there are any glyphs for a given Open Type feature in a given font, or retrieves - the glyph set containing the glyphs, if any. - (Note that this function returns a numeric value, not an error code.) - @param theFeature The feature, a 4-byte character sequence (in a \c ai::int32) representing - an OpenType feature tag. - @param fontKey The font key. - @param AILanguage The language code for the current system language. - @param existFlag When true, the function reports on whether the font contains any glyphs - for the feature. A font can define an OpenType feature, but assign no - glyphs to that feature. Use this assure that at least one glyph is present. -
When false, the function retrieves the glyph set - containing the glyphs (if any). This is the same as using \c #GetGlyphSet(). - @param result [out] A buffer in which to return the glyph set. You must release - this object using \c #ReleaseGlyphSet() when it is no longer needed. - @return Non-zero (true) if the font contains at least one glyph for the given feature, - zero (false) otherwise. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI ai::int32 (*GetGlyphsForFeatureAccessInfo)(ai::int32 theFeature, AIFontKey fontKey, int AILanguage, AIBoolean existFlag, - AIGlyphSet *glyphSet); - /** Retrieves the Unicode character for a given glyph in a given font, with information about - what OpenType features were applied. - @param mGlyphID The glyph identifier. - @param fontKey The font key. - @param AILanguage The language code for the current system language. - @param desiredOTFeature A string containing the OpenType features of interest. See - \c #GetGlyphOTFeatures(). The mapping of glyphs and feature sets to characters - is not 1:1, so the returned character can have a different set of features than those - requested. - @param theChar [out] A buffer in which to return the Unicode character. - @param resultLength [out] A buffer in which to return the number of features in \c theChar. - @param otFeatures [out] A buffer in which to return the OpenType features set that was - applied to \c theChar. See \c #GetGlyphOTFeatures(). You must release this memory with - \c #SPBasicSuite::FreeBlock() when it is no longer needed. - @param otFeatureCount [out] A buffer in which to return the number of features in \c otFeatures. - @param otFeatureIndex [out] A buffer in which to return an array of length - \c otFeatureCount containing the number of alternates available for each - feature listed in the \c otFeatures array. - You must release this memory with \c #SPBasicSuite::FreeBlock() when it is no longer needed. - */ - AIAPI AIErr (*GetGlyphUnicodeValue)(AIGlyphID mGlyphID, AIFontKey fontKey, int AILanguage, const char *desiredOTFeature, - ASUnicode *theChar, int *resultLength, char **otFeatures, ai::int32 *otFeatureCount, ai::int32 **otFeatureIndex); - /** Retrieves the language code for the current system language. - (Note that this function returns a numeric value, not an error code.) - @return The language code. - */ - AIAPI int (*GetCurrentLanguage)(); - - /** Converts an Adobe Text Engine language object to an Illustrator language code. - (Note that this function returns a numeric value, not an error code.) - @param sloLang The Adobe Text Engine language object. - @return The language code. - */ - AIAPI int (*SLOLanguageToAILanguage)(ATE::Language sloLang); - - /** Retrieves the language from a glyph-information structure. - @param glyphInfo The glyph-information structure. - @param result [out] A buffer in which to return the language code. - - */ - AIAPI AIErr (*GetGlyphLanguage)(AIGlyphInfo glyphInfo, int *result); -} AIMEFontSuite; - -#include "AIHeaderEnd.h" - -#endif // __AIFont__ +/* + * Name: AIFont.h + * $Revision: 1 $ + * Author: Adam Lane + * Date: 7/10/2002 + * Purpose: Adobe Illustrator Font Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIFont__ +#define __AIFont__ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "ATETypesDef.h" +#include "IAIFilePath.hpp" + +#include "ATETypes.h" + + +#ifdef __cplusplus +using ATE::FontRef; +#endif + +#include "AIHeaderBegin.h" + +/** @file AIFont.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIFontSuite "AI Font Suite" +#define kAIFontSuiteVersion6 AIAPI_VERSION(6) +#define kAIFontSuiteVersion kAIFontSuiteVersion6 +#define kAIFontVersion kAIFontSuiteVersion + + +/** @ingroup Notifiers + Sent before a font import operation is executed. See \c #AIFontSuite. */ +#define kAIBeginImportCompFontNotifier "AI Begin Import CompFont Notifier" +/** @ingroup Notifiers + Sent after a font import operation is executed. See \c #AIFontSuite.*/ +#define kAIEndImportCompFontNotifier "AI End Import CompFont Notifier" + +/** @ingroup Errors + Cannot import a font. See \c #AIFontSuite. */ +#define kCantImportCompFont '!ICF' +/** @ingroup Errors + Glyph is not defined. See \c #AIFontSuite. */ +#define kGlyphNotDefinedErr '!Gly' + +// Opaque data types +/** Opaque font key; see \c #AIFontSuite */ +typedef struct __AIFontKey* AIFontKey; +/** Opaque typeface (font family) key; see \c #AIFontSuite */ +typedef struct _t_AITypefaceKey* AITypefaceKey; +/** Opaque glyph set; see \c #AIFontSuite */ +typedef struct _t_AIGlyphSet* AIGlyphSet; +/** Opaque glyph information; see \c #AIFontSuite */ +typedef struct _t_AIGlyphInfo* AIGlyphInfo; +/** Opaque font instance; see \c #AIFontSuite */ +typedef struct _t_AIFontInst* AIFontInst; +/** Opaque glyph identifier; see \c #AIFontSuite */ +typedef int AIGlyphID; +/** Opaque byte code; see \c #AIFontSuite */ +typedef unsigned char AIByteCode; +/** Opaque character code; see \c #AIFontSuite */ +typedef ai::uint16 AICharCode; +/** Opaque font face metrics; see \c #AIFontSuite */ +typedef struct _t_AIFaceMetrics* AIFaceMetrics; +/** Not used. */ +typedef struct _t_LOGFONTA* AILOGFONTA; + +typedef ai::uint32 AIMacFontRef; + +// Public data types +/** Font family format types */ +typedef enum AIFaceFormat { + kUnknownFormat = -1, + kTypeOneFormat, + kTrueTypeFormat +} AIFaceFormat; + +/** Type face encodings */ +typedef enum AIFaceEncoding { + kUnknownEncoding = -1, + kDontCareEncoding, + kStandardEncoding, + kSpecialEncoding +} AIFaceEncoding; + +/** Type face language scripts */ +typedef enum AIFaceScript { + kNativeAIScript = -2, + kUnknownAIScript = -1, + kRomanAIScript = 0, + kJapaneseAIScript = 1, + kTraditionalChineseAIScript = 2, + kKoreanAIScript = 3, + + kArabicAIScript = 4, + kHebrewAIScript = 5, + + kGreekAIScript = 6, + kCyrillicAIScript = 7, + + // the script number should be same as in Cool type Script Enum + kDevanagariAIScript = 9, + kGurmukhiAIScript = 10, + kGujaratiAIScript = 11, + kOriyaAIScript = 12, + kBengaliAIScript = 13, + kTamilAIScript = 14, + kTeluguAIScript = 15, + kKannadaAIScript = 16, + kMalayalamAIScript = 17, + + kSinhaleseAIScript = 18, + kBurmeseAIScript = 19, + kKhmerAIScript = 20, + kThaiAIScript = 21, + kLaotianAIScript = 22, + + kSimplifiedChineseAIScript = 25, + kEastEuropeanRomanAIScript = 29, + kSymbolAIScript = 32, + kEmojiAIScript, + kTurkishAIScript = 81, + kBalticAIScript = 85 +} AIFaceScript; + +/** MojiZume types */ +enum AIMojiZumeType { + kMojiZumeNone, + kMojiZumeGXTrueType, + kMojiZumePageMakerJ, + kMojiZumeSfntATM +}; + +/** Font style */ +struct AIFontStyle { + /** Font retrieval key */ + AIFontKey fontKey; + /** Font family format */ + enum AIFaceFormat format; + /** Font face encoding */ + enum AIFaceEncoding encoding; + /** Font face script */ + enum AIFaceScript script; + /** When true, this is the original encoding */ + AIBoolean originalEncoding; + /** When true, the font family is installed */ + AIBoolean familyInstalled; + /** Not used. */ + AIBoolean strikeInstalled; + /** When true, the font is fauxed for a missing font */ + AIBoolean fauxedInstalled; + /** When true, the font is a Character ID-keyed font */ + AIBoolean isCID; + /** The MojiZume type of the font */ + enum AIMojiZumeType mojiZumeType; + /** When true, this is an Open Type font */ + AIBoolean isOTF; + /** When true, this is a bitmap font */ + AIBoolean isBitmapFont; + /** When true, this is an Original Composite Format font*/ + AIBoolean isOCF; + /** When true, this is an Adobe Type Composer font*/ + AIBoolean isATC; + /** When true, this is an Adobe Multiple Master font*/ + AIBoolean isMultipleMaster; +}; + +/** Font orientations (writing directions). */ +enum AIMetricOrientation { + kAIUnknownMetricOrientation = 0, + kAIHorizontalMetricOrientation, + kAIVerticalMetricOrientation +}; + +/** Font metrics */ +struct AIFontMetrics { + /** Leading space in points */ + AIReal leading; + /** Ascent in points */ + AIReal ascent; + /** descent in points */ + AIReal descent; + /** Character bounding box */ + AIRealRect bbox; +}; + +/** Text orientation */ +typedef enum AITextOrientation { + kHorizontalTextOrientation, + kVerticalTextOrientation +} AITextOrientation; + + +/** Font technologies. */ +enum AIFontTechnology { + kAIUnknownFontTechnology = 0, + kAIAnyFontTechnology, + + kAIAdobeFontTechnology = 100, + kAITrueTypeFontTechnology +}; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides functions to access the set of fonts that is + available to Illustrator documents, and provide information about + individual fonts. + + The set of available fonts includes those from the operating + system, those installed with Illustrator, and substitute fonts for + missing fonts in open documents. The set of fonts can change during + a session as fonts are activated or deleted, and as documents are + opened or closed. + + There are several different types of font names: + \li The PostScript name is a unique, ASCII name that can + be stored in files to identify a font. For multiple master + instances, it includes the specific design axis values. + \li The Illustrator PostScript name is the PostScript name with + a suffix identifying the encoding. It can also be stored in + a file to identify a font. + \li A user name is a display name, which can be in ASCII or + a localized encoding. There can be several such names; for + example a full name describing the font, and the font family name. + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIFontSuite and \c #kAIFontVersion. + +*/ +struct AIFontSuite { + + /** Gets the total number of available fonts. Variations, such as + "Times Roman Regular" and "Times Roman Italic" are counted as + distinct fonts. Use with \c #IndexFontList() to iterate through + available fonts. + @param count [out] A buffer in which to return the number of fonts. + */ + AIAPI AIErr (*CountFonts)( ai::int32 *count ); + + /** Retrieves a font by index position. Use with \c #CountFonts() to + iterate through available fonts. Font indices can change as + fonts are added and removed. + @param index The 0-based position index. + @param fontKey [out] A buffer in which to return the font key. + */ + AIAPI AIErr (*IndexFontList)( ai::int32 index, AIFontKey *fontKey ); + + /** Gets the total number of font families. Variants, such as italic + and bold, are counted as a single family. Use with \c #IndexTypefaceList() to + iterate through available font families. + @param count [out] A buffer in which to return the number of font families. + */ + AIAPI AIErr (*CountTypefaces)( ai::int32 *count ); + + /** Retrieves a font family by index position. Use with \c #CountTypefaces() to + iterate through available font families. Indices can change as + fonts are added and removed. + @param index The 0-based position index. + @param typeFaceKey [out] A buffer in which to return the font family key. + */ + AIAPI AIErr (*IndexTypefaceList)( ai::int32 index, AITypefaceKey *typeFaceKey ); + + /** Gets the total number of variants (such as bold and italic) of a font family. + Use with \c #IndexTypefaceStyleList() to iterate through variants. + @param typeface The font family, as returned by \c #IndexTypefaceList(). + @param count [out] A buffer in which to return the number of variants. + */ + AIAPI AIErr (*CountTypefaceStyles)( AITypefaceKey typeface, ai::int32 *count ); + + /** Retrieves a variant of a font family by index position. Use with + \c #CountTypefaceStyles() to iterate through variants. + @param typeface The font family, as returned by \c #IndexTypefaceList(). + @param index The 0-based position index. + @param fontKey [out] A buffer in which to return the font key. + */ + AIAPI AIErr (*IndexTypefaceStyleList)( AITypefaceKey typeface, ai::int32 index, AIFontKey *fontKey ); + + /** Retrieves the family and variant of a font. + @param theKey The font key. + @param typefaceResult [out] A buffer in which to return the font family key. + @param styleResult [out] A buffer in which to return the index position + of the family variant (such as bold or italic). + */ + AIAPI AIErr (*TypefaceAndStyleFromFontKey)(AIFontKey theKey, AITypefaceKey *typefaceResult, ai::int16 *styleResult); + + /** Finds a font matching specific criteria. + @param postscriptName The PostScript font name, such as "Times-Roman", + or Illustrator PostScript font name. + @param fontTechnology The font type, such as Adobe or TrueType, an \c #AIFontTechnology value. + @param script The language for which the font was designed; an \c #AIFaceScript value. + @param substituteFlag When true, returns a substitute if an exact match is not found. + @param result [out] A buffer in which to return the font key. + */ + AIAPI AIErr (*FindFont)(const char *postscriptName, enum AIFontTechnology fontTechnology, AIFaceScript script, + AIBoolean substituteFlag, AIFontKey *result); + + /** Finds an Illustrator font matching a Mac OS system font. + @param fontRef The Mac OS ATS font ref + @param result [out] A buffer in which to return the font key. + */ + AIAPI AIErr (*FindMacFontFromMacFontRef)(AIMacFontRef macFontRef, AIFontKey *result); + + /** Not implemented. */ + AIAPI AIErr (*FindWinFont)(AILOGFONTA *logFont, AIFontKey *result); + + /** Retrieves the Mac OS ATS font ref for an Illustrator font. If the given font does not + correspond to a system font, gets the default system font. + @param fontKey The font key. + @param macFontRef [out] A buffer in which to return the Mac OS ATS font ref. + */ + AIAPI AIErr (*GetMacFontRef)(AIFontKey fontKey, AIMacFontRef& macFontRef); + + /** Retrieves typeface name of a font, or the system name for a system font in Windows. + @param fontKey The font key. + @param result [out] A buffer in which to return the typeface name, or, + in Windows only, the face name of the WindowsLogFont if the font is a system font.. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetSystemFontName)(AIFontKey fontKey, char *result, ai::int16 maxName); + + /** Sets the character widths for a fauxed, single-byte, horizontal font. + @param fontKey The font key. + @param charWidths A pointer to the new array of width values, in points. + This is an array of 256 values where each entry is the advance override + for the corresponding glyph. + */ + AIAPI AIErr (*SetCharWidths)(AIFontKey fontKey, AIReal *charWidths); + + // Accessing various attributes of a font...except the name...that's different + + /** Retrieves the font information for a font. + @param theKey The font key. + @param result [out] A buffer in which to return the font information structure. + */ + AIAPI AIErr (*GetFontInfo)( AIFontKey font, struct AIFontStyle *result); + + /** Retrieves the font metrics for a font. + @param theKey The font key. + @param result [out] A buffer in which to return the font metrics structure. + */ + AIAPI AIErr (*GetFontMetrics)( AIFontKey font, struct AIFontMetrics *result); + + /** Retrieves the default pen displacement for a glyph in a given orientation, + for a 1-point font. + @param font The font key. + @param glyphID The glyph identifier. + @param orientation The text orientation (horizontal or vertical). + @param hResult [out] A buffer in which to return the horizontal displacement, in points, + or \c NULL if the orientation is vertical. + @param vResult [out] A buffer in which to return the vertical displacement, in points, + or \c NULL if the orientation is horizontal. + */ + AIAPI AIErr (*GetGlyphDimensions)( AIFontKey font, AIGlyphID glyphID, enum AIMetricOrientation orientation, + AIReal *hResult, AIReal *vResult); + + /** Retrieves the default pen displacement for a UTF8-encoded character + in a given orientation, for a 1-point font. + @param font The font key. + @param charPtr A pointer to the platform-encoded character. + @param orientation The text orientation (horizontal or vertical). + @param hResult [out] A buffer in which to return the horizontal displacement, in points, + or 0 if the orientation is vertical. + @param vResult [out] A buffer in which to return the vertical displacement, in points, + or 0 if the orientation is horizontal. + */ + AIAPI AIErr (*GetCharDimensions)( AIFontKey font, const char *charPtr, enum AIMetricOrientation orientation, + AIReal *hResult, AIReal *vResult); + + /** Retrieves the default font for a language script. + @param script The language script. + @param result [out] A buffer in which to return the font key. + */ + AIAPI AIErr (*GetDefaultFont)( AIFaceScript script, AIFontKey *result); + + // Various ways to get the name of a font + + /** Retrieves the PostScript name of a font, with the encoding + information that Illustrator appends. This name is always encoded in ASCII. + @param font The font key. + @param fontName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetFullFontName)( AIFontKey font, char *fontName, ai::int16 maxName ); + + /** Retrieves the Illustrator PostScript name of a font (with encoding information + appended). This uniquely identifies a font, for example, in a file. + This name is always encoded in ASCII. + @param font The font key. + @param postScriptFontName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetPostScriptFontName)( AIFontKey fontKey, char* postScriptFontName, ai::int16 maxName ); + + /** Retrieves the ASCII-encoded name for the variant of a font (for example, "Bold Italic") + @param font The font key. + @param styleName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetFontStyleName)( AIFontKey font, char *styleName, ai::int16 maxName ); + + /** Retrieves the display name for the family of a font (for example, "Times Roman"). + The name is encoded either in ASCII or in the encoding of the font, + depending on the preference setting for using English font names. + @param font The font key. + @param familyName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetFontFamilyUIName)( AIFontKey font, char *familyName, ai::int16 maxName ); + + /** Retrieves the display name for the variant of a font (for example, "Bold Italic"). + The name is encoded either in ASCII or in the encoding of the font, + depending on the preference setting for using English font names. + @param font The font key. + @param styleName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetFontStyleUIName)( AIFontKey font, char *styleName, ai::int16 maxName ); + + /** Retrieves the ASCII-encoded name for a font family (for example, "Times Roman"). + @param typeface The font family key. + @param name [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetTypefaceName)( AITypefaceKey typeface, char *name, ai::int16 maxName ); + + /** Retrieves the full ASCII-encoded name for a font (for example, "Times Roman Bold Italic"). + The name is always encoded in ASCII. + @param font The font key. + @param userfontName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetUserFontName)( AIFontKey font, char *userfontName, ai::int16 maxName ); + + /** Retrieves the full display name for a font (for example, "Times Roman Bold Italic") + The name is encoded either in ASCII or in the encoding of the font, + depending on the preference setting for using English font names. + @param font The font key. + @param userfontName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetUserFontUIName)( AIFontKey font, char *userfontName, ai::int16 maxName ); + + + /** Converts an Illustrator font key to an Adobe Text Engine (ATE) + font reference, for use with ATE functions. + @param font The font key. + @param result [out] A buffer in which to return the ATE font reference. + @see \c ATETypes.h + */ + AIAPI AIErr (*FontFromFontKey)(AIFontKey font, FontRef *result); + + /** Converts an Adobe Text Engine (ATE) font reference to an Illustrator font key. + @param font The ATE font reference. + @param result [out] A buffer in which to return the font key. + @see \c ATETypes.h + */ + AIAPI AIErr (*FontKeyFromFont)(FontRef font, AIFontKey *result); + + /** Retrieves whether a font is substituted or not. + @param fontKey The font key. + @param outIsSubstituted [out] A buffer in which to return the boolean value. + */ + AIAPI AIErr (*GetFontIsSubstituted)(AIFontKey fontKey, AIBoolean& outIsSubstituted); + + // The following methods deal with accessing alternate glyph information + + /** Retrieves a glyph set, which contains information about alternate + glyphs within an OpenType font. + @param theFont An OpenType font. + @param otFeature When zero, gets information about all glyphs. Otherwise, + specify the feature of interest, as a 4-byte character sequence (in a \c ai::int32) + for an OpenType feature tag. + @param result [out] A buffer in which to return the glyph set. You must release + this object using \c #ReleaseGlyphSet() when it is no longer needed. + @see For the set of registered features tags, + \c https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags + */ + AIAPI AIErr (*GetGlyphSet)(AIFontKey theFont, ai::int32 otFeature, AIGlyphSet *result); + + /** Disposes of a glyph set object. + @param theSet The object, as returned by \c #GetGlyphSet(). */ + AIAPI AIErr (*ReleaseGlyphSet)(AIGlyphSet theSet); + + /** Gets the number of glyphs within a glyph set. Use with \c #GetGlyphInfo() to iterate + through glyphs. + @param theSet The glyph set object. + @param glyphCountResult [out] A buffer in which to return the number of glyphs. + */ + AIAPI AIErr (*CountGlyphs)(AIGlyphSet theSet, int *glyphCountResult); + + /** Retrieves information about a specific glyph. Use with \c #CountGlyphs() to iterate + through glyphs. + @param theSet The glyph set object. + @param glyphIndex The index position of the glyph, in the range [1..numGlyphs]. + @param glyphInfoResult [out] A buffer in which to return the glyph information. + */ + AIAPI AIErr (*GetGlyphInfo)(AIGlyphSet theSet, ai::int32 glyphIndex, AIGlyphInfo *glyphInfoResult); + + /** Gets the ordinal position of a given glyph within a glyph set. + @param theSet The glyph set object. + @param glyphID The unique identifier of the glyph. + @param glyphIndex [out] A buffer in which to return the index position + of the glyph, in the range [1..numGlyphs]. + */ + AIAPI AIErr (*GlyphIDToIndex)(AIGlyphSet theSet, AIGlyphID glyphID, int *glyphIndexResult); + + /** Retrieves all OpenType features supported by a particular font. + @param theFont The font key. + @param featureList [in, out] An array of OpenType features of length \c featureCount. + Each value is a 4-byte character sequence (in a \c ai::int32) representing + an OpenType feature tag. + Caller must provide the array. Pass NULL to obtain the size of the array required. + @param featureCount [out] A buffer in which to return the size of array required for + \c featureList. + @see For the set of registered features tags, + \c https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags + */ + AIAPI AIErr (*GetOTFeatures)(AIFontKey theFont, ai::int32 *featureList, ai::int32 *featureCount); + + /** Reports whether there are any glyphs for a given Open Type feature in a given font, or retrieves + the glyph set containing the glyphs, if any. + (Note that this function returns a numeric value, not an error code.) + @param theFeature The feature, a 4-byte character sequence (in a \c ai::int32) representing + an OpenType feature tag. + @param fontKey The font key. + @param existFlag When true, the function reports on whether the font contains any glyphs + for the feature. A font can define an OpenType feature, but assign no + glyphs to that feature. Use this assure that at least one glyph is present. +
When false, the function retrieves the glyph set + containing the glyphs (if any). This is the same as using \c #GetGlyphSet(). + @param result [out] A buffer in which to return the glyph set. You must release + this object using \c #ReleaseGlyphSet() when it is no longer needed. + @return Non-zero (true) if the font contains at least one glyph for the given feature, + zero (false) otherwise. + @see For the set of registered features tags, + \c https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags + */ + AIAPI ai::int32 (*GetGlyphsForFeatureAccessInfo)(ai::int32 theFeature, AIFontKey fontKey, AIBoolean existFlag, + AIGlyphSet *glyphSet); + + /** Retrieves the font that contains a glyph set. + @param glyphSetOpaque The glyph set. + @param result [out] A buffer in which to return the font object. + */ + AIAPI AIErr (*GetFontInstance)(AIGlyphSet glyphSetOpaque, AIFontInst **result); + + /** Retrieves the unique identifier of a glyph. + @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). + @param result [out] A buffer in which to return the glyph identifier. + */ + AIAPI AIErr (*GetGlyphID)(AIGlyphInfo glyphInfo, AIGlyphID *result); + + /** Retrieves the set of alternate glyphs for a given glyph. + @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). + @param result [out] A buffer in which to return the alternative glyph set. + */ + AIAPI AIErr (*GetAlternateGlyphs)(AIGlyphInfo glyphInfo, AIGlyphSet *result); + + /** Retrieves the OpenType features associated with a given glyph. + @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). + @param otFeatures [out] A buffer in which to return the features. Do not modify the returned + character array (which is not a null-terminated string). The array contains + a set of 4-character feature codes; for example "vertswsh" for a glyph + to which 'vert' and 'swsh' features can be applied. + @param otFeatureCount [out] A buffer in which to return the number of features in \c otFeatures. + @param otFeatureIndex [out] A buffer in which to return an array of length + \c otFeatureCount containing the number of alternates available for each + feature listed in the \c otFeatures array. + */ + AIAPI AIErr (*GetGlyphOTFeatures)(AIGlyphInfo glyphInfo, const char **otFeatures, ai::int32 *otFeatureCount, + ai::int32 **otFeatureIndex); + + /** Retrieves the Unicode character for a given glyph in a given font, with information about + what OpenType features were applied. + @param mGlyphID The glyph identifier. + @param fontKey The font key. + @param desiredOTFeature A string containing the OpenType features of interest. See + \c #GetGlyphOTFeatures(). The mapping of glyphs and feature sets to characters + is not 1:1, so the returned character can have a different set of features than those + requested. + @param theChar [out] A buffer in which to return the Unicode character. + @param resultLength [out] A buffer in which to return the number of features in \c theChar. + @param otFeatures [out] A buffer in which to return the OpenType features set that was + applied to \c theChar. See \c #GetGlyphOTFeatures(). You must release this memory with + \c #SPBasicSuite::FreeBlock() when it is no longer needed. + @param otFeatureCount [out] A buffer in which to return the number of features in \c otFeatures. + @param otFeatureIndex [out] A buffer in which to return an array of length + \c otFeatureCount containing the number of alternates available for each + feature listed in the \c otFeatures array. + You must release this memory with \c #SPBasicSuite::FreeBlock() when it is no longer needed. + */ + AIAPI AIErr (*GetGlyphUnicodeValue)(AIGlyphID mGlyphID, AIFontKey fontKey, const char *desiredOTFeature, + ASUnicode *theChar, int *resultLength, char **otFeatures, ai::int32 *otFeatureCount, ai::int32 **otFeatureIndex); + + /** Retrieves the font for a glyph. + @param theGlyphInfo The glyph information, as returned by \c #GetGlyphInfo(). + @param result [out] A buffer in which to return the font key. + */ + AIAPI AIErr (*GetGlyphFontKey)(AIGlyphInfo theGlyphInfo, AIFontKey *result); + + /** Retrieves the number of alternate glyphs for a given glyph. + @param theGlyphInfo The glyph information, as returned by \c #GetGlyphInfo(). + @param result [out] A buffer in which to return the number of alternative glyphs. + */ + AIAPI AIErr (*GetGlyphAlternateCount)(AIGlyphInfo theGlyphInfo, int *result); + + /** Retrieves the \e undefined glyph for a glyph set. Each font has one undefined glyph, but not every + glyph set contains one. Use \c #HasUndefinedGlyph() to check. + @param theSet The glyph set. + @param undefinedGlyphIDResult [out] A buffer in which to return the glyph identifier. + */ + AIAPI AIErr (*GetUndefinedGlyphID)(AIGlyphSet theSet, AIGlyphID *undefinedGlyphIDResult); + + /** Reports whether a glyph set contains an undefined glyph. Each font has one undefined glyph, + but not every glyph set contains one. Use \c #GetUndefinedGlyphID to retrieve it if there is one. + (Note that this function returns a boolean value, not an error code.) + @param theSet The glyph set. + @return True if the set contains an undefined glyph. + */ + AIAPI AIBoolean (*HasUndefinedGlyph)(AIGlyphSet theSet); + + /** Imports composite fonts from an AI or ATC file into the current document. + @param source The AI or ATC file path. + */ + AIAPI AIErr (*ImportCompositeFonts)(const ai::FilePath &source); + + /** Translates a character value to a single glyph in a given font. + @param fontKey The font key. + @param ch A string containing the character. Extracts at most + one glyph, using as many bytes as needed to form one glyph, + starting with the first byte pointed to by \c ch. + Derives the encoding from the font. + @param srcLen The number of bytes in \c ch. + @param orientation The text orientation, vertical or horizontal. + @param glyphID [out] A buffer in which to return the glyph identifier, or + undefined glyph for the font if a glyph is not defined for this character. + @return The error \c #kGlyphNotDefinedErr if a glyph is not defined for + this character. + */ + AIAPI AIErr (*ConvertCharacterToGlyphID) ( AIFontKey fontKey, const char* ch, ai::int32 srcLen, + enum AIMetricOrientation orientation, AIGlyphID* glyphID ); + + /** Translates a Unicode character value to a single glyph in a given font. + @param fontKey The font key. + @param ch A UTF16-encoded string containing the character. Extracts at most + one glyph, using as many characters as needed to form one glyph, + starting with the first character pointed to by \c ch. + @param srcLen The number of \c ASUnicode characters (not bytes) in \c ch. + @param orientation The text orientation, vertical or horizontal. + @param glyphID [out] A buffer in which to return the glyph identifier, or + undefined glyph for the font if a glyph is not defined for this character. + @return The error \c #kGlyphNotDefinedErr if a glyph is not defined for + this character. + */ + AIAPI AIErr (*ConvertUnicodeToGlyphID) ( AIFontKey fontKey, const ASUnicode* ch, ai::int32 srcLen, + enum AIMetricOrientation orientation, AIGlyphID* glyphID ); + + /** Retrieves the full display name for a font (for example, "Times Roman Bold Italic") + in Unicode (UTF16). + The name is either in English or the native language of the font depending on the + setting of the preference to use English font names. + @param fontKey The font key. + @param userfontName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetUserFontUINameUnicode)( AIFontKey fontKey, ASUnicode* userfontName, ai::int32 maxName ); + + /** Retrieves the display name for the family of a font (for example, "Times Roman") + in Unicode (UTF16). + The name is either in English or the native language of the font depending on the + setting of the preference to use English font names. + @param fontKey The font key. + @param familyName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetFontFamilyUINameUnicode)( AIFontKey fontKey, ASUnicode* familyName, ai::int32 maxName ); + + /** Retrieves the display name for the variant of a font (for example, "Bold Italic") + in Unicode (UTF16). + The name is either in English or the native language of the font depending on the + setting of the preference to use English font names. + @param fontKey The font key. + @param styleName [out] A buffer in which to return the name. + @param maxName The number of characters in the name string buffer. The name string, + including the \c NULL terminator, is truncated to this size if necessary. + */ + AIAPI AIErr (*GetFontStyleUINameUnicode)( AIFontKey fontKey, ASUnicode* styleName, ai::int32 maxName ); + + // New for Illustrator 12.0 + + /** Retrieves the ideographic character face (IFC) bounds of a font. + The ICF-box is the maximum bounding box of the ideographic portion of a CJK font, + usually centered within the em-box. The value is also defined also for non-CJK fonts. + The coordinate values are relative to the font coordinate system's origin. + X values increase to the right and Y values increase downward. + @param fontKey The font key. + @param icfBox [out] A buffer in which to return the bounding box + @see Baseline tags \c icfb and \c icft in the OpenType tag registry. + */ + AIAPI AIErr (*GetICFBox) ( AIFontKey fontKey, AIRealRect& icfBox ); + + // New for Illustrator 13.0 + + /** Retrieves the version string for a font file. If the font object is fauxed, + gets version information for the underlying font. + You can check whether the font is fauxed using \c #GetFontInfo(). + @param fontKey The font key. + @param versionString [out] A buffer in which to return the version string. + */ + AIAPI AIErr (*GetVersionString) ( AIFontKey fontKey, ai::UnicodeString& versionString ); + + /** Reports how many files constitute a font. For example, a Windows Type 1 font has a PFB + and a PFM file, and a Mac Type 1 font has a suitcase and an outline file, but an OpenType + font has only a single file. Use with \c #GetNthFilePath() to access the files. + + If the font is fauxed, returns the information for the underlying font used to faux + the missing font. Check whether the font is fauxed using \c #GetFontInfo(). + @param fontKey The font key. + @param count [out] A buffer in which to return the number of files. + This can be 0 for some fonts; see \c #GetNthFilePath(). + @note This function does not distinguish between two identical font files + and two different files for the same font. + */ + AIAPI AIErr (*GetFontFilePathCount) ( AIFontKey fontKey, ai::uint32& count ); + + /** Retrieves a file path associated with a font. Use with \c #GetFontFilePathCount() + to access font files. + + This method does not work for fonts whose paths Illustrator does not know, + such as Windows bitmap fonts, and Mac OS bitmap-only fonts. For an ATC font, + gets the location of the top-level rearrangement file only. + To get the paths of component fonts, iterate over the component dictionaries. + + If the font is fauxed, returns the information for the underlying font used to faux + the missing font. Check whether the font is fauxed using \c #GetFontInfo(). + + @param fontKey The font key. + @param n The position index of the file path, the range [0..pathCount-1]. + @param filePath [out] A buffer in which to return the path. + */ + AIAPI AIErr (*GetNthFilePath) ( AIFontKey fontKey, ai::uint32 n, ai::FilePath& filePath ); + + /** Gets the number of ATC components for a font. If the font is fauxed, + returns the information for the underlying font used to faux + the missing font. Check whether the font is fauxed, and that it + is an ATC font, using \c #GetFontInfo(). + @param fontKey The font key. + @param count [out] A buffer in which to return the number of ATC components. + This is 0 for a non-ATC font. + */ + AIAPI AIErr (*GetNumATCComponents) ( AIFontKey fontKey, ai::uint32& count ); + + /** Retrieves a component for an ATC font, by position index. Use with + \c #GetNumATCComponents() to access font components. + + If the font is fauxed, returns the information for the underlying font used to faux + the missing font. Check whether the font is fauxed, and that it + is an ATC font, using \c #GetFontInfo(). + + @param fontKey The font key. + @param n The position index of the component, the range [0..numATCComponents-1]. + @param componentFontKey [out] A buffer in which to return the component font key. + */ + AIAPI AIErr (*GetNthATCComponent) ( AIFontKey fontKey, ai::uint32 n, AIFontKey& componentFontKey ); + + /** Retrieves the full user name for a font (for example, "Times Roman Bold Italic"). + This might not be the same as the display name; retrieve the display name with + \c #GetUserFontUINameUnicode(). + @param fontKey The font key. + @param name [out] A buffer in which to return the name string. + @param native True to get the name in the native language of the font, false + to get the name in English, regardless of the font's language. + */ + AIAPI AIErr (*GetUserFontNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, + AIBoolean native); + + /** Retrieves the user name for the family of a font (for example, "Times Roman"). + This might not be the same as the display name; retrieve the display name with + \c #GetFontFamilyUINameUnicode(). + @param fontKey The font key. + @param name [out] A buffer in which to return the name string. + @param native True to get the name in the native language of the font, false + to get the name in English, regardless of the font's language. + */ + AIAPI AIErr (*GetFontFamilyNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, + AIBoolean native); + + /** Retrieves the user name for the style of a font (for example, "Bold Italic"). + This might not be the same as the display name; retrieve the display name with + \c #GetFontStyleUINameUnicode(). + @param fontKey The font key. + @param name [out] A buffer in which to return the name string. + @param native True to get the name in the native language of the font, false + to get the name in English, regardless of the font's language. + */ + AIAPI AIErr (*GetFontStyleNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, + AIBoolean native); + + /** Retrieves the ideographic em-box of a font, also known as an ideographic font's design space. + This defines a standard monospaced escapement around the glyphs of the font, for both horizontal and + vertical writing modes. It is one em high and one em wide unless the vendor explicitly indicates + otherwise in the font. The OpenType specification strongly recommends against this being other than an + em wide, but there are legitimate reasons for it to be other than one em high: some fonts used in + Japanese newspaper layout, for example, have a vertically compressed ideographic em-box. + + The returned value, an array with the left, top, right, and bottom edges + (in horizontal writing mode) of the ideographic em-box of a 1-unit-em font, + is defined for every font (including non-CJK fonts, where it can be used to em-box-align + these fonts alongside CJK fonts). + + The coordinate values are relative to the font coordinate system's origin. + X values increase to the right and Y values increase downward. + @param fontKey The font key. + @param ideoEmBox [out] A buffer in which to return the bounding box, + @see Baseline tag \c ideo in the OpenType tag registry for more information. + */ + AIAPI AIErr (*GetIdeoEmBox) ( AIFontKey fontKey, AIRealRect& ideoEmBox ); + + /** Retrieves a font from a given family that is the closest match for a given font from + another family. If the same style is present in the new family, it is selected; otherwise, + selects the closest match from the new family. + @param old_Family The typeface of a previously selected font family. + @param old_style The 0-based index of the font style to match within the old family. + @param new_Family The typeface of a new font family, in which to find a match. + + @param new_style [out] A bufffer in which to return the 0-based index of the best-match font in the new family. + */ + + AIAPI AIErr (*GetCloselyMatchingFontStyle) (AITypefaceKey old_Family, short* old_Style, AITypefaceKey new_Family, short* new_Style); + + /** Retrieves a font family by index position, from the list of all available font families. + Use with \c #CountTypefaces() to iterate through available font families. Indices can change as fonts are added and removed. + @param index The 0-based position index. + @param typeFaceKey [out] A buffer in which to return the font family key. + */ + + AIAPI AIErr (*IndexTypefaceListSortedByDefaultScript)(AITypefaceKey* typeface, ai::int32 index); + + AIAPI AIErr (*GetTypefaceUnicodeMenuName)(AITypefaceKey typeface, ai::UnicodeString& typefaceName); +}; + + +/** @ingroup Notifiers + Sent when the system language has changed. See \c #AIMEFontSuite. */ +#define kAICurrentLanguageChangedNotifier "AI Current Language Changed Notifier" + +#define kAIMEFontSuite "AI ME Font Suite" +#define kAIMEFontSuiteVersion1 AIAPI_VERSION(1) +#define kAIMEFontSuiteVersion kAIMEFontSuiteVersion1 +#define kAIMEFontVersion kAIMEFontSuiteVersion + +typedef struct { + + /** Retrieves a glyph set, which contains information about alternate + glyphs within an OpenType font. + @param theFont An OpenType font. + @param AILanguage The language code for the current system language. + @param otFeature When zero, gets information about all glyphs. Otherwise, + specify the feature of interest, as a 4-byte character sequence (in a \c ai::int32) + for an OpenType feature tag. + @param result [out] A buffer in which to return the glyph set. You must release + this object using \c #ReleaseGlyphSet() when it is no longer needed. + @see For the set of registered features tags, + \c https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags + */ + AIAPI AIErr (*GetGlyphSet)(AIFontKey theFont, int AILanguage, ai::int32 otFeature, AIGlyphSet *result); + /** Retrieves all OpenType features supported by a particular font. + @param theFont The font key. + @param AILanguage The language code for the current system language. + @param featureList [in, out] An array of OpenType features of length \c featureCount. + Each value is a 4-byte character sequence (in a \c ai::int32) representing + an OpenType feature tag. + Caller must provide the array. Pass NULL to obtain the size of the array required. + @param featureCount [out] A buffer in which to return the size of array required for + \c featureList. + @see For the set of registered features tags, + \c https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags + */ + AIAPI AIErr (*GetOTFeatures)(AIFontKey theFont, int AILanguage, ai::int32 *featureList, ai::int32 *featureCount); + + /** Reports whether there are any glyphs for a given Open Type feature in a given font, or retrieves + the glyph set containing the glyphs, if any. + (Note that this function returns a numeric value, not an error code.) + @param theFeature The feature, a 4-byte character sequence (in a \c ai::int32) representing + an OpenType feature tag. + @param fontKey The font key. + @param AILanguage The language code for the current system language. + @param existFlag When true, the function reports on whether the font contains any glyphs + for the feature. A font can define an OpenType feature, but assign no + glyphs to that feature. Use this assure that at least one glyph is present. +
When false, the function retrieves the glyph set + containing the glyphs (if any). This is the same as using \c #GetGlyphSet(). + @param result [out] A buffer in which to return the glyph set. You must release + this object using \c #ReleaseGlyphSet() when it is no longer needed. + @return Non-zero (true) if the font contains at least one glyph for the given feature, + zero (false) otherwise. + @see For the set of registered features tags, + \c https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags + */ + AIAPI ai::int32 (*GetGlyphsForFeatureAccessInfo)(ai::int32 theFeature, AIFontKey fontKey, int AILanguage, AIBoolean existFlag, + AIGlyphSet *glyphSet); + /** Retrieves the Unicode character for a given glyph in a given font, with information about + what OpenType features were applied. + @param mGlyphID The glyph identifier. + @param fontKey The font key. + @param AILanguage The language code for the current system language. + @param desiredOTFeature A string containing the OpenType features of interest. See + \c #GetGlyphOTFeatures(). The mapping of glyphs and feature sets to characters + is not 1:1, so the returned character can have a different set of features than those + requested. + @param theChar [out] A buffer in which to return the Unicode character. + @param resultLength [out] A buffer in which to return the number of features in \c theChar. + @param otFeatures [out] A buffer in which to return the OpenType features set that was + applied to \c theChar. See \c #GetGlyphOTFeatures(). You must release this memory with + \c #SPBasicSuite::FreeBlock() when it is no longer needed. + @param otFeatureCount [out] A buffer in which to return the number of features in \c otFeatures. + @param otFeatureIndex [out] A buffer in which to return an array of length + \c otFeatureCount containing the number of alternates available for each + feature listed in the \c otFeatures array. + You must release this memory with \c #SPBasicSuite::FreeBlock() when it is no longer needed. + */ + AIAPI AIErr (*GetGlyphUnicodeValue)(AIGlyphID mGlyphID, AIFontKey fontKey, int AILanguage, const char *desiredOTFeature, + ASUnicode *theChar, int *resultLength, char **otFeatures, ai::int32 *otFeatureCount, ai::int32 **otFeatureIndex); + /** Retrieves the language code for the current system language. + (Note that this function returns a numeric value, not an error code.) + @return The language code. + */ + AIAPI int (*GetCurrentLanguage)(); + + /** Converts an Adobe Text Engine language object to an Illustrator language code. + (Note that this function returns a numeric value, not an error code.) + @param sloLang The Adobe Text Engine language object. + @return The language code. + */ + AIAPI int (*SLOLanguageToAILanguage)(ATE::Language sloLang); + + /** Retrieves the language from a glyph-information structure. + @param glyphInfo The glyph-information structure. + @param result [out] A buffer in which to return the language code. + + */ + AIAPI AIErr (*GetGlyphLanguage)(AIGlyphInfo glyphInfo, int *result); +} AIMEFontSuite; + +#include "AIHeaderEnd.h" + +#endif // __AIFont__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIForeignObject.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIForeignObject.h index cd879ab..73b70c2 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIForeignObject.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIForeignObject.h @@ -1,171 +1,171 @@ -#ifndef __AIForeignObject__ -#define __AIForeignObject__ - -/* - * Name: AIForeignObject.h - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2002-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/*******************************************************************************/ -// Imports - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIForeignObject.h */ - -/*******************************************************************************/ -// Constants -/** Foreign Object Suite name */ -#define kAIForeignObjectSuite "AI Foreign Object Suite" -/** Foreign Object Suite version */ -#define kAIForeignObjectSuiteVersion4 AIAPI_VERSION(4) -/** Foreign Object Suite version */ -#define kAIForeignObjectSuiteVersion kAIForeignObjectSuiteVersion4 -/** Foreign Object Suite version */ -#define kAIForeignObjectVersion kAIForeignObjectSuiteVersion - - - -/*******************************************************************************/ -// Types - -/** Wrap this \c AGMDisplayListPort* as a \c CAGMDisplayListPort - or some baseclass in order to use it. */ -typedef struct _AIDisplayPort *AIDisplayPortHandle; - - -/*******************************************************************************/ -// Suite - - -/** @ingroup Suites - This suite allows you to work with \e foreign \e objects, that is, - art objects that encapsulate imaging constructs which are supported by PDF and the - Adobe Imaging Model, but are not native to Illustrator. - - Foreign objects behave like placed objects in that they can be positioned on - the page, saved, displayed on the screen, and printed. They do not, however, respond - to other Illustrator editing commands. A foreign object can use global resources - that are used by other artwork elements, such as fonts or spot colors. - - Illustrator requires that all spot colors used in a document be installed into - the swatch list. Each spot color must have a unique definition and spot colors - used by foreign objects are locked against having their definition edited. The - installation and locking of spot colors needs to be done once the foreign - object has been created and is known to be a permanent result of an operation - on the document, as opposed to a temporary object created during an operation. - For this reason installation of spot colors is done when an editing operation - is committed. When spot colors are installed, their definitions can conflict - with existing spot colors. in which case the user is prompted to resolve - the conflict. - - @see \c #AIFOConversionSuite for functions that expand foreign objects - to native Illustrator artwork. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIForeignObjectSuite and \c #kAIForeignObjectVersion. -*/ -typedef struct AIForeignObjectSuite { - - /** Creates a new, empty foreign object. Pass this object to \c #GetDisplayPort(), - and draw into that port to fill the object. - @param paintOrder The paint order position of the new art, relative to the - \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object.See \c #AIArtSuite::NewArt(). - @param copyObjects When true, all objects drawn into the display list are deep copied. - Set to false for maximum efficiency, but must be true if the objects - depend on resources that will go away after the display list has been - created. - @param newArt [out] A buffer in which to return the new artwork. - */ - AIAPI AIErr (*New) (ai::int16 paintOrder, AIArtHandle prep, AIBoolean copyObjects, AIArtHandle *newArt); - - /** Reports whether an art object is a foreign object. - (Note that this function returns a boolean value, not an error code.) - @param art The art object. - @return True if the art is a foreign object. - */ - AIAPI AIBoolean (*Is) (AIArtHandle art); - - /** Retrieves the bounds of a foreign object (that is, the bounds of the - display list contents before application of a transformation matrix, - @param art The foreign object - @param bounds [out] A buffer in which to return the bounding box. - */ - AIAPI AIErr (*GetBounds) ( AIArtHandle art, AIRealRect *bounds ); - - /** Sets the bounds of the foreign object (that is, the bounds of the - display list contents before application of a transformation matrix, - @param art The foreign object - @param bounds The bounding box. - */ - AIAPI AIErr (*SetBounds) ( AIArtHandle art, AIRealRect *bounds ); - - /** Retrieves the transformation matrix of a foreign object, which - transforms display list coordinates to artboard coordinates. - @param art The foreign object - @param matrix [out] A buffer in which to return the transformation matrix. - */ - AIAPI AIErr (*GetMatrix) (AIArtHandle art, AIRealMatrix *matrix); - - /** Sets the transformation matrix of a foreign object, which - transforms display list coordinates to artboard coordinates. - @param art The foreign object - @param matrix The transformation matrix. - */ - AIAPI AIErr (*SetMatrix) (AIArtHandle art, AIRealMatrix *matrix); - - /** Retrieves the AGM display port of a foreign object, - Pass a new, empty foreign object, and draw into the port. - The drawing commands are recorded by the display port and - are played back whenever the foreign object is rendered. - - One way to draw into the display port is to set it as the - \c portV6 member of the \c #AIDrawArtData structure and use - \c #AIDrawArtSuite::DrawArt(). If you have access to the AGM - interface, you can draw directly into the display list or play its - contents to another AGM port. - @param art The foreign object, as returned by \c #New(). - @param port [out] A buffer in which to return the display port. - */ - AIAPI AIErr (*GetDisplayPort)(AIArtHandle art, AIDisplayPortHandle *port); - - /** Not implemented. a no-op. */ - AIAPI AIErr (*InstallResources)(AIArtHandle art); - - /** Duplicates a foreign object, stripping off any attributes - that affect the rendering of the contents of the object, - other than the transformation matrix. - Used with the \c #kAIFOConversionSuppressAttributes flag in - the \c #AIFOConversionSuite. - @param art The foreign object. - @param paintOrder The paint order position of the new art, relative to the - \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object.See \c #AIArtSuite::NewArt(). - @param newArt [out] A buffer in which to return the new artwork. - */ - AIAPI AIErr (*DuplicateForConversion)(AIArtHandle art, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle* newArt); - -} AIForeignObjectSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIForeignObject__ +#define __AIForeignObject__ + +/* + * Name: AIForeignObject.h + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2002-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/*******************************************************************************/ +// Imports + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIForeignObject.h */ + +/*******************************************************************************/ +// Constants +/** Foreign Object Suite name */ +#define kAIForeignObjectSuite "AI Foreign Object Suite" +/** Foreign Object Suite version */ +#define kAIForeignObjectSuiteVersion4 AIAPI_VERSION(4) +/** Foreign Object Suite version */ +#define kAIForeignObjectSuiteVersion kAIForeignObjectSuiteVersion4 +/** Foreign Object Suite version */ +#define kAIForeignObjectVersion kAIForeignObjectSuiteVersion + + + +/*******************************************************************************/ +// Types + +/** Wrap this \c AGMDisplayListPort* as a \c CAGMDisplayListPort + or some baseclass in order to use it. */ +typedef struct _AIDisplayPort *AIDisplayPortHandle; + + +/*******************************************************************************/ +// Suite + + +/** @ingroup Suites + This suite allows you to work with \e foreign \e objects, that is, + art objects that encapsulate imaging constructs which are supported by PDF and the + Adobe Imaging Model, but are not native to Illustrator. + + Foreign objects behave like placed objects in that they can be positioned on + the page, saved, displayed on the screen, and printed. They do not, however, respond + to other Illustrator editing commands. A foreign object can use global resources + that are used by other artwork elements, such as fonts or spot colors. + + Illustrator requires that all spot colors used in a document be installed into + the swatch list. Each spot color must have a unique definition and spot colors + used by foreign objects are locked against having their definition edited. The + installation and locking of spot colors needs to be done once the foreign + object has been created and is known to be a permanent result of an operation + on the document, as opposed to a temporary object created during an operation. + For this reason installation of spot colors is done when an editing operation + is committed. When spot colors are installed, their definitions can conflict + with existing spot colors. in which case the user is prompted to resolve + the conflict. + + @see \c #AIFOConversionSuite for functions that expand foreign objects + to native Illustrator artwork. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIForeignObjectSuite and \c #kAIForeignObjectVersion. +*/ +typedef struct AIForeignObjectSuite { + + /** Creates a new, empty foreign object. Pass this object to \c #GetDisplayPort(), + and draw into that port to fill the object. + @param paintOrder The paint order position of the new art, relative to the + \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object.See \c #AIArtSuite::NewArt(). + @param copyObjects When true, all objects drawn into the display list are deep copied. + Set to false for maximum efficiency, but must be true if the objects + depend on resources that will go away after the display list has been + created. + @param newArt [out] A buffer in which to return the new artwork. + */ + AIAPI AIErr (*New) (ai::int16 paintOrder, AIArtHandle prep, AIBoolean copyObjects, AIArtHandle *newArt); + + /** Reports whether an art object is a foreign object. + (Note that this function returns a boolean value, not an error code.) + @param art The art object. + @return True if the art is a foreign object. + */ + AIAPI AIBoolean (*Is) (AIArtHandle art); + + /** Retrieves the bounds of a foreign object (that is, the bounds of the + display list contents before application of a transformation matrix, + @param art The foreign object + @param bounds [out] A buffer in which to return the bounding box. + */ + AIAPI AIErr (*GetBounds) ( AIArtHandle art, AIRealRect *bounds ); + + /** Sets the bounds of the foreign object (that is, the bounds of the + display list contents before application of a transformation matrix, + @param art The foreign object + @param bounds The bounding box. + */ + AIAPI AIErr (*SetBounds) ( AIArtHandle art, AIRealRect *bounds ); + + /** Retrieves the transformation matrix of a foreign object, which + transforms display list coordinates to artboard coordinates. + @param art The foreign object + @param matrix [out] A buffer in which to return the transformation matrix. + */ + AIAPI AIErr (*GetMatrix) (AIArtHandle art, AIRealMatrix *matrix); + + /** Sets the transformation matrix of a foreign object, which + transforms display list coordinates to artboard coordinates. + @param art The foreign object + @param matrix The transformation matrix. + */ + AIAPI AIErr (*SetMatrix) (AIArtHandle art, AIRealMatrix *matrix); + + /** Retrieves the AGM display port of a foreign object, + Pass a new, empty foreign object, and draw into the port. + The drawing commands are recorded by the display port and + are played back whenever the foreign object is rendered. + + One way to draw into the display port is to set it as the + \c portV6 member of the \c #AIDrawArtData structure and use + \c #AIDrawArtSuite::DrawArt(). If you have access to the AGM + interface, you can draw directly into the display list or play its + contents to another AGM port. + @param art The foreign object, as returned by \c #New(). + @param port [out] A buffer in which to return the display port. + */ + AIAPI AIErr (*GetDisplayPort)(AIArtHandle art, AIDisplayPortHandle *port); + + /** Not implemented. a no-op. */ + AIAPI AIErr (*InstallResources)(AIArtHandle art); + + /** Duplicates a foreign object, stripping off any attributes + that affect the rendering of the contents of the object, + other than the transformation matrix. + Used with the \c #kAIFOConversionSuppressAttributes flag in + the \c #AIFOConversionSuite. + @param art The foreign object. + @param paintOrder The paint order position of the new art, relative to the + \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object.See \c #AIArtSuite::NewArt(). + @param newArt [out] A buffer in which to return the new artwork. + */ + AIAPI AIErr (*DuplicateForConversion)(AIArtHandle art, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle* newArt); + +} AIForeignObjectSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGeometry.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGeometry.h index fb63458..7453a16 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGeometry.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGeometry.h @@ -1,506 +1,510 @@ -#ifndef __AIGeometry__ -#define __AIGeometry__ - -/* - * Name: AIGeometry.h - * Purpose: Adobe Illustrator Geometry Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1996-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIArt.h" -#include "AIPathStyle.h" -#include "AIRaster.h" - - -#include "AIHeaderBegin.h" - -/** @file AIGeometry.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIGeometrySuite "AI Geometry Suite" -#define kAIGeometryVersion6 AIAPI_VERSION(6) -#define kAIGeometrySuiteVersion kAIGeometryVersion6 - - -/** @ingroup Errors */ -#define kCancelledErr kCanceledErr -/** @ingroup Errors */ -#define kFormatErr 'FRM!' - - -/** Types of art objects that can be enumerated to \c #AIGeometryOrganizationProcs. - These correspond to \c #AIArtType values for objects. - See \c #AIGeometrySuite - */ -typedef enum { - /** Marks the end of an object enumeration. */ - kAIGeometryOrganizeNull = 0, - /** A path object. */ - kAIGeometryOrganizePath, - /** A group object. */ - kAIGeometryOrganizeGroup, - /** A compound object. */ - kAIGeometryOrganizeCompound, - /** A placed object. */ - kAIGeometryOrganizePlaced, - /** A raster object. */ - kAIGeometryOrganizeRaster, - /** A text frame object. - (As of AI11 the text organization callbacks are called for each text frame.) */ - kAIGeometryOrganizeText, - /** A text path object. - (As of AI11 this is called if the text frame has a confining path--that is, - it is area text or text on a path). */ - kAIGeometryOrganizeTextPath, - /** A text line object. - (Obsolete, not invoked by AI11 or later.) */ - kAIGeometryOrganizeTextLine, - /** A clipping group object. */ - kAIGeometryOrganizeClipGroup, - /** A mask object. */ - kAIGeometryOrganizeMask, - /** A mesh object. */ - kAIGeometryOrganizeMesh, - /** A symbol object. */ - kAIGeometryOrganizeSymbol, - /** A foreign object. - @note AI11 and later.*/ - kAIGeometryOrganizeForeignObject, - /** A legacy text object. - @note AI11 and later. */ - kAIGeometryOrganizeLegacyText, - /** A chart object. */ - kAIGeometryOrganizeChart, - /** A Plugin Art Object. - @note AI19.2 and later */ - kAIGeometryOrganizePluginArt, - /** Internal */ - kAIGeometryOrganizeDummy = 0xFFFFFFFF - -} AIGeometryOrganizationType; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Developer-defined data for geometry callbacks. - See \c #AIGeometrySuite -*/ -typedef void *AIGeometryUserData; - -/** Callback prototype for \c #AIGeometryOrganizationProcs. Called before enumeration - begins for an object of an associated \c #AIGeometryOrganizationType. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param object The art object to be enumerated. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryBeginProc)(AIGeometryUserData userData, AIArtHandle object); - -/** Callback prototype for \c #AIGeometryOrganizationProcs. Called after enumeration - ends or is halted by a 1 result for an object of an associated \c #AIGeometryOrganizationType. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param object The art object that was enumerated. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryEndProc)(AIGeometryUserData userData, AIArtHandle object); - -/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe paths - and outlines within a shape. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param p The destination location of the move. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryMoveToProc)(AIGeometryUserData userData, AIRealPoint *p); - -/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe each - path or outline within an element of the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param p The destination location of the line draw. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryLineToProc)(AIGeometryUserData userData, AIRealPoint *p); - -/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe each - path or outline within an element of the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param p1 The first curve point. - @param p2 The second curve point. - @param p3 The third curve point. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryCurveToProc)(AIGeometryUserData userData, AIRealPoint *p1, AIRealPoint *p2, AIRealPoint *p3); - -/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe each - path or outline within an element of the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryClosePathProc)(AIGeometryUserData userData); - -/** Callback prototype for \c #AIGeometryPaintingProcs. Called to describe the fill - of an element of the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryFillProc)(AIGeometryUserData userData); - -/** Callback prototype for \c #AIGeometryPaintingProcs. Called to describe the strokes - of an element of the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryStrokeProc)(AIGeometryUserData userData); - -/** Callback prototype for \c #AIGeometryPaintingProcs. Called to describe the clipping - of an element of the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryClipProc)(AIGeometryUserData userData); - -/** Callback prototype for \c #AIGeometryPaintingProcs. Called when an outline - within the art tree being iterated is filled with an image. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param raster The image object. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryImageProc)(AIGeometryUserData userData, AIArtHandle raster); - - /** Callback prototype for \c #AIGeometryPaintingProcs. Called when an outline - within the art tree being iterated is filled with an image. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param raster The image mask object. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryImageMaskProc)(AIGeometryUserData userData, AIArtHandle raster); - - /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param gray The grayscale value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetGrayProc)(AIGeometryUserData userData, AIReal gray); - -/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param cyan The CMYK cyan value. - @param magenta The CMYK magenta value. - @param yellow The CMYK yellow value. - @param black The CMYK black value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetCMYKColorProc)(AIGeometryUserData userData, AIReal cyan, AIReal magenta, AIReal yellow, AIReal black); - -/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param red The RGB red value. - @param green The RGB green value. - @param blue The RGB blue value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetRGBColorProc)(AIGeometryUserData userData, AIReal red, AIReal green, AIReal blue); - - /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param alpha The alpha channel value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetAlphaProc)(AIGeometryUserData userData, AIReal alpha); - - /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param customColor The custom color. - @param tint The amount of the color, a percentage in the range [0..1]. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetCustomColorProc)(AIGeometryUserData userData, AICustomColorHandle customColor, AIReal tint); - - /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param gradient The gradient object. - @param gradientOrigin The origin point. - @param gradientAngle The angle. - @param gradientLength The length. - @param hiliteAngle The highlight angle. - @param hiliteLength The highlight length. - @param matrix The transformation matrix. - @return 0 for enumeration to continue, 1 to halt enumeration. - @see \c #AIGradientStyle - */ -typedef ai::int16 (*AIGeometrySetGradientColorProc)(AIGeometryUserData userData, - AIGradientHandle gradient, - AIRealPoint *gradientOrigin, - AIReal gradientAngle, - AIReal gradientLength, - AIReal hiliteAngle, - AIReal hiliteLength, - AIRealMatrix *matrix); - -/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param pattern The pattern object. - @param shiftDistance Pattern style value. - @param shiftAngle Pattern style value. - @param scale Pattern style value. - @param rotateAngle Pattern style value. - @param reflect Pattern style value. - @param reflectAngle Pattern style value. - @param shearAngle Pattern style value. - @param shearAxis Pattern style value. - @return 0 for enumeration to continue, 1 to halt enumeration. - @see \c #AIPatternStyle - */ -typedef ai::int16 (*AIGeometrySetPatternColorProc)(AIGeometryUserData userData, - AIPatternHandle pattern, - AIReal shiftDistance, - AIReal shiftAngle, - AIRealPoint *scale, - AIReal rotateAngle, - AIBoolean reflect, - AIReal reflectAngle, - AIReal shearAngle, - AIReal shearAxis, - AIRealMatrix *matrix); -/** Callback prototype for \c #AIGeometryStateProcs. Called when an outline - within the art tree being iterated is filled with an image. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param alpha The alpha channel value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometryImageCallback)(AIGeometryUserData userData, - AIArtHandle raster, - AISlice *artSlice, - AITile *workTile, - AISlice *workSlice); - -/** Callback prototype for \c #AIGeometryStateProcs. Called for the - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param lineWidth The line width value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetLineWidthProc)(AIGeometryUserData userData, AIReal lineWidth); - - /** Callback prototype for \c #AIGeometryStateProcs. Called for the - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param lineCap The line cap value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetLineCapProc)(AIGeometryUserData userData, AILineCap lineCap); - -/** Callback prototype for \c #AIGeometryStateProcs. Called for the - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param lineJoin The line join value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetLineJoinProc)(AIGeometryUserData userData, AILineJoin lineJoin); - -/** Callback prototype for \c #AIGeometryStateProcs. Called for the - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param miterLimit The miter limit value. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetMiterLimitProc)(AIGeometryUserData userData, AIReal miterLimit); - -/**Callback prototype for \c #AIGeometryStateProcs. Called for the - stroke of each element within the art tree being iterated. - See \c #AIGeometrySuite - @param userData Developer-defined data. - @param offset The dash offset value. - @param length The number of dash values. - @param array The array of dash values. - @return 0 for enumeration to continue, 1 to halt enumeration. - */ -typedef ai::int16 (*AIGeometrySetDashProc)(AIGeometryUserData userData, AIReal offset, ai::int16 length, AIReal array[]); - -/** Passed as a pointer to a list of organization types - with associated begin/end procedures. - The list is terminated by an entry with an organization type of 0. - See \c #AIGeometrySuite -*/ -typedef struct { - - /** The type of object to which these procedures apply. */ - AIGeometryOrganizationType type; - /** Procedure called before enumerating an object of this type. */ - AIGeometryBeginProc begin; - /** Procedure called after enumerating an object of this type. */ - AIGeometryEndProc end; - -} AIGeometryOrganizationProcs; - -/** Callbacks that get information about how paths are constructed. - Called for leaf objects. - See \c #AIGeometrySuite -*/ -typedef struct { - AIGeometryMoveToProc moveTo; - AIGeometryLineToProc lineTo; - AIGeometryCurveToProc curveTo; - AIGeometryClosePathProc closePath; - -} AIGeometryConstructionProcs; - -/** Callbacks that get information about how objects are painted. - Called for leaf objects. The interior region of a fill or clip can - be determined using either the non-zero winding or even-odd rules - (see the PDF reference manual for a definition). The eofill and - eoclip call backs indicate even-odd while the others indicate non- - zero winding. - See \c #AIGeometrySuite -*/ -typedef struct { - - AIGeometryFillProc fill; - AIGeometryFillProc eofill; - AIGeometryStrokeProc stroke; - AIGeometryClipProc clip; - AIGeometryClipProc eoclip; - AIGeometryImageProc image; - AIGeometryImageMaskProc imageMask; - -} AIGeometryPaintingProcs; - -/** Callbacks that get information about painting options. - Called for leaf objects. - See \c #AIGeometrySuite -*/ -typedef struct { - - AIGeometrySetGrayProc setWhiteColor; - AIGeometrySetGrayProc setBlackColor; - AIGeometrySetGrayProc setGrayColor; - AIGeometrySetCMYKColorProc setCMYKColor; - AIGeometrySetRGBColorProc setRGBColor; /* unimplemented */ - AIGeometrySetAlphaProc setAlpha; /* unimplemented */ - AIGeometrySetCustomColorProc setCustomColor; - AIGeometrySetGradientColorProc setGradientColor; - AIGeometrySetPatternColorProc setPatternColor; - - AIGeometrySetLineWidthProc setLineWidth; - AIGeometrySetLineCapProc setLineCap; - AIGeometrySetLineJoinProc setLineJoin; - AIGeometrySetMiterLimitProc setMiterLimit; - AIGeometrySetDashProc setDash; - -} AIGeometryStateProcs; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides an iteration mechanism for collecting information about - the art objects in the various kinds of artwork trees. - It allows you to define a set of callback procedures to work with - various aspects of artwork, including the placement, style, and color attributes. - The \c #GeometryIterate() function enumerates the contents of an artwork - subtree to a set of callback functions that receive various kinds - of information about each object. You need supply only the callbacks of interest - to your plug-in. - - All of the object information passed to the callbacks is public information that - can be accessed directly through SDK functions. You can also define and pass - arbitrary data to the callbacks, to use together with the object data. - - All callbacks should return 0 to continue processing the next - artwork element, or nonzero to halt processing. This allows you to prune - the traversal of the artwork tree. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIGeometrySuite and \c #kAIGeometryVersion. - */ -typedef struct { - - /** Supplies information to developer-defined callback procedures, - calling the procedures iteratively for each member of an artwork tree whose - root is a specified art object. - @param art The root art object. - @param organizationProcs For each object in the tree, calls the begin and end procedure - associated the type before and after enumerating the object. - @param constructionProcs Contains pointers to callbacks that receive a geometric - description of each leaf art object. - @param paintingProcs Contains pointers to callbacks that receive information - about how each leaf object is painted. - @param stateProcs Contains pointers to callbacks that receive additional parameters - to the painting operations. - @param userData Developer-defined data to be passed to callbacks. - @param skipArtTypes A logical OR of \c #AIArtUserAttr values for art objects to skip during iteration. - As an example, pass kArtHidden | kArtLocked to skip hidden and locked arts - Pass 0 to skip no arts. - */ - ASAPI AIErr (*GeometryIterate) ( AIArtHandle art, - AIGeometryOrganizationProcs *organizationProcs, - AIGeometryConstructionProcs *constructionProcs, - AIGeometryPaintingProcs *paintingProcs, - AIGeometryStateProcs *stateProcs, - AIGeometryUserData userData, - ai::int32 skipArtTypes); - -} AIGeometrySuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIGeometry__ +#define __AIGeometry__ + +/* + * Name: AIGeometry.h + * Purpose: Adobe Illustrator Geometry Suite + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1996-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AIArt.h" +#include "AIPathStyle.h" +#include "AIRaster.h" + + +#include "AIHeaderBegin.h" + +/** @file AIGeometry.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIGeometrySuite "AI Geometry Suite" +#define kAIGeometryVersion6 AIAPI_VERSION(6) +#define kAIGeometrySuiteVersion kAIGeometryVersion6 + + +/** @ingroup Errors */ +#define kCancelledErr kCanceledErr +/** @ingroup Errors */ +#define kFormatErr 'FRM!' + + +/** Types of art objects that can be enumerated to \c #AIGeometryOrganizationProcs. + These correspond to \c #AIArtType values for objects. + See \c #AIGeometrySuite + */ +typedef enum { + /** Marks the end of an object enumeration. */ + kAIGeometryOrganizeNull = 0, + /** A path object. */ + kAIGeometryOrganizePath, + /** A group object. */ + kAIGeometryOrganizeGroup, + /** A compound object. */ + kAIGeometryOrganizeCompound, + /** A placed object. */ + kAIGeometryOrganizePlaced, + /** A raster object. */ + kAIGeometryOrganizeRaster, + /** A text frame object. + (As of AI11 the text organization callbacks are called for each text frame.) */ + kAIGeometryOrganizeText, + /** A text path object. + (As of AI11 this is called if the text frame has a confining path--that is, + it is area text or text on a path). */ + kAIGeometryOrganizeTextPath, + /** A text line object. + (Obsolete, not invoked by AI11 or later.) */ + kAIGeometryOrganizeTextLine, + /** A clipping group object. */ + kAIGeometryOrganizeClipGroup, + /** A mask object. */ + kAIGeometryOrganizeMask, + /** A mesh object. */ + kAIGeometryOrganizeMesh, + /** A symbol object. */ + kAIGeometryOrganizeSymbol, + /** A foreign object. + @note AI11 and later.*/ + kAIGeometryOrganizeForeignObject, + /** A legacy text object. + @note AI11 and later. */ + kAIGeometryOrganizeLegacyText, + /** A chart object. */ + kAIGeometryOrganizeChart, + /** A Plugin Art Object. + @note AI19.2 and later */ + kAIGeometryOrganizePluginArt, + /** A Graph Object. */ + kAIGeometryOrganizeGraph, + /** A repeat object */ + kAIGeometryOrganizeRepeat, + /** Internal */ + kAIGeometryOrganizeDummy = 0xFFFFFFFF + +} AIGeometryOrganizationType; + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Developer-defined data for geometry callbacks. + See \c #AIGeometrySuite +*/ +typedef void *AIGeometryUserData; + +/** Callback prototype for \c #AIGeometryOrganizationProcs. Called before enumeration + begins for an object of an associated \c #AIGeometryOrganizationType. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param object The art object to be enumerated. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryBeginProc)(AIGeometryUserData userData, AIArtHandle object); + +/** Callback prototype for \c #AIGeometryOrganizationProcs. Called after enumeration + ends or is halted by a 1 result for an object of an associated \c #AIGeometryOrganizationType. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param object The art object that was enumerated. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryEndProc)(AIGeometryUserData userData, AIArtHandle object); + +/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe paths + and outlines within a shape. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param p The destination location of the move. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryMoveToProc)(AIGeometryUserData userData, AIRealPoint *p); + +/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe each + path or outline within an element of the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param p The destination location of the line draw. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryLineToProc)(AIGeometryUserData userData, AIRealPoint *p); + +/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe each + path or outline within an element of the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param p1 The first curve point. + @param p2 The second curve point. + @param p3 The third curve point. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryCurveToProc)(AIGeometryUserData userData, AIRealPoint *p1, AIRealPoint *p2, AIRealPoint *p3); + +/** Callback prototype for \c #AIGeometryConstructionProcs. Called to describe each + path or outline within an element of the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryClosePathProc)(AIGeometryUserData userData); + +/** Callback prototype for \c #AIGeometryPaintingProcs. Called to describe the fill + of an element of the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryFillProc)(AIGeometryUserData userData); + +/** Callback prototype for \c #AIGeometryPaintingProcs. Called to describe the strokes + of an element of the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryStrokeProc)(AIGeometryUserData userData); + +/** Callback prototype for \c #AIGeometryPaintingProcs. Called to describe the clipping + of an element of the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryClipProc)(AIGeometryUserData userData); + +/** Callback prototype for \c #AIGeometryPaintingProcs. Called when an outline + within the art tree being iterated is filled with an image. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param raster The image object. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryImageProc)(AIGeometryUserData userData, AIArtHandle raster); + + /** Callback prototype for \c #AIGeometryPaintingProcs. Called when an outline + within the art tree being iterated is filled with an image. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param raster The image mask object. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryImageMaskProc)(AIGeometryUserData userData, AIArtHandle raster); + + /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param gray The grayscale value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetGrayProc)(AIGeometryUserData userData, AIReal gray); + +/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param cyan The CMYK cyan value. + @param magenta The CMYK magenta value. + @param yellow The CMYK yellow value. + @param black The CMYK black value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetCMYKColorProc)(AIGeometryUserData userData, AIReal cyan, AIReal magenta, AIReal yellow, AIReal black); + +/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param red The RGB red value. + @param green The RGB green value. + @param blue The RGB blue value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetRGBColorProc)(AIGeometryUserData userData, AIReal red, AIReal green, AIReal blue); + + /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param alpha The alpha channel value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetAlphaProc)(AIGeometryUserData userData, AIReal alpha); + + /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param customColor The custom color. + @param tint The amount of the color, a percentage in the range [0..1]. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetCustomColorProc)(AIGeometryUserData userData, AICustomColorHandle customColor, AIReal tint); + + /** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param gradient The gradient object. + @param gradientOrigin The origin point. + @param gradientAngle The angle. + @param gradientLength The length. + @param hiliteAngle The highlight angle. + @param hiliteLength The highlight length. + @param matrix The transformation matrix. + @return 0 for enumeration to continue, 1 to halt enumeration. + @see \c #AIGradientStyle + */ +typedef ai::int16 (*AIGeometrySetGradientColorProc)(AIGeometryUserData userData, + AIGradientHandle gradient, + AIRealPoint *gradientOrigin, + AIReal gradientAngle, + AIReal gradientLength, + AIReal hiliteAngle, + AIReal hiliteLength, + AIRealMatrix *matrix); + +/** Callback prototype for \c #AIGeometryStateProcs. Called for the fill and + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param pattern The pattern object. + @param shiftDistance Pattern style value. + @param shiftAngle Pattern style value. + @param scale Pattern style value. + @param rotateAngle Pattern style value. + @param reflect Pattern style value. + @param reflectAngle Pattern style value. + @param shearAngle Pattern style value. + @param shearAxis Pattern style value. + @return 0 for enumeration to continue, 1 to halt enumeration. + @see \c #AIPatternStyle + */ +typedef ai::int16 (*AIGeometrySetPatternColorProc)(AIGeometryUserData userData, + AIPatternHandle pattern, + AIReal shiftDistance, + AIReal shiftAngle, + AIRealPoint *scale, + AIReal rotateAngle, + AIBoolean reflect, + AIReal reflectAngle, + AIReal shearAngle, + AIReal shearAxis, + AIRealMatrix *matrix); +/** Callback prototype for \c #AIGeometryStateProcs. Called when an outline + within the art tree being iterated is filled with an image. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param alpha The alpha channel value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometryImageCallback)(AIGeometryUserData userData, + AIArtHandle raster, + AISlice *artSlice, + AITile *workTile, + AISlice *workSlice); + +/** Callback prototype for \c #AIGeometryStateProcs. Called for the + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param lineWidth The line width value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetLineWidthProc)(AIGeometryUserData userData, AIReal lineWidth); + + /** Callback prototype for \c #AIGeometryStateProcs. Called for the + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param lineCap The line cap value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetLineCapProc)(AIGeometryUserData userData, AILineCap lineCap); + +/** Callback prototype for \c #AIGeometryStateProcs. Called for the + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param lineJoin The line join value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetLineJoinProc)(AIGeometryUserData userData, AILineJoin lineJoin); + +/** Callback prototype for \c #AIGeometryStateProcs. Called for the + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param miterLimit The miter limit value. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetMiterLimitProc)(AIGeometryUserData userData, AIReal miterLimit); + +/**Callback prototype for \c #AIGeometryStateProcs. Called for the + stroke of each element within the art tree being iterated. + See \c #AIGeometrySuite + @param userData Developer-defined data. + @param offset The dash offset value. + @param length The number of dash values. + @param array The array of dash values. + @return 0 for enumeration to continue, 1 to halt enumeration. + */ +typedef ai::int16 (*AIGeometrySetDashProc)(AIGeometryUserData userData, AIReal offset, ai::int16 length, AIReal array[]); + +/** Passed as a pointer to a list of organization types + with associated begin/end procedures. + The list is terminated by an entry with an organization type of 0. + See \c #AIGeometrySuite +*/ +typedef struct { + + /** The type of object to which these procedures apply. */ + AIGeometryOrganizationType type; + /** Procedure called before enumerating an object of this type. */ + AIGeometryBeginProc begin; + /** Procedure called after enumerating an object of this type. */ + AIGeometryEndProc end; + +} AIGeometryOrganizationProcs; + +/** Callbacks that get information about how paths are constructed. + Called for leaf objects. + See \c #AIGeometrySuite +*/ +typedef struct { + AIGeometryMoveToProc moveTo; + AIGeometryLineToProc lineTo; + AIGeometryCurveToProc curveTo; + AIGeometryClosePathProc closePath; + +} AIGeometryConstructionProcs; + +/** Callbacks that get information about how objects are painted. + Called for leaf objects. The interior region of a fill or clip can + be determined using either the non-zero winding or even-odd rules + (see the PDF reference manual for a definition). The eofill and + eoclip call backs indicate even-odd while the others indicate non- + zero winding. + See \c #AIGeometrySuite +*/ +typedef struct { + + AIGeometryFillProc fill; + AIGeometryFillProc eofill; + AIGeometryStrokeProc stroke; + AIGeometryClipProc clip; + AIGeometryClipProc eoclip; + AIGeometryImageProc image; + AIGeometryImageMaskProc imageMask; + +} AIGeometryPaintingProcs; + +/** Callbacks that get information about painting options. + Called for leaf objects. + See \c #AIGeometrySuite +*/ +typedef struct { + + AIGeometrySetGrayProc setWhiteColor; + AIGeometrySetGrayProc setBlackColor; + AIGeometrySetGrayProc setGrayColor; + AIGeometrySetCMYKColorProc setCMYKColor; + AIGeometrySetRGBColorProc setRGBColor; /* unimplemented */ + AIGeometrySetAlphaProc setAlpha; /* unimplemented */ + AIGeometrySetCustomColorProc setCustomColor; + AIGeometrySetGradientColorProc setGradientColor; + AIGeometrySetPatternColorProc setPatternColor; + + AIGeometrySetLineWidthProc setLineWidth; + AIGeometrySetLineCapProc setLineCap; + AIGeometrySetLineJoinProc setLineJoin; + AIGeometrySetMiterLimitProc setMiterLimit; + AIGeometrySetDashProc setDash; + +} AIGeometryStateProcs; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides an iteration mechanism for collecting information about + the art objects in the various kinds of artwork trees. + It allows you to define a set of callback procedures to work with + various aspects of artwork, including the placement, style, and color attributes. + The \c #GeometryIterate() function enumerates the contents of an artwork + subtree to a set of callback functions that receive various kinds + of information about each object. You need supply only the callbacks of interest + to your plug-in. + + All of the object information passed to the callbacks is public information that + can be accessed directly through SDK functions. You can also define and pass + arbitrary data to the callbacks, to use together with the object data. + + All callbacks should return 0 to continue processing the next + artwork element, or nonzero to halt processing. This allows you to prune + the traversal of the artwork tree. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIGeometrySuite and \c #kAIGeometryVersion. + */ +typedef struct { + + /** Supplies information to developer-defined callback procedures, + calling the procedures iteratively for each member of an artwork tree whose + root is a specified art object. + @param art The root art object. + @param organizationProcs For each object in the tree, calls the start and the end procedure + associated the type before and after enumerating the object. + @param constructionProcs Contains pointers to callbacks that receive a geometric + description of each leaf art object. + @param paintingProcs Contains pointers to callbacks that receive information + about how each leaf object is painted. + @param stateProcs Contains pointers to callbacks that receive additional parameters + to the painting operations. + @param userData Developer-defined data to be passed to callbacks. + @param skipArtTypes A logical OR of \c #AIArtUserAttr values for art objects to skip during iteration. + As an example, pass kArtHidden | kArtLocked to skip hidden and locked arts + Pass 0 to skip no arts. + */ + ASAPI AIErr (*GeometryIterate) ( AIArtHandle art, + AIGeometryOrganizationProcs *organizationProcs, + AIGeometryConstructionProcs *constructionProcs, + AIGeometryPaintingProcs *paintingProcs, + AIGeometryStateProcs *stateProcs, + AIGeometryUserData userData, + ai::int32 skipArtTypes); + +} AIGeometrySuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGlobalUnicodeString.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGlobalUnicodeString.h new file mode 100644 index 0000000..ea48961 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGlobalUnicodeString.h @@ -0,0 +1,47 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + + +#include "IAIUnicodeString.h" + +#include "AIHeaderBegin.h" + + +#define kAIGlobalUnicodeStringSuite "AI Global UnicodeString Suite" +#define kAIGlobalUnicodeStringSuiteVersion1 AIAPI_VERSION(1) +#define kAIGlobalUnicodeStringSuiteVersion kAIGlobalUnicodeStringSuiteVersion1 +#define kAIGlobalUnicodeStringVersion kAIGlobalUnicodeStringSuiteVersion + + + +/** + @ingroup Suites + @see ai::GlobalUnicodeString defined in IAIGlobalUnicodeString.hpp +*/ +struct AIGlobalUnicodeStringSuite +{ + /** + Adds an ai::UnicodeString in the global pool and returns a permanent pointer to stored string. + The lifetime of this pointer is guaranteed till plugin shutdown. + + @note: DO NOT FREE the returned pointer, its ownership is held by the app. + */ + AIAPI AIErr (*AddString)(ai::UnicodeString string, ai::UnicodeString** outPtr); +}; + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGradient.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGradient.h index 38353d2..4d18d01 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGradient.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGradient.h @@ -1,471 +1,471 @@ -#ifndef __AIGradient__ -#define __AIGradient__ - -/* - * Name: AIGradient.h - * $Revision: 11 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Gradient Fill Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIGradient.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** Gradient suite name */ -#define kAIGradientSuite "AI Gradient Suite" -/** Gradient suite version */ -#define kAIGradientSuiteVersion9 AIAPI_VERSION(9) -/** Gradient suite version */ -#define kAIGradientSuiteVersion kAIGradientSuiteVersion9 -/** Gradient suite version */ -#define kAIGradientVersion kAIGradientSuiteVersion - -/** @ingroup Notifiers - Sent when a gradient (blend) has changed. See \c #AIGradientSuite.*/ -#define kAIArtGradientChangedNotifier "AI Art Gradient Changed Notifier" - -/** @ingroup Error Codes - */ -#define kMaxSpotChannelsExceededErr 'xSPT' - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Prototype for \c setGray callback; see \c #AIGradientSuite::IterateGradient(). - Your implementation can use this to modify gray values in a generated - intermediate path object. - @param g The grayscale color value of this segment. */ -typedef void (*AIGradientSetGrayProcPtr)(AIReal g); -/** Value type for the \c #AIGradientProcs::setGray iteration callback. */ -typedef AIGradientSetGrayProcPtr AIGradientSetGrayUPP; -/** A convenience macro for the \c #AIGradientProcs::setGray iteration callback. */ -#define CallAIGradientSetGrayProc(userRoutine, g) \ - (*(userRoutine))((g)) -/** A convenience macro for the \c #AIGradientProcs::setGray iteration callback. */ -#define NewAIGradientSetGrayProc(userRoutine) \ - (AIGradientSetGrayUPP)(userRoutine) - -/** Prototype for \c #AIGradientProcs::setCMYK callback; see \c #AIGradientSuite::IterateGradient(). - Your implementation can use this to modify CMYK color values in a generated - intermediate path object. - @param c The cyan color value of this segment. - @param m The magenta color value of this segment. - @param y The yellow color value of this segment. - @param k The black color value of this segment. - */ -typedef void (*AIGradientSetCMYKProcPtr)(AIReal c, AIReal m, AIReal y, AIReal k); -/** Value type for the \c #AIGradientProcs::setCMYK iteration callback. */ -typedef AIGradientSetCMYKProcPtr AIGradientSetCMYKUPP; -/** A convenience macro for the \c #AIGradientProcs::setCMYK iteration callback. */ -#define CallAIGradientSetCMYKProc(userRoutine, c, m, y, k) \ - (*(userRoutine))((c), (m), (y), (k)) -/** A convenience macro for the \c #AIGradientProcs::setCMYK iteration callback. */ -#define NewAIGradientSetCMYKProc(userRoutine) \ - (AIGradientSetCMYKUPP)(userRoutine) - -/** Prototype for \c #AIGradientProcs::setColor callback; see \c #AIGradientSuite::IterateGradient(). - Your implementation can use this to modify color values in a generated - intermediate path object. - @param c A pointer to the color of this segment. - */ -typedef void (*AIGradientSetColorProcPtr)(AIColor* c); -/** Value type for the \c #AIGradientProcs::setColor iteration callback. */ -typedef AIGradientSetColorProcPtr AIGradientSetColorUPP; -/** A convenience macro for the \c #AIGradientProcs::setColor iteration callback. */ -#define CallAIGradientSetColorProc(userRoutine, c) \ - (*(userRoutine))((c)) -/** A convenience macro for the \c #AIGradientProcs::setColor iteration callback.*/ -#define NewAIGradientSetColorProc(userRoutine) \ - (AIGradientSetColorUPP)(userRoutine) - -/** Prototype for \c #AIGradientProcs::beginFill callback; see \c #AIGradientSuite::IterateGradient(). - This is called before each path-creation iteration. */ -typedef void (*AIGradientBeginFillProcPtr)(void); -/** Value type for the \c #AIGradientProcs::beginFill iteration callback. */ -typedef AIGradientBeginFillProcPtr AIGradientBeginFillUPP; -/** A convenience macro for the \c #AIGradientProcs::beginFill iteration callback. */ -#define CallAIGradientBeginFillProc(userRoutine) \ - (*(userRoutine))() -/** A convenience macro for the \c #AIGradientProcs::beginFill iteration callback. */ -#define NewAIGradientBeginFillProc(userRoutine) \ - (AIGradientBeginFillUPP)(userRoutine) - -/** Prototype for \c #AIGradientProcs::endFill callback; see \c #AIGradientSuite::IterateGradient(). - This is called after each path-creation iteration. */ -typedef void (*AIGradientEndFillProcPtr)(void); -/** Pointer to \c #AIGradientEndFillProcPtr for \c endFill iteration callback. */ -typedef AIGradientEndFillProcPtr AIGradientEndFillUPP; -/** A convenience macro for the \c #AIGradientProcs::endFill iteration callback. */ -#define CallAIGradientEndFillProc(userRoutine) \ - (*(userRoutine))() -/** A convenience macro for the \c #AIGradientProcs::endFill iteration callback. */ -#define NewAIGradientEndFillProc(userRoutine) \ - (AIGradientEndFillUPP)(userRoutine) - -/** Prototype for \c #AIGradientProcs::moveTo callback; see \c #AIGradientSuite::IterateGradient(). - Your implementation can use this to modify position values for the first point in a - segment of a generated intermediate path object. - @param x The horizontal coordinate value of the start point for this segment. - @param y The vertical coordinate value of the start point for this segment. - */ -typedef void (*AIGradientMoveToProcPtr)(AIReal x, AIReal y); -/** Value type for the \c #AIGradientProcs::moveTo iteration callback. */ -typedef AIGradientMoveToProcPtr AIGradientMoveToUPP; -/** A convenience macro for the \c #AIGradientProcs::moveTo iteration callback. */ -#define CallAIGradientMoveToProc(userRoutine, x, y) \ - (*(userRoutine))((x), (y)) -/** A convenience macro for the \c #AIGradientProcs::moveTo iteration callback. */ -#define NewAIGradientMoveToProc(userRoutine) \ - (AIGradientMoveToUPP)(userRoutine) - -/** Prototype for the \c #AIGradientProcs::lineTo callback; see \c #AIGradientSuite::IterateGradient(). - Your implementation can use this to modify position values for the end point in a - segment of a generated intermediate path object. - @param x The horizontal coordinate value of the endpoint for this segment. - @param y The vertical coordinate value of the endpoint for this segment. - */ -typedef void (*AIGradientLineToProcPtr)(AIReal x, AIReal y); -/** Value type for the \c #AIGradientProcs::lineTo iteration callback. */ -typedef AIGradientLineToProcPtr AIGradientLineToUPP; -/** A convenience macro for the \c #AIGradientProcs::lineTo iteration callback. */ -#define CallAIGradientLineToProc(userRoutine, x, y) \ - (*(userRoutine))((x), (y)) -/** A convenience macro for the \c #AIGradientProcs::lineTo iteration callback. */ -#define NewAIGradientLineToProc(userRoutine) \ - (AIGradientLineToUPP)(userRoutine) - -/** Prototype for the \c #AIGradientProcs::curveTo callback; see \c #AIGradientSuite::IterateGradient(). - Your implementation can use this to modify position values for the set of point that defines - the curve between endpoints of a segment in a generated intermediate path object. - @param x1 The horizontal coordinate value of the first point of this curve. - @param y1 The vertical coordinate value of the first point of this curve. - @param x2 The horizontal coordinate value of the second point of this curve. - @param y2 The vertical coordinate value of the second point of this curve. - @param x3 The horizontal coordinate value of the third point of this curve. - @param y3 The vertical coordinate value of the third point of this curve. - */ -typedef void (*AIGradientCurveToProcPtr)(AIReal x1, AIReal y1, AIReal x2, AIReal y2, AIReal x3, AIReal y3); -/** Value type for the \c #AIGradientProcs::curveTo iteration callback. */ -typedef AIGradientCurveToProcPtr AIGradientCurveToUPP; -/** A convenience macro for the \c #AIGradientProcs::curveTo iteration callback. */ -#define CallAIGradientCurveToProc(userRoutine, x1, y1, x2, y2, x3, y3) \ - (*(userRoutine))((x1), (y1), (x2), (y2), (x3), (y3)) -/** A convenience macro for the \c #AIGradientProcs::curveTo iteration callback. */ -#define NewAIGradientCurveToProc(userRoutine) \ - (AIGradientCurveToUPP)(userRoutine) - -/** Callback functions for \c #AIGradientSuite::IterateGradient(). - The specified callbacks are invoked with information for each - iteration segment of the gradient. - - For example, if you select a gradient object and choose Object>Expand, - and specify 10 paths, the plug-in uses this function to create the - 10 paths that simulate the gradient. For each of the paths: - \li The \c setColor procedure is first called to set the color state. - \li Then, \c beginFill is called to let the plug-in know that a new path is about to be created. - \li Then, \c moveTo is called to let the plug-in know where the first point is. - \li Then, a sequence of calls to either \c lineTo or \li curveTo - builds up the path. - \li Finally, \c endFill is called to let the plug-in know that the path is finished. - - */ -typedef struct { - /** A procedure for modifying grayscale values in a gradient. - Receives the grayscale color value of each iteration segment. */ - AIGradientSetGrayUPP setGray; - /** A procedure for modifying CMYK values in a gradient. - Receives the CMYK color values of each iteration segment*/ - AIGradientSetCMYKUPP setCMYK; - /** A procedure for initializing the gradient iteration. - Called at the beginning of the iteration. */ - AIGradientBeginFillUPP beginFill; - /** A procedure for terminating the gradient iteration. - Called at the end of the iteration. */ - AIGradientEndFillUPP endFill; - /** A procedure to modify position values for the first point in a - segment of a generated intermediate path object. */ - AIGradientMoveToUPP moveTo; - /** A procedure to modify position values for the end point in a - segment of a generated intermediate path object. */ - AIGradientLineToUPP lineTo; - /** A procedure to modify position values for the set of point that defines - the curve between endpoints of a segment in a generated intermediate path object. */ - AIGradientCurveToUPP curveTo; - /** A generic procedure for modifying colors in a gradient. - Set to \c NULL to use the more specific \c setGray and \c setCMYK - procedures. */ - AIGradientSetColorUPP setColor; - -} AIGradientProcs; - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides the basic definition of the \e gradient, - a graduated blend between two or more colors. The functions - allow you to examine or modify existing gradients, create new - gradients, or delete existing ones. - - The gradient attributes correspond to the settings in the Gradient palette. - A gradient has: - \li A unique name, which is required and is used when an object - with a gradient is saved in a file. - \li A type, linear (\c #kLinearGradient) or radial (\c #kRadialGradient). - \li A gradient \e ramp, defined by a set of color \e stops. A stop is - a point at which a color change occurs, within the ramp range of [0..100]. - The number of gradient stops is equal to the number of colors specified. - There must be at least two. The actual colors and their positions on the - ramp are defined with the \c #AIGradientStop structure. - - When a gradient is applied to an object, the gradient ramp is scaled to - the length of the gradient vector. The gradient stops are from 0 to 100% of - the length needed to fully create the gradient along the vector. - - A gradient instance applied to an art object is further defined by an - \c #AIGradientStyle, which is part of an object's fill or stroke style. - - @see \c #AIPathStyleSuite, \c #AIPatternSuite, \c #AICustomColorSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIGradientSuite and \c #kAIGradientVersion. -*/ -typedef struct { - - /** Creates a new gradient, initializing it as a linear gradient with two stops, - white and black. Use \c #SetGradientName() to set its name, and - other functions such as \c #InsertGradientStop() to customize it after creation. - @param gradient [out] A buffer in which to return the new gradient object. - */ - AIAPI AIErr (*NewGradient) ( AIGradientHandle *gradient ); - - /** Frees the memory associated with a gradient object that is no longer needed. - If an art object uses this gradient for its fill value, the fill color is set to black. - @param gradient The gradient. Upon return, this reference is invalid. - */ - AIAPI AIErr (*DeleteGradient) ( AIGradientHandle gradient ); - - /** Gets the number of available gradients . Use with \c #GetNthGradient() - to iterate through all gradients defined in the current document. - This can exceed the number of defined gradient swatches, as shown in - the Swatches palette. - @param count [out] A buffer in which to return the number of gradients. - */ - AIAPI AIErr (*CountGradients) ( ai::int32 *count ); - - /** Retrieves a gradient by position index. Use with \c #CountGradients() - to iterate through all available gradients. - @param n The position index, in the range [0..numGradients -1]. - @param gradient [out] A buffer in which to return the gradient object. - */ - AIAPI AIErr (*GetNthGradient) ( ai::int32 n, AIGradientHandle *gradient ); - - /** Retrieves a gradient by its unique name. - @param name The name. - @param gradient [out] A buffer in which to return the gradient object. - @return The error \c #kNameNotFoundErr if a gradient with the specified - name is not found. - */ - AIAPI AIErr (*GetGradientByName) ( const ai::UnicodeString& name, AIGradientHandle *gradient ); - - /** Retrieves the unique name of a gradient. - @param gradient The gradient object. - @param name [out] A buffer in which to return the name string. - */ - AIAPI AIErr (*GetGradientName) ( AIGradientHandle gradient, ai::UnicodeString& name ); - - /** Sets the name of a gradient. You can create a unique name string using - \c #NewGradientName(). - @param gradient The gradient object. - @param name The new name string. - @return The error \c #kNameNotFoundErr if a gradient with the specified - name already exists. - */ - AIAPI AIErr (*SetGradientName) ( AIGradientHandle gradient, const ai::UnicodeString& name ); - - /** Retrieves the type of a gradient, linear or radial. - @param gradient The gradient object. - @param type [out] A buffer in which to return the type constant, either - .\c #kLinearGradient or \c #kRadialGradient. - */ - AIAPI AIErr (*GetGradientType) ( AIGradientHandle gradient, ai::int16 *type ); - - /** Sets the type of a gradient, linear or radial. - @param gradient The gradient object. - @param type The type constant, \c #kLinearGradient or \c #kRadialGradient. - */ - AIAPI AIErr (*SetGradientType) ( AIGradientHandle gradient, ai::int16 type ); - - /** Gets the number of stops (color transition or ramp points) in a gradient. - There are always at least two. Use with \c #GetNthGradientStop() to iterate - through the stops. - @param gradient The gradient object. - @param count [out] A buffer in which to return the number of stops. - */ - AIAPI AIErr (*GetGradientStopCount) ( AIGradientHandle gradient, ai::int16 *count ); - - /** Retrieves a stop (color transition or ramp point) from a gradient - by position index. Use with \c #GetGradientStopCount() to iterate through - all stops in a gradient. - @param gradient The gradient object. - @param n The position index, in the range [0..numStops -1]. - @param stop [out] A buffer in which to return the gradient stop object. - */ - AIAPI AIErr (*GetNthGradientStop) ( AIGradientHandle gradient, ai::int16 n, AIGradientStop *stop ); - - /** Updates an existing stop (color transition or ramp point) in a gradient. The stop - is specified by position index. To create a new stop, use \c #InsertGradientStop(). - @param gradient The gradient object. - @param n The position index, in the range [0..numStops -1]. - @param stop A pointer to the new gradient stop object. You must retrieve this - structure with \c #GetNthGradientStop() and modify it before making the call. - */ - AIAPI AIErr (*SetNthGradientStop) ( AIGradientHandle gradient, ai::int16 n, AIGradientStop *stop ); - - /** Creates a new stop (color transition or ramp point) in a gradient. - To modify an existing gradient stop, use \c #SetNthGradientStop(). - @param gradient The gradient object. - @param n The position index at which to add this stop, in the range - [0..numStops]. The new stop has this index, and - the index of all later stops is incremented. - @param stop [out] A buffer in which to return the new gradient stop object. - */ - AIAPI AIErr (*InsertGradientStop) ( AIGradientHandle gradient, ai::int16 n, AIGradientStop *stop ); - - /** Removes a stop (color transition or ramp point) from a gradient. - There must always be at least two stops. - @param gradient The gradient object. - @param n The position index of the stop to remove, in the range [0..numStops -1]. - @param stop [out] A buffer in which to return the gradient stop object that was removed. - */ - AIAPI AIErr (*DeleteGradientStop) ( AIGradientHandle gradient, ai::int16 n, AIGradientStop *stop ); - - /** Iterates over a gradient in an art object applying a set of - developer-defined drawing routines, in order to break the gradient - into a set of discrete paths containing solid colors, which together - approximate the gradient. - - The artwork is broken into iteration sections along the gradient’s vector. - Each section is a region filled with a single color, represented by a path object. - - For each section, the function generates any artwork needed to draw the object on - the page, including a fill color, then passes the elements of the generated - artwork to the supplied drawing procedures for further processing. - These functions might, for example, write the information to a file - in a particular format, or create artwork in Illustrator with the data. - - @param art The art object. - @param style A pointer to the path style information. - @param procs A pointer to a set of drawing procedures. - You must create and fill this with procedures you have defined - before making the call. - @param iterations The number of iteration sections. Pass 0 to use - the minimum number of iterations needed to produce a smooth - color appearance. - */ - AIAPI AIErr (*IterateGradient) ( AIArtHandle art, AIPathStyle *style, AIGradientProcs *procs, ai::int16 iterations ); - - /** Creates a unique name for a gradient, which can be passed to \c #SetGradientName(). - @param name The base name. The string is modified in place to create a unique name. - \li If no existing gradient has this name, it is returned. - \li If a gradient already has this name, a numeric value is appended - to the string (or the existing numeric value is incremented) to make it unique. - */ - AIAPI AIErr (*NewGradientName) ( ai::UnicodeString& name ); - - /** Reports whether a gradient uses a particular color in any stop. - @param gradient The gradient object. - @param color The color. - @param matchTint When false, and if the color is a custom color, - returns true for any tint of that color. - @param usesColor [out] A buffer in which to return true if the color is used - in any stop. - */ - AIAPI AIErr (*GradientUsesAIColor) (AIGradientHandle gradient, const AIColor *color, - AIBoolean matchTint, AIBoolean *usesColor); - - /** Reports whether a gradient is defined for the current document. - (Note that this function returns a boolean value, not an error code.) - @param gradient The gradient object. - @return True if the gradient is defined for the current document. - */ - AIAPI AIBoolean (*ValidateGradient) ( AIGradientHandle gradient ); - - /* New in Illustrator 11.0 */ - - /** Retrieves the color at a given point on a gradient ramp. If the point is - a stop, returns the color of that stop. Otherwise, the returns an interpolated - color between stops. - @param gradient The gradient object. - @param percent The point on the ramp, a percentage value in the range [0..100]. - @param color [out] A buffer in which to return the color. - */ - AIAPI AIErr (*GetGradientColor) ( AIGradientHandle gradient, AIReal percent, AIColor *color ); - - /* New in Illustrator 14.0 */ - - /** Reports whether a gradient has any transparency. - This is the case if any stops have an opacity other than 1.0. - - @param gradient The gradient object. - @param useAlpha [out] A buffer in which to return the result, true if the gradient has transparency, false otherwise. - */ - AIAPI AIErr (*IsGradientAlphaRequired)(AIGradientHandle gradient, AIBoolean *useAlpha); -} AIGradientSuite; - - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIGradient__ +#define __AIGradient__ + +/* + * Name: AIGradient.h + * $Revision: 11 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Gradient Fill Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIPathStyle__ +#include "AIPathStyle.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIGradient.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** Gradient suite name */ +#define kAIGradientSuite "AI Gradient Suite" +/** Gradient suite version */ +#define kAIGradientSuiteVersion9 AIAPI_VERSION(9) +/** Gradient suite version */ +#define kAIGradientSuiteVersion kAIGradientSuiteVersion9 +/** Gradient suite version */ +#define kAIGradientVersion kAIGradientSuiteVersion + +/** @ingroup Notifiers + Sent when a gradient (blend) has changed. See \c #AIGradientSuite.*/ +#define kAIArtGradientChangedNotifier "AI Art Gradient Changed Notifier" + +/** @ingroup Error Codes + */ +#define kMaxSpotChannelsExceededErr 'xSPT' + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Prototype for \c setGray callback; see \c #AIGradientSuite::IterateGradient(). + Your implementation can use this to modify gray values in a generated + intermediate path object. + @param g The grayscale color value of this segment. */ +typedef void (*AIGradientSetGrayProcPtr)(AIReal g); +/** Value type for the \c #AIGradientProcs::setGray iteration callback. */ +typedef AIGradientSetGrayProcPtr AIGradientSetGrayUPP; +/** A convenience macro for the \c #AIGradientProcs::setGray iteration callback. */ +#define CallAIGradientSetGrayProc(userRoutine, g) \ + (*(userRoutine))((g)) +/** A convenience macro for the \c #AIGradientProcs::setGray iteration callback. */ +#define NewAIGradientSetGrayProc(userRoutine) \ + (AIGradientSetGrayUPP)(userRoutine) + +/** Prototype for \c #AIGradientProcs::setCMYK callback; see \c #AIGradientSuite::IterateGradient(). + Your implementation can use this to modify CMYK color values in a generated + intermediate path object. + @param c The cyan color value of this segment. + @param m The magenta color value of this segment. + @param y The yellow color value of this segment. + @param k The black color value of this segment. + */ +typedef void (*AIGradientSetCMYKProcPtr)(AIReal c, AIReal m, AIReal y, AIReal k); +/** Value type for the \c #AIGradientProcs::setCMYK iteration callback. */ +typedef AIGradientSetCMYKProcPtr AIGradientSetCMYKUPP; +/** A convenience macro for the \c #AIGradientProcs::setCMYK iteration callback. */ +#define CallAIGradientSetCMYKProc(userRoutine, c, m, y, k) \ + (*(userRoutine))((c), (m), (y), (k)) +/** A convenience macro for the \c #AIGradientProcs::setCMYK iteration callback. */ +#define NewAIGradientSetCMYKProc(userRoutine) \ + (AIGradientSetCMYKUPP)(userRoutine) + +/** Prototype for \c #AIGradientProcs::setColor callback; see \c #AIGradientSuite::IterateGradient(). + Your implementation can use this to modify color values in a generated + intermediate path object. + @param c A pointer to the color of this segment. + */ +typedef void (*AIGradientSetColorProcPtr)(AIColor* c); +/** Value type for the \c #AIGradientProcs::setColor iteration callback. */ +typedef AIGradientSetColorProcPtr AIGradientSetColorUPP; +/** A convenience macro for the \c #AIGradientProcs::setColor iteration callback. */ +#define CallAIGradientSetColorProc(userRoutine, c) \ + (*(userRoutine))((c)) +/** A convenience macro for the \c #AIGradientProcs::setColor iteration callback.*/ +#define NewAIGradientSetColorProc(userRoutine) \ + (AIGradientSetColorUPP)(userRoutine) + +/** Prototype for \c #AIGradientProcs::beginFill callback; see \c #AIGradientSuite::IterateGradient(). + This is called before each path-creation iteration. */ +typedef void (*AIGradientBeginFillProcPtr)(void); +/** Value type for the \c #AIGradientProcs::beginFill iteration callback. */ +typedef AIGradientBeginFillProcPtr AIGradientBeginFillUPP; +/** A convenience macro for the \c #AIGradientProcs::beginFill iteration callback. */ +#define CallAIGradientBeginFillProc(userRoutine) \ + (*(userRoutine))() +/** A convenience macro for the \c #AIGradientProcs::beginFill iteration callback. */ +#define NewAIGradientBeginFillProc(userRoutine) \ + (AIGradientBeginFillUPP)(userRoutine) + +/** Prototype for \c #AIGradientProcs::endFill callback; see \c #AIGradientSuite::IterateGradient(). + This is called after each path-creation iteration. */ +typedef void (*AIGradientEndFillProcPtr)(void); +/** Pointer to \c #AIGradientEndFillProcPtr for \c endFill iteration callback. */ +typedef AIGradientEndFillProcPtr AIGradientEndFillUPP; +/** A convenience macro for the \c #AIGradientProcs::endFill iteration callback. */ +#define CallAIGradientEndFillProc(userRoutine) \ + (*(userRoutine))() +/** A convenience macro for the \c #AIGradientProcs::endFill iteration callback. */ +#define NewAIGradientEndFillProc(userRoutine) \ + (AIGradientEndFillUPP)(userRoutine) + +/** Prototype for \c #AIGradientProcs::moveTo callback; see \c #AIGradientSuite::IterateGradient(). + Your implementation can use this to modify position values for the first point in a + segment of a generated intermediate path object. + @param x The horizontal coordinate value of the start point for this segment. + @param y The vertical coordinate value of the start point for this segment. + */ +typedef void (*AIGradientMoveToProcPtr)(AIReal x, AIReal y); +/** Value type for the \c #AIGradientProcs::moveTo iteration callback. */ +typedef AIGradientMoveToProcPtr AIGradientMoveToUPP; +/** A convenience macro for the \c #AIGradientProcs::moveTo iteration callback. */ +#define CallAIGradientMoveToProc(userRoutine, x, y) \ + (*(userRoutine))((x), (y)) +/** A convenience macro for the \c #AIGradientProcs::moveTo iteration callback. */ +#define NewAIGradientMoveToProc(userRoutine) \ + (AIGradientMoveToUPP)(userRoutine) + +/** Prototype for the \c #AIGradientProcs::lineTo callback; see \c #AIGradientSuite::IterateGradient(). + Your implementation can use this to modify position values for the end point in a + segment of a generated intermediate path object. + @param x The horizontal coordinate value of the endpoint for this segment. + @param y The vertical coordinate value of the endpoint for this segment. + */ +typedef void (*AIGradientLineToProcPtr)(AIReal x, AIReal y); +/** Value type for the \c #AIGradientProcs::lineTo iteration callback. */ +typedef AIGradientLineToProcPtr AIGradientLineToUPP; +/** A convenience macro for the \c #AIGradientProcs::lineTo iteration callback. */ +#define CallAIGradientLineToProc(userRoutine, x, y) \ + (*(userRoutine))((x), (y)) +/** A convenience macro for the \c #AIGradientProcs::lineTo iteration callback. */ +#define NewAIGradientLineToProc(userRoutine) \ + (AIGradientLineToUPP)(userRoutine) + +/** Prototype for the \c #AIGradientProcs::curveTo callback; see \c #AIGradientSuite::IterateGradient(). + Your implementation can use this to modify position values for the set of point that defines + the curve between endpoints of a segment in a generated intermediate path object. + @param x1 The horizontal coordinate value of the first point of this curve. + @param y1 The vertical coordinate value of the first point of this curve. + @param x2 The horizontal coordinate value of the second point of this curve. + @param y2 The vertical coordinate value of the second point of this curve. + @param x3 The horizontal coordinate value of the third point of this curve. + @param y3 The vertical coordinate value of the third point of this curve. + */ +typedef void (*AIGradientCurveToProcPtr)(AIReal x1, AIReal y1, AIReal x2, AIReal y2, AIReal x3, AIReal y3); +/** Value type for the \c #AIGradientProcs::curveTo iteration callback. */ +typedef AIGradientCurveToProcPtr AIGradientCurveToUPP; +/** A convenience macro for the \c #AIGradientProcs::curveTo iteration callback. */ +#define CallAIGradientCurveToProc(userRoutine, x1, y1, x2, y2, x3, y3) \ + (*(userRoutine))((x1), (y1), (x2), (y2), (x3), (y3)) +/** A convenience macro for the \c #AIGradientProcs::curveTo iteration callback. */ +#define NewAIGradientCurveToProc(userRoutine) \ + (AIGradientCurveToUPP)(userRoutine) + +/** Callback functions for \c #AIGradientSuite::IterateGradient(). + The specified callbacks are invoked with information for each + iteration segment of the gradient. + + For example, if you select a gradient object and choose Object>Expand, + and specify 10 paths, the plug-in uses this function to create the + 10 paths that simulate the gradient. For each of the paths: + \li The \c setColor procedure is first called to set the color state. + \li Then, \c beginFill is called to let the plug-in know that a new path is about to be created. + \li Then, \c moveTo is called to let the plug-in know where the first point is. + \li Then, a sequence of calls to either \c lineTo or \li curveTo + builds up the path. + \li Finally, \c endFill is called to let the plug-in know that the path is finished. + + */ +typedef struct { + /** A procedure for modifying grayscale values in a gradient. + Receives the grayscale color value of each iteration segment. */ + AIGradientSetGrayUPP setGray; + /** A procedure for modifying CMYK values in a gradient. + Receives the CMYK color values of each iteration segment*/ + AIGradientSetCMYKUPP setCMYK; + /** A procedure for initializing the gradient iteration. + Called at the beginning of the iteration. */ + AIGradientBeginFillUPP beginFill; + /** A procedure for terminating the gradient iteration. + Called at the end of the iteration. */ + AIGradientEndFillUPP endFill; + /** A procedure to modify position values for the first point in a + segment of a generated intermediate path object. */ + AIGradientMoveToUPP moveTo; + /** A procedure to modify position values for the end point in a + segment of a generated intermediate path object. */ + AIGradientLineToUPP lineTo; + /** A procedure to modify position values for the set of point that defines + the curve between endpoints of a segment in a generated intermediate path object. */ + AIGradientCurveToUPP curveTo; + /** A generic procedure for modifying colors in a gradient. + Set to \c NULL to use the more specific \c setGray and \c setCMYK + procedures. */ + AIGradientSetColorUPP setColor; + +} AIGradientProcs; + + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides the basic definition of the \e gradient, + a graduated blend between two or more colors. The functions + allow you to examine or modify existing gradients, create new + gradients, or delete existing ones. + + The gradient attributes correspond to the settings in the Gradient palette. + A gradient has: + \li A unique name, which is required and is used when an object + with a gradient is saved in a file. + \li A type, linear (\c #kLinearGradient) or radial (\c #kRadialGradient). + \li A gradient \e ramp, defined by a set of color \e stops. A stop is + a point at which a color change occurs, within the ramp range of [0..100]. + The number of gradient stops is equal to the number of colors specified. + There must be at least two. The actual colors and their positions on the + ramp are defined with the \c #AIGradientStop structure. + + When a gradient is applied to an object, the gradient ramp is scaled to + the length of the gradient vector. The gradient stops are from 0 to 100% of + the length needed to fully create the gradient along the vector. + + A gradient instance applied to an art object is further defined by an + \c #AIGradientStyle, which is part of an object's fill or stroke style. + + @see \c #AIPathStyleSuite, \c #AIPatternSuite, \c #AICustomColorSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIGradientSuite and \c #kAIGradientVersion. +*/ +typedef struct { + + /** Creates a new gradient, initializing it as a linear gradient with two stops, + white and black. Use \c #SetGradientName() to set its name, and + other functions such as \c #InsertGradientStop() to customize it after creation. + @param gradient [out] A buffer in which to return the new gradient object. + */ + AIAPI AIErr (*NewGradient) ( AIGradientHandle *gradient ); + + /** Frees the memory associated with a gradient object that is no longer needed. + If an art object uses this gradient for its fill value, the fill color is set to black. + @param gradient The gradient. Upon return, this reference is invalid. + */ + AIAPI AIErr (*DeleteGradient) ( AIGradientHandle gradient ); + + /** Gets the number of available gradients . Use with \c #GetNthGradient() + to iterate through all gradients defined in the current document. + This can exceed the number of defined gradient swatches, as shown in + the Swatches palette. + @param count [out] A buffer in which to return the number of gradients. + */ + AIAPI AIErr (*CountGradients) ( ai::int32 *count ); + + /** Retrieves a gradient by position index. Use with \c #CountGradients() + to iterate through all available gradients. + @param n The position index, in the range [0..numGradients -1]. + @param gradient [out] A buffer in which to return the gradient object. + */ + AIAPI AIErr (*GetNthGradient) ( ai::int32 n, AIGradientHandle *gradient ); + + /** Retrieves a gradient by its unique name. + @param name The name. + @param gradient [out] A buffer in which to return the gradient object. + @return The error \c #kNameNotFoundErr if a gradient with the specified + name is not found. + */ + AIAPI AIErr (*GetGradientByName) ( const ai::UnicodeString& name, AIGradientHandle *gradient ); + + /** Retrieves the unique name of a gradient. + @param gradient The gradient object. + @param name [out] A buffer in which to return the name string. + */ + AIAPI AIErr (*GetGradientName) ( AIGradientHandle gradient, ai::UnicodeString& name ); + + /** Sets the name of a gradient. You can create a unique name string using + \c #NewGradientName(). + @param gradient The gradient object. + @param name The new name string. + @return The error \c #kNameNotFoundErr if a gradient with the specified + name already exists. + */ + AIAPI AIErr (*SetGradientName) ( AIGradientHandle gradient, const ai::UnicodeString& name ); + + /** Retrieves the type of a gradient, linear or radial. + @param gradient The gradient object. + @param type [out] A buffer in which to return the type constant, either + .\c #kLinearGradient or \c #kRadialGradient. + */ + AIAPI AIErr (*GetGradientType) ( AIGradientHandle gradient, ai::int16 *type ); + + /** Sets the type of a gradient, linear or radial. + @param gradient The gradient object. + @param type The type constant, \c #kLinearGradient or \c #kRadialGradient. + */ + AIAPI AIErr (*SetGradientType) ( AIGradientHandle gradient, ai::int16 type ); + + /** Gets the number of stops (color transition or ramp points) in a gradient. + There are always at least two. Use with \c #GetNthGradientStop() to iterate + through the stops. + @param gradient The gradient object. + @param count [out] A buffer in which to return the number of stops. + */ + AIAPI AIErr (*GetGradientStopCount) ( AIGradientHandle gradient, ai::int16 *count ); + + /** Retrieves a stop (color transition or ramp point) from a gradient + by position index. Use with \c #GetGradientStopCount() to iterate through + all stops in a gradient. + @param gradient The gradient object. + @param n The position index, in the range [0..numStops -1]. + @param stop [out] A buffer in which to return the gradient stop object. + */ + AIAPI AIErr (*GetNthGradientStop) ( AIGradientHandle gradient, ai::int16 n, AIGradientStop *stop ); + + /** Updates an existing stop (color transition or ramp point) in a gradient. The stop + is specified by position index. To create a new stop, use \c #InsertGradientStop(). + @param gradient The gradient object. + @param n The position index, in the range [0..numStops -1]. + @param stop A pointer to the new gradient stop object. You must retrieve this + structure with \c #GetNthGradientStop() and modify it before making the call. + */ + AIAPI AIErr (*SetNthGradientStop) ( AIGradientHandle gradient, ai::int16 n, AIGradientStop *stop ); + + /** Creates a new stop (color transition or ramp point) in a gradient. + To modify an existing gradient stop, use \c #SetNthGradientStop(). + @param gradient The gradient object. + @param n The position index at which to add this stop, in the range + [0..numStops]. The new stop has this index, and + the index of all later stops is incremented. + @param stop [out] A buffer in which to return the new gradient stop object. + */ + AIAPI AIErr (*InsertGradientStop) ( AIGradientHandle gradient, ai::int16 n, AIGradientStop *stop ); + + /** Removes a stop (color transition or ramp point) from a gradient. + There must always be at least two stops. + @param gradient The gradient object. + @param n The position index of the stop to remove, in the range [0..numStops -1]. + @param stop [out] A buffer in which to return the gradient stop object that was removed. + */ + AIAPI AIErr (*DeleteGradientStop) ( AIGradientHandle gradient, ai::int16 n, AIGradientStop *stop ); + + /** Iterates over a gradient in an art object applying a set of + developer-defined drawing routines, in order to break the gradient + into a set of discrete paths containing solid colors, which together + approximate the gradient. + + The artwork is broken into iteration sections along the gradient’s vector. + Each section is a region filled with a single color, represented by a path object. + + For each section, the function generates any artwork needed to draw the object on + the page, including a fill color, then passes the elements of the generated + artwork to the supplied drawing procedures for further processing. + These functions might, for example, write the information to a file + in a particular format, or create artwork in Illustrator with the data. + + @param art The art object. + @param style A pointer to the path style information. + @param procs A pointer to a set of drawing procedures. + You must create and fill this with procedures you have defined + before making the call. + @param iterations The number of iteration sections. Pass 0 to use + the minimum number of iterations needed to produce a smooth + color appearance. + */ + AIAPI AIErr (*IterateGradient) ( AIArtHandle art, AIPathStyle *style, AIGradientProcs *procs, ai::int16 iterations ); + + /** Creates a unique name for a gradient, which can be passed to \c #SetGradientName(). + @param name The base name. The string is modified in place to create a unique name. + \li If no existing gradient has this name, it is returned. + \li If a gradient already has this name, a numeric value is appended + to the string (or the existing numeric value is incremented) to make it unique. + */ + AIAPI AIErr (*NewGradientName) ( ai::UnicodeString& name ); + + /** Reports whether a gradient uses a particular color in any stop. + @param gradient The gradient object. + @param color The color. + @param matchTint When false, and if the color is a custom color, + returns true for any tint of that color. + @param usesColor [out] A buffer in which to return true if the color is used + in any stop. + */ + AIAPI AIErr (*GradientUsesAIColor) (AIGradientHandle gradient, const AIColor *color, + AIBoolean matchTint, AIBoolean *usesColor); + + /** Reports whether a gradient is defined for the current document. + (Note that this function returns a boolean value, not an error code.) + @param gradient The gradient object. + @return True if the gradient is defined for the current document. + */ + AIAPI AIBoolean (*ValidateGradient) ( AIGradientHandle gradient ); + + /* New in Illustrator 11.0 */ + + /** Retrieves the color at a given point on a gradient ramp. If the point is + a stop, returns the color of that stop. Otherwise, the returns an interpolated + color between stops. + @param gradient The gradient object. + @param percent The point on the ramp, a percentage value in the range [0..100]. + @param color [out] A buffer in which to return the color. + */ + AIAPI AIErr (*GetGradientColor) ( AIGradientHandle gradient, AIReal percent, AIColor *color ); + + /* New in Illustrator 14.0 */ + + /** Reports whether a gradient has any transparency. + This is the case if any stops have an opacity other than 1.0. + + @param gradient The gradient object. + @param useAlpha [out] A buffer in which to return the result, true if the gradient has transparency, false otherwise. + */ + AIAPI AIErr (*IsGradientAlphaRequired)(AIGradientHandle gradient, AIBoolean *useAlpha); +} AIGradientSuite; + + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGrid.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGrid.h index e3d30da..280685c 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGrid.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGrid.h @@ -1,194 +1,194 @@ -#ifndef __AIGrid__ -#define __AIGrid__ - -/* - * Name: AIGrid.h - * $Revision: 13 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Grid Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - - -#ifndef __AITypes__ -#include "AITypes.h" -#endif -#ifndef __AIArt__ -#include "AIArt.h" -#endif -#ifndef __AIDocumentView__ -#include "AIDocumentView.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIGrid.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** Grid suite name */ -#define kAIGridSuite "AI Grid Suite" -/** Grid suite version */ -#define kAIGridSuiteVersion5 AIAPI_VERSION(5) -/** Grid suite version */ -#define kAIGridSuiteVersion kAIGridSuiteVersion5 -/** Grid suite version */ -#define kAIGridVersion kAIGridSuiteVersion - - -/** Grid styles, graph or dotted. */ -enum { - /** The grid is shown as graph lines. */ - kAIGridStyleGraph = 0, - /** The grid is shown as dots at intersection points. */ - kAIGridStyleDotted -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Grid spacing information. */ -typedef struct { - /** Major grid increments, in points. */ - AIFloat spacing; - /** Minor grid increments. The number of steps (subdivisions) - per major increment. */ - ai::int32 ticks; -} AIGridSpacing; - -/** Grid settings information. See \c #AIGridSuite::SetGridSettings(), - \c #AIGridSuite::GetGridSettings().*/ -typedef struct { - /** When true, draw grid behind art. */ - AIBoolean isinback; - /** Grid drawing style, \c #kAIGridStyleGraph or - \c #kAIGridStyleDotted */ - ai::int32 style; - /** Grid spacing information. */ - AIGridSpacing spacing; - /** Color for heavy lines. */ - AIRGBColor darkcolor; - /** Color for light lines. */ - AIRGBColor litecolor; -} AIGridSettings; - -/** Callback prototype for \c #AIGridSuite::EnumGridLines(), which iterates over - the grid lines that intersect a given rectangle. - @param data The developer-defined data passed to the enumeration function. - @param p0 The first point at which the current grid line intersects - the rectangle. - @param p1 The second point at which the current grid line intersects - the rectangle. - */ -typedef ASErr ASAPI (*AIGridLineProc) (void* data, - AIRealPoint p0, - AIRealPoint p1); - -/** Callback prototype for \c #AIGridSuite::EnumPageLines(), which iterates over - the page tile lines that intersect a given rectangle. - @param data The developer-defined data passed to the enumeration function. - @param p0 The first point at which the current page tile line intersects - the rectangle. - @param p1 The second point at which the current page tile line intersects - the rectangle. - */ -typedef ASErr ASAPI (*AIPageLineProc) (void* data, - AIRealPoint p0, - AIRealPoint p1); - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to access the grid settings for the current document. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIGridSuite and \c #kAIGridVersion. - */ -typedef struct { - - /** Retrieves the grid settings for the current document. - @param settings [out] A buffer in which to return the settings. - */ - AIAPI AIErr (*GetGridSettings) (AIGridSettings* settings); - /** Sets the grid settings for the current document. - @param settings A pointer to a structure that you have filled - with the new settings.. - */ - AIAPI AIErr (*SetGridSettings) (AIGridSettings* settings); - - /** Enumerates the grid lines that intersect a specified rectangle to the - callback function that you provide. - @param view The document view. - @param rect A pointer to the rectangle of interest. - @param proc The callback procedure you have defined. - @param data Developer-defined data that is passed through to the callback. - */ - AIAPI AIErr (*EnumGridLines) (AIDocumentViewHandle view, - AIRealRect *rect, - AIGridLineProc proc, - void* data); - - /** Enumerates the page tile lines that intersect a specified rectangle to the - callback function that you provide. - @param view The document view. - @param rect A pointer to the rectangle of interest. - @param proc The callback procedure you have defined. - @param data Developer-defined data that is passed through to the callback. - */ - AIAPI AIErr (*EnumPageLines) (AIDocumentViewHandle view, - AIRealRect *rect, - AIPageLineProc proc, - void* data); - - /** Reports whether the grid is visible in a document view. - (Note that this function returns a boolean value, not an error code.) - @param view The document view. - @return True if the grid is visible. - */ - AIAPI AIBoolean (*IsVisible) (AIDocumentViewHandle view); - - /** Reports whether snap-to-grid is turned on in a document view. - (Note that this function returns a boolean value, not an error code.) - - @param view The document view. - @return True if snap-to-grid is on. - */ - AIAPI AIBoolean (*IsSnapOn) (AIDocumentViewHandle view); - -} AIGridSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIGrid__ +#define __AIGrid__ + +/* + * Name: AIGrid.h + * $Revision: 13 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Grid Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + + +#ifndef __AITypes__ +#include "AITypes.h" +#endif +#ifndef __AIArt__ +#include "AIArt.h" +#endif +#ifndef __AIDocumentView__ +#include "AIDocumentView.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIGrid.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** Grid suite name */ +#define kAIGridSuite "AI Grid Suite" +/** Grid suite version */ +#define kAIGridSuiteVersion6 AIAPI_VERSION(6) +/** Grid suite version */ +#define kAIGridSuiteVersion kAIGridSuiteVersion6 +/** Grid suite version */ +#define kAIGridVersion kAIGridSuiteVersion + + +/** Grid styles, graph or dotted. */ +enum { + /** The grid is shown as graph lines. */ + kAIGridStyleGraph = 0, + /** The grid is shown as dots at intersection points. */ + kAIGridStyleDotted +}; + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Grid spacing information. */ +typedef struct { + /** Major grid increments, in points. */ + AIReal spacing; + /** Minor grid increments. The number of steps (subdivisions) + per major increment. */ + ai::int32 ticks; +} AIGridSpacing; + +/** Grid settings information. See \c #AIGridSuite::SetGridSettings(), + \c #AIGridSuite::GetGridSettings().*/ +typedef struct { + /** When true, draw grid behind art. */ + AIBoolean isinback; + /** Grid drawing style, \c #kAIGridStyleGraph or + \c #kAIGridStyleDotted */ + ai::int32 style; + /** Grid spacing information. */ + AIGridSpacing spacing; + /** Color for heavy lines. */ + AIRGBColor darkcolor; + /** Color for light lines. */ + AIRGBColor litecolor; +} AIGridSettings; + +/** Callback prototype for \c #AIGridSuite::EnumGridLines(), which iterates over + the grid lines that intersect a given rectangle. + @param data The developer-defined data passed to the enumeration function. + @param p0 The first point at which the current grid line intersects + the rectangle. + @param p1 The second point at which the current grid line intersects + the rectangle. + */ +typedef ASErr ASAPI (*AIGridLineProc) (void* data, + AIRealPoint p0, + AIRealPoint p1); + +/** Callback prototype for \c #AIGridSuite::EnumPageLines(), which iterates over + the page tile lines that intersect a given rectangle. + @param data The developer-defined data passed to the enumeration function. + @param p0 The first point at which the current page tile line intersects + the rectangle. + @param p1 The second point at which the current page tile line intersects + the rectangle. + */ +typedef ASErr ASAPI (*AIPageLineProc) (void* data, + AIRealPoint p0, + AIRealPoint p1); + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite allows you to access the grid settings for the current document. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIGridSuite and \c #kAIGridVersion. + */ +typedef struct { + + /** Retrieves the grid settings for the current document. + @param settings [out] A buffer in which to return the settings. + */ + AIAPI AIErr (*GetGridSettings) (AIGridSettings* settings); + /** Sets the grid settings for the current document. + @param settings A pointer to a structure that you have filled + with the new settings.. + */ + AIAPI AIErr (*SetGridSettings) (AIGridSettings* settings); + + /** Enumerates the grid lines that intersect a specified rectangle to the + callback function that you provide. + @param view The document view. + @param rect A pointer to the rectangle of interest. + @param proc The callback procedure you have defined. + @param data Developer-defined data that is passed through to the callback. + */ + AIAPI AIErr (*EnumGridLines) (AIDocumentViewHandle view, + AIRealRect *rect, + AIGridLineProc proc, + void* data); + + /** Enumerates the page tile lines that intersect a specified rectangle to the + callback function that you provide. + @param view The document view. + @param rect A pointer to the rectangle of interest. + @param proc The callback procedure you have defined. + @param data Developer-defined data that is passed through to the callback. + */ + AIAPI AIErr (*EnumPageLines) (AIDocumentViewHandle view, + AIRealRect *rect, + AIPageLineProc proc, + void* data); + + /** Reports whether the grid is visible in a document view. + (Note that this function returns a boolean value, not an error code.) + @param view The document view. + @return True if the grid is visible. + */ + AIAPI AIBoolean (*IsVisible) (AIDocumentViewHandle view); + + /** Reports whether snap-to-grid is turned on in a document view. + (Note that this function returns a boolean value, not an error code.) + + @param view The document view. + @return True if snap-to-grid is on. + */ + AIAPI AIBoolean (*IsSnapOn) (AIDocumentViewHandle view); + +} AIGridSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGroup.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGroup.h index 576ded2..69bb7da 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGroup.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIGroup.h @@ -1,150 +1,150 @@ -#ifndef __AIGroup__ -#define __AIGroup__ - -/* - * Name: AIGroup.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Group Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIGroup.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIGroupSuite "AI Group Suite" -#define kAIGroupSuiteVersion AIAPI_VERSION(5) -#define kAIGroupVersion kAIGroupSuiteVersion - -/** Method choices for normalizing a compound path. See -\c #AIGroupSuite::NormalizeCompoundPath()*/ -typedef enum -{ - /** Use the best algorithm currently available. */ - kAINormalizeCompoundPathBest, - /** Use the Illustrator 10 algorithm. */ - kAINormalizeCompoundPathAI10, - /** internal */ - kAIMax_NormalizeCompoundPathAlgorithm = 0xFFFFFFFF -} AINormalizeCompoundPathAlgorithm; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions for working with clipping and - compound paths in art group objects. - - An art object of type \c #kGroupArt is an ordered collection - of art objects.typically created with the Group command. The group - as a whole can have a style or transparency blending attributes - which affect the rendering of its contents. - - In a \e clip group, one or more of the members is a - clipping object (that is, an art object with the - \c #kArtIsClipMask flag set, which defines a clip path). - The intersection of the clip paths is used to clip the rendering - of the other objects (\e clipped objects) in the group. - - An art object of type \c #kCompoundPathArt is a group whose - members are other groups and path objects. - - @see \c #AIArtSuite for additional artwork group functionality, - such as traversing a group's children and reordering its contents. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIGroupSuite and \c #kAIGroupVersion. -*/ -typedef struct { - - /** Reports whether a group is marked as a clipping group; that is, \c #kArtIsClipMask is - set for the group. Use \c #AIArtSuite::GetArtUserAttr() to determine which members of the - group (if any) are clipping objects. - @param group The art group object. - @param clipped [out] A buffer in which to return true if the group is marked - as a clipping group. - */ - AIAPI AIErr (*GetGroupClipped) ( AIArtHandle group, AIBoolean *clipped ); - - /** Marks or unmarks a group as a clipping group; that is, sets or clears \c #kArtIsClipMask - for the group. Use \c #AIArtSuite::SetArtUserAttr() to mark clipping for individual contained paths. - @param group The art group object. - @param clipped True to turn clipping on for the group, false to turn clipping off. - */ - AIAPI AIErr (*SetGroupClipped) ( AIArtHandle group, AIBoolean clipped ); - - /** Obsolete. Always returns true. */ - AIAPI AIErr (*GetGroupMaskLock) ( AIArtHandle group, AIBoolean *maskLocked ); - - /** Obsolete. */ - AIAPI AIErr (*SetGroupMaskLock) ( AIArtHandle group, AIBoolean maskLocked ); - - /** Normalizes the components of a compound path; that is, it sorts the members - such that the object that appears to be on the outside is in the - back of the paint order, with the points ordered so that - the path does not appear reversed in the Attributes palette. - The paths that define "holes" in the figure are stacked in a defined order. - - The stacking order of a compound path does not affect how it is filled. - Normalizing does not modify the fill area. It does provide these benefits: - - \li It is easier to directly select the outlines of the holes, which are - brought to the front. Otherwise, the outer path gets hit-tested first. - \li If a complex stroke such as a brush stroke is applied to a hole, that - stroke is in front of the strokes for the outer paths. - \li When blending from one path to another, the component paths are matched - more intuitively. - - This is especially important for Type Outlines, because fonts - are typically designed with the holes in the back, causing blends between - single outline and multiple outline characters to match the single path of - the one-path character to an inner path of the multiple-path character. - @param compound The compound path object. - @param algorithm The normalization algorithm to use. - */ - AIAPI AIErr (*NormalizeCompoundPath) ( AIArtHandle compound, AINormalizeCompoundPathAlgorithm algorithm ); - -} AIGroupSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIGroup__ +#define __AIGroup__ + +/* + * Name: AIGroup.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Group Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIGroup.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIGroupSuite "AI Group Suite" +#define kAIGroupSuiteVersion AIAPI_VERSION(5) +#define kAIGroupVersion kAIGroupSuiteVersion + +/** Method choices for normalizing a compound path. See +\c #AIGroupSuite::NormalizeCompoundPath()*/ +typedef enum +{ + /** Use the best algorithm currently available. */ + kAINormalizeCompoundPathBest, + /** Use the Illustrator 10 algorithm. */ + kAINormalizeCompoundPathAI10, + /** internal */ + kAIMax_NormalizeCompoundPathAlgorithm = 0xFFFFFFFF +} AINormalizeCompoundPathAlgorithm; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions for working with clipping and + compound paths in art group objects. + + An art object of type \c #kGroupArt is an ordered collection + of art objects.typically created with the Group command. The group + as a whole can have a style or transparency blending attributes + which affect the rendering of its contents. + + In a \e clip group, one or more of the members is a + clipping object (that is, an art object with the + \c #kArtIsClipMask flag set, which defines a clip path). + The intersection of the clip paths is used to clip the rendering + of the other objects (\e clipped objects) in the group. + + An art object of type \c #kCompoundPathArt is a group whose + members are other groups and path objects. + + @see \c #AIArtSuite for additional artwork group functionality, + such as traversing a group's children and reordering its contents. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIGroupSuite and \c #kAIGroupVersion. +*/ +typedef struct { + + /** Reports whether a group is marked as a clipping group; that is, \c #kArtIsClipMask is + set for the group. Use \c #AIArtSuite::GetArtUserAttr() to determine which members of the + group (if any) are clipping objects. + @param group The art group object. + @param clipped [out] A buffer in which to return true if the group is marked + as a clipping group. + */ + AIAPI AIErr (*GetGroupClipped) ( AIArtHandle group, AIBoolean *clipped ); + + /** Marks or unmarks a group as a clipping group; that is, sets or clears \c #kArtIsClipMask + for the group. Use \c #AIArtSuite::SetArtUserAttr() to mark clipping for individual contained paths. + @param group The art group object. + @param clipped True to turn clipping on for the group, false to turn clipping off. + */ + AIAPI AIErr (*SetGroupClipped) ( AIArtHandle group, AIBoolean clipped ); + + /** Obsolete. Always returns true. */ + AIAPI AIErr (*GetGroupMaskLock) ( AIArtHandle group, AIBoolean *maskLocked ); + + /** Obsolete. */ + AIAPI AIErr (*SetGroupMaskLock) ( AIArtHandle group, AIBoolean maskLocked ); + + /** Normalizes the components of a compound path; that is, it sorts the members + such that the object that appears to be on the outside is in the + back of the paint order, with the points ordered so that + the path does not appear reversed in the Attributes palette. + The paths that define "holes" in the figure are stacked in a defined order. + + The stacking order of a compound path does not affect how it is filled. + Normalizing does not modify the fill area. It does provide these benefits: + + \li It is easier to directly select the outlines of the holes, which are + brought to the front. Otherwise, the outer path gets hit-tested first. + \li If a complex stroke such as a brush stroke is applied to a hole, that + stroke is in front of the strokes for the outer paths. + \li When blending from one path to another, the component paths are matched + more intuitively. + + This is especially important for Type Outlines, because fonts + are typically designed with the holes in the back, causing blends between + single outline and multiple outline characters to match the single path of + the one-path character to an inner path of the multiple-path character. + @param compound The compound path object. + @param algorithm The normalization algorithm to use. + */ + AIAPI AIErr (*NormalizeCompoundPath) ( AIArtHandle compound, AINormalizeCompoundPathAlgorithm algorithm ); + +} AIGroupSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHTMLConversion.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHTMLConversion.h index 197b430..d54bd2a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHTMLConversion.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHTMLConversion.h @@ -1,191 +1,191 @@ -#ifndef __AIHTMLCONVERSION__ -#define __AIHTMLCONVERSION__ - -/* -* Name: AIHTMLConversion.h -* $Revision: 1 $ -* Author: -* Date: -* Purpose: Adobe Illustrator HTML Conversion Suite. -* - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. -* -*/ - - -/******************************************************************************* -** -** Imports -** -**/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIDataFilter__ -#include "AIDataFilter.h" -#endif - -#ifndef __SPSuites__ -#include "SPSuites.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIHTMLConversion.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIHTMLConversionSuite "AI HTML Art Conversion Suite" -#define kAIHTMLConversionSuiteVersion2 1002 -#define kAIHTMLConversionSuiteVersion kAIHTMLConversionSuiteVersion2 -#define kAIHTMLConversionInternalSuiteVersion2 2 -#define kAIHTMLConversionInternalSuiteVersion kAIHTMLConversionInternalSuiteVersion2 - -#define kAIHTMLConversionSuitesSuite "AI HTML Art Conversion Suites Suites" -#define kAIHTMLConversionSuitesSuiteVersion2 1002 -#define kAIHTMLConversionSuitesSuiteVersion kAIHTMLConversionSuitesSuiteVersion2 - - - -/******************************************************************************* -** -** Definitions -** -**/ - -/** @ingroup Errors - See \c #AIHTMLConversionSuite */ -#define kAIHTMLUnsupportedTypeError 'HT!T' -/** @ingroup Errors - See \c #AIHTMLConversionSuite */ -#define kAIHTMLHBufferOverflowError 'HTBO' - -/** Bit flags for options that control how conversion is performed by -\c #AIHTMLConversionSuite::GetArtAsHTMLText(). -The first bit is for all convertible types. Other options can be defined -by an individual converter, which would also define a UI and rules for -setting those options. -*/ -enum AIHTMLConversionOptions { - /** Clear all option flags */ - kAIHTMLNoOptions = 0, - /** Set the dynamic link between a slice and its AI art. - See \c #AISlicingSuite::GetSliceAsHTMLText() */ - kAIHTMLTextLinkTextOption = (1<<0) - }; - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite is not, by default, provided by Illustrator. -If your plug-in provides this suite, it should use the \c #AIHTMLConversionSuite -to convert art to an HTML text flow, mapping styles as needed, then -add that suite using \c #AIHTMLConversionSuitesSuite::AddHTMLConversionSuite(). - - -A default converter for text is part of the \c #AISlicingSuite. -That suite uses these functions to get the best possible HTML -representation of a sliced text object, which in turn allows -Save for Web to export Illustrator text as HTML text. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIHTMLConversionSuite and \c #kAIHTMLConversionSuiteVersion. -*/ -typedef struct - { - /** Reports whether art can be converted with specified options. - Usage of options and conversion behavior is specific to the converter. - (Note that this function returns a Boolean value, not an error code.) - @param art An art object or root of an art tree. - @param options The conversion options, a logical OR of \c #AIHTMLConversionOptions - bit flags, as defined for this converter.. - */ - AIAPI AIBoolean (*ArtCanBeConverted)(AIArtHandle art, ai::int16 artType, ai::int32 options); - - /** Converts the text runs in a text art object into appropriate HTML - expressions in a stream. Usage of options and conversion behavior - is specific to the converter. - @param art The text art object. - @param options The conversion options, a logical OR of \c #AIHTMLConversionOptions - bit flags, as defined for this converter. - @return The error \c #kAIHTMLUnsupportedTypeError if the art cannot be converted to HTML - because there is no translator.
- The error \c #kAIHTMLHBufferOverflowError if there is more text than the buffer can hold. - */ - AIAPI AIErr (*GetArtAsHTMLText)(AIArtHandle art, ai::int32 options, AIDataFilter *stream); - - /** Retrieves information from the provider of this HTML conversion suite. Not typically needed. - The provider can return a name that represents the converter, or additional information based - on what is passed in. - @param converterName [in, out] A buffer in which to specify and return the converter name. - @param otherInfo [in, out] A buffer in which to specify and return additional - information, as defined by this converter. - */ - AIAPI AIErr (*GetConverterInfo)(char **converterName, void *otherInfo); - - } AIHTMLConversionSuite; - - -/** @ingroup Suites -This suite allows you to register an HTML conversion suite, implemented as \c #AIHTMLConversionSuite -@see \c #SPSuitesSuite - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIHTMLConversionSuitesSuite and \c #kAIHTMLConversionSuitesSuiteVersion. -*/ -typedef struct - { - /** Retrieves a unique internal plug-in interface version number, - to use when adding a suite with \c #AddHTMLConversionSuite(). - @param apiVersion The external plug-in version; use the constant \c #kPluginInterfaceVersion. - @param internalVersion [out] A buffer in which to return the unique internal - version number. - */ - SPAPI SPErr (*GetNextInternalVersion)(ai::int32 apiVersion, ai::int32 *internalVersion); - - /** Adds an HTML conversion suite. - @param host This plug-in. - @param apiVersion The external plug-in version; use the constant - \c #kPluginInterfaceVersion. - @param internalVersion An internal plug-in version number, as returned by - \c #GetNextInternalVersion(). - @param suiteProcs A pointer to an \c #AIHTMLConversionSuite structure which contains - the procedures that perform the HTML conversion. - @param suite [out] A buffer in which to return the new suite. - */ - SPAPI SPErr (*AddHTMLConversionSuite)(SPPluginRef host, - ai::int32 apiVersion, ai::int32 internalVersion, - const void *suiteProcs, SPSuiteRef *suite); - - /** Retrieves a list of all registered HTML conversion suites, which - you can use with \c #SPSuitesSuite functions. - @param suiteList [out] A buffer in which to return the suite list. - */ - SPAPI SPErr (*GetHTMLConversionSuiteList)(SPSuiteListRef *suiteList); - - } AIHTMLConversionSuitesSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIHTMLCONVERSION__ +#define __AIHTMLCONVERSION__ + +/* +* Name: AIHTMLConversion.h +* $Revision: 1 $ +* Author: +* Date: +* Purpose: Adobe Illustrator HTML Conversion Suite. +* + * ADOBE SYSTEMS INCORPORATED + * Copyright 2001-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. +* +*/ + + +/******************************************************************************* +** +** Imports +** +**/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIDataFilter__ +#include "AIDataFilter.h" +#endif + +#ifndef __SPSuites__ +#include "SPSuites.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIHTMLConversion.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIHTMLConversionSuite "AI HTML Art Conversion Suite" +#define kAIHTMLConversionSuiteVersion2 1002 +#define kAIHTMLConversionSuiteVersion kAIHTMLConversionSuiteVersion2 +#define kAIHTMLConversionInternalSuiteVersion2 2 +#define kAIHTMLConversionInternalSuiteVersion kAIHTMLConversionInternalSuiteVersion2 + +#define kAIHTMLConversionSuitesSuite "AI HTML Art Conversion Suites Suites" +#define kAIHTMLConversionSuitesSuiteVersion2 1002 +#define kAIHTMLConversionSuitesSuiteVersion kAIHTMLConversionSuitesSuiteVersion2 + + + +/******************************************************************************* +** +** Definitions +** +**/ + +/** @ingroup Errors + See \c #AIHTMLConversionSuite */ +#define kAIHTMLUnsupportedTypeError 'HT!T' +/** @ingroup Errors + See \c #AIHTMLConversionSuite */ +#define kAIHTMLHBufferOverflowError 'HTBO' + +/** Bit flags for options that control how conversion is performed by +\c #AIHTMLConversionSuite::GetArtAsHTMLText(). +The first bit is for all convertible types. Other options can be defined +by an individual converter, which would also define a UI and rules for +setting those options. +*/ +enum AIHTMLConversionOptions { + /** Clear all option flags */ + kAIHTMLNoOptions = 0, + /** Set the dynamic link between a slice and its AI art. + See \c #AISlicingSuite::GetSliceAsHTMLText() */ + kAIHTMLTextLinkTextOption = (1<<0) + }; + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +This suite is not, by default, provided by Illustrator. +If your plug-in provides this suite, it should use the \c #AIHTMLConversionSuite +to convert art to an HTML text flow, mapping styles as needed, then +add that suite using \c #AIHTMLConversionSuitesSuite::AddHTMLConversionSuite(). + + +A default converter for text is part of the \c #AISlicingSuite. +That suite uses these functions to get the best possible HTML +representation of a sliced text object, which in turn allows +Save for Web to export Illustrator text as HTML text. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIHTMLConversionSuite and \c #kAIHTMLConversionSuiteVersion. +*/ +typedef struct + { + /** Reports whether art can be converted with specified options. + Usage of options and conversion behavior is specific to the converter. + (Note that this function returns a Boolean value, not an error code.) + @param art An art object or root of an art tree. + @param options The conversion options, a logical OR of \c #AIHTMLConversionOptions + bit flags, as defined for this converter.. + */ + AIAPI AIBoolean (*ArtCanBeConverted)(AIArtHandle art, ai::int16 artType, ai::int32 options); + + /** Converts the text runs in a text art object into appropriate HTML + expressions in a stream. Usage of options and conversion behavior + is specific to the converter. + @param art The text art object. + @param options The conversion options, a logical OR of \c #AIHTMLConversionOptions + bit flags, as defined for this converter. + @return The error \c #kAIHTMLUnsupportedTypeError if the art cannot be converted to HTML + because there is no translator.
+ The error \c #kAIHTMLHBufferOverflowError if there is more text than the buffer can hold. + */ + AIAPI AIErr (*GetArtAsHTMLText)(AIArtHandle art, ai::int32 options, AIDataFilter *stream); + + /** Retrieves information from the provider of this HTML conversion suite. Not typically needed. + The provider can return a name that represents the converter, or additional information based + on what is passed in. + @param converterName [in, out] A buffer in which to specify and return the converter name. + @param otherInfo [in, out] A buffer in which to specify and return additional + information, as defined by this converter. + */ + AIAPI AIErr (*GetConverterInfo)(char **converterName, void *otherInfo); + + } AIHTMLConversionSuite; + + +/** @ingroup Suites +This suite allows you to register an HTML conversion suite, implemented as \c #AIHTMLConversionSuite +@see \c #SPSuitesSuite + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIHTMLConversionSuitesSuite and \c #kAIHTMLConversionSuitesSuiteVersion. +*/ +typedef struct + { + /** Retrieves a unique internal plug-in interface version number, + to use when adding a suite with \c #AddHTMLConversionSuite(). + @param apiVersion The external plug-in version; use the constant \c #kPluginInterfaceVersion. + @param internalVersion [out] A buffer in which to return the unique internal + version number. + */ + SPAPI SPErr (*GetNextInternalVersion)(ai::int32 apiVersion, ai::int32 *internalVersion); + + /** Adds an HTML conversion suite. + @param host This plug-in. + @param apiVersion The external plug-in version; use the constant + \c #kPluginInterfaceVersion. + @param internalVersion An internal plug-in version number, as returned by + \c #GetNextInternalVersion(). + @param suiteProcs A pointer to an \c #AIHTMLConversionSuite structure which contains + the procedures that perform the HTML conversion. + @param suite [out] A buffer in which to return the new suite. + */ + SPAPI SPErr (*AddHTMLConversionSuite)(SPPluginRef host, + ai::int32 apiVersion, ai::int32 internalVersion, + const void *suiteProcs, SPSuiteRef *suite); + + /** Retrieves a list of all registered HTML conversion suites, which + you can use with \c #SPSuitesSuite functions. + @param suiteList [out] A buffer in which to return the suite list. + */ + SPAPI SPErr (*GetHTMLConversionSuiteList)(SPSuiteListRef *suiteList); + + } AIHTMLConversionSuitesSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHardSoft.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHardSoft.h index 2b9ef7c..904d42d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHardSoft.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHardSoft.h @@ -1,213 +1,218 @@ -#ifndef __AIHardSoft__ -#define __AIHardSoft__ - -/* -* Name: AIHardSoft.h -* $Revision: 3 $ -* Author: -* Date: -* Purpose: Adobe Illustrator Hard/Soft Suite. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 1986-2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - - -/******************************************************************************* -** -** Imports -** -**/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIHardSoft.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIHardSoftSuite "AI Hard Soft Suite" -#define kAIHardSoftSuiteVersion5 AIAPI_VERSION(5) -#define kAIHardSoftSuiteVersion kAIHardSoftSuiteVersion5 -#define kAIHardSoftVersion kAIHardSoftSuiteVersion - -/** @ingroup Notifiers -Sent when the ruler coordinate system for current view has changed. */ -#define kAICurrentCoordinateSystemChangedNotifier "AI Current Coordinate System Changed Notifier" - -/******************************************************************************* -** -** Types -** -**/ - -/** Coordinate system used by a particular Illustrator API function. -*/ -enum AICoordinateSystem -{ - /** Use document (page) coordinate system. - */ - kAIDocumentCoordinateSystem, - /** Use artboard coordinate system. - */ - kAIArtboardCoordinateSystem, - /** Use the coordinate system in use for the ruler in the current view. - */ - kAICurrentCoordinateSystem -}; - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides functions for converting between different coordinate -systems used at different levels of Illustrator. - -The geometry of an object is described by coordinates that are relative to -a pair of imaginary axes imposed on the artboard. Illustrator uses two ways of -placing these axes; one for storing coordinate information internally, and -another for passing coordinate information across the SDK functions. - -\li In the internal coordinate system, the origin is the top left corner of the -artboard--that is, of the white area that can be seen when zoomed out as far as -possible. The X axis is horizontal, with the values increasing to the right. -The Y axis is vertical, with values increasing downward. Values in this -system are called \e hard, or \e artboard coordinates. - -\li In the public coordinate system, the origin is the \e ruler origin--that is, -the point that corresponds to the 0 marks on the ruler when it is visible. -By default, it is the bottom left corner of the page, but it can be changed by the -user. The X axis is horizontal, with the values increasing to the right. -The Y axis is vertical, with values increasing upward. Values in this system -are called \e soft, or \e page coordinates. - -Most functions in the SDK use the public system of page coordinates, but -some use the internal artboard coordinates. This suite provides functions -for mapping between the coordinate systems. For example, if you pass -the origin point, [0,0], to \c #AIRealPointHarden(), the function returns the -vector from the artboard origin (the top left of the canvas) to the page origin -(the bottom left of the visible page). - -@note These matrix conversion functions do not convert all -components of translation matrices. To do this, you must understand -the details of the two coordinate systems involved and use linear algebra. -You must analyzed each case. For example, the matrix stored -in an \c #AIPatternStyle maps coordinates from pattern space to internal -artboard space, whereas the matrix for an image maps from image space to -public page space. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIHardSoftSuite and \c #kAIHardSoftVersion. -*/ - -typedef struct { // AI 8.0 - - /** Converts a point in public page coordinates to a point in internal - artboard coordinates. - @param srcpoint A pointer to the point in public page coordinates. - @param dstpoint [out] A buffer in which to return the point in internal - artboard coordinates. - */ - AIAPI AIErr (*AIRealPointHarden) ( AIRealPoint* srcpoint, AIRealPoint* dstpoint ); - - /** Converts a point in internal artboard coordinates to a point in public - page coordinates. - @param srcpoint A pointer to the point in internal artboard coordinates. - @param dstpoint [out] A buffer in which to return the point in public - page coordinates. - */ - AIAPI AIErr (*AIRealPointSoften) ( AIRealPoint* srcpoint, AIRealPoint* dstpoint ); - - /** Applies \c #AIRealPointHarden() to the translation - component of a matrix. This can be used to re-harden a returned - matrix that has been incorrectly softened. - @param matrix [in, out] The translation matrix, which is modified in place. - */ - AIAPI AIErr (*AIRealMatrixHarden) ( AIRealMatrix* matrix ); - - /** Applies \c #AIRealPointSoften() to the translation - component of a matrix. This can be used to pre-soften a matrix being passed - into a function that will apply incorrect hardening. - @param matrix [in, out] The translation matrix, which is - modified in place. - */ - AIAPI AIErr (*AIRealMatrixSoften) ( AIRealMatrix* matrix ); - - /** Applies \c #AIRealPointHarden() to the translation component - of a matrix, then negates the \c b and \c c components. - @param matrix [in, out] The translation matrix, which is - modified in place. - */ - AIAPI AIErr (*AIRealMatrixRealHard) ( AIRealMatrix* matrix ); - - /** Applies \c #AIRealPointSoften() to the translation component - of a matrix, then negates the \c b and \c c components. - @param matrix [in, out] The translation matrix, which is - modified in place. - */ - AIAPI AIErr (*AIRealMatrixRealSoft) ( AIRealMatrix* matrix ); - - /** Retrieves the coordinate system used by API functions in the current context. - Valid only for the current message call received by a plug-in. The value is reset to - \c #kAIDocumentCoordinateSystem each time the app context is popped; - see \c #AIAppContextSuite::PushAppContext() and \c #AIAppContextSuite::PopAppContext(). - - @param coordinateSystem [out] A buffer in which to return the - current coordinate system constant, an \c #AICoordinateSystem value. - - @note It is recommended that you use \c #ai::AutoCoordinateSystem, - rather than explicitly calling these get and set functions. - */ - AIAPI AIErr (*GetCoordinateSystem)(ai::int32& coordinateSystem); - - /** Changes the coordinate system used by API functions in the current context. - Must be set for every message a plug-in receives. The value is reset to - \c #kAIDocumentCoordinateSystem each time the app context is popped; - see \c #AIAppContextSuite::PushAppContext() and \c #AIAppContextSuite::PopAppContext(). - - @param coordinateSystem [in] The new coordinate system constant, an \c #AICoordinateSystem value. - - - @note It is recommended that you use \c #ai::AutoCoordinateSystem, - rather than explicitly calling these get and set functions. - - */ - AIAPI AIErr (*SetCoordinateSystem)(ai::int32 coordinateSystem); - - /** - Converts the coordinate system of a single point from one system to another. - @param point[in,out] The current coordinate of the point, modified in place. - @param src [in] The source coordinate system, an \c #AICoordinateSystem value. - @param dest [in] The destination coordinate system, an \c #AICoordinateSystem value. - @param convertForDisplay [in] True to convert Y values if the artboard's ruler origin is set to bottom left (which was the default in CS4). - In CS5, the default ruler origin is top left, and Y values increase downward. Set to true for values to be used in the UI. - */ - AIAPI AIErr (*ConvertCoordinates)(AIRealPoint& point,ai::int32 src,ai::int32 dest, AIBoolean convertForDisplay); - - -} AIHardSoftSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#pragma once + +/* +* ADOBE CONFIDENTIAL +* +* Copyright 2009 Adobe +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +*/ + +/******************************************************************************* +** +** Imports +** +**/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIHardSoft.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIHardSoftSuite "AI Hard Soft Suite" +#define kAIHardSoftSuiteVersion6 AIAPI_VERSION(6) +#define kAIHardSoftSuiteVersion kAIHardSoftSuiteVersion6 +#define kAIHardSoftVersion kAIHardSoftSuiteVersion + +/** @ingroup Notifiers +Sent when the ruler coordinate system for current view has changed. */ +#define kAICurrentCoordinateSystemChangedNotifier "AI Current Coordinate System Changed Notifier" + +/******************************************************************************* +** +** Types +** +**/ + +/** Coordinate system used by a particular Illustrator API function. +*/ +enum AICoordinateSystem +{ + /** Use document (page) coordinate system. + */ + kAIDocumentCoordinateSystem, + /** Use artboard coordinate system. + */ + kAIArtboardCoordinateSystem, + /** Use the coordinate system in use for the ruler in the current view. + */ + kAICurrentCoordinateSystem +}; + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +This suite provides functions for converting between different coordinate +systems used at different levels of Illustrator. + +The geometry of an object is described by coordinates that are relative to +a pair of imaginary axes imposed on the artboard. Illustrator uses two ways of +placing these axes; one for storing coordinate information internally, and +another for passing coordinate information across the SDK functions. + +\li In the internal coordinate system, the origin is the top left corner of the +artboard--that is, of the white area that can be seen when zoomed out as far as +possible. The X axis is horizontal, with the values increasing to the right. +The Y axis is vertical, with values increasing downward. Values in this +system are called \e hard, or \e artboard coordinates. + +\li In the public coordinate system, the origin is the \e ruler origin--that is, +the point that corresponds to the 0 marks on the ruler when it is visible. +By default, it is the bottom left corner of the page, but it can be changed by the +user. The X axis is horizontal, with the values increasing to the right. +The Y axis is vertical, with values increasing upward. Values in this system +are called \e soft, or \e page coordinates. + +Most functions in the SDK use the public system of page coordinates, but +some use the internal artboard coordinates. This suite provides functions +for mapping between the coordinate systems. For example, if you pass +the origin point, [0,0], to \c #AIRealPointHarden(), the function returns the +vector from the artboard origin (the top left of the canvas) to the page origin +(the bottom left of the visible page). + +@note These matrix conversion functions do not convert all +components of translation matrices. To do this, you must understand +the details of the two coordinate systems involved and use linear algebra. +You must analyzed each case. For example, the matrix stored +in an \c #AIPatternStyle maps coordinates from pattern space to internal +artboard space, whereas the matrix for an image maps from image space to +public page space. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIHardSoftSuite and \c #kAIHardSoftVersion. +*/ + +typedef struct { + + /** Converts a point in public page coordinates to a point in internal + artboard coordinates. + @param srcpoint A pointer to the point in public page coordinates. + @param dstpoint [out] A buffer in which to return the point in internal + artboard coordinates. + */ + AIAPI AIErr (*AIRealPointHarden) ( AIRealPoint* srcpoint, AIRealPoint* dstpoint ); + + /** Converts a point in internal artboard coordinates to a point in public + page coordinates. + @param srcpoint A pointer to the point in internal artboard coordinates. + @param dstpoint [out] A buffer in which to return the point in public + page coordinates. + */ + AIAPI AIErr (*AIRealPointSoften) ( AIRealPoint* srcpoint, AIRealPoint* dstpoint ); + + /** Applies \c #AIRealPointHarden() to the translation + component of a matrix. This can be used to re-harden a returned + matrix that has been incorrectly softened. + @param matrix [in, out] The translation matrix, which is modified in place. + */ + AIAPI AIErr (*AIRealMatrixHarden) ( AIRealMatrix* matrix ); + + /** Applies \c #AIRealPointSoften() to the translation + component of a matrix. This can be used to pre-soften a matrix being passed + into a function that will apply incorrect hardening. + @param matrix [in, out] The translation matrix, which is + modified in place. + */ + AIAPI AIErr (*AIRealMatrixSoften) ( AIRealMatrix* matrix ); + + /** Applies \c #AIRealPointHarden() to the translation component + of a matrix, then negates the \c b and \c c components. + @param matrix [in, out] The translation matrix, which is + modified in place. + */ + AIAPI AIErr (*AIRealMatrixRealHard) ( AIRealMatrix* matrix ); + + /** Applies \c #AIRealPointSoften() to the translation component + of a matrix, then negates the \c b and \c c components. + @param matrix [in, out] The translation matrix, which is + modified in place. + */ + AIAPI AIErr (*AIRealMatrixRealSoft) ( AIRealMatrix* matrix ); + + /** Retrieves the coordinate system used by API functions in the current context. + Valid only for the current message call received by a plug-in. The value is reset to + \c #kAIDocumentCoordinateSystem each time the app context is popped; + see \c #AIAppContextSuite::PushAppContext() and \c #AIAppContextSuite::PopAppContext(). + + @param coordinateSystem [out] A buffer in which to return the + current coordinate system constant, an \c #AICoordinateSystem value. + + @note It is recommended that you use \c #ai::AutoCoordinateSystem, + rather than explicitly calling these get and set functions. + */ + AIAPI AIErr (*GetCoordinateSystem)(ai::int32& coordinateSystem); + + /** Changes the coordinate system used by API functions in the current context. + Must be set for every message a plug-in receives. The value is reset to + \c #kAIDocumentCoordinateSystem each time the app context is popped; + see \c #AIAppContextSuite::PushAppContext() and \c #AIAppContextSuite::PopAppContext(). + + @param coordinateSystem [in] The new coordinate system constant, an \c #AICoordinateSystem value. + + + @note It is recommended that you use \c #ai::AutoCoordinateSystem, + rather than explicitly calling these get and set functions. + + */ + AIAPI AIErr (*SetCoordinateSystem)(ai::int32 coordinateSystem); + + /** + Converts the coordinate system of a single point from one system to another. + @param point[in,out] The current coordinate of the point, modified in place. + @param src [in] The source coordinate system, an \c #AICoordinateSystem value. + @param dest [in] The destination coordinate system, an \c #AICoordinateSystem value. + @param convertForDisplay [in] True to convert Y values if the artboard's ruler origin is set to bottom left (which was the default in CS4). + In CS5, the default ruler origin is top left, and Y values increase downward. Set to true for values to be used in the UI. + */ + AIAPI AIErr (*ConvertCoordinates)(AIRealPoint& point,ai::int32 src,ai::int32 dest, AIBoolean convertForDisplay); + + /** Converts an AIRealRect to a AIRealRect in internal artboard coordinates space. + @param inRect Input rect in public page coordinates. + @param outRect [out] A rect which shall have the values in internal + artboard coordinates. + */ + AIAPI AIErr(*AIRealRectHarden)(const AIRealRect& inRect, AIRealRect& outRect); + + + /** Converts an AIRealRect in internal artboard coordinates to a AIRealRect in public + page coordinates. + @param inRect Input rect in internal artboard coordinates. + @param outRect [out] A rect which shall have the values in public page coordinates + */ + AIAPI AIErr(*AIRealRectSoften)(const AIRealRect& inRect, AIRealRect& outRect); + +} AIHardSoftSuite; + + +#include "AIHeaderEnd.h" + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderBegin.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderBegin.h index de70837..0c8b51a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderBegin.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderBegin.h @@ -1,53 +1,53 @@ -/***********************************************************************/ -/* */ -/* AIHeaderBegin.h */ -/* A standard place to put the junk that occurs at the beginning */ -/* of all of our headers. This is all reset with AIHeaderEnd.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 2005-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/* Started by Dave MacLachlan, 07/10/2005 */ -/* */ -/***********************************************************************/ - -#if defined(__AIHeaderBegin_H__) -#error __AIHeaderBegin_H__ included multiple times in a single file -#endif - -#define __AIHeaderBegin_H__ 1 - -#ifndef __ASConfig__ -#include "ASConfig.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef MAC_ENV - //power_gcc on MWERKS is basically equivalent to power on GCC - #if defined (__MWERKS__) - #pragma options align=power_gcc - #pragma enumsalwaysint on - #elif defined (__GNUC__) - //GCC doesn't allow non int enums without using an attribute decl directly on - //the enum, so no need to set it - #pragma options align=power - #endif -#endif - -#if defined(WIN_ENV) - #pragma warning(disable: 4103) // Gets rid of the unbalanced alignment warning. - #pragma pack(push, 8) -#endif +/***********************************************************************/ +/* */ +/* AIHeaderBegin.h */ +/* A standard place to put the junk that occurs at the beginning */ +/* of all of our headers. This is all reset with AIHeaderEnd.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 2005-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/* Started by Dave MacLachlan, 07/10/2005 */ +/* */ +/***********************************************************************/ + +#if defined(__AIHeaderBegin_H__) +#error __AIHeaderBegin_H__ included multiple times in a single file +#endif + +#define __AIHeaderBegin_H__ 1 + +#include "AIExternDef.h" + +#ifndef __ASConfig__ +#include "ASConfig.h" +#endif + +AI_EXTERN_C_BEGIN + +#ifdef MAC_ENV + //power_gcc on MWERKS is basically equivalent to power on GCC + #if defined (__MWERKS__) + #pragma options align=power_gcc + #pragma enumsalwaysint on + #elif defined (__GNUC__) + //GCC doesn't allow non int enums without using an attribute decl directly on + //the enum, so no need to set it + #pragma options align=power + #endif +#endif + +#if defined(WIN_ENV) + #pragma warning(disable: 4103) // Gets rid of the unbalanced alignment warning. + #pragma pack(push, 8) +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderEnd.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderEnd.h index c61eff8..6e4a273 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderEnd.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHeaderEnd.h @@ -1,46 +1,44 @@ -/***********************************************************************/ -/* */ -/* AIHeaderEnd.h */ -/* A standard place to put the junk that occurs at the end */ -/* of all of our headers. You must include AIHeaderBegin.h BEFORE */ -/* you include this file or you will get an error */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 2005-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/* Started by Dave MacLachlan, 07/10/2005 */ -/* */ -/***********************************************************************/ - -#if !defined(__AIHeaderBegin_H__) -#error You need to include AIHeaderBegin before this file -#endif - -#undef __AIHeaderBegin_H__ - -#ifdef MAC_ENV - #pragma options align=reset - #if defined (__MWERKS__) - //GCC doesn't allow non int enums without using an attribute decl directly on - //the enum, so no need to set it - #pragma enumsalwaysint reset - #endif -#endif - -#ifdef WIN_ENV - #pragma pack(pop) -#endif - -#ifdef __cplusplus -} -#endif \ No newline at end of file +/***********************************************************************/ +/* */ +/* AIHeaderEnd.h */ +/* A standard place to put the junk that occurs at the end */ +/* of all of our headers. You must include AIHeaderBegin.h BEFORE */ +/* you include this file or you will get an error */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 2005-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/* Started by Dave MacLachlan, 07/10/2005 */ +/* */ +/***********************************************************************/ + +#if !defined(__AIHeaderBegin_H__) +#error You need to include AIHeaderBegin before this file +#endif + +#undef __AIHeaderBegin_H__ + +#ifdef MAC_ENV + #pragma options align=reset + #if defined (__MWERKS__) + //GCC doesn't allow non int enums without using an attribute decl directly on + //the enum, so no need to set it + #pragma enumsalwaysint reset + #endif +#endif + +#ifdef WIN_ENV + #pragma pack(pop) +#endif + +AI_EXTERN_C_END diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHitTest.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHitTest.h index 7664768..de5f58a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHitTest.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIHitTest.h @@ -1,382 +1,382 @@ -#ifndef __AIHitTest__ -#define __AIHitTest__ - -/* - * Name: AIHitTest.h - * Author: - * Date: - * Purpose: Adobe Illustrator Hit Testing Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2009 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIPluginGroup__ -#include "AIPluginGroup.h" -#endif -#ifndef __AITool__ -#include "AITool.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIHitTest.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIHitTestSuite "AI Hit Test Suite" -#define kAIHitTestSuiteVersion19 AIAPI_VERSION(7) -#define kAIHitTestSuiteVersion kAIHitTestSuiteVersion19 -#define kAIHitTestVersion kAIHitTestSuiteVersion - - -/** Hit types for objects found by hit requests. -See \c #AIHitTestSuite::GetType() and \c #AIHitTestSuite::GetSubType() */ -enum AIHitType { - /** Hit an anchor point. */ - kPHitType, - /** Hit a leading direction line endpoint. */ - kInHitType, - /** Hit a trailing direction line endpoint. */ - kOutHitType, - /** Hit a segment interior. */ - kSegmentHitType, - /** Hit generated by infill during preview mode. */ - kFillHitType, - /** Hit the center point of an object with show center point on. */ - kCenterHitType, - /** Hit the intersection of two guides. */ - kTwoGuideHitType -}; - -/** Hit requests specify what types of hits to look for and report as a hit. */ -enum AIHitRequest { - /** Report any object hits anywhere. */ - kAllHitRequest, - /** Report only hits on anchor points of beziers. */ - kPHitRequest, - /** Report only first or last bezier point hits on path.*/ - kEndPHitRequest, - /** Report only hits on guide object. */ - kGuideHitRequest, - /** Report only hits on points on paths or any guides. */ - kNearestPointOnPathHitRequest, - /** Report only hits on text objects. */ - kTextHitRequest, - /**Report only hits on already-selected objects. */ - kSelectedObjectHitRequest, - /** Report hits on paintable objects (non-guide paths & text) */ - kPaintHitRequest, - /** Report all hits, but does not test against object fills. */ - kAllNoFillHitRequest, - /** Report hits on paintable objects (non-guide paths & text), - but does not test against object fills. */ - kPaintNoFillHitRequest, - /** Report all hits, but does not text against direction line - endpoints (the in and out handles of a bezier) */ - kNoControlHandlesHitRequest, - /** Report hits on paintable objects (non-guide paths & text), - but does not test locked objects */ - kNoLockedPaintHitRequest, - /** Report only hits on anchor points of beziers and on direction handle points of paths. */ - kAllPHitRequest, - /** Same as \c #kAllHitRequest, except that the search always checks - both points and fills of the object, regardless of a document's view mode. */ - kAllHitPreviewRequest, - /** Report only hits on (focal) strokes of paths. The hit tolerance is interpreted - as being a distance from the stroked area instead of a distance from the - bezier. The AIHitType will be returned as either kSegmentHitType or kPHitType, - depending on the nearest point on the path. */ - kStrokeHitRequest -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** A hit object, which describes what was found by \c #AIHitTestSuite functions - at a specified point. Contains both generic information that applies to all objects - and some information specific to the object type. For example, it always identifies - the object if one was found. If the object is a path, there is additional - information about the part of the path that was hit. See specific suites, - such as \c #AIMeshHitSuite, to extract additional object-specific information. -*/ -typedef struct AIHit *AIHitRef; - -/** Returned by \c #AIHitTestSuite::GetHitData(), describes the results of a - hit test. The same information can be obtained by individual APIs in the - \c #AIHitTestSuite. */ -struct AIToolHitData { - /** True if the test found an object matching test criteria. - See \c #AIHitTestSuite::IsHit() */ - AIBoolean hit; - /** The \c #AIHitType value for the found object. - See \c #AIHitTestSuite::GetType() */ - ai::int16 type; - /** The \c #AIHitType value for the subtype when the type of the - found object is \c #kFillHitType. - See \c #AIHitTestSuite::GetSubType() */ - ai::int16 subType; - /** If the hit is on an anchor point or segment of a path, - the path segment number. - See \c #AIHitTestSuite::GetPathSegment() */ - ai::int16 segment; - /** The leaf art object that matched the test criteria. - See \c #AIHitTestSuite::GetArt() */ - AIArtHandle object; - /** The group containing the leaf art object. - See \c #AIHitTestSuite::GetGroup() */ - AIArtHandle group; - /** The exact point location of the hit, after snapping to anchor points, - bezier edges, etc. - See \c #AIHitTestSuite::GetPoint() */ - AIRealPoint point; - /** If the hit was on a segment of a path, the parametric value - of the nearest location on the segment to the hit. - See \c #AIHitTestSuite::GetPathParameter() */ - AIReal t; - AIToolHitData():hit(false), - type(0), - subType(0), - segment(0), - object(NULL), - group(NULL), - point(), - t(0.0) - { - } -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These function allow you to query a document or art subtree for objects - based on positional information. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIHitTestSuite and \c #kAIHitTestVersion. - */ -struct AIHitTestSuite { - /** Finds an object in a given art tree at a given point. - Searches from front to back in the paint order, within a small tolerance of the - given point. (The tolerance used is dependent upon global user preferences. - See \c #HitTestEx for a version which takes the tolerance as a parameter.) - Returns the closest object found that matches the criteria specified by \c option. - @param art The root object of an art tree, or \c NULL to search the - entire current document. - @param point A pointer to the location of interest, in artwork coordinates. - @param option The type of search to perform, an \c #AIHitRequest constant. - @param hit [out] A buffer in which to return the hit object.
This object - is reference counted. The initial count is 1. Use \c #Release() to decrement - the count and free the memory when the count is 0. - @see \c #GetHitData() and other access functions to examine the - contents of the hit object. - */ - AIAPI AIErr (*HitTest) ( AIArtHandle art, const AIRealPoint *point, ai::int32 option, AIHitRef *hit ); - - /** Finds an object in a given art tree at or near a given point. Differs from \c #HitTest() - in that it allows you to specify the size of the tolerance window around the point - of interest. - @param art The root object of an art tree, or \c NULL to search the - entire current document. - @param point A pointer to the location of interest, in artwork coordinates. - @param tolerance The size of the window around \c point in which to test. A - number of pixels at the current zoom factor. The default value is 2. - The algorithm is not guaranteed to produce correct results for large values. - @param option The type of search to perform, an \c #AIHitRequest constant. - @param hit [out] A buffer in which to return the hit object. Use \c #GetHitData() - and other access function in this suite to examine the contents. This object - is reference counted. The initial count is 1. Use \c #Release() to decrement - the count and free the memory when the count is 0. - */ - AIAPI AIErr (*HitTestEx) ( AIArtHandle art, const AIRealPoint *point, AIReal tolerance, ai::int32 option, AIHitRef *hit ); - - /** Increments the reference count of a hit object. Use this function if you intend to - hold onto the hit object for longer than a single event or notification, for example - if you want to compare the hit at mouse down to the hit during drag or at mouse up. - (Note that this function returns a numeric value, not an error code.) - @param hit The hit object. The function has no effect if this is \c NULL. - @return The current reference count, after the increment. - */ - AIAPI ai::int32 (*AddRef) ( AIHitRef hit ); - - /** Decrements the reference count of a hit object and frees the memory if the count has - reached 0. (It is not necessary to Release an AIHitRef returned from HitTest or HitTestEx - unless you have called AddRef on it.) - @param hit The hit object. The function has no effect if this is \c NULL. - @return The current reference count, after the decrement. - */ - AIAPI ai::int32 (*Release) ( AIHitRef hit ); - - /** Retrieves hit data from a hit object. Some object-type-specific information - must be retrieved separately, using the appropriate suite, such as \c #AIMeshHitSuite. - @param hit The hit object. - @param toolHit [out] A buffer in which to return the data structure. - */ - AIAPI AIErr (*GetHitData) ( AIHitRef hit, AIToolHitData *toolHit ); - - /** Reports whether a search found a matching object. - (Note that this function returns a boolean value, not an error code.) - @param hit The hit object. - @return True if the test found a matching object. - */ - AIAPI AIBoolean (*IsHit) ( AIHitRef hit ); - - /** Retrieves the type of object found by a successful hit test. - (Note that this function returns a constant value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit. - @return The \c #AIHitType value for the found object. - */ - AIAPI ai::int32 (*GetType) ( AIHitRef hit ); - - /** Retrieves the sub-type for an object of type \c #kFillHitType that - was found by a successful hit test. Sub-types of the Fill hit type can be - In, Out, Segment, or Center. Otherwise, returns the primary type. - (Note that this function returns a constant value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns true for this hit. - @return The \c #AIHitType value for the sub-type of the found object, - or the primary type if the found object was not of type \c #kFillHitType. - */ - AIAPI ai::int32(*GetSubType) (AIHitRef hit); - - /** Retrieves the leaf object that was found by a successful hit test. - (Note that this function returns an object value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit. - @return The leaf art object that matched the test criteria. - */ - AIAPI AIArtHandle (*GetArt) ( AIHitRef hit ); - - /** Retrieves the group containing the leaf object that was found by a successful hit test. - (Note that this function returns an object value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit. - @return The group containing the leaf art object. - */ - AIAPI AIArtHandle (*GetGroup) ( AIHitRef hit ); - - /** Retrieves the exact location of the hit. - (Note that this function returns a point value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit. - @return The point location. If the hit was on a geometric entity such as a - point or segment of a path, this is the nearest point on that entity to - the input point. - */ - AIAPI AIRealPoint (*GetPoint) ( AIHitRef hit ); - - /** If the hit is on an anchor point or segment of a path, - retrieves the path segment containing the target point. - (Note that this function returns a numeric value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit, and hit type is \c #kPHitType, \c #kInHitType, - \c #kOutHitType, or \c #kSegmentHitType. - @return The path segment number. - */ - AIAPI ai::int16(*GetPathSegment) ( AIHitRef hit ); - - /** If the hit was on a segment of a path, retrieves the parametric value of the - nearest location on the segment to the hit. - (Note that this function returns a numeric value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit, and hit type is \c #kSegmentHitType. - @return The parametric value, a position along the curve where - 0 is the start and 1 is the end. - */ - AIAPI AIReal (*GetPathParameter) ( AIHitRef hit ); - - // New for AI12: - - /** Finds an object at a given point, performing custom hit testing for - plug-in objects, as defined by the plug-in group. - @param art The root object of an art tree, or \c NULL to search the - entire current document. - @param point A pointer to the location of interest, in artwork coordinates. - @param tolerance The size of the window around \c point in which to test. A - number of pixels at the current zoom factor. The default value is 2. - The algorithm is not guaranteed to produce correct results for large values. - @param option The type of search to perform, an \c #AIHitRequest constant. - @param pluginGroup The plug-in group whose members perform custom hit testing - in addition to the regular hit tests specified by \c options, using the - additional data passed in \c extData. - @param extData A pointer to a developer-defined data structure to pass to - the custom test. When there is a hit on a member of the plug-in group, - that object's custom hit test fills this structure and passes it back - in the hit object, in the \c #AIPluginGroupCustomHitTestData::inData field. - @param hit [out] A buffer in which to return the hit object, which includes information - passed in the \c #AIPluginGroupCustomHitTestData::outData field.
This object - is reference counted. The initial count is 1. Use \c #Release() to decrement - the count and free the memory when the count is 0. - @see \c #GetCustomHitData() to retrieve custom hit data returned by the plug-in group.
- \c #GetHitData() to retrieve other hit data. - */ - AIAPI AIErr (*CustomHitTest) ( AIArtHandle art, const AIRealPoint *point, AIReal tolerance, ai::int32 option, - AIPluginGroupHandle pluginGroup, void* extData, AIHitRef *hit ); - - /** Retrieves the result of custom hit testing performed by a plug-in group. - @param hit The hit object, as returned by \c #CustomHitTest(). - @param userData [out] A buffer in which to return a pointer to the - developer-defined data structure returned by the plug-in group's hit test, - as passed in the \c #AIPluginGroupCustomHitTestData::outData field.
- This memory is owned by the hit object, and remains valid while the hit object is valid. - Do not delete it explicitly; instead, provide an implementation - of \c #AICustomHitDataDeleteFunc, which is used to delete it when the hit object - is released. - @param pluginObject [out] A buffer in which to return the plug-in group member - object the custom hit testing was performed on. - @see \c #AIPluginGroupSuite - */ - AIAPI AIErr (*GetCustomHitData) ( AIHitRef hit, void** userdata, AIArtHandle *pluginObject ); - - // New for AI15: - - /** Finds the distance from the actual mouse-down point to the closest point on the path. - The result is a signed number; a negative value indicates that the mouse point was - on the left side of the path (in the path direction traveling from start to end), while - a positive value means that the mouse point was on the right side of the path. - - Use with \c #kStrokeHitRequest for help in setting the left or right stroke width. - Valid only if \c #IsHit() returns true for this hit, and the hit type is \c #kPHitType - or \c #kSegmentHitType. - - (Note that this function returns a numeric value, not an error code.) - - @param hit The hit object. - @return The signed distance value, or 0 if the validity conditions - are not met. - */ - AIAPI AIReal (*GetSignedHitDistance) ( AIHitRef hit ); -}; - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIHitTest__ +#define __AIHitTest__ + +/* + * Name: AIHitTest.h + * Author: + * Date: + * Purpose: Adobe Illustrator Hit Testing Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2009 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIPluginGroup__ +#include "AIPluginGroup.h" +#endif +#ifndef __AITool__ +#include "AITool.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIHitTest.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIHitTestSuite "AI Hit Test Suite" +#define kAIHitTestSuiteVersion19 AIAPI_VERSION(7) +#define kAIHitTestSuiteVersion kAIHitTestSuiteVersion19 +#define kAIHitTestVersion kAIHitTestSuiteVersion + + +/** Hit types for objects found by hit requests. +See \c #AIHitTestSuite::GetType() and \c #AIHitTestSuite::GetSubType() */ +enum AIHitType { + /** Hit an anchor point. */ + kPHitType, + /** Hit a leading direction line endpoint. */ + kInHitType, + /** Hit a trailing direction line endpoint. */ + kOutHitType, + /** Hit a segment interior. */ + kSegmentHitType, + /** Hit generated by infill during preview mode. */ + kFillHitType, + /** Hit the center point of an object with show center point on. */ + kCenterHitType, + /** Hit the intersection of two guides. */ + kTwoGuideHitType +}; + +/** Hit requests specify what types of hits to look for and report as a hit. */ +enum AIHitRequest { + /** Report any object hits anywhere. */ + kAllHitRequest, + /** Report only hits on anchor points of beziers. */ + kPHitRequest, + /** Report only first or last bezier point hits on path.*/ + kEndPHitRequest, + /** Report only hits on guide object. */ + kGuideHitRequest, + /** Report only hits on points on paths or any guides. */ + kNearestPointOnPathHitRequest, + /** Report only hits on text objects. */ + kTextHitRequest, + /**Report only hits on already-selected objects. */ + kSelectedObjectHitRequest, + /** Report hits on paintable objects (non-guide paths & text) */ + kPaintHitRequest, + /** Report all hits, but does not test against object fills. */ + kAllNoFillHitRequest, + /** Report hits on paintable objects (non-guide paths & text), + but does not test against object fills. */ + kPaintNoFillHitRequest, + /** Report all hits, but does not text against direction line + endpoints (the in and out handles of a bezier) */ + kNoControlHandlesHitRequest, + /** Report hits on paintable objects (non-guide paths & text), + but does not test locked objects */ + kNoLockedPaintHitRequest, + /** Report only hits on anchor points of beziers and on direction handle points of paths. */ + kAllPHitRequest, + /** Same as \c #kAllHitRequest, except that the search always checks + both points and fills of the object, regardless of a document's view mode. */ + kAllHitPreviewRequest, + /** Report only hits on (focal) strokes of paths. The hit tolerance is interpreted + as being a distance from the stroked area instead of a distance from the + bezier. The AIHitType will be returned as either kSegmentHitType or kPHitType, + depending on the nearest point on the path. */ + kStrokeHitRequest +}; + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** A hit object, which describes what was found by \c #AIHitTestSuite functions + at a specified point. Contains both generic information that applies to all objects + and some information specific to the object type. For example, it always identifies + the object if one was found. If the object is a path, there is additional + information about the part of the path that was hit. See specific suites, + such as \c #AIMeshHitSuite, to extract additional object-specific information. +*/ +typedef struct AIHit *AIHitRef; + +/** Returned by \c #AIHitTestSuite::GetHitData(), describes the results of a + hit test. The same information can be obtained by individual APIs in the + \c #AIHitTestSuite. */ +struct AIToolHitData { + /** True if the test found an object matching test criteria. + See \c #AIHitTestSuite::IsHit() */ + AIBoolean hit; + /** The \c #AIHitType value for the found object. + See \c #AIHitTestSuite::GetType() */ + ai::int16 type; + /** The \c #AIHitType value for the subtype when the type of the + found object is \c #kFillHitType. + See \c #AIHitTestSuite::GetSubType() */ + ai::int16 subType; + /** If the hit is on an anchor point or segment of a path, + the path segment number. + See \c #AIHitTestSuite::GetPathSegment() */ + ai::int16 segment; + /** The leaf art object that matched the test criteria. + See \c #AIHitTestSuite::GetArt() */ + AIArtHandle object; + /** The group containing the leaf art object. + See \c #AIHitTestSuite::GetGroup() */ + AIArtHandle group; + /** The exact point location of the hit, after snapping to anchor points, + bezier edges, etc. + See \c #AIHitTestSuite::GetPoint() */ + AIRealPoint point; + /** If the hit was on a segment of a path, the parametric value + of the nearest location on the segment to the hit. + See \c #AIHitTestSuite::GetPathParameter() */ + AIReal t; + AIToolHitData():hit(false), + type(0), + subType(0), + segment(0), + object(NULL), + group(NULL), + point(), + t(0.0) + { + } +}; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + These function allow you to query a document or art subtree for objects + based on positional information. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIHitTestSuite and \c #kAIHitTestVersion. + */ +struct AIHitTestSuite { + /** Finds an object in a given art tree at a given point. + Searches from front to back in the paint order, within a small tolerance of the + given point. (The tolerance used is dependent upon global user preferences. + See \c #HitTestEx for a version which takes the tolerance as a parameter.) + Returns the closest object found that matches the criteria specified by \c option. + @param art The root object of an art tree, or \c NULL to search the + entire current document. + @param point A pointer to the location of interest, in artwork coordinates. + @param option The type of search to perform, an \c #AIHitRequest constant. + @param hit [out] A buffer in which to return the hit object.
This object + is reference counted. The initial count is 1. Use \c #Release() to decrement + the count and free the memory when the count is 0. + @see \c #GetHitData() and other access functions to examine the + contents of the hit object. + */ + AIAPI AIErr (*HitTest) ( AIArtHandle art, const AIRealPoint *point, ai::int32 option, AIHitRef *hit ); + + /** Finds an object in a given art tree at or near a given point. Differs from \c #HitTest() + in that it allows you to specify the size of the tolerance window around the point + of interest. + @param art The root object of an art tree, or \c NULL to search the + entire current document. + @param point A pointer to the location of interest, in artwork coordinates. + @param tolerance The size of the window around \c point in which to test. A + number of pixels at the current zoom factor. The default value is 2. + The algorithm is not guaranteed to produce correct results for large values. + @param option The type of search to perform, an \c #AIHitRequest constant. + @param hit [out] A buffer in which to return the hit object. Use \c #GetHitData() + and other access function in this suite to examine the contents. This object + is reference counted. The initial count is 1. Use \c #Release() to decrement + the count and free the memory when the count is 0. + */ + AIAPI AIErr (*HitTestEx) ( AIArtHandle art, const AIRealPoint *point, AIReal tolerance, ai::int32 option, AIHitRef *hit ); + + /** Increments the reference count of a hit object. Use this function if you intend to + hold onto the hit object for longer than a single event or notification, for example + if you want to compare the hit at mouse down to the hit during drag or at mouse up. + (Note that this function returns a numeric value, not an error code.) + @param hit The hit object. The function has no effect if this is \c NULL. + @return The current reference count, after the increment. + */ + AIAPI ai::int32 (*AddRef) ( AIHitRef hit ); + + /** Decrements the reference count of a hit object and frees the memory if the count has + reached 0. (It is not necessary to Release an AIHitRef returned from HitTest or HitTestEx + unless you have called AddRef on it.) + @param hit The hit object. The function has no effect if this is \c NULL. + @return The current reference count, after the decrement. + */ + AIAPI ai::int32 (*Release) ( AIHitRef hit ); + + /** Retrieves hit data from a hit object. Some object-type-specific information + must be retrieved separately, using the appropriate suite, such as \c #AIMeshHitSuite. + @param hit The hit object. + @param toolHit [out] A buffer in which to return the data structure. + */ + AIAPI AIErr (*GetHitData) ( AIHitRef hit, AIToolHitData *toolHit ); + + /** Reports whether a search found a matching object. + (Note that this function returns a boolean value, not an error code.) + @param hit The hit object. + @return True if the test found a matching object. + */ + AIAPI AIBoolean (*IsHit) ( AIHitRef hit ); + + /** Retrieves the type of object found by a successful hit test. + (Note that this function returns a constant value, not an error code.) + @param hit The hit object. Only valid if \c #IsHit() returns + true for this hit. + @return The \c #AIHitType value for the found object. + */ + AIAPI ai::int32 (*GetType) ( AIHitRef hit ); + + /** Retrieves the sub-type for an object of type \c #kFillHitType that + was found by a successful hit test. Sub-types of the Fill hit type can be + In, Out, Segment, or Center. Otherwise, returns the primary type. + (Note that this function returns a constant value, not an error code.) + @param hit The hit object. Only valid if \c #IsHit() returns true for this hit. + @return The \c #AIHitType value for the sub-type of the found object, + or the primary type if the found object was not of type \c #kFillHitType. + */ + AIAPI ai::int32(*GetSubType) (AIHitRef hit); + + /** Retrieves the leaf object that was found by a successful hit test. + (Note that this function returns an object value, not an error code.) + @param hit The hit object. Only valid if \c #IsHit() returns + true for this hit. + @return The leaf art object that matched the test criteria. + */ + AIAPI AIArtHandle (*GetArt) ( AIHitRef hit ); + + /** Retrieves the group containing the leaf object that was found by a successful hit test. + (Note that this function returns an object value, not an error code.) + @param hit The hit object. Only valid if \c #IsHit() returns + true for this hit. + @return The group containing the leaf art object. + */ + AIAPI AIArtHandle (*GetGroup) ( AIHitRef hit ); + + /** Retrieves the exact location of the hit. + (Note that this function returns a point value, not an error code.) + @param hit The hit object. Only valid if \c #IsHit() returns + true for this hit. + @return The point location. If the hit was on a geometric entity such as a + point or segment of a path, this is the nearest point on that entity to + the input point. + */ + AIAPI AIRealPoint (*GetPoint) ( AIHitRef hit ); + + /** If the hit is on an anchor point or segment of a path, + retrieves the path segment containing the target point. + (Note that this function returns a numeric value, not an error code.) + @param hit The hit object. Only valid if \c #IsHit() returns + true for this hit, and hit type is \c #kPHitType, \c #kInHitType, + \c #kOutHitType, or \c #kSegmentHitType. + @return The path segment number. + */ + AIAPI ai::int16(*GetPathSegment) ( AIHitRef hit ); + + /** If the hit was on a segment of a path, retrieves the parametric value of the + nearest location on the segment to the hit. + (Note that this function returns a numeric value, not an error code.) + @param hit The hit object. Only valid if \c #IsHit() returns + true for this hit, and hit type is \c #kSegmentHitType. + @return The parametric value, a position along the curve where + 0 is the start and 1 is the end. + */ + AIAPI AIReal (*GetPathParameter) ( AIHitRef hit ); + + // New for AI12: + + /** Finds an object at a given point, performing custom hit testing for + plug-in objects, as defined by the plug-in group. + @param art The root object of an art tree, or \c NULL to search the + entire current document. + @param point A pointer to the location of interest, in artwork coordinates. + @param tolerance The size of the window around \c point in which to test. A + number of pixels at the current zoom factor. The default value is 2. + The algorithm is not guaranteed to produce correct results for large values. + @param option The type of search to perform, an \c #AIHitRequest constant. + @param pluginGroup The plug-in group whose members perform custom hit testing + in addition to the regular hit tests specified by \c options, using the + additional data passed in \c extData. + @param extData A pointer to a developer-defined data structure to pass to + the custom test. When there is a hit on a member of the plug-in group, + that object's custom hit test fills this structure and passes it back + in the hit object, in the \c #AIPluginGroupCustomHitTestData::inData field. + @param hit [out] A buffer in which to return the hit object, which includes information + passed in the \c #AIPluginGroupCustomHitTestData::outData field.
This object + is reference counted. The initial count is 1. Use \c #Release() to decrement + the count and free the memory when the count is 0. + @see \c #GetCustomHitData() to retrieve custom hit data returned by the plug-in group.
+ \c #GetHitData() to retrieve other hit data. + */ + AIAPI AIErr (*CustomHitTest) ( AIArtHandle art, const AIRealPoint *point, AIReal tolerance, ai::int32 option, + AIPluginGroupHandle pluginGroup, void* extData, AIHitRef *hit ); + + /** Retrieves the result of custom hit testing performed by a plug-in group. + @param hit The hit object, as returned by \c #CustomHitTest(). + @param userData [out] A buffer in which to return a pointer to the + developer-defined data structure returned by the plug-in group's hit test, + as passed in the \c #AIPluginGroupCustomHitTestData::outData field.
+ This memory is owned by the hit object, and remains valid while the hit object is valid. + Do not delete it explicitly; instead, provide an implementation + of \c #AICustomHitDataDeleteFunc, which is used to delete it when the hit object + is released. + @param pluginObject [out] A buffer in which to return the plug-in group member + object the custom hit testing was performed on. + @see \c #AIPluginGroupSuite + */ + AIAPI AIErr (*GetCustomHitData) ( AIHitRef hit, void** userdata, AIArtHandle *pluginObject ); + + // New for AI15: + + /** Finds the distance from the actual mouse-down point to the closest point on the path. + The result is a signed number; a negative value indicates that the mouse point was + on the left side of the path (in the path direction traveling from start to end), while + a positive value means that the mouse point was on the right side of the path. + + Use with \c #kStrokeHitRequest for help in setting the left or right stroke width. + Valid only if \c #IsHit() returns true for this hit, and the hit type is \c #kPHitType + or \c #kSegmentHitType. + + (Note that this function returns a numeric value, not an error code.) + + @param hit The hit object. + @return The signed distance value, or 0 if the validity conditions + are not met. + */ + AIAPI AIReal (*GetSignedHitDistance) ( AIHitRef hit ); +}; + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIImageOptimization.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIImageOptimization.h index 8ee21ae..23a36a9 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIImageOptimization.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIImageOptimization.h @@ -1,400 +1,400 @@ -#ifndef __AIImageOptimization__ -#define __AIImageOptimization__ - -/* - * Name: AIImageOptimization.h - * Purpose: Adobe Illustrator Image Optimization Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************** - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIDataFilter__ -#include "AIDataFilter.h" -#endif - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#include "AIRasterize.h" - -#include "AIHeaderBegin.h" - -/** @file AIImageOptimization.h */ - -/******************************************************************************** - ** - ** Constants - ** - **/ - -#define kAIImageOptSuite "AI Image Optimization Suite" -#define kAIImageOptSuiteVersion7 AIAPI_VERSION(7) -#define kAIImageOptSuiteVersion kAIImageOptSuiteVersion7 -#define kAIImageOptVersion kAIImageOptSuiteVersion - -/** @ingroup Errors -Generic error for image optimization. See \c #AIImageOptSuite. */ -#define kAIImageOptErr 'IMer' - -/******************************************************************************** - ** - ** Types - ** - **/ - -/** GIF parameters for image optimization. See \c #AIImageOptSuite. */ -struct AIImageOptGIFParams{ - /** When true, the input image is interlaced. */ - AIBool8 interlaced; - /** When true, the input image can use transparency. */ - AIBool8 transparencyAvailable; - /** The number of colors in the input image, in the range [2..255]. */ - ai::int32 numberOfColors; - /** The transparency index of the input image, in the range [0..numberOfColors-1]. */ - ai::int32 transparentIndex; - /** Degree of lossiness for conversion, in the range [0..100]. */ - ai::int32 loss; - - /** The image resolution, in pixels per inch, of the input image. */ - AIFloat resolution; - /** When true, include an alpha channel in the output image. */ - AIBool8 outAlpha; - /** The width in pixels of the output image. */ - ai::int32 outWidth; - /** The height in pixels of the output image. */ - ai::int32 outHeight; -}; - -/** JPEG types for image optimization. See \c #AIImageOptSuite. */ -enum AIImageOptJPEGKind { - /** Standard JPEG */ - AIImageOptJPEGStandard, - /** Optimized JPEG */ - AIImageOptJPEGOptimized, - /** Progressive JPEG */ - AIImageOptJPEGProgressive -}; - -/** JPEG parameters for image optimization. See \c #AIImageOptSuite. */ -struct AIImageOptJPEGParams{ - /** Degree of quality, in the range [0..100]. */ - ai::int32 quality; - /** The type of JPEG to create. */ - AIImageOptJPEGKind kind; - /** The number of scans to use. A number greater than one implies - a progressive JPEG. Values are defined by the progressive JPEG specification.*/ - ai::int32 scans; - /** The degree of blur, in the range [0..2]. */ - AIFloat blurAmount; - - /** The image resolution, in pixels per inch, of the input image. */ - AIFloat resolution; - /** When true, include an alpha channel in the output image. */ - AIBool8 outAlpha; - /** The width in pixels of the output image. */ - ai::int32 outWidth; - /** The height in pixels of the output image. */ - ai::int32 outHeight; -}; - -/** PNG parameters for image optimization. See \c #AIImageOptSuite and -additional parameters in \c #AIImageOptPNGParams2. */ -struct AIImageOptPNGParams { - /** When true, the input image is interlaced. */ - AIBool8 interlaced; - /** The number of colors in the input image, in the range [2..255]. */ - ai::int32 numberOfColors; - /** The transparency index of the input image, in the range [0..numberOfColors-1]. */ - ai::int32 transparentIndex; - - /** The image resolution, in pixels per inch, of the input image. */ - AIFloat resolution; - /** When true, include an alpha channel in the output image. */ - AIBool8 outAlpha; - /** The width in pixels of the output image. */ - ai::int32 outWidth; - /** The height in pixels of the output image. */ - ai::int32 outHeight; -}; - -/** Preferred type of optimization of ZLIB rasterization. See \c #AIImageOptSuite. */ -enum AIImageOptZLIBLevel { - /** Use the default. */ - AIImageOptZLIBDefault = -1, - /** Do not optimize. */ - AIImageOptZLIBNone = 0, - /** Optimize for speed. */ - AIImageOptZLIBFast = 1, - /** Optimize for size. */ - AIImageOptZLIBSmall = 9 -}; - -/** ZLIB parameters for image optimization. See \c #AIImageOptSuite. */ -struct AIImageOptZLIBParams{ - /** Optimization level (no optimization, or optimize for speed or size). */ - AIImageOptZLIBLevel level; - /** The image resolution, in pixels per inch, of the input image. */ - AIFloat resolution; - /** When true, include an alpha channel in the output image. */ - AIBool8 outAlpha; - /** The width in pixels of the output image. */ - ai::int32 outWidth; - /** The height in pixels of the output image. */ - ai::int32 outHeight; -}; - -/* - * AIImageOptSuiteVersion2 Types - */ - -/** Additional PNG parametersfor image optimization. See \c #AIImageOptSuite and -additional parameters in \c #AIImageOptPNGParams. */ -struct AIImageOptPNGParams2 { - /** Version 1 parameters */ - AIImageOptPNGParams versionOneSuiteParams; - /** When 0, do no antialiasing. - When 1, ignore text antialias settings - When 2, optimize for text antialiasing when rasterizing. - */ - ASInt32 antialias; - /** A cropping box for the art. If empty or degenerate, do not crop. */ - AIRealRect cropBox; - /** When true, rasterize against a transparent background, - applying no matte color. */ - AIBool8 backgroundIsTransparent; - /** When background is not transparent, rasterize against this - matte color. */ - AIRGBColor matteColor; - -#ifdef __cplusplus - /** Constructor for \c #AIImageOptPNGParams2. */ - AIImageOptPNGParams2() - : - versionOneSuiteParams(), - antialias(0), // no text antialiasing - cropBox(), - backgroundIsTransparent(true), // no matte color applied - matteColor() - { - cropBox.top = 0.0; cropBox.left = 0.0; cropBox.bottom = 0.0; cropBox.right = 0.0; - matteColor.red = 0; matteColor.green = 0; matteColor.blue = 0; - }; -#endif -}; - - - - -/* Version 3 additions */ - - -/** Opaque reference to a color palette object. Access with \c #AIImageOptSuite. */ -typedef struct _t_AIColorPalette *AIColorPaletteHandle; - -/** Opaque reference to an inverse color palette object. Access with \c #AIImageOptSuite. */ -typedef struct _t_AIInverseColorPalette *AIInverseColorPaletteHandle; - - -/** Palette construction type options, an \c #AIPaletteTypeValue.*/ -typedef short AIPaletteType; -/** \c #AIPaletteType options.*/ -enum AIPaletteTypeValue -{ - /** Generate palette automatically, based on the input image. */ - kAIAutomaticPalette, - - /** Create a custom palette, based on predefined palette. */ - kAICustomPalette -}; - - -/** Construction options for the palette used - in color reduction (posterization) of an image. - See \c #AIImageOptSuite - */ -typedef struct AIPaletteOptions -{ - /** Palette type, automatic or custom. */ - AIPaletteType paletteType; - - /** The number of colors to use for automatic palette construction. - (For a custom palette, use \c #AIImageOptSuite::SetPaletteColor() - to set the color count.) */ - ai::int32 colorCount; - -} AIPaletteOptions; - - -/** Defines a palette color. See \c #AIImageOptSuite */ -struct AIPaletteColor -{ - /** Alpha channel value, in the range [0..255]. */ - unsigned char alpha; - /** Red value, in the range [0..255]. */ - unsigned char r; - /** Green value, in the range [0..255]. */ - unsigned char g; - /** Blue value, in the range [0..255]. */ - unsigned char b; -}; - -/******************************************************************************** - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These functions allow you to rasterize an art object and - stream the resulting raster to a data filter in various image formats. - @see \c #AIDataFilterSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIImageOptSuite and \c #kAIImageOptVersion. - */ -typedef struct { - - // AIImageOptSuiteVersion1 functions - /** Rasterize art to GIF format. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - */ - AIAPI AIErr (*AsGIF)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptGIFParams& params); - - /** Rasterize art to JPEG format. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - */ - AIAPI AIErr (*AsJPEG)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptJPEGParams& params); - - /** Rasterize art to PNG24 format. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - */ - AIAPI AIErr (*AsPNG)( // as PNG24 - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptPNGParams& params); - - /** Rasterize art to ZLIB format. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - */ - AIAPI AIErr (*AsZLIB)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptZLIBParams& params); - - // AIImageOptSuiteVersion2 functions - - /** Rasterize art to PNG24 format. This differs from \c #AsPNG() in that it - takes additional parameters and allows you to show a progress bar - for a lengthy operation. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - @param progressProc The procedure to call periodically during a lengthy operation, - to provide the current progress status and allow the user to cancel. - */ - AIAPI AIErr (*MakePNG24)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptPNGParams2& params, - AIRasterizeProgressProc progressProc); - - - // AIImageOptSuiteVersion3 functions - - /** Creates a color palette for art. - @param raster The art object. - @param options The type of palette to create, automatic or custom. - @param palette [out] A buffer in which to return the palette object. - */ - AIAPI AIErr (*CreatePalette) (AIArtHandle raster, const AIPaletteOptions *options, AIColorPaletteHandle *palette); - - /** Frees the memory associated with a palette object when it is no longer - needed. - @param palette The palette object. Upon return, this reference is - no longer valid. - */ - AIAPI AIErr (*DisposePalette) (AIColorPaletteHandle palette); - - /** Retrieves a color from a color palette. - @param palette The palette object. - @param index The position index of the color. - @param color [out] A buffer in which to return the color object. - */ - AIAPI AIErr (*GetPaletteColor) (AIColorPaletteHandle palette, ai::int32 index, AIPaletteColor *color); - - /** Sets a color in a color palette. - @param palette The palette object. - @param index The position index of the color. - @param color The color object. - */ - AIAPI AIErr (*SetPaletteColor) (AIColorPaletteHandle palette, ai::int32 index, AIPaletteColor *color); - - /** Creates an inverse color palette. - @param palette The palette object. - @param inverse [out] A buffer in which to return the inverse palette object. - */ - AIAPI AIErr (*CreateInversePalette) (AIColorPaletteHandle palette, AIInverseColorPaletteHandle *inverse); - - /** Frees the memory associated with an inverse palette object when it is - no longer needed. - @param inverse The inverse palette object. Upon return, this reference is - no longer valid. - */ - AIAPI AIErr (*DisposeInversePalette) (AIInverseColorPaletteHandle inverse); - - /** Retrieves the closest match to a color from an inverse color palette. - @param palette The inverse palette object. - @param color A pointer to the color object to match. - @param index [out] A buffer in which to return the 0-based position - index of the closest matching color. - */ - AIAPI AIErr (*GetPaletteIndex) (AIInverseColorPaletteHandle inverse, const AIPaletteColor *color, ai::int32 *index); - - /** Creates a color palette by posterizing the colors in a list. - @param colorList The list of colors to be posterized, an array of color objects. - @param colorListCount The number of color objects in the list. - @param reduceColorCount The maximum number of colors the resulting palette should contain. - @param palette [out] A buffer in which to return the palette object. - */ - AIAPI AIErr (*CreateReducedPalette) ( AIPaletteColor *colorList, int colorListCount, int reduceColorCount, AIColorPaletteHandle *palette ); -} -AIImageOptSuite; - - -#include "AIHeaderEnd.h" - -#endif // __AIImageOptimization__ +#ifndef __AIImageOptimization__ +#define __AIImageOptimization__ + +/* + * Name: AIImageOptimization.h + * Purpose: Adobe Illustrator Image Optimization Suite + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/******************************************************************************** + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIDataFilter__ +#include "AIDataFilter.h" +#endif + +#ifndef __ASTypes__ +#include "ASTypes.h" +#endif + +#include "AIRasterize.h" + +#include "AIHeaderBegin.h" + +/** @file AIImageOptimization.h */ + +/******************************************************************************** + ** + ** Constants + ** + **/ + +#define kAIImageOptSuite "AI Image Optimization Suite" +#define kAIImageOptSuiteVersion7 AIAPI_VERSION(7) +#define kAIImageOptSuiteVersion kAIImageOptSuiteVersion7 +#define kAIImageOptVersion kAIImageOptSuiteVersion + +/** @ingroup Errors +Generic error for image optimization. See \c #AIImageOptSuite. */ +#define kAIImageOptErr 'IMer' + +/******************************************************************************** + ** + ** Types + ** + **/ + +/** GIF parameters for image optimization. See \c #AIImageOptSuite. */ +struct AIImageOptGIFParams{ + /** When true, the input image is interlaced. */ + AIBool8 interlaced; + /** When true, the input image can use transparency. */ + AIBool8 transparencyAvailable; + /** The number of colors in the input image, in the range [2..255]. */ + ai::int32 numberOfColors; + /** The transparency index of the input image, in the range [0..numberOfColors-1]. */ + ai::int32 transparentIndex; + /** Degree of lossiness for conversion, in the range [0..100]. */ + ai::int32 loss; + + /** The image resolution, in pixels per inch, of the input image. */ + AIFloat resolution; + /** When true, include an alpha channel in the output image. */ + AIBool8 outAlpha; + /** The width in pixels of the output image. */ + ai::int32 outWidth; + /** The height in pixels of the output image. */ + ai::int32 outHeight; +}; + +/** JPEG types for image optimization. See \c #AIImageOptSuite. */ +enum AIImageOptJPEGKind { + /** Standard JPEG */ + AIImageOptJPEGStandard, + /** Optimized JPEG */ + AIImageOptJPEGOptimized, + /** Progressive JPEG */ + AIImageOptJPEGProgressive +}; + +/** JPEG parameters for image optimization. See \c #AIImageOptSuite. */ +struct AIImageOptJPEGParams{ + /** Degree of quality, in the range [0..100]. */ + ai::int32 quality; + /** The type of JPEG to create. */ + AIImageOptJPEGKind kind; + /** The number of scans to use. A number greater than one implies + a progressive JPEG. Values are defined by the progressive JPEG specification.*/ + ai::int32 scans; + /** The degree of blur, in the range [0..2]. */ + AIFloat blurAmount; + + /** The image resolution, in pixels per inch, of the input image. */ + AIFloat resolution; + /** When true, include an alpha channel in the output image. */ + AIBool8 outAlpha; + /** The width in pixels of the output image. */ + ai::int32 outWidth; + /** The height in pixels of the output image. */ + ai::int32 outHeight; +}; + +/** PNG parameters for image optimization. See \c #AIImageOptSuite and +additional parameters in \c #AIImageOptPNGParams2. */ +struct AIImageOptPNGParams { + /** When true, the input image is interlaced. */ + AIBool8 interlaced; + /** The number of colors in the input image, in the range [2..255]. */ + ai::int32 numberOfColors; + /** The transparency index of the input image, in the range [0..numberOfColors-1]. */ + ai::int32 transparentIndex; + + /** The image resolution, in pixels per inch, of the input image. */ + AIFloat resolution; + /** When true, include an alpha channel in the output image. */ + AIBool8 outAlpha; + /** The width in pixels of the output image. */ + ai::int32 outWidth; + /** The height in pixels of the output image. */ + ai::int32 outHeight; +}; + +/** Preferred type of optimization of ZLIB rasterization. See \c #AIImageOptSuite. */ +enum AIImageOptZLIBLevel { + /** Use the default. */ + AIImageOptZLIBDefault = -1, + /** Do not optimize. */ + AIImageOptZLIBNone = 0, + /** Optimize for speed. */ + AIImageOptZLIBFast = 1, + /** Optimize for size. */ + AIImageOptZLIBSmall = 9 +}; + +/** ZLIB parameters for image optimization. See \c #AIImageOptSuite. */ +struct AIImageOptZLIBParams{ + /** Optimization level (no optimization, or optimize for speed or size). */ + AIImageOptZLIBLevel level; + /** The image resolution, in pixels per inch, of the input image. */ + AIFloat resolution; + /** When true, include an alpha channel in the output image. */ + AIBool8 outAlpha; + /** The width in pixels of the output image. */ + ai::int32 outWidth; + /** The height in pixels of the output image. */ + ai::int32 outHeight; +}; + +/* + * AIImageOptSuiteVersion2 Types + */ + +/** Additional PNG parametersfor image optimization. See \c #AIImageOptSuite and +additional parameters in \c #AIImageOptPNGParams. */ +struct AIImageOptPNGParams2 { + /** Version 1 parameters */ + AIImageOptPNGParams versionOneSuiteParams; + /** When 0, do no antialiasing. + When 1, ignore text antialias settings + When 2, optimize for text antialiasing when rasterizing. + */ + ASInt32 antialias; + /** A cropping box for the art. If empty or degenerate, do not crop. */ + AIRealRect cropBox; + /** When true, rasterize against a transparent background, + applying no matte color. */ + AIBool8 backgroundIsTransparent; + /** When background is not transparent, rasterize against this + matte color. */ + AIRGBColor matteColor; + +#ifdef __cplusplus + /** Constructor for \c #AIImageOptPNGParams2. */ + AIImageOptPNGParams2() + : + versionOneSuiteParams(), + antialias(0), // no text antialiasing + cropBox(), + backgroundIsTransparent(true), // no matte color applied + matteColor() + { + cropBox.top = 0.0; cropBox.left = 0.0; cropBox.bottom = 0.0; cropBox.right = 0.0; + matteColor.red = 0; matteColor.green = 0; matteColor.blue = 0; + }; +#endif +}; + + + + +/* Version 3 additions */ + + +/** Opaque reference to a color palette object. Access with \c #AIImageOptSuite. */ +typedef struct _t_AIColorPalette *AIColorPaletteHandle; + +/** Opaque reference to an inverse color palette object. Access with \c #AIImageOptSuite. */ +typedef struct _t_AIInverseColorPalette *AIInverseColorPaletteHandle; + + +/** Palette construction type options, an \c #AIPaletteTypeValue.*/ +typedef short AIPaletteType; +/** \c #AIPaletteType options.*/ +enum AIPaletteTypeValue +{ + /** Generate palette automatically, based on the input image. */ + kAIAutomaticPalette, + + /** Create a custom palette, based on predefined palette. */ + kAICustomPalette +}; + + +/** Construction options for the palette used + in color reduction (posterization) of an image. + See \c #AIImageOptSuite + */ +typedef struct AIPaletteOptions +{ + /** Palette type, automatic or custom. */ + AIPaletteType paletteType; + + /** The number of colors to use for automatic palette construction. + (For a custom palette, use \c #AIImageOptSuite::SetPaletteColor() + to set the color count.) */ + ai::int32 colorCount; + +} AIPaletteOptions; + + +/** Defines a palette color. See \c #AIImageOptSuite */ +struct AIPaletteColor +{ + /** Alpha channel value, in the range [0..255]. */ + unsigned char alpha; + /** Red value, in the range [0..255]. */ + unsigned char r; + /** Green value, in the range [0..255]. */ + unsigned char g; + /** Blue value, in the range [0..255]. */ + unsigned char b; +}; + +/******************************************************************************** + ** + ** Suite + ** + **/ + +/** @ingroup Suites + These functions allow you to rasterize an art object and + stream the resulting raster to a data filter in various image formats. + @see \c #AIDataFilterSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIImageOptSuite and \c #kAIImageOptVersion. + */ +typedef struct { + + // AIImageOptSuiteVersion1 functions + /** Rasterize art to GIF format. + @param aiArt The art object or art tree root. + @param aiDataFilter The data filter to which to send the resulting raster data. + @param params How to perform the rasterization. + */ + AIAPI AIErr (*AsGIF)( + AIArtHandle aiArt, + AIDataFilter* aiDataFilter, + AIImageOptGIFParams& params); + + /** Rasterize art to JPEG format. + @param aiArt The art object or art tree root. + @param aiDataFilter The data filter to which to send the resulting raster data. + @param params How to perform the rasterization. + */ + AIAPI AIErr (*AsJPEG)( + AIArtHandle aiArt, + AIDataFilter* aiDataFilter, + AIImageOptJPEGParams& params); + + /** Rasterize art to PNG24 format. + @param aiArt The art object or art tree root. + @param aiDataFilter The data filter to which to send the resulting raster data. + @param params How to perform the rasterization. + */ + AIAPI AIErr (*AsPNG)( // as PNG24 + AIArtHandle aiArt, + AIDataFilter* aiDataFilter, + AIImageOptPNGParams& params); + + /** Rasterize art to ZLIB format. + @param aiArt The art object or art tree root. + @param aiDataFilter The data filter to which to send the resulting raster data. + @param params How to perform the rasterization. + */ + AIAPI AIErr (*AsZLIB)( + AIArtHandle aiArt, + AIDataFilter* aiDataFilter, + AIImageOptZLIBParams& params); + + // AIImageOptSuiteVersion2 functions + + /** Rasterize art to PNG24 format. This differs from \c #AsPNG() in that it + takes additional parameters and allows you to show a progress bar + for a lengthy operation. + @param aiArt The art object or art tree root. + @param aiDataFilter The data filter to which to send the resulting raster data. + @param params How to perform the rasterization. + @param progressProc The procedure to call periodically during a lengthy operation, + to provide the current progress status and allow the user to cancel. + */ + AIAPI AIErr (*MakePNG24)( + AIArtHandle aiArt, + AIDataFilter* aiDataFilter, + AIImageOptPNGParams2& params, + AIRasterizeProgressProc progressProc); + + + // AIImageOptSuiteVersion3 functions + + /** Creates a color palette for art. + @param raster The art object. + @param options The type of palette to create, automatic or custom. + @param palette [out] A buffer in which to return the palette object. + */ + AIAPI AIErr (*CreatePalette) (AIArtHandle raster, const AIPaletteOptions *options, AIColorPaletteHandle *palette); + + /** Frees the memory associated with a palette object when it is no longer + needed. + @param palette The palette object. Upon return, this reference is + no longer valid. + */ + AIAPI AIErr (*DisposePalette) (AIColorPaletteHandle palette); + + /** Retrieves a color from a color palette. + @param palette The palette object. + @param index The position index of the color. + @param color [out] A buffer in which to return the color object. + */ + AIAPI AIErr (*GetPaletteColor) (AIColorPaletteHandle palette, ai::int32 index, AIPaletteColor *color); + + /** Sets a color in a color palette. + @param palette The palette object. + @param index The position index of the color. + @param color The color object. + */ + AIAPI AIErr (*SetPaletteColor) (AIColorPaletteHandle palette, ai::int32 index, AIPaletteColor *color); + + /** Creates an inverse color palette. + @param palette The palette object. + @param inverse [out] A buffer in which to return the inverse palette object. + */ + AIAPI AIErr (*CreateInversePalette) (AIColorPaletteHandle palette, AIInverseColorPaletteHandle *inverse); + + /** Frees the memory associated with an inverse palette object when it is + no longer needed. + @param inverse The inverse palette object. Upon return, this reference is + no longer valid. + */ + AIAPI AIErr (*DisposeInversePalette) (AIInverseColorPaletteHandle inverse); + + /** Retrieves the closest match to a color from an inverse color palette. + @param palette The inverse palette object. + @param color A pointer to the color object to match. + @param index [out] A buffer in which to return the 0-based position + index of the closest matching color. + */ + AIAPI AIErr (*GetPaletteIndex) (AIInverseColorPaletteHandle inverse, const AIPaletteColor *color, ai::int32 *index); + + /** Creates a color palette by posterizing the colors in a list. + @param colorList The list of colors to be posterized, an array of color objects. + @param colorListCount The number of color objects in the list. + @param reduceColorCount The maximum number of colors the resulting palette should contain. + @param palette [out] A buffer in which to return the palette object. + */ + AIAPI AIErr (*CreateReducedPalette) ( AIPaletteColor *colorList, int colorListCount, int reduceColorCount, AIColorPaletteHandle *palette ); +} +AIImageOptSuite; + + +#include "AIHeaderEnd.h" + +#endif // __AIImageOptimization__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIIsolationMode.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIIsolationMode.h index 8c84cd0..f386c20 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIIsolationMode.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIIsolationMode.h @@ -1,263 +1,269 @@ -#ifndef __AIIsolationMode__ -#define __AIIsolationMode__ - -/* - * Name: AIIsolationMode.h - * Author: - * Date: - * Purpose: Adobe Illustrator Isolation Mode Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2006-2016 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIMdMemory__ -#include "AIMdMemory.h" -#endif - -#ifndef _IAIAUTOBUFFER_H_ -#include "IAIAutoBuffer.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIIsolationMode.h */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAIIsolationModeSuite "AI Isolation Mode" -#define kAIIsolationModeSuiteVersion5 AIAPI_VERSION(5) -#define kAIIsolationModeSuiteVersion kAIIsolationModeSuiteVersion5 -#define kAIIsolationModeVersion kAIIsolationModeSuiteVersion - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** @ingroup Errors - The requested isolation mode cannot be entered because the document is already in a mode that does not allow it. - E.g., editing a symbol instance while in Pattern Editing Mode, or isolating anything while in Opacity Mask mode. */ -#define kCantIsolateFromCurrentModeErr '!Iso' - -/** @ingroup Notifiers - (Internal, do not use) Sent after isolation-mode focus changes from one art object to another. - See \c #AIIsolationModeSuite - Not sent when changes are a result of Undo or Redo actions. - */ -#define kAIIsolationModeChangedNotifier "AI Isolation Mode Changed Notifier" - -/** @ingroup Notifiers - (Internal, do not use) Sent just before isolation-mode focus changes from one art object to another. - See \c #AIIsolationModeSuite - Not sent when changes are a result of Undo or Redo actions. - */ -#define kAIBeforeIsolationModeChangedNotifier "AI Before Isolation Mode Changed Notifier" - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/** (Internal, do not use) Data sent with \c #kAIIsolationModeChangedNotifier. */ -typedef struct { - /** True if notification was caused by entering isolation mode. False if it was caused by - exiting isolation mode. */ - AIBoolean inIsolationMode; - /** The isolated art object. */ - AIArtHandle isolatedArt; - /** The parent of the isolated art. */ - AIArtHandle isolatedArtParent; - /** True if Symbol or Pattern editing mode was exited via a Cancel operation. */ - AIBoolean canceled; -} AIIsolationModeChangedNotifierData; - - - -/** The kind of art that is isolated. Type constants returned from -\c #AIIsolationModeSuite::GetIsolationModeType() -*/ -enum AIIsolationModeType -{ - /** One leaf artwork (not a container) is isolated. */ - kAIIMLeafArt = 1, - - /** One group or plugin group is isolated. - Also used for Pattern editing mode, since the pattern editor is a plugin group. - Use \c #AIPatternSuite::GetPatternEditMode() to detect the latter condition. */ - kAIIMGroup, - - /** One or more clipping paths (masking object) are isolated. */ - kAIIMClippingObjects, - - /** One compound path is isolated. */ - kAIIMCompoundPath, - - /** One top-level layer is isolated. */ - kAIIMTopLevelLayer, - - /** One sublayer is isolated. */ - kAIIMSubLayer, - - /** Symbol editing mode is active. */ - kAIIMSymbol, - - /** Sibling artworks are present in isolation mode (i.e. "Isolation Mode" layer has more than one children.) */ - kAIIMObjects, - - /** Art is in isolation mode, but all the isolated artworks are deleted. */ - kAIIMNoObject, - - /** Art is not in isolation mode. */ - kAIIMNone -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that handle isolation mode, in which an artwork selection - is moved onto a special isolation layer for editing, and that isolation layer (and any - contents) becomes the only layer displayed in the Layers panel or accessible to edits. - See \c #AILayerListSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIIsolationModeSuite and \c #kAIIsolationModeVersion. -*/ -typedef struct { - - /** Enters isolation mode for a specific group or plug-in group. This art becomes - the isolated art, replacing any art that was previously isolated. In this mode, - the user can edit only the isolated art. - - While the art is isolated, \c #AIArtSuite::GetArtParent() returns the layer group - of the temporary isolation layer; use \c #GetIsolatedArtAndParents() instead to - retrieve the pre-isolation parent. - @param art The group or plug-in group art object. Can be in the main art tree - or in an isolated art tree. Cannot be art inside a dictionary or plug-in group. - @param invisibleFlag When true, artwork that is not isolated is made invisible. - When false, non-isolated artwork is dimmed. - */ - AIAPI AIErr (*EnterIsolationMode)(AIArtHandle art, AIBoolean invisibleFlag); - - /** Exits isolation mode and returns to normal editing mode. Any art on the isolation - layer is reordered to where the art object passed to \c #EnterIsolationMode() was - originally located in the art tree. (It is therefore valid to delete the - isolated art or add additional objects before exiting isolation mode.) After - restoring the parent chain, a \c #kAIIsolationModeChangedNotifier is sent with - canceled as false. - See also \c #CancelIsolationMode(). - */ - AIAPI AIErr (*ExitIsolationMode)(void); - - /** Retrieves the original parent and ancestors of an isolated artwork tree; that is, - the pre-isolation parent of a group, plugin-group or other art that has been passed - to \c #EnterIsolationMode(). - (Note that this function does not return an error code.) - @param isolatedArtParent [out] A buffer in which to return the parent - art object of the isolated art tree. - @param parentChain [out] Optional. A buffer in which to return an array of - 0 or more art objects (\c #AIArtHandle) for the ancestors of the - parent art object. - */ - AIAPI void (*GetIsolatedArtAndParents)(AIArtHandle *isolatedArtParent, ai::AutoBuffer *parentChain); - - /** Reports whether isolation mode is in effect. - (Note that this function returns a boolean value, not an error code.) - @return True if isolation mode is on, false if it is off. - */ - AIAPI ASBoolean (*IsInIsolationMode)(void); - - /** Reports whether artwork is in the isolated layer. - (Note that this function returns a boolean value, not an error code.) - @param art The parent art object of the art tree. - @return True if the artwork is in the isolated layer, false otherwise. - */ - AIAPI ASBoolean (*IsIsolatedLayer)(AIArtHandle art); - - /** Reports whether artwork is in a non-isolated layer. Non-isolated art layers - hold the artwork that is not being edited in isolation mode. Non-isolated artwork - can be shown in a 50% opacity state in isolation mode, or can be hidden entirely - when in symbol editing mode or pattern editing mode. The Layers panel uses this - function to exclude non-isolated layers from the panel list. - (Note that this function returns a boolean value, not an error code.) - @param art The parent art object of the art tree. - @return True if the artwork is in a non-isolated layer, false otherwise. - */ - AIAPI ASBoolean (*IsNonIsolatedLayer)(AIArtHandle art); - - /** Reports whether an art tree is a legal target for isolation mode. - Art that cannot be isolated includes, for example, art that is inside a - plug-in group or dictionary, text art or guides, art that is locked or hidden, - template layers, and the temporary isolation layer of an object already in - isolation mode. If art is null, returns whether it is legal to enter isolation - mode in general. (Under some conditions it is invalid to enter isolation mode - on anything, such as when already in mask editing mode.) - @param art The parent art object of the art tree, or null. - @return True if the artwork can be isolated or if it is - already isolated, false otherwise. - */ - AIAPI ASBoolean (*CanIsolateArt)(AIArtHandle art); - - /** Reports the type art in Isolation Mode. - @return The type of isolation Mode, an \c #AIIsolationModeType constant - */ - AIAPI AIIsolationModeType (*GetIsolationModeType)(); - - /** Identical to \c #ExitIsolationMode(), except that after restoring the parent chain, - a \c #kAIIsolationModeChangedNotifier message is sent with canceled as true. - For normal isolation mode, there is no difference in behavior, since even - when canceled, any changes made in isolation mode are not rolled back. - For Symbol editing mode and Pattern editing mode, the symbol or pattern is - ordinarily redefined during handling of the \c #kAIIsolationModeChangedNotifier. - Canceling causes the redefinition not to occur. - */ - AIAPI AIErr (*CancelIsolationMode)(void); - - /** Sets the opacity value applied to the non-isolated art layers. - @param inNewOpacity The new opacity value, in the range [0..1] where 0 is - completely transparent and 1 is completely opaque. - */ - AIAPI AIErr (*SetNonIsolatedArtLayerOpacity)(const AIReal inNewOpacity); - - /** Gets the current opacity value applied to the non-isolated art layers. - Note that this function returns a numeric opacity value, not an error code. - @return The new opacity value, in the range [0..1] where 0 is completely - transparent and 1 is completely opaque. - */ - AIAPI AIReal (*GetNonIsolatedArtLayerOpacity)(); - -} AIIsolationModeSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIIsolationMode__ +#define __AIIsolationMode__ + +/* + * Name: AIIsolationMode.h + * Author: + * Date: + * Purpose: Adobe Illustrator Isolation Mode Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2006-2016 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIMdMemory__ +#include "AIMdMemory.h" +#endif + +#ifndef _IAIAUTOBUFFER_H_ +#include "IAIAutoBuffer.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIIsolationMode.h */ + +/******************************************************************************* + ** + ** Suite name and version + ** + **/ + +#define kAIIsolationModeSuite "AI Isolation Mode" +#define kAIIsolationModeSuiteVersion6 AIAPI_VERSION(6) +#define kAIIsolationModeSuiteVersion kAIIsolationModeSuiteVersion6 +#define kAIIsolationModeVersion kAIIsolationModeSuiteVersion + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** @ingroup Errors + The requested isolation mode cannot be entered because the document is already in a mode that does not allow it. + E.g., editing a symbol instance while in Pattern Editing Mode, or isolating anything while in Opacity Mask mode. */ +#define kCantIsolateFromCurrentModeErr '!Iso' + +/** @ingroup Notifiers + (Internal, do not use) Sent after isolation-mode focus changes from one art object to another. + See \c #AIIsolationModeSuite + Not sent when changes are a result of Undo or Redo actions. + */ +#define kAIIsolationModeChangedNotifier "AI Isolation Mode Changed Notifier" + +/** @ingroup Notifiers + (Internal, do not use) Sent just before isolation-mode focus changes from one art object to another. + See \c #AIIsolationModeSuite + Not sent when changes are a result of Undo or Redo actions. + */ +#define kAIBeforeIsolationModeChangedNotifier "AI Before Isolation Mode Changed Notifier" + + +/******************************************************************************* + ** + ** Types + ** + **/ + + +/** (Internal, do not use) Data sent with \c #kAIIsolationModeChangedNotifier. */ +typedef struct { + /** True if notification was caused by entering isolation mode. False if it was caused by + exiting isolation mode. */ + AIBoolean inIsolationMode; + /** The isolated art object. */ + AIArtHandle isolatedArt; + /** The parent of the isolated art. */ + AIArtHandle isolatedArtParent; + /** True if Symbol or Pattern editing mode was exited via a Cancel operation. */ + AIBoolean canceled; +} AIIsolationModeChangedNotifierData; + + + +/** The kind of art that is isolated. Type constants returned from +\c #AIIsolationModeSuite::GetIsolationModeType() +*/ +enum AIIsolationModeType +{ + /** One leaf artwork (not a container) is isolated. */ + kAIIMLeafArt = 1, + + /** One group or plugin group is isolated. + Also used for Pattern editing mode, since the pattern editor is a plugin group. + Use \c #AIPatternSuite::GetPatternEditMode() to detect the latter condition. */ + kAIIMGroup, + + /** One or more clipping paths (masking object) are isolated. */ + kAIIMClippingObjects, + + /** One compound path is isolated. */ + kAIIMCompoundPath, + + /** One top-level layer is isolated. */ + kAIIMTopLevelLayer, + + /** One sublayer is isolated. */ + kAIIMSubLayer, + + /** Symbol editing mode is active. */ + kAIIMSymbol, + + /** Sibling artworks are present in isolation mode (i.e. "Isolation Mode" layer has more than one children.) */ + kAIIMObjects, + + /** Art is in isolation mode, but all the isolated artworks are deleted. */ + kAIIMNoObject, + + /** Art is not in isolation mode. */ + kAIIMNone +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that handle isolation mode, in which an artwork selection + is moved onto a special isolation layer for editing, and that isolation layer (and any + contents) becomes the only layer displayed in the Layers panel or accessible to edits. + See \c #AILayerListSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIIsolationModeSuite and \c #kAIIsolationModeVersion. +*/ +typedef struct { + + /** Enters isolation mode for a specific group or plug-in group. This art becomes + the isolated art, replacing any art that was previously isolated. In this mode, + the user can edit only the isolated art. + + While the art is isolated, \c #AIArtSuite::GetArtParent() returns the layer group + of the temporary isolation layer; use \c #GetIsolatedArtAndParents() instead to + retrieve the pre-isolation parent. + @param art The group or plug-in group art object. Can be in the main art tree + or in an isolated art tree. Cannot be art inside a dictionary or plug-in group. + @param invisibleFlag When true, artwork that is not isolated is made invisible. + When false, non-isolated artwork is dimmed. + */ + AIAPI AIErr (*EnterIsolationMode)(AIArtHandle art, AIBoolean invisibleFlag); + + /** Exits isolation mode and returns to normal editing mode. Any art on the isolation + layer is reordered to where the art object passed to \c #EnterIsolationMode() was + originally located in the art tree. (It is therefore valid to delete the + isolated art or add additional objects before exiting isolation mode.) After + restoring the parent chain, a \c #kAIIsolationModeChangedNotifier is sent with + canceled as false. + See also \c #CancelIsolationMode(). + */ + AIAPI AIErr (*ExitIsolationMode)(void); + + /** Retrieves the original parent and ancestors of an isolated artwork tree; that is, + the pre-isolation parent of a group, plugin-group or other art that has been passed + to \c #EnterIsolationMode(). + (Note that this function does not return an error code.) + @param isolatedArtParent [out] A buffer in which to return the parent + art object of the isolated art tree. + @param parentChain [out] Optional. A buffer in which to return an array of + 0 or more art objects (\c #AIArtHandle) for the ancestors of the + parent art object. + */ + AIAPI void (*GetIsolatedArtAndParents)(AIArtHandle *isolatedArtParent, ai::AutoBuffer *parentChain); + + /** Reports whether isolation mode is in effect. + (Note that this function returns a boolean value, not an error code.) + @return True if isolation mode is on, false if it is off. + */ + AIAPI ASBoolean (*IsInIsolationMode)(void); + + /** Reports whether artwork is in the isolated layer. + (Note that this function returns a boolean value, not an error code.) + @param art The parent art object of the art tree. + @return True if the artwork is in the isolated layer, false otherwise. + */ + AIAPI ASBoolean (*IsIsolatedLayer)(AIArtHandle art); + + /** Reports whether artwork is in a non-isolated layer. Non-isolated art layers + hold the artwork that is not being edited in isolation mode. Non-isolated artwork + can be shown in a 50% opacity state in isolation mode, or can be hidden entirely + when in symbol editing mode or pattern editing mode. The Layers panel uses this + function to exclude non-isolated layers from the panel list. + (Note that this function returns a boolean value, not an error code.) + @param art The parent art object of the art tree. + @return True if the artwork is in a non-isolated layer, false otherwise. + */ + AIAPI ASBoolean (*IsNonIsolatedLayer)(AIArtHandle art); + + /** Reports whether an art tree is a legal target for isolation mode. + Art that cannot be isolated includes, for example, art that is inside a + plug-in group or dictionary, text art or guides, art that is locked or hidden, + template layers, and the temporary isolation layer of an object already in + isolation mode. If art is null, returns whether it is legal to enter isolation + mode in general. (Under some conditions it is invalid to enter isolation mode + on anything, such as when already in mask editing mode.) + @param art The parent art object of the art tree, or null. + @return True if the artwork can be isolated or if it is + already isolated, false otherwise. + */ + AIAPI ASBoolean (*CanIsolateArt)(AIArtHandle art); + + /** Reports the type art in Isolation Mode. + @return The type of isolation Mode, an \c #AIIsolationModeType constant + */ + AIAPI AIIsolationModeType (*GetIsolationModeType)(); + + /** Identical to \c #ExitIsolationMode(), except that after restoring the parent chain, + a \c #kAIIsolationModeChangedNotifier message is sent with canceled as true. + For normal isolation mode, there is no difference in behavior, since even + when canceled, any changes made in isolation mode are not rolled back. + For Symbol editing mode and Pattern editing mode, the symbol or pattern is + ordinarily redefined during handling of the \c #kAIIsolationModeChangedNotifier. + Canceling causes the redefinition not to occur. + */ + AIAPI AIErr (*CancelIsolationMode)(void); + + /** Sets the opacity value applied to the non-isolated art layers. + @param inNewOpacity The new opacity value, in the range [0..1] where 0 is + completely transparent and 1 is completely opaque. + */ + AIAPI AIErr (*SetNonIsolatedArtLayerOpacity)(const AIReal inNewOpacity); + + /** Gets the current opacity value applied to the non-isolated art layers. + Note that this function returns a numeric opacity value, not an error code. + @return The new opacity value, in the range [0..1] where 0 is completely + transparent and 1 is completely opaque. + */ + AIAPI AIReal (*GetNonIsolatedArtLayerOpacity)(); + + /** Gets the art handle from the artwork which needs to be isolated. + @param art [out] The art handle corresponding to the artwork that needs to be + passed to \c #EnterIsolationMode(). + */ + AIAPI AIErr(*GetArtToIsolate) (AIArtHandle &art); + +} AIIsolationModeSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayer.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayer.h index 576d14a..44952ce 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayer.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayer.h @@ -1,474 +1,478 @@ -#ifndef __AILayer__ -#define __AILayer__ - -/* - * Name: AILayer.h - * $Revision: 12 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Layers. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "IAIUnicodeString.h" - - -#include "AIHeaderBegin.h" - -/** @file AILayer.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAILayerSuiteVersion10 AIAPI_VERSION(13) // Illustrator 12.0 - - -#define kAILayerSuite "AI Layer Suite" -#define kAILayerSuiteVersion kAILayerSuiteVersion10 // The current version - -#define kAILayerVersion kAILayerSuiteVersion - -/** @ingroup Notifiers - Sent when a new layer becomes current, but there are no changes to the layers - themselves (options, names, ordering, and so on.) - */ -#define kAICurrentLayerNotifier "AI Current Layer Notifier" -/** @ingroup Notifiers - Sent when layers are deleted. \c #kAILayerSetNotifier is sent at the same time. - Subscribe to this one if you care ONLY about deletions, but NOT new layers or - reorderings; for example, to remove references to deleted layers, - */ -#define kAILayerDeletionNotifier "AI Layer Deletion Notifier" -/** @ingroup Notifiers - Sent when layers are added, deleted, or reordered. Respond, for example, - by rebuilding the list for a layer palette. - */ -#define kAILayerSetNotifier "AI Layer Set Notifier" -/** @ingroup Notifiers - Sent when layers have changed options, such as name, selection color, - lock status, visibility, view mode, and so on.) - */ -#define kAILayerOptionsNotifier "AI Layer Options Notifier" - - -/** @ingroup Errors - See \c #AILayerSuite. */ -#define kCantDeleteLastLayerErr '!XLL' - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - The artwork in an Illustrator document is contained within layers. The document - has a stack of lists of layers. The topmost list of layers in the stack are the - ones currently being edited. See the \c #AILayerListSuite. - - Each layer contains a group of objects, which can include sublayers. - All documents begin with at least one layer, and the user or a plug-in - can add any number of new layers to it. A layer is a container for - an artwork tree; use \c #AIArtSuite::GetFirstArtOfLayer() - to get the group of art objects belonging to a layer. - - In addition to containing artwork, a layer has a name, a color - (used to indicate selected art), and state flags that indicate whether - it is visible, editable or locked, printable, and whether it displays - placed art as dimmed. A layer reference is opaque; use the functions - in this suite to get and set layer properties. - - Several layer properties affect whether artwork on the layer is editable. - Normally objects on a non-editable layer cannot be selected, so plug-ins - that operate on the current selection need not check. However, in - iterating through layers or artwork, call \c #GetLayerEditable() on each - layer before attempting to make any changes to the artwork. - - A layer can be designated as a \e template layer, which contains template - artwork being used to guide the construction of the document artwork. - For example, a template might contain an image that is being traced. Template - layers are never printed or exported to final-form file formats. - - There are four notifiers associated with layers: -
\c #kAICurrentLayerNotifier -
\c #kAILayerDeletionNotifier -
\c #kAILayerSetNotifier -
\c #kAILayerOptionsNotifier - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAILayerSuite and \c #kAILayerVersion. -*/ -typedef struct { - - /** Gets the number of top-level layers in the current document - layer list. Use with \c #GetNthLayer() to iterate through - a document's layers. - @param count [out] A buffer in which to return the number - of layers, or 0 if there is no current document. - */ - AIAPI AIErr (*CountLayers) ( ai::int32 *count ); - - /** Retrieves a top-level layer by index from the current document. - Use with \c #CountLayers() to iterate through a document’s layers. - The layer with index 0 is the topmost layer in the stacking order. - @param n The index, in the range [0..numLayers-1]. - If \c n is greater than the number of layers, an error - is returned and \c layer is set to \c NULL. - @param layer [out] A buffer in which to return the layer, or - \c NULL if the index is out of range. - @note It is more efficient to iterate layers using \c #GetFirstLayer() - and \c #GetNextLayer(). - */ - AIAPI AIErr (*GetNthLayer) ( ai::int32 n, AILayerHandle *layer ); - - /** Retrieves a reference to the current layer in the current document. - This is the layer on which new artwork is created by default. It - is indicated in the Layers palette by a black triangle. - @param layer [out] A buffer in which to return the layer. - */ - AIAPI AIErr (*GetCurrentLayer) ( AILayerHandle *layer ); - - /** Makes a layer current. The current layer is the one in which new artwork - is created by default. It is indicated in the Layers palette by a - black triangle. - @param layer The layer. - */ - AIAPI AIErr (*SetCurrentLayer) ( AILayerHandle layer ); - - /** Retrieves the topmost layer of the current document layer list. - Use with \c #GetNextLayer to iterate through layers. - @param first [out] A buffer in which to return the layer. - @see \c #GetNextLayer(), \c #GetPrevLayer() - */ - AIAPI AIErr (*GetFirstLayer) ( AILayerHandle *first ); - - /** Retrieves the next layer below a given layer in the stacking order, - at the same level of the layer list stack. Does not descend into - sublayers. - @param prev The previous layer, or \c NULL to get the topmost layer. - @param next [out] A buffer in which to return the next layer, or - \c NULL if there are no more layers. - @see \c #GetFirstLayer(), \c #GetPrevLayer() - */ - AIAPI AIErr (*GetNextLayer) ( AILayerHandle prev, AILayerHandle *next ); - - /** Adds a new layer to a document, inserting it into the layers lists - at a position in the paint order relative to an existing layer. - @param layer The prepositional layer for \c paintOrder values - \c #kPlaceAbove and \c #kPlaceBelow, or \c NULL for values - \c #kPlaceAboveAll (inserts at 0) and - \c #kPlaceBelowAll (inserts at \c count). - @param paintOrder The paint order, relative to the \c layer object, - an \c #AITypes::AIPaintOrder value. See \c #AIArtSuite::NewArt(). - @param newLayer [out] A buffer in which to return the new layer. - @see \c #InsertLayerAtArt() - */ - AIAPI AIErr (*InsertLayer) ( AILayerHandle layer, ai::int16 paintOrder, AILayerHandle *newLayer ); - - /** Removes a layer and all of its contained art from the current document. - @param layer The layer. - @return An error \c #kCantDeleteLastLayerErr if \c layer is the only layer - in the document. - */ - AIAPI AIErr (*DeleteLayer) ( AILayerHandle layer ); - - /** Retrieves the name of a layer. - @param layer The layer. - @param title [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetLayerTitle) ( AILayerHandle layer, ai::UnicodeString& title ); - - /** Sets the name of a layer. - @param layer The layer. - @param title The new name. - */ - AIAPI AIErr (*SetLayerTitle) ( AILayerHandle layer, const ai::UnicodeString& newTitle ); - - /** Retrieves the color used when outlining selected artwork in a layer. - @param layer The layer. - @param color [out] A buffer in which to return the color. - */ - AIAPI AIErr (*GetLayerColor) ( AILayerHandle layer, AIRGBColor *color ); - - /** Sets the color used when outlining selected artwork in a layer. - @param layer The layer. - @param color The new color. - */ - AIAPI AIErr (*SetLayerColor) ( AILayerHandle layer, AIRGBColor color ); - - /** Reports the visibility status of a layer, which affects whether the artwork - is drawn. If a parent layer's visibility status is false, - artwork of a sublayer is not drawn, even if the sublayer's visibility - status is true. - @param layer The layer. - @param visible [out] A buffer in which to return true if art - in this layer is visible. - */ - AIAPI AIErr (*GetLayerVisible) ( AILayerHandle layer, AIBoolean *visible ); - - /** Sets the visibility status of a layer, which affects whether the artwork - is drawn. If a parent layer's visibility status is false, - artwork of a sublayer is not drawn, even if the sublayer's visibility - status is true. - @param layer The layer. - @param visible True to make art in this layer is visible, false - to hide it. - */ - AIAPI AIErr (*SetLayerVisible) ( AILayerHandle layer, AIBoolean visible ); - - /** Reports whether a layer specifies preview or outline mode. - If a parent layer specifies outline mode, art in all sublayers is - rendered in outline mode regardless of the sublayer settings. - @param layer The layer. - @param preview [out] A buffer in which to return true if - this layer specifies preview mode, false if it - specifies outline mode. - */ - AIAPI AIErr (*GetLayerPreview) ( AILayerHandle layer, AIBoolean *preview ); - - /** Sets a layer to preview mode or outline mode. - If a parent layer specifies outline mode, art in all sublayers is - rendered in outline mode regardless of the sublayer settings. - @param layer The layer. - @param preview True to set preview mode, false to set outline mode. - */ - AIAPI AIErr (*SetLayerPreview) ( AILayerHandle layer, AIBoolean preview ); - - /** Reports whether a layer is editable or locked. When a layer is - editable, its artwork can be created or modified. - If a parent layer is not editable, art in all sublayers - cannot be edited, regardless of the sublayer settings. - @param layer The layer. - @param editable [out] A buffer in which to return true if - this layer is editable, false if it is locked. - */ - AIAPI AIErr (*GetLayerEditable) ( AILayerHandle layer, AIBoolean *editable ); - - /** Sets whether a layer is editable or locked. When a layer is - editable, its artwork can be created or modified. - If a parent layer is not editable, art in all sublayers - cannot be edited, regardless of the sublayer settings. - @param layer The layer. - @param editable True to make this layer is editable, false - to lock it. - */ - AIAPI AIErr (*SetLayerEditable) ( AILayerHandle layer, AIBoolean editable ); - - /** Reports whether this layer is considered printable when printing the document. - You can print all layers, visible layers or printable, visible layers. - @param layer The layer. - @param printed [out] A buffer in which to return true if - this layer is printable, false if it is not. - */ - AIAPI AIErr (*GetLayerPrinted) ( AILayerHandle layer, AIBoolean *printed ); - - /** Sets whether this layer is considered printable when printing the document. - You can print all layers, visible layers or printable, visible layers. - @param layer The layer. - @param printed True to make this layer printable, false to - turn printability off. - */ - AIAPI AIErr (*SetLayerPrinted) ( AILayerHandle layer, AIBoolean printed ); - - /** Reports whether images in a layer are dimmed (colors shifted toward white) - when rendering. If a parent layer specifies dimming, images in sublayers - are dimmed regardless of the sublayer setting. - @param layer The layer. - @param dimmed [out] A buffer in which to return true if - this layer is dimmed, false if it is not. - */ - AIAPI AIErr (*GetLayerDimPlacedImages) ( AILayerHandle layer, AIBoolean *dimmed ); - - /** Sets whether images in a layer are dimmed (colors shifted toward white) - when rendering. If a parent layer specifies dimming, images in sublayers - are dimmed regardless of the sublayer setting. - @param layer The layer. - @param dimmed True to dim images, false to turn dimming off. - */ - AIAPI AIErr (*SetLayerDimPlacedImages) ( AILayerHandle layer, AIBoolean dimmed ); - - - // version 5, new for AI 6.0.1 - - /** Reports whether a layer is selected. - @param layer The layer. - @param selected [out] A buffer in which to return true if - this layer is selected, false if it is not. - @note This function is provided for backward - compatibility with Illustrator 6.0. - */ - AIAPI AIErr (*GetLayerSelected) ( AILayerHandle layer, AIBoolean *selected ); - - /** Sets whether a layer is selected. - @param layer The layer. - @param selected True to select this layer is selected, false - to deselect it. - @note This function is provided for backward - compatibility with Illustrator 6.0. - */ - AIAPI AIErr (*SetLayerSelected) ( AILayerHandle layer, AIBoolean selected ); - - - // version 6, new for AI 7.0 - - /** Retrieves a layer by title. The layer can be top-level or a sublayer. - @param layer [out] A buffer in which to return the layer. - @param title The title string. - */ - AIAPI AIErr (*GetLayerByTitle) ( AILayerHandle *layer, const ai::UnicodeString& title ); - - /** Reports whether a layer contains objects other than sublayers. - @param layer The layer. - @param hasArt [out] A buffer in which to return true if - this layer contains art objects, false if it does not. - */ - AIAPI AIErr (*LayerHasArt) ( AILayerHandle layer, AIBoolean *hasArt ); - - /** Reports whether a layer contains any selected artwork. - @param layer The layer. - @param hasSel [out] A buffer in which to return true if - this layer contains selected art, false if it does not. - */ - AIAPI AIErr (*LayerHasSelectedArt) ( AILayerHandle layer, AIBoolean *hasSel ); - - /** Deselects all objects on a layer. - @param layer The layer. - */ - AIAPI AIErr (*DeselectArtOnLayer) ( AILayerHandle layer ); - - /** Selects all objects on a layer that can be selected. - @param layer The layer. - */ - AIAPI AIErr (*SelectArtOnLayer) ( AILayerHandle layer ); - - // version 7, new for AI 8.0 - - /** Reports whether a layer is a template layer. All sublayers of a - template layer are also template layers. - @param layer The layer. - @param isTemplate [out] A buffer in which to return true if - this layer is a template layer, false if it is not. - */ - AIAPI AIErr (*GetLayerIsTemplate) ( AILayerHandle layer, AIBoolean *isTemplate ); - - /** Sets whether a layer is a template layer. All sublayers of a - template layer are also template layers. - @param layer The layer. - @param isTemplate True to make this a template layer, false to - make it not a template. */ - AIAPI AIErr (*SetLayerIsTemplate) ( AILayerHandle layer, AIBoolean isTemplate ); - - /** Retrieves the layer above a given layer in the stacking order. - Does not descend into sublayers. - @param next The given layer. - @param prev [out] A buffer in which to return the previous layer, or - \c NULL if there are no more layers. - @return The error \c #kNotImplementedErr if \c next is in a sublayer. - @see \c #GetFirstLayer(), \c #GetNextLayer() - */ - AIAPI AIErr (*GetPrevLayer) ( AILayerHandle next, AILayerHandle *prev ); - - /** Retrieves the dimming factor used for drawing images when a layer is set to be - dimmed. - @param layer The layer. - @param percent [out] A buffer in which to return the dimming factor, - in the range [0..100] where 0 in no dimming, and 100 is maximum - dimming. - */ - AIAPI AIErr (*GetLayerDimmedPercent) ( AILayerHandle layer, ai::int32 *percent ); - - /** Sets the dimming factor used for drawing images when a layer is set to be - dimmed. - @param layer The layer. - @param percent The dimming factor, in the range [0..100] - where 0 in no dimming, and 100 is maximum dimming. */ - AIAPI AIErr (*SetLayerDimmedPercent) ( AILayerHandle layer, ai::int32 percent ); - - // version 8, new for AI 9.0 - - /** Retrieves the first child sublayer of a layer. - @param layer The layer. - @param child [out] A buffer in which to return the sublayer, - or NULL if there are no sublayers. - */ - AIAPI AIErr (*GetLayerFirstChild) ( const AILayerHandle layer, AILayerHandle *child ); - - /** Retrieves the parent of a layer. - @param layer The layer. - @param parent [out] A buffer in which to return the parent, - or NULL if there is no parent. - */ - AIAPI AIErr (*GetLayerParent) ( const AILayerHandle layer, AILayerHandle *parent ); - - /** Inserts a new layer into a document at a paint-order position relative - to an art object. - @param art The art object. - @param paintOrder The paint order, relative to the \c art object, - an \c #AITypes::AIPaintOrder value. See \c #AIArtSuite::NewArt(). - The position must be appropriate for adding a layer; that is, - at the top level or such that the resulting parent is a layer. - @param newLayer [out] A buffer in which to return the new layer. - @see \c #InsertLayer() - */ - AIAPI AIErr (*InsertLayerAtArt) ( const AIArtHandle art, AIPaintOrder paintOrder, - AILayerHandle *newLayer ); - - /** Converts a sublayer of this layer to a simple group. You must ensure that - the sublayer has no child layers that would be orphaned by - removing the layer information. - @param layer The layer object for the sublayer, - or \c NULL if you pass the group object. - @param group The art group object associated with the sublayer, - or \c NULL if you pass the layer object. - */ - AIAPI AIErr (*ChangeLayerToGroup) ( const AILayerHandle layer, const AIArtHandle group ); - - /** Retrieves the next layer in preorder traversal, which finds descendents first, - then siblings. Use this to iterate through layers and their sublayers. - @param prev The previous layer. - @param next [out] A buffer in which to return the next layer, or - \c NULL if there are no more layers. - @see \c #GetFirstLayer(), \c #GetNextNonChildPreorderLayer() - */ - AIAPI AIErr (*GetNextPreorderLayer) ( AILayerHandle prev, AILayerHandle *next ); - - /** Retrieves the next layer in preorder traversal, skipping descendents and returning - only sibling layers. Use this to iterate through layers and their parent layers. - @param prev The previous layer. - @param next [out] A buffer in which to return the next layer, or - \c NULL if there are no more layers. - @see \c #GetFirstLayer(), \c #GetNextPreorderLayer() - */ - AIAPI AIErr (*GetNextNonChildPreorderLayer) ( AILayerHandle prev, AILayerHandle *next ); - -} AILayerSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AILayer__ +#define __AILayer__ + +/* + * Name: AILayer.h + * $Revision: 12 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Layers. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "IAIUnicodeString.h" + + +#include "AIHeaderBegin.h" + +/** @file AILayer.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAILayerSuiteVersion10 AIAPI_VERSION(13) // Illustrator 12.0 + + +#define kAILayerSuite "AI Layer Suite" +#define kAILayerSuiteVersion kAILayerSuiteVersion10 // The current version + +#define kAILayerVersion kAILayerSuiteVersion + +/** @ingroup Notifiers + Sent when a new layer becomes current, but no changes are made to the layers + themselves (options, names, ordering, and so on.) + */ +#define kAICurrentLayerNotifier "AI Current Layer Notifier" +/** @ingroup Notifiers + Sent when layers are deleted. \c #kAILayerSetNotifier is sent at the same time. + Subscribe to this one if you care ONLY about deletions, but NOT new layers or + reorderings; for example, to remove references to deleted layers, + */ +#define kAILayerDeletionNotifier "AI Layer Deletion Notifier" +/** @ingroup Notifiers + Sent when layers are added, deleted, or reordered. Respond, for example, + by rebuilding the list for a layer palette. + */ +#define kAILayerSetNotifier "AI Layer Set Notifier" +/** @ingroup Notifiers + Sent when layers have changed options, such as name, selection color, + lock status, visibility, view mode, and so on.) + */ +#define kAILayerOptionsNotifier "AI Layer Options Notifier" + /** @ingroup Notifiers + Sent when an art style is applied to a layer + */ +#define kAILayerArtStyleChangeNotifier "AI Layer Art Style Change Notifier" + + +/** @ingroup Errors + See \c #AILayerSuite. */ +#define kCantDeleteLastLayerErr '!XLL' + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + The artwork in an Illustrator document is contained within layers. The document + has a stack of lists of layers. The topmost list of layers in the stack are the + ones currently being edited. See the \c #AILayerListSuite. + + Each layer contains a group of objects, which can include sublayers. + All documents begin with at least one layer, and the user or a plug-in + can add any number of new layers to it. A layer is a container for + an artwork tree; use \c #AIArtSuite::GetFirstArtOfLayer() + to get the group of art objects belonging to a layer. + + In addition to containing artwork, a layer has a name, a color + (used to indicate selected art), and state flags that indicate whether + it is visible, editable or locked, printable, and whether it displays + placed art as dimmed. A layer reference is opaque; use the functions + in this suite to get and set layer properties. + + Several layer properties affect whether the artwork on the layer is editable. + Normally objects on a non-editable layer cannot be selected, so plug-ins + that operate on the current selection need not check. However, in + iterating through layers or artwork, call \c #GetLayerEditable() on each + layer before attempting to make any changes to the artwork. + + A layer can be designated as a \e template layer, which contains template + artwork being used to guide the construction of the document artwork. + For example, a template might contain an image that is being traced. Template + layers are never printed or exported to final-form file formats. + + There are four notifiers associated with layers: +
\c #kAICurrentLayerNotifier +
\c #kAILayerDeletionNotifier +
\c #kAILayerSetNotifier +
\c #kAILayerOptionsNotifier + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAILayerSuite and \c #kAILayerVersion. +*/ +typedef struct { + + /** Gets the number of top-level layers in the current document + layer list. Use with \c #GetNthLayer() to iterate through + a document's layers. + @param count [out] A buffer in which to return the number + of layers, or 0 if there is no current document. + */ + AIAPI AIErr (*CountLayers) ( ai::int32 *count ); + + /** Retrieves a top-level layer by index from the current document. + Use with \c #CountLayers() to iterate through a document’s layers. + The layer with index 0 is the topmost layer in the stacking order. + @param n The index, in the range [0..numLayers-1]. + If \c n is greater than the number of layers, an error + is returned and \c layer is set to \c NULL. + @param layer [out] A buffer in which to return the layer, or + \c NULL if the index is out of range. + @note It is more efficient to iterate layers using \c #GetFirstLayer() + and \c #GetNextLayer(). + */ + AIAPI AIErr (*GetNthLayer) ( ai::int32 n, AILayerHandle *layer ); + + /** Retrieves a reference to the current layer in the current document. + This is the layer on which new artwork is created by default. It + is indicated in the Layers palette by a black triangle. + @param layer [out] A buffer in which to return the layer. + */ + AIAPI AIErr (*GetCurrentLayer) ( AILayerHandle *layer ); + + /** Makes a layer current. The current layer is the one in which new artwork + is created by default. It is indicated in the Layers palette by a + black triangle. + @param layer The layer. + */ + AIAPI AIErr (*SetCurrentLayer) ( AILayerHandle layer ); + + /** Retrieves the topmost layer of the current document layer list. + Use with \c #GetNextLayer to iterate through layers. + @param first [out] A buffer in which to return the layer. + @see \c #GetNextLayer(), \c #GetPrevLayer() + */ + AIAPI AIErr (*GetFirstLayer) ( AILayerHandle *first ); + + /** Retrieves the next layer below a given layer in the stacking order, + at the same level of the layer list stack. Does not descend into + sublayers. + @param prev The previous layer, or \c NULL to get the topmost layer. + @param next [out] A buffer in which to return the next layer, or + \c NULL if there are no more layers. + @see \c #GetFirstLayer(), \c #GetPrevLayer() + */ + AIAPI AIErr (*GetNextLayer) ( AILayerHandle prev, AILayerHandle *next ); + + /** Adds a new layer to a document, inserting it into the layers' lists + at a position in the paint order relative to an existing layer. + @param layer The prepositional layer for \c paintOrder values + \c #kPlaceAbove and \c #kPlaceBelow, or \c NULL for values + \c #kPlaceAboveAll (inserts at 0) and + \c #kPlaceBelowAll (inserts at \c count). + @param paintOrder The paint order, relative to the \c layer object, + an \c #AITypes::AIPaintOrder value. See \c #AIArtSuite::NewArt(). + @param newLayer [out] A buffer in which to return the new layer. + @see \c #InsertLayerAtArt() + */ + AIAPI AIErr (*InsertLayer) ( AILayerHandle layer, ai::int16 paintOrder, AILayerHandle *newLayer ); + + /** Removes a layer and all of its contained art from the current document. + @param layer The layer. + @return An error \c #kCantDeleteLastLayerErr if \c layer is the only layer + in the document. + */ + AIAPI AIErr (*DeleteLayer) ( AILayerHandle layer ); + + /** Retrieves the name of a layer. + @param layer The layer. + @param title [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetLayerTitle) ( AILayerHandle layer, ai::UnicodeString& title ); + + /** Sets the name of a layer. + @param layer The layer. + @param title The new name. + */ + AIAPI AIErr (*SetLayerTitle) ( AILayerHandle layer, const ai::UnicodeString& newTitle ); + + /** Retrieves the color used when outlining selected artwork in a layer. + @param layer The layer. + @param color [out] A buffer in which to return the color. + */ + AIAPI AIErr (*GetLayerColor) ( AILayerHandle layer, AIRGBColor *color ); + + /** Sets the color used when outlining selected artwork in a layer. + @param layer The layer. + @param color The new color. + */ + AIAPI AIErr (*SetLayerColor) ( AILayerHandle layer, AIRGBColor color ); + + /** Reports the visibility status of a layer, which affects whether the artwork + is drawn. If a parent layer's visibility status is false, + artwork of a sublayer is not drawn, even if the sublayer's visibility + status is true. + @param layer The layer. + @param visible [out] A buffer in which to return the output as true if art + in this layer is visible. + */ + AIAPI AIErr (*GetLayerVisible) ( AILayerHandle layer, AIBoolean *visible ); + + /** Sets the visibility status of a layer, which affects whether the artwork + is drawn. If a parent layer's visibility status is false, + artwork of a sublayer is not drawn, even if the sublayer's visibility + status is true. + @param layer The layer. + @param visible True to make art in this layer is visible, false + to hide it. + */ + AIAPI AIErr (*SetLayerVisible) ( AILayerHandle layer, AIBoolean visible ); + + /** Reports whether a layer specifies preview or outline mode. + If a parent layer specifies outline mode, art in all sublayers is + rendered in outline mode regardless of the sublayer settings. + @param layer The layer. + @param preview [out] A buffer in which to return true if + this layer specifies preview mode; false if it + specifies outline mode. + */ + AIAPI AIErr (*GetLayerPreview) ( AILayerHandle layer, AIBoolean *preview ); + + /** Sets a layer to preview mode or outline mode. + If a parent layer specifies outline mode, art in all sublayers is + rendered in outline mode regardless of the sublayer settings. + @param layer The layer. + @param preview True to set preview mode, false to set outline mode. + */ + AIAPI AIErr (*SetLayerPreview) ( AILayerHandle layer, AIBoolean preview ); + + /** Reports whether a layer is editable or locked. When a layer is + editable, its artwork can be created or modified. + If a parent layer is not editable, art in all sublayers + cannot be edited, regardless of the sublayer settings. + @param layer The layer. + @param editable [out] A buffer in which to return true if + this layer is editable; false if it is locked. + */ + AIAPI AIErr (*GetLayerEditable) ( AILayerHandle layer, AIBoolean *editable ); + + /** Sets whether a layer is editable or locked. When a layer is + editable, its artwork can be created or modified. + If a parent layer is not editable, art in all sublayers + cannot be edited, regardless of the sublayer settings. + @param layer The layer. + @param editable True to make this layer is editable, false + to lock it. + */ + AIAPI AIErr (*SetLayerEditable) ( AILayerHandle layer, AIBoolean editable ); + + /** Reports whether this layer is considered printable when printing the document. + You can print all layers, visible layers or printable, visible layers. + @param layer The layer. + @param printed [out] A buffer in which to return true if + this layer is printable; false if it is not. + */ + AIAPI AIErr (*GetLayerPrinted) ( AILayerHandle layer, AIBoolean *printed ); + + /** Sets whether this layer is considered printable when printing the document. + You can print all layers, visible layers or printable, visible layers. + @param layer The layer. + @param printed True to make this layer printable, false to + turn printability off. + */ + AIAPI AIErr (*SetLayerPrinted) ( AILayerHandle layer, AIBoolean printed ); + + /** Reports whether images in a layer are dimmed (colors shifted toward white) + when rendering. If a parent layer specifies dimming, images in sublayers + are dimmed regardless of the sublayer setting. + @param layer The layer. + @param dimmed [out] A buffer in which to return true if + this layer is dimmed; false if it is not. + */ + AIAPI AIErr (*GetLayerDimPlacedImages) ( AILayerHandle layer, AIBoolean *dimmed ); + + /** Sets whether images in a layer are dimmed (colors shifted toward white) + when rendering. If a parent layer specifies dimming, images in sublayers + are dimmed regardless of the sublayer setting. + @param layer The layer. + @param dimmed True to dim images, false to turn dimming off. + */ + AIAPI AIErr (*SetLayerDimPlacedImages) ( AILayerHandle layer, AIBoolean dimmed ); + + + // version 5, new for AI 6.0.1 + + /** Reports whether a layer is selected. + @param layer The layer. + @param selected [out] A buffer in which to return true if + this layer is selected; false if it is not. + @note This function is provided for backward + compatibility with Illustrator 6.0. + */ + AIAPI AIErr (*GetLayerSelected) ( AILayerHandle layer, AIBoolean *selected ); + + /** Sets whether a layer is selected. + @param layer The layer. + @param selected True to select this layer, false + to deselect it. + @note This function is provided for backward + compatibility with Illustrator 6.0. + */ + AIAPI AIErr (*SetLayerSelected) ( AILayerHandle layer, AIBoolean selected ); + + + // version 6, new for AI 7.0 + + /** Retrieves a layer by title. The layer can be top-level or a sublayer. + @param layer [out] A buffer in which to return the layer. + @param title The title string. + */ + AIAPI AIErr (*GetLayerByTitle) ( AILayerHandle *layer, const ai::UnicodeString& title ); + + /** Reports whether a layer contains objects other than sublayers. + @param layer The layer. + @param hasArt [out] A buffer in which to return true if + this layer contains art objects; false if it does not. + */ + AIAPI AIErr (*LayerHasArt) ( AILayerHandle layer, AIBoolean *hasArt ); + + /** Reports whether a layer contains any selected artwork. + @param layer The layer. + @param hasSel [out] A buffer in which to return true if + this layer contains selected art; false if it does not. + */ + AIAPI AIErr (*LayerHasSelectedArt) ( AILayerHandle layer, AIBoolean *hasSel ); + + /** Deselects all objects on a layer. + @param layer The layer. + */ + AIAPI AIErr (*DeselectArtOnLayer) ( AILayerHandle layer ); + + /** Selects all objects on a layer that can be selected. + @param layer The layer. + */ + AIAPI AIErr (*SelectArtOnLayer) ( AILayerHandle layer ); + + // version 7, new for AI 8.0 + + /** Reports whether a layer is a template layer. All sublayers of a + template layer are also template layers. + @param layer The layer. + @param isTemplate [out] A buffer in which to return true if + this layer is a template layer; false if it is not. + */ + AIAPI AIErr (*GetLayerIsTemplate) ( AILayerHandle layer, AIBoolean *isTemplate ); + + /** Sets whether a layer is a template layer. All sublayers of a + template layer are also template layers. + @param layer The layer. + @param isTemplate True to make this a template layer, false to + not make it a template layer. */ + AIAPI AIErr (*SetLayerIsTemplate) ( AILayerHandle layer, AIBoolean isTemplate ); + + /** Retrieves the layer above a given layer in the stacking order. + Does not descend into sublayers. + @param next The given layer. + @param prev [out] A buffer in which to return the previous layer, or + \c NULL if there are no more layers. + @return The error \c #kNotImplementedErr if \c next is in a sublayer. + @see \c #GetFirstLayer(), \c #GetNextLayer() + */ + AIAPI AIErr (*GetPrevLayer) ( AILayerHandle next, AILayerHandle *prev ); + + /** Retrieves the dimming factor used for drawing images when a layer is set to be + dimmed. + @param layer The layer. + @param percent [out] A buffer in which to return the dimming factor, + in the range [0..100] where 0 in no dimming, and 100 is maximum + dimming. + */ + AIAPI AIErr (*GetLayerDimmedPercent) ( AILayerHandle layer, ai::int32 *percent ); + + /** Sets the dimming factor used for drawing images when a layer is set to be + dimmed. + @param layer The layer. + @param percent The dimming factor, in the range [0..100] + where 0 in no dimming, and 100 is maximum dimming. */ + AIAPI AIErr (*SetLayerDimmedPercent) ( AILayerHandle layer, ai::int32 percent ); + + // version 8, new for AI 9.0 + + /** Retrieves the first child sublayer of a layer. + @param layer The layer. + @param child [out] A buffer in which to return the sublayer, + or NULL if there are no sublayers. + */ + AIAPI AIErr (*GetLayerFirstChild) ( const AILayerHandle layer, AILayerHandle *child ); + + /** Retrieves the parent of a layer. + @param layer The layer. + @param parent [out] A buffer in which to return the parent, + or NULL if there is no parent. + */ + AIAPI AIErr (*GetLayerParent) ( const AILayerHandle layer, AILayerHandle *parent ); + + /** Inserts a new layer into a document at a paint-order position relative + to an art object. + @param art The art object. + @param paintOrder The paint order, relative to the \c art object, + an \c #AITypes::AIPaintOrder value. See \c #AIArtSuite::NewArt(). + The position must be appropriate for adding a layer; that is, + at the top level or such that the resulting parent is a layer. + @param newLayer [out] A buffer in which to return the new layer. + @see \c #InsertLayer() + */ + AIAPI AIErr (*InsertLayerAtArt) ( const AIArtHandle art, AIPaintOrder paintOrder, + AILayerHandle *newLayer ); + + /** Converts a sublayer of this layer to a simple group. You must ensure that + the sublayer has no child layers that would be orphaned by + removing the layer information. + @param layer The layer object for the sublayer, + or \c NULL if you pass the group object. + @param group The art group object associated with the sublayer, + or \c NULL if you pass the layer object. + */ + AIAPI AIErr (*ChangeLayerToGroup) ( const AILayerHandle layer, const AIArtHandle group ); + + /** Retrieves the next layer in preorder traversal, which finds descendents first, + then siblings. Use this to iterate through layers and their sublayers. + @param prev The previous layer. + @param next [out] A buffer in which to return the next layer, or + \c NULL if there are no more layers. + @see \c #GetFirstLayer(), \c #GetNextNonChildPreorderLayer() + */ + AIAPI AIErr (*GetNextPreorderLayer) ( AILayerHandle prev, AILayerHandle *next ); + + /** Retrieves the next layer in preorder traversal, skipping descendents and returning + only sibling layers. Use this to iterate through layers and their parent layers. + @param prev The previous layer. + @param next [out] A buffer in which to return the next layer, or + \c NULL if there are no more layers. + @see \c #GetFirstLayer(), \c #GetNextPreorderLayer() + */ + AIAPI AIErr (*GetNextNonChildPreorderLayer) ( AILayerHandle prev, AILayerHandle *next ); + +} AILayerSuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayerList.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayerList.h index 8440874..6c05093 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayerList.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILayerList.h @@ -1,366 +1,366 @@ -#ifndef __AILayerList__ -#define __AILayerList__ - -/* - * Name: AILayerList.h - * $Revision: 3 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Layer List Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __SPPlugins__ -#include "SPPlugs.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AILayerList.h */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAILayerListSuite "AI Layer List" -#define kAILayerListSuiteVersion4 AIAPI_VERSION(4) -#define kAILayerListSuiteVersion kAILayerListSuiteVersion4 -#define kAILayerListVersion kAILayerListSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/** An opaque reference to a layer list. */ -typedef struct LayerList* AILayerList; - - -/** @ingroup Callers - Caller for layer list messages. See \c #AILayerListSuite. - */ -#define kCallerAILayerList "AI Layer List" - -/** @ingroup Selectors - Sent to the plug-in owning a layer list when it is pushed onto - the stack. Allows you to initialize the layer list. Within the scope - of the message, you can modify both the previous layer list - and the newly pushed list. On return, the previous layer - list can no longer be modified. - - The data of the message is an \c #AILayerListMessage. The - message's \c data field contains the value passed to - \c #AILayerListSuite::Push(). - */ -#define kSelectorAIPushLayerList "AI Push Layer List" - -/** @ingroup Selectors - Sent to the plug-in owning a layer list when it is popped. - Allows you to clean up the layer lists. Within the scope of - the message you can modify both the previous layer list and - the one about to be popped. - - The data of the message is an \c #AILayerListMessage. - */ -#define kSelectorAIPopLayerList "AI Pop Layer List" - -/** @ingroup Selectors - Sent to the plug-in owning a layer list to request - that it dispose of any data it allocated on push. The - data of the message is an \c #AILayerListMessage. - */ -#define kSelectorAIDeleteLayerList "AI Delete Layer List" - -/** The message data for layer list messages. */ -typedef struct { - /** The message data. */ - SPMessageData d; - /** The layer list that is pushed, popped, or deleted. */ - AILayerList list; - /** Data passed from \c #AILayerListSuite::Push() for the - \c #kSelectorAIPushLayerList selector.*/ - void* data; -} AILayerListMessage; - - -/** @ingroup Notifiers - Sent when a layer list is pushed or popped. See \c #AILayerListSuite. - */ -#define kAILayerListChangedNotifier "AI Edit Layer List Changed Notifier" - -/** Controls how the contents of a layer list are rendered. - A logical OR of an \c #AILayerListModeRenderingOptions value - and an \c #AILayerListModePreviewOptions value. - Predefined combinations are defined by \c #AILayerListModeValues. - */ -typedef ai::int32 AILayerListMode; - -/** What is rendered when a layer list is drawn. - @see \c #AILayerListMode
\c #AILayerListModeValues */ -enum AILayerListModeRenderingOptions { - /** Mask value to isolate the rendering option bits from the \c #AILayerListMode. */ - kAILayerListRenderMask = (0x000000FF), - /** Render only the selection highlighting on the layer list. */ - kAILayerListRenderSelection = (1<<0), - /** Render both the selection highlighting and the previews of the objects - on the layer list. */ - kAILayerListRenderPreview = (1<<1) -}; - -/** How previews of objects on a layer list are drawn, - when \c #AILayerListModeRenderingOptions::kAILayerListRenderPreview is set. - @see \c #AILayerListMode
\c #AILayerListModeValues */ -enum AILayerListModePreviewOptions { - /** Mask value to isolate the preview option bits from the \c #AILayerListMode. */ - kAILayerListPreviewMask = (0x00000F00), - /** Draw a full color preview. */ - kAILayerListPreviewColor = (0<<8), - /** Draw a grayscale preview. */ - kAILayerListPreviewGray = (1<<8) -}; - -/** Pre-defined combinations of \c #AILayerListModeRenderingOptions and - \c #AILayerListModePreviewOptions. - @see \c #AILayerListMode */ -enum AILayerListModeValues { - /** Draws neither selection highlighting nor the preview - of objects. */ - kAILayerListInvisibleMode = 0, - /** Draws only the selection highlighting of selected - objects in the layer list. */ - kAILayerListSelectionMode = kAILayerListRenderSelection, - /** Draws both selection highlighting and preview of the - objects. */ - kAILayerListPreviewMode = (kAILayerListRenderSelection|kAILayerListRenderPreview), - /** Draws both the selection highlighting and a grayscale - preview of the objects. */ - kAILayerListGrayscaleMode = (kAILayerListRenderSelection|kAILayerListRenderPreview|kAILayerListPreviewGray) -}; - - -/** Controls the types of editing operations allowed - for a layer list, one of the \c #AILayerListEditabilityModeValues. - */ -typedef ai::int32 AILayerListEditabilityMode; - -/** Layer list editability modes. */ -enum AILayerListEditabilityModeValues { - /** Allows all types of edits. Set by default when a new layer list is pushed. */ - kAIRegularEditabilityMode = 0, - /** Forces the Layers palette to disable the new layer and new - sublayer functionality. Transparency mask layer lists use this mode. */ - kAINoNewLayersMode = (1<<0) -}; - - -/** Tag for the document layer list. */ -#define kAIDocumentLayerList "AI Document Layer List" -/** Tag for a transparency mask layer list. */ -#define kAITransparencyMaskLayerList "AI Transparency Mask Layer List" - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - The artwork in an Illustrator document is contained within layers. A list - of layers, the \e document \e layer \e list, is saved when a document - is saved. It is possible to create new layer lists, which are maintained in a stack. - The bottommost list on the stack is the document layer list. The topmost list, - called the \e current layer list, contains artwork that the user is - currently editing. - - Editing operations do not normally affect objects in layer lists below - the current list.Most functions operate only on layers in the current layer list. - For example, the \c #AILayerSuite allows you to access the layers in a list sequentially, but - the functions operate only on the current list. Similarly the \c #AIMatchingArtSuite - functions operate only on the current layer list. - - \li Each layer list has a \e display mode, which affects how the contents of the - layer list are drawn, and an \e editability mode, which affects the - editing operations allowed on the list. - - \li Each layer list is given a \e tag when it is pushed onto the stack, which - identifies the purpose of the list, either \c #kAIDocumentLayerList - or \c #kAITransparencyMaskLayerList. - - There is one notifier associated with the layer lists, - \c #kAILayerListChangedNotifier. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAILayerListSuite and \c #kAILayerListVersion. -*/ - -typedef struct { - - /** Creates a new layer list and pushes it onto the stack, making it - current. The plug-in receives the \c #kSelectorAIPushLayerList - message before the call returns, allowing it to initialize - the list. - @param self This plug-in - @param tag The type of list, one of \c #kAIDocumentLayerList - or \c #kAITransparencyMaskLayerList. - @param data A pointer to developer-defined data to be passed - to \c #kSelectorAIPushLayerList in \c #AILayerListMessage::data. - Parameter may be \c NULL. - @param mode The display and editability mode of the new layer list. - @param list [out] A buffer in which to return the new layer list. - This memory is not freed until it is no longer needed for undo/redo. - of push or pop operations. The plug-in must preserve its private data for - the list until it receives the \c #kSelectorAIDeleteLayerList message. - Parameter may be \c NULL. - */ - AIAPI AIErr (*Push) (SPPluginRef self, char* tag, void* data, - AILayerListMode mode, AILayerList* list); - - /** Pops the current layer list from the top of the layer list stack. The plug-in - that pushed the layer list receives the \c #kSelectorAIPopLayerList message - which allows it to perform any actions associated with the pop, even if it - did not initiate the pop. - */ - AIAPI AIErr (*Pop) (void); - - /** Retrieves both the layer list and the layer on which an art object resides, if any. - @param art The art object. - @param list [out] A buffer in which to return the layer list, or \c NULL - if this information is not needed. - @param layer [out] A buffer in which to return the layer, or \c NULL - if this information is not needed. - */ - AIAPI AIErr (*GetLayerOfArt) (AIArtHandle art, AILayerList* list, AILayerHandle* layer); - - /** Gets the number of layer lists on the stack. Use with \c #GetFirst() - and \c #GetNext() to iterate through lists. - @param count [out] A buffer in which to return the number of layer lists. - */ - AIAPI AIErr (*Count) (ai::int32* count); - - /** Retrieves the current layer list (the most recently pushed list at the top - of the stack). - @param list [out] A buffer in which to return the layer list. - */ - AIAPI AIErr (*GetFirst) (AILayerList* list); - - /** Retrieves the document layer list (the bottom of the stack). - @param list [out] A buffer in which to return the layer list. - */ - AIAPI AIErr (*GetLast) (AILayerList* list); - - /** Retrieves the next lower layer list in the stack. - @param list A layer list in the stack. - @param next [out] A buffer in which to return the next layer list, - or \c NULL if this is the lowest list. - */ - AIAPI AIErr (*GetNext) (AILayerList list, AILayerList* next); - - /** Gets the number of layers in a layer list. Use with \c #GetFirstLayer() - and \c #GetNextLayer() to iterate through the layers. - @param list The layer list. - @param count [out] A buffer in which to return the number of layers. - */ - AIAPI AIErr (*CountLayers) (AILayerList list, ai::int32* count); - - /** Retrieves the topmost layer in the stacking order of a layer list. - @param list The layer list. - @param layer [out] A buffer in which to return the layer. - */ - AIAPI AIErr (*GetFirstLayer) (AILayerList list, AILayerHandle* layer); - - /** Retrieves the bottommost layer in the stacking order of a layer list. - @param list The layer list. - @param layer [out] A buffer in which to return the layer. - */ - AIAPI AIErr (*GetLastLayer) (AILayerList list, AILayerHandle* layer); - - /** Retrieves the next lower layer in the stacking order of a layer list. - @param list The layer list. - @param layer A layer in the list. - @param layer [out] A buffer in which to return the next lower layer, - or \c NULL if this is the lowest layer. - */ - AIAPI AIErr (*GetNextLayer) (AILayerList list, AILayerHandle layer, AILayerHandle* next); - - /** Retrieves the next higher layer in the stacking order of a layer list. - @param list The layer list. - @param layer A layer in the list. - @param layer [out] A buffer in which to return the next higher layer, - or \c NULL if this is the highest layer. - */ - AIAPI AIErr (*GetPrevLayer) (AILayerList list, AILayerHandle layer, AILayerHandle* prev); - - /** Sets the display mode to be used when rendering the layer list. - @param list The layer list. - @param mode The new display mode, an \c #AILayerListModeValues value. - */ - AIAPI AIErr (*SetDisplayMode) (AILayerList list, AILayerListMode mode); - - /** Retrieves the display mode used when rendering the layer list. - (Note that this function returns a constant value, not an error code.) - @param list The layer list. - @return The display mode, an \c #AILayerListModeValues value. - */ - AIAPI AILayerListMode (*GetDisplayMode) (AILayerList list); - - /** Retrieves the tag that identifies the purpose of a layer list. - (Note that this function returns a constant value, not an error code.) - @param list The layer list. - @return The tag, \c #kAIDocumentLayerList or \c #kAITransparencyMaskLayerList. */ - AIAPI const char* (*GetTag) (AILayerList list); - - /** Sets the editability mode of a layer list. Use to set non-default - editability for a transparency-mask layer. It is best to set this immediately - after initializing the layer list, while processing the - \c #kSelectorAIPushLayerList message. You cannot modify the - editability mode of the document layer list. - @param list The layer list. - @param mode The new editability mode, one of the - \c #AILayerListEditabilityModeValues. - */ - AIAPI AIErr (*SetEditabilityMode) ( AILayerList list, AILayerListEditabilityMode mode ); - - /** Retrieves the editability mode of a layer list. - (Note that this function returns a constant value, not an error code.) - @param list The layer list. - @return The mode, one of the \c #AILayerListEditabilityModeValues. - */ - AIAPI AILayerListEditabilityMode (*GetEditabilityMode) (AILayerList list); - -} AILayerListSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AILayerList__ +#define __AILayerList__ + +/* + * Name: AILayerList.h + * $Revision: 3 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Layer List Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __SPPlugins__ +#include "SPPlugs.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AILayerList.h */ + +/******************************************************************************* + ** + ** Suite name and version + ** + **/ + +#define kAILayerListSuite "AI Layer List" +#define kAILayerListSuiteVersion4 AIAPI_VERSION(4) +#define kAILayerListSuiteVersion kAILayerListSuiteVersion4 +#define kAILayerListVersion kAILayerListSuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + + +/** An opaque reference to a layer list. */ +typedef struct LayerList* AILayerList; + + +/** @ingroup Callers + Caller for layer list messages. See \c #AILayerListSuite. + */ +#define kCallerAILayerList "AI Layer List" + +/** @ingroup Selectors + Sent to the plug-in owning a layer list when it is pushed onto + the stack. Allows you to initialize the layer list. Within the scope + of the message, you can modify both the previous layer list + and the newly pushed list. On return, the previous layer + list can no longer be modified. + + The data of the message is an \c #AILayerListMessage. The + message's \c data field contains the value passed to + \c #AILayerListSuite::Push(). + */ +#define kSelectorAIPushLayerList "AI Push Layer List" + +/** @ingroup Selectors + Sent to the plug-in owning a layer list when it is popped. + Allows you to clean up the layer lists. Within the scope of + the message you can modify both the previous layer list and + the one about to be popped. + + The data of the message is an \c #AILayerListMessage. + */ +#define kSelectorAIPopLayerList "AI Pop Layer List" + +/** @ingroup Selectors + Sent to the plug-in owning a layer list to request + that it dispose of any data it allocated on push. The + data of the message is an \c #AILayerListMessage. + */ +#define kSelectorAIDeleteLayerList "AI Delete Layer List" + +/** The message data for layer list messages. */ +typedef struct { + /** The message data. */ + SPMessageData d; + /** The layer list that is pushed, popped, or deleted. */ + AILayerList list; + /** Data passed from \c #AILayerListSuite::Push() for the + \c #kSelectorAIPushLayerList selector.*/ + void* data; +} AILayerListMessage; + + +/** @ingroup Notifiers + Sent when a layer list is pushed or popped. See \c #AILayerListSuite. + */ +#define kAILayerListChangedNotifier "AI Edit Layer List Changed Notifier" + +/** Controls how the contents of a layer list are rendered. + A logical OR of an \c #AILayerListModeRenderingOptions value + and an \c #AILayerListModePreviewOptions value. + Predefined combinations are defined by \c #AILayerListModeValues. + */ +typedef ai::int32 AILayerListMode; + +/** What is rendered when a layer list is drawn. + @see \c #AILayerListMode
\c #AILayerListModeValues */ +enum AILayerListModeRenderingOptions { + /** Mask value to isolate the rendering option bits from the \c #AILayerListMode. */ + kAILayerListRenderMask = (0x000000FF), + /** Render only the selection highlighting on the layer list. */ + kAILayerListRenderSelection = (1<<0), + /** Render both the selection highlighting and the previews of the objects + on the layer list. */ + kAILayerListRenderPreview = (1<<1) +}; + +/** How previews of objects on a layer list are drawn, + when \c #AILayerListModeRenderingOptions::kAILayerListRenderPreview is set. + @see \c #AILayerListMode
\c #AILayerListModeValues */ +enum AILayerListModePreviewOptions { + /** Mask value to isolate the preview option bits from the \c #AILayerListMode. */ + kAILayerListPreviewMask = (0x00000F00), + /** Draw a full color preview. */ + kAILayerListPreviewColor = (0<<8), + /** Draw a grayscale preview. */ + kAILayerListPreviewGray = (1<<8) +}; + +/** Pre-defined combinations of \c #AILayerListModeRenderingOptions and + \c #AILayerListModePreviewOptions. + @see \c #AILayerListMode */ +enum AILayerListModeValues { + /** Draws neither selection highlighting nor the preview + of objects. */ + kAILayerListInvisibleMode = 0, + /** Draws only the selection highlighting of selected + objects in the layer list. */ + kAILayerListSelectionMode = kAILayerListRenderSelection, + /** Draws both selection highlighting and preview of the + objects. */ + kAILayerListPreviewMode = (kAILayerListRenderSelection|kAILayerListRenderPreview), + /** Draws both the selection highlighting and a grayscale + preview of the objects. */ + kAILayerListGrayscaleMode = (kAILayerListRenderSelection|kAILayerListRenderPreview|kAILayerListPreviewGray) +}; + + +/** Controls the types of editing operations allowed + for a layer list, one of the \c #AILayerListEditabilityModeValues. + */ +typedef ai::int32 AILayerListEditabilityMode; + +/** Layer list editability modes. */ +enum AILayerListEditabilityModeValues { + /** Allows all types of edits. Set by default when a new layer list is pushed. */ + kAIRegularEditabilityMode = 0, + /** Forces the Layers palette to disable the new layer and new + sublayer functionality. Transparency mask layer lists use this mode. */ + kAINoNewLayersMode = (1<<0) +}; + + +/** Tag for the document layer list. */ +#define kAIDocumentLayerList "AI Document Layer List" +/** Tag for a transparency mask layer list. */ +#define kAITransparencyMaskLayerList "AI Transparency Mask Layer List" + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + The artwork in an Illustrator document is contained within layers. A list + of layers, the \e document \e layer \e list, is saved when a document + is saved. It is possible to create new layer lists, which are maintained in a stack. + The bottommost list on the stack is the document layer list. The topmost list, + called the \e current layer list, contains artwork that the user is + currently editing. + + Editing operations do not normally affect objects in layer lists below + the current list.Most functions operate only on layers in the current layer list. + For example, the \c #AILayerSuite allows you to access the layers in a list sequentially, but + the functions operate only on the current list. Similarly the \c #AIMatchingArtSuite + functions operate only on the current layer list. + + \li Each layer list has a \e display mode, which affects how the contents of the + layer list are drawn, and an \e editability mode, which affects the + editing operations allowed on the list. + + \li Each layer list is given a \e tag when it is pushed onto the stack, which + identifies the purpose of the list, either \c #kAIDocumentLayerList + or \c #kAITransparencyMaskLayerList. + + There is one notifier associated with the layer lists, + \c #kAILayerListChangedNotifier. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAILayerListSuite and \c #kAILayerListVersion. +*/ + +typedef struct { + + /** Creates a new layer list and pushes it onto the stack, making it + current. The plug-in receives the \c #kSelectorAIPushLayerList + message before the call returns, allowing it to initialize + the list. + @param self This plug-in + @param tag The type of list, one of \c #kAIDocumentLayerList + or \c #kAITransparencyMaskLayerList. + @param data A pointer to developer-defined data to be passed + to \c #kSelectorAIPushLayerList in \c #AILayerListMessage::data. + Parameter may be \c NULL. + @param mode The display and editability mode of the new layer list. + @param list [out] A buffer in which to return the new layer list. + This memory is not freed until it is no longer needed for undo/redo. + of push or pop operations. The plug-in must preserve its private data for + the list until it receives the \c #kSelectorAIDeleteLayerList message. + Parameter may be \c NULL. + */ + AIAPI AIErr (*Push) (SPPluginRef self, char* tag, void* data, + AILayerListMode mode, AILayerList* list); + + /** Pops the current layer list from the top of the layer list stack. The plug-in + that pushed the layer list receives the \c #kSelectorAIPopLayerList message + which allows it to perform any actions associated with the pop, even if it + did not initiate the pop. + */ + AIAPI AIErr (*Pop) (void); + + /** Retrieves both the layer list and the layer on which an art object resides, if any. + @param art The art object. + @param list [out] A buffer in which to return the layer list, or \c NULL + if this information is not needed. + @param layer [out] A buffer in which to return the layer, or \c NULL + if this information is not needed. + */ + AIAPI AIErr (*GetLayerOfArt) (AIArtHandle art, AILayerList* list, AILayerHandle* layer); + + /** Gets the number of layer lists on the stack. Use with \c #GetFirst() + and \c #GetNext() to iterate through lists. + @param count [out] A buffer in which to return the number of layer lists. + */ + AIAPI AIErr (*Count) (ai::int32* count); + + /** Retrieves the current layer list (the most recently pushed list at the top + of the stack). + @param list [out] A buffer in which to return the layer list. + */ + AIAPI AIErr (*GetFirst) (AILayerList* list); + + /** Retrieves the document layer list (the bottom of the stack). + @param list [out] A buffer in which to return the layer list. + */ + AIAPI AIErr (*GetLast) (AILayerList* list); + + /** Retrieves the next lower layer list in the stack. + @param list A layer list in the stack. + @param next [out] A buffer in which to return the next layer list, + or \c NULL if this is the lowest list. + */ + AIAPI AIErr (*GetNext) (AILayerList list, AILayerList* next); + + /** Gets the number of layers in a layer list. Use with \c #GetFirstLayer() + and \c #GetNextLayer() to iterate through the layers. + @param list The layer list. + @param count [out] A buffer in which to return the number of layers. + */ + AIAPI AIErr (*CountLayers) (AILayerList list, ai::int32* count); + + /** Retrieves the topmost layer in the stacking order of a layer list. + @param list The layer list. + @param layer [out] A buffer in which to return the layer. + */ + AIAPI AIErr (*GetFirstLayer) (AILayerList list, AILayerHandle* layer); + + /** Retrieves the bottommost layer in the stacking order of a layer list. + @param list The layer list. + @param layer [out] A buffer in which to return the layer. + */ + AIAPI AIErr (*GetLastLayer) (AILayerList list, AILayerHandle* layer); + + /** Retrieves the next lower layer in the stacking order of a layer list. + @param list The layer list. + @param layer A layer in the list. + @param layer [out] A buffer in which to return the next lower layer, + or \c NULL if this is the lowest layer. + */ + AIAPI AIErr (*GetNextLayer) (AILayerList list, AILayerHandle layer, AILayerHandle* next); + + /** Retrieves the next higher layer in the stacking order of a layer list. + @param list The layer list. + @param layer A layer in the list. + @param layer [out] A buffer in which to return the next higher layer, + or \c NULL if this is the highest layer. + */ + AIAPI AIErr (*GetPrevLayer) (AILayerList list, AILayerHandle layer, AILayerHandle* prev); + + /** Sets the display mode to be used when rendering the layer list. + @param list The layer list. + @param mode The new display mode, an \c #AILayerListModeValues value. + */ + AIAPI AIErr (*SetDisplayMode) (AILayerList list, AILayerListMode mode); + + /** Retrieves the display mode used when rendering the layer list. + (Note that this function returns a constant value, not an error code.) + @param list The layer list. + @return The display mode, an \c #AILayerListModeValues value. + */ + AIAPI AILayerListMode (*GetDisplayMode) (AILayerList list); + + /** Retrieves the tag that identifies the purpose of a layer list. + (Note that this function returns a constant value, not an error code.) + @param list The layer list. + @return The tag, \c #kAIDocumentLayerList or \c #kAITransparencyMaskLayerList. */ + AIAPI const char* (*GetTag) (AILayerList list); + + /** Sets the editability mode of a layer list. Use to set non-default + editability for a transparency-mask layer. It is best to set this immediately + after initializing the layer list, while processing the + \c #kSelectorAIPushLayerList message. You cannot modify the + editability mode of the document layer list. + @param list The layer list. + @param mode The new editability mode, one of the + \c #AILayerListEditabilityModeValues. + */ + AIAPI AIErr (*SetEditabilityMode) ( AILayerList list, AILayerListEditabilityMode mode ); + + /** Retrieves the editability mode of a layer list. + (Note that this function returns a constant value, not an error code.) + @param list The layer list. + @return The mode, one of the \c #AILayerListEditabilityModeValues. + */ + AIAPI AILayerListEditabilityMode (*GetEditabilityMode) (AILayerList list); + +} AILayerListSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILegacyTextConversion.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILegacyTextConversion.h index 4676a3a..4634c39 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILegacyTextConversion.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILegacyTextConversion.h @@ -1,102 +1,102 @@ -#ifndef __AILegacyTextConversion__ -#define __AILegacyTextConversion__ - -/* - * Name: AILegacyTextConversion.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Text Frame Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AILegacyTextConversion.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAILegacyTextConversionSuite "AI Legacy Text Conversion Suite" -#define kAILegacyTextConversionSuiteVersion3 AIAPI_VERSION(3) -#define kAILegacyTextConversionSuiteVersion kAILegacyTextConversionSuiteVersion3 -#define kAILegacyTextConversionVersion kAILegacyTextConversionSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions to convert legacy text objects (from earlier - versions of Illustrator) to native text objects. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAILegacyTextConversionSuite and \c #kAILegacyTextConversionVersion. -*/ -typedef struct { - - /** Converts a legacy text object to native Illustrator text art objects. - @param art The legacy text object. This function does not dispose of the object. - @param paintOrder The position for the new artwork in the - paint order, relative to the \c prep object. - See \c AITypes::AIPaintOrder. - @param prep The prepositional art object. - @param ret [out] A buffer in which to return a group art object containing art objects - of type \c #kTextFrameArt. - */ - AIAPI AIErr (*ConvertToNative)(AIArtHandle art, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle* ret); - - /** Traverses the artwork tree of the current document and converts every - art object of type \c #kLegacyTextArt to an object of type \c #kTextFrameArt. - @param foundAnyLegacy [out] A buffer in which to return true if any - legacy text objects were found the document. May be \c NULL. - */ - AIAPI AIErr (*ConvertAllToNative)(AIBoolean* foundAnyLegacy); - - /** Reports whether a legacy art object is a copy--that is, the result - of executing the "Copy text object" command, which converts to native art, - and retains the legacy art behind it, with 40% transparency. - @param LegacyArt The legacy art object. - @param aCopy [out] A buffer in which to return true if the art is a copy. - */ - AIAPI AIErr (*IsACopy)( AIArtHandle LegacyArt , AIBoolean *aCopy); - -} AILegacyTextConversionSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AILegacyTextConversion__ +#define __AILegacyTextConversion__ + +/* + * Name: AILegacyTextConversion.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Text Frame Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AILegacyTextConversion.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAILegacyTextConversionSuite "AI Legacy Text Conversion Suite" +#define kAILegacyTextConversionSuiteVersion3 AIAPI_VERSION(3) +#define kAILegacyTextConversionSuiteVersion kAILegacyTextConversionSuiteVersion3 +#define kAILegacyTextConversionVersion kAILegacyTextConversionSuiteVersion + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions to convert legacy text objects (from earlier + versions of Illustrator) to native text objects. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAILegacyTextConversionSuite and \c #kAILegacyTextConversionVersion. +*/ +typedef struct { + + /** Converts a legacy text object to native Illustrator text art objects. + @param art The legacy text object. This function does not dispose of the object. + @param paintOrder The position for the new artwork in the + paint order, relative to the \c prep object. + See \c AITypes::AIPaintOrder. + @param prep The prepositional art object. + @param ret [out] A buffer in which to return a group art object containing art objects + of type \c #kTextFrameArt. + */ + AIAPI AIErr (*ConvertToNative)(AIArtHandle art, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle* ret); + + /** Traverses the artwork tree of the current document and converts every + art object of type \c #kLegacyTextArt to an object of type \c #kTextFrameArt. + @param foundAnyLegacy [out] A buffer in which to return true if any + legacy text objects were found the document. May be \c NULL. + */ + AIAPI AIErr (*ConvertAllToNative)(AIBoolean* foundAnyLegacy); + + /** Reports whether a legacy art object is a copy--that is, the result + of executing the "Copy text object" command, which converts to native art, + and retains the legacy art behind it, with 40% transparency. + @param LegacyArt The legacy art object. + @param aCopy [out] A buffer in which to return true if the art is a copy. + */ + AIAPI AIErr (*IsACopy)( AIArtHandle LegacyArt , AIBoolean *aCopy); + +} AILegacyTextConversionSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILimits.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILimits.h new file mode 100644 index 0000000..df82869 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILimits.h @@ -0,0 +1,91 @@ +/************************************************************************* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +**************************************************************************/ + +#pragma once + + +#define kAILimitsSuite "AI Limits Suite" +#define kAILimitsSuiteVersion AIAPI_VERSION(2) +#define kAILimitsVersion kAILimitsSuiteVersion + +#include + +#include "AITypes.h" + +namespace ai +{ + constexpr auto kInfinity = std::numeric_limits::infinity(); + + // Use following constants for initializing "bounds" which will contain a union of bounds. + // kNullUnionBoundsSoft has max limits considering axis +Y going in bottom + // kNullUnionBoundsHard has max limits considering axis +Y going in top (+X going in left in both of above) + // { LEFT, TOP, RIGHT, BOTTOM }; + constexpr AIRealRect kNullUnionBoundsHard{ kInfinity , kInfinity , -kInfinity , -kInfinity }; + constexpr AIRealRect kNullUnionBoundsSoft{ kInfinity , -kInfinity , -kInfinity , kInfinity }; + +} + +#include "AIHeaderBegin.h" +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +This suite provides utilities that allow you to get the Limits . + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAILimitsSuite and \c #kAILimitsSuiteVersion. + +*/ +enum class AIDecimalPrecisionType : ai::uint16 +{ + kValue = 0, // precision for general value inputs like color, opacity etc + kDimension, // precision for dimensions like length, height etc + kType, // for values related to text + kScale, // for scaling factors + kArtboardSize, // for artboard dimensions + kPercentage, // for percentage values + kColor, // precision for color values + kAngle, // for angle values + kResolution, // for resolution values + kStroke //Precision for stroke dimension +}; + +struct AILimitsSuite +{ + /** Retrieves the size of the canvas. + (Note that this function returns a constant value, not an error code.) + @return The canvas size (assuming square canvas) + */ + AIAPI ai::int32(*GetCanvasSize)(); + + /** + * Returns the default large canvas scaling, compared to the regular canvas size. + (Note that this function returns a constant value, not an error code.) + */ + AIAPI AIReal(*GetLargeCanvasScale)(); + + AIAPI ai::int32(*GetDecimalPrecision)(AIDecimalPrecisionType type); + AIAPI AIReal(*GetMinTransformDimensionValue)(); +}; + +#include "AIHeaderEnd.h" + + + + + + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEdit.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEdit.h new file mode 100644 index 0000000..db36fa4 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEdit.h @@ -0,0 +1,190 @@ +/******************************************************************************* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +*******************************************************************************/ + +#pragma once + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "IAILiteralString.h" +#include "AITool.h" + +#include "AIHeaderBegin.h" + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAILiveEditSuite "AI Live Edit Suite" +#define kAILiveEditSuiteVersion2 AIAPI_VERSION(2) +#define kAILiveEditSuiteVersion kAILiveEditSuiteVersion2 +#define kAILiveEditVersion kAILiveEditSuiteVersion + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +struct AILiveEditSuite +{ + + /** Reports whether current interactive art manipulation is in Live Editing + mode. + + @note This is the method one would call to determine whether to + render appearance live or not during art manipulation. + */ + AIAPI AIBool8 (*IsLiveEditingAdvisable) (); + + /** Reports whether current interactive art manipulation is in abandoned + mode. + + @note This is the method one would call to determine whether + rendering live appearances has been abandoned during this art + manipulation. + */ + AIAPI AIBool8 (*IsLiveEditingAbandoned) (); + + /** Register a plugin tool to participate in live editing. Registering + causes future tool usage to automatically make live edit calls + \c ChangeBeginNotify(), \c ChangeContinueStartNotify(), + \c ChangeContinueEndNotify() and \c ChangeFinishNotify() appropriately. + + @param inPluginTool Tool handle of the plugin tool. + + @param inFeatureName Feature name to be used in live editing + session. This can be any unique string like + tool or widget name. Must not be empty + string. + + @param inEPFOverrideValue Specify EPF (event processing frequency) + override value for this tool. Valid value + range is from + \c #ai::LiveEdit::EPF::kMinimumLimitValue + to + \c #ai::LiveEdit::EPF::kMaximumLimitValue. + To use the global (default) EPF value use + \c #ai::LiveEdit::EPF::kUseGlobaLimitValue. + + @note Feature names starting with "ai::" are reserved for use by + Adobe plugins. + + @see \c #AIToolSuite::AddTool(), \c #DeregisterLiveEditPluginTool() + */ + AIAPI AIErr (*RegisterLiveEditPluginTool) (AIToolHandle inPluginTool, + const ai::LiteralString& inFeatureName, AIReal inEPFOverrideValue); + + /** Deregister a previously registered plugin tool so that it no longer + participates in live editing. + + @param inPluginTool Tool handle of the plugin tool. + + @see \c #AIToolSuite::AddTool(), \c #RegisterLiveEditPluginTool() + */ + AIAPI AIErr (*DeregisterLiveEditPluginTool) (AIToolHandle inPluginTool); + + /** Widget manipulating art interactively must call this method at the + beginning of the manipulation session (mouse-down/touch-start). + Tools registered using \c RegisterLiveEditPluginTool() calls this + automatically at appropriate time. + + @param inFeatureName Feature name to be used in live editing + session. This can be any unique string like + tool or widget name. Must not be empty + string. + + @param inEPFOverrideValue Specify EPF (event processing frequency) + override value for this manipulation + session. Valid value range is from + \c #ai::LiveEdit::EPF::kMinimumLimitValue + to + \c #ai::LiveEdit::EPF::kMaximumLimitValue. + To use the global (default) EPF value use + \c #ai::LiveEdit::EPF::kUseGlobaLimitValue. + + @note This call must be balanced with a later call to + \c #ChangeFinishNotify(). + + @see class \c #StLiveEditBeginFinishChangeNotifyHelper + */ + AIAPI AIErr (*ChangeBeginNotify) (const ai::LiteralString& inFeatureName, + AIReal inEPFOverrideValue); + + /** Widget manipulating art interactively must call this method when it + starts processing a change event (mouse-drag/touch-move). + Tools registered using \c RegisterLiveEditPluginTool() calls this + automatically at appropriate time. + + @note This call must be balanced with a later call to + \c #ChangeContinueEndNotify() and must occur after a call to + \c #ChangeBeginNotify() but before \c #ChangeFinishNotify(). + + @see class \c #StLiveEditContinueChangeNotifyHelper + */ + AIAPI AIErr (*ChangeContinueStartNotify) (); + + /** Widget manipulating art interactively must call this method when it + ends processing a change event (mouse-drag/touch-move). + Tools registered using \c RegisterLiveEditPluginTool() calls this + automatically at appropriate time. + + @note This call must be balanced with an earlier call to + \c #ChangeContinueStartNotify() and must occur after a call to + \c #ChangeBeginNotify() but before \c #ChangeFinishNotify(). + + @see class \c #StLiveEditContinueChangeNotifyHelper + */ + AIAPI AIErr (*ChangeContinueEndNotify) (); + + /** Widget manipulating art interactively must call this method at the end + of the manipulation session (mouse-up/touch-end/touch-cancel). + Tools registered using \c RegisterLiveEditPluginTool() calls this + automatically at appropriate time. + + @note This call must be balanced with an earlier call to + \c #ChangeBeginNotify(). + + @see class \c #StLiveEditBeginFinishChangeNotifyHelper + */ + AIAPI AIErr (*ChangeFinishNotify) (); + + /** Call this method to temporarily suspend Live Editing session. + + @note This call must be balanced with a later call to + \c #ResumeLiveEditing(). + + @see class \c #StLiveEditSuspender + */ + AIAPI AIErr (*SuspendLiveEditing) (); + + /** Call this method to resume the suspended Live Editing session. + + @note This call must be balanced with an earlier call to + \c #SuspendLiveEditing(). + + @see class \c #StLiveEditSuspender + */ + AIAPI AIErr (*ResumeLiveEditing) (); + +}; + + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEditConstants.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEditConstants.h new file mode 100644 index 0000000..a286f75 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEditConstants.h @@ -0,0 +1,50 @@ +/******************************************************************************* + * ADOBE CONFIDENTIAL + * + * Copyright 2018 Adobe + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. If you have received this file from a source other than Adobe, + * then your use, modification, or distribution of it requires the prior + * written permission of Adobe. +*******************************************************************************/ + +#pragma once + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AITypes.h" + +#include "AIHeaderBegin.h" + +/******************************************************************************* + ** + ** Constants + ** + **/ + + +namespace ai +{ + namespace LiveEdit + { + + // EPF (event processing frequency) + namespace EPF + { + constexpr AIReal kMinimumLimitValue { 1.0 }; // 1000 ms per event + constexpr AIReal kMaximumLimitValue { 60.0 }; // 1000/60 ms per event + + constexpr AIReal kUseGlobaLimitValue { 0.0 }; // Maps to system default + } + + } +} + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEffect.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEffect.h index 23bfb1e..ea806e7 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEffect.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AILiveEffect.h @@ -1,872 +1,897 @@ -#ifndef __AILiveEffect__ -#define __AILiveEffect__ - -/* - * Name: AILiveEffect.h - * Author: - * Date: - * Purpose: Adobe Illustrator Effect Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIDict__ -#include "AIDictionary.h" -#endif - -#ifndef __AIFilter__ -#include "AIFilter.h" -#endif - -#ifndef __AIMenu__ -#include "AIMenu.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIXMLElement__ -#include "AIXMLElement.h" -#endif - - - -#include "AIHeaderBegin.h" - -/** @file AILiveEffect.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAILiveEffectSuite "AI Live Effect Suite" -#define kAILiveEffectSuiteVersion AIAPI_VERSION(6) -#define kAILiveEffectVersion kAILiveEffectSuiteVersion - -/** @ingroup Callers - The Live Effect caller. See \c #AILiveEffectSuite. */ -#define kCallerAILiveEffect "AI Live Effect" - - -/** If your effect gets new options in a later version that are not supported by earlier versions, - such that the objects carrying the new options should be expanded (output as the styled art only) - upon legacy save, while objects with options supported by the older versions should NOT be expanded, - then set the value of this key in the effect's parameter dictionary to the app version which first - supports the new option values (as an integer, e.g., CS 5 = 15). - See also c\ #AILiveEffectSuite::SetLiveEffectAppVersion for situations where the version compatibility - is not dependent upon the effect options. */ -#define kAILiveEffectParamsExpandBeforeKey "Adobe Effect Expand Before Version" - -#define kAILiveEffectParamsWriteAlternateVersionMajorKey "Adobe Effect Expand Write Alternate Version Major" -#define kAILiveEffectParamsWriteAlternateVersionMinorKey "Adobe Effect Expand Write Alternate Version Minor" - - -// These are the effect messages. - -/** @ingroup Selectors - Sends an \c #AILiveEffectEditParamMessage. - */ -#define kSelectorAIEditLiveEffectParameters "AI Live Effect Edit Parameters" -/** @ingroup Selectors - Sends an \c #AILiveEffectGoMessage. - */ -#define kSelectorAIGoLiveEffect "AI Live Effect Go Live" -/** @ingroup Selectors - Sends an \c #AILiveEffectInterpParamMessage. */ -#define kSelectorAILiveEffectInterpolate "AI Live Effect Interpolate Parameters" -/** @ingroup Selectors - Sends an \c #AILiveEffectInputTypeMessage. */ -#define kSelectorAILiveEffectInputType "AI Live Effect Input Type" -/** @ingroup Selectors - Sends an \c #AILiveEffectConvertColorMessage. */ -#define kSelectorAILiveEffectConverColorSpace "AI Live Effect Convert Color Space" -/** @ingroup Selectors - Sends an \c #AILiveEffectScaleParamMessage. */ -#define kSelectorAILiveEffectScaleParameters "AI Live Effect Scale Parameters" -/** @ingroup Selectors - Sends an \c #AILiveEffectHandleMergeMessage. */ -#define kSelectorAILiveEffectHandleMerge "AI Live Effect Handle Merge" -/** @ingroup Selectors - Sends an \c #AILiveEffectGetSVGFilterMessage. */ -#define kSelectorAILiveEffectGetSVGFilter "AI Live Effect Get SVG Filter" -/** @ingroup Selectors - Sends an \c #AILiveEffectAdjustColorsMessage. */ -#define kSelectorAILiveEffectAdjustColors "AI Live Effect Adjust Colors" -/** @ingroup Selectors - Sends an \c #AILiveEffectIsCompatibleMessage */ -#define kSelectorAILiveEffectIsCompatible "AI Live Effect Is Compatible" - - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - A string entry that is displayed by the palette in preference - to the filter name, if it is set. For example, Punk & Bloat might set it to "Punk" or - "Bloat" to tell which filter is used. For a stroke or fill filter, it is displayed - next to the color swatch. */ -#define kDisplayStringKey "DisplayString" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - A string entry that gives extra information for the palette - to display for this filter, for example as a tool tip. Can - mention the most important parameters. */ -#define kExtraStringKey "ExtraString" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - The fill color to use, a \c #FillStyleType. Set - for a fill filter when the filter is installed. */ -#define kFillStyleKey "FillStyle" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - A \c #FillStyleType for fill filters, but with the object's style matrix - multiplied in for gradient fills. Effects with a fill style parameter - should usually first look for this key in the instance info, and if it is present, - use its value. If it is not present, it should look for kFillStyleKey. */ -#define kTransformedFillStyleKey "TransformedFillStyle" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - A \c #MatrixType value for fill filters. If the object's fill style matrix - is not identity, this will be set in the instance info. The matrix will - also be factored into the transformed fill style, but it contains information - that is not available in the gradient fields, such as whether there is - a reflection. */ -#define kFillStyleMatrixKey "FillStyleMatrix" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - A \c #BooleanType value for fill filters. */ -#define kEvenOddKey "UseEvenOdd" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - A \c #StrokeStyleType for stroke filters. */ -#define kStrokeStyleKey "StrokeStyle" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - A \c #StrokeStyleType for stroke filters, but with the object's style matrix - multiplied in for gradient strokes. Effects with a stroke style parameter - should usually first look for this key in the instance info, and if it is present, - use its value. If it is not present, it should look for kStrokeStyleKey. */ -#define kTransformedStrokeStyleKey "TransformedStrokeStyle" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - A \c #MatrixType value for stroke filters. If the object's stroke style matrix - is not identity, this will be set in the instance info. The matrix will - also be factored into the transformed stroke style, but it contains information - that is not available in the gradient fields, such as whether there is - a reflection. */ -#define kStrokeStyleMatrixKey "StrokeStyleMatrix" - -/** @ingroup DictKeys - Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. - An \c #AIReal used to scale parameters while processing - the Go message. You should scale parameters locally; do not modify - the values in the actual parameter dictionary. */ -#define kScaleFactorKey "ScaleFactorString" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a Live Effect. It is never dereferenced.*/ -typedef struct _t_AILiveEffectOpaque* AILiveEffectHandle; - /** Opaque reference to a Live Effect parameter context.*/ -typedef struct _t_AILiveEffectParamContext* AILiveEffectParamContext; - - -/** Defines the menu item for a Live Effect. */ -struct AddLiveEffectMenuData { - /** The submenu in which the menu item should appear, - or \c NULL to place at the top level of the Effects menu. */ - char *category; - /** The localizable display string for the menu item */ - char *title; - /** Not used. Pass 0. */ - ai::int32 options; -}; - - -/** The parameters for a Live Effect, stored in a dictionary. */ -typedef AIDictionaryRef AILiveEffectParameters; -typedef ConstAIDictionaryRef ConstAILiveEffectParameters; - - -/** Bit flags for Live Effect style properties, which specify - how the filter is applied and what features it supports. - An effect must be registered with exactly one of the - first four values, which denote the filter type. The last - three values can be ORed together with the filter type. - Pass to \c #AILiveEffectSuite::AddLiveEffect() - in \c #AILiveEffectData::styleFilterFlags. */ -enum AIStyleFilterFlags { - /** Clears all flags. */ - kNoFlags = 0, - /** Applied by default before the object is painted with fill or stroke. */ - kPreEffectFilter = 0x1, - /** Applied by default after the object is painted with fill or stroke. */ - kPostEffectFilter = 0x2, - /** Replaces the default stroke behavior. - Brushes are an example of an effect of this type. */ - kStrokeFilter = 0x3, - /** Replaces the default fill behavior. */ - kFillFilter = 0x4, - /** A mask to OR with the filter-style value to retrieve specific bit flags. - Do not use with \c #AILiveEffectSuite::AddLiveEffect(). */ - kFilterTypeMask = 0x0ffff, - /** Internal. Do not use. */ - kSpecialGroupPreFilter = 1 << 16, - /** Parameters can be scaled. */ - kHasScalableParams = 1 << 17, - /** Supports automatic rasterization. */ - kUsesAutoRasterize = 1 << 18, - /** Supports the generation of an SVG filter. */ - kCanGenerateSVGFilter = 1 << 19, - /** Has parameters that can be modified by a \c #kSelectorAILiveEffectAdjustColors message. */ - kHandlesAdjustColorsMsg = 1 << 20, - /** Handles \c #kSelectorAILiveEffectIsCompatible messages. If this flag is not set the message will not be sent. */ - kHandlesIsCompatibleMsg = 1 << 21 -}; - - -/** The kinds of objects in input art that an effect can operate on. - If input art contains objects the effect does not handle, Illustrator looks for a - conversion filter to convert the input art to a type that is handled. If no - such filter is available, the input art is passed unchanged. The effect should - pass through unchanged any art that it cannot handle, */ -enum AIStyleFilterPreferredInputArtType { - /** The \c #kSelectorAILiveEffectInputType message is sent - to the plug-in to determine the input type */ - kInputArtDynamic = 0, - /** Handles groups. */ - kGroupInputArt = 1 << ((ai::int32) kGroupArt - 1), - /** Handles paths. */ - kPathInputArt = 1 << ((ai::int32) kPathArt - 1), - /** Handles compound paths. */ - kCompoundPathInputArt = 1 << ((ai::int32) kCompoundPathArt - 1), - - /** Obsolete */ - kTextInputArtUnsupported = 1 << ((ai::int32) kTextArtUnsupported - 1), - /** Obsolete */ - kTextPathInputArtUnsupported= 1 << ((ai::int32) kTextPathArtUnsupported - 1), - /** Obsolete */ - kTextRunInputArtUnsupported = 1 << ((ai::int32) kTextRunArtUnsupported - 1), - /** Handles placed objects. */ - kPlacedInputArt = 1 << ((ai::int32) kPlacedArt - 1), - /** Handles mystery paths. */ - kMysteryPathInputArt = 1 << ((ai::int32) kMysteryPathArt - 1), - /** Handles raster art. */ - kRasterInputArt = 1 << ((ai::int32) kRasterArt - 1), - - /** Handles plug-in groups. If not set, the effect receives the result group - instead of the plug-in group itself. */ - kPluginInputArt = 1 << ((ai::int32) kPluginArt - 1), - /** Handles meshes. */ - kMeshInputArt = 1 << ((ai::int32) kMeshArt - 1), - /** Handles text frames. */ - kTextFrameInputArt = 1 << ((ai::int32) kTextFrameArt - 1), - /** Handles symbols. */ - kSymbolInputArt = 1 << ((ai::int32) kSymbolArt - 1), - /** Handles foreign objects. */ - kForeignInputArt = 1 << ((ai::int32) kForeignArt - 1), - /** Handles legacy text. */ - kLegacyTextInputArt = 1 << ((ai::int32) kLegacyTextArt - 1), - /** Handles charts. */ - kChartInputArt = 1 << ((ai::int32) kChartArt - 1), - - /** Handles any input art. */ - kAnyInputArt = 0xFFFF, - /** Handles any input art other than plug-in groups, which - are replaced by their result art. */ - kAnyInputArtButPluginArt = kAnyInputArt & ~kPluginInputArt, - - // Special values that don't correspond to regular art types should be in the high half word - - /** Not implemented. */ - // When set, convert strokes to outlines before sending to effect - kOutlinedStrokeInputArt = 0x10000, - /** Does \e not handle clipping paths or clipping text. - Not needed if paths are not handled. */ - - /* (Because it would destroy them by rasterizing, for example, - or by splitting a single path into multiple non-intersecting paths, - or by turning it into a plug-in group, like the brush filter). - This flag is on for "Not OK" instead of on for "OK" because destroying clipping paths is - an exceptional condition and we don't want to require normal filters to explicitly say they're OK. */ - kNoClipMasksInputArt = 0x20000 - -}; - - -/** Ways that a Live Effect can be merged with the existing styles of selected objects. */ -enum AILiveEffectMergeAction { - /** Append this effect to the current style. */ - kAppendLiveEffectToStyle, - /** Replace the current fill style with this effect. */ - kReplaceFillWithLiveEffect, - /** Replace the current stroke style with this effect. */ - kReplaceStrokeWithLiveEffect, - /** Bit flag can be ORed with replacement styles to send - a \c #kSelectorAILiveEffectHandleMerge message to handle - the parameters of the merge. Not used with \c #kAppendLiveEffectToStyle */ - kSendHandleMergeMessage = 0x10000 -}; - - -/** Information supplied when registering a Live Effect - with \c #AILiveEffectSuite::AddLiveEffect(). */ -struct AILiveEffectData { - /** The plug-in that is registering the effect and that - receives effect messages. */ - SPPluginRef self; - /** A unique identifying name of the effect, not localized. */ - const char* name; - /** A localized display title for the effect. */ - char *title; - /** Major version number of this plug-in. */ - ai::int32 majorVersion; - /** Minor version number of this plug-in. */ - ai::int32 minorVersion; - /** The type of art this effect can operation on, - a \c #AIStyleFilterPreferredInputArtType value.*/ - ai::int32 prefersAsInput; - /** The type and supported features of this effect, - a logical OR of \c #AIStyleFilterFlags. */ - ai::int32 styleFilterFlags; -}; - - - -// -// The contents of Live Effect messages. -// - -/** Sent when the user chooses your registered effect from the Effects menu, - after the Edit parameters message that allows you to collect parameter - values from the user. Also sent when the effect needs to be run in response - to user edits to the objects. - The plug-in should respond by running its effect on the supplied art object - using the supplied parameters. */ -struct AILiveEffectGoMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** The current parameters block, as returned from the Edit parameters message. */ - AILiveEffectParameters parameters; - /** [in, out] A set of parameters that the plug-in may have stored - from an earlier invocation on this object.*/ - AILiveEffectParameters instanceInfo; - /** [in, out] The art object to be edited with this effect. - You must not modify any ancestor objects, nor modify the document artwork tree. - The plug-in is responsible for proper deletion of objects in source - art that it removes. You can set this to \c NULL if the effect - does not return any art; in this case, Illustrator disposes of - the input art. */ - AIArtHandle art; -}; - -/** Sent when the user chooses a your registered effect from the Effects menu, - or when the user later edits the effect using the appearance palette. - - The plug-in can ignore the selector if it does not require user input; - otherwise, it should collect parameter values from the user, - typically using a modal dialog. If previews are enabled, it can then - update the artwork using \c #AILiveEffectSuite::UpdateParameters() - to preview the results. - The plug-in must call \c #AILiveEffectSuite::UpdateParameters() after - it finishes collecting user input and updating values. - */ -struct AILiveEffectEditParamMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** [in, out] A set of parameters that the plug-in may have stored - from an earlier invocation. Modify values if desired. */ - AILiveEffectParameters parameters; - /** The parameter context, passed to various functions. */ - AILiveEffectParamContext context; - /** True if preview is enabled. If it is, the plug-in can call - \c #AILiveEffectSuite::UpdateParameters after modifying the parameters, - to update the associated artwork. The plug-in receives a Go message - after updating parameters.*/ - AIBoolean allowPreview; - - /** True if this is the first time this effect is being applied by this plug-in, - false if the effect is being modified (from the Appearance panel, for example). - **/ - AIBoolean isNewInstance; -}; - -/** Sent when the user chooses to interpolate a new point into the parameter - set for an effect. This happens when Illustrator attempts to blend two objects - that have Live Effects applied to them; for example, if you select two objects - with an effect and choose Object>Blend>Make. The intermediate objects between - the two blended objects need to have effects applied to them as well, which - need to have values that are the interpolated results between the two blended objects. - - Pass the parameter blocks to \c #AILiveEffectSuite::InterpolateEffectParameters(). -*/ -struct AILiveEffectInterpParamMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** A parameter block indicating a starting point. */ - AILiveEffectParameters startParams; - /** A parameter block indicating an ending point.*/ - AILiveEffectParameters endParams; - /** [out] A parameter block to contain the interpolated point. */ - AILiveEffectParameters outParams; - /** A percentage of the distance between \c startParams - and \c endParams, expressed as a value in the range [0..1]. - The new value is interpolated at this point. */ - AIReal percent; - -}; - -/** Sent when the user selects an effect whose input type is - \c #kInputArtDynamic. If the type computation depends on input art, - the plug-in can examine the passed art object to decide on the type. -*/ -struct AILiveEffectInputTypeMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** The current parameter block for the effect. */ - AILiveEffectParameters parameters; - /** The art object whose type is to be computed. */ - AIArtHandle inputArt; - /** [out] The type of art that can be operated on by this effect - with this parameter set, an \c #AIStyleFilterPreferredInputArtType value. - \li If the input art is a type that this effect can filter, set to \c #kAnyInputArt. - \li Otherwise, set to the type to which the art should be converted. */ - ai::int32 typeMask; -}; - -/** Sent with a request to convert any private color data the plug-in - has stored in a dictionary to a new color space. - This is only for private color information. Normal fill and stroke color - information is automatically converted. -*/ -struct AILiveEffectConvertColorMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** The current parameter block for the effect. */ - AILiveEffectParameters parameters; - /** The new color space. */ - AIColorTag newColorSpace; -}; - -/** Sent with \c #kSelectorAILiveEffectAdjustColors to allow another plug-in that does - color manipulations to extract and/or modify any private color data that the effect plug-in has - stored in its parameter dictionary, including colors contained indirectly in art objects, art - styles or symbol references. This parameter block contains only private color information - for an effect. Normal fill and stroke colors (that is, those which are stored under - \c #kFillStyleKey or \c #kStrokeStyleKey) are adjusted without consulting the effect. - - The color-adjustment callback is supplied by a plug-in other than the one that manages the effect. - The initial request is generally initiated by \c #AIPathStyleSuite::AdjustObjectAIColors(), and - the effect that receives this message has been encountered while processing that request. - - - \li If the parameter dictionary contains private \c #AIColor values, they should be passed - directly to the color-adjustment callback. - - \li If the parameter dictionary contains art objects that contain meaningful colors, those objects - should be passed to \c #AIPathStyleSuite::AdjustObjectAIColors(), along with this callback function, - client data, and control flags. - - \li If the parameter dictionary contains symbol handles or brush pattern handles that contain meaningful - colors, the symbol patterns or brush patterns should be passed to the pattern-adjustment callback. - These could be, for example, symbols mapped to surfaces by the 3D effect. - Other symbols can be ignored; for example, symbols that define 3D bevel shapes. -*/ -struct AILiveEffectAdjustColorsMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** The current parameter block for the effect. */ - AILiveEffectParameters parameters; - - /** A callback function to adjust colors, supplied by a plug-in - other than the one that manages the effect. - See \c #AIPathStyleSuite::AdjustObjectAIColors(). */ - AIAdjustColorFunc adjustColorCallback; - /** A callback function to adjust patterns, supplied by a plug-in - other than the one that manages the effect. */ - AIAdjustPatternHandleFunc adjustPatternHandleCallback; - /** Developer-defined private data to pass to the callback. */ - void *clientData; - /** A logical OR of bit-flag constants that controls which colors are passed to the callback.*/ - VisitAIColorFlags controlFlags; - - /** [out] Set to true if the handler modified any colors. */ - AIBoolean modifiedSomething; -}; - - -/** Sent with a request to scale effect parameters. */ -struct AILiveEffectScaleParamMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** [in, out] The current parameters for the effect. - Modify values in place. */ - AILiveEffectParameters parameters; - /** The factor by which to scale the parameters. - A percentage value where 1 is 100%. */ - AIReal scaleFactor; - /** [out] Set to true to indicate that the effect modified the parameters. */ - AIBoolean scaledParams; -}; - -/** Sent to a plug-in that has initiated a merge with - \c #AILiveEffectSuite::MergeLiveEffectIntoSelection(), - so that the plug-in can handle the merge operation. -*/ -struct AILiveEffectHandleMergeMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** The effect object currently in use, if any. - \c NULL if replacing a default fill or stroke with an effect. */ - AILiveEffectHandle oldEffect; - /** [out] Set to true to prevent the merge. */ - AIBoolean dontMerge; - /** [out] Set to true to preserve instance information from the existing - effect, if any. */ - AIBoolean keepInstanceInfo; - /** [in, out] The parameter block for the existing effect, if any. Modify in place. - If \c NULL, the Edit message is sent to collect parameters. */ - AILiveEffectParameters parameters; -}; - -/** Sent with a request to obtain an SVG filter representation of an effect. - Sent only if the effect plug-in has indicated that it can generate an SVG filter - to represent itself. - - - In: 'effect' handle returned when the effect was registered. - - In: 'parameters' handle to live effect parameter set to be used. - - Out: 'svgFilterUID' return a handle to the UID representing the SVG filter. -*/ -struct AILiveEffectGetSVGFilterMessage { - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** The current parameter block for the effect. */ - AILiveEffectParameters parameters; - /** [out] Set to the SVG filter object. */ - AISVGFilterHandle svgFilter; -}; - -/** Sent when saving a file to allow the live effect to make a detailed check for - legacy compatibility. This message is only sent if the \c #kHandlesIsCompatibleMsg - flag is set. If the flag is not set version compatibility is checked against - values provided by SetLiveEffectAppVersion. The recipient must set the - 'compatible' member below indicate version compatibility. -*/ -struct AILiveEffectIsCompatibleMessage { - explicit AILiveEffectIsCompatibleMessage( - AILiveEffectHandle thisEffect = 0, - AIVersion version = kAIVersion1, - ConstAILiveEffectParameters params = 0, - AIBoolean compat = false) - : effect(thisEffect), appVersion(version), parameters(params), compatible(compat) {} - - /** The message data. */ - SPMessageData d; - /** The effect object. */ - AILiveEffectHandle effect; - /** Application version to check compatibility against. */ - AIVersion appVersion; - /** The current parameter block for the effect. */ - ConstAILiveEffectParameters parameters; - - /** [out] Set to true if compatible with appVersion, false otherwise. */ - AIBoolean compatible; -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows your plug-in to implement a Live Effect. - A Live Effect is a filter that can be attached to an art object as part of - its style. Any time the art object is changed, the filter is automatically - re-executed. More than one filter can be attached to an object, which allows - filter \e chains and \e stacks. - \li A chain is a pipeline where the output of one filter - becomes the input to the next. - \li A stack passes the same input art to a set of filters, - stacking the output of each filter. - - If a document contains a Live Effect that is not available, the document - can be opened, but art with that effect applied cannot be edited. - - Your Live Effect plug-in must respond to the caller \c #kCallerAILiveEffect - and the following selectors: -
\c #kSelectorAIEditLiveEffectParameters -
\c #kSelectorAIGoLiveEffect -
\c #kSelectorAILiveEffectInterpolate -
\c #kSelectorAILiveEffectInputType -
\c #kSelectorAILiveEffectConverColorSpace -
\c #kSelectorAILiveEffectScaleParameters -
\c #kSelectorAILiveEffectHandleMerge -
\c #kSelectorAILiveEffectGetSVGFilter - - Most Live Effects have a set of parameters that control their behavior. For - example, the Roughen effect has parameters for the size and detail of the roughening. - You can store these in the parameter dictionary that is associated with the effect - in the style. Use the \c #AIDictionarySuite to access the contents of the dictionary. - You can store any information in the parameter dictionary; however the following keys - are predefined: -
\c #kDisplayStringKey -
\c #kExtraStringKey -
\c #kFillStyleKey -
\c #kEvenOddKey -
\c #kStrokeStyleKey -
\c #kScaleFactorKey -
\c #kAILiveEffectParamsExpandBeforeKey - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAILiveEffectSuite and \c #kAILiveEffectVersion. -*/ -struct AILiveEffectSuite { - - /** Registers a Live Effect. - @param effectInfo A pointer to the structure that defines the effect. You must - allocate and fill the structure before making the call. - @param liveEffectHandle [out] A buffer in which to return the effect object. - */ - AIAPI AIErr (*AddLiveEffect) ( AILiveEffectData* effectInfo, AILiveEffectHandle *liveEffectHandle ); - - /** Adds a menu item for a Live Effect to the Effects menu, using a predefined filter. - @param liveEffectHandle The effect object. - @param filterHandle The filter containing the category, title, and options, - as returned by \c #AIFilterSuite::AddFilter(). If no filter exists with - the correct data, use \c #AddLiveEffectMenuItem(). - @param menuItem [out] A buffer in which to return the new menu item, - or \c NULL if you do not need the object. - @param menuGroup [out] A buffer in which to return the menu group to which the item - was added, or \c NULL if you do not need the object. - */ - AIAPI AIErr (*AddLiveEffectFilterItem) ( AILiveEffectHandle liveEffectHandle, - AIFilterHandle filterHandle, AIMenuItemHandle *menuItem, AIMenuGroup *menuGroup ); - - /** Adds a menu item for a Live Effect to the Effects menu. - @param liveEffectHandle The effect object. - @param menuName The unique identifying name for the new menu item. - Not localized. - @param menuData A pointer to the structure that defines the menu. - You must allocate and fill the structure before making the call. - If a filter already exists with the correct data, use - \c #AddLiveEffectFilterItem(). - @param menuItem [out] A buffer in which to return the new menu item, - or \c NULL if you do not need the object. - @param menuGroup [out] A buffer in which to return the menu group to which the item - was added, or \c NULL if you do not need the object. Returns \c NULL if - the item was added at the top level of the Effects menu. - */ - AIAPI AIErr (*AddLiveEffectMenuItem) ( AILiveEffectHandle liveEffectHandle, const char* menuName, - AddLiveEffectMenuData *menuData, AIMenuItemHandle *menuItem, AIMenuGroup *menuGroup ); - - /** Not implemented. */ - AIAPI AIErr (*ExecuteLiveEffect) ( AILiveEffectHandle effect, - AILiveEffectParameters parameters, AIArtHandle art ); - - /** @note Internal. Do not use. - - Displays a dialog box in which the use can enter parameter values. - @param context [in, out] The parameter context passed in the - \c #AILiveEffectEditParamMessage. Modify in place with new values. - @param enablePreview True if previews are enabled for this effect. - When true, pass the returned context to \c #UpdateParameters() - to update the associated artwork. - */ - AIAPI AIErr (*EditParameters) ( AILiveEffectParamContext context, AIBoolean enablePreview ); - - /** If previews are enabled for an effect, call this after modifying the - parameters to update the associated artwork. The plug-in receives - an \c #AILiveEffectGoMessage after updating parameters. - @param context The parameter context, as received in - a \c #AILiveEffectEditParamMessage. - @see \c #AILiveEffectInterpParamMessage - */ - AIAPI AIErr (*UpdateParameters) ( AILiveEffectParamContext context ); - - /** Interpolates a point into the current parameter set for an effect. - Sends the plug-in that owns the effect the \c #AILiveEffectInterpParamMessage. - @param effect The effect object. - @param startParams A parameters block for the starting point. - @param endParams A parameters block for the ending point. - @param percent A percentage of the distance between - the start and end parameters, expressed as a value in the range [0..1]. - The new value is interpolated at this point. - @param resultParams [out] A parameters block in which the new interpolated point - is returned. - */ - AIAPI AIErr (*InterpolateEffectParameters) ( AILiveEffectHandle effect, - AILiveEffectParameters startParams, AILiveEffectParameters endParams, - AIReal percent, AILiveEffectParameters resultParams ); - - /** Gets the number of registered effects available to the application. - Use with \c #GetNthLiveEffect() to iterate through all installed effects. - @param count [out] A buffer in which to return the number of registered effects. - */ - AIAPI AIErr (*CountLiveEffects) ( ai::int32* count ); - - /** Retrieves an effect reference by position index. - Use with \c #CountLiveEffects() to iterate through all installed effects. - @param n The index, in the range [0..numEffects-1]. - @param effect [out] A buffer in which to return the effect object. - */ - AIAPI AIErr (*GetNthLiveEffect) ( ai::int32 n, AILiveEffectHandle* effect ); - - /** Retrieves the unique identifying name of an effect. - To get the localizable display name, use \c #GetLiveEffectTitle(). - @param effect The effect object. - @param name [out] A buffer in which to return the name string. - */ - AIAPI AIErr (*GetLiveEffectName) ( AILiveEffectHandle effect, const char** name ); - - /** Retrieves the localizable display name of an effect. - To get the unique identifying name, use \c #GetLiveEffectName(). - @param effect The effect object. - @param name [out] A buffer in which to return the display name string. - */ - AIAPI AIErr (*GetLiveEffectTitle) ( AILiveEffectHandle effect, const char** name ); - - /** Retrieves the version information for a registered effect. - @param effect The effect object. - @param major [out] A buffer in which to return the major version number. - @param minor [out] A buffer in which to return the minor version number. - */ - AIAPI AIErr (*GetLiveEffectVersion) ( AILiveEffectHandle effect, ai::int32* major, ai::int32* minor ); - - /** Retrieves the preferred input art types of a registered effect. - @param effect The effect object. - @param name [out] A buffer in which to return the input art preferences, - a logical OR of \c #AIStyleFilterPreferredInputArtType values. - */ - AIAPI AIErr (*GetInputPreference) ( AILiveEffectHandle effect, ai::int32* inputPreference ); - - /** Retrieves the style flags of a registered effect. - @param effect The effect object. - @param name [out] A buffer in which to return the style flags, - a logical OR of \c #AIStyleFilterFlags values. - */ - AIAPI AIErr (*GetStyleFilterFlags) ( AILiveEffectHandle effect, ai::int32* styleFilterFlags ); - - /** Merges an effect into the existing style of all selected objects. - @param effect The effect object. - @param action The merge method (append, or replace fill and/or stroke), - and whether to send a \c #kSelectorAILiveEffectHandleMerge message - to handle the parameters for a replacement method. - */ - AIAPI AIErr (*MergeLiveEffectIntoSelection) ( AILiveEffectHandle effect, AILiveEffectMergeAction action ); - - /** While handling an \c #AILiveEffectEditParamMessage, retrieves the menu item used - to invoke the effect. - (Note that this function returns an object value, not an error code.) - @param context The parameter context, as passed in the - \c #AILiveEffectEditParamMessage. - @return The menu item object, or \c NULL if the message was not invoked by a menu item. - Returns \c NULL if not called while handling an Edit message. - */ - AIAPI AIMenuItemHandle (*GetMenuItem) ( AILiveEffectParamContext context ); - - /** Creates a parameter dictionary to be used in constructing a style with the - \c #AIArtStyleParserSuite. Do not use in any other context. If you are using - the \c #AIArtStyleParserSuite to construct a new style from scratch, and you - need to create a parameter dictionary for an effect, use this function - to create the parameter dictionary, rather than - \c #AIDictionarySuite::CreateDictionary(). The dictionary created by this - function supports Undo operations, which the generic one does not. - - Dictionaries are reference counted; the initial reference count for - this dictionary is 1. When there are no remaining references, - free the associated memory using \c #AIDictionarySuite::Release(). - @param params [out] A buffer in which to return the new parameters block. - */ - AIAPI AIErr (*CreateLiveEffectParameters) ( AILiveEffectParameters* params ); - - /** Retrieves the earliest Illustrator version that an effect supports. - If you do not use this call, the version defaults to 9 (the first version - to support Live Effects). If an object with this effect is saved - to an earlier version, only the styled art is written out. For some effects, - the earliest version supported for RGB or for CMYK can be different. - @param effect The effect object. - @param appVersionRGB [out] A buffer in which to return the earliest version number - that the effect supports for RGB documents. May be \c NULL. - @param appVersionCMYK [out] A buffer in which to return the earliest version number - that the effect supports for CMYK documents. May be \c NULL. - */ - AIAPI AIErr (*GetLiveEffectAppVersion) ( AILiveEffectHandle effect, AIVersion* appVersionRGB, AIVersion* appVersionCMYK ); - - /** Sets the earliest Illustrator version that an effect supports. If an object with this - effect is saved to an earlier version, only the styled art is written out. - For some effects, the earliest version supported for RGB or for CMYK - can be different. See also \c #kAILiveEffectParamsExpandBeforeKey for situations where - the compatibility decision is dependent upon the effect options. - @param effect The effect object. - @param appVersionRGB The earliest version number that the effect supports - for RGB documents. Must be 9 or later. - @param appVersionCMYK The earliest version number that the effect supports - for CMYK documents. Must be 9 or later. - */ - AIAPI AIErr (*SetLiveEffectAppVersion) ( AILiveEffectHandle effect, AIVersion appVersionRGB, AIVersion appVersionCMYK ); - -}; - - -#include "AIHeaderEnd.h" - - - -#endif +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 1986 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#ifndef __AILiveEffect__ +#define __AILiveEffect__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIDict__ +#include "AIDictionary.h" +#endif + +#ifndef __AIFilter__ +#include "AIFilter.h" +#endif + +#ifndef __AIMenu__ +#include "AIMenu.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#ifndef __AIXMLElement__ +#include "AIXMLElement.h" +#endif + + + +#include "AIHeaderBegin.h" + +/** @file AILiveEffect.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAILiveEffectSuite "AI Live Effect Suite" +#define kAILiveEffectSuiteVersion AIAPI_VERSION(7) +#define kAILiveEffectVersion kAILiveEffectSuiteVersion + +/** @ingroup Callers + The Live Effect caller. See \c #AILiveEffectSuite. */ +#define kCallerAILiveEffect "AI Live Effect" + + +/** If your effect gets new options in a later version that are not supported by earlier versions, + such that the objects carrying the new options should be expanded (output as the styled art only) + upon legacy save, while objects with options supported by the older versions should NOT be expanded, + then set the value of this key in the effect's parameter dictionary to the app version which first + supports the new option values (as an integer, e.g., CS 5 = 15). + See also c\ #AILiveEffectSuite::SetLiveEffectAppVersion for situations where the version compatibility + is not dependent upon the effect options. */ +#define kAILiveEffectParamsExpandBeforeKey "Adobe Effect Expand Before Version" + +#define kAILiveEffectParamsWriteAlternateVersionMajorKey "Adobe Effect Expand Write Alternate Version Major" +#define kAILiveEffectParamsWriteAlternateVersionMinorKey "Adobe Effect Expand Write Alternate Version Minor" + + +// These are the effect messages. + +/** @ingroup Selectors + Sends an \c #AILiveEffectEditParamMessage. + */ +#define kSelectorAIEditLiveEffectParameters "AI Live Effect Edit Parameters" +/** @ingroup Selectors + Sends an \c #AILiveEffectGoMessage. + */ +#define kSelectorAIGoLiveEffect "AI Live Effect Go Live" +/** @ingroup Selectors + Sends an \c #AILiveEffectInterpParamMessage. */ +#define kSelectorAILiveEffectInterpolate "AI Live Effect Interpolate Parameters" +/** @ingroup Selectors + Sends an \c #AILiveEffectInputTypeMessage. */ +#define kSelectorAILiveEffectInputType "AI Live Effect Input Type" +/** @ingroup Selectors + Sends an \c #AILiveEffectConvertColorMessage. */ +#define kSelectorAILiveEffectConverColorSpace "AI Live Effect Convert Color Space" +/** @ingroup Selectors + Sends an \c #AILiveEffectScaleParamMessage. */ +#define kSelectorAILiveEffectScaleParameters "AI Live Effect Scale Parameters" +/** @ingroup Selectors + Sends an \c #AILiveEffectHandleMergeMessage. */ +#define kSelectorAILiveEffectHandleMerge "AI Live Effect Handle Merge" +/** @ingroup Selectors + Sends an \c #AILiveEffectGetSVGFilterMessage. */ +#define kSelectorAILiveEffectGetSVGFilter "AI Live Effect Get SVG Filter" +/** @ingroup Selectors + Sends an \c #AILiveEffectAdjustColorsMessage. */ +#define kSelectorAILiveEffectAdjustColors "AI Live Effect Adjust Colors" +/** @ingroup Selectors + Sends an \c #AILiveEffectIsCompatibleMessage */ +#define kSelectorAILiveEffectIsCompatible "AI Live Effect Is Compatible" +/** @ingroup Selectors + Sends an \c #AILiveEffectScaleParamMessage. */ +#define kSelectorAILiveEffectDocScaleConvertParameters "AI Live Effect Doc Scale Convert Parameters" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + A string entry that is displayed by the palette in preference + to the filter name, if it is set. For example, Punk & Bloat might set it to "Punk" or + "Bloat" to tell which filter is used. For a stroke or fill filter, it is displayed + next to the color swatch. */ +#define kDisplayStringKey "DisplayString" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + A string entry that gives extra information for the palette + to display for this filter, for example as a tool tip. Can + mention the most important parameters. */ +#define kExtraStringKey "ExtraString" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + The fill color to use, a \c #FillStyleType. Set + for a fill filter when the filter is installed. */ +#define kFillStyleKey "FillStyle" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + A \c #FillStyleType for fill filters, but with the object's style matrix + multiplied in for gradient fills. Effects with a fill style parameter + should usually first look for this key in the instance info, and if it is present, + use its value. If it is not present, it should look for kFillStyleKey. */ +#define kTransformedFillStyleKey "TransformedFillStyle" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + A \c #MatrixType value for fill filters. If the object's fill style matrix + is not identity, this will be set in the instance info. The matrix will + also be factored into the transformed fill style, but it contains information + that is not available in the gradient fields, such as whether there is + a reflection. */ +#define kFillStyleMatrixKey "FillStyleMatrix" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + A \c #BooleanType value for fill filters. */ +#define kEvenOddKey "UseEvenOdd" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + A \c #StrokeStyleType for stroke filters. */ +#define kStrokeStyleKey "StrokeStyle" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + A \c #StrokeStyleType for stroke filters, but with the object's style matrix + multiplied in for gradient strokes. Effects with a stroke style parameter + should usually first look for this key in the instance info, and if it is present, + use its value. If it is not present, it should look for kStrokeStyleKey. */ +#define kTransformedStrokeStyleKey "TransformedStrokeStyle" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + A \c #MatrixType value for stroke filters. If the object's stroke style matrix + is not identity, this will be set in the instance info. The matrix will + also be factored into the transformed stroke style, but it contains information + that is not available in the gradient fields, such as whether there is + a reflection. */ +#define kStrokeStyleMatrixKey "StrokeStyleMatrix" + +/** @ingroup DictKeys + Dictionary key for a Live Effect parameter. See \c #AILiveEffectSuite. + An \c #AIReal used to scale parameters while processing + the Go message. You should scale parameters locally; do not modify + the values in the actual parameter dictionary. */ +#define kScaleFactorKey "ScaleFactorString" + +/** It can be used as \c #options in \c #AddLiveEffectMenuData to indicate that + menu item is a sub group.*/ +#define kAILiveEffectMenuSubGroup 1 + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a Live Effect. It is never dereferenced.*/ +typedef struct _t_AILiveEffectOpaque* AILiveEffectHandle; + /** Opaque reference to a Live Effect parameter context.*/ +typedef struct _t_AILiveEffectParamContext* AILiveEffectParamContext; + + +/** Defines the menu item for a Live Effect. */ +struct AddLiveEffectMenuData { + /** The submenu in which the menu item should appear, + or \c NULL to place at the top level of the Effects menu. */ + char *category; + /** The localizable display string for the menu item */ + char *title; + /** To add menu item as sub group, pass \c #kAILiveEffectMenuSubGrou otherwise pass 0.*/ + ai::int32 options; +}; + + +/** The parameters for a Live Effect, stored in a dictionary. */ +typedef AIDictionaryRef AILiveEffectParameters; +typedef ConstAIDictionaryRef ConstAILiveEffectParameters; + + +/** Bit flags for Live Effect style properties, which specify + how the filter is applied and what features it supports. + An effect must be registered with exactly one of the + first four values, which denote the filter type. The last + three values can be ORed together with the filter type. + Pass to \c #AILiveEffectSuite::AddLiveEffect() + in \c #AILiveEffectData::styleFilterFlags. */ +enum AIStyleFilterFlags { + /** Clears all flags. */ + kNoFlags = 0, + /** Applied by default before the object is painted with fill or stroke. */ + kPreEffectFilter = 0x1, + /** Applied by default after the object is painted with fill or stroke. */ + kPostEffectFilter = 0x2, + /** Replaces the default stroke behavior. + Brushes are an example of an effect of this type. */ + kStrokeFilter = 0x3, + /** Replaces the default fill behavior. */ + kFillFilter = 0x4, + /** A mask to OR with the filter-style value to retrieve specific bit flags. + Do not use with \c #AILiveEffectSuite::AddLiveEffect(). */ + kFilterTypeMask = 0x0ffff, + /** Internal. Do not use. */ + kSpecialGroupPreFilter = 1 << 16, + /** Parameters can be scaled. */ + kHasScalableParams = 1 << 17, + /** Supports automatic rasterization. */ + kUsesAutoRasterize = 1 << 18, + /** Supports the generation of an SVG filter. */ + kCanGenerateSVGFilter = 1 << 19, + /** Has parameters that can be modified by a \c #kSelectorAILiveEffectAdjustColors message. */ + kHandlesAdjustColorsMsg = 1 << 20, + /** Handles \c #kSelectorAILiveEffectIsCompatible messages. If this flag is not set the message will not be sent. */ + kHandlesIsCompatibleMsg = 1 << 21, + /*Parameters can be converted during Document Scale Conversion*/ + kHasDocScaleConvertibleParams = 1 << 22 +}; + + +/** The kinds of objects in input art that an effect can operate on. + If input art contains objects the effect does not handle, Illustrator looks for a + conversion filter to convert the input art to a type that is handled. If no + such filter is available, the input art is passed unchanged. The effect should + pass through unchanged any art that it cannot handle, */ +enum AIStyleFilterPreferredInputArtType { + /** The \c #kSelectorAILiveEffectInputType message is sent + to the plug-in to determine the input type */ + kInputArtDynamic = 0, + /** Handles groups. */ + kGroupInputArt = 1 << ((ai::int32) kGroupArt - 1), + /** Handles paths. */ + kPathInputArt = 1 << ((ai::int32) kPathArt - 1), + /** Handles compound paths. */ + kCompoundPathInputArt = 1 << ((ai::int32) kCompoundPathArt - 1), + + /** Obsolete */ + kTextInputArtUnsupported = 1 << ((ai::int32) kTextArtUnsupported - 1), + /** Obsolete */ + kTextPathInputArtUnsupported= 1 << ((ai::int32) kTextPathArtUnsupported - 1), + /** Obsolete */ + kTextRunInputArtUnsupported = 1 << ((ai::int32) kTextRunArtUnsupported - 1), + /** Handles placed objects. */ + kPlacedInputArt = 1 << ((ai::int32) kPlacedArt - 1), + /** Handles mystery paths. */ + kMysteryPathInputArt = 1 << ((ai::int32) kMysteryPathArt - 1), + /** Handles raster art. */ + kRasterInputArt = 1 << ((ai::int32) kRasterArt - 1), + + /** Handles plug-in groups. If not set, the effect receives the result group + instead of the plug-in group itself. */ + kPluginInputArt = 1 << ((ai::int32) kPluginArt - 1), + /** Handles meshes. */ + kMeshInputArt = 1 << ((ai::int32) kMeshArt - 1), + /** Handles text frames. */ + kTextFrameInputArt = 1 << ((ai::int32) kTextFrameArt - 1), + /** Handles symbols. */ + kSymbolInputArt = 1 << ((ai::int32) kSymbolArt - 1), + /** Handles foreign objects. */ + kForeignInputArt = 1 << ((ai::int32) kForeignArt - 1), + /** Handles legacy text. */ + kLegacyTextInputArt = 1 << ((ai::int32) kLegacyTextArt - 1), + /** Handles charts. */ + kChartInputArt = 1 << ((ai::int32) kChartArt - 1), + + /** Handles any input art. */ + kAnyInputArt = 0xFFFF, + /** Handles any input art other than plug-in groups, which + are replaced by their result art. */ + kAnyInputArtButPluginArt = kAnyInputArt & ~kPluginInputArt, + + // Special values that don't correspond to regular art types should be in the high half word + + /** Not implemented. */ + // When set, convert strokes to outlines before sending to effect + kOutlinedStrokeInputArt = 0x10000, + /** Does \e not handle clipping paths or clipping text. + Not needed if paths are not handled. */ + + /* (Because it would destroy them by rasterizing, for example, + or by splitting a single path into multiple non-intersecting paths, + or by turning it into a plug-in group, like the brush filter). + This flag is on for "Not OK" instead of on for "OK" because destroying clipping paths is + an exceptional condition and we don't want to require normal filters to explicitly say they're OK. */ + kNoClipMasksInputArt = 0x20000 + +}; + + +/** Ways that a Live Effect can be merged with the existing styles of selected objects. */ +enum AILiveEffectMergeAction { + /** Append this effect to the current style. */ + kAppendLiveEffectToStyle, + /** Replace the current fill style with this effect. */ + kReplaceFillWithLiveEffect, + /** Replace the current stroke style with this effect. */ + kReplaceStrokeWithLiveEffect, + /** Bit flag can be ORed with replacement styles to send + a \c #kSelectorAILiveEffectHandleMerge message to handle + the parameters of the merge. Not used with \c #kAppendLiveEffectToStyle */ + kSendHandleMergeMessage = 0x10000 +}; + + +/** Information supplied when registering a Live Effect + with \c #AILiveEffectSuite::AddLiveEffect(). */ +struct AILiveEffectData { + /** The plug-in that is registering the effect and that + receives effect messages. */ + SPPluginRef self; + /** A unique identifying name of the effect, not localized. */ + const char* name; + /** A localized display title for the effect. */ + char *title; + /** Major version number of this plug-in. */ + ai::int32 majorVersion; + /** Minor version number of this plug-in. */ + ai::int32 minorVersion; + /** The type of art this effect can operation on, + a \c #AIStyleFilterPreferredInputArtType value.*/ + ai::int32 prefersAsInput; + /** The type and supported features of this effect, + a logical OR of \c #AIStyleFilterFlags. */ + ai::int32 styleFilterFlags; +}; + + + +// +// The contents of Live Effect messages. +// + +/** Sent when the user chooses your registered effect from the Effects menu, + after the Edit parameters message that allows you to collect parameter + values from the user. Also sent when the effect needs to be run in response + to user edits to the objects. + The plug-in should respond by running its effect on the supplied art object + using the supplied parameters. */ +struct AILiveEffectGoMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** The current parameters block, as returned from the Edit parameters message. */ + AILiveEffectParameters parameters; + /** [in, out] A set of parameters that the plug-in may have stored + from an earlier invocation on this object.*/ + AILiveEffectParameters instanceInfo; + /** [in, out] The art object to be edited with this effect. + You must not modify any ancestor objects, nor modify the document artwork tree. + The plug-in is responsible for proper deletion of objects in source + art that it removes. You can set this to \c NULL if the effect + does not return any art; in this case, Illustrator disposes of + the input art. */ + AIArtHandle art; + /** [in] This is source art on which effect is applied + This if for storing any information which needs to be used later after executing the effect*/ + AIArtHandle srcArt; +}; + +/** Sent when the user chooses a your registered effect from the Effects menu, + or when the user later edits the effect using the appearance palette. + + The plug-in can ignore the selector if it does not require user input; + otherwise, it should collect parameter values from the user, + typically using a modal dialog. If previews are enabled, it can then + update the artwork using \c #AILiveEffectSuite::UpdateParameters() + to preview the results. + The plug-in must call \c #AILiveEffectSuite::UpdateParameters() after + it finishes collecting user input and updating values. + */ +struct AILiveEffectEditParamMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** [in, out] A set of parameters that the plug-in may have stored + from an earlier invocation. Modify values if desired. */ + AILiveEffectParameters parameters; + /** The parameter context, passed to various functions. */ + AILiveEffectParamContext context; + /** True if preview is enabled. If it is, the plug-in can call + \c #AILiveEffectSuite::UpdateParameters after modifying the parameters, + to update the associated artwork. The plug-in receives a Go message + after updating parameters.*/ + AIBoolean allowPreview; + + /** True if this is the first time this effect is being applied by this plug-in, + false if the effect is being modified (from the Appearance panel, for example). + **/ + AIBoolean isNewInstance; +}; + +/** Sent when the user chooses to interpolate a new point into the parameter + set for an effect. This happens when Illustrator attempts to blend two objects + that have Live Effects applied to them; for example, if you select two objects + with an effect and choose Object>Blend>Make. The intermediate objects between + the two blended objects need to have effects applied to them as well, which + need to have values that are the interpolated results between the two blended objects. + + Pass the parameter blocks to \c #AILiveEffectSuite::InterpolateEffectParameters(). +*/ +struct AILiveEffectInterpParamMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** A parameter block indicating a starting point. */ + AILiveEffectParameters startParams; + /** A parameter block indicating an ending point.*/ + AILiveEffectParameters endParams; + /** [out] A parameter block to contain the interpolated point. */ + AILiveEffectParameters outParams; + /** A percentage of the distance between \c startParams + and \c endParams, expressed as a value in the range [0..1]. + The new value is interpolated at this point. */ + AIReal percent; + +}; + +/** Sent when the user selects an effect whose input type is + \c #kInputArtDynamic. If the type computation depends on input art, + the plug-in can examine the passed art object to decide on the type. +*/ +struct AILiveEffectInputTypeMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** The current parameter block for the effect. */ + AILiveEffectParameters parameters; + /** The art object whose type is to be computed. */ + AIArtHandle inputArt; + /** [out] The type of art that can be operated on by this effect + with this parameter set, an \c #AIStyleFilterPreferredInputArtType value. + \li If the input art is a type that this effect can filter, set to \c #kAnyInputArt. + \li Otherwise, set to the type to which the art should be converted. */ + ai::int32 typeMask; +}; + +/** Sent with a request to convert any private color data the plug-in + has stored in a dictionary to a new color space. + This is only for private color information. Normal fill and stroke color + information is automatically converted. +*/ +struct AILiveEffectConvertColorMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** The current parameter block for the effect. */ + AILiveEffectParameters parameters; + /** The new color space. */ + AIColorTag newColorSpace; +}; + +/** Sent with \c #kSelectorAILiveEffectAdjustColors to allow another plug-in that does + color manipulations to extract and/or modify any private color data that the effect plug-in has + stored in its parameter dictionary, including colors contained indirectly in art objects, art + styles or symbol references. This parameter block contains only private color information + for an effect. Normal fill and stroke colors (that is, those which are stored under + \c #kFillStyleKey or \c #kStrokeStyleKey) are adjusted without consulting the effect. + + The color-adjustment callback is supplied by a plug-in other than the one that manages the effect. + The initial request is generally initiated by \c #AIPathStyleSuite::AdjustObjectAIColors(), and + the effect that receives this message has been encountered while processing that request. + + + \li If the parameter dictionary contains private \c #AIColor values, they should be passed + directly to the color-adjustment callback. + + \li If the parameter dictionary contains art objects that contain meaningful colors, those objects + should be passed to \c #AIPathStyleSuite::AdjustObjectAIColors(), along with this callback function, + client data, and control flags. + + \li If the parameter dictionary contains symbol handles or brush pattern handles that contain meaningful + colors, the symbol patterns or brush patterns should be passed to the pattern-adjustment callback. + These could be, for example, symbols mapped to surfaces by the 3D effect. + Other symbols can be ignored; for example, symbols that define 3D bevel shapes. +*/ +struct AILiveEffectAdjustColorsMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** The current parameter block for the effect. */ + AILiveEffectParameters parameters; + + /** A callback function to adjust colors, supplied by a plug-in + other than the one that manages the effect. + See \c #AIPathStyleSuite::AdjustObjectAIColors(). */ + AIAdjustColorFunc adjustColorCallback; + /** A callback function to adjust patterns, supplied by a plug-in + other than the one that manages the effect. */ + AIAdjustPatternHandleFunc adjustPatternHandleCallback; + /** Developer-defined private data to pass to the callback. */ + void *clientData; + /** A logical OR of bit-flag constants that controls which colors are passed to the callback.*/ + VisitAIColorFlags controlFlags; + + /** [out] Set to true if the handler modified any colors. */ + AIBoolean modifiedSomething; +}; + + +/** Sent with a request to scale effect parameters. */ +struct AILiveEffectScaleParamMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** [in, out] The current parameters for the effect. + Modify values in place. */ + AILiveEffectParameters parameters; + /** The factor by which to scale the parameters. + A percentage value where 1 is 100%. */ + AIReal scaleFactor; + /** [out] Set to true to indicate that the effect modified the parameters. */ + AIBoolean scaledParams; +}; + +/** Sent to a plug-in that has initiated a merge with + \c #AILiveEffectSuite::MergeLiveEffectIntoSelection(), + so that the plug-in can handle the merge operation. +*/ +struct AILiveEffectHandleMergeMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** The effect object currently in use, if any. + \c NULL if replacing a default fill or stroke with an effect. */ + AILiveEffectHandle oldEffect; + /** [out] Set to true to prevent the merge. */ + AIBoolean dontMerge; + /** [out] Set to true to preserve instance information from the existing + effect, if any. */ + AIBoolean keepInstanceInfo; + /** [in, out] The parameter block for the existing effect, if any. Modify in place. + If \c NULL, the Edit message is sent to collect parameters. */ + AILiveEffectParameters parameters; +}; + +/** Sent with a request to obtain an SVG filter representation of an effect. + Sent only if the effect plug-in has indicated that it can generate an SVG filter + to represent itself. + + - In: 'effect' handle returned when the effect was registered. + - In: 'parameters' handle to live effect parameter set to be used. + - Out: 'svgFilterUID' return a handle to the UID representing the SVG filter. +*/ +struct AILiveEffectGetSVGFilterMessage { + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** The current parameter block for the effect. */ + AILiveEffectParameters parameters; + /** [out] Set to the SVG filter object. */ + AISVGFilterHandle svgFilter; +}; + +/** Sent when saving a file to allow the live effect to make a detailed check for + legacy compatibility. This message is only sent if the \c #kHandlesIsCompatibleMsg + flag is set. If the flag is not set version compatibility is checked against + values provided by SetLiveEffectAppVersion. The recipient must set the + 'compatible' member below indicate version compatibility. +*/ +struct AILiveEffectIsCompatibleMessage { + explicit AILiveEffectIsCompatibleMessage( + AILiveEffectHandle thisEffect = 0, + AIVersion version = kAIVersion1, + ConstAILiveEffectParameters params = 0, + AIBoolean compat = false) + : effect(thisEffect), appVersion(version), parameters(params), compatible(compat) {} + + /** The message data. */ + SPMessageData d; + /** The effect object. */ + AILiveEffectHandle effect; + /** Application version to check compatibility against. */ + AIVersion appVersion; + /** The current parameter block for the effect. */ + ConstAILiveEffectParameters parameters; + + /** [out] Set to true if compatible with appVersion, false otherwise. */ + AIBoolean compatible; +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite allows your plug-in to implement a Live Effect. + A Live Effect is a filter that can be attached to an art object as part of + its style. Any time the art object is changed, the filter is automatically + re-executed. More than one filter can be attached to an object, which allows + filter \e chains and \e stacks. + \li A chain is a pipeline where the output of one filter + becomes the input to the next. + \li A stack passes the same input art to a set of filters, + stacking the output of each filter. + + If a document contains a Live Effect that is not available, the document + can be opened, but art with that effect applied cannot be edited. + + Your Live Effect plug-in must respond to the caller \c #kCallerAILiveEffect + and the following selectors: +
\c #kSelectorAIEditLiveEffectParameters +
\c #kSelectorAIGoLiveEffect +
\c #kSelectorAILiveEffectInterpolate +
\c #kSelectorAILiveEffectInputType +
\c #kSelectorAILiveEffectConverColorSpace +
\c #kSelectorAILiveEffectScaleParameters +
\c #kSelectorAILiveEffectHandleMerge +
\c #kSelectorAILiveEffectGetSVGFilter + + Most Live Effects have a set of parameters that control their behavior. For + example, the Roughen effect has parameters for the size and detail of the roughening. + You can store these in the parameter dictionary that is associated with the effect + in the style. Use the \c #AIDictionarySuite to access the contents of the dictionary. + You can store any information in the parameter dictionary; however the following keys + are predefined: +
\c #kDisplayStringKey +
\c #kExtraStringKey +
\c #kFillStyleKey +
\c #kEvenOddKey +
\c #kStrokeStyleKey +
\c #kScaleFactorKey +
\c #kAILiveEffectParamsExpandBeforeKey + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAILiveEffectSuite and \c #kAILiveEffectVersion. +*/ +struct AILiveEffectSuite { + + /** Registers a Live Effect. + @param effectInfo A pointer to the structure that defines the effect. You must + allocate and fill the structure before making the call. + @param liveEffectHandle [out] A buffer in which to return the effect object. + */ + AIAPI AIErr (*AddLiveEffect) ( AILiveEffectData* effectInfo, AILiveEffectHandle *liveEffectHandle ); + + /** Adds a menu item for a Live Effect to the Effects menu, using a predefined filter. + @param liveEffectHandle The effect object. + @param filterHandle The filter containing the category, title, and options, + as returned by \c #AIFilterSuite::AddFilter(). If no filter exists with + the correct data, use \c #AddLiveEffectMenuItem(). + @param menuItem [out] A buffer in which to return the new menu item, + or \c NULL if you do not need the object. + @param menuGroup [out] A buffer in which to return the menu group to which the item + was added, or \c NULL if you do not need the object. + */ + AIAPI AIErr (*AddLiveEffectFilterItem) ( AILiveEffectHandle liveEffectHandle, + AIFilterHandle filterHandle, AIMenuItemHandle *menuItem, AIMenuGroup *menuGroup ); + + /** Adds a menu item for a Live Effect to the Effects menu. + @param liveEffectHandle The effect object. + @param menuName The unique identifying name for the new menu item. + Not localized. + @param menuData A pointer to the structure that defines the menu. + You must allocate and fill the structure before making the call. + If a filter already exists with the correct data, use + \c #AddLiveEffectFilterItem(). + @param menuItem [out] A buffer in which to return the new menu item, + or \c NULL if you do not need the object. + @param menuGroup [out] A buffer in which to return the menu group to which the item + was added, or \c NULL if you do not need the object. Returns \c NULL if + the item was added at the top level of the Effects menu. + */ + AIAPI AIErr (*AddLiveEffectMenuItem) ( AILiveEffectHandle liveEffectHandle, const char* menuName, + AddLiveEffectMenuData *menuData, AIMenuItemHandle *menuItem, AIMenuGroup *menuGroup ); + + /** Not implemented. */ + AIAPI AIErr (*ExecuteLiveEffect) ( AILiveEffectHandle effect, + AILiveEffectParameters parameters, AIArtHandle art ); + + /** @note Internal. Do not use. + + Displays a dialog box in which the use can enter parameter values. + @param context [in, out] The parameter context passed in the + \c #AILiveEffectEditParamMessage. Modify in place with new values. + @param enablePreview True if previews are enabled for this effect. + When true, pass the returned context to \c #UpdateParameters() + to update the associated artwork. + */ + AIAPI AIErr (*EditParameters) ( AILiveEffectParamContext context, AIBoolean enablePreview ); + + /** If previews are enabled for an effect, call this after modifying the + parameters to update the associated artwork. The plug-in receives + an \c #AILiveEffectGoMessage after updating parameters. + @param context The parameter context, as received in + a \c #AILiveEffectEditParamMessage. + @see \c #AILiveEffectInterpParamMessage + */ + AIAPI AIErr (*UpdateParameters) ( AILiveEffectParamContext context ); + + /** Interpolates a point into the current parameter set for an effect. + Sends the plug-in that owns the effect the \c #AILiveEffectInterpParamMessage. + @param effect The effect object. + @param startParams A parameters block for the starting point. + @param endParams A parameters block for the ending point. + @param percent A percentage of the distance between + the start and end parameters, expressed as a value in the range [0..1]. + The new value is interpolated at this point. + @param resultParams [out] A parameters block in which the new interpolated point + is returned. + */ + AIAPI AIErr (*InterpolateEffectParameters) ( AILiveEffectHandle effect, + AILiveEffectParameters startParams, AILiveEffectParameters endParams, + AIReal percent, AILiveEffectParameters resultParams ); + + /** Gets the number of registered effects available to the application. + Use with \c #GetNthLiveEffect() to iterate through all installed effects. + @param count [out] A buffer in which to return the number of registered effects. + */ + AIAPI AIErr (*CountLiveEffects) ( ai::int32* count ); + + /** Retrieves an effect reference by position index. + Use with \c #CountLiveEffects() to iterate through all installed effects. + @param n The index, in the range [0..numEffects-1]. + @param effect [out] A buffer in which to return the effect object. + */ + AIAPI AIErr (*GetNthLiveEffect) ( ai::int32 n, AILiveEffectHandle* effect ); + + /** Retrieves the unique identifying name of an effect. + To get the localizable display name, use \c #GetLiveEffectTitle(). + @param effect The effect object. + @param name [out] A buffer in which to return the name string. + */ + AIAPI AIErr (*GetLiveEffectName) ( AILiveEffectHandle effect, const char** name ); + + /** Retrieves the localizable display name of an effect. + To get the unique identifying name, use \c #GetLiveEffectName(). + @param effect The effect object. + @param name [out] A buffer in which to return the display name string. + */ + AIAPI AIErr (*GetLiveEffectTitle) ( AILiveEffectHandle effect, const char** name ); + + /** Retrieves the version information for a registered effect. + @param effect The effect object. + @param major [out] A buffer in which to return the major version number. + @param minor [out] A buffer in which to return the minor version number. + */ + AIAPI AIErr (*GetLiveEffectVersion) ( AILiveEffectHandle effect, ai::int32* major, ai::int32* minor ); + + /** Retrieves the preferred input art types of a registered effect. + @param effect The effect object. + @param name [out] A buffer in which to return the input art preferences, + a logical OR of \c #AIStyleFilterPreferredInputArtType values. + */ + AIAPI AIErr (*GetInputPreference) ( AILiveEffectHandle effect, ai::int32* inputPreference ); + + /** Retrieves the style flags of a registered effect. + @param effect The effect object. + @param name [out] A buffer in which to return the style flags, + a logical OR of \c #AIStyleFilterFlags values. + */ + AIAPI AIErr (*GetStyleFilterFlags) ( AILiveEffectHandle effect, ai::int32* styleFilterFlags ); + + /** Merges an effect into the existing style of all selected objects. + @param effect The effect object. + @param action The merge method (append, or replace fill and/or stroke), + and whether to send a \c #kSelectorAILiveEffectHandleMerge message + to handle the parameters for a replacement method. + */ + AIAPI AIErr (*MergeLiveEffectIntoSelection) ( AILiveEffectHandle effect, AILiveEffectMergeAction action ); + + /** Creates a new art style by merging live effect into an existing art style. + @param artStyle The input art style. + @param effect The effect object. + @param params The Live Effect parameters. + @param action The merge method (append, or replace fill and/or stroke), + and whether to send a \c #kSelectorAILiveEffectHandleMerge message + to handle the parameters for a replacement method. + @param newArtStyle [out] A buffer in which to return the new art style reference. + */ + AIAPI AIErr (*NewArtStyleByMergingLiveEffect) ( AIArtStyleHandle artStyle, AILiveEffectHandle effect, + AILiveEffectParameters params, AILiveEffectMergeAction action, AIArtStyleHandle *newArtStyle ); + + /** While handling an \c #AILiveEffectEditParamMessage, retrieves the menu item used + to invoke the effect. + (Note that this function returns an object value, not an error code.) + @param context The parameter context, as passed in the + \c #AILiveEffectEditParamMessage. + @return The menu item object, or \c NULL if the message was not invoked by a menu item. + Returns \c NULL if not called while handling an Edit message. + */ + AIAPI AIMenuItemHandle (*GetMenuItem) ( AILiveEffectParamContext context ); + + /** Creates a parameter dictionary to be used in constructing a style with the + \c #AIArtStyleParserSuite. Do not use in any other context. If you are using + the \c #AIArtStyleParserSuite to construct a new style from scratch, and you + need to create a parameter dictionary for an effect, use this function + to create the parameter dictionary, rather than + \c #AIDictionarySuite::CreateDictionary(). The dictionary created by this + function supports Undo operations, which the generic one does not. + + Dictionaries are reference counted; the initial reference count for + this dictionary is 1. When there are no remaining references, + free the associated memory using \c #AIDictionarySuite::Release(). + @param params [out] A buffer in which to return the new parameters block. + */ + AIAPI AIErr (*CreateLiveEffectParameters) ( AILiveEffectParameters* params ); + + /** Retrieves the earliest Illustrator version that an effect supports. + If you do not use this call, the version defaults to 9 (the first version + to support Live Effects). If an object with this effect is saved + to an earlier version, only the styled art is written out. For some effects, + the earliest version supported for RGB or for CMYK can be different. + @param effect The effect object. + @param appVersionRGB [out] A buffer in which to return the earliest version number + that the effect supports for RGB documents. May be \c NULL. + @param appVersionCMYK [out] A buffer in which to return the earliest version number + that the effect supports for CMYK documents. May be \c NULL. + */ + AIAPI AIErr (*GetLiveEffectAppVersion) ( AILiveEffectHandle effect, AIVersion* appVersionRGB, AIVersion* appVersionCMYK ); + + /** Sets the earliest Illustrator version that an effect supports. If an object with this + effect is saved to an earlier version, only the styled art is written out. + For some effects, the earliest version supported for RGB or for CMYK + can be different. See also \c #kAILiveEffectParamsExpandBeforeKey for situations where + the compatibility decision is dependent upon the effect options. + @param effect The effect object. + @param appVersionRGB The earliest version number that the effect supports + for RGB documents. Must be 9 or later. + @param appVersionCMYK The earliest version number that the effect supports + for CMYK documents. Must be 9 or later. + */ + AIAPI AIErr (*SetLiveEffectAppVersion) ( AILiveEffectHandle effect, AIVersion appVersionRGB, AIVersion appVersionCMYK ); + + /* + Searches for a given live effect and returns its Handle. If no live effect corresponding to the name exists then nullptr is returned. + @param liveEffectName name of live effect to search for + @param outLiveEffect[out] the live effect whose name is same as the input name. + */ + AIAPI AIErr (*GetLiveEffectHandleByName) (const char* liveEffectName, AILiveEffectHandle* outLiveEffect); +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMask.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMask.h index 4344b84..8bb417e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMask.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMask.h @@ -1,577 +1,577 @@ -#ifndef __AIMask__ -#define __AIMask__ - -/* - * Name: AIMask.h - * $Revision: 3 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Mask Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIArtStyle__ -#include "AIArtStyle.h" -#endif - -#ifndef __AIDictionary__ -#include "AIDictionary.h" -#endif - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAIBlendStyleSuite "AI Blend Style Suite" -#define kAIBlendStyleSuiteVersion5 AIAPI_VERSION(5) -#define kAIBlendStyleSuiteVersion kAIBlendStyleSuiteVersion5 -#define kAIBlendStyleVersion kAIBlendStyleSuiteVersion - -#define kAIMaskSuite "AI Mask Suite" -#define kAIMaskSuiteVersion5 AIAPI_VERSION(5) -#define kAIMaskSuiteVersion kAIMaskSuiteVersion5 -#define kAIMaskVersion kAIMaskSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/** An opaque reference to a mask. There is a one-to-one correspondence between - objects and masks. */ -typedef struct _AIMask* AIMaskRef; - - -/** The various blending modes that can be used to composite an object. These - modes correspond to the ones in Photoshop. See #AIBlendingModeValues. */ -typedef ai::int32 AIBlendingMode; -/** Values for \c #AIBlendingMode */ -enum AIBlendingModeValues { - kAINormalBlendingMode = 0, - kAIMultiplyBlendingMode = 1, - kAIScreenBlendingMode = 2, - kAIOverlayBlendingMode = 3, - kAISoftLightBlendingMode = 4, - kAIHardLightBlendingMode = 5, - kAIColorDodgeBlendingMode = 6, - kAIColorBurnBlendingMode = 7, - kAIDarkenBlendingMode = 8, - kAILightenBlendingMode = 9, - kAIDifferenceBlendingMode = 10, - kAIExclusionBlendingMode = 11, - kAIHueBlendingMode = 12, - kAISaturationBlendingMode = 13, - kAIColorBlendingMode = 14, - kAILuminosityBlendingMode = 15, - kAINumBlendingModes = 16 -}; - - -/** Knockout tri-state */ -typedef enum AIKnockout -{ - kAIKnockoutUnknown = -1, - /** No knockout */ - kAIKnockoutOff = 0, - /** Knockout */ - kAIKnockoutOn, - /** Use parent's knockout value */ - kAIKnockoutInherit -} AIKnockout; - - -/* Dictionary keys for compositing attributes */ - -/** @ingroup DictKeys - Dictionary key for mode of a blend style, contains \c #AIBlendingModeValues. - See \c #AIBlendStyleSuite::GetArtAttrs(). */ -#define kAIBlendModeKey "Mode" -/** @ingroup DictKeys - Dictionary key for opacity of a blend style, contains an \c #AIReal value - in the range [0..1]. - See \c #AIBlendStyleSuite::GetArtAttrs() and \c #AIMaskSuite. */ -#define kAIBlendOpacityKey "Opacity" -/** @ingroup DictKeys - Dictionary key for isolation state of a blend style, contains a boolean value. - See \c #AIBlendStyleSuite::GetArtAttrs(). */ -#define kAIBlendIsolatedKey "Isolated" -/** @ingroup DictKeys - Dictionary key for knockout state of a blend style, contains an \c #AIKnockout value. - See \c #AIBlendStyleSuite::GetArtAttrs().*/ -#define kAIBlendKnockoutKey "Knockout" -/** @ingroup DictKeys - Dictionary key for alpha state of a blend style, contains a boolean value. - See \c #AIBlendStyleSuite::GetArtAttrs(). */ -#define kAIBlendAlphaIsShapeKey "AlphaIsShape" - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides function for working with \e blend \e styles. - When an art object overlaps other art, it is composited with what - was drawn before it, using a blend style that is a part of the - object's art style. Fills and strokes can have their own - compositing attributes. - - See the PDF language specification for details of the transparency - modes used by Illustrator. - - @see \c #AIMaskSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIBlendStyleSuite and \c #kAIBlendStyleVersion. - */ -typedef struct { - - /** Retrieves the current blending mode of an art object, which - applies to the object as a whole. - (Note that this function returns a constant value, not an error code.) - @param art The art object. - @return The mode constant, one of the \c #AIBlendingModeValues. - */ - AIAPI AIBlendingMode (*GetBlendingMode) (AIArtHandle art); - - /** Sets the blending mode of an art object, which - applies to the object as a whole. - @param art The art object. - @param mode The new mode constant, one of the \c #AIBlendingModeValues. - */ - AIAPI AIErr (*SetBlendingMode) (AIArtHandle art, AIBlendingMode mode); - - /** Retrieves the current opacity value applied by the style to an art object. - (Note that this function returns a numeric value, not an error code.) - @param art The art object. - @return The opacity value, in the range [0..1] where 0 is completely - transparent and 1 is completely opaque. - */ - AIAPI AIReal (*GetOpacity) (AIArtHandle art); - - /** Sets the opacity value applied by the style to an art object. - @param art The art object. - @param opacity The new opacity value, in the range [0..1] where 0 is completely - transparent and 1 is completely opaque. - */ - AIAPI AIErr (*SetOpacity) (AIArtHandle art, AIReal opacity); - - /** Reports whether any blending modes used in the rendering of the object - contents are isolated from what has already been drawn. This does - not affect the blending mode used for compositing the entire object - into its backdrop. - (Note that this function returns a boolean value, not an error code.) - @param art The art object. - @return True if isolation is on. - */ - AIAPI AIBoolean (*GetIsolated) (AIArtHandle art); - - /** Sets whether any blending modes used in the rendering of the object - contents are isolated from what has already been drawn. This does - not affect the blending mode used for compositing the entire object - into its backdrop. - @param art The art object. - @param isolated True to turn isolation on, false to turn it off. - */ - AIAPI AIErr (*SetIsolated) (AIArtHandle art, AIBoolean isolated); - - /** Retrieves the current knockout state of an art object. If the state is - \c #kAIKnockoutInherit, the on/off state is inherited from the object’s parent, - and you can use \c #GetInheritedKnockout() to retrieve it. - (Note that this function returns a constant value, not an error code.) - @param art The art object. - @return The knockout state constant, one of the \c #AIKnockout values. - */ - AIAPI AIKnockout (*GetKnockout) (AIArtHandle art); - - /** Retrieves the inherited knockout state (on or off) of an art object. - (Note that this function returns a constant value, not an error code.) - @param art The art object. - @return The knockout state constant, \c #kAIKnockoutOff or \c #kAIKnockoutOn. - */ - AIAPI AIKnockout (*GetInheritedKnockout) (AIArtHandle art); - - /** Sets the knockout state of an art object. If the state is - \c #kAIKnockoutInherit, the on/off state is inherited from - the object’s parent. - @param art The art object. - @param knockout The new knockout state: on, off, or inherited, - */ - AIAPI AIErr (*SetKnockout) (AIArtHandle art, AIKnockout knockout); - - /** Reports whether opacity and mask define the knockout shape for - an art object. - (Note that this function returns a boolean value, not an error code.) - @param art The art object. - @return True if opacity and mask define the knockout shape. - */ - AIAPI AIBoolean (*GetAlphaIsShape) (AIArtHandle art); - - /** Sets whether opacity and mask define the knockout shape for - an art object. - @param art The art object. - @param alphaIsShape True if opacity and mask define the knockout shape, - false if they do not. - */ - AIAPI AIErr (*SetAlphaIsShape) (AIArtHandle art, AIBoolean alphaIsShape); - - /** Copies the compositing attributes that are applied globally by the - style of one art object to another art object. - @param source The source art object. - @param destination The destination art object. - */ - AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination); - - /** Retrieves the dictionary that contains compositing attributes that - are applied globally by the style of an art object. - This convenience function has the same effect as retrieving an - art object’s art style and getting attributes individually - using \c #AIBlendStyleSuite::GetStyleAttrs(). - - The keys for the compositing attributes are: - \verbatim - #kAIBlendModeKey - #kAIBlendOpacityKey - #kAIBlendIsolatedKey - #kAIBlendKnockoutKey - #kAIBlendAlphaIsShapeKey - \endverbatim - @param art The art object. - @param attrs [in, out] The dictionary in which to return the attributes. - @see \c #AIDictionarySuite - */ - AIAPI AIErr (*GetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs); - - /** Sets the compositing attributes applied globally to an art object, - using a dictionary. This convenience function has the same - effect as retrieving an art object’s art style and setting - attributes individually using \c #AIBlendStyleSuite::SetStyleAttrs(). - @param art The art object. - @param attrs The dictionary containing the attributes. - You can specify a subset of the keys in order to modify a - subset of the compositing attributes. - @see \c #GetArtAttrs() for keys. - */ - AIAPI AIErr (*SetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs); - - /** Retrieves the dictionary that contains globally-applied compositing attributes - from an art style. - @param style The art style object. - @param attrs [in, out] The dictionary in which to return the attributes. - @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite - */ - AIAPI AIErr (*GetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs); - - /** Modifies the compositing attributes of an art style that are applied globally - to an art object, using a dictionary, and creates a new style with - the modifications. - @param style The source art style object. This object is not modified. - @param attrs The dictionary containing the attributes. - You can specify a subset of the keys in order to modify a - subset of the compositing attributes. - @param newStyle [out] A buffer in which to return a new style object - containing the modifications. - */ - AIAPI AIErr (*SetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle); - - /** Retrieves the common compositing attributes for the current selection in the - current document. Retrieves only the common attributes; for - example, if two objects are selected with different opacities, the - opacity entry is not present in the returned dictionary. - @param styleAttrs [in, out] The dictionary in which to return the common attributes - applied to objects as a whole. Can be \c NULL if not needed. - @param fillAttrs [in, out] The dictionary in which to return the common attributes - applied to the focal fills. Can be \c NULL if not needed. - @param strokeAttrs [in, out] The dictionary in which to return the common attributes - applied to the focal strokes. Can be \c NULL if not needed. - @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite - */ - AIAPI AIErr (*GetCurrentTransparency) (AIDictionaryRef styleAttrs, - AIDictionaryRef fillAttrs, - AIDictionaryRef strokeAttrs); - - /** Sets compositing attributes for the current selection in the - current document.The dictionaries can specify a subset of - keys in order to modify a subset of the compositing attributes. - @param styleAttrs The dictionary containing the attributes - applied to objects as a whole. Can be \c NULL if not needed. - @param fillAttrs The dictionary containing attributes - applied to the focal fills. Can be \c NULL if not needed. - @param strokeAttrs The dictionary containing attributes - applied to the focal strokes. Can be \c NULL if not needed. - @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite - */ - AIAPI AIErr (*SetCurrentTransparency) (AIDictionaryRef styleAttrs, - AIDictionaryRef fillAttrs, - AIDictionaryRef strokeAttrs); - - /** Retrieves dictionary containing the compositing attributes for - the focal fill of an art style. - @param artStyle The art style object. - @param attrs [in, out] The dictionary in which to return the attributes. - @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite - */ - AIAPI AIErr (*GetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs); - - /** Retrieves dictionary containing the compositing attributes for - the focal stroke of an art style. - @param artStyle The art style object. - @param attrs [in, out] The dictionary in which to return the attributes. - @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite - */ - AIAPI AIErr (*GetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs); - - /** Modifies the compositing attributes for the focal fill of an art style - using a dictionary, and creates a new style with the modifications. - @param artStyle The source art style object. Not modified. - @param attrs The dictionary containing the attributes. - @param newStyle [out] A buffer in which to return a new style object - containing the modifications. - @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite - */ - AIAPI AIErr (*SetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle); - - /** Modifies the compositing attributes for the focal stroke of an art style - using a dictionary, and creates a new style with the modifications. - @param artStyle The source art style object. Not modified. - @param attrs The dictionary containing the attributes. - @param newStyle [out] A buffer in which to return a new style object - containing the modifications. - @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite - */ - AIAPI AIErr (*SetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle ); - - /** Reports whether an art object contains any artwork with - non-normal blending that is not isolated at the level of the object. - (Note that this function returns a boolean value, not an error code.) - @param art The art object. - @return True if the object does contain artwork with non-isolated blending. - */ - AIAPI AIBoolean (*ContainsNonIsolatedBlending) (AIArtHandle object); - - // New to Illustrator 11: - - /** Reports the isolation state of the page group, which contains all the layers in the - current document. - (Note that this function returns a boolean value, not an error code.) - @return True if the contents of the page is to be drawn in an isolated - transparency group. - */ - AIAPI AIBoolean (*GetDocumentIsolated) (void); - - /** Sets the isolation state of the page group, which contains all the layers in the - current document. - @param isolated True to turn isolation on, false to turn it off. - */ - AIAPI AIErr (*SetDocumentIsolated) (AIBoolean isolated); - - /** Reports the knockout state of the page group, which contains all the layers in the - current document. - (Note that this function returns a boolean value, not an error code.) - @return True if knockout is on for the page group, false if it is off. - */ - AIAPI AIBoolean (*GetDocumentKnockout) (void); - - /** Sets the knockout state of the page group, which contains all the layers in the - current document. - @param knockout True to turn knockout on, false to turn it off. - */ - AIAPI AIErr (*SetDocumentKnockout) (AIBoolean knockout); - -} AIBlendStyleSuite; - - -/** @ingroup Suites - This suite provides functions to access the opacity mask that - can be associated with an art object. Opacity values from the - mask are combined with the object's own opacity when compositing it. - - Mask objects are reference counted. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMaskSuite and \c #kAIMaskVersion. - */ -typedef struct { - - /** Increments the reference count for a mask. - (Note that this function returns an integer value, not an error code.) - @param mask The mask object. - @return The new reference count for the mask. - */ - AIAPI ai::int32 (*AddRef) (AIMaskRef mask); - /** Decrements the reference count for a mask, and, when - the count reaches 0, frees the associated memory. - (Note that this function returns an integer value, not an error code.) - @param mask The mask object. - @return The new reference count for the mask. - */ - AIAPI ai::int32 (*Release) (AIMaskRef mask); - - /** Retrieves the mask associated with an art object, if any. - @param object The art object. - @param mask [out] A buffer in which to return the mask object. - */ - AIAPI AIErr (*GetMask) (AIArtHandle object, AIMaskRef* mask); - - /** Creates a mask for an art object if it does not already have one. - The art of the newly created mask is an empty group object. - Retrieve the new mask with \c #GetMask(). - @param object The art object. - */ - AIAPI AIErr (*CreateMask) (AIArtHandle object); - - /** Deletes the mask association between an art object and its mask, - and decrements the reference count of the mask. If the reference - count is then 0, also deletes the mask object. - @param object The art object. - */ - AIAPI AIErr (*DeleteMask) (AIArtHandle object); - - /** Reports the link state of a mask. When a mask is linked, certain actions - on the associated art object, such as rotation, are automatically applied - to the mask as well. - (Note that this function returns a boolean value, not an error code.) - @param mask The mask object. - @return True if the mask is linked. - */ - AIAPI AIBoolean (*GetLinked) (AIMaskRef mask); - - /** Sets the link state of a mask. When a mask is linked, certain actions - on the associated art object, such as rotation, are automatically applied - to the mask as well. - @param mask The mask object. - @param linked True to turn linking on, false to turn it off. - */ - AIAPI AIErr (*SetLinked) (AIMaskRef mask, AIBoolean linked); - - /** Reports the disabled state of a mask. When a mask is disabled, - it is ignored when rendering the associated art object. - (Note that this function returns a boolean value, not an error code.) - @param mask The mask object. - @return True if the mask is disabled. - */ - AIAPI AIBoolean (*GetDisabled) (AIMaskRef mask); - - /** Sets the disabled state of a mask. When a mask is disabled, - it is ignored when rendering the associated art object. - @param mask The mask object. - @param disabled True to disable the mask, false to enable it. - */ - AIAPI AIErr (*SetDisabled) (AIMaskRef mask, AIBoolean disabled); - - /** Reports the inverted state of a mask. When a mask is inverted, - the opacity is inverted before being applied to the associated art. - (Note that this function returns a boolean value, not an error code.) - @param mask The mask object. - @return True if the mask is inverted. - */ - AIAPI AIBoolean (*GetInverted) (AIMaskRef mask); - - /** Sets the inverted state of a mask. When a mask is inverted, - the opacity is inverted before being applied to the associated art. - @param mask The mask object. - @param inverted True to invert the mask, false to turn inversion off. - */ - AIAPI AIErr (*SetInverted) (AIMaskRef mask, AIBoolean inverted); - - /** Copies a mask and its link status from one art object to another. - @param source The source art object. - @param destination The destination art object. - */ - AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination); - - /** Retrieves the art object that comprises an opacity mask, if any. - (Note that this function returns an object value, not an error code.) - @param mask The mask object. - @return The art object, or \c NULL if there is no mask art. - */ - AIAPI AIArtHandle (*GetArt) (AIMaskRef mask); - - /** Reports whether the art object that comprises an opacity mask is - currently being edited. - (Note that this function returns a boolean value, not an error code.) - @param mask The mask object. - @return True if the mask art is being edited. - */ - AIAPI AIBoolean (*IsEditingArt) (AIMaskRef mask); - - /** Turns editing on or off for the art object associated with a mask. - Editing mask art causes a new layer to be created - at the top of the current layer list containing the mask art. When - editing is terminated the layer is deleted. - @param mask The mask object. - @param isedit True to turn editing on, false to turn it off. - @see \c #AILayerListSuite - */ - AIAPI AIErr (*SetEditingArt) (AIMaskRef mask, AIBoolean isedit); - - /** Retrieves the masked art object associated with a group art object - that is the mask art for another art object. - @param mask The group art object. - @param [out] A buffer in which to return the masked art object, - or \c NULL if the input art object is not used as a mask. - */ - AIAPI AIErr (*GetMaskedArt) (AIArtHandle mask, AIArtHandle* masked); - - /** Reports the clipping state of a mask. - (Note that this function returns a boolean value, not an error code.) - @param mask The mask object. - @return True if the art associated with the mask is clipped. - */ - AIAPI AIBoolean (*GetClipping) (AIMaskRef mask); - - /** Sets the clipping state of a mask. When clipping is true, the - opacity value outside the mask art is 0%, thus clipping out - everything outside the mask art.When clipping is false, the - value outside is 100%, thus revealing everything outside the - boundary of the mask art. - @param mask The mask object. - @param clipping True to turn clipping on, false to turn it off. - */ - AIAPI AIErr (*SetClipping) (AIMaskRef mask, AIBoolean clipping); - -} AIMaskSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIMask__ +#define __AIMask__ + +/* + * Name: AIMask.h + * $Revision: 3 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Mask Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIArtStyle__ +#include "AIArtStyle.h" +#endif + +#ifndef __AIDictionary__ +#include "AIDictionary.h" +#endif + +#include "AIHeaderBegin.h" + +/******************************************************************************* + ** + ** Suite name and version + ** + **/ + +#define kAIBlendStyleSuite "AI Blend Style Suite" +#define kAIBlendStyleSuiteVersion5 AIAPI_VERSION(5) +#define kAIBlendStyleSuiteVersion kAIBlendStyleSuiteVersion5 +#define kAIBlendStyleVersion kAIBlendStyleSuiteVersion + +#define kAIMaskSuite "AI Mask Suite" +#define kAIMaskSuiteVersion5 AIAPI_VERSION(5) +#define kAIMaskSuiteVersion kAIMaskSuiteVersion5 +#define kAIMaskVersion kAIMaskSuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + + +/** An opaque reference to a mask. There is a one-to-one correspondence between + objects and masks. */ +typedef struct _AIMask* AIMaskRef; + + +/** The various blending modes that can be used to composite an object. These + modes correspond to the ones in Photoshop. See #AIBlendingModeValues. */ +typedef ai::int32 AIBlendingMode; +/** Values for \c #AIBlendingMode */ +enum AIBlendingModeValues { + kAINormalBlendingMode = 0, + kAIMultiplyBlendingMode = 1, + kAIScreenBlendingMode = 2, + kAIOverlayBlendingMode = 3, + kAISoftLightBlendingMode = 4, + kAIHardLightBlendingMode = 5, + kAIColorDodgeBlendingMode = 6, + kAIColorBurnBlendingMode = 7, + kAIDarkenBlendingMode = 8, + kAILightenBlendingMode = 9, + kAIDifferenceBlendingMode = 10, + kAIExclusionBlendingMode = 11, + kAIHueBlendingMode = 12, + kAISaturationBlendingMode = 13, + kAIColorBlendingMode = 14, + kAILuminosityBlendingMode = 15, + kAINumBlendingModes = 16 +}; + + +/** Knockout tri-state */ +typedef enum AIKnockout +{ + kAIKnockoutUnknown = -1, + /** No knockout */ + kAIKnockoutOff = 0, + /** Knockout */ + kAIKnockoutOn, + /** Use parent's knockout value */ + kAIKnockoutInherit +} AIKnockout; + + +/* Dictionary keys for compositing attributes */ + +/** @ingroup DictKeys + Dictionary key for mode of a blend style, contains \c #AIBlendingModeValues. + See \c #AIBlendStyleSuite::GetArtAttrs(). */ +#define kAIBlendModeKey "Mode" +/** @ingroup DictKeys + Dictionary key for opacity of a blend style, contains an \c #AIReal value + in the range [0..1]. + See \c #AIBlendStyleSuite::GetArtAttrs() and \c #AIMaskSuite. */ +#define kAIBlendOpacityKey "Opacity" +/** @ingroup DictKeys + Dictionary key for isolation state of a blend style, contains a boolean value. + See \c #AIBlendStyleSuite::GetArtAttrs(). */ +#define kAIBlendIsolatedKey "Isolated" +/** @ingroup DictKeys + Dictionary key for knockout state of a blend style, contains an \c #AIKnockout value. + See \c #AIBlendStyleSuite::GetArtAttrs().*/ +#define kAIBlendKnockoutKey "Knockout" +/** @ingroup DictKeys + Dictionary key for alpha state of a blend style, contains a boolean value. + See \c #AIBlendStyleSuite::GetArtAttrs(). */ +#define kAIBlendAlphaIsShapeKey "AlphaIsShape" + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides function for working with \e blend \e styles. + When an art object overlaps other art, it is composited with what + was drawn before it, using a blend style that is a part of the + object's art style. Fills and strokes can have their own + compositing attributes. + + See the PDF language specification for details of the transparency + modes used by Illustrator. + + @see \c #AIMaskSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIBlendStyleSuite and \c #kAIBlendStyleVersion. + */ +typedef struct { + + /** Retrieves the current blending mode of an art object, which + applies to the object as a whole. + (Note that this function returns a constant value, not an error code.) + @param art The art object. + @return The mode constant, one of the \c #AIBlendingModeValues. + */ + AIAPI AIBlendingMode (*GetBlendingMode) (AIArtHandle art); + + /** Sets the blending mode of an art object, which + applies to the object as a whole. + @param art The art object. + @param mode The new mode constant, one of the \c #AIBlendingModeValues. + */ + AIAPI AIErr (*SetBlendingMode) (AIArtHandle art, AIBlendingMode mode); + + /** Retrieves the current opacity value applied by the style to an art object. + (Note that this function returns a numeric value, not an error code.) + @param art The art object. + @return The opacity value, in the range [0..1] where 0 is completely + transparent and 1 is completely opaque. + */ + AIAPI AIReal (*GetOpacity) (AIArtHandle art); + + /** Sets the opacity value applied by the style to an art object. + @param art The art object. + @param opacity The new opacity value, in the range [0..1] where 0 is completely + transparent and 1 is completely opaque. + */ + AIAPI AIErr (*SetOpacity) (AIArtHandle art, AIReal opacity); + + /** Reports whether any blending modes used in the rendering of the object + contents are isolated from what has already been drawn. This does + not affect the blending mode used for compositing the entire object + into its backdrop. + (Note that this function returns a boolean value, not an error code.) + @param art The art object. + @return True if isolation is on. + */ + AIAPI AIBoolean (*GetIsolated) (AIArtHandle art); + + /** Sets whether any blending modes used in the rendering of the object + contents are isolated from what has already been drawn. This does + not affect the blending mode used for compositing the entire object + into its backdrop. + @param art The art object. + @param isolated True to turn isolation on, false to turn it off. + */ + AIAPI AIErr (*SetIsolated) (AIArtHandle art, AIBoolean isolated); + + /** Retrieves the current knockout state of an art object. If the state is + \c #kAIKnockoutInherit, the on/off state is inherited from the object’s parent, + and you can use \c #GetInheritedKnockout() to retrieve it. + (Note that this function returns a constant value, not an error code.) + @param art The art object. + @return The knockout state constant, one of the \c #AIKnockout values. + */ + AIAPI AIKnockout (*GetKnockout) (AIArtHandle art); + + /** Retrieves the inherited knockout state (on or off) of an art object. + (Note that this function returns a constant value, not an error code.) + @param art The art object. + @return The knockout state constant, \c #kAIKnockoutOff or \c #kAIKnockoutOn. + */ + AIAPI AIKnockout (*GetInheritedKnockout) (AIArtHandle art); + + /** Sets the knockout state of an art object. If the state is + \c #kAIKnockoutInherit, the on/off state is inherited from + the object’s parent. + @param art The art object. + @param knockout The new knockout state: on, off, or inherited, + */ + AIAPI AIErr (*SetKnockout) (AIArtHandle art, AIKnockout knockout); + + /** Reports whether opacity and mask define the knockout shape for + an art object. + (Note that this function returns a boolean value, not an error code.) + @param art The art object. + @return True if opacity and mask define the knockout shape. + */ + AIAPI AIBoolean (*GetAlphaIsShape) (AIArtHandle art); + + /** Sets whether opacity and mask define the knockout shape for + an art object. + @param art The art object. + @param alphaIsShape True if opacity and mask define the knockout shape, + false if they do not. + */ + AIAPI AIErr (*SetAlphaIsShape) (AIArtHandle art, AIBoolean alphaIsShape); + + /** Copies the compositing attributes that are applied globally by the + style of one art object to another art object. + @param source The source art object. + @param destination The destination art object. + */ + AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination); + + /** Retrieves the dictionary that contains compositing attributes that + are applied globally by the style of an art object. + This convenience function has the same effect as retrieving an + art object’s art style and getting attributes individually + using \c #AIBlendStyleSuite::GetStyleAttrs(). + + The keys for the compositing attributes are: + \verbatim + #kAIBlendModeKey + #kAIBlendOpacityKey + #kAIBlendIsolatedKey + #kAIBlendKnockoutKey + #kAIBlendAlphaIsShapeKey + \endverbatim + @param art The art object. + @param attrs [in, out] The dictionary in which to return the attributes. + @see \c #AIDictionarySuite + */ + AIAPI AIErr (*GetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs); + + /** Sets the compositing attributes applied globally to an art object, + using a dictionary. This convenience function has the same + effect as retrieving an art object’s art style and setting + attributes individually using \c #AIBlendStyleSuite::SetStyleAttrs(). + @param art The art object. + @param attrs The dictionary containing the attributes. + You can specify a subset of the keys in order to modify a + subset of the compositing attributes. + @see \c #GetArtAttrs() for keys. + */ + AIAPI AIErr (*SetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs); + + /** Retrieves the dictionary that contains globally-applied compositing attributes + from an art style. + @param style The art style object. + @param attrs [in, out] The dictionary in which to return the attributes. + @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite + */ + AIAPI AIErr (*GetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs); + + /** Modifies the compositing attributes of an art style that are applied globally + to an art object, using a dictionary, and creates a new style with + the modifications. + @param style The source art style object. This object is not modified. + @param attrs The dictionary containing the attributes. + You can specify a subset of the keys in order to modify a + subset of the compositing attributes. + @param newStyle [out] A buffer in which to return a new style object + containing the modifications. + */ + AIAPI AIErr (*SetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs, + AIArtStyleHandle* newStyle); + + /** Retrieves the common compositing attributes for the current selection in the + current document. Retrieves only the common attributes; for + example, if two objects are selected with different opacities, the + opacity entry is not present in the returned dictionary. + @param styleAttrs [in, out] The dictionary in which to return the common attributes + applied to objects as a whole. Can be \c NULL if not needed. + @param fillAttrs [in, out] The dictionary in which to return the common attributes + applied to the focal fills. Can be \c NULL if not needed. + @param strokeAttrs [in, out] The dictionary in which to return the common attributes + applied to the focal strokes. Can be \c NULL if not needed. + @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite + */ + AIAPI AIErr (*GetCurrentTransparency) (AIDictionaryRef styleAttrs, + AIDictionaryRef fillAttrs, + AIDictionaryRef strokeAttrs); + + /** Sets compositing attributes for the current selection in the + current document.The dictionaries can specify a subset of + keys in order to modify a subset of the compositing attributes. + @param styleAttrs The dictionary containing the attributes + applied to objects as a whole. Can be \c NULL if not needed. + @param fillAttrs The dictionary containing attributes + applied to the focal fills. Can be \c NULL if not needed. + @param strokeAttrs The dictionary containing attributes + applied to the focal strokes. Can be \c NULL if not needed. + @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite + */ + AIAPI AIErr (*SetCurrentTransparency) (AIDictionaryRef styleAttrs, + AIDictionaryRef fillAttrs, + AIDictionaryRef strokeAttrs); + + /** Retrieves dictionary containing the compositing attributes for + the focal fill of an art style. + @param artStyle The art style object. + @param attrs [in, out] The dictionary in which to return the attributes. + @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite + */ + AIAPI AIErr (*GetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs); + + /** Retrieves dictionary containing the compositing attributes for + the focal stroke of an art style. + @param artStyle The art style object. + @param attrs [in, out] The dictionary in which to return the attributes. + @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite + */ + AIAPI AIErr (*GetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs); + + /** Modifies the compositing attributes for the focal fill of an art style + using a dictionary, and creates a new style with the modifications. + @param artStyle The source art style object. Not modified. + @param attrs The dictionary containing the attributes. + @param newStyle [out] A buffer in which to return a new style object + containing the modifications. + @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite + */ + AIAPI AIErr (*SetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs, + AIArtStyleHandle* newStyle); + + /** Modifies the compositing attributes for the focal stroke of an art style + using a dictionary, and creates a new style with the modifications. + @param artStyle The source art style object. Not modified. + @param attrs The dictionary containing the attributes. + @param newStyle [out] A buffer in which to return a new style object + containing the modifications. + @see \c #GetArtAttrs() for keys, \c #AIDictionarySuite + */ + AIAPI AIErr (*SetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs, + AIArtStyleHandle* newStyle ); + + /** Reports whether an art object contains any artwork with + non-normal blending that is not isolated at the level of the object. + (Note that this function returns a boolean value, not an error code.) + @param art The art object. + @return True if the object does contain artwork with non-isolated blending. + */ + AIAPI AIBoolean (*ContainsNonIsolatedBlending) (AIArtHandle object); + + // New to Illustrator 11: + + /** Reports the isolation state of the page group, which contains all the layers in the + current document. + (Note that this function returns a boolean value, not an error code.) + @return True if the contents of the page is to be drawn in an isolated + transparency group. + */ + AIAPI AIBoolean (*GetDocumentIsolated) (void); + + /** Sets the isolation state of the page group, which contains all the layers in the + current document. + @param isolated True to turn isolation on, false to turn it off. + */ + AIAPI AIErr (*SetDocumentIsolated) (AIBoolean isolated); + + /** Reports the knockout state of the page group, which contains all the layers in the + current document. + (Note that this function returns a boolean value, not an error code.) + @return True if knockout is on for the page group, false if it is off. + */ + AIAPI AIBoolean (*GetDocumentKnockout) (void); + + /** Sets the knockout state of the page group, which contains all the layers in the + current document. + @param knockout True to turn knockout on, false to turn it off. + */ + AIAPI AIErr (*SetDocumentKnockout) (AIBoolean knockout); + +} AIBlendStyleSuite; + + +/** @ingroup Suites + This suite provides functions to access the opacity mask that + can be associated with an art object. Opacity values from the + mask are combined with the object's own opacity when compositing it. + + Mask objects are reference counted. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMaskSuite and \c #kAIMaskVersion. + */ +typedef struct { + + /** Increments the reference count for a mask. + (Note that this function returns an integer value, not an error code.) + @param mask The mask object. + @return The new reference count for the mask. + */ + AIAPI ai::int32 (*AddRef) (AIMaskRef mask); + /** Decrements the reference count for a mask, and, when + the count reaches 0, frees the associated memory. + (Note that this function returns an integer value, not an error code.) + @param mask The mask object. + @return The new reference count for the mask. + */ + AIAPI ai::int32 (*Release) (AIMaskRef mask); + + /** Retrieves the mask associated with an art object, if any. + @param object The art object. + @param mask [out] A buffer in which to return the mask object. + */ + AIAPI AIErr (*GetMask) (AIArtHandle object, AIMaskRef* mask); + + /** Creates a mask for an art object if it does not already have one. + The art of the newly created mask is an empty group object. + Retrieve the new mask with \c #GetMask(). + @param object The art object. + */ + AIAPI AIErr (*CreateMask) (AIArtHandle object); + + /** Deletes the mask association between an art object and its mask, + and decrements the reference count of the mask. If the reference + count is then 0, also deletes the mask object. + @param object The art object. + */ + AIAPI AIErr (*DeleteMask) (AIArtHandle object); + + /** Reports the link state of a mask. When a mask is linked, certain actions + on the associated art object, such as rotation, are automatically applied + to the mask as well. + (Note that this function returns a boolean value, not an error code.) + @param mask The mask object. + @return True if the mask is linked. + */ + AIAPI AIBoolean (*GetLinked) (AIMaskRef mask); + + /** Sets the link state of a mask. When a mask is linked, certain actions + on the associated art object, such as rotation, are automatically applied + to the mask as well. + @param mask The mask object. + @param linked True to turn linking on, false to turn it off. + */ + AIAPI AIErr (*SetLinked) (AIMaskRef mask, AIBoolean linked); + + /** Reports the disabled state of a mask. When a mask is disabled, + it is ignored when rendering the associated art object. + (Note that this function returns a boolean value, not an error code.) + @param mask The mask object. + @return True if the mask is disabled. + */ + AIAPI AIBoolean (*GetDisabled) (AIMaskRef mask); + + /** Sets the disabled state of a mask. When a mask is disabled, + it is ignored when rendering the associated art object. + @param mask The mask object. + @param disabled True to disable the mask, false to enable it. + */ + AIAPI AIErr (*SetDisabled) (AIMaskRef mask, AIBoolean disabled); + + /** Reports the inverted state of a mask. When a mask is inverted, + the opacity is inverted before being applied to the associated art. + (Note that this function returns a boolean value, not an error code.) + @param mask The mask object. + @return True if the mask is inverted. + */ + AIAPI AIBoolean (*GetInverted) (AIMaskRef mask); + + /** Sets the inverted state of a mask. When a mask is inverted, + the opacity is inverted before being applied to the associated art. + @param mask The mask object. + @param inverted True to invert the mask, false to turn inversion off. + */ + AIAPI AIErr (*SetInverted) (AIMaskRef mask, AIBoolean inverted); + + /** Copies a mask and its link status from one art object to another. + @param source The source art object. + @param destination The destination art object. + */ + AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination); + + /** Retrieves the art object that comprises an opacity mask, if any. + (Note that this function returns an object value, not an error code.) + @param mask The mask object. + @return The art object, or \c NULL if there is no mask art. + */ + AIAPI AIArtHandle (*GetArt) (AIMaskRef mask); + + /** Reports whether the art object that comprises an opacity mask is + currently being edited. + (Note that this function returns a boolean value, not an error code.) + @param mask The mask object. + @return True if the mask art is being edited. + */ + AIAPI AIBoolean (*IsEditingArt) (AIMaskRef mask); + + /** Turns editing on or off for the art object associated with a mask. + Editing mask art causes a new layer to be created + at the top of the current layer list containing the mask art. When + editing is terminated the layer is deleted. + @param mask The mask object. + @param isedit True to turn editing on, false to turn it off. + @see \c #AILayerListSuite + */ + AIAPI AIErr (*SetEditingArt) (AIMaskRef mask, AIBoolean isedit); + + /** Retrieves the masked art object associated with a group art object + that is the mask art for another art object. + @param mask The group art object. + @param [out] A buffer in which to return the masked art object, + or \c NULL if the input art object is not used as a mask. + */ + AIAPI AIErr (*GetMaskedArt) (AIArtHandle mask, AIArtHandle* masked); + + /** Reports the clipping state of a mask. + (Note that this function returns a boolean value, not an error code.) + @param mask The mask object. + @return True if the art associated with the mask is clipped. + */ + AIAPI AIBoolean (*GetClipping) (AIMaskRef mask); + + /** Sets the clipping state of a mask. When clipping is true, the + opacity value outside the mask art is 0%, thus clipping out + everything outside the mask art.When clipping is false, the + value outside is 100%, thus revealing everything outside the + boundary of the mask art. + @param mask The mask object. + @param clipping True to turn clipping on, false to turn it off. + */ + AIAPI AIErr (*SetClipping) (AIMaskRef mask, AIBoolean clipping); + +} AIMaskSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMaskFlattener.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMaskFlattener.h index 664333f..75a54d1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMaskFlattener.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMaskFlattener.h @@ -1,342 +1,342 @@ -#ifndef __AIMaskFlattener__ -#define __AIMaskFlattener__ - -/* - * Name: AIMaskFlattener.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Mask Flattener Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIArtSet__ -#include "AIArtSet.h" -#endif - -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIMaskFlattener.h */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAIMaskFlattenerSuite "AI Mask Flattener Suite" -#define kAIMaskFlattenerSuiteVersion5 AIAPI_VERSION(5) -#define kAIMaskFlattenerSuiteVersion kAIMaskFlattenerSuiteVersion5 -#define kAIMaskFlattenerVersion kAIMaskFlattenerSuiteVersion - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** Default resolution of raster images generated by art flattening, in DPI. */ -#define kAIFlattenDefaultResolution (300.0f) -/** Minimum resolution of raster images generated by art flattening, in DPI. */ -#define kAIFlattenMinResolution (1.0f) -/** Maximum resolution of raster images generated by art flattening, in DPI. */ -#define kAIFlattenMaxResolution (9600.0f) -/** Minimum art-flattening balance */ -#define kAIFlattenMinBalance 0 -/** Maximum art-flattening balance */ -#define kAIFlattenMaxBalance 100 - -/** Maximum number of distinct spot colors that can appear in artwork to be flattened. */ -#define kAIFlattenMaxSpots 27 -/** @ingroup Errors - Art to be flattened has linked mask. See \c #AIMaskSuite and \c #AIMaskFlattenerSuite. */ -#define kAIFlattenHasLinkErr 'FLnk' -/** @ingroup Errors - Art to be flattened has too many spot colors. See \c #AIMaskFlattenerSuite. */ -#define kAIFlattenTooManySpotsErr 'FSpt' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Bit flags for \c #AIFlatteningOptions::flags. See \c #AIMaskFlattenerSuite::FlattenArt().*/ -typedef enum -{ - kAIFlattenDefault = 0, - /** Output text outlines instead of native text */ - kAIFlattenOutlineText = 1 << 1, - /** Convert stroke to fill even when object is not involved in transparency */ - kAIFlattenOutlineStrokes = 1 << 2, - /** For regions that contain high numbers of groups and objects, - rasterize and clip to the art bounds (unless - \c #AIFlatteningOptions:balance is 100). This speeds - computation and simplifies the flattened output. */ - kAIFlattenClipComplexRegions = 1 << 3, - /** Preserve overprint (rather than simulating it) in opaque regions */ - kAIFlattenPreserveOverprints = 1 << 4, - /** Show a progress bar */ - kAIFlattenShowProgress = 1 << 7, - /** Preserve simple transparency (flatten blend mode) */ - kAIFlattenPreserveSimpleTransparency = 1 << 9, - /** Always use the planar map, even on opaque regions */ - kAIFlattenPlanarizeOpaqueRegions = 1 << 10, - /** Do not call \c #AIUndoSuite::UndoChanges() on error or cancel. - (For Live Effects, for example, that handle their own undo.) */ - kAIFlattenDontUndoChangesOnError = 1 << 11, - /** Do not create foreign objects (art of type \c #kForeignArt) to preserve - things like spot colors. May increase lossiness. - See \c #kAIFOConversionFull and \c #AIFOConversionSuite. */ - kAIFlattenFOConversionFull = 1 << 12, - /** Convert paths in the flattened output into non-self-intersecting - paths. See \c #kAIFOConversionSimplifyPaths and \c #AIFOConversionSuite */ - kAIFlattenFOConversionSimplifyPaths = 1 << 13, - /** Flatten art into a knockout group. */ - kAIFlattenIntoKnockoutGroup = 1 << 14, - /** Disallow colorized grayscale images in the flattened output. */ - kAIFlattenDisallowColorizedGray = 1 << 15, - /** Disallow NChannel/Separation/Indexed colorspace images in the flattened output. */ - kAIFlattenDisallowNChannelIndexedImages = 1 << 16, - /** Internal Use Only. */ - kAIUsePathDPIToLimitPrecision = 1 << 17, - /** Use anti-aliasing when rasterizing during flattening */ - kAIFlattenUseAntiAliasing = 1 << 18, -} AIFlatteningFlags; - - -/** Obsolete. Quality factors are now controlled by - individual \c #AIFlatteningOptions values. */ -typedef enum -{ - kAIFlatteningQualityLevel0, // lower quality - more rasters - kAIFlatteningQualityLevel1, - kAIFlatteningQualityLevel2, - kAIFlatteningQualityLevel3, - kAIFlatteningQualityLevel4, // higher quality - more vectors - kAIFlatteningQualityLevelCount - -} AIFlatteningQuality; - - -/** Options that control how flattening occurs. - See \c #AIMaskFlattenerSuite::FlattenArt(). */ -typedef struct -{ - /** A logical OR of \c #AIFlatteningFlags. */ - ai::uint32 flags; - /** The balance between rasters and vectors in the output - art. An integer in the range [0..100] where 0 uses the - most rasters and 100 uses the most vectors */ - ai::uint16 balance; - /** Rasterization resolution for high frequency areas, in - dots per inch (DPI).*/ - AIReal rasterResolution; - /** Rasterization resolution for low frequency areas (smooth shades), - in dots per inch (DPI).*/ - AIReal meshResolution; - - /** When a progress bar is specified by \c flags, the range of - the progress values. */ - struct - { - /** Start of progress range, usually 0.0 */ - AIReal start; - /** End of progress range, usually 1.0 */ - AIReal end; - } progress; - -} AIFlatteningOptions; - - -/** The type of information collected with - \c #AIMaskFlattenerSuite::CollectDocumentFlatteningInfo() - and sent to the \c #AIFlatteningInfoReceiver. - - A linked EPS is also a placed object, so the callback receives - both types of snippets for each linked EPS, in no guaranteed order. -*/ -typedef enum -{ - /** Information on linked EPS objects in flattening output. */ - kAIFlatteningInfoLinkedEPSObject, - /** Information on placed art objects in flattening output. */ - kAIFlatteningInfoPlacedArtObject -} AIFlatteningInfoType; - -/** Information on a linked EPS object created as a part of - flattened artwork. - */ -typedef struct -{ - /** The linked EPS object */ - AIArtHandle object; - /** True if the linked object interacts with transparency. - \li If it does, it must be parsed into objects for printing. - \li If it does not, it can be passed directly to a PostScript device for printing. */ - AIBoolean interacts; - /** True if the contents of the linked EPS can be parsed for printing. - For example, in version 11 or later, a linked DCS cannot be parsed - to recover the original content.*/ - AIBoolean parseOK; -} AIFlatteningInfoLinkedEPSObject; - -/** Information on a placed art object created as a part of - flattened artwork. - */ -typedef struct -{ - /** The placed art object */ - AIArtHandle object; -} AIFlatteningInfoPlacedArtObject; - -/** An information packet sent to an \c #AIFlatteningInfoReceiver. */ -typedef struct -{ - /** The type of information being sent (linked EPS or placed art object). */ - AIFlatteningInfoType what; - /** The information. The valid member is determined by - the type. */ - union - { - /** Information on a linked EPS object created as a part of - flattened artwork. */ - AIFlatteningInfoLinkedEPSObject linkedEPSObject; - /** Information on a placed art object created as a part of - flattened artwork. */ - AIFlatteningInfoPlacedArtObject placedArtObject; - } x; -} AIFlatteningInfoSnippet; - -/** Prototype for a receiver of flattening information from - \c #AIMaskFlattenerSuite::CollectDocumentFlatteningInfo(). - @param receiverdata Developer defined data passed from - \c #AIMaskFlattenerSuite::CollectDocumentFlatteningInfo() - @param snippet The current snippet of flattening information. - */ -typedef AIErr (*AIFlatteningInfoReceiver) (void* receiverdata, AIFlatteningInfoSnippet* snippet); - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that allow you to flatten transparent artwork into - an equivalent collection of opaque artwork. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMaskFlattenerSuite and \c #kAIMaskFlattenerVersion. - */ -typedef struct { - /** Flattens transparent artwork into an equivalent collection of opaque artwork. - @param artSet The artwork to flatten. - @param options The flags and values that control how the flattening operation is - performed. - @param paintOrder The paint order position of the output art, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object. - */ - AIAPI AIErr (*FlattenArt)(AIArtSet artSet, AIFlatteningOptions *options, ai::int16 paintOrder, AIArtHandle prep); - - /** Creates a new, temporary layer at the top of the current document - to serve as a destination for flattened art. When it is no longer , - needed, use \c #RemoveTemporaryFlatteningLayer() to delete it. - @param layer [out] A buffer in which to return the layer object. - */ - AIAPI AIErr (*CreateTemporaryFlatteningLayer)(AILayerHandle *layer); - - /** Flattens all transparent artwork in the current document - into an equivalent collection of opaque artwork in a layer, using - flattening options obtained from the document's dictionary as set - from the Document Setup dialog. - @param layer The layer. Can be a temporary layer created with - \c #CreateTemporaryFlatteningLayer(). - */ - AIAPI AIErr (*FlattenDocumentToLayer)(AILayerHandle layer); - - /** Removes the temporary layer created with \c #CreateTemporaryFlatteningLayer() - from the current document, along with any flattened art on the layer. - */ - AIAPI AIErr (*RemoveTemporaryFlatteningLayer)(); - - /** Reports whether a layer is a temporary layer intended as a destination - for flattened artwork. - @param layer The layer. - @param flattening [out] A buffer in which to return true if the layer is - a temporary flattening layer. - */ - AIAPI AIErr (*IsTemporaryFlatteningLayer)(AILayerHandle layer, AIBoolean *flattening); - - /** Displays a common flattening error message based on the - error received back from a flattening operation. Provides - a uniform way to inform the user of the results of flattening. - @param error An error code returned from a flattening operation. - */ - AIAPI AIErr (*ReportError)(AIErr error); - - /** Sends information about objects created when the document was - flattened to a developer-supplied callback. The information is sent as - a sequence of \c #AIFlatteningInfoSnippet values, Each snippet contains - information about one object. - - Currently, information is supplied about linked EPS and placed art - in the flattened output art. A linked EPS is also a placed object, - so the callback receives both types of snippets for each linked EPS, - in no guaranteed order. - @param receiver The developer-supplied callback function. - @param receiverdata Developer-defined data to pass through to the callback. - */ - AIAPI AIErr (*CollectDocumentFlatteningInfo)(AIFlatteningInfoReceiver receiver, void* receiverdata); - - /** Flattens all transparent artwork in the current document - into an equivalent collection of opaque artwork in a layer, using - flattening options obtained from the document's dictionary as set - from the AI or EPS Save Options dialog. - @param layer The layer. Can be a temporary layer created with - \c #CreateTemporaryFlatteningLayer(). - @param isEPS True if the document is to be saved to EPS, false if it - is to be saved to AI format. - */ - AIAPI AIErr (*FlattenAIDocumentToLayer)(AILayerHandle layer, ASBoolean isEPS); - -} AIMaskFlattenerSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIMaskFlattener__ +#define __AIMaskFlattener__ + +/* + * Name: AIMaskFlattener.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Mask Flattener Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIArtSet__ +#include "AIArtSet.h" +#endif + +#ifndef __AIPathStyle__ +#include "AIPathStyle.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIMaskFlattener.h */ + +/******************************************************************************* + ** + ** Suite name and version + ** + **/ + +#define kAIMaskFlattenerSuite "AI Mask Flattener Suite" +#define kAIMaskFlattenerSuiteVersion5 AIAPI_VERSION(5) +#define kAIMaskFlattenerSuiteVersion kAIMaskFlattenerSuiteVersion5 +#define kAIMaskFlattenerVersion kAIMaskFlattenerSuiteVersion + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** Default resolution of raster images generated by art flattening, in DPI. */ +#define kAIFlattenDefaultResolution (300.0f) +/** Minimum resolution of raster images generated by art flattening, in DPI. */ +#define kAIFlattenMinResolution (1.0f) +/** Maximum resolution of raster images generated by art flattening, in DPI. */ +#define kAIFlattenMaxResolution (9600.0f) +/** Minimum art-flattening balance */ +#define kAIFlattenMinBalance 0 +/** Maximum art-flattening balance */ +#define kAIFlattenMaxBalance 100 + +/** Maximum number of distinct spot colors that can appear in artwork to be flattened. */ +#define kAIFlattenMaxSpots 27 +/** @ingroup Errors + Art to be flattened has linked mask. See \c #AIMaskSuite and \c #AIMaskFlattenerSuite. */ +#define kAIFlattenHasLinkErr 'FLnk' +/** @ingroup Errors + Art to be flattened has too many spot colors. See \c #AIMaskFlattenerSuite. */ +#define kAIFlattenTooManySpotsErr 'FSpt' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Bit flags for \c #AIFlatteningOptions::flags. See \c #AIMaskFlattenerSuite::FlattenArt().*/ +typedef enum +{ + kAIFlattenDefault = 0, + /** Output text outlines instead of native text */ + kAIFlattenOutlineText = 1 << 1, + /** Convert stroke to fill even when object is not involved in transparency */ + kAIFlattenOutlineStrokes = 1 << 2, + /** For regions that contain high numbers of groups and objects, + rasterize and clip to the art bounds (unless + \c #AIFlatteningOptions:balance is 100). This speeds + computation and simplifies the flattened output. */ + kAIFlattenClipComplexRegions = 1 << 3, + /** Preserve overprint (rather than simulating it) in opaque regions */ + kAIFlattenPreserveOverprints = 1 << 4, + /** Show a progress bar */ + kAIFlattenShowProgress = 1 << 7, + /** Preserve simple transparency (flatten blend mode) */ + kAIFlattenPreserveSimpleTransparency = 1 << 9, + /** Always use the planar map, even on opaque regions */ + kAIFlattenPlanarizeOpaqueRegions = 1 << 10, + /** Do not call \c #AIUndoSuite::UndoChanges() on error or cancel. + (For Live Effects, for example, that handle their own undo.) */ + kAIFlattenDontUndoChangesOnError = 1 << 11, + /** Do not create foreign objects (art of type \c #kForeignArt) to preserve + things like spot colors. May increase lossiness. + See \c #kAIFOConversionFull and \c #AIFOConversionSuite. */ + kAIFlattenFOConversionFull = 1 << 12, + /** Convert paths in the flattened output into non-self-intersecting + paths. See \c #kAIFOConversionSimplifyPaths and \c #AIFOConversionSuite */ + kAIFlattenFOConversionSimplifyPaths = 1 << 13, + /** Flatten art into a knockout group. */ + kAIFlattenIntoKnockoutGroup = 1 << 14, + /** Disallow colorized grayscale images in the flattened output. */ + kAIFlattenDisallowColorizedGray = 1 << 15, + /** Disallow NChannel/Separation/Indexed colorspace images in the flattened output. */ + kAIFlattenDisallowNChannelIndexedImages = 1 << 16, + /** Internal Use Only. */ + kAIUsePathDPIToLimitPrecision = 1 << 17, + /** Use anti-aliasing when rasterizing during flattening */ + kAIFlattenUseAntiAliasing = 1 << 18, +} AIFlatteningFlags; + + +/** Obsolete. Quality factors are now controlled by + individual \c #AIFlatteningOptions values. */ +typedef enum +{ + kAIFlatteningQualityLevel0, // lower quality - more rasters + kAIFlatteningQualityLevel1, + kAIFlatteningQualityLevel2, + kAIFlatteningQualityLevel3, + kAIFlatteningQualityLevel4, // higher quality - more vectors + kAIFlatteningQualityLevelCount + +} AIFlatteningQuality; + + +/** Options that control how flattening occurs. + See \c #AIMaskFlattenerSuite::FlattenArt(). */ +typedef struct +{ + /** A logical OR of \c #AIFlatteningFlags. */ + ai::uint32 flags; + /** The balance between rasters and vectors in the output + art. An integer in the range [0..100] where 0 uses the + most rasters and 100 uses the most vectors */ + ai::uint16 balance; + /** Rasterization resolution for high frequency areas, in + dots per inch (DPI).*/ + AIReal rasterResolution; + /** Rasterization resolution for low frequency areas (smooth shades), + in dots per inch (DPI).*/ + AIReal meshResolution; + + /** When a progress bar is specified by \c flags, the range of + the progress values. */ + struct + { + /** Start of progress range, usually 0.0 */ + AIReal start; + /** End of progress range, usually 1.0 */ + AIReal end; + } progress; + +} AIFlatteningOptions; + + +/** The type of information collected with + \c #AIMaskFlattenerSuite::CollectDocumentFlatteningInfo() + and sent to the \c #AIFlatteningInfoReceiver. + + A linked EPS is also a placed object, so the callback receives + both types of snippets for each linked EPS, in no guaranteed order. +*/ +typedef enum +{ + /** Information on linked EPS objects in flattening output. */ + kAIFlatteningInfoLinkedEPSObject, + /** Information on placed art objects in flattening output. */ + kAIFlatteningInfoPlacedArtObject +} AIFlatteningInfoType; + +/** Information on a linked EPS object created as a part of + flattened artwork. + */ +typedef struct +{ + /** The linked EPS object */ + AIArtHandle object; + /** True if the linked object interacts with transparency. + \li If it does, it must be parsed into objects for printing. + \li If it does not, it can be passed directly to a PostScript device for printing. */ + AIBoolean interacts; + /** True if the contents of the linked EPS can be parsed for printing. + For example, in version 11 or later, a linked DCS cannot be parsed + to recover the original content.*/ + AIBoolean parseOK; +} AIFlatteningInfoLinkedEPSObject; + +/** Information on a placed art object created as a part of + flattened artwork. + */ +typedef struct +{ + /** The placed art object */ + AIArtHandle object; +} AIFlatteningInfoPlacedArtObject; + +/** An information packet sent to an \c #AIFlatteningInfoReceiver. */ +typedef struct +{ + /** The type of information being sent (linked EPS or placed art object). */ + AIFlatteningInfoType what; + /** The information. The valid member is determined by + the type. */ + union + { + /** Information on a linked EPS object created as a part of + flattened artwork. */ + AIFlatteningInfoLinkedEPSObject linkedEPSObject; + /** Information on a placed art object created as a part of + flattened artwork. */ + AIFlatteningInfoPlacedArtObject placedArtObject; + } x; +} AIFlatteningInfoSnippet; + +/** Prototype for a receiver of flattening information from + \c #AIMaskFlattenerSuite::CollectDocumentFlatteningInfo(). + @param receiverdata Developer defined data passed from + \c #AIMaskFlattenerSuite::CollectDocumentFlatteningInfo() + @param snippet The current snippet of flattening information. + */ +typedef AIErr (*AIFlatteningInfoReceiver) (void* receiverdata, AIFlatteningInfoSnippet* snippet); + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that allow you to flatten transparent artwork into + an equivalent collection of opaque artwork. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMaskFlattenerSuite and \c #kAIMaskFlattenerVersion. + */ +typedef struct { + /** Flattens transparent artwork into an equivalent collection of opaque artwork. + @param artSet The artwork to flatten. + @param options The flags and values that control how the flattening operation is + performed. + @param paintOrder The paint order position of the output art, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object. + */ + AIAPI AIErr (*FlattenArt)(AIArtSet artSet, AIFlatteningOptions *options, ai::int16 paintOrder, AIArtHandle prep); + + /** Creates a new, temporary layer at the top of the current document + to serve as a destination for flattened art. When it is no longer , + needed, use \c #RemoveTemporaryFlatteningLayer() to delete it. + @param layer [out] A buffer in which to return the layer object. + */ + AIAPI AIErr (*CreateTemporaryFlatteningLayer)(AILayerHandle *layer); + + /** Flattens all transparent artwork in the current document + into an equivalent collection of opaque artwork in a layer, using + flattening options obtained from the document's dictionary as set + from the Document Setup dialog. + @param layer The layer. Can be a temporary layer created with + \c #CreateTemporaryFlatteningLayer(). + */ + AIAPI AIErr (*FlattenDocumentToLayer)(AILayerHandle layer); + + /** Removes the temporary layer created with \c #CreateTemporaryFlatteningLayer() + from the current document, along with any flattened art on the layer. + */ + AIAPI AIErr (*RemoveTemporaryFlatteningLayer)(); + + /** Reports whether a layer is a temporary layer intended as a destination + for flattened artwork. + @param layer The layer. + @param flattening [out] A buffer in which to return true if the layer is + a temporary flattening layer. + */ + AIAPI AIErr (*IsTemporaryFlatteningLayer)(AILayerHandle layer, AIBoolean *flattening); + + /** Displays a common flattening error message based on the + error received back from a flattening operation. Provides + a uniform way to inform the user of the results of flattening. + @param error An error code returned from a flattening operation. + */ + AIAPI AIErr (*ReportError)(AIErr error); + + /** Sends information about objects created when the document was + flattened to a developer-supplied callback. The information is sent as + a sequence of \c #AIFlatteningInfoSnippet values, Each snippet contains + information about one object. + + Currently, information is supplied about linked EPS and placed art + in the flattened output art. A linked EPS is also a placed object, + so the callback receives both types of snippets for each linked EPS, + in no guaranteed order. + @param receiver The developer-supplied callback function. + @param receiverdata Developer-defined data to pass through to the callback. + */ + AIAPI AIErr (*CollectDocumentFlatteningInfo)(AIFlatteningInfoReceiver receiver, void* receiverdata); + + /** Flattens all transparent artwork in the current document + into an equivalent collection of opaque artwork in a layer, using + flattening options obtained from the document's dictionary as set + from the AI or EPS Save Options dialog. + @param layer The layer. Can be a temporary layer created with + \c #CreateTemporaryFlatteningLayer(). + @param isEPS True if the document is to be saved to EPS, false if it + is to be saved to AI format. + */ + AIAPI AIErr (*FlattenAIDocumentToLayer)(AILayerHandle layer, ASBoolean isEPS); + +} AIMaskFlattenerSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMatchingArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMatchingArt.h index 44f4f81..aea3cf0 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMatchingArt.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMatchingArt.h @@ -1,248 +1,251 @@ -#ifndef __AIMatchingArt__ -#define __AIMatchingArt__ - -/* - * Name: AIMatchingArt.h - * $Revision: 4 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Matching Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AILayerList__ -#include "AILayerList.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIMatchingArt.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIMatchingArtSuite "AI Matching Art Suite" -#define kAIMatchingArtSuiteVersion AIAPI_VERSION(7) -#define kAIMatchingArtVersion kAIMatchingArtSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** A filter for matching art objects that contain specific - properties. Pass an array of these structures to \c #AIMatchingArtSuite - functions to specify the art objects that should be returned. - - Together, \c whichAttr and \c attr specify an attribute value - that an art object of the given \c type must have to be considered a match. - \li \c whichAttr is the desired attribute, one of the \c #AIArtUserAttr values. - \li \c attr is a mask for the desired state of the attribute. Pass 0 - to match objects without the attribute. or the attribute constant - to match objects with that attribute. - - For example: - \li Specify \c #kArtSelected for both \c whichAttr and \c attr - to match only art objects that are selected. - \li Specify \c #kArtSelected for \c whichAttr and 0 for - \c attr to match only objects that are \e not selected. - - Some values in \c #AIArtUserAttr are not art attributes - but instead specify additional options to the matching process. To - use these options, specify the value in the \c whichAttr field of one - specifications structure. For example, if the \c #kMatchDictionaryArt - flag is set in any specification, the search looks in the dictionaries - of art objects, as well as in the objects themselves. -*/ -typedef struct { - /** An \c #AIArtType that identifies the types of art objects that match - the specification. Use the special type \c #kAnyArt to match any kind - of art object. */ - ai::int16 type; - /** An attribute and value by which to further filter art of the given type. */ - ai::int32 whichAttr, attr; -} AIMatchingArtSpec; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to get lists of art objects that are currently selected, - or that match specified criteria, from among all available art objects, - or from artwork in a particular set of layers. It provides an additional - collection mechanism to those in the \c #AIArtSuite and \c #AIArtSetSuite, - and is more convenient than traversing the entire artwork tree. - - These functions return art in an array of \c #AIArtHandle. The suite allocates - a memory block for this array, which you must release using - #AIMdMemorySuite::MdMemoryDisposeHandle(). Do not free the individual members of the array. - - The functions flatten the requested hierarchy of objects into one art - object array, which can contain any combination of atomic objects, such as paths, - and compound objects, such as groups. - - Your plug-in must handle the case of a group that is \e partially selected--that is, - some but not all members are selected. In this case, both the group and some of - its contained art objects are in the returned object array. - If, for example, your plug-in moves the objects in a group, you must - ignore the member objects in the array so that they are not moved twice. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMatchingArtSuite and \c #kAIMatchingArtVersion. -*/ -struct AIMatchingArtSuite { - - /** Collects all selected art objects in the current layer list of the current document. - @param matches [out] A buffer in which to return a pointer to a - block of memory containing the array of matching art objects. - You must release the memory block when you no longer - need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). - Do not free the individual members of the array. This may be - \c NULL if you do not want the actual matches (but only the - count, for instance). - @param numMatches [in/out] A buffer in which to pass the size of the - \c matches array, and return the number of art objects collected. - If no objects are selected, returns 0. - */ - AIAPI AIErr (*GetSelectedArt) ( AIArtHandle ***matches, ai::int32 *numMatches ); - /** Collects an array of all art objects in the current layer list of the - current document that match a set of criteria. - @param specs An array of match specifications. - @param numSpecs The number of entries in the \c specs array. - @param matches [out] A buffer in which to return a pointer to a - block of memory containing the array of matching art objects. - You must release the memory block when you no longer - need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). - Do not free the individual members of the array. - @param numMatches [in/out] A buffer in which to pass the size of the - \c matches array, and return the number of art objects collected. - If no objects are selected, returns 0. - */ - AIAPI AIErr (*GetMatchingArt) ( AIMatchingArtSpec *specs, ai::int16 numSpecs, - AIArtHandle ***matches, ai::int32 *numMatches ); - - // new to Illustrator 9.0 - - /** Collects all selected art objects in a given layer list of the current document. - @param list The layer list. - @param matches [out] A buffer in which to return a pointer to a - block of memory containing the array of matching art objects. - You must release the memory block when you no longer - need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). - Do not free the individual members of the array. - @param numMatches [in/out] A buffer in which to pass the size of the - \c matches array, and return the number of art objects collected. - If no objects are selected, returns 0. - */ - AIAPI AIErr (*GetSelectedArtFromLayerList) ( AILayerList list, AIArtHandle ***matches, - ai::int32 *numMatches ); - - /** Collects an array of all art objects in a given layer list of the - current document that match a set of criteria. - @param list The layer list. - @param specs An array of match specifications. - @param numSpecs The number of entries in the \c specs array. - @param matches [out] A buffer in which to return a pointer to a - block of memory containing the array of matching art objects. - You must release the memory block when you no longer - need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). - Do not free the individual members of the array. - @param numMatches [in/out] A buffer in which to pass the size of the - \c matches array, and return the number of art objects collected. - If no objects are selected, returns 0. */ - AIAPI AIErr (*GetMatchingArtFromLayerList) ( AILayerList list, AIMatchingArtSpec *specs, - ai::int16 numSpecs, AIArtHandle ***matches, ai::int32 *numMatches ); - - // new to Illustrator 10.0 - - /** Collects an array of all art objects in the current layer list of the current - document that are used to determine the current path style, as displayed in the Color palette. - The current path style is determined by a combination of the targeted and selected objects. - The returned art can include objects inside graphs. - @param matches [out] A buffer in which to return a pointer to a - block of memory containing the array of matching art objects. - You must release the memory block when you no longer - need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). - Do not free the individual members of the array. - @param numMatches [in/out] A buffer in which to pass the size of the - \c matches array, and return the number of art objects collected. - If no objects are selected, returns 0. - */ - AIAPI AIErr (*GetArtForCurrentPathStyle) ( AIArtHandle ***matches, ai::int32 *numMatches ); - - /** Reports whether any art objects (as opposed to text objects) - are selected in the current layer list of the current document, - when the document is not in text editing mode. - (Note that this function returns a boolean value, not an error code.) - @return True if any art objects are selected, false if there is a text - editing selection or if no objects are selected. - @note To test whether there is a text editing selection, call - \c #AIDocumentSuite::HasTextFocus(). - */ - AIAPI AIBoolean (*IsSomeArtSelected) ( void ); - - /** Collects an array of all art objects in a given artwork tree - that match a set of criteria. Use to perform a narrower - search, or to search in art that is not part of the regular artwork - tree, such as definition art for a pattern, brush, or symbol. - @param searchArt The root art object. - @param specs An array of match specifications. - @param numSpecs The number of entries in the \c specs array. - @param matches [out] A buffer in which to return a pointer to a - block of memory containing the array of matching art objects. - You must release the memory block when you no longer - need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). - Do not free the individual members of the array. - @param numMatches [in/out] A buffer in which to pass the size of the - \c matches array, and return the number of art objects collected. - If no objects are selected, returns 0. - */ - AIAPI AIErr (*GetMatchingArtFromArt) ( AIArtHandle searchArt, AIMatchingArtSpec *specs, - ai::int16 numSpecs, AIArtHandle ***matches, ai::int32 *numMatches ); - - // new to Illustrator 11.0 - - /** Deselects all objects in the current document. */ - AIAPI AIErr (*DeselectAll) ( void ); - -}; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIMatchingArt__ +#define __AIMatchingArt__ + +/* + * Name: AIMatchingArt.h + * $Revision: 4 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Matching Art Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AILayerList__ +#include "AILayerList.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIMatchingArt.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIMatchingArtSuite "AI Matching Art Suite" +#define kAIMatchingArtSuiteVersion AIAPI_VERSION(7) +#define kAIMatchingArtVersion kAIMatchingArtSuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** A filter for matching art objects that contain specific + properties. Pass an array of these structures to \c #AIMatchingArtSuite + functions to specify the art objects that should be returned. + + Together, \c whichAttr and \c attr specify an attribute value + that an art object of the given \c type must have to be considered a match. + \li \c whichAttr is the desired attribute, one of the \c #AIArtUserAttr values. + \li \c attr is a mask for the desired state of the attribute. Pass 0 + to match objects without the attribute. or the attribute constant + to match objects with that attribute. + + For example: + \li Specify \c #kArtSelected for both \c whichAttr and \c attr + to match only art objects that are selected. + \li Specify \c #kArtSelected for \c whichAttr and 0 for + \c attr to match only objects that are \e not selected. + + Some values in \c #AIArtUserAttr are not art attributes + but instead specify additional options to the matching process. To + use these options, specify the value in the \c whichAttr field of one + specifications structure. For example, if the \c #kMatchDictionaryArt + flag is set in any specification, the search looks in the dictionaries + of art objects, as well as in the objects themselves. +*/ +struct AIMatchingArtSpec { + AIMatchingArtSpec(ai::int32 _type = 0, ai::int32 _whichattr = 0, ai::int32 _attr = 0): + type(static_cast(_type)), whichAttr(_whichattr), attr(_attr) {} + + /** An \c #AIArtType that identifies the types of art objects that match + the specification. Use the special type \c #kAnyArt to match any kind + of art object. */ + ai::int16 type; + /** An attribute and value by which to further filter art of the given type. */ + ai::int32 whichAttr, attr; +} ; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite allows you to get lists of art objects that are currently selected, + or that match specified criteria, from among all available art objects, + or from artwork in a particular set of layers. It provides an additional + collection mechanism to those in the \c #AIArtSuite and \c #AIArtSetSuite, + and is more convenient than traversing the entire artwork tree. + + These functions return art in an array of \c #AIArtHandle. The suite allocates + a memory block for this array, which you must release using + #AIMdMemorySuite::MdMemoryDisposeHandle(). Do not free the individual members of the array. + + The functions flatten the requested hierarchy of objects into one art + object array, which can contain any combination of atomic objects, such as paths, + and compound objects, such as groups. + + Your plug-in must handle the case of a group that is \e partially selected--that is, + some but not all members are selected. In this case, both the group and some of + its contained art objects are in the returned object array. + If, for example, your plug-in moves the objects in a group, you must + ignore the member objects in the array so that they are not moved twice. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMatchingArtSuite and \c #kAIMatchingArtVersion. +*/ +struct AIMatchingArtSuite { + + /** Collects all selected art objects in the current layer list of the current document. + @param matches [out] A buffer in which to return a pointer to a + block of memory containing the array of matching art objects. + You must release the memory block when you no longer + need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). + Do not free the individual members of the array. This may be + \c NULL if you do not want the actual matches (but only the + count, for instance). + @param numMatches [in/out] A buffer in which to pass the size of the + \c matches array, and return the number of art objects collected. + If no objects are selected, returns 0. + */ + AIAPI AIErr (*GetSelectedArt) ( AIArtHandle ***matches, ai::int32 *numMatches ); + /** Collects an array of all art objects in the current layer list of the + current document that match a set of criteria. + @param specs An array of match specifications. + @param numSpecs The number of entries in the \c specs array. + @param matches [out] A buffer in which to return a pointer to a + block of memory containing the array of matching art objects. + You must release the memory block when you no longer + need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). + Do not free the individual members of the array. + @param numMatches [in/out] A buffer in which to pass the size of the + \c matches array, and return the number of art objects collected. + If no objects are selected, returns 0. + */ + AIAPI AIErr (*GetMatchingArt) ( AIMatchingArtSpec *specs, ai::int16 numSpecs, + AIArtHandle ***matches, ai::int32 *numMatches ); + + // new to Illustrator 9.0 + + /** Collects all selected art objects in a given layer list of the current document. + @param list The layer list. + @param matches [out] A buffer in which to return a pointer to a + block of memory containing the array of matching art objects. + You must release the memory block when you no longer + need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). + Do not free the individual members of the array. + @param numMatches [in/out] A buffer in which to pass the size of the + \c matches array, and return the number of art objects collected. + If no objects are selected, returns 0. + */ + AIAPI AIErr (*GetSelectedArtFromLayerList) ( AILayerList list, AIArtHandle ***matches, + ai::int32 *numMatches ); + + /** Collects an array of all art objects in a given layer list of the + current document that match a set of criteria. + @param list The layer list. + @param specs An array of match specifications. + @param numSpecs The number of entries in the \c specs array. + @param matches [out] A buffer in which to return a pointer to a + block of memory containing the array of matching art objects. + You must release the memory block when you no longer + need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). + Do not free the individual members of the array. + @param numMatches [in/out] A buffer in which to pass the size of the + \c matches array, and return the number of art objects collected. + If no objects are selected, returns 0. */ + AIAPI AIErr (*GetMatchingArtFromLayerList) ( AILayerList list, AIMatchingArtSpec *specs, + ai::int16 numSpecs, AIArtHandle ***matches, ai::int32 *numMatches ); + + // new to Illustrator 10.0 + + /** Collects an array of all art objects in the current layer list of the current + document that are used to determine the current path style, as displayed in the Color palette. + The current path style is determined by a combination of the targeted and selected objects. + The returned art can include objects inside graphs. + @param matches [out] A buffer in which to return a pointer to a + block of memory containing the array of matching art objects. + You must release the memory block when you no longer + need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). + Do not free the individual members of the array. + @param numMatches [in/out] A buffer in which to pass the size of the + \c matches array, and return the number of art objects collected. + If no objects are selected, returns 0. + */ + AIAPI AIErr (*GetArtForCurrentPathStyle) ( AIArtHandle ***matches, ai::int32 *numMatches ); + + /** Reports whether any art objects (as opposed to text objects) + are selected in the current layer list of the current document, + when the document is not in text editing mode. + (Note that this function returns a boolean value, not an error code.) + @return True if any art objects are selected, false if there is a text + editing selection or if no objects are selected. + @note To test whether there is a text editing selection, call + \c #AIDocumentSuite::HasTextFocus(). + */ + AIAPI AIBoolean (*IsSomeArtSelected) ( void ); + + /** Collects an array of all art objects in a given artwork tree + that match a set of criteria. Use to perform a narrower + search, or to search in art that is not part of the regular artwork + tree, such as definition art for a pattern, brush, or symbol. + @param searchArt The root art object. + @param specs An array of match specifications. + @param numSpecs The number of entries in the \c specs array. + @param matches [out] A buffer in which to return a pointer to a + block of memory containing the array of matching art objects. + You must release the memory block when you no longer + need it using #AIMdMemorySuite::MdMemoryDisposeHandle(). + Do not free the individual members of the array. + @param numMatches [in/out] A buffer in which to pass the size of the + \c matches array, and return the number of art objects collected. + If no objects are selected, returns 0. + */ + AIAPI AIErr (*GetMatchingArtFromArt) ( AIArtHandle searchArt, AIMatchingArtSpec *specs, + ai::int16 numSpecs, AIArtHandle ***matches, ai::int32 *numMatches ); + + // new to Illustrator 11.0 + + /** Deselects all objects in the current document. */ + AIAPI AIErr (*DeselectAll) ( void ); + +}; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMdMemory.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMdMemory.h index cdac61b..1dab4ad 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMdMemory.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMdMemory.h @@ -1,125 +1,125 @@ - -#ifndef __AIMdMemory__ -#define __AIMdMemory__ - -/* - * Name: AIMdMemory.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Handle-based Memory suite - * - * Provides machine-dependent (Md) memory management. - * Uses NewHandle() in Mac OS and GlobalAlloc() in Windows - * to allocate memory. - * Generally deprecated, but still used for matching art - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIMdMemory.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIMdMemorySuite "AI MdMemory Suite" -#define kAIMdMemorySuiteVersion AIAPI_VERSION(3) -#define kAIMdMemoryVersion kAIMdMemorySuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** An opaque pointer to a block of memory. */ -typedef void **AIMdMemoryHandle; - -/******************************************************************************* - ** - ** Suite Record - ** - **/ - -/** @ingroup Suites - This suite provides functions that allocate and dispose of blocks of memory. - This memory management scheme is generally deprecated. Do not - use it to allocate memory. It is still used, however, - by the \c #AIMatchingArtSuite, whose functions return a handle - that must be freed by the caller using \c #MdMemoryDisposeHandle(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMdMemorySuite and \c #kAIMdMemoryVersion. -*/ -typedef struct { - /** Allocates a memory block. - @param size The number of bytes. - @param hMem [out] A buffer in which to return the memory handle. - */ - AIAPI AIErr (*MdMemoryNewHandle) ( size_t size, AIMdMemoryHandle *hMem ); - - /** Frees the memory associated with a handle. - @param hMem The memory handle. Upon return, this is no longer valid. - */ - AIAPI AIErr (*MdMemoryDisposeHandle) ( AIMdMemoryHandle hMem ); - - /** Reports the size of an allocated memory block. - @param hMem The memory handle. - @param size [out] A buffer in which to return the number of bytes. - */ - AIAPI AIErr (*MdMemoryGetSize) ( AIMdMemoryHandle hMem, size_t *size ); - - /** Reallocates a memory block. - @param hMem The memory handle. - @param newSize The new number of bytes. - */ - AIAPI AIErr (*MdMemoryResize) ( AIMdMemoryHandle hMem, size_t newSize ); - - /** Locks a memory block, so that the operating system does not move it. - This is no longer necessary, as the operating system no longer moves - memory blocks. - @param hMem The memory handle. - @param lockedPtr [out] A buffer in which to return a pointer - to the locked memory block. - */ - AIAPI AIErr (*MdMemoryLock) ( AIMdMemoryHandle hMem, void **lockedPtr ); - - /** Unlocks a memory block that was locked with \c #MdMemoryLock(). - This is no longer necessary, as the operating system no longer moves - memory blocks. - @param hMem The memory handle. - */ - AIAPI AIErr (*MdMemoryUnLock) ( AIMdMemoryHandle hMem ); - -} AIMdMemorySuite; - - -#include "AIHeaderEnd.h" - -#endif + +#ifndef __AIMdMemory__ +#define __AIMdMemory__ + +/* + * Name: AIMdMemory.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Handle-based Memory suite + * + * Provides machine-dependent (Md) memory management. + * Uses NewHandle() in Mac OS and GlobalAlloc() in Windows + * to allocate memory. + * Generally deprecated, but still used for matching art + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIMdMemory.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIMdMemorySuite "AI MdMemory Suite" +#define kAIMdMemorySuiteVersion AIAPI_VERSION(3) +#define kAIMdMemoryVersion kAIMdMemorySuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** An opaque pointer to a block of memory. */ +typedef void **AIMdMemoryHandle; + +/******************************************************************************* + ** + ** Suite Record + ** + **/ + +/** @ingroup Suites + This suite provides functions that allocate and dispose of blocks of memory. + This memory management scheme is generally deprecated. Do not + use it to allocate memory. It is still used, however, + by the \c #AIMatchingArtSuite, whose functions return a handle + that must be freed by the caller using \c #MdMemoryDisposeHandle(). + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMdMemorySuite and \c #kAIMdMemoryVersion. +*/ +typedef struct { + /** Allocates a memory block. + @param size The number of bytes. + @param hMem [out] A buffer in which to return the memory handle. + */ + AIAPI AIErr (*MdMemoryNewHandle) ( size_t size, AIMdMemoryHandle *hMem ); + + /** Frees the memory associated with a handle. + @param hMem The memory handle. Upon return, this is no longer valid. + */ + AIAPI AIErr (*MdMemoryDisposeHandle) ( AIMdMemoryHandle hMem ); + + /** Reports the size of an allocated memory block. + @param hMem The memory handle. + @param size [out] A buffer in which to return the number of bytes. + */ + AIAPI AIErr (*MdMemoryGetSize) ( AIMdMemoryHandle hMem, size_t *size ); + + /** Reallocates a memory block. + @param hMem The memory handle. + @param newSize The new number of bytes. + */ + AIAPI AIErr (*MdMemoryResize) ( AIMdMemoryHandle hMem, size_t newSize ); + + /** Locks a memory block, so that the operating system does not move it. + This is no longer necessary, as the operating system no longer moves + memory blocks. + @param hMem The memory handle. + @param lockedPtr [out] A buffer in which to return a pointer + to the locked memory block. + */ + AIAPI AIErr (*MdMemoryLock) ( AIMdMemoryHandle hMem, void **lockedPtr ); + + /** Unlocks a memory block that was locked with \c #MdMemoryLock(). + This is no longer necessary, as the operating system no longer moves + memory blocks. + @param hMem The memory handle. + */ + AIAPI AIErr (*MdMemoryUnLock) ( AIMdMemoryHandle hMem ); + +} AIMdMemorySuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenu.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenu.h index 7288e1a..003c83a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenu.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenu.h @@ -1,758 +1,762 @@ -#ifndef __AIMenu__ -#define __AIMenu__ - -/* - * Name: AIMenu.h - * Author: - * Date: - * Purpose: Adobe Illustrator Menu Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2015 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __ASHelp__ -#include "ASHelp.h" -#endif - -#ifndef _IAIUNICODESTRING_H_ -#include "IAIUnicodeString.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIMenu.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIMenuSuite "AI Menu Suite" -#define kAIMenuVersion11 AIAPI_VERSION(11) // In AI14 - -// latest version -#define kAIMenuSuiteVersion kAIMenuVersion11 -#define kAIMenuVersion kAIMenuSuiteVersion - - -/** @ingroup Notifiers - Sent when a menu item is modified using - \c #AIMenuSuite functions. Receives no associated data. */ -#define kAIMenuChangedNotifier "AI Menu Changed Notifier" - -/** @ingroup Callers - Menu caller, see \c #AIMenuSuite. */ -#define kCallerAIMenu "AI Menu" - -/** @ingroup Selectors - Sent to the plug-in that installed a menu item when the item is - selected by the user. If the plug-in has installed more - than one menu item, compare the menu handle in the - \c #AIMenuMessage to those it has saved in its \c globals record. -*/ -#define kSelectorAIGoMenuItem "AI Go" -/** @ingroup Selectors - Sent on mouse down in the menu bar. Provides an opportunity for - a plug-in to change the appearance of a menu before it is displayed. - Request this selector by setting \c #kMenuItemWantsUpdateOption. This is - the only context in which \c #AIMenuSuite::GetUpdateFlags() returns valid values. - - If a plug-in with a menu is unloaded, it must first be - reloaded before it can process the update selector. This can - cause a noticeable performance lag when the user clicks the menu bar. - Unless there is a pressing reason for a custom menu update, - use \c #AIMenuSuite::UpdateMenuItemAutomatically() - instead of requesting this selector. -*/ -#define kSelectorAIUpdateMenuItem "AI Update" - - -/** Option flags that control the behavior of a menu item. - See \c #kMenuItemNoOptions and following. */ -typedef ai::int32 AIMenuItemOption; -/** Bit flags for \c #AIMenuItemOption */ -enum { - /** Turn off all options */ - kMenuItemNoOptions = 0, - /** Set to receive the \c #kSelectorAIUpdateMenuItem selector. */ - kMenuItemWantsUpdateOption = (1<<0), - /** Set to disallow disabling (graying) of item. */ - kMenuItemAlwaysEnabled = (1<<1), - /** Set to create a separator. Pass \c NULL for - \c #AIPlatformAddMenuItemDataUS::itemText. */ - kMenuItemIsSeparator = (1<<2), - /** Not for item creation. Identifies a group header when iterating - through items. See \c #AIMenuSuite::SetMenuGroupHeader(). */ - kMenuItemIsGroupHeader = (1<<3), - /** Set to ignore the parent group's - \c #kMenuGroupSortedAlphabeticallyOption state. */ - kMenuItemIgnoreSort = (1<<4) -}; - -/** Option flags that control the behavior of a menu group. - See \c #kMenuGroupNoOptions and following.*/ -typedef ai::int32 AIMenuGroupOption; -/** Bit flags for \c #AIMenuGroupOption */ -enum { - /** Turn off all options */ - kMenuGroupNoOptions = 0, - /** Set to sort menu items in the group alphabetically. - By default, menu items appear in the order in which they are added. */ - kMenuGroupSortedAlphabeticallyOption = (1<<0), - /** Set to create a separator above the group. */ - kMenuGroupSeparatorOption = (1<<1), - /** Set to create a separator below the group. */ - kMenuGroupSeparatorBelowOption = (1<<2), - /** Not for group creation. Identifies a group with a header when iterating - through groups. See \c #AIMenuSuite::SetMenuGroupHeader(). */ - kMenuGroupHasHeader = (1<<3), - /** Option for adding a group with \c #AIMenuSuite::AddMenuGroup() */ - kMenuGroupAddAboveNearGroup = (1<<4) -}; - - -/** The update action to be performed when all criteria are met. - Specify only one action. See \c #AIMenuSuite::UpdateMenuItemAutomatically(). */ -enum AIAutoMenuUpdateAction { - /** Enables the item if the criteria evaluate to true, disables it otherwise. */ - kAutoEnableMenuItemAction = (1<<0), - /** Puts a check mark by the item if the criteria evaluate to true, removes - the check otherwise. */ - kAutoCheckMenuItemAction = (1<<1) -}; - -/** Types of art objects whose appearance in a document or selection - can be considered for automatic menu update. - See \c #AIMenuSuite::UpdateMenuItemAutomatically(). */ -enum AIAutoMenuUpdateObjectCriteria { - /** Any type of group. */ - kIfGroup = (1<<0), - /** Any type of path. */ - kIfPath = (1<<1), - /** An internal object type unavailable to users and plug-ins. */ - kIfPostscript = (1<<2), - /** A placed object. */ - kIfPlaced = (1<<3), - /** Any type of text. */ - kIfText = (1<<4), - /** A path that has text in or on it. Can be set even - if \c kIfText is off, when a text path is direct-selected. */ - kIfTextPath = (1<<5), - /** Obsolete */ - kIfTextFlow = (1<<6), - /** Obsolete */ - kIfTextRun = (1<<7), - /** Art used as a guide. */ - kIfGuide = (1<<8), - /** A graph object */ - kIfGraphData = (1<<9), - /** Art used as a clipping mask. */ - kIfMask = (1<<10), - /** Obsolete */ - kIfEndMask = (1<<11), - /** A simple group. */ - kIfNormalGroup = (1<<12), - /** A group that is a compound path. */ - kIfCompoundGroup = (1<<13), - /** Obsolete. Do not use. */ - kIfWrapAroundGroup = (1<<14), - /** A group with a clipping path. */ - kIfClipGroup = (1<<15), - /** Point text. */ - kIfPointText = (1<<16), - /** Text in a path. */ - kIfInPathText = (1<<17), - /** Text on a path. */ - kIfOnPathText = (1<<18), - /** Threaded text. */ - kIfThreadedText = (1<<19), - /** Raster art. */ - kIfRaster = (1<<20), - /** Plug-in group (for any platform). */ - kIfPluginArt = (1<<21), // AI8 - /** Mesh art. */ - kIfMesh = (1<<22), // AI8 - /** Styled art. */ - kIfHasStyledArt = (1<<23), // AI9 - /** Symbol. */ - kIfSymbol = (1<<24), // AI10 - /** Foreign object. */ - kIfForeignArt = (1<<25), // AI11 - /** Legacy text. */ - kIfLegacyTextArt = (1<<26), // AI11 - /** Path that is not inside a planar group. */ - kIfClassicPath = (1<<27), // AI12 - /** Path that is inside a planar group. See \c #AIPlanarObjectSuite. */ - kIfPlanarPath = (1<<28), // AI12 - /** A path that does not have text in or on it. */ - kIfNonTextPath = (1<<29), // AI12 - /** Chart. */ - kIfChartArt = (1<<30), // AI19 - /** Any art. */ - kIfAnyArt = (0xFFFFFFFF) // AI11 -}; - - -/** For pre-AI14 compatibility */ -#define kMacIfPlugin kIfPluginArt - -/** Document properties that can be considered for automatic - menu update. See \c #AIMenuSuite::UpdateMenuItemAutomatically(). */ -enum AIAutoMenuUpdatePropertyCriteria { - kIfCurrentLayerIsEditable = (1<<0), - kIfOpenTextEdit = (1<<1), - kIfAnyPrintingChars = (1<<2), - kIfAnyHiddenObjects = (1<<3), - kIfAnyLockedObjects = (1<<4), - kIfAnyClipPaths = (1<<5), - kIfOpenDocument = (1<<6), - kIfCMYKDocument = (1<<7), // AI9 - kIfRGBDocument = (1<<8), // AI9 - kIfCurrentArtStyleIsNamed = (1<<9), // AI9 - kIfHasPluginSelection = (1<<10) // AI12 -}; - -/** Modifier keys for command characters (keyboard shortcuts). - See \c #AIMenuSuite::SetItemCmd() and \c #AIMenuSuite::GetItemCmd(). */ -enum AIMenuItemModifier { - /** Shift key */ - kMenuItemCmdShiftModifier = 1, - /** Option key in Mac OS, Alt key in Windows. */ - kMenuItemCmdOptionModifier = 2, - /** Command key in Mac OS, Ctrl key in Windows. */ - kMenuItemCmdControlModifier = 4 // the control key on the Mac. -}; - - -/** @ingroup Errors */ -#define kTooManyMenuItemsErr '>MIT' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a menu item. Never dereferenced. -Access with \c #AIMenuSuite functions. */ -typedef struct _t_AIMenuItemOpaque *AIMenuItemHandle; -/** Opaque reference to a menu group. Never dereferenced. -Access with \c #AIMenuSuite functions. */ -typedef struct _t_MenuGroupOpaque *AIMenuGroup; // new for AI7.0 - -#if Macintosh - /** Platform-specific menu reference. \li In Mac OS, a \c MenuRef. - \li In Windows, cast to \c HMENU.*/ - typedef struct MacMenu_t* AIPlatformMenuHandle; -#elif MSWindows - /** Platform-specific menu reference. \li In Mac OS, a \c MenuRef. - \li In Windows, cast to \c HMENU. */ - typedef struct WinMenu **AIPlatformMenuHandle; // can cast it to HMENU -#endif - -/** Menu item definition data. */ -typedef struct { - /** The menu group to which an item is added. See @ref menuGroups.*/ - const char *groupName; - /** The display label for an item. (To create a menu separator - set the \c #kMenuItemIsSeparator options flag and set this - to \c NULL.) */ - ai::UnicodeString itemText; -} AIPlatformAddMenuItemDataUS; - -/** A platform-specific menu structure corresponding to an - Illustrator menu item. - See \c #AIMenuSuite::GetPlatformMenuItem(). */ -typedef struct { - /** An \c HMENU in Windows, a \c MenuRef in Mac OS. */ - AIPlatformMenuHandle menu; - /** The index of the item in the platform menu. */ - ai::int16 item; -} AIPlatformMenuItem; - -/** Message sent with menu selectors. */ -typedef struct { - /** The message data. */ - SPMessageData d; - /** The menu item object. */ - AIMenuItemHandle menuItem; -} AIMenuMessage; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that allow you to add menu items to - the Illustrator menu structure. - - A menu can be a stand alone interface to a plug-in feature, or - group a number of features together. Plug-ins of all types can have - an associated plug-in menu item. For instance, if you define a - palette (non-modal dialog box), you typically add a menu item to the - Windows menu to hide and show your window. - - This section describes how to install and use plug-in menu items. It discusses - the caller, selectors and messages that plug-in menus receive, as well as the - functions provided to add menus, set options, and control menu appearance, - and to make simple appearance changes automatically based on the changes in - artwork. - - Menu plug-ins are similar to Filter plug-ins (see the \c #AIFilterSuite), - but are different in these ways: - \li Filter plug-ins are added to the Filter menu, while menu plug-ins - can add commands to any menu. - \li Filters have automatic repeat and undo, while menu plug-ins must set - the Undo menu item text. - \li Menu plug-ins can set command keys and control their appearance. - \li Both plug-in types receive a go selector, but Filters also receive - a selector to get parameters. - - This suite is cross-platform (although the functions closely parallel - the Mac OS toolbox functions for changing menu appearance). - If you must manipulate a menu item directly, use \c #GetPlatformMenuItem() - to obtain a platform-specific menu reference. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMenuSuite and \c #kAIMenuVersion. - - \section menuSelectors Menu Selectors - - The caller for menu plug-ins is \c #kCallerAIMenu. Check for the caller and - these selectors in the plug-in's main function:
- #kSelectorAIGoMenuItem
- #kSelectorAIUpdateMenuItem

- The message data for both selectors is passed in an \c #AIMenuMessage. - - \section menuNotifiers Menu Notifiers - - The notifier \c #kAIMenuChangedNotifier is sent when a menu is - modified. - - Notifiers are available before and after menu commmands are executed. - - \li The pre- and post-menu notifiers for Illustrator commands do not have - predefined constants. Instead, the notification identification string - is generated dynamically, in the following format:

- "AI Command Notifier: Before " + \e menu \e identifier \e text
- "AI Command Notifier: After " + \e menu \e identifier \e text

- The menu identifiers are defined in \c AIMenuCommandNotifiers.h. - - - \section menuGroups Menu Groups - - Plug-in menu items are added to menu \e groups, which are predefined locations - within Illustrator’s menu structure. The complete list of groups is found - in the \c AIMenuGroups.h. Some examples of menu groups are:

- \c #kOpenMenuGroup
- \c #kArrangeMoveMenuGroup
- \c #kTypeSizeMenuGroup - - The names describe the menu location. A \e utilities group is located at - the top to a menu group; for instance, the "Type Size Utilities" - menu group is at the top of the "Type Size" submenu. - - You can create new menu groups, to which your plug-in or other plug-ins - can add menu items. As a plug-in developer, you are responsible for - documenting any menu groups you add. - - \subsection pluginMenuGroups Plug-in Menu Groups - - To use a menu group added by a plug-in (rather than the application), - your plug-in should explicitly add the group, using \c #AddMenuGroup(). - If is safe to add a menu group twice; - the second call returns the existing group reference. - The following predefined groups are added by plug-ins:

- \c #kDocInfoMenuGroup
- \c #kObjectRasterMenuGroup
- \c #kArrangeTransformMultipleMenuGroup
- \c #kATMMenuGroupNearGroup
- \c #kObjectPathsPopoutPluginMenuGroup
- \c #kOPPPMenuGroupNearGroup
- \c #kDocumentSupportMenuGroup
- \c #kAssetMgmtMenuGroup
- \c #kWorkgroupMenuGroup
- \c #kScriptsMenuGroup
- \c #kWorkspacesMenuGroup
- \c #kWorkspacesPresetsMenuGroup
- \c #kWorkspacesCustomMenuGroup - - @note The \c #kFilterUtilities menu is implemented using an - internal plug-in. To use it, you must acquire the \c #AIFilterSuite. - -*/ -typedef struct { - - /** Creates and installs a plug-in menu item. - @param self This plug-in. - @param inKeyboardShortDictionaryKey A unique identifying name - for this item in the \c keyboardshortcut dictionary, or \c NULL - if the item is dynamic or has no shortcut. - @param data The menu group to which the item is added, and the display - label for the item as a Unicode string. - @param options Flags that control the item's behavior, a logical OR - of \c #AIMenuItemOption values. - @param menuItem [out] A buffer in which to return the menu item object. - If your plug-in installs multiple items, store this in \c globals - to compare when receiving a notification or selector. - May be \c NULL. - */ - AIAPI AIErr (*AddMenuItem) ( SPPluginRef self, const char*inKeyboardShortDictionaryKey, - AIPlatformAddMenuItemDataUS *data, AIMenuItemOption options, - AIMenuItemHandle *menuItem ); - - /** Creates and installs a plug-in menu item using a ZString display label. - @param self This plug-in. - @param inKeyboardShortDictionaryKey A unique identifying name - for this item in the \c keyboardshortcut dictionary, or \c NULL - if the item is dynamic or has no shortcut. - @param groupName The menu group to which the item is added. - @param data The ZString display label for the item. - @param options Flags that control the item's behavior, a logical OR - of \c #AIMenuItemOption values. - @param menuItem [out] A buffer in which to return the menu item object. - If your plug-in installs multiple items, store this in \c globals - to compare when receiving a notification or selector. */ - AIAPI AIErr (*AddMenuItemZString) ( SPPluginRef self, const char*inKeyboardShortDictionaryKey, - const char *groupName, ZRef itemText, AIMenuItemOption options, - AIMenuItemHandle *menuItem ); - - /** Retrieves the \c keyboardshortcut dictionary key of a menu item. - @param menuItem The menu item object. - @param outKey [out] A buffer in which to return the key string. Do not modify. - */ - AIAPI AIErr (*GetMenuItemKeyboardShortcutDictionaryKey) ( AIMenuItemHandle menuItem, const char**outKey ); - - /** Retrieves the option flags of a menu item. - @param menuItem The menu item object. - @param options [out] A buffer in which to return the options, a logical - OR of \c #AIMenuItemOption values. - */ - AIAPI AIErr (*GetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption *options ); - - /** Set the option flags for a menu item. - @param menuItem The menu item object. - @param options The options, a logical OR of \c #AIMenuItemOption values. - */ - AIAPI AIErr (*SetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption options ); - - /** Retrieves the plug-in that installed a menu item. - @param menuItem The menu item object. - @param options [out] A buffer in which to return the plug-in object. - */ - AIAPI AIErr (*GetMenuItemPlugin) ( AIMenuItemHandle menuItem, - SPPluginRef *plugin ); - - /** Gets the number of installed menu items. Use with \c #GetNthMenuItem() - to iterate through items. - @param count [out] A buffer in which to return the number of items. - May be \c NULL. - */ - AIAPI AIErr (*CountMenuItems) ( ai::int32 *count ); - - /** Retrieves an installed menu item by index position. Use with - \c #CountMenuItems() to iterate through items. - @param n The position index, in the range [0..numItems-1]. - @param menuItem [out] A buffer in which to return the menu item object. - */ - AIAPI AIErr (*GetNthMenuItem) ( ai::int32 n, AIMenuItemHandle *menuItem ); - - /** Retrieves the platform-specific menu item reference associated with a menu item. - @param menuItem The menu item object. - @param platformMenuItem [out] A buffer in which to return the - platform-specific object. The menu handle - is a \c MenuInfo structure in Mac OS, a \c WinMenu structure in Windows. - */ - AIAPI AIErr (*GetPlatformMenuItem) ( AIMenuItemHandle menuItem, - AIPlatformMenuItem *platformMenuItem ); - - /** Updates a menu item's appearance automatically when specified conditions - are met. You can either enable/disable, or check/uncheck the item with one call; - you cannot perform both types of update at once. - - All criteria are evaluated and the results combined with a - logical AND to decide whether to make the specified appearance modification. - \li The results of the positive criteria are combined to produce a - positive result, which is true if any of the positive criteria are true. - \li The results of the negative criteria are combined to produce a - negative result, which is true if none of the negative criteria are true. - \li The combined result used to perform the update action is true if - both the positive and negative results are true--that is, if any of the - desired properties are present and none of the undesired properties are - present. - - @param menuItem The menu item object. - @param action The action to take when criteria are satisfied. - An \c #AIAutoMenuUpdateAction value. - @param ifObjectIsInArtwork Update if any object matching any specified type - appears in the current document's artwork tree. A logical OR of - \c #AIAutoMenuUpdateObjectCriteria values. - @param ifObjectIsNotInArtwork Update if no object matching any specified type - appears in the current document's artwork tree. A logical OR of - \c #AIAutoMenuUpdateObjectCriteria values. - @param ifObjectIsSelected Update if any object matching any specified type - appears in the current document's selection. A logical OR of - \c #AIAutoMenuUpdateObjectCriteria values. - @param ifObjectIsNotSelected Update if no object matching any specified type - appears in the current document's selection. A logical OR of - \c #AIAutoMenuUpdateObjectCriteria values. - @param ifIsTrue Update if any of the specified document properties are true - for the current document. A logical OR of - \c #AIAutoMenuUpdatePropertyCriteria values. - @param ifIsNotTrue Update if none of the specified document properties are true - for the current document. A logical OR of - \c #AIAutoMenuUpdatePropertyCriteria values. - */ - AIAPI AIErr (*UpdateMenuItemAutomatically) ( AIMenuItemHandle menuItem, - ai::int32 action, - ai::int32 ifObjectIsInArtwork, ai::int32 ifObjectIsNotInArtwork, - ai::int32 ifObjectIsSelected, ai::int32 ifObjectIsNotSelected, - ai::int32 ifIsTrue, ai::int32 ifIsNotTrue ); - - /** Retrieves document and artwork state information that you can use - to update a menu item’s checked or enabled state. - This is faster than scanning the artwork tree or getting specific art, - as Illustrator has already computed the information for automatic - menu updates. - - Call this only when the \c #kSelectorAIUpdateMenuItem selector - is received. The information is invalid if the call is made at any other time. - The \c #kMenuItemWantsUpdateOption option must be set for the - plug-in to receive this selector. - @param inArtwork [out] A buffer in which to return a set of flags - for types of art that are contained in the current document's - artwork tree. A logical OR of \c #AIAutoMenuUpdateObjectCriteria values. - @param isSelected [out] A buffer in which to return a set of flags - for types of art that are contained in the current document's - selection. A logical OR of \c #AIAutoMenuUpdateObjectCriteria values. - @param isTrue [out] A buffer in which to return a set of flags - for document properties that are true for the current document. - A logical OR of \c #AIAutoMenuUpdatePropertyCriteria values. - */ - AIAPI AIErr (*GetUpdateFlags)( ai::int32 *inArtwork, ai::int32 *isSelected, ai::int32 *isTrue ); - - /*-------------------------------------------------------------------------------------------*/ - - /** Enables a menu item. - @param menuItem The menu item object. - */ - AIAPI AIErr (*EnableItem) ( AIMenuItemHandle menuItem); - /** Disables (grays out) a menu item. - @param menuItem The menu item object. - */ - AIAPI AIErr (*DisableItem) ( AIMenuItemHandle menuItem); - - /** Retrieves the localizable display label of a menu item. This is different - from the unique identifying name returned by - \c #GetMenuItemKeyboardShortcutDictionaryKey(). - @param menuItem The menu item object. - @param itemString [out] A buffer in which to return the label string. - */ - AIAPI AIErr (*GetItemText) ( AIMenuItemHandle menuItem, ai::UnicodeString &itemString ); - - /** Sets the localizable display label of a menu item using a Unicode string. - @param menuItem The menu item object. - @param itemString The new label string. - */ - AIAPI AIErr (*SetItemText) ( AIMenuItemHandle menuItem, const ai::UnicodeString &itemString ); - - /** Sets the localizable display label of a menu item using a ZString. - @param menuItem The menu item object. - @param itemString The new label ZString. - */ - AIAPI AIErr (*SetItemTextZString) ( AIMenuItemHandle menuItem, ZRef itemString ); - - /** Sets the checked state of a menu item. - @param menuItem The menu item object. - @param bCheckIt True to check the item, false to uncheck it. - */ - AIAPI AIErr (*CheckItem) ( AIMenuItemHandle menuItem, AIBoolean bCheckIt ); - - /** Retrieves the menu group to which a menu item belongs. - @param menuItem The menu item object. - @param group [out] A buffer in which to return the menu group. - */ - AIAPI AIErr (*GetItemMenuGroup) ( AIMenuItemHandle menuItem, AIMenuGroup *group ); - - /** Creates a new menu group, to which you can add your plug-in menu items. - If the group already exists, returns the group reference. See @ref menuGroups. - @param name The unique identifying name, which can be passed to \c #AddMenuItem(). - @param options Flags that control the behavior of the menu group, - a logical OR of \c #AIMenuGroupOption values. - @param nearGroup An existing menu group for relative placement of this group. - The new group is added below this one, unless the options include - \c #kMenuGroupAddAboveNearGroup, in which case it is added above this one. - - If this is a submenu created by \c #AddMenuGroupAsSubMenu(), - the new menu group becomes part of that submenu, and is added above or below - other menu items or groups that were previously added to the submenu, depending - on the options. - @param group [out] A buffer in which to return the menu group object. - @return The error \c #kBadParameterErr if the relative group does not yet exist. - The loading order of plug-ins is indeterminate; if the relative group is - one that might be created by a different plug-in, your plug-in should - check for an error and either create the group or add near a different group. - It is all right to add the same group multiple times. - */ - AIAPI AIErr (*AddMenuGroup) ( const char* name, AIMenuGroupOption options, const char* nearGroup, - AIMenuGroup *group ); - - /** Adds a new menu group as a submenu. A submenu can be updated - programmatically or automatically, like a top-level menu. - Nested submenus are allowed. - @param name The unique identifying name, which can be passed to \c #AddMenuItem(). - @param options Flags that control the behavior of the menu group, - a logical OR of \c #AIMenuGroupOption values. - @param menuItem The menu item that invokes this submenu. - @param group [out] A buffer in which to return the menu group object. - */ - AIAPI AIErr (*AddMenuGroupAsSubMenu) ( const char* name, AIMenuGroupOption options, AIMenuItemHandle menuItem, AIMenuGroup *group); - - /** Retrieves the unique identifying name of a menu group. - @param group The menu group object. - @param name [out] A buffer in which to return the name string. Do not modify. - */ - AIAPI AIErr (*GetMenuGroupName) ( AIMenuGroup group, const char**name); - - /** Retrieves the option flags of a menu group. - @param group The menu group object. - @param options [out] A buffer in which to return the options, a - logical OR of \c #AIMenuGroupOption values. - */ - AIAPI AIErr (*GetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption *options ); - - /** Sets the option flags of a menu group. - @param group The menu group object. - @param options The new options, a logical OR of \c #AIMenuGroupOption values. - */ - AIAPI AIErr (*SetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption options ); - - /** Retrieves a reference to the platform-specific menu structure for a menu - with the range of items that belong to a menu group. - @param group The menu group object. - @param theMenu [out] A buffer in which to return the platform-specific menu information. - The menu handle is a \c MenuInfo structure in Mac OS, - a \c WinMenu structure in Windows. - @param firstItem [out] A buffer in which to return the index of the first item - in the group. - @param numItems [out] A buffer in which to return the number of items in the group. - */ - AIAPI AIErr (*GetMenuGroupRange) ( AIMenuGroup group, AIPlatformMenuHandle *theMenu, - ai::int16 *firstItem, ai::int16 *numItems ); - - /** Gets the number of installed menu groups. Use with - \c #GetNthMenuGroup() to iterate through all menu groups. - @param count [out] A buffer in which to return the number of groups. - */ - AIAPI AIErr (*CountMenuGroups) ( ai::int32 *count ); - - /** Retrieves a menu group by position index. Use with - \c #CountMenuGroups() to iterate through all menu groups. - @param n The position index, in the range [0..numGroups-1]. - @param group [out] A buffer in which to return the menu group object. - */ - AIAPI AIErr (*GetNthMenuGroup) ( ai::int32 n, AIMenuGroup *group ); - - /** Retrieves the command character and modifier keys that act as the - keyboard shortcut for a menu item. - @param menuItem The menu item object. - @param cmdChar [out] A buffer in which to return the command character (keyboard shortcut). - @param modifiers [out] A buffer in which to return the command character modifiers, - a logical OR of \c #AIMenuItemModifier constants. - @note Submenus created by plug-ins do not support modified command keys. */ - AIAPI AIErr (*GetItemCmd) ( AIMenuItemHandle menuItem, ai::int16 *cmdChar, ai::int16 *modifiers ); - - /** Sets the command character and modifier keys that act as the - keyboard shortcut for a menu item. - @param menuItem The menu item object. - @param cmdChar The command character (keyboard shortcut). - @param modifiers The command character modifiers, a logical OR of - \c #AIMenuItemModifier constants. - @note Submenus created by plug-ins do not support modified command keys. */ - AIAPI AIErr (*SetItemCmd) ( AIMenuItemHandle menuItem, char cmdChar, ai::int16 modifiers ); - - /** Retrieves the function key and modifiers associated with a menu item. - @param menuItem The menu item object. - @param fkey [out] A buffer in which to return the function key. - @param modifiers [out] A buffer in which to return the function key modifiers, - a logical OR of \c #AIMenuItemModifier constants. - */ - AIAPI AIErr (*GetItemFunctionKey) ( AIMenuItemHandle menuItem, ai::int16 *fkey, ai::int16 *modifiers ); - - /** Sets the function key and modifiers associated with a menu item. - @param menuItem The menu item object. - @param fkey The function key, in the range [1..15]. - @param modifiers The function key modifiers, a logical OR of - \c #AIMenuItemModifier constants. - */ - AIAPI AIErr (*SetItemFunctionKey) ( AIMenuItemHandle menuItem, ai::int16 fkey, ai::int16 modifiers ); - - /** Reports whether a menu item is enabled. - @param menuItem The menu item object. - @param bEnables [out] A buffer in which to return true if the item is enabled, false - if it is disabled (grayed). - */ - AIAPI AIErr (*IsItemEnabled) ( AIMenuItemHandle menuItem, ASBoolean *bEnabled); - - /** Reports whether a menu item is checked. - @param menuItem The menu item object. - @param bCheckIt [out] A buffer in which to return true if the item is checked, false - if it is unchecked. - */ - AIAPI AIErr (*IsItemChecked) ( AIMenuItemHandle menuItem, AIBoolean *bCheckIt ); - - /** Deletes a menu item. - @param menuItem The menu item object. After the call, this reference is invalid. - */ - AIAPI AIErr (*RemoveMenuItem) ( AIMenuItemHandle menuItem ); - - /** Sets the header for a menu group. When a menu has a header, - the \c #kMenuGroupHasHeader option flag is set for the group, and the - menu contains a non-selectable item for which the - \c #kMenuItemIsGroupHeader option flag is set. All other items in the group - are shown below and indented from the header text. - @param inGroup The menu group object. - @param inHeader The header string, or an empty string to remove the group header. - */ - AIAPI AIErr (*SetMenuGroupHeader) (AIMenuGroup inGroup, const ai::UnicodeString &inHeader); - - /** Programmatically invokes a menu action, as if the user had clicked the menu item. - @param menuCmdID The command ID for the menu item. - */ - AIAPI AIErr (*InvokeMenuAction)(AICommandID menuCmdID); - -} AIMenuSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIMenu__ +#define __AIMenu__ + +/* + * Name: AIMenu.h + * Author: + * Date: + * Purpose: Adobe Illustrator Menu Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2015 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#ifndef __ASHelp__ +#include "ASHelp.h" +#endif + +#ifndef _IAIUNICODESTRING_H_ +#include "IAIUnicodeString.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIMenu.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIMenuSuite "AI Menu Suite" +#define kAIMenuVersion11 AIAPI_VERSION(11) + +// latest version +#define kAIMenuSuiteVersion kAIMenuVersion11 +#define kAIMenuVersion kAIMenuSuiteVersion + + +/** @ingroup Notifiers + Sent when a menu item is modified using + \c #AIMenuSuite functions. Receives no associated data. */ +#define kAIMenuChangedNotifier "AI Menu Changed Notifier" + +/** @ingroup Callers + Menu caller, see \c #AIMenuSuite. */ +#define kCallerAIMenu "AI Menu" + +/** @ingroup Selectors + Sent to the plug-in that installed a menu item when the item is + selected by the user. If the plug-in has installed more + than one menu item, compare the menu handle in the + \c #AIMenuMessage to those it has saved in its \c globals record. +*/ +#define kSelectorAIGoMenuItem "AI Go" +/** @ingroup Selectors + Sent on mouse down in the menu bar. Provides an opportunity for + a plug-in to change the appearance of a menu before it is displayed. + Request this selector by setting \c #kMenuItemWantsUpdateOption. This is + the only context in which \c #AIMenuSuite::GetUpdateFlags() returns valid values. + + If a plug-in with a menu is unloaded, it must first be + reloaded before it can process the update selector. This can + cause a noticeable performance lag when the user clicks the menu bar. + Unless there is a pressing reason for a custom menu update, + use \c #AIMenuSuite::UpdateMenuItemAutomatically() + instead of requesting this selector. +*/ +#define kSelectorAIUpdateMenuItem "AI Update" + + +/** Option flags that control the behavior of a menu item. + See \c #kMenuItemNoOptions and following. */ +typedef ai::int32 AIMenuItemOption; +/** Bit flags for \c #AIMenuItemOption */ +enum { + /** Turn off all options */ + kMenuItemNoOptions = 0, + /** Set to receive the \c #kSelectorAIUpdateMenuItem selector. */ + kMenuItemWantsUpdateOption = (1<<0), + /** Set to disallow disabling (graying) of item. */ + kMenuItemAlwaysEnabled = (1<<1), + /** Set to create a separator. Pass \c NULL for + \c #AIPlatformAddMenuItemDataUS::itemText. */ + kMenuItemIsSeparator = (1<<2), + /** Not for item creation. Identifies a group header when iterating + through items. See \c #AIMenuSuite::SetMenuGroupHeader(). */ + kMenuItemIsGroupHeader = (1<<3), + /** Set to ignore the parent group's + \c #kMenuGroupSortedAlphabeticallyOption state. */ + kMenuItemIgnoreSort = (1<<4) +}; + +/** Option flags that control the behavior of a menu group. + See \c #kMenuGroupNoOptions and following.*/ +typedef ai::int32 AIMenuGroupOption; +/** Bit flags for \c #AIMenuGroupOption */ +enum { + /** Turn off all options */ + kMenuGroupNoOptions = 0, + /** Set to sort menu items in the group alphabetically. + By default, menu items appear in the order in which they are added. */ + kMenuGroupSortedAlphabeticallyOption = (1<<0), + /** Set to create a separator above the group. */ + kMenuGroupSeparatorOption = (1<<1), + /** Set to create a separator below the group. */ + kMenuGroupSeparatorBelowOption = (1<<2), + /** Not for group creation. Identifies a group with a header when iterating + through groups. See \c #AIMenuSuite::SetMenuGroupHeader(). */ + kMenuGroupHasHeader = (1<<3), + /** Option for adding a group with \c #AIMenuSuite::AddMenuGroup() */ + kMenuGroupAddAboveNearGroup = (1<<4) +}; + + +/** The update action to be performed when all criteria are met. + Specify only one action. See \c #AIMenuSuite::UpdateMenuItemAutomatically(). */ +enum AIAutoMenuUpdateAction { + /** Enables the item if the criteria evaluate to true, disables it otherwise. */ + kAutoEnableMenuItemAction = (1<<0), + /** Puts a check mark by the item if the criteria evaluate to true, removes + the check otherwise. */ + kAutoCheckMenuItemAction = (1<<1) +}; + +/** Types of art objects whose appearance in a document or selection + can be considered for automatic menu update. + See \c #AIMenuSuite::UpdateMenuItemAutomatically(). */ +enum AIAutoMenuUpdateObjectCriteria { + /** Any type of group. */ + kIfGroup = (1<<0), + /** Any type of path. */ + kIfPath = (1<<1), + /** An internal object type unavailable to users and plug-ins. */ + kIfPostscript = (1<<2), + /** A placed object. */ + kIfPlaced = (1<<3), + /** Any type of text. */ + kIfText = (1<<4), + /** A path that has text in or on it. Can be set even + if \c kIfText is off, when a text path is direct-selected. */ + kIfTextPath = (1<<5), + /** Obsolete */ + kIfTextFlow = (1<<6), + /** Obsolete */ + kIfTextRun = (1<<7), + /** Art used as a guide. */ + kIfGuide = (1<<8), + /** A graph object */ + kIfGraphData = (1<<9), + /** Art used as a clipping mask. */ + kIfMask = (1<<10), + /** Obsolete */ + kIfEndMask = (1<<11), + /** A simple group. */ + kIfNormalGroup = (1<<12), + /** A group that is a compound path. */ + kIfCompoundGroup = (1<<13), + /** Obsolete. Do not use. */ + kIfWrapAroundGroup = (1<<14), + /** A group with a clipping path. */ + kIfClipGroup = (1<<15), + /** Point text. */ + kIfPointText = (1<<16), + /** Text in a path. */ + kIfInPathText = (1<<17), + /** Text on a path. */ + kIfOnPathText = (1<<18), + /** Threaded text. */ + kIfThreadedText = (1<<19), + /** Raster art. */ + kIfRaster = (1<<20), + /** Plug-in group (for any platform). */ + kIfPluginArt = (1<<21), // AI8 + /** Mesh art. */ + kIfMesh = (1<<22), // AI8 + /** Styled art. */ + kIfHasStyledArt = (1<<23), // AI9 + /** Symbol. */ + kIfSymbol = (1<<24), // AI10 + /** Foreign object. */ + kIfForeignArt = (1<<25), // AI11 + /** Legacy text. */ + kIfLegacyTextArt = (1<<26), // AI11 + /** Path that is not inside a planar group. */ + kIfClassicPath = (1<<27), // AI12 + /** Path that is inside a planar group. See \c #AIPlanarObjectSuite. */ + kIfPlanarPath = (1<<28), // AI12 + /** A path that does not have text in or on it. */ + kIfNonTextPath = (1<<29), // AI12 + /** Chart. */ + kIfChartArt = (1<<30), // AI19 + /** Repeat art. */ + kIfRepeatArt = (1<<31), //AI25 + /** Any art. */ + kIfAnyArt = (0xFFFFFFFF) // AI11 +}; + + +/** For pre-AI14 compatibility */ +#define kMacIfPlugin kIfPluginArt + +/** Document properties that can be considered for automatic + menu update. See \c #AIMenuSuite::UpdateMenuItemAutomatically(). */ +enum AIAutoMenuUpdatePropertyCriteria { + kIfCurrentLayerIsEditable = (1<<0), + kIfOpenTextEdit = (1<<1), + kIfAnyPrintingChars = (1<<2), + kIfAnyHiddenObjects = (1<<3), + kIfAnyLockedObjects = (1<<4), + kIfAnyClipPaths = (1<<5), + kIfOpenDocument = (1<<6), + kIfCMYKDocument = (1<<7), // AI9 + kIfRGBDocument = (1<<8), // AI9 + kIfCurrentArtStyleIsNamed = (1<<9), // AI9 + kIfHasPluginSelection = (1<<10) // AI12 +}; + +/** Modifier keys for command characters (keyboard shortcuts). + See \c #AIMenuSuite::SetItemCmd() and \c #AIMenuSuite::GetItemCmd(). */ +enum AIMenuItemModifier { + /** Shift key */ + kMenuItemCmdShiftModifier = 1, + /** Option key in Mac OS, Alt key in Windows. */ + kMenuItemCmdOptionModifier = 2, + /** Command key in Mac OS, Ctrl key in Windows. */ + kMenuItemCmdControlModifier = 4 // the control key on the Mac. +}; + + +/** @ingroup Errors */ +#define kTooManyMenuItemsErr '>MIT' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a menu item. Never dereferenced. +Access with \c #AIMenuSuite functions. */ +typedef struct _t_AIMenuItemOpaque *AIMenuItemHandle; +/** Opaque reference to a menu group. Never dereferenced. +Access with \c #AIMenuSuite functions. */ +typedef struct _t_MenuGroupOpaque *AIMenuGroup; // new for AI7.0 + +#if Macintosh + /** Platform-specific menu reference. \li In Mac OS, a \c MenuRef. + \li In Windows, cast to \c HMENU.*/ + typedef struct MacMenu_t* AIPlatformMenuHandle; +#elif MSWindows + /** Platform-specific menu reference. \li In Mac OS, a \c MenuRef. + \li In Windows, cast to \c HMENU. */ + typedef struct WinMenu **AIPlatformMenuHandle; // can cast it to HMENU +#elif LINUX_ENV + typedef void **AIPlatformMenuHandle; +#endif + +/** Menu item definition data. */ +typedef struct { + /** The menu group to which an item is added. See @ref menuGroups.*/ + const char *groupName; + /** The display label for an item. (To create a menu separator + set the \c #kMenuItemIsSeparator options flag and set this + to \c NULL.) */ + ai::UnicodeString itemText; +} AIPlatformAddMenuItemDataUS; + +/** A platform-specific menu structure corresponding to an + Illustrator menu item. + See \c #AIMenuSuite::GetPlatformMenuItem(). */ +typedef struct { + /** An \c HMENU in Windows, a \c MenuRef in Mac OS. */ + AIPlatformMenuHandle menu; + /** The index of the item in the platform menu. */ + ai::int16 item; +} AIPlatformMenuItem; + +/** Message sent with menu selectors. */ +typedef struct { + /** The message data. */ + SPMessageData d; + /** The menu item object. */ + AIMenuItemHandle menuItem; +} AIMenuMessage; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that allow you to add menu items to + the Illustrator menu structure. + + A menu can be a stand alone interface to a plug-in feature, or + group a number of features together. Plug-ins of all types can have + an associated plug-in menu item. For instance, if you define a + palette (non-modal dialog box), you typically add a menu item to the + Windows menu to hide and show your window. + + This section describes how to install and use plug-in menu items. It discusses + the caller, selectors and messages that plug-in menus receive, as well as the + functions provided to add menus, set options, and control menu appearance, + and to make simple appearance changes automatically based on the changes in + artwork. + + Menu plug-ins are similar to Filter plug-ins (see the \c #AIFilterSuite), + but are different in these ways: + \li Filter plug-ins are added to the Filter menu, while menu plug-ins + can add commands to any menu. + \li Filters have automatic repeat and undo, while menu plug-ins must set + the Undo menu item text. + \li Menu plug-ins can set command keys and control their appearance. + \li Both plug-in types receive a go selector, but Filters also receive + a selector to get parameters. + + This suite is cross-platform (although the functions closely parallel + the Mac OS toolbox functions for changing menu appearance). + If you must manipulate a menu item directly, use \c #GetPlatformMenuItem() + to obtain a platform-specific menu reference. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMenuSuite and \c #kAIMenuVersion. + + \section menuSelectors Menu Selectors + + The caller for menu plug-ins is \c #kCallerAIMenu. Check for the caller and + these selectors in the plug-in's main function:
+ #kSelectorAIGoMenuItem
+ #kSelectorAIUpdateMenuItem

+ The message data for both selectors is passed in an \c #AIMenuMessage. + + \section menuNotifiers Menu Notifiers + + The notifier \c #kAIMenuChangedNotifier is sent when a menu is + modified. + + Notifiers are available before and after menu commmands are executed. + + \li The pre- and post-menu notifiers for Illustrator commands do not have + predefined constants. Instead, the notification identification string + is generated dynamically, in the following format:

+ "AI Command Notifier: Before " + \e menu \e identifier \e text
+ "AI Command Notifier: After " + \e menu \e identifier \e text

+ The menu identifiers are defined in \c AIMenuCommandNotifiers.h. + + + \section menuGroups Menu Groups + + Plug-in menu items are added to menu \e groups, which are predefined locations + within Illustrator�s menu structure. The complete list of groups is found + in the \c AIMenuGroups.h. Some examples of menu groups are:

+ \c #kOpenMenuGroup
+ \c #kArrangeMoveMenuGroup
+ \c #kTypeSizeMenuGroup + + The names describe the menu location. A \e utilities group is located at + the top to a menu group; for instance, the "Type Size Utilities" + menu group is at the top of the "Type Size" submenu. + + You can create new menu groups, to which your plug-in or other plug-ins + can add menu items. As a plug-in developer, you are responsible for + documenting any menu groups you add. + + \subsection pluginMenuGroups Plug-in Menu Groups + + To use a menu group added by a plug-in (rather than the application), + your plug-in should explicitly add the group, using \c #AddMenuGroup(). + If is safe to add a menu group twice; + the second call returns the existing group reference. + The following predefined groups are added by plug-ins:

+ \c #kDocInfoMenuGroup
+ \c #kObjectRasterMenuGroup
+ \c #kArrangeTransformMultipleMenuGroup
+ \c #kATMMenuGroupNearGroup
+ \c #kObjectPathsPopoutPluginMenuGroup
+ \c #kOPPPMenuGroupNearGroup
+ \c #kDocumentSupportMenuGroup
+ \c #kAssetMgmtMenuGroup
+ \c #kWorkgroupMenuGroup
+ \c #kScriptsMenuGroup
+ \c #kWorkspacesMenuGroup
+ \c #kWorkspacesPresetsMenuGroup
+ \c #kWorkspacesCustomMenuGroup + + @note The \c #kFilterUtilities menu is implemented using an + internal plug-in. To use it, you must acquire the \c #AIFilterSuite. + +*/ +typedef struct { + + /** Creates and installs a plug-in menu item. + @param self This plug-in. + @param inKeyboardShortDictionaryKey A unique identifying name + for this item in the \c keyboardshortcut dictionary, or \c NULL + if the item is dynamic or has no shortcut. + @param data The menu group to which the item is added, and the display + label for the item as a Unicode string. + @param options Flags that control the item's behavior, a logical OR + of \c #AIMenuItemOption values. + @param menuItem [out] A buffer in which to return the menu item object. + If your plug-in installs multiple items, store this in \c globals + to compare when receiving a notification or selector. + May be \c NULL. + */ + AIAPI AIErr (*AddMenuItem) ( SPPluginRef self, const char*inKeyboardShortDictionaryKey, + AIPlatformAddMenuItemDataUS *data, AIMenuItemOption options, + AIMenuItemHandle *menuItem ); + + /** Creates and installs a plug-in menu item using a ZString display label. + @param self This plug-in. + @param inKeyboardShortDictionaryKey A unique identifying name + for this item in the \c keyboardshortcut dictionary, or \c NULL + if the item is dynamic or has no shortcut. + @param groupName The menu group to which the item is added. + @param data The ZString display label for the item. + @param options Flags that control the item's behavior, a logical OR + of \c #AIMenuItemOption values. + @param menuItem [out] A buffer in which to return the menu item object. + If your plug-in installs multiple items, store this in \c globals + to compare when receiving a notification or selector. */ + AIAPI AIErr (*AddMenuItemZString) ( SPPluginRef self, const char*inKeyboardShortDictionaryKey, + const char *groupName, ZRef itemText, AIMenuItemOption options, + AIMenuItemHandle *menuItem ); + + /** Retrieves the \c keyboardshortcut dictionary key of a menu item. + @param menuItem The menu item object. + @param outKey [out] A buffer in which to return the key string. Do not modify. + */ + AIAPI AIErr (*GetMenuItemKeyboardShortcutDictionaryKey) ( AIMenuItemHandle menuItem, const char**outKey ); + + /** Retrieves the option flags of a menu item. + @param menuItem The menu item object. + @param options [out] A buffer in which to return the options, a logical + OR of \c #AIMenuItemOption values. + */ + AIAPI AIErr (*GetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption *options ); + + /** Set the option flags for a menu item. + @param menuItem The menu item object. + @param options The options, a logical OR of \c #AIMenuItemOption values. + */ + AIAPI AIErr (*SetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption options ); + + /** Retrieves the plug-in that installed a menu item. + @param menuItem The menu item object. + @param options [out] A buffer in which to return the plug-in object. + */ + AIAPI AIErr (*GetMenuItemPlugin) ( AIMenuItemHandle menuItem, + SPPluginRef *plugin ); + + /** Gets the number of installed menu items. Use with \c #GetNthMenuItem() + to iterate through items. + @param count [out] A buffer in which to return the number of items. + May be \c NULL. + */ + AIAPI AIErr (*CountMenuItems) ( ai::int32 *count ); + + /** Retrieves an installed menu item by index position. Use with + \c #CountMenuItems() to iterate through items. + @param n The position index, in the range [0..numItems-1]. + @param menuItem [out] A buffer in which to return the menu item object. + */ + AIAPI AIErr (*GetNthMenuItem) ( ai::int32 n, AIMenuItemHandle *menuItem ); + + /** Retrieves the platform-specific menu item reference associated with a menu item. + @param menuItem The menu item object. + @param platformMenuItem [out] A buffer in which to return the + platform-specific object. The menu handle + is a \c MenuInfo structure in Mac OS, a \c WinMenu structure in Windows. + */ + AIAPI AIErr (*GetPlatformMenuItem) ( AIMenuItemHandle menuItem, + AIPlatformMenuItem *platformMenuItem ); + + /** Updates a menu item's appearance automatically when specified conditions + are met. You can either enable/disable, or check/uncheck the item with one call; + you cannot perform both types of update at once. + + All criteria are evaluated and the results combined with a + logical AND to decide whether to make the specified appearance modification. + \li The results of the positive criteria are combined to produce a + positive result, which is true if any of the positive criteria are true. + \li The results of the negative criteria are combined to produce a + negative result, which is true if none of the negative criteria are true. + \li The combined result used to perform the update action is true if + both the positive and negative results are true--that is, if any of the + desired properties are present and none of the undesired properties are + present. + + @param menuItem The menu item object. + @param action The action to take when criteria are satisfied. + An \c #AIAutoMenuUpdateAction value. + @param ifObjectIsInArtwork Update if any object matching any specified type + appears in the current document's artwork tree. A logical OR of + \c #AIAutoMenuUpdateObjectCriteria values. + @param ifObjectIsNotInArtwork Update if no object matching any specified type + appears in the current document's artwork tree. A logical OR of + \c #AIAutoMenuUpdateObjectCriteria values. + @param ifObjectIsSelected Update if any object matching any specified type + appears in the current document's selection. A logical OR of + \c #AIAutoMenuUpdateObjectCriteria values. + @param ifObjectIsNotSelected Update if no object matching any specified type + appears in the current document's selection. A logical OR of + \c #AIAutoMenuUpdateObjectCriteria values. + @param ifIsTrue Update if any of the specified document properties are true + for the current document. A logical OR of + \c #AIAutoMenuUpdatePropertyCriteria values. + @param ifIsNotTrue Update if none of the specified document properties are true + for the current document. A logical OR of + \c #AIAutoMenuUpdatePropertyCriteria values. + */ + AIAPI AIErr (*UpdateMenuItemAutomatically) ( AIMenuItemHandle menuItem, + ai::int32 action, + ai::int32 ifObjectIsInArtwork, ai::int32 ifObjectIsNotInArtwork, + ai::int32 ifObjectIsSelected, ai::int32 ifObjectIsNotSelected, + ai::int32 ifIsTrue, ai::int32 ifIsNotTrue ); + + /** Retrieves document and artwork state information that you can use + to update a menu item�s checked or enabled state. + This is faster than scanning the artwork tree or getting specific art, + as Illustrator has already computed the information for automatic + menu updates. + + Call this only when the \c #kSelectorAIUpdateMenuItem selector + is received. The information is invalid if the call is made at any other time. + The \c #kMenuItemWantsUpdateOption option must be set for the + plug-in to receive this selector. + @param inArtwork [out] A buffer in which to return a set of flags + for types of art that are contained in the current document's + artwork tree. A logical OR of \c #AIAutoMenuUpdateObjectCriteria values. + @param isSelected [out] A buffer in which to return a set of flags + for types of art that are contained in the current document's + selection. A logical OR of \c #AIAutoMenuUpdateObjectCriteria values. + @param isTrue [out] A buffer in which to return a set of flags + for document properties that are true for the current document. + A logical OR of \c #AIAutoMenuUpdatePropertyCriteria values. + */ + AIAPI AIErr (*GetUpdateFlags)( ai::int32 *inArtwork, ai::int32 *isSelected, ai::int32 *isTrue ); + + /*-------------------------------------------------------------------------------------------*/ + + /** Enables a menu item. + @param menuItem The menu item object. + */ + AIAPI AIErr (*EnableItem) ( AIMenuItemHandle menuItem); + /** Disables (grays out) a menu item. + @param menuItem The menu item object. + */ + AIAPI AIErr (*DisableItem) ( AIMenuItemHandle menuItem); + + /** Retrieves the localizable display label of a menu item. This is different + from the unique identifying name returned by + \c #GetMenuItemKeyboardShortcutDictionaryKey(). + @param menuItem The menu item object. + @param itemString [out] A buffer in which to return the label string. + */ + AIAPI AIErr (*GetItemText) ( AIMenuItemHandle menuItem, ai::UnicodeString &itemString ); + + /** Sets the localizable display label of a menu item using a Unicode string. + @param menuItem The menu item object. + @param itemString The new label string. + */ + AIAPI AIErr (*SetItemText) ( AIMenuItemHandle menuItem, const ai::UnicodeString &itemString ); + + /** Sets the localizable display label of a menu item using a ZString. + @param menuItem The menu item object. + @param itemString The new label ZString. + */ + AIAPI AIErr (*SetItemTextZString) ( AIMenuItemHandle menuItem, ZRef itemString ); + + /** Sets the checked state of a menu item. + @param menuItem The menu item object. + @param bCheckIt True to check the item, false to uncheck it. + */ + AIAPI AIErr (*CheckItem) ( AIMenuItemHandle menuItem, AIBoolean bCheckIt ); + + /** Retrieves the menu group to which a menu item belongs. + @param menuItem The menu item object. + @param group [out] A buffer in which to return the menu group. + */ + AIAPI AIErr (*GetItemMenuGroup) ( AIMenuItemHandle menuItem, AIMenuGroup *group ); + + /** Creates a new menu group, to which you can add your plug-in menu items. + If the group already exists, returns the group reference. See @ref menuGroups. + @param name The unique identifying name, which can be passed to \c #AddMenuItem(). + @param options Flags that control the behavior of the menu group, + a logical OR of \c #AIMenuGroupOption values. + @param nearGroup An existing menu group for relative placement of this group. + The new group is added below this one, unless the options include + \c #kMenuGroupAddAboveNearGroup, in which case it is added above this one. + + If this is a submenu created by \c #AddMenuGroupAsSubMenu(), + the new menu group becomes part of that submenu, and is added above or below + other menu items or groups that were previously added to the submenu, depending + on the options. + @param group [out] A buffer in which to return the menu group object. + @return The error \c #kBadParameterErr if the relative group does not yet exist. + The loading order of plug-ins is indeterminate; if the relative group is + one that might be created by a different plug-in, your plug-in should + check for an error and either create the group or add near a different group. + It is all right to add the same group multiple times. + */ + AIAPI AIErr (*AddMenuGroup) ( const char* name, AIMenuGroupOption options, const char* nearGroup, + AIMenuGroup *group ); + + /** Adds a new menu group as a submenu. A submenu can be updated + programmatically or automatically, like a top-level menu. + Nested submenus are allowed. + @param name The unique identifying name, which can be passed to \c #AddMenuItem(). + @param options Flags that control the behavior of the menu group, + a logical OR of \c #AIMenuGroupOption values. + @param menuItem The menu item that invokes this submenu. + @param group [out] A buffer in which to return the menu group object. + */ + AIAPI AIErr (*AddMenuGroupAsSubMenu) ( const char* name, AIMenuGroupOption options, AIMenuItemHandle menuItem, AIMenuGroup *group); + + /** Retrieves the unique identifying name of a menu group. + @param group The menu group object. + @param name [out] A buffer in which to return the name string. Do not modify. + */ + AIAPI AIErr (*GetMenuGroupName) ( AIMenuGroup group, const char**name); + + /** Retrieves the option flags of a menu group. + @param group The menu group object. + @param options [out] A buffer in which to return the options, a + logical OR of \c #AIMenuGroupOption values. + */ + AIAPI AIErr (*GetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption *options ); + + /** Sets the option flags of a menu group. + @param group The menu group object. + @param options The new options, a logical OR of \c #AIMenuGroupOption values. + */ + AIAPI AIErr (*SetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption options ); + + /** Retrieves a reference to the platform-specific menu structure for a menu + with the range of items that belong to a menu group. + @param group The menu group object. + @param theMenu [out] A buffer in which to return the platform-specific menu information. + The menu handle is a \c MenuInfo structure in Mac OS, + a \c WinMenu structure in Windows. + @param firstItem [out] A buffer in which to return the index of the first item + in the group. + @param numItems [out] A buffer in which to return the number of items in the group. + */ + AIAPI AIErr (*GetMenuGroupRange) ( AIMenuGroup group, AIPlatformMenuHandle *theMenu, + ai::int16 *firstItem, ai::int16 *numItems ); + + /** Gets the number of installed menu groups. Use with + \c #GetNthMenuGroup() to iterate through all menu groups. + @param count [out] A buffer in which to return the number of groups. + */ + AIAPI AIErr (*CountMenuGroups) ( ai::int32 *count ); + + /** Retrieves a menu group by position index. Use with + \c #CountMenuGroups() to iterate through all menu groups. + @param n The position index, in the range [0..numGroups-1]. + @param group [out] A buffer in which to return the menu group object. + */ + AIAPI AIErr (*GetNthMenuGroup) ( ai::int32 n, AIMenuGroup *group ); + + /** Retrieves the command character and modifier keys that act as the + keyboard shortcut for a menu item. + @param menuItem The menu item object. + @param cmdChar [out] A buffer in which to return the command character (keyboard shortcut). + @param modifiers [out] A buffer in which to return the command character modifiers, + a logical OR of \c #AIMenuItemModifier constants. + @note Submenus created by plug-ins do not support modified command keys. */ + AIAPI AIErr (*GetItemCmd) ( AIMenuItemHandle menuItem, ai::int16 *cmdChar, ai::int16 *modifiers ); + + /** Sets the command character and modifier keys that act as the + keyboard shortcut for a menu item. + @param menuItem The menu item object. + @param cmdChar The command character (keyboard shortcut). + @param modifiers The command character modifiers, a logical OR of + \c #AIMenuItemModifier constants. + @note Submenus created by plug-ins do not support modified command keys. */ + AIAPI AIErr (*SetItemCmd) ( AIMenuItemHandle menuItem, char cmdChar, ai::int16 modifiers ); + + /** Retrieves the function key and modifiers associated with a menu item. + @param menuItem The menu item object. + @param fkey [out] A buffer in which to return the function key. + @param modifiers [out] A buffer in which to return the function key modifiers, + a logical OR of \c #AIMenuItemModifier constants. + */ + AIAPI AIErr (*GetItemFunctionKey) ( AIMenuItemHandle menuItem, ai::int16 *fkey, ai::int16 *modifiers ); + + /** Sets the function key and modifiers associated with a menu item. + @param menuItem The menu item object. + @param fkey The function key, in the range [1..15]. + @param modifiers The function key modifiers, a logical OR of + \c #AIMenuItemModifier constants. + */ + AIAPI AIErr (*SetItemFunctionKey) ( AIMenuItemHandle menuItem, ai::int16 fkey, ai::int16 modifiers ); + + /** Reports whether a menu item is enabled. + @param menuItem The menu item object. + @param bEnables [out] A buffer in which to return true if the item is enabled, false + if it is disabled (grayed). + */ + AIAPI AIErr (*IsItemEnabled) ( AIMenuItemHandle menuItem, ASBoolean *bEnabled); + + /** Reports whether a menu item is checked. + @param menuItem The menu item object. + @param bCheckIt [out] A buffer in which to return true if the item is checked, false + if it is unchecked. + */ + AIAPI AIErr (*IsItemChecked) ( AIMenuItemHandle menuItem, AIBoolean *bCheckIt ); + + /** Deletes a menu item. + @param menuItem The menu item object. After the call, this reference is invalid. + */ + AIAPI AIErr (*RemoveMenuItem) ( AIMenuItemHandle menuItem ); + + /** Sets the header for a menu group. When a menu has a header, + the \c #kMenuGroupHasHeader option flag is set for the group, and the + menu contains a non-selectable item for which the + \c #kMenuItemIsGroupHeader option flag is set. All other items in the group + are shown below and indented from the header text. + @param inGroup The menu group object. + @param inHeader The header string, or an empty string to remove the group header. + */ + AIAPI AIErr (*SetMenuGroupHeader) (AIMenuGroup inGroup, const ai::UnicodeString &inHeader); + + /** Programmatically invokes a menu action, as if the user had clicked the menu item. + @param menuCmdID The command ID for the menu item. + */ + AIAPI AIErr (*InvokeMenuAction)(AICommandID menuCmdID); + +} AIMenuSuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuCommandNotifiers.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuCommandNotifiers.h index de78441..fb7eac3 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuCommandNotifiers.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuCommandNotifiers.h @@ -1,1022 +1,1027 @@ -#ifndef AIMenuCommandNotifiers_h__ -#define AIMenuCommandNotifiers_h__ - -/* - * Name: AIMenuCommandNotifiers.h - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1995-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/** @file AIMenuCommandNotifiers.h */ - -/** @ingroup Notifiers - Menu identifiers for pre- and post- notification - See source code and \c #AIMenuSuite. */ - -#define kAINewCommandPreNotifierStr "AI Command Notifier: Before New" //File:New -#define kAINewCommandPostNotifierStr "AI Command Notifier: After New" //File:New -#define kAINewFromTemplateCommandPreNotifierStr "AI Command Notifier: Before New From Template" //File:New from Template -#define kAINewFromTemplateCommandPostNotifierStr "AI Command Notifier: After New From Template" //File:New from Template -#define kAIOpenCommandPreNotifierStr "AI Command Notifier: Before Open" //File:Open -#define kAIOpenCommandPostNotifierStr "AI Command Notifier: After Open" //File:Open -#define kAICloseCommandPreNotifierStr "AI Command Notifier: Before Close" //File:Close -#define kAICloseCommandPostNotifierStr "AI Command Notifier: After Close" //File:Close -#define kAISaveCommandPreNotifierStr "AI Command Notifier: Before Save" //File:Save -#define kAISaveCommandPostNotifierStr "AI Command Notifier: After Save" //File:Save -#define kAISaveAsCommandPreNotifierStr "AI Command Notifier: Before Save As" //File:Save As -#define kAISaveAsCommandPostNotifierStr "AI Command Notifier: After Save As" //File:Save As -#define kAISaveACopyAsCommandPreNotifierStr "AI Command Notifier: Before Save A Copy As" //File:Save a Copy -#define kAISaveACopyAsCommandPostNotifierStr "AI Command Notifier: After Save A Copy As" //File:Save a Copy -#define kAISaveAsTemplateCommandPreNotifierStr "AI Command Notifier: Before Save As Template" //File:Save as Template -#define kAISaveAsTemplateCommandPostNotifierStr "AI Command Notifier: After Save As Template" //File:Save as Template -#define kAIAdobeAISaveForWebCommandPreNotifierStr "AI Command Notifier: Before Adobe AI Save For Web" //File:Save for Web & Devices -#define kAIAdobeAISaveForWebCommandPostNotifierStr "AI Command Notifier: After Adobe AI Save For Web" //File:Save for Web & Devices -#define kAIAdobeAISaveSelectedSlicesCommandPreNotifierStr "AI Command Notifier: Before Adobe AI Save Selected Slices" //File:Save Selected Slices -#define kAIAdobeAISaveSelectedSlicesCommandPostNotifierStr "AI Command Notifier: After Adobe AI Save Selected Slices" //File:Save Selected Slices -#define kAIRevertToSavedCommandPreNotifierStr "AI Command Notifier: Before Revert To Saved" //File:Revert -#define kAIRevertToSavedCommandPostNotifierStr "AI Command Notifier: After Revert To Saved" //File:Revert -#define kAIAIPlaceCommandPreNotifierStr "AI Command Notifier: Before AI Place" //File:Place -#define kAIAIPlaceCommandPostNotifierStr "AI Command Notifier: After AI Place" //File:Place -#define kAISaveForOfficeCommandPreNotifierStr "AI Command Notifier: Before Save for Office" //File:Save for Microsoft Office -#define kAISaveForOfficeCommandPostNotifierStr "AI Command Notifier: After Save for Office" //File:Save for Microsoft Office -#define kAIExportCommandPreNotifierStr "AI Command Notifier: Before Export" //File:Export -#define kAIExportCommandPostNotifierStr "AI Command Notifier: After Export" //File:Export -#define kAIAiBrowseForScriptCommandPreNotifierStr "AI Command Notifier: Before ai_browse_for_script" //File:Scripts:Other Script -#define kAIAiBrowseForScriptCommandPostNotifierStr "AI Command Notifier: After ai_browse_for_script" //File:Scripts:Other Script -#define kAIArtSetupCommandPreNotifierStr "AI Command Notifier: Before Art Setup" //File:Document Setup -#define kAIArtSetupCommandPostNotifierStr "AI Command Notifier: After Art Setup" //File:Document Setup -#define kAIColorModeCMYKCommandPreNotifierStr "AI Command Notifier: Before Color Mode CMYK" //File:Document Color Mode:CMYK Color -#define kAIColorModeCMYKCommandPostNotifierStr "AI Command Notifier: After Color Mode CMYK" //File:Document Color Mode:CMYK Color -#define kAIColorModeRGBCommandPreNotifierStr "AI Command Notifier: Before Color Mode RGB" //File:Document Color Mode:RGB Color -#define kAIColorModeRGBCommandPostNotifierStr "AI Command Notifier: After Color Mode RGB" //File:Document Color Mode:RGB Color -#define kAIFileInfoCommandPreNotifierStr "AI Command Notifier: Before File Info" //File:File Info -#define kAIFileInfoCommandPostNotifierStr "AI Command Notifier: After File Info" //File:File Info -#define kAIPrintCommandPreNotifierStr "AI Command Notifier: Before Print" //File:Print -#define kAIPrintCommandPostNotifierStr "AI Command Notifier: After Print" //File:Print -#define kAIQuitCommandPreNotifierStr "AI Command Notifier: Before Quit" //File:Exit -#define kAIQuitCommandPostNotifierStr "AI Command Notifier: After Quit" //File:Exit -#define kAIUndoCommandPreNotifierStr "AI Command Notifier: Before Undo" //Edit:Undo -#define kAIUndoCommandPostNotifierStr "AI Command Notifier: After Undo" //Edit:Undo -#define kAIRedoCommandPreNotifierStr "AI Command Notifier: Before Redo" //Edit:Redo -#define kAIRedoCommandPostNotifierStr "AI Command Notifier: After Redo" //Edit:Redo -#define kAICutCommandPreNotifierStr "AI Command Notifier: Before Cut" //Edit:Cut -#define kAICutCommandPostNotifierStr "AI Command Notifier: After Cut" //Edit:Cut -#define kAICopyCommandPreNotifierStr "AI Command Notifier: Before Copy" //Edit:Copy -#define kAICopyCommandPostNotifierStr "AI Command Notifier: After Copy" //Edit:Copy -#define kAIPasteCommandPreNotifierStr "AI Command Notifier: Before Paste" //Edit:Paste -#define kAIPasteCommandPostNotifierStr "AI Command Notifier: After Paste" //Edit:Paste -#define kAIPasteInFrontCommandPreNotifierStr "AI Command Notifier: Before Paste in Front" //Edit:Paste in Front -#define kAIPasteInFrontCommandPostNotifierStr "AI Command Notifier: After Paste in Front" //Edit:Paste in Front -#define kAIPasteInBackCommandPreNotifierStr "AI Command Notifier: Before Paste in Back" //Edit:Paste in Back -#define kAIPasteInBackCommandPostNotifierStr "AI Command Notifier: After Paste in Back" //Edit:Paste in Back -#define kAIPasteInPlaceCommandPreNotifierStr "AI Command Notifier: Before Paste in Place" //Edit:Paste in Place -#define kAIPasteInPlaceCommandPostNotifierStr "AI Command Notifier: After Paste in Place" //Edit:Paste in Place -#define kAIPasteInAllArtboardsCommandPreNotifierStr "AI Command Notifier: Before Paste in All Artboards" //Edit:Paste on All Artboards -#define kAIPasteInAllArtboardsCommandPostNotifierStr "AI Command Notifier: After Paste in All Artboards" //Edit:Paste on All Artboards -#define kAIClearCommandPreNotifierStr "AI Command Notifier: Before Clear" //Edit:Clear -#define kAIClearCommandPostNotifierStr "AI Command Notifier: After Clear" //Edit:Clear -#define kAIFindAndReplaceCommandPreNotifierStr "AI Command Notifier: Before Find and Replace" //Edit:Find and Replace -#define kAIFindAndReplaceCommandPostNotifierStr "AI Command Notifier: After Find and Replace" //Edit:Find and Replace -#define kAIFindNextCommandPreNotifierStr "AI Command Notifier: Before Find Next" //Edit:Find Next -#define kAIFindNextCommandPostNotifierStr "AI Command Notifier: After Find Next" //Edit:Find Next -#define kAICheckSpellingCommandPreNotifierStr "AI Command Notifier: Before Check Spelling" //Edit:Check Spelling -#define kAICheckSpellingCommandPostNotifierStr "AI Command Notifier: After Check Spelling" //Edit:Check Spelling -#define kAIEditCustomDictionaryCommandPreNotifierStr "AI Command Notifier: Before Edit Custom Dictionary..." //Edit:Edit Custom Dictionary -#define kAIEditCustomDictionaryCommandPostNotifierStr "AI Command Notifier: After Edit Custom Dictionary..." //Edit:Edit Custom Dictionary -#define kAIDefinePatternMenuItemCommandPreNotifierStr "AI Command Notifier: Before Define Pattern Menu Item" //Edit:Define Pattern -#define kAIDefinePatternMenuItemCommandPostNotifierStr "AI Command Notifier: After Define Pattern Menu Item" //Edit:Define Pattern -#define kAIRecolorArtDialogCommandPreNotifierStr "AI Command Notifier: Before Recolor Art Dialog" //Edit:Edit Colors:Recolor Artwork -#define kAIRecolorArtDialogCommandPostNotifierStr "AI Command Notifier: After Recolor Art Dialog" //Edit:Edit Colors:Recolor Artwork -#define kAIAdjust3CommandPreNotifierStr "AI Command Notifier: Before Adjust3" //Edit:Edit Colors:Adjust Color Balance -#define kAIAdjust3CommandPostNotifierStr "AI Command Notifier: After Adjust3" //Edit:Edit Colors:Adjust Color Balance -#define kAIColors3CommandPreNotifierStr "AI Command Notifier: Before Colors3" //Edit:Edit Colors:Blend Front to Back -#define kAIColors3CommandPostNotifierStr "AI Command Notifier: After Colors3" //Edit:Edit Colors:Blend Front to Back -#define kAIColors4CommandPreNotifierStr "AI Command Notifier: Before Colors4" //Edit:Edit Colors:Blend Horizontally -#define kAIColors4CommandPostNotifierStr "AI Command Notifier: After Colors4" //Edit:Edit Colors:Blend Horizontally -#define kAIColors5CommandPreNotifierStr "AI Command Notifier: Before Colors5" //Edit:Edit Colors:Blend Vertically -#define kAIColors5CommandPostNotifierStr "AI Command Notifier: After Colors5" //Edit:Edit Colors:Blend Vertically -#define kAIColors8CommandPreNotifierStr "AI Command Notifier: Before Colors8" //Edit:Edit Colors:Convert to CMYK -#define kAIColors8CommandPostNotifierStr "AI Command Notifier: After Colors8" //Edit:Edit Colors:Convert to CMYK -#define kAIColors7CommandPreNotifierStr "AI Command Notifier: Before Colors7" //Edit:Edit Colors:Convert to Grayscale -#define kAIColors7CommandPostNotifierStr "AI Command Notifier: After Colors7" //Edit:Edit Colors:Convert to Grayscale -#define kAIColors9CommandPreNotifierStr "AI Command Notifier: Before Colors9" //Edit:Edit Colors:Convert to RGB -#define kAIColors9CommandPostNotifierStr "AI Command Notifier: After Colors9" //Edit:Edit Colors:Convert to RGB -#define kAIColors6CommandPreNotifierStr "AI Command Notifier: Before Colors6" //Edit:Edit Colors:Invert Colors -#define kAIColors6CommandPostNotifierStr "AI Command Notifier: After Colors6" //Edit:Edit Colors:Invert Colors -#define kAIOverprint2CommandPreNotifierStr "AI Command Notifier: Before Overprint2" //Edit:Edit Colors:Overprint Black -#define kAIOverprint2CommandPostNotifierStr "AI Command Notifier: After Overprint2" //Edit:Edit Colors:Overprint Black -#define kAISaturate3CommandPreNotifierStr "AI Command Notifier: Before Saturate3" //Edit:Edit Colors:Saturate -#define kAISaturate3CommandPostNotifierStr "AI Command Notifier: After Saturate3" //Edit:Edit Colors:Saturate -#define kAIEditOriginalMenuItemCommandPreNotifierStr "AI Command Notifier: Before EditOriginal Menu Item" //Edit:Edit Original -#define kAIEditOriginalMenuItemCommandPostNotifierStr "AI Command Notifier: After EditOriginal Menu Item" //Edit:Edit Original -#define kAITransparencyPresetsCommandPreNotifierStr "AI Command Notifier: Before Transparency Presets" //Edit:Transparency Flattener Presets -#define kAITransparencyPresetsCommandPostNotifierStr "AI Command Notifier: After Transparency Presets" //Edit:Transparency Flattener Presets -#define kAITracingPresetsCommandPreNotifierStr "AI Command Notifier: Before TracingPresets" //Edit:Tracing Presets -#define kAITracingPresetsCommandPostNotifierStr "AI Command Notifier: After TracingPresets" //Edit:Tracing Presets -#define kAIPrintPresetsCommandPreNotifierStr "AI Command Notifier: Before Print Presets" //Edit:Print Presets -#define kAIPrintPresetsCommandPostNotifierStr "AI Command Notifier: After Print Presets" //Edit:Print Presets -#define kAIPDFPresetsCommandPreNotifierStr "AI Command Notifier: Before PDF Presets" //Edit:Adobe PDF Presets -#define kAIPDFPresetsCommandPostNotifierStr "AI Command Notifier: After PDF Presets" //Edit:Adobe PDF Presets -#define kAISWFPresetsCommandPreNotifierStr "AI Command Notifier: Before SWFPresets" //Edit:SWF Presets -#define kAISWFPresetsCommandPostNotifierStr "AI Command Notifier: After SWFPresets" //Edit:SWF Presets -#define kAIPerspectiveGridPresetsCommandPreNotifierStr "AI Command Notifier: Before PerspectiveGridPresets" //Edit:Perspective Grid Presets -#define kAIPerspectiveGridPresetsCommandPostNotifierStr "AI Command Notifier: After PerspectiveGridPresets" //Edit:Perspective Grid Presets -#define kAIColorMatchingPreferencesCommandPreNotifierStr "AI Command Notifier: Before Color Matching Preferences" //Edit:Color Settings -#define kAIColorMatchingPreferencesCommandPostNotifierStr "AI Command Notifier: After Color Matching Preferences" //Edit:Color Settings -#define kAIAssignProfileCommandPreNotifierStr "AI Command Notifier: Before Assign Profile" //Edit:Assign Profile -#define kAIAssignProfileCommandPostNotifierStr "AI Command Notifier: After Assign Profile" //Edit:Assign Profile -#define kAIKBSCMenuItemCommandPreNotifierStr "AI Command Notifier: Before KBSC Menu Item" //Edit:Keyboard Shortcuts -#define kAIKBSCMenuItemCommandPostNotifierStr "AI Command Notifier: After KBSC Menu Item" //Edit:Keyboard Shortcuts -#define kAIPreferencesCommandPreNotifierStr "AI Command Notifier: Before Preferences" //Edit:Preferences:General -#define kAIPreferencesCommandPostNotifierStr "AI Command Notifier: After Preferences" //Edit:Preferences:General -#define kAISelectionPreferencesCommandPreNotifierStr "AI Command Notifier: Before Selection Preferences" //Edit:Preferences:Selection & Anchor Display -#define kAISelectionPreferencesCommandPostNotifierStr "AI Command Notifier: After Selection Preferences" //Edit:Preferences:Selection & Anchor Display -#define kAIKeyboardPreferencesCommandPreNotifierStr "AI Command Notifier: Before Keyboard Preferences" //Edit:Preferences:Type -#define kAIKeyboardPreferencesCommandPostNotifierStr "AI Command Notifier: After Keyboard Preferences" //Edit:Preferences:Type -#define kAIUnitUndoPreferencesCommandPreNotifierStr "AI Command Notifier: Before Unit Undo Preferences" //Edit:Preferences:Units -#define kAIUnitUndoPreferencesCommandPostNotifierStr "AI Command Notifier: After Unit Undo Preferences" //Edit:Preferences:Units -#define kAIGridPreferencesCommandPreNotifierStr "AI Command Notifier: Before Grid Preferences" //Edit:Preferences:Guides & Grid -#define kAIGridPreferencesCommandPostNotifierStr "AI Command Notifier: After Grid Preferences" //Edit:Preferences:Guides & Grid -#define kAISnapomaticPreferencesCommandPreNotifierStr "AI Command Notifier: Before Snapomatic Preferences" //Edit:Preferences:Smart Guides -#define kAISnapomaticPreferencesCommandPostNotifierStr "AI Command Notifier: After Snapomatic Preferences" //Edit:Preferences:Smart Guides -#define kAISlicePreferencesCommandPreNotifierStr "AI Command Notifier: Before Slice Preferences" //Edit:Preferences:Slices -#define kAISlicePreferencesCommandPostNotifierStr "AI Command Notifier: After Slice Preferences" //Edit:Preferences:Slices -#define kAIHyphenationPreferencesCommandPreNotifierStr "AI Command Notifier: Before Hyphenation Preferences" //Edit:Preferences:Hyphenation -#define kAIHyphenationPreferencesCommandPostNotifierStr "AI Command Notifier: After Hyphenation Preferences" //Edit:Preferences:Hyphenation -#define kAIPluginsFolderPreferencesCommandPreNotifierStr "AI Command Notifier: Before Plugins Folder Preferences" //Edit:Preferences:Plug-ins & Scratch Disks -#define kAIPluginsFolderPreferencesCommandPostNotifierStr "AI Command Notifier: After Plugins Folder Preferences" //Edit:Preferences:Plug-ins & Scratch Disks -#define kAIUserInterfacePreferencesCommandPreNotifierStr "AI Command Notifier: Before User Interface Preferences" //Edit:Preferences:User Interface -#define kAIUserInterfacePreferencesCommandPostNotifierStr "AI Command Notifier: After User Interface Preferences" //Edit:Preferences:User Interface -#define kAIFileClipboardPrefCommandPreNotifierStr "AI Command Notifier: Before FileClipboardPref" //Edit:Preferences:File Handling & Clipboard -#define kAIFileClipboardPrefCommandPostNotifierStr "AI Command Notifier: After FileClipboardPref" //Edit:Preferences:File Handling & Clipboard -#define kAIBlackPrefCommandPreNotifierStr "AI Command Notifier: Before BlackPref" //Edit:Preferences:Appearance of Black -#define kAIBlackPrefCommandPostNotifierStr "AI Command Notifier: After BlackPref" //Edit:Preferences:Appearance of Black -#define kAITransformAgainCommandPreNotifierStr "AI Command Notifier: Before Transform Again" //Object:Transform:Transform Again -#define kAITransformAgainCommandPostNotifierStr "AI Command Notifier: After Transform Again" //Object:Transform:Transform Again -#define kAIMoveObjectsCommandPreNotifierStr "AI Command Notifier: Before Move Objects" //Object:Transform:Move -#define kAIMoveObjectsCommandPostNotifierStr "AI Command Notifier: After Move Objects" //Object:Transform:Move -#define kAITransformRotateCommandPreNotifierStr "AI Command Notifier: Before Transform - Rotate" //Object:Transform:Rotate -#define kAITransformRotateCommandPostNotifierStr "AI Command Notifier: After Transform - Rotate" //Object:Transform:Rotate -#define kAITransformReflectCommandPreNotifierStr "AI Command Notifier: Before Transform - Reflect" //Object:Transform:Reflect -#define kAITransformReflectCommandPostNotifierStr "AI Command Notifier: After Transform - Reflect" //Object:Transform:Reflect -#define kAITransformScaleCommandPreNotifierStr "AI Command Notifier: Before Transform - Scale" //Object:Transform:Scale -#define kAITransformScaleCommandPostNotifierStr "AI Command Notifier: After Transform - Scale" //Object:Transform:Scale -#define kAITransformShearCommandPreNotifierStr "AI Command Notifier: Before Transform - Shear" //Object:Transform:Shear -#define kAITransformShearCommandPostNotifierStr "AI Command Notifier: After Transform - Shear" //Object:Transform:Shear -#define kAITransformV23CommandPreNotifierStr "AI Command Notifier: Before Transform v23" //Object:Transform:Transform Each -#define kAITransformV23CommandPostNotifierStr "AI Command Notifier: After Transform v23" //Object:Transform:Transform Each -#define kAIAIResetBoundingBoxCommandPreNotifierStr "AI Command Notifier: Before AI Reset Bounding Box" //Object:Transform:Reset Bounding Box -#define kAIAIResetBoundingBoxCommandPostNotifierStr "AI Command Notifier: After AI Reset Bounding Box" //Object:Transform:Reset Bounding Box -#define kAISendToFrontCommandPreNotifierStr "AI Command Notifier: Before Send to Front" //Object:Arrange:Bring to Front -#define kAISendToFrontCommandPostNotifierStr "AI Command Notifier: After Send to Front" //Object:Arrange:Bring to Front -#define kAISendForwardCommandPreNotifierStr "AI Command Notifier: Before Send Forward" //Object:Arrange:Bring Forward -#define kAISendForwardCommandPostNotifierStr "AI Command Notifier: After Send Forward" //Object:Arrange:Bring Forward -#define kAISendBackwardCommandPreNotifierStr "AI Command Notifier: Before Send Backward" //Object:Arrange:Send Backward -#define kAISendBackwardCommandPostNotifierStr "AI Command Notifier: After Send Backward" //Object:Arrange:Send Backward -#define kAISendToBackCommandPreNotifierStr "AI Command Notifier: Before Send to Back" //Object:Arrange:Send to Back -#define kAISendToBackCommandPostNotifierStr "AI Command Notifier: After Send to Back" //Object:Arrange:Send to Back -#define kAISelectionHat2CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 2" //Object:Arrange:Send to Current Layer -#define kAISelectionHat2CommandPostNotifierStr "AI Command Notifier: After Selection Hat 2" //Object:Arrange:Send to Current Layer -#define kAIGroupCommandPreNotifierStr "AI Command Notifier: Before Group" //Object:Group -#define kAIGroupCommandPostNotifierStr "AI Command Notifier: After Group" //Object:Group -#define kAIUngroupCommandPreNotifierStr "AI Command Notifier: Before Ungroup" //Object:Ungroup -#define kAIUngroupCommandPostNotifierStr "AI Command Notifier: After Ungroup" //Object:Ungroup -#define kAILockCommandPreNotifierStr "AI Command Notifier: Before Lock" //Object:Lock:Selection -#define kAILockCommandPostNotifierStr "AI Command Notifier: After Lock" //Object:Lock:Selection -#define kAISelectionHat5CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 5" //Object:Lock:All Artwork Above -#define kAISelectionHat5CommandPostNotifierStr "AI Command Notifier: After Selection Hat 5" //Object:Lock:All Artwork Above -#define kAISelectionHat7CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 7" //Object:Lock:Other Layers -#define kAISelectionHat7CommandPostNotifierStr "AI Command Notifier: After Selection Hat 7" //Object:Lock:Other Layers -#define kAIUnlockAllCommandPreNotifierStr "AI Command Notifier: Before Unlock All" //Object:Unlock All -#define kAIUnlockAllCommandPostNotifierStr "AI Command Notifier: After Unlock All" //Object:Unlock All -#define kAIHideCommandPreNotifierStr "AI Command Notifier: Before Hide" //Object:Hide:Selection -#define kAIHideCommandPostNotifierStr "AI Command Notifier: After Hide" //Object:Hide:Selection -#define kAISelectionHat4CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 4" //Object:Hide:All Artwork Above -#define kAISelectionHat4CommandPostNotifierStr "AI Command Notifier: After Selection Hat 4" //Object:Hide:All Artwork Above -#define kAISelectionHat6CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 6" //Object:Hide:Other Layers -#define kAISelectionHat6CommandPostNotifierStr "AI Command Notifier: After Selection Hat 6" //Object:Hide:Other Layers -#define kAIUnhideAllCommandPreNotifierStr "AI Command Notifier: Before Unhide All" //Object:Show All -#define kAIUnhideAllCommandPostNotifierStr "AI Command Notifier: After Unhide All" //Object:Show All -#define kAIExpand3CommandPreNotifierStr "AI Command Notifier: Before Expand3" //Object:Expand -#define kAIExpand3CommandPostNotifierStr "AI Command Notifier: After Expand3" //Object:Expand -#define kAIExpandStyleCommandPreNotifierStr "AI Command Notifier: Before Expand Style" //Object:Expand Appearance -#define kAIExpandStyleCommandPostNotifierStr "AI Command Notifier: After Expand Style" //Object:Expand Appearance -#define kAIFlattenTransparency1CommandPreNotifierStr "AI Command Notifier: Before FlattenTransparency1" //Object:Flatten Transparency -#define kAIFlattenTransparency1CommandPostNotifierStr "AI Command Notifier: After FlattenTransparency1" //Object:Flatten Transparency -#define kAIRasterize8MenuItemCommandPreNotifierStr "AI Command Notifier: Before Rasterize 8 menu item" //Object:Rasterize -#define kAIRasterize8MenuItemCommandPostNotifierStr "AI Command Notifier: After Rasterize 8 menu item" //Object:Rasterize -#define kAIMakeMeshCommandPreNotifierStr "AI Command Notifier: Before make mesh" //Object:Create Gradient Mesh -#define kAIMakeMeshCommandPostNotifierStr "AI Command Notifier: After make mesh" //Object:Create Gradient Mesh -#define kAIAIObjectMosaicPlugIn4CommandPreNotifierStr "AI Command Notifier: Before AI Object Mosaic Plug-in4" //Object:Create Object Mosaic -#define kAIAIObjectMosaicPlugIn4CommandPostNotifierStr "AI Command Notifier: After AI Object Mosaic Plug-in4" //Object:Create Object Mosaic -#define kAITrimMarkV25CommandPreNotifierStr "AI Command Notifier: Before TrimMark v25" //Object:Create Trim Marks -#define kAITrimMarkV25CommandPostNotifierStr "AI Command Notifier: After TrimMark v25" //Object:Create Trim Marks -#define kAIAISliceMakeSliceCommandPreNotifierStr "AI Command Notifier: Before AISlice Make Slice" //Object:Slice:Make -#define kAIAISliceMakeSliceCommandPostNotifierStr "AI Command Notifier: After AISlice Make Slice" //Object:Slice:Make -#define kAIAISliceReleaseSliceCommandPreNotifierStr "AI Command Notifier: Before AISlice Release Slice" //Object:Slice:Release -#define kAIAISliceReleaseSliceCommandPostNotifierStr "AI Command Notifier: After AISlice Release Slice" //Object:Slice:Release -#define kAIAISliceCreateFromGuidesCommandPreNotifierStr "AI Command Notifier: Before AISlice Create from Guides" //Object:Slice:Create from Guides -#define kAIAISliceCreateFromGuidesCommandPostNotifierStr "AI Command Notifier: After AISlice Create from Guides" //Object:Slice:Create from Guides -#define kAIAISliceCreateFromSelectionCommandPreNotifierStr "AI Command Notifier: Before AISlice Create from Selection" //Object:Slice:Create from Selection -#define kAIAISliceCreateFromSelectionCommandPostNotifierStr "AI Command Notifier: After AISlice Create from Selection" //Object:Slice:Create from Selection -#define kAIAISliceDuplicateCommandPreNotifierStr "AI Command Notifier: Before AISlice Duplicate" //Object:Slice:Duplicate Slice -#define kAIAISliceDuplicateCommandPostNotifierStr "AI Command Notifier: After AISlice Duplicate" //Object:Slice:Duplicate Slice -#define kAIAISliceCombineCommandPreNotifierStr "AI Command Notifier: Before AISlice Combine" //Object:Slice:Combine Slices -#define kAIAISliceCombineCommandPostNotifierStr "AI Command Notifier: After AISlice Combine" //Object:Slice:Combine Slices -#define kAIAISliceDivideCommandPreNotifierStr "AI Command Notifier: Before AISlice Divide" //Object:Slice:Divide Slices -#define kAIAISliceDivideCommandPostNotifierStr "AI Command Notifier: After AISlice Divide" //Object:Slice:Divide Slices -#define kAIAISliceDeleteAllSlicesCommandPreNotifierStr "AI Command Notifier: Before AISlice Delete All Slices" //Object:Slice:Delete All -#define kAIAISliceDeleteAllSlicesCommandPostNotifierStr "AI Command Notifier: After AISlice Delete All Slices" //Object:Slice:Delete All -#define kAIAISliceSliceOptionsCommandPreNotifierStr "AI Command Notifier: Before AISlice Slice Options" //Object:Slice:Slice Options -#define kAIAISliceSliceOptionsCommandPostNotifierStr "AI Command Notifier: After AISlice Slice Options" //Object:Slice:Slice Options -#define kAIAISliceClipToArtboardCommandPreNotifierStr "AI Command Notifier: Before AISlice Clip to Artboard" //Object:Slice:Clip to Artboard -#define kAIAISliceClipToArtboardCommandPostNotifierStr "AI Command Notifier: After AISlice Clip to Artboard" //Object:Slice:Clip to Artboard -#define kAIJoinCommandPreNotifierStr "AI Command Notifier: Before Join" //Object:Path:Join -#define kAIJoinCommandPostNotifierStr "AI Command Notifier: After Join" //Object:Path:Join -#define kAIAverageCommandPreNotifierStr "AI Command Notifier: Before Average" //Object:Path:Average -#define kAIAverageCommandPostNotifierStr "AI Command Notifier: After Average" //Object:Path:Average -#define kAIOffsetPathV22CommandPreNotifierStr "AI Command Notifier: Before OffsetPath v22" //Object:Path:Outline Stroke -#define kAIOffsetPathV22CommandPostNotifierStr "AI Command Notifier: After OffsetPath v22" //Object:Path:Outline Stroke -#define kAIOffsetPathV23CommandPreNotifierStr "AI Command Notifier: Before OffsetPath v23" //Object:Path:Offset Path -#define kAIOffsetPathV23CommandPostNotifierStr "AI Command Notifier: After OffsetPath v23" //Object:Path:Offset Path -#define kAISimplifyMenuItemCommandPreNotifierStr "AI Command Notifier: Before simplify menu item" //Object:Path:Simplify -#define kAISimplifyMenuItemCommandPostNotifierStr "AI Command Notifier: After simplify menu item" //Object:Path:Simplify -#define kAIAddAnchorPoints2CommandPreNotifierStr "AI Command Notifier: Before Add Anchor Points2" //Object:Path:Add Anchor Points -#define kAIAddAnchorPoints2CommandPostNotifierStr "AI Command Notifier: After Add Anchor Points2" //Object:Path:Add Anchor Points -#define kAIRemoveAnchorPointsMenuCommandPreNotifierStr "AI Command Notifier: Before Remove Anchor Points menu" //Object:Path:Remove Anchor Points -#define kAIRemoveAnchorPointsMenuCommandPostNotifierStr "AI Command Notifier: After Remove Anchor Points menu" //Object:Path:Remove Anchor Points -#define kAIKnifeTool2CommandPreNotifierStr "AI Command Notifier: Before Knife Tool2" //Object:Path:Divide Objects Below -#define kAIKnifeTool2CommandPostNotifierStr "AI Command Notifier: After Knife Tool2" //Object:Path:Divide Objects Below -#define kAIRowsAndColumnsCommandPreNotifierStr "AI Command Notifier: Before Rows and Columns...." //Object:Path:Split Into Grid -#define kAIRowsAndColumnsCommandPostNotifierStr "AI Command Notifier: After Rows and Columns...." //Object:Path:Split Into Grid -#define kAICleanupMenuItemCommandPreNotifierStr "AI Command Notifier: Before cleanup menu item" //Object:Path:Clean Up -#define kAICleanupMenuItemCommandPostNotifierStr "AI Command Notifier: After cleanup menu item" //Object:Path:Clean Up -#define kAIPathBlendMakeCommandPreNotifierStr "AI Command Notifier: Before Path Blend Make" //Object:Blend:Make -#define kAIPathBlendMakeCommandPostNotifierStr "AI Command Notifier: After Path Blend Make" //Object:Blend:Make -#define kAIPathBlendReleaseCommandPreNotifierStr "AI Command Notifier: Before Path Blend Release" //Object:Blend:Release -#define kAIPathBlendReleaseCommandPostNotifierStr "AI Command Notifier: After Path Blend Release" //Object:Blend:Release -#define kAIPathBlendOptionsCommandPreNotifierStr "AI Command Notifier: Before Path Blend Options" //Object:Blend:Blend Options -#define kAIPathBlendOptionsCommandPostNotifierStr "AI Command Notifier: After Path Blend Options" //Object:Blend:Blend Options -#define kAIPathBlendExpandCommandPreNotifierStr "AI Command Notifier: Before Path Blend Expand" //Object:Blend:Expand -#define kAIPathBlendExpandCommandPostNotifierStr "AI Command Notifier: After Path Blend Expand" //Object:Blend:Expand -#define kAIPathBlendReplaceSpineCommandPreNotifierStr "AI Command Notifier: Before Path Blend Replace Spine" //Object:Blend:Replace Spine -#define kAIPathBlendReplaceSpineCommandPostNotifierStr "AI Command Notifier: After Path Blend Replace Spine" //Object:Blend:Replace Spine -#define kAIPathBlendReverseSpineCommandPreNotifierStr "AI Command Notifier: Before Path Blend Reverse Spine" //Object:Blend:Reverse Spine -#define kAIPathBlendReverseSpineCommandPostNotifierStr "AI Command Notifier: After Path Blend Reverse Spine" //Object:Blend:Reverse Spine -#define kAIPathBlendReverseStackCommandPreNotifierStr "AI Command Notifier: Before Path Blend Reverse Stack" //Object:Blend:Reverse Front to Back -#define kAIPathBlendReverseStackCommandPostNotifierStr "AI Command Notifier: After Path Blend Reverse Stack" //Object:Blend:Reverse Front to Back -#define kAIMakeWarpCommandPreNotifierStr "AI Command Notifier: Before Make Warp" //Object:Envelope Distort:Make with Warp -#define kAIMakeWarpCommandPostNotifierStr "AI Command Notifier: After Make Warp" //Object:Envelope Distort:Make with Warp -#define kAICreateEnvelopeGridCommandPreNotifierStr "AI Command Notifier: Before Create Envelope Grid" //Object:Envelope Distort:Make with Mesh -#define kAICreateEnvelopeGridCommandPostNotifierStr "AI Command Notifier: After Create Envelope Grid" //Object:Envelope Distort:Make with Mesh -#define kAIMakeEnvelopeCommandPreNotifierStr "AI Command Notifier: Before Make Envelope" //Object:Envelope Distort:Make with Top Object -#define kAIMakeEnvelopeCommandPostNotifierStr "AI Command Notifier: After Make Envelope" //Object:Envelope Distort:Make with Top Object -#define kAIReleaseEnvelopeCommandPreNotifierStr "AI Command Notifier: Before Release Envelope" //Object:Envelope Distort:Release -#define kAIReleaseEnvelopeCommandPostNotifierStr "AI Command Notifier: After Release Envelope" //Object:Envelope Distort:Release -#define kAIEnvelopeOptionsCommandPreNotifierStr "AI Command Notifier: Before Envelope Options" //Object:Envelope Distort:Envelope Options -#define kAIEnvelopeOptionsCommandPostNotifierStr "AI Command Notifier: After Envelope Options" //Object:Envelope Distort:Envelope Options -#define kAIExpandEnvelopeCommandPreNotifierStr "AI Command Notifier: Before Expand Envelope" //Object:Envelope Distort:Expand -#define kAIExpandEnvelopeCommandPostNotifierStr "AI Command Notifier: After Expand Envelope" //Object:Envelope Distort:Expand -#define kAIEditEnvelopeContentsCommandPreNotifierStr "AI Command Notifier: Before Edit Envelope Contents" //Object:Envelope Distort:Edit Contents -#define kAIEditEnvelopeContentsCommandPostNotifierStr "AI Command Notifier: After Edit Envelope Contents" //Object:Envelope Distort:Edit Contents -#define kAIAttachToActivePlaneCommandPreNotifierStr "AI Command Notifier: Before Attach to Active Plane" //Object:Perspective:Attach to Active Plane -#define kAIAttachToActivePlaneCommandPostNotifierStr "AI Command Notifier: After Attach to Active Plane" //Object:Perspective:Attach to Active Plane -#define kAIReleaseWithPerspectiveCommandPreNotifierStr "AI Command Notifier: Before Release with Perspective" //Object:Perspective:Release with Perspective -#define kAIReleaseWithPerspectiveCommandPostNotifierStr "AI Command Notifier: After Release with Perspective" //Object:Perspective:Release with Perspective -#define kAIShowObjectGridPlaneCommandPreNotifierStr "AI Command Notifier: Before Show Object Grid Plane" //Object:Perspective:Move Plane to Match Object -#define kAIShowObjectGridPlaneCommandPostNotifierStr "AI Command Notifier: After Show Object Grid Plane" //Object:Perspective:Move Plane to Match Object -#define kAIEditOriginalObjectCommandPreNotifierStr "AI Command Notifier: Before Edit Original Object" //Object:Perspective:Edit Text -#define kAIEditOriginalObjectCommandPostNotifierStr "AI Command Notifier: After Edit Original Object" //Object:Perspective:Edit Text -#define kAIMakePlanetXCommandPreNotifierStr "AI Command Notifier: Before Make Planet X" //Object:Live Paint:Make -#define kAIMakePlanetXCommandPostNotifierStr "AI Command Notifier: After Make Planet X" //Object:Live Paint:Make -#define kAIMargePlanetXCommandPreNotifierStr "AI Command Notifier: Before Marge Planet X" //Object:Live Paint:Merge -#define kAIMargePlanetXCommandPostNotifierStr "AI Command Notifier: After Marge Planet X" //Object:Live Paint:Merge -#define kAIReleasePlanetXCommandPreNotifierStr "AI Command Notifier: Before Release Planet X" //Object:Live Paint:Release -#define kAIReleasePlanetXCommandPostNotifierStr "AI Command Notifier: After Release Planet X" //Object:Live Paint:Release -#define kAIPlanetXOptionsCommandPreNotifierStr "AI Command Notifier: Before Planet X Options" //Object:Live Paint:Gap Options -#define kAIPlanetXOptionsCommandPostNotifierStr "AI Command Notifier: After Planet X Options" //Object:Live Paint:Gap Options -#define kAIExpandPlanetXCommandPreNotifierStr "AI Command Notifier: Before Expand Planet X" //Object:Live Paint:Expand -#define kAIExpandPlanetXCommandPostNotifierStr "AI Command Notifier: After Expand Planet X" //Object:Live Paint:Expand -#define kAIMakeTracingCommandPreNotifierStr "AI Command Notifier: Before Make Tracing" //Object:Live Trace:Make -#define kAIMakeTracingCommandPostNotifierStr "AI Command Notifier: After Make Tracing" //Object:Live Trace:Make -#define kAIMakeAndExpandCommandPreNotifierStr "AI Command Notifier: Before Make and Expand" //Object:Live Trace:Make and Expand -#define kAIMakeAndExpandCommandPostNotifierStr "AI Command Notifier: After Make and Expand" //Object:Live Trace:Make and Expand -#define kAIMakeAndConvertToLivePaintCommandPreNotifierStr "AI Command Notifier: Before Make and Convert to Live Paint" //Object:Live Trace:Make and Convert to Live Paint -#define kAIMakeAndConvertToLivePaintCommandPostNotifierStr "AI Command Notifier: After Make and Convert to Live Paint" //Object:Live Trace:Make and Convert to Live Paint -#define kAIReleaseTracingCommandPreNotifierStr "AI Command Notifier: Before Release Tracing" //Object:Live Trace:Release -#define kAIReleaseTracingCommandPostNotifierStr "AI Command Notifier: After Release Tracing" //Object:Live Trace:Release -#define kAITracingOptionsCommandPreNotifierStr "AI Command Notifier: Before Tracing Options" //Object:Live Trace:Tracing Options -#define kAITracingOptionsCommandPostNotifierStr "AI Command Notifier: After Tracing Options" //Object:Live Trace:Tracing Options -#define kAIExpandTracingCommandPreNotifierStr "AI Command Notifier: Before Expand Tracing" //Object:Live Trace:Expand -#define kAIExpandTracingCommandPostNotifierStr "AI Command Notifier: After Expand Tracing" //Object:Live Trace:Expand -#define kAIExpandAsViewedCommandPreNotifierStr "AI Command Notifier: Before Expand as Viewed" //Object:Live Trace:Expand as Viewed -#define kAIExpandAsViewedCommandPostNotifierStr "AI Command Notifier: After Expand as Viewed" //Object:Live Trace:Expand as Viewed -#define kAIPaintTracingCommandPreNotifierStr "AI Command Notifier: Before Paint Tracing" //Object:Live Trace:Convert to Live Paint -#define kAIPaintTracingCommandPostNotifierStr "AI Command Notifier: After Paint Tracing" //Object:Live Trace:Convert to Live Paint -#define kAIShowNoImageCommandPreNotifierStr "AI Command Notifier: Before ShowNoImage" //Object:Live Trace:Show No Image -#define kAIShowNoImageCommandPostNotifierStr "AI Command Notifier: After ShowNoImage" //Object:Live Trace:Show No Image -#define kAIShowOriginalImageCommandPreNotifierStr "AI Command Notifier: Before ShowOriginalImage" //Object:Live Trace:Show Original Image -#define kAIShowOriginalImageCommandPostNotifierStr "AI Command Notifier: After ShowOriginalImage" //Object:Live Trace:Show Original Image -#define kAIShowPreprocessedImageCommandPreNotifierStr "AI Command Notifier: Before Show Preprocessed Image" //Object:Live Trace:Show Adjusted Image -#define kAIShowPreprocessedImageCommandPostNotifierStr "AI Command Notifier: After Show Preprocessed Image" //Object:Live Trace:Show Adjusted Image -#define kAIShowTransparentImageCommandPreNotifierStr "AI Command Notifier: Before ShowTransparentImage" //Object:Live Trace:Show Transparent Image -#define kAIShowTransparentImageCommandPostNotifierStr "AI Command Notifier: After ShowTransparentImage" //Object:Live Trace:Show Transparent Image -#define kAIShowNoArtworkCommandPreNotifierStr "AI Command Notifier: Before ShowNoArtwork" //Object:Live Trace:Show No Tracing Result -#define kAIShowNoArtworkCommandPostNotifierStr "AI Command Notifier: After ShowNoArtwork" //Object:Live Trace:Show No Tracing Result -#define kAIShowArtworkCommandPreNotifierStr "AI Command Notifier: Before ShowArtwork" //Object:Live Trace:Show Tracing Result -#define kAIShowArtworkCommandPostNotifierStr "AI Command Notifier: After ShowArtwork" //Object:Live Trace:Show Tracing Result -#define kAIShowPathsCommandPreNotifierStr "AI Command Notifier: Before ShowPaths" //Object:Live Trace:Show Outlines -#define kAIShowPathsCommandPostNotifierStr "AI Command Notifier: After ShowPaths" //Object:Live Trace:Show Outlines -#define kAIShowPathsAndTransparentArtworkCommandPreNotifierStr "AI Command Notifier: Before ShowPathsAndTransparentArtwork" //Object:Live Trace:Show Outlines with Tracing -#define kAIShowPathsAndTransparentArtworkCommandPostNotifierStr "AI Command Notifier: After ShowPathsAndTransparentArtwork" //Object:Live Trace:Show Outlines with Tracing -#define kAIMakeTextWrapCommandPreNotifierStr "AI Command Notifier: Before Make Text Wrap" //Object:Text Wrap:Make -#define kAIMakeTextWrapCommandPostNotifierStr "AI Command Notifier: After Make Text Wrap" //Object:Text Wrap:Make -#define kAIReleaseTextWrapCommandPreNotifierStr "AI Command Notifier: Before Release Text Wrap" //Object:Text Wrap:Release -#define kAIReleaseTextWrapCommandPostNotifierStr "AI Command Notifier: After Release Text Wrap" //Object:Text Wrap:Release -#define kAITextWrapOptionsCommandPreNotifierStr "AI Command Notifier: Before Text Wrap Options..." //Object:Text Wrap:Text Wrap Options -#define kAITextWrapOptionsCommandPostNotifierStr "AI Command Notifier: After Text Wrap Options..." //Object:Text Wrap:Text Wrap Options -#define kAIMakeMaskCommandPreNotifierStr "AI Command Notifier: Before Make Mask" //Object:Clipping Mask:Make -#define kAIMakeMaskCommandPostNotifierStr "AI Command Notifier: After Make Mask" //Object:Clipping Mask:Make -#define kAIReleaseMaskCommandPreNotifierStr "AI Command Notifier: Before Release Mask" //Object:Clipping Mask:Release -#define kAIReleaseMaskCommandPostNotifierStr "AI Command Notifier: After Release Mask" //Object:Clipping Mask:Release -#define kAIEditMaskCommandPreNotifierStr "AI Command Notifier: Before Edit Mask" //Object:Clipping Mask:Edit Contents -#define kAIEditMaskCommandPostNotifierStr "AI Command Notifier: After Edit Mask" //Object:Clipping Mask:Edit Contents -#define kAIMakeCompoundPathCommandPreNotifierStr "AI Command Notifier: Before Make Compound Path" //Object:Compound Path:Make -#define kAIMakeCompoundPathCommandPostNotifierStr "AI Command Notifier: After Make Compound Path" //Object:Compound Path:Make -#define kAIReleaseCompoundPathCommandPreNotifierStr "AI Command Notifier: Before Release Compound Path" //Object:Compound Path:Release -#define kAIReleaseCompoundPathCommandPostNotifierStr "AI Command Notifier: After Release Compound Path" //Object:Compound Path:Release -#define kAIMakeCropMarksCommandPreNotifierStr "AI Command Notifier: Before Make Crop Marks" //Object:Artboards:Convert to Artboards -#define kAIMakeCropMarksCommandPostNotifierStr "AI Command Notifier: After Make Crop Marks" //Object:Artboards:Convert to Artboards -#define kAIReArrangeArtboardsCommandPreNotifierStr "AI Command Notifier: Before ReArrange Artboards" //Object:Artboards:Rearrange -#define kAIReArrangeArtboardsCommandPostNotifierStr "AI Command Notifier: After ReArrange Artboards" //Object:Artboards:Rearrange -#define kAIFitArtboardToArtworkBoundsCommandPreNotifierStr "AI Command Notifier: Before Fit Artboard to artwork bounds" //Object:Artboards:Fit to Artwork Bounds -#define kAIFitArtboardToArtworkBoundsCommandPostNotifierStr "AI Command Notifier: After Fit Artboard to artwork bounds" //Object:Artboards:Fit to Artwork Bounds -#define kAIFitArtboardToSelectedArtCommandPreNotifierStr "AI Command Notifier: Before Fit Artboard to selected Art" //Object:Artboards:Fit to Selected Art -#define kAIFitArtboardToSelectedArtCommandPostNotifierStr "AI Command Notifier: After Fit Artboard to selected Art" //Object:Artboards:Fit to Selected Art -#define kAISetGraphStyleCommandPreNotifierStr "AI Command Notifier: Before Set Graph Style" //Object:Graph:Type -#define kAISetGraphStyleCommandPostNotifierStr "AI Command Notifier: After Set Graph Style" //Object:Graph:Type -#define kAIEditGraphDataCommandPreNotifierStr "AI Command Notifier: Before Edit Graph Data" //Object:Graph:Data -#define kAIEditGraphDataCommandPostNotifierStr "AI Command Notifier: After Edit Graph Data" //Object:Graph:Data -#define kAIDefineGraphDesignCommandPreNotifierStr "AI Command Notifier: Before Define Graph Design" //Object:Graph:Design -#define kAIDefineGraphDesignCommandPostNotifierStr "AI Command Notifier: After Define Graph Design" //Object:Graph:Design -#define kAISetBarDesignCommandPreNotifierStr "AI Command Notifier: Before Set Bar Design" //Object:Graph:Column -#define kAISetBarDesignCommandPostNotifierStr "AI Command Notifier: After Set Bar Design" //Object:Graph:Column -#define kAISetIconDesignCommandPreNotifierStr "AI Command Notifier: Before Set Icon Design" //Object:Graph:Marker -#define kAISetIconDesignCommandPostNotifierStr "AI Command Notifier: After Set Icon Design" //Object:Graph:Marker -#define kAIAlternateGlyphPalettePluginCommandPreNotifierStr "AI Command Notifier: Before alternate glyph palette plugin" //Type:Glyphs -#define kAIAlternateGlyphPalettePluginCommandPostNotifierStr "AI Command Notifier: After alternate glyph palette plugin" //Type:Glyphs -#define kAIAreaTextOptionsCommandPreNotifierStr "AI Command Notifier: Before Area Text Options" //Type:Area Type Options -#define kAIAreaTextOptionsCommandPostNotifierStr "AI Command Notifier: After Area Text Options" //Type:Area Type Options -#define kAITextPathTypeRainbowCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Rainbow" //Type:Type on a Path:Rainbow -#define kAITextPathTypeRainbowCommandPostNotifierStr "AI Command Notifier: After Text Path Type Rainbow" //Type:Type on a Path:Rainbow -#define kAITextPathTypeSkewCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Skew" //Type:Type on a Path:Skew -#define kAITextPathTypeSkewCommandPostNotifierStr "AI Command Notifier: After Text Path Type Skew" //Type:Type on a Path:Skew -#define kAITextPathType3dCommandPreNotifierStr "AI Command Notifier: Before Text Path Type 3d" //Type:Type on a Path:3D Ribbon -#define kAITextPathType3dCommandPostNotifierStr "AI Command Notifier: After Text Path Type 3d" //Type:Type on a Path:3D Ribbon -#define kAITextPathTypeStairsCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Stairs" //Type:Type on a Path:Stair Step -#define kAITextPathTypeStairsCommandPostNotifierStr "AI Command Notifier: After Text Path Type Stairs" //Type:Type on a Path:Stair Step -#define kAITextPathTypeGravityCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Gravity" //Type:Type on a Path:Gravity -#define kAITextPathTypeGravityCommandPostNotifierStr "AI Command Notifier: After Text Path Type Gravity" //Type:Type on a Path:Gravity -#define kAITextPathTypeOptionsCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Options" //Type:Type on a Path:Type on a Path Options -#define kAITextPathTypeOptionsCommandPostNotifierStr "AI Command Notifier: After Text Path Type Options" //Type:Type on a Path:Type on a Path Options -#define kAIUpdateSelectedTypeOnPathCommandPreNotifierStr "AI Command Notifier: Before Update Selected Type On Path" //Type:Type on a Path:Update Legacy Type on a Path -#define kAIUpdateSelectedTypeOnPathCommandPostNotifierStr "AI Command Notifier: After Update Selected Type On Path" //Type:Type on a Path:Update Legacy Type on a Path -#define kAICreateThreadedTextCommandPreNotifierStr "AI Command Notifier: Before Create Threaded Text" //Type:Threaded Text:Create -#define kAICreateThreadedTextCommandPostNotifierStr "AI Command Notifier: After Create Threaded Text" //Type:Threaded Text:Create -#define kAIReleaseThreadedTextSelectionCommandPreNotifierStr "AI Command Notifier: Before Release Threaded Text Selection" //Type:Threaded Text:Release Selection -#define kAIReleaseThreadedTextSelectionCommandPostNotifierStr "AI Command Notifier: After Release Threaded Text Selection" //Type:Threaded Text:Release Selection -#define kAIRemoveThreadingCommandPreNotifierStr "AI Command Notifier: Before Remove Threading" //Type:Threaded Text:Remove Threading -#define kAIRemoveThreadingCommandPostNotifierStr "AI Command Notifier: After Remove Threading" //Type:Threaded Text:Remove Threading -#define kAIAdobeInternalCompositeFontPluginCommandPreNotifierStr "AI Command Notifier: Before Adobe internal composite font plugin" //Type:Composite Fonts -#define kAIAdobeInternalCompositeFontPluginCommandPostNotifierStr "AI Command Notifier: After Adobe internal composite font plugin" //Type:Composite Fonts -#define kAIAdobeKinsokuSettingsCommandPreNotifierStr "AI Command Notifier: Before Adobe Kinsoku Settings" //Type:Kinsoku Shori Settings -#define kAIAdobeKinsokuSettingsCommandPostNotifierStr "AI Command Notifier: After Adobe Kinsoku Settings" //Type:Kinsoku Shori Settings -#define kAIAdobeMojiKumiSettingsCommandPreNotifierStr "AI Command Notifier: Before Adobe MojiKumi Settings" //Type:Mojikumi Settings -#define kAIAdobeMojiKumiSettingsCommandPostNotifierStr "AI Command Notifier: After Adobe MojiKumi Settings" //Type:Mojikumi Settings -#define kAIFitHeadlineCommandPreNotifierStr "AI Command Notifier: Before Fit Headline" //Type:Fit Headline -#define kAIFitHeadlineCommandPostNotifierStr "AI Command Notifier: After Fit Headline" //Type:Fit Headline -#define kAITypeOutlinesCommandPreNotifierStr "AI Command Notifier: Before Type Outlines" //Type:Create Outlines -#define kAITypeOutlinesCommandPostNotifierStr "AI Command Notifier: After Type Outlines" //Type:Create Outlines -#define kAIAdobeIllustratorFindFontMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Illustrator Find Font Menu Item" //Type:Find Font -#define kAIAdobeIllustratorFindFontMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Illustrator Find Font Menu Item" //Type:Find Font -#define kAIUpperCaseChangeCaseItemCommandPreNotifierStr "AI Command Notifier: Before UpperCase Change Case Item" //Type:Change Case:UPPERCASE -#define kAIUpperCaseChangeCaseItemCommandPostNotifierStr "AI Command Notifier: After UpperCase Change Case Item" //Type:Change Case:UPPERCASE -#define kAILowerCaseChangeCaseItemCommandPreNotifierStr "AI Command Notifier: Before LowerCase Change Case Item" //Type:Change Case:lowercase -#define kAILowerCaseChangeCaseItemCommandPostNotifierStr "AI Command Notifier: After LowerCase Change Case Item" //Type:Change Case:lowercase -#define kAITitleCaseChangeCaseItemCommandPreNotifierStr "AI Command Notifier: Before Title Case Change Case Item" //Type:Change Case:Title Case -#define kAITitleCaseChangeCaseItemCommandPostNotifierStr "AI Command Notifier: After Title Case Change Case Item" //Type:Change Case:Title Case -#define kAISentenceCaseChangeCaseItemCommandPreNotifierStr "AI Command Notifier: Before Sentence case Change Case Item" //Type:Change Case:Sentence case -#define kAISentenceCaseChangeCaseItemCommandPostNotifierStr "AI Command Notifier: After Sentence case Change Case Item" //Type:Change Case:Sentence case -#define kAIAdobeIllustratorSmartPunctuationMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Illustrator Smart Punctuation Menu Item" //Type:Smart Punctuation -#define kAIAdobeIllustratorSmartPunctuationMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Illustrator Smart Punctuation Menu Item" //Type:Smart Punctuation -#define kAIAdobeOpticalAlignmentItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Optical Alignment Item" //Type:Optical Margin Alignment -#define kAIAdobeOpticalAlignmentItemCommandPostNotifierStr "AI Command Notifier: After Adobe Optical Alignment Item" //Type:Optical Margin Alignment -#define kAIShowHiddenCharactersCommandPreNotifierStr "AI Command Notifier: Before Show Hidden Characters" //Type:Show Hidden Characters -#define kAIShowHiddenCharactersCommandPostNotifierStr "AI Command Notifier: After Show Hidden Characters" //Type:Show Hidden Characters -#define kAITypeOrientationHorizontalCommandPreNotifierStr "AI Command Notifier: Before Type Orientation Horizontal" //Type:Type Orientation:Horizontal -#define kAITypeOrientationHorizontalCommandPostNotifierStr "AI Command Notifier: After Type Orientation Horizontal" //Type:Type Orientation:Horizontal -#define kAITypeOrientationVerticalCommandPreNotifierStr "AI Command Notifier: Before Type Orientation Vertical" //Type:Type Orientation:Vertical -#define kAITypeOrientationVerticalCommandPostNotifierStr "AI Command Notifier: After Type Orientation Vertical" //Type:Type Orientation:Vertical -#define kAIConvertToNativeTextCommandPreNotifierStr "AI Command Notifier: Before Convert To Native Text" //Type:Legacy Text:Update All Legacy Text -#define kAIConvertToNativeTextCommandPostNotifierStr "AI Command Notifier: After Convert To Native Text" //Type:Legacy Text:Update All Legacy Text -#define kAIConvertSelectedTextToNativeTextCommandPreNotifierStr "AI Command Notifier: Before Convert Selected Text To Native Text" //Type:Legacy Text:Update Selected Legacy Text -#define kAIConvertSelectedTextToNativeTextCommandPostNotifierStr "AI Command Notifier: After Convert Selected Text To Native Text" //Type:Legacy Text:Update Selected Legacy Text -#define kAIShowHideLegacyTextCopiesCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Legacy Text Copies" //Type:Legacy Text:Hide Copies -#define kAIShowHideLegacyTextCopiesCommandPostNotifierStr "AI Command Notifier: After Show/Hide Legacy Text Copies" //Type:Legacy Text:Hide Copies -#define kAIDeleteLegacyTextCopiesCommandPreNotifierStr "AI Command Notifier: Before Delete Legacy Text Copies" //Type:Legacy Text:Delete Copies -#define kAIDeleteLegacyTextCopiesCommandPostNotifierStr "AI Command Notifier: After Delete Legacy Text Copies" //Type:Legacy Text:Delete Copies -#define kAISelectLegacyTextCopiesCommandPreNotifierStr "AI Command Notifier: Before Select Legacy Text Copies" //Type:Legacy Text:Select Copies -#define kAISelectLegacyTextCopiesCommandPostNotifierStr "AI Command Notifier: After Select Legacy Text Copies" //Type:Legacy Text:Select Copies -#define kAISelectAllCommandPreNotifierStr "AI Command Notifier: Before Select All" //Select:All -#define kAISelectAllCommandPostNotifierStr "AI Command Notifier: After Select All" //Select:All -#define kAISelectAllInArtboardCommandPreNotifierStr "AI Command Notifier: Before Select All In Artboard" //Select:All on Active Artboard -#define kAISelectAllInArtboardCommandPostNotifierStr "AI Command Notifier: After Select All In Artboard" //Select:All on Active Artboard -#define kAIDeselectAllCommandPreNotifierStr "AI Command Notifier: Before Deselect All" //Select:Deselect -#define kAIDeselectAllCommandPostNotifierStr "AI Command Notifier: After Deselect All" //Select:Deselect -#define kAIFindReselectMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Reselect menu item" //Select:Reselect -#define kAIFindReselectMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Reselect menu item" //Select:Reselect -#define kAIInverseMenuItemCommandPreNotifierStr "AI Command Notifier: Before Inverse menu item" //Select:Inverse -#define kAIInverseMenuItemCommandPostNotifierStr "AI Command Notifier: After Inverse menu item" //Select:Inverse -#define kAISelectionHat8CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 8" //Select:Next Object Above -#define kAISelectionHat8CommandPostNotifierStr "AI Command Notifier: After Selection Hat 8" //Select:Next Object Above -#define kAISelectionHat9CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 9" //Select:Next Object Below -#define kAISelectionHat9CommandPostNotifierStr "AI Command Notifier: After Selection Hat 9" //Select:Next Object Below -#define kAIFindAppearanceMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Appearance menu item" //Select:Same:Appearance -#define kAIFindAppearanceMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Appearance menu item" //Select:Same:Appearance -#define kAIFindAppearanceAttributesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Appearance Attributes menu item" //Select:Same:Appearance Attribute -#define kAIFindAppearanceAttributesMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Appearance Attributes menu item" //Select:Same:Appearance Attribute -#define kAIFindBlendingModeMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Blending Mode menu item" //Select:Same:Blending Mode -#define kAIFindBlendingModeMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Blending Mode menu item" //Select:Same:Blending Mode -#define kAIFindFillStrokeMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Fill & Stroke menu item" //Select:Same:Fill & Stroke -#define kAIFindFillStrokeMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Fill & Stroke menu item" //Select:Same:Fill & Stroke -#define kAIFindFillColorMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Fill Color menu item" //Select:Same:Fill Color -#define kAIFindFillColorMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Fill Color menu item" //Select:Same:Fill Color -#define kAIFindOpacityMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Opacity menu item" //Select:Same:Opacity -#define kAIFindOpacityMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Opacity menu item" //Select:Same:Opacity -#define kAIFindStrokeColorMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Stroke Color menu item" //Select:Same:Stroke Color -#define kAIFindStrokeColorMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Stroke Color menu item" //Select:Same:Stroke Color -#define kAIFindStrokeWeightMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Stroke Weight menu item" //Select:Same:Stroke Weight -#define kAIFindStrokeWeightMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Stroke Weight menu item" //Select:Same:Stroke Weight -#define kAIFindStyleMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Style menu item" //Select:Same:Graphic Style -#define kAIFindStyleMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Style menu item" //Select:Same:Graphic Style -#define kAIFindSymbolInstanceMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Symbol Instance menu item" //Select:Same:Symbol Instance -#define kAIFindSymbolInstanceMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Symbol Instance menu item" //Select:Same:Symbol Instance -#define kAIFindLinkBlockSeriesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Link Block Series menu item" //Select:Same:Link Block Series -#define kAIFindLinkBlockSeriesMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Link Block Series menu item" //Select:Same:Link Block Series -#define kAISelectionHat3CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 3" //Select:Object:All on Same Layers -#define kAISelectionHat3CommandPostNotifierStr "AI Command Notifier: After Selection Hat 3" //Select:Object:All on Same Layers -#define kAISelectionHat1CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 1" //Select:Object:Direction Handles -#define kAISelectionHat1CommandPostNotifierStr "AI Command Notifier: After Selection Hat 1" //Select:Object:Direction Handles -#define kAISelectionHat12CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 12" //Select:Object:Not Aligned to Pixel Grid -#define kAISelectionHat12CommandPostNotifierStr "AI Command Notifier: After Selection Hat 12" //Select:Object:Not Aligned to Pixel Grid -#define kAIBristleBrushStrokesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Bristle Brush Strokes menu item" //Select:Object:Bristle Brush Strokes -#define kAIBristleBrushStrokesMenuItemCommandPostNotifierStr "AI Command Notifier: After Bristle Brush Strokes menu item" //Select:Object:Bristle Brush Strokes -#define kAIBrushStrokesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Brush Strokes menu item" //Select:Object:Brush Strokes -#define kAIBrushStrokesMenuItemCommandPostNotifierStr "AI Command Notifier: After Brush Strokes menu item" //Select:Object:Brush Strokes -#define kAIClippingMasksMenuItemCommandPreNotifierStr "AI Command Notifier: Before Clipping Masks menu item" //Select:Object:Clipping Masks -#define kAIClippingMasksMenuItemCommandPostNotifierStr "AI Command Notifier: After Clipping Masks menu item" //Select:Object:Clipping Masks -#define kAIStrayPointsMenuItemCommandPreNotifierStr "AI Command Notifier: Before Stray Points menu item" //Select:Object:Stray Points -#define kAIStrayPointsMenuItemCommandPostNotifierStr "AI Command Notifier: After Stray Points menu item" //Select:Object:Stray Points -#define kAITextObjectsMenuItemCommandPreNotifierStr "AI Command Notifier: Before Text Objects menu item" //Select:Object:Text Objects -#define kAITextObjectsMenuItemCommandPostNotifierStr "AI Command Notifier: After Text Objects menu item" //Select:Object:Text Objects -#define kAIDynamicTextCommandPreNotifierStr "AI Command Notifier: Before Dynamic Text" //Select:Object:Flash Dynamic Text -#define kAIDynamicTextCommandPostNotifierStr "AI Command Notifier: After Dynamic Text" //Select:Object:Flash Dynamic Text -#define kAIInputTextCommandPreNotifierStr "AI Command Notifier: Before Input Text" //Select:Object:Flash Input Text -#define kAIInputTextCommandPostNotifierStr "AI Command Notifier: After Input Text" //Select:Object:Flash Input Text -#define kAISelectionHat10CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 10" //Select:Save Selection -#define kAISelectionHat10CommandPostNotifierStr "AI Command Notifier: After Selection Hat 10" //Select:Save Selection -#define kAISelectionHat11CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 11" //Select:Edit Selection -#define kAISelectionHat11CommandPostNotifierStr "AI Command Notifier: After Selection Hat 11" //Select:Edit Selection -#define kAIAdobeApplyLastEffectCommandPreNotifierStr "AI Command Notifier: Before Adobe Apply Last Effect" //Effect:Apply Last Effect -#define kAIAdobeApplyLastEffectCommandPostNotifierStr "AI Command Notifier: After Adobe Apply Last Effect" //Effect:Apply Last Effect -#define kAIAdobeLastEffectCommandPreNotifierStr "AI Command Notifier: Before Adobe Last Effect" //Effect:Last Effect -#define kAIAdobeLastEffectCommandPostNotifierStr "AI Command Notifier: After Adobe Last Effect" //Effect:Last Effect -#define kAILiveRasterizeEffectSettingCommandPreNotifierStr "AI Command Notifier: Before Live Rasterize Effect Setting" //Effect:Document Raster Effects Settings -#define kAILiveRasterizeEffectSettingCommandPostNotifierStr "AI Command Notifier: After Live Rasterize Effect Setting" //Effect:Document Raster Effects Settings -#define kAILive3DExtrudeCommandPreNotifierStr "AI Command Notifier: Before Live 3DExtrude" //Effect:3D:Extrude & Bevel -#define kAILive3DExtrudeCommandPostNotifierStr "AI Command Notifier: After Live 3DExtrude" //Effect:3D:Extrude & Bevel -#define kAILive3DRevolveCommandPreNotifierStr "AI Command Notifier: Before Live 3DRevolve" //Effect:3D:Revolve -#define kAILive3DRevolveCommandPostNotifierStr "AI Command Notifier: After Live 3DRevolve" //Effect:3D:Revolve -#define kAILive3DRotateCommandPreNotifierStr "AI Command Notifier: Before Live 3DRotate" //Effect:3D:Rotate -#define kAILive3DRotateCommandPostNotifierStr "AI Command Notifier: After Live 3DRotate" //Effect:3D:Rotate -#define kAILiveRectangleCommandPreNotifierStr "AI Command Notifier: Before Live Rectangle" //Effect:Convert to Shape:Rectangle -#define kAILiveRectangleCommandPostNotifierStr "AI Command Notifier: After Live Rectangle" //Effect:Convert to Shape:Rectangle -#define kAILiveRoundedRectangleCommandPreNotifierStr "AI Command Notifier: Before Live Rounded Rectangle" //Effect:Convert to Shape:Rounded Rectangle -#define kAILiveRoundedRectangleCommandPostNotifierStr "AI Command Notifier: After Live Rounded Rectangle" //Effect:Convert to Shape:Rounded Rectangle -#define kAILiveEllipseCommandPreNotifierStr "AI Command Notifier: Before Live Ellipse" //Effect:Convert to Shape:Ellipse -#define kAILiveEllipseCommandPostNotifierStr "AI Command Notifier: After Live Ellipse" //Effect:Convert to Shape:Ellipse -#define kAILiveTrimMarksCommandPreNotifierStr "AI Command Notifier: Before Live Trim Marks" //Effect:Crop Marks -#define kAILiveTrimMarksCommandPostNotifierStr "AI Command Notifier: After Live Trim Marks" //Effect:Crop Marks -#define kAILiveFreeDistortCommandPreNotifierStr "AI Command Notifier: Before Live Free Distort" //Effect:Distort & Transform:Free Distort -#define kAILiveFreeDistortCommandPostNotifierStr "AI Command Notifier: After Live Free Distort" //Effect:Distort & Transform:Free Distort -#define kAILivePuckerBloatCommandPreNotifierStr "AI Command Notifier: Before Live Pucker & Bloat" //Effect:Distort & Transform:Pucker & Bloat -#define kAILivePuckerBloatCommandPostNotifierStr "AI Command Notifier: After Live Pucker & Bloat" //Effect:Distort & Transform:Pucker & Bloat -#define kAILiveRoughenCommandPreNotifierStr "AI Command Notifier: Before Live Roughen" //Effect:Distort & Transform:Roughen -#define kAILiveRoughenCommandPostNotifierStr "AI Command Notifier: After Live Roughen" //Effect:Distort & Transform:Roughen -#define kAILiveTransformCommandPreNotifierStr "AI Command Notifier: Before Live Transform" //Effect:Distort & Transform:Transform -#define kAILiveTransformCommandPostNotifierStr "AI Command Notifier: After Live Transform" //Effect:Distort & Transform:Transform -#define kAILiveScribbleAndTweakCommandPreNotifierStr "AI Command Notifier: Before Live Scribble and Tweak" //Effect:Distort & Transform:Tweak -#define kAILiveScribbleAndTweakCommandPostNotifierStr "AI Command Notifier: After Live Scribble and Tweak" //Effect:Distort & Transform:Tweak -#define kAILiveTwistCommandPreNotifierStr "AI Command Notifier: Before Live Twist" //Effect:Distort & Transform:Twist -#define kAILiveTwistCommandPostNotifierStr "AI Command Notifier: After Live Twist" //Effect:Distort & Transform:Twist -#define kAILiveZigZagCommandPreNotifierStr "AI Command Notifier: Before Live Zig Zag" //Effect:Distort & Transform:Zig Zag -#define kAILiveZigZagCommandPostNotifierStr "AI Command Notifier: After Live Zig Zag" //Effect:Distort & Transform:Zig Zag -#define kAILiveOffsetPathCommandPreNotifierStr "AI Command Notifier: Before Live Offset Path" //Effect:Path:Offset Path -#define kAILiveOffsetPathCommandPostNotifierStr "AI Command Notifier: After Live Offset Path" //Effect:Path:Offset Path -#define kAILiveOutlineObjectCommandPreNotifierStr "AI Command Notifier: Before Live Outline Object" //Effect:Path:Outline Object -#define kAILiveOutlineObjectCommandPostNotifierStr "AI Command Notifier: After Live Outline Object" //Effect:Path:Outline Object -#define kAILiveOutlineStrokeCommandPreNotifierStr "AI Command Notifier: Before Live Outline Stroke" //Effect:Path:Outline Stroke -#define kAILiveOutlineStrokeCommandPostNotifierStr "AI Command Notifier: After Live Outline Stroke" //Effect:Path:Outline Stroke -#define kAILivePathfinderAddCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Add" //Effect:Pathfinder:Add -#define kAILivePathfinderAddCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Add" //Effect:Pathfinder:Add -#define kAILivePathfinderIntersectCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Intersect" //Effect:Pathfinder:Intersect -#define kAILivePathfinderIntersectCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Intersect" //Effect:Pathfinder:Intersect -#define kAILivePathfinderExcludeCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Exclude" //Effect:Pathfinder:Exclude -#define kAILivePathfinderExcludeCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Exclude" //Effect:Pathfinder:Exclude -#define kAILivePathfinderSubtractCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Subtract" //Effect:Pathfinder:Subtract -#define kAILivePathfinderSubtractCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Subtract" //Effect:Pathfinder:Subtract -#define kAILivePathfinderMinusBackCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Minus Back" //Effect:Pathfinder:Minus Back -#define kAILivePathfinderMinusBackCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Minus Back" //Effect:Pathfinder:Minus Back -#define kAILivePathfinderDivideCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Divide" //Effect:Pathfinder:Divide -#define kAILivePathfinderDivideCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Divide" //Effect:Pathfinder:Divide -#define kAILivePathfinderTrimCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Trim" //Effect:Pathfinder:Trim -#define kAILivePathfinderTrimCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Trim" //Effect:Pathfinder:Trim -#define kAILivePathfinderMergeCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Merge" //Effect:Pathfinder:Merge -#define kAILivePathfinderMergeCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Merge" //Effect:Pathfinder:Merge -#define kAILivePathfinderCropCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Crop" //Effect:Pathfinder:Crop -#define kAILivePathfinderCropCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Crop" //Effect:Pathfinder:Crop -#define kAILivePathfinderOutlineCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Outline" //Effect:Pathfinder:Outline -#define kAILivePathfinderOutlineCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Outline" //Effect:Pathfinder:Outline -#define kAILivePathfinderHardMixCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Hard Mix" //Effect:Pathfinder:Hard Mix -#define kAILivePathfinderHardMixCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Hard Mix" //Effect:Pathfinder:Hard Mix -#define kAILivePathfinderSoftMixCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Soft Mix" //Effect:Pathfinder:Soft Mix -#define kAILivePathfinderSoftMixCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Soft Mix" //Effect:Pathfinder:Soft Mix -#define kAILivePathfinderTrapCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Trap" //Effect:Pathfinder:Trap -#define kAILivePathfinderTrapCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Trap" //Effect:Pathfinder:Trap -#define kAILiveRasterizeCommandPreNotifierStr "AI Command Notifier: Before Live Rasterize" //Effect:Rasterize -#define kAILiveRasterizeCommandPostNotifierStr "AI Command Notifier: After Live Rasterize" //Effect:Rasterize -#define kAILiveAdobeDropShadowCommandPreNotifierStr "AI Command Notifier: Before Live Adobe Drop Shadow" //Effect:Stylize:Drop Shadow -#define kAILiveAdobeDropShadowCommandPostNotifierStr "AI Command Notifier: After Live Adobe Drop Shadow" //Effect:Stylize:Drop Shadow -#define kAILiveFeatherCommandPreNotifierStr "AI Command Notifier: Before Live Feather" //Effect:Stylize:Feather -#define kAILiveFeatherCommandPostNotifierStr "AI Command Notifier: After Live Feather" //Effect:Stylize:Feather -#define kAILiveInnerGlowCommandPreNotifierStr "AI Command Notifier: Before Live Inner Glow" //Effect:Stylize:Inner Glow -#define kAILiveInnerGlowCommandPostNotifierStr "AI Command Notifier: After Live Inner Glow" //Effect:Stylize:Inner Glow -#define kAILiveOuterGlowCommandPreNotifierStr "AI Command Notifier: Before Live Outer Glow" //Effect:Stylize:Outer Glow -#define kAILiveOuterGlowCommandPostNotifierStr "AI Command Notifier: After Live Outer Glow" //Effect:Stylize:Outer Glow -#define kAILiveAdobeRoundCornersCommandPreNotifierStr "AI Command Notifier: Before Live Adobe Round Corners" //Effect:Stylize:Round Corners -#define kAILiveAdobeRoundCornersCommandPostNotifierStr "AI Command Notifier: After Live Adobe Round Corners" //Effect:Stylize:Round Corners -#define kAILiveScribbleFillCommandPreNotifierStr "AI Command Notifier: Before Live Scribble Fill" //Effect:Stylize:Scribble -#define kAILiveScribbleFillCommandPostNotifierStr "AI Command Notifier: After Live Scribble Fill" //Effect:Stylize:Scribble -#define kAILiveSVGFiltersCommandPreNotifierStr "AI Command Notifier: Before Live SVG Filters" //Effect:SVG Filters:Apply SVG Filter -#define kAILiveSVGFiltersCommandPostNotifierStr "AI Command Notifier: After Live SVG Filters" //Effect:SVG Filters:Apply SVG Filter -#define kAISVGFilterImportCommandPreNotifierStr "AI Command Notifier: Before SVG Filter Import" //Effect:SVG Filters:Import SVG Filter -#define kAISVGFilterImportCommandPostNotifierStr "AI Command Notifier: After SVG Filter Import" //Effect:SVG Filters:Import SVG Filter -#define kAILiveDeformArcCommandPreNotifierStr "AI Command Notifier: Before Live Deform Arc" //Effect:Warp:Arc -#define kAILiveDeformArcCommandPostNotifierStr "AI Command Notifier: After Live Deform Arc" //Effect:Warp:Arc -#define kAILiveDeformArcLowerCommandPreNotifierStr "AI Command Notifier: Before Live Deform Arc Lower" //Effect:Warp:Arc Lower -#define kAILiveDeformArcLowerCommandPostNotifierStr "AI Command Notifier: After Live Deform Arc Lower" //Effect:Warp:Arc Lower -#define kAILiveDeformArcUpperCommandPreNotifierStr "AI Command Notifier: Before Live Deform Arc Upper" //Effect:Warp:Arc Upper -#define kAILiveDeformArcUpperCommandPostNotifierStr "AI Command Notifier: After Live Deform Arc Upper" //Effect:Warp:Arc Upper -#define kAILiveDeformArchCommandPreNotifierStr "AI Command Notifier: Before Live Deform Arch" //Effect:Warp:Arch -#define kAILiveDeformArchCommandPostNotifierStr "AI Command Notifier: After Live Deform Arch" //Effect:Warp:Arch -#define kAILiveDeformBulgeCommandPreNotifierStr "AI Command Notifier: Before Live Deform Bulge" //Effect:Warp:Bulge -#define kAILiveDeformBulgeCommandPostNotifierStr "AI Command Notifier: After Live Deform Bulge" //Effect:Warp:Bulge -#define kAILiveDeformShellLowerCommandPreNotifierStr "AI Command Notifier: Before Live Deform Shell Lower" //Effect:Warp:Shell Lower -#define kAILiveDeformShellLowerCommandPostNotifierStr "AI Command Notifier: After Live Deform Shell Lower" //Effect:Warp:Shell Lower -#define kAILiveDeformShellUpperCommandPreNotifierStr "AI Command Notifier: Before Live Deform Shell Upper" //Effect:Warp:Shell Upper -#define kAILiveDeformShellUpperCommandPostNotifierStr "AI Command Notifier: After Live Deform Shell Upper" //Effect:Warp:Shell Upper -#define kAILiveDeformFlagCommandPreNotifierStr "AI Command Notifier: Before Live Deform Flag" //Effect:Warp:Flag -#define kAILiveDeformFlagCommandPostNotifierStr "AI Command Notifier: After Live Deform Flag" //Effect:Warp:Flag -#define kAILiveDeformWaveCommandPreNotifierStr "AI Command Notifier: Before Live Deform Wave" //Effect:Warp:Wave -#define kAILiveDeformWaveCommandPostNotifierStr "AI Command Notifier: After Live Deform Wave" //Effect:Warp:Wave -#define kAILiveDeformFishCommandPreNotifierStr "AI Command Notifier: Before Live Deform Fish" //Effect:Warp:Fish -#define kAILiveDeformFishCommandPostNotifierStr "AI Command Notifier: After Live Deform Fish" //Effect:Warp:Fish -#define kAILiveDeformRiseCommandPreNotifierStr "AI Command Notifier: Before Live Deform Rise" //Effect:Warp:Rise -#define kAILiveDeformRiseCommandPostNotifierStr "AI Command Notifier: After Live Deform Rise" //Effect:Warp:Rise -#define kAILiveDeformFisheyeCommandPreNotifierStr "AI Command Notifier: Before Live Deform Fisheye" //Effect:Warp:Fisheye -#define kAILiveDeformFisheyeCommandPostNotifierStr "AI Command Notifier: After Live Deform Fisheye" //Effect:Warp:Fisheye -#define kAILiveDeformInflateCommandPreNotifierStr "AI Command Notifier: Before Live Deform Inflate" //Effect:Warp:Inflate -#define kAILiveDeformInflateCommandPostNotifierStr "AI Command Notifier: After Live Deform Inflate" //Effect:Warp:Inflate -#define kAILiveDeformSqueezeCommandPreNotifierStr "AI Command Notifier: Before Live Deform Squeeze" //Effect:Warp:Squeeze -#define kAILiveDeformSqueezeCommandPostNotifierStr "AI Command Notifier: After Live Deform Squeeze" //Effect:Warp:Squeeze -#define kAILiveDeformTwistCommandPreNotifierStr "AI Command Notifier: Before Live Deform Twist" //Effect:Warp:Twist -#define kAILiveDeformTwistCommandPostNotifierStr "AI Command Notifier: After Live Deform Twist" //Effect:Warp:Twist -#define kAILivePSAdapterPluginGEfcCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_GEfc" //Effect:Effect Gallery -#define kAILivePSAdapterPluginGEfcCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_GEfc" //Effect:Effect Gallery -#define kAILivePSAdapterPluginClrPCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_ClrP" //Effect:Artistic:Colored Pencil -#define kAILivePSAdapterPluginClrPCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_ClrP" //Effect:Artistic:Colored Pencil -#define kAILivePSAdapterPluginCtCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Ct " //Effect:Artistic:Cutout -#define kAILivePSAdapterPluginCtCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Ct " //Effect:Artistic:Cutout -#define kAILivePSAdapterPluginDryBCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_DryB" //Effect:Artistic:Dry Brush -#define kAILivePSAdapterPluginDryBCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_DryB" //Effect:Artistic:Dry Brush -#define kAILivePSAdapterPluginFlmGCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_FlmG" //Effect:Artistic:Film Grain -#define kAILivePSAdapterPluginFlmGCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_FlmG" //Effect:Artistic:Film Grain -#define kAILivePSAdapterPluginFrscCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Frsc" //Effect:Artistic:Fresco -#define kAILivePSAdapterPluginFrscCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Frsc" //Effect:Artistic:Fresco -#define kAILivePSAdapterPluginNGlwCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_NGlw" //Effect:Artistic:Neon Glow -#define kAILivePSAdapterPluginNGlwCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_NGlw" //Effect:Artistic:Neon Glow -#define kAILivePSAdapterPluginPntDCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_PntD" //Effect:Artistic:Paint Daubs -#define kAILivePSAdapterPluginPntDCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_PntD" //Effect:Artistic:Paint Daubs -#define kAILivePSAdapterPluginPltKCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_PltK" //Effect:Artistic:Palette Knife -#define kAILivePSAdapterPluginPltKCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_PltK" //Effect:Artistic:Palette Knife -#define kAILivePSAdapterPluginPlsWCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_PlsW" //Effect:Artistic:Plastic Wrap -#define kAILivePSAdapterPluginPlsWCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_PlsW" //Effect:Artistic:Plastic Wrap -#define kAILivePSAdapterPluginPstECommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_PstE" //Effect:Artistic:Poster Edges -#define kAILivePSAdapterPluginPstECommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_PstE" //Effect:Artistic:Poster Edges -#define kAILivePSAdapterPluginRghPCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_RghP" //Effect:Artistic:Rough Pastels -#define kAILivePSAdapterPluginRghPCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_RghP" //Effect:Artistic:Rough Pastels -#define kAILivePSAdapterPluginSmdSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_SmdS" //Effect:Artistic:Smudge Stick -#define kAILivePSAdapterPluginSmdSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_SmdS" //Effect:Artistic:Smudge Stick -#define kAILivePSAdapterPluginSpngCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Spng" //Effect:Artistic:Sponge -#define kAILivePSAdapterPluginSpngCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Spng" //Effect:Artistic:Sponge -#define kAILivePSAdapterPluginUndrCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Undr" //Effect:Artistic:Underpainting -#define kAILivePSAdapterPluginUndrCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Undr" //Effect:Artistic:Underpainting -#define kAILivePSAdapterPluginWtrcCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Wtrc" //Effect:Artistic:Watercolor -#define kAILivePSAdapterPluginWtrcCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Wtrc" //Effect:Artistic:Watercolor -#define kAILivePSAdapterPluginGblRCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_GblR" //Effect:Blur:Gaussian Blur -#define kAILivePSAdapterPluginGblRCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_GblR" //Effect:Blur:Gaussian Blur -#define kAILivePSAdapterPluginRdlBCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_RdlB" //Effect:Blur:Radial Blur -#define kAILivePSAdapterPluginRdlBCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_RdlB" //Effect:Blur:Radial Blur -#define kAILivePSAdapterPluginSmrBCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_SmrB" //Effect:Blur:Smart Blur -#define kAILivePSAdapterPluginSmrBCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_SmrB" //Effect:Blur:Smart Blur -#define kAILivePSAdapterPluginAccECommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_AccE" //Effect:Brush Strokes:Accented Edges -#define kAILivePSAdapterPluginAccECommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_AccE" //Effect:Brush Strokes:Accented Edges -#define kAILivePSAdapterPluginAngSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_AngS" //Effect:Brush Strokes:Angled Strokes -#define kAILivePSAdapterPluginAngSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_AngS" //Effect:Brush Strokes:Angled Strokes -#define kAILivePSAdapterPluginCrshCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Crsh" //Effect:Brush Strokes:Crosshatch -#define kAILivePSAdapterPluginCrshCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Crsh" //Effect:Brush Strokes:Crosshatch -#define kAILivePSAdapterPluginDrkSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_DrkS" //Effect:Brush Strokes:Dark Strokes -#define kAILivePSAdapterPluginDrkSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_DrkS" //Effect:Brush Strokes:Dark Strokes -#define kAILivePSAdapterPluginInkOCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_InkO" //Effect:Brush Strokes:Ink Outlines -#define kAILivePSAdapterPluginInkOCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_InkO" //Effect:Brush Strokes:Ink Outlines -#define kAILivePSAdapterPluginSptCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Spt " //Effect:Brush Strokes:Spatter -#define kAILivePSAdapterPluginSptCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Spt " //Effect:Brush Strokes:Spatter -#define kAILivePSAdapterPluginSprSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_SprS" //Effect:Brush Strokes:Sprayed Strokes -#define kAILivePSAdapterPluginSprSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_SprS" //Effect:Brush Strokes:Sprayed Strokes -#define kAILivePSAdapterPluginSmieCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Smie" //Effect:Brush Strokes:Sumi-e -#define kAILivePSAdapterPluginSmieCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Smie" //Effect:Brush Strokes:Sumi-e -#define kAILivePSAdapterPluginDfsGCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_DfsG" //Effect:Distort:Diffuse Glow -#define kAILivePSAdapterPluginDfsGCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_DfsG" //Effect:Distort:Diffuse Glow -#define kAILivePSAdapterPluginGlsCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Gls " //Effect:Distort:Glass -#define kAILivePSAdapterPluginGlsCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Gls " //Effect:Distort:Glass -#define kAILivePSAdapterPluginOcnRCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_OcnR" //Effect:Distort:Ocean Ripple -#define kAILivePSAdapterPluginOcnRCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_OcnR" //Effect:Distort:Ocean Ripple -#define kAILivePSAdapterPluginClrHCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_ClrH" //Effect:Pixelate:Color Halftone -#define kAILivePSAdapterPluginClrHCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_ClrH" //Effect:Pixelate:Color Halftone -#define kAILivePSAdapterPluginCrstCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Crst" //Effect:Pixelate:Crystallize -#define kAILivePSAdapterPluginCrstCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Crst" //Effect:Pixelate:Crystallize -#define kAILivePSAdapterPluginMztnCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Mztn" //Effect:Pixelate:Mezzotint -#define kAILivePSAdapterPluginMztnCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Mztn" //Effect:Pixelate:Mezzotint -#define kAILivePSAdapterPluginPntlCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Pntl" //Effect:Pixelate:Pointillize -#define kAILivePSAdapterPluginPntlCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Pntl" //Effect:Pixelate:Pointillize -#define kAILivePSAdapterPluginUSMkCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_USMk" //Effect:Sharpen:Unsharp Mask -#define kAILivePSAdapterPluginUSMkCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_USMk" //Effect:Sharpen:Unsharp Mask -#define kAILivePSAdapterPluginBsRlCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_BsRl" //Effect:Sketch:Bas Relief -#define kAILivePSAdapterPluginBsRlCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_BsRl" //Effect:Sketch:Bas Relief -#define kAILivePSAdapterPluginChlCCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_ChlC" //Effect:Sketch:Chalk & Charcoal -#define kAILivePSAdapterPluginChlCCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_ChlC" //Effect:Sketch:Chalk & Charcoal -#define kAILivePSAdapterPluginChrcCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Chrc" //Effect:Sketch:Charcoal -#define kAILivePSAdapterPluginChrcCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Chrc" //Effect:Sketch:Charcoal -#define kAILivePSAdapterPluginChrmCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Chrm" //Effect:Sketch:Chrome -#define kAILivePSAdapterPluginChrmCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Chrm" //Effect:Sketch:Chrome -#define kAILivePSAdapterPluginCntCCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_CntC" //Effect:Sketch:Cont← Crayon -#define kAILivePSAdapterPluginCntCCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_CntC" //Effect:Sketch:Cont← Crayon -#define kAILivePSAdapterPluginGraPCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_GraP" //Effect:Sketch:Graphic Pen -#define kAILivePSAdapterPluginGraPCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_GraP" //Effect:Sketch:Graphic Pen -#define kAILivePSAdapterPluginHlfSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_HlfS" //Effect:Sketch:Halftone Pattern -#define kAILivePSAdapterPluginHlfSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_HlfS" //Effect:Sketch:Halftone Pattern -#define kAILivePSAdapterPluginNtPrCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_NtPr" //Effect:Sketch:Note Paper -#define kAILivePSAdapterPluginNtPrCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_NtPr" //Effect:Sketch:Note Paper -#define kAILivePSAdapterPluginPhtcCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Phtc" //Effect:Sketch:Photocopy -#define kAILivePSAdapterPluginPhtcCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Phtc" //Effect:Sketch:Photocopy -#define kAILivePSAdapterPluginPlstCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Plst" //Effect:Sketch:Plaster -#define kAILivePSAdapterPluginPlstCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Plst" //Effect:Sketch:Plaster -#define kAILivePSAdapterPluginRtclCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Rtcl" //Effect:Sketch:Reticulation -#define kAILivePSAdapterPluginRtclCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Rtcl" //Effect:Sketch:Reticulation -#define kAILivePSAdapterPluginStmpCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Stmp" //Effect:Sketch:Stamp -#define kAILivePSAdapterPluginStmpCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Stmp" //Effect:Sketch:Stamp -#define kAILivePSAdapterPluginTrnECommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_TrnE" //Effect:Sketch:Torn Edges -#define kAILivePSAdapterPluginTrnECommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_TrnE" //Effect:Sketch:Torn Edges -#define kAILivePSAdapterPluginWtrPCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_WtrP" //Effect:Sketch:Water Paper -#define kAILivePSAdapterPluginWtrPCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_WtrP" //Effect:Sketch:Water Paper -#define kAILivePSAdapterPluginGlwECommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_GlwE" //Effect:Stylize:Glowing Edges -#define kAILivePSAdapterPluginGlwECommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_GlwE" //Effect:Stylize:Glowing Edges -#define kAILivePSAdapterPluginCrqlCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Crql" //Effect:Texture:Craquelure -#define kAILivePSAdapterPluginCrqlCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Crql" //Effect:Texture:Craquelure -#define kAILivePSAdapterPluginGrnCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Grn " //Effect:Texture:Grain -#define kAILivePSAdapterPluginGrnCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Grn " //Effect:Texture:Grain -#define kAILivePSAdapterPluginMscTCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_MscT" //Effect:Texture:Mosaic Tiles -#define kAILivePSAdapterPluginMscTCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_MscT" //Effect:Texture:Mosaic Tiles -#define kAILivePSAdapterPluginPtchCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Ptch" //Effect:Texture:Patchwork -#define kAILivePSAdapterPluginPtchCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Ptch" //Effect:Texture:Patchwork -#define kAILivePSAdapterPluginStnGCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_StnG" //Effect:Texture:Stained Glass -#define kAILivePSAdapterPluginStnGCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_StnG" //Effect:Texture:Stained Glass -#define kAILivePSAdapterPluginTxtzCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Txtz" //Effect:Texture:Texturizer -#define kAILivePSAdapterPluginTxtzCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Txtz" //Effect:Texture:Texturizer -#define kAILivePSAdapterPluginDntrCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Dntr" //Effect:Video:De-Interlace -#define kAILivePSAdapterPluginDntrCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Dntr" //Effect:Video:De-Interlace -#define kAILivePSAdapterPluginNTSCCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_NTSC" //Effect:Video:NTSC Colors -#define kAILivePSAdapterPluginNTSCCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_NTSC" //Effect:Video:NTSC Colors -#define kAIPreviewModeCommandPreNotifierStr "AI Command Notifier: Before Preview Mode" //View:Preview -#define kAIPreviewModeCommandPostNotifierStr "AI Command Notifier: After Preview Mode" //View:Preview -#define kAIInkPreviewCommandPreNotifierStr "AI Command Notifier: Before Ink Preview" //View:Overprint Preview -#define kAIInkPreviewCommandPostNotifierStr "AI Command Notifier: After Ink Preview" //View:Overprint Preview -#define kAIPixelViewCommandPreNotifierStr "AI Command Notifier: Before Pixel View" //View:Pixel Preview -#define kAIPixelViewCommandPostNotifierStr "AI Command Notifier: After Pixel View" //View:Pixel Preview -#define kAIProofSetupDocumentCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Document" //View:Proof Setup:Document CMYK: -#define kAIProofSetupDocumentCommandPostNotifierStr "AI Command Notifier: After Proof Setup Document" //View:Proof Setup:Document CMYK: -#define kAIProofSetupMacRGBCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Mac RGB" //View:Proof Setup:Legacy Macintosh RGB (Gamma 1.8) -#define kAIProofSetupMacRGBCommandPostNotifierStr "AI Command Notifier: After Proof Setup Mac RGB" //View:Proof Setup:Legacy Macintosh RGB (Gamma 1.8) -#define kAIProofSetupWinRGBCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Win RGB" //View:Proof Setup:Internet Standard RGB (sRGB) -#define kAIProofSetupWinRGBCommandPostNotifierStr "AI Command Notifier: After Proof Setup Win RGB" //View:Proof Setup:Internet Standard RGB (sRGB) -#define kAIProofSetupMonitorRGBCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Monitor RGB" //View:Proof Setup:Monitor RGB -#define kAIProofSetupMonitorRGBCommandPostNotifierStr "AI Command Notifier: After Proof Setup Monitor RGB" //View:Proof Setup:Monitor RGB -#define kAIProofSetupColorBlindPCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Color Blind P" //View:Proof Setup:Color blindness - Protanopia-type -#define kAIProofSetupColorBlindPCommandPostNotifierStr "AI Command Notifier: After Proof Setup Color Blind P" //View:Proof Setup:Color blindness - Protanopia-type -#define kAIProofSetupColorBlindDCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Color Blind D" //View:Proof Setup:Color blindness - Deuteranopia-type -#define kAIProofSetupColorBlindDCommandPostNotifierStr "AI Command Notifier: After Proof Setup Color Blind D" //View:Proof Setup:Color blindness - Deuteranopia-type -#define kAIProofSetupCustomCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Custom" //View:Proof Setup:Customize -#define kAIProofSetupCustomCommandPostNotifierStr "AI Command Notifier: After Proof Setup Custom" //View:Proof Setup:Customize -#define kAIProofColorsCommandPreNotifierStr "AI Command Notifier: Before Proof Colors" //View:Proof Colors -#define kAIProofColorsCommandPostNotifierStr "AI Command Notifier: After Proof Colors" //View:Proof Colors -#define kAIZoomInCommandPreNotifierStr "AI Command Notifier: Before Zoom In" //View:Zoom In -#define kAIZoomInCommandPostNotifierStr "AI Command Notifier: After Zoom In" //View:Zoom In -#define kAIZoomOutCommandPreNotifierStr "AI Command Notifier: Before Zoom Out" //View:Zoom Out -#define kAIZoomOutCommandPostNotifierStr "AI Command Notifier: After Zoom Out" //View:Zoom Out -#define kAIReduceToFitCommandPreNotifierStr "AI Command Notifier: Before Reduce To Fit" //View:Fit Artboard in Window -#define kAIReduceToFitCommandPostNotifierStr "AI Command Notifier: After Reduce To Fit" //View:Fit Artboard in Window -#define kAIReduceToFitAllCommandPreNotifierStr "AI Command Notifier: Before Reduce To Fit All" //View:Fit All in Window -#define kAIReduceToFitAllCommandPostNotifierStr "AI Command Notifier: After Reduce To Fit All" //View:Fit All in Window -#define kAIActualSizeCommandPreNotifierStr "AI Command Notifier: Before Actual Size" //View:Actual Size -#define kAIActualSizeCommandPostNotifierStr "AI Command Notifier: After Actual Size" //View:Actual Size -#define kAIShowHideEdgesCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Edges" //View:Hide Edges -#define kAIShowHideEdgesCommandPostNotifierStr "AI Command Notifier: After Show/Hide Edges" //View:Hide Edges -#define kAIShowHideArtboardCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Artboard" //View:Hide Artboards -#define kAIShowHideArtboardCommandPostNotifierStr "AI Command Notifier: After Show/Hide Artboard" //View:Hide Artboards -#define kAIShowHidePageTilingCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Page Tiling" //View:Hide Print Tiling -#define kAIShowHidePageTilingCommandPostNotifierStr "AI Command Notifier: After Show/Hide Page Tiling" //View:Hide Print Tiling -#define kAIAISliceFeedbackMenuCommandPreNotifierStr "AI Command Notifier: Before AISlice Feedback Menu" //View:Show Slices -#define kAIAISliceFeedbackMenuCommandPostNotifierStr "AI Command Notifier: After AISlice Feedback Menu" //View:Show Slices -#define kAIAISliceLockMenuCommandPreNotifierStr "AI Command Notifier: Before AISlice Lock Menu" //View:Lock Slices -#define kAIAISliceLockMenuCommandPostNotifierStr "AI Command Notifier: After AISlice Lock Menu" //View:Lock Slices -#define kAIShowHideTemplateCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Template" //View:Show Template -#define kAIShowHideTemplateCommandPostNotifierStr "AI Command Notifier: After Show/Hide Template" //View:Show Template -#define kAIShowHideRulersCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Rulers" //View:Rulers:Show Rulers -#define kAIShowHideRulersCommandPostNotifierStr "AI Command Notifier: After Show/Hide Rulers" //View:Rulers:Show Rulers -#define kAISwitchRulerCoordinateSystemCommandPreNotifierStr "AI Command Notifier: Before Switch Ruler Coordinate System" //View:Rulers:Change to Artboard Rulers -#define kAISwitchRulerCoordinateSystemCommandPostNotifierStr "AI Command Notifier: After Switch Ruler Coordinate System" //View:Rulers:Change to Artboard Rulers -#define kAIShowHideVideoRulersCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Video Rulers" //View:Rulers:Show Video Rulers -#define kAIShowHideVideoRulersCommandPostNotifierStr "AI Command Notifier: After Show/Hide Video Rulers" //View:Rulers:Show Video Rulers -#define kAIAIBoundingBoxToggleCommandPreNotifierStr "AI Command Notifier: Before AI Bounding Box Toggle" //View:Hide Bounding Box -#define kAIAIBoundingBoxToggleCommandPostNotifierStr "AI Command Notifier: After AI Bounding Box Toggle" //View:Hide Bounding Box -#define kAITransparencyGridMenuItemCommandPreNotifierStr "AI Command Notifier: Before TransparencyGrid Menu Item" //View:Show Transparency Grid -#define kAITransparencyGridMenuItemCommandPostNotifierStr "AI Command Notifier: After TransparencyGrid Menu Item" //View:Show Transparency Grid -#define kAIShowHideTextThreadsCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Text Threads" //View:Show Text Threads -#define kAIShowHideTextThreadsCommandPostNotifierStr "AI Command Notifier: After Show/Hide Text Threads" //View:Show Text Threads -#define kAIGradientFeedbackCommandPreNotifierStr "AI Command Notifier: Before Gradient Feedback" //View:Hide Gradient Annotator -#define kAIGradientFeedbackCommandPostNotifierStr "AI Command Notifier: After Gradient Feedback" //View:Hide Gradient Annotator -#define kAIShowGapsPlanetXCommandPreNotifierStr "AI Command Notifier: Before Show Gaps Planet X" //View:Show Live Paint Gaps -#define kAIShowGapsPlanetXCommandPostNotifierStr "AI Command Notifier: After Show Gaps Planet X" //View:Show Live Paint Gaps -#define kAIShowHideGuidesCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Guides" //View:Guides:Hide Guides -#define kAIShowHideGuidesCommandPostNotifierStr "AI Command Notifier: After Show/Hide Guides" //View:Guides:Hide Guides -#define kAILockUnlockGuidesCommandPreNotifierStr "AI Command Notifier: Before Lock/Unlock Guides" //View:Guides:Lock Guides -#define kAILockUnlockGuidesCommandPostNotifierStr "AI Command Notifier: After Lock/Unlock Guides" //View:Guides:Lock Guides -#define kAIMakeGuidesCommandPreNotifierStr "AI Command Notifier: Before Make Guides" //View:Guides:Make Guides -#define kAIMakeGuidesCommandPostNotifierStr "AI Command Notifier: After Make Guides" //View:Guides:Make Guides -#define kAIReleaseGuidesCommandPreNotifierStr "AI Command Notifier: Before Release Guides" //View:Guides:Release Guides -#define kAIReleaseGuidesCommandPostNotifierStr "AI Command Notifier: After Release Guides" //View:Guides:Release Guides -#define kAIClearGuideCommandPreNotifierStr "AI Command Notifier: Before Clear Guide" //View:Guides:Clear Guides -#define kAIClearGuideCommandPostNotifierStr "AI Command Notifier: After Clear Guide" //View:Guides:Clear Guides -#define kAISnapomaticOnOffMenuItemCommandPreNotifierStr "AI Command Notifier: Before Snapomatic on-off menu item" //View:Smart Guides -#define kAISnapomaticOnOffMenuItemCommandPostNotifierStr "AI Command Notifier: After Snapomatic on-off menu item" //View:Smart Guides -#define kAIShowPerspectiveGridCommandPreNotifierStr "AI Command Notifier: Before Show Perspective Grid" //View:Perspective Grid:Show Grid -#define kAIShowPerspectiveGridCommandPostNotifierStr "AI Command Notifier: After Show Perspective Grid" //View:Perspective Grid:Show Grid -#define kAIShowRulerCommandPreNotifierStr "AI Command Notifier: Before Show Ruler" //View:Perspective Grid:Show Rulers -#define kAIShowRulerCommandPostNotifierStr "AI Command Notifier: After Show Ruler" //View:Perspective Grid:Show Rulers -#define kAISnapToGridCommandPreNotifierStr "AI Command Notifier: Before Snap to Grid" //View:Perspective Grid:Snap to Grid -#define kAISnapToGridCommandPostNotifierStr "AI Command Notifier: After Snap to Grid" //View:Perspective Grid:Snap to Grid -#define kAILockPerspectiveGridCommandPreNotifierStr "AI Command Notifier: Before Lock Perspective Grid" //View:Perspective Grid:Lock Grid -#define kAILockPerspectiveGridCommandPostNotifierStr "AI Command Notifier: After Lock Perspective Grid" //View:Perspective Grid:Lock Grid -#define kAILockStationPointCommandPreNotifierStr "AI Command Notifier: Before Lock Station Point" //View:Perspective Grid:Lock Station Point -#define kAILockStationPointCommandPostNotifierStr "AI Command Notifier: After Lock Station Point" //View:Perspective Grid:Lock Station Point -#define kAIDefinePerspectiveGridCommandPreNotifierStr "AI Command Notifier: Before Define Perspective Grid" //View:Perspective Grid:Define Grid -#define kAIDefinePerspectiveGridCommandPostNotifierStr "AI Command Notifier: After Define Perspective Grid" //View:Perspective Grid:Define Grid -#define kAISavePerspectiveGridAsPresetCommandPreNotifierStr "AI Command Notifier: Before Save Perspective Grid as Preset" //View:Perspective Grid:Save Grid as Preset -#define kAISavePerspectiveGridAsPresetCommandPostNotifierStr "AI Command Notifier: After Save Perspective Grid as Preset" //View:Perspective Grid:Save Grid as Preset -#define kAIShowHideGridCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Grid" //View:Show Grid -#define kAIShowHideGridCommandPostNotifierStr "AI Command Notifier: After Show/Hide Grid" //View:Show Grid -#define kAIEnableDisableGridSnapCommandPreNotifierStr "AI Command Notifier: Before Enable/Disable Grid Snap" //View:Snap to Grid -#define kAIEnableDisableGridSnapCommandPostNotifierStr "AI Command Notifier: After Enable/Disable Grid Snap" //View:Snap to Grid -#define kAISnapPointCommandPreNotifierStr "AI Command Notifier: Before Snap Point" //View:Snap to Point -#define kAISnapPointCommandPostNotifierStr "AI Command Notifier: After Snap Point" //View:Snap to Point -#define kAINewViewSnapCommandPreNotifierStr "AI Command Notifier: Before New View Snap" //View:New View -#define kAINewViewSnapCommandPostNotifierStr "AI Command Notifier: After New View Snap" //View:New View -#define kAIEditViewSnapCommandPreNotifierStr "AI Command Notifier: Before Edit View Snap" //View:Edit Views -#define kAIEditViewSnapCommandPostNotifierStr "AI Command Notifier: After Edit View Snap" //View:Edit Views -#define kAIView1CommandPreNotifierStr "AI Command Notifier: Before View1" //View:Custom View 1 -#define kAIView1CommandPostNotifierStr "AI Command Notifier: After View1" //View:Custom View 1 -#define kAIView2CommandPreNotifierStr "AI Command Notifier: Before View2" //View:Custom View 2 -#define kAIView2CommandPostNotifierStr "AI Command Notifier: After View2" //View:Custom View 2 -#define kAIView3CommandPreNotifierStr "AI Command Notifier: Before View3" //View:Custom View 3 -#define kAIView3CommandPostNotifierStr "AI Command Notifier: After View3" //View:Custom View 3 -#define kAIView4CommandPreNotifierStr "AI Command Notifier: Before View4" //View:Custom View 4 -#define kAIView4CommandPostNotifierStr "AI Command Notifier: After View4" //View:Custom View 4 -#define kAIView5CommandPreNotifierStr "AI Command Notifier: Before View5" //View:Custom View 5 -#define kAIView5CommandPostNotifierStr "AI Command Notifier: After View5" //View:Custom View 5 -#define kAIView6CommandPreNotifierStr "AI Command Notifier: Before View6" //View:Custom View 6 -#define kAIView6CommandPostNotifierStr "AI Command Notifier: After View6" //View:Custom View 6 -#define kAIView7CommandPreNotifierStr "AI Command Notifier: Before View7" //View:Custom View 7 -#define kAIView7CommandPostNotifierStr "AI Command Notifier: After View7" //View:Custom View 7 -#define kAIView8CommandPreNotifierStr "AI Command Notifier: Before View8" //View:Custom View 8 -#define kAIView8CommandPostNotifierStr "AI Command Notifier: After View8" //View:Custom View 8 -#define kAIView9CommandPreNotifierStr "AI Command Notifier: Before View9" //View:Custom View 9 -#define kAIView9CommandPostNotifierStr "AI Command Notifier: After View9" //View:Custom View 9 -#define kAIView10CommandPreNotifierStr "AI Command Notifier: Before View10" //View:Custom View 10 -#define kAIView10CommandPostNotifierStr "AI Command Notifier: After View10" //View:Custom View 10 -#define kAINewViewCommandPreNotifierStr "AI Command Notifier: Before New View" //Window:New Window -#define kAINewViewCommandPostNotifierStr "AI Command Notifier: After New View" //Window:New Window -#define kAIArrangeWindowsCascadeCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Cascade" //Window:Arrange:Cascade -#define kAIArrangeWindowsCascadeCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Cascade" //Window:Arrange:Cascade -#define kAIArrangeWindowsVerticalCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Vertical" //Window:Arrange:Tile -#define kAIArrangeWindowsVerticalCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Vertical" //Window:Arrange:Tile -#define kAIArrangeWindowsFloatInWindowCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Float in Window" //Window:Arrange:Float in Window -#define kAIArrangeWindowsFloatInWindowCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Float in Window" //Window:Arrange:Float in Window -#define kAIArrangeWindowsFloatAllInWindowsCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Float All in Windows" //Window:Arrange:Float All in Windows -#define kAIArrangeWindowsFloatAllInWindowsCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Float All in Windows" //Window:Arrange:Float All in Windows -#define kAIArrangeWindowsConsolidateAllWindowsCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Consolidate AllWindows" //Window:Arrange:Consolidate All Windows -#define kAIArrangeWindowsConsolidateAllWindowsCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Consolidate AllWindows" //Window:Arrange:Consolidate All Windows -#define kAIAdobeSaveWorkspaceCommandPreNotifierStr "AI Command Notifier: Before Adobe Save Workspace" //Window:Workspace:Save Workspace -#define kAIAdobeSaveWorkspaceCommandPostNotifierStr "AI Command Notifier: After Adobe Save Workspace" //Window:Workspace:Save Workspace -#define kAIAdobeManageWorkspaceCommandPreNotifierStr "AI Command Notifier: Before Adobe Manage Workspace" //Window:Workspace:Manage Workspaces -#define kAIAdobeManageWorkspaceCommandPostNotifierStr "AI Command Notifier: After Adobe Manage Workspace" //Window:Workspace:Manage Workspaces -#define kAIControlPalettePluginCommandPreNotifierStr "AI Command Notifier: Before control palette plugin" //Window:Control -#define kAIControlPalettePluginCommandPostNotifierStr "AI Command Notifier: After control palette plugin" //Window:Control -#define kAIAdobeBuiltInToolbox1CommandPreNotifierStr "AI Command Notifier: Before AdobeBuiltInToolbox1" //Window:Tools -#define kAIAdobeBuiltInToolbox1CommandPostNotifierStr "AI Command Notifier: After AdobeBuiltInToolbox1" //Window:Tools -#define kAIAdobeActionPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Action Palette" //Window:Actions -#define kAIAdobeActionPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Action Palette" //Window:Actions -#define kAIAdobeAlignObjects2CommandPreNotifierStr "AI Command Notifier: Before AdobeAlignObjects2" //Window:Align -#define kAIAdobeAlignObjects2CommandPostNotifierStr "AI Command Notifier: After AdobeAlignObjects2" //Window:Align -#define kAIStylePaletteCommandPreNotifierStr "AI Command Notifier: Before Style Palette" //Window:Appearance -#define kAIStylePaletteCommandPostNotifierStr "AI Command Notifier: After Style Palette" //Window:Appearance -#define kAIAdobeArtboardPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Artboard Palette" //Window:Artboards -#define kAIAdobeArtboardPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Artboard Palette" //Window:Artboards -#define kAIInternalPalettesPosingAsPlugInMenusAttributesCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-attributes" //Window:Attributes -#define kAIInternalPalettesPosingAsPlugInMenusAttributesCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-attributes" //Window:Attributes -#define kAIAdobeBrushManagerMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe BrushManager Menu Item" //Window:Brushes -#define kAIAdobeBrushManagerMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe BrushManager Menu Item" //Window:Brushes -#define kAIAdobeColorPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Color Palette" //Window:Color -#define kAIAdobeColorPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Color Palette" //Window:Color -#define kAIAdobeHarmonyPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Harmony Palette" //Window:Color Guide -#define kAIAdobeHarmonyPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Harmony Palette" //Window:Color Guide -#define kAIDocInfo1CommandPreNotifierStr "AI Command Notifier: Before DocInfo1" //Window:Document Info -#define kAIDocInfo1CommandPostNotifierStr "AI Command Notifier: After DocInfo1" //Window:Document Info -#define kAIAdobeFlatteningPreviewCommandPreNotifierStr "AI Command Notifier: Before Adobe Flattening Preview" //Window:Flattener Preview -#define kAIAdobeFlatteningPreviewCommandPostNotifierStr "AI Command Notifier: After Adobe Flattening Preview" //Window:Flattener Preview -#define kAIAdobeGradientPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Gradient Palette" //Window:Gradient -#define kAIAdobeGradientPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Gradient Palette" //Window:Gradient -#define kAIAdobeStylePaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Style Palette" //Window:Graphic Styles -#define kAIAdobeStylePaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Style Palette" //Window:Graphic Styles -#define kAIInternalPalettesPosingAsPlugInMenusInfoCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-info" //Window:Info -#define kAIInternalPalettesPosingAsPlugInMenusInfoCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-info" //Window:Info -#define kAIAdobeLayerPalette1CommandPreNotifierStr "AI Command Notifier: Before AdobeLayerPalette1" //Window:Layers -#define kAIAdobeLayerPalette1CommandPostNotifierStr "AI Command Notifier: After AdobeLayerPalette1" //Window:Layers -#define kAIAdobeLinkPaletteMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe LinkPalette Menu Item" //Window:Links -#define kAIAdobeLinkPaletteMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe LinkPalette Menu Item" //Window:Links -#define kAIAIMagicWandCommandPreNotifierStr "AI Command Notifier: Before AI Magic Wand" //Window:Magic Wand -#define kAIAIMagicWandCommandPostNotifierStr "AI Command Notifier: After AI Magic Wand" //Window:Magic Wand -#define kAIAdobeNavigator1CommandPreNotifierStr "AI Command Notifier: Before AdobeNavigator1" //Window:Navigator -#define kAIAdobeNavigator1CommandPostNotifierStr "AI Command Notifier: After AdobeNavigator1" //Window:Navigator -#define kAIAdobePathfinderPalette1CommandPreNotifierStr "AI Command Notifier: Before AdobePathfinderPalette1" //Window:Pathfinder -#define kAIAdobePathfinderPalette1CommandPostNotifierStr "AI Command Notifier: After AdobePathfinderPalette1" //Window:Pathfinder -#define kAIAdobeSeparationPreviewPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Separation Preview Palette" //Window:Separations Preview -#define kAIAdobeSeparationPreviewPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Separation Preview Palette" //Window:Separations Preview -#define kAIAdobeStrokePaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Stroke Palette" //Window:Stroke -#define kAIAdobeStrokePaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Stroke Palette" //Window:Stroke -#define kAIAdobeSVGInteractivityPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe SVG Interactivity Palette" //Window:SVG Interactivity -#define kAIAdobeSVGInteractivityPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe SVG Interactivity Palette" //Window:SVG Interactivity -#define kAIAdobeSwatchesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Swatches Menu Item" //Window:Swatches -#define kAIAdobeSwatchesMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Swatches Menu Item" //Window:Swatches -#define kAIAdobeSymbolPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Symbol Palette" //Window:Symbols -#define kAIAdobeSymbolPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Symbol Palette" //Window:Symbols -#define kAIAdobeTransformObjects1CommandPreNotifierStr "AI Command Notifier: Before AdobeTransformObjects1" //Window:Transform -#define kAIAdobeTransformObjects1CommandPostNotifierStr "AI Command Notifier: After AdobeTransformObjects1" //Window:Transform -#define kAIAdobeTransparencyPaletteMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Transparency Palette Menu Item" //Window:Transparency -#define kAIAdobeTransparencyPaletteMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Transparency Palette Menu Item" //Window:Transparency -#define kAIInternalPalettesPosingAsPlugInMenusCharacterCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-character" //Window:Type:Character -#define kAIInternalPalettesPosingAsPlugInMenusCharacterCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-character" //Window:Type:Character -#define kAICharacterStylesCommandPreNotifierStr "AI Command Notifier: Before Character Styles" //Window:Type:Character Styles -#define kAICharacterStylesCommandPostNotifierStr "AI Command Notifier: After Character Styles" //Window:Type:Character Styles -#define kAIFlashTextCommandPreNotifierStr "AI Command Notifier: Before Flash Text" //Window:Type:Flash Text -#define kAIFlashTextCommandPostNotifierStr "AI Command Notifier: After Flash Text" //Window:Type:Flash Text -#define kAIAlternateGlyphPalettePlugin2CommandPreNotifierStr "AI Command Notifier: Before alternate glyph palette plugin 2" //Window:Type:Glyphs -#define kAIAlternateGlyphPalettePlugin2CommandPostNotifierStr "AI Command Notifier: After alternate glyph palette plugin 2" //Window:Type:Glyphs -#define kAIInternalPalettesPosingAsPlugInMenusOpentypeCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-opentype" //Window:Type:OpenType -#define kAIInternalPalettesPosingAsPlugInMenusOpentypeCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-opentype" //Window:Type:OpenType -#define kAIInternalPalettesPosingAsPlugInMenusParagraphCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-paragraph" //Window:Type:Paragraph -#define kAIInternalPalettesPosingAsPlugInMenusParagraphCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-paragraph" //Window:Type:Paragraph -#define kAIAdobeParagraphStylesPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Paragraph Styles Palette" //Window:Type:Paragraph Styles -#define kAIAdobeParagraphStylesPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Paragraph Styles Palette" //Window:Type:Paragraph Styles -#define kAIInternalPalettesPosingAsPlugInMenusTabCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-tab" //Window:Type:Tabs -#define kAIInternalPalettesPosingAsPlugInMenusTabCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-tab" //Window:Type:Tabs -#define kAIAdobeVariablesPaletteMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Variables Palette Menu Item" //Window:Variables -#define kAIAdobeVariablesPaletteMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Variables Palette Menu Item" //Window:Variables -#define kAIWelcomeScreenMenuItemCommandPreNotifierStr "AI Command Notifier: Before Welcome screen menu item" //Help:Welcome Screen -#define kAIWelcomeScreenMenuItemCommandPostNotifierStr "AI Command Notifier: After Welcome screen menu item" //Help:Welcome Screen -#define kAIAboutIllustratorCommandPreNotifierStr "AI Command Notifier: Before About Illustrator" //Help:About Illustrator -#define kAIAboutIllustratorCommandPostNotifierStr "AI Command Notifier: After About Illustrator" //Help:About Illustrator -#define kAISystemInformationCommandPreNotifierStr "AI Command Notifier: Before System Information" //Help:System Info -#define kAISystemInformationCommandPostNotifierStr "AI Command Notifier: After System Information" //Help:System Info -#define kAITextSizeCommandPreNotifierStr "AI Command Notifier: Before Text Size" //Other Text:Point Size Up/Down -#define kAITextSizeCommandPostNotifierStr "AI Command Notifier: After Text Size" //Other Text:Point Size Up/Down -#define kAITextAlignmentCommandPreNotifierStr "AI Command Notifier: Before Text Alignment" //Other Text:Left Align Text -#define kAITextAlignmentCommandPostNotifierStr "AI Command Notifier: After Text Alignment" //Other Text:Left Align Text -#define kAITrackingKerningCommandPreNotifierStr "AI Command Notifier: Before Tracking/Kerning" //Other Text:Kern Looser -#define kAITrackingKerningCommandPostNotifierStr "AI Command Notifier: After Tracking/Kerning" //Other Text:Kern Looser -#define kAIWordSpacingCommandPreNotifierStr "AI Command Notifier: Before Word Spacing" //Other Text:Spacing -#define kAIWordSpacingCommandPostNotifierStr "AI Command Notifier: After Word Spacing" //Other Text:Spacing -#define kAIDiscretionaryHyphenCommandPreNotifierStr "AI Command Notifier: Before Discretionary Hyphen" //Other Text:Insert Hyphen -#define kAIDiscretionaryHyphenCommandPostNotifierStr "AI Command Notifier: After Discretionary Hyphen" //Other Text:Insert Hyphen -#define kAIClearTrackCommandPreNotifierStr "AI Command Notifier: Before Clear Track" //Other Text:Clear Tracking -#define kAIClearTrackCommandPostNotifierStr "AI Command Notifier: After Clear Track" //Other Text:Clear Tracking -#define kAIClearTypeScaleCommandPreNotifierStr "AI Command Notifier: Before Clear Type Scale" //Other Text:Uniform Type -#define kAIClearTypeScaleCommandPostNotifierStr "AI Command Notifier: After Clear Type Scale" //Other Text:Uniform Type -#define kAIHighlightFontCommandPreNotifierStr "AI Command Notifier: Before Highlight Font" //Other Text:Highlight Font -#define kAIHighlightFontCommandPostNotifierStr "AI Command Notifier: After Highlight Font" //Other Text:Highlight Font -#define kAICenterAlignCommandPreNotifierStr "AI Command Notifier: Before Center Align" //Other Text:Center Text -#define kAICenterAlignCommandPostNotifierStr "AI Command Notifier: After Center Align" //Other Text:Center Text -#define kAIRightAlignCommandPreNotifierStr "AI Command Notifier: Before Right Align" //Other Text:Right Align Text -#define kAIRightAlignCommandPostNotifierStr "AI Command Notifier: After Right Align" //Other Text:Right Align Text -#define kAIJustifyCommandPreNotifierStr "AI Command Notifier: Before Justify" //Other Text:Justify Text Left -#define kAIJustifyCommandPostNotifierStr "AI Command Notifier: After Justify" //Other Text:Justify Text Left -#define kAIJustifyCenterCommandPreNotifierStr "AI Command Notifier: Before Justify Center" //Other Text:Justify Text Center -#define kAIJustifyCenterCommandPostNotifierStr "AI Command Notifier: After Justify Center" //Other Text:Justify Text Center -#define kAIJustifyRightCommandPreNotifierStr "AI Command Notifier: Before Justify Right" //Other Text:Justify Text Right -#define kAIJustifyRightCommandPostNotifierStr "AI Command Notifier: After Justify Right" //Other Text:Justify Text Right -#define kAIJustifyAllCommandPreNotifierStr "AI Command Notifier: Before Justify All" //Other Text:Justify All Lines -#define kAIJustifyAllCommandPostNotifierStr "AI Command Notifier: After Justify All" //Other Text:Justify All Lines -#define kAIToggleAutoHyphenationCommandPreNotifierStr "AI Command Notifier: Before Toggle Auto Hyphenation" //Other Text:Toggle Auto Hyphenation -#define kAIToggleAutoHyphenationCommandPostNotifierStr "AI Command Notifier: After Toggle Auto Hyphenation" //Other Text:Toggle Auto Hyphenation -#define kAIToggleLineComposerCommandPreNotifierStr "AI Command Notifier: Before Toggle Line Composer" //Other Text:Toggle Line Composer -#define kAIToggleLineComposerCommandPostNotifierStr "AI Command Notifier: After Toggle Line Composer" //Other Text:Toggle Line Composer -#define kAISwitchSelectionToolCommandPreNotifierStr "AI Command Notifier: Before Switch Selection Tool" //Other Select:Switch Selection Tools -#define kAISwitchSelectionToolCommandPostNotifierStr "AI Command Notifier: After Switch Selection Tool" //Other Select:Switch Selection Tools - -//Old Menu Command Notifiers -#define kAIPageSetupCommandPreNotifierStr "AI Command Notifier: Before Page Setup" -#define kAIPageSetupCommandPostNotifierStr "AI Command Notifier: After Page Setup" -#define kAIUnlinkTextCommandPreNotifierStr "AI Command Notifier: Before Unlink Text" -#define kAIUnlinkTextCommandPostNotifierStr "AI Command Notifier: After Unlink Text" -#define kAIArtworkModeCommandPreNotifierStr "AI Command Notifier: Before Artwork Mode" -#define kAIArtworkModeCommandPostNotifierStr "AI Command Notifier: After Artwork Mode" -#define kAIShowHideArtboardRulersCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Artboard Rulers" -#define kAIShowHideArtboardRulersCommandPostNotifierStr "AI Command Notifier: After Show/Hide Artboard Rulers" -#define kAISelectWindowCommandPreNotifierStr "AI Command Notifier: Before Select Window" -#define kAISelectWindowCommandPostNotifierStr "AI Command Notifier: After Select Window" -#define kAITextFontCommandPreNotifierStr "AI Command Notifier: Before Text Font" -#define kAITextFontCommandPostNotifierStr "AI Command Notifier: After Text Font" -#define kAILinkTextCommandPreNotifierStr "AI Command Notifier: Before Link Text" -#define kAILinkTextCommandPostNotifierStr "AI Command Notifier: After Link Text" -#define kAILineSpacingCommandPreNotifierStr "AI Command Notifier: Before Line Spacing" -#define kAILineSpacingCommandPostNotifierStr "AI Command Notifier: After Line Spacing" -#define kAIReleaseCropMarksCommandPreNotifierStr "AI Command Notifier: Before Release Crop Marks" -#define kAIReleaseCropMarksCommandPostNotifierStr "AI Command Notifier: After Release Crop Marks" -#define kAINewMultipleMasterInstanceCommandPreNotifierStr "AI Command Notifier: Before New Multiple Master Instance" -#define kAINewMultipleMasterInstanceCommandPostNotifierStr "AI Command Notifier: After New Multiple Master Instance" -#define kAICutPictureCommandPreNotifierStr "AI Command Notifier: Before Cut Picture" -#define kAICutPictureCommandPostNotifierStr "AI Command Notifier: After Cut Picture" -#define kAICopyPictureCommandPreNotifierStr "AI Command Notifier: Before Copy Picture" -#define kAICopyPictureCommandPostNotifierStr "AI Command Notifier: After Copy Picture" -#define kAISetNoteCommandPreNotifierStr "AI Command Notifier: Before Set Note" -#define kAISetNoteCommandPostNotifierStr "AI Command Notifier: After Set Note" -#define kAISeparationSetupCommandPreNotifierStr "AI Command Notifier: Before Separation Setup" -#define kAISeparationSetupCommandPostNotifierStr "AI Command Notifier: After Separation Setup" -#define kAIArrangeWindowsHorizontalCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Horizontal" -#define kAIArrangeWindowsHorizontalCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Horizontal" -#define kAIArrangeIconsCommandPreNotifierStr "AI Command Notifier: Before Arrange Icons" -#define kAIArrangeIconsCommandPostNotifierStr "AI Command Notifier: After Arrange Icons" -#define kAISelecteFile1CommandPreNotifierStr "AI Command Notifier: Before Selecte File 1" -#define kAISelecteFile1CommandPostNotifierStr "AI Command Notifier: After Selecte File 1" -#define kAISelecteFile2CommandPreNotifierStr "AI Command Notifier: Before Selecte File 2" -#define kAISelecteFile2CommandPostNotifierStr "AI Command Notifier: After Selecte File 2" -#define kAISelecteFile3CommandPreNotifierStr "AI Command Notifier: Before Selecte File 3" -#define kAISelecteFile3CommandPostNotifierStr "AI Command Notifier: After Selecte File 3" -#define kAISelecteFile4CommandPreNotifierStr "AI Command Notifier: Before Selecte File 4" -#define kAISelecteFile4CommandPostNotifierStr "AI Command Notifier: After Selecte File 4" -#define kAITextOrientationCommandPreNotifierStr "AI Command Notifier: Before Text Orientation" -#define kAITextOrientationCommandPostNotifierStr "AI Command Notifier: After Text Orientation" -#define kAIGlyphSubstitutionOptionsCommandPreNotifierStr "AI Command Notifier: Before Glyph Substitution Options" -#define kAIGlyphSubstitutionOptionsCommandPostNotifierStr "AI Command Notifier: After Glyph Substitution Options" -#define kAIAfterAltOptionDragCopyCommandPostNotifierStr "AI Command Notifier: After Alt/Option Drag Copy" - -#endif // AIMenuCommandNotifiers_h__ \ No newline at end of file +#ifndef AIMenuCommandNotifiers_h__ +#define AIMenuCommandNotifiers_h__ + +/* + * Name: AIMenuCommandNotifiers.h + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1995-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/** @file AIMenuCommandNotifiers.h */ + +/** @ingroup Notifiers + Menu identifiers for pre- and post- notification + See source code and \c #AIMenuSuite. */ + +#define kAINewCommandPreNotifierStr "AI Command Notifier: Before New" //File:New +#define kAINewCommandPostNotifierStr "AI Command Notifier: After New" //File:New +#define kAINewFromTemplateCommandPreNotifierStr "AI Command Notifier: Before New From Template" //File:New from Template +#define kAINewFromTemplateCommandPostNotifierStr "AI Command Notifier: After New From Template" //File:New from Template +#define kAIOpenCommandPreNotifierStr "AI Command Notifier: Before Open" //File:Open +#define kAIOpenCommandPostNotifierStr "AI Command Notifier: After Open" //File:Open +#define kAICloseCommandPreNotifierStr "AI Command Notifier: Before Close" //File:Close +#define kAICloseCommandPostNotifierStr "AI Command Notifier: After Close" //File:Close +#define kAICloseAllCommandPreNotifierStr "AI Command Notifier: Before Close All" //File:Close All +#define kAICloseAllCommandPostNotifierStr "AI Command Notifier: After Close All" //File:Close All +#define kAISaveCommandPreNotifierStr "AI Command Notifier: Before Save" //File:Save +#define kAISaveCommandPostNotifierStr "AI Command Notifier: After Save" //File:Save +#define kAISaveAsCommandPreNotifierStr "AI Command Notifier: Before Save As" //File:Save As +#define kAISaveAsCommandPostNotifierStr "AI Command Notifier: After Save As" //File:Save As +#define kAISaveACopyAsCommandPreNotifierStr "AI Command Notifier: Before Save A Copy As" //File:Save a Copy +#define kAISaveACopyAsCommandPostNotifierStr "AI Command Notifier: After Save A Copy As" //File:Save a Copy +#define kAISaveAsTemplateCommandPreNotifierStr "AI Command Notifier: Before Save As Template" //File:Save as Template +#define kAISaveAsTemplateCommandPostNotifierStr "AI Command Notifier: After Save As Template" //File:Save as Template +#define kAIAdobeAISaveForWebCommandPreNotifierStr "AI Command Notifier: Before Adobe AI Save For Web" //File:Save for Web & Devices +#define kAIAdobeAISaveForWebCommandPostNotifierStr "AI Command Notifier: After Adobe AI Save For Web" //File:Save for Web & Devices +#define kAIAdobeAISaveSelectedSlicesCommandPreNotifierStr "AI Command Notifier: Before Adobe AI Save Selected Slices" //File:Save Selected Slices +#define kAIAdobeAISaveSelectedSlicesCommandPostNotifierStr "AI Command Notifier: After Adobe AI Save Selected Slices" //File:Save Selected Slices +#define kAIRevertToSavedCommandPreNotifierStr "AI Command Notifier: Before Revert To Saved" //File:Revert +#define kAIRevertToSavedCommandPostNotifierStr "AI Command Notifier: After Revert To Saved" //File:Revert +#define kAIAIPlaceCommandPreNotifierStr "AI Command Notifier: Before AI Place" //File:Place +#define kAIAIPlaceCommandPostNotifierStr "AI Command Notifier: After AI Place" //File:Place +#define kAISaveForOfficeCommandPreNotifierStr "AI Command Notifier: Before Save for Office" //File:Save for Microsoft Office +#define kAISaveForOfficeCommandPostNotifierStr "AI Command Notifier: After Save for Office" //File:Save for Microsoft Office +#define kAIExportCommandPreNotifierStr "AI Command Notifier: Before Export" //File:Export +#define kAIExportCommandPostNotifierStr "AI Command Notifier: After Export" //File:Export +#define kAIAiBrowseForScriptCommandPreNotifierStr "AI Command Notifier: Before ai_browse_for_script" //File:Scripts:Other Script +#define kAIAiBrowseForScriptCommandPostNotifierStr "AI Command Notifier: After ai_browse_for_script" //File:Scripts:Other Script +#define kAIArtSetupCommandPreNotifierStr "AI Command Notifier: Before Art Setup" //File:Document Setup +#define kAIArtSetupCommandPostNotifierStr "AI Command Notifier: After Art Setup" //File:Document Setup +#define kAIColorModeCMYKCommandPreNotifierStr "AI Command Notifier: Before Color Mode CMYK" //File:Document Color Mode:CMYK Color +#define kAIColorModeCMYKCommandPostNotifierStr "AI Command Notifier: After Color Mode CMYK" //File:Document Color Mode:CMYK Color +#define kAIColorModeRGBCommandPreNotifierStr "AI Command Notifier: Before Color Mode RGB" //File:Document Color Mode:RGB Color +#define kAIColorModeRGBCommandPostNotifierStr "AI Command Notifier: After Color Mode RGB" //File:Document Color Mode:RGB Color +#define kAIFileInfoCommandPreNotifierStr "AI Command Notifier: Before File Info" //File:File Info +#define kAIFileInfoCommandPostNotifierStr "AI Command Notifier: After File Info" //File:File Info +#define kAIPrintCommandPreNotifierStr "AI Command Notifier: Before Print" //File:Print +#define kAIPrintCommandPostNotifierStr "AI Command Notifier: After Print" //File:Print +#define kAIQuitCommandPreNotifierStr "AI Command Notifier: Before Quit" //File:Exit +#define kAIQuitCommandPostNotifierStr "AI Command Notifier: After Quit" //File:Exit +#define kAIUndoCommandPreNotifierStr "AI Command Notifier: Before Undo" //Edit:Undo +#define kAIUndoCommandPostNotifierStr "AI Command Notifier: After Undo" //Edit:Undo +#define kAIRedoCommandPreNotifierStr "AI Command Notifier: Before Redo" //Edit:Redo +#define kAIRedoCommandPostNotifierStr "AI Command Notifier: After Redo" //Edit:Redo +#define kAICutCommandPreNotifierStr "AI Command Notifier: Before Cut" //Edit:Cut +#define kAICutCommandPostNotifierStr "AI Command Notifier: After Cut" //Edit:Cut +#define kAICopyCommandPreNotifierStr "AI Command Notifier: Before Copy" //Edit:Copy +#define kAICopyCommandPostNotifierStr "AI Command Notifier: After Copy" //Edit:Copy +#define kAIPasteCommandPreNotifierStr "AI Command Notifier: Before Paste" //Edit:Paste +#define kAIPasteCommandPostNotifierStr "AI Command Notifier: After Paste" //Edit:Paste +#define kAIPasteInFrontCommandPreNotifierStr "AI Command Notifier: Before Paste in Front" //Edit:Paste in Front +#define kAIPasteInFrontCommandPostNotifierStr "AI Command Notifier: After Paste in Front" //Edit:Paste in Front +#define kAIPasteInBackCommandPreNotifierStr "AI Command Notifier: Before Paste in Back" //Edit:Paste in Back +#define kAIPasteInBackCommandPostNotifierStr "AI Command Notifier: After Paste in Back" //Edit:Paste in Back +#define kAIPasteInPlaceCommandPreNotifierStr "AI Command Notifier: Before Paste in Place" //Edit:Paste in Place +#define kAIPasteInPlaceCommandPostNotifierStr "AI Command Notifier: After Paste in Place" //Edit:Paste in Place +#define kAIPasteInAllArtboardsCommandPreNotifierStr "AI Command Notifier: Before Paste in All Artboards" //Edit:Paste on All Artboards +#define kAIPasteInAllArtboardsCommandPostNotifierStr "AI Command Notifier: After Paste in All Artboards" //Edit:Paste on All Artboards +#define kAIPasteWithoutFormattingCommandPreNotifierStr "AI Command Notifier: Before Paste without Formatting" //Edit:Paste without Formatting +#define kAIPasteWithoutFormattingCommandPostNotifierStr "AI Command Notifier: After Paste without Formatting" //Edit:Paste without Formatting +#define kAIClearCommandPreNotifierStr "AI Command Notifier: Before Clear" //Edit:Clear +#define kAIClearCommandPostNotifierStr "AI Command Notifier: After Clear" //Edit:Clear +#define kAIFindAndReplaceCommandPreNotifierStr "AI Command Notifier: Before Find and Replace" //Edit:Find and Replace +#define kAIFindAndReplaceCommandPostNotifierStr "AI Command Notifier: After Find and Replace" //Edit:Find and Replace +#define kAIFindNextCommandPreNotifierStr "AI Command Notifier: Before Find Next" //Edit:Find Next +#define kAIFindNextCommandPostNotifierStr "AI Command Notifier: After Find Next" //Edit:Find Next +#define kAICheckSpellingCommandPreNotifierStr "AI Command Notifier: Before Check Spelling" //Edit:Check Spelling +#define kAICheckSpellingCommandPostNotifierStr "AI Command Notifier: After Check Spelling" //Edit:Check Spelling +#define kAIEditCustomDictionaryCommandPreNotifierStr "AI Command Notifier: Before Edit Custom Dictionary..." //Edit:Edit Custom Dictionary +#define kAIEditCustomDictionaryCommandPostNotifierStr "AI Command Notifier: After Edit Custom Dictionary..." //Edit:Edit Custom Dictionary +#define kAIDefinePatternMenuItemCommandPreNotifierStr "AI Command Notifier: Before Define Pattern Menu Item" //Edit:Define Pattern +#define kAIDefinePatternMenuItemCommandPostNotifierStr "AI Command Notifier: After Define Pattern Menu Item" //Edit:Define Pattern +#define kAIRecolorArtDialogCommandPreNotifierStr "AI Command Notifier: Before Recolor Art Dialog" //Edit:Edit Colors:Recolor Artwork +#define kAIRecolorArtDialogCommandPostNotifierStr "AI Command Notifier: After Recolor Art Dialog" //Edit:Edit Colors:Recolor Artwork +#define kAIAdjust3CommandPreNotifierStr "AI Command Notifier: Before Adjust3" //Edit:Edit Colors:Adjust Color Balance +#define kAIAdjust3CommandPostNotifierStr "AI Command Notifier: After Adjust3" //Edit:Edit Colors:Adjust Color Balance +#define kAIColors3CommandPreNotifierStr "AI Command Notifier: Before Colors3" //Edit:Edit Colors:Blend Front to Back +#define kAIColors3CommandPostNotifierStr "AI Command Notifier: After Colors3" //Edit:Edit Colors:Blend Front to Back +#define kAIColors4CommandPreNotifierStr "AI Command Notifier: Before Colors4" //Edit:Edit Colors:Blend Horizontally +#define kAIColors4CommandPostNotifierStr "AI Command Notifier: After Colors4" //Edit:Edit Colors:Blend Horizontally +#define kAIColors5CommandPreNotifierStr "AI Command Notifier: Before Colors5" //Edit:Edit Colors:Blend Vertically +#define kAIColors5CommandPostNotifierStr "AI Command Notifier: After Colors5" //Edit:Edit Colors:Blend Vertically +#define kAIColors8CommandPreNotifierStr "AI Command Notifier: Before Colors8" //Edit:Edit Colors:Convert to CMYK +#define kAIColors8CommandPostNotifierStr "AI Command Notifier: After Colors8" //Edit:Edit Colors:Convert to CMYK +#define kAIColors7CommandPreNotifierStr "AI Command Notifier: Before Colors7" //Edit:Edit Colors:Convert to Grayscale +#define kAIColors7CommandPostNotifierStr "AI Command Notifier: After Colors7" //Edit:Edit Colors:Convert to Grayscale +#define kAIColors9CommandPreNotifierStr "AI Command Notifier: Before Colors9" //Edit:Edit Colors:Convert to RGB +#define kAIColors9CommandPostNotifierStr "AI Command Notifier: After Colors9" //Edit:Edit Colors:Convert to RGB +#define kAIColors6CommandPreNotifierStr "AI Command Notifier: Before Colors6" //Edit:Edit Colors:Invert Colors +#define kAIColors6CommandPostNotifierStr "AI Command Notifier: After Colors6" //Edit:Edit Colors:Invert Colors +#define kAIOverprint2CommandPreNotifierStr "AI Command Notifier: Before Overprint2" //Edit:Edit Colors:Overprint Black +#define kAIOverprint2CommandPostNotifierStr "AI Command Notifier: After Overprint2" //Edit:Edit Colors:Overprint Black +#define kAISaturate3CommandPreNotifierStr "AI Command Notifier: Before Saturate3" //Edit:Edit Colors:Saturate +#define kAISaturate3CommandPostNotifierStr "AI Command Notifier: After Saturate3" //Edit:Edit Colors:Saturate +#define kAIEditOriginalMenuItemCommandPreNotifierStr "AI Command Notifier: Before EditOriginal Menu Item" //Edit:Edit Original +#define kAIEditOriginalMenuItemCommandPostNotifierStr "AI Command Notifier: After EditOriginal Menu Item" //Edit:Edit Original +#define kAITransparencyPresetsCommandPreNotifierStr "AI Command Notifier: Before Transparency Presets" //Edit:Transparency Flattener Presets +#define kAITransparencyPresetsCommandPostNotifierStr "AI Command Notifier: After Transparency Presets" //Edit:Transparency Flattener Presets +#define kAITracingPresetsCommandPreNotifierStr "AI Command Notifier: Before TracingPresets" //Edit:Tracing Presets +#define kAITracingPresetsCommandPostNotifierStr "AI Command Notifier: After TracingPresets" //Edit:Tracing Presets +#define kAIPrintPresetsCommandPreNotifierStr "AI Command Notifier: Before Print Presets" //Edit:Print Presets +#define kAIPrintPresetsCommandPostNotifierStr "AI Command Notifier: After Print Presets" //Edit:Print Presets +#define kAIPDFPresetsCommandPreNotifierStr "AI Command Notifier: Before PDF Presets" //Edit:Adobe PDF Presets +#define kAIPDFPresetsCommandPostNotifierStr "AI Command Notifier: After PDF Presets" //Edit:Adobe PDF Presets +#define kAISWFPresetsCommandPreNotifierStr "AI Command Notifier: Before SWFPresets" //Edit:SWF Presets +#define kAISWFPresetsCommandPostNotifierStr "AI Command Notifier: After SWFPresets" //Edit:SWF Presets +#define kAIPerspectiveGridPresetsCommandPreNotifierStr "AI Command Notifier: Before PerspectiveGridPresets" //Edit:Perspective Grid Presets +#define kAIPerspectiveGridPresetsCommandPostNotifierStr "AI Command Notifier: After PerspectiveGridPresets" //Edit:Perspective Grid Presets +#define kAIColorMatchingPreferencesCommandPreNotifierStr "AI Command Notifier: Before Color Matching Preferences" //Edit:Color Settings +#define kAIColorMatchingPreferencesCommandPostNotifierStr "AI Command Notifier: After Color Matching Preferences" //Edit:Color Settings +#define kAIAssignProfileCommandPreNotifierStr "AI Command Notifier: Before Assign Profile" //Edit:Assign Profile +#define kAIAssignProfileCommandPostNotifierStr "AI Command Notifier: After Assign Profile" //Edit:Assign Profile +#define kAIKBSCMenuItemCommandPreNotifierStr "AI Command Notifier: Before KBSC Menu Item" //Edit:Keyboard Shortcuts +#define kAIKBSCMenuItemCommandPostNotifierStr "AI Command Notifier: After KBSC Menu Item" //Edit:Keyboard Shortcuts +#define kAIPreferencesCommandPreNotifierStr "AI Command Notifier: Before Preferences" //Edit:Preferences:General +#define kAIPreferencesCommandPostNotifierStr "AI Command Notifier: After Preferences" //Edit:Preferences:General +#define kAISelectionPreferencesCommandPreNotifierStr "AI Command Notifier: Before Selection Preferences" //Edit:Preferences:Selection & Anchor Display +#define kAISelectionPreferencesCommandPostNotifierStr "AI Command Notifier: After Selection Preferences" //Edit:Preferences:Selection & Anchor Display +#define kAIKeyboardPreferencesCommandPreNotifierStr "AI Command Notifier: Before Keyboard Preferences" //Edit:Preferences:Type +#define kAIKeyboardPreferencesCommandPostNotifierStr "AI Command Notifier: After Keyboard Preferences" //Edit:Preferences:Type +#define kAIUnitUndoPreferencesCommandPreNotifierStr "AI Command Notifier: Before Unit Undo Preferences" //Edit:Preferences:Units +#define kAIUnitUndoPreferencesCommandPostNotifierStr "AI Command Notifier: After Unit Undo Preferences" //Edit:Preferences:Units +#define kAIGridPreferencesCommandPreNotifierStr "AI Command Notifier: Before Grid Preferences" //Edit:Preferences:Guides & Grid +#define kAIGridPreferencesCommandPostNotifierStr "AI Command Notifier: After Grid Preferences" //Edit:Preferences:Guides & Grid +#define kAISnapomaticPreferencesCommandPreNotifierStr "AI Command Notifier: Before Snapomatic Preferences" //Edit:Preferences:Smart Guides +#define kAISnapomaticPreferencesCommandPostNotifierStr "AI Command Notifier: After Snapomatic Preferences" //Edit:Preferences:Smart Guides +#define kAISlicePreferencesCommandPreNotifierStr "AI Command Notifier: Before Slice Preferences" //Edit:Preferences:Slices +#define kAISlicePreferencesCommandPostNotifierStr "AI Command Notifier: After Slice Preferences" //Edit:Preferences:Slices +#define kAIHyphenationPreferencesCommandPreNotifierStr "AI Command Notifier: Before Hyphenation Preferences" //Edit:Preferences:Hyphenation +#define kAIHyphenationPreferencesCommandPostNotifierStr "AI Command Notifier: After Hyphenation Preferences" //Edit:Preferences:Hyphenation +#define kAIPluginsFolderPreferencesCommandPreNotifierStr "AI Command Notifier: Before Plugins Folder Preferences" //Edit:Preferences:Plug-ins & Scratch Disks +#define kAIPluginsFolderPreferencesCommandPostNotifierStr "AI Command Notifier: After Plugins Folder Preferences" //Edit:Preferences:Plug-ins & Scratch Disks +#define kAIUserInterfacePreferencesCommandPreNotifierStr "AI Command Notifier: Before User Interface Preferences" //Edit:Preferences:User Interface +#define kAIUserInterfacePreferencesCommandPostNotifierStr "AI Command Notifier: After User Interface Preferences" //Edit:Preferences:User Interface +#define kAIFileClipboardPrefCommandPreNotifierStr "AI Command Notifier: Before FileClipboardPref" //Edit:Preferences:File Handling & Clipboard +#define kAIFileClipboardPrefCommandPostNotifierStr "AI Command Notifier: After FileClipboardPref" //Edit:Preferences:File Handling & Clipboard +#define kAIBlackPrefCommandPreNotifierStr "AI Command Notifier: Before BlackPref" //Edit:Preferences:Appearance of Black +#define kAIBlackPrefCommandPostNotifierStr "AI Command Notifier: After BlackPref" //Edit:Preferences:Appearance of Black +#define kAITransformAgainCommandPreNotifierStr "AI Command Notifier: Before Transform Again" //Object:Transform:Transform Again +#define kAITransformAgainCommandPostNotifierStr "AI Command Notifier: After Transform Again" //Object:Transform:Transform Again +#define kAIMoveObjectsCommandPreNotifierStr "AI Command Notifier: Before Move Objects" //Object:Transform:Move +#define kAIMoveObjectsCommandPostNotifierStr "AI Command Notifier: After Move Objects" //Object:Transform:Move +#define kAITransformRotateCommandPreNotifierStr "AI Command Notifier: Before Transform - Rotate" //Object:Transform:Rotate +#define kAITransformRotateCommandPostNotifierStr "AI Command Notifier: After Transform - Rotate" //Object:Transform:Rotate +#define kAITransformReflectCommandPreNotifierStr "AI Command Notifier: Before Transform - Reflect" //Object:Transform:Reflect +#define kAITransformReflectCommandPostNotifierStr "AI Command Notifier: After Transform - Reflect" //Object:Transform:Reflect +#define kAITransformScaleCommandPreNotifierStr "AI Command Notifier: Before Transform - Scale" //Object:Transform:Scale +#define kAITransformScaleCommandPostNotifierStr "AI Command Notifier: After Transform - Scale" //Object:Transform:Scale +#define kAITransformShearCommandPreNotifierStr "AI Command Notifier: Before Transform - Shear" //Object:Transform:Shear +#define kAITransformShearCommandPostNotifierStr "AI Command Notifier: After Transform - Shear" //Object:Transform:Shear +#define kAITransformV23CommandPreNotifierStr "AI Command Notifier: Before Transform v23" //Object:Transform:Transform Each +#define kAITransformV23CommandPostNotifierStr "AI Command Notifier: After Transform v23" //Object:Transform:Transform Each +#define kAIAIResetBoundingBoxCommandPreNotifierStr "AI Command Notifier: Before AI Reset Bounding Box" //Object:Transform:Reset Bounding Box +#define kAIAIResetBoundingBoxCommandPostNotifierStr "AI Command Notifier: After AI Reset Bounding Box" //Object:Transform:Reset Bounding Box +#define kAISendToFrontCommandPreNotifierStr "AI Command Notifier: Before Send to Front" //Object:Arrange:Bring to Front +#define kAISendToFrontCommandPostNotifierStr "AI Command Notifier: After Send to Front" //Object:Arrange:Bring to Front +#define kAISendForwardCommandPreNotifierStr "AI Command Notifier: Before Send Forward" //Object:Arrange:Bring Forward +#define kAISendForwardCommandPostNotifierStr "AI Command Notifier: After Send Forward" //Object:Arrange:Bring Forward +#define kAISendBackwardCommandPreNotifierStr "AI Command Notifier: Before Send Backward" //Object:Arrange:Send Backward +#define kAISendBackwardCommandPostNotifierStr "AI Command Notifier: After Send Backward" //Object:Arrange:Send Backward +#define kAISendToBackCommandPreNotifierStr "AI Command Notifier: Before Send to Back" //Object:Arrange:Send to Back +#define kAISendToBackCommandPostNotifierStr "AI Command Notifier: After Send to Back" //Object:Arrange:Send to Back +#define kAISelectionHat2CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 2" //Object:Arrange:Send to Current Layer +#define kAISelectionHat2CommandPostNotifierStr "AI Command Notifier: After Selection Hat 2" //Object:Arrange:Send to Current Layer +#define kAIGroupCommandPreNotifierStr "AI Command Notifier: Before Group" //Object:Group +#define kAIGroupCommandPostNotifierStr "AI Command Notifier: After Group" //Object:Group +#define kAIUngroupCommandPreNotifierStr "AI Command Notifier: Before Ungroup" //Object:Ungroup +#define kAIUngroupCommandPostNotifierStr "AI Command Notifier: After Ungroup" //Object:Ungroup +#define kAILockCommandPreNotifierStr "AI Command Notifier: Before Lock" //Object:Lock:Selection +#define kAILockCommandPostNotifierStr "AI Command Notifier: After Lock" //Object:Lock:Selection +#define kAISelectionHat5CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 5" //Object:Lock:All Artwork Above +#define kAISelectionHat5CommandPostNotifierStr "AI Command Notifier: After Selection Hat 5" //Object:Lock:All Artwork Above +#define kAISelectionHat7CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 7" //Object:Lock:Other Layers +#define kAISelectionHat7CommandPostNotifierStr "AI Command Notifier: After Selection Hat 7" //Object:Lock:Other Layers +#define kAIUnlockAllCommandPreNotifierStr "AI Command Notifier: Before Unlock All" //Object:Unlock All +#define kAIUnlockAllCommandPostNotifierStr "AI Command Notifier: After Unlock All" //Object:Unlock All +#define kAIHideCommandPreNotifierStr "AI Command Notifier: Before Hide" //Object:Hide:Selection +#define kAIHideCommandPostNotifierStr "AI Command Notifier: After Hide" //Object:Hide:Selection +#define kAISelectionHat4CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 4" //Object:Hide:All Artwork Above +#define kAISelectionHat4CommandPostNotifierStr "AI Command Notifier: After Selection Hat 4" //Object:Hide:All Artwork Above +#define kAISelectionHat6CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 6" //Object:Hide:Other Layers +#define kAISelectionHat6CommandPostNotifierStr "AI Command Notifier: After Selection Hat 6" //Object:Hide:Other Layers +#define kAIUnhideAllCommandPreNotifierStr "AI Command Notifier: Before Unhide All" //Object:Show All +#define kAIUnhideAllCommandPostNotifierStr "AI Command Notifier: After Unhide All" //Object:Show All +#define kAIExpand3CommandPreNotifierStr "AI Command Notifier: Before Expand3" //Object:Expand +#define kAIExpand3CommandPostNotifierStr "AI Command Notifier: After Expand3" //Object:Expand +#define kAIExpandStyleCommandPreNotifierStr "AI Command Notifier: Before Expand Style" //Object:Expand Appearance +#define kAIExpandStyleCommandPostNotifierStr "AI Command Notifier: After Expand Style" //Object:Expand Appearance +#define kAIFlattenTransparency1CommandPreNotifierStr "AI Command Notifier: Before FlattenTransparency1" //Object:Flatten Transparency +#define kAIFlattenTransparency1CommandPostNotifierStr "AI Command Notifier: After FlattenTransparency1" //Object:Flatten Transparency +#define kAIRasterize8MenuItemCommandPreNotifierStr "AI Command Notifier: Before Rasterize 8 menu item" //Object:Rasterize +#define kAIRasterize8MenuItemCommandPostNotifierStr "AI Command Notifier: After Rasterize 8 menu item" //Object:Rasterize +#define kAIMakeMeshCommandPreNotifierStr "AI Command Notifier: Before make mesh" //Object:Create Gradient Mesh +#define kAIMakeMeshCommandPostNotifierStr "AI Command Notifier: After make mesh" //Object:Create Gradient Mesh +#define kAIAIObjectMosaicPlugIn4CommandPreNotifierStr "AI Command Notifier: Before AI Object Mosaic Plug-in4" //Object:Create Object Mosaic +#define kAIAIObjectMosaicPlugIn4CommandPostNotifierStr "AI Command Notifier: After AI Object Mosaic Plug-in4" //Object:Create Object Mosaic +#define kAITrimMarkV25CommandPreNotifierStr "AI Command Notifier: Before TrimMark v25" //Object:Create Trim Marks +#define kAITrimMarkV25CommandPostNotifierStr "AI Command Notifier: After TrimMark v25" //Object:Create Trim Marks +#define kAIAISliceMakeSliceCommandPreNotifierStr "AI Command Notifier: Before AISlice Make Slice" //Object:Slice:Make +#define kAIAISliceMakeSliceCommandPostNotifierStr "AI Command Notifier: After AISlice Make Slice" //Object:Slice:Make +#define kAIAISliceReleaseSliceCommandPreNotifierStr "AI Command Notifier: Before AISlice Release Slice" //Object:Slice:Release +#define kAIAISliceReleaseSliceCommandPostNotifierStr "AI Command Notifier: After AISlice Release Slice" //Object:Slice:Release +#define kAIAISliceCreateFromGuidesCommandPreNotifierStr "AI Command Notifier: Before AISlice Create from Guides" //Object:Slice:Create from Guides +#define kAIAISliceCreateFromGuidesCommandPostNotifierStr "AI Command Notifier: After AISlice Create from Guides" //Object:Slice:Create from Guides +#define kAIAISliceCreateFromSelectionCommandPreNotifierStr "AI Command Notifier: Before AISlice Create from Selection" //Object:Slice:Create from Selection +#define kAIAISliceCreateFromSelectionCommandPostNotifierStr "AI Command Notifier: After AISlice Create from Selection" //Object:Slice:Create from Selection +#define kAIAISliceDuplicateCommandPreNotifierStr "AI Command Notifier: Before AISlice Duplicate" //Object:Slice:Duplicate Slice +#define kAIAISliceDuplicateCommandPostNotifierStr "AI Command Notifier: After AISlice Duplicate" //Object:Slice:Duplicate Slice +#define kAIAISliceCombineCommandPreNotifierStr "AI Command Notifier: Before AISlice Combine" //Object:Slice:Combine Slices +#define kAIAISliceCombineCommandPostNotifierStr "AI Command Notifier: After AISlice Combine" //Object:Slice:Combine Slices +#define kAIAISliceDivideCommandPreNotifierStr "AI Command Notifier: Before AISlice Divide" //Object:Slice:Divide Slices +#define kAIAISliceDivideCommandPostNotifierStr "AI Command Notifier: After AISlice Divide" //Object:Slice:Divide Slices +#define kAIAISliceDeleteAllSlicesCommandPreNotifierStr "AI Command Notifier: Before AISlice Delete All Slices" //Object:Slice:Delete All +#define kAIAISliceDeleteAllSlicesCommandPostNotifierStr "AI Command Notifier: After AISlice Delete All Slices" //Object:Slice:Delete All +#define kAIAISliceSliceOptionsCommandPreNotifierStr "AI Command Notifier: Before AISlice Slice Options" //Object:Slice:Slice Options +#define kAIAISliceSliceOptionsCommandPostNotifierStr "AI Command Notifier: After AISlice Slice Options" //Object:Slice:Slice Options +#define kAIAISliceClipToArtboardCommandPreNotifierStr "AI Command Notifier: Before AISlice Clip to Artboard" //Object:Slice:Clip to Artboard +#define kAIAISliceClipToArtboardCommandPostNotifierStr "AI Command Notifier: After AISlice Clip to Artboard" //Object:Slice:Clip to Artboard +#define kAIJoinCommandPreNotifierStr "AI Command Notifier: Before Join" //Object:Path:Join +#define kAIJoinCommandPostNotifierStr "AI Command Notifier: After Join" //Object:Path:Join +#define kAIAverageCommandPreNotifierStr "AI Command Notifier: Before Average" //Object:Path:Average +#define kAIAverageCommandPostNotifierStr "AI Command Notifier: After Average" //Object:Path:Average +#define kAIOffsetPathV22CommandPreNotifierStr "AI Command Notifier: Before OffsetPath v22" //Object:Path:Outline Stroke +#define kAIOffsetPathV22CommandPostNotifierStr "AI Command Notifier: After OffsetPath v22" //Object:Path:Outline Stroke +#define kAIOffsetPathV23CommandPreNotifierStr "AI Command Notifier: Before OffsetPath v23" //Object:Path:Offset Path +#define kAIOffsetPathV23CommandPostNotifierStr "AI Command Notifier: After OffsetPath v23" //Object:Path:Offset Path +#define kAISimplifyMenuItemCommandPreNotifierStr "AI Command Notifier: Before simplify menu item" //Object:Path:Simplify +#define kAISimplifyMenuItemCommandPostNotifierStr "AI Command Notifier: After simplify menu item" //Object:Path:Simplify +#define kAIAddAnchorPoints2CommandPreNotifierStr "AI Command Notifier: Before Add Anchor Points2" //Object:Path:Add Anchor Points +#define kAIAddAnchorPoints2CommandPostNotifierStr "AI Command Notifier: After Add Anchor Points2" //Object:Path:Add Anchor Points +#define kAIRemoveAnchorPointsMenuCommandPreNotifierStr "AI Command Notifier: Before Remove Anchor Points menu" //Object:Path:Remove Anchor Points +#define kAIRemoveAnchorPointsMenuCommandPostNotifierStr "AI Command Notifier: After Remove Anchor Points menu" //Object:Path:Remove Anchor Points +#define kAIKnifeTool2CommandPreNotifierStr "AI Command Notifier: Before Knife Tool2" //Object:Path:Divide Objects Below +#define kAIKnifeTool2CommandPostNotifierStr "AI Command Notifier: After Knife Tool2" //Object:Path:Divide Objects Below +#define kAIRowsAndColumnsCommandPreNotifierStr "AI Command Notifier: Before Rows and Columns...." //Object:Path:Split Into Grid +#define kAIRowsAndColumnsCommandPostNotifierStr "AI Command Notifier: After Rows and Columns...." //Object:Path:Split Into Grid +#define kAICleanupMenuItemCommandPreNotifierStr "AI Command Notifier: Before cleanup menu item" //Object:Path:Clean Up +#define kAICleanupMenuItemCommandPostNotifierStr "AI Command Notifier: After cleanup menu item" //Object:Path:Clean Up +#define kAIPathBlendMakeCommandPreNotifierStr "AI Command Notifier: Before Path Blend Make" //Object:Blend:Make +#define kAIPathBlendMakeCommandPostNotifierStr "AI Command Notifier: After Path Blend Make" //Object:Blend:Make +#define kAIPathBlendReleaseCommandPreNotifierStr "AI Command Notifier: Before Path Blend Release" //Object:Blend:Release +#define kAIPathBlendReleaseCommandPostNotifierStr "AI Command Notifier: After Path Blend Release" //Object:Blend:Release +#define kAIPathBlendOptionsCommandPreNotifierStr "AI Command Notifier: Before Path Blend Options" //Object:Blend:Blend Options +#define kAIPathBlendOptionsCommandPostNotifierStr "AI Command Notifier: After Path Blend Options" //Object:Blend:Blend Options +#define kAIPathBlendExpandCommandPreNotifierStr "AI Command Notifier: Before Path Blend Expand" //Object:Blend:Expand +#define kAIPathBlendExpandCommandPostNotifierStr "AI Command Notifier: After Path Blend Expand" //Object:Blend:Expand +#define kAIPathBlendReplaceSpineCommandPreNotifierStr "AI Command Notifier: Before Path Blend Replace Spine" //Object:Blend:Replace Spine +#define kAIPathBlendReplaceSpineCommandPostNotifierStr "AI Command Notifier: After Path Blend Replace Spine" //Object:Blend:Replace Spine +#define kAIPathBlendReverseSpineCommandPreNotifierStr "AI Command Notifier: Before Path Blend Reverse Spine" //Object:Blend:Reverse Spine +#define kAIPathBlendReverseSpineCommandPostNotifierStr "AI Command Notifier: After Path Blend Reverse Spine" //Object:Blend:Reverse Spine +#define kAIPathBlendReverseStackCommandPreNotifierStr "AI Command Notifier: Before Path Blend Reverse Stack" //Object:Blend:Reverse Front to Back +#define kAIPathBlendReverseStackCommandPostNotifierStr "AI Command Notifier: After Path Blend Reverse Stack" //Object:Blend:Reverse Front to Back +#define kAIMakeWarpCommandPreNotifierStr "AI Command Notifier: Before Make Warp" //Object:Envelope Distort:Make with Warp +#define kAIMakeWarpCommandPostNotifierStr "AI Command Notifier: After Make Warp" //Object:Envelope Distort:Make with Warp +#define kAICreateEnvelopeGridCommandPreNotifierStr "AI Command Notifier: Before Create Envelope Grid" //Object:Envelope Distort:Make with Mesh +#define kAICreateEnvelopeGridCommandPostNotifierStr "AI Command Notifier: After Create Envelope Grid" //Object:Envelope Distort:Make with Mesh +#define kAIMakeEnvelopeCommandPreNotifierStr "AI Command Notifier: Before Make Envelope" //Object:Envelope Distort:Make with Top Object +#define kAIMakeEnvelopeCommandPostNotifierStr "AI Command Notifier: After Make Envelope" //Object:Envelope Distort:Make with Top Object +#define kAIReleaseEnvelopeCommandPreNotifierStr "AI Command Notifier: Before Release Envelope" //Object:Envelope Distort:Release +#define kAIReleaseEnvelopeCommandPostNotifierStr "AI Command Notifier: After Release Envelope" //Object:Envelope Distort:Release +#define kAIEnvelopeOptionsCommandPreNotifierStr "AI Command Notifier: Before Envelope Options" //Object:Envelope Distort:Envelope Options +#define kAIEnvelopeOptionsCommandPostNotifierStr "AI Command Notifier: After Envelope Options" //Object:Envelope Distort:Envelope Options +#define kAIExpandEnvelopeCommandPreNotifierStr "AI Command Notifier: Before Expand Envelope" //Object:Envelope Distort:Expand +#define kAIExpandEnvelopeCommandPostNotifierStr "AI Command Notifier: After Expand Envelope" //Object:Envelope Distort:Expand +#define kAIEditEnvelopeContentsCommandPreNotifierStr "AI Command Notifier: Before Edit Envelope Contents" //Object:Envelope Distort:Edit Contents +#define kAIEditEnvelopeContentsCommandPostNotifierStr "AI Command Notifier: After Edit Envelope Contents" //Object:Envelope Distort:Edit Contents +#define kAIAttachToActivePlaneCommandPreNotifierStr "AI Command Notifier: Before Attach to Active Plane" //Object:Perspective:Attach to Active Plane +#define kAIAttachToActivePlaneCommandPostNotifierStr "AI Command Notifier: After Attach to Active Plane" //Object:Perspective:Attach to Active Plane +#define kAIReleaseWithPerspectiveCommandPreNotifierStr "AI Command Notifier: Before Release with Perspective" //Object:Perspective:Release with Perspective +#define kAIReleaseWithPerspectiveCommandPostNotifierStr "AI Command Notifier: After Release with Perspective" //Object:Perspective:Release with Perspective +#define kAIShowObjectGridPlaneCommandPreNotifierStr "AI Command Notifier: Before Show Object Grid Plane" //Object:Perspective:Move Plane to Match Object +#define kAIShowObjectGridPlaneCommandPostNotifierStr "AI Command Notifier: After Show Object Grid Plane" //Object:Perspective:Move Plane to Match Object +#define kAIEditOriginalObjectCommandPreNotifierStr "AI Command Notifier: Before Edit Original Object" //Object:Perspective:Edit Text +#define kAIEditOriginalObjectCommandPostNotifierStr "AI Command Notifier: After Edit Original Object" //Object:Perspective:Edit Text +#define kAIMakePlanetXCommandPreNotifierStr "AI Command Notifier: Before Make Planet X" //Object:Live Paint:Make +#define kAIMakePlanetXCommandPostNotifierStr "AI Command Notifier: After Make Planet X" //Object:Live Paint:Make +#define kAIMargePlanetXCommandPreNotifierStr "AI Command Notifier: Before Marge Planet X" //Object:Live Paint:Merge +#define kAIMargePlanetXCommandPostNotifierStr "AI Command Notifier: After Marge Planet X" //Object:Live Paint:Merge +#define kAIReleasePlanetXCommandPreNotifierStr "AI Command Notifier: Before Release Planet X" //Object:Live Paint:Release +#define kAIReleasePlanetXCommandPostNotifierStr "AI Command Notifier: After Release Planet X" //Object:Live Paint:Release +#define kAIPlanetXOptionsCommandPreNotifierStr "AI Command Notifier: Before Planet X Options" //Object:Live Paint:Gap Options +#define kAIPlanetXOptionsCommandPostNotifierStr "AI Command Notifier: After Planet X Options" //Object:Live Paint:Gap Options +#define kAIExpandPlanetXCommandPreNotifierStr "AI Command Notifier: Before Expand Planet X" //Object:Live Paint:Expand +#define kAIExpandPlanetXCommandPostNotifierStr "AI Command Notifier: After Expand Planet X" //Object:Live Paint:Expand +#define kAIMakeTracingCommandPreNotifierStr "AI Command Notifier: Before Make Tracing" //Object:Live Trace:Make +#define kAIMakeTracingCommandPostNotifierStr "AI Command Notifier: After Make Tracing" //Object:Live Trace:Make +#define kAIMakeAndExpandCommandPreNotifierStr "AI Command Notifier: Before Make and Expand" //Object:Live Trace:Make and Expand +#define kAIMakeAndExpandCommandPostNotifierStr "AI Command Notifier: After Make and Expand" //Object:Live Trace:Make and Expand +#define kAIMakeAndConvertToLivePaintCommandPreNotifierStr "AI Command Notifier: Before Make and Convert to Live Paint" //Object:Live Trace:Make and Convert to Live Paint +#define kAIMakeAndConvertToLivePaintCommandPostNotifierStr "AI Command Notifier: After Make and Convert to Live Paint" //Object:Live Trace:Make and Convert to Live Paint +#define kAIReleaseTracingCommandPreNotifierStr "AI Command Notifier: Before Release Tracing" //Object:Live Trace:Release +#define kAIReleaseTracingCommandPostNotifierStr "AI Command Notifier: After Release Tracing" //Object:Live Trace:Release +#define kAITracingOptionsCommandPreNotifierStr "AI Command Notifier: Before Tracing Options" //Object:Live Trace:Tracing Options +#define kAITracingOptionsCommandPostNotifierStr "AI Command Notifier: After Tracing Options" //Object:Live Trace:Tracing Options +#define kAIExpandTracingCommandPreNotifierStr "AI Command Notifier: Before Expand Tracing" //Object:Live Trace:Expand +#define kAIExpandTracingCommandPostNotifierStr "AI Command Notifier: After Expand Tracing" //Object:Live Trace:Expand +#define kAIExpandAsViewedCommandPreNotifierStr "AI Command Notifier: Before Expand as Viewed" //Object:Live Trace:Expand as Viewed +#define kAIExpandAsViewedCommandPostNotifierStr "AI Command Notifier: After Expand as Viewed" //Object:Live Trace:Expand as Viewed +#define kAIPaintTracingCommandPreNotifierStr "AI Command Notifier: Before Paint Tracing" //Object:Live Trace:Convert to Live Paint +#define kAIPaintTracingCommandPostNotifierStr "AI Command Notifier: After Paint Tracing" //Object:Live Trace:Convert to Live Paint +#define kAIShowNoImageCommandPreNotifierStr "AI Command Notifier: Before ShowNoImage" //Object:Live Trace:Show No Image +#define kAIShowNoImageCommandPostNotifierStr "AI Command Notifier: After ShowNoImage" //Object:Live Trace:Show No Image +#define kAIShowOriginalImageCommandPreNotifierStr "AI Command Notifier: Before ShowOriginalImage" //Object:Live Trace:Show Original Image +#define kAIShowOriginalImageCommandPostNotifierStr "AI Command Notifier: After ShowOriginalImage" //Object:Live Trace:Show Original Image +#define kAIShowPreprocessedImageCommandPreNotifierStr "AI Command Notifier: Before Show Preprocessed Image" //Object:Live Trace:Show Adjusted Image +#define kAIShowPreprocessedImageCommandPostNotifierStr "AI Command Notifier: After Show Preprocessed Image" //Object:Live Trace:Show Adjusted Image +#define kAIShowTransparentImageCommandPreNotifierStr "AI Command Notifier: Before ShowTransparentImage" //Object:Live Trace:Show Transparent Image +#define kAIShowTransparentImageCommandPostNotifierStr "AI Command Notifier: After ShowTransparentImage" //Object:Live Trace:Show Transparent Image +#define kAIShowNoArtworkCommandPreNotifierStr "AI Command Notifier: Before ShowNoArtwork" //Object:Live Trace:Show No Tracing Result +#define kAIShowNoArtworkCommandPostNotifierStr "AI Command Notifier: After ShowNoArtwork" //Object:Live Trace:Show No Tracing Result +#define kAIShowArtworkCommandPreNotifierStr "AI Command Notifier: Before ShowArtwork" //Object:Live Trace:Show Tracing Result +#define kAIShowArtworkCommandPostNotifierStr "AI Command Notifier: After ShowArtwork" //Object:Live Trace:Show Tracing Result +#define kAIShowPathsCommandPreNotifierStr "AI Command Notifier: Before ShowPaths" //Object:Live Trace:Show Outlines +#define kAIShowPathsCommandPostNotifierStr "AI Command Notifier: After ShowPaths" //Object:Live Trace:Show Outlines +#define kAIShowPathsAndTransparentArtworkCommandPreNotifierStr "AI Command Notifier: Before ShowPathsAndTransparentArtwork" //Object:Live Trace:Show Outlines with Tracing +#define kAIShowPathsAndTransparentArtworkCommandPostNotifierStr "AI Command Notifier: After ShowPathsAndTransparentArtwork" //Object:Live Trace:Show Outlines with Tracing +#define kAIMakeTextWrapCommandPreNotifierStr "AI Command Notifier: Before Make Text Wrap" //Object:Text Wrap:Make +#define kAIMakeTextWrapCommandPostNotifierStr "AI Command Notifier: After Make Text Wrap" //Object:Text Wrap:Make +#define kAIReleaseTextWrapCommandPreNotifierStr "AI Command Notifier: Before Release Text Wrap" //Object:Text Wrap:Release +#define kAIReleaseTextWrapCommandPostNotifierStr "AI Command Notifier: After Release Text Wrap" //Object:Text Wrap:Release +#define kAITextWrapOptionsCommandPreNotifierStr "AI Command Notifier: Before Text Wrap Options..." //Object:Text Wrap:Text Wrap Options +#define kAITextWrapOptionsCommandPostNotifierStr "AI Command Notifier: After Text Wrap Options..." //Object:Text Wrap:Text Wrap Options +#define kAIMakeMaskCommandPreNotifierStr "AI Command Notifier: Before Make Mask" //Object:Clipping Mask:Make +#define kAIMakeMaskCommandPostNotifierStr "AI Command Notifier: After Make Mask" //Object:Clipping Mask:Make +#define kAIReleaseMaskCommandPreNotifierStr "AI Command Notifier: Before Release Mask" //Object:Clipping Mask:Release +#define kAIReleaseMaskCommandPostNotifierStr "AI Command Notifier: After Release Mask" //Object:Clipping Mask:Release +#define kAIEditMaskCommandPreNotifierStr "AI Command Notifier: Before Edit Mask" //Object:Clipping Mask:Edit Contents +#define kAIEditMaskCommandPostNotifierStr "AI Command Notifier: After Edit Mask" //Object:Clipping Mask:Edit Contents +#define kAIMakeCompoundPathCommandPreNotifierStr "AI Command Notifier: Before Make Compound Path" //Object:Compound Path:Make +#define kAIMakeCompoundPathCommandPostNotifierStr "AI Command Notifier: After Make Compound Path" //Object:Compound Path:Make +#define kAIReleaseCompoundPathCommandPreNotifierStr "AI Command Notifier: Before Release Compound Path" //Object:Compound Path:Release +#define kAIReleaseCompoundPathCommandPostNotifierStr "AI Command Notifier: After Release Compound Path" //Object:Compound Path:Release +#define kAIMakeCropMarksCommandPreNotifierStr "AI Command Notifier: Before Make Crop Marks" //Object:Artboards:Convert to Artboards +#define kAIMakeCropMarksCommandPostNotifierStr "AI Command Notifier: After Make Crop Marks" //Object:Artboards:Convert to Artboards +#define kAIReArrangeArtboardsCommandPreNotifierStr "AI Command Notifier: Before ReArrange Artboards" //Object:Artboards:Rearrange +#define kAIReArrangeArtboardsCommandPostNotifierStr "AI Command Notifier: After ReArrange Artboards" //Object:Artboards:Rearrange +#define kAIFitArtboardToArtworkBoundsCommandPreNotifierStr "AI Command Notifier: Before Fit Artboard to artwork bounds" //Object:Artboards:Fit to Artwork Bounds +#define kAIFitArtboardToArtworkBoundsCommandPostNotifierStr "AI Command Notifier: After Fit Artboard to artwork bounds" //Object:Artboards:Fit to Artwork Bounds +#define kAIFitArtboardToSelectedArtCommandPreNotifierStr "AI Command Notifier: Before Fit Artboard to selected Art" //Object:Artboards:Fit to Selected Art +#define kAIFitArtboardToSelectedArtCommandPostNotifierStr "AI Command Notifier: After Fit Artboard to selected Art" //Object:Artboards:Fit to Selected Art +#define kAISetGraphStyleCommandPreNotifierStr "AI Command Notifier: Before Set Graph Style" //Object:Graph:Type +#define kAISetGraphStyleCommandPostNotifierStr "AI Command Notifier: After Set Graph Style" //Object:Graph:Type +#define kAIEditGraphDataCommandPreNotifierStr "AI Command Notifier: Before Edit Graph Data" //Object:Graph:Data +#define kAIEditGraphDataCommandPostNotifierStr "AI Command Notifier: After Edit Graph Data" //Object:Graph:Data +#define kAIDefineGraphDesignCommandPreNotifierStr "AI Command Notifier: Before Define Graph Design" //Object:Graph:Design +#define kAIDefineGraphDesignCommandPostNotifierStr "AI Command Notifier: After Define Graph Design" //Object:Graph:Design +#define kAISetBarDesignCommandPreNotifierStr "AI Command Notifier: Before Set Bar Design" //Object:Graph:Column +#define kAISetBarDesignCommandPostNotifierStr "AI Command Notifier: After Set Bar Design" //Object:Graph:Column +#define kAISetIconDesignCommandPreNotifierStr "AI Command Notifier: Before Set Icon Design" //Object:Graph:Marker +#define kAISetIconDesignCommandPostNotifierStr "AI Command Notifier: After Set Icon Design" //Object:Graph:Marker +#define kAIAlternateGlyphPalettePluginCommandPreNotifierStr "AI Command Notifier: Before alternate glyph palette plugin" //Type:Glyphs +#define kAIAlternateGlyphPalettePluginCommandPostNotifierStr "AI Command Notifier: After alternate glyph palette plugin" //Type:Glyphs +#define kAIAreaTextOptionsCommandPreNotifierStr "AI Command Notifier: Before Area Text Options" //Type:Area Type Options +#define kAIAreaTextOptionsCommandPostNotifierStr "AI Command Notifier: After Area Text Options" //Type:Area Type Options +#define kAITextPathTypeRainbowCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Rainbow" //Type:Type on a Path:Rainbow +#define kAITextPathTypeRainbowCommandPostNotifierStr "AI Command Notifier: After Text Path Type Rainbow" //Type:Type on a Path:Rainbow +#define kAITextPathTypeSkewCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Skew" //Type:Type on a Path:Skew +#define kAITextPathTypeSkewCommandPostNotifierStr "AI Command Notifier: After Text Path Type Skew" //Type:Type on a Path:Skew +#define kAITextPathType3dCommandPreNotifierStr "AI Command Notifier: Before Text Path Type 3d" //Type:Type on a Path:3D Ribbon +#define kAITextPathType3dCommandPostNotifierStr "AI Command Notifier: After Text Path Type 3d" //Type:Type on a Path:3D Ribbon +#define kAITextPathTypeStairsCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Stairs" //Type:Type on a Path:Stair Step +#define kAITextPathTypeStairsCommandPostNotifierStr "AI Command Notifier: After Text Path Type Stairs" //Type:Type on a Path:Stair Step +#define kAITextPathTypeGravityCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Gravity" //Type:Type on a Path:Gravity +#define kAITextPathTypeGravityCommandPostNotifierStr "AI Command Notifier: After Text Path Type Gravity" //Type:Type on a Path:Gravity +#define kAITextPathTypeOptionsCommandPreNotifierStr "AI Command Notifier: Before Text Path Type Options" //Type:Type on a Path:Type on a Path Options +#define kAITextPathTypeOptionsCommandPostNotifierStr "AI Command Notifier: After Text Path Type Options" //Type:Type on a Path:Type on a Path Options +#define kAIUpdateSelectedTypeOnPathCommandPreNotifierStr "AI Command Notifier: Before Update Selected Type On Path" //Type:Type on a Path:Update Legacy Type on a Path +#define kAIUpdateSelectedTypeOnPathCommandPostNotifierStr "AI Command Notifier: After Update Selected Type On Path" //Type:Type on a Path:Update Legacy Type on a Path +#define kAICreateThreadedTextCommandPreNotifierStr "AI Command Notifier: Before Create Threaded Text" //Type:Threaded Text:Create +#define kAICreateThreadedTextCommandPostNotifierStr "AI Command Notifier: After Create Threaded Text" //Type:Threaded Text:Create +#define kAIReleaseThreadedTextSelectionCommandPreNotifierStr "AI Command Notifier: Before Release Threaded Text Selection" //Type:Threaded Text:Release Selection +#define kAIReleaseThreadedTextSelectionCommandPostNotifierStr "AI Command Notifier: After Release Threaded Text Selection" //Type:Threaded Text:Release Selection +#define kAIRemoveThreadingCommandPreNotifierStr "AI Command Notifier: Before Remove Threading" //Type:Threaded Text:Remove Threading +#define kAIRemoveThreadingCommandPostNotifierStr "AI Command Notifier: After Remove Threading" //Type:Threaded Text:Remove Threading +#define kAIAdobeInternalCompositeFontPluginCommandPreNotifierStr "AI Command Notifier: Before Adobe internal composite font plugin" //Type:Composite Fonts +#define kAIAdobeInternalCompositeFontPluginCommandPostNotifierStr "AI Command Notifier: After Adobe internal composite font plugin" //Type:Composite Fonts +#define kAIAdobeKinsokuSettingsCommandPreNotifierStr "AI Command Notifier: Before Adobe Kinsoku Settings" //Type:Kinsoku Shori Settings +#define kAIAdobeKinsokuSettingsCommandPostNotifierStr "AI Command Notifier: After Adobe Kinsoku Settings" //Type:Kinsoku Shori Settings +#define kAIAdobeMojiKumiSettingsCommandPreNotifierStr "AI Command Notifier: Before Adobe MojiKumi Settings" //Type:Mojikumi Settings +#define kAIAdobeMojiKumiSettingsCommandPostNotifierStr "AI Command Notifier: After Adobe MojiKumi Settings" //Type:Mojikumi Settings +#define kAIFitHeadlineCommandPreNotifierStr "AI Command Notifier: Before Fit Headline" //Type:Fit Headline +#define kAIFitHeadlineCommandPostNotifierStr "AI Command Notifier: After Fit Headline" //Type:Fit Headline +#define kAITypeOutlinesCommandPreNotifierStr "AI Command Notifier: Before Type Outlines" //Type:Create Outlines +#define kAITypeOutlinesCommandPostNotifierStr "AI Command Notifier: After Type Outlines" //Type:Create Outlines +#define kAIAdobeIllustratorFindFontMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Illustrator Find Font Menu Item" //Type:Find Font +#define kAIAdobeIllustratorFindFontMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Illustrator Find Font Menu Item" //Type:Find Font +#define kAIUpperCaseChangeCaseItemCommandPreNotifierStr "AI Command Notifier: Before UpperCase Change Case Item" //Type:Change Case:UPPERCASE +#define kAIUpperCaseChangeCaseItemCommandPostNotifierStr "AI Command Notifier: After UpperCase Change Case Item" //Type:Change Case:UPPERCASE +#define kAILowerCaseChangeCaseItemCommandPreNotifierStr "AI Command Notifier: Before LowerCase Change Case Item" //Type:Change Case:lowercase +#define kAILowerCaseChangeCaseItemCommandPostNotifierStr "AI Command Notifier: After LowerCase Change Case Item" //Type:Change Case:lowercase +#define kAITitleCaseChangeCaseItemCommandPreNotifierStr "AI Command Notifier: Before Title Case Change Case Item" //Type:Change Case:Title Case +#define kAITitleCaseChangeCaseItemCommandPostNotifierStr "AI Command Notifier: After Title Case Change Case Item" //Type:Change Case:Title Case +#define kAISentenceCaseChangeCaseItemCommandPreNotifierStr "AI Command Notifier: Before Sentence case Change Case Item" //Type:Change Case:Sentence case +#define kAISentenceCaseChangeCaseItemCommandPostNotifierStr "AI Command Notifier: After Sentence case Change Case Item" //Type:Change Case:Sentence case +#define kAIAdobeIllustratorSmartPunctuationMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Illustrator Smart Punctuation Menu Item" //Type:Smart Punctuation +#define kAIAdobeIllustratorSmartPunctuationMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Illustrator Smart Punctuation Menu Item" //Type:Smart Punctuation +#define kAIAdobeOpticalAlignmentItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Optical Alignment Item" //Type:Optical Margin Alignment +#define kAIAdobeOpticalAlignmentItemCommandPostNotifierStr "AI Command Notifier: After Adobe Optical Alignment Item" //Type:Optical Margin Alignment +#define kAIShowHiddenCharactersCommandPreNotifierStr "AI Command Notifier: Before Show Hidden Characters" //Type:Show Hidden Characters +#define kAIShowHiddenCharactersCommandPostNotifierStr "AI Command Notifier: After Show Hidden Characters" //Type:Show Hidden Characters +#define kAITypeOrientationHorizontalCommandPreNotifierStr "AI Command Notifier: Before Type Orientation Horizontal" //Type:Type Orientation:Horizontal +#define kAITypeOrientationHorizontalCommandPostNotifierStr "AI Command Notifier: After Type Orientation Horizontal" //Type:Type Orientation:Horizontal +#define kAITypeOrientationVerticalCommandPreNotifierStr "AI Command Notifier: Before Type Orientation Vertical" //Type:Type Orientation:Vertical +#define kAITypeOrientationVerticalCommandPostNotifierStr "AI Command Notifier: After Type Orientation Vertical" //Type:Type Orientation:Vertical +#define kAIConvertToNativeTextCommandPreNotifierStr "AI Command Notifier: Before Convert To Native Text" //Type:Legacy Text:Update All Legacy Text +#define kAIConvertToNativeTextCommandPostNotifierStr "AI Command Notifier: After Convert To Native Text" //Type:Legacy Text:Update All Legacy Text +#define kAIConvertSelectedTextToNativeTextCommandPreNotifierStr "AI Command Notifier: Before Convert Selected Text To Native Text" //Type:Legacy Text:Update Selected Legacy Text +#define kAIConvertSelectedTextToNativeTextCommandPostNotifierStr "AI Command Notifier: After Convert Selected Text To Native Text" //Type:Legacy Text:Update Selected Legacy Text +#define kAIShowHideLegacyTextCopiesCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Legacy Text Copies" //Type:Legacy Text:Hide Copies +#define kAIShowHideLegacyTextCopiesCommandPostNotifierStr "AI Command Notifier: After Show/Hide Legacy Text Copies" //Type:Legacy Text:Hide Copies +#define kAIDeleteLegacyTextCopiesCommandPreNotifierStr "AI Command Notifier: Before Delete Legacy Text Copies" //Type:Legacy Text:Delete Copies +#define kAIDeleteLegacyTextCopiesCommandPostNotifierStr "AI Command Notifier: After Delete Legacy Text Copies" //Type:Legacy Text:Delete Copies +#define kAISelectLegacyTextCopiesCommandPreNotifierStr "AI Command Notifier: Before Select Legacy Text Copies" //Type:Legacy Text:Select Copies +#define kAISelectLegacyTextCopiesCommandPostNotifierStr "AI Command Notifier: After Select Legacy Text Copies" //Type:Legacy Text:Select Copies +#define kAISelectAllCommandPreNotifierStr "AI Command Notifier: Before Select All" //Select:All +#define kAISelectAllCommandPostNotifierStr "AI Command Notifier: After Select All" //Select:All +#define kAISelectAllInArtboardCommandPreNotifierStr "AI Command Notifier: Before Select All In Artboard" //Select:All on Active Artboard +#define kAISelectAllInArtboardCommandPostNotifierStr "AI Command Notifier: After Select All In Artboard" //Select:All on Active Artboard +#define kAIDeselectAllCommandPreNotifierStr "AI Command Notifier: Before Deselect All" //Select:Deselect +#define kAIDeselectAllCommandPostNotifierStr "AI Command Notifier: After Deselect All" //Select:Deselect +#define kAIFindReselectMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Reselect menu item" //Select:Reselect +#define kAIFindReselectMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Reselect menu item" //Select:Reselect +#define kAIInverseMenuItemCommandPreNotifierStr "AI Command Notifier: Before Inverse menu item" //Select:Inverse +#define kAIInverseMenuItemCommandPostNotifierStr "AI Command Notifier: After Inverse menu item" //Select:Inverse +#define kAISelectionHat8CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 8" //Select:Next Object Above +#define kAISelectionHat8CommandPostNotifierStr "AI Command Notifier: After Selection Hat 8" //Select:Next Object Above +#define kAISelectionHat9CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 9" //Select:Next Object Below +#define kAISelectionHat9CommandPostNotifierStr "AI Command Notifier: After Selection Hat 9" //Select:Next Object Below +#define kAIFindAppearanceMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Appearance menu item" //Select:Same:Appearance +#define kAIFindAppearanceMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Appearance menu item" //Select:Same:Appearance +#define kAIFindAppearanceAttributesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Appearance Attributes menu item" //Select:Same:Appearance Attribute +#define kAIFindAppearanceAttributesMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Appearance Attributes menu item" //Select:Same:Appearance Attribute +#define kAIFindBlendingModeMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Blending Mode menu item" //Select:Same:Blending Mode +#define kAIFindBlendingModeMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Blending Mode menu item" //Select:Same:Blending Mode +#define kAIFindFillStrokeMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Fill & Stroke menu item" //Select:Same:Fill & Stroke +#define kAIFindFillStrokeMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Fill & Stroke menu item" //Select:Same:Fill & Stroke +#define kAIFindFillColorMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Fill Color menu item" //Select:Same:Fill Color +#define kAIFindFillColorMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Fill Color menu item" //Select:Same:Fill Color +#define kAIFindOpacityMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Opacity menu item" //Select:Same:Opacity +#define kAIFindOpacityMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Opacity menu item" //Select:Same:Opacity +#define kAIFindStrokeColorMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Stroke Color menu item" //Select:Same:Stroke Color +#define kAIFindStrokeColorMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Stroke Color menu item" //Select:Same:Stroke Color +#define kAIFindStrokeWeightMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Stroke Weight menu item" //Select:Same:Stroke Weight +#define kAIFindStrokeWeightMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Stroke Weight menu item" //Select:Same:Stroke Weight +#define kAIFindStyleMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Style menu item" //Select:Same:Graphic Style +#define kAIFindStyleMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Style menu item" //Select:Same:Graphic Style +#define kAIFindSymbolInstanceMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Symbol Instance menu item" //Select:Same:Symbol Instance +#define kAIFindSymbolInstanceMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Symbol Instance menu item" //Select:Same:Symbol Instance +#define kAIFindLinkBlockSeriesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Find Link Block Series menu item" //Select:Same:Link Block Series +#define kAIFindLinkBlockSeriesMenuItemCommandPostNotifierStr "AI Command Notifier: After Find Link Block Series menu item" //Select:Same:Link Block Series +#define kAISelectionHat3CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 3" //Select:Object:All on Same Layers +#define kAISelectionHat3CommandPostNotifierStr "AI Command Notifier: After Selection Hat 3" //Select:Object:All on Same Layers +#define kAISelectionHat1CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 1" //Select:Object:Direction Handles +#define kAISelectionHat1CommandPostNotifierStr "AI Command Notifier: After Selection Hat 1" //Select:Object:Direction Handles +#define kAISelectionHat12CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 12" //Select:Object:Not Aligned to Pixel Grid +#define kAISelectionHat12CommandPostNotifierStr "AI Command Notifier: After Selection Hat 12" //Select:Object:Not Aligned to Pixel Grid +#define kAIBristleBrushStrokesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Bristle Brush Strokes menu item" //Select:Object:Bristle Brush Strokes +#define kAIBristleBrushStrokesMenuItemCommandPostNotifierStr "AI Command Notifier: After Bristle Brush Strokes menu item" //Select:Object:Bristle Brush Strokes +#define kAIBrushStrokesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Brush Strokes menu item" //Select:Object:Brush Strokes +#define kAIBrushStrokesMenuItemCommandPostNotifierStr "AI Command Notifier: After Brush Strokes menu item" //Select:Object:Brush Strokes +#define kAIClippingMasksMenuItemCommandPreNotifierStr "AI Command Notifier: Before Clipping Masks menu item" //Select:Object:Clipping Masks +#define kAIClippingMasksMenuItemCommandPostNotifierStr "AI Command Notifier: After Clipping Masks menu item" //Select:Object:Clipping Masks +#define kAIStrayPointsMenuItemCommandPreNotifierStr "AI Command Notifier: Before Stray Points menu item" //Select:Object:Stray Points +#define kAIStrayPointsMenuItemCommandPostNotifierStr "AI Command Notifier: After Stray Points menu item" //Select:Object:Stray Points +#define kAITextObjectsMenuItemCommandPreNotifierStr "AI Command Notifier: Before Text Objects menu item" //Select:Object:Text Objects +#define kAITextObjectsMenuItemCommandPostNotifierStr "AI Command Notifier: After Text Objects menu item" //Select:Object:Text Objects +#define kAIDynamicTextCommandPreNotifierStr "AI Command Notifier: Before Dynamic Text" //Select:Object:Flash Dynamic Text +#define kAIDynamicTextCommandPostNotifierStr "AI Command Notifier: After Dynamic Text" //Select:Object:Flash Dynamic Text +#define kAIInputTextCommandPreNotifierStr "AI Command Notifier: Before Input Text" //Select:Object:Flash Input Text +#define kAIInputTextCommandPostNotifierStr "AI Command Notifier: After Input Text" //Select:Object:Flash Input Text +#define kAISelectionHat10CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 10" //Select:Save Selection +#define kAISelectionHat10CommandPostNotifierStr "AI Command Notifier: After Selection Hat 10" //Select:Save Selection +#define kAISelectionHat11CommandPreNotifierStr "AI Command Notifier: Before Selection Hat 11" //Select:Edit Selection +#define kAISelectionHat11CommandPostNotifierStr "AI Command Notifier: After Selection Hat 11" //Select:Edit Selection +#define kAIAdobeApplyLastEffectCommandPreNotifierStr "AI Command Notifier: Before Adobe Apply Last Effect" //Effect:Apply Last Effect +#define kAIAdobeApplyLastEffectCommandPostNotifierStr "AI Command Notifier: After Adobe Apply Last Effect" //Effect:Apply Last Effect +#define kAIAdobeLastEffectCommandPreNotifierStr "AI Command Notifier: Before Adobe Last Effect" //Effect:Last Effect +#define kAIAdobeLastEffectCommandPostNotifierStr "AI Command Notifier: After Adobe Last Effect" //Effect:Last Effect +#define kAILiveRasterizeEffectSettingCommandPreNotifierStr "AI Command Notifier: Before Live Rasterize Effect Setting" //Effect:Document Raster Effects Settings +#define kAILiveRasterizeEffectSettingCommandPostNotifierStr "AI Command Notifier: After Live Rasterize Effect Setting" //Effect:Document Raster Effects Settings +#define kAILive3DExtrudeCommandPreNotifierStr "AI Command Notifier: Before Live 3DExtrude" //Effect:3D:Extrude & Bevel +#define kAILive3DExtrudeCommandPostNotifierStr "AI Command Notifier: After Live 3DExtrude" //Effect:3D:Extrude & Bevel +#define kAILive3DRevolveCommandPreNotifierStr "AI Command Notifier: Before Live 3DRevolve" //Effect:3D:Revolve +#define kAILive3DRevolveCommandPostNotifierStr "AI Command Notifier: After Live 3DRevolve" //Effect:3D:Revolve +#define kAILive3DRotateCommandPreNotifierStr "AI Command Notifier: Before Live 3DRotate" //Effect:3D:Rotate +#define kAILive3DRotateCommandPostNotifierStr "AI Command Notifier: After Live 3DRotate" //Effect:3D:Rotate +#define kAILiveRectangleCommandPreNotifierStr "AI Command Notifier: Before Live Rectangle" //Effect:Convert to Shape:Rectangle +#define kAILiveRectangleCommandPostNotifierStr "AI Command Notifier: After Live Rectangle" //Effect:Convert to Shape:Rectangle +#define kAILiveRoundedRectangleCommandPreNotifierStr "AI Command Notifier: Before Live Rounded Rectangle" //Effect:Convert to Shape:Rounded Rectangle +#define kAILiveRoundedRectangleCommandPostNotifierStr "AI Command Notifier: After Live Rounded Rectangle" //Effect:Convert to Shape:Rounded Rectangle +#define kAILiveEllipseCommandPreNotifierStr "AI Command Notifier: Before Live Ellipse" //Effect:Convert to Shape:Ellipse +#define kAILiveEllipseCommandPostNotifierStr "AI Command Notifier: After Live Ellipse" //Effect:Convert to Shape:Ellipse +#define kAILiveTrimMarksCommandPreNotifierStr "AI Command Notifier: Before Live Trim Marks" //Effect:Crop Marks +#define kAILiveTrimMarksCommandPostNotifierStr "AI Command Notifier: After Live Trim Marks" //Effect:Crop Marks +#define kAILiveFreeDistortCommandPreNotifierStr "AI Command Notifier: Before Live Free Distort" //Effect:Distort & Transform:Free Distort +#define kAILiveFreeDistortCommandPostNotifierStr "AI Command Notifier: After Live Free Distort" //Effect:Distort & Transform:Free Distort +#define kAILivePuckerBloatCommandPreNotifierStr "AI Command Notifier: Before Live Pucker & Bloat" //Effect:Distort & Transform:Pucker & Bloat +#define kAILivePuckerBloatCommandPostNotifierStr "AI Command Notifier: After Live Pucker & Bloat" //Effect:Distort & Transform:Pucker & Bloat +#define kAILiveRoughenCommandPreNotifierStr "AI Command Notifier: Before Live Roughen" //Effect:Distort & Transform:Roughen +#define kAILiveRoughenCommandPostNotifierStr "AI Command Notifier: After Live Roughen" //Effect:Distort & Transform:Roughen +#define kAILiveTransformCommandPreNotifierStr "AI Command Notifier: Before Live Transform" //Effect:Distort & Transform:Transform +#define kAILiveTransformCommandPostNotifierStr "AI Command Notifier: After Live Transform" //Effect:Distort & Transform:Transform +#define kAILiveScribbleAndTweakCommandPreNotifierStr "AI Command Notifier: Before Live Scribble and Tweak" //Effect:Distort & Transform:Tweak +#define kAILiveScribbleAndTweakCommandPostNotifierStr "AI Command Notifier: After Live Scribble and Tweak" //Effect:Distort & Transform:Tweak +#define kAILiveTwistCommandPreNotifierStr "AI Command Notifier: Before Live Twist" //Effect:Distort & Transform:Twist +#define kAILiveTwistCommandPostNotifierStr "AI Command Notifier: After Live Twist" //Effect:Distort & Transform:Twist +#define kAILiveZigZagCommandPreNotifierStr "AI Command Notifier: Before Live Zig Zag" //Effect:Distort & Transform:Zig Zag +#define kAILiveZigZagCommandPostNotifierStr "AI Command Notifier: After Live Zig Zag" //Effect:Distort & Transform:Zig Zag +#define kAILiveOffsetPathCommandPreNotifierStr "AI Command Notifier: Before Live Offset Path" //Effect:Path:Offset Path +#define kAILiveOffsetPathCommandPostNotifierStr "AI Command Notifier: After Live Offset Path" //Effect:Path:Offset Path +#define kAILiveOutlineObjectCommandPreNotifierStr "AI Command Notifier: Before Live Outline Object" //Effect:Path:Outline Object +#define kAILiveOutlineObjectCommandPostNotifierStr "AI Command Notifier: After Live Outline Object" //Effect:Path:Outline Object +#define kAILiveOutlineStrokeCommandPreNotifierStr "AI Command Notifier: Before Live Outline Stroke" //Effect:Path:Outline Stroke +#define kAILiveOutlineStrokeCommandPostNotifierStr "AI Command Notifier: After Live Outline Stroke" //Effect:Path:Outline Stroke +#define kAILivePathfinderAddCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Add" //Effect:Pathfinder:Add +#define kAILivePathfinderAddCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Add" //Effect:Pathfinder:Add +#define kAILivePathfinderIntersectCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Intersect" //Effect:Pathfinder:Intersect +#define kAILivePathfinderIntersectCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Intersect" //Effect:Pathfinder:Intersect +#define kAILivePathfinderExcludeCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Exclude" //Effect:Pathfinder:Exclude +#define kAILivePathfinderExcludeCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Exclude" //Effect:Pathfinder:Exclude +#define kAILivePathfinderSubtractCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Subtract" //Effect:Pathfinder:Subtract +#define kAILivePathfinderSubtractCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Subtract" //Effect:Pathfinder:Subtract +#define kAILivePathfinderMinusBackCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Minus Back" //Effect:Pathfinder:Minus Back +#define kAILivePathfinderMinusBackCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Minus Back" //Effect:Pathfinder:Minus Back +#define kAILivePathfinderDivideCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Divide" //Effect:Pathfinder:Divide +#define kAILivePathfinderDivideCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Divide" //Effect:Pathfinder:Divide +#define kAILivePathfinderTrimCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Trim" //Effect:Pathfinder:Trim +#define kAILivePathfinderTrimCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Trim" //Effect:Pathfinder:Trim +#define kAILivePathfinderMergeCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Merge" //Effect:Pathfinder:Merge +#define kAILivePathfinderMergeCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Merge" //Effect:Pathfinder:Merge +#define kAILivePathfinderCropCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Crop" //Effect:Pathfinder:Crop +#define kAILivePathfinderCropCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Crop" //Effect:Pathfinder:Crop +#define kAILivePathfinderOutlineCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Outline" //Effect:Pathfinder:Outline +#define kAILivePathfinderOutlineCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Outline" //Effect:Pathfinder:Outline +#define kAILivePathfinderHardMixCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Hard Mix" //Effect:Pathfinder:Hard Mix +#define kAILivePathfinderHardMixCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Hard Mix" //Effect:Pathfinder:Hard Mix +#define kAILivePathfinderSoftMixCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Soft Mix" //Effect:Pathfinder:Soft Mix +#define kAILivePathfinderSoftMixCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Soft Mix" //Effect:Pathfinder:Soft Mix +#define kAILivePathfinderTrapCommandPreNotifierStr "AI Command Notifier: Before Live Pathfinder Trap" //Effect:Pathfinder:Trap +#define kAILivePathfinderTrapCommandPostNotifierStr "AI Command Notifier: After Live Pathfinder Trap" //Effect:Pathfinder:Trap +#define kAILiveRasterizeCommandPreNotifierStr "AI Command Notifier: Before Live Rasterize" //Effect:Rasterize +#define kAILiveRasterizeCommandPostNotifierStr "AI Command Notifier: After Live Rasterize" //Effect:Rasterize +#define kAILiveAdobeDropShadowCommandPreNotifierStr "AI Command Notifier: Before Live Adobe Drop Shadow" //Effect:Stylize:Drop Shadow +#define kAILiveAdobeDropShadowCommandPostNotifierStr "AI Command Notifier: After Live Adobe Drop Shadow" //Effect:Stylize:Drop Shadow +#define kAILiveFeatherCommandPreNotifierStr "AI Command Notifier: Before Live Feather" //Effect:Stylize:Feather +#define kAILiveFeatherCommandPostNotifierStr "AI Command Notifier: After Live Feather" //Effect:Stylize:Feather +#define kAILiveInnerGlowCommandPreNotifierStr "AI Command Notifier: Before Live Inner Glow" //Effect:Stylize:Inner Glow +#define kAILiveInnerGlowCommandPostNotifierStr "AI Command Notifier: After Live Inner Glow" //Effect:Stylize:Inner Glow +#define kAILiveOuterGlowCommandPreNotifierStr "AI Command Notifier: Before Live Outer Glow" //Effect:Stylize:Outer Glow +#define kAILiveOuterGlowCommandPostNotifierStr "AI Command Notifier: After Live Outer Glow" //Effect:Stylize:Outer Glow +#define kAILiveAdobeRoundCornersCommandPreNotifierStr "AI Command Notifier: Before Live Adobe Round Corners" //Effect:Stylize:Round Corners +#define kAILiveAdobeRoundCornersCommandPostNotifierStr "AI Command Notifier: After Live Adobe Round Corners" //Effect:Stylize:Round Corners +#define kAILiveScribbleFillCommandPreNotifierStr "AI Command Notifier: Before Live Scribble Fill" //Effect:Stylize:Scribble +#define kAILiveScribbleFillCommandPostNotifierStr "AI Command Notifier: After Live Scribble Fill" //Effect:Stylize:Scribble +#define kAILiveSVGFiltersCommandPreNotifierStr "AI Command Notifier: Before Live SVG Filters" //Effect:SVG Filters:Apply SVG Filter +#define kAILiveSVGFiltersCommandPostNotifierStr "AI Command Notifier: After Live SVG Filters" //Effect:SVG Filters:Apply SVG Filter +#define kAISVGFilterImportCommandPreNotifierStr "AI Command Notifier: Before SVG Filter Import" //Effect:SVG Filters:Import SVG Filter +#define kAISVGFilterImportCommandPostNotifierStr "AI Command Notifier: After SVG Filter Import" //Effect:SVG Filters:Import SVG Filter +#define kAILiveDeformArcCommandPreNotifierStr "AI Command Notifier: Before Live Deform Arc" //Effect:Warp:Arc +#define kAILiveDeformArcCommandPostNotifierStr "AI Command Notifier: After Live Deform Arc" //Effect:Warp:Arc +#define kAILiveDeformArcLowerCommandPreNotifierStr "AI Command Notifier: Before Live Deform Arc Lower" //Effect:Warp:Arc Lower +#define kAILiveDeformArcLowerCommandPostNotifierStr "AI Command Notifier: After Live Deform Arc Lower" //Effect:Warp:Arc Lower +#define kAILiveDeformArcUpperCommandPreNotifierStr "AI Command Notifier: Before Live Deform Arc Upper" //Effect:Warp:Arc Upper +#define kAILiveDeformArcUpperCommandPostNotifierStr "AI Command Notifier: After Live Deform Arc Upper" //Effect:Warp:Arc Upper +#define kAILiveDeformArchCommandPreNotifierStr "AI Command Notifier: Before Live Deform Arch" //Effect:Warp:Arch +#define kAILiveDeformArchCommandPostNotifierStr "AI Command Notifier: After Live Deform Arch" //Effect:Warp:Arch +#define kAILiveDeformBulgeCommandPreNotifierStr "AI Command Notifier: Before Live Deform Bulge" //Effect:Warp:Bulge +#define kAILiveDeformBulgeCommandPostNotifierStr "AI Command Notifier: After Live Deform Bulge" //Effect:Warp:Bulge +#define kAILiveDeformShellLowerCommandPreNotifierStr "AI Command Notifier: Before Live Deform Shell Lower" //Effect:Warp:Shell Lower +#define kAILiveDeformShellLowerCommandPostNotifierStr "AI Command Notifier: After Live Deform Shell Lower" //Effect:Warp:Shell Lower +#define kAILiveDeformShellUpperCommandPreNotifierStr "AI Command Notifier: Before Live Deform Shell Upper" //Effect:Warp:Shell Upper +#define kAILiveDeformShellUpperCommandPostNotifierStr "AI Command Notifier: After Live Deform Shell Upper" //Effect:Warp:Shell Upper +#define kAILiveDeformFlagCommandPreNotifierStr "AI Command Notifier: Before Live Deform Flag" //Effect:Warp:Flag +#define kAILiveDeformFlagCommandPostNotifierStr "AI Command Notifier: After Live Deform Flag" //Effect:Warp:Flag +#define kAILiveDeformWaveCommandPreNotifierStr "AI Command Notifier: Before Live Deform Wave" //Effect:Warp:Wave +#define kAILiveDeformWaveCommandPostNotifierStr "AI Command Notifier: After Live Deform Wave" //Effect:Warp:Wave +#define kAILiveDeformFishCommandPreNotifierStr "AI Command Notifier: Before Live Deform Fish" //Effect:Warp:Fish +#define kAILiveDeformFishCommandPostNotifierStr "AI Command Notifier: After Live Deform Fish" //Effect:Warp:Fish +#define kAILiveDeformRiseCommandPreNotifierStr "AI Command Notifier: Before Live Deform Rise" //Effect:Warp:Rise +#define kAILiveDeformRiseCommandPostNotifierStr "AI Command Notifier: After Live Deform Rise" //Effect:Warp:Rise +#define kAILiveDeformFisheyeCommandPreNotifierStr "AI Command Notifier: Before Live Deform Fisheye" //Effect:Warp:Fisheye +#define kAILiveDeformFisheyeCommandPostNotifierStr "AI Command Notifier: After Live Deform Fisheye" //Effect:Warp:Fisheye +#define kAILiveDeformInflateCommandPreNotifierStr "AI Command Notifier: Before Live Deform Inflate" //Effect:Warp:Inflate +#define kAILiveDeformInflateCommandPostNotifierStr "AI Command Notifier: After Live Deform Inflate" //Effect:Warp:Inflate +#define kAILiveDeformSqueezeCommandPreNotifierStr "AI Command Notifier: Before Live Deform Squeeze" //Effect:Warp:Squeeze +#define kAILiveDeformSqueezeCommandPostNotifierStr "AI Command Notifier: After Live Deform Squeeze" //Effect:Warp:Squeeze +#define kAILiveDeformTwistCommandPreNotifierStr "AI Command Notifier: Before Live Deform Twist" //Effect:Warp:Twist +#define kAILiveDeformTwistCommandPostNotifierStr "AI Command Notifier: After Live Deform Twist" //Effect:Warp:Twist +#define kAILivePSAdapterPluginGEfcCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_GEfc" //Effect:Effect Gallery +#define kAILivePSAdapterPluginGEfcCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_GEfc" //Effect:Effect Gallery +#define kAILivePSAdapterPluginClrPCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_ClrP" //Effect:Artistic:Colored Pencil +#define kAILivePSAdapterPluginClrPCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_ClrP" //Effect:Artistic:Colored Pencil +#define kAILivePSAdapterPluginCtCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Ct " //Effect:Artistic:Cutout +#define kAILivePSAdapterPluginCtCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Ct " //Effect:Artistic:Cutout +#define kAILivePSAdapterPluginDryBCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_DryB" //Effect:Artistic:Dry Brush +#define kAILivePSAdapterPluginDryBCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_DryB" //Effect:Artistic:Dry Brush +#define kAILivePSAdapterPluginFlmGCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_FlmG" //Effect:Artistic:Film Grain +#define kAILivePSAdapterPluginFlmGCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_FlmG" //Effect:Artistic:Film Grain +#define kAILivePSAdapterPluginFrscCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Frsc" //Effect:Artistic:Fresco +#define kAILivePSAdapterPluginFrscCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Frsc" //Effect:Artistic:Fresco +#define kAILivePSAdapterPluginNGlwCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_NGlw" //Effect:Artistic:Neon Glow +#define kAILivePSAdapterPluginNGlwCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_NGlw" //Effect:Artistic:Neon Glow +#define kAILivePSAdapterPluginPntDCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_PntD" //Effect:Artistic:Paint Daubs +#define kAILivePSAdapterPluginPntDCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_PntD" //Effect:Artistic:Paint Daubs +#define kAILivePSAdapterPluginPltKCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_PltK" //Effect:Artistic:Palette Knife +#define kAILivePSAdapterPluginPltKCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_PltK" //Effect:Artistic:Palette Knife +#define kAILivePSAdapterPluginPlsWCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_PlsW" //Effect:Artistic:Plastic Wrap +#define kAILivePSAdapterPluginPlsWCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_PlsW" //Effect:Artistic:Plastic Wrap +#define kAILivePSAdapterPluginPstECommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_PstE" //Effect:Artistic:Poster Edges +#define kAILivePSAdapterPluginPstECommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_PstE" //Effect:Artistic:Poster Edges +#define kAILivePSAdapterPluginRghPCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_RghP" //Effect:Artistic:Rough Pastels +#define kAILivePSAdapterPluginRghPCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_RghP" //Effect:Artistic:Rough Pastels +#define kAILivePSAdapterPluginSmdSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_SmdS" //Effect:Artistic:Smudge Stick +#define kAILivePSAdapterPluginSmdSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_SmdS" //Effect:Artistic:Smudge Stick +#define kAILivePSAdapterPluginSpngCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Spng" //Effect:Artistic:Sponge +#define kAILivePSAdapterPluginSpngCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Spng" //Effect:Artistic:Sponge +#define kAILivePSAdapterPluginUndrCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Undr" //Effect:Artistic:Underpainting +#define kAILivePSAdapterPluginUndrCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Undr" //Effect:Artistic:Underpainting +#define kAILivePSAdapterPluginWtrcCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Wtrc" //Effect:Artistic:Watercolor +#define kAILivePSAdapterPluginWtrcCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Wtrc" //Effect:Artistic:Watercolor +#define kAILivePSAdapterPluginGblRCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_GblR" //Effect:Blur:Gaussian Blur +#define kAILivePSAdapterPluginGblRCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_GblR" //Effect:Blur:Gaussian Blur +#define kAILivePSAdapterPluginRdlBCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_RdlB" //Effect:Blur:Radial Blur +#define kAILivePSAdapterPluginRdlBCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_RdlB" //Effect:Blur:Radial Blur +#define kAILivePSAdapterPluginSmrBCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_SmrB" //Effect:Blur:Smart Blur +#define kAILivePSAdapterPluginSmrBCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_SmrB" //Effect:Blur:Smart Blur +#define kAILivePSAdapterPluginAccECommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_AccE" //Effect:Brush Strokes:Accented Edges +#define kAILivePSAdapterPluginAccECommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_AccE" //Effect:Brush Strokes:Accented Edges +#define kAILivePSAdapterPluginAngSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_AngS" //Effect:Brush Strokes:Angled Strokes +#define kAILivePSAdapterPluginAngSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_AngS" //Effect:Brush Strokes:Angled Strokes +#define kAILivePSAdapterPluginCrshCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Crsh" //Effect:Brush Strokes:Crosshatch +#define kAILivePSAdapterPluginCrshCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Crsh" //Effect:Brush Strokes:Crosshatch +#define kAILivePSAdapterPluginDrkSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_DrkS" //Effect:Brush Strokes:Dark Strokes +#define kAILivePSAdapterPluginDrkSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_DrkS" //Effect:Brush Strokes:Dark Strokes +#define kAILivePSAdapterPluginInkOCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_InkO" //Effect:Brush Strokes:Ink Outlines +#define kAILivePSAdapterPluginInkOCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_InkO" //Effect:Brush Strokes:Ink Outlines +#define kAILivePSAdapterPluginSptCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Spt " //Effect:Brush Strokes:Spatter +#define kAILivePSAdapterPluginSptCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Spt " //Effect:Brush Strokes:Spatter +#define kAILivePSAdapterPluginSprSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_SprS" //Effect:Brush Strokes:Sprayed Strokes +#define kAILivePSAdapterPluginSprSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_SprS" //Effect:Brush Strokes:Sprayed Strokes +#define kAILivePSAdapterPluginSmieCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Smie" //Effect:Brush Strokes:Sumi-e +#define kAILivePSAdapterPluginSmieCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Smie" //Effect:Brush Strokes:Sumi-e +#define kAILivePSAdapterPluginDfsGCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_DfsG" //Effect:Distort:Diffuse Glow +#define kAILivePSAdapterPluginDfsGCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_DfsG" //Effect:Distort:Diffuse Glow +#define kAILivePSAdapterPluginGlsCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Gls " //Effect:Distort:Glass +#define kAILivePSAdapterPluginGlsCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Gls " //Effect:Distort:Glass +#define kAILivePSAdapterPluginOcnRCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_OcnR" //Effect:Distort:Ocean Ripple +#define kAILivePSAdapterPluginOcnRCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_OcnR" //Effect:Distort:Ocean Ripple +#define kAILivePSAdapterPluginClrHCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_ClrH" //Effect:Pixelate:Color Halftone +#define kAILivePSAdapterPluginClrHCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_ClrH" //Effect:Pixelate:Color Halftone +#define kAILivePSAdapterPluginCrstCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Crst" //Effect:Pixelate:Crystallize +#define kAILivePSAdapterPluginCrstCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Crst" //Effect:Pixelate:Crystallize +#define kAILivePSAdapterPluginMztnCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Mztn" //Effect:Pixelate:Mezzotint +#define kAILivePSAdapterPluginMztnCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Mztn" //Effect:Pixelate:Mezzotint +#define kAILivePSAdapterPluginPntlCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Pntl" //Effect:Pixelate:Pointillize +#define kAILivePSAdapterPluginPntlCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Pntl" //Effect:Pixelate:Pointillize +#define kAILivePSAdapterPluginUSMkCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_USMk" //Effect:Sharpen:Unsharp Mask +#define kAILivePSAdapterPluginUSMkCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_USMk" //Effect:Sharpen:Unsharp Mask +#define kAILivePSAdapterPluginBsRlCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_BsRl" //Effect:Sketch:Bas Relief +#define kAILivePSAdapterPluginBsRlCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_BsRl" //Effect:Sketch:Bas Relief +#define kAILivePSAdapterPluginChlCCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_ChlC" //Effect:Sketch:Chalk & Charcoal +#define kAILivePSAdapterPluginChlCCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_ChlC" //Effect:Sketch:Chalk & Charcoal +#define kAILivePSAdapterPluginChrcCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Chrc" //Effect:Sketch:Charcoal +#define kAILivePSAdapterPluginChrcCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Chrc" //Effect:Sketch:Charcoal +#define kAILivePSAdapterPluginChrmCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Chrm" //Effect:Sketch:Chrome +#define kAILivePSAdapterPluginChrmCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Chrm" //Effect:Sketch:Chrome +#define kAILivePSAdapterPluginCntCCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_CntC" //Effect:Sketch:Cont← Crayon +#define kAILivePSAdapterPluginCntCCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_CntC" //Effect:Sketch:Cont← Crayon +#define kAILivePSAdapterPluginGraPCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_GraP" //Effect:Sketch:Graphic Pen +#define kAILivePSAdapterPluginGraPCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_GraP" //Effect:Sketch:Graphic Pen +#define kAILivePSAdapterPluginHlfSCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_HlfS" //Effect:Sketch:Halftone Pattern +#define kAILivePSAdapterPluginHlfSCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_HlfS" //Effect:Sketch:Halftone Pattern +#define kAILivePSAdapterPluginNtPrCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_NtPr" //Effect:Sketch:Note Paper +#define kAILivePSAdapterPluginNtPrCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_NtPr" //Effect:Sketch:Note Paper +#define kAILivePSAdapterPluginPhtcCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Phtc" //Effect:Sketch:Photocopy +#define kAILivePSAdapterPluginPhtcCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Phtc" //Effect:Sketch:Photocopy +#define kAILivePSAdapterPluginPlstCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Plst" //Effect:Sketch:Plaster +#define kAILivePSAdapterPluginPlstCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Plst" //Effect:Sketch:Plaster +#define kAILivePSAdapterPluginRtclCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Rtcl" //Effect:Sketch:Reticulation +#define kAILivePSAdapterPluginRtclCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Rtcl" //Effect:Sketch:Reticulation +#define kAILivePSAdapterPluginStmpCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Stmp" //Effect:Sketch:Stamp +#define kAILivePSAdapterPluginStmpCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Stmp" //Effect:Sketch:Stamp +#define kAILivePSAdapterPluginTrnECommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_TrnE" //Effect:Sketch:Torn Edges +#define kAILivePSAdapterPluginTrnECommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_TrnE" //Effect:Sketch:Torn Edges +#define kAILivePSAdapterPluginWtrPCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_WtrP" //Effect:Sketch:Water Paper +#define kAILivePSAdapterPluginWtrPCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_WtrP" //Effect:Sketch:Water Paper +#define kAILivePSAdapterPluginGlwECommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_GlwE" //Effect:Stylize:Glowing Edges +#define kAILivePSAdapterPluginGlwECommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_GlwE" //Effect:Stylize:Glowing Edges +#define kAILivePSAdapterPluginCrqlCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Crql" //Effect:Texture:Craquelure +#define kAILivePSAdapterPluginCrqlCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Crql" //Effect:Texture:Craquelure +#define kAILivePSAdapterPluginGrnCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Grn " //Effect:Texture:Grain +#define kAILivePSAdapterPluginGrnCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Grn " //Effect:Texture:Grain +#define kAILivePSAdapterPluginMscTCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_MscT" //Effect:Texture:Mosaic Tiles +#define kAILivePSAdapterPluginMscTCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_MscT" //Effect:Texture:Mosaic Tiles +#define kAILivePSAdapterPluginPtchCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Ptch" //Effect:Texture:Patchwork +#define kAILivePSAdapterPluginPtchCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Ptch" //Effect:Texture:Patchwork +#define kAILivePSAdapterPluginStnGCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_StnG" //Effect:Texture:Stained Glass +#define kAILivePSAdapterPluginStnGCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_StnG" //Effect:Texture:Stained Glass +#define kAILivePSAdapterPluginTxtzCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Txtz" //Effect:Texture:Texturizer +#define kAILivePSAdapterPluginTxtzCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Txtz" //Effect:Texture:Texturizer +#define kAILivePSAdapterPluginDntrCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_Dntr" //Effect:Video:De-Interlace +#define kAILivePSAdapterPluginDntrCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_Dntr" //Effect:Video:De-Interlace +#define kAILivePSAdapterPluginNTSCCommandPreNotifierStr "AI Command Notifier: Before Live PSAdapter_plugin_NTSC" //Effect:Video:NTSC Colors +#define kAILivePSAdapterPluginNTSCCommandPostNotifierStr "AI Command Notifier: After Live PSAdapter_plugin_NTSC" //Effect:Video:NTSC Colors +#define kAIPreviewModeCommandPreNotifierStr "AI Command Notifier: Before Preview Mode" //View:Preview +#define kAIPreviewModeCommandPostNotifierStr "AI Command Notifier: After Preview Mode" //View:Preview +#define kAIInkPreviewCommandPreNotifierStr "AI Command Notifier: Before Ink Preview" //View:Overprint Preview +#define kAIInkPreviewCommandPostNotifierStr "AI Command Notifier: After Ink Preview" //View:Overprint Preview +#define kAIPixelViewCommandPreNotifierStr "AI Command Notifier: Before Pixel View" //View:Pixel Preview +#define kAIPixelViewCommandPostNotifierStr "AI Command Notifier: After Pixel View" //View:Pixel Preview +#define kAIProofSetupDocumentCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Document" //View:Proof Setup:Document CMYK: +#define kAIProofSetupDocumentCommandPostNotifierStr "AI Command Notifier: After Proof Setup Document" //View:Proof Setup:Document CMYK: +#define kAIProofSetupMacRGBCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Mac RGB" //View:Proof Setup:Legacy Macintosh RGB (Gamma 1.8) +#define kAIProofSetupMacRGBCommandPostNotifierStr "AI Command Notifier: After Proof Setup Mac RGB" //View:Proof Setup:Legacy Macintosh RGB (Gamma 1.8) +#define kAIProofSetupWinRGBCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Win RGB" //View:Proof Setup:Internet Standard RGB (sRGB) +#define kAIProofSetupWinRGBCommandPostNotifierStr "AI Command Notifier: After Proof Setup Win RGB" //View:Proof Setup:Internet Standard RGB (sRGB) +#define kAIProofSetupMonitorRGBCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Monitor RGB" //View:Proof Setup:Monitor RGB +#define kAIProofSetupMonitorRGBCommandPostNotifierStr "AI Command Notifier: After Proof Setup Monitor RGB" //View:Proof Setup:Monitor RGB +#define kAIProofSetupColorBlindPCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Color Blind P" //View:Proof Setup:Color blindness - Protanopia-type +#define kAIProofSetupColorBlindPCommandPostNotifierStr "AI Command Notifier: After Proof Setup Color Blind P" //View:Proof Setup:Color blindness - Protanopia-type +#define kAIProofSetupColorBlindDCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Color Blind D" //View:Proof Setup:Color blindness - Deuteranopia-type +#define kAIProofSetupColorBlindDCommandPostNotifierStr "AI Command Notifier: After Proof Setup Color Blind D" //View:Proof Setup:Color blindness - Deuteranopia-type +#define kAIProofSetupCustomCommandPreNotifierStr "AI Command Notifier: Before Proof Setup Custom" //View:Proof Setup:Customize +#define kAIProofSetupCustomCommandPostNotifierStr "AI Command Notifier: After Proof Setup Custom" //View:Proof Setup:Customize +#define kAIProofColorsCommandPreNotifierStr "AI Command Notifier: Before Proof Colors" //View:Proof Colors +#define kAIProofColorsCommandPostNotifierStr "AI Command Notifier: After Proof Colors" //View:Proof Colors +#define kAIZoomInCommandPreNotifierStr "AI Command Notifier: Before Zoom In" //View:Zoom In +#define kAIZoomInCommandPostNotifierStr "AI Command Notifier: After Zoom In" //View:Zoom In +#define kAIZoomOutCommandPreNotifierStr "AI Command Notifier: Before Zoom Out" //View:Zoom Out +#define kAIZoomOutCommandPostNotifierStr "AI Command Notifier: After Zoom Out" //View:Zoom Out +#define kAIReduceToFitCommandPreNotifierStr "AI Command Notifier: Before Reduce To Fit" //View:Fit Artboard in Window +#define kAIReduceToFitCommandPostNotifierStr "AI Command Notifier: After Reduce To Fit" //View:Fit Artboard in Window +#define kAIReduceToFitAllCommandPreNotifierStr "AI Command Notifier: Before Reduce To Fit All" //View:Fit All in Window +#define kAIReduceToFitAllCommandPostNotifierStr "AI Command Notifier: After Reduce To Fit All" //View:Fit All in Window +#define kAIActualSizeCommandPreNotifierStr "AI Command Notifier: Before Actual Size" //View:Actual Size +#define kAIActualSizeCommandPostNotifierStr "AI Command Notifier: After Actual Size" //View:Actual Size +#define kAIShowHideEdgesCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Edges" //View:Hide Edges +#define kAIShowHideEdgesCommandPostNotifierStr "AI Command Notifier: After Show/Hide Edges" //View:Hide Edges +#define kAIShowHideArtboardCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Artboard" //View:Hide Artboards +#define kAIShowHideArtboardCommandPostNotifierStr "AI Command Notifier: After Show/Hide Artboard" //View:Hide Artboards +#define kAIShowHidePageTilingCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Page Tiling" //View:Hide Print Tiling +#define kAIShowHidePageTilingCommandPostNotifierStr "AI Command Notifier: After Show/Hide Page Tiling" //View:Hide Print Tiling +#define kAIAISliceFeedbackMenuCommandPreNotifierStr "AI Command Notifier: Before AISlice Feedback Menu" //View:Show Slices +#define kAIAISliceFeedbackMenuCommandPostNotifierStr "AI Command Notifier: After AISlice Feedback Menu" //View:Show Slices +#define kAIAISliceLockMenuCommandPreNotifierStr "AI Command Notifier: Before AISlice Lock Menu" //View:Lock Slices +#define kAIAISliceLockMenuCommandPostNotifierStr "AI Command Notifier: After AISlice Lock Menu" //View:Lock Slices +#define kAIShowHideTemplateCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Template" //View:Show Template +#define kAIShowHideTemplateCommandPostNotifierStr "AI Command Notifier: After Show/Hide Template" //View:Show Template +#define kAIShowHideRulersCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Rulers" //View:Rulers:Show Rulers +#define kAIShowHideRulersCommandPostNotifierStr "AI Command Notifier: After Show/Hide Rulers" //View:Rulers:Show Rulers +#define kAISwitchRulerCoordinateSystemCommandPreNotifierStr "AI Command Notifier: Before Switch Ruler Coordinate System" //View:Rulers:Change to Artboard Rulers +#define kAISwitchRulerCoordinateSystemCommandPostNotifierStr "AI Command Notifier: After Switch Ruler Coordinate System" //View:Rulers:Change to Artboard Rulers +#define kAIShowHideVideoRulersCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Video Rulers" //View:Rulers:Show Video Rulers +#define kAIShowHideVideoRulersCommandPostNotifierStr "AI Command Notifier: After Show/Hide Video Rulers" //View:Rulers:Show Video Rulers +#define kAIAIBoundingBoxToggleCommandPreNotifierStr "AI Command Notifier: Before AI Bounding Box Toggle" //View:Hide Bounding Box +#define kAIAIBoundingBoxToggleCommandPostNotifierStr "AI Command Notifier: After AI Bounding Box Toggle" //View:Hide Bounding Box +#define kAITransparencyGridMenuItemCommandPreNotifierStr "AI Command Notifier: Before TransparencyGrid Menu Item" //View:Show Transparency Grid +#define kAITransparencyGridMenuItemCommandPostNotifierStr "AI Command Notifier: After TransparencyGrid Menu Item" //View:Show Transparency Grid +#define kAIShowHideTextThreadsCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Text Threads" //View:Show Text Threads +#define kAIShowHideTextThreadsCommandPostNotifierStr "AI Command Notifier: After Show/Hide Text Threads" //View:Show Text Threads +#define kAIGradientFeedbackCommandPreNotifierStr "AI Command Notifier: Before Gradient Feedback" //View:Hide Gradient Annotator +#define kAIGradientFeedbackCommandPostNotifierStr "AI Command Notifier: After Gradient Feedback" //View:Hide Gradient Annotator +#define kAIShowGapsPlanetXCommandPreNotifierStr "AI Command Notifier: Before Show Gaps Planet X" //View:Show Live Paint Gaps +#define kAIShowGapsPlanetXCommandPostNotifierStr "AI Command Notifier: After Show Gaps Planet X" //View:Show Live Paint Gaps +#define kAIShowHideGuidesCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Guides" //View:Guides:Hide Guides +#define kAIShowHideGuidesCommandPostNotifierStr "AI Command Notifier: After Show/Hide Guides" //View:Guides:Hide Guides +#define kAILockUnlockGuidesCommandPreNotifierStr "AI Command Notifier: Before Lock/Unlock Guides" //View:Guides:Lock Guides +#define kAILockUnlockGuidesCommandPostNotifierStr "AI Command Notifier: After Lock/Unlock Guides" //View:Guides:Lock Guides +#define kAIMakeGuidesCommandPreNotifierStr "AI Command Notifier: Before Make Guides" //View:Guides:Make Guides +#define kAIMakeGuidesCommandPostNotifierStr "AI Command Notifier: After Make Guides" //View:Guides:Make Guides +#define kAIReleaseGuidesCommandPreNotifierStr "AI Command Notifier: Before Release Guides" //View:Guides:Release Guides +#define kAIReleaseGuidesCommandPostNotifierStr "AI Command Notifier: After Release Guides" //View:Guides:Release Guides +#define kAIClearGuideCommandPreNotifierStr "AI Command Notifier: Before Clear Guide" //View:Guides:Clear Guides +#define kAIClearGuideCommandPostNotifierStr "AI Command Notifier: After Clear Guide" //View:Guides:Clear Guides +#define kAISnapomaticOnOffMenuItemCommandPreNotifierStr "AI Command Notifier: Before Snapomatic on-off menu item" //View:Smart Guides +#define kAISnapomaticOnOffMenuItemCommandPostNotifierStr "AI Command Notifier: After Snapomatic on-off menu item" //View:Smart Guides +#define kAIShowPerspectiveGridCommandPreNotifierStr "AI Command Notifier: Before Show Perspective Grid" //View:Perspective Grid:Show Grid +#define kAIShowPerspectiveGridCommandPostNotifierStr "AI Command Notifier: After Show Perspective Grid" //View:Perspective Grid:Show Grid +#define kAIShowRulerCommandPreNotifierStr "AI Command Notifier: Before Show Ruler" //View:Perspective Grid:Show Rulers +#define kAIShowRulerCommandPostNotifierStr "AI Command Notifier: After Show Ruler" //View:Perspective Grid:Show Rulers +#define kAISnapToGridCommandPreNotifierStr "AI Command Notifier: Before Snap to Grid" //View:Perspective Grid:Snap to Grid +#define kAISnapToGridCommandPostNotifierStr "AI Command Notifier: After Snap to Grid" //View:Perspective Grid:Snap to Grid +#define kAILockPerspectiveGridCommandPreNotifierStr "AI Command Notifier: Before Lock Perspective Grid" //View:Perspective Grid:Lock Grid +#define kAILockPerspectiveGridCommandPostNotifierStr "AI Command Notifier: After Lock Perspective Grid" //View:Perspective Grid:Lock Grid +#define kAILockStationPointCommandPreNotifierStr "AI Command Notifier: Before Lock Station Point" //View:Perspective Grid:Lock Station Point +#define kAILockStationPointCommandPostNotifierStr "AI Command Notifier: After Lock Station Point" //View:Perspective Grid:Lock Station Point +#define kAIDefinePerspectiveGridCommandPreNotifierStr "AI Command Notifier: Before Define Perspective Grid" //View:Perspective Grid:Define Grid +#define kAIDefinePerspectiveGridCommandPostNotifierStr "AI Command Notifier: After Define Perspective Grid" //View:Perspective Grid:Define Grid +#define kAISavePerspectiveGridAsPresetCommandPreNotifierStr "AI Command Notifier: Before Save Perspective Grid as Preset" //View:Perspective Grid:Save Grid as Preset +#define kAISavePerspectiveGridAsPresetCommandPostNotifierStr "AI Command Notifier: After Save Perspective Grid as Preset" //View:Perspective Grid:Save Grid as Preset +#define kAIShowHideGridCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Grid" //View:Show Grid +#define kAIShowHideGridCommandPostNotifierStr "AI Command Notifier: After Show/Hide Grid" //View:Show Grid +#define kAIEnableDisableGridSnapCommandPreNotifierStr "AI Command Notifier: Before Enable/Disable Grid Snap" //View:Snap to Grid +#define kAIEnableDisableGridSnapCommandPostNotifierStr "AI Command Notifier: After Enable/Disable Grid Snap" //View:Snap to Grid +#define kAISnapPointCommandPreNotifierStr "AI Command Notifier: Before Snap Point" //View:Snap to Point +#define kAISnapPointCommandPostNotifierStr "AI Command Notifier: After Snap Point" //View:Snap to Point +#define kAINewViewSnapCommandPreNotifierStr "AI Command Notifier: Before New View Snap" //View:New View +#define kAINewViewSnapCommandPostNotifierStr "AI Command Notifier: After New View Snap" //View:New View +#define kAIEditViewSnapCommandPreNotifierStr "AI Command Notifier: Before Edit View Snap" //View:Edit Views +#define kAIEditViewSnapCommandPostNotifierStr "AI Command Notifier: After Edit View Snap" //View:Edit Views +#define kAIView1CommandPreNotifierStr "AI Command Notifier: Before View1" //View:Custom View 1 +#define kAIView1CommandPostNotifierStr "AI Command Notifier: After View1" //View:Custom View 1 +#define kAIView2CommandPreNotifierStr "AI Command Notifier: Before View2" //View:Custom View 2 +#define kAIView2CommandPostNotifierStr "AI Command Notifier: After View2" //View:Custom View 2 +#define kAIView3CommandPreNotifierStr "AI Command Notifier: Before View3" //View:Custom View 3 +#define kAIView3CommandPostNotifierStr "AI Command Notifier: After View3" //View:Custom View 3 +#define kAIView4CommandPreNotifierStr "AI Command Notifier: Before View4" //View:Custom View 4 +#define kAIView4CommandPostNotifierStr "AI Command Notifier: After View4" //View:Custom View 4 +#define kAIView5CommandPreNotifierStr "AI Command Notifier: Before View5" //View:Custom View 5 +#define kAIView5CommandPostNotifierStr "AI Command Notifier: After View5" //View:Custom View 5 +#define kAIView6CommandPreNotifierStr "AI Command Notifier: Before View6" //View:Custom View 6 +#define kAIView6CommandPostNotifierStr "AI Command Notifier: After View6" //View:Custom View 6 +#define kAIView7CommandPreNotifierStr "AI Command Notifier: Before View7" //View:Custom View 7 +#define kAIView7CommandPostNotifierStr "AI Command Notifier: After View7" //View:Custom View 7 +#define kAIView8CommandPreNotifierStr "AI Command Notifier: Before View8" //View:Custom View 8 +#define kAIView8CommandPostNotifierStr "AI Command Notifier: After View8" //View:Custom View 8 +#define kAIView9CommandPreNotifierStr "AI Command Notifier: Before View9" //View:Custom View 9 +#define kAIView9CommandPostNotifierStr "AI Command Notifier: After View9" //View:Custom View 9 +#define kAIView10CommandPreNotifierStr "AI Command Notifier: Before View10" //View:Custom View 10 +#define kAIView10CommandPostNotifierStr "AI Command Notifier: After View10" //View:Custom View 10 +#define kAINewViewCommandPreNotifierStr "AI Command Notifier: Before New View" //Window:New Window +#define kAINewViewCommandPostNotifierStr "AI Command Notifier: After New View" //Window:New Window +#define kAIArrangeWindowsCascadeCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Cascade" //Window:Arrange:Cascade +#define kAIArrangeWindowsCascadeCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Cascade" //Window:Arrange:Cascade +#define kAIArrangeWindowsVerticalCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Vertical" //Window:Arrange:Tile +#define kAIArrangeWindowsVerticalCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Vertical" //Window:Arrange:Tile +#define kAIArrangeWindowsFloatInWindowCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Float in Window" //Window:Arrange:Float in Window +#define kAIArrangeWindowsFloatInWindowCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Float in Window" //Window:Arrange:Float in Window +#define kAIArrangeWindowsFloatAllInWindowsCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Float All in Windows" //Window:Arrange:Float All in Windows +#define kAIArrangeWindowsFloatAllInWindowsCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Float All in Windows" //Window:Arrange:Float All in Windows +#define kAIArrangeWindowsConsolidateAllWindowsCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Consolidate AllWindows" //Window:Arrange:Consolidate All Windows +#define kAIArrangeWindowsConsolidateAllWindowsCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Consolidate AllWindows" //Window:Arrange:Consolidate All Windows +#define kAIAdobeSaveWorkspaceCommandPreNotifierStr "AI Command Notifier: Before Adobe Save Workspace" //Window:Workspace:Save Workspace +#define kAIAdobeSaveWorkspaceCommandPostNotifierStr "AI Command Notifier: After Adobe Save Workspace" //Window:Workspace:Save Workspace +#define kAIAdobeManageWorkspaceCommandPreNotifierStr "AI Command Notifier: Before Adobe Manage Workspace" //Window:Workspace:Manage Workspaces +#define kAIAdobeManageWorkspaceCommandPostNotifierStr "AI Command Notifier: After Adobe Manage Workspace" //Window:Workspace:Manage Workspaces +#define kAIControlPalettePluginCommandPreNotifierStr "AI Command Notifier: Before control palette plugin" //Window:Control +#define kAIControlPalettePluginCommandPostNotifierStr "AI Command Notifier: After control palette plugin" //Window:Control +#define kAIAdobeBuiltInToolbox1CommandPreNotifierStr "AI Command Notifier: Before AdobeBuiltInToolbox1" //Window:Tools +#define kAIAdobeBuiltInToolbox1CommandPostNotifierStr "AI Command Notifier: After AdobeBuiltInToolbox1" //Window:Tools +#define kAIAdobeActionPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Action Palette" //Window:Actions +#define kAIAdobeActionPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Action Palette" //Window:Actions +#define kAIAdobeAlignObjects2CommandPreNotifierStr "AI Command Notifier: Before AdobeAlignObjects2" //Window:Align +#define kAIAdobeAlignObjects2CommandPostNotifierStr "AI Command Notifier: After AdobeAlignObjects2" //Window:Align +#define kAIStylePaletteCommandPreNotifierStr "AI Command Notifier: Before Style Palette" //Window:Appearance +#define kAIStylePaletteCommandPostNotifierStr "AI Command Notifier: After Style Palette" //Window:Appearance +#define kAIAdobeArtboardPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Artboard Palette" //Window:Artboards +#define kAIAdobeArtboardPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Artboard Palette" //Window:Artboards +#define kAIInternalPalettesPosingAsPlugInMenusAttributesCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-attributes" //Window:Attributes +#define kAIInternalPalettesPosingAsPlugInMenusAttributesCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-attributes" //Window:Attributes +#define kAIAdobeBrushManagerMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe BrushManager Menu Item" //Window:Brushes +#define kAIAdobeBrushManagerMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe BrushManager Menu Item" //Window:Brushes +#define kAIAdobeColorPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Color Palette" //Window:Color +#define kAIAdobeColorPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Color Palette" //Window:Color +#define kAIAdobeHarmonyPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Harmony Palette" //Window:Color Guide +#define kAIAdobeHarmonyPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Harmony Palette" //Window:Color Guide +#define kAIDocInfo1CommandPreNotifierStr "AI Command Notifier: Before DocInfo1" //Window:Document Info +#define kAIDocInfo1CommandPostNotifierStr "AI Command Notifier: After DocInfo1" //Window:Document Info +#define kAIAdobeFlatteningPreviewCommandPreNotifierStr "AI Command Notifier: Before Adobe Flattening Preview" //Window:Flattener Preview +#define kAIAdobeFlatteningPreviewCommandPostNotifierStr "AI Command Notifier: After Adobe Flattening Preview" //Window:Flattener Preview +#define kAIAdobeGradientPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Gradient Palette" //Window:Gradient +#define kAIAdobeGradientPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Gradient Palette" //Window:Gradient +#define kAIAdobeStylePaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Style Palette" //Window:Graphic Styles +#define kAIAdobeStylePaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Style Palette" //Window:Graphic Styles +#define kAIInternalPalettesPosingAsPlugInMenusInfoCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-info" //Window:Info +#define kAIInternalPalettesPosingAsPlugInMenusInfoCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-info" //Window:Info +#define kAIAdobeLayerPalette1CommandPreNotifierStr "AI Command Notifier: Before AdobeLayerPalette1" //Window:Layers +#define kAIAdobeLayerPalette1CommandPostNotifierStr "AI Command Notifier: After AdobeLayerPalette1" //Window:Layers +#define kAIAdobeLinkPaletteMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe LinkPalette Menu Item" //Window:Links +#define kAIAdobeLinkPaletteMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe LinkPalette Menu Item" //Window:Links +#define kAIAIMagicWandCommandPreNotifierStr "AI Command Notifier: Before AI Magic Wand" //Window:Magic Wand +#define kAIAIMagicWandCommandPostNotifierStr "AI Command Notifier: After AI Magic Wand" //Window:Magic Wand +#define kAIAdobeNavigator1CommandPreNotifierStr "AI Command Notifier: Before AdobeNavigator1" //Window:Navigator +#define kAIAdobeNavigator1CommandPostNotifierStr "AI Command Notifier: After AdobeNavigator1" //Window:Navigator +#define kAIAdobePathfinderPalette1CommandPreNotifierStr "AI Command Notifier: Before AdobePathfinderPalette1" //Window:Pathfinder +#define kAIAdobePathfinderPalette1CommandPostNotifierStr "AI Command Notifier: After AdobePathfinderPalette1" //Window:Pathfinder +#define kAIAdobeSeparationPreviewPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Separation Preview Palette" //Window:Separations Preview +#define kAIAdobeSeparationPreviewPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Separation Preview Palette" //Window:Separations Preview +#define kAIAdobeStrokePaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Stroke Palette" //Window:Stroke +#define kAIAdobeStrokePaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Stroke Palette" //Window:Stroke +#define kAIAdobeSVGInteractivityPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe SVG Interactivity Palette" //Window:SVG Interactivity +#define kAIAdobeSVGInteractivityPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe SVG Interactivity Palette" //Window:SVG Interactivity +#define kAIAdobeSwatchesMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Swatches Menu Item" //Window:Swatches +#define kAIAdobeSwatchesMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Swatches Menu Item" //Window:Swatches +#define kAIAdobeSymbolPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Symbol Palette" //Window:Symbols +#define kAIAdobeSymbolPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Symbol Palette" //Window:Symbols +#define kAIAdobeTransformObjects1CommandPreNotifierStr "AI Command Notifier: Before AdobeTransformObjects1" //Window:Transform +#define kAIAdobeTransformObjects1CommandPostNotifierStr "AI Command Notifier: After AdobeTransformObjects1" //Window:Transform +#define kAIAdobeTransparencyPaletteMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Transparency Palette Menu Item" //Window:Transparency +#define kAIAdobeTransparencyPaletteMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Transparency Palette Menu Item" //Window:Transparency +#define kAIInternalPalettesPosingAsPlugInMenusCharacterCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-character" //Window:Type:Character +#define kAIInternalPalettesPosingAsPlugInMenusCharacterCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-character" //Window:Type:Character +#define kAICharacterStylesCommandPreNotifierStr "AI Command Notifier: Before Character Styles" //Window:Type:Character Styles +#define kAICharacterStylesCommandPostNotifierStr "AI Command Notifier: After Character Styles" //Window:Type:Character Styles +#define kAIFlashTextCommandPreNotifierStr "AI Command Notifier: Before Flash Text" //Window:Type:Flash Text +#define kAIFlashTextCommandPostNotifierStr "AI Command Notifier: After Flash Text" //Window:Type:Flash Text +#define kAIAlternateGlyphPalettePlugin2CommandPreNotifierStr "AI Command Notifier: Before alternate glyph palette plugin 2" //Window:Type:Glyphs +#define kAIAlternateGlyphPalettePlugin2CommandPostNotifierStr "AI Command Notifier: After alternate glyph palette plugin 2" //Window:Type:Glyphs +#define kAIInternalPalettesPosingAsPlugInMenusOpentypeCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-opentype" //Window:Type:OpenType +#define kAIInternalPalettesPosingAsPlugInMenusOpentypeCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-opentype" //Window:Type:OpenType +#define kAIInternalPalettesPosingAsPlugInMenusParagraphCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-paragraph" //Window:Type:Paragraph +#define kAIInternalPalettesPosingAsPlugInMenusParagraphCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-paragraph" //Window:Type:Paragraph +#define kAIAdobeParagraphStylesPaletteCommandPreNotifierStr "AI Command Notifier: Before Adobe Paragraph Styles Palette" //Window:Type:Paragraph Styles +#define kAIAdobeParagraphStylesPaletteCommandPostNotifierStr "AI Command Notifier: After Adobe Paragraph Styles Palette" //Window:Type:Paragraph Styles +#define kAIInternalPalettesPosingAsPlugInMenusTabCommandPreNotifierStr "AI Command Notifier: Before internal palettes posing as plug-in menus-tab" //Window:Type:Tabs +#define kAIInternalPalettesPosingAsPlugInMenusTabCommandPostNotifierStr "AI Command Notifier: After internal palettes posing as plug-in menus-tab" //Window:Type:Tabs +#define kAIAdobeVariablesPaletteMenuItemCommandPreNotifierStr "AI Command Notifier: Before Adobe Variables Palette Menu Item" //Window:Variables +#define kAIAdobeVariablesPaletteMenuItemCommandPostNotifierStr "AI Command Notifier: After Adobe Variables Palette Menu Item" //Window:Variables +#define kAIWelcomeScreenMenuItemCommandPreNotifierStr "AI Command Notifier: Before Welcome screen menu item" //Help:Welcome Screen +#define kAIWelcomeScreenMenuItemCommandPostNotifierStr "AI Command Notifier: After Welcome screen menu item" //Help:Welcome Screen +#define kAIAboutIllustratorCommandPreNotifierStr "AI Command Notifier: Before About Illustrator" //Help:About Illustrator +#define kAIAboutIllustratorCommandPostNotifierStr "AI Command Notifier: After About Illustrator" //Help:About Illustrator +#define kAISystemInformationCommandPreNotifierStr "AI Command Notifier: Before System Information" //Help:System Info +#define kAISystemInformationCommandPostNotifierStr "AI Command Notifier: After System Information" //Help:System Info +#define kAITextSizeCommandPreNotifierStr "AI Command Notifier: Before Text Size" //Other Text:Point Size Up/Down +#define kAITextSizeCommandPostNotifierStr "AI Command Notifier: After Text Size" //Other Text:Point Size Up/Down +#define kAITextAlignmentCommandPreNotifierStr "AI Command Notifier: Before Text Alignment" //Other Text:Left Align Text +#define kAITextAlignmentCommandPostNotifierStr "AI Command Notifier: After Text Alignment" //Other Text:Left Align Text +#define kAITrackingKerningCommandPreNotifierStr "AI Command Notifier: Before Tracking/Kerning" //Other Text:Kern Looser +#define kAITrackingKerningCommandPostNotifierStr "AI Command Notifier: After Tracking/Kerning" //Other Text:Kern Looser +#define kAIWordSpacingCommandPreNotifierStr "AI Command Notifier: Before Word Spacing" //Other Text:Spacing +#define kAIWordSpacingCommandPostNotifierStr "AI Command Notifier: After Word Spacing" //Other Text:Spacing +#define kAIDiscretionaryHyphenCommandPreNotifierStr "AI Command Notifier: Before Discretionary Hyphen" //Other Text:Insert Hyphen +#define kAIDiscretionaryHyphenCommandPostNotifierStr "AI Command Notifier: After Discretionary Hyphen" //Other Text:Insert Hyphen +#define kAIClearTrackCommandPreNotifierStr "AI Command Notifier: Before Clear Track" //Other Text:Clear Tracking +#define kAIClearTrackCommandPostNotifierStr "AI Command Notifier: After Clear Track" //Other Text:Clear Tracking +#define kAIClearTypeScaleCommandPreNotifierStr "AI Command Notifier: Before Clear Type Scale" //Other Text:Uniform Type +#define kAIClearTypeScaleCommandPostNotifierStr "AI Command Notifier: After Clear Type Scale" //Other Text:Uniform Type +#define kAIHighlightFontCommandPreNotifierStr "AI Command Notifier: Before Highlight Font" //Other Text:Highlight Font +#define kAIHighlightFontCommandPostNotifierStr "AI Command Notifier: After Highlight Font" //Other Text:Highlight Font +#define kAICenterAlignCommandPreNotifierStr "AI Command Notifier: Before Center Align" //Other Text:Center Text +#define kAICenterAlignCommandPostNotifierStr "AI Command Notifier: After Center Align" //Other Text:Center Text +#define kAIRightAlignCommandPreNotifierStr "AI Command Notifier: Before Right Align" //Other Text:Right Align Text +#define kAIRightAlignCommandPostNotifierStr "AI Command Notifier: After Right Align" //Other Text:Right Align Text +#define kAIJustifyCommandPreNotifierStr "AI Command Notifier: Before Justify" //Other Text:Justify Text Left +#define kAIJustifyCommandPostNotifierStr "AI Command Notifier: After Justify" //Other Text:Justify Text Left +#define kAIJustifyCenterCommandPreNotifierStr "AI Command Notifier: Before Justify Center" //Other Text:Justify Text Center +#define kAIJustifyCenterCommandPostNotifierStr "AI Command Notifier: After Justify Center" //Other Text:Justify Text Center +#define kAIJustifyRightCommandPreNotifierStr "AI Command Notifier: Before Justify Right" //Other Text:Justify Text Right +#define kAIJustifyRightCommandPostNotifierStr "AI Command Notifier: After Justify Right" //Other Text:Justify Text Right +#define kAIJustifyAllCommandPreNotifierStr "AI Command Notifier: Before Justify All" //Other Text:Justify All Lines +#define kAIJustifyAllCommandPostNotifierStr "AI Command Notifier: After Justify All" //Other Text:Justify All Lines +#define kAIToggleAutoHyphenationCommandPreNotifierStr "AI Command Notifier: Before Toggle Auto Hyphenation" //Other Text:Toggle Auto Hyphenation +#define kAIToggleAutoHyphenationCommandPostNotifierStr "AI Command Notifier: After Toggle Auto Hyphenation" //Other Text:Toggle Auto Hyphenation +#define kAIToggleLineComposerCommandPreNotifierStr "AI Command Notifier: Before Toggle Line Composer" //Other Text:Toggle Line Composer +#define kAIToggleLineComposerCommandPostNotifierStr "AI Command Notifier: After Toggle Line Composer" //Other Text:Toggle Line Composer +#define kAISwitchSelectionToolCommandPreNotifierStr "AI Command Notifier: Before Switch Selection Tool" //Other Select:Switch Selection Tools +#define kAISwitchSelectionToolCommandPostNotifierStr "AI Command Notifier: After Switch Selection Tool" //Other Select:Switch Selection Tools + +//Old Menu Command Notifiers +#define kAIPageSetupCommandPreNotifierStr "AI Command Notifier: Before Page Setup" +#define kAIPageSetupCommandPostNotifierStr "AI Command Notifier: After Page Setup" +#define kAIUnlinkTextCommandPreNotifierStr "AI Command Notifier: Before Unlink Text" +#define kAIUnlinkTextCommandPostNotifierStr "AI Command Notifier: After Unlink Text" +#define kAIArtworkModeCommandPreNotifierStr "AI Command Notifier: Before Artwork Mode" +#define kAIArtworkModeCommandPostNotifierStr "AI Command Notifier: After Artwork Mode" +#define kAIShowHideArtboardRulersCommandPreNotifierStr "AI Command Notifier: Before Show/Hide Artboard Rulers" +#define kAIShowHideArtboardRulersCommandPostNotifierStr "AI Command Notifier: After Show/Hide Artboard Rulers" +#define kAISelectWindowCommandPreNotifierStr "AI Command Notifier: Before Select Window" +#define kAISelectWindowCommandPostNotifierStr "AI Command Notifier: After Select Window" +#define kAITextFontCommandPreNotifierStr "AI Command Notifier: Before Text Font" +#define kAITextFontCommandPostNotifierStr "AI Command Notifier: After Text Font" +#define kAILinkTextCommandPreNotifierStr "AI Command Notifier: Before Link Text" +#define kAILinkTextCommandPostNotifierStr "AI Command Notifier: After Link Text" +#define kAILineSpacingCommandPreNotifierStr "AI Command Notifier: Before Line Spacing" +#define kAILineSpacingCommandPostNotifierStr "AI Command Notifier: After Line Spacing" +#define kAIReleaseCropMarksCommandPreNotifierStr "AI Command Notifier: Before Release Crop Marks" +#define kAIReleaseCropMarksCommandPostNotifierStr "AI Command Notifier: After Release Crop Marks" +#define kAINewMultipleMasterInstanceCommandPreNotifierStr "AI Command Notifier: Before New Multiple Master Instance" +#define kAINewMultipleMasterInstanceCommandPostNotifierStr "AI Command Notifier: After New Multiple Master Instance" +#define kAICutPictureCommandPreNotifierStr "AI Command Notifier: Before Cut Picture" +#define kAICutPictureCommandPostNotifierStr "AI Command Notifier: After Cut Picture" +#define kAICopyPictureCommandPreNotifierStr "AI Command Notifier: Before Copy Picture" +#define kAICopyPictureCommandPostNotifierStr "AI Command Notifier: After Copy Picture" +#define kAISetNoteCommandPreNotifierStr "AI Command Notifier: Before Set Note" +#define kAISetNoteCommandPostNotifierStr "AI Command Notifier: After Set Note" +#define kAISeparationSetupCommandPreNotifierStr "AI Command Notifier: Before Separation Setup" +#define kAISeparationSetupCommandPostNotifierStr "AI Command Notifier: After Separation Setup" +#define kAIArrangeWindowsHorizontalCommandPreNotifierStr "AI Command Notifier: Before Arrange Windows - Horizontal" +#define kAIArrangeWindowsHorizontalCommandPostNotifierStr "AI Command Notifier: After Arrange Windows - Horizontal" +#define kAIArrangeIconsCommandPreNotifierStr "AI Command Notifier: Before Arrange Icons" +#define kAIArrangeIconsCommandPostNotifierStr "AI Command Notifier: After Arrange Icons" +#define kAISelecteFile1CommandPreNotifierStr "AI Command Notifier: Before Selecte File 1" +#define kAISelecteFile1CommandPostNotifierStr "AI Command Notifier: After Selecte File 1" +#define kAISelecteFile2CommandPreNotifierStr "AI Command Notifier: Before Selecte File 2" +#define kAISelecteFile2CommandPostNotifierStr "AI Command Notifier: After Selecte File 2" +#define kAISelecteFile3CommandPreNotifierStr "AI Command Notifier: Before Selecte File 3" +#define kAISelecteFile3CommandPostNotifierStr "AI Command Notifier: After Selecte File 3" +#define kAISelecteFile4CommandPreNotifierStr "AI Command Notifier: Before Selecte File 4" +#define kAISelecteFile4CommandPostNotifierStr "AI Command Notifier: After Selecte File 4" +#define kAITextOrientationCommandPreNotifierStr "AI Command Notifier: Before Text Orientation" +#define kAITextOrientationCommandPostNotifierStr "AI Command Notifier: After Text Orientation" +#define kAIGlyphSubstitutionOptionsCommandPreNotifierStr "AI Command Notifier: Before Glyph Substitution Options" +#define kAIGlyphSubstitutionOptionsCommandPostNotifierStr "AI Command Notifier: After Glyph Substitution Options" +#define kAIAfterAltOptionDragCopyCommandPostNotifierStr "AI Command Notifier: After Alt/Option Drag Copy" +#define kAIAfterDragTransformCommandPostNotifierStr "AI Command Notifier: After Alt/Option Drag Transform" + +#endif // AIMenuCommandNotifiers_h__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuCommandString.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuCommandString.h index 7898093..188178f 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuCommandString.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuCommandString.h @@ -1,2061 +1,2120 @@ -#ifndef __AIMenuCommandString__ -#define __AIMenuCommandString__ - -/************************************************************************* - * - * ADOBE CONFIDENTIAL - * ___________________ - * - * Copyright 2014 Adobe Systems Incorporated - * All Rights Reserved. - * - * NOTICE: All information contained herein is, and remains - * the property of Adobe Systems Incorporated and its suppliers, - * if any. The intellectual and technical concepts contained - * herein are proprietary to Adobe Systems Incorporated and its - * suppliers and may be covered by U.S. and Foreign Patents, - * patents in process, and are protected by trade secret or copyright law. - * Dissemination of this information or reproduction of this material - * is strictly forbidden unless prior written permission is obtained - * from Adobe Systems Incorporated. - * - **************************************************************************/ - -/** @file AIMenuCommandString.h */ - - - - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** @ingroup MenuCommand - File:New */ -#define kNewCommandStr "new" - -/** @ingroup MenuCommand - File:New from Template */ -#define kNewFromTemplateCommandStr "newFromTemplate" - -/** @ingroup MenuCommand - File:Open */ -#define kOpenCommandStr "open" - -/** @ingroup MenuCommand - File:Browse in Bridge */ -#define kAdobeBridgeBrowseCommandStr "Adobe Bridge Browse" - -/** @ingroup MenuCommand - File:Device Central */ -#define kAdobeAIDeviceCenterCommandStr "Adobe AI Device center" - -/** @ingroup MenuCommand - File:Close */ -#define kCloseCommandStr "close" - -/** @ingroup MenuCommand - File:Save */ -#define kSaveCommandStr "save" - -/** @ingroup MenuCommand - File:Save As */ -#define kSaveasCommandStr "saveas" - -/** @ingroup MenuCommand - File:Save a Copy */ -#define kSaveacopyCommandStr "saveacopy" - -/** @ingroup MenuCommand - File:Save as Template */ -#define kSaveastemplateCommandStr "saveastemplate" - -/** @ingroup MenuCommand - File:Save for Web & Devices */ -#define kAdobeAISaveForWebCommandStr "Adobe AI Save For Web" - -/** @ingroup MenuCommand - File:Save Selected Slices */ -#define kAdobeAISaveSelectedSlicesCommandStr "Adobe AI Save Selected Slices" - -/** @ingroup MenuCommand - File:Revert */ -#define kRevertCommandStr "revert" - -/** @ingroup MenuCommand - File:Place */ -#define kAIPlaceCommandStr "AI Place" - -/** @ingroup MenuCommand - File:Export */ -#define kExportCommandStr "export" - -/** @ingroup MenuCommand - File:Export Selection */ -#define kExportSelectionCommandStr "exportSelection" - -/** @ingroup MenuCommand - File:Export/Export For Screens */ -#define kExportForScreensCommandStr "exportForScreens" - -/** @ingroup MenuCommand - File:Scripts:Other Script */ -#define kAiBrowseForScriptCommandStr "ai_browse_for_script" - -/** @ingroup MenuCommand - File:Document Setup */ -#define kDocumentCommandStr "document" - -/** @ingroup MenuCommand - File:Document Color Mode:CMYK Color */ -#define kDocColorCmykCommandStr "doc-color-cmyk" - -/** @ingroup MenuCommand - File:Document Color Mode:RGB Color */ -#define kDocColorRgbCommandStr "doc-color-rgb" - -/** @ingroup MenuCommand - File:File Info */ -#define kFileInfoCommandStr "File Info" - -/** @ingroup MenuCommand - File:Print */ -#define kPrintCommandStr "Print" - -/** @ingroup MenuCommand - File:Exit */ -#define kQuitCommandStr "quit" - -/** @ingroup MenuCommand - Edit:Undo */ -#define kUndoCommandStr "undo" - -/** @ingroup MenuCommand - Edit:Redo */ -#define kRedoCommandStr "redo" - -/** @ingroup MenuCommand - Edit:Cut */ -#define kCutCommandStr "cut" - -/** @ingroup MenuCommand - Edit:Copy */ -#define kCopyCommandStr "copy" - -/** @ingroup MenuCommand - Edit:Paste */ -#define kPasteCommandStr "paste" - -/** @ingroup MenuCommand - Edit:Paste in Front */ -#define kPasteFrontCommandStr "pasteFront" - -/** @ingroup MenuCommand - Edit:Paste in Back */ -#define kPasteBackCommandStr "pasteBack" - -/** @ingroup MenuCommand - Edit:Paste in Place */ -#define kPasteInPlaceCommandStr "pasteInPlace" - -/** @ingroup MenuCommand - Edit:Paste on All Artboards */ -#define kPasteInAllArtboardCommandStr "pasteInAllArtboard" - -/** @ingroup MenuCommand - Edit:Clear */ -#define kClearCommandStr "clear" - -/** @ingroup MenuCommand - Edit:Find & Replace */ -#define kFindAndReplaceCommandStr "Find and Replace" - -/** @ingroup MenuCommand - Edit:Find Next */ -#define kFindNextCommandStr "Find Next" - -/** @ingroup MenuCommand - Edit:Check Spelling */ -#define kCheckSpellingCommandStr "Check Spelling" - -/** @ingroup MenuCommand - Edit:Edit Custom Dictionary */ -#define kEditCustomDictionaryCommandStr "Edit Custom Dictionary..." - -/** @ingroup MenuCommand - Edit:Define Pattern */ -#define kDefinePatternMenuItemCommandStr "Define Pattern Menu Item" - -/** @ingroup MenuCommand - Edit:Edit Colors:Recolor Artwork */ -#define kRecolorArtDialogCommandStr "Recolor Art Dialog" - -/** @ingroup MenuCommand - Edit:Edit Colors:Adjust Color Balance */ -#define kAdjust3CommandStr "Adjust3" - -/** @ingroup MenuCommand - Edit:Edit Colors:Blend Front to Back */ -#define kColors3CommandStr "Colors3" - -/** @ingroup MenuCommand - Edit:Edit Colors:Blend Horizontally */ -#define kColors4CommandStr "Colors4" - -/** @ingroup MenuCommand - Edit:Edit Colors:Blend Vertically */ -#define kColors5CommandStr "Colors5" - -/** @ingroup MenuCommand - Edit:Edit Colors:Convert to CMYK */ -#define kColors8CommandStr "Colors8" - -/** @ingroup MenuCommand - Edit:Edit Colors:Convert to Grayscale */ -#define kColors7CommandStr "Colors7" - -/** @ingroup MenuCommand - Edit:Edit Colors:Convert to RGB */ -#define kColors9CommandStr "Colors9" - -/** @ingroup MenuCommand - Edit:Edit Colors:Invert Colors */ -#define kColors6CommandStr "Colors6" - -/** @ingroup MenuCommand - Edit:Edit Colors:Overprint Black */ -#define kOverprint2CommandStr "Overprint2" - -/** @ingroup MenuCommand - Edit:Edit Colors:Saturate */ -#define kSaturate3CommandStr "Saturate3" - -/** @ingroup MenuCommand - Edit:Edit Original */ -#define kEditOriginalMenuItemCommandStr "EditOriginal Menu Item" - -/** @ingroup MenuCommand - Edit:Transparency Flattener Presets */ -#define kTransparencyPresetsCommandStr "Transparency Presets" - -/** @ingroup MenuCommand - Edit:Tracing Presets */ -#define kTracingPresetsCommandStr "TracingPresets" - -/** @ingroup MenuCommand - Edit:Print Presets */ -#define kPrintPresetsCommandStr "Print Presets" - -/** @ingroup MenuCommand - Edit:Adobe PDF Presets */ -#define kPDFPresetsCommandStr "PDF Presets" - -/** @ingroup MenuCommand - Edit:SWF Presets */ -#define kSWFPresetsCommandStr "SWFPresets" - -/** @ingroup MenuCommand - Edit:Perspective Grid Presets */ -#define kPerspectiveGridPresetsCommandStr "PerspectiveGridPresets" - -/** @ingroup MenuCommand - Edit:Color Settings */ -#define kColorCommandStr "color" - -/** @ingroup MenuCommand - Edit:Assign Profile */ -#define kAssignprofileCommandStr "assignprofile" - -/** @ingroup MenuCommand - Edit:Keyboard Shortcuts */ -#define kKBSCMenuItemCommandStr "KBSC Menu Item" - -/** @ingroup MenuCommand - Edit:Run AAT Test */ -#define kAATMenuItemCommandStr "AAT Menu Item" - -/** @ingroup MenuCommand - Edit:Edit AAT Script */ -#define kLastAATMenuItemCommandStr "Last AAT Menu Item" - -/** @ingroup MenuCommand - Edit:Abort AAT Script */ -#define kAbortAATMenuItemCommandStr "Abort AAT Menu Item" - -/** @ingroup MenuCommand - Edit:Preferences:General */ -#define kPreferenceCommandStr "preference" - -/** @ingroup MenuCommand - Edit:Preferences:Selection & Anchor Display */ -#define kSelectPrefCommandStr "selectPref" - -/** @ingroup MenuCommand - Edit:Preferences:Type */ -#define kKeyboardPrefCommandStr "keyboardPref" - -/** @ingroup MenuCommand - Edit:Preferences:Units */ -#define kUnitundoPrefCommandStr "unitundoPref" - -/** @ingroup MenuCommand - Edit:Preferences:Guides & Grid */ -#define kGuidegridPrefCommandStr "guidegridPref" - -/** @ingroup MenuCommand - Edit:Preferences:Smart Guides */ -#define kSnapPrefCommandStr "snapPref" - -/** @ingroup MenuCommand - Edit:Preferences:Slices */ -#define kSlicePrefCommandStr "slicePref" - -/** @ingroup MenuCommand - Edit:Preferences:Hyphenation */ -#define kHyphenPrefCommandStr "hyphenPref" - -/** @ingroup MenuCommand - Edit:Preferences:Plug-ins & Scratch Disks */ -#define kPluginPrefCommandStr "pluginPref" - -/** @ingroup MenuCommand - Edit:Preferences:User Interface */ -#define kUIPrefCommandStr "UIPref" - -/** @ingroup MenuCommand - Edit:Preferences:File Handling & Clipboard */ -#define kFileClipboardPrefCommandStr "FileClipboardPref" - -/** @ingroup MenuCommand - Edit:Preferences:Appearance of Black */ -#define kBlackPrefCommandStr "BlackPref" - -/** @ingroup MenuCommand - Object:Transform:Transform Again */ -#define kTransformagainCommandStr "transformagain" - -/** @ingroup MenuCommand - Object:Transform:Move */ -#define kTransformmoveCommandStr "transformmove" - -/** @ingroup MenuCommand - Object:Transform:Rotate */ -#define kTransformrotateCommandStr "transformrotate" - -/** @ingroup MenuCommand - Object:Transform:Reflect */ -#define kTransformreflectCommandStr "transformreflect" - -/** @ingroup MenuCommand - Object:Transform:Scale */ -#define kTransformscaleCommandStr "transformscale" - -/** @ingroup MenuCommand - Object:Transform:Shear */ -#define kTransformshearCommandStr "transformshear" - -/** @ingroup MenuCommand - Object:Transform Each */ -#define kTransformEachCommandStr "Transform v23" - -/** @ingroup MenuCommand - Object:Transform:Reset Bounding Box */ -#define kAIResetBoundingBoxCommandStr "AI Reset Bounding Box" - -/** @ingroup MenuCommand - Object:Arrange:Bring to Front */ -#define kSendToFrontCommandStr "sendToFront" - -/** @ingroup MenuCommand - Object:Arrange:Bring Forward */ -#define kSendForwardCommandStr "sendForward" - -/** @ingroup MenuCommand - Object:Arrange:Send Backward */ -#define kSendBackwardCommandStr "sendBackward" - -/** @ingroup MenuCommand - Object:Arrange:Send to Back */ -#define kSendToBackCommandStr "sendToBack" - -/** @ingroup MenuCommand - Object:Arrange:Send to Current Layer */ -#define kSelectionHat2CommandStr "Selection Hat 2" - -/** @ingroup MenuCommand - Object:Group */ -#define kGroupCommandStr "group" - -/** @ingroup MenuCommand - Object:Ungroup */ -#define kUngroupCommandStr "ungroup" - -/** @ingroup MenuCommand - Object:Lock:Selection */ -#define kLockCommandStr "lock" - -/** @ingroup MenuCommand - Object:Lock:All Artwork Above */ -#define kSelectionHat5CommandStr "Selection Hat 5" - -/** @ingroup MenuCommand - Object:Lock:Other Layers */ -#define kSelectionHat7CommandStr "Selection Hat 7" - -/** @ingroup MenuCommand - Object:Unlock All */ -#define kUnlockAllCommandStr "unlockAll" - -/** @ingroup MenuCommand - Object:Hide:Selection */ -#define kHideCommandStr "hide" - -/** @ingroup MenuCommand - Object:Hide:All Artwork Above */ -#define kSelectionHat4CommandStr "Selection Hat 4" - -/** @ingroup MenuCommand - Object:Hide:Other Layers */ -#define kSelectionHat6CommandStr "Selection Hat 6" - -/** @ingroup MenuCommand - Object:Show All */ -#define kShowAllCommandStr "showAll" - -/** @ingroup MenuCommand - Object:Expand */ -#define kExpand3CommandStr "Expand3" - -/** @ingroup MenuCommand - Object:Expand Appearance */ -#define kExpandStyleCommandStr "expandStyle" - -/** @ingroup MenuCommand - Object:Flatten Transparency */ -#define kFlattenTransparency1CommandStr "FlattenTransparency1" - -/** @ingroup MenuCommand - Object:Rasterize */ -#define kRasterize8MenuItemCommandStr "Rasterize 8 menu item" - -/** @ingroup MenuCommand - Object:Create Gradient Mesh */ -#define kCreateGradientMeshCommandStr "make mesh" - -/** @ingroup MenuCommand - Object:Create Object Mosaic */ -#define kAIObjectMosaicPlugIn4CommandStr "AI Object Mosaic Plug-in4" - -/** @ingroup MenuCommand - Object:Create Trim Marks */ -#define kTrimMarkV25CommandStr "TrimMark v25" - -/** @ingroup MenuCommand - Object:Slice:Make */ -#define kAISliceMakeSliceCommandStr "AISlice Make Slice" - -/** @ingroup MenuCommand - Object:Slice:Release */ -#define kAISliceReleaseSliceCommandStr "AISlice Release Slice" - -/** @ingroup MenuCommand - Object:Slice:Create from Guides */ -#define kAISliceCreateFromGuidesCommandStr "AISlice Create from Guides" - -/** @ingroup MenuCommand - Object:Slice:Create from Selection */ -#define kAISliceCreateFromSelectionCommandStr "AISlice Create from Selection" - -/** @ingroup MenuCommand - Object:Slice:Duplicate Slice */ -#define kAISliceDuplicateCommandStr "AISlice Duplicate" - -/** @ingroup MenuCommand - Object:Slice:Combine Slices */ -#define kAISliceCombineCommandStr "AISlice Combine" - -/** @ingroup MenuCommand - Object:Slice:Divide Slices */ -#define kAISliceDivideCommandStr "AISlice Divide" - -/** @ingroup MenuCommand - Object:Slice:Delete All */ -#define kAISliceDeleteAllSlicesCommandStr "AISlice Delete All Slices" - -/** @ingroup MenuCommand - Object:Slice:Slice Options */ -#define kAISliceSliceOptionsCommandStr "AISlice Slice Options" - -/** @ingroup MenuCommand - Object:Slice:Clip to Artboard */ -#define kAISliceClipToArtboardCommandStr "AISlice Clip to Artboard" - -/** @ingroup MenuCommand - Object:Path:Join */ -#define kJoinCommandStr "join" - -/** @ingroup MenuCommand - Object:Path:Average */ -#define kAverageCommandStr "average" - -/** @ingroup MenuCommand - Object:Path:Outline Stroke */ -#define kOffsetPathV22CommandStr "OffsetPath v22" - -/** @ingroup MenuCommand - Object:Path:Offset Path */ -#define kOffsetPathV23CommandStr "OffsetPath v23" - -/** @ingroup MenuCommand - Object:Path:Simplify */ -#define kSimplifyCommandStr "simplify menu item" - -/** @ingroup MenuCommand - Object:Path:Add Anchor Points */ -#define kAddAnchorPoints2CommandStr "Add Anchor Points2" - -/** @ingroup MenuCommand - Object:Path:Remove Anchor Points */ -#define kRemoveAnchorPointsMenuCommandStr "Remove Anchor Points menu" - -/** @ingroup MenuCommand - Object:Path:Divide Objects Below */ -#define kKnifeTool2CommandStr "Knife Tool2" - -/** @ingroup MenuCommand - Object:Path:Split Into Grid */ -#define kRowsAndColumnsCommandStr "Rows and Columns...." - -/** @ingroup MenuCommand - Object:Path:Clean Up */ -#define kCleanupMenuItemCommandStr "cleanup menu item" - -/** @ingroup MenuCommand - Object:Blend:Make */ -#define kBlendMakeCommandStr "Path Blend Make" - -/** @ingroup MenuCommand - Object:Blend:Release */ -#define kBlendReleaseCommandStr "Path Blend Release" - -/** @ingroup MenuCommand - Object:Blend:Expand */ -#define kBlendExpandCommndStr "Path Blend Expand" - -/** @ingroup MenuCommand - Object:Blend:Blend Options */ -#define kBlendOptionsCommandStr "Path Blend Options" - -/** @ingroup MenuCommand - Object:Blend:Replace Spine */ -#define kBlendReplaceSpineCommandStr "Path Blend Replace Spine" - -/** @ingroup MenuCommand - Object:Blend:Reverse Spine */ -#define kBlendReverseSpineCommandStr "Path Blend Reverse Spine" - -/** @ingroup MenuCommand - Object:Blend:Reverse Front to Back */ -#define kBlendReverseStackCommandStr "Path Blend Reverse Stack" - -/** @ingroup MenuCommand - Object:Envelope Distort:Make with Warp */ -#define kMakeWarpCommandStr "Make Warp" - -/** @ingroup MenuCommand - Object:Envelope Distort:Make with Mesh */ -#define kCreateEnvelopeGridCommandStr "Create Envelope Grid" - -/** @ingroup MenuCommand - Object:Envelope Distort:Make with Top Object */ -#define kMakeEnvelopeCommandStr "Make Envelope" - -/** @ingroup MenuCommand - Object:Envelope Distort:Release */ -#define kReleaseEnvelopeCommandStr "Release Envelope" - -/** @ingroup MenuCommand - Object:Envelope Distort:Envelope Options */ -#define kEnvelopeOptionsCommandStr "Envelope Options" - -/** @ingroup MenuCommand - Object:Envelope Distort:Expand */ -#define kExpandEnvelopeCommandStr "Expand Envelope" - -/** @ingroup MenuCommand - Object:Envelope Distort:Edit Contents */ -#define kEditEnvelopeContentsCommandStr "Edit Envelope Contents" - -/** @ingroup MenuCommand - Object:Perspective:Attach to Active Plane */ -#define kAttachToActivePlaneCommandStr "Attach to Active Plane" - -/** @ingroup MenuCommand - Object:Perspective:Release with Perspective */ -#define kReleaseWithPerspectiveCommandStr "Release with Perspective" - -/** @ingroup MenuCommand - Object:Perspective:Move Plane to Match Object */ -#define kShowObjectGridPlaneCommandStr "Show Object Grid Plane" - -/** @ingroup MenuCommand - Object:Perspective:Edit Text */ -#define kEditOriginalObjectCommandStr "Edit Original Object" - -/** @ingroup MenuCommand - Object:Live Paint:Make */ -#define kMakePlanetXCommandStr "Make Planet X" - -/** @ingroup MenuCommand - Object:Live Paint:Merge */ -#define kMargePlanetXCommandStr "Marge Planet X" - -/** @ingroup MenuCommand - Object:Live Paint:Release */ -#define kReleasePlanetXCommandStr "Release Planet X" - -/** @ingroup MenuCommand - Object:Live Paint:Gap Options */ -#define kPlanetXOptionsCommandStr "Planet X Options" - -/** @ingroup MenuCommand - Object:Live Paint:Expand */ -#define kExpandPlanetXCommandStr "Expand Planet X" - -/** @ingroup MenuCommand - Object:Live Trace:Make */ -#define kMakeTracingCommandStr "Make Tracing" - -/** @ingroup MenuCommand - Object:Live Trace:Make and Expand */ -#define kMakeAndExpandCommandStr "Make and Expand" - -/** @ingroup MenuCommand - Object:Live Trace:Make and Convert to Live Paint */ -#define kMakeAndConvertToLivePaintCommandStr "Make and Convert to Live Paint" - -/** @ingroup MenuCommand - Object:Live Trace:Release */ -#define kReleaseTracingCommandStr "Release Tracing" - -/** @ingroup MenuCommand - Object:Live Trace:Tracing Options */ -#define kTracingOptionsCommandStr "Tracing Options" - -/** @ingroup MenuCommand - Object:Live Trace:Expand */ -#define kExpandTracingCommandStr "Expand Tracing" - -/** @ingroup MenuCommand - Object:Live Trace:Expand as Viewed */ -#define kExpandAsViewedCommandStr "Expand as Viewed" - -/** @ingroup MenuCommand - Object:Live Trace:Convert to Live Paint */ -#define kPaintTracingCommandStr "Paint Tracing" - -/** @ingroup MenuCommand - Object:Live Trace:Show No Image */ -#define kShowNoImageCommandStr "ShowNoImage" - -/** @ingroup MenuCommand - Object:Live Trace:Show Original Image */ -#define kShowOriginalImageCommandStr "ShowOriginalImage" - -/** @ingroup MenuCommand - Object:Live Trace:Show Adjusted Image */ -#define kShowPreprocessedImageCommandStr "Show Preprocessed Image" - -/** @ingroup MenuCommand - Object:Live Trace:Show Transparent Image */ -#define kShowTransparentImageCommandStr "ShowTransparentImage" - -/** @ingroup MenuCommand - Object:Live Trace:Show No Tracing Result */ -#define kShowNoArtworkCommandStr "ShowNoArtwork" - -/** @ingroup MenuCommand - Object:Live Trace:Show Tracing Result */ -#define kShowArtworkCommandStr "ShowArtwork" - -/** @ingroup MenuCommand - Object:Live Trace:Show Outlines */ -#define kShowPathsCommandStr "ShowPaths" - -/** @ingroup MenuCommand - Object:Live Trace:Show Outlines with Tracing */ -#define kShowPathsAndTransparentArtworkCommandStr "ShowPathsAndTransparentArtwork" - -/** @ingroup MenuCommand - Object:Text Wrap:Make */ -#define kMakeTextWrapCommandStr "Make Text Wrap" - -/** @ingroup MenuCommand - Object:Text Wrap:Release */ -#define kReleaseTextWrapCommandStr "Release Text Wrap" - -/** @ingroup MenuCommand - Object:Text Wrap:Text Wrap Options */ -#define kTextWrapOptionsCommandStr "Text Wrap Options..." - -/** @ingroup MenuCommand - Object:Clipping Mask:Make */ -#define kMakeMaskCommandStr "makeMask" - -/** @ingroup MenuCommand - Object:Clipping Mask:Release */ -#define kReleaseMaskCommandStr "releaseMask" - -/** @ingroup MenuCommand - Object:Clipping Mask:Edit Contents */ -#define kEditMaskCommandStr "editMask" - -/** @ingroup MenuCommand - Object:Compound Path:Make */ -#define kCompoundPathCommandStr "compoundPath" - -/** @ingroup MenuCommand - Object:Compound Path:Release */ -#define kNoCompoundPathCommandStr "noCompoundPath" - -/** @ingroup MenuCommand - Object:Artboards:Convert to Artboards */ -#define kSetCropMarksCommandStr "setCropMarks" - -/** @ingroup MenuCommand - Object:Artboards:Rearrange */ -#define kReArrangeArtboardsCommandStr "ReArrange Artboards" - -/** @ingroup MenuCommand - Object:Artboards:Fit to Artwork Bounds */ -#define kFitArtboardToArtworkBoundsCommandStr "Fit Artboard to artwork bounds" - -/** @ingroup MenuCommand - Object:Artboards:Fit to Selected Art */ -#define kFitArtboardToSelectedArtCommandStr "Fit Artboard to selected Art" - -/** @ingroup MenuCommand - Object:Graph:Type */ -#define kSetGraphStyleCommandStr "setGraphStyle" - -/** @ingroup MenuCommand - Object:Graph:Data */ -#define kEditGraphDataCommandStr "editGraphData" - -/** @ingroup MenuCommand - Object:Graph:Design */ -#define kGraphDesignsCommandStr "graphDesigns" - -/** @ingroup MenuCommand - Object:Graph:Column */ -#define kSetBarDesignCommandStr "setBarDesign" - -/** @ingroup MenuCommand - Object:Graph:Marker */ -#define kSetIconDesignCommandStr "setIconDesign" - -/** @ingroup MenuCommand - Type:Glyphs */ -#define kAlternateGlyphPalettePluginCommandStr "alternate glyph palette plugin" - -/** @ingroup MenuCommand - Type:Area Type Options */ -#define kAreaTypeOptionsCommandStr "area-type-options" - -/** @ingroup MenuCommand - Type:Type on a Path:Rainbow */ -#define kRainbowTOPCommandStr "Rainbow" - -/** @ingroup MenuCommand - Type:Type on a Path:3D Ribbon */ -#define k3DRibbonTOPCommandStr "3D ribbon" - -/** @ingroup MenuCommand - Type:Type on a Path:Skew */ -#define kSkewTOPCommandStr "Skew" - -/** @ingroup MenuCommand - Type:Type on a Path:Stair Step */ -#define kStairTOPCommandStr "Stair Step" - -/** @ingroup MenuCommand - Type:Type on a Path:Gravity */ -#define kGravityTOPCommandStr "Gravity" - -/** @ingroup MenuCommand - Type:Type on a Path:Type on a path Options */ -#define kTOPOptionsCommandStr "typeOnPathOptions" - -/** @ingroup MenuCommand - Type:Type on a Path:Update Legacy Type on a Path */ -#define kUpdateLegacyTOPCommandStr "updateLegacyTOP" - -/** @ingroup MenuCommand - Type:Threaded Text:Create */ -#define kThreadTextCreateCommandStr "threadTextCreate" - -/** @ingroup MenuCommand - Type:Threaded Text:Release Selection */ -#define kReleaseThreadedTextSelectionCommandStr "releaseThreadedTextSelection" - -/** @ingroup MenuCommand - Type:Threaded Text:Remove Threading */ -#define kRemoveThreadingCommandStr "removeThreading" - -/** @ingroup MenuCommand - Type:Composite Fonts */ -#define kAdobeInternalCompositeFontPluginCommandStr "Adobe internal composite font plugin" - -/** @ingroup MenuCommand - Type:Kinsoku Shori Settings */ -#define kAdobeKinsokuSettingsCommandStr "Adobe Kinsoku Settings" - -/** @ingroup MenuCommand - Type:Mojikumi Settings */ -#define kAdobeMojiKumiSettingsCommandStr "Adobe MojiKumi Settings" - -/** @ingroup MenuCommand - Type:Fit Headline */ -#define kFitHeadlineCommandStr "fitHeadline" - -/** @ingroup MenuCommand - Type:Create Outlines */ -#define kOutlineCommandStr "outline" - -/** @ingroup MenuCommand - Type:Find Font */ -#define kAdobeIllustratorFindFontMenuItemCommandStr "Adobe Illustrator Find Font Menu Item" - -/** @ingroup MenuCommand - Type:Change Case:UPPERCASE */ -#define kUpperCaseChangeCaseItemCommandStr "UpperCase Change Case Item" - -/** @ingroup MenuCommand - Type:Change Case:lowercase */ -#define kLowerCaseChangeCaseItemCommandStr "LowerCase Change Case Item" - -/** @ingroup MenuCommand - Type:Change Case:Title Case */ -#define kTitleCaseChangeCaseItemCommandStr "Title Case Change Case Item" - -/** @ingroup MenuCommand - Type:Change Case:Sentence case */ -#define kSentenceCaseChangeCaseItemCommandStr "Sentence case Change Case Item" - -/** @ingroup MenuCommand - Type:Smart Punctuation */ -#define kAdobeIllustratorSmartPunctuationMenuItemCommandStr "Adobe Illustrator Smart Punctuation Menu Item" - -/** @ingroup MenuCommand - Type:Optical Margin Alignment */ -#define kAdobeOpticalAlignmentItemCommandStr "Adobe Optical Alignment Item" - -/** @ingroup MenuCommand - Type:Show Hidden Characters */ -#define kShowHiddenCharCommandStr "showHiddenChar" - -/** @ingroup MenuCommand - Type:Type Orientation:Horizontal */ -#define kTypeHorizontalCommandStr "type-horizontal" - -/** @ingroup MenuCommand - Type:Type Orientation:Vertical */ -#define kTypeVerticalCommandStr "type-vertical" - -/** @ingroup MenuCommand - Select:All */ -#define kSelectallCommandStr "selectall" - -/** @ingroup MenuCommand - Select:All on Active Artboard */ -#define kSelectallinartboardCommandStr "selectallinartboard" - -/** @ingroup MenuCommand - Select:Deselect */ -#define kDeselectallCommandStr "deselectall" - -/** @ingroup MenuCommand - Select:Reselect */ -#define kFindReselectMenuItemCommandStr "Find Reselect menu item" - -/** @ingroup MenuCommand - Select:Inverse */ -#define kInverseMenuItemCommandStr "Inverse menu item" - -/** @ingroup MenuCommand - Select:Next Object Above */ -#define kSelectionHat8CommandStr "Selection Hat 8" - -/** @ingroup MenuCommand - Select:Next Object Below */ -#define kSelectionHat9CommandStr "Selection Hat 9" - -/** @ingroup MenuCommand - Select:Same:Appearance */ -#define kFindAppearanceMenuItemCommandStr "Find Appearance menu item" - -/** @ingroup MenuCommand - Select:Same:Appearance Attribute */ -#define kFindAppearanceAttributesMenuItemCommandStr "Find Appearance Attributes menu item" - -/** @ingroup MenuCommand - Select:Same:Blending Mode */ -#define kFindBlendingModeMenuItemCommandStr "Find Blending Mode menu item" - -/** @ingroup MenuCommand - Select:Same:Fill & Stroke */ -#define kFindFillStrokeMenuItemCommandStr "Find Fill & Stroke menu item" - -/** @ingroup MenuCommand - Select:Same:Fill Color */ -#define kFindFillColorMenuItemCommandStr "Find Fill Color menu item" - -/** @ingroup MenuCommand - Select:Same:Opacity */ -#define kFindOpacityMenuItemCommandStr "Find Opacity menu item" - -/** @ingroup MenuCommand - Select:Same:Stroke Color */ -#define kFindStrokeColorMenuItemCommandStr "Find Stroke Color menu item" - -/** @ingroup MenuCommand - Select:Same:Stroke Weight */ -#define kFindStrokeWeightMenuItemCommandStr "Find Stroke Weight menu item" - -/** @ingroup MenuCommand - Select:Same:Graphic Style */ -#define kFindStyleMenuItemCommandStr "Find Style menu item" - -/** @ingroup MenuCommand - Select:Same:Symbol Instance */ -#define kFindSymbolInstanceMenuItemCommandStr "Find Symbol Instance menu item" - -/** @ingroup MenuCommand - Select:Same:Link Block Series */ -#define kFindLinkBlockSeriesMenuItemCommandStr "Find Link Block Series menu item" - -/** @ingroup MenuCommand - Select:Object:All on Same Layers */ -#define kSelectionHat3CommandStr "Selection Hat 3" - -/** @ingroup MenuCommand - Select:Object:Direction Handles */ -#define kSelectionHat1CommandStr "Selection Hat 1" - -/** @ingroup MenuCommand - Select:Object:Not Aligned to Pixel Grid */ -#define kSelectionHat12CommandStr "Selection Hat 12" - -/** @ingroup MenuCommand - Select:Object:Bristle Brush Strokes */ -#define kBristleBrushStrokesMenuItemCommandStr "Bristle Brush Strokes menu item" - -/** @ingroup MenuCommand - Select:Object:Brush Strokes */ -#define kBrushStrokesMenuItemCommandStr "Brush Strokes menu item" - -/** @ingroup MenuCommand - Select:Object:Clipping Masks */ -#define kClippingMasksMenuItemCommandStr "Clipping Masks menu item" - -/** @ingroup MenuCommand - Select:Object:Stray Points */ -#define kStrayPointsMenuItemCommandStr "Stray Points menu item" - -/** @ingroup MenuCommand - Select:Object:Text Objects */ -#define kTextObjectsMenuItemCommandStr "Text Objects menu item" - -/** @ingroup MenuCommand - Select:Object:Flash Dynamic Text */ -#define kDynamicTextCommandStr "Dynamic Text" - -/** @ingroup MenuCommand - Select:Object:Flash Input Text */ -#define kInputTextCommandStr "Input Text" - -/** @ingroup MenuCommand - Select:Save Selection */ -#define kSelectionHat10CommandStr "Selection Hat 10" - -/** @ingroup MenuCommand - Select:Edit Selection */ -#define kSelectionHat11CommandStr "Selection Hat 11" - -/** @ingroup MenuCommand - Effect:Apply Last Effect */ -#define kAdobeApplyLastEffectCommandStr "Adobe Apply Last Effect" - -/** @ingroup MenuCommand - Effect:Last Effect */ -#define kAdobeLastEffectCommandStr "Adobe Last Effect" - -/** @ingroup MenuCommand - Effect:Document Raster Effects Settings */ -#define kLiveRasterizeEffectSettingCommandStr "Live Rasterize Effect Setting" - -/** @ingroup MenuCommand - Effect:3D:Extrude & Bevel */ -#define kLive3DExtrudeCommandStr "Live 3DExtrude" - -/** @ingroup MenuCommand - Effect:3D:Revolve */ -#define kLive3DRevolveCommandStr "Live 3DRevolve" - -/** @ingroup MenuCommand - Effect:3D:Rotate */ -#define kLive3DRotateCommandStr "Live 3DRotate" - -/** @ingroup MenuCommand - Effect:Convert to Shape:Rectangle */ -#define kLiveRectangleCommandStr "Live Rectangle" - -/** @ingroup MenuCommand - Effect:Convert to Shape:Rounded Rectangle */ -#define kLiveRoundedRectangleCommandStr "Live Rounded Rectangle" - -/** @ingroup MenuCommand - Effect:Convert to Shape:Ellipse */ -#define kLiveEllipseCommandStr "Live Ellipse" - -/** @ingroup MenuCommand - Effect:Crop Marks */ -#define kLiveTrimMarksCommandStr "Live Trim Marks" - -/** @ingroup MenuCommand - Effect:Distort & Transform:Free Distort */ -#define kLiveFreeDistortCommandStr "Live Free Distort" - -/** @ingroup MenuCommand - Effect:Distort & Transform:Pucker & Bloat */ -#define kLivePuckerBloatCommandStr "Live Pucker & Bloat" - -/** @ingroup MenuCommand - Effect:Distort & Transform:Roughen */ -#define kLiveRoughenCommandStr "Live Roughen" - -/** @ingroup MenuCommand - Effect:Distort & Transform:Transform */ -#define kLiveTransformCommandStr "Live Transform" - -/** @ingroup MenuCommand - Effect:Distort & Transform:Tweak */ -#define kLiveScribbleAndTweakCommandStr "Live Scribble and Tweak" - -/** @ingroup MenuCommand - Effect:Distort & Transform:Twist */ -#define kLiveTwistCommandStr "Live Twist" - -/** @ingroup MenuCommand - Effect:Distort & Transform:Zig Zag */ -#define kLiveZigZagCommandStr "Live Zig Zag" - -/** @ingroup MenuCommand - Effect:Path:Offset Path */ -#define kLiveOffsetPathCommandStr "Live Offset Path" - -/** @ingroup MenuCommand - Effect:Path:Outline Object */ -#define kLiveOutlineObjectCommandStr "Live Outline Object" - -/** @ingroup MenuCommand - Effect:Path:Outline Stroke */ -#define kLiveOutlineStrokeCommandStr "Live Outline Stroke" - -/** @ingroup MenuCommand - Effect:Pathfinder:Add */ -#define kLivePathfinderAddCommandStr "Live Pathfinder Add" - -/** @ingroup MenuCommand - Effect:Pathfinder:Intersect */ -#define kLivePathfinderIntersectCommandStr "Live Pathfinder Intersect" - -/** @ingroup MenuCommand - Effect:Pathfinder:Exclude */ -#define kLivePathfinderExcludeCommandStr "Live Pathfinder Exclude" - -/** @ingroup MenuCommand - Effect:Pathfinder:Subtract */ -#define kLivePathfinderSubtractCommandStr "Live Pathfinder Subtract" - -/** @ingroup MenuCommand - Effect:Pathfinder:Minus Back */ -#define kLivePathfinderMinusBackCommandStr "Live Pathfinder Minus Back" - -/** @ingroup MenuCommand - Effect:Pathfinder:Divide */ -#define kLivePathfinderDivideCommandStr "Live Pathfinder Divide" - -/** @ingroup MenuCommand - Effect:Pathfinder:Trim */ -#define kLivePathfinderTrimCommandStr "Live Pathfinder Trim" - -/** @ingroup MenuCommand - Effect:Pathfinder:Merge */ -#define kLivePathfinderMergeCommandStr "Live Pathfinder Merge" - -/** @ingroup MenuCommand - Effect:Pathfinder:Crop */ -#define kLivePathfinderCropCommandStr "Live Pathfinder Crop" - -/** @ingroup MenuCommand - Effect:Pathfinder:Outline */ -#define kLivePathfinderOutlineCommandStr "Live Pathfinder Outline" - -/** @ingroup MenuCommand - Effect:Pathfinder:Hard Mix */ -#define kLivePathfinderHardMixCommandStr "Live Pathfinder Hard Mix" - -/** @ingroup MenuCommand - Effect:Pathfinder:Soft Mix */ -#define kLivePathfinderSoftMixCommandStr "Live Pathfinder Soft Mix" - -/** @ingroup MenuCommand - Effect:Pathfinder:Trap */ -#define kLivePathfinderTrapCommandStr "Live Pathfinder Trap" - -/** @ingroup MenuCommand - Effect:Rasterize */ -#define kLiveRasterizeCommandStr "Live Rasterize" - -/** @ingroup MenuCommand - Effect:Stylize:Drop Shadow */ -#define kLiveDropShadowCommandStr "Live Adobe Drop Shadow" - -/** @ingroup MenuCommand - Effect:Stylize:Feather */ -#define kLiveFeatherCommandStr "Live Feather" - -/** @ingroup MenuCommand - Effetc:Stylize:Inner Glow */ -#define kLiveInnerGlowCommandStr "Live Inner Glow" - -/** @ingroup MenuCommand - Effect:Stylize:outer Glow */ -#define kLiveOuterGlowCommandStr "Live Outer Glow" - -/** @ingroup MenuCommand - Effect:Stylize:Round Corners */ -#define kLiveAdobeRoundCornersCommandStr "Live Adobe Round Corners" - -/** @ingroup MenuCommand - Effect:Stylize:Scribble */ -#define kLiveScribbleFillCommandStr "Live Scribble Fill" - -/** @ingroup MenuCommand - Effect:SVG Filters:Apply SVG Filter */ -#define kLiveSVGFiltersCommandStr "Live SVG Filters" - -/** @ingroup MenuCommand - Effect:SVG Filters:Import SVG Filter */ -#define kSVGFilterImportCommandStr "SVG Filter Import" - -/** @ingroup MenuCommand - Effect:Warp:Arc */ -#define kLiveDeformArcCommandStr "Live Deform Arc" - -/** @ingroup MenuCommand - Effect:Warp:Arc Lower */ -#define kLiveDeformArcLowerCommandStr "Live Deform Arc Lower" - -/** @ingroup MenuCommand - Effect:Warp:Arc Upper */ -#define kLiveDeformArcUpperCommandStr "Live Deform Arc Upper" - -/** @ingroup MenuCommand - Effect:Warp:Arch */ -#define kLiveDeformArchCommandStr "Live Deform Arch" - -/** @ingroup MenuCommand - Effect:Warp:Bulge */ -#define kLiveDeformBulgeCommandStr "Live Deform Bulge" - -/** @ingroup MenuCommand - Effect:Warp:Shell Lower */ -#define kLiveDeformShellLowerCommandStr "Live Deform Shell Lower" - -/** @ingroup MenuCommand - Effect:Warp:Shell Upper */ -#define kLiveDeformShellUpperCommandStr "Live Deform Shell Upper" - -/** @ingroup MenuCommand - Effect:Warp:Flag */ -#define kLiveDeformFlagCommandStr "Live Deform Flag" - -/** @ingroup MenuCommand - Effect:Warp:Wave */ -#define kLiveDeformWaveCommandStr "Live Deform Wave" - -/** @ingroup MenuCommand - Effect:Warp:Fish */ -#define kLiveDeformFishCommandStr "Live Deform Fish" - -/** @ingroup MenuCommand - Effect:Warp:Rise */ -#define kLiveDeformRiseCommandStr "Live Deform Rise" - -/** @ingroup MenuCommand - Effect:Warp:Fisheye */ -#define kLiveDeformFisheyeCommandStr "Live Deform Fisheye" - -/** @ingroup MenuCommand - Effect:Warp:Inflate */ -#define kLiveDeformInflateCommandStr "Live Deform Inflate" - -/** @ingroup MenuCommand - Effect:Warp:Squeeze */ -#define kLiveDeformSqueezeCommandStr "Live Deform Squeeze" - -/** @ingroup MenuCommand - Effect:Warp:Twist */ -#define kLiveDeformTwistCommandStr "Live Deform Twist" - -/** @ingroup MenuCommand - Effect:Effect Gallery */ -#define kLivePSAdapterPluginGEfcCommandStr "Live PSAdapter_plugin_GEfc" - -/** @ingroup MenuCommand - Effect:Artistic:Colored Pencil */ -#define kLivePSAdapterPluginClrPCommandStr "Live PSAdapter_plugin_ClrP" - -/** @ingroup MenuCommand - Effect:Artistic:Cutout */ -#define kLivePSAdapterPluginCtCommandStr "Live PSAdapter_plugin_Ct " - -/** @ingroup MenuCommand - Effect:Artistic:Dry Brush */ -#define kLivePSAdapterPluginDryBCommandStr "Live PSAdapter_plugin_DryB" - -/** @ingroup MenuCommand - Effect:Artistic:Film Grain */ -#define kLivePSAdapterPluginFlmGCommandStr "Live PSAdapter_plugin_FlmG" - -/** @ingroup MenuCommand - Effect:Artistic:Fresco */ -#define kLivePSAdapterPluginFrscCommandStr "Live PSAdapter_plugin_Frsc" - -/** @ingroup MenuCommand - Effect:Artistic:Neon Glow */ -#define kLivePSAdapterPluginNGlwCommandStr "Live PSAdapter_plugin_NGlw" - -/** @ingroup MenuCommand - Effect:Artistic:Paint Daubs */ -#define kLivePSAdapterPluginPntDCommandStr "Live PSAdapter_plugin_PntD" - -/** @ingroup MenuCommand - Effect:Artistic:Palette Knife */ -#define kLivePSAdapterPluginPltKCommandStr "Live PSAdapter_plugin_PltK" - -/** @ingroup MenuCommand - Effect:Artistic:Plastic Wrap */ -#define kLivePSAdapterPluginPlsWCommandStr "Live PSAdapter_plugin_PlsW" - -/** @ingroup MenuCommand - Effect:Artistic:Poster Edges */ -#define kLivePSAdapterPluginPstECommandStr "Live PSAdapter_plugin_PstE" - -/** @ingroup MenuCommand - Effect:Artistic:Rough Pastels */ -#define kLivePSAdapterPluginRghPCommandStr "Live PSAdapter_plugin_RghP" - -/** @ingroup MenuCommand - Effect:Artistic:Smudge Stick */ -#define kLivePSAdapterPluginSmdSCommandStr "Live PSAdapter_plugin_SmdS" - -/** @ingroup MenuCommand - Effect:Artistic:Sponge */ -#define kLivePSAdapterPluginSpngCommandStr "Live PSAdapter_plugin_Spng" - -/** @ingroup MenuCommand - Effect:Artistic:Underpainting */ -#define kLivePSAdapterPluginUndrCommandStr "Live PSAdapter_plugin_Undr" - -/** @ingroup MenuCommand - Effect:Artistic:Watercolor */ -#define kLivePSAdapterPluginWtrcCommandStr "Live PSAdapter_plugin_Wtrc" - -/** @ingroup MenuCommand - Effect:Blur:Gaussian Blur */ -#define kLivePSAdapterPluginGblRCommandStr "Live PSAdapter_plugin_GblR" - -/** @ingroup MenuCommand - Effect:Blur:Radial Blur */ -#define kLivePSAdapterPluginRdlBCommandStr "Live PSAdapter_plugin_RdlB" - -/** @ingroup MenuCommand - Effect:Blur:Smart Blur */ -#define kLivePSAdapterPluginSmrBCommandStr "Live PSAdapter_plugin_SmrB" - -/** @ingroup MenuCommand - Effect:Brush Strokes:Accented Edges */ -#define kLivePSAdapterPluginAccECommandStr "Live PSAdapter_plugin_AccE" - -/** @ingroup MenuCommand - Effect:Brush Strokes:Angled Strokes */ -#define kLivePSAdapterPluginAngSCommandStr "Live PSAdapter_plugin_AngS" - -/** @ingroup MenuCommand - Effect:Brush Strokes:Crosshatch */ -#define kLivePSAdapterPluginCrshCommandStr "Live PSAdapter_plugin_Crsh" - -/** @ingroup MenuCommand - Effect:Brush Strokes:Dark Strokes */ -#define kLivePSAdapterPluginDrkSCommandStr "Live PSAdapter_plugin_DrkS" - -/** @ingroup MenuCommand - Effect:Brush Strokes:Ink Outlines */ -#define kLivePSAdapterPluginInkOCommandStr "Live PSAdapter_plugin_InkO" - -/** @ingroup MenuCommand - Effect:Brush Strokes:Spatter */ -#define kLivePSAdapterPluginSptCommandStr "Live PSAdapter_plugin_Spt " - -/** @ingroup MenuCommand - Effect:Brush Strokes:Sprayed Strokes */ -#define kLivePSAdapterPluginSprSCommandStr "Live PSAdapter_plugin_SprS" - -/** @ingroup MenuCommand - Effect:Brush Strokes:Sumi-e */ -#define kLivePSAdapterPluginSmieCommandStr "Live PSAdapter_plugin_Smie" - -/** @ingroup MenuCommand - Effect:Distort:Diffuse Glow */ -#define kLivePSAdapterPluginDfsGCommandStr "Live PSAdapter_plugin_DfsG" - -/** @ingroup MenuCommand - Effect:Distort:Glass */ -#define kLivePSAdapterPluginGlsCommandStr "Live PSAdapter_plugin_Gls " - -/** @ingroup MenuCommand - Effect:Distort:Ocean Ripple */ -#define kLivePSAdapterPluginOcnRCommandStr "Live PSAdapter_plugin_OcnR" - -/** @ingroup MenuCommand - Effect:Pixelate:Color Halftone */ -#define kLivePSAdapterPluginClrHCommandStr "Live PSAdapter_plugin_ClrH" - -/** @ingroup MenuCommand - Effect:Pixelate:Crystallize */ -#define kLivePSAdapterPluginCrstCommandStr "Live PSAdapter_plugin_Crst" - -/** @ingroup MenuCommand - Effect:Pixelate:Mezzotint */ -#define kLivePSAdapterPluginMztnCommandStr "Live PSAdapter_plugin_Mztn" - -/** @ingroup MenuCommand - Effect:Pixelate:Pointillize */ -#define kLivePSAdapterPluginPntlCommandStr "Live PSAdapter_plugin_Pntl" - -/** @ingroup MenuCommand - Effect:Sharpen:Unsharp Mask */ -#define kLivePSAdapterPluginUSMkCommandStr "Live PSAdapter_plugin_USMk" - -/** @ingroup MenuCommand - Effect:Sketch:Bas Relief */ -#define kLivePSAdapterPluginBsRlCommandStr "Live PSAdapter_plugin_BsRl" - -/** @ingroup MenuCommand - Effect:Sketch:Chalk & Charcoal */ -#define kLivePSAdapterPluginChlCCommandStr "Live PSAdapter_plugin_ChlC" - -/** @ingroup MenuCommand - Effect:Sketch:Charcoal */ -#define kLivePSAdapterPluginChrcCommandStr "Live PSAdapter_plugin_Chrc" - -/** @ingroup MenuCommand - Effect:Sketch:Chrome */ -#define kLivePSAdapterPluginChrmCommandStr "Live PSAdapter_plugin_Chrm" - -/** @ingroup MenuCommand - Effect:Sketch:Cont← Crayon */ -#define kLivePSAdapterPluginCntCCommandStr "Live PSAdapter_plugin_CntC" - -/** @ingroup MenuCommand - Effect:Sketch:Graphic Pen */ -#define kLivePSAdapterPluginGraPCommandStr "Live PSAdapter_plugin_GraP" - -/** @ingroup MenuCommand - Effect:Sketch:Halftone Pattern */ -#define kLivePSAdapterPluginHlfSCommandStr "Live PSAdapter_plugin_HlfS" - -/** @ingroup MenuCommand - Effect:Sketch:Note Paper */ -#define kLivePSAdapterPluginNtPrCommandStr "Live PSAdapter_plugin_NtPr" - -/** @ingroup MenuCommand - Effect:Sketch:Photocopy */ -#define kLivePSAdapterPluginPhtcCommandStr "Live PSAdapter_plugin_Phtc" - -/** @ingroup MenuCommand - Effect:Sketch:Plaster */ -#define kLivePSAdapterPluginPlstCommandStr "Live PSAdapter_plugin_Plst" - -/** @ingroup MenuCommand - Effect:Sketch:Reticulation */ -#define kLivePSAdapterPluginRtclCommandStr "Live PSAdapter_plugin_Rtcl" - -/** @ingroup MenuCommand - Effect:Sketch:Stamp */ -#define kLivePSAdapterPluginStmpCommandStr "Live PSAdapter_plugin_Stmp" - -/** @ingroup MenuCommand - Effect:Sketch:Torn Edges */ -#define kLivePSAdapterPluginTrnECommandStr "Live PSAdapter_plugin_TrnE" - -/** @ingroup MenuCommand - Effect:Sketch:Water Paper */ -#define kLivePSAdapterPluginWtrPCommandStr "Live PSAdapter_plugin_WtrP" - -/** @ingroup MenuCommand - Effect:Stylize:Glowing Edges */ -#define kLivePSAdapterPluginGlwECommandStr "Live PSAdapter_plugin_GlwE" - -/** @ingroup MenuCommand - Effect:Texture:Craquelure */ -#define kLivePSAdapterPluginCrqlCommandStr "Live PSAdapter_plugin_Crql" - -/** @ingroup MenuCommand - Effect:Texture:Grain */ -#define kLivePSAdapterPluginGrnCommandStr "Live PSAdapter_plugin_Grn " - -/** @ingroup MenuCommand - Effect:Texture:Mosaic Tiles */ -#define kLivePSAdapterPluginMscTCommandStr "Live PSAdapter_plugin_MscT" - -/** @ingroup MenuCommand - Effect:Texture:Patchwork */ -#define kLivePSAdapterPluginPtchCommandStr "Live PSAdapter_plugin_Ptch" - -/** @ingroup MenuCommand - Effect:Texture:Stained Glass */ -#define kLivePSAdapterPluginStnGCommandStr "Live PSAdapter_plugin_StnG" - -/** @ingroup MenuCommand - Effect:Texture:Texturizer */ -#define kLivePSAdapterPluginTxtzCommandStr "Live PSAdapter_plugin_Txtz" - -/** @ingroup MenuCommand - Effect:Video:De-Interlace */ -#define kLivePSAdapterPluginDntrCommandStr "Live PSAdapter_plugin_Dntr" - -/** @ingroup MenuCommand - Effect:Video:NTSC Colors */ -#define kLivePSAdapterPluginNTSCCommandStr "Live PSAdapter_plugin_NTSC" - -/** @ingroup MenuCommand - View:Preview */ -#define kPreviewCommandStr "preview" - -/** @ingroup MenuCommand - View:Overprint Preview */ -#define kInkCommandStr "ink" - -/** @ingroup MenuCommand - View:Pixel Preview */ -#define kRasterCommandStr "raster" - -/** @ingroup MenuCommand - View:Proof Setup:Document CMYK: */ -#define kProofDocumentCommandStr "proof-document" - -/** @ingroup MenuCommand - View:Proof Setup:Legacy Macintosh RGB (Gamma 1.8) */ -#define kProofMacRgbCommandStr "proof-mac-rgb" - -/** @ingroup MenuCommand - View:Proof Setup:Internet Standard RGB (sRGB) */ -#define kProofWinRgbCommandStr "proof-win-rgb" - -/** @ingroup MenuCommand - View:Proof Setup:Monitor RGB */ -#define kProofMonitorRgbCommandStr "proof-monitor-rgb" - -/** @ingroup MenuCommand - View:Proof Setup:Color blindness - Protanopia-type */ -#define kProofColorblindpCommandStr "proof-colorblindp" - -/** @ingroup MenuCommand - View:Proof Setup:Color blindness - Deuteranopia-type */ -#define kProofColorblinddCommandStr "proof-colorblindd" - -/** @ingroup MenuCommand - View:Proof Setup:Customize */ -#define kProofCustomCommandStr "proof-custom" - -/** @ingroup MenuCommand - View:Proof Colors */ -#define kProofColorsCommandStr "proofColors" - -/** @ingroup MenuCommand - View:Zoom In */ -#define kZoominCommandStr "zoomin" - -/** @ingroup MenuCommand - View:Zoom Out */ -#define kZoomoutCommandStr "zoomout" - -/** @ingroup MenuCommand - View:Fit Artboard in Window */ -#define kFitArtboardCommandStr "fitin" - -/** @ingroup MenuCommand - View:Fit All in Window */ -#define kFitallCommandStr "fitall" - -/** @ingroup MenuCommand - View:Actual Size */ -#define kActualsizeCommandStr "actualsize" - -/** @ingroup MenuCommand - View:Hide Edges */ -#define kEdgeCommandStr "edge" - -/** @ingroup MenuCommand - View:Hide Artboards */ -#define kArtboardCommandStr "artboard" - -/** @ingroup MenuCommand - View:Hide Print Tiling */ -#define kPagetilingCommandStr "pagetiling" - -/** @ingroup MenuCommand - View:Show Slices */ -#define kAISliceFeedbackMenuCommandStr "AISlice Feedback Menu" - -/** @ingroup MenuCommand - View:Lock Slices */ -#define kAISliceLockMenuCommandStr "AISlice Lock Menu" - -/** @ingroup MenuCommand - View:Show Template */ -#define kShowtemplateCommandStr "showtemplate" - -/** @ingroup MenuCommand - View:Rulers:Show Rulers */ -#define kRulerCommandStr "ruler" - -/** @ingroup MenuCommand - View:Rulers:Show Video Rulers */ -#define kVideorulerCommandStr "videoruler" - -/** @ingroup MenuCommand - View:Rulers:Change to Global Rulers */ -#define kSwitchRulerCommandStr "rulerCoordinateSystem" - -/** @ingroup MenuCommand - View:Hide Bounding Box */ -#define kAIBoundingBoxToggleCommandStr "AI Bounding Box Toggle" - -/** @ingroup MenuCommand - View:Show Transparency Grid */ -#define kTransparencyGridMenuItemCommandStr "TransparencyGrid Menu Item" - -/** @ingroup MenuCommand - View:Show Text Threads */ -#define kTextthreadsCommandStr "textthreads" - -/** @ingroup MenuCommand - View:Hide Gradient Annotator */ -#define kGradientFeedbackCommandStr "Gradient Feedback" - -/** @ingroup MenuCommand - View:Show Live Paint Gaps */ -#define kShowGapsPlanetXCommandStr "Show Gaps Planet X" - -/** @ingroup MenuCommand - View:Guides:Hide Guides */ -#define kShowguideCommandStr "showguide" - -/** @ingroup MenuCommand - View:Guides:Lock Guides */ -#define kLockguideCommandStr "lockguide" - -/** @ingroup MenuCommand - View:Guides:Make Guides */ -#define kMakeguideCommandStr "makeguide" - -/** @ingroup MenuCommand - View:Guides:Release Guides */ -#define kReleaseguideCommandStr "releaseguide" - -/** @ingroup MenuCommand - View:Guides:Clear Guides */ -#define kClearguideCommandStr "clearguide" - -/** @ingroup MenuCommand - View:Smart Guides */ -#define kSnapomaticOnOffMenuItemCommandStr "Snapomatic on-off menu item" - -/** @ingroup MenuCommand - View:Perspective Grid:Show Grid */ -#define kShowPerspectiveGridCommandStr "Show Perspective Grid" - -/** @ingroup MenuCommand - View:Perspective Grid:Show Rulers */ -#define kShowRulerCommandStr "Show Ruler" - -/** @ingroup MenuCommand - View:Perspective Grid:Snap to Grid */ -#define kSnapToGridCommandStr "Snap to Grid" - -/** @ingroup MenuCommand - View:Perspective Grid:Lock Grid */ -#define kLockPerspectiveGridCommandStr "Lock Perspective Grid" - -/** @ingroup MenuCommand - View:Perspective Grid:Lock Station Point */ -#define kLockStationPointCommandStr "Lock Station Point" - -/** @ingroup MenuCommand - View:Perspective Grid:Define Grid */ -#define kDefinePerspectiveGridCommandStr "Define Perspective Grid" - -/** @ingroup MenuCommand - View:Perspective Grid:Save Grid as Preset */ -#define kSavePerspectiveGridAsPresetCommandStr "Save Perspective Grid as Preset" - -/** @ingroup MenuCommand - View:Show Grid */ -#define kShowgridCommandStr "showgrid" - -/** @ingroup MenuCommand - View:Snap to Grid */ -#define kSnapgridCommandStr "snapgrid" - -/** @ingroup MenuCommand - View:Snap to Point */ -#define kSnappointCommandStr "snappoint" - -/** @ingroup MenuCommand - View:New View */ -#define kNewviewCommandStr "newview" - -/** @ingroup MenuCommand - View:Edit Views */ -#define kEditviewCommandStr "editview" - -/** @ingroup MenuCommand - Window:New Window */ -#define kNewwindowCommandStr "newwindow" - -/** @ingroup MenuCommand - Window:Arrange:Cascade */ -#define kCascadeCommandStr "cascade" - -/** @ingroup MenuCommand - Window:Arrange:Tile */ -#define kTileCommandStr "tile" - -/** @ingroup MenuCommand - Window:Arrange:Float in Window */ -#define kFloatInWindowCommandStr "floatInWindow" - -/** @ingroup MenuCommand - Window:Arrange:Float All in Windows */ -#define kFloatAllInWindowsCommandStr "floatAllInWindows" - -/** @ingroup MenuCommand - Window:Arrange:Consolidate All Windows */ -#define kConsolidateAllWindowsCommandStr "consolidateAllWindows" - -/** @ingroup MenuCommand - Window:Workspace:Save Workspace */ -#define kAdobeSaveWorkspaceCommandStr "Adobe Save Workspace" - -/** @ingroup MenuCommand - Window:Workspace:New Workspace */ -#define kAdobeNewWorkspaceCommandStr "Adobe New Workspace" - -/** @ingroup MenuCommand - Window:Workspace:Manage Workspaces */ -#define kAdobeManageWorkspaceCommandStr "Adobe Manage Workspace" - -/** @ingroup MenuCommand - Window:Control */ -#define kControlPalettePluginCommandStr "control palette plugin" - -/** @ingroup MenuCommand - Window:Tools */ -#define kAdobeBuiltInToolbox1CommandStr "AdobeBuiltInToolbox1" - -/** @ingroup MenuCommand - Window:Actions */ -#define kAdobeActionPaletteCommandStr "Adobe Action Palette" - -/** @ingroup MenuCommand - Window:Align */ -#define kAdobeAlignPaletteCommandStr "AdobeAlignObjects2" - -/** @ingroup MenuCommand - Window:Appearance */ -#define kStylePaletteCommandStr "Style Palette" - -/** @ingroup MenuCommand - Window:Artboards */ -#define kAdobeArtboardPaletteCommandStr "Adobe Artboard Palette" - -/** @ingroup MenuCommand - Window:Attributes */ -#define kInternalPalettesPosingAsPlugInMenusAttributesCommandStr "internal palettes posing as plug-in menus-attributes" - -/** @ingroup MenuCommand - Window:Brushes */ -#define kAdobeBrushManagerMenuItemCommandStr "Adobe BrushManager Menu Item" - -/** @ingroup MenuCommand - Window:Color */ -#define kAdobeColorPaletteCommandStr "Adobe Color Palette" - -/** @ingroup MenuCommand - Window:Color Guide */ -#define kAdobeHarmonyPaletteCommandStr "Adobe Harmony Palette" - -/** @ingroup MenuCommand - Window:Document Info */ -#define kDocInfo1CommandStr "DocInfo1" - -/** @ingroup MenuCommand - Window:Flattener Preview */ -#define kAdobeFlatteningPreviewCommandStr "Adobe Flattening Preview" - -/** @ingroup MenuCommand - Window:Gradient */ -#define kAdobeGradientPaletteCommandStr "Adobe Gradient Palette" - -/** @ingroup MenuCommand - Window:Graphic Styles */ -#define kAdobeStylePaletteCommandStr "Adobe Style Palette" - -/** @ingroup MenuCommand - Window:Info */ -#define kInternalPalettesPosingAsPlugInMenusInfoCommandStr "internal palettes posing as plug-in menus-info" - -/** @ingroup MenuCommand - Window:Layers */ -#define kAdobeLayerPalette1CommandStr "AdobeLayerPalette1" - -/** @ingroup MenuCommand - Window:Links */ -#define kAdobeLinkPaletteMenuItemCommandStr "Adobe LinkPalette Menu Item" - -/** @ingroup MenuCommand - Window:Magic Wand */ -#define kAIMagicWandCommandStr "AI Magic Wand" - -/** @ingroup MenuCommand - Window:Navigator */ -#define kAdobeNavigator1CommandStr "AdobeNavigator" - -/** @ingroup MenuCommand - Window:Pathfinder */ -#define kAdobePathfinderPalette1CommandStr "Adobe PathfinderUI" - -/** @ingroup MenuCommand - Window:Separations Preview */ -#define kAdobeSeparationPreviewPaletteCommandStr "Adobe Separation Preview Panel" - -/** @ingroup MenuCommand - Window:Stroke */ -#define kAdobeStrokePaletteCommandStr "Adobe Stroke Palette" - -/** @ingroup MenuCommand - Window:SVG Interactivity */ -#define kAdobeSVGInteractivityPaletteCommandStr "Adobe SVG Interactivity Palette" - -/** @ingroup MenuCommand - Window:Swatches */ -#define kAdobeSwatchesMenuItemCommandStr "Adobe Swatches Menu Item" - -/** @ingroup MenuCommand - Window:Symbols */ -#define kAdobeSymbolPaletteCommandStr "Adobe Symbol Palette" - -/** @ingroup MenuCommand - Window:Transform */ -#define kAdobeTransformObjects1CommandStr "AdobeTransformObjects1" - -/** @ingroup MenuCommand - Window:Transparency */ -#define kAdobeTransparencyPaletteMenuItemCommandStr "Adobe Transparency Palette Menu Item" - -/** @ingroup MenuCommand - Window:Type:Character */ -#define kInternalPalettesPosingAsPlugInMenusCharacterCommandStr "internal palettes posing as plug-in menus-character" - -/** @ingroup MenuCommand - Window:Type:Character Styles */ -#define kCharacterStylesCommandStr "Character Styles" - -/** @ingroup MenuCommand - Window:Type:Flash Text */ -#define kFlashTextCommandStr "Flash Text" - -/** @ingroup MenuCommand - Window:Type:Glyphs */ -#define kAlternateGlyphPalettePlugin2CommandStr "alternate glyph palette plugin 2" - -/** @ingroup MenuCommand - Window:Type:OpenType */ -#define kInternalPalettesPosingAsPlugInMenusOpentypeCommandStr "internal palettes posing as plug-in menus-opentype" - -/** @ingroup MenuCommand - Window:Type:Paragraph */ -#define kInternalPalettesPosingAsPlugInMenusParagraphCommandStr "internal palettes posing as plug-in menus-paragraph" - -/** @ingroup MenuCommand - Window:Type:Paragraph Styles */ -#define kAdobeParagraphStylesPaletteCommandStr "Adobe Paragraph Styles Palette" - -/** @ingroup MenuCommand - Window:Type:Tabs */ -#define kInternalPalettesPosingAsPlugInMenusTabCommandStr "internal palettes posing as plug-in menus-tab" - -/** @ingroup MenuCommand - Window:Variables */ -#define kAdobeVariablesPaletteMenuItemCommandStr "Adobe Variables Palette Menu Item" - -/** @ingroup MenuCommand - Window:Brush Libraries:No Libraries found */ -#define kAdobeBrushMgrNoLibrariesMenuItemCommandStr "AdobeBrushMgr No libraries menu item" - -/** @ingroup MenuCommand - Window:Brush Libraries:Other Library */ -#define kAdobeBrushMgrOtherLibrariesMenuItemCommandStr "AdobeBrushMgr Other libraries menu item" - -/** @ingroup MenuCommand - Window:Graphic Style Libraries:No Libraries found */ -#define kAdobeArtStylePluginNoLibrariesMenuItemCommandStr "Adobe Art Style Plugin No libraries menu item" - -/** @ingroup MenuCommand - Window:Graphic Style Libraries:Other Library */ -#define kAdobeArtStylePluginOtherLibrariesMenuItemCommandStr "Adobe Art Style Plugin Other libraries menu item" - -/** @ingroup MenuCommand - Window:Symbol Libraries:No Libraries found */ -#define kAdobeSymbolPalettePluginNoLibrariesMenuItemCommandStr "Adobe Symbol Palette Plugin No libraries menu item" - -/** @ingroup MenuCommand - Window:Symbol Libraries:Other Library */ -#define kAdobeSymbolPalettePluginOtherLibrariesMenuItemCommandStr "Adobe Symbol Palette Plugin Other libraries menu item" - -/** @ingroup MenuCommand - Help:Illustrator Help */ -#define kHelpcontentCommandStr "helpcontent" - -/** @ingroup MenuCommand - Help:Welcome Screen */ -#define kWelcomeScreenMenuItemCommandStr "Welcome screen menu item" - -/** @ingroup MenuCommand - Help:Debug:Memory Use Checkpoint */ -#define kMemoryUseCheckpointCommandStr "Memory Use Checkpoint" - -/** @ingroup MenuCommand - Help:Debug:Save Memory Use */ -#define kSaveMemoryUseCommandStr "Save Memory Use" - -/** @ingroup MenuCommand - Help:Debug:Count Objects */ -#define kCountObjectsCommandStr "Count Objects" - -/** @ingroup MenuCommand - Help:Debug:Object Counts */ -#define kObjectCountsCommandStr "Object Counts" - -/** @ingroup MenuCommand - Help:Debug:Track API Refs */ -#define kTrackAPIRefsCommandStr "Track API Refs" - -/** @ingroup MenuCommand - Help:Debug:Enable New Rendering */ -#define kEnableNewRenderingCommandStr "Enable New Rendering" - -/** @ingroup MenuCommand - Help:Debug:Enable Rendering Timer */ -#define kEnableRenderingTimerCommandStr "Enable Rendering Timer" - -/** @ingroup MenuCommand - Help:Debug:Purge Rendering Cache */ -#define kPurgeRenderingCacheCommandStr "Purge Rendering Cache" - -/** @ingroup MenuCommand - Help:Debug:Redraw */ -#define kRedrawCommandStr "Redraw" - -/** @ingroup MenuCommand - Help:Debug:Dump Application Heap Used */ -#define kDumpApplicationHeapUsedCommandStr "Dump Application Heap Used" - -/** @ingroup MenuCommand - Help:Debug:Disable Greeking for New Rendering */ -#define kDisableGreekingForNewRenderingCommandStr "Disable Greeking for New Rendering" - -/** @ingroup MenuCommand - Help:Debug:Enable Threaded Rendering */ -#define kEnableThreadedRenderingCommandStr "Enable Threaded Rendering" - -/** @ingroup MenuCommand - Help:Debug:Enable AGM Threading */ -#define kEnableAGMThreadingCommandStr "Enable AGM Threading" - -/** @ingroup MenuCommand - Help:Debug:Enable Hyper Threading */ -#define kEnableHyperThreadingCommandStr "Enable Hyper Threading" - -/** @ingroup MenuCommand - Help:Debug:Enable AGM Internal Memory Pool */ -#define kEnableAGMInternalMemoryPoolCommandStr "Enable AGM Internal Memory Pool" - -/** @ingroup MenuCommand - Help:Debug:Enable QuickPort Quartz */ -#define kEnableQuickPortQuartzCommandStr "Enable QuickPort Quartz" - -/** @ingroup MenuCommand - Help:Debug:Heap Check Running */ -#define kHeapCheckRunningCommandStr "Heap Check Running" - -/** @ingroup MenuCommand - Help:Debug:Crash */ -#define kCrashCommandStr "Crash" - -/** @ingroup MenuCommand - Help:Debug:Enable PGF Recovery */ -#define kEnablePGFRecoveryCommandStr "Enable PGF Recovery" - -/** @ingroup MenuCommand - Help:Debug:Enable ATE Read Recovery */ -#define kEnableATEReadRecoveryCommandStr "Enable ATE Read Recovery" - -/** @ingroup MenuCommand - Help:Debug:Enable ATE Write Recovery */ -#define kEnableATEWriteRecoveryCommandStr "Enable ATE Write Recovery" - -/** @ingroup MenuCommand - Help:Debug:Trace Counted Object Refs */ -#define kTraceCountedObjectRefsCommandStr "Trace Counted Object Refs" - -/** @ingroup MenuCommand - Help:Debug:Check Heap */ -#define kCheckHeapCommandStr "Check Heap" - -/** @ingroup MenuCommand - Help:Debug:Track Blocks */ -#define kTrackBlocksCommandStr "Track Blocks" - -/** @ingroup MenuCommand - Help:Debug:Defer Freeing */ -#define kDeferFreeingCommandStr "Defer Freeing" - -/** @ingroup MenuCommand - Help:Debug:Debug Window */ -#define kDebugWindowCommandStr "Debug Window" - -/** @ingroup MenuCommand - Help:Debug:Flush Preference to File */ -#define kFlushPreferenceToFileCommandStr "Flush Preference to File" - -/** @ingroup MenuCommand - Help:Debug:Reinterpret Grayscale Image Color Space */ -#define kReinterpretGrayscaleImageColorSpaceCommandStr "Reinterpret Grayscale Image Color Space" - -/** @ingroup MenuCommand - Help:Debug:Split and Interleave Raster Channels */ -#define kSplitAndInterleaveRasterChannelsCommandStr "Split and Interleave Raster Channels" - -/** @ingroup MenuCommand - Help:Debug:Populate Live Effect Graphic Styles */ -#define kPopulateLiveEffectGraphicStylesCommandStr "Populate Live Effect Graphic Styles" - -/** @ingroup MenuCommand - Help:Debug:Use ContainsTransparency Flag */ -#define kUseContainsTransparencyFlagCommandStr "Use ContainsTransparency Flag" - -/** @ingroup MenuCommand - Help:Debug:Add Known Style */ -#define kAddKnownStyleCommandStr "Add Known Style" - -/** @ingroup MenuCommand - Help:Debug:Mark Logs */ -#define kMarkLogsCommandStr "Mark Logs" - -/** @ingroup MenuCommand - Help:Debug:Clear Logs */ -#define kClearLogsCommandStr "Clear Logs" - -/** @ingroup MenuCommand - Help:Debug:Run UnicodeString testbed */ -#define kRunUnicodeStringTestbedCommandStr "Run UnicodeString testbed" - -/** @ingroup MenuCommand - Help:Debug:Enable Gradient Feedback */ -#define kGradientFeedbackDebugCommandStr "Gradient Feedback Debug" - -/** @ingroup MenuCommand - Help:Debug:Unit Testing */ -#define kAdobeUnitTestingCommandStr "Adobe Unit testing" - -/** @ingroup MenuCommand - Help:Create Eve Dialog */ -#define kAdamEveDialogMenuCommandStr "Adam Eve dialog menu" - -/** @ingroup MenuCommand - Help:About Illustrator */ -#define kAboutCommandStr "about" - -/** @ingroup MenuCommand - Help:System Info */ -#define kSystemInfoStr "System Info" - -/** @ingroup MenuCommand - Other Panel:New Symbol */ -#define kAdobeNewSymbolShortcutCommandStr "Adobe New Symbol Shortcut" - -/** @ingroup MenuCommand - Other Panel:Show Color Panel (Secondary) */ -#define kAdobeColorPaletteSecondaryCommandStr "Adobe Color Palette Secondary" - -/** @ingroup MenuCommand - Other Panel:Actions Batch */ -#define kAdobeActionsBatchCommandStr "Adobe Actions Batch" - -/** @ingroup MenuCommand - Other Panel:Add New Fill */ -#define kAdobeNewFillShortcutCommandStr "Adobe New Fill Shortcut" - -/** @ingroup MenuCommand - Other Panel:Add New Stroke */ -#define kAdobeNewStrokeShortcutCommandStr "Adobe New Stroke Shortcut" - -/** @ingroup MenuCommand - Other Panel:New Graphic Style */ -#define kAdobeNewStyleShortcutCommandStr "Adobe New Style Shortcut" - -/** @ingroup MenuCommand - Other Panel:New Layer */ -#define kAdobeLayerPalette2CommandStr "AdobeLayerPalette2" - -/** @ingroup MenuCommand - Other Panel:New Layer with Dialog */ -#define kAdobeLayerPalette3CommandStr "AdobeLayerPalette3" - -/** @ingroup MenuCommand - Other Panel:Update Link */ -#define kAdobeUpdateLinkShortcutCommandStr "Adobe Update Link Shortcut" - -/** @ingroup MenuCommand - Other Panel:Navigator Options */ -#define kAdobeNavigator2CommandStr "AdobeNavigator2" - -/** @ingroup MenuCommand - Other Panel:New Swatch */ -#define kAdobeNewSwatchShortcutMenuCommandStr "Adobe New Swatch Shortcut Menu" - - -#include "AIHeaderEnd.h" - -#endif // __AIMenuCommandString__ - +#ifndef __AIMenuCommandString__ +#define __AIMenuCommandString__ + +/************************************************************************* + * + * ADOBE CONFIDENTIAL + * ___________________ + * + * Copyright 2014 Adobe Systems Incorporated + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe Systems Incorporated and its suppliers, + * if any. The intellectual and technical concepts contained + * herein are proprietary to Adobe Systems Incorporated and its + * suppliers and may be covered by U.S. and Foreign Patents, + * patents in process, and are protected by trade secret or copyright law. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe Systems Incorporated. + * + **************************************************************************/ + +/** @file AIMenuCommandString.h */ + + + + +#include "AIHeaderBegin.h" + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** @ingroup MenuCommand + File:New */ +#define kNewCommandStr "new" + +/** @ingroup MenuCommand + File:New from Template */ +#define kNewFromTemplateCommandStr "newFromTemplate" + +/** @ingroup MenuCommand + File:Open */ +#define kOpenCommandStr "open" + +/** @ingroup MenuCommand + File:Browse in Bridge */ +#define kAdobeBridgeBrowseCommandStr "Adobe Bridge Browse" + +/** @ingroup MenuCommand + File:Device Central */ +#define kAdobeAIDeviceCenterCommandStr "Adobe AI Device center" + +/** @ingroup MenuCommand + File:Close */ +#define kCloseCommandStr "close" + +/** @ingroup MenuCommand + File:Save */ +#define kSaveCommandStr "save" + +/** @ingroup MenuCommand + File:Save As */ +#define kSaveasCommandStr "saveas" + +/** @ingroup MenuCommand + File:Save a Copy */ +#define kSaveacopyCommandStr "saveacopy" + +/** @ingroup MenuCommand + File:Save as Template */ +#define kSaveastemplateCommandStr "saveastemplate" + +/** @ingroup MenuCommand + File:Save for Web & Devices */ +#define kAdobeAISaveForWebCommandStr "Adobe AI Save For Web" + +/** @ingroup MenuCommand + File:Save Selected Slices */ +#define kAdobeAISaveSelectedSlicesCommandStr "Adobe AI Save Selected Slices" + +/** @ingroup MenuCommand + File:Revert */ +#define kRevertCommandStr "revert" + +/** @ingroup MenuCommand + File:Place */ +#define kAIPlaceCommandStr "AI Place" + +/** @ingroup MenuCommand + File:Export */ +#define kExportCommandStr "export" + +/** @ingroup MenuCommand + File:Export Selection */ +#define kExportSelectionCommandStr "exportSelection" + +/** @ingroup MenuCommand + File:Export/Export For Screens */ +#define kExportForScreensCommandStr "exportForScreens" + +/** @ingroup MenuCommand + File:Scripts:Other Script */ +#define kAiBrowseForScriptCommandStr "ai_browse_for_script" + +/** @ingroup MenuCommand + File:Document Setup */ +#define kDocumentCommandStr "document" + +/** @ingroup MenuCommand + File:Document Color Mode:CMYK Color */ +#define kDocColorCmykCommandStr "doc-color-cmyk" + +/** @ingroup MenuCommand + File:Document Color Mode:RGB Color */ +#define kDocColorRgbCommandStr "doc-color-rgb" + +/** @ingroup MenuCommand + File:File Info */ +#define kFileInfoCommandStr "File Info" + +/** @ingroup MenuCommand + File:Print */ +#define kPrintCommandStr "Print" + +/** @ingroup MenuCommand + File:Exit */ +#define kQuitCommandStr "quit" + +/** @ingroup MenuCommand + Edit:Undo */ +#define kUndoCommandStr "undo" + +/** @ingroup MenuCommand + Edit:Redo */ +#define kRedoCommandStr "redo" + +/** @ingroup MenuCommand + Edit:Cut */ +#define kCutCommandStr "cut" + +/** @ingroup MenuCommand + Edit:Copy */ +#define kCopyCommandStr "copy" + +/** @ingroup MenuCommand + Edit:Paste */ +#define kPasteCommandStr "paste" + +/** @ingroup MenuCommand + Edit:Paste in Front */ +#define kPasteFrontCommandStr "pasteFront" + +/** @ingroup MenuCommand + Edit:Paste in Back */ +#define kPasteBackCommandStr "pasteBack" + +/** @ingroup MenuCommand + Edit:Paste in Place */ +#define kPasteInPlaceCommandStr "pasteInPlace" + +/** @ingroup MenuCommand + Edit:Paste on All Artboards */ +#define kPasteInAllArtboardCommandStr "pasteInAllArtboard" + +/** @ingroup MenuCommand + Edit:Paste without Formatting */ +#define kPasteWithoutFormattingCommandStr "pasteWithoutFormatting" + +/** @ingroup MenuCommand + Edit:Clear */ +#define kClearCommandStr "clear" + +/** @ingroup MenuCommand + Edit:Find & Replace */ +#define kFindAndReplaceCommandStr "Find and Replace" + +/** @ingroup MenuCommand + Edit:Find Next */ +#define kFindNextCommandStr "Find Next" + +/** @ingroup MenuCommand + Edit:Check Spelling */ +#define kCheckSpellingCommandStr "Check Spelling" + +/** @ingroup MenuCommand + Edit:Edit Custom Dictionary */ +#define kEditCustomDictionaryCommandStr "Edit Custom Dictionary..." + +/** @ingroup MenuCommand + Edit:Define Pattern */ +#define kDefinePatternMenuItemCommandStr "Define Pattern Menu Item" + +/** @ingroup MenuCommand + Edit:Edit Colors:Recolor Artwork */ +#define kRecolorArtDialogCommandStr "Recolor Art Dialog" + +/** @ingroup MenuCommand + Edit:Edit Colors:Adjust Color Balance */ +#define kAdjust3CommandStr "Adjust3" + +/** @ingroup MenuCommand + Edit:Edit Colors:Blend Front to Back */ +#define kColors3CommandStr "Colors3" + +/** @ingroup MenuCommand + Edit:Edit Colors:Blend Horizontally */ +#define kColors4CommandStr "Colors4" + +/** @ingroup MenuCommand + Edit:Edit Colors:Blend Vertically */ +#define kColors5CommandStr "Colors5" + +/** @ingroup MenuCommand + Edit:Edit Colors:Convert to CMYK */ +#define kColors8CommandStr "Colors8" + +/** @ingroup MenuCommand + Edit:Edit Colors:Convert to Grayscale */ +#define kColors7CommandStr "Colors7" + +/** @ingroup MenuCommand + Edit:Edit Colors:Convert to RGB */ +#define kColors9CommandStr "Colors9" + +/** @ingroup MenuCommand + Edit:Edit Colors:Invert Colors */ +#define kColors6CommandStr "Colors6" + +/** @ingroup MenuCommand + Edit:Edit Colors:Overprint Black */ +#define kOverprint2CommandStr "Overprint2" + +/** @ingroup MenuCommand + Edit:Edit Colors:Saturate */ +#define kSaturate3CommandStr "Saturate3" + +/** @ingroup MenuCommand + Edit:Edit Original */ +#define kEditOriginalMenuItemCommandStr "EditOriginal Menu Item" + +/** @ingroup MenuCommand + Edit:Transparency Flattener Presets */ +#define kTransparencyPresetsCommandStr "Transparency Presets" + +/** @ingroup MenuCommand + Edit:Tracing Presets */ +#define kTracingPresetsCommandStr "TracingPresets" + +/** @ingroup MenuCommand + Edit:Print Presets */ +#define kPrintPresetsCommandStr "Print Presets" + +/** @ingroup MenuCommand + Edit:Adobe PDF Presets */ +#define kPDFPresetsCommandStr "PDF Presets" + +/** @ingroup MenuCommand + Edit:SWF Presets */ +#define kSWFPresetsCommandStr "SWFPresets" + +/** @ingroup MenuCommand + Edit:Perspective Grid Presets */ +#define kPerspectiveGridPresetsCommandStr "PerspectiveGridPresets" + +/** @ingroup MenuCommand + Edit:Color Settings */ +#define kColorCommandStr "color" + +/** @ingroup MenuCommand + Edit:Assign Profile */ +#define kAssignprofileCommandStr "assignprofile" + +/** @ingroup MenuCommand + Edit:Keyboard Shortcuts */ +#define kKBSCMenuItemCommandStr "KBSC Menu Item" + +/** @ingroup MenuCommand + Edit:Run AAT Test */ +#define kAATMenuItemCommandStr "AAT Menu Item" + +/** @ingroup MenuCommand + Edit:Edit AAT Script */ +#define kLastAATMenuItemCommandStr "Last AAT Menu Item" + +/** @ingroup MenuCommand + Edit:Abort AAT Script */ +#define kAbortAATMenuItemCommandStr "Abort AAT Menu Item" + +/** @ingroup MenuCommand + Edit:Preferences:General */ +#define kPreferenceCommandStr "preference" + +/** @ingroup MenuCommand + Edit:Preferences:Selection & Anchor Display */ +#define kSelectPrefCommandStr "selectPref" + +/** @ingroup MenuCommand + Edit:Preferences:Type */ +#define kKeyboardPrefCommandStr "keyboardPref" + +/** @ingroup MenuCommand + Edit:Preferences:Units */ +#define kUnitundoPrefCommandStr "unitundoPref" + +/** @ingroup MenuCommand + Edit:Preferences:Guides & Grid */ +#define kGuidegridPrefCommandStr "guidegridPref" + +/** @ingroup MenuCommand + Edit:Preferences:Smart Guides */ +#define kSnapPrefCommandStr "snapPref" + +/** @ingroup MenuCommand + Edit:Preferences:Slices */ +#define kSlicePrefCommandStr "slicePref" + +/** @ingroup MenuCommand + Edit:Preferences:Hyphenation */ +#define kHyphenPrefCommandStr "hyphenPref" + +/** @ingroup MenuCommand + Edit:Preferences:Plug-ins & Scratch Disks */ +#define kPluginPrefCommandStr "pluginPref" + +/** @ingroup MenuCommand + Edit:Preferences:User Interface */ +#define kUIPrefCommandStr "UIPref" + +/** @ingroup MenuCommand + Edit:Preferences:File Handling & Clipboard */ +#define kFileClipboardPrefCommandStr "FileClipboardPref" + +/** @ingroup MenuCommand + Edit:Preferences:Appearance of Black */ +#define kBlackPrefCommandStr "BlackPref" + +/** @ingroup MenuCommand + Object:Transform:Transform Again */ +#define kTransformagainCommandStr "transformagain" + +/** @ingroup MenuCommand + Object:Transform:Move */ +#define kTransformmoveCommandStr "transformmove" + +/** @ingroup MenuCommand + Object:Transform:Rotate */ +#define kTransformrotateCommandStr "transformrotate" + +/** @ingroup MenuCommand + Object:Transform:Reflect */ +#define kTransformreflectCommandStr "transformreflect" + +/** @ingroup MenuCommand + Object:Transform:Scale */ +#define kTransformscaleCommandStr "transformscale" + +/** @ingroup MenuCommand + Object:Transform:Shear */ +#define kTransformshearCommandStr "transformshear" + +/** @ingroup MenuCommand + Object:Transform Each */ +#define kTransformEachCommandStr "Transform v23" + +/** @ingroup MenuCommand + Object:Transform:Reset Bounding Box */ +#define kAIResetBoundingBoxCommandStr "AI Reset Bounding Box" + +/** @ingroup MenuCommand + Object:Arrange:Bring to Front */ +#define kSendToFrontCommandStr "sendToFront" + +/** @ingroup MenuCommand + Object:Arrange:Bring Forward */ +#define kSendForwardCommandStr "sendForward" + +/** @ingroup MenuCommand + Object:Arrange:Send Backward */ +#define kSendBackwardCommandStr "sendBackward" + +/** @ingroup MenuCommand + Object:Arrange:Send to Back */ +#define kSendToBackCommandStr "sendToBack" + +/** @ingroup MenuCommand + Object:Arrange:Send to Current Layer */ +#define kSelectionHat2CommandStr "Selection Hat 2" + +/** @ingroup MenuCommand + Object:Group */ +#define kGroupCommandStr "group" + +/** @ingroup MenuCommand + Object:Ungroup */ +#define kUngroupCommandStr "ungroup" + +/** @ingroup MenuCommand + Object:Lock:Selection */ +#define kLockCommandStr "lock" + +/** @ingroup MenuCommand + Object:Lock:All Artwork Above */ +#define kSelectionHat5CommandStr "Selection Hat 5" + +/** @ingroup MenuCommand + Object:Lock:Other Layers */ +#define kSelectionHat7CommandStr "Selection Hat 7" + +/** @ingroup MenuCommand + Object:Unlock All */ +#define kUnlockAllCommandStr "unlockAll" + +/** @ingroup MenuCommand + Object:Hide:Selection */ +#define kHideCommandStr "hide" + +/** @ingroup MenuCommand + Object:Hide:All Artwork Above */ +#define kSelectionHat4CommandStr "Selection Hat 4" + +/** @ingroup MenuCommand + Object:Hide:Other Layers */ +#define kSelectionHat6CommandStr "Selection Hat 6" + +/** @ingroup MenuCommand + Object:Show All */ +#define kShowAllCommandStr "showAll" + +/** @ingroup MenuCommand + Object:Expand */ +#define kExpand3CommandStr "Expand3" + +/** @ingroup MenuCommand + Object:Expand Appearance */ +#define kExpandStyleCommandStr "expandStyle" + +/** @ingroup MenuCommand + Object:Flatten Transparency */ +#define kFlattenTransparency1CommandStr "FlattenTransparency1" + +/** @ingroup MenuCommand + Object:Rasterize */ +#define kRasterize8MenuItemCommandStr "Rasterize 8 menu item" + +/** @ingroup MenuCommand + Object:Create Gradient Mesh */ +#define kCreateGradientMeshCommandStr "make mesh" + +/** @ingroup MenuCommand + Object:Create Object Mosaic */ +#define kAIObjectMosaicPlugIn4CommandStr "AI Object Mosaic Plug-in4" + +/** @ingroup MenuCommand + Object:Create Trim Marks */ +#define kTrimMarkV25CommandStr "TrimMark v25" + +/** @ingroup MenuCommand + Object:Slice:Make */ +#define kAISliceMakeSliceCommandStr "AISlice Make Slice" + +/** @ingroup MenuCommand + Object:Slice:Release */ +#define kAISliceReleaseSliceCommandStr "AISlice Release Slice" + +/** @ingroup MenuCommand + Object:Slice:Create from Guides */ +#define kAISliceCreateFromGuidesCommandStr "AISlice Create from Guides" + +/** @ingroup MenuCommand + Object:Slice:Create from Selection */ +#define kAISliceCreateFromSelectionCommandStr "AISlice Create from Selection" + +/** @ingroup MenuCommand + Object:Slice:Duplicate Slice */ +#define kAISliceDuplicateCommandStr "AISlice Duplicate" + +/** @ingroup MenuCommand + Object:Slice:Combine Slices */ +#define kAISliceCombineCommandStr "AISlice Combine" + +/** @ingroup MenuCommand + Object:Slice:Divide Slices */ +#define kAISliceDivideCommandStr "AISlice Divide" + +/** @ingroup MenuCommand + Object:Slice:Delete All */ +#define kAISliceDeleteAllSlicesCommandStr "AISlice Delete All Slices" + +/** @ingroup MenuCommand + Object:Slice:Slice Options */ +#define kAISliceSliceOptionsCommandStr "AISlice Slice Options" + +/** @ingroup MenuCommand + Object:Slice:Clip to Artboard */ +#define kAISliceClipToArtboardCommandStr "AISlice Clip to Artboard" + +/** @ingroup MenuCommand + Object:Path:Join */ +#define kJoinCommandStr "join" + +/** @ingroup MenuCommand + Object:Path:Average */ +#define kAverageCommandStr "average" + +/** @ingroup MenuCommand + Object:Path:Outline Stroke */ +#define kOffsetPathV22CommandStr "OffsetPath v22" + +/** @ingroup MenuCommand + Object:Path:Offset Path */ +#define kOffsetPathV23CommandStr "OffsetPath v23" + +/** @ingroup MenuCommand + Object:Path:Simplify */ +#define kSimplifyCommandStr "simplify menu item" + +/** @ingroup MenuCommand + Object:Path:Add Anchor Points */ +#define kAddAnchorPoints2CommandStr "Add Anchor Points2" + +/** @ingroup MenuCommand + Object:Path:Remove Anchor Points */ +#define kRemoveAnchorPointsMenuCommandStr "Remove Anchor Points menu" + +/** @ingroup MenuCommand + Object:Path:Divide Objects Below */ +#define kKnifeTool2CommandStr "Knife Tool2" + +/** @ingroup MenuCommand + Object:Path:Split Into Grid */ +#define kRowsAndColumnsCommandStr "Rows and Columns...." + +/** @ingroup MenuCommand + Object:Path:Clean Up */ +#define kCleanupMenuItemCommandStr "cleanup menu item" + +/** @ingroup MenuCommand + Object:Blend:Make */ +#define kBlendMakeCommandStr "Path Blend Make" + +/** @ingroup MenuCommand + Object:Blend:Release */ +#define kBlendReleaseCommandStr "Path Blend Release" + +/** @ingroup MenuCommand + Object:Blend:Expand */ +#define kBlendExpandCommndStr "Path Blend Expand" + +/** @ingroup MenuCommand + Object:Blend:Blend Options */ +#define kBlendOptionsCommandStr "Path Blend Options" + +/** @ingroup MenuCommand + Object:Blend:Replace Spine */ +#define kBlendReplaceSpineCommandStr "Path Blend Replace Spine" + +/** @ingroup MenuCommand + Object:Blend:Reverse Spine */ +#define kBlendReverseSpineCommandStr "Path Blend Reverse Spine" + +/** @ingroup MenuCommand + Object:Blend:Reverse Front to Back */ +#define kBlendReverseStackCommandStr "Path Blend Reverse Stack" + +/** @ingroup MenuCommand + Object:Envelope Distort:Make with Warp */ +#define kMakeWarpCommandStr "Make Warp" + +/** @ingroup MenuCommand + Object:Envelope Distort:Make with Mesh */ +#define kCreateEnvelopeGridCommandStr "Create Envelope Grid" + +/** @ingroup MenuCommand + Object:Envelope Distort:Make with Top Object */ +#define kMakeEnvelopeCommandStr "Make Envelope" + +/** @ingroup MenuCommand + Object:Envelope Distort:Release */ +#define kReleaseEnvelopeCommandStr "Release Envelope" + +/** @ingroup MenuCommand + Object:Envelope Distort:Envelope Options */ +#define kEnvelopeOptionsCommandStr "Envelope Options" + +/** @ingroup MenuCommand + Object:Envelope Distort:Expand */ +#define kExpandEnvelopeCommandStr "Expand Envelope" + +/** @ingroup MenuCommand + Object:Envelope Distort:Edit Contents */ +#define kEditEnvelopeContentsCommandStr "Edit Envelope Contents" + +/** @ingroup MenuCommand + Object:Perspective:Attach to Active Plane */ +#define kAttachToActivePlaneCommandStr "Attach to Active Plane" + +/** @ingroup MenuCommand + Object:Perspective:Release with Perspective */ +#define kReleaseWithPerspectiveCommandStr "Release with Perspective" + +/** @ingroup MenuCommand + Object:Perspective:Move Plane to Match Object */ +#define kShowObjectGridPlaneCommandStr "Show Object Grid Plane" + +/** @ingroup MenuCommand + Object:Perspective:Edit Text */ +#define kEditOriginalObjectCommandStr "Edit Original Object" + +/** @ingroup MenuCommand + Object:Live Paint:Make */ +#define kMakePlanetXCommandStr "Make Planet X" + +/** @ingroup MenuCommand + Object:Live Paint:Merge */ +#define kMargePlanetXCommandStr "Marge Planet X" + +/** @ingroup MenuCommand + Object:Live Paint:Release */ +#define kReleasePlanetXCommandStr "Release Planet X" + +/** @ingroup MenuCommand + Object:Live Paint:Gap Options */ +#define kPlanetXOptionsCommandStr "Planet X Options" + +/** @ingroup MenuCommand + Object:Live Paint:Expand */ +#define kExpandPlanetXCommandStr "Expand Planet X" + +/** @ingroup MenuCommand + Object:Live Trace:Make */ +#define kMakeTracingCommandStr "Make Tracing" + +/** @ingroup MenuCommand + Object:Live Trace:Make and Expand */ +#define kMakeAndExpandCommandStr "Make and Expand" + +/** @ingroup MenuCommand + Object:Live Trace:Make and Convert to Live Paint */ +#define kMakeAndConvertToLivePaintCommandStr "Make and Convert to Live Paint" + +/** @ingroup MenuCommand + Object:Live Trace:Release */ +#define kReleaseTracingCommandStr "Release Tracing" + +/** @ingroup MenuCommand + Object:Live Trace:Tracing Options */ +#define kTracingOptionsCommandStr "Tracing Options" + +/** @ingroup MenuCommand + Object:Live Trace:Expand */ +#define kExpandTracingCommandStr "Expand Tracing" + +/** @ingroup MenuCommand + Object:Live Trace:Expand as Viewed */ +#define kExpandAsViewedCommandStr "Expand as Viewed" + +/** @ingroup MenuCommand + Object:Live Trace:Convert to Live Paint */ +#define kPaintTracingCommandStr "Paint Tracing" + +/** @ingroup MenuCommand + Object:Live Trace:Show No Image */ +#define kShowNoImageCommandStr "ShowNoImage" + +/** @ingroup MenuCommand + Object:Live Trace:Show Original Image */ +#define kShowOriginalImageCommandStr "ShowOriginalImage" + +/** @ingroup MenuCommand + Object:Live Trace:Show Adjusted Image */ +#define kShowPreprocessedImageCommandStr "Show Preprocessed Image" + +/** @ingroup MenuCommand + Object:Live Trace:Show Transparent Image */ +#define kShowTransparentImageCommandStr "ShowTransparentImage" + +/** @ingroup MenuCommand + Object:Live Trace:Show No Tracing Result */ +#define kShowNoArtworkCommandStr "ShowNoArtwork" + +/** @ingroup MenuCommand + Object:Live Trace:Show Tracing Result */ +#define kShowArtworkCommandStr "ShowArtwork" + +/** @ingroup MenuCommand + Object:Live Trace:Show Outlines */ +#define kShowPathsCommandStr "ShowPaths" + +/** @ingroup MenuCommand + Object:Live Trace:Show Outlines with Tracing */ +#define kShowPathsAndTransparentArtworkCommandStr "ShowPathsAndTransparentArtwork" + +/** @ingroup MenuCommand + Object:Text Wrap:Make */ +#define kMakeTextWrapCommandStr "Make Text Wrap" + +/** @ingroup MenuCommand + Object:Text Wrap:Release */ +#define kReleaseTextWrapCommandStr "Release Text Wrap" + +/** @ingroup MenuCommand + Object:Text Wrap:Text Wrap Options */ +#define kTextWrapOptionsCommandStr "Text Wrap Options..." + +/** @ingroup MenuCommand + Object:Clipping Mask:Make */ +#define kMakeMaskCommandStr "makeMask" + +/** @ingroup MenuCommand + Object:Clipping Mask:Release */ +#define kReleaseMaskCommandStr "releaseMask" + +/** @ingroup MenuCommand + Object:Clipping Mask:Edit Contents */ +#define kEditMaskCommandStr "editMask" + +/** @ingroup MenuCommand + Object:Compound Path:Make */ +#define kCompoundPathCommandStr "compoundPath" + +/** @ingroup MenuCommand + Object:Compound Path:Release */ +#define kNoCompoundPathCommandStr "noCompoundPath" + +/** @ingroup MenuCommand + Object:Artboards:Convert to Artboards */ +#define kSetCropMarksCommandStr "setCropMarks" + +/** @ingroup MenuCommand + Object:Artboards:Rearrange */ +#define kReArrangeArtboardsCommandStr "ReArrange Artboards" + +/** @ingroup MenuCommand + Object:Artboards:Fit to Artwork Bounds */ +#define kFitArtboardToArtworkBoundsCommandStr "Fit Artboard to artwork bounds" + +/** @ingroup MenuCommand + Object:Artboards:Fit to Selected Art */ +#define kFitArtboardToSelectedArtCommandStr "Fit Artboard to selected Art" + +/** @ingroup MenuCommand + Object:Graph:Type */ +#define kSetGraphStyleCommandStr "setGraphStyle" + +/** @ingroup MenuCommand + Object:Graph:Data */ +#define kEditGraphDataCommandStr "editGraphData" + +/** @ingroup MenuCommand + Object:Graph:Design */ +#define kGraphDesignsCommandStr "graphDesigns" + +/** @ingroup MenuCommand + Object:Graph:Column */ +#define kSetBarDesignCommandStr "setBarDesign" + +/** @ingroup MenuCommand + Object:Graph:Marker */ +#define kSetIconDesignCommandStr "setIconDesign" + +/** @ingroup MenuCommand + Type:Glyphs */ +#define kAlternateGlyphPalettePluginCommandStr "alternate glyph palette plugin" + +/** @ingroup MenuCommand + Type:Area Type Options */ +#define kAreaTypeOptionsCommandStr "area-type-options" + +/** @ingroup MenuCommand + Type:Type on a Path:Rainbow */ +#define kRainbowTOPCommandStr "Rainbow" + +/** @ingroup MenuCommand + Type:Type on a Path:3D Ribbon */ +#define k3DRibbonTOPCommandStr "3D ribbon" + +/** @ingroup MenuCommand + Type:Type on a Path:Skew */ +#define kSkewTOPCommandStr "Skew" + +/** @ingroup MenuCommand + Type:Type on a Path:Stair Step */ +#define kStairTOPCommandStr "Stair Step" + +/** @ingroup MenuCommand + Type:Type on a Path:Gravity */ +#define kGravityTOPCommandStr "Gravity" + +/** @ingroup MenuCommand + Type:Type on a Path:Type on a path Options */ +#define kTOPOptionsCommandStr "typeOnPathOptions" + +/** @ingroup MenuCommand + Type:Type on a Path:Update Legacy Type on a Path */ +#define kUpdateLegacyTOPCommandStr "updateLegacyTOP" + +/** @ingroup MenuCommand + Type:Threaded Text:Create */ +#define kThreadTextCreateCommandStr "threadTextCreate" + +/** @ingroup MenuCommand + Type:Threaded Text:Release Selection */ +#define kReleaseThreadedTextSelectionCommandStr "releaseThreadedTextSelection" + +/** @ingroup MenuCommand + Type:Threaded Text:Remove Threading */ +#define kRemoveThreadingCommandStr "removeThreading" + +/** @ingroup MenuCommand + Type:Composite Fonts */ +#define kAdobeInternalCompositeFontPluginCommandStr "Adobe internal composite font plugin" + +/** @ingroup MenuCommand + Type:Kinsoku Shori Settings */ +#define kAdobeKinsokuSettingsCommandStr "Adobe Kinsoku Settings" + +/** @ingroup MenuCommand + Type:Mojikumi Settings */ +#define kAdobeMojiKumiSettingsCommandStr "Adobe MojiKumi Settings" + +/** @ingroup MenuCommand + Type:Fit Headline */ +#define kFitHeadlineCommandStr "fitHeadline" + +/** @ingroup MenuCommand + Type:Create Outlines */ +#define kOutlineCommandStr "outline" + +/** @ingroup MenuCommand + Type:Find Font */ +#define kAdobeIllustratorFindFontMenuItemCommandStr "Adobe Illustrator Find Font Menu Item" + +/** @ingroup MenuCommand + Type:Change Case:UPPERCASE */ +#define kUpperCaseChangeCaseItemCommandStr "UpperCase Change Case Item" + +/** @ingroup MenuCommand + Type:Change Case:lowercase */ +#define kLowerCaseChangeCaseItemCommandStr "LowerCase Change Case Item" + +/** @ingroup MenuCommand + Type:Change Case:Title Case */ +#define kTitleCaseChangeCaseItemCommandStr "Title Case Change Case Item" + +/** @ingroup MenuCommand + Type:Change Case:Sentence case */ +#define kSentenceCaseChangeCaseItemCommandStr "Sentence case Change Case Item" + +/** @ingroup MenuCommand + Type:Smart Punctuation */ +#define kAdobeIllustratorSmartPunctuationMenuItemCommandStr "Adobe Illustrator Smart Punctuation Menu Item" + +/** @ingroup MenuCommand + Type:Optical Margin Alignment */ +#define kAdobeOpticalAlignmentItemCommandStr "Adobe Optical Alignment Item" + +/** @ingroup MenuCommand + Type:Show Hidden Characters */ +#define kShowHiddenCharCommandStr "showHiddenChar" + +/** @ingroup MenuCommand + Type:Type Orientation:Horizontal */ +#define kTypeHorizontalCommandStr "type-horizontal" + +/** @ingroup MenuCommand + Type:Type Orientation:Vertical */ +#define kTypeVerticalCommandStr "type-vertical" + +/** @ingroup MenuCommand + Select:All */ +#define kSelectallCommandStr "selectall" + +/** @ingroup MenuCommand + Select:All on Active Artboard */ +#define kSelectallinartboardCommandStr "selectallinartboard" + +/** @ingroup MenuCommand + Select:Deselect */ +#define kDeselectallCommandStr "deselectall" + +/** @ingroup MenuCommand + Select:Reselect */ +#define kFindReselectMenuItemCommandStr "Find Reselect menu item" + +/** @ingroup MenuCommand + Select:Inverse */ +#define kInverseMenuItemCommandStr "Inverse menu item" + +/** @ingroup MenuCommand + Select:Next Object Above */ +#define kSelectionHat8CommandStr "Selection Hat 8" + +/** @ingroup MenuCommand + Select:Next Object Below */ +#define kSelectionHat9CommandStr "Selection Hat 9" + +/** @ingroup MenuCommand + Select:Same:Appearance */ +#define kFindAppearanceMenuItemCommandStr "Find Appearance menu item" + +/** @ingroup MenuCommand + Select:Same:Appearance Attribute */ +#define kFindAppearanceAttributesMenuItemCommandStr "Find Appearance Attributes menu item" + +/** @ingroup MenuCommand + Select:Same:Blending Mode */ +#define kFindBlendingModeMenuItemCommandStr "Find Blending Mode menu item" + +/** @ingroup MenuCommand + Select:Same:Fill & Stroke */ +#define kFindFillStrokeMenuItemCommandStr "Find Fill & Stroke menu item" + +/** @ingroup MenuCommand + Select:Same:Fill Color */ +#define kFindFillColorMenuItemCommandStr "Find Fill Color menu item" + +/** @ingroup MenuCommand + Select:Same:Opacity */ +#define kFindOpacityMenuItemCommandStr "Find Opacity menu item" + +/** @ingroup MenuCommand + Select:Same:Stroke Color */ +#define kFindStrokeColorMenuItemCommandStr "Find Stroke Color menu item" + +/** @ingroup MenuCommand + Select:Same:Stroke Weight */ +#define kFindStrokeWeightMenuItemCommandStr "Find Stroke Weight menu item" + +/** @ingroup MenuCommand + Select:Same:Graphic Style */ +#define kFindStyleMenuItemCommandStr "Find Style menu item" + +/** @ingroup MenuCommand + Select:Same:Symbol Instance */ +#define kFindSymbolInstanceMenuItemCommandStr "Find Symbol Instance menu item" + +/** @ingroup MenuCommand + Select:Same:Link Block Series */ +#define kFindLinkBlockSeriesMenuItemCommandStr "Find Link Block Series menu item" + +/** @ingroup MenuCommand + Select:Same:Text Fill color */ +#define kFindTextFillColorMenuItemCommandStr "Find Text Fill Color menu item" + +/** @ingroup MenuCommand + Same:Text Stroke color */ +#define kFindTextStrokeColorMenuItemCommandStr "Find Text Stroke Color menu item" + +/** @ingroup MenuCommand + Same:Text Fill Stroke color */ +#define kFindTextFillStrokeColorMenuItemCommandStr "Find Text Fill Stroke Color menu item" + +/** @ingroup MenuCommand + Same:Text Font Size*/ +#define kFindTextFontSizeMenuItemCommandStr "Find Text Font Size menu item" + +/** @ingroup MenuCommand + Same:Text Font Family */ +#define kFindTextFontFamilyMenuItemCommandStr "Find Text Font Family menu item" + +/** @ingroup MenuCommand + Same:Text Font Family Style*/ +#define kFindTextFontFamilyStyleMenuItemCommandStr "Find Text Font Family Style menu item" + +/** @ingroup MenuCommand + Same:Text Font Family Size Style*/ +#define kFindTextFontFamilyStyleSizeMenuItemCommandStr "Find Text Font Family Style Size menu item" + +/** @ingroup MenuCommand + Select:Object:All on Same Layers */ +#define kSelectionHat3CommandStr "Selection Hat 3" + +/** @ingroup MenuCommand + Select:Object:Direction Handles */ +#define kSelectionHat1CommandStr "Selection Hat 1" + +/** @ingroup MenuCommand + Select:Object:Not Aligned to Pixel Grid */ +#define kSelectionHat12CommandStr "Selection Hat 12" + +/** @ingroup MenuCommand + Select:Object:Bristle Brush Strokes */ +#define kBristleBrushStrokesMenuItemCommandStr "Bristle Brush Strokes menu item" + +/** @ingroup MenuCommand + Select:Object:Brush Strokes */ +#define kBrushStrokesMenuItemCommandStr "Brush Strokes menu item" + +/** @ingroup MenuCommand + Select:Object:Clipping Masks */ +#define kClippingMasksMenuItemCommandStr "Clipping Masks menu item" + +/** @ingroup MenuCommand + Select:Object:Stray Points */ +#define kStrayPointsMenuItemCommandStr "Stray Points menu item" + +/** @ingroup MenuCommand + Select:Object:Text Objects */ +#define kTextObjectsMenuItemCommandStr "Text Objects menu item" + +/** @ingroup MenuCommand + Select:Object:Flash Dynamic Text */ +#define kDynamicTextCommandStr "Dynamic Text" + +/** @ingroup MenuCommand + Select:Object:Flash Input Text */ +#define kInputTextCommandStr "Input Text" + +/** @ingroup MenuCommand + Select:Save Selection */ +#define kSelectionHat10CommandStr "Selection Hat 10" + +/** @ingroup MenuCommand + Select:Edit Selection */ +#define kSelectionHat11CommandStr "Selection Hat 11" + +/** @ingroup MenuCommand + Effect:Apply Last Effect */ +#define kAdobeApplyLastEffectCommandStr "Adobe Apply Last Effect" + +/** @ingroup MenuCommand + Effect:Last Effect */ +#define kAdobeLastEffectCommandStr "Adobe Last Effect" + +/** @ingroup MenuCommand + Effect:Document Raster Effects Settings */ +#define kLiveRasterizeEffectSettingCommandStr "Live Rasterize Effect Setting" + +/** @ingroup MenuCommand + Effect:3D:Extrude & Bevel */ +#define kLive3DExtrudeCommandStr "Live 3DExtrude" + +/** @ingroup MenuCommand + Effect:3D:Revolve */ +#define kLive3DRevolveCommandStr "Live 3DRevolve" + +/** @ingroup MenuCommand + Effect:3D:Rotate */ +#define kLive3DRotateCommandStr "Live 3DRotate" + +/** @ingroup MenuCommand + Effect:Convert to Shape:Rectangle */ +#define kLiveRectangleCommandStr "Live Rectangle" + +/** @ingroup MenuCommand + Effect:Convert to Shape:Rounded Rectangle */ +#define kLiveRoundedRectangleCommandStr "Live Rounded Rectangle" + +/** @ingroup MenuCommand + Effect:Convert to Shape:Ellipse */ +#define kLiveEllipseCommandStr "Live Ellipse" + +/** @ingroup MenuCommand + Effect:Crop Marks */ +#define kLiveTrimMarksCommandStr "Live Trim Marks" + +/** @ingroup MenuCommand + Effect:Distort & Transform:Free Distort */ +#define kLiveFreeDistortCommandStr "Live Free Distort" + +/** @ingroup MenuCommand + Effect:Distort & Transform:Pucker & Bloat */ +#define kLivePuckerBloatCommandStr "Live Pucker & Bloat" + +/** @ingroup MenuCommand + Effect:Distort & Transform:Roughen */ +#define kLiveRoughenCommandStr "Live Roughen" + +/** @ingroup MenuCommand + Effect:Distort & Transform:Transform */ +#define kLiveTransformCommandStr "Live Transform" + +/** @ingroup MenuCommand + Effect:Distort & Transform:Tweak */ +#define kLiveScribbleAndTweakCommandStr "Live Scribble and Tweak" + +/** @ingroup MenuCommand + Effect:Distort & Transform:Twist */ +#define kLiveTwistCommandStr "Live Twist" + +/** @ingroup MenuCommand + Effect:Distort & Transform:Zig Zag */ +#define kLiveZigZagCommandStr "Live Zig Zag" + +/** @ingroup MenuCommand + Effect:Path:Offset Path */ +#define kLiveOffsetPathCommandStr "Live Offset Path" + +/** @ingroup MenuCommand + Effect:Path:Outline Object */ +#define kLiveOutlineObjectCommandStr "Live Outline Object" + +/** @ingroup MenuCommand + Effect:Path:Outline Stroke */ +#define kLiveOutlineStrokeCommandStr "Live Outline Stroke" + +/** @ingroup MenuCommand + Effect:Pathfinder:Add */ +#define kLivePathfinderAddCommandStr "Live Pathfinder Add" + +/** @ingroup MenuCommand + Effect:Pathfinder:Intersect */ +#define kLivePathfinderIntersectCommandStr "Live Pathfinder Intersect" + +/** @ingroup MenuCommand + Effect:Pathfinder:Exclude */ +#define kLivePathfinderExcludeCommandStr "Live Pathfinder Exclude" + +/** @ingroup MenuCommand + Effect:Pathfinder:Subtract */ +#define kLivePathfinderSubtractCommandStr "Live Pathfinder Subtract" + +/** @ingroup MenuCommand + Effect:Pathfinder:Minus Back */ +#define kLivePathfinderMinusBackCommandStr "Live Pathfinder Minus Back" + +/** @ingroup MenuCommand + Effect:Pathfinder:Divide */ +#define kLivePathfinderDivideCommandStr "Live Pathfinder Divide" + +/** @ingroup MenuCommand + Effect:Pathfinder:Trim */ +#define kLivePathfinderTrimCommandStr "Live Pathfinder Trim" + +/** @ingroup MenuCommand + Effect:Pathfinder:Merge */ +#define kLivePathfinderMergeCommandStr "Live Pathfinder Merge" + +/** @ingroup MenuCommand + Effect:Pathfinder:Crop */ +#define kLivePathfinderCropCommandStr "Live Pathfinder Crop" + +/** @ingroup MenuCommand + Effect:Pathfinder:Outline */ +#define kLivePathfinderOutlineCommandStr "Live Pathfinder Outline" + +/** @ingroup MenuCommand + Effect:Pathfinder:Hard Mix */ +#define kLivePathfinderHardMixCommandStr "Live Pathfinder Hard Mix" + +/** @ingroup MenuCommand + Effect:Pathfinder:Soft Mix */ +#define kLivePathfinderSoftMixCommandStr "Live Pathfinder Soft Mix" + +/** @ingroup MenuCommand + Effect:Pathfinder:Trap */ +#define kLivePathfinderTrapCommandStr "Live Pathfinder Trap" + +/** @ingroup MenuCommand + Effect:Rasterize */ +#define kLiveRasterizeCommandStr "Live Rasterize" + +/** @ingroup MenuCommand + Effect:Stylize:Drop Shadow */ +#define kLiveDropShadowCommandStr "Live Adobe Drop Shadow" + +/** @ingroup MenuCommand + Effect:Stylize:Feather */ +#define kLiveFeatherCommandStr "Live Feather" + +/** @ingroup MenuCommand + Effetc:Stylize:Inner Glow */ +#define kLiveInnerGlowCommandStr "Live Inner Glow" + +/** @ingroup MenuCommand + Effect:Stylize:outer Glow */ +#define kLiveOuterGlowCommandStr "Live Outer Glow" + +/** @ingroup MenuCommand + Effect:Stylize:Round Corners */ +#define kLiveAdobeRoundCornersCommandStr "Live Adobe Round Corners" + +/** @ingroup MenuCommand + Effect:Stylize:Scribble */ +#define kLiveScribbleFillCommandStr "Live Scribble Fill" + +/** @ingroup MenuCommand + Effect:SVG Filters:Apply SVG Filter */ +#define kLiveSVGFiltersCommandStr "Live SVG Filters" + +/** @ingroup MenuCommand + Effect:SVG Filters:Import SVG Filter */ +#define kSVGFilterImportCommandStr "SVG Filter Import" + +/** @ingroup MenuCommand + Effect:Warp:Arc */ +#define kLiveDeformArcCommandStr "Live Deform Arc" + +/** @ingroup MenuCommand + Effect:Warp:Arc Lower */ +#define kLiveDeformArcLowerCommandStr "Live Deform Arc Lower" + +/** @ingroup MenuCommand + Effect:Warp:Arc Upper */ +#define kLiveDeformArcUpperCommandStr "Live Deform Arc Upper" + +/** @ingroup MenuCommand + Effect:Warp:Arch */ +#define kLiveDeformArchCommandStr "Live Deform Arch" + +/** @ingroup MenuCommand + Effect:Warp:Bulge */ +#define kLiveDeformBulgeCommandStr "Live Deform Bulge" + +/** @ingroup MenuCommand + Effect:Warp:Shell Lower */ +#define kLiveDeformShellLowerCommandStr "Live Deform Shell Lower" + +/** @ingroup MenuCommand + Effect:Warp:Shell Upper */ +#define kLiveDeformShellUpperCommandStr "Live Deform Shell Upper" + +/** @ingroup MenuCommand + Effect:Warp:Flag */ +#define kLiveDeformFlagCommandStr "Live Deform Flag" + +/** @ingroup MenuCommand + Effect:Warp:Wave */ +#define kLiveDeformWaveCommandStr "Live Deform Wave" + +/** @ingroup MenuCommand + Effect:Warp:Fish */ +#define kLiveDeformFishCommandStr "Live Deform Fish" + +/** @ingroup MenuCommand + Effect:Warp:Rise */ +#define kLiveDeformRiseCommandStr "Live Deform Rise" + +/** @ingroup MenuCommand + Effect:Warp:Fisheye */ +#define kLiveDeformFisheyeCommandStr "Live Deform Fisheye" + +/** @ingroup MenuCommand + Effect:Warp:Inflate */ +#define kLiveDeformInflateCommandStr "Live Deform Inflate" + +/** @ingroup MenuCommand + Effect:Warp:Squeeze */ +#define kLiveDeformSqueezeCommandStr "Live Deform Squeeze" + +/** @ingroup MenuCommand + Effect:Warp:Twist */ +#define kLiveDeformTwistCommandStr "Live Deform Twist" + +/** @ingroup MenuCommand + Effect:Effect Gallery */ +#define kLivePSAdapterPluginGEfcCommandStr "Live PSAdapter_plugin_GEfc" + +/** @ingroup MenuCommand + Effect:Artistic:Colored Pencil */ +#define kLivePSAdapterPluginClrPCommandStr "Live PSAdapter_plugin_ClrP" + +/** @ingroup MenuCommand + Effect:Artistic:Cutout */ +#define kLivePSAdapterPluginCtCommandStr "Live PSAdapter_plugin_Ct " + +/** @ingroup MenuCommand + Effect:Artistic:Dry Brush */ +#define kLivePSAdapterPluginDryBCommandStr "Live PSAdapter_plugin_DryB" + +/** @ingroup MenuCommand + Effect:Artistic:Film Grain */ +#define kLivePSAdapterPluginFlmGCommandStr "Live PSAdapter_plugin_FlmG" + +/** @ingroup MenuCommand + Effect:Artistic:Fresco */ +#define kLivePSAdapterPluginFrscCommandStr "Live PSAdapter_plugin_Frsc" + +/** @ingroup MenuCommand + Effect:Artistic:Neon Glow */ +#define kLivePSAdapterPluginNGlwCommandStr "Live PSAdapter_plugin_NGlw" + +/** @ingroup MenuCommand + Effect:Artistic:Paint Daubs */ +#define kLivePSAdapterPluginPntDCommandStr "Live PSAdapter_plugin_PntD" + +/** @ingroup MenuCommand + Effect:Artistic:Palette Knife */ +#define kLivePSAdapterPluginPltKCommandStr "Live PSAdapter_plugin_PltK" + +/** @ingroup MenuCommand + Effect:Artistic:Plastic Wrap */ +#define kLivePSAdapterPluginPlsWCommandStr "Live PSAdapter_plugin_PlsW" + +/** @ingroup MenuCommand + Effect:Artistic:Poster Edges */ +#define kLivePSAdapterPluginPstECommandStr "Live PSAdapter_plugin_PstE" + +/** @ingroup MenuCommand + Effect:Artistic:Rough Pastels */ +#define kLivePSAdapterPluginRghPCommandStr "Live PSAdapter_plugin_RghP" + +/** @ingroup MenuCommand + Effect:Artistic:Smudge Stick */ +#define kLivePSAdapterPluginSmdSCommandStr "Live PSAdapter_plugin_SmdS" + +/** @ingroup MenuCommand + Effect:Artistic:Sponge */ +#define kLivePSAdapterPluginSpngCommandStr "Live PSAdapter_plugin_Spng" + +/** @ingroup MenuCommand + Effect:Artistic:Underpainting */ +#define kLivePSAdapterPluginUndrCommandStr "Live PSAdapter_plugin_Undr" + +/** @ingroup MenuCommand + Effect:Artistic:Watercolor */ +#define kLivePSAdapterPluginWtrcCommandStr "Live PSAdapter_plugin_Wtrc" + +/** @ingroup MenuCommand + Effect:Blur:Gaussian Blur */ +#define kLivePSAdapterPluginGblRCommandStr "Live PSAdapter_plugin_GblR" + +/** @ingroup MenuCommand + Effect:Blur:Radial Blur */ +#define kLivePSAdapterPluginRdlBCommandStr "Live PSAdapter_plugin_RdlB" + +/** @ingroup MenuCommand + Effect:Blur:Smart Blur */ +#define kLivePSAdapterPluginSmrBCommandStr "Live PSAdapter_plugin_SmrB" + +/** @ingroup MenuCommand + Effect:Brush Strokes:Accented Edges */ +#define kLivePSAdapterPluginAccECommandStr "Live PSAdapter_plugin_AccE" + +/** @ingroup MenuCommand + Effect:Brush Strokes:Angled Strokes */ +#define kLivePSAdapterPluginAngSCommandStr "Live PSAdapter_plugin_AngS" + +/** @ingroup MenuCommand + Effect:Brush Strokes:Crosshatch */ +#define kLivePSAdapterPluginCrshCommandStr "Live PSAdapter_plugin_Crsh" + +/** @ingroup MenuCommand + Effect:Brush Strokes:Dark Strokes */ +#define kLivePSAdapterPluginDrkSCommandStr "Live PSAdapter_plugin_DrkS" + +/** @ingroup MenuCommand + Effect:Brush Strokes:Ink Outlines */ +#define kLivePSAdapterPluginInkOCommandStr "Live PSAdapter_plugin_InkO" + +/** @ingroup MenuCommand + Effect:Brush Strokes:Spatter */ +#define kLivePSAdapterPluginSptCommandStr "Live PSAdapter_plugin_Spt " + +/** @ingroup MenuCommand + Effect:Brush Strokes:Sprayed Strokes */ +#define kLivePSAdapterPluginSprSCommandStr "Live PSAdapter_plugin_SprS" + +/** @ingroup MenuCommand + Effect:Brush Strokes:Sumi-e */ +#define kLivePSAdapterPluginSmieCommandStr "Live PSAdapter_plugin_Smie" + +/** @ingroup MenuCommand + Effect:Distort:Diffuse Glow */ +#define kLivePSAdapterPluginDfsGCommandStr "Live PSAdapter_plugin_DfsG" + +/** @ingroup MenuCommand + Effect:Distort:Glass */ +#define kLivePSAdapterPluginGlsCommandStr "Live PSAdapter_plugin_Gls " + +/** @ingroup MenuCommand + Effect:Distort:Ocean Ripple */ +#define kLivePSAdapterPluginOcnRCommandStr "Live PSAdapter_plugin_OcnR" + +/** @ingroup MenuCommand + Effect:Pixelate:Color Halftone */ +#define kLivePSAdapterPluginClrHCommandStr "Live PSAdapter_plugin_ClrH" + +/** @ingroup MenuCommand + Effect:Pixelate:Crystallize */ +#define kLivePSAdapterPluginCrstCommandStr "Live PSAdapter_plugin_Crst" + +/** @ingroup MenuCommand + Effect:Pixelate:Mezzotint */ +#define kLivePSAdapterPluginMztnCommandStr "Live PSAdapter_plugin_Mztn" + +/** @ingroup MenuCommand + Effect:Pixelate:Pointillize */ +#define kLivePSAdapterPluginPntlCommandStr "Live PSAdapter_plugin_Pntl" + +/** @ingroup MenuCommand + Effect:Sharpen:Unsharp Mask */ +#define kLivePSAdapterPluginUSMkCommandStr "Live PSAdapter_plugin_USMk" + +/** @ingroup MenuCommand + Effect:Sketch:Bas Relief */ +#define kLivePSAdapterPluginBsRlCommandStr "Live PSAdapter_plugin_BsRl" + +/** @ingroup MenuCommand + Effect:Sketch:Chalk & Charcoal */ +#define kLivePSAdapterPluginChlCCommandStr "Live PSAdapter_plugin_ChlC" + +/** @ingroup MenuCommand + Effect:Sketch:Charcoal */ +#define kLivePSAdapterPluginChrcCommandStr "Live PSAdapter_plugin_Chrc" + +/** @ingroup MenuCommand + Effect:Sketch:Chrome */ +#define kLivePSAdapterPluginChrmCommandStr "Live PSAdapter_plugin_Chrm" + +/** @ingroup MenuCommand + Effect:Sketch:Cont← Crayon */ +#define kLivePSAdapterPluginCntCCommandStr "Live PSAdapter_plugin_CntC" + +/** @ingroup MenuCommand + Effect:Sketch:Graphic Pen */ +#define kLivePSAdapterPluginGraPCommandStr "Live PSAdapter_plugin_GraP" + +/** @ingroup MenuCommand + Effect:Sketch:Halftone Pattern */ +#define kLivePSAdapterPluginHlfSCommandStr "Live PSAdapter_plugin_HlfS" + +/** @ingroup MenuCommand + Effect:Sketch:Note Paper */ +#define kLivePSAdapterPluginNtPrCommandStr "Live PSAdapter_plugin_NtPr" + +/** @ingroup MenuCommand + Effect:Sketch:Photocopy */ +#define kLivePSAdapterPluginPhtcCommandStr "Live PSAdapter_plugin_Phtc" + +/** @ingroup MenuCommand + Effect:Sketch:Plaster */ +#define kLivePSAdapterPluginPlstCommandStr "Live PSAdapter_plugin_Plst" + +/** @ingroup MenuCommand + Effect:Sketch:Reticulation */ +#define kLivePSAdapterPluginRtclCommandStr "Live PSAdapter_plugin_Rtcl" + +/** @ingroup MenuCommand + Effect:Sketch:Stamp */ +#define kLivePSAdapterPluginStmpCommandStr "Live PSAdapter_plugin_Stmp" + +/** @ingroup MenuCommand + Effect:Sketch:Torn Edges */ +#define kLivePSAdapterPluginTrnECommandStr "Live PSAdapter_plugin_TrnE" + +/** @ingroup MenuCommand + Effect:Sketch:Water Paper */ +#define kLivePSAdapterPluginWtrPCommandStr "Live PSAdapter_plugin_WtrP" + +/** @ingroup MenuCommand + Effect:Stylize:Glowing Edges */ +#define kLivePSAdapterPluginGlwECommandStr "Live PSAdapter_plugin_GlwE" + +/** @ingroup MenuCommand + Effect:Texture:Craquelure */ +#define kLivePSAdapterPluginCrqlCommandStr "Live PSAdapter_plugin_Crql" + +/** @ingroup MenuCommand + Effect:Texture:Grain */ +#define kLivePSAdapterPluginGrnCommandStr "Live PSAdapter_plugin_Grn " + +/** @ingroup MenuCommand + Effect:Texture:Mosaic Tiles */ +#define kLivePSAdapterPluginMscTCommandStr "Live PSAdapter_plugin_MscT" + +/** @ingroup MenuCommand + Effect:Texture:Patchwork */ +#define kLivePSAdapterPluginPtchCommandStr "Live PSAdapter_plugin_Ptch" + +/** @ingroup MenuCommand + Effect:Texture:Stained Glass */ +#define kLivePSAdapterPluginStnGCommandStr "Live PSAdapter_plugin_StnG" + +/** @ingroup MenuCommand + Effect:Texture:Texturizer */ +#define kLivePSAdapterPluginTxtzCommandStr "Live PSAdapter_plugin_Txtz" + +/** @ingroup MenuCommand + Effect:Video:De-Interlace */ +#define kLivePSAdapterPluginDntrCommandStr "Live PSAdapter_plugin_Dntr" + +/** @ingroup MenuCommand + Effect:Video:NTSC Colors */ +#define kLivePSAdapterPluginNTSCCommandStr "Live PSAdapter_plugin_NTSC" + +/** @ingroup MenuCommand + View:Preview */ +#define kPreviewCommandStr "preview" + +/** @ingroup MenuCommand + View:Overprint Preview */ +#define kInkCommandStr "ink" + +/** @ingroup MenuCommand + View:Pixel Preview */ +#define kRasterCommandStr "raster" + +/** @ingroup MenuCommand + View:Proof Setup:Document CMYK: */ +#define kProofDocumentCommandStr "proof-document" + +/** @ingroup MenuCommand + View:Proof Setup:Legacy Macintosh RGB (Gamma 1.8) */ +#define kProofMacRgbCommandStr "proof-mac-rgb" + +/** @ingroup MenuCommand + View:Proof Setup:Internet Standard RGB (sRGB) */ +#define kProofWinRgbCommandStr "proof-win-rgb" + +/** @ingroup MenuCommand + View:Proof Setup:Monitor RGB */ +#define kProofMonitorRgbCommandStr "proof-monitor-rgb" + +/** @ingroup MenuCommand + View:Proof Setup:Color blindness - Protanopia-type */ +#define kProofColorblindpCommandStr "proof-colorblindp" + +/** @ingroup MenuCommand + View:Proof Setup:Color blindness - Deuteranopia-type */ +#define kProofColorblinddCommandStr "proof-colorblindd" + +/** @ingroup MenuCommand + View:Proof Setup:Customize */ +#define kProofCustomCommandStr "proof-custom" + +/** @ingroup MenuCommand + View:Proof Colors */ +#define kProofColorsCommandStr "proofColors" + +/** @ingroup MenuCommand + View:Zoom In */ +#define kZoominCommandStr "zoomin" + +/** @ingroup MenuCommand + View:Zoom Out */ +#define kZoomoutCommandStr "zoomout" + +/** @ingroup MenuCommand + View:Fit Artboard in Window */ +#define kFitArtboardCommandStr "fitin" + +/** @ingroup MenuCommand + View:Fit All in Window */ +#define kFitallCommandStr "fitall" + +/** @ingroup MenuCommand + View:Actual Size */ +#define kActualsizeCommandStr "actualsize" + +/** @ingroup MenuCommand + View:Hide Edges */ +#define kEdgeCommandStr "edge" + +/** @ingroup MenuCommand + View:Hide Artboards */ +#define kArtboardCommandStr "artboard" + +/** @ingroup MenuCommand + View:Hide Print Tiling */ +#define kPagetilingCommandStr "pagetiling" + +/** @ingroup MenuCommand + View:Show Slices */ +#define kAISliceFeedbackMenuCommandStr "AISlice Feedback Menu" + +/** @ingroup MenuCommand + View:Lock Slices */ +#define kAISliceLockMenuCommandStr "AISlice Lock Menu" + +/** @ingroup MenuCommand + View:Show Template */ +#define kShowtemplateCommandStr "showtemplate" + +/** @ingroup MenuCommand + View:Rulers:Show Rulers */ +#define kRulerCommandStr "ruler" + +/** @ingroup MenuCommand + View:Rulers:Show Video Rulers */ +#define kVideorulerCommandStr "videoruler" + +/** @ingroup MenuCommand + View:Rulers:Change to Global Rulers */ +#define kSwitchRulerCommandStr "rulerCoordinateSystem" + +/** @ingroup MenuCommand + View:Hide Bounding Box */ +#define kAIBoundingBoxToggleCommandStr "AI Bounding Box Toggle" + +/** @ingroup MenuCommand + View:Show Transparency Grid */ +#define kTransparencyGridMenuItemCommandStr "TransparencyGrid Menu Item" + +/** @ingroup MenuCommand + View:Show Text Threads */ +#define kTextthreadsCommandStr "textthreads" + +/** @ingroup MenuCommand + View:Hide Gradient Annotator */ +#define kGradientFeedbackCommandStr "Gradient Feedback" + +/** @ingroup MenuCommand + View:Show Live Paint Gaps */ +#define kShowGapsPlanetXCommandStr "Show Gaps Planet X" + +/** @ingroup MenuCommand + View:Guides:Hide Guides */ +#define kShowguideCommandStr "showguide" + +/** @ingroup MenuCommand + View:Guides:Lock Guides */ +#define kLockguideCommandStr "lockguide" + +/** @ingroup MenuCommand + View:Guides:Make Guides */ +#define kMakeguideCommandStr "makeguide" + +/** @ingroup MenuCommand + View:Guides:Release Guides */ +#define kReleaseguideCommandStr "releaseguide" + +/** @ingroup MenuCommand + View:Guides:Clear Guides */ +#define kClearguideCommandStr "clearguide" + +/** @ingroup MenuCommand + View:Smart Guides */ +#define kSnapomaticOnOffMenuItemCommandStr "Snapomatic on-off menu item" + +/** @ingroup MenuCommand + View:Perspective Grid:Show Grid */ +#define kShowPerspectiveGridCommandStr "Show Perspective Grid" + +/** @ingroup MenuCommand + View:Perspective Grid:Show Rulers */ +#define kShowRulerCommandStr "Show Ruler" + +/** @ingroup MenuCommand + View:Perspective Grid:Snap to Grid */ +#define kSnapToGridCommandStr "Snap to Grid" + +/** @ingroup MenuCommand + View:Perspective Grid:Lock Grid */ +#define kLockPerspectiveGridCommandStr "Lock Perspective Grid" + +/** @ingroup MenuCommand + View:Perspective Grid:Lock Station Point */ +#define kLockStationPointCommandStr "Lock Station Point" + +/** @ingroup MenuCommand + View:Perspective Grid:Define Grid */ +#define kDefinePerspectiveGridCommandStr "Define Perspective Grid" + +/** @ingroup MenuCommand + View:Perspective Grid:Save Grid as Preset */ +#define kSavePerspectiveGridAsPresetCommandStr "Save Perspective Grid as Preset" + +/** @ingroup MenuCommand + View:Show Grid */ +#define kShowgridCommandStr "showgrid" + +/** @ingroup MenuCommand + View:Snap to Grid */ +#define kSnapgridCommandStr "snapgrid" + +/** @ingroup MenuCommand + View:Snap to Point */ +#define kSnappointCommandStr "snappoint" + +/** @ingroup MenuCommand + View:New View */ +#define kNewviewCommandStr "newview" + +/** @ingroup MenuCommand + View:Edit Views */ +#define kEditviewCommandStr "editview" + +/** @ingroup MenuCommand + Window:New Window */ +#define kNewwindowCommandStr "newwindow" + +/** @ingroup MenuCommand + Window:Arrange:Cascade */ +#define kCascadeCommandStr "cascade" + +/** @ingroup MenuCommand + Window:Arrange:Tile */ +#define kTileCommandStr "tile" + +/** @ingroup MenuCommand + Window:Arrange:Float in Window */ +#define kFloatInWindowCommandStr "floatInWindow" + +/** @ingroup MenuCommand + Window:Arrange:Float All in Windows */ +#define kFloatAllInWindowsCommandStr "floatAllInWindows" + +/** @ingroup MenuCommand + Window:Arrange:Consolidate All Windows */ +#define kConsolidateAllWindowsCommandStr "consolidateAllWindows" + +/** @ingroup MenuCommand + Window:Workspace:Save Workspace */ +#define kAdobeSaveWorkspaceCommandStr "Adobe Save Workspace" + +/** @ingroup MenuCommand + Window:Workspace:New Workspace */ +#define kAdobeNewWorkspaceCommandStr "Adobe New Workspace" + +/** @ingroup MenuCommand + Window:Workspace:Manage Workspaces */ +#define kAdobeManageWorkspaceCommandStr "Adobe Manage Workspace" + +/** @ingroup MenuCommand + Window:Control */ +#define kControlPalettePluginCommandStr "control palette plugin" + +/** @ingroup MenuCommand + Window:Tools */ +#define kAdobeBuiltInToolbox1CommandStr "AdobeBuiltInToolbox1" + +/** @ingroup MenuCommand + Window:Actions */ +#define kAdobeActionPaletteCommandStr "Adobe Action Palette" + +/** @ingroup MenuCommand + Window:Align */ +#define kAdobeAlignPaletteCommandStr "AdobeAlignObjects2" + +/** @ingroup MenuCommand + Window:Appearance */ +#define kStylePaletteCommandStr "Style Palette" + +/** @ingroup MenuCommand + Window:Artboards */ +#define kAdobeArtboardPaletteCommandStr "Adobe Artboard Palette" + +/** @ingroup MenuCommand + Window:Attributes */ +#define kInternalPalettesPosingAsPlugInMenusAttributesCommandStr "internal palettes posing as plug-in menus-attributes" + +/** @ingroup MenuCommand + Window:Brushes */ +#define kAdobeBrushManagerMenuItemCommandStr "Adobe BrushManager Menu Item" + +/** @ingroup MenuCommand + Window:Color */ +#define kAdobeColorPaletteCommandStr "Adobe Color Palette" + +/** @ingroup MenuCommand + Window:Color Guide */ +#define kAdobeHarmonyPaletteCommandStr "Adobe Harmony Palette" + +/** @ingroup MenuCommand + Window:Document Info */ +#define kDocInfo1CommandStr "DocInfo1" + +/** @ingroup MenuCommand + Window:Flattener Preview */ +#define kAdobeFlatteningPreviewCommandStr "Adobe Flattening Preview" + +/** @ingroup MenuCommand + Window:Gradient */ +#define kAdobeGradientPaletteCommandStr "Adobe Gradient Palette" + +/** @ingroup MenuCommand + Window:Graphic Styles */ +#define kAdobeStylePaletteCommandStr "Adobe Style Palette" + +/** @ingroup MenuCommand + Window:Info */ +#define kInternalPalettesPosingAsPlugInMenusInfoCommandStr "internal palettes posing as plug-in menus-info" + +/** @ingroup MenuCommand + Window:Layers */ +#define kAdobeLayerPalette1CommandStr "AdobeLayerPalette1" + +/** @ingroup MenuCommand + Window:Links */ +#define kAdobeLinkPaletteMenuItemCommandStr "Adobe LinkPalette Menu Item" + +/** @ingroup MenuCommand + Window:Magic Wand */ +#define kAIMagicWandCommandStr "AI Magic Wand" + +/** @ingroup MenuCommand + Window:Navigator */ +#define kAdobeNavigator1CommandStr "AdobeNavigator" + +/** @ingroup MenuCommand + Window:Pathfinder */ +#define kAdobePathfinderPalette1CommandStr "Adobe PathfinderUI" + +/** @ingroup MenuCommand + Window:Separations Preview */ +#define kAdobeSeparationPreviewPaletteCommandStr "Adobe Separation Preview Panel" + +/** @ingroup MenuCommand + Window:Stroke */ +#define kAdobeStrokePaletteCommandStr "Adobe Stroke Palette" + +/** @ingroup MenuCommand + Window:SVG Interactivity */ +#define kAdobeSVGInteractivityPaletteCommandStr "Adobe SVG Interactivity Palette" + +/** @ingroup MenuCommand + Window:Swatches */ +#define kAdobeSwatchesMenuItemCommandStr "Adobe Swatches Menu Item" + +/** @ingroup MenuCommand + Window:Symbols */ +#define kAdobeSymbolPaletteCommandStr "Adobe Symbol Palette" + +/** @ingroup MenuCommand + Window:Transform */ +#define kAdobeTransformObjects1CommandStr "AdobeTransformObjects1" + +/** @ingroup MenuCommand + Window:Transparency */ +#define kAdobeTransparencyPaletteMenuItemCommandStr "Adobe Transparency Palette Menu Item" + +/** @ingroup MenuCommand + Window:Type:Character */ +#define kInternalPalettesPosingAsPlugInMenusCharacterCommandStr "internal palettes posing as plug-in menus-character" + +/** @ingroup MenuCommand + Window:Type:Character Styles */ +#define kCharacterStylesCommandStr "Character Styles" + +/** @ingroup MenuCommand + Window:Type:Flash Text */ +#define kFlashTextCommandStr "Flash Text" + +/** @ingroup MenuCommand + Window:Type:Glyphs */ +#define kAlternateGlyphPalettePlugin2CommandStr "alternate glyph palette plugin 2" + +/** @ingroup MenuCommand + Window:Type:OpenType */ +#define kInternalPalettesPosingAsPlugInMenusOpentypeCommandStr "internal palettes posing as plug-in menus-opentype" + +/** @ingroup MenuCommand + Window:Type:Paragraph */ +#define kInternalPalettesPosingAsPlugInMenusParagraphCommandStr "internal palettes posing as plug-in menus-paragraph" + +/** @ingroup MenuCommand + Window:Type:Paragraph Styles */ +#define kAdobeParagraphStylesPaletteCommandStr "Adobe Paragraph Styles Palette" + +/** @ingroup MenuCommand + Window:Type:Tabs */ +#define kInternalPalettesPosingAsPlugInMenusTabCommandStr "internal palettes posing as plug-in menus-tab" + +/** @ingroup MenuCommand + Window:Variables */ +#define kAdobeVariablesPaletteMenuItemCommandStr "Adobe Variables Palette Menu Item" + +/** @ingroup MenuCommand + Window:Brush Libraries:No Libraries found */ +#define kAdobeBrushMgrNoLibrariesMenuItemCommandStr "AdobeBrushMgr No libraries menu item" + +/** @ingroup MenuCommand + Window:Brush Libraries:Other Library */ +#define kAdobeBrushMgrOtherLibrariesMenuItemCommandStr "AdobeBrushMgr Other libraries menu item" + +/** @ingroup MenuCommand + Window:Graphic Style Libraries:No Libraries found */ +#define kAdobeArtStylePluginNoLibrariesMenuItemCommandStr "Adobe Art Style Plugin No libraries menu item" + +/** @ingroup MenuCommand + Window:Graphic Style Libraries:Other Library */ +#define kAdobeArtStylePluginOtherLibrariesMenuItemCommandStr "Adobe Art Style Plugin Other libraries menu item" + +/** @ingroup MenuCommand + Window:Symbol Libraries:No Libraries found */ +#define kAdobeSymbolPalettePluginNoLibrariesMenuItemCommandStr "Adobe Symbol Palette Plugin No libraries menu item" + +/** @ingroup MenuCommand + Window:Symbol Libraries:Other Library */ +#define kAdobeSymbolPalettePluginOtherLibrariesMenuItemCommandStr "Adobe Symbol Palette Plugin Other libraries menu item" + +/** @ingroup MenuCommand + Help:Illustrator Help */ +#define kHelpcontentCommandStr "helpcontent" + +/** @ingroup MenuCommand + Help:Welcome Screen */ +#define kWelcomeScreenMenuItemCommandStr "Welcome screen menu item" + +/** @ingroup MenuCommand + Help:Debug:Memory Use Checkpoint */ +#define kMemoryUseCheckpointCommandStr "Memory Use Checkpoint" + +/** @ingroup MenuCommand + Help:Debug:Save Memory Use */ +#define kSaveMemoryUseCommandStr "Save Memory Use" + +/** @ingroup MenuCommand + Help:Debug:Count Objects */ +#define kCountObjectsCommandStr "Count Objects" + +/** @ingroup MenuCommand + Help:Debug:Object Counts */ +#define kObjectCountsCommandStr "Object Counts" + +/** @ingroup MenuCommand + Help:Debug:Track API Refs */ +#define kTrackAPIRefsCommandStr "Track API Refs" + +/** @ingroup MenuCommand + Help:Debug:Enable New Rendering */ +#define kEnableNewRenderingCommandStr "Enable New Rendering" + +/** @ingroup MenuCommand + Help:Debug:Enable Rendering Timer */ +#define kEnableRenderingTimerCommandStr "Enable Rendering Timer" + +/** @ingroup MenuCommand + Help:Debug:Purge Rendering Cache */ +#define kPurgeRenderingCacheCommandStr "Purge Rendering Cache" + +/** @ingroup MenuCommand + Help:Debug:Redraw */ +#define kRedrawCommandStr "Redraw" + +/** @ingroup MenuCommand + Help:Debug:Dump Application Heap Used */ +#define kDumpApplicationHeapUsedCommandStr "Dump Application Heap Used" + +/** @ingroup MenuCommand + Help:Debug:Disable Greeking for New Rendering */ +#define kDisableGreekingForNewRenderingCommandStr "Disable Greeking for New Rendering" + +/** @ingroup MenuCommand + Help:Debug:Enable Threaded Rendering */ +#define kEnableThreadedRenderingCommandStr "Enable Threaded Rendering" + +/** @ingroup MenuCommand + Help:Debug:Enable AGM Threading */ +#define kEnableAGMThreadingCommandStr "Enable AGM Threading" + +/** @ingroup MenuCommand + Help:Debug:Enable Hyper Threading */ +#define kEnableHyperThreadingCommandStr "Enable Hyper Threading" + +/** @ingroup MenuCommand + Help:Debug:Enable AGM Internal Memory Pool */ +#define kEnableAGMInternalMemoryPoolCommandStr "Enable AGM Internal Memory Pool" + +/** @ingroup MenuCommand + Help:Debug:Enable QuickPort Quartz */ +#define kEnableQuickPortQuartzCommandStr "Enable QuickPort Quartz" + +/** @ingroup MenuCommand + Help:Debug:Heap Check Running */ +#define kHeapCheckRunningCommandStr "Heap Check Running" + +/** @ingroup MenuCommand + Help:Debug:Crash */ +#define kCrashCommandStr "Crash" + +/** @ingroup MenuCommand + Help:Debug:Enable PGF Recovery */ +#define kEnablePGFRecoveryCommandStr "Enable PGF Recovery" + +/** @ingroup MenuCommand + Help:Debug:Enable ATE Read Recovery */ +#define kEnableATEReadRecoveryCommandStr "Enable ATE Read Recovery" + +/** @ingroup MenuCommand + Help:Debug:Enable ATE Write Recovery */ +#define kEnableATEWriteRecoveryCommandStr "Enable ATE Write Recovery" + +/** @ingroup MenuCommand + Help:Debug:Trace Counted Object Refs */ +#define kTraceCountedObjectRefsCommandStr "Trace Counted Object Refs" + +/** @ingroup MenuCommand + Help:Debug:Check Heap */ +#define kCheckHeapCommandStr "Check Heap" + +/** @ingroup MenuCommand + Help:Debug:Track Blocks */ +#define kTrackBlocksCommandStr "Track Blocks" + +/** @ingroup MenuCommand + Help:Debug:Defer Freeing */ +#define kDeferFreeingCommandStr "Defer Freeing" + +/** @ingroup MenuCommand + Help:Debug:Debug Window */ +#define kDebugWindowCommandStr "Debug Window" + +/** @ingroup MenuCommand + Help:Debug:Flush Preference to File */ +#define kFlushPreferenceToFileCommandStr "Flush Preference to File" + +/** @ingroup MenuCommand + Help:Debug:Reinterpret Grayscale Image Color Space */ +#define kReinterpretGrayscaleImageColorSpaceCommandStr "Reinterpret Grayscale Image Color Space" + +/** @ingroup MenuCommand + Help:Debug:Split and Interleave Raster Channels */ +#define kSplitAndInterleaveRasterChannelsCommandStr "Split and Interleave Raster Channels" + +/** @ingroup MenuCommand + Help:Debug:Populate Live Effect Graphic Styles */ +#define kPopulateLiveEffectGraphicStylesCommandStr "Populate Live Effect Graphic Styles" + +/** @ingroup MenuCommand + Help:Debug:Use ContainsTransparency Flag */ +#define kUseContainsTransparencyFlagCommandStr "Use ContainsTransparency Flag" + +/** @ingroup MenuCommand + Help:Debug:Add Known Style */ +#define kAddKnownStyleCommandStr "Add Known Style" + +/** @ingroup MenuCommand + Help:Debug:Mark Logs */ +#define kMarkLogsCommandStr "Mark Logs" + +/** @ingroup MenuCommand + Help:Debug:Clear Logs */ +#define kClearLogsCommandStr "Clear Logs" + +/** @ingroup MenuCommand + Help:Debug:Run UnicodeString testbed */ +#define kRunUnicodeStringTestbedCommandStr "Run UnicodeString testbed" + +/** @ingroup MenuCommand + Help:Debug:Enable Gradient Feedback */ +#define kGradientFeedbackDebugCommandStr "Gradient Feedback Debug" + +/** @ingroup MenuCommand + Help:Debug:Unit Testing */ +#define kAdobeUnitTestingCommandStr "Adobe Unit testing" + +/** @ingroup MenuCommand + Help:Create Eve Dialog */ +#define kAdamEveDialogMenuCommandStr "Adam Eve dialog menu" + +/** @ingroup MenuCommand + Help:About Illustrator */ +#define kAboutCommandStr "about" + +/** @ingroup MenuCommand + Help:System Info */ +#define kSystemInfoStr "System Info" + +/** @ingroup MenuCommand + Other Panel:New Symbol */ +#define kAdobeNewSymbolShortcutCommandStr "Adobe New Symbol Shortcut" + +/** @ingroup MenuCommand + Other Panel:Show Color Panel (Secondary) */ +#define kAdobeColorPaletteSecondaryCommandStr "Adobe Color Palette Secondary" + +/** @ingroup MenuCommand + Other Panel:Actions Batch */ +#define kAdobeActionsBatchCommandStr "Adobe Actions Batch" + +/** @ingroup MenuCommand + Other Panel:Add New Fill */ +#define kAdobeNewFillShortcutCommandStr "Adobe New Fill Shortcut" + +/** @ingroup MenuCommand + Other Panel:Add New Stroke */ +#define kAdobeNewStrokeShortcutCommandStr "Adobe New Stroke Shortcut" + +/** @ingroup MenuCommand + Other Panel:New Graphic Style */ +#define kAdobeNewStyleShortcutCommandStr "Adobe New Style Shortcut" + +/** @ingroup MenuCommand + Other Panel:New Layer */ +#define kAdobeLayerPalette2CommandStr "AdobeLayerPalette2" + +/** @ingroup MenuCommand + Other Panel:New Layer with Dialog */ +#define kAdobeLayerPalette3CommandStr "AdobeLayerPalette3" + +/** @ingroup MenuCommand + Other Panel:Update Link */ +#define kAdobeUpdateLinkShortcutCommandStr "Adobe Update Link Shortcut" + +/** @ingroup MenuCommand + Other Panel:Navigator Options */ +#define kAdobeNavigator2CommandStr "AdobeNavigator2" + +/** @ingroup MenuCommand + Other Panel:New Swatch */ +#define kAdobeNewSwatchShortcutMenuCommandStr "Adobe New Swatch Shortcut Menu" + +/** @ingroup MenuCommand + Other Panel:Basic Toolbar */ +#define kAdobeBasicToolbarMenuCommandStr "Adobe Basic Toolbar Menu" + +/** @ingroup MenuCommand + Other Panel:Basic Toolbar */ +#define kAdobeAdvancedToolbarMenuCommandStr "Adobe Advanced Toolbar Menu" + +/** @ingroup MenuCommand + Object:Repeat:Make Radial*/ +#define kMakeRadialRepeatCommandStr "Make Radial Repeat" + +/** @ingroup MenuCommand + Object:Repeat:Make Grid*/ +#define kMakeGridRepeatCommandStr "Make Grid Repeat" + +/** @ingroup MenuCommand + Object:Repeat:Make Symmetry*/ +#define kMakeSymmetryRepeatCommandStr "Make Symmetry Repeat" + +/** @ingroup MenuCommand + Object:Repeat:Release*/ +#define kReleaseRepeatArtCommandStr "Release Repeat Art" + +/** @ingroup MenuCommand + Object:Repeat:Repeat Art Options*/ +#define kRepeatArtOptionsCommandStr "Repeat Art Options" + +#include "AIHeaderEnd.h" + +#endif // __AIMenuCommandString__ + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuGroups.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuGroups.h index d047821..12c0059 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuGroups.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMenuGroups.h @@ -1,243 +1,244 @@ -#ifndef __AIMenuGroups__ -#define __AIMenuGroups__ - -/* - * Name: AIMenuGroups.h - * $Revision: 20 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Built-in Menu Groups. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/** @file AIMenuGroups.h */ - - -/** @ingroup MenuGroups */ -/** @{ <> */ - -#define kAboutMenuGroup "About" - -#define kOpenMenuGroup "Open Document" -#define kRecentMenuGroup "Recent Files" -#define kCloseMenuGroup "Close Document" -#define kDeviceCentralMenuGroup "Device Central" -#define kSaveMenuGroup "Save Document" -#define kSaveForMenuGroup "Save For" -#define kImportMenuGroup "Import" -#define kPlaceMenuGroup "Place Document" -#define kExportMenuGroup "Export Document" -#define kDocumentUtilsMenuGroup "Document Utilities" -#define kDocumentInterchangeMenuGroup "Document Interchange" -#define kPrintMenuGroup "Print" -#define kSendMenuGroup "Send Document" - -#define kAppUtilsMenuGroup "Application Utilities" -#define kQuitMenuGroup "Quit" - -#define kEditMenuGroup "Edit" -#define kUndoMenuGroup "Undo" -#define kPasteUtilsMenuGroup "Paste Utilities" -#define kEditUtilsMenuGroup "Edit Utilities" -/** Find/Replace, Spell Check */ -#define kEditTextMenuGroup "Edit Text" -/** PDF, Transparency, Print presets */ -#define kPresetsMenuGroup "Presets Group" -/** Includes Keyboard Shortcuts */ -#define kEditUtilsMenuGroup "Edit Utilities" -/** Select menu- internal commands */ -#define kSelectMenuGroup "Select" -/** Select menu- external commands */ -#define kSelectMenuExternalGroup "SelectExternal" - -#define kSameMenuGroup "Same" -#define kSelectObjectMenuGroup "SelectObject" - -#define kPrefsMenuGroup "Preferences" - -#define kSyncMenuGroup "Sync" -//#define kPublishingMenuGroup "Publishing" -#define kClipboardMenuGroup "Clipboard" - -#define kRepeatMenuGroup "Repeat" -#define kArrangeTransformMenuGroup "Arrange Transform" -#define kArrangeMoveMenuGroup "Arrange Move" -#define kArrangeGroupMenuGroup "Arrange Group" -#define kArrangeAttribsMenuGroup "Arrange Attributes" - -#define kViewModeMenuGroup "View Mode" -#define kViewAdornmentsMenuGroup "View Adornments" -#define kViewMenuGroup "View" -#define kViewUtilsMenuGroup "View Utilities" -#define kViewExtMenuGroup "View Extension" -#define kViewSnapMenuGroup "View Snap" - -#define kObjectAttribsMenuGroup "Object Attributes" -#define kObjectUtilsMenuGroup "Object Utilities" -#define kObjectsMenuGroup "Objects" -/** The group that contains the submenus for Path, Blend, Envelope Distort, and so on. */ -#define kObjectPathsMenuGroup "Objects Paths" -/** The group that is the initial contents of the Path submenu. - Plug-ins that want to be on this submenu should create - \c #kObjectPathsPopoutPluginMenuGroup - near \c #kObjectPathsPopupMenuGroup, then add themselves - to that group, not add themselves directly to - \c #kObjectPathsPopupMenuGroup. */ -#define kObjectPathsPopupMenuGroup "Objects Paths Popup" -#define kLockMenuGroup "Lock" -#define kHideMenuGroup "Hide" - -#define kGuidesMenuGroup "Guides" -#define kMaskMenuGroup "Masks" -#define kCompoundPathsMenuGroup "Compound Paths" -#define kArtboardsGroup "ArtBoards" -#define kCropMarksMenuGroup "Crop Marks" -#define kGraphsMenuGroup "Graphs" -#define kBlocksMenuGroup "Blocks" -#define kWrapMenuGroup "Wrap" -#define kTextPathTypeGroup "Text Path Type" -#define kTypeAttribsMenuGroup "Type Attributes" -#define kTypePalettesMenuGroup "Type Palettes" -#define kTypeLayoutMenuGroup "Type Layout" -#define kTypeTabsMenuGroup kTypePalettesMenuGroup -#define kTypeUtilsMenuGroup "Type Utilities" -#define kTypePluginsMenuGroup1 "Type Plugins1" -#define kTypePluginsMenuGroup2 "Type Plugins2" -#define kTypeAsianOptionsGroup "Type Asian Options" - -#define kTypeSizeUtilsMenuGroup "Type Size Utilities" -#define kTypeSizeMenuGroup "Type Size" -#define kTypeLeadingUtilsMenuGroup "Type Leading Utilities" -#define kTypeLeadingMenuGroup "Type Leading" -#define kTypeAlignmentMenuGroup "Type Alignment" - -#define kFilterUtilities "Filter Utilities" - -#define kEffectsMenuGroup "Effects" - -#define kHelpMenuGroup "Help Menu" - -// The following groups do not show up in the menu bar. They only -// show up in the keyboard shortcuts dialog. -/** In keyboard shortcuts dialog */ -#define kHidddenOtherSelectMenuGroup "Hidden Other Select" -/** In keyboard shortcuts dialog */ -#define kHiddenOtherTextMenuGroup "Hidden Other Text" -/** In keyboard shortcuts dialog */ -#define kHiddenOtherObjectMenuGroup "Hidden Other Object" -/** In keyboard shortcuts dialog */ -#define kHiddenOtherPaletteMenuGroup "Hidden Other Palette" -/** In keyboard shortcuts dialog */ -#define kHiddenOtherMiscMenuGroup "Hidden Other Misc" - - -#define kWindowUtilsMenuGroup "Window Utilities" -#define kApplicationContainerMenuGroup "Application Container" -#define kToolPalettesMenuGroup "Tool Palettes" -#define kWindowLibariesMenuGroup "Window Libraries" -#define kAdobeLabsMenuGroup "Adobe Labs Menu Group" //VS_TODO: To be removed -#define kServicesMenuGroup "Services Menu Group" - -#define kPaintPalettesMenuGroup kToolPalettesMenuGroup -#define kObjectInfoPalettesMenuGroup kToolPalettesMenuGroup -#define kAttributePalettesMenuGroup kToolPalettesMenuGroup -#define kOtherPalettesMenuGroup kToolPalettesMenuGroup -#define kPaintAttributesPaletteMenuGroup kToolPalettesMenuGroup -#define kSVGPaletteMenuGroup kToolPalettesMenuGroup -#define kWindowObjectUtilsMenuGroup kToolPalettesMenuGroup -// Note the pre-AI10 definitions of these menu groups as shown below are mapped to kToolPalettesMenuGroup -//#define kPaintPalettesMenuGroup "Paint Palettes" -//#define kObjectInfoPalettesMenuGroup "Object Info Palettes" -//#define kAttributePalettesMenuGroup "Attribute Palettes" -//#define kOtherPalettesMenuGroup "Palettes" -//#define kPaintAttributesPaletteMenuGroup "Paint Attributes Palettes" -//#define kSVGPaletteMenuGroup "SVG Palette" -//#define kWindowObjectUtilsMenuGroup "Window Object Utilities Palettes" - - - -// The following groups are added by plug-ins, not by the application. -// To use them, your plug-in should add the group using AddMenuGroup (it is ok to add a group twice; -// all but the first request will be ignored.) - -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kDocInfoMenuGroup "AIPlugin Document Info" -//#define kDocInfoMenuGroupNearGroup -//#define kDocInfoMenuGroupOptions kMenuGroupSeparatorOption - -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kObjectRasterMenuGroup "AIPlugin Object Raster" -//#define kObjectFlattenMenuGroup "AIPlugin Object Flatten" -//#define kObjectRasterMenuGroupOptions kMenuGroupSeparatorOption - -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kArrangeTransformMultipleMenuGroup "Arrange Multiple Transform" -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kATMMenuGroupNearGroup kArrangeTransformMenuGroup -//#define kArrangeTransformMultipleMenuGroupOptions kMenuGroupSeparatorOption - -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). - This is the area of the Path popout menu intended for plug-in commands */ -#define kObjectPathsPopoutPluginMenuGroup "More Menus in the Object Path Popout" -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kOPPPMenuGroupNearGroup kObjectPathsPopupMenuGroup -//#define kOPPPMenuGroupOptions kMenuGroupSeparatorOption - -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). - The group that is the initial contents of the Edit Colors submenu. */ -#define kAIEditColorsSubMenuGroup "AIEdit Colors SubMenu Group" -/** Use this priority with \c #AIMenuSuite::AddMenuItemZString() - before \c #AIMenuSuite::AddMenuGroupAsSubMenu(). - Subgroups do not support multiple add attempts. Search this group - using \c #AIMenuSuite::CountMenuGroups(), \c #AIMenuSuite::GetNthMenuGroup(), - and \c #AIMenuSuite::GetMenuGroupName(). Create the subgroup only if it is not found. - Then you can use \c #AIMenuSuite::AddMenuGroup() to add the following - two menu groups or others after them. - */ -#define kEditColorsMenuGroupPriority 0x7d000000 -/** Menu group for the Color Harmony plugin's commands. */ -#define kAdobeColorHarmonyMenuGroup "Adobe Color Harmony Editor Menu Group" -/** Menu group for other Adobe Color filters. To install items in the Edit Colors - menu group, use a priority less than \c kAdobeColorFiltersMenuGroup, and - insert a separator before your menu items.*/ -#define kAdobeColorFiltersMenuGroup "Adobe Color Filters Menu Group" - -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kDocumentSupportMenuGroup "AIPlugin Document Support" - -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kAssetMgmtMenuGroup "Adobe Plugin Asset Mgmt" -/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kWorkgroupMenuGroup kDocumentSupportMenuGroup - -/** Added by the scripting plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kScriptsMenuGroup "ScriptsMenuGroup" - -/** Added by the workspaces plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kWorkspacesMenuGroup "WorkspacesMenuGroup" -/** Added by the workspaces plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kWorkspacesCustomMenuGroup "WorkspacesCustomMenuGroup" -/** Added by the workspaces plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kWorkspacesPresetsMenuGroup "WorkspacesPresetsMenuGroup" - -/** Added by the InfoGraphics plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ -#define kAIChartsMenuGroup "Adobe Charts" - - - -// end of the MenuGroups documentation group -/** @} */ - - -#endif - +#ifndef __AIMenuGroups__ +#define __AIMenuGroups__ + +/* + * Name: AIMenuGroups.h + * $Revision: 20 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Built-in Menu Groups. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/** @file AIMenuGroups.h */ + + +/** @ingroup MenuGroups */ +/** @{ <> */ + +#define kAboutMenuGroup "About" + +#define kOpenMenuGroup "Open Document" +#define kRecentMenuGroup "Recent Files" +#define kCloseMenuGroup "Close Document" +#define kDeviceCentralMenuGroup "Device Central" +#define kSaveMenuGroup "Save Document" +#define kSaveForMenuGroup "Save For" +#define kImportMenuGroup "Import" +#define kPlaceMenuGroup "Place Document" +#define kExportMenuGroup "Export Document" +#define kDocumentUtilsMenuGroup "Document Utilities" +#define kDocumentInterchangeMenuGroup "Document Interchange" +#define kPrintMenuGroup "Print" +#define kSendMenuGroup "Send Document" + +#define kAppUtilsMenuGroup "Application Utilities" +#define kQuitMenuGroup "Quit" + +#define kEditMenuGroup "Edit" +#define kUndoMenuGroup "Undo" +#define kPasteUtilsMenuGroup "Paste Utilities" +#define kEditUtilsMenuGroup "Edit Utilities" +/** Find/Replace, Spell Check */ +#define kEditTextMenuGroup "Edit Text" +/** PDF, Transparency, Print presets */ +#define kPresetsMenuGroup "Presets Group" +/** Includes Keyboard Shortcuts */ +#define kEditUtilsMenuGroup "Edit Utilities" +/** Select menu- internal commands */ +#define kSelectMenuGroup "Select" +/** Select menu- external commands */ +#define kSelectMenuExternalGroup "SelectExternal" + +#define kSameMenuGroup "Same" +#define kSelectObjectMenuGroup "SelectObject" + +#define kPrefsMenuGroup "Preferences" + +#define kSyncMenuGroup "Sync" +//#define kPublishingMenuGroup "Publishing" +#define kClipboardMenuGroup "Clipboard" + +#define kRepeatMenuGroup "Repeat" +#define kArrangeTransformMenuGroup "Arrange Transform" +#define kArrangeMoveMenuGroup "Arrange Move" +#define kArrangeGroupMenuGroup "Arrange Group" +#define kArrangeAttribsMenuGroup "Arrange Attributes" + +#define kViewModeMenuGroup "View Mode" +#define kViewAdornmentsMenuGroup "View Adornments" +#define kViewMenuGroup "View" +#define kViewUtilsMenuGroup "View Utilities" +#define kViewExtMenuGroup "View Extension" +#define kViewSnapMenuGroup "View Snap" + +#define kAlignObjectMenuGroup "Align Objects" +#define kObjectAttribsMenuGroup "Object Attributes" +#define kObjectUtilsMenuGroup "Object Utilities" +#define kObjectsMenuGroup "Objects" +/** The group that contains the submenus for Path, Blend, Envelope Distort, and so on. */ +#define kObjectPathsMenuGroup "Objects Paths" +/** The group that is the initial contents of the Path submenu. + Plug-ins that want to be on this submenu should create + \c #kObjectPathsPopoutPluginMenuGroup + near \c #kObjectPathsPopupMenuGroup, then add themselves + to that group, not add themselves directly to + \c #kObjectPathsPopupMenuGroup. */ +#define kObjectPathsPopupMenuGroup "Objects Paths Popup" +#define kLockMenuGroup "Lock" +#define kHideMenuGroup "Hide" + +#define kGuidesMenuGroup "Guides" +#define kMaskMenuGroup "Masks" +#define kCompoundPathsMenuGroup "Compound Paths" +#define kArtboardsGroup "ArtBoards" +#define kCropMarksMenuGroup "Crop Marks" +#define kGraphsMenuGroup "Graphs" +#define kBlocksMenuGroup "Blocks" +#define kWrapMenuGroup "Wrap" +#define kTextPathTypeGroup "Text Path Type" +#define kTypeAttribsMenuGroup "Type Attributes" +#define kTypePalettesMenuGroup "Type Palettes" +#define kTypeLayoutMenuGroup "Type Layout" +#define kTypeTabsMenuGroup kTypePalettesMenuGroup +#define kTypeUtilsMenuGroup "Type Utilities" +#define kTypePluginsMenuGroup1 "Type Plugins1" +#define kTypePluginsMenuGroup2 "Type Plugins2" +#define kTypeAsianOptionsGroup "Type Asian Options" + +#define kTypeSizeUtilsMenuGroup "Type Size Utilities" +#define kTypeSizeMenuGroup "Type Size" +#define kTypeLeadingUtilsMenuGroup "Type Leading Utilities" +#define kTypeLeadingMenuGroup "Type Leading" +#define kTypeAlignmentMenuGroup "Type Alignment" + +#define kFilterUtilities "Filter Utilities" + +#define kEffectsMenuGroup "Effects" + +#define kHelpMenuGroup "Help Menu" + +// The following groups do not show up in the menu bar. They only +// show up in the keyboard shortcuts dialog. +/** In keyboard shortcuts dialog */ +#define kHidddenOtherSelectMenuGroup "Hidden Other Select" +/** In keyboard shortcuts dialog */ +#define kHiddenOtherTextMenuGroup "Hidden Other Text" +/** In keyboard shortcuts dialog */ +#define kHiddenOtherObjectMenuGroup "Hidden Other Object" +/** In keyboard shortcuts dialog */ +#define kHiddenOtherPaletteMenuGroup "Hidden Other Palette" +/** In keyboard shortcuts dialog */ +#define kHiddenOtherMiscMenuGroup "Hidden Other Misc" + + +#define kWindowUtilsMenuGroup "Window Utilities" +#define kApplicationContainerMenuGroup "Application Container" +#define kToolPalettesMenuGroup "Tool Palettes" +#define kWindowLibariesMenuGroup "Window Libraries" +#define kAdobeLabsMenuGroup "Adobe Labs Menu Group" //VS_TODO: To be removed +#define kServicesMenuGroup "Services Menu Group" + +#define kPaintPalettesMenuGroup kToolPalettesMenuGroup +#define kObjectInfoPalettesMenuGroup kToolPalettesMenuGroup +#define kAttributePalettesMenuGroup kToolPalettesMenuGroup +#define kOtherPalettesMenuGroup kToolPalettesMenuGroup +#define kPaintAttributesPaletteMenuGroup kToolPalettesMenuGroup +#define kSVGPaletteMenuGroup kToolPalettesMenuGroup +#define kWindowObjectUtilsMenuGroup kToolPalettesMenuGroup +// Note the pre-AI10 definitions of these menu groups as shown below are mapped to kToolPalettesMenuGroup +//#define kPaintPalettesMenuGroup "Paint Palettes" +//#define kObjectInfoPalettesMenuGroup "Object Info Palettes" +//#define kAttributePalettesMenuGroup "Attribute Palettes" +//#define kOtherPalettesMenuGroup "Palettes" +//#define kPaintAttributesPaletteMenuGroup "Paint Attributes Palettes" +//#define kSVGPaletteMenuGroup "SVG Palette" +//#define kWindowObjectUtilsMenuGroup "Window Object Utilities Palettes" + + + +// The following groups are added by plug-ins, not by the application. +// To use them, your plug-in should add the group using AddMenuGroup (it is ok to add a group twice; +// all but the first request will be ignored.) + +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kDocInfoMenuGroup "AIPlugin Document Info" +//#define kDocInfoMenuGroupNearGroup +//#define kDocInfoMenuGroupOptions kMenuGroupSeparatorOption + +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kObjectRasterMenuGroup "AIPlugin Object Raster" +//#define kObjectFlattenMenuGroup "AIPlugin Object Flatten" +//#define kObjectRasterMenuGroupOptions kMenuGroupSeparatorOption + +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kArrangeTransformMultipleMenuGroup "Arrange Multiple Transform" +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kATMMenuGroupNearGroup kArrangeTransformMenuGroup +//#define kArrangeTransformMultipleMenuGroupOptions kMenuGroupSeparatorOption + +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). + This is the area of the Path popout menu intended for plug-in commands */ +#define kObjectPathsPopoutPluginMenuGroup "More Menus in the Object Path Popout" +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kOPPPMenuGroupNearGroup kObjectPathsPopupMenuGroup +//#define kOPPPMenuGroupOptions kMenuGroupSeparatorOption + +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). + The group that is the initial contents of the Edit Colors submenu. */ +#define kAIEditColorsSubMenuGroup "AIEdit Colors SubMenu Group" +/** Use this priority with \c #AIMenuSuite::AddMenuItemZString() + before \c #AIMenuSuite::AddMenuGroupAsSubMenu(). + Subgroups do not support multiple add attempts. Search this group + using \c #AIMenuSuite::CountMenuGroups(), \c #AIMenuSuite::GetNthMenuGroup(), + and \c #AIMenuSuite::GetMenuGroupName(). Create the subgroup only if it is not found. + Then you can use \c #AIMenuSuite::AddMenuGroup() to add the following + two menu groups or others after them. + */ +#define kEditColorsMenuGroupPriority 0x7d000000 +/** Menu group for the Color Harmony plugin's commands. */ +#define kAdobeColorHarmonyMenuGroup "Adobe Color Harmony Editor Menu Group" +/** Menu group for other Adobe Color filters. To install items in the Edit Colors + menu group, use a priority less than \c kAdobeColorFiltersMenuGroup, and + insert a separator before your menu items.*/ +#define kAdobeColorFiltersMenuGroup "Adobe Color Filters Menu Group" + +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kDocumentSupportMenuGroup "AIPlugin Document Support" + +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kAssetMgmtMenuGroup "Adobe Plugin Asset Mgmt" +/** Added by a plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kWorkgroupMenuGroup kDocumentSupportMenuGroup + +/** Added by the scripting plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kScriptsMenuGroup "ScriptsMenuGroup" + +/** Added by the workspaces plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kWorkspacesMenuGroup "WorkspacesMenuGroup" +/** Added by the workspaces plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kWorkspacesCustomMenuGroup "WorkspacesCustomMenuGroup" +/** Added by the workspaces plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kWorkspacesPresetsMenuGroup "WorkspacesPresetsMenuGroup" + +/** Added by the InfoGraphics plug-in. See \c #AIMenuSuite::AddMenuGroup(). */ +#define kAIChartsMenuGroup "Adobe Charts" + + + +// end of the MenuGroups documentation group +/** @} */ + + +#endif + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMesh.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMesh.h index 9cfb35d..57c0e18 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMesh.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIMesh.h @@ -1,1495 +1,1495 @@ -#ifndef __AIMesh__ -#define __AIMesh__ - -/* - * Name: AIMesh.h - * $Revision: 27 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Mesh Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIHitTest__ -#include "AIHitTest.h" -#endif - -#ifndef __AIRealBezier__ -#include "AIRealBezier.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIMesh.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIMeshSuite "AI Mesh Suite" -#define kAIMeshSuiteVersion6 AIAPI_VERSION(6) -#define kAIMeshSuiteVersion kAIMeshSuiteVersion6 -#define kAIMeshVersion kAIMeshSuiteVersion - -#define kAIMeshHitSuite "AI Mesh Hit Suite" -#define kAIMeshHitSuiteVersion3 AIAPI_VERSION(3) -#define kAIMeshHitSuiteVersion kAIMeshHitSuiteVersion3 -#define kAIMeshHitVersion kAIMeshHitSuiteVersion - -#define kAIMeshSelectionSuite "AI Mesh Selection Suite" -#define kAIMeshSelectionSuiteVersion3 AIAPI_VERSION(3) -#define kAIMeshSelectionSuiteVersion kAIMeshSelectionSuiteVersion3 -#define kAIMeshSelectionVersion kAIMeshSelectionSuiteVersion - -#define kAIMeshPatchIteratorSuite "AI Mesh Patch Suite" -#define kAIMeshPatchIteratorSuiteVersion3 AIAPI_VERSION(3) -#define kAIMeshPatchIteratorSuiteVersion kAIMeshPatchIteratorSuiteVersion3 -#define kAIMeshPatchIteratorVersion kAIMeshPatchIteratorSuiteVersion - -#define kAIMeshVertexIteratorSuite "AI Mesh Vertex Suite" -#define kAIMeshVertexIteratorSuiteVersion4 AIAPI_VERSION(4) -#define kAIMeshVertexIteratorSuiteVersion kAIMeshVertexIteratorSuiteVersion4 -#define kAIMeshVertexIteratorVersion kAIMeshVertexIteratorSuiteVersion - -#define kAIMeshSegmentIteratorSuite "AI Mesh Segment Suite" -#define kAIMeshSegmentIteratorSuiteVersion3 AIAPI_VERSION(3) -#define kAIMeshSegmentIteratorSuiteVersion kAIMeshSegmentIteratorSuiteVersion3 -#define kAIMeshSegmentIteratorVersion kAIMeshSegmentIteratorSuiteVersion - - -/** Kinds of gradient mesh */ -enum AIMeshKind { - /** Cartesian mesh */ - kAICartesianMesh = 0, - /** Not implemented */ - kAIPolarMesh = 1 -}; - -/** Node axes */ -enum AIMeshAxis { - /** The I axis, containing integer values of nodes in a mesh. */ - kAIMeshIAxis = 0, - /** The J axis, containing integer values of nodes in a mesh. */ - kAIMeshJAxis = 1 -}; - -/** Directions along axes */ -enum AIMeshAxisSense { - kAIMeshAxisIncreasing = 0, - kAIMeshAxisDecreasing = 1 -}; - -/** Directions around patches */ -enum AIMeshPatchDirection { - kAIMeshClockwise = 0, - kAIMeshCounterClockwise = 1 -}; - -/** Parts of a mesh that can be hit */ -enum AIMeshPart { - kAIMeshNowhere = 0, - kAIMeshVertex = 1, - kAIMeshTangent = 2, - kAIMeshEdge = 3, - kAIMeshPatch = 4 -}; - -/** Variants for selection bounds */ -enum AIMeshSelectionBoundsVariant { - /** Computes a bounding box of the parts of the mesh that transform rigidly when - a selection is transformed. Excludes from the bounds those segments that are - attached to a pair of vertices where one transforms and the other - remains fixed. */ - kAIMeshSelectionRigidBounds = 0 -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a mesh selection. See \c #AIMeshSelectionSuite */ -typedef struct _AIMeshSelection *AIMeshSelection; -/** Opaque reference to a mesh patch iterator. See \c #AIMeshPatchIteratorSuite */ -typedef struct _AIMeshPatchIterator *AIMeshPatchIterator; -/** Opaque reference to a mesh vertex iterator. See \c #AIMeshVertexIteratorSuite */ -typedef struct _AIMeshVertexIterator *AIMeshVertexIterator; -/** Opaque reference to a mesh segment iterator. See \c #AIMeshSegmentIteratorSuite */ -typedef struct _AIMeshSegmentIterator *AIMeshSegmentIterator; - - -/** Transformation function prototype for \c #AIMeshSuite::MapPoints() - and \c #AIMeshSelectionSuite::MapPoints() - The function is assumed to have a continuous first derivative. - @param point The point to be transformed. - @param userData Developer-defined data passed through from the calling function. - */ -typedef void (*AIMeshPointMap) (AIRealPoint* point, void* userData); -/** Transformation function prototype for \c #AIMeshSuite::MapColors() - and \c #AIMeshSelectionSuite::MapColors(). - @param color The color to be transformed. - @param userData Developer-defined data passed through from the calling function. - */ -typedef void (*AIMeshColorMap) (AIColor* color, void* userData); - -/** Color-query function prototype for \c #AIMeshSuite::QueryColors() - and \c #AIMeshSelectionSuite::QueryColors(). - @param color The color to be queried. - @param userData Developer-defined data passed through from the calling function. - */ -typedef void (*AIMeshColorQuery) (AIColor* color, void* userData); - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite and related suites provides functions for creating and - managing \e mesh objects, which are art object of type \c #kMeshArt. - A mesh object represents a grid that can be used to apply colors to art, - or to deform art in an \e envelope; see the \c #AIEnvelopeSuite. - - This suite provides functions for manipulating a mesh as a whole. - - \li Additional suites allow you to traverse and manipulate - the elements of a mesh (patches, vertices and segments). - See @ref meshIterators. - \li Different sets of elements in a mesh can be selected. The selection - is represented by a mesh selection object. The \c #AIMeshSelectionSuite - allows you to manipulate selections for a mesh. - \li The \c #AIMeshHitSuite provides functions that operate on the results - of hit testing for meshes (see \c #AIHitTestSuite). - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMeshSuite and \c #kAIMeshVersion. - - @section meshTerms Mesh Terminology - - A mesh can be considered an array of patches, where each patch has - four sides which it shares with its neighbors. The corners of - a patch are nodes to which color is applied. The colors of the - corners then blend across the interior of the patch. - - The patches are defined by cubic bezier curves, joined together - to form the mesh. The point at which two or more beziers meet is - called a \e knot. To reduce the visual complexity, only a subset - of the knots are visible when a mesh is displayed. A visible knot - is called a \e vertex. The sequence of beziers between two - vertices is called a \e segment. - - Just as for the beziers describing a path, a user can adjust - the shape of the curve between two vertices. The points that - manipulate the shape are called \e controls. Unlike a path, - the curve might not be a single bezier, so the controls might - not be coincident with the points of the bezier control polygon. - - A coordinate system can be imposed on a mesh. For an M by N patch - mesh, the coordinates range from [0..M] and [0..N]. Integer values - of the coordinates refer to nodes. Non-integer values refer - to points in the interior or on the sides of patches. When using - strictly integer values, the axes are called the I and J axes. - When using real values, they are called the U and V axes. - - When traversing a mesh, a direction along the axes can be increasing - or decreasing; this kind of direction is called the \e sense. - A direction around a patch can be clockwise or - counterclockwise. The term \e direction is reserved for this usage. - - For example, for the node at (2,2): - - \li (3,1) is the next node increasing along the I axis. - \li (2,1) is the next node decreasing along the J axis. - \li (1,2) is the next node counterclockwise around patch (1,1). - \li (2,1) is the next node clockwise around patch (1,1). - - \section meshIterators Mesh Iterators - - Iterator objects allow you to traverse and manipulate the - elements of a mesh. There are different iterators for each of - the types of elements; patches, vertices and segments. There is - a suite of functions for each type of iterator, the \c #AIMeshPatchIteratorSuite, - the \c #AIMeshVertexIteratorSuite, and the \c #AIMeshSegmentIteratorSuite. - - Iterator objects are reference counted. The initial reference - count is one, and you do not typically need to increment it. - You must, however, use the appropriate \c Release() function - to decrement the count when you no longer need the object. - Failure to do so causes memory leaks. - - Each type of iterator has an \c AtEnd method, which - returns true when an iterator has walked off the mesh. - After the end, the iterator cannot be reversed; that is you can - no longer get the previous element. - - An iterator has a set of \c Next and \c Prev methods for - iteration. - - \li The simple \c Next and \c Prev methods are used with - iterators obtained from a \c GetStart method. Repeated - calls to \c Next guarantee that every element is visited - once and only once. The order of traversal is undefined. - \li The methods \c NextI, \c PrevI, \c NextJ, \c PrevJ are for - traversing the elements along a given axis. - \li A segment iterator has an axis and direction, determined by - the start vertex and end vertex. The \c NextOnPatch and - \c PrevOnPatch methods for segment iterators - differ from \c NextOnAxis and \c PrevOnAxis only when they - encounter a corner of a patch. In this case, they switch to a new - axis by making a half turn either clockwise or counter clockwise. -*/ -typedef struct { - - /** Sets the dimensions of a mesh object. - The geometric and color data is set to default values. - @param mesh The mesh object. - @param i The number of patches along the I axis. - @param j The number of patches along the J axis. - */ - AIAPI AIErr (*InitCartesian) (AIArtHandle mesh, ai::int32 i, ai::int32 j); - - /** Not implemented. */ - AIAPI AIErr (*InitPolar) (AIArtHandle mesh, ai::int32 i, ai::int32 j); - - /** Retrieves the type of the mesh. (Only cartesian meshes are implemented.) - @param mesh The mesh object. - @param kind [out] A buffer in which to return the type, a #AIMeshKind value. - */ - AIAPI AIErr (*GetKind) (AIArtHandle mesh, ai::int32 *kind); - - /** Retrieves the size of a mesh (number of patches). - @param mesh The mesh object. - @param i [out] A buffer in which to return the number of patches along the I axis. - @param j [out] A buffer in which to return the number of patches along the J axis. - */ - AIAPI AIErr (*GetSize) (AIArtHandle mesh, ai::int32 *i, ai::int32 *j); - - /** Creates a new selection object for a mesh. Use the \c #AIMeshSelectionSuite - to query and manipulate the selection. - @param mesh The mesh object. - @param all When true, include all vertices and segments of the mesh - in the selection. When false, create an empty selection. - @param selection [out] A buffer in which to return the selection. - @see \c #GetSelection() - */ - AIAPI AIErr (*NewSelection) (AIArtHandle mesh, AIBoolean all, AIMeshSelection* selection); - - /** Retrieves the visible selection for a mesh; see \c #AIMeshSelectionSuite. - Changing the returned selection changes what the user sees. - @param mesh The mesh object. - @param selection [out] A buffer in which to return the selection. - */ - AIAPI AIErr (*GetSelection) (AIArtHandle mesh, AIMeshSelection* selection); - - /** Creates a patch iterator a given patch in a mesh. - @param mesh The mesh object. - @param i The 0-based I-axis index of the patch. - @param j The 0-based J-axis index of the patch. - @param patch [out] A buffer in which to return the patch iterator. - */ - AIAPI AIErr (*GetPatch) (AIArtHandle mesh, ai::int32 i, ai::int32 j, AIMeshPatchIterator* patch); - - /** Creates a patch iterator for which calling \c #AIMeshPatchIteratorSuite::Next() - repeatedly is guaranteed to visit all patches. - @param mesh The mesh object. - @param patch [out] A buffer in which to return the patch iterator. - */ - AIAPI AIErr (*GetStartPatch) (AIArtHandle mesh, AIMeshPatchIterator* patch); - - /** Creates a vertex iterator for a given node in a mesh. - @param mesh The mesh object. - @param i The 0-based I-axis index of the node. - @param j The 0-based J-axis index of the node. - @param vertex [out] A buffer in which to return the vertex iterator. - */ - AIAPI AIErr (*GetNode) (AIArtHandle mesh, ai::int32 i, ai::int32 j, AIMeshVertexIterator* vertex); - - /** Creates a vertex iterator for which calling \c #AIMeshVertexIteratorSuite::Next() - repeatedly is guaranteed to visit all vertices. - @param mesh The mesh object. - @param vertex [out] A buffer in which to return the vertex iterator. - */ - AIAPI AIErr (*GetStartVertex) (AIArtHandle mesh, AIMeshVertexIterator* vertex); - - /** Creates a segment iterator for which calling \c #AIMeshSegmentIteratorSuite::Next() - repeatedly is guaranteed to visit all segments. - @param mesh The mesh object. - @param segment [out] A buffer in which to return the segment iterator. - */ - AIAPI AIErr (*GetStartSegment) (AIArtHandle mesh, AIMeshSegmentIterator* segment); - - /** Retrieves the color space used to render a mesh. - The colors of the nodes of the mesh can be drawn from different - color spaces, which are converted to a single color space for - rendering. - (Note that this function does not return an error code.) - @param mesh The mesh object. - @param kind [out] A buffer in which to return the color type. - @param custom [out] A buffer in which to return the custom color, - if \c kind is \c #kCustomColor. - */ - AIAPI void (*GetColorSpace) (AIArtHandle mesh, AIColorTag* kind, AICustomColorHandle* custom); - - /** Converts a point in artwork coordinates to the (u,v) coordinates of - that point within a mesh. - (Note that this function returns a boolean value, not an error code.) - @param mesh The mesh object. - @param point The pointer to the point in artwork coordinates. - @param u [out] A buffer in which to return the U coordinate of the converted point. - @param v [out] A buffer in which to return the V coordinate of the converted point. - @return True if the point lies inside the mesh (the \c u and \c v values are defined), - false if it lies outside the mesh (the \c u and \c v values are not defined). - - */ - AIAPI AIBoolean (*InvertPoint) (AIArtHandle mesh, AIRealPoint* point, AIReal* u, AIReal* v); - - /** Converts a point in the (u,v) coordinates of a mesh to artwork coordinates. - (Note that this function does not return an error code.) - @param mesh The mesh object. - @param u The U coordinate of the point. - @param v The V coordinate of the point. - @param point [out] A buffer in which to return the converted point in artwork coordinates. - */ - AIAPI void (*EvalPoint) (AIArtHandle mesh, AIReal u, AIReal v, AIRealPoint* point); - - /** Retrieves the color of a mesh at a given point. - (Note that this function does not return an error code.) - @param mesh The mesh object. - @param u The U coordinate of the point. - @param v The V coordinate of the point. - @param color [out] A buffer in which to return the color. - */ - AIAPI void (*EvalColor) (AIArtHandle mesh, AIReal u, AIReal v, AIColor* color); - - /** Retrieves the opacity of a mesh at a given point. - (Note that this function does not return an error code.) - @param mesh The mesh object. - @param u The U coordinate of the point. - @param v The V coordinate of the point. - @param opacity [out] A buffer in which to return the color. - */ - AIAPI void (*EvalOpacity) (AIArtHandle mesh, AIReal u, AIReal v, AIReal* opacity); - - /** Transforms the points of a mesh by a transformation matrix. - @param mesh The mesh object. - @param matrix A pointer to the transformation matrix. - */ - AIAPI AIErr (*Transform) (AIArtHandle mesh, AIRealMatrix* matrix); - - /** Transforms the points of a mesh according to a developer-defined - mapping function. - @param mesh The mesh object. - @param f The point-mapping function. - @param userData Developer-defined data to pass through to the function. - */ - AIAPI AIErr (*MapPoints) (AIArtHandle mesh, AIMeshPointMap f, void* userData); - - /** Transforms the colors of a gradient mesh according to a developer-defined - mapping function. - @param mesh The mesh object. - @param f The color-mapping function. - @param userData Developer-defined data to pass through to the function. - */ - AIAPI AIErr (*MapColors) (AIArtHandle mesh, AIMeshColorMap f, void* userData); - - /** Passes the colors of a gradient mesh to a developer-defined - query function. Does not modify the mesh colors. - (Note that this function does not return an error code.) - @param mesh The mesh object. - @param f The color-querying function. - @param userData Developer-defined data to pass through to the function. - */ - AIAPI void (*QueryColors) (AIArtHandle mesh, AIMeshColorQuery f, void* userData); - - /** Splits a mesh at a point on the U axis and reports the index of the - resulting grid line. - @param mesh The mesh object. - @param u The insertion point on the U axis. - @param i [out] A buffer in which to return the 0-based index of the new grid line. - */ - AIAPI AIErr (*InsertU) (AIArtHandle mesh, AIReal u, ai::int32* i); - - /** Splits a mesh at a point on the V axis and reports the index of the - resulting grid line. - @param mesh The mesh object. - @param v The insertion point on the V axis. - @param i [out] A buffer in which to return the 0-based index of the new grid line. - */ - AIAPI AIErr (*InsertV) (AIArtHandle mesh, AIReal v, ai::int32* j); - - /** Removes those lines of a mesh grid passing through a - (U,V) point. Drawn grid lines pass through integer values. - If both U and V are integers, removes both a - horizontal and a vertical grid line. If only one is an - integer, removes only one line. - @param mesh The mesh object. - @param u The U-axis coordinate. - @param v The V-axis coordinate. - */ - AIAPI AIErr (*DeleteGridLines) (AIArtHandle mesh, AIReal u, AIReal v); - - /** Starts tracking for mouse movement over a mesh. - (Note that this function does not return an error code.) - @note For a tool that manipulates the control points - of a mesh, call \c #TrackBegin() before moving the - control points (in response to mouse-down, for example) - and \c #TrackEnd() when done (in response to mouse-up). - This ensures that selection handles are redrawn - during the operation--otherwise the control points are - not visible as they are modified. - @param mesh The mesh object. - */ - AIAPI void (*TrackBegin) (AIArtHandle mesh); - - /** Stops tracking for mouse movement over a mesh. - (Note that this function does not return an error code.) - @param mesh The mesh object. - @see \c #TrackBegin() - */ - AIAPI void (*TrackEnd) (AIArtHandle mesh); - - /** Stops the recording of selection changes for a mesh in - the Undo history. Use after a change to selection, so that - subsequent changes to other properties can be undone without - undoing the selection. - @param mesh The mesh object. - @see \c #AIUndoSuite::UndoChanges() - */ - AIAPI AIErr (*EndSelectionChanges) (void); - - /** Drops a color onto an element of a mesh, as if a - user dragged the color from, for example, the Swatch - palette. - @param hit A hit object that identifies the part of - mesh. See \c #AIHitTestSuite. - @param color The color. - */ - AIAPI AIErr (*DropColor) (AIHitRef hit, const AIColor* color); - - /** Converts an I-axis integer coordinate in a mesh (in the range [0..numPatches]) - to the corresponding U-axis coordinate, in the range [0..1]. See @ref meshTerms. - @param mesh The mesh object. - @param i The I-axis coordinate. - @param u [out] A buffer in which to return the U-axis coordinate. - */ - AIAPI AIErr (*GetRelativeU) (AIArtHandle mesh, ai::int32 i, AIReal* u); - - /** Converts a J-axis integer coordinate in a mesh (in the range [0..numPatches]) - to the corresponding V-axis coordinate in the range [0..1]. See @ref meshTerms. - @param mesh The mesh object. - @param j The J-axis coordinate. - @param v [out] A buffer in which to return the V-axis coordinate. - */ - AIAPI AIErr (*GetRelativeV) (AIArtHandle mesh, ai::int32 j, AIReal* v); - - /** Retrieves the overprint fill attribute from a mesh object. - (Note that this function does not return an error code.) - @param mesh The mesh object. - @return True if overprint is on, false if it is off. - */ - AIAPI AIBoolean (*GetOverprint) (AIArtHandle mesh); - - /** Sets the overprint fill attribute for a mesh object. - @param mesh The mesh object. - @param overprint True to turn overprint on, false to turn it off. - */ - AIAPI AIErr (*SetOverprint) (AIArtHandle mesh, AIBoolean overprint); - -} AIMeshSuite; - - -/** @ingroup Suites - This suite provides functions that operate on hit objects obtained - by \c #AIHitTestSuite functions, when the result of the test is a - hit on a mesh object. - They allow you to identify the part of the mesh object that was hit, - and to change the selection or iterate through elements - of the mesh based on hit results. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMeshHitSuite and \c #kAIMeshHitVersion. - */ -typedef struct { - - /** Reports the element of a mesh that was hit. - (Note that this function returns a constant value, not an error code.) - @param hit The hit object. - @return The element that was hit, an #AIMeshPart value. - */ - AIAPI ai::int32 (*GetPart) (AIHitRef hit); - - /** Retrieves the (u,v) coordinates of a hit on a mesh object. - (Note that this function does not return an error code.) - @param hit The hit object. - @param u [out] A buffer in which to return the U-axis coordinate, - in the range [0..M], where M is the number of horizontal patches. - @param v [out] A buffer in which to return the V-axis coordinate, - in the range [0..N], where N is the number of vertical patches. - @see @ref meshTerms. - */ - AIAPI void (*GetUV) (AIHitRef hit, AIReal* u, AIReal* v); - - /** Constructs a new selection from a hit, which contains the element - that was hit. - @param hit The hit object. - @param selection [out] A buffer in which to return the new selection object. - */ - AIAPI AIErr (*GetSelection) (AIHitRef hit, AIMeshSelection* selection); - - /** If a vertex or tangent was hit, creates an iterator for the vertex. - @param hit The hit object. - @param vertex [out] A buffer in which to return the iterator. - */ - AIAPI AIErr (*GetVertex) (AIHitRef hit, AIMeshVertexIterator* vertex); - - /** If a tangent was hit, retrieves the tangent index. - @param hit The hit object. - @param index [out] A buffer in which to return the 0-based index. - */ - AIAPI AIErr (*GetTangentIndex) (AIHitRef hit, ai::int32* index); - - /** If a segment was hit, creates an iterator for the segment. - @param hit The hit object. - @param segment [out] A buffer in which to return the iterator. - */ - AIAPI AIErr (*GetSegment) (AIHitRef hit, AIMeshSegmentIterator* segment); - - /** If a patch was hit, creates an iterator for the patch. - @param hit The hit object. - @param patch [out] A buffer in which to return the iterator. - */ - AIAPI AIErr (*GetPatch) (AIHitRef hit, AIMeshPatchIterator* patch); - -} AIMeshHitSuite; - - -/** @ingroup Suites - This suite provides functions that allow you to create and manipulate mesh - selections, which identify a subset of the vertices and segments - of a mesh. You can create any number of selections for a mesh, using - \c #AIMeshSuite::NewSelection(). - - There is one special selection associated with a mesh object that - identifies the subset of vertices and segments the user has selected. - This is the \e visible selection. You can obtain this selection - with \c #AIMeshSuite::GetSelection(). Making a change to the contents of this - selection affects what is displayed as selected in the document window. - - Selections are reference counted. When you get a selection - its initial reference count is 1, so you do not typically need - to call \c #AddRef().You must call \c #Release() to decrement - the count of a selection when you are no longer using it. - Failure to release selections causes memory leaks. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMeshSelectionSuite and \c #kAIMeshSelectionVersion. -*/ -typedef struct { - - /** Increments the reference count of a mesh selection. - The initial reference count is 1, so you do not typically need - to call this function. - (Note that this function returns an numeric value, not an error code.) - @param selection The selection. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) (AIMeshSelection selection); - - /** Decrements the reference count of a mesh selection, and frees - the associated memory when the count reaches 0. - (Note that this function returns an numeric value, not an error code.) - @param selection The selection. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) (AIMeshSelection selection); - - /** Copies the contents of a mesh selection into another, existing selection object. - @param selection The destination selection object. - @param from The source selection object. - */ - AIAPI AIErr (*Copy) (AIMeshSelection selection, AIMeshSelection from); - - /** Duplicates a mesh selection, creating a new selection object. - @param selection The source selection object. - @param clone [out] A buffer in which to return the new selection object. - */ - AIAPI AIErr (*Clone) (AIMeshSelection selection, AIMeshSelection* clone); - - /** Reports whether a mesh selection does not contain any vertices, segments or patches. - (Note that this function returns a boolean value, not an error code.) - @param selection The mesh selection object. - @return True if the selection is empty. - */ - AIAPI AIBoolean (*IsEmpty) (AIMeshSelection selection); - - /** Reports whether a mesh selection contains every vertex, segment, and patch. - (Note that this function returns a boolean value, not an error code.) - @param selection The mesh selection object. - @return True if the selection is full. - */ - AIAPI AIBoolean (*IsFull) (AIMeshSelection selection); - - /** Reports whether two mesh selection objects reference the same selection set. - (Note that this function returns a boolean value, not an error code.) - @param selection1 The first mesh selection object. - @param selection2 The second mesh selection object. - @return True if the selections are equal. - */ - AIAPI AIBoolean (*IsEqual) (AIMeshSelection selection1, AIMeshSelection selection2); - - /** Reports whether a mesh selection contains all of the objects that are in - another selection. - (Note that this function returns a boolean value, not an error code.) - @param selection1 The first mesh selection object. - @param selection2 The second mesh selection object. - @return True if the second selection is a subset of the first. - */ - AIAPI AIBoolean (*Contains) (AIMeshSelection selection1, AIMeshSelection selection2); - - /** Reports whether a mesh selection contains a specific vertex. - (Note that this function returns a boolean value, not an error code.) - @param selection The mesh selection object. - @param vertex The vertex. - @return True if the vertex is in the selection. - */ - AIAPI AIBoolean (*ContainsVertex) (AIMeshSelection selection, AIMeshVertexIterator vertex); - - /** Reports whether a mesh selection contains a specific segment. - (Note that this function returns a boolean value, not an error code.) - @param selection The mesh selection object. - @param segment The segment. - @return True if the segment is in the selection. - */ - AIAPI AIBoolean (*ContainsSegment) (AIMeshSelection selection, AIMeshSegmentIterator segment); - - /** Reports whether the reshaping control of a segment would be - visible in a selection. - (Note that this function returns a boolean value, not an error code.) - @param selection The mesh selection object. - @param segment The segment. - @return True if the reshaping control would be visible. - */ - AIAPI AIBoolean (*RendersControl) (AIMeshSelection selection, AIMeshSegmentIterator segment); - - /** Modifies a selection to be the intersection of itself and another selection. - @param selection1 The first mesh selection object, which is modified. - @param selection2 The second mesh selection object. - */ - AIAPI AIErr (*Intersect) (AIMeshSelection selection1, AIMeshSelection selection2); - - /** Modifies a selection to be the union of itself and another selection. - @param selection1 The first mesh selection object, which is modified.. - @param selection2 The second mesh selection object. - */ - AIAPI AIErr (*Union) (AIMeshSelection selection1, AIMeshSelection selection2); - - /** Modifies a selection to invert the selection state of parts identified - by another selection. - @param selection1 The first mesh selection object, which is modified. - @param selection2 The second mesh selection object, which identifies the - parts to toggle. - */ - AIAPI AIErr (*Invert) (AIMeshSelection selection1, AIMeshSelection selection2); - - /** Adds a patch to or removes it from a selection. - @param selection The mesh selection object. - @param patch The patch. - @param select True to add the patch to the selection, false to deselect it. - */ - AIAPI AIErr (*SelectPatch) (AIMeshSelection selection, AIMeshPatchIterator patch, AIBoolean select); - - /** Adds a vertex to or removes it from a selection. - @param selection The mesh selection object. - @param vertex The vertex. - @param select True to add the vertex to the selection, false to deselect it. - */ - AIAPI AIErr (*SelectVertex) (AIMeshSelection selection, AIMeshVertexIterator vertex, AIBoolean select); - - /** Adds a segment to or removes it from a selection. - @param selection The mesh selection object. - @param segment The segment. - @param select True to add the segment to the selection, false to deselect it. - */ - AIAPI AIErr (*SelectSegment) (AIMeshSelection selection, AIMeshSegmentIterator segment, AIBoolean select); - - /** Transforms the points of a mesh selection by a transformation matrix. - @param selection The mesh selection object. - @param matrix A pointer to the transformation matrix. - */ - AIAPI AIErr (*Transform) (AIMeshSelection selection, AIRealMatrix* matrix); - - /** Transforms the points of a mesh selection according to a developer-defined - mapping function. - @param selection The mesh selection object. - @param f The point-mapping function. - @param userData Developer-defined data to pass through to the function. - */ - AIAPI AIErr (*MapPoints) (AIMeshSelection selection, AIMeshPointMap f, void* userData); - - /** Transforms the colors of a gradient mesh selection according to a developer-defined - mapping function. - @param selection The mesh selection object. - @param f The color-mapping function. - @param userData Developer-defined data to pass through to the function. - */ - AIAPI AIErr (*MapColors) (AIMeshSelection selection, AIMeshColorMap f, void* userData); - - /** Passes the colors of a gradient mesh selection to a developer-defined - query function. Does not modify the mesh colors. - (Note that this function does not return an error code.) - @param selection The mesh selection object. - @param f The color-querying function. - @param userData Developer-defined data to pass through to the function. - */ - AIAPI void (*QueryColors) (AIMeshSelection selection, AIMeshColorQuery f, void* userData); - - /** Computes the bounds of the selected pieces of a mesh. - (Note that this function does not return an error code.) - @param selection The mesh selection object. - @param matrix A pointer to a transformation matrix to apply to the selection - before calculating its bounds. If this argument is \c NULL the - identity matrix will be used. - @param variant How the bounds are computed, a - \c #AIMeshSelectionBoundsVariant value. - @param bounds [out] A buffer in which to return the bounding box. - */ - AIAPI void (*BoundPieces) (AIMeshSelection selection, AIRealMatrix* matrix, ai::int32 variant, AIRealRect* bounds); - -} AIMeshSelectionSuite; - - -/** @ingroup Suites - This suite provides functions that allow you to traverse and manipulate - the patches in a mesh through a reference-counted iterator object. - - See @ref meshIterators. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMeshPatchIteratorSuite and \c #kAIMeshPatchIteratorVersion. -*/ -typedef struct { - - /** Increments the reference count of a patch iterator object. - The initial reference count is 1, so you do not typically - need to call this function. - (Note that this function returns a numeric value, not an error code.) - @param patch The iterator object. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) (AIMeshPatchIterator patch); - - /** Decrements the reference count of a patch iterator object, - and frees the associated memory when the count reaches 0. - (Note that this function returns an numeric value, not an error code.) - @param patch The iterator object. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) (AIMeshPatchIterator patch); - - /** Copies the contents of a patch iterator into another, existing iterator object. - @param patch The destination iterator object. - @param from The source iterator object. - */ - AIAPI AIErr (*Copy) (AIMeshPatchIterator patch, AIMeshPatchIterator from); - - /** Duplicates a patch iterator, creating a new iterator object. - @param patch The source iterator object. - @param clone [out] A buffer in which to return the new iterator object. - */ - AIAPI AIErr (*Clone) (AIMeshPatchIterator patch, AIMeshPatchIterator* clone); - - /** Reports whether two patch iterator objects reference the same patch. - (Note that this function returns a boolean value, not an error code.) - @param patch1 The first iterator object. - @param patch2 The second iterator object. - @return True if the iterators are equal. - */ - AIAPI AIBoolean (*IsEqual) (AIMeshPatchIterator patch1, AIMeshPatchIterator patch2); - - /** Reports whether a patch iterator has reached the last patch. - When this function returns true, the iterator no longer contains - a valid patch, and can no longer be used with the iteration - functions. Check this before calling \c #Next(), \c #Prev(), or - related functions if there is a chance of walking off the end of the mesh. - (Note that this function returns a boolean value, not an error code.) - @param patch The iterator object. - @return True when the iterator is past the last patch. - */ - AIAPI AIBoolean (*AtEnd) (AIMeshPatchIterator patch); - - /** Advances a patch iterator, so that it contains the next patch in - the mesh. Use with an iterator obtained from - \c #AIMeshSuite::GetStartPatch(). - Repeated calls guarantee that every element is visited - once and only once. The order of traversal is undefined. - (Note that this function does not return an error code.) - @param patch The iterator object. - @see \c #Prev(), \c #AtEnd() - */ - AIAPI void (*Next) (AIMeshPatchIterator patch); - - /** Backs up a patch iterator, so that it contains the previous patch in - the mesh. - (Note that this function does not return an error code.) - @param patch The iterator object. - @see \c #Next(), \c #AtEnd() - */ - AIAPI void (*Prev) (AIMeshPatchIterator patch); - - /** Advances a patch iterator, so that it contains the next patch in - the mesh, increasing along the I axis. - (Note that this function does not return an error code.) - @param patch The iterator object. - @see \c #PrevI(), \c #AtEnd() - */ - AIAPI void (*NextI) (AIMeshPatchIterator patch); - - /** Backs up a patch iterator, so that it contains the previous patch in - the mesh, decreasing along the I axis. - (Note that this function does not return an error code.) - @param patch The iterator object. - @see \c #NextI(), \c #AtEnd() - */ - AIAPI void (*PrevI) (AIMeshPatchIterator patch); - - /** Advances a patch iterator, so that it contains the next patch in - the mesh, increasing along the J axis. - (Note that this function does not return an error code.) - @param patch The iterator object. - @see \c #PrevJ(), \c #AtEnd() - */ - AIAPI void (*NextJ) (AIMeshPatchIterator patch); - - /** Backs up a patch iterator, so that it contains the previous patch in - the mesh, decreasing along the J axis. - (Note that this function does not return an error code.) - @param patch The iterator object. - @see \c #NextJ(), \c #AtEnd() - */ - AIAPI void (*PrevJ) (AIMeshPatchIterator patch); - - /** Retrieves the number of nodes in a patch. - (Note that this function returns a numeric value, not an error code.) - @param patch The iterator object. - @return The number of nodes (currently always 4). - */ - AIAPI ai::int32 (*CountNodes) (AIMeshPatchIterator patch); - - /** Creates a vertex iterator for a node of a patch, identified by index - position. Nodes are numbered from 0 to 3, counter-clockwise from - the bottom left of the patch. - @param patch The patch iterator object. - @param n The 0-based index of the node. - @param vertex [out] A buffer in which to return the new vertex iterator. - */ - AIAPI AIErr (*GetNodeN) (AIMeshPatchIterator patch, ai::int32 n, AIMeshVertexIterator* vertex); - - /** Creates a vertex iterator for a node of a patch, identified by an (I,J) offset - relative to the bottom left node of the patch. - @param patch The patch iterator object. - @param i The I-axis offset of the node. - @param J The J-axis offset of the node. - @param vertex [out] A buffer in which to return the new vertex iterator. - */ - AIAPI AIErr (*GetNodeIJ) (AIMeshPatchIterator patch, ai::int32 i, ai::int32 j, AIMeshVertexIterator* vertex); - - /** Creates a segment iterator for one of the two segments adjacent to a patch and - connected to a node specified by position index. The nodes are numbered from - 0 to 3 counter-clockwise from the bottom left of the patch. - @param patch The patch iterator object. - @param n The 0-based index of the node. - @param direction Whether to make a clockwise or counter-clockwise - turn at patch corners, an \c #AIMeshPatchDirection value. - (This indicates which segment to get.) - @param vertex [out] A buffer in which to return the new segment iterator. - */ - AIAPI AIErr (*GetSegmentN) (AIMeshPatchIterator patch, ai::int32 n, ai::int32 direction, AIMeshSegmentIterator* segment); - - /** Creates a segment iterator for one of the two segments adjacent to a patch and - connected to a node specified by an (I,J) offset relative to the bottom left - node of the patch. - @param patch The patch iterator object. - @param i The I-axis offset of the node. - @param J The J-axis offset of the node. - @param direction Whether to make a clockwise or counter-clockwise - turn at patch corners, an \c #AIMeshPatchDirection value. - (This indicates which segment to get.) - @param segment [out] A buffer in which to return the new segment iterator. - */ - AIAPI AIErr (*GetSegmentIJ) (AIMeshPatchIterator patch, ai::int32 i, ai::int32 j, ai::int32 direction, AIMeshSegmentIterator* segment); - - /** Reports the number of vertices around a patch, including nodes. - Use with \c #GetVertexM() and \c #GetSegmentM() to iterate through - vertices and segments. - (Note that this function returns a numeric value, not an error code.) - @param patch The patch iterator object. - @return The number of vertices. - */ - AIAPI ai::int32 (*CountVerticies) (AIMeshPatchIterator patch); - - /** Creates a vertex iterator for a vertex identified by index - position in a patch. - @param patch The patch iterator object. - @param m The 0-based index of the vertex. Use \c #CountVerticies() - to find the number of vertices in the patch. - @param vertex [out] A buffer in which to return the new vertex iterator. - */ - AIAPI AIErr (*GetVertexM) (AIMeshPatchIterator patch, ai::int32 m, AIMeshVertexIterator* vertex); - - /** Creates a segment iterator for one of the two segments adjacent to a patch and - connected to a vertex specified by position index. - @param patch The patch iterator object. - @param m The 0-based index of the vertex. Use \c #CountVerticies() - to find the number of vertices in the patch. - @param direction Whether to make a clockwise or counter-clockwise - turn at patch corners, an \c #AIMeshPatchDirection value. - (This indicates which segment to get.) - @param segment [out] A buffer in which to return the new segment iterator. - */ - AIAPI AIErr (*GetSegmentM) (AIMeshPatchIterator patch, ai::int32 m, ai::int32 direction, AIMeshSegmentIterator* segment); - - /** Reports the ordinal position of a vertex around a patch. - @param patch The patch iterator object. - @param vertex The vertex iterator object. - @param m [out] A buffer in which to return the vertex position. - */ - AIAPI AIErr (*FindVertex) (AIMeshPatchIterator patch, AIMeshVertexIterator vertex, ai::int32* m); - - /** Retrives the (i,j) coordinate of a patch within the mesh. - @param patch The patch iterator object. - @param i [out] A buffer in which to return the I-axis coordinate. - @param j [out] A buffer in which to return the J-axis coordinate. - */ - AIAPI void (*GetIJ) (AIMeshPatchIterator patch, ai::int32* i, ai::int32* j); - -} AIMeshPatchIteratorSuite; - - -/** @ingroup Suites - This suite provides functions that allow you to traverse and manipulate - the vertices in a mesh through a reference-counted iterator object. - The segments and tangents associated with a vertex are addressed by a - 0-based index. - - See @ref meshIterators. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMeshVertexIteratorSuite and \c #kAIMeshVertexIteratorVersion. - */ -typedef struct { - /** Increments the reference count of a vertex iterator object. - The initial reference count is 1, so you do not typically - need to call this function. - (Note that this function returns a numeric value, not an error code.) - @param vertex The vertex iterator object. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) (AIMeshVertexIterator vertex); - - /** Decrements the reference count of a vertex iterator object, - and frees the associated memory when the count reaches 0. - (Note that this function returns an numeric value, not an error code.) - @param vertex The vertex iterator object. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) (AIMeshVertexIterator vertex); - - /** Copies the contents of a vertex iterator into another, existing iterator object. - @param vertex The destination iterator object. - @param from The source iterator object. - */ - AIAPI AIErr (*Copy) (AIMeshVertexIterator vertex, AIMeshVertexIterator from); - - /** Duplicates a vertex iterator, creating a new iterator object. - @param vertex The source iterator object. - @param clone [out] A buffer in which to return the new iterator object. - */ - AIAPI AIErr (*Clone) (AIMeshVertexIterator vertex, AIMeshVertexIterator* clone); - - /** Reports whether two vertex iterator objects reference the same vertex. - (Note that this function returns a boolean value, not an error code.) - @param vertex1 The first iterator object. - @param vertex2 The second iterator object. - @return True if the iterators are equal. - */ - AIAPI AIBoolean (*IsEqual) (AIMeshVertexIterator vertex1, AIMeshVertexIterator vertex2); - - /** Reports whether a vertex iterator has reached the last vertex. - When this function returns true, the iterator no longer contains - a valid vertex, and can no longer be used with the iteration - functions. Check this before calling \c #Next(), \c #Prev(), or - related functions if there is a chance of walking off the end of the mesh. - (Note that this function returns a boolean value, not an error code.) - @param vertex The vertex iterator object. - @return True when the iterator is past the last vertex. - */ - AIAPI AIBoolean (*AtEnd) (AIMeshVertexIterator vertex); - - /** Advances a vertex iterator, so that it contains the next - vertex in the mesh. Use with an iterator obtained from - \c #AIMeshSuite::GetStartVertex(). - Repeated calls guarantee that every element is visited - once and only once. The order of traversal is undefined. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @see \c #Prev(), \c #AtEnd() - */ - AIAPI void (*Next) (AIMeshVertexIterator vertex); - - /** Backs up a vertex iterator, so that it contains the previous - vertex in the mesh. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @see \c #Next(), \c #AtEnd() - */ - AIAPI void (*Prev) (AIMeshVertexIterator vertex); - - /** Advances a vertex iterator, so that it contains the next vertex in - the mesh, increasing along the I axis. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @see \c #PrevI(), \c #AtEnd() - */ - AIAPI void (*NextI) (AIMeshVertexIterator vertex); - - /** Backs up a vertex iterator, so that it contains the previous vertex in - the mesh, decreasing along the I axis. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @see \c #NextI(), \c #AtEnd() - */ - AIAPI void (*PrevI) (AIMeshVertexIterator vertex); - - /** Advances a vertex iterator, so that it contains the next vertex in - the mesh, increasing along the J axis. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @see \c #PrevJ(), \c #AtEnd() - */ - AIAPI void (*NextJ) (AIMeshVertexIterator vertex); - - /** Backs up a vertex iterator, so that it contains the previous vertex in - the mesh, decreasing along the J axis. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @see \c #NextJ(), \c #AtEnd() - */ - AIAPI void (*PrevJ) (AIMeshVertexIterator vertex); - - /** Reports the number of segments connected to a vertex. - (Note that this function returns a numeric value, not an error code.) - @param vertex The vertex iterator object. - @return The number of connected segments. - */ - AIAPI ai::int32 (*CountSegments) (AIMeshVertexIterator vertex); - - /** Reports whether a vertex iterator identifies a node. - (Note that this function returns a boolean value, not an error code.) - @param vertex The vertex iterator object. - @return True if the current vertex is a node. - */ - AIAPI AIBoolean (*IsNode) (AIMeshVertexIterator vertex); - - /** Retrieves the index position of a segment in a given - direction from a connected vertex along a given axis. - (Note that this function returns a numeric value, not an error code.) - @param vertex The vertex iterator object. - @param axis The axis, an \c #AIMeshAxis value. - @param sense The direction, an \c #AIMeshAxisSense value. - @return The index position of the segment. - */ - AIAPI ai::int32 (*GetSegmentIndex) (AIMeshVertexIterator vertex, ai::int32 axis, ai::int32 sense); - - /** Retrieves the index position of the segment that is opposite a segment - identified by index position around a connected vertex. - (Note that this function returns a numeric value, not an error code.) - @param vertex The vertex iterator object. - @param i The index position of a segment connected to the vertex. - @return The index of the opposite segment, or -1 if there is no opposite segment. - */ - AIAPI ai::int32 (*GetSegmentOpposite) (AIMeshVertexIterator vertex, ai::int32 i); - - /** Sets the color of a node. - @param vertex The vertex iterator object, for which the current vertex is a node. - @param c A pointer to the new color. - */ - AIAPI AIErr (*SetColor) (AIMeshVertexIterator vertex, AIColor* c); - - /** Retrieves the color of a node. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object, for which the current vertex is a node. - @param c [out] A buffer in which to return the color. - */ - AIAPI void (*GetColor) (AIMeshVertexIterator vertex, AIColor* c); - - /** Sets the position of the ends of all segments attached to a vertex. - @param vertex The vertex iterator object. - @param point A pointer to the new endpoint. - */ - AIAPI AIErr (*SetPoint) (AIMeshVertexIterator vertex, AIRealPoint* point); - - /** Retrieves the position of the ends of all segments attached to a vertex. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @param point [out] A buffer in which to return the endpoint. - */ - AIAPI void (*GetPoint) (AIMeshVertexIterator vertex, AIRealPoint* point); - - /** Retrieves the (U,V) coordinates of a vertex. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @param u [out] A buffer in which to return the U coordinate. - @param v [out] A buffer in which to return the V coordinate. - */ - AIAPI void (*GetUV) (AIMeshVertexIterator vertex, AIReal* u, AIReal* v); - - /** Sets the second point of the bezier control polygon of a segment identified - by index position around a connected vertex. - @param vertex The vertex iterator object. - @param i The 0-based index of the segment. - @param point A pointer to the new tangent point. - */ - AIAPI AIErr (*SetTangent) (AIMeshVertexIterator vertex, ai::int32 i, AIRealPoint* point); - - /** Retrieves the second point of the bezier control polygon of a segment identified - by index position around a connected vertex. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object. - @param i The 0-based index of the segment. - @param point [out] A buffer in which to return the tangent point. - */ - AIAPI void (*GetTangent) (AIMeshVertexIterator vertex, ai::int32 i, AIRealPoint* point); - - /** Sets the smoothing state of a segment identified - by index position around a connected vertex. When smoothing is on, - adjusting the tangent similarly adjusts that of the opposite segment. - @param vertex The vertex iterator object. - @param i The 0-based index of the segment. - @param smooth True to turn smoothing on, false to turn it off. - */ - AIAPI AIErr (*SetSmooth) (AIMeshVertexIterator vertex, ai::int32 i, AIBoolean smooth); - - /** Retrieves the smoothing state of a segment identified - by index position around a connected vertex. When smoothing is on, - adjusting the tangent similarly adjusts that of the opposite segment. - (Note that this function returns a boolean value, not an error code.) - @param vertex The vertex iterator object. - @param i The 0-based index of the segment. - @return True if smoothing is on, false if it is off. - */ - AIAPI AIBoolean (*GetSmooth) (AIMeshVertexIterator vertex, ai::int32 i); - - /** Creates an iterator for a segment identified - by index position around a connected vertex. - @param vertex The vertex iterator object. - @param i The 0-based index of the segment. - @param segment [out] A buffer in which to return the segment iterator. - */ - AIAPI AIErr (*GetSegment) (AIMeshVertexIterator vertex, ai::int32 i, AIMeshSegmentIterator* segment); - - /** Creates an iterator for one of the patches adjacent to a segment identified - by index position around a connected vertex. - @param vertex The vertex iterator object. - @param i The 0-based index of the segment. - @param patch [out] A buffer in which to return the patch iterator. - */ - AIAPI AIErr (*GetPatch) (AIMeshVertexIterator vertex, ai::int32 i, AIMeshPatchIterator* patch); - - /** Reports whether a vertex is on the edge of the mesh. - (Note that this function returns a boolean value, not an error code.) - @param vertex The vertex iterator object. - @return True if the vertex is on the edge. - */ - AIAPI AIBoolean (*IsOnBoundary) (AIMeshVertexIterator vertex); - - /** Sets the opacity of a node. - @param vertex The vertex iterator object, for which the current vertex is a node. - @param o The opacity value (between 0.0 and 1.0). - */ - AIAPI AIErr (*SetOpacity) (AIMeshVertexIterator vertex, AIReal o); - - /** Retrieves the opacity of a node. - (Note that this function does not return an error code.) - @param vertex The vertex iterator object, for which the current vertex is a node. - @param o [out] A buffer in which to return the opacity. - */ - AIAPI void (*GetOpacity) (AIMeshVertexIterator vertex, AIReal* o); - -} AIMeshVertexIteratorSuite; - - -/** @ingroup Suites - This suite provides functions that allow you to traverse and - manipulate the segments in a mesh through a reference-counted - iterator object. - - See @ref meshIterators. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMeshSegmentIteratorSuite and \c #kAIMeshSegmentIteratorVersion. - */ -typedef struct { - - /** Increments the reference count of a segment iterator object. - The initial reference count is 1, so you do not typically - need to call this function. - (Note that this function returns a numeric value, not an error code.) - @param segment The iterator object. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) (AIMeshSegmentIterator segment); - - /** Decrements the reference count of a segment iterator object, - and frees the associated memory when the count reaches 0. - (Note that this function returns an numeric value, not an error code.) - @param segment The iterator object. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) (AIMeshSegmentIterator segment); - - /** Copies the contents of a segment iterator into another, existing iterator object. - @param segment The destination iterator object. - @param from The source iterator object. - */ - AIAPI AIErr (*Copy) (AIMeshSegmentIterator segment, AIMeshSegmentIterator from); - - /** Duplicates a segment iterator, creating a new iterator object. - @param segment The source iterator object. - @param clone [out] A buffer in which to return the new iterator object. - */ - AIAPI AIErr (*Clone) (AIMeshSegmentIterator segment, AIMeshSegmentIterator* clone); - - /** Reports whether two segment iterator objects reference the same segment - and have the same direction. - (Note that this function returns a boolean value, not an error code.) - @param segment1 The first iterator object. - @param segment2 The second iterator object. - @return True if the iterators are equal. - */ - AIAPI AIBoolean (*IsEqual) (AIMeshSegmentIterator segment1, AIMeshSegmentIterator segment2); - - /** Reports whether a segment iterator has reached the last segment. - When this function returns true, the iterator no longer contains - a valid segment, and can no longer be used with the iteration - functions. Check this before calling \c #Next(), \c #Prev(), or - related functions if there is a chance of walking off the end of the mesh. - (Note that this function returns a boolean value, not an error code.) - @param segment The segment iterator object. - @return True when the iterator is past the last segment. - */ - AIAPI AIBoolean (*AtEnd) (AIMeshSegmentIterator segment); - - /** Advances a segment iterator, so that it contains the next - segment in the mesh. Use with an iterator obtained from - \c #AIMeshSuite::GetStartSegment(). - Repeated calls guarantee that every element is visited - once and only once. The order of traversal is undefined. - (Note that this function does not return an error code.) - @param segment The segment iterator object. - @see \c #Prev(), \c #AtEnd() - */ - AIAPI void (*Next) (AIMeshSegmentIterator segment); - - /** Backs up a segment iterator, so that it contains the previous - segment in the mesh. - (Note that this function does not return an error code.) - @param segment The segment iterator object. - @see \c #Next(), \c #AtEnd() - */ - AIAPI void (*Prev) (AIMeshSegmentIterator segment); - - /** Advances a segment iterator, so that it contains the next segment in - the mesh, increasing along the current axis in the direction of - this iterator. - (Note that this function does not return an error code.) - @param segment The segment iterator object. - @see \c #PrevOnAxis(), \c #AtEnd() - */ - AIAPI void (*NextOnAxis) (AIMeshSegmentIterator segment); - - /** Backs up a segment iterator, so that it contains the previous segment in - the mesh, decreasing along the current axis in the direction of - this iterator. - (Note that this function does not return an error code.) - @param segment The segment iterator object. - @see \c #NextOnAxis(), \c #AtEnd() - */ - AIAPI void (*PrevOnAxis) (AIMeshSegmentIterator segment); - - /** Advances a segment iterator, so that it contains the next segment - around the current patch. - @param segment The segment iterator object. - @param direction Whether to make a clockwise or counter-clockwise - turn at patch corners, an \c #AIMeshPatchDirection value. - (This indicates which patch to follow.) - @see \c #PrevOnPatch(), \c #AtEnd() - */ - AIAPI void (*NextOnPatch) (AIMeshSegmentIterator segment, ai::int32 direction); - - /** Backs up a segment iterator, so that it contains the previous segment - around the current patch. - @param segment The segment iterator object. - @param direction Whether to make a clockwise or counter-clockwise - turn at patch corners, an \c #AIMeshPatchDirection value. - (This indicates which patch to follow.) - @see \c #PrevOnPatch(), \c #AtEnd() - */ - AIAPI void (*PrevOnPatch) (AIMeshSegmentIterator segment, ai::int32 direction); - - /** Switches the start and end vertices of a segment. - (Note that this function does not return an error code.) - @param segment The segment iterator object. - */ - AIAPI void (*Reverse) (AIMeshSegmentIterator segment); - - /** Reports the number of knots forming a segment, excluding the - start and end knots. - (Note that this function returns a numeric value, not an error code.) - @param segment The segment iterator object. - @return The number of knots. - */ - AIAPI ai::int32 (*CountKnots) (AIMeshSegmentIterator segment); - - /** Retrieves the (U,V) coordinates of a knot identified by position - index in a segment. - (Note that this function does not return an error code.) - @param segment The segment iterator object. - @param n The 0-based index of the knot. Index positions exclude the start - and end knots. - @param u [out] A buffer in which to return the U coordinate. - @param v [out] A buffer in which to return the V coordinate. - */ - AIAPI void (*GetKnotUV) (AIMeshSegmentIterator segment, ai::int32 n, AIReal* u, AIReal* v); - - /** Adds one or more knots to a segment. - @param segment The segment iterator object. - @param m The 0-based index at which to add the knot or knots. - Index positions exclude the start and end knots. - @param n The number of knots to add. - */ - AIAPI AIErr (*InsertKnots) (AIMeshSegmentIterator segment, ai::int32 m, ai::int32 n); - - /** Removes one or more knots from a segment. - @param segment The segment iterator object. - @param m The 0-based index at which to remove the knot or knots. - Index positions exclude the start and end knots. - @param n The number of knots to remove. - */ - AIAPI AIErr (*DeleteKnots) (AIMeshSegmentIterator segment, ai::int32 m, ai::int32 n); - - /** Reports the number of points in the control polygon of the beziers - describing a segment. - (Note that this function returns a numeric value, not an error code.) - @param segment The segment iterator object. - @return The number of points. - */ - AIAPI ai::int32 (*CountPoints) (AIMeshSegmentIterator segment); - - /** Sets the position of the point of a bezier control polygon that describes a segment. - @param segment The segment iterator object. - @param i The 0-based index of the point. See \c #CountPoints(). - @param point A pointer to the new point value. - */ - AIAPI AIErr (*SetPoint) (AIMeshSegmentIterator segment, ai::int32 i, AIRealPoint* point); - - /** Retrieves the point of a bezier control polygon that describes a segment. - (Note that this function does not return an error code.) - @param segment The segment iterator object. - @param i The 0-based index of the point. See \c #CountPoints(). - @param point [out] A buffer in which to return the point. - */ - AIAPI void (*GetPoint) (AIMeshSegmentIterator segment, ai::int32 i, AIRealPoint* point); - - /** Creates a vertex iterator for the starting vertex of a segment. - @param segment The segment iterator object. - @param vertex [out] A buffer in which to return the vertex iterator. - */ - AIAPI AIErr (*GetStart) (AIMeshSegmentIterator segment, AIMeshVertexIterator* vertex); - - /** Creates a vertex iterator for the ending vertex of a segment. - @param segment The segment iterator object. - @param vertex [out] A buffer in which to return the vertex iterator. - */ - AIAPI AIErr (*GetEnd) (AIMeshSegmentIterator segment, AIMeshVertexIterator* vertex); - - /** Breaks a segment into two segments at a given knot, so that the knot - becomes a vertex. - @param segment The segment iterator object. Upon return, this contains - the initial segment of the two new segments. - @param n The 0-based index of the knot. - */ - AIAPI AIErr (*Split) (AIMeshSegmentIterator segment, ai::int32 n); - - /** Joins a segment with the next segment. - @param segment The segment iterator object. Upon return, this contains - the joined segment. - @param n [out] A buffer in which to return the 0-based index of - the knot at the join. - */ - AIAPI AIErr (*Join) (AIMeshSegmentIterator segment, ai::int32* n); - - /** Reports the location of the control handle at the segment start. - which is used to manipulate its overall shape. - (Note that this function does not return an error code.) - @param segment The segment iterator object. - @param control [out] A buffer in which to return the control-handle point. - */ - AIAPI void (*GetControl) (AIMeshSegmentIterator segment, AIRealPoint* control); - - /** Modifies the control polygon to reshape a segment. - @param segment The segment iterator object. - @param point The new position for the start of the segment. - @param control The control handle of the segment. See \c #GetControl(). - */ - AIAPI AIErr (*Reshape) (AIMeshSegmentIterator segment, AIRealPoint* point, AIRealPoint* control); - - /** Reports whether a segment is on the edge of the mesh. - (Note that this function returns a boolean value, not an error code.) - @param segment The segment iterator object. - @return True when the segment is on the edge. - */ - AIAPI AIBoolean (*IsOnBoundary) (AIMeshSegmentIterator segment); - -} AIMeshSegmentIteratorSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIMesh__ +#define __AIMesh__ + +/* + * Name: AIMesh.h + * $Revision: 27 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Mesh Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIHitTest__ +#include "AIHitTest.h" +#endif + +#ifndef __AIRealBezier__ +#include "AIRealBezier.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIMesh.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIMeshSuite "AI Mesh Suite" +#define kAIMeshSuiteVersion6 AIAPI_VERSION(6) +#define kAIMeshSuiteVersion kAIMeshSuiteVersion6 +#define kAIMeshVersion kAIMeshSuiteVersion + +#define kAIMeshHitSuite "AI Mesh Hit Suite" +#define kAIMeshHitSuiteVersion3 AIAPI_VERSION(3) +#define kAIMeshHitSuiteVersion kAIMeshHitSuiteVersion3 +#define kAIMeshHitVersion kAIMeshHitSuiteVersion + +#define kAIMeshSelectionSuite "AI Mesh Selection Suite" +#define kAIMeshSelectionSuiteVersion3 AIAPI_VERSION(3) +#define kAIMeshSelectionSuiteVersion kAIMeshSelectionSuiteVersion3 +#define kAIMeshSelectionVersion kAIMeshSelectionSuiteVersion + +#define kAIMeshPatchIteratorSuite "AI Mesh Patch Suite" +#define kAIMeshPatchIteratorSuiteVersion3 AIAPI_VERSION(3) +#define kAIMeshPatchIteratorSuiteVersion kAIMeshPatchIteratorSuiteVersion3 +#define kAIMeshPatchIteratorVersion kAIMeshPatchIteratorSuiteVersion + +#define kAIMeshVertexIteratorSuite "AI Mesh Vertex Suite" +#define kAIMeshVertexIteratorSuiteVersion4 AIAPI_VERSION(4) +#define kAIMeshVertexIteratorSuiteVersion kAIMeshVertexIteratorSuiteVersion4 +#define kAIMeshVertexIteratorVersion kAIMeshVertexIteratorSuiteVersion + +#define kAIMeshSegmentIteratorSuite "AI Mesh Segment Suite" +#define kAIMeshSegmentIteratorSuiteVersion3 AIAPI_VERSION(3) +#define kAIMeshSegmentIteratorSuiteVersion kAIMeshSegmentIteratorSuiteVersion3 +#define kAIMeshSegmentIteratorVersion kAIMeshSegmentIteratorSuiteVersion + + +/** Kinds of gradient mesh */ +enum AIMeshKind { + /** Cartesian mesh */ + kAICartesianMesh = 0, + /** Not implemented */ + kAIPolarMesh = 1 +}; + +/** Node axes */ +enum AIMeshAxis { + /** The I axis, containing integer values of nodes in a mesh. */ + kAIMeshIAxis = 0, + /** The J axis, containing integer values of nodes in a mesh. */ + kAIMeshJAxis = 1 +}; + +/** Directions along axes */ +enum AIMeshAxisSense { + kAIMeshAxisIncreasing = 0, + kAIMeshAxisDecreasing = 1 +}; + +/** Directions around patches */ +enum AIMeshPatchDirection { + kAIMeshClockwise = 0, + kAIMeshCounterClockwise = 1 +}; + +/** Parts of a mesh that can be hit */ +enum AIMeshPart { + kAIMeshNowhere = 0, + kAIMeshVertex = 1, + kAIMeshTangent = 2, + kAIMeshEdge = 3, + kAIMeshPatch = 4 +}; + +/** Variants for selection bounds */ +enum AIMeshSelectionBoundsVariant { + /** Computes a bounding box of the parts of the mesh that transform rigidly when + a selection is transformed. Excludes from the bounds those segments that are + attached to a pair of vertices where one transforms and the other + remains fixed. */ + kAIMeshSelectionRigidBounds = 0 +}; + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a mesh selection. See \c #AIMeshSelectionSuite */ +typedef struct _AIMeshSelection *AIMeshSelection; +/** Opaque reference to a mesh patch iterator. See \c #AIMeshPatchIteratorSuite */ +typedef struct _AIMeshPatchIterator *AIMeshPatchIterator; +/** Opaque reference to a mesh vertex iterator. See \c #AIMeshVertexIteratorSuite */ +typedef struct _AIMeshVertexIterator *AIMeshVertexIterator; +/** Opaque reference to a mesh segment iterator. See \c #AIMeshSegmentIteratorSuite */ +typedef struct _AIMeshSegmentIterator *AIMeshSegmentIterator; + + +/** Transformation function prototype for \c #AIMeshSuite::MapPoints() + and \c #AIMeshSelectionSuite::MapPoints() + The function is assumed to have a continuous first derivative. + @param point The point to be transformed. + @param userData Developer-defined data passed through from the calling function. + */ +typedef void (*AIMeshPointMap) (AIRealPoint* point, void* userData); +/** Transformation function prototype for \c #AIMeshSuite::MapColors() + and \c #AIMeshSelectionSuite::MapColors(). + @param color The color to be transformed. + @param userData Developer-defined data passed through from the calling function. + */ +typedef void (*AIMeshColorMap) (AIColor* color, void* userData); + +/** Color-query function prototype for \c #AIMeshSuite::QueryColors() + and \c #AIMeshSelectionSuite::QueryColors(). + @param color The color to be queried. + @param userData Developer-defined data passed through from the calling function. + */ +typedef void (*AIMeshColorQuery) (AIColor* color, void* userData); + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite and related suites provides functions for creating and + managing \e mesh objects, which are art object of type \c #kMeshArt. + A mesh object represents a grid that can be used to apply colors to art, + or to deform art in an \e envelope; see the \c #AIEnvelopeSuite. + + This suite provides functions for manipulating a mesh as a whole. + + \li Additional suites allow you to traverse and manipulate + the elements of a mesh (patches, vertices and segments). + See @ref meshIterators. + \li Different sets of elements in a mesh can be selected. The selection + is represented by a mesh selection object. The \c #AIMeshSelectionSuite + allows you to manipulate selections for a mesh. + \li The \c #AIMeshHitSuite provides functions that operate on the results + of hit testing for meshes (see \c #AIHitTestSuite). + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMeshSuite and \c #kAIMeshVersion. + + @section meshTerms Mesh Terminology + + A mesh can be considered an array of patches, where each patch has + four sides which it shares with its neighbors. The corners of + a patch are nodes to which color is applied. The colors of the + corners then blend across the interior of the patch. + + The patches are defined by cubic bezier curves, joined together + to form the mesh. The point at which two or more beziers meet is + called a \e knot. To reduce the visual complexity, only a subset + of the knots are visible when a mesh is displayed. A visible knot + is called a \e vertex. The sequence of beziers between two + vertices is called a \e segment. + + Just as for the beziers describing a path, a user can adjust + the shape of the curve between two vertices. The points that + manipulate the shape are called \e controls. Unlike a path, + the curve might not be a single bezier, so the controls might + not be coincident with the points of the bezier control polygon. + + A coordinate system can be imposed on a mesh. For an M by N patch + mesh, the coordinates range from [0..M] and [0..N]. Integer values + of the coordinates refer to nodes. Non-integer values refer + to points in the interior or on the sides of patches. When using + strictly integer values, the axes are called the I and J axes. + When using real values, they are called the U and V axes. + + When traversing a mesh, a direction along the axes can be increasing + or decreasing; this kind of direction is called the \e sense. + A direction around a patch can be clockwise or + counterclockwise. The term \e direction is reserved for this usage. + + For example, for the node at (2,2): + + \li (3,1) is the next node increasing along the I axis. + \li (2,1) is the next node decreasing along the J axis. + \li (1,2) is the next node counterclockwise around patch (1,1). + \li (2,1) is the next node clockwise around patch (1,1). + + \section meshIterators Mesh Iterators + + Iterator objects allow you to traverse and manipulate the + elements of a mesh. There are different iterators for each of + the types of elements; patches, vertices and segments. There is + a suite of functions for each type of iterator, the \c #AIMeshPatchIteratorSuite, + the \c #AIMeshVertexIteratorSuite, and the \c #AIMeshSegmentIteratorSuite. + + Iterator objects are reference counted. The initial reference + count is one, and you do not typically need to increment it. + You must, however, use the appropriate \c Release() function + to decrement the count when you no longer need the object. + Failure to do so causes memory leaks. + + Each type of iterator has an \c AtEnd method, which + returns true when an iterator has walked off the mesh. + After the end, the iterator cannot be reversed; that is you can + no longer get the previous element. + + An iterator has a set of \c Next and \c Prev methods for + iteration. + + \li The simple \c Next and \c Prev methods are used with + iterators obtained from a \c GetStart method. Repeated + calls to \c Next guarantee that every element is visited + once and only once. The order of traversal is undefined. + \li The methods \c NextI, \c PrevI, \c NextJ, \c PrevJ are for + traversing the elements along a given axis. + \li A segment iterator has an axis and direction, determined by + the start vertex and end vertex. The \c NextOnPatch and + \c PrevOnPatch methods for segment iterators + differ from \c NextOnAxis and \c PrevOnAxis only when they + encounter a corner of a patch. In this case, they switch to a new + axis by making a half turn either clockwise or counter clockwise. +*/ +typedef struct { + + /** Sets the dimensions of a mesh object. + The geometric and color data is set to default values. + @param mesh The mesh object. + @param i The number of patches along the I axis. + @param j The number of patches along the J axis. + */ + AIAPI AIErr (*InitCartesian) (AIArtHandle mesh, ai::int32 i, ai::int32 j); + + /** Not implemented. */ + AIAPI AIErr (*InitPolar) (AIArtHandle mesh, ai::int32 i, ai::int32 j); + + /** Retrieves the type of the mesh. (Only cartesian meshes are implemented.) + @param mesh The mesh object. + @param kind [out] A buffer in which to return the type, a #AIMeshKind value. + */ + AIAPI AIErr (*GetKind) (AIArtHandle mesh, ai::int32 *kind); + + /** Retrieves the size of a mesh (number of patches). + @param mesh The mesh object. + @param i [out] A buffer in which to return the number of patches along the I axis. + @param j [out] A buffer in which to return the number of patches along the J axis. + */ + AIAPI AIErr (*GetSize) (AIArtHandle mesh, ai::int32 *i, ai::int32 *j); + + /** Creates a new selection object for a mesh. Use the \c #AIMeshSelectionSuite + to query and manipulate the selection. + @param mesh The mesh object. + @param all When true, include all vertices and segments of the mesh + in the selection. When false, create an empty selection. + @param selection [out] A buffer in which to return the selection. + @see \c #GetSelection() + */ + AIAPI AIErr (*NewSelection) (AIArtHandle mesh, AIBoolean all, AIMeshSelection* selection); + + /** Retrieves the visible selection for a mesh; see \c #AIMeshSelectionSuite. + Changing the returned selection changes what the user sees. + @param mesh The mesh object. + @param selection [out] A buffer in which to return the selection. + */ + AIAPI AIErr (*GetSelection) (AIArtHandle mesh, AIMeshSelection* selection); + + /** Creates a patch iterator a given patch in a mesh. + @param mesh The mesh object. + @param i The 0-based I-axis index of the patch. + @param j The 0-based J-axis index of the patch. + @param patch [out] A buffer in which to return the patch iterator. + */ + AIAPI AIErr (*GetPatch) (AIArtHandle mesh, ai::int32 i, ai::int32 j, AIMeshPatchIterator* patch); + + /** Creates a patch iterator for which calling \c #AIMeshPatchIteratorSuite::Next() + repeatedly is guaranteed to visit all patches. + @param mesh The mesh object. + @param patch [out] A buffer in which to return the patch iterator. + */ + AIAPI AIErr (*GetStartPatch) (AIArtHandle mesh, AIMeshPatchIterator* patch); + + /** Creates a vertex iterator for a given node in a mesh. + @param mesh The mesh object. + @param i The 0-based I-axis index of the node. + @param j The 0-based J-axis index of the node. + @param vertex [out] A buffer in which to return the vertex iterator. + */ + AIAPI AIErr (*GetNode) (AIArtHandle mesh, ai::int32 i, ai::int32 j, AIMeshVertexIterator* vertex); + + /** Creates a vertex iterator for which calling \c #AIMeshVertexIteratorSuite::Next() + repeatedly is guaranteed to visit all vertices. + @param mesh The mesh object. + @param vertex [out] A buffer in which to return the vertex iterator. + */ + AIAPI AIErr (*GetStartVertex) (AIArtHandle mesh, AIMeshVertexIterator* vertex); + + /** Creates a segment iterator for which calling \c #AIMeshSegmentIteratorSuite::Next() + repeatedly is guaranteed to visit all segments. + @param mesh The mesh object. + @param segment [out] A buffer in which to return the segment iterator. + */ + AIAPI AIErr (*GetStartSegment) (AIArtHandle mesh, AIMeshSegmentIterator* segment); + + /** Retrieves the color space used to render a mesh. + The colors of the nodes of the mesh can be drawn from different + color spaces, which are converted to a single color space for + rendering. + (Note that this function does not return an error code.) + @param mesh The mesh object. + @param kind [out] A buffer in which to return the color type. + @param custom [out] A buffer in which to return the custom color, + if \c kind is \c #kCustomColor. + */ + AIAPI void (*GetColorSpace) (AIArtHandle mesh, AIColorTag* kind, AICustomColorHandle* custom); + + /** Converts a point in artwork coordinates to the (u,v) coordinates of + that point within a mesh. + (Note that this function returns a boolean value, not an error code.) + @param mesh The mesh object. + @param point The pointer to the point in artwork coordinates. + @param u [out] A buffer in which to return the U coordinate of the converted point. + @param v [out] A buffer in which to return the V coordinate of the converted point. + @return True if the point lies inside the mesh (the \c u and \c v values are defined), + false if it lies outside the mesh (the \c u and \c v values are not defined). + + */ + AIAPI AIBoolean (*InvertPoint) (AIArtHandle mesh, AIRealPoint* point, AIReal* u, AIReal* v); + + /** Converts a point in the (u,v) coordinates of a mesh to artwork coordinates. + (Note that this function does not return an error code.) + @param mesh The mesh object. + @param u The U coordinate of the point. + @param v The V coordinate of the point. + @param point [out] A buffer in which to return the converted point in artwork coordinates. + */ + AIAPI void (*EvalPoint) (AIArtHandle mesh, AIReal u, AIReal v, AIRealPoint* point); + + /** Retrieves the color of a mesh at a given point. + (Note that this function does not return an error code.) + @param mesh The mesh object. + @param u The U coordinate of the point. + @param v The V coordinate of the point. + @param color [out] A buffer in which to return the color. + */ + AIAPI void (*EvalColor) (AIArtHandle mesh, AIReal u, AIReal v, AIColor* color); + + /** Retrieves the opacity of a mesh at a given point. + (Note that this function does not return an error code.) + @param mesh The mesh object. + @param u The U coordinate of the point. + @param v The V coordinate of the point. + @param opacity [out] A buffer in which to return the color. + */ + AIAPI void (*EvalOpacity) (AIArtHandle mesh, AIReal u, AIReal v, AIReal* opacity); + + /** Transforms the points of a mesh by a transformation matrix. + @param mesh The mesh object. + @param matrix A pointer to the transformation matrix. + */ + AIAPI AIErr (*Transform) (AIArtHandle mesh, AIRealMatrix* matrix); + + /** Transforms the points of a mesh according to a developer-defined + mapping function. + @param mesh The mesh object. + @param f The point-mapping function. + @param userData Developer-defined data to pass through to the function. + */ + AIAPI AIErr (*MapPoints) (AIArtHandle mesh, AIMeshPointMap f, void* userData); + + /** Transforms the colors of a gradient mesh according to a developer-defined + mapping function. + @param mesh The mesh object. + @param f The color-mapping function. + @param userData Developer-defined data to pass through to the function. + */ + AIAPI AIErr (*MapColors) (AIArtHandle mesh, AIMeshColorMap f, void* userData); + + /** Passes the colors of a gradient mesh to a developer-defined + query function. Does not modify the mesh colors. + (Note that this function does not return an error code.) + @param mesh The mesh object. + @param f The color-querying function. + @param userData Developer-defined data to pass through to the function. + */ + AIAPI void (*QueryColors) (AIArtHandle mesh, AIMeshColorQuery f, void* userData); + + /** Splits a mesh at a point on the U axis and reports the index of the + resulting grid line. + @param mesh The mesh object. + @param u The insertion point on the U axis. + @param i [out] A buffer in which to return the 0-based index of the new grid line. + */ + AIAPI AIErr (*InsertU) (AIArtHandle mesh, AIReal u, ai::int32* i); + + /** Splits a mesh at a point on the V axis and reports the index of the + resulting grid line. + @param mesh The mesh object. + @param v The insertion point on the V axis. + @param i [out] A buffer in which to return the 0-based index of the new grid line. + */ + AIAPI AIErr (*InsertV) (AIArtHandle mesh, AIReal v, ai::int32* j); + + /** Removes those lines of a mesh grid passing through a + (U,V) point. Drawn grid lines pass through integer values. + If both U and V are integers, removes both a + horizontal and a vertical grid line. If only one is an + integer, removes only one line. + @param mesh The mesh object. + @param u The U-axis coordinate. + @param v The V-axis coordinate. + */ + AIAPI AIErr (*DeleteGridLines) (AIArtHandle mesh, AIReal u, AIReal v); + + /** Starts tracking for mouse movement over a mesh. + (Note that this function does not return an error code.) + @note For a tool that manipulates the control points + of a mesh, call \c #TrackBegin() before moving the + control points (in response to mouse-down, for example) + and \c #TrackEnd() when done (in response to mouse-up). + This ensures that selection handles are redrawn + during the operation--otherwise the control points are + not visible as they are modified. + @param mesh The mesh object. + */ + AIAPI void (*TrackBegin) (AIArtHandle mesh); + + /** Stops tracking for mouse movement over a mesh. + (Note that this function does not return an error code.) + @param mesh The mesh object. + @see \c #TrackBegin() + */ + AIAPI void (*TrackEnd) (AIArtHandle mesh); + + /** Stops the recording of selection changes for a mesh in + the Undo history. Use after a change to selection, so that + subsequent changes to other properties can be undone without + undoing the selection. + @param mesh The mesh object. + @see \c #AIUndoSuite::UndoChanges() + */ + AIAPI AIErr (*EndSelectionChanges) (void); + + /** Drops a color onto an element of a mesh, as if a + user dragged the color from, for example, the Swatch + palette. + @param hit A hit object that identifies the part of + mesh. See \c #AIHitTestSuite. + @param color The color. + */ + AIAPI AIErr (*DropColor) (AIHitRef hit, const AIColor* color); + + /** Converts an I-axis integer coordinate in a mesh (in the range [0..numPatches]) + to the corresponding U-axis coordinate, in the range [0..1]. See @ref meshTerms. + @param mesh The mesh object. + @param i The I-axis coordinate. + @param u [out] A buffer in which to return the U-axis coordinate. + */ + AIAPI AIErr (*GetRelativeU) (AIArtHandle mesh, ai::int32 i, AIReal* u); + + /** Converts a J-axis integer coordinate in a mesh (in the range [0..numPatches]) + to the corresponding V-axis coordinate in the range [0..1]. See @ref meshTerms. + @param mesh The mesh object. + @param j The J-axis coordinate. + @param v [out] A buffer in which to return the V-axis coordinate. + */ + AIAPI AIErr (*GetRelativeV) (AIArtHandle mesh, ai::int32 j, AIReal* v); + + /** Retrieves the overprint fill attribute from a mesh object. + (Note that this function does not return an error code.) + @param mesh The mesh object. + @return True if overprint is on, false if it is off. + */ + AIAPI AIBoolean (*GetOverprint) (AIArtHandle mesh); + + /** Sets the overprint fill attribute for a mesh object. + @param mesh The mesh object. + @param overprint True to turn overprint on, false to turn it off. + */ + AIAPI AIErr (*SetOverprint) (AIArtHandle mesh, AIBoolean overprint); + +} AIMeshSuite; + + +/** @ingroup Suites + This suite provides functions that operate on hit objects obtained + by \c #AIHitTestSuite functions, when the result of the test is a + hit on a mesh object. + They allow you to identify the part of the mesh object that was hit, + and to change the selection or iterate through elements + of the mesh based on hit results. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMeshHitSuite and \c #kAIMeshHitVersion. + */ +typedef struct { + + /** Reports the element of a mesh that was hit. + (Note that this function returns a constant value, not an error code.) + @param hit The hit object. + @return The element that was hit, an #AIMeshPart value. + */ + AIAPI ai::int32 (*GetPart) (AIHitRef hit); + + /** Retrieves the (u,v) coordinates of a hit on a mesh object. + (Note that this function does not return an error code.) + @param hit The hit object. + @param u [out] A buffer in which to return the U-axis coordinate, + in the range [0..M], where M is the number of horizontal patches. + @param v [out] A buffer in which to return the V-axis coordinate, + in the range [0..N], where N is the number of vertical patches. + @see @ref meshTerms. + */ + AIAPI void (*GetUV) (AIHitRef hit, AIReal* u, AIReal* v); + + /** Constructs a new selection from a hit, which contains the element + that was hit. + @param hit The hit object. + @param selection [out] A buffer in which to return the new selection object. + */ + AIAPI AIErr (*GetSelection) (AIHitRef hit, AIMeshSelection* selection); + + /** If a vertex or tangent was hit, creates an iterator for the vertex. + @param hit The hit object. + @param vertex [out] A buffer in which to return the iterator. + */ + AIAPI AIErr (*GetVertex) (AIHitRef hit, AIMeshVertexIterator* vertex); + + /** If a tangent was hit, retrieves the tangent index. + @param hit The hit object. + @param index [out] A buffer in which to return the 0-based index. + */ + AIAPI AIErr (*GetTangentIndex) (AIHitRef hit, ai::int32* index); + + /** If a segment was hit, creates an iterator for the segment. + @param hit The hit object. + @param segment [out] A buffer in which to return the iterator. + */ + AIAPI AIErr (*GetSegment) (AIHitRef hit, AIMeshSegmentIterator* segment); + + /** If a patch was hit, creates an iterator for the patch. + @param hit The hit object. + @param patch [out] A buffer in which to return the iterator. + */ + AIAPI AIErr (*GetPatch) (AIHitRef hit, AIMeshPatchIterator* patch); + +} AIMeshHitSuite; + + +/** @ingroup Suites + This suite provides functions that allow you to create and manipulate mesh + selections, which identify a subset of the vertices and segments + of a mesh. You can create any number of selections for a mesh, using + \c #AIMeshSuite::NewSelection(). + + There is one special selection associated with a mesh object that + identifies the subset of vertices and segments the user has selected. + This is the \e visible selection. You can obtain this selection + with \c #AIMeshSuite::GetSelection(). Making a change to the contents of this + selection affects what is displayed as selected in the document window. + + Selections are reference counted. When you get a selection + its initial reference count is 1, so you do not typically need + to call \c #AddRef().You must call \c #Release() to decrement + the count of a selection when you are no longer using it. + Failure to release selections causes memory leaks. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMeshSelectionSuite and \c #kAIMeshSelectionVersion. +*/ +typedef struct { + + /** Increments the reference count of a mesh selection. + The initial reference count is 1, so you do not typically need + to call this function. + (Note that this function returns an numeric value, not an error code.) + @param selection The selection. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) (AIMeshSelection selection); + + /** Decrements the reference count of a mesh selection, and frees + the associated memory when the count reaches 0. + (Note that this function returns an numeric value, not an error code.) + @param selection The selection. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) (AIMeshSelection selection); + + /** Copies the contents of a mesh selection into another, existing selection object. + @param selection The destination selection object. + @param from The source selection object. + */ + AIAPI AIErr (*Copy) (AIMeshSelection selection, AIMeshSelection from); + + /** Duplicates a mesh selection, creating a new selection object. + @param selection The source selection object. + @param clone [out] A buffer in which to return the new selection object. + */ + AIAPI AIErr (*Clone) (AIMeshSelection selection, AIMeshSelection* clone); + + /** Reports whether a mesh selection does not contain any vertices, segments or patches. + (Note that this function returns a boolean value, not an error code.) + @param selection The mesh selection object. + @return True if the selection is empty. + */ + AIAPI AIBoolean (*IsEmpty) (AIMeshSelection selection); + + /** Reports whether a mesh selection contains every vertex, segment, and patch. + (Note that this function returns a boolean value, not an error code.) + @param selection The mesh selection object. + @return True if the selection is full. + */ + AIAPI AIBoolean (*IsFull) (AIMeshSelection selection); + + /** Reports whether two mesh selection objects reference the same selection set. + (Note that this function returns a boolean value, not an error code.) + @param selection1 The first mesh selection object. + @param selection2 The second mesh selection object. + @return True if the selections are equal. + */ + AIAPI AIBoolean (*IsEqual) (AIMeshSelection selection1, AIMeshSelection selection2); + + /** Reports whether a mesh selection contains all of the objects that are in + another selection. + (Note that this function returns a boolean value, not an error code.) + @param selection1 The first mesh selection object. + @param selection2 The second mesh selection object. + @return True if the second selection is a subset of the first. + */ + AIAPI AIBoolean (*Contains) (AIMeshSelection selection1, AIMeshSelection selection2); + + /** Reports whether a mesh selection contains a specific vertex. + (Note that this function returns a boolean value, not an error code.) + @param selection The mesh selection object. + @param vertex The vertex. + @return True if the vertex is in the selection. + */ + AIAPI AIBoolean (*ContainsVertex) (AIMeshSelection selection, AIMeshVertexIterator vertex); + + /** Reports whether a mesh selection contains a specific segment. + (Note that this function returns a boolean value, not an error code.) + @param selection The mesh selection object. + @param segment The segment. + @return True if the segment is in the selection. + */ + AIAPI AIBoolean (*ContainsSegment) (AIMeshSelection selection, AIMeshSegmentIterator segment); + + /** Reports whether the reshaping control of a segment would be + visible in a selection. + (Note that this function returns a boolean value, not an error code.) + @param selection The mesh selection object. + @param segment The segment. + @return True if the reshaping control would be visible. + */ + AIAPI AIBoolean (*RendersControl) (AIMeshSelection selection, AIMeshSegmentIterator segment); + + /** Modifies a selection to be the intersection of itself and another selection. + @param selection1 The first mesh selection object, which is modified. + @param selection2 The second mesh selection object. + */ + AIAPI AIErr (*Intersect) (AIMeshSelection selection1, AIMeshSelection selection2); + + /** Modifies a selection to be the union of itself and another selection. + @param selection1 The first mesh selection object, which is modified.. + @param selection2 The second mesh selection object. + */ + AIAPI AIErr (*Union) (AIMeshSelection selection1, AIMeshSelection selection2); + + /** Modifies a selection to invert the selection state of parts identified + by another selection. + @param selection1 The first mesh selection object, which is modified. + @param selection2 The second mesh selection object, which identifies the + parts to toggle. + */ + AIAPI AIErr (*Invert) (AIMeshSelection selection1, AIMeshSelection selection2); + + /** Adds a patch to or removes it from a selection. + @param selection The mesh selection object. + @param patch The patch. + @param select True to add the patch to the selection, false to deselect it. + */ + AIAPI AIErr (*SelectPatch) (AIMeshSelection selection, AIMeshPatchIterator patch, AIBoolean select); + + /** Adds a vertex to or removes it from a selection. + @param selection The mesh selection object. + @param vertex The vertex. + @param select True to add the vertex to the selection, false to deselect it. + */ + AIAPI AIErr (*SelectVertex) (AIMeshSelection selection, AIMeshVertexIterator vertex, AIBoolean select); + + /** Adds a segment to or removes it from a selection. + @param selection The mesh selection object. + @param segment The segment. + @param select True to add the segment to the selection, false to deselect it. + */ + AIAPI AIErr (*SelectSegment) (AIMeshSelection selection, AIMeshSegmentIterator segment, AIBoolean select); + + /** Transforms the points of a mesh selection by a transformation matrix. + @param selection The mesh selection object. + @param matrix A pointer to the transformation matrix. + */ + AIAPI AIErr (*Transform) (AIMeshSelection selection, AIRealMatrix* matrix); + + /** Transforms the points of a mesh selection according to a developer-defined + mapping function. + @param selection The mesh selection object. + @param f The point-mapping function. + @param userData Developer-defined data to pass through to the function. + */ + AIAPI AIErr (*MapPoints) (AIMeshSelection selection, AIMeshPointMap f, void* userData); + + /** Transforms the colors of a gradient mesh selection according to a developer-defined + mapping function. + @param selection The mesh selection object. + @param f The color-mapping function. + @param userData Developer-defined data to pass through to the function. + */ + AIAPI AIErr (*MapColors) (AIMeshSelection selection, AIMeshColorMap f, void* userData); + + /** Passes the colors of a gradient mesh selection to a developer-defined + query function. Does not modify the mesh colors. + (Note that this function does not return an error code.) + @param selection The mesh selection object. + @param f The color-querying function. + @param userData Developer-defined data to pass through to the function. + */ + AIAPI void (*QueryColors) (AIMeshSelection selection, AIMeshColorQuery f, void* userData); + + /** Computes the bounds of the selected pieces of a mesh. + (Note that this function does not return an error code.) + @param selection The mesh selection object. + @param matrix A pointer to a transformation matrix to apply to the selection + before calculating its bounds. If this argument is \c NULL the + identity matrix will be used. + @param variant How the bounds are computed, a + \c #AIMeshSelectionBoundsVariant value. + @param bounds [out] A buffer in which to return the bounding box. + */ + AIAPI void (*BoundPieces) (AIMeshSelection selection, AIRealMatrix* matrix, ai::int32 variant, AIRealRect* bounds); + +} AIMeshSelectionSuite; + + +/** @ingroup Suites + This suite provides functions that allow you to traverse and manipulate + the patches in a mesh through a reference-counted iterator object. + + See @ref meshIterators. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMeshPatchIteratorSuite and \c #kAIMeshPatchIteratorVersion. +*/ +typedef struct { + + /** Increments the reference count of a patch iterator object. + The initial reference count is 1, so you do not typically + need to call this function. + (Note that this function returns a numeric value, not an error code.) + @param patch The iterator object. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) (AIMeshPatchIterator patch); + + /** Decrements the reference count of a patch iterator object, + and frees the associated memory when the count reaches 0. + (Note that this function returns an numeric value, not an error code.) + @param patch The iterator object. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) (AIMeshPatchIterator patch); + + /** Copies the contents of a patch iterator into another, existing iterator object. + @param patch The destination iterator object. + @param from The source iterator object. + */ + AIAPI AIErr (*Copy) (AIMeshPatchIterator patch, AIMeshPatchIterator from); + + /** Duplicates a patch iterator, creating a new iterator object. + @param patch The source iterator object. + @param clone [out] A buffer in which to return the new iterator object. + */ + AIAPI AIErr (*Clone) (AIMeshPatchIterator patch, AIMeshPatchIterator* clone); + + /** Reports whether two patch iterator objects reference the same patch. + (Note that this function returns a boolean value, not an error code.) + @param patch1 The first iterator object. + @param patch2 The second iterator object. + @return True if the iterators are equal. + */ + AIAPI AIBoolean (*IsEqual) (AIMeshPatchIterator patch1, AIMeshPatchIterator patch2); + + /** Reports whether a patch iterator has reached the last patch. + When this function returns true, the iterator no longer contains + a valid patch, and can no longer be used with the iteration + functions. Check this before calling \c #Next(), \c #Prev(), or + related functions if there is a chance of walking off the end of the mesh. + (Note that this function returns a boolean value, not an error code.) + @param patch The iterator object. + @return True when the iterator is past the last patch. + */ + AIAPI AIBoolean (*AtEnd) (AIMeshPatchIterator patch); + + /** Advances a patch iterator, so that it contains the next patch in + the mesh. Use with an iterator obtained from + \c #AIMeshSuite::GetStartPatch(). + Repeated calls guarantee that every element is visited + once and only once. The order of traversal is undefined. + (Note that this function does not return an error code.) + @param patch The iterator object. + @see \c #Prev(), \c #AtEnd() + */ + AIAPI void (*Next) (AIMeshPatchIterator patch); + + /** Backs up a patch iterator, so that it contains the previous patch in + the mesh. + (Note that this function does not return an error code.) + @param patch The iterator object. + @see \c #Next(), \c #AtEnd() + */ + AIAPI void (*Prev) (AIMeshPatchIterator patch); + + /** Advances a patch iterator, so that it contains the next patch in + the mesh, increasing along the I axis. + (Note that this function does not return an error code.) + @param patch The iterator object. + @see \c #PrevI(), \c #AtEnd() + */ + AIAPI void (*NextI) (AIMeshPatchIterator patch); + + /** Backs up a patch iterator, so that it contains the previous patch in + the mesh, decreasing along the I axis. + (Note that this function does not return an error code.) + @param patch The iterator object. + @see \c #NextI(), \c #AtEnd() + */ + AIAPI void (*PrevI) (AIMeshPatchIterator patch); + + /** Advances a patch iterator, so that it contains the next patch in + the mesh, increasing along the J axis. + (Note that this function does not return an error code.) + @param patch The iterator object. + @see \c #PrevJ(), \c #AtEnd() + */ + AIAPI void (*NextJ) (AIMeshPatchIterator patch); + + /** Backs up a patch iterator, so that it contains the previous patch in + the mesh, decreasing along the J axis. + (Note that this function does not return an error code.) + @param patch The iterator object. + @see \c #NextJ(), \c #AtEnd() + */ + AIAPI void (*PrevJ) (AIMeshPatchIterator patch); + + /** Retrieves the number of nodes in a patch. + (Note that this function returns a numeric value, not an error code.) + @param patch The iterator object. + @return The number of nodes (currently always 4). + */ + AIAPI ai::int32 (*CountNodes) (AIMeshPatchIterator patch); + + /** Creates a vertex iterator for a node of a patch, identified by index + position. Nodes are numbered from 0 to 3, counter-clockwise from + the bottom left of the patch. + @param patch The patch iterator object. + @param n The 0-based index of the node. + @param vertex [out] A buffer in which to return the new vertex iterator. + */ + AIAPI AIErr (*GetNodeN) (AIMeshPatchIterator patch, ai::int32 n, AIMeshVertexIterator* vertex); + + /** Creates a vertex iterator for a node of a patch, identified by an (I,J) offset + relative to the bottom left node of the patch. + @param patch The patch iterator object. + @param i The I-axis offset of the node. + @param J The J-axis offset of the node. + @param vertex [out] A buffer in which to return the new vertex iterator. + */ + AIAPI AIErr (*GetNodeIJ) (AIMeshPatchIterator patch, ai::int32 i, ai::int32 j, AIMeshVertexIterator* vertex); + + /** Creates a segment iterator for one of the two segments adjacent to a patch and + connected to a node specified by position index. The nodes are numbered from + 0 to 3 counter-clockwise from the bottom left of the patch. + @param patch The patch iterator object. + @param n The 0-based index of the node. + @param direction Whether to make a clockwise or counter-clockwise + turn at patch corners, an \c #AIMeshPatchDirection value. + (This indicates which segment to get.) + @param vertex [out] A buffer in which to return the new segment iterator. + */ + AIAPI AIErr (*GetSegmentN) (AIMeshPatchIterator patch, ai::int32 n, ai::int32 direction, AIMeshSegmentIterator* segment); + + /** Creates a segment iterator for one of the two segments adjacent to a patch and + connected to a node specified by an (I,J) offset relative to the bottom left + node of the patch. + @param patch The patch iterator object. + @param i The I-axis offset of the node. + @param J The J-axis offset of the node. + @param direction Whether to make a clockwise or counter-clockwise + turn at patch corners, an \c #AIMeshPatchDirection value. + (This indicates which segment to get.) + @param segment [out] A buffer in which to return the new segment iterator. + */ + AIAPI AIErr (*GetSegmentIJ) (AIMeshPatchIterator patch, ai::int32 i, ai::int32 j, ai::int32 direction, AIMeshSegmentIterator* segment); + + /** Reports the number of vertices around a patch, including nodes. + Use with \c #GetVertexM() and \c #GetSegmentM() to iterate through + vertices and segments. + (Note that this function returns a numeric value, not an error code.) + @param patch The patch iterator object. + @return The number of vertices. + */ + AIAPI ai::int32 (*CountVerticies) (AIMeshPatchIterator patch); + + /** Creates a vertex iterator for a vertex identified by index + position in a patch. + @param patch The patch iterator object. + @param m The 0-based index of the vertex. Use \c #CountVerticies() + to find the number of vertices in the patch. + @param vertex [out] A buffer in which to return the new vertex iterator. + */ + AIAPI AIErr (*GetVertexM) (AIMeshPatchIterator patch, ai::int32 m, AIMeshVertexIterator* vertex); + + /** Creates a segment iterator for one of the two segments adjacent to a patch and + connected to a vertex specified by position index. + @param patch The patch iterator object. + @param m The 0-based index of the vertex. Use \c #CountVerticies() + to find the number of vertices in the patch. + @param direction Whether to make a clockwise or counter-clockwise + turn at patch corners, an \c #AIMeshPatchDirection value. + (This indicates which segment to get.) + @param segment [out] A buffer in which to return the new segment iterator. + */ + AIAPI AIErr (*GetSegmentM) (AIMeshPatchIterator patch, ai::int32 m, ai::int32 direction, AIMeshSegmentIterator* segment); + + /** Reports the ordinal position of a vertex around a patch. + @param patch The patch iterator object. + @param vertex The vertex iterator object. + @param m [out] A buffer in which to return the vertex position. + */ + AIAPI AIErr (*FindVertex) (AIMeshPatchIterator patch, AIMeshVertexIterator vertex, ai::int32* m); + + /** Retrives the (i,j) coordinate of a patch within the mesh. + @param patch The patch iterator object. + @param i [out] A buffer in which to return the I-axis coordinate. + @param j [out] A buffer in which to return the J-axis coordinate. + */ + AIAPI void (*GetIJ) (AIMeshPatchIterator patch, ai::int32* i, ai::int32* j); + +} AIMeshPatchIteratorSuite; + + +/** @ingroup Suites + This suite provides functions that allow you to traverse and manipulate + the vertices in a mesh through a reference-counted iterator object. + The segments and tangents associated with a vertex are addressed by a + 0-based index. + + See @ref meshIterators. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMeshVertexIteratorSuite and \c #kAIMeshVertexIteratorVersion. + */ +typedef struct { + /** Increments the reference count of a vertex iterator object. + The initial reference count is 1, so you do not typically + need to call this function. + (Note that this function returns a numeric value, not an error code.) + @param vertex The vertex iterator object. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) (AIMeshVertexIterator vertex); + + /** Decrements the reference count of a vertex iterator object, + and frees the associated memory when the count reaches 0. + (Note that this function returns an numeric value, not an error code.) + @param vertex The vertex iterator object. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) (AIMeshVertexIterator vertex); + + /** Copies the contents of a vertex iterator into another, existing iterator object. + @param vertex The destination iterator object. + @param from The source iterator object. + */ + AIAPI AIErr (*Copy) (AIMeshVertexIterator vertex, AIMeshVertexIterator from); + + /** Duplicates a vertex iterator, creating a new iterator object. + @param vertex The source iterator object. + @param clone [out] A buffer in which to return the new iterator object. + */ + AIAPI AIErr (*Clone) (AIMeshVertexIterator vertex, AIMeshVertexIterator* clone); + + /** Reports whether two vertex iterator objects reference the same vertex. + (Note that this function returns a boolean value, not an error code.) + @param vertex1 The first iterator object. + @param vertex2 The second iterator object. + @return True if the iterators are equal. + */ + AIAPI AIBoolean (*IsEqual) (AIMeshVertexIterator vertex1, AIMeshVertexIterator vertex2); + + /** Reports whether a vertex iterator has reached the last vertex. + When this function returns true, the iterator no longer contains + a valid vertex, and can no longer be used with the iteration + functions. Check this before calling \c #Next(), \c #Prev(), or + related functions if there is a chance of walking off the end of the mesh. + (Note that this function returns a boolean value, not an error code.) + @param vertex The vertex iterator object. + @return True when the iterator is past the last vertex. + */ + AIAPI AIBoolean (*AtEnd) (AIMeshVertexIterator vertex); + + /** Advances a vertex iterator, so that it contains the next + vertex in the mesh. Use with an iterator obtained from + \c #AIMeshSuite::GetStartVertex(). + Repeated calls guarantee that every element is visited + once and only once. The order of traversal is undefined. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @see \c #Prev(), \c #AtEnd() + */ + AIAPI void (*Next) (AIMeshVertexIterator vertex); + + /** Backs up a vertex iterator, so that it contains the previous + vertex in the mesh. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @see \c #Next(), \c #AtEnd() + */ + AIAPI void (*Prev) (AIMeshVertexIterator vertex); + + /** Advances a vertex iterator, so that it contains the next vertex in + the mesh, increasing along the I axis. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @see \c #PrevI(), \c #AtEnd() + */ + AIAPI void (*NextI) (AIMeshVertexIterator vertex); + + /** Backs up a vertex iterator, so that it contains the previous vertex in + the mesh, decreasing along the I axis. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @see \c #NextI(), \c #AtEnd() + */ + AIAPI void (*PrevI) (AIMeshVertexIterator vertex); + + /** Advances a vertex iterator, so that it contains the next vertex in + the mesh, increasing along the J axis. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @see \c #PrevJ(), \c #AtEnd() + */ + AIAPI void (*NextJ) (AIMeshVertexIterator vertex); + + /** Backs up a vertex iterator, so that it contains the previous vertex in + the mesh, decreasing along the J axis. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @see \c #NextJ(), \c #AtEnd() + */ + AIAPI void (*PrevJ) (AIMeshVertexIterator vertex); + + /** Reports the number of segments connected to a vertex. + (Note that this function returns a numeric value, not an error code.) + @param vertex The vertex iterator object. + @return The number of connected segments. + */ + AIAPI ai::int32 (*CountSegments) (AIMeshVertexIterator vertex); + + /** Reports whether a vertex iterator identifies a node. + (Note that this function returns a boolean value, not an error code.) + @param vertex The vertex iterator object. + @return True if the current vertex is a node. + */ + AIAPI AIBoolean (*IsNode) (AIMeshVertexIterator vertex); + + /** Retrieves the index position of a segment in a given + direction from a connected vertex along a given axis. + (Note that this function returns a numeric value, not an error code.) + @param vertex The vertex iterator object. + @param axis The axis, an \c #AIMeshAxis value. + @param sense The direction, an \c #AIMeshAxisSense value. + @return The index position of the segment. + */ + AIAPI ai::int32 (*GetSegmentIndex) (AIMeshVertexIterator vertex, ai::int32 axis, ai::int32 sense); + + /** Retrieves the index position of the segment that is opposite a segment + identified by index position around a connected vertex. + (Note that this function returns a numeric value, not an error code.) + @param vertex The vertex iterator object. + @param i The index position of a segment connected to the vertex. + @return The index of the opposite segment, or -1 if there is no opposite segment. + */ + AIAPI ai::int32 (*GetSegmentOpposite) (AIMeshVertexIterator vertex, ai::int32 i); + + /** Sets the color of a node. + @param vertex The vertex iterator object, for which the current vertex is a node. + @param c A pointer to the new color. + */ + AIAPI AIErr (*SetColor) (AIMeshVertexIterator vertex, AIColor* c); + + /** Retrieves the color of a node. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object, for which the current vertex is a node. + @param c [out] A buffer in which to return the color. + */ + AIAPI void (*GetColor) (AIMeshVertexIterator vertex, AIColor* c); + + /** Sets the position of the ends of all segments attached to a vertex. + @param vertex The vertex iterator object. + @param point A pointer to the new endpoint. + */ + AIAPI AIErr (*SetPoint) (AIMeshVertexIterator vertex, AIRealPoint* point); + + /** Retrieves the position of the ends of all segments attached to a vertex. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @param point [out] A buffer in which to return the endpoint. + */ + AIAPI void (*GetPoint) (AIMeshVertexIterator vertex, AIRealPoint* point); + + /** Retrieves the (U,V) coordinates of a vertex. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @param u [out] A buffer in which to return the U coordinate. + @param v [out] A buffer in which to return the V coordinate. + */ + AIAPI void (*GetUV) (AIMeshVertexIterator vertex, AIReal* u, AIReal* v); + + /** Sets the second point of the bezier control polygon of a segment identified + by index position around a connected vertex. + @param vertex The vertex iterator object. + @param i The 0-based index of the segment. + @param point A pointer to the new tangent point. + */ + AIAPI AIErr (*SetTangent) (AIMeshVertexIterator vertex, ai::int32 i, AIRealPoint* point); + + /** Retrieves the second point of the bezier control polygon of a segment identified + by index position around a connected vertex. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object. + @param i The 0-based index of the segment. + @param point [out] A buffer in which to return the tangent point. + */ + AIAPI void (*GetTangent) (AIMeshVertexIterator vertex, ai::int32 i, AIRealPoint* point); + + /** Sets the smoothing state of a segment identified + by index position around a connected vertex. When smoothing is on, + adjusting the tangent similarly adjusts that of the opposite segment. + @param vertex The vertex iterator object. + @param i The 0-based index of the segment. + @param smooth True to turn smoothing on, false to turn it off. + */ + AIAPI AIErr (*SetSmooth) (AIMeshVertexIterator vertex, ai::int32 i, AIBoolean smooth); + + /** Retrieves the smoothing state of a segment identified + by index position around a connected vertex. When smoothing is on, + adjusting the tangent similarly adjusts that of the opposite segment. + (Note that this function returns a boolean value, not an error code.) + @param vertex The vertex iterator object. + @param i The 0-based index of the segment. + @return True if smoothing is on, false if it is off. + */ + AIAPI AIBoolean (*GetSmooth) (AIMeshVertexIterator vertex, ai::int32 i); + + /** Creates an iterator for a segment identified + by index position around a connected vertex. + @param vertex The vertex iterator object. + @param i The 0-based index of the segment. + @param segment [out] A buffer in which to return the segment iterator. + */ + AIAPI AIErr (*GetSegment) (AIMeshVertexIterator vertex, ai::int32 i, AIMeshSegmentIterator* segment); + + /** Creates an iterator for one of the patches adjacent to a segment identified + by index position around a connected vertex. + @param vertex The vertex iterator object. + @param i The 0-based index of the segment. + @param patch [out] A buffer in which to return the patch iterator. + */ + AIAPI AIErr (*GetPatch) (AIMeshVertexIterator vertex, ai::int32 i, AIMeshPatchIterator* patch); + + /** Reports whether a vertex is on the edge of the mesh. + (Note that this function returns a boolean value, not an error code.) + @param vertex The vertex iterator object. + @return True if the vertex is on the edge. + */ + AIAPI AIBoolean (*IsOnBoundary) (AIMeshVertexIterator vertex); + + /** Sets the opacity of a node. + @param vertex The vertex iterator object, for which the current vertex is a node. + @param o The opacity value (between 0.0 and 1.0). + */ + AIAPI AIErr (*SetOpacity) (AIMeshVertexIterator vertex, AIReal o); + + /** Retrieves the opacity of a node. + (Note that this function does not return an error code.) + @param vertex The vertex iterator object, for which the current vertex is a node. + @param o [out] A buffer in which to return the opacity. + */ + AIAPI void (*GetOpacity) (AIMeshVertexIterator vertex, AIReal* o); + +} AIMeshVertexIteratorSuite; + + +/** @ingroup Suites + This suite provides functions that allow you to traverse and + manipulate the segments in a mesh through a reference-counted + iterator object. + + See @ref meshIterators. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIMeshSegmentIteratorSuite and \c #kAIMeshSegmentIteratorVersion. + */ +typedef struct { + + /** Increments the reference count of a segment iterator object. + The initial reference count is 1, so you do not typically + need to call this function. + (Note that this function returns a numeric value, not an error code.) + @param segment The iterator object. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) (AIMeshSegmentIterator segment); + + /** Decrements the reference count of a segment iterator object, + and frees the associated memory when the count reaches 0. + (Note that this function returns an numeric value, not an error code.) + @param segment The iterator object. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) (AIMeshSegmentIterator segment); + + /** Copies the contents of a segment iterator into another, existing iterator object. + @param segment The destination iterator object. + @param from The source iterator object. + */ + AIAPI AIErr (*Copy) (AIMeshSegmentIterator segment, AIMeshSegmentIterator from); + + /** Duplicates a segment iterator, creating a new iterator object. + @param segment The source iterator object. + @param clone [out] A buffer in which to return the new iterator object. + */ + AIAPI AIErr (*Clone) (AIMeshSegmentIterator segment, AIMeshSegmentIterator* clone); + + /** Reports whether two segment iterator objects reference the same segment + and have the same direction. + (Note that this function returns a boolean value, not an error code.) + @param segment1 The first iterator object. + @param segment2 The second iterator object. + @return True if the iterators are equal. + */ + AIAPI AIBoolean (*IsEqual) (AIMeshSegmentIterator segment1, AIMeshSegmentIterator segment2); + + /** Reports whether a segment iterator has reached the last segment. + When this function returns true, the iterator no longer contains + a valid segment, and can no longer be used with the iteration + functions. Check this before calling \c #Next(), \c #Prev(), or + related functions if there is a chance of walking off the end of the mesh. + (Note that this function returns a boolean value, not an error code.) + @param segment The segment iterator object. + @return True when the iterator is past the last segment. + */ + AIAPI AIBoolean (*AtEnd) (AIMeshSegmentIterator segment); + + /** Advances a segment iterator, so that it contains the next + segment in the mesh. Use with an iterator obtained from + \c #AIMeshSuite::GetStartSegment(). + Repeated calls guarantee that every element is visited + once and only once. The order of traversal is undefined. + (Note that this function does not return an error code.) + @param segment The segment iterator object. + @see \c #Prev(), \c #AtEnd() + */ + AIAPI void (*Next) (AIMeshSegmentIterator segment); + + /** Backs up a segment iterator, so that it contains the previous + segment in the mesh. + (Note that this function does not return an error code.) + @param segment The segment iterator object. + @see \c #Next(), \c #AtEnd() + */ + AIAPI void (*Prev) (AIMeshSegmentIterator segment); + + /** Advances a segment iterator, so that it contains the next segment in + the mesh, increasing along the current axis in the direction of + this iterator. + (Note that this function does not return an error code.) + @param segment The segment iterator object. + @see \c #PrevOnAxis(), \c #AtEnd() + */ + AIAPI void (*NextOnAxis) (AIMeshSegmentIterator segment); + + /** Backs up a segment iterator, so that it contains the previous segment in + the mesh, decreasing along the current axis in the direction of + this iterator. + (Note that this function does not return an error code.) + @param segment The segment iterator object. + @see \c #NextOnAxis(), \c #AtEnd() + */ + AIAPI void (*PrevOnAxis) (AIMeshSegmentIterator segment); + + /** Advances a segment iterator, so that it contains the next segment + around the current patch. + @param segment The segment iterator object. + @param direction Whether to make a clockwise or counter-clockwise + turn at patch corners, an \c #AIMeshPatchDirection value. + (This indicates which patch to follow.) + @see \c #PrevOnPatch(), \c #AtEnd() + */ + AIAPI void (*NextOnPatch) (AIMeshSegmentIterator segment, ai::int32 direction); + + /** Backs up a segment iterator, so that it contains the previous segment + around the current patch. + @param segment The segment iterator object. + @param direction Whether to make a clockwise or counter-clockwise + turn at patch corners, an \c #AIMeshPatchDirection value. + (This indicates which patch to follow.) + @see \c #PrevOnPatch(), \c #AtEnd() + */ + AIAPI void (*PrevOnPatch) (AIMeshSegmentIterator segment, ai::int32 direction); + + /** Switches the start and end vertices of a segment. + (Note that this function does not return an error code.) + @param segment The segment iterator object. + */ + AIAPI void (*Reverse) (AIMeshSegmentIterator segment); + + /** Reports the number of knots forming a segment, excluding the + start and end knots. + (Note that this function returns a numeric value, not an error code.) + @param segment The segment iterator object. + @return The number of knots. + */ + AIAPI ai::int32 (*CountKnots) (AIMeshSegmentIterator segment); + + /** Retrieves the (U,V) coordinates of a knot identified by position + index in a segment. + (Note that this function does not return an error code.) + @param segment The segment iterator object. + @param n The 0-based index of the knot. Index positions exclude the start + and end knots. + @param u [out] A buffer in which to return the U coordinate. + @param v [out] A buffer in which to return the V coordinate. + */ + AIAPI void (*GetKnotUV) (AIMeshSegmentIterator segment, ai::int32 n, AIReal* u, AIReal* v); + + /** Adds one or more knots to a segment. + @param segment The segment iterator object. + @param m The 0-based index at which to add the knot or knots. + Index positions exclude the start and end knots. + @param n The number of knots to add. + */ + AIAPI AIErr (*InsertKnots) (AIMeshSegmentIterator segment, ai::int32 m, ai::int32 n); + + /** Removes one or more knots from a segment. + @param segment The segment iterator object. + @param m The 0-based index at which to remove the knot or knots. + Index positions exclude the start and end knots. + @param n The number of knots to remove. + */ + AIAPI AIErr (*DeleteKnots) (AIMeshSegmentIterator segment, ai::int32 m, ai::int32 n); + + /** Reports the number of points in the control polygon of the beziers + describing a segment. + (Note that this function returns a numeric value, not an error code.) + @param segment The segment iterator object. + @return The number of points. + */ + AIAPI ai::int32 (*CountPoints) (AIMeshSegmentIterator segment); + + /** Sets the position of the point of a bezier control polygon that describes a segment. + @param segment The segment iterator object. + @param i The 0-based index of the point. See \c #CountPoints(). + @param point A pointer to the new point value. + */ + AIAPI AIErr (*SetPoint) (AIMeshSegmentIterator segment, ai::int32 i, AIRealPoint* point); + + /** Retrieves the point of a bezier control polygon that describes a segment. + (Note that this function does not return an error code.) + @param segment The segment iterator object. + @param i The 0-based index of the point. See \c #CountPoints(). + @param point [out] A buffer in which to return the point. + */ + AIAPI void (*GetPoint) (AIMeshSegmentIterator segment, ai::int32 i, AIRealPoint* point); + + /** Creates a vertex iterator for the starting vertex of a segment. + @param segment The segment iterator object. + @param vertex [out] A buffer in which to return the vertex iterator. + */ + AIAPI AIErr (*GetStart) (AIMeshSegmentIterator segment, AIMeshVertexIterator* vertex); + + /** Creates a vertex iterator for the ending vertex of a segment. + @param segment The segment iterator object. + @param vertex [out] A buffer in which to return the vertex iterator. + */ + AIAPI AIErr (*GetEnd) (AIMeshSegmentIterator segment, AIMeshVertexIterator* vertex); + + /** Breaks a segment into two segments at a given knot, so that the knot + becomes a vertex. + @param segment The segment iterator object. Upon return, this contains + the initial segment of the two new segments. + @param n The 0-based index of the knot. + */ + AIAPI AIErr (*Split) (AIMeshSegmentIterator segment, ai::int32 n); + + /** Joins a segment with the next segment. + @param segment The segment iterator object. Upon return, this contains + the joined segment. + @param n [out] A buffer in which to return the 0-based index of + the knot at the join. + */ + AIAPI AIErr (*Join) (AIMeshSegmentIterator segment, ai::int32* n); + + /** Reports the location of the control handle at the segment start. + which is used to manipulate its overall shape. + (Note that this function does not return an error code.) + @param segment The segment iterator object. + @param control [out] A buffer in which to return the control-handle point. + */ + AIAPI void (*GetControl) (AIMeshSegmentIterator segment, AIRealPoint* control); + + /** Modifies the control polygon to reshape a segment. + @param segment The segment iterator object. + @param point The new position for the start of the segment. + @param control The control handle of the segment. See \c #GetControl(). + */ + AIAPI AIErr (*Reshape) (AIMeshSegmentIterator segment, AIRealPoint* point, AIRealPoint* control); + + /** Reports whether a segment is on the edge of the mesh. + (Note that this function returns a boolean value, not an error code.) + @param segment The segment iterator object. + @return True when the segment is on the edge. + */ + AIAPI AIBoolean (*IsOnBoundary) (AIMeshSegmentIterator segment); + +} AIMeshSegmentIteratorSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIModalParent.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIModalParent.h index d6f3f8a..d56d3ee 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIModalParent.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIModalParent.h @@ -1,82 +1,82 @@ -/************************************************************************/ -/* */ -/* Name : AIModalParent.h */ -/* $Revision : 1$ */ -/* Author : */ -/* Date : 16 Jan 2012 */ -/* Purpose : Suite for Creating and Managing Control bars */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 2011 Adobe Systems Incorporated. */ -/* All rights reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/************************************************************************/ - -#ifndef __AIMODALPARENT_H__ -#define __AIMODALPARENT_H__ - -#include "AITypes.h" -#include "IAIUnicodeString.h" - - - -/** @file AIControlBar.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIModalParentSuite "AI Modal Parent Suite" -#define kAIModalParentSuiteVersion2 AIAPI_VERSION(2) -#define kAIModalParentSuiteVersion kAIModalParentSuiteVersion2 -#define kAIModalParentVersion kAIModalParentSuiteVersion - -/******************************************************************************* -** -** Types -** -**/ -#ifdef WIN_ENV -typedef HWND AIPlatformWindow; -#elif MAC_ENV - #ifdef __OBJC__ - @class NSWindow; - typedef NSWindow* AIPlatformWindow; - #else - typedef void* AIPlatformWindow; - #endif -#else -#error unknown configuration -#endif - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides functions for specifying the parent window of an AI dialog. -This is required only when AI's dialog is to be shown over a third party modal dialog on Windows. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIModalParentSuite and \c #kAIModalParentSuiteVersion. -*/ -struct AIModalParentSuite{ - - AIAPI AIErr (*SetParent)(const AIPlatformWindow& inParent); - - AIAPI AIErr (*RemoveParent)(); - -}; - - +/************************************************************************/ +/* */ +/* Name : AIModalParent.h */ +/* $Revision : 1$ */ +/* Author : */ +/* Date : 16 Jan 2012 */ +/* Purpose : Suite for Creating and Managing Control bars */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 2011 Adobe Systems Incorporated. */ +/* All rights reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/************************************************************************/ + +#ifndef __AIMODALPARENT_H__ +#define __AIMODALPARENT_H__ + +#include "AITypes.h" +#include "IAIUnicodeString.h" + + + +/** @file AIControlBar.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIModalParentSuite "AI Modal Parent Suite" +#define kAIModalParentSuiteVersion2 AIAPI_VERSION(2) +#define kAIModalParentSuiteVersion kAIModalParentSuiteVersion2 +#define kAIModalParentVersion kAIModalParentSuiteVersion + +/******************************************************************************* +** +** Types +** +**/ +#ifdef WIN_ENV +typedef HWND AIPlatformWindow; +#elif defined(MAC_ENV) + #ifdef __OBJC__ + @class NSWindow; + typedef NSWindow* AIPlatformWindow; + #else + typedef void* AIPlatformWindow; + #endif +#else +#error unknown configuration +#endif + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +This suite provides functions for specifying the parent window of an AI dialog. +This is required only when AI's dialog is to be shown over a third party modal dialog on Windows. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIModalParentSuite and \c #kAIModalParentSuiteVersion. +*/ +struct AIModalParentSuite{ + + AIAPI AIErr (*SetParent)(const AIPlatformWindow& inParent); + + AIAPI AIErr (*RemoveParent)(); + +}; + + #endif //__AIMODALPARENT_H__ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AINameSpace.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AINameSpace.h index c06457d..4f48bd1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AINameSpace.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AINameSpace.h @@ -1,228 +1,228 @@ -#ifndef __AINameSpace__ -#define __AINameSpace__ - -/* - * Name: AINameSpace.h - * $Revision: 4 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Name Space Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIDataFilter__ -#include "AIDataFilter.h" -#endif - -#ifndef __AIStringPool__ -#include "AIStringPool.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AINameSpace.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAINameSpaceSuite "AI Name Space Suite" -#define kAINameSpaceSuiteVersion AIAPI_VERSION(4) -#define kAINameSpaceVersion kAINameSpaceSuiteVersion - -/** @ingroup Errors - See \c #AINameSpaceSuite. */ -#define kNameSpaceErr 'NAME' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque namespace reference. See \c #AINameSpaceSuite. */ -typedef struct NameSpace AINameSpace; - -#if __BUILD_PLUGIN__ -#define kNSMaxNameLength (1024) -#define kNSMaxPathLength ((kNSMaxNameLength + 1) * 5) -#define kNSPathSeparator '/' -typedef char NSPath[kNSMaxPathLength + 1]; -typedef char NSName[kNSMaxNameLength + 1]; -#endif - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that allow you to create and manage namespaces. - A namespace is essentially a global dictionary that is not associated with any particular - document. Its keys are strings called \e paths and the associated values can be of these - types and values: - \li \c integer (value: \c long ) - \li \c real (value: \c double ) - \li \c string (value: char * ) - \li \c raw (length: \c long, value: char * ) - \li \c unicodeString (value: #ai::UnicodeString *) - - Unlike dictionaries, the contents of a namespace have a hierarchical organization. - The hierarchy of keys is like that of directory paths in a file system, with - levels divided by '/' separators. For example the key "/root/entry" has two - components, "root" and "entry". - - You can specify partial paths, and refer to all keys that are prefixed with that path. - A partial path is specified with a trailing '/' separator. The path "/" refers - to the root. - - A path can contain a maximum of 505 characters. Each component of a path (excluding - separators) can have a maximum of 100 characters. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAINameSpaceSuite and \c #kAINameSpaceVersion. - */ -typedef struct { - - /** Creates a new namespace. - @param pool The string pool from which to allocate the path component - string, or \c NULL to use the global string pool, If supplied, - the caller must dispose of the string pool after freeing the namespace. - See \c #AIStringPoolSuite. - @param space A buffer in which to return the namespace reference. - */ - AIErr (*AllocateNameSpace) ( AIStringPool *pool, AINameSpace **space ); - - /** Frees a namespace. If you supplied a string pool, you must free it after - freeing the namespace. - @param The namespace. Upon return, this reference is invalid. - */ - AIErr (*DisposeNameSpace) ( AINameSpace *space ); - - /** Sets the value stored at a point in a namespace. - @param The namespace. - @param path The path. - @param type The new type. Types are: - \li \c integer (value: \c long ) - \li \c real (value: \c double ) - \li \c string (value: char * ) - \li \c raw (length: \c long, value: char * ) - \li \c unicodeString (value: #ai::UnicodeString *) - @param length For type \c raw only, the length of the value. - @param value The new value, of the appropriate type. - */ - AIErr (*SetValue) ( const AINameSpace *space, const char *path, const char *type, ... ); - - /** Retrieves Sets the value stored at a point in a namespace. - @param The namespace. - @param path The path. - @param type [out] A buffer in which to return the type. Types are: - \li \c integer (value: \c long ) - \li \c real (value: \c double ) - \li \c string (value: char * ) - \li \c raw (length: \c long, value: char * ) - \li \c unicodeString (value: #ai::UnicodeString *) - @param length [out] For type \c raw only, a buffer in which to return the length of the value. - @param value [out] A buffer in which to return the value, of the appropriate type. - */ - AIErr (*GetValue) ( const AINameSpace *space, const char *path, const char *type, ... ); - - /** Retrieves the type of the value stored at a point in a namespace. - @param The namespace. - @param path The path. - @param type [out] A buffer in which to return the type. Types are: - \li \c integer (value: \c long ) - \li \c real (value: \c double ) - \li \c string (value: char * ) - \li \c raw (length: \c long, value: char * ) - \li \c unicodeString (value: #ai::UnicodeString *) - */ - AIErr (*GetType) ( const AINameSpace *space, const char *path, char **type ); - - /** Reports the number of times the value stored at a point in a - namespace has been changed. Each time the value is set, the change count is incremented. - @param The namespace. - @param path The path. If this is an intermediate node in the namespace, the count is - the number of times all values stored under that node have changed. - @param count [out] A buffer in which to return the change count. - */ - AIErr (*GetChangeCount) ( const AINameSpace *space, const char *path, ai::int32 *count ); - - /** Removes the value stored at a point in a namespace. - @param The namespace. - @param path The path. If this is a partial path, all values under it are removed. - */ - AIErr (*RemoveValue) ( const AINameSpace *space, const char *path ); - - /** Reports the number of unique components that can be appended to a path to - produce paths or partial paths in the namespace. (This is like the number of - entries in a directory.) - @param The namespace. - @param path The base path. - @param count [out] A buffer in which to return the component count. - */ - AIErr (*CountPaths) ( const AINameSpace *space, const char *path, ai::int32 *count ); - - /** Retrieves a unique component that can be appended to a given path to produce a new - path or partial path in the namespace. - @param The namespace. - @param path The base path. - @param n The index position of the component. - @param nthPath [out] A buffer in which to return the component, - which includes the trailing separator if it identifies a partial path. - */ - AIErr (*GetNthPath) ( const AINameSpace *space, const char *path, ai::int32 n, char *nthPath ); - - /** Reads namespace data that was written to a file using \c #FlushValue() into a namespace, - under a given base path. - @param The namespace. - @param path The base path, used as a prefix. - @param filter The file filter with which to read the data. This does not need - to be the same filter used to serialize the keys. - */ - AIErr (*ParseValue) ( const AINameSpace *space, const char *path, AIDataFilter *filter ); - - /** Writes data from a namespace to a filter, serializing the namespace entries identified - by a partial path to a data filter. Writes only the path after the base and the - key/value pairs, not the base path. - - Use \c #ParseValue() to read data in from the resulting file to a new path prefix. - @param The namespace. - @param path The base path for the data. - @param filter The file filter with which to serialize the keys. - */ - AIErr (*FlushValue) ( const AINameSpace *space, const char *path, AIDataFilter *filter ); - -} AINameSpaceSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AINameSpace__ +#define __AINameSpace__ + +/* + * Name: AINameSpace.h + * $Revision: 4 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Name Space Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIDataFilter__ +#include "AIDataFilter.h" +#endif + +#ifndef __AIStringPool__ +#include "AIStringPool.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AINameSpace.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAINameSpaceSuite "AI Name Space Suite" +#define kAINameSpaceSuiteVersion AIAPI_VERSION(4) +#define kAINameSpaceVersion kAINameSpaceSuiteVersion + +/** @ingroup Errors + See \c #AINameSpaceSuite. */ +#define kNameSpaceErr 'NAME' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque namespace reference. See \c #AINameSpaceSuite. */ +typedef struct NameSpace AINameSpace; + +#if __BUILD_PLUGIN__ +#define kNSMaxNameLength (1024) +#define kNSMaxPathLength ((kNSMaxNameLength + 1) * 5) +#define kNSPathSeparator '/' +typedef char NSPath[kNSMaxPathLength + 1]; +typedef char NSName[kNSMaxNameLength + 1]; +#endif + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that allow you to create and manage namespaces. + A namespace is essentially a global dictionary that is not associated with any particular + document. Its keys are strings called \e paths and the associated values can be of these + types and values: + \li \c integer (value: \c long ) + \li \c real (value: \c double ) + \li \c string (value: char * ) + \li \c raw (length: \c long, value: char * ) + \li \c unicodeString (value: #ai::UnicodeString *) + + Unlike dictionaries, the contents of a namespace have a hierarchical organization. + The hierarchy of keys is like that of directory paths in a file system, with + levels divided by '/' separators. For example the key "/root/entry" has two + components, "root" and "entry". + + You can specify partial paths, and refer to all keys that are prefixed with that path. + A partial path is specified with a trailing '/' separator. The path "/" refers + to the root. + + A path can contain a maximum of 505 characters. Each component of a path (excluding + separators) can have a maximum of 100 characters. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAINameSpaceSuite and \c #kAINameSpaceVersion. + */ +typedef struct { + + /** Creates a new namespace. + @param pool The string pool from which to allocate the path component + string, or \c NULL to use the global string pool, If supplied, + the caller must dispose of the string pool after freeing the namespace. + See \c #AIStringPoolSuite. + @param space A buffer in which to return the namespace reference. + */ + AIErr (*AllocateNameSpace) ( AIStringPool *pool, AINameSpace **space ); + + /** Frees a namespace. If you supplied a string pool, you must free it after + freeing the namespace. + @param The namespace. Upon return, this reference is invalid. + */ + AIErr (*DisposeNameSpace) ( AINameSpace *space ); + + /** Sets the value stored at a point in a namespace. + @param The namespace. + @param path The path. + @param type The new type. Types are: + \li \c integer (value: \c long ) + \li \c real (value: \c double ) + \li \c string (value: char * ) + \li \c raw (length: \c long, value: char * ) + \li \c unicodeString (value: #ai::UnicodeString *) + @param length For type \c raw only, the length of the value. + @param value The new value, of the appropriate type. + */ + AIErr (*SetValue) ( const AINameSpace *space, const char *path, const char *type, ... ); + + /** Retrieves Sets the value stored at a point in a namespace. + @param The namespace. + @param path The path. + @param type [out] A buffer in which to return the type. Types are: + \li \c integer (value: \c long ) + \li \c real (value: \c double ) + \li \c string (value: char * ) + \li \c raw (length: \c long, value: char * ) + \li \c unicodeString (value: #ai::UnicodeString *) + @param length [out] For type \c raw only, a buffer in which to return the length of the value. + @param value [out] A buffer in which to return the value, of the appropriate type. + */ + AIErr (*GetValue) ( const AINameSpace *space, const char *path, const char *type, ... ); + + /** Retrieves the type of the value stored at a point in a namespace. + @param The namespace. + @param path The path. + @param type [out] A buffer in which to return the type. Types are: + \li \c integer (value: \c long ) + \li \c real (value: \c double ) + \li \c string (value: char * ) + \li \c raw (length: \c long, value: char * ) + \li \c unicodeString (value: #ai::UnicodeString *) + */ + AIErr (*GetType) ( const AINameSpace *space, const char *path, char **type ); + + /** Reports the number of times the value stored at a point in a + namespace has been changed. Each time the value is set, the change count is incremented. + @param The namespace. + @param path The path. If this is an intermediate node in the namespace, the count is + the number of times all values stored under that node have changed. + @param count [out] A buffer in which to return the change count. + */ + AIErr (*GetChangeCount) ( const AINameSpace *space, const char *path, ai::int32 *count ); + + /** Removes the value stored at a point in a namespace. + @param The namespace. + @param path The path. If this is a partial path, all values under it are removed. + */ + AIErr (*RemoveValue) ( const AINameSpace *space, const char *path ); + + /** Reports the number of unique components that can be appended to a path to + produce paths or partial paths in the namespace. (This is like the number of + entries in a directory.) + @param The namespace. + @param path The base path. + @param count [out] A buffer in which to return the component count. + */ + AIErr (*CountPaths) ( const AINameSpace *space, const char *path, ai::int32 *count ); + + /** Retrieves a unique component that can be appended to a given path to produce a new + path or partial path in the namespace. + @param The namespace. + @param path The base path. + @param n The index position of the component. + @param nthPath [out] A buffer in which to return the component, + which includes the trailing separator if it identifies a partial path. + */ + AIErr (*GetNthPath) ( const AINameSpace *space, const char *path, ai::int32 n, char *nthPath ); + + /** Reads namespace data that was written to a file using \c #FlushValue() into a namespace, + under a given base path. + @param The namespace. + @param path The base path, used as a prefix. + @param filter The file filter with which to read the data. This does not need + to be the same filter used to serialize the keys. + */ + AIErr (*ParseValue) ( const AINameSpace *space, const char *path, AIDataFilter *filter ); + + /** Writes data from a namespace to a filter, serializing the namespace entries identified + by a partial path to a data filter. Writes only the path after the base and the + key/value pairs, not the base path. + + Use \c #ParseValue() to read data in from the resulting file to a new path prefix. + @param The namespace. + @param path The base path for the data. + @param filter The file filter with which to serialize the keys. + */ + AIErr (*FlushValue) ( const AINameSpace *space, const char *path, AIDataFilter *filter ); + +} AINameSpaceSuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AINotifier.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AINotifier.h index c5d0608..d02d6e6 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AINotifier.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AINotifier.h @@ -1,196 +1,196 @@ -#ifndef __AINotifier__ -#define __AINotifier__ - -/* - * Name: AINotifier.h - * $Revision: 5 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Notifier Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AINotifier.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAINotifierSuite "AI Notifier Suite" -#define kAINotifierSuiteVersion AIAPI_VERSION(4) -#define kAINotifierVersion kAINotifierSuiteVersion - -/** @ingroup Callers - See \c #AINotifierSuite. */ -#define kCallerAINotify "AI Notifier" -/** @ingroup Selectors - See \c #AINotifierSuite. */ -#define kSelectorAINotify "AI Notify" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a notifier, never dereferenced. See \c #AINotifierSuite. */ -typedef struct _t_AINotifierOpaque *AINotifierHandle; - -/** The contents of a notifier message. */ -struct AINotifierMessage { - /** The message data */ - SPMessageData d; - /** The notifier handle returned from \c #AINotifierSuite::AddNotifier(). If more than - one notifier is installed, can be used to determine the instance that should - handle the message. */ - AINotifierHandle notifier; - /** The type of event for which the plug-in is being notified. - If more than one notifier type is installed, can be used alone or - with the notifier reference to determine the best way to handle - the call. */ - const char *type; - /** Data whose type depends on the type of notification being sent. - For instance, notifiers related to plug-in tools receive - the \c #AIToolHandle to which the notifier message refers. */ - void *notifyData; -}; - - -/******************************************************************************* - ** - ** Suite Record - ** - **/ - -/** @ingroup Suites - This suite provides functions that allow your plug-in to use Illustrator's - event notification system. - - Illustrator sends a notifier to plug-in to inform it of an events for which - it has registered an interest. These functions allow you to request particular - notifications, turn them on and off, and find out which plug-ins are listening - to notifications. - - Notifiers can be used by themselves as a background process or with other plug-in - types, such as a menus or windows, to learn when an update is needed. - Specific notifier type definitions are not a part of this suite, - but are found in the suites to which they are related. For instance, the \c #AIArtSuite - defines the \c #kAIArtSelectionChangedNotifier and \c #kAIArtPropertiesChangedNotifier. - - Illustrator notifies a plug-in of an event by sending a message to its main entry - point with the caller \c #kCallerAINotify and selector \c #kSelectorAINotify. The - message data is defined by \c #AINotifierMessage. - - Notifications are sometimes sent during an idle loop, so a plug-in should not rely - on receiving them synchronously with a document state change. Some notifications - are sent when something might have changed, but do not guarantee that something has - changed. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAINotifierSuite and \c #kAINotifierVersion. - */ -struct AINotifierSuite { - - /** Registers interest in a notification. Use at startup. - @param self This plug-in. - @param name The unique identifying name of this plug-in. - @param type The notification type, as defined in the related suite. - See @ref Notifiers. - @param notifier [out] A buffer in which to return the notifier reference. - If your plug-in installs multiple notifications, store this in ' - \c globals to compare when receiving a notification. - */ - AIAPI AIErr (*AddNotifier) ( SPPluginRef self, const char *name, const char *type, - AINotifierHandle *notifier ); - - /** Retrieves the unique identifying name of a notifier. - @param notifier The notifier reference. - @param name [out] A buffer in which to return the name. Do not modify this string. - */ - AIAPI AIErr (*GetNotifierName) ( AINotifierHandle notifier, const char **name ); - - /** Retrieves the type of a notifier. - @param notifier The notifier reference. - @param type [out] A buffer in which to return the type. Do not modify this string. - */ - AIAPI AIErr (*GetNotifierType) ( AINotifierHandle notifier, const char **type ); - - /** Reports whether a notifier is active. An active notifier can receive events. - @param notifier The notifier reference. - @param active [out] A buffer in which to return true if the notifier is active. - */ - AIAPI AIErr (*GetNotifierActive) ( AINotifierHandle notifier, AIBoolean *active ); - - /** Turns a notifier on or off. When a notifier is active (on) it receives - notification of events from Illustrator. - @param notifier The notifier reference. - @param active True to turn the notifier on, false to turn it off. - */ - AIAPI AIErr (*SetNotifierActive) ( AINotifierHandle notifier, AIBoolean active ); - - /** Retrieves the plug-in that installed a notifier. You can pass this - reference to functions in the \c #AIPluginSuite. - @param notifier The notifier reference. - @param plugin [out] A buffer in which to return the plug-in reference. - */ - AIAPI AIErr (*GetNotifierPlugin) ( AINotifierHandle notifier, SPPluginRef *plugin ); - - /** Gets the number of installed notifiers. Use this with \c #GetNthNotifier() - to iterate through notifiers. - @param count [out] A buffer in which to return the number of notification registrations. - */ - AIAPI AIErr (*CountNotifiers) ( ai::int32 *count ); - - /** Retrieves a notifier by index position. Use this with \c #CountNotifiers() - to iterate through notifiers. - @param n The 0-based position index of the notifier. - @param notifier [out] A buffer in which to return the notifier reference. - */ - AIAPI AIErr (*GetNthNotifier) ( ai::int32 n, AINotifierHandle *notifier ); - - /** Broadcasts a notification to all the plug-ins that have subscribed to the - specified type. Use this mechanism for communicating with other plug-ins. - @param type The notification type, as defined in the related suite. - See @ref Notifiers. - @param notifyData Type-specific data to pass to the notification. - */ - AIAPI AIErr (*Notify) ( const char *type, void *notifyData ); - -}; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AINotifier__ +#define __AINotifier__ + +/* + * Name: AINotifier.h + * $Revision: 5 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Notifier Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AINotifier.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAINotifierSuite "AI Notifier Suite" +#define kAINotifierSuiteVersion AIAPI_VERSION(4) +#define kAINotifierVersion kAINotifierSuiteVersion + +/** @ingroup Callers + See \c #AINotifierSuite. */ +#define kCallerAINotify "AI Notifier" +/** @ingroup Selectors + See \c #AINotifierSuite. */ +#define kSelectorAINotify "AI Notify" + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a notifier, never dereferenced. See \c #AINotifierSuite. */ +typedef struct _t_AINotifierOpaque *AINotifierHandle; + +/** The contents of a notifier message. */ +struct AINotifierMessage { + /** The message data */ + SPMessageData d; + /** The notifier handle returned from \c #AINotifierSuite::AddNotifier(). If more than + one notifier is installed, can be used to determine the instance that should + handle the message. */ + AINotifierHandle notifier; + /** The type of event for which the plug-in is being notified. + If more than one notifier type is installed, can be used alone or + with the notifier reference to determine the best way to handle + the call. */ + const char *type; + /** Data whose type depends on the type of notification being sent. + For instance, notifiers related to plug-in tools receive + the \c #AIToolHandle to which the notifier message refers. */ + void *notifyData; +}; + + +/******************************************************************************* + ** + ** Suite Record + ** + **/ + +/** @ingroup Suites + This suite provides functions that allow your plug-in to use Illustrator's + event notification system. + + Illustrator sends a notifier to plug-in to inform it of an events for which + it has registered an interest. These functions allow you to request particular + notifications, turn them on and off, and find out which plug-ins are listening + to notifications. + + Notifiers can be used by themselves as a background process or with other plug-in + types, such as a menus or windows, to learn when an update is needed. + Specific notifier type definitions are not a part of this suite, + but are found in the suites to which they are related. For instance, the \c #AIArtSuite + defines the \c #kAIArtSelectionChangedNotifier and \c #kAIArtPropertiesChangedNotifier. + + Illustrator notifies a plug-in of an event by sending a message to its main entry + point with the caller \c #kCallerAINotify and selector \c #kSelectorAINotify. The + message data is defined by \c #AINotifierMessage. + + Notifications are sometimes sent during an idle loop, so a plug-in should not rely + on receiving them synchronously with a document state change. Some notifications + are sent when something might have changed, but do not guarantee that something has + changed. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAINotifierSuite and \c #kAINotifierVersion. + */ +struct AINotifierSuite { + + /** Registers interest in a notification. Use at startup. + @param self This plug-in. + @param name The unique identifying name of this plug-in. + @param type The notification type, as defined in the related suite. + See @ref Notifiers. + @param notifier [out] A buffer in which to return the notifier reference. + If your plug-in installs multiple notifications, store this in ' + \c globals to compare when receiving a notification. + */ + AIAPI AIErr (*AddNotifier) ( SPPluginRef self, const char *name, const char *type, + AINotifierHandle *notifier ); + + /** Retrieves the unique identifying name of a notifier. + @param notifier The notifier reference. + @param name [out] A buffer in which to return the name. Do not modify this string. + */ + AIAPI AIErr (*GetNotifierName) ( AINotifierHandle notifier, const char **name ); + + /** Retrieves the type of a notifier. + @param notifier The notifier reference. + @param type [out] A buffer in which to return the type. Do not modify this string. + */ + AIAPI AIErr (*GetNotifierType) ( AINotifierHandle notifier, const char **type ); + + /** Reports whether a notifier is active. An active notifier can receive events. + @param notifier The notifier reference. + @param active [out] A buffer in which to return true if the notifier is active. + */ + AIAPI AIErr (*GetNotifierActive) ( AINotifierHandle notifier, AIBoolean *active ); + + /** Turns a notifier on or off. When a notifier is active (on) it receives + notification of events from Illustrator. + @param notifier The notifier reference. + @param active True to turn the notifier on, false to turn it off. + */ + AIAPI AIErr (*SetNotifierActive) ( AINotifierHandle notifier, AIBoolean active ); + + /** Retrieves the plug-in that installed a notifier. You can pass this + reference to functions in the \c #AIPluginSuite. + @param notifier The notifier reference. + @param plugin [out] A buffer in which to return the plug-in reference. + */ + AIAPI AIErr (*GetNotifierPlugin) ( AINotifierHandle notifier, SPPluginRef *plugin ); + + /** Gets the number of installed notifiers. Use this with \c #GetNthNotifier() + to iterate through notifiers. + @param count [out] A buffer in which to return the number of notification registrations. + */ + AIAPI AIErr (*CountNotifiers) ( ai::int32 *count ); + + /** Retrieves a notifier by index position. Use this with \c #CountNotifiers() + to iterate through notifiers. + @param n The 0-based position index of the notifier. + @param notifier [out] A buffer in which to return the notifier reference. + */ + AIAPI AIErr (*GetNthNotifier) ( ai::int32 n, AINotifierHandle *notifier ); + + /** Broadcasts a notification to all the plug-ins that have subscribed to the + specified type. Use this mechanism for communicating with other plug-ins. + @param type The notification type, as defined in the related suite. + See @ref Notifiers. + @param notifyData Type-specific data to pass to the notification. + */ + AIAPI AIErr (*Notify) ( const char *type, void *notifyData ); + +}; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIObjectSet.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIObjectSet.h index d732dca..93f6886 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIObjectSet.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIObjectSet.h @@ -1,347 +1,340 @@ -#ifndef __AIObjectSet__ -#define __AIObjectSet__ - -/* - * Name: AIObjectSet.h - * $Revision: 17 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Object Set Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#include "AIUnicodeString.h" - - -#include "AIHeaderBegin.h" - -/** @file AIObjectSet.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - /** Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - - @internal - An object map is a set of type/offset pairs giving the location of each object handle - in the object definition. It is terminated by an entry with objectType = kAIObjectMapDone. - An entry can be \c NULL for a particular instance, which indicates that although some - instances of the type store an object handle there, this particular one does not. - If the map says there is an object of a given type at a given offset, the data at - that offset must be either a valid object handle of the appropriate type, or \c NULL. -*/ -#define kAIObjectSetSuite "AI ObjectSet Suite" -#define kAIObjectSetSuiteVersion4 AIAPI_VERSION(4) -#define kAIObjectSetSuiteVersion kAIObjectSetSuiteVersion4 -#define kAIObjectSetVersion kAIObjectSetSuiteVersion - -/** @ingroup Notifiers - Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ -#define kAIObjectSetChangedNotifier "AI Object Set Changed Notifier" -/** @ingroup Notifiers - Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ -#define kAIReplaceColorNotifier "AI Replace Color Notifier" - -/** @ingroup Errors - Object set error. Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ -#define kNameClashErr 'NmCl' -/** @ingroup Errors - Object set error. Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ -#define kUninitializedDataErr 'init' -/** @ingroup Errors - Object set error. Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ -#define kCantDoThatNowErr '!now' - -/** @ingroup Callers - Object set caller. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite */ -#define kCallerAIObjectSet "AI Object Set" - -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - The object in the message is about to be permanently disposed. - Do not free the internal or external memory (the suite will do this) but dispose - of any referred-to memory. Subobject and change fields are unused. -*/ -#define kSelectorObjectSetDisposeContents "AI Object Set Dispose Contents" -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - Mark all objects managed by this plug-in that are used in the - current document by calling AIObjectSetSuite::MarkObjectInUse(). If markArt is not nil, just - mark all objects within that sub-tree. Set, object, subobject, and change fields are unused. -*/ -#define kSelectorObjectSetMarkUsage "AI Object Set Mark Usage" -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - - Fetch the external representation for this object and update - the internal. Also serves to notify of a new object; this will be the first selector received - for a new one. Subobject and change fields are unused. -*/ -#define kSelectorObjectSetUpdateInternal "AI Object Set Update Internal" -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - Fetch the internal representation for this object and update - the external. Subobject and change fields are unused. -*/ -#define kSelectorObjectSetUpdateExternal "AI Object Set Update External" -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - The object contains a reference to the object described in the - subobject fields, and that object is going away. Remove the reference to it and make any - necessary changes to the artwork. Change fields are unused -*/ -#define kSelectorObjectSetPurge "AI Object Set Purge" -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - The object has been changed as a result of an undo/redo. Subobject - fields are unused. -*/ -#define kSelectorObjectSetChange "AI Object Set Change" -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - The object contains a reference to an object that has changed. - Make any necessary changes to the artwork. Subobject and change fields are unused. - (Note, change from AI8, which set subobject). -*/ -#define kSelectorObjectSetChangeIndirect "AI Object Set Change Indirect" -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - The object has been copied into the current document. - Subobject and change fields are unused. -*/ -#define kSelectorObjectSetCopy "AI Object Set Copy" -/** @ingroup Selectors - Object set selector. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - All UpdateInternal calls for objects that were in the - document are over with. Called once per plug-in, not per object set. All fields are unused. -*/ -#define kSelectorObjectSetInitializationDone "AI Object Set Initialization Done" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to an object set. - Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ -typedef struct _t_AIObjectSetOpaque *AIObjectSetHandle; -/** Opaque reference to an object in an object set. - Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ -typedef struct _t_AIObjectOpaque *AIObjectHandle; - -/** Types of changes that can be made to object sets. - Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite */ -enum AIObjectSetChangeType { - kAIObjectSetChangeDelete, - kAIObjectSetChangeNew, - kAIObjectSetChangeChange, - kAIObjectSetChangeRename -}; - -/** Types of objects that can be stored in an object set. - Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite */ -enum AIObjectMapType { - kAIObjectMapCustomColor, - kAIObjectMapPattern, - kAIObjectMapBrushPattern, - kAIObjectMapGradient, - kAIObjectMapPluginObject, - kAIObjectMapDone = -1 -}; - -/** Object map for object set. Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite */ -struct AIObjectMap { - /** A value from #AIObjectMapType */ - ai::int16 objectType; - ai::int16 offset; -}; - -/** Color replacement types in object sets. - Object sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite */ -enum AIReplaceColorTag { - kRepGrayColor = kGrayColor, - kRepFourColor = kFourColor, - kRepPattern = kPattern, - kRepCustomColor = kCustomColor, - kRepGradient = kGradient, - kRepThreeColor = kThreeColor, - kRepNoneColor = kNoneColor, - kRepBrushPattern = kNoneColor + 5, - - kRepColorDone = -1, - kRepColorSameTagAsInAIColor = -2 - -}; - -/** For object sets, which are deprecated in favor of dictionaries, - see \c #AIDictionarySuite */ -struct AIReplaceColor { - AIReplaceColorTag kind; /* Used to determine the color variant */ - AIColorUnion c; -}; - -/** For object sets, which are deprecated in favor of dictionaries, - see \c #AIDictionarySuite */ -struct AIReplaceColorNotifierData { - ASInt32 pairs; - AIReplaceColor *colorPtr; -}; - -/** The contents of an object-set message. - Object Sets are deprecated in favor of dictionaries, - see \c #AIDictionarySuite - @internal - Fields are used for the different selectors as indicated: -
\c #kSelectorObjectSetDisposeContents. The object in the message is about to be permanently disposed. - Do not free the internal or external memory (the suite will do this) but dispose - of any referred-to memory. Subobject and change fields are unused. -
\c #kSelectorObjectSetMarkUsage. Mark all objects managed by this plug-in that are used in the - current document by calling AIObjectSetSuite::MarkObjectInUse(). If markArt is not nil, just - mark all objects within that sub-tree. Set, object, subobject, and change fields are unused. -
\c #kSelectorObjectSetUpdateInternal. Fetch the external representation for this object and update - the internal. Also serves to notify of a new object; this will be the first selector received - for a new one. Subobject and change fields are unused. -
\c #kSelectorObjectSetUpdateExternal. Fetch the internal representation for this object and update - the external. Subobject and change fields are unused. -
\c #kSelectorObjectSetPurge. The object contains a reference to the object described in the - subobject fields, and that object is going away. Remove the reference to it and make any - necessary changes to the artwork. Change fields are unused -
\c #kSelectorObjectSetChange. The object has been changed as a result of an undo/redo. Subobject - fields are unused. -
\c #kSelectorObjectSetChangeIndirect. The object contains a reference to an object that has changed. - Make any necessary changes to the artwork. Subobject and change fields are unused. - (Note, change from AI8, which set subobject). -
\c #kSelectorObjectSetCopy. The object has been copied into the current document. - Subobject and change fields are unused. -
\c #kSelectorObjectSetInitializationDone. All UpdateInternal calls for objects that were in the - document are over with. Called once per plug-in, not per object set. All fields are unused. - */ -struct AIObjectSetMessage { - SPMessageData d; - AIObjectSetHandle set; - AIObjectHandle object; - ai::int16 subobjectType; - union { - AIPatternHandle pattern; - AIGradientHandle gradient; - AICustomColorHandle ccolor; - struct { - AIObjectSetHandle set; - AIObjectHandle object; - } object; - } subobject; - AIObjectSetChangeType changeType; - AIArtHandle markArt; - AIVersion aiVersion; -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @deprecated - Object sets provide an obsolete mechanism for attaching global information to a document. Their use is - deprecated in favor of dictionaries. Each document contains a dictionary where arbitrary information - can be stored. See \c #AIDocumentSuite::GetDictionary() and \c #AIDocumentSuite::GetNonRecordedDictionary(). - */ -struct AIObjectSetSuite { - - AIAPI AIErr (*NewObjectSet) ( SPPluginRef self, const unsigned char *name, const AIObjectMap *map, AIObjectSetHandle *set ); - AIAPI AIErr (*CountObjectSets) ( ai::int32 *count ); - AIAPI AIErr (*GetNthObjectSet) ( ai::int32 n, AIObjectSetHandle *set ); - AIAPI AIErr (*GetObjectSetName) ( AIObjectSetHandle set, unsigned char *name ); - AIAPI AIErr (*GetObjectSetByName) ( const unsigned char *name, AIObjectSetHandle *set ); - AIAPI AIErr (*GetObjectSetMap) ( AIObjectSetHandle set, const AIObjectMap **map ); - AIAPI AIErr (*NewObject) ( AIObjectSetHandle setHandle, const ai::UnicodeString& name, const void *def, - ai::int32 defLen, AIObjectHandle *object ); - AIAPI AIErr (*DeleteObject) ( AIObjectSetHandle setHandle, AIObjectHandle object); - AIAPI AIErr (*SetObjectInternal) ( AIObjectSetHandle setHandle, AIObjectHandle object, const void *data, ai::int32 dataLen); - AIAPI AIErr (*SetObjectExternal) ( AIObjectSetHandle setHandle, AIObjectHandle object, const char *data); - AIAPI AIErr (*GetObjectInternal) ( AIObjectSetHandle setHandle, AIObjectHandle object, const void **data, ai::int32 *dataLen); - AIAPI AIErr (*GetObjectExternal) ( AIObjectSetHandle setHandle, AIObjectHandle object, const char **data); - AIAPI AIErr (*CountObjects) ( AIObjectSetHandle setHandle, ai::int32 *count); - AIAPI AIErr (*GetNthObject) ( AIObjectSetHandle setHandle, ai::int32 n, AIObjectHandle *object); - AIAPI AIErr (*GetObjectName) ( AIObjectSetHandle setHandle, AIObjectHandle object, ai::UnicodeString& name); - AIAPI AIErr (*SetObjectName) ( AIObjectSetHandle setHandle, AIObjectHandle object, const ai::UnicodeString& name); - AIAPI AIErr (*GetObjectByName) ( AIObjectSetHandle setHandle, ai::UnicodeString& name, AIObjectHandle *object); - AIAPI AIErr (*NewObjectName) ( AIObjectSetHandle setHandle, ai::UnicodeString& name ); - AIAPI AIErr (*MarkObjectInUse) ( AIObjectSetHandle setHandle, AIObjectHandle object); - AIAPI AIErr (*RetargetForCurrentDocument) ( AIObjectHandle object, AIObjectHandle *newObj ); - - AIAPI AIErr (*GetExternalObjectName) (AIObjectSetHandle setHandle, AIObjectHandle object, - AIVersion aiVersion, char *buf, ai::int32* bufLen ); - - AIAPI AIErr (*SetObjectExternalAlternate) ( AIObjectSetHandle setHandle, AIObjectHandle object, const char *data, - ai::uint32 majorVersion, ai::uint32 minorVersion); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#pragma once + +/* + * Name: AIObjectSet.h + * $Revision: 17 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Object Set Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#include "AIUnicodeString.h" + + +#include "AIHeaderBegin.h" + +/** @file AIObjectSet.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + /** Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + + @internal + An object map is a set of type/offset pairs giving the location of each object handle + in the object definition. It is terminated by an entry with objectType = kAIObjectMapDone. + An entry can be \c NULL for a particular instance, which indicates that although some + instances of the type store an object handle there, this particular one does not. + If the map says there is an object of a given type at a given offset, the data at + that offset must be either a valid object handle of the appropriate type, or \c NULL. +*/ +#define kAIObjectSetSuite "AI ObjectSet Suite" +#define kAIObjectSetSuiteVersion5 AIAPI_VERSION(5) +#define kAIObjectSetSuiteVersion kAIObjectSetSuiteVersion5 +#define kAIObjectSetVersion kAIObjectSetSuiteVersion + +/** @ingroup Notifiers + Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ +#define kAIObjectSetChangedNotifier "AI Object Set Changed Notifier" +/** @ingroup Notifiers + Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ +#define kAIReplaceColorNotifier "AI Replace Color Notifier" + +/** @ingroup Errors + Object set error. Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ +#define kNameClashErr 'NmCl' +/** @ingroup Errors + Object set error. Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ +#define kUninitializedDataErr 'init' +/** @ingroup Errors + Object set error. Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ +#define kCantDoThatNowErr '!now' + +/** @ingroup Callers + Object set caller. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite */ +#define kCallerAIObjectSet "AI Object Set" + +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + The object in the message is about to be permanently disposed. + Do not free the internal or external memory (the suite will do this) but dispose + of any referred-to memory. Subobject and change fields are unused. +*/ +#define kSelectorObjectSetDisposeContents "AI Object Set Dispose Contents" +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + Mark all objects managed by this plug-in that are used in the + current document by calling AIObjectSetSuite::MarkObjectInUse(). If markArt is not nullptr, just + mark all objects within that sub-tree. Set, object, subobject, and change fields are unused. +*/ +#define kSelectorObjectSetMarkUsage "AI Object Set Mark Usage" +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + - Fetch the external representation for this object and update + the internal. Also serves to notify of a new object; this will be the first selector received + for a new one. Subobject and change fields are unused. +*/ +#define kSelectorObjectSetUpdateInternal "AI Object Set Update Internal" +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + Fetch the internal representation for this object and update + the external. Subobject and change fields are unused. +*/ +#define kSelectorObjectSetUpdateExternal "AI Object Set Update External" +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + The object contains a reference to the object described in the + subobject fields, and that object is going away. Remove the reference to it and make any + necessary changes to the artwork. Change fields are unused +*/ +#define kSelectorObjectSetPurge "AI Object Set Purge" +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + The object has been changed as a result of an undo/redo. Subobject + fields are unused. +*/ +#define kSelectorObjectSetChange "AI Object Set Change" +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + The object contains a reference to an object that has changed. + Make any necessary changes to the artwork. Subobject and change fields are unused. + (Note, change from AI8, which set subobject). +*/ +#define kSelectorObjectSetChangeIndirect "AI Object Set Change Indirect" +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + The object has been copied into the current document. + Subobject and change fields are unused. +*/ +#define kSelectorObjectSetCopy "AI Object Set Copy" +/** @ingroup Selectors + Object set selector. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + All UpdateInternal calls for objects that were in the + document are over with. Called once per plug-in, not per object set. All fields are unused. +*/ +#define kSelectorObjectSetInitializationDone "AI Object Set Initialization Done" + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to an object set. + Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ +typedef struct _t_AIObjectSetOpaque *AIObjectSetHandle; +/** Opaque reference to an object in an object set. + Object sets are deprecated in favor of dictionaries, see \c #AIDictionarySuite */ +typedef struct _t_AIObjectOpaque *AIObjectHandle; + +/** Types of changes that can be made to object sets. + Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite */ +enum AIObjectSetChangeType { + kAIObjectSetChangeDelete, + kAIObjectSetChangeNew, + kAIObjectSetChangeChange, + kAIObjectSetChangeRename +}; + +/** Types of objects that can be stored in an object set. + Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite */ +enum AIObjectMapType { + kAIObjectMapCustomColor, + kAIObjectMapPattern, + kAIObjectMapBrushPattern, + kAIObjectMapGradient, + kAIObjectMapPluginObject, + kAIObjectMapDone = -1 +}; + +/** Object map for object set. Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite */ +struct AIObjectMap { + /** A value from #AIObjectMapType */ + ai::int16 objectType; + ai::int16 offset; +}; + +/** Color replacement types in object sets. + Object sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite */ +enum AIReplaceColorTag { + kRepGrayColor = kGrayColor, + kRepFourColor = kFourColor, + kRepPattern = kPattern, + kRepCustomColor = kCustomColor, + kRepGradient = kGradient, + kRepThreeColor = kThreeColor, + kRepNoneColor = kNoneColor, + kRepBrushPattern = kNoneColor + 5, + + kRepColorDone = -1, + kRepColorSameTagAsInAIColor = -2 + +}; + +/** For object sets, which are deprecated in favor of dictionaries, + see \c #AIDictionarySuite */ +struct AIReplaceColor { + AIReplaceColorTag kind; /* Used to determine the color variant */ + AIColorUnion c; +}; + +/** For object sets, which are deprecated in favor of dictionaries, + see \c #AIDictionarySuite */ +struct AIReplaceColorNotifierData { + ASInt32 pairs; + AIReplaceColor *colorPtr; +}; + +/** The contents of an object-set message. + Object Sets are deprecated in favor of dictionaries, + see \c #AIDictionarySuite + @internal + Fields are used for the different selectors as indicated: +
\c #kSelectorObjectSetDisposeContents. The object in the message is about to be permanently disposed. + Do not free the internal or external memory (the suite will do this) but dispose + of any referred-to memory. Subobject and change fields are unused. +
\c #kSelectorObjectSetMarkUsage. Mark all objects managed by this plug-in that are used in the + current document by calling AIObjectSetSuite::MarkObjectInUse(). If markArt is not nullptr, just + mark all objects within that sub-tree. Set, object, subobject, and change fields are unused. +
\c #kSelectorObjectSetUpdateInternal. Fetch the external representation for this object and update + the internal. Also serves to notify of a new object; this will be the first selector received + for a new one. Subobject and change fields are unused. +
\c #kSelectorObjectSetUpdateExternal. Fetch the internal representation for this object and update + the external. Subobject and change fields are unused. +
\c #kSelectorObjectSetPurge. The object contains a reference to the object described in the + subobject fields, and that object is going away. Remove the reference to it and make any + necessary changes to the artwork. Change fields are unused +
\c #kSelectorObjectSetChange. The object has been changed as a result of an undo/redo. Subobject + fields are unused. +
\c #kSelectorObjectSetChangeIndirect. The object contains a reference to an object that has changed. + Make any necessary changes to the artwork. Subobject and change fields are unused. + (Note, change from AI8, which set subobject). +
\c #kSelectorObjectSetCopy. The object has been copied into the current document. + Subobject and change fields are unused. +
\c #kSelectorObjectSetInitializationDone. All UpdateInternal calls for objects that were in the + document are over with. Called once per plug-in, not per object set. All fields are unused. + */ +struct AIObjectSetMessage { + SPMessageData d; + AIObjectSetHandle set; + AIObjectHandle object; + ai::int16 subobjectType; + union { + AIPatternHandle pattern; + AIGradientHandle gradient; + AICustomColorHandle ccolor; + struct { + AIObjectSetHandle set; + AIObjectHandle object; + } object; + } subobject; + AIObjectSetChangeType changeType; + AIArtHandle markArt; + AIVersion aiVersion; +}; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @deprecated + Object sets provide an obsolete mechanism for attaching global information to a document. Their use is + deprecated in favor of dictionaries. Each document contains a dictionary where arbitrary information + can be stored. See \c #AIDocumentSuite::GetDictionary() and \c #AIDocumentSuite::GetNonRecordedDictionary(). + */ +struct AIObjectSetSuite { + + AIAPI AIErr (*NewObjectSet) ( SPPluginRef self, const unsigned char *name, const AIObjectMap *map, AIObjectSetHandle *set ); + AIAPI AIErr (*CountObjectSets) ( ai::int32 *count ); + AIAPI AIErr (*GetNthObjectSet) ( ai::int32 n, AIObjectSetHandle *set ); + AIAPI AIErr (*GetObjectSetName) ( AIObjectSetHandle set, unsigned char *name ); + AIAPI AIErr (*GetObjectSetByName) ( const unsigned char *name, AIObjectSetHandle *set ); + AIAPI AIErr (*GetObjectSetMap) ( AIObjectSetHandle set, const AIObjectMap **map ); + AIAPI AIErr (*NewObject) ( AIObjectSetHandle setHandle, const ai::UnicodeString& name, const void *def, + ai::int32 defLen, AIObjectHandle *object ); + AIAPI AIErr (*DeleteObject) ( AIObjectSetHandle setHandle, AIObjectHandle object); + AIAPI AIErr (*SetObjectInternal) ( AIObjectSetHandle setHandle, AIObjectHandle object, const void *data, ai::int32 dataLen); + AIAPI AIErr (*SetObjectExternal) ( AIObjectSetHandle setHandle, AIObjectHandle object, const char *data); + AIAPI AIErr (*GetObjectInternal) ( AIObjectSetHandle setHandle, AIObjectHandle object, const void **data, ai::int32 *dataLen); + AIAPI AIErr (*GetObjectExternal) ( AIObjectSetHandle setHandle, AIObjectHandle object, const char **data); + AIAPI AIErr (*CountObjects) ( AIObjectSetHandle setHandle, ai::int32 *count); + AIAPI AIErr (*GetNthObject) ( AIObjectSetHandle setHandle, ai::int32 n, AIObjectHandle *object); + AIAPI AIErr (*GetObjectName) ( AIObjectSetHandle setHandle, AIObjectHandle object, ai::UnicodeString& name); + AIAPI AIErr (*SetObjectName) ( AIObjectSetHandle setHandle, AIObjectHandle object, const ai::UnicodeString& name); + AIAPI AIErr (*GetObjectByName) ( AIObjectSetHandle setHandle, ai::UnicodeString& name, AIObjectHandle *object); + AIAPI AIErr (*NewObjectName) ( AIObjectSetHandle setHandle, ai::UnicodeString& name ); + AIAPI AIErr (*MarkObjectInUse) ( AIObjectSetHandle setHandle, AIObjectHandle object); + AIAPI AIErr (*RetargetForCurrentDocument) ( AIObjectHandle object, AIObjectHandle *newObj ); + + AIAPI AIErr (*GetExternalObjectName) (AIObjectSetHandle setHandle, AIObjectHandle object, + AIVersion aiVersion, char *buf, ai::int32* bufLen ); + +}; + + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIOverrideColorConversion.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIOverrideColorConversion.h index 677ec2c..0fa9d60 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIOverrideColorConversion.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIOverrideColorConversion.h @@ -1,561 +1,552 @@ -#ifndef __OverrideColorConversion__ -#define __OverrideColorConversion__ - -/* - * Name: AIOverrideColorConversion.h - * $Revision: 13 $ - * Purpose: Adobe Illustrator Suite to replace internal color - * conversion functionality. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2002-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" /* Include Adobe Standard Types */ -#endif - -#include "AIHeaderBegin.h" - -/** @file AIOverrideColorConversion.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIOverrideColorConversionSuite "Override AI Color Conversion Suite" -#define kAIOverrideColorConversionSuiteVersion7 AIAPI_VERSION(7) -#define kAIOverrideColorConversionSuiteVersion kAIOverrideColorConversionSuiteVersion7 -#define kAIOverrideColorConversionVersion kAIOverrideColorConversionSuiteVersion - - -// JM - must synch with those in picasso.h -/** Working colorspace types */ -enum AIWorkingColorSpace { - /** Grayscale */ - kGrayWS = 0, - /** RGB */ - kRGBWS = 1, - /** CMYK */ - kCMYKWS = 2 -}; - - -/** RGB image formats */ -enum AIRGBPixelFormat { - /** With alpha channel */ - kARGB = 0, - /** Without alpha channel */ - kRGB = 1 -}; - - -/* CMYK separations/channels */ - -#ifndef kCyan -#define kCyan 0x00000001 -#endif - -#ifndef kMagenta -#define kMagenta 0x00000002 -#endif - -#ifndef kYellow -#define kYellow 0x00000004 -#endif - -#ifndef kBlack -#define kBlack 0x00000008 -#endif - -#ifndef kCMYK -#define kCMYK 0x0000000f -#endif - -/** Rendering intents */ -enum AIRenderingIntent { - kICPerceptual = 0, - kICRelativeColorimetric = 1, - kICSaturation = 2, - kICAbsoluteColorimetric = 3 -}; - -/** Policies on what to do with a document's color profile when it is opened */ -enum AIFileOpenColorProfilePolicy { - /** Convert document to working space */ - kConvert = 0, - /** Remove profile from doc */ - kUntag = 1, - /** Preserve the documents profile */ - kPreserve = 2, - /** User decided to cancel the open */ - kCancel = 3 -}; - -/** Policies on what to do with a document's color profile when it is saved */ -enum AIFileSaveColorProfilePolicy { - /** Do not save a profile */ - kNoProfile = 0, - /** Save with the working space profile */ - kWSProfile = 1, - /** Save with the document profile */ - kDocProfile = 2 -}; - -/** Color conversion policies inferred from the color settings dialog, - on whether to do color conversions within the same - colorspace family (such as RGB to RGB, or CMYK to CMYK) */ -typedef enum ColorConvPolicy -{ - /** Do conversion to maintain color appearance */ - kPreserveAppearance, - /** Do not convert colors, instead maintain numerical values */ - kPreserveNumbers -} ColorConvPolicy; - -/** Constants identifying predefined color transforms (when retrieving - an internal transform) or transform types (when creating a new - internal transform, or applying any transform). -
See
- \c #AIOverrideColorConversionSuite::GetInternalTransform()
- \c #AIOverrideColorConversionSuite::CreateInternalTransform()
- \c #AIOverrideColorConversionSuite::CreateInternalTransform_16Bit()
- \c #AIOverrideColorConversionSuite::ApplyXformSample()
- \c #AIOverrideColorConversionSuite::ApplyXformImage() - */ -typedef enum InternalColorTransformType -{ - kRGB2RGB=0, - kRGB2CMYK, - kCMYK2CMYK, - kCMYK2RGB, - kRGB2sRGB, - kCMYK2sRGB, - kLAB2RGB, - - // The types below are new for AI 11 - // New for JPEG 2000. - ksGray2RGB, - ksYCC8_2RGB, - kesRGB2RGB, - kROMMRGB2RGB, - kesYCC8_2RGB, - - // Same as above with 8 < BPC <= 16. Only used by Jpeg2000. - kCIELab_16Bit2RGB, //Also for CIELab 8 bit. - ksGray_16Bit2RGB, - ksYCC8_16Bit2RGB, - kesRGB_16Bit2RGB, - kROMMRGB_16Bit2RGB, - kesYCC8_16Bit2RGB, - - kNumTransforms -} InternalColorTransformType; - -/** Parameters for color conversion type \c #kCIELab_16Bit2RGB */ -typedef struct { - /** Native byte-order versions of the three JPX channel Range and Offset parameters from the EP field - see JPEG2000 spec, Annex M, sec M.11.7.4 */ - ASUInt32 Range1; - ASUInt32 Offset1; - ASUInt32 Range2; - ASUInt32 Offset2; - ASUInt32 Range3; - ASUInt32 Offset3; - /** Native byte-order version of IL parameter from EP field. Ignored for CIEJab. */ - ASUInt32 Illuminant; -} JPXLabParams; - -/** Ranges for color values */ -typedef struct { - /** Usual value -128 */ - AIReal min; - /** Usual value +127 */ - AIReal max; -} AIRange; - - -/** Floating point CIE XYZ color value */ -typedef struct { - AIReal X; - AIReal Y; - AIReal Z; -} AIXYZColor; - - -/** Calibration information for constructing a grayscale profile. */ -typedef struct { - AIXYZColor whitePoint; - AIXYZColor blackPoint; - AIReal gamma; -} AIGrayCal; - -/** Calibration information for constructing an RGB profile. */ -typedef struct { - AIXYZColor whitePoint; - AIXYZColor blackPoint; - AIXYZColor red; - AIXYZColor green; - AIXYZColor blue; - AIReal redGamma; - AIReal greenGamma; - AIReal blueGamma; -} AIRGBCal; - -/** Tone curve definition */ -typedef struct { - ASUInt32 bytesPerValue; - ASUInt32 count; - void *data; -} AIToneCurve; - -/** Calibration information for constructing a CMYK profile. */ -typedef struct { - AIXYZColor whitePoint; - AIXYZColor blackPoint; - AIXYZColor w; - AIXYZColor c; - AIXYZColor m; - AIXYZColor y; - AIXYZColor k; - AIXYZColor cm; - AIXYZColor cy; - AIXYZColor ck; - AIXYZColor my; - AIXYZColor mk; - AIXYZColor yk; - AIXYZColor cmy; - AIXYZColor cmk; - AIXYZColor cyk; - AIXYZColor myk; - AIXYZColor cmyk; - - AIToneCurve cTRC; - AIToneCurve mTRC; - AIToneCurve yTRC; - AIToneCurve kTRC; - - AIReal opticalGamma; - -} AICMYKCal; - -/******************************************************************************* - ** - ** Suite - ** - ** - */ - -/** @ingroup Suites - This suite provides functions that allow you to manage color profiles and - perform color conversions between profiles. Typically, you will use - \c #CreateInternalTransform() for a source and destination colorspace. - After calling \c #AIColorConversionSuite functions with those colorspaces, - use \c #FreeAllInternalTransforms() to free the transform memory. - - For example, to do a calibrated CMYK to RGB conversion of a single sample: - \verbatim - CreateInternalTransform(CMYK2RGB, cmykProfile, rgbProfile) - AIColorConversionSuite::ConvertSampleColor(kAICMYKColorSpace, cmykSample, kAIRGBColorSpace, rgbSample) - FreeAllInternalTransforms() - \endverbatim - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIOverrideColorConversionSuite and \c #kAIOverrideColorConversionVersion. - */ -typedef struct { - - /** Converts RGB image samples into CMYK to determine if any of the samples - were out of gamut. - @param srcBuf A pointer to the sample data, which must have 8 bits per - component. - @param numSamples The number of samples in the source buffer. - @param rgbFormat The RGB format used in the samples, an - \c #AIRGBPixelFormat value. - @param inGamut [out] A buffer in which to return true if all of - the samples are in gamut. - */ - AIAPI AIErr ( *GamutRGBToCMYKImage )( void *srcBuf, const ASUInt32 numSamples, - const ASUInt32 rgbFormat, ASBoolean *inGamut ); - - /** Creates a transformation from one profile to another, using the render intent - set in the Color Settings dialog. - @param srcProfile The source color profile. - @param destProfile The destination profile. - @param xform [out] A buffer in which to return the transformation. Free - the memory with \c #FreeXform() when it is no longer needed. - @see \c #CreateProfileFromTag() - */ - AIAPI AIErr ( *CreateXform )(const AIColorProfile srcProfile, const AIColorProfile destProfile, ai::uintptr *xform ); - - /** Frees memory for a transformation when it is no longer needed. - (Note that this function does not return an error code.) - @param xform The transformation, as created with \c #CreateXform(). - */ - AIAPI void ( *FreeXform )( const ai::uintptr xform ); - - /** Applies a transformation to a single color value. - @param xform The transformation, as created with \c #CreateXform(). - @param inColor A pointer to the color value. - @param outColor [out] A buffer in which to return the transformed color value. - @param convType The type of the specified transformation. - @param isLAB Not used. - */ - AIAPI AIErr ( *ApplyXformSample )( const ai::uintptr xform, ASFixed *inColor, ASFixed *outColor, - const InternalColorTransformType convType, ASBoolean isLAB ); - - /** Applies a transformation to a buffer of image data. - @param xform The transformation, as created with \c #CreateXform(). - @param inBuffer A pointer to the input image data. - @param outBuffer [out] A buffer in which to return the transformed color data. - @param numPixels The number of pixels in the input data. The output buffer - must be big enough to hold this many pixels in the new format. - @param convType The type of the specified transformation.. - @param isLAB Not used. - @param format The output data format to use when converting to RGB, - an \c #AIRGBPixelFormat value. - */ - AIAPI AIErr ( *ApplyXformImage )( const ai::uintptr xform, void *inBuffer, void *outBuffer, const ASUInt32 numPixels, - const InternalColorTransformType convType, ASBoolean isLAB , ASInt16 format); - - /** Converts an ICC tag into a color profile. When you create a profile this way, you must - free it with \c #FreeProfile() when you no longer need it. - @param buffer The buffer containing the raw ICC tag data. - @param size The number of bytes in the input buffer. - @param profile [out] A buffer in which to return the color profile object. - */ - AIAPI AIErr ( *CreateProfileFromTag )( void *buffer, const ASUInt32 size, AIColorProfile *profile ); - - /** Creates a current working color profile. When you create a profile this way, you must - free it with \c #FreeProfile() when you no longer need it. - @param whichProfile The colorspace for the profile, an \c #AIWorkingColorSpace value. - @param profile [out] A buffer in which to return the color profile. - */ - AIAPI AIErr ( *GetWSProfile )( const ASUInt32 whichProfile, AIColorProfile *profile ); - - /** Frees the memory associated with a color profile that is no longer needed. - You can do this after creating the transform with \c #CreateXform(). - (Note that this function does not return an error code.) - @param profile The profile. Upon return, the reference is no longer valid. - */ - AIAPI void ( *FreeProfile )( AIColorProfile profile ); - - /** Retrieves the current color management policy for how to treat - color profiles when opening documents. Also gets a valid profile - for the current document, according to that policy. - Queries user if needed to determine what profile should be used. - (Note that this function returns a constant value, not an error code.) - @param profile [in, out] The embedded color profile for the current document, - or \c NULL if the document has no embedded profile or has multiple profiles. - If \c NULL, and if the policy indicates that a - profile should be assigned, returns that profile assigned by current policy, - or by user interaction. Can be \c NULL if color management is turned off, - or if the user discards the embedded profile. - @param colorModel The color model of the current document, an - \c #AIDocumentColorModelValue. - @param isLink When true, get the policy for placing file formats that - contain profiles, instead of the open policy. - @param linkHasMultipleProfiles When true, the linked file has more - than one profile for a given colorspace. If the linked file contains - both RGB and CMYK, call the function once for each colorspace, - as the policies can be different. - @return A #AIFileOpenColorProfilePolicy value. - */ - AIAPI ASUInt32 ( *GetOpenPolicy )(AIColorProfile *profile, ASUInt32 colorModel, ASBoolean isLink, - ASBoolean linkHasMultipleProfiles); - - /** Retrieves the current color management policy for how to treat - color profiles when saving documents; that is, which profile, if any, - should be saved with the document. Also reports what profile would be embedded, - if any, for the current document, according to that policy. - (Note that this function does not return an error code.) - @param whichSpace The working colorspace corresponding to the document color model, - an \c #AIWorkingColorSpace value. - @param policy [out] A buffer in which to return the policy, an - \c #AIFileSaveColorProfilePolicy value. - @param defaultState [out] A buffer in which to return the default state - of the "Embed profile?" checkbox - @param profName [out] A buffer in which to return the name of the profile to - be embedded, if any. - */ - AIAPI void ( *GetSavePolicy )( const ASUInt32 whichSpace, ASUInt32 *policy, ASUInt32 *defaultState, ai::UnicodeString& profName); - - /** Retrieves the tag data for a color profile. - @param profile The color profile. - @param size [out] A buffer in which to return the number of bytes returned - in the data buffer, or, if \c data is \c NULL, the size of the buffer needed. - @param data [in, out] \c NULL to retrieve the size of buffer needed, or a buffer in - which to return the tag data. - */ - AIAPI AIErr ( *GetProfileData ) (const AIColorProfile profile, ASUInt32 *size, void *data ); - - /** Retrieves the description name of a color profile. - @param profile The color profile. - @param profileName [out] A buffer in which to return the descriptive name string. - */ - AIAPI AIErr ( *GetProfileName) (const AIColorProfile profile, ai::UnicodeString& profileName ) ; - - /** Creates and caches transforms to be used for all internal color conversions and those - performed with the \c #AIColorConversionSuite. - - \li Supply the source and destination profiles - for these basic color transform types: -
\c #kRGB2RGB -
\c #kRGB2CMYK -
\c #kCMYK2CMYK -
\c #kCMYK2RGB - - \li For other 8-bit transforms to RGB, if the source profile is \c NULL, - the profile of the top document is used, or if that is \c NULL, the - corresponding working space. The destination profile is ignored and - is set internally to \c sRGB. - \li For a transform from LAB to RGB, the source RGB data is interpreted as LAB. - The source profile is ignored and is set internally to \c LAB. If the - destination profile is \c NULL, the profile of the - top document is used, or if that is \c NULL, the RGB working space. - - For example, to convert a sample in the top document from RGB to sRGB: - \verbatim - CreateInternalTransform(RGB2sRGB, NULL, NULL) - ConvertSampleColor(kAIRGBColorSpace, rgbSample, kAIRGBColorSpace, sRGBSample) - FreeAllInternalTransforms() - \endverbatim - - To convert from LAB to RGB: - \verbatim - CreateInternalTransform(LAB2RGB, NULL, NULL) - ConvertSampleColor(kAIRGBColorSpace, labSample, kAIRGBColorSpace, rgbSample) - FreeAllInternalTransforms() - \endverbatim - - @param whichOne The predefined 8-bit transform type. - @param srcProfile The source color profile. - @param destProfile The destination profile. - @see \c #CreateInternalTransform_16Bit() - */ - AIAPI AIErr ( *CreateInternalTransform) (const InternalColorTransformType whichOne, AIColorProfile scrProfile, AIColorProfile destProfile); - - /** Frees memory for all cached transforms. Subsequent color conversion is done - using the default transformation. - (Note that this function does not return an error code.) - */ - AIAPI void ( *FreeAllInternalTransforms) (void); - - /** Reports whether two profiles are the same. - (Note that this function does not return an error code.) - @param srcProfile The first profile. - @param destProfile The second profile. - @param match [out] A buffer in which to return true (non-zero) if the two profiles are the same, - false (0) if different or if either is not a valid profile. */ - AIAPI void ( *ProfsEqual) (const AIColorProfile srcProfile, const AIColorProfile destProfile, ASUInt32 *match); - - /** Retrieves a transform created by \c #CreateInternalTransform(), - to use with \c #ApplyXformSample() or \c #ApplyXformImage(). For example: - \verbatim - CreateInternalTranform(LAB2RGB, NULL, NULL) - GetInternalTransform(LAB2RGB, &xform); - ApplyXformSample(xform, incolor, outcolor, KLAB2RGB. false); - FreeAllInternalTransforms() - \endverbatim - @note For LAB data, the L value must be scaled from [0..100] to [0..255], - and the A and B values must be scaled from [-128..127] to [0..255]. - - @param whichOne The predefined transform type. - @param xform [out] A buffer in which to return the transform. - */ - AIAPI void ( *GetInternalTransform)(const InternalColorTransformType whichOne, ai::uintptr *xform); - - /** Turns on Black Point Compensation for all subsequent color transform operations. - This should be used for ADM drawing operations. - (Note that this function does not return an error code.) - */ - AIAPI void ( *BPCOn ) (void) ; - - /** Restores the previous Black Point Compensation setting, after using \c #BPCOn(). - (Note that this function does not return an error code.) - */ - AIAPI void ( *RestoreBPC )(void); - - // New in Illustrator 11.0 - - /** Constructs a color profile from grayscale calibration information. - @param grayCal A pointer to the calibration information. - @param profile [out] A buffer in which to return the color profile. - */ - AIAPI AIErr ( *MakeProfileFromCalGray)(AIGrayCal *grayCal, AIColorProfile *profile); - /** Constructs a color profile from RGB calibration information. - @param rgbCal A pointer to the calibration information. - @param profile [out] A buffer in which to return the color profile. - */ - AIAPI AIErr ( *MakeProfileFromCalRGB)(AIRGBCal *rgbCal, AIColorProfile *profile); - - /** Constructs a color profile from CMYK calibration information. - @param cmykCal A pointer to the calibration information. - @param profile [out] A buffer in which to return the color profile. - */ - AIAPI AIErr ( *MakeProfileFromCalCMYK)(AICMYKCal *cmykCal, AIColorProfile *profile); - - /** Creates and caches transforms to be used for all internal color conversions and those - performed with the \c #AIColorConversionSuite. Use when the source has more than 8 bits - per channel, to a maximum of 16 bits per channel. If source has more than 16 bits, you must - truncate the data to 16 bits, then use this function. - - @param whichOne The predefined 16-bit transform type. - @param srcProfile The source 16-bit color profile. - For \c kCIELab_16Bit2RGB color conversion only, can be an 8-bit or 16-bit profile. - @param dstProfile The destination profile. - @param bitDepth An array the size of the number of channels, with the bit depth of each channel. - @param jpxLabParams For \c kCIELab_16Bit2RGB color conversion only, additional parameters - required for LAB conversion. \c NULL for other transform types. - @see \c #CreateInternalTransform() - */ - AIAPI AIErr ( *CreateInternalTransform_16Bit)(const InternalColorTransformType whichOne, AIColorProfile srcProfile, AIColorProfile dstProfile, - ASUInt8* bitDepth, JPXLabParams* jpxLabParams); - - /** Retrieves the color conversion policies and the AI6 mode from the Color Settings dialog. - (Note that this function does not return an error code.) - @param A16Mode [out] A buffer in which to return the A16 mode - @param rgbPolicy [out] A buffer in which to return the RGB color conversion policy. - @param cmykPolicy [out] A buffer in which to return the CMYK color conversion policy. - */ - AIAPI void ( *GetColorSettingsPolicies)(ASBoolean *AI6Mode, ColorConvPolicy *rgbPolicy, ColorConvPolicy *cmykPolicy); - - /** Retrieves the render intent from the Color Settings dialog - (Note that this function returns a constant value, not an error code.) - @return The rendering-intent constant. - */ - AIAPI AIRenderingIntent ( *GetColorSettingsRenderIntent)(void); - - - // New in Illustrator 16.0 - /** Reports whether Black Point Compensation is currently enabled. - (Note that this function returns a Boolean value, not an error code.) - @return True if BPC is currently enabled, false otherwise. - @see \c #BPCOn() - */ - AIAPI AIBoolean ( *IsBPCOn)(); - -} AIOverrideColorConversionSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __OverrideColorConversion__ +#define __OverrideColorConversion__ + +/************************************************************************* + * ADOBE CONFIDENTIAL + * ___________________ + * + * Copyright 2002 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + **************************************************************************/ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" /* Include Adobe Standard Types */ +#endif + +#include "AIHeaderBegin.h" + +/** @file AIOverrideColorConversion.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIOverrideColorConversionSuite "Override AI Color Conversion Suite" +#define kAIOverrideColorConversionSuiteVersion8 AIAPI_VERSION(8) +#define kAIOverrideColorConversionSuiteVersion kAIOverrideColorConversionSuiteVersion8 +#define kAIOverrideColorConversionVersion kAIOverrideColorConversionSuiteVersion + + +// JM - must synch with those in picasso.h +/** Working colorspace types */ +enum AIWorkingColorSpace { + /** Grayscale */ + kGrayWS = 0, + /** RGB */ + kRGBWS = 1, + /** CMYK */ + kCMYKWS = 2 +}; + + +/** RGB image formats */ +enum AIRGBPixelFormat { + /** With alpha channel */ + kARGB = 0, + /** Without alpha channel */ + kRGB = 1 +}; + +/* CMYK separations/channels */ +constexpr ai::uint32 kCyan = 0x00000001; +constexpr ai::uint32 kMagenta = 0x00000002; +constexpr ai::uint32 kYellow = 0x00000004; +constexpr ai::uint32 kBlack = 0x00000008; +constexpr ai::uint32 kCMYK = 0x0000000f; + +/** Rendering intents */ +enum AIRenderingIntent { + kICPerceptual = 0, + kICRelativeColorimetric = 1, + kICSaturation = 2, + kICAbsoluteColorimetric = 3 +}; + +/** Policies on what to do with a document's color profile when it is opened */ +enum AIFileOpenColorProfilePolicy { + /** Convert document to working space */ + kConvert = 0, + /** Remove profile from doc */ + kUntag = 1, + /** Preserve the documents profile */ + kPreserve = 2, + /** User decided to cancel the open */ + kCancel = 3 +}; + +/** Policies on what to do with a document's color profile when it is saved */ +enum AIFileSaveColorProfilePolicy { + /** Do not save a profile */ + kNoProfile = 0, + /** Save with the working space profile */ + kWSProfile = 1, + /** Save with the document profile */ + kDocProfile = 2 +}; + +/** Color conversion policies inferred from the color settings dialog, + on whether to do color conversions within the same + colorspace family (such as RGB to RGB, or CMYK to CMYK) */ +typedef enum ColorConvPolicy +{ + /** Do conversion to maintain color appearance */ + kPreserveAppearance, + /** Do not convert colors, instead maintain numerical values */ + kPreserveNumbers +} ColorConvPolicy; + +/** Constants identifying predefined color transforms (when retrieving + an internal transform) or transform types (when creating a new + internal transform, or applying any transform). +
See
+ \c #AIOverrideColorConversionSuite::GetInternalTransform()
+ \c #AIOverrideColorConversionSuite::CreateInternalTransform()
+ \c #AIOverrideColorConversionSuite::CreateInternalTransform_16Bit()
+ \c #AIOverrideColorConversionSuite::ApplyXformSample()
+ \c #AIOverrideColorConversionSuite::ApplyXformImage() + */ +typedef enum InternalColorTransformType +{ + kRGB2RGB=0, + kRGB2CMYK, + kCMYK2CMYK, + kCMYK2RGB, + kRGB2sRGB, + kCMYK2sRGB, + kLAB2RGB, + + // The types below are new for AI 11 + // New for JPEG 2000. + ksGray2RGB, + ksYCC8_2RGB, + kesRGB2RGB, + kROMMRGB2RGB, + kesYCC8_2RGB, + + // Same as above with 8 < BPC <= 16. Only used by Jpeg2000. + kCIELab_16Bit2RGB, //Also for CIELab 8 bit. + ksGray_16Bit2RGB, + ksYCC8_16Bit2RGB, + kesRGB_16Bit2RGB, + kROMMRGB_16Bit2RGB, + kesYCC8_16Bit2RGB, + + kNumTransforms +} InternalColorTransformType; + +/** Parameters for color conversion type \c #kCIELab_16Bit2RGB */ +typedef struct { + /** Native byte-order versions of the three JPX channel Range and Offset parameters from the EP field + see JPEG2000 spec, Annex M, sec M.11.7.4 */ + ASUInt32 Range1; + ASUInt32 Offset1; + ASUInt32 Range2; + ASUInt32 Offset2; + ASUInt32 Range3; + ASUInt32 Offset3; + /** Native byte-order version of IL parameter from EP field. Ignored for CIEJab. */ + ASUInt32 Illuminant; +} JPXLabParams; + +/** Ranges for color values */ +typedef struct { + /** Usual value -128 */ + AIReal min; + /** Usual value +127 */ + AIReal max; +} AIRange; + + +/** Floating point CIE XYZ color value */ +typedef struct { + AIReal X; + AIReal Y; + AIReal Z; +} AIXYZColor; + + +/** Calibration information for constructing a grayscale profile. */ +typedef struct { + AIXYZColor whitePoint; + AIXYZColor blackPoint; + AIReal gamma; +} AIGrayCal; + +/** Calibration information for constructing an RGB profile. */ +typedef struct { + AIXYZColor whitePoint; + AIXYZColor blackPoint; + AIXYZColor red; + AIXYZColor green; + AIXYZColor blue; + AIReal redGamma; + AIReal greenGamma; + AIReal blueGamma; +} AIRGBCal; + +/** Tone curve definition */ +typedef struct { + ASUInt32 bytesPerValue; + ASUInt32 count; + void *data; +} AIToneCurve; + +/** Calibration information for constructing a CMYK profile. */ +typedef struct { + AIXYZColor whitePoint; + AIXYZColor blackPoint; + AIXYZColor w; + AIXYZColor c; + AIXYZColor m; + AIXYZColor y; + AIXYZColor k; + AIXYZColor cm; + AIXYZColor cy; + AIXYZColor ck; + AIXYZColor my; + AIXYZColor mk; + AIXYZColor yk; + AIXYZColor cmy; + AIXYZColor cmk; + AIXYZColor cyk; + AIXYZColor myk; + AIXYZColor cmyk; + + AIToneCurve cTRC; + AIToneCurve mTRC; + AIToneCurve yTRC; + AIToneCurve kTRC; + + AIReal opticalGamma; + +} AICMYKCal; + +/******************************************************************************* + ** + ** Suite + ** + ** + */ + +/** @ingroup Suites + This suite provides functions that allow you to manage color profiles and + perform color conversions between profiles. Typically, you will use + \c #CreateInternalTransform() for a source and destination colorspace. + After calling \c #AIColorConversionSuite functions with those colorspaces, + use \c #FreeAllInternalTransforms() to free the transform memory. + + For example, to do a calibrated CMYK to RGB conversion of a single sample: + \verbatim + CreateInternalTransform(CMYK2RGB, cmykProfile, rgbProfile) + AIColorConversionSuite::ConvertSampleColor(kAICMYKColorSpace, cmykSample, kAIRGBColorSpace, rgbSample) + FreeAllInternalTransforms() + \endverbatim + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIOverrideColorConversionSuite and \c #kAIOverrideColorConversionVersion. + */ +typedef struct { + + /** Converts RGB image samples into CMYK to determine if any of the samples + were out of gamut. + @param srcBuf A pointer to the sample data, which must have 8 bits per + component. + @param numSamples The number of samples in the source buffer. + @param rgbFormat The RGB format used in the samples, an + \c #AIRGBPixelFormat value. + @param inGamut [out] A buffer in which to return true if all of + the samples are in gamut. + */ + AIAPI AIErr ( *GamutRGBToCMYKImage )( void *srcBuf, const ASUInt32 numSamples, + const ASUInt32 rgbFormat, ASBoolean *inGamut ); + + /** Creates a transformation from one profile to another, using the render intent + set in the Color Settings dialog. + @param srcProfile The source color profile. + @param destProfile The destination profile. + @param xform [out] A buffer in which to return the transformation. Free + the memory with \c #FreeXform() when it is no longer needed. + @see \c #CreateProfileFromTag() + */ + AIAPI AIErr ( *CreateXform )(const AIColorProfile srcProfile, const AIColorProfile destProfile, ai::uintptr *xform ); + + /** Frees memory for a transformation when it is no longer needed. + (Note that this function does not return an error code.) + @param xform The transformation, as created with \c #CreateXform(). + */ + AIAPI void ( *FreeXform )( const ai::uintptr xform ); + + /** Applies a transformation to a single color value. + @param xform The transformation, as created with \c #CreateXform(). + @param inColor A pointer to the color value. + @param outColor [out] A buffer in which to return the transformed color value. + @param convType The type of the specified transformation. + @param isLAB Not used. + */ + AIAPI AIErr ( *ApplyXformSample )( const ai::uintptr xform, ASFixed *inColor, ASFixed *outColor, + const InternalColorTransformType convType, ASBoolean isLAB ); + + /** Applies a transformation to a buffer of image data. + @param xform The transformation, as created with \c #CreateXform(). + @param inBuffer A pointer to the input image data. + @param outBuffer [out] A buffer in which to return the transformed color data. + @param numPixels The number of pixels in the input data. The output buffer + must be big enough to hold this many pixels in the new format. + @param convType The type of the specified transformation.. + @param isLAB Not used. + @param format The output data format to use when converting to RGB, + an \c #AIRGBPixelFormat value. + */ + AIAPI AIErr ( *ApplyXformImage )( const ai::uintptr xform, void *inBuffer, void *outBuffer, const ASUInt32 numPixels, + const InternalColorTransformType convType, ASBoolean isLAB , ASInt16 format); + + /** Converts an ICC tag into a color profile. When you create a profile this way, you must + free it with \c #FreeProfile() when you no longer need it. + @param buffer The buffer containing the raw ICC tag data. + @param size The number of bytes in the input buffer. + @param profile [out] A buffer in which to return the color profile object. + */ + AIAPI AIErr ( *CreateProfileFromTag )( void *buffer, const ASUInt32 size, AIColorProfile *profile ); + + /** Creates a current working color profile. When you create a profile this way, you must + free it with \c #FreeProfile() when you no longer need it. + @param whichProfile The colorspace for the profile, an \c #AIWorkingColorSpace value. + @param profile [out] A buffer in which to return the color profile. + */ + AIAPI AIErr ( *GetWSProfile )( const ASUInt32 whichProfile, AIColorProfile *profile ); + + /** Frees the memory associated with a color profile that is no longer needed. + You can do this after creating the transform with \c #CreateXform(). + (Note that this function does not return an error code.) + @param profile The profile. Upon return, the reference is no longer valid. + */ + AIAPI void ( *FreeProfile )( AIColorProfile profile ); + + /** Retrieves the current color management policy for how to treat + color profiles when opening documents. Also gets a valid profile + for the current document, according to that policy. + Queries user if needed to determine what profile should be used. + (Note that this function returns a constant value, not an error code.) + @param profile [in, out] The embedded color profile for the current document, + or \c NULL if the document has no embedded profile or has multiple profiles. + If \c NULL, and if the policy indicates that a + profile should be assigned, returns that profile assigned by current policy, + or by user interaction. Can be \c NULL if color management is turned off, + or if the user discards the embedded profile. + @param colorModel The color model of the current document, an + \c #AIDocumentColorModelValue. + @param isLink When true, get the policy for placing file formats that + contain profiles, instead of the open policy. + @param linkHasMultipleProfiles When true, the linked file has more + than one profile for a given colorspace. If the linked file contains + both RGB and CMYK, call the function once for each colorspace, + as the policies can be different. + @return A #AIFileOpenColorProfilePolicy value. + */ + AIAPI ASUInt32 ( *GetOpenPolicy )(AIColorProfile *profile, ASUInt32 colorModel, ASBoolean isLink, + ASBoolean linkHasMultipleProfiles); + + /** Retrieves the current color management policy for how to treat + color profiles when saving documents; that is, which profile, if any, + should be saved with the document. Also reports what profile would be embedded, + if any, for the current document, according to that policy. + (Note that this function does not return an error code.) + @param whichSpace The working colorspace corresponding to the document color model, + an \c #AIWorkingColorSpace value. + @param policy [out] A buffer in which to return the policy, an + \c #AIFileSaveColorProfilePolicy value. + @param defaultState [out] A buffer in which to return the default state + of the "Embed profile?" checkbox + @param profName [out] A buffer in which to return the name of the profile to + be embedded, if any. + */ + AIAPI void ( *GetSavePolicy )( const ASUInt32 whichSpace, ASUInt32 *policy, ASUInt32 *defaultState, ai::UnicodeString& profName); + + /** Retrieves the tag data for a color profile. + @param profile The color profile. + @param size [out] A buffer in which to return the number of bytes returned + in the data buffer, or, if \c data is \c NULL, the size of the buffer needed. + @param data [in, out] \c NULL to retrieve the size of buffer needed, or a buffer in + which to return the tag data. + */ + AIAPI AIErr ( *GetProfileData ) (const AIColorProfile profile, ASUInt32 *size, void *data ); + + /** Retrieves the description name of a color profile. + @param profile The color profile. + @param profileName [out] A buffer in which to return the descriptive name string. + */ + AIAPI AIErr ( *GetProfileName) (const AIColorProfile profile, ai::UnicodeString& profileName ) ; + + /** Retrieves the color profile from the color profile name. When you retrieve a profile this way, you must + free it with \c #FreeProfile() when you no longer need it. + @param profileName [out] A buffer in which to return the descriptive name string. + @param profile The color profile name. + @param profile[out] A buffer in which to return the color profile. + */ + AIAPI AIErr(*GetProfileByName) (const ai::UnicodeString& profileName, AIColorProfile *profile); + + /** Creates and caches transforms to be used for all internal color conversions and those + performed with the \c #AIColorConversionSuite. + + \li Supply the source and destination profiles + for these basic color transform types: +
\c #kRGB2RGB +
\c #kRGB2CMYK +
\c #kCMYK2CMYK +
\c #kCMYK2RGB + + \li For other 8-bit transforms to RGB, if the source profile is \c NULL, + the profile of the top document is used, or if that is \c NULL, the + corresponding working space. The destination profile is ignored and + is set internally to \c sRGB. + \li For a transform from LAB to RGB, the source RGB data is interpreted as LAB. + The source profile is ignored and is set internally to \c LAB. If the + destination profile is \c NULL, the profile of the + top document is used, or if that is \c NULL, the RGB working space. + + For example, to convert a sample in the top document from RGB to sRGB: + \verbatim + CreateInternalTransform(RGB2sRGB, NULL, NULL) + ConvertSampleColor(kAIRGBColorSpace, rgbSample, kAIRGBColorSpace, sRGBSample) + FreeAllInternalTransforms() + \endverbatim + + To convert from LAB to RGB: + \verbatim + CreateInternalTransform(LAB2RGB, NULL, NULL) + ConvertSampleColor(kAIRGBColorSpace, labSample, kAIRGBColorSpace, rgbSample) + FreeAllInternalTransforms() + \endverbatim + + @param whichOne The predefined 8-bit transform type. + @param srcProfile The source color profile. + @param destProfile The destination profile. + @see \c #CreateInternalTransform_16Bit() + */ + AIAPI AIErr ( *CreateInternalTransform) (const InternalColorTransformType whichOne, AIColorProfile scrProfile, AIColorProfile destProfile); + + /** Frees memory for all cached transforms. Subsequent color conversion is done + using the default transformation. + (Note that this function does not return an error code.) + */ + AIAPI void ( *FreeAllInternalTransforms) (void); + + /** Reports whether two profiles are the same. + (Note that this function does not return an error code.) + @param srcProfile The first profile. + @param destProfile The second profile. + @param match [out] A buffer in which to return true (non-zero) if the two profiles are the same, + false (0) if different or if either is not a valid profile. */ + AIAPI void ( *ProfsEqual) (const AIColorProfile srcProfile, const AIColorProfile destProfile, ASUInt32 *match); + + /** Retrieves a transform created by \c #CreateInternalTransform(), + to use with \c #ApplyXformSample() or \c #ApplyXformImage(). For example: + \verbatim + CreateInternalTranform(LAB2RGB, NULL, NULL) + GetInternalTransform(LAB2RGB, &xform); + ApplyXformSample(xform, incolor, outcolor, KLAB2RGB. false); + FreeAllInternalTransforms() + \endverbatim + @note For LAB data, the L value must be scaled from [0..100] to [0..255], + and the A and B values must be scaled from [-128..127] to [0..255]. + + @param whichOne The predefined transform type. + @param xform [out] A buffer in which to return the transform. + */ + AIAPI void ( *GetInternalTransform)(const InternalColorTransformType whichOne, ai::uintptr *xform); + + /** Turns on Black Point Compensation for all subsequent color transform operations. + This should be used for ADM drawing operations. + (Note that this function does not return an error code.) + */ + AIAPI void ( *BPCOn ) (void) ; + + /** Restores the previous Black Point Compensation setting, after using \c #BPCOn(). + (Note that this function does not return an error code.) + */ + AIAPI void ( *RestoreBPC )(void); + + // New in Illustrator 11.0 + + /** Constructs a color profile from grayscale calibration information. + @param grayCal A pointer to the calibration information. + @param profile [out] A buffer in which to return the color profile. + */ + AIAPI AIErr ( *MakeProfileFromCalGray)(AIGrayCal *grayCal, AIColorProfile *profile); + /** Constructs a color profile from RGB calibration information. + @param rgbCal A pointer to the calibration information. + @param profile [out] A buffer in which to return the color profile. + */ + AIAPI AIErr ( *MakeProfileFromCalRGB)(AIRGBCal *rgbCal, AIColorProfile *profile); + + /** Constructs a color profile from CMYK calibration information. + @param cmykCal A pointer to the calibration information. + @param profile [out] A buffer in which to return the color profile. + */ + AIAPI AIErr ( *MakeProfileFromCalCMYK)(AICMYKCal *cmykCal, AIColorProfile *profile); + + /** Creates and caches transforms to be used for all internal color conversions and those + performed with the \c #AIColorConversionSuite. Use when the source has more than 8 bits + per channel, to a maximum of 16 bits per channel. If source has more than 16 bits, you must + truncate the data to 16 bits, then use this function. + + @param whichOne The predefined 16-bit transform type. + @param srcProfile The source 16-bit color profile. + For \c kCIELab_16Bit2RGB color conversion only, can be an 8-bit or 16-bit profile. + @param dstProfile The destination profile. + @param bitDepth An array the size of the number of channels, with the bit depth of each channel. + @param jpxLabParams For \c kCIELab_16Bit2RGB color conversion only, additional parameters + required for LAB conversion. \c NULL for other transform types. + @see \c #CreateInternalTransform() + */ + AIAPI AIErr ( *CreateInternalTransform_16Bit)(const InternalColorTransformType whichOne, AIColorProfile srcProfile, AIColorProfile dstProfile, + ASUInt8* bitDepth, JPXLabParams* jpxLabParams); + + /** Retrieves the color conversion policies and the AI6 mode from the Color Settings dialog. + (Note that this function does not return an error code.) + @param A16Mode [out] A buffer in which to return the A16 mode + @param rgbPolicy [out] A buffer in which to return the RGB color conversion policy. + @param cmykPolicy [out] A buffer in which to return the CMYK color conversion policy. + */ + AIAPI void ( *GetColorSettingsPolicies)(ASBoolean *AI6Mode, ColorConvPolicy *rgbPolicy, ColorConvPolicy *cmykPolicy); + + /** Retrieves the render intent from the Color Settings dialog + (Note that this function returns a constant value, not an error code.) + @return The rendering-intent constant. + */ + AIAPI AIRenderingIntent ( *GetColorSettingsRenderIntent)(void); + + + // New in Illustrator 16.0 + /** Reports whether Black Point Compensation is currently enabled. + (Note that this function returns a Boolean value, not an error code.) + @return True if BPC is currently enabled, false otherwise. + @see \c #BPCOn() + */ + AIAPI AIBoolean ( *IsBPCOn)(); + +} AIOverrideColorConversionSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPSDKeys.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPSDKeys.h new file mode 100644 index 0000000..7de3eb3 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPSDKeys.h @@ -0,0 +1,58 @@ +/* +* Name: AIPSDKeys.h +* Purpose: Adobe Illustrator PSD Options Dictionary Keys. +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2014 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +#pragma once + +/******************************************************************************* +** +** Imports +** +**/ + +#include "AIHeaderBegin.h" + + +/******************************************************************************* +** +** Constants +** +**/ + +/* Use with \c #AIDicionarySuite::SetPSDPluginColorModeEntry in Integeral form. + Enum given in AIPhotoshopPrefs.h*/ +#define kAIPSDColorModelOption "PSDColorModel" + +/* Use with \c #AIDicionarySuite::SetRealEntry. */ +#define kAIPSDResolutionOption "PSDResolution" + +/* Use with \c #AIDicionarySuite::SetBooleanEntry. */ +#define kAIPSDWriteLayersOption "PSDWriteLayers" + +/* Use with \c #AIDicionarySuite::SetAntiAliasOptionsEntry in integral form. + Enum given in AIPhotoshopPrefs.h*/ +#define kAIPSDAntiAliasOption "PSDAntiAlias" + +/* Use with \c #AIDicionarySuite::SetBooleanEntry. */ +#define kAIPSDMaxEditabilityOption "PSDMaxEditability" + +/* Use with \c #AIDicionarySuite::SetBooleanEntry. */ +#define kAIPSDPreserveSpotColorsOption "PSDPreserveSpotColors" + + + +#include "AIHeaderEnd.h" + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPaintStyle.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPaintStyle.h index 620db21..5968316 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPaintStyle.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPaintStyle.h @@ -1,418 +1,418 @@ -#ifndef __AIPaintStyle__ -#define __AIPaintStyle__ - -/* - * Name: AIPaintStyle.h - * Author: Vivek Agrawal - * Date: 2/22/2016 - * Purpose: AI Paint Style Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2015-2016 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* -** -** Imports -** -**/ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif - -#ifndef __AISwatchList__ -#include "AISwatchList.h" -#endif - -#include "AIHeaderBegin.h" - - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPaintStyleSuite "AI Paint Style Suite" -#define kAIPaintStyleSuiteVersion10 AIAPI_VERSION(10) - -/* Latest version */ -#define kAIPaintStyleSuiteVersion kAIPaintStyleSuiteVersion10 -#define kAIPaintStyleVersion kAIPaintStyleSuiteVersion - -/** @ingroup Callers - Caller for updating any paint style properties. See \c #AIPaintStyleSuite. -**/ -#define kAIPaintStyleModifierCaller "AI PaintStyle Modifier Caller" - -/** @ingroup Notifiers - The eyedropper sends this while tracking a mouse drag, to notify the Color palette - to update its proxies during the drag, using the path style and map - in the \c #AIUpdatePathStyleNotifyData. See \c #AIPaintStyleSuite */ -#define kAIUpdatePathStyleNotifier "AI Update PathStyle Notifier" -/** @ingroup Notifiers - See \c #AIPaintStyleSuite */ -#define kAIPaintStyleFillStrokeChangedNotifier "AI Paint Style Fill Stroke Changed Notifier" -/** @ingroup Notifiers - See \c #AIPaintStyleSuite */ -#define kAIPaintStyleGradientStopChangedNotifier "AI Paint Style Gradient Stop Changed Notifier" - -/** @ingroup Selectors - Used by the Control palette to set stroke width with \c #AIStrokeWidthMessage. - If there is no stroke currently applied, and a non-zero stroke width - is set through this selector, the previously applied stroke color is restored. - */ -#define kAIPaintStyleSetStrokeWidthSelector "AI Paint Style Set Stroke Width Selector" - -/** The new stroke width for a \c #kAIPaintStyleSetStrokeWidthSelector */ -typedef struct { - /** The message data. */ - SPMessageData d; - /** The stroke width in points. */ - float newStrokeWidth; -} AIStrokeWidthMessage; - -/** Indicator type for ADM. */ -#define kAIPaintStyleIndicatorType "AI Paint Style Indicator Type" -/** Indicator type for ADM. */ -#define kAIPaintStyleIndicatorSmallType "AI Paint Style Indicator Small Type" - -/** Color editor type for ADM. */ -#define kAIPaintStyleColorEditorType "AI Paint Style Color Editor Type" - -/** Minimum dash stroke length. */ -#define kMinStrokeDashLength 0.01 - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Data for \c #kAIUpdatePathStyleNotifier */ -typedef struct -{ - /** Path style to update. */ - AIPathStyle pathStyle; - /** Path style map. The map indicates which fields of an \c #AIPathStyle - are specified by a partial style. A path style can contain unknown or mixed - attributes, which are indicated by a value of false for that attribute in the map. */ - AIPathStyleMap pathStyleMap; -} AIUpdatePathStyleNotifyData; - - -/** Colorspaces that can be displayed by the Color palette for editing colors. */ -typedef enum -{ - kUnknownSpace = 0, - kGrayscaleSpace, - kRGBSpace, - kHSVSpace, - kCMYKSpace, - kWebSpace, - kTintSpace, - kLabSpace -} ColorSpace; - - -/** Behavior options for Color Editor. See \c #AIPaintStyleSuite. */ -typedef struct -{ - /** When true, colors are converted to the document color space for - display in the color indicator. This gamut limits them to the - document color space. Default is true. */ - AIBoolean showSampleInDocCs; - - /** When true, Lab is allowed as a color model in the Color Editor. - Default is false. */ - AIBoolean allowLabColorModel; - - /** When true, a square representing the current color is drawn to - the left of the color sliders. When false, the color indicator - is hidden. Default is true. */ - AIBoolean showColorIndicator; - /** When true, the web-safe and gamut indicators are drawn to the right of the color sliders. - When false, they are drawn to the left of the color sliders. Default is false. */ - AIBoolean warningIndicatorsOnRight; - - /** When true, global objects are verified against the current document's swatch list - before they are displayed. When false, they are assumed to be valid. Default is true. - - \li A Color Editor installed in a palette should always set this to true, because colors can - become invalid asynchronously with palette updates. - - \li A Color Editor in a modal dialog may wish to set this to false, - especially if it allows modification of tints on \c #AIColor values - from swatch libraries that have not yet been targeted to the current document. - */ - AIBoolean verifyColors; -} AIColorEditorOptions; - -/** Behavior options for opening the Color Picker using - \c #AIPaintStyleSuite::DisplayColorPickerWithOptions(). */ -typedef struct -{ - /** The swatch list to display in the swatch-list view of - the Color Picker. When \c NULL, the current document's - swatch list is used. - - When the Color Picker is displayed, the swatch-list view - is shown if the initial color exactly matches the color - from a swatch in this list. - */ - AISwatchListRef swatchList; - -} AIColorPickerOptions; - -/** Possible colorspaces for specifying colors for a Color Editor */ -typedef enum -{ - kAIColorEditorColorUnknown = 0, - kAIColorEditorColorGray, - kAIColorEditorColorRGB, - kAIColorEditorColorCMYK, - kAIColorEditorColorLab, - /** Internal */ - kAIColorEditorColorDummy = 0xFFFFFFFF -} AIColorEditorColorSpace; - - - -/** Color specification for the Color Editor */ -typedef struct -{ - /** The colorspace */ - AIColorEditorColorSpace space; - /** The color values. Which array members have values, and what - they mean, depends on the colorspace. */ - AIReal values[4]; - /** Each member of this array that is true corresponds to a - member of the \c values array with a meaningful value. */ - AIBoolean defined[4]; -} AIColorEditorColor; - -/** Color Editor read-only flag. See \c #AIPaintStyleSuite::SetColorEditorReadOnly(). */ -typedef enum -{ - kAIColorEditorReadOnlyDefault = 0 -} AIColorEditorReadOnlyOption; - -// New for AI13: - -/** Developer-defined data to pass to your color-editor - tracking procedure. - @see \c #ColorEditorTrackProc, \c #AIPaintStyleSuite::SetColorEditorTrackProc() -*/ -typedef void* ColorEditorClientData; - -/** Prototype for an event tracking procedure associated with a color-editor - dialog item. Called when the user makes any change in the editor. - Use it to update other UI features according to the current - Color Editor state. If supplied, it must not modify the state - of the Color Editor itself. - @param clientData Developer-defined data passed with the event. - @return Nothing. - @see \c #AIPaintStyleSuite::SetColorEditorTrackProc() - */ -typedef void (*ColorEditorTrackProc)(ColorEditorClientData clientData); - -/** Possible values for stroke alignment. See \c #AIPaintStyleSuite. */ -typedef enum { - kAIStrokeAlignmentCenter = 0, - kAIStrokeAlignmentInside = 1, - kAIStrokeAlignmentOutside = 2 -} AIStrokeAlignmentType; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions to examine and operate on the Color and Gradient - palettes, which display and modify the paint style of the current selection, - and the Color Editor, which allows a user to choose and edit colors. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPaintStyleSuite and \c #kAIPaintStyleSuiteVersion. - */ -typedef struct -{ - /** Causes the Color palette to show the stroke color (not fill). - (Note that this function does not return an error code.) - */ - void ASAPI (*SetStrokeActive)(); - - /** Reports whether the Color palette shows the stroke color (not fill). - (Note that this function returns a boolean value, not an error code.) - @return True if stroke is active. - */ - ASBoolean ASAPI (*IsStrokeActive)(); - - /** Causes the Color palette to show the fill color (not stroke). - (Note that this function does not return an error code.) - */ - void ASAPI (*SetFillActive)(); - - /** Reports whether the Color palette shows the fill color (not stroke). - (Note that this function returns a boolean value, not an error code.) - @return True if fill is active. - */ - ASBoolean ASAPI (*IsFillActive)(); - - /** Sets the fill and stroke states of the current selection to those - of the default style (usually white for fill and solid - 1-point black for stroke). - (Note that this function does not return an error code.) - */ - void ASAPI (*SetDefaultFillStroke)(); - - /** Retrieves the index position of the selected stop the current gradient. - (Note that this function returns a numeric value, not an error code.) - @return The 0-based position index, or -1 if a gradient stop is not - currently being edited. - */ - int ASAPI (*GetActiveGradientStopIndex)(); - - /** Retrieves the gradient currently shown in the Gradient palette. - @param color [out] A buffer in which to return the gradient. - */ - ASErr ASAPI (*GetCurrentGradient)(AIColor *color); - - /** Retrieves the fill, stroke, or currently active gradient stop - color currently shown in the Color palette. - @param color [out] A buffer in which to return the color. - */ - ASErr ASAPI (*GetCurrentColor)(AIColor *color); - - /** Invokes the Gradient palette. */ - ASErr ASAPI (*ShowGradientDialog)(); - - /** Invokes the Color palette. */ - ASErr ASAPI (*ShowColorDialog)(); - - /** If caching is not active, applies a color to the selection, or to the - active gradient stop. - - If caching is active--that is, between a call to \c #BeginActiveColor() - and a call to \c #EndActiveColor() --applies the color to proxies (such as the - color previews in the Tools palette) rather than to the selection or gradient stop. - (The eyedropper tool uses this during mouse-drag.) - @param color The new color. - @param useGradientStop True to replace the color in the - currently active gradient stop only, false to replace the color - in the entire selection. - */ - ASErr ASAPI (*SetActiveColor)(AIColor *color, ASBoolean useGradientStop); - - /** Starts caching for color application to proxies. - @see \c #SetActiveColor(), \c #SetAIColor() */ - ASErr ASAPI (*BeginActiveColor)(); - - /** Finishes caching for color application to proxies. - @see \c #SetActiveColor(), \c #SetAIColor() */ - ASErr ASAPI (*EndActiveColor)(); - - /** Reports whether the current color in the Color palette is for a stroke or fill. - (Note that this function returns a boolean value, not an error code.) - @return True if the color is for a stroke, false if it is for a fill. - */ - ASBoolean ASAPI (*IsCurrentColorStroke)(); - - /** If caching is not active, applies a stroke or fill color to the current selection, - using a partial color specification. - - If caching is active--that is, between a call to \c #BeginActiveColor() - and a call to \c #EndActiveColor() --applies the color to proxies (such as the - color previews in the Tools palette) rather than to the selection. - @param color The color structure containing new color component values. - @param colorMap A color map that specifies which members of the color structure - contain valid values. - @param isStroke True to set the current stroke color, false to set the fill color. - */ - ASErr ASAPI (*SetAIColor)(AIColor *color, AIColorMap *colorMap, ASBoolean isStroke); - - /** Shows a gradient in the Gradient palette. - @param color The gradient. - */ - ASErr ASAPI (*SetCurrentGradient)(AIColor *color); - - /** Shows a color in the Color palette. - @param color The color. - */ - ASErr ASAPI (*SetCurrentColor)(AIColor *color); - - /** Shows the Color palette if it is hidden, hides the Color palette if it is shown. - */ - ASErr ASAPI (*ToggleColorDialog)(); - - /** Exchanges the fill and stroke colors for the current selection. - (Note that this function does not return an error code.) - */ - void ASAPI (*SwapFillStroke)(); - - /** Invokes the color-chooser dialog and reports the chosen color. - (Note that this function returns a boolean value, not an error code.) - @param currentColor specifies the initial color the picker will display. - When the function returns currentColor will become the color the user picked. - @return True if the user clicked OK, false of the user clicked Cancel. */ - ASBoolean ASAPI (*DisplayColorPicker)(AIColor *currentColor); - - /** Invokes the Color Picker dialog with options and reports the chosen color. - (Note that this function returns a boolean value, not an error code.) - @param currentColor [in/out] On input, the initial color to display. - On output, the color the user selected. - @param options Options for initial display. The Color Picker opens in - the swatch-list view if the initial color exactly matches the color - in a swatch from the \c #AIColorPickerOptions::swatchList. - @return True if the user clicked OK in the Color Picker, false if the user clicked Cancel. - */ - ASBoolean ASAPI (*DisplayColorPickerWithOptions)(AIColor *currentColor, const AIColorPickerOptions &options ); - - /** Changes the stroke alignment for an art object. - @param art [in] The art handle. - @param strokeAlignment [in] The new alignment type, a constant in \c #AIStrokeAlignmentType. - @return \c #kNoErr if successful, error code otherwise. - */ - AIErr ASAPI (*SetStrokeAlignment)(AIArtHandle art, ai::uint32 strokeAlignment); - - /** Changes the stroke alignment for the currently selected art object or objects. - @param strokeAlignment [in] The new alignment type, a constant in \c #AIStrokeAlignmentType. - @return \c #kNoErr if successful, error code otherwise. - */ - AIErr ASAPI(*SetStrokeAlignmentOnSelection)(ai::uint32 strokeAlignment); - - /** Retrieves the stroke alignment for the currently selected art object or objects. - (Note that this function returns a numeric value, not an error code.) - @return The stroke alignment type of the current selection, a constant in \c #AIStrokeAlignmentType. - If there is no selection or selected art objects have different states, returns \c #kAIStrokeAlignmentCenter. - */ - ai::uint32 ASAPI(*GetStrokeAlignmentFromSelection)(); - -} AIPaintStyleSuite; - - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIPaintStyle__ +#define __AIPaintStyle__ + +/* + * Name: AIPaintStyle.h + * Author: Vivek Agrawal + * Date: 2/22/2016 + * Purpose: AI Paint Style Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2015-2016 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/******************************************************************************* +** +** Imports +** +**/ + +#ifndef __ASTypes__ +#include "ASTypes.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIPathStyle__ +#include "AIPathStyle.h" +#endif + +#ifndef __AISwatchList__ +#include "AISwatchList.h" +#endif + +#include "AIHeaderBegin.h" + + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPaintStyleSuite "AI Paint Style Suite" +#define kAIPaintStyleSuiteVersion10 AIAPI_VERSION(10) + +/* Latest version */ +#define kAIPaintStyleSuiteVersion kAIPaintStyleSuiteVersion10 +#define kAIPaintStyleVersion kAIPaintStyleSuiteVersion + +/** @ingroup Callers + Caller for updating any paint style properties. See \c #AIPaintStyleSuite. +**/ +#define kAIPaintStyleModifierCaller "AI PaintStyle Modifier Caller" + +/** @ingroup Notifiers + The eyedropper sends this while tracking a mouse drag, to notify the Color palette + to update its proxies during the drag, using the path style and map + in the \c #AIUpdatePathStyleNotifyData. See \c #AIPaintStyleSuite */ +#define kAIUpdatePathStyleNotifier "AI Update PathStyle Notifier" +/** @ingroup Notifiers + See \c #AIPaintStyleSuite */ +#define kAIPaintStyleFillStrokeChangedNotifier "AI Paint Style Fill Stroke Changed Notifier" +/** @ingroup Notifiers + See \c #AIPaintStyleSuite */ +#define kAIPaintStyleGradientStopChangedNotifier "AI Paint Style Gradient Stop Changed Notifier" + +/** @ingroup Selectors + Used by the Control palette to set stroke width with \c #AIStrokeWidthMessage. + If there is no stroke currently applied, and a non-zero stroke width + is set through this selector, the previously applied stroke color is restored. + */ +#define kAIPaintStyleSetStrokeWidthSelector "AI Paint Style Set Stroke Width Selector" + +/** The new stroke width for a \c #kAIPaintStyleSetStrokeWidthSelector */ +typedef struct { + /** The message data. */ + SPMessageData d; + /** The stroke width in points. */ + float newStrokeWidth; +} AIStrokeWidthMessage; + +/** Indicator type for ADM. */ +#define kAIPaintStyleIndicatorType "AI Paint Style Indicator Type" +/** Indicator type for ADM. */ +#define kAIPaintStyleIndicatorSmallType "AI Paint Style Indicator Small Type" + +/** Color editor type for ADM. */ +#define kAIPaintStyleColorEditorType "AI Paint Style Color Editor Type" + +/** Minimum dash stroke length. */ +#define kMinStrokeDashLength 0.01 + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Data for \c #kAIUpdatePathStyleNotifier */ +typedef struct +{ + /** Path style to update. */ + AIPathStyle pathStyle; + /** Path style map. The map indicates which fields of an \c #AIPathStyle + are specified by a partial style. A path style can contain unknown or mixed + attributes, which are indicated by a value of false for that attribute in the map. */ + AIPathStyleMap pathStyleMap; +} AIUpdatePathStyleNotifyData; + + +/** Colorspaces that can be displayed by the Color palette for editing colors. */ +typedef enum +{ + kUnknownSpace = 0, + kGrayscaleSpace, + kRGBSpace, + kHSVSpace, + kCMYKSpace, + kWebSpace, + kTintSpace, + kLabSpace +} ColorSpace; + + +/** Behavior options for Color Editor. See \c #AIPaintStyleSuite. */ +typedef struct +{ + /** When true, colors are converted to the document color space for + display in the color indicator. This gamut limits them to the + document color space. Default is true. */ + AIBoolean showSampleInDocCs; + + /** When true, Lab is allowed as a color model in the Color Editor. + Default is false. */ + AIBoolean allowLabColorModel; + + /** When true, a square representing the current color is drawn to + the left of the color sliders. When false, the color indicator + is hidden. Default is true. */ + AIBoolean showColorIndicator; + /** When true, the web-safe and gamut indicators are drawn to the right of the color sliders. + When false, they are drawn to the left of the color sliders. Default is false. */ + AIBoolean warningIndicatorsOnRight; + + /** When true, global objects are verified against the current document's swatch list + before they are displayed. When false, they are assumed to be valid. Default is true. + + \li A Color Editor installed in a palette should always set this to true, because colors can + become invalid asynchronously with palette updates. + + \li A Color Editor in a modal dialog may wish to set this to false, + especially if it allows modification of tints on \c #AIColor values + from swatch libraries that have not yet been targeted to the current document. + */ + AIBoolean verifyColors; +} AIColorEditorOptions; + +/** Behavior options for opening the Color Picker using + \c #AIPaintStyleSuite::DisplayColorPickerWithOptions(). */ +typedef struct +{ + /** The swatch list to display in the swatch-list view of + the Color Picker. When \c NULL, the current document's + swatch list is used. + + When the Color Picker is displayed, the swatch-list view + is shown if the initial color exactly matches the color + from a swatch in this list. + */ + AISwatchListRef swatchList; + +} AIColorPickerOptions; + +/** Possible colorspaces for specifying colors for a Color Editor */ +typedef enum +{ + kAIColorEditorColorUnknown = 0, + kAIColorEditorColorGray, + kAIColorEditorColorRGB, + kAIColorEditorColorCMYK, + kAIColorEditorColorLab, + /** Internal */ + kAIColorEditorColorDummy = 0xFFFFFFFF +} AIColorEditorColorSpace; + + + +/** Color specification for the Color Editor */ +typedef struct +{ + /** The colorspace */ + AIColorEditorColorSpace space; + /** The color values. Which array members have values, and what + they mean, depends on the colorspace. */ + AIReal values[4]; + /** Each member of this array that is true corresponds to a + member of the \c values array with a meaningful value. */ + AIBoolean defined[4]; +} AIColorEditorColor; + +/** Color Editor read-only flag. See \c #AIPaintStyleSuite::SetColorEditorReadOnly(). */ +typedef enum +{ + kAIColorEditorReadOnlyDefault = 0 +} AIColorEditorReadOnlyOption; + +// New for AI13: + +/** Developer-defined data to pass to your color-editor + tracking procedure. + @see \c #ColorEditorTrackProc, \c #AIPaintStyleSuite::SetColorEditorTrackProc() +*/ +typedef void* ColorEditorClientData; + +/** Prototype for an event tracking procedure associated with a color-editor + dialog item. Called when the user makes any change in the editor. + Use it to update other UI features according to the current + Color Editor state. If supplied, it must not modify the state + of the Color Editor itself. + @param clientData Developer-defined data passed with the event. + @return Nothing. + @see \c #AIPaintStyleSuite::SetColorEditorTrackProc() + */ +typedef void (*ColorEditorTrackProc)(ColorEditorClientData clientData); + +/** Possible values for stroke alignment. See \c #AIPaintStyleSuite. */ +typedef enum { + kAIStrokeAlignmentCenter = 0, + kAIStrokeAlignmentInside = 1, + kAIStrokeAlignmentOutside = 2 +} AIStrokeAlignmentType; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions to examine and operate on the Color and Gradient + palettes, which display and modify the paint style of the current selection, + and the Color Editor, which allows a user to choose and edit colors. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPaintStyleSuite and \c #kAIPaintStyleSuiteVersion. + */ +typedef struct +{ + /** Causes the Color palette to show the stroke color (not fill). + (Note that this function does not return an error code.) + */ + void ASAPI (*SetStrokeActive)(); + + /** Reports whether the Color palette shows the stroke color (not fill). + (Note that this function returns a boolean value, not an error code.) + @return True if stroke is active. + */ + ASBoolean ASAPI (*IsStrokeActive)(); + + /** Causes the Color palette to show the fill color (not stroke). + (Note that this function does not return an error code.) + */ + void ASAPI (*SetFillActive)(); + + /** Reports whether the Color palette shows the fill color (not stroke). + (Note that this function returns a boolean value, not an error code.) + @return True if fill is active. + */ + ASBoolean ASAPI (*IsFillActive)(); + + /** Sets the fill and stroke states of the current selection to those + of the default style (usually white for fill and solid + 1-point black for stroke). + (Note that this function does not return an error code.) + */ + void ASAPI (*SetDefaultFillStroke)(); + + /** Retrieves the index position of the selected stop the current gradient. + (Note that this function returns a numeric value, not an error code.) + @return The 0-based position index, or -1 if a gradient stop is not + currently being edited. + */ + int ASAPI (*GetActiveGradientStopIndex)(); + + /** Retrieves the gradient currently shown in the Gradient palette. + @param color [out] A buffer in which to return the gradient. + */ + ASErr ASAPI (*GetCurrentGradient)(AIColor *color); + + /** Retrieves the fill, stroke, or currently active gradient stop + color currently shown in the Color palette. + @param color [out] A buffer in which to return the color. + */ + ASErr ASAPI (*GetCurrentColor)(AIColor *color); + + /** Invokes the Gradient palette. */ + ASErr ASAPI (*ShowGradientDialog)(); + + /** Invokes the Color palette. */ + ASErr ASAPI (*ShowColorDialog)(); + + /** If caching is not active, applies a color to the selection, or to the + active gradient stop. + + If caching is active--that is, between a call to \c #BeginActiveColor() + and a call to \c #EndActiveColor() --applies the color to proxies (such as the + color previews in the Tools palette) rather than to the selection or gradient stop. + (The eyedropper tool uses this during mouse-drag.) + @param color The new color. + @param useGradientStop True to replace the color in the + currently active gradient stop only, false to replace the color + in the entire selection. + */ + ASErr ASAPI (*SetActiveColor)(AIColor *color, ASBoolean useGradientStop); + + /** Starts caching for color application to proxies. + @see \c #SetActiveColor(), \c #SetAIColor() */ + ASErr ASAPI (*BeginActiveColor)(); + + /** Finishes caching for color application to proxies. + @see \c #SetActiveColor(), \c #SetAIColor() */ + ASErr ASAPI (*EndActiveColor)(); + + /** Reports whether the current color in the Color palette is for a stroke or fill. + (Note that this function returns a boolean value, not an error code.) + @return True if the color is for a stroke, false if it is for a fill. + */ + ASBoolean ASAPI (*IsCurrentColorStroke)(); + + /** If caching is not active, applies a stroke or fill color to the current selection, + using a partial color specification. + + If caching is active--that is, between a call to \c #BeginActiveColor() + and a call to \c #EndActiveColor() --applies the color to proxies (such as the + color previews in the Tools palette) rather than to the selection. + @param color The color structure containing new color component values. + @param colorMap A color map that specifies which members of the color structure + contain valid values. + @param isStroke True to set the current stroke color, false to set the fill color. + */ + ASErr ASAPI (*SetAIColor)(AIColor *color, AIColorMap *colorMap, ASBoolean isStroke); + + /** Shows a gradient in the Gradient palette. + @param color The gradient. + */ + ASErr ASAPI (*SetCurrentGradient)(AIColor *color); + + /** Shows a color in the Color palette. + @param color The color. + */ + ASErr ASAPI (*SetCurrentColor)(AIColor *color); + + /** Shows the Color palette if it is hidden, hides the Color palette if it is shown. + */ + ASErr ASAPI (*ToggleColorDialog)(); + + /** Exchanges the fill and stroke colors for the current selection. + (Note that this function does not return an error code.) + */ + void ASAPI (*SwapFillStroke)(); + + /** Invokes the color-chooser dialog and reports the chosen color. + (Note that this function returns a boolean value, not an error code.) + @param currentColor specifies the initial color the picker will display. + When the function returns currentColor will become the color the user picked. + @return True if the user clicked OK, false of the user clicked Cancel. */ + ASBoolean ASAPI (*DisplayColorPicker)(AIColor *currentColor); + + /** Invokes the Color Picker dialog with options and reports the chosen color. + (Note that this function returns a boolean value, not an error code.) + @param currentColor [in/out] On input, the initial color to display. + On output, the color the user selected. + @param options Options for initial display. The Color Picker opens in + the swatch-list view if the initial color exactly matches the color + in a swatch from the \c #AIColorPickerOptions::swatchList. + @return True if the user clicked OK in the Color Picker, false if the user clicked Cancel. + */ + ASBoolean ASAPI (*DisplayColorPickerWithOptions)(AIColor *currentColor, const AIColorPickerOptions &options ); + + /** Changes the stroke alignment for an art object. + @param art [in] The art handle. + @param strokeAlignment [in] The new alignment type, a constant in \c #AIStrokeAlignmentType. + @return \c #kNoErr if successful, error code otherwise. + */ + AIErr ASAPI (*SetStrokeAlignment)(AIArtHandle art, ai::uint32 strokeAlignment); + + /** Changes the stroke alignment for the currently selected art object or objects. + @param strokeAlignment [in] The new alignment type, a constant in \c #AIStrokeAlignmentType. + @return \c #kNoErr if successful, error code otherwise. + */ + AIErr ASAPI(*SetStrokeAlignmentOnSelection)(ai::uint32 strokeAlignment); + + /** Retrieves the stroke alignment for the currently selected art object or objects. + (Note that this function returns a numeric value, not an error code.) + @return The stroke alignment type of the current selection, a constant in \c #AIStrokeAlignmentType. + If there is no selection or selected art objects have different states, returns \c #kAIStrokeAlignmentCenter. + */ + ai::uint32 ASAPI(*GetStrokeAlignmentFromSelection)(); + +} AIPaintStyleSuite; + + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPanel.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPanel.h index 5883358..7f4a452 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPanel.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPanel.h @@ -1,632 +1,647 @@ -/************************************************************************* -* -*ADOBE SYSTEMS INCORPORATED -* Copyright 2010 Adobe Systems Incorporated -* All Rights Reserved. -* -*NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the -*terms of the Adobe license agreement accompanying it. If you have received this file from a -*source other than Adobe, then your use, modification, or distribution of it requires the prior -*written permission of Adobe. -* -**************************************************************************/ - -#ifndef __AIPANEL_H__ -#define __AIPANEL_H__ - -#include "AITypes.h" -#include "IAIUnicodeString.h" -#include "IAIAutoBuffer.h" -/** @file AIPanel.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIPanelSuite "AI Panel Suite" -#define kAIPanelSuiteVersion2 AIAPI_VERSION(2) -#define kAIPanelSuiteVersion kAIPanelSuiteVersion2 -#define kAIPanelVersion kAIPanelSuiteVersion - - -#define kAIPanelFlyoutMenuSuite "AI Panel Flyout Menu Suite" -#define kAIPanelFlyoutMenuSuiteVersion2 AIAPI_VERSION(2) -#define kAIPanelFlyoutMenuSuiteVersion kAIPanelFlyoutMenuSuiteVersion2 -#define kAIPanelFlyoutMenuVersion kAIPanelFlyoutMenuSuiteVersion - -/******************************************************************************* -** -** Types -** -**/ -#ifdef WIN_ENV - typedef HWND AIPanelPlatformWindow; -#elif MAC_ENV - #ifdef __OBJC__ - @class NSView; - typedef NSView* AIPanelPlatformWindow; - #else - typedef void* AIPanelPlatformWindow; - #endif -#else -#error unknown configuration -#endif - -/** An opaque reference to a panel. See \c #AIPanelSuite. */ -typedef struct _opaque_AIPanel* AIPanelRef; - -/** An opaque reference to a panel flyout menu. See \c #AIPanelFlyoutMenuSuite. */ -typedef struct _opaque_AIPanelFlyoutMenu* AIPanelFlyoutMenuRef; - -/** Constants for the glyphs that mark a menu item as selected. - See \c #AIPanelFlyoutMenuSuite. */ -enum { - kAIPanelFlyoutMenuItemMark_NONE, - kAIPanelFlyoutMenuItemMark_CHECK, - kAIPanelFlyoutMenuItemMark_BULLET, - kAIPanelFlyoutMenuItemMark_DASH -}; - -/** The glyph that marks a menu item as selected. - See \c #AIPanelFlyoutMenuSuite. */ -typedef ai::uint32 AIPanelFlyoutMenuItemMark; - -/** A developer-defined data object that can be associated with a panel. - See \c #AIPanelSuite. */ -typedef void* AIPanelUserData; - -/** Prototype of a function that is called before a panel's flyout menu is made visible. - @param inPanel The panel object. - @see \c #AIPanelFlyoutMenuSuite. -*/ -typedef void AIAPI (*AIPanelFlyoutMenuPreVisibilityProc)(AIPanelRef inPanel); - -/** Prototype of a function that is called after a panel's flyout menu has been shown. - @param inPanel The panel object. - @param itemID The selected item ID. Zero value of itemID means user cancelled the menu without selecting any item. - @see \c #AIPanelFlyoutMenuSuite. -*/ -typedef void AIAPI (*AIPanelFlyoutMenuProc)(AIPanelRef inPanel, ai::uint32 itemID); - -/** Prototype of a function that is called after the visibility of a panel is changed. - @param inPanel The panel object. - @param isVisible The new visibility of the panel - @see \c #AIPanelSuite. -*/ -typedef void AIAPI (*AIPanelVisibilityChangedNotifyProc)(AIPanelRef inPanel, AIBoolean isVisible); - -/** Prototype of a function that is called after the size of a panel is changed. - @param inPanel The panel object. - @see \c #AIPanelSuite. -*/ -typedef void AIAPI (*AIPanelSizeChangedNotifyProc)(AIPanelRef inPanel); - -/** Prototype of a function that is called after the state of a panel is changed. - @param inPanel The panel object. - @param newState The new panel state - @see \c #AIPanelSuite. -*/ -typedef void AIAPI (*AIPanelStateChangedNotifyProc)(AIPanelRef inPanel, ai::int16 newState); - -/** Prototype of a function that is called after a panel is closed by clicking on the close button. - @param inPanel The panel object. - @see \c #AIPanelSuite. -*/ -typedef void AIAPI (*AIPanelClosedNotifyProc)(AIPanelRef inPanel); - - -/************************************************************************/ -/// Error Values return by the suite -/************************************************************************/ -/** @ingroup Errors - @see \c #AIPanelSuite. - */ -#define kAIInvalidPanelRef 'INVD' - - - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -Provides functions for creating and managing panels. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIPanelSuite and \c #kAIPanelSuiteVersion. -*/ - -struct AIPanelSuite{ - - /** Creates a new panel. - @param inPluginRef The plug-in that is creating the panel. - @param inID A unique identifier for the new panel. - @param inTitle The title of the panel. - @param inStateCount The number of host layouts for the panel; must be at least 1. - @param inMinSize Minimum size of the panel. - @param isResizable True to make the panel resizable. - @param inFlyoutMenu The flyout menu for the panel, or NULL to hide the flyout icon. - @param inUserData Developer-defined data to be associated with the panel. - @param outPanel [out] A buffer in which to return the new panel object. - */ - AIAPI AIErr (*Create)(SPPluginRef inPluginRef, const ai::UnicodeString& inID, const ai::UnicodeString& inTitle, - ai::int16 inStateCount, const AISize& inMinSize, AIBoolean isResizable, - AIPanelFlyoutMenuRef inFlyoutMenu, AIPanelUserData inUserData, AIPanelRef& outPanel); - - - /** Deletes a panel object. - This must be called when the plug-in receives \c #kAIApplicationShutdownNotifier. - @param inPanel The panel object. - **/ - AIAPI AIErr (*Destroy)(AIPanelRef inPanel); - - - /** Retrieves the platform-specific window/view used for the panel. - @param inPanel The panel object. - @param outPlatformWindow The platform specific window/view of the panel - **/ - AIAPI AIErr (*GetPlatformWindow)(AIPanelRef inPanel, AIPanelPlatformWindow& outPlatformWindow); - - - /** Shows or hides the panel. If the panel is part of a tab group, - the whole group is affected - @param inPanel The panel object. - @param inShow True to make panel visible, false to hide it - **/ - AIAPI AIErr (*Show)(AIPanelRef inPanel, AIBoolean inShow); - - - - /** Reports the effective visibility of a panel. - If the panel is part of a tabbed group but is not the frontmost tab, - it is not considered visible. - @param inPanel The panel object. - @param outIsShown [out] A buffer in which to return true of the panel - is effectively visible, false otherwise. - **/ - AIAPI AIErr (*IsShown)(AIPanelRef inPanel, AIBoolean& outIsShown); - - - /** Retrieves developer-defined data from a panel. - @param inPanel The panel object. - @param outUserData [out] A buffer in which to return developer-defined data - associated with the panel. - **/ - AIAPI AIErr (*GetUserData)(AIPanelRef inPanel, AIPanelUserData& outUserData); - - - /** Associates developer-defined data with a panel, which can be used - in developer-defined callbacks. - @param inPanel The panel object. - @param inUserData The developer-defined data. - **/ - AIAPI AIErr (*SetUserData)(AIPanelRef inPanel, AIPanelUserData inUserData); - - - /** Sets a panel title. - @param inPanel The panel object. - @param inTitle The new title of the panel - **/ - AIAPI AIErr (*SetTitle)(AIPanelRef inPanel, const ai::UnicodeString& inTitle); - - - /** Retrieves the panel title. - @param inPanel The panel object. - @param outTitle [out] A buffer in which to return the title string. - **/ - AIAPI AIErr (*GetTitle)(AIPanelRef inPanel, ai::UnicodeString& outTitle); - - - /** Sets the icon to be used when a panel is collapsed. Only PNG icons can be used. - @param inPanel The panel object. - @param inPNGData The PNG resource data for the icon. - @param inDataSize The size of the resource data in bytes. - @param inPNGDarkData The PNG resource data for an alternate icon, to be used in "dark" mode. - @param inDarkDataSize The size of the alternate resource data in bytes. - */ - AIAPI AIErr (*SetIcon)(AIPanelRef inPanel, const ai::AutoBuffer& inPNGData, const ai::AutoBuffer& inDataSize, - const ai::AutoBuffer& inPNGDarkData, const ai::AutoBuffer& inDarkDataSize); - - - /** Sets the icon to be used when a panel is collapsed, using an existing resource. - Only PNG icons can be used. - @param inPanel The panel object. - @param iconResId The resource identifier of a PNG icon. - @param darkIconcResId The resource identifier of an alternate PNG icon for "dark" mode. - **/ - AIAPI AIErr (*SetIconResourceID)(AIPanelRef inPanel, const ai::AutoBuffer& iconResId, const ai::AutoBuffer& darkIconResId); - - /** Retrieves the inner dimensions of the current panel, which excludes the frame, title, and any - platform-specific decorations. - @param inPanel The panel object. - @param outSize [out] A buffer in which to return the size value. - **/ - AIAPI AIErr (*GetSize)(AIPanelRef inPanel, AISize& outSize); - - - /** Sets the minimum size for a panel's inner dimensions. - @param inPanel The panel object. - @param inMinimumSize The size value. - **/ - AIAPI AIErr (*SetMinimumSize)(AIPanelRef inPanel, const AISize& inMinimumSize); - - - /** Retrieves the minimum minimum size for a panel's inner dimensions. - @param inPanel The panel object. - @param outMinimumSize [out] A buffer in which to return the size value. - **/ - AIAPI AIErr (*GetMinimumSize)(AIPanelRef inPanel, AISize& outMinimumSize); - - - /** Sets the maximum size for a panel's inner dimensions. - @param inPanel The panel object. - @param inMaximumSize The size value. - **/ - AIAPI AIErr (*SetMaximumSize)(AIPanelRef inPanel, const AISize& inMaximumSize); - - - /** Retrieves the maximum size for a panel's inner dimensions. - @param inPanel The panel object. - @param outMaximumSize [out] A buffer in which to return the size value. - **/ - AIAPI AIErr (*GetMaximumSize)(AIPanelRef inPanel, AISize& outMaximumSize); - - - /** Sets both the constrained and unconstrained preferred sizes - for a panel's inner dimensions. - The constrained size is used when a dialog is frame docked. - The unconstrained size is used when the dialog is floating. - - @param inPanel The panel object. - @param inPreferredSize The new preferred size value. - **/ - AIAPI AIErr (*SetPreferredSizes)(AIPanelRef inPanel, const AISize& inPreferredSize); - - - /** Sets all sizes at once for a panel's inner dimensions. - @param inPanel The panel object. - @param inMinimumSize Minimum panel size. - @param inPreferredUnconstrainedSize Preferred unconstrained panel size. . - @param inPreferredConstrainedSize Preferred constrained panel size. - @param inMaximumSize Maximum panel size. - @return error **/ - AIAPI AIErr (*SetSizes)(AIPanelRef inPanel, const AISize& inMinimumSize, const AISize& inPreferredUnconstrainedSize, - const AISize& inPreferredConstrainedSize, const AISize& inMaximumSize); - - - /** For non-resizable panels, sets the minimum, maximum, - preferred unconstrained and preferred constrained sizes - for a panel's inner dimensions to a single size value. - For resizable panels, sets only the preferred unconstrained and - constrained sizes to the given size. - @param inPanel The panel object. - @param inSize The new size value. - **/ - AIAPI AIErr (*SetSize)(AIPanelRef inPanel, const AISize& inSize); - - - /** Retrieves the preferred constrained size for a panel's inner dimensions. - The constrained size is used when a dialog is frame docked. - @param inPanel The panel object. - @param outPreferredConstrainedSize [out] A buffer in which to return the size value. - **/ - AIAPI AIErr (*GetPreferredConstrainedSize)(AIPanelRef inPanel, AISize& outPreferredConstrainedSize); - - - /** Retrieves the preferred unconstrained size for a panel's inner dimensions. - The unconstrained size is used when the dialog is floating. - @param inPanel The panel object. - @param outPreferredUnconstrainedSize [out] A buffer in which to return the size value. - **/ - AIAPI AIErr (*GetPreferredUnconstrainedSize)(AIPanelRef inPanel, AISize& outPreferredUnconstrainedSize); - - - /** Sets the current state of a panel. - @param inPanel The panel object. - @param inCurrentState The new current state, must be at least 1. - **/ - AIAPI AIErr (*SetCurrentState)(AIPanelRef inPanel, ai::int16 inCurrentState); - - - /** Retrieves the current state of a panel - @param inPanel The panel object. - @param outCurrentState [out] A buffer in which to return the state value. - **/ - AIAPI AIErr (*GetCurrentState)(AIPanelRef inPanel, ai::int16& outCurrentState); - - - /** Modifies the state count of a panel. - @param inPanel The panel object. - @param inStateCount The new state count. Must be at least 1. - **/ - AIAPI AIErr (*SetStateCount)(AIPanelRef inPanel, ai::int16 inStateCount); - - - /** Retrieves the state count of a panel - @param inPanel The panel object. - @param outStateCount [out] A buffer in which to return the state-count value. - **/ - AIAPI AIErr (*GetStateCount)(AIPanelRef inPanel, ai::int16& outStateCount); - - - /** Sets the vertical step size to use when a resizable panel is resized. - The panel height is constrained to be its minimum height plus a multiple - of the vertical step size. By default, this is 1, making the panel sizable to any height. - - @param inPanel The panel object. - @param inStepSize The new step size. - **/ - AIAPI AIErr (*SetVerticalStepSize)(AIPanelRef inPanel, AIReal inStepSize); - - - /** Retrieves the vertical step size for a panel - @param inPanel The panel object. - @param outStepSize [out] A buffer in which to return the size value. - **/ - AIAPI AIErr (*GetVerticalStepSize)(AIPanelRef inPanel, AIReal& outStepSize); - - - /** Sets the flyout menu for a panel. - @param inPanel The panel object. - @param inFlyoutMenu The new menu, or NULL to hide the menu icon. - @see \c #AIPanelFlyoutMenuSuite. - **/ - AIAPI AIErr (*SetFlyoutMenu)(AIPanelRef inPanel, AIPanelFlyoutMenuRef inFlyoutMenu); - - - /** Retrieves the flyout menu for a panel. - @param inPanel The panel object. - @param outFlyoutMenu [out] A buffer in which to return the flyout menu object. - @see \c #AIPanelFlyoutMenuSuite. - **/ - AIAPI AIErr (*GetFlyoutMenu)(AIPanelRef inPanel, AIPanelFlyoutMenuRef& outFlyoutMenu); - - - /** Reports the minimized state of a panel. - When a panel is minimized its content area is not visible, and the panel - view has a visible height of 0. - @param inPanel The panel object. - @param outIsMinimized [out] A buffer in which to return true if the panel is minimized, - false otherwise. - **/ - AIAPI AIErr (*IsMinimized)(AIPanelRef inPanel, AIBoolean& outIsMinimized); - - - /** Modifies the minimized state of the panel. - @param inPanel The panel object. - @param inIsMinimized True to minimize the panel, false to return it to the - unminimized state. - **/ - AIAPI AIErr (*ChangeIsMinimized)(AIPanelRef inPanel, AIBoolean inIsMinimized); - - - /** Moves a panel to a specific screen location. - Has no effect if the panel is docked. If the panel is part of a tab group, - the whole tab group is moved to the new location. - @param inPanel The panel object. - @param inPoint The new position in global screen coordinates. - **/ - AIAPI AIErr (*Move)(AIPanelRef inPanel, AIPoint inPoint); - - - /** Sets a callback procedure to be called before the flyout menu for a panel is shown. - @param inPanel The panel object. - @param inFlyoutMenuPreVisProc The new callback procedure. - **/ - AIAPI AIErr (*SetFlyoutMenuPreVisibilityProc)(AIPanelRef inPanel, AIPanelFlyoutMenuPreVisibilityProc inFlyoutMenuPreVisProc); - - - /** Sets a callback procedure to be called after the flyout menu for a panel has been shown. - @param inPanel The panel object. - @param inFlyoutMenuPostVisProc The new callback procedure. - **/ - AIAPI AIErr (*SetFlyoutMenuProc)(AIPanelRef inPanel, AIPanelFlyoutMenuProc inFlyoutMenuProc); - - - /** Sets a callback procedure to be called when the visibility of a panel is changed. - @param inPanel The panel object. - @param inVisibilityChangedNotifyProc The new callback procedure. - **/ - AIAPI AIErr (*SetVisibilityChangedNotifyProc)(AIPanelRef inPanel, AIPanelVisibilityChangedNotifyProc inVisibilityChangedNotifyProc); - - - /** Sets a callback procedure to be called when the size of a panel is changed. - @param inPanel The panel object. - @param inSizeChangedNotifyProc The new callback procedure. - **/ - AIAPI AIErr (*SetSizeChangedNotifyProc)(AIPanelRef inPanel, AIPanelSizeChangedNotifyProc inSizeChangedNotifyProc); - - - /** Sets a callback procedure to be called when the state of a panel is changed. - @param inPanel The panel object. - @param inStateChangedNotifyProc The new callback procedure. - **/ - AIAPI AIErr (*SetStateChangedNotifyProc)(AIPanelRef inPanel, AIPanelStateChangedNotifyProc inStateChangedNotifyProc); - - - /** Set a callback procedure to be called when a panel is closed by clicking the close button. - @param inPanel The panel object. - @param inPanelClosedNotifyProc The new callback procedure. - **/ - AIAPI AIErr (*SetClosedNotifyProc)(AIPanelRef inPanel, AIPanelClosedNotifyProc inPanelClosedNotifyProc); -}; - - - - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -Provides functions for creating and managing panel flyout menus. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIPanelFlyoutMenuSuite and \c #kAIPanelFlyoutMenuSuiteVersion. -*/ - -struct AIPanelFlyoutMenuSuite{ - - /** Creates a new panel flyout menu or submenu. - @param outFlyOutMenu [out] A buffer in which to return the new panel flyout menu object. - - */ - AIAPI AIErr (*Create)(AIPanelFlyoutMenuRef& outFlyOutMenu); - - - /** Deletes a panel flyout menu object. - This must be called when the plug-in receives \c #kAIApplicationShutdownNotifier. - @param inFlyOutMenu The panel flyout menu object. - */ - AIAPI AIErr (*Destroy)(AIPanelFlyoutMenuRef inFlyOutMenu); - - - /** Retrieves the number of items in a flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param outSize [out] A buffer in which to return the number of items. - */ - AIAPI AIErr (*Size)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32& outSize); - - - /** Inserts a new item at the end of a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inNewItemID The unique non-zero identifier for the new item. - @param inItemText The display text for the new item. - */ - AIAPI AIErr (*AppendItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inNewItemID, const ai::UnicodeString& inItemText); - - - /** Inserts a separator in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inNewItemID The unique non-zero identifier for the new separator. - */ - AIAPI AIErr (*AppendSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inNewItemID); - - - /** Inserts a new item at a specific relative position in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inBeforeItemID The ID of an existing item before which to insert the new item. - @param inNewItemID The unique non-zero identifier for the new item. - @param inItemText TThe display text for the new item. - */ - AIAPI AIErr (*InsertItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inBeforeItemID, ai::uint32 inNewItemID, const ai::UnicodeString& inItemText); - - - /** Inserts a separator at a specific relative position in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inAfterID The ID of an exsiting item after which to insert the separator, - or -1 to append the separator to the end of the menu. - @param inNewItemID The unique non-zero identifier for the new separator. - */ - AIAPI AIErr (*InsertSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inBeforeItemID, ai::uint32 inNewItemID); - - - /** Removes an item or separator from a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item or separator. - */ - AIAPI AIErr (*RemoveItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID); - - - /** Enables or disables an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - @param inEnabled True to enable or false to disable the item. - */ - AIAPI AIErr (*SetItemEnabled)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIBoolean inEnabled); - - - /** Retrieves the enabled status of an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - @param outEnabled [out] A buffer in which to return true if the item is enabled, false otherwise. - */ - AIAPI AIErr (*GetItemEnabled)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIBoolean& outEnabled); - - - /** Sets a mark on an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - @param inItemMark The mark type constant. Can be check, bullet, dash, or none. - */ - AIAPI AIErr (*SetItemMark)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuItemMark inItemMark); - - - /** Retrieves the type of mark on an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - @param outItemMark [out] A buffer in which to return the type constant (check, bullet, dash, or none). - */ - AIAPI AIErr (*GetItemMark)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuItemMark& outItemMark); - - - /** Sets the display text for an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - @param inItemText The new text string. - */ - AIAPI AIErr (*SetItemText)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, const ai::UnicodeString& inItemText); - - - /** Retrieves the display text for an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - @param outItemText [out] A buffer in which to return the text string. - */ - AIAPI AIErr (*GetItemText)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, ai::UnicodeString& outItemText); - - - /** Reports whether an item in a panel flyout menu is a separator. - @param inFlyOutMenu The panel flyout menu object. - @param inItemIndex The 0-based index of the item. - @param outIsItemSeparator [out] A buffer in which to return true if the item is a separator, false otherwise. - @return error - */ - AIAPI AIErr (*IsItemSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, AIBoolean& outIsItemSeparator); - - - /** Associates a submenu with an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - @param inSubMenu A panel flyout menu object. - */ - AIAPI AIErr (*SetItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuRef inSubMenu); - - - /** Retrieves the submenu associated with an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - @param outSubMenu [out] A buffer in which to return the submenu object. - */ - AIAPI AIErr (*GetItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuRef& outSubMenu); - - - /** Removes any submenu associated with an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemID The unique identifier of the item. - */ - AIAPI AIErr (*DetachItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID); - - /** Sets the unique identifier of an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemIndex The 0-based index of the item. - @param inNewItemID The new unique non-zero item ID. - */ - AIAPI AIErr (*SetItemID)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, ai::uint32 inNewItemID); - - /** Retrieves the unique identifier of an item in a panel flyout menu. - @param inFlyOutMenu The panel flyout menu object. - @param inItemIndex The 0-based index of the item. - @param outItemID [out] A buffer in which to return the ID - */ - AIAPI AIErr (*GetItemID)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, ai::uint32& outItemID); -}; - - -#endif +/************************************************************************* +* +*ADOBE SYSTEMS INCORPORATED +* Copyright 2016 Adobe Systems Incorporated +* All Rights Reserved. +* +*NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the +*terms of the Adobe license agreement accompanying it. If you have received this file from a +*source other than Adobe, then your use, modification, or distribution of it requires the prior +*written permission of Adobe. +* +**************************************************************************/ + +#ifndef __AIPANEL_H__ +#define __AIPANEL_H__ + +#include "AITypes.h" +#include "IAIUnicodeString.h" +#include "IAIAutoBuffer.h" +/** @file AIPanel.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIPanelSuite "AI Panel Suite" +#define kAIPanelSuiteVersion4 AIAPI_VERSION(4) +#define kAIPanelSuiteVersion kAIPanelSuiteVersion4 +#define kAIPanelVersion kAIPanelSuiteVersion + + +#define kAIPanelFlyoutMenuSuite "AI Panel Flyout Menu Suite" +#define kAIPanelFlyoutMenuSuiteVersion2 AIAPI_VERSION(2) +#define kAIPanelFlyoutMenuSuiteVersion kAIPanelFlyoutMenuSuiteVersion2 +#define kAIPanelFlyoutMenuVersion kAIPanelFlyoutMenuSuiteVersion + +/******************************************************************************* +** +** Types +** +**/ +#ifdef WIN_ENV + typedef HWND AIPanelPlatformWindow; +#elif defined(MAC_ENV) + #ifdef __OBJC__ + @class NSView; + typedef NSView* AIPanelPlatformWindow; + #else + typedef void* AIPanelPlatformWindow; + #endif +#else +#error unknown configuration +#endif + +/** An opaque reference to a panel. See \c #AIPanelSuite. */ +typedef struct _opaque_AIPanel* AIPanelRef; + +/** An opaque reference to a panel flyout menu. See \c #AIPanelFlyoutMenuSuite. */ +typedef struct _opaque_AIPanelFlyoutMenu* AIPanelFlyoutMenuRef; + +/** Constants for the glyphs that mark a menu item as selected. + See \c #AIPanelFlyoutMenuSuite. */ +enum { + kAIPanelFlyoutMenuItemMark_NONE, + kAIPanelFlyoutMenuItemMark_CHECK, + kAIPanelFlyoutMenuItemMark_BULLET, + kAIPanelFlyoutMenuItemMark_DASH +}; + +/** The glyph that marks a menu item as selected. + See \c #AIPanelFlyoutMenuSuite. */ +typedef ai::uint32 AIPanelFlyoutMenuItemMark; + +/** A developer-defined data object that can be associated with a panel. + See \c #AIPanelSuite. */ +typedef void* AIPanelUserData; + +/** Prototype of a function that is called before a panel's flyout menu is made visible. + @param inPanel The panel object. + @see \c #AIPanelFlyoutMenuSuite. +*/ +typedef void AIAPI (*AIPanelFlyoutMenuPreVisibilityProc)(AIPanelRef inPanel); + +/** Prototype of a function that is called after a panel's flyout menu has been shown. + @param inPanel The panel object. + @param itemID The selected item ID. Zero value of itemID means user cancelled the menu without selecting any item. + @see \c #AIPanelFlyoutMenuSuite. +*/ +typedef void AIAPI (*AIPanelFlyoutMenuProc)(AIPanelRef inPanel, ai::uint32 itemID); + +/** Prototype of a function that is called after the visibility of a panel is changed. + @param inPanel The panel object. + @param isVisible The new visibility of the panel + @see \c #AIPanelSuite. +*/ +typedef void AIAPI (*AIPanelVisibilityChangedNotifyProc)(AIPanelRef inPanel, AIBoolean isVisible); + +/** Prototype of a function that is called after the size of a panel is changed. + @param inPanel The panel object. + @see \c #AIPanelSuite. +*/ +typedef void AIAPI (*AIPanelSizeChangedNotifyProc)(AIPanelRef inPanel); + +/** Prototype of a function that is called after the state of a panel is changed. + @param inPanel The panel object. + @param newState The new panel state + @see \c #AIPanelSuite. +*/ +typedef void AIAPI (*AIPanelStateChangedNotifyProc)(AIPanelRef inPanel, ai::int16 newState); + +/** Prototype of a function that is called after a panel is closed by clicking on the close button. + @param inPanel The panel object. + @see \c #AIPanelSuite. +*/ +typedef void AIAPI (*AIPanelClosedNotifyProc)(AIPanelRef inPanel); + + +/************************************************************************/ +/// Error Values return by the suite +/************************************************************************/ +/** @ingroup Errors + @see \c #AIPanelSuite. + */ +#define kAIInvalidPanelRef 'INVD' + + + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +Provides functions for creating and managing panels. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIPanelSuite and \c #kAIPanelSuiteVersion. +*/ + +struct AIPanelSuite{ + + /** Creates a new panel. + @param inPluginRef The plug-in that creates the panel. + @param inID A unique identifier for the new panel. + @param inTitle The title of the panel. + @param inStateCount The number of host layouts for the panel; must be at least 1. + @param inMinSize Minimum size of the panel. + @param isResizable True to make the panel resizable. + @param inFlyoutMenu The flyout menu for the panel, or NULL to hide the flyout icon. + @param inUserData Developer-defined data to be associated with the panel. + @param outPanel [out] A buffer in which to return the new panel object. + */ + AIAPI AIErr (*Create)(SPPluginRef inPluginRef, const ai::UnicodeString& inID, const ai::UnicodeString& inTitle, + ai::int16 inStateCount, const AISize& inMinSize, AIBoolean isResizable, + AIPanelFlyoutMenuRef inFlyoutMenu, AIPanelUserData inUserData, AIPanelRef& outPanel); + + + /** Deletes a panel object. + This must be called when the plug-in receives \c #kAIApplicationShutdownNotifier. + @param inPanel The panel object. + **/ + AIAPI AIErr (*Destroy)(AIPanelRef inPanel); + + + /** Retrieves the platform-specific window/view used for the panel. + @param inPanel The panel object. + @param outPlatformWindow The platform specific window/view of the panel + **/ + AIAPI AIErr (*GetPlatformWindow)(AIPanelRef inPanel, AIPanelPlatformWindow& outPlatformWindow); + + + /** Shows or hides the panel. If the panel is part of a tab group, + the whole group is affected + @param inPanel The panel object. + @param inShow True to make panel visible, false to hide it + **/ + AIAPI AIErr (*Show)(AIPanelRef inPanel, AIBoolean inShow); + + + + /** Reports the effective visibility of a panel. + If the panel is part of a tabbed group but is not the frontmost tab, + it is not considered visible. + @param inPanel The panel object. + @param outIsShown [out] A buffer in which to return the Boolean output; True if the panel + is effectively visible, False otherwise. + **/ + AIAPI AIErr (*IsShown)(AIPanelRef inPanel, AIBoolean& outIsShown); + + + /** Retrieves developer-defined data from a panel. + @param inPanel The panel object. + @param outUserData [out] A buffer in which to return developer-defined data + associated with the panel. + **/ + AIAPI AIErr (*GetUserData)(AIPanelRef inPanel, AIPanelUserData& outUserData); + + + /** Associates developer-defined data with a panel, which can be used + in developer-defined callbacks. + @param inPanel The panel object. + @param inUserData The developer-defined data. + **/ + AIAPI AIErr (*SetUserData)(AIPanelRef inPanel, AIPanelUserData inUserData); + + + /** Sets a panel title. + @param inPanel The panel object. + @param inTitle The new title of the panel + **/ + AIAPI AIErr (*SetTitle)(AIPanelRef inPanel, const ai::UnicodeString& inTitle); + + + /** Retrieves the panel title. + @param inPanel The panel object. + @param outTitle [out] A buffer in which to return the title string. + **/ + AIAPI AIErr (*GetTitle)(AIPanelRef inPanel, ai::UnicodeString& outTitle); + + + /** Sets the icon to be used when a panel is collapsed. Only PNG icons can be used. + @param inPanel The panel object. + @param inPNGData The PNG resource data for the icon. + @param inDataSize The size of the resource data in bytes. + @param inPNGDarkData The PNG resource data for an alternate icon, to be used in "dark" mode. + @param inDarkDataSize The size of the alternate resource data in bytes. + */ + AIAPI AIErr (*SetIcon)(AIPanelRef inPanel, const ai::AutoBuffer& inPNGData, const ai::AutoBuffer& inDataSize, + const ai::AutoBuffer& inPNGDarkData, const ai::AutoBuffer& inDarkDataSize); + + + /** @deprecated. Use \c #AIPanelSuite::SetSVGIconResourceID() + Sets the icon to be used when a panel is collapsed, using an existing resource. + Only PNG icons can be used. + @param inPanel The panel object. + @param iconResId The resource identifier of a PNG icon. + @param darkIconcResId The resource identifier of an alternate PNG icon for "dark" mode. + **/ + AIAPI AIErr (*SetIconResourceID)(AIPanelRef inPanel, const ai::AutoBuffer& iconResId, const ai::AutoBuffer& darkIconResId); + + /** Sets the SVG icon to be used when a panel is collapsed, using an existing resource. + @param inPanel The panel object. + @param iconResId The resource identifier of a SVG icon in 2x scale factor. + @param darkIconResId The resource identifier of a SVG icon for "dark" mode in 2x scale factor. + **/ + AIAPI AIErr (*SetSVGIconResourceID)(AIPanelRef inPanel, ai::uint32 iconResId, ai::uint32 darkIconResId); + + + /** Retrieves the inner dimensions of the current panel, which excludes the frame, title, and any + platform-specific decorations. + @param inPanel The panel object. + @param outSize [out] A buffer in which to return the size value. + **/ + AIAPI AIErr (*GetSize)(AIPanelRef inPanel, AISize& outSize); + + + /** Sets the minimum size for a panel's inner dimensions. + @param inPanel The panel object. + @param inMinimumSize The size value. + **/ + AIAPI AIErr (*SetMinimumSize)(AIPanelRef inPanel, const AISize& inMinimumSize); + + + /** Retrieves the minimum minimum size for a panel's inner dimensions. + @param inPanel The panel object. + @param outMinimumSize [out] A buffer in which to return the size value. + **/ + AIAPI AIErr (*GetMinimumSize)(AIPanelRef inPanel, AISize& outMinimumSize); + + + /** Sets the maximum size for a panel's inner dimensions. + @param inPanel The panel object. + @param inMaximumSize The size value. + **/ + AIAPI AIErr (*SetMaximumSize)(AIPanelRef inPanel, const AISize& inMaximumSize); + + + /** Retrieves the maximum size for a panel's inner dimensions. + @param inPanel The panel object. + @param outMaximumSize [out] A buffer in which to return the size value. + **/ + AIAPI AIErr (*GetMaximumSize)(AIPanelRef inPanel, AISize& outMaximumSize); + + + /** Sets both the constrained and unconstrained preferred sizes + for a panel's inner dimensions. + The constrained size is used when a dialog is frame docked. + The unconstrained size is used when the dialog is floating. + + @param inPanel The panel object. + @param inPreferredSize The new preferred size value. + **/ + AIAPI AIErr (*SetPreferredSizes)(AIPanelRef inPanel, const AISize& inPreferredSize); + + + /** Sets all sizes at once for a panel's inner dimensions. + @param inPanel The panel object. + @param inMinimumSize Minimum panel size. + @param inPreferredUnconstrainedSize Preferred unconstrained panel size. . + @param inPreferredConstrainedSize Preferred constrained panel size. + @param inMaximumSize Maximum panel size. + @return error **/ + AIAPI AIErr (*SetSizes)(AIPanelRef inPanel, const AISize& inMinimumSize, const AISize& inPreferredUnconstrainedSize, + const AISize& inPreferredConstrainedSize, const AISize& inMaximumSize); + + + /** For non-resizable panels, sets the minimum, maximum, + preferred unconstrained, and preferred constrained sizes + for a panel's inner dimensions to a single size value. + For resizable panels, sets only the preferred unconstrained and + constrained sizes to the given size. + @param inPanel The panel object. + @param inSize The new size value. + **/ + AIAPI AIErr (*SetSize)(AIPanelRef inPanel, const AISize& inSize); + + + /** Retrieves the preferred constrained size for a panel's inner dimensions. + The constrained size is used when a dialog is frame docked. + @param inPanel The panel object. + @param outPreferredConstrainedSize [out] A buffer in which to return the size value. + **/ + AIAPI AIErr (*GetPreferredConstrainedSize)(AIPanelRef inPanel, AISize& outPreferredConstrainedSize); + + + /** Retrieves the preferred unconstrained size for a panel's inner dimensions. + The unconstrained size is used when the dialog is floating. + @param inPanel The panel object. + @param outPreferredUnconstrainedSize [out] A buffer in which to return the size value. + **/ + AIAPI AIErr (*GetPreferredUnconstrainedSize)(AIPanelRef inPanel, AISize& outPreferredUnconstrainedSize); + + + /** Sets the current state of a panel. + @param inPanel The panel object. + @param inCurrentState The new current state, must be at least 1. + **/ + AIAPI AIErr (*SetCurrentState)(AIPanelRef inPanel, ai::int16 inCurrentState); + + + /** Retrieves the current state of a panel + @param inPanel The panel object. + @param outCurrentState [out] A buffer in which to return the state value. + **/ + AIAPI AIErr (*GetCurrentState)(AIPanelRef inPanel, ai::int16& outCurrentState); + + + /** Modifies the state count of a panel. + @param inPanel The panel object. + @param inStateCount The new state count; must be at least 1 + **/ + AIAPI AIErr (*SetStateCount)(AIPanelRef inPanel, ai::int16 inStateCount); + + + /** Retrieves the state count of a panel + @param inPanel The panel object. + @param outStateCount [out] A buffer in which to return the state-count value. + **/ + AIAPI AIErr (*GetStateCount)(AIPanelRef inPanel, ai::int16& outStateCount); + + + /** Sets the vertical step size to use when a resizable panel is resized. + The panel height is constrained to be its minimum height plus a multiple + of the vertical step size. By default, this is 1, making the panel sizable to any height. + + @param inPanel The panel object. + @param inStepSize The new step size. + **/ + AIAPI AIErr (*SetVerticalStepSize)(AIPanelRef inPanel, AIReal inStepSize); + + + /** Retrieves the vertical step size for a panel + @param inPanel The panel object. + @param outStepSize [out] A buffer in which to return the size value. + **/ + AIAPI AIErr (*GetVerticalStepSize)(AIPanelRef inPanel, AIReal& outStepSize); + + + /** Sets the flyout menu for a panel. + @param inPanel The panel object. + @param inFlyoutMenu The new menu, or NULL to hide the menu icon. + @see \c #AIPanelFlyoutMenuSuite. + **/ + AIAPI AIErr (*SetFlyoutMenu)(AIPanelRef inPanel, AIPanelFlyoutMenuRef inFlyoutMenu); + + + /** Retrieves the flyout menu for a panel. + @param inPanel The panel object. + @param outFlyoutMenu [out] A buffer in which to return the flyout menu object. + @see \c #AIPanelFlyoutMenuSuite. + **/ + AIAPI AIErr (*GetFlyoutMenu)(AIPanelRef inPanel, AIPanelFlyoutMenuRef& outFlyoutMenu); + + + /** Reports the minimized state of a panel. + When a panel is minimized its content area is not visible, and the panel + view has a visible height of 0. + @param inPanel The panel object. + @param outIsMinimized [out] A buffer in which to return true if the panel is minimized, + false otherwise. + **/ + AIAPI AIErr (*IsMinimized)(AIPanelRef inPanel, AIBoolean& outIsMinimized); + + + /** Modifies the minimized state of the panel. + @param inPanel The panel object. + @param inIsMinimized True to minimize the panel, false to return it to the + unminimized state. + **/ + AIAPI AIErr (*ChangeIsMinimized)(AIPanelRef inPanel, AIBoolean inIsMinimized); + + + /** Moves a panel to a specific screen location. + Has no effect if the panel is docked. If the panel is part of a tab group, + the whole tab group is moved to the new location. + @param inPanel The panel object. + @param inPoint The new position in global screen coordinates. + **/ + AIAPI AIErr (*Move)(AIPanelRef inPanel, AIPoint inPoint); + + + /** Sets a callback procedure to be called before the flyout menu for a panel is shown. + @param inPanel The panel object. + @param inFlyoutMenuPreVisProc The new callback procedure. + **/ + AIAPI AIErr (*SetFlyoutMenuPreVisibilityProc)(AIPanelRef inPanel, AIPanelFlyoutMenuPreVisibilityProc inFlyoutMenuPreVisProc); + + + /** Sets a callback procedure to be called after the flyout menu for a panel has been shown. + @param inPanel The panel object. + @param inFlyoutMenuPostVisProc The new callback procedure. + **/ + AIAPI AIErr (*SetFlyoutMenuProc)(AIPanelRef inPanel, AIPanelFlyoutMenuProc inFlyoutMenuProc); + + + /** Sets a callback procedure to be called when the visibility of a panel is changed. + @param inPanel The panel object. + @param inVisibilityChangedNotifyProc The new callback procedure. + **/ + AIAPI AIErr (*SetVisibilityChangedNotifyProc)(AIPanelRef inPanel, AIPanelVisibilityChangedNotifyProc inVisibilityChangedNotifyProc); + + + /** Sets a callback procedure to be called when the size of a panel is changed. + @param inPanel The panel object. + @param inSizeChangedNotifyProc The new callback procedure. + **/ + AIAPI AIErr (*SetSizeChangedNotifyProc)(AIPanelRef inPanel, AIPanelSizeChangedNotifyProc inSizeChangedNotifyProc); + + + /** Sets a callback procedure to be called when the state of a panel is changed. + @param inPanel The panel object. + @param inStateChangedNotifyProc The new callback procedure. + **/ + AIAPI AIErr (*SetStateChangedNotifyProc)(AIPanelRef inPanel, AIPanelStateChangedNotifyProc inStateChangedNotifyProc); + + + /** Set a callback procedure to be called when a panel is closed by clicking the close button. + @param inPanel The panel object. + @param inPanelClosedNotifyProc The new callback procedure. + **/ + AIAPI AIErr (*SetClosedNotifyProc)(AIPanelRef inPanel, AIPanelClosedNotifyProc inPanelClosedNotifyProc); + + /** Get Panel Global Rect. + @param inPanel The panel object. + @param outRect OutRect. + **/ + AIAPI AIErr(*GetPosition)(AIPanelRef inPanelRef, AIRealRect &outRect); +}; + + + + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +Provides functions for creating and managing panel flyout menus. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIPanelFlyoutMenuSuite and \c #kAIPanelFlyoutMenuSuiteVersion. +*/ + +struct AIPanelFlyoutMenuSuite{ + + /** Creates a new panel flyout menu or submenu. + @param outFlyOutMenu [out] A buffer in which to return the new panel flyout menu object. + + */ + AIAPI AIErr (*Create)(AIPanelFlyoutMenuRef& outFlyOutMenu); + + + /** Deletes a panel flyout menu object. + This must be called when the plug-in receives \c #kAIApplicationShutdownNotifier. + @param inFlyOutMenu The panel flyout menu object. + */ + AIAPI AIErr (*Destroy)(AIPanelFlyoutMenuRef inFlyOutMenu); + + + /** Retrieves the number of items in a flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param outSize [out] A buffer in which to return the number of items. + */ + AIAPI AIErr (*Size)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32& outSize); + + + /** Inserts a new item at the end of a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inNewItemID The unique non-zero identifier for the new item. + @param inItemText The display text for the new item. + */ + AIAPI AIErr (*AppendItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inNewItemID, const ai::UnicodeString& inItemText); + + + /** Inserts a separator in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inNewItemID The unique non-zero identifier for the new separator. + */ + AIAPI AIErr (*AppendSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inNewItemID); + + + /** Inserts a new item at a specific relative position in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inBeforeItemID The ID of an existing item before which to insert the new item. + @param inNewItemID The unique non-zero identifier for the new item. + @param inItemText TThe display text for the new item. + */ + AIAPI AIErr (*InsertItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inBeforeItemID, ai::uint32 inNewItemID, const ai::UnicodeString& inItemText); + + + /** Inserts a separator at a specific relative position in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inAfterID The ID of an exsiting item after which to insert the separator, + or -1 to append the separator to the end of the menu. + @param inNewItemID The unique non-zero identifier for the new separator. + */ + AIAPI AIErr (*InsertSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inBeforeItemID, ai::uint32 inNewItemID); + + + /** Removes an item or separator from a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item or separator. + */ + AIAPI AIErr (*RemoveItem)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID); + + + /** Enables or disables an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + @param inEnabled True to enable or false to disable the item. + */ + AIAPI AIErr (*SetItemEnabled)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIBoolean inEnabled); + + + /** Retrieves the enabled status of an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + @param outEnabled [out] A buffer in which to return true if the item is enabled, false otherwise. + */ + AIAPI AIErr (*GetItemEnabled)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIBoolean& outEnabled); + + + /** Sets a mark on an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + @param inItemMark The mark type constant. Can be check, bullet, dash, or none. + */ + AIAPI AIErr (*SetItemMark)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuItemMark inItemMark); + + + /** Retrieves the type of mark on an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + @param outItemMark [out] A buffer in which to return the type constant (check, bullet, dash, or none). + */ + AIAPI AIErr (*GetItemMark)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuItemMark& outItemMark); + + + /** Sets the display text for an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + @param inItemText The new text string. + */ + AIAPI AIErr (*SetItemText)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, const ai::UnicodeString& inItemText); + + + /** Retrieves the display text for an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + @param outItemText [out] A buffer in which to return the text string. + */ + AIAPI AIErr (*GetItemText)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, ai::UnicodeString& outItemText); + + + /** Reports whether an item in a panel flyout menu is a separator. + @param inFlyOutMenu The panel flyout menu object. + @param inItemIndex The 0-based index of the item. + @param outIsItemSeparator [out] A buffer in which to return true if the item is a separator, false otherwise. + @return error + */ + AIAPI AIErr (*IsItemSeparator)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, AIBoolean& outIsItemSeparator); + + + /** Associates a submenu with an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + @param inSubMenu A panel flyout menu object. + */ + AIAPI AIErr (*SetItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuRef inSubMenu); + + + /** Retrieves the submenu associated with an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + @param outSubMenu [out] A buffer in which to return the submenu object. + */ + AIAPI AIErr (*GetItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID, AIPanelFlyoutMenuRef& outSubMenu); + + + /** Removes any submenu associated with an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemID The unique identifier of the item. + */ + AIAPI AIErr (*DetachItemSubMenu)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemID); + + /** Sets the unique identifier of an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemIndex The 0-based index of the item. + @param inNewItemID The new unique non-zero item ID. + */ + AIAPI AIErr (*SetItemID)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, ai::uint32 inNewItemID); + + /** Retrieves the unique identifier of an item in a panel flyout menu. + @param inFlyOutMenu The panel flyout menu object. + @param inItemIndex The 0-based index of the item. + @param outItemID [out] A buffer in which to return the ID + */ + AIAPI AIErr (*GetItemID)(AIPanelFlyoutMenuRef inFlyOutMenu, ai::uint32 inItemIndex, ai::uint32& outItemID); +}; + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPath.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPath.h index 33ae949..8b4efe4 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPath.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPath.h @@ -1,437 +1,438 @@ -#ifndef __AIPath__ -#define __AIPath__ - -/* - * Name: AIPath.h - * Author: - * Date: - * Purpose: Adobe Illustrator Path Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2009 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIRealBezier__ -#include "AIRealBezier.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIPath.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPathSuite "AI Path Suite" -#define kAIPathSuiteVersion11 AIAPI_VERSION(11) -#define kAIPathSuiteVersion kAIPathSuiteVersion11 -#define kAIPathVersion kAIPathSuiteVersion - - -/** Maximum number of segments in one path */ -#define kMaxPathSegments 32000 -/** Obsolete with AI11. Maximum number of segments in one text path */ -#define kMaxTextPathSegments 67 - - -/** Selection states for path segments. */ -enum AIPathSegementSelectionState { - kSegmentNotSelected = 0, - kSegmentPointSelected = 1, - kSegmentInSelected = 2, - kSegmentOutSelected = 3, - kSegmentInAndOutSelected = 4 -}; - - -/** @ingroup Errors - See \c #AIPathSuite */ -#define kTooManySegmentsErr 'SEGM' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Defines a path segment. See \c #AIPathSuite */ -struct AIPathSegment { - AIRealPoint p, in, out; - AIBoolean corner; -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions that allow you to examine and manipulate - \e paths, which are art objects of type \c #kPathArt. - - The shape of a path is defined by one or more path \e segments. - Every segment of a path corresponds to an \e anchor \e point, which is - the handle shown when the path is selected. The number of anchor points - on a path, or \e segment \e count, includes the two at each end. - A segment is defined by the \c #AIPathSegment structure. Segment - index numbers begin at zero. A path can have a single anchor point. - - The \e in and \e out points of a segment define the tangent of the curve - at a point \e p. The in point is not used for the initial and final segments - of an open path. A segment can be a \e corner point or a \e smooth point. - For a corner, the in and out points can be anywhere. To make a straight line, - place the in and out points of each end on their p points. - - A path can be can be \e closed or \e open. - If a path is open, it is defined only by its segments. If it is closed, - Illustrator draws a segment between the first and last anchor points, - which uses the out tangent of the last segment and the in tangent of the first. - - Some paths are also used as \e guides. In all other respects they are paths, - with the same contents and attributes. Paint attributes are associated with - a path through a \e path \e style. See the \c #AIPathStyleSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPathSuite and \c #kAIPathVersion. -*/ -struct AIPathSuite { - - /** Gets the number of anchor points on a path, including the two at each - end. - @param path The path object. - @param count [out] A buffer in which to return the number of segments. - */ - AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, ai::int16 *count ); - - /** Removes segments from or appends segments to the end of a path. - If the count is increased, new segments are initialized to default values, - which are not guaranteed to always be the same. - @param path The path object. - @param count The new segment count. - @return The error \c #kTooManySegmentsErr if the new count exceeds - the maximum number of path segments, - - @note When \c #AIArtSuite::NewArt() creates a path, it initially allocates space - for 32 segments. When creating many small paths, this can waste memory. - Use this function to free the memory of unused path segments immediately. - */ - AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, ai::int16 count ); - - /** Retrieves a set of segments from a path. - @param path The path object. - @param segNumber The 0-based index of the first segment. - @param count The number of segments to retrieve. - @param segments [out] An array in which to return the segments. You must allocate an array of \c #AIPathSegment - the size of \c count. - */ - AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, AIPathSegment segments[] ); - - /** Adds or updates segments in a path. If segments are removed from a closed path, - the path remains closed. - @param path The path object. - @param segNumber The 0-based index of the first segment. - @param count The number of segments to add. - @param segments An array of new segments. You must allocate and - fill an array of \c #AIPathSegment the size of \c count. - @return The error \c #kTooManySegmentsErr if the new segment count exceeds - the maximum number of path segments. - */ - AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, const AIPathSegment segments[] ); - - /** Inserts segments into a path. - @param path The path object. - @param segNumber The 0-based index of an existing segment in the path. - The new segments are inserted after this one. - @param count The number of segments to insert. - @param segments An array of new segments. You must allocate and - fill an array of \c #AIPathSegment the size of \c count. - @return The error \c #kTooManySegmentsErr if the new segment count exceeds - the maximum number of path segments. - */ - AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, const AIPathSegment segments[] ); - - /** Deletes segments from a path. If you delete segments from a closed path, - the path remains closed. - @param path The path object. - @param segNumber The 0-based index of the first segment. - @param count The number of segments to delete. - */ - AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count ); - - /** Reports whether a path is closed. - @param path The path object. - @param closed [out] A buffer in which to return true if the path is closed, - false if it is open. - */ - AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed ); - - /** Opens or closes a path. When you close a path, an additional segment is - drawn between the last segment and the first segment. This is often the - last step in creating a new path. - @param path The path object. - @param closed True to close the path, false to open it. - - */ - AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed ); - - /** Reports whether a path is used as a guide. - @param path The path object. - @param isGuide [out] A buffer in which to return true if the path is a guide - */ - AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide ); - - /** Sets whether a path is used as a guide. - @param path The path object. - @param isGuide True if the path is to be used as a guide, false if it is not. - */ - AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide ); - - /** Reports whether any part of a path segment is selected. - @param path The path object. - @param segNumber The 0-based index of the segment. - @param selected [out] A buffer in which to return the selection state of the - segment, an \c #AIPathSegementSelectionState value. - */ - AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, ai::int16 segNumber, ai::int16 *selected ); - - /** Sets the selection state for a segment. - @param path The path object. - @param segNumber The 0-based index of the segment. - @param selected The new selection state of the segment, - an \c #AIPathSegementSelectionState value. - - @note Modifying the selection state of one segment can affect - adjacent segments. For example, if the out direction of one segment - is selected, the in direction of the following segment is also selected. - */ - AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, ai::int16 segNumber, ai::int16 selected ); - - /** Reverses the order of segments in a path. The winding order is only - significant if the path is a subpath of a compound path. It controls - the insideness of the compound path. - @param path The path object. - */ - AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path ); - - /** Calculates the area of a path. A pathï¾’s winding order is - determined by the sign of area. If the area is negative, - the path is wound counter-clockwise. Self-intersecting paths - can contain sub-areas that cancel each other out. This makes - it possible for the function to return zero for a path that - does have area. - @param path The path object. - @param area [out] A buffer in which to return the area, in - square points. - */ - AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area ); - - // New for AI8.0: - - /** Calculates the length of the perimeter of a path measured in points. - @param path The path object. - @param length [out] A buffer in which to return the length, in points. - @param flatness Not used. - */ - AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness ); - - /** Calculates the bezier values of a path segment. - \li For the last anchor point of an open path, wraps to the beginning. - \li For the last anchor point of a closed path, all four bezier points are - equal--that is, the outgoing control point is ignored, so that the visible - bounding box, length, and other function treat it correctly. - - @param path The path object. - @param segNumber The 0-based index of the segment. - @param bezier [out] A buffer in which to return the bezier values. - */ - AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, ai::int16 segNumber, AIRealBezier *bezier ); - - /** Reports whether a path has length. This is more efficient than checking - whether \c #GetPathLength() != 0. - @param path The path object. - @param hasLength [out] A buffer in which to return true if the path length - is not zero. - */ - AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength ); - - /** Reports whether a path is a clipping path. The path can be a compound path. - To be a clipping object a path must have at least two segments. - To make a path into a clipping path use \c #AIArtSuite::SetArtUserAttr() - @param path The path object. - @param isClip [out] A buffer in which to return true if the path is a clipping path. - */ - AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip ); - - // New for AI 11 - - /** Reports whether all segments of a path are selected. - @param path The path object. - @param selected [out] A buffer in which to return true if the path is fully selected. - */ - AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected ); - - // New for AI 13 - - /** Retrieves path object and segment number of the key anchor point (that is, - the one to which other anchor points are aligned). The key anchor point - is usually the last anchor point selected with the direct select tool. - @param path [out] A buffer in which to return the path object. - @param segmentNumber [out] A buffer in which to return the segment number. - */ - AIAPI AIErr (*GetKeySegment) (AIArtHandle* path, ai::int16* segmentNumber); - - /** @deprecated. use \c SetKeySegment() intsead. - Clears the key anchor point (the one to which other anchor points are aligned). - This is usually the last anchor point selected with the direct select tool. - */ - AIAPI AIErr (*CancelKeySegment) (void); - - /** Reports whether a path is 9-slice splitter; that is, a guide that defines - a line splitting the art board into 9 regions. - @param path The path object. - @return True if the path is 9-slice splitter, false if not, or if the - path is not used as a guide. - @see \c #GetPathGuide() - */ - AIAPI AIBoolean (*IsPath9SliceSplitter)(AIArtHandle path); - - // New for AI14 - - /** Sets the key anchor point of an art object. - The key is the one to which other anchor points are aligned. - Setting a new anchor point as key replaces the previous one. - @param path [in] The art object that contains the new anchor point, - or NULL to reset the key anchor of the selected art object - to the currently selected point. - @param segmentNumber [in] The 0-based segment index of the anchor point - in the specified art object to be set as key anchor point. Ignored - if no art object is specified. - @return The error \c #kBadParameterErr if no anchor point is selected and - no art object is specified. - */ - AIAPI AIErr (*SetKeySegment)(AIArtHandle path, ai::int16 segmentNumber); - - // New for AI15 - - // Functions to measure path segments or access path positions specified by length fractions. - // The flatness used is adaptive per segment (based on the bounding box of its control points) and is not a parameter. - // That is, a very short segment will be measured at a tighter flatness than a large segment. - // This generally gives a better balance of performance and accuracy than using a single flatness across the entire path. - - /** Measures the lengths of the segments of a path. Storage is managed by the client, as for \c #GetPathSegments(). - @param path The path object. - @param startSeg The 0-based index of the first segment to be measured. - @param count The number of segments to measure. - @param pieceLengths [out] A buffer in which to return the lengths of each bezier segment looking forward; - that is, \c pieceLength[i] is the length of the bezier from anchor point i to anchor point i+1. - If i is the last segment of a closed path, it wraps around and reports the distance - from anchor point i to anchor point 0. - Can be a null pointer if only the accumulated lengths are needed. - @param accumulatedLengths [out] A buffer in which to return the length of the path from the starting point - through anchor point i. Can be a null pointer if only the individual lengths are needed. - If \c startSeg is 0, then \c accumulatedLengths(i) is the sum from j = 0 to i-1 - of \c pieceLengths(j). So strictly speaking, it is redundant, but for repeated operations it - may be more efficient to sum the partial lengths once instead of each time they are needed. - */ - AIAPI AIErr (*MeasureSegments)(AIArtHandle path, ai::int16 startSeg, ai::int16 count, AIReal pieceLengths[], AIReal accumulatedLengths[] ); - - /** Computes the segment index and the parametric bezier t value of the point - that is a given fraction of the path length along a path. - (See \c #AIRealBezierSuite for a discussion of bezier t values.) - You can optionally pass segment length measurements, to improve performance when calling - this function repeatedly at multiple locations along the same path. - @param path The path object. - @param lengthFraction The fraction of the total path length at which to calculate the position. - @param segIndex [out] A buffer in which to return the 0-based index of the segment that contains the position. - @param t [out] A buffer in which to return the bezier parametric t value of splitting the segment at that position. - @param pieceLengths [in] Optional, the piece-lengths result of a call to \c #MeasureSegments() for the same path. - @param accumulatedLengths [in] Optional, the accumulated-lengths result of a call to \c #MeasureSegments() for the same path. - */ - AIAPI AIErr (*LengthFractionToBezierPos)(AIArtHandle path, AIReal lengthFraction, ai::int16 &segIndex, AIReal &bezierT, const AIReal pieceLengths[], const AIReal accumulatedLengths[] ); - - /** Computes the fraction of the total path length corresponding to a position along the path expressed as a segment - index and a parametric bezier t value into that segment. (See \c #AIRealBezierSuite for a discussion of bezier t values.) - You can optionally pass segment length measurements, to improve performance when calling - this function repeatedly at multiple locations along the same path. - @param path The path object. - @param segIndex The 0-based index of a segment in the path. - @param t A bezier parametric t value at which to split the segment. - @param lengthFraction [out] A buffer in which to return the fraction of the path length at which the given position falls - @param pieceLengths [in] Optional, the piece-lengths result of a call to \c #MeasureSegments() for the same path. - @param accumulatedLengths [in] Optional, the accumulated-lengths result of a call to \c #MeasureSegments() for the same path. - */ - AIAPI AIErr (*BezierPosToLengthFraction)(AIArtHandle path, ai::int16 segIndex, AIReal bezierT, AIReal &lengthFraction, const AIReal pieceLengths[], const AIReal accumulatedLengths[] ); - - /** Converts from a parametric bezier t value to a fraction of the segment length. - (See \c #AIRealBezierSuite for a discussion of bezier t values.) - You can optionally pass segment length measurements, to improve performance when calling - this function repeatedly at multiple locations along the same path. - @param path The path object. - @param segIndex The 0-based index of the segment. - @param t The parametric t value of a point along the path. - @param segLength [optional, in/out] If positive on input, the length of the bezier segment - as calculated by \c #MeasureSegments(). (Do not use \c #AIRealBezierSuite::Length() - to measure the length; the flatness might be different, causing an inaccurate result.)
- If negative or 0 on input, this function - measures the segment length and returns it here on output. - @param segLengthFraction [out] A buffer in which to return the ratio between the whole segment length - and the length of the shorter segment obtained by splitting the bezier at the t value. - */ - AIAPI AIErr (*BezierPosToAnchoredPos)(AIArtHandle path, ai::int16 segIndex, AIReal t, AIReal *segLength, AIReal *segLengthFraction ); - - /** Computes the endpoints of line segments perpendicular (normal) to a path at a position expressed as a segment index - and a parametric bezier t value. (See \c #AIRealBezierSuite for a discussion of bezier t values.) - @param path The path object. - @param segIndex The 0-based index of the segment. - @param t The bezier parametric t value at which to calculate the normals. - @param leftDistance The distance between \c pointOnPath and \c leftPoint. Must be non-negative. - @param rightDistance The distance between \c pointOnPath and \c rightPoint. Must be non-negative. - @param pointOnPath [out] A buffer in which to return the point along the path at the requested position. - @param leftPoint [out] A buffer in which to return the point normal to the path at a distance of - \c leftDistance on the left side (as going from start to end point) - Can be null if this point is not needed. - @param rightPoint [out] A buffer in which to return the point normal to the path at a distance of - \c rightDistance on the right side (as going from start to end point) - Can be null if this point is not needed. - */ - AIAPI AIErr (*PerpendicularsAtBezierT)(AIArtHandle path, ai::int16 segIndex, AIReal t, AIReal leftDistance, AIReal rightDistance, - AIRealPoint &pointOnPath, AIRealPoint *leftPoint, AIRealPoint *rightPoint ); - -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIPath__ +#define __AIPath__ + +/* + * Name: AIPath.h + * Author: + * Date: + * Purpose: Adobe Illustrator Path Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2016 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIRealBezier__ +#include "AIRealBezier.h" +#endif + +#include "AIHeaderBegin.h" +/** @file AIPath.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPathSuite "AI Path Suite" +#define kAIPathSuiteVersion12 AIAPI_VERSION(12) +#define kAIPathSuiteVersion kAIPathSuiteVersion12 +#define kAIPathVersion kAIPathSuiteVersion + + +/** Maximum number of segments in one path */ +#define kMaxPathSegments 32000 +/** Obsolete with AI11. Maximum number of segments in one text path */ +#define kMaxTextPathSegments 67 + + +/** Selection states for path segments. */ +enum AIPathSegementSelectionState { + kSegmentNotSelected = 0, + kSegmentPointSelected = 1, + kSegmentInSelected = 2, + kSegmentOutSelected = 3, + kSegmentInAndOutSelected = 4 +}; + + +/** @ingroup Errors + See \c #AIPathSuite */ +#define kTooManySegmentsErr 'SEGM' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Defines a path segment. See \c #AIPathSuite */ +struct AIPathSegment { + AIRealPoint p, in, out; + AIBoolean corner; +}; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides functions that allow you to examine and manipulate + \e paths, which are art objects of type \c #kPathArt. + + The shape of a path is defined by one or more path \e segments. + Every segment of a path corresponds to an \e anchor \e point, which is + the handle shown when the path is selected. The number of anchor points + on a path, or \e segment \e count, includes the two at each end. + A segment is defined by the \c #AIPathSegment structure. Segment + index numbers begin at zero. A path can have a single anchor point. + + The \e in and \e out points of a segment define the tangent of the curve + at a point \e p. The in point is not used for the initial and final segments + of an open path. A segment can be a \e corner point or a \e smooth point. + For a corner, the in and out points can be anywhere. To make a straight line, + place the in and out points of each end on their p points. + + A path can be can be \e closed or \e open. + If a path is open, it is defined only by its segments. If it is closed, + Illustrator draws a segment between the first and last anchor points, + which uses the out tangent of the last segment and the in tangent of the first. + + Some paths are also used as \e guides. In all other respects they are paths, + with the same contents and attributes. Paint attributes are associated with + a path through a \e path \e style. See the \c #AIPathStyleSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPathSuite and \c #kAIPathVersion. +*/ +struct AIPathSuite { + + /** Gets the number of anchor points on a path, including the two at each + end. + @param path The path object. + @param count [out] A buffer in which to return the number of segments. + */ + AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, ai::int16 *count ); + + /** Removes segments from or appends segments to the end of a path. + If the count is increased, new segments are initialized to default values, + which are not guaranteed to always be the same. + @param path The path object. + @param count The new segment count. + @return The error \c #kTooManySegmentsErr if the new count exceeds + the maximum number of path segments, + + @note When \c #AIArtSuite::NewArt() creates a path, it initially allocates space + for 32 segments. When creating many small paths, this can waste memory. + Use this function to free the memory of unused path segments immediately. + */ + AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, ai::int16 count ); + + /** Retrieves a set of segments from a path. + @param path The path object. + @param segNumber The 0-based index of the first segment. + @param count The number of segments to retrieve. + @param segments [out] An array in which to return the segments. You must allocate an array of \c #AIPathSegment + the size of \c count. + */ + AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, AIPathSegment segments[] ); + + /** Adds or updates segments in a path. If segments are removed from a closed path, + the path remains closed. + @param path The path object. + @param segNumber The 0-based index of the first segment. + @param count The number of segments to add. + @param segments An array of new segments. You must allocate and + fill an array of \c #AIPathSegment the size of \c count. + @return The error \c #kTooManySegmentsErr if the new segment count exceeds + the maximum number of path segments. + */ + AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, const AIPathSegment segments[] ); + + /** Inserts segments into a path. + @param path The path object. + @param segNumber The 0-based index of an existing segment in the path. + The new segments are inserted after this one. + @param count The number of segments to insert. + @param segments An array of new segments. You must allocate and + fill an array of \c #AIPathSegment the size of \c count. + @return The error \c #kTooManySegmentsErr if the new segment count exceeds + the maximum number of path segments. + */ + AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count, const AIPathSegment segments[] ); + + /** Deletes segments from a path. If you delete segments from a closed path, + the path remains closed. + @param path The path object. + @param segNumber The 0-based index of the first segment. + @param count The number of segments to delete. + */ + AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, ai::int16 segNumber, ai::int16 count ); + + /** Reports whether a path is closed. + @param path The path object. + @param closed [out] A buffer in which to return true if the path is closed, + false if it is open. + */ + AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed ); + + /** Opens or closes a path. When you close a path, an additional segment is + drawn between the last segment and the first segment. This is often the + last step in creating a new path. + @param path The path object. + @param closed True to close the path, false to open it. + + */ + AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed ); + + /** Reports whether a path is used as a guide. + @param path The path object. + @param isGuide [out] A buffer in which to return true if the path is a guide + */ + AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide ); + + /** Sets whether a path is used as a guide. + @param path The path object. + @param isGuide True if the path is to be used as a guide, false if it is not. + */ + AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide ); + + /** Reports whether any part of a path segment is selected. + @param path The path object. + @param segNumber The 0-based index of the segment. + @param selected [out] A buffer in which to return the selection state of the + segment, an \c #AIPathSegementSelectionState value. + */ + AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, ai::int16 segNumber, ai::int16 *selected ); + + /** Sets the selection state for a segment. + @param path The path object. + @param segNumber The 0-based index of the segment. + @param selected The new selection state of the segment, + an \c #AIPathSegementSelectionState value. + + @note Modifying the selection state of one segment can affect + adjacent segments. For example, if the out direction of one segment + is selected, the in direction of the following segment is also selected. + */ + AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, ai::int16 segNumber, ai::int16 selected ); + + /** Reverses the order of segments in a path. + The winding order is significant if the path is a subpath of a + compound path. It controls the insideness of the compound path. + This changes the appearance of the path if variable width, arrowheads, + certain kind of brushes etc. are applied. + @param path The path object. + */ + AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path ); + + /** Reverses the direction of a path. + For open paths this works the same as \c #ReversePathSegments(). + For closed paths the transformation on segments is as follows: + [0,1,2,...,n-2,n-1] => [0,n-1,n-2,...,2,1]. + This changes the appearance of the path if variable width, arrowheads, + certain kind of brushes etc. are applied. + @param path The path object. + */ + AIAPI AIErr (*ReversePathDirection) ( AIArtHandle path ); + + /** Calculates the area of a path. A pathï¾’s winding order is + determined by the sign of area. If the area is negative, + the path is wound counter-clockwise. Self-intersecting paths + can contain sub-areas that cancel each other out. This makes + it possible for the function to return zero for a path that + does have area. + @param path The path object. + @param area [out] A buffer in which to return the area, in + square points. + */ + AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area ); + + /** Calculates the length of the perimeter of a path measured in points. + @param path The path object. + @param length [out] A buffer in which to return the length, in points. + @param flatness Not used. + */ + AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness ); + + /** Calculates the bezier values of a path segment. + \li For the last anchor point of an open path, wraps to the beginning. + \li For the last anchor point of a closed path, all four bezier points are + equal--that is, the outgoing control point is ignored, so that the visible + bounding box, length, and other function treat it correctly. + + @param path The path object. + @param segNumber The 0-based index of the segment. + @param bezier [out] A buffer in which to return the bezier values. + */ + AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, ai::int16 segNumber, AIRealBezier *bezier ); + + /** Reports whether a path has length. This is more efficient than checking + whether \c #GetPathLength() != 0. + @param path The path object. + @param hasLength [out] A buffer in which to return true if the path length + is not zero. + */ + AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength ); + + /** Reports whether a path is a clipping path. The path can be a compound path. + To be a clipping object a path must have at least two segments. + To make a path into a clipping path use \c #AIArtSuite::SetArtUserAttr() + @param path The path object. + @param isClip [out] A buffer in which to return true if the path is a clipping path. + */ + AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip ); + + /** Reports whether all segments of a path are selected. + @param path The path object. + @param selected [out] A buffer in which to return true if the path is fully selected. + */ + AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected ); + + /** Retrieves path object and segment number of the key anchor point (that is, + the one to which other anchor points are aligned). The key anchor point + is usually the last anchor point selected with the direct select tool. + @param path [out] A buffer in which to return the path object. + @param segmentNumber [out] A buffer in which to return the segment number. + */ + AIAPI AIErr (*GetKeySegment) (AIArtHandle* path, ai::int16* segmentNumber); + + /** @deprecated. use \c SetKeySegment() intsead. + Clears the key anchor point (the one to which other anchor points are aligned). + This is usually the last anchor point selected with the direct select tool. + */ + AIAPI AIErr (*CancelKeySegment) (void); + + /** Reports whether a path is 9-slice splitter; that is, a guide that defines + a line splitting the art board into 9 regions. + @param path The path object. + @return True if the path is 9-slice splitter, false if not, or if the + path is not used as a guide. + @see \c #GetPathGuide() + */ + AIAPI AIBoolean (*IsPath9SliceSplitter)(AIArtHandle path); + + /** Sets the key anchor point of an art object. + The key is the one to which other anchor points are aligned. + Setting a new anchor point as key replaces the previous one. + @param path [in] The art object that contains the new anchor point, + or NULL to reset the key anchor of the selected art object + to the currently selected point. + @param segmentNumber [in] The 0-based segment index of the anchor point + in the specified art object to be set as key anchor point. Ignored + if no art object is specified. + @return The error \c #kBadParameterErr if no anchor point is selected and + no art object is specified. + */ + AIAPI AIErr (*SetKeySegment)(AIArtHandle path, ai::int16 segmentNumber); + + // Functions to measure path segments or access path positions specified by length fractions. + // The flatness used is adaptive per segment (based on the bounding box of its control points) and is not a parameter. + // That is, a very short segment will be measured at a tighter flatness than a large segment. + // This generally gives a better balance of performance and accuracy than using a single flatness across the entire path. + + /** Measures the lengths of the segments of a path. Storage is managed by the client, as for \c #GetPathSegments(). + @param path The path object. + @param startSeg The 0-based index of the first segment to be measured. + @param count The number of segments to measure. + @param pieceLengths [out] A buffer in which to return the lengths of each bezier segment looking forward; + that is, \c pieceLength[i] is the length of the bezier from anchor point i to anchor point i+1. + If i is the last segment of a closed path, it wraps around and reports the distance + from anchor point i to anchor point 0. + Can be a null pointer if only the accumulated lengths are needed. + @param accumulatedLengths [out] A buffer in which to return the length of the path from the starting point + through anchor point i. Can be a null pointer if only the individual lengths are needed. + If \c startSeg is 0, then \c accumulatedLengths(i) is the sum from j = 0 to i-1 + of \c pieceLengths(j). So strictly speaking, it is redundant, but for repeated operations it + may be more efficient to sum the partial lengths once instead of each time they are needed. + */ + AIAPI AIErr (*MeasureSegments)(AIArtHandle path, ai::int16 startSeg, ai::int16 count, AIReal pieceLengths[], AIReal accumulatedLengths[] ); + + /** Computes the segment index and the parametric bezier t value of the point + that is a given fraction of the path length along a path. + (See \c #AIRealBezierSuite for a discussion of bezier t values.) + You can optionally pass segment length measurements, to improve performance when calling + this function repeatedly at multiple locations along the same path. + @param path The path object. + @param lengthFraction The fraction of the total path length at which to calculate the position. + @param segIndex [out] A buffer in which to return the 0-based index of the segment that contains the position. + @param t [out] A buffer in which to return the bezier parametric t value of splitting the segment at that position. + @param pieceLengths [in] Optional, the piece-lengths result of a call to \c #MeasureSegments() for the same path. + @param accumulatedLengths [in] Optional, the accumulated-lengths result of a call to \c #MeasureSegments() for the same path. + */ + AIAPI AIErr (*LengthFractionToBezierPos)(AIArtHandle path, AIReal lengthFraction, ai::int16 &segIndex, AIReal &bezierT, const AIReal pieceLengths[], const AIReal accumulatedLengths[] ); + + /** Computes the fraction of the total path length corresponding to a position along the path expressed as a segment + index and a parametric bezier t value into that segment. (See \c #AIRealBezierSuite for a discussion of bezier t values.) + You can optionally pass segment length measurements, to improve performance when calling + this function repeatedly at multiple locations along the same path. + @param path The path object. + @param segIndex The 0-based index of a segment in the path. + @param t A bezier parametric t value at which to split the segment. + @param lengthFraction [out] A buffer in which to return the fraction of the path length at which the given position falls + @param pieceLengths [in] Optional, the piece-lengths result of a call to \c #MeasureSegments() for the same path. + @param accumulatedLengths [in] Optional, the accumulated-lengths result of a call to \c #MeasureSegments() for the same path. + */ + AIAPI AIErr (*BezierPosToLengthFraction)(AIArtHandle path, ai::int16 segIndex, AIReal bezierT, AIReal &lengthFraction, const AIReal pieceLengths[], const AIReal accumulatedLengths[] ); + + /** Converts from a parametric bezier t value to a fraction of the segment length. + (See \c #AIRealBezierSuite for a discussion of bezier t values.) + You can optionally pass segment length measurements, to improve performance when calling + this function repeatedly at multiple locations along the same path. + @param path The path object. + @param segIndex The 0-based index of the segment. + @param t The parametric t value of a point along the path. + @param segLength [optional, in/out] If positive on input, the length of the bezier segment + as calculated by \c #MeasureSegments(). (Do not use \c #AIRealBezierSuite::Length() + to measure the length; the flatness might be different, causing an inaccurate result.)
+ If negative or 0 on input, this function + measures the segment length and returns it here on output. + @param segLengthFraction [out] A buffer in which to return the ratio between the whole segment length + and the length of the shorter segment obtained by splitting the bezier at the t value. + */ + AIAPI AIErr (*BezierPosToAnchoredPos)(AIArtHandle path, ai::int16 segIndex, AIReal t, AIReal *segLength, AIReal *segLengthFraction ); + + /** Computes the endpoints of line segments perpendicular (normal) to a path at a position expressed as a segment index + and a parametric bezier t value. (See \c #AIRealBezierSuite for a discussion of bezier t values.) + @param path The path object. + @param segIndex The 0-based index of the segment. + @param t The bezier parametric t value at which to calculate the normals. + @param leftDistance The distance between \c pointOnPath and \c leftPoint. Must be non-negative. + @param rightDistance The distance between \c pointOnPath and \c rightPoint. Must be non-negative. + @param pointOnPath [out] A buffer in which to return the point along the path at the requested position. + @param leftPoint [out] A buffer in which to return the point normal to the path at a distance of + \c leftDistance on the left side (as going from start to end point) + Can be null if this point is not needed. + @param rightPoint [out] A buffer in which to return the point normal to the path at a distance of + \c rightDistance on the right side (as going from start to end point) + Can be null if this point is not needed. + */ + AIAPI AIErr (*PerpendicularsAtBezierT)(AIArtHandle path, ai::int16 segIndex, AIReal t, AIReal leftDistance, AIReal rightDistance, + AIRealPoint &pointOnPath, AIRealPoint *leftPoint, AIRealPoint *rightPoint ); + +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathConstruction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathConstruction.h index 51118e5..179c94f 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathConstruction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathConstruction.h @@ -1,210 +1,210 @@ -#ifndef __AIPathConstruction__ -#define __AIPathConstruction__ - -/* - * Name: AIPathConstruction.h - * $Revision: 11 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Path Construction Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2013 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPath__ -#include "AIPath.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIPathConstruction.h */ - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** A vertex point for a path segment. Used in \c #AIPathConstructionSuite. */ -typedef struct { - /** The point location */ - AIRealPoint point; - /** True if the point was generated from a corner point of a path, - or if it should result in a corner point when producing an - interpolating path. */ - AIBoolean corner; -} AIPathConstructionPoint; - - -/** Developer-defined memory management routines for - use in \c #AIPathConstructionSuite. - The routines must conform to the semantics of C standard library - functions \c malloc and \c free. Typically, call the - corresponding \c #SPBlocksSuite function. */ -typedef struct { - /** Allocate a block of memory. - @param size The number of bytes to allocate. - @return A pointer to the memory block. - */ - void *(*allocate)( size_t size ); - /** Free allocated memory. - @param pointer The pointer to the block, as returned from - the \c allocate() call. - */ - void (*dispose)( void *pointer ); -} AIPathConstructionMemoryObject; - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPathConstructionSuite "AI PathConstruction Suite" -#define kAIPathConstructionSuiteVersion5 AIAPI_VERSION(5) -#define kAIPathConstructionSuiteVersion kAIPathConstructionSuiteVersion5 -#define kAIPathConstructionVersion kAIPathConstructionSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Utilities to convert paths to and from line segments. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPathConstructionSuite and \c #kAIPathConstructionVersion. - */ -typedef struct { - - /** Converts a sequence of path segments describing a single open path - to a sequence of points that describe an open polygon approximating the path. - - A corner segment corresponds to a corner point. For intermediate - points, the corner state depends on how your memory allocator fills - the block that it allocates. - - @param segmentCount The number of segments in the path. - @param segments The segments, an array of size \c segmentCount. - @param pointCount [out] A buffer in which to return the number - of points in the polygon. - @param points [out] A buffer in which to return a pointer to the - point set, an array of size \c pointCount. - @param maxPointDistance An upper bound on the distance - between successive point samples. - @param flatness An upper bound on the error between the line segments - and the true curve. - @param memory A developer-defined memory management object to use for the conversion. - */ - AIAPI AIErr (*CurvesToPoints) ( ai::int32 segmentCount, AIPathSegment *segments, - ai::int32 *pointCount, AIPathConstructionPoint **points, - AIReal maxPointDistance, AIReal flatness, - AIPathConstructionMemoryObject *memory ); - -/** Converts a single curve to a sequence of points and corresponding T values that describe an open polygon approximating the curve. - - A corner segment corresponds to a corner point. For intermediate - points, the corner state depends on how your memory allocator fills - the block that it allocates. - - @param startSegment The pointer to first segment of the curve. - @param endSegment The pointer to second segment of the curve. - @param pointCount [out] A buffer in which to return the number - of points in the polygon. - @param points [out] A buffer in which to return a pointer to the - point set, an array of size \c pointCount. - @param tArray [out] A buffer in which to return a pointer to the T values - corresponding to each point in \c points, an array of size \c pointCount. - @param maxPointDistance An upper bound on the distance - between successive point samples. - @param flatness An upper bound on the error between the line segments - and the true curve. - @param memory A developer-defined memory management object to use for the conversion. - */ - - AIAPI AIErr (*CurveToPointsT) (AIPathSegment *startSegment, AIPathSegment *endSegment, - ai::int32 *pointCount, AIPathConstructionPoint **points, AIReal **tArray, - AIReal maxPointDistance, AIReal flatness, - AIPathConstructionMemoryObject *memory ); - - /** Converts a sequence of points describing a single open polygon - to a sequence of path segments describing an open path approximating - the polygon. - - The algorithm used is best suited to generating - curves from points that were produced by sampling a path. It is not well - suited for samples of hand drawn points. - @param pointCount The number of points in the polygon. - @param points The point set, an array of size \c pointCount. - @param segmentCount [out] A buffer in which to return the number of segments in the path. - @param segments [out] A buffer in which to return a pointer to the segments, - an array of size \c segmentCount. - @param tolerance [in] Optional. A pointer to the fit factor. Default is 1.0. - A smaller factor gives a more exact fit and more segments, a larger factor - gives a less exact fit and fewer segments. - @param threshold Not used. Pass \c NULL. - @param cornerRadius [in] Optional. A pointer to the corner radius value. Default is 4. - If, at any point in the fitted curve, the radius of an inscribed circle - that has the same tangent and curvature is less than this radius, - a corner point is generated there; otherwise the path is smooth at that point. - Note that this is not the same as the corner-or-smooth attribute that controls whether - direction handles are permanently linked together when they are later edited. Rather, - it is whether the direction handles are allowed to differ in the generated curve. - For an illustration of the radius of curvature of a path at a point, see - \c http://mathworld.wolfram.com/OsculatingCircle.html - @param scale [in] Optional. A pointer to the scale factor. Default is 1.0. Input points - and other input units (such as the corner radius) are multiplied by this factor. - @param memory A developer-defined memory management object to use for the conversion. - */ - AIAPI AIErr (*PointsToCurves) ( ai::int32 *pointCount, AIPathConstructionPoint *points, - ai::int32 *segmentCount, AIPathSegment **segments, - AIReal *tolerance, - AIReal *threshold, - ai::int16 *cornerRadius, - AIReal *scale, - AIPathConstructionMemoryObject *memory ); - - /** Modifies the segments of a path by converting them to a series - of points and then re-fitting curves to the points. In some cases - this can reduce the total number of path segments, especially if - many are redundant. Any corner segments are preserved. - @param path The path object. - @param flatness An upper bound on the error between the line segments - and the true curve. - @param memory A developer-defined memory management object to use for the conversion. - */ - AIAPI AIErr (*ReducePathSegments) ( AIArtHandle path, AIReal flatness, - AIPathConstructionMemoryObject *memory ); - -} AIPathConstructionSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIPathConstruction__ +#define __AIPathConstruction__ + +/* + * Name: AIPathConstruction.h + * $Revision: 11 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Path Construction Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2013 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPath__ +#include "AIPath.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIPathConstruction.h */ + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** A vertex point for a path segment. Used in \c #AIPathConstructionSuite. */ +typedef struct { + /** The point location */ + AIRealPoint point; + /** True if the point was generated from a corner point of a path, + or if it should result in a corner point when producing an + interpolating path. */ + AIBoolean corner; +} AIPathConstructionPoint; + + +/** Developer-defined memory management routines for + use in \c #AIPathConstructionSuite. + The routines must conform to the semantics of C standard library + functions \c malloc and \c free. Typically, call the + corresponding \c #SPBlocksSuite function. */ +typedef struct { + /** Allocate a block of memory. + @param size The number of bytes to allocate. + @return A pointer to the memory block. + */ + void *(*allocate)( size_t size ); + /** Free allocated memory. + @param pointer The pointer to the block, as returned from + the \c allocate() call. + */ + void (*dispose)( void *pointer ); +} AIPathConstructionMemoryObject; + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPathConstructionSuite "AI PathConstruction Suite" +#define kAIPathConstructionSuiteVersion5 AIAPI_VERSION(5) +#define kAIPathConstructionSuiteVersion kAIPathConstructionSuiteVersion5 +#define kAIPathConstructionVersion kAIPathConstructionSuiteVersion + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Utilities to convert paths to and from line segments. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPathConstructionSuite and \c #kAIPathConstructionVersion. + */ +typedef struct { + + /** Converts a sequence of path segments describing a single open path + to a sequence of points that describe an open polygon approximating the path. + + A corner segment corresponds to a corner point. For intermediate + points, the corner state depends on how your memory allocator fills + the block that it allocates. + + @param segmentCount The number of segments in the path. + @param segments The segments, an array of size \c segmentCount. + @param pointCount [out] A buffer in which to return the number + of points in the polygon. + @param points [out] A buffer in which to return a pointer to the + point set, an array of size \c pointCount. + @param maxPointDistance An upper bound on the distance + between successive point samples. + @param flatness An upper bound on the error between the line segments + and the true curve. + @param memory A developer-defined memory management object to use for the conversion. + */ + AIAPI AIErr (*CurvesToPoints) ( ai::int32 segmentCount, AIPathSegment *segments, + ai::int32 *pointCount, AIPathConstructionPoint **points, + AIReal maxPointDistance, AIReal flatness, + AIPathConstructionMemoryObject *memory ); + +/** Converts a single curve to a sequence of points and corresponding T values that describe an open polygon approximating the curve. + + A corner segment corresponds to a corner point. For intermediate + points, the corner state depends on how your memory allocator fills + the block that it allocates. + + @param startSegment The pointer to first segment of the curve. + @param endSegment The pointer to second segment of the curve. + @param pointCount [out] A buffer in which to return the number + of points in the polygon. + @param points [out] A buffer in which to return a pointer to the + point set, an array of size \c pointCount. + @param tArray [out] A buffer in which to return a pointer to the T values + corresponding to each point in \c points, an array of size \c pointCount. + @param maxPointDistance An upper bound on the distance + between successive point samples. + @param flatness An upper bound on the error between the line segments + and the true curve. + @param memory A developer-defined memory management object to use for the conversion. + */ + + AIAPI AIErr (*CurveToPointsT) (AIPathSegment *startSegment, AIPathSegment *endSegment, + ai::int32 *pointCount, AIPathConstructionPoint **points, AIReal **tArray, + AIReal maxPointDistance, AIReal flatness, + AIPathConstructionMemoryObject *memory ); + + /** Converts a sequence of points describing a single open polygon + to a sequence of path segments describing an open path approximating + the polygon. + + The algorithm used is best suited to generating + curves from points that were produced by sampling a path. It is not well + suited for samples of hand drawn points. + @param pointCount The number of points in the polygon. + @param points The point set, an array of size \c pointCount. + @param segmentCount [out] A buffer in which to return the number of segments in the path. + @param segments [out] A buffer in which to return a pointer to the segments, + an array of size \c segmentCount. + @param tolerance [in] Optional. A pointer to the fit factor. Default is 1.0. + A smaller factor gives a more exact fit and more segments, a larger factor + gives a less exact fit and fewer segments. + @param threshold Not used. Pass \c NULL. + @param cornerRadius [in] Optional. A pointer to the corner radius value. Default is 4. + If, at any point in the fitted curve, the radius of an inscribed circle + that has the same tangent and curvature is less than this radius, + a corner point is generated there; otherwise the path is smooth at that point. + Note that this is not the same as the corner-or-smooth attribute that controls whether + direction handles are permanently linked together when they are later edited. Rather, + it is whether the direction handles are allowed to differ in the generated curve. + For an illustration of the radius of curvature of a path at a point, see + \c http://mathworld.wolfram.com/OsculatingCircle.html + @param scale [in] Optional. A pointer to the scale factor. Default is 1.0. Input points + and other input units (such as the corner radius) are multiplied by this factor. + @param memory A developer-defined memory management object to use for the conversion. + */ + AIAPI AIErr (*PointsToCurves) ( ai::int32 *pointCount, AIPathConstructionPoint *points, + ai::int32 *segmentCount, AIPathSegment **segments, + AIReal *tolerance, + AIReal *threshold, + ai::int16 *cornerRadius, + AIReal *scale, + AIPathConstructionMemoryObject *memory ); + + /** Modifies the segments of a path by converting them to a series + of points and then re-fitting curves to the points. In some cases + this can reduce the total number of path segments, especially if + many are redundant. Any corner segments are preserved. + @param path The path object. + @param flatness An upper bound on the error between the line segments + and the true curve. + @param memory A developer-defined memory management object to use for the conversion. + */ + AIAPI AIErr (*ReducePathSegments) ( AIArtHandle path, AIReal flatness, + AIPathConstructionMemoryObject *memory ); + +} AIPathConstructionSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathInterpolate.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathInterpolate.h index 4fd62a8..71a4a27 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathInterpolate.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathInterpolate.h @@ -1,466 +1,466 @@ -#ifndef __AIPathInterp__ -#define __AIPathInterp__ - -/* - * Name: AIPathInterpolate.h - * Purpose: Adobe Illustrator Path Interpolation Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIPathInterpolate.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPathInterpolateSuite "AI Path Interpolate Suite" -#define kAIPathInterpolateSuiteVersion4 AIAPI_VERSION(4) -#define kAIPathInterpolateSuiteVersion kAIPathInterpolateSuiteVersion4 -#define kAIPathInterpolateVersion kAIPathInterpolateSuiteVersion - - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/** A knot in an \c #AIFlattenedPath. */ -typedef struct { - /** The distance in points from the previous knot. */ - AIReal lengthFromLastKnot; - /** The distance of this knot from the beginning of the path, expressed as a - fractional value from [0.0..1.0]. */ - AIReal fractionalLengthAlongPath; -} AIKnot; - - -/** Represents a path after flattening. */ -typedef struct { - /** The length of the flattened path in document points. */ - AIReal totalPathLength; - /** The number of knots in flattened path. */ - ai::int16 ctKnots; - /** The knots in the flattened path, an array of size \c ctKnots. */ - AIKnot knots[1]; -} AIFlattenedPath; - - -/** Identifies a specific point along a path, in two different ways. - Used to keep track of the point selections on a partially selected path, - if they will be needed after the path is modified. These values - (along with the number of points the path had before modification) - can be used to match a point value to its corresponding point after - the modification. Depending on the type of modification, one of the - representations changes, but the other remains invariant. - - \li If the number of points after an edit is the same as when the match - was specified, use \c segmentOffset. Use for transformations or distortions of - the whole path, as well as edits that move some or all of the points. - \li If the number of points after an edit is different from when the match - was specified, use \c flattenedOffset. Use for edits that add or delete - points without changing the geometry of the path. -*/ -typedef struct { - /** An \c #AIReal in which the integer part is an anchor point - index into the \c #AIPathSegment list of a path, and the fractional part - is a t-value along the bezier between that anchor - point and the next one (usually 0). This is the same as the \e offset. - See AITextPathSuite::GetTextPathOffset(). - - This can change after points are inserted or deleted in the path. - */ - AIReal segmentOffset; - /** An \c #AIReal in which only the fractional part is significant, - and represents the t-value along the entire flattened path length. - - This can change if anchor or control points are moved. - */ - AIReal fractionalOffset; -} AIAnchorIdentifier; - - -/** Installation data for \c #AIPathInterpolateSuite::InsertInterpolants(): - - Initialize the \c parent, \c paintOrder and \c refChild - to describe where to install the first interpolated path. - - \li If \c refChild is non-null, it must be a child of \c parent, - and the \c paintOrder must be \c #kPlaceBelow or \c #kPlaceAbove. - \li If \c refChild is \c NULL, \c paintOrder must be \c #kPlaceInsideOnTop - or \c #kPlaceInsideOnBottom. - - -*/ -typedef struct -{ - /** The parent art object in the paint order of the current document's art tree. */ - AIArtHandle parent; - /** The prepositional object if \c paintOrder is \c #kPlaceBelow or \c #kPlaceAbove, - otherwise \c NULL. */ - AIArtHandle refChild; - /** The paint order position of the new path, relative to the \c refChild object, - an \c #AITypes::AIPaintOrder value. */ - ai::int16 paintOrder; - /** For default interpolation (when the post-install callback is \c NULL); ignored otherwise. - \li When true, each path is linked as the sibling of the previous one, - so that the last created path, the one most like the supplied end path, - is on the bottom. - \li When false, the previous path becomes the sibling of the next one created, - so that the last created path, the one most like the supplied end path, - is on the top.*/ - AIBoolean endOnBottom; - /** Developer-defined data to pass to the developer-defined post-install callback. */ - void *clientData; -} AIPathInstallData; - -/** Callback function for \c #AIPathInterpolateSuite::InsertInterpolants(), - called after each new path is created and interpolated. - Use to determine how the next path should be installed. - You can also use it to abort the interpolation - (for a user interruption, for example) or to do other post-processing. - @param art The new path object. - @param installData [in, out] A structure that describes how the path - was installed in the paint order. Update this to describe how - the next path should be installed. - */ -typedef ASErr (*PostInstallCB)( AIArtHandle art, AIPathInstallData *installData ); - - -/** Opaque reference to a style-interpolation object. - See \c #AIPathInterpolateSuite::NewStyleInterpolator() */ -typedef struct _t_AIStyleInterpolator* AIStyleInterpolator; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that allow you to interpolate paths and styles, - creating a smooth blend between two existing art objects. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPathInterpolateSuite and \c #kAIPathInterpolateVersion. -*/ -typedef struct { - - /** Calculates the default number of steps for a smooth blend between two paths or compound - paths, based primarily on the maximum distance in any color channel between the two paint - styles, and assuming that the interpolated step objects will be placed with their - centers on a straight line between the centers of the two blended objects. - @note If the objects are not appropriate for shading, either because there is - no color channel difference (the objects are painted with the same color), - or because they are painted with multiple colors (such as gradients - and patterns), or because they have effects or their outline is too complex - for shading (such as type objects, groups and symbols), the calculation - is based on the separation between objects instead, so that the space - between them is filled with objects that almost overlap or barely overlap. - See \c #AppropriateForSmoothColor() to determine whether this function - will base the step calculation on a color difference or the spacial separation. - @param startPath The starting art object. Usually a path or compound path. - @param endPath The ending art object. Usually a path or compound path. - @param densityLimit When positive, calculates the maximum distance from a bounding - box edge of one path to the corresponding bounding box edge of the other path, - and takes the \c densityLimit value as the minimum separation (in document points) - between consecutive interpolated edges within that span. Another way to think of - this is that 1/densityLimit is the maximum number of interpolated path edges to - place in a point of separation between bounding box edges. - - For example, if the maximum bounding box edge distance between the two blended - paths is 4 points, and the density limit is 0.125 (1/8), then steps are at most - 32 no matter how different the colors are. - - Use to avoid many paths crowded into a tiny distance, when the blend would look - the same with a much smaller number of paths. - - If the blend is intended for print, a value of about 1/4 to 1/8 point will give - smooth color. If it is intended for screen only, a value of 1 pt may be sufficient. - - Ignored if zero, negative, or greater than 4.0. - @param steps [out] A buffer in which to return the number of steps. - @see \c #SmoothColorBlendStepsAlongPath() for calculating an appropriate number - of steps when the interpolated objects will not be placed along a straight line - between the centers of the \c startPath and the \c endPath. - */ - AIAPI AIErr (*SmoothColorBlendSteps) ( AIArtHandle startPath, AIArtHandle endPath, - AIReal densityLimit, ai::int16 *steps ); - - /** Counts the number of segments of a path that are in \c #kSegmentPointSelected state. - @param path The path object. - @param count [out] A buffer in which to return the number of selected segments. - */ - AIAPI AIErr (*GetPathSelectedSegmentCount) ( AIArtHandle path, ai::int16 *count ); - - /** Translates from a partially selected path to arrays recording which points are - selected, in the form of offsets. Ignores non-p0 selections. - Use to store points across events that may insert or delete anchor points. - @param path The path object. - @param count The number of members allocated for the anchor-ID array. If less - than the number of selected points, only this number are translated. - If both paths are partially selected and the number of points differs, - uses the lowest point count. - @param anchorIDs [out] A buffer in which to return an array of anchor ID values. - All fractional parts of the \c segmentOffset values are zero. - If fewer than \c count points are selected, the remaining members are filled - with anchor IDs whose values are all 0. - You must allocate memory for this array, and free it when no longer needed. - @see PathSelectionSegNumbers() (use to communicate with \c #InsertInterpolants() - when the number of segments is known.) - */ - AIAPI AIErr (*PathSelectionToAnchorIDs) ( AIArtHandle path, ai::int16 count, AIAnchorIdentifier *anchorIDs ); - - /** Translates from a partially selected path to an array of selected points. - Ignores non-p0 selections. - Use to communicate with \c #InsertInterpolants() when the number of segments is known. - @param path The path object. - @param count The number of members allocated for the point array. If less - than the number of selected points, only this number are translated. - If both paths are partially selected and the number of points differs, - uses the lowest point count. - @param selectedPoints [out] A buffer in which to return an array of point values. - If fewer than \c count points are selected, the remaining members are filled - with points whose values are all 0. - You must allocate memory for this array, and free it when no longer needed. - @see PathSelectionToAnchorIDs() (use to store points across events that may insert or - delete anchor points.) - */ - AIAPI AIErr (*PathSelectionToSegNumbers) ( AIArtHandle path, ai::int16 count, ai::int16 *selectedPoints ); - - /** Selects a set of anchor points in a path. - @param path The path object. - @param count The number of members allocated for the point array. - @param selectPoints A set of point values, an array of size \c count. - You must allocate memory for this array, and free it when no longer needed. - */ - AIAPI AIErr (*SelectAnchorPoints) ( AIArtHandle path, ai::int16 count, ai::int16 *selectPoints ); - - /** Creates and installs the paths that represent an interpolation between two existing paths. - /li If both paths are fully selected, or if either path is not selected at all, then - the selection state of the anchor points is ignored, and both paths are entirely - flattened to get the point correspondences for interpolation. - - /li If one path is partially selected, and the other is fully or partially selected, - the function builds anchor-point arrays corresponding to the partial selections - and specified matches. - - @param startPath The starting path. Can be \c NULL if end path is given. - @param endPath The ending path. Can be \c NULL if start path is given. - @param substituteCenter A point where all points gather at one end, if the - path for that end is \c NULL. Ignored if both paths are specified. - @param useStyleFromPath If one of the two paths is \c NULL and the - other is part of a compound path (an "extra hole"), - this is the backmost object in the compound path for the other end. - @param steps The number of steps between the two paths. - @param numMatchPairs The number of values in the matches arrays. - \li When positive, the corresponding values in the two match arrays specify pairs. - \li When 0 or negative, the matches arrays are ignored, and - matching starts at the top left corner of both paths - for a closed path, or the leftmost endpoint for an open path, - and proceeds clockwise. - @param matches1 An array of match values of size \c numMatchPairs. - @param matches2 An array of match values of size \c numMatchPairs. - @param clientCallback A developer-defined callback to call after each new path is installed. - Can determine how the next path is installed, provide information for the insertion operation, - or perform other post-processing on the new paths. - - If \c NULL, the default behavior is to link each path to the - previously created one. See \c #AIPathInstallData. - */ - AIAPI AIErr (*InsertInterpolants) ( AIArtHandle startPath, - AIArtHandle endPath, - AIRealPoint *substituteCenter, - AIArtHandle useStyleFromPath, - ai::int16 steps, - ai::int16 numMatchPairs, ai::int16 *matches1, ai::int16 *matches2, - AIPathInstallData *installData, - PostInstallCB clientCallback); - - /** Calculates the length of a set of path segments. - @param path The path object. - @param ixStart The starting point. - @param count [in, out] The number of members allocated for the segment-length array. - Returns the number of segment lengths calculated. - @param segLengths [out] A buffer in which to return an array of segment length values. - You must allocate memory for this array, and free it when no longer needed. - @param flatness An upper bound on the error between the line segments - and the true curve. - */ - AIAPI AIErr (*MeasurePathSegments) ( AIArtHandle path, - ai::int16 ixStart, ai::int16 count, - AIReal *segLengths, - AIReal flatness ); - - // New in AI 9: - - /** Allocates and initializes a style interpolation object for use with - \c #ApplyInterpolatedStyle(). Not needed with \c #InsertInterpolants(), - which automatically applies interpolated styles to the paths it creates. - Use when you create the intermediate objects yourself--for example, - to apply interpolated styles to group objects or text objects, or to - interpolate path outlines using a different technique. - - This version includes object-specific data about how the style is - applied to a particular object (random seeds, scale factors, - gradient matrices, and so on) that is not encapsulated in the - \c #AIArtStyleHandle. For a version that creates an interpolation - object from the styles themselves, see \c #NewArtStyleInterpolator(). - - One, but not both of the source objects can be \c NULL. In this case, - the interpolator applies a copy of the other art style. This avoids the - need to interpolate down to nothing. - - @param styleSource0 The source art object for the first style. - @param styleSource1 The source art object for the second style. - */ - AIAPI AIErr (*NewStyleInterpolator) ( AIStyleInterpolator* interpolator, AIArtHandle styleSource0, AIArtHandle styleSource1 ); - - /** Frees memory for a style interpolator that is no longer needed. - @param interpolator The style interpolation object. Upon return, this reference is invalid. - */ - AIAPI AIErr (*DisposeStyleInterpolator) ( AIStyleInterpolator interpolator ); - - /** Uses a style interpolator to create and apply an interpolated style to an - interpolated art object. - @param interpolator The interpolation object, as returned by \c #NewStyleInterpolator - or \c #NewArtStyleInterpolator. - @param targetArt The intermediate object to which to apply the style. - @param fraction The distance from the source objects. 0 to apply the style from the - first source object, 1 to apply the style from the second source object, - or an interpolation point between the two. - @note If the art styles are not comparable, the function ignores the - \c fraction value and applies the style of the first source object. - */ - AIAPI AIErr (*ApplyInterpolatedStyle) ( AIStyleInterpolator interpolator, AIArtHandle targetArt, AIReal fraction ); - - /** Allocates and initializes a style interpolation object for use with - \c #ApplyInterpolatedStyle(). This version uses the style objects directly, - and does not include object-specific data about how the style is - applied to a particular object (random seeds, scale factors, - gradient matrices, and so on) that is not encapsulated in the - \c #AIArtStyleHandle. - - One, but not both of the source objects can be \c NULL. In this case, - the interpolator applies a copy of the other art style. This avoids the - need to interpolate down to nothing. - @param interpolator [out] A buffer in which to return the new interpolation object. - @param style0 The first art style object. - @param style1 The second art style object. - @see \c #NewStyleInterpolator() - */ - AIAPI AIErr (*NewArtStyleInterpolator) ( AIStyleInterpolator* interpolator, AIArtStyleHandle style0, AIArtStyleHandle style1 ); - - /** Retrieves an intermediate art style created by a style interpolation object - that would be applied for a specific call to \c #ApplyInterpolatedStyle(). - @param interpolator The interpolation object, as returned by \c #NewStyleInterpolator - or \c #NewArtStyleInterpolator. - @param fraction The distance from the source objects. 0 for the style from the - first source object, 1 for the style from the second source object, - or an interpolation point between the two. - @param result [out] A buffer in which to return the new art style. - */ - AIAPI AIErr (*GetInterpolatedArtStyle) ( AIStyleInterpolator interpolator, AIReal fraction, AIArtStyleHandle* result ); - - // New in AI 11: - - /** Reports whether two art objects are suitable for smooth color blending. To be suitable, - both must be either paths or compound paths, and be painted with different, simple solid colors - (not gradients, patterns, or active styles). One or both objects can have transparency. - (Note that this function returns a boolean value, not an error code.) - @param art1 The first art object. - @param art2 The second art object. - @return True if the two objects are suitable for smooth color blending. - */ - AIAPI AIBoolean (*AppropriateForSmoothColor) ( AIArtHandle art1, AIArtHandle art2 ); - - /** Calculates the default number of steps for a smooth blend between two paths or compound - paths, based primarily on the maximum distance in any color channel between the two paint - styles, and assuming that the interpolated step objects will be placed with their - centers on an arbitrary path of length \c pathDistance. - - Specifically intended for blends along non-default spine paths. - - @note If the objects are not appropriate for shading, either because there is - no color channel difference (the objects are painted with the same color), - or because they are painted with multiple colors (such as gradients - and patterns), or because they have effects or their outline is too complex - for shading (such as type objects, groups and symbols), the calculation - is based on the spacial separation between objects instead, so that the space - between objects placed along a path of length \c pathDistance will be filled - with objects that almost overlap or barely overlap. - See \c #AppropriateForSmoothColor() to determine whether this function - will base the step calculation on the color difference or the separation along - the spine path. - - @param startPath The starting art object, usually a path or compound path. - @param endPath The ending art object, usually a path or compound path. - @param densityLimit When positive (and less than or equal to 4.0), calculates the - maximum of \c pathDistance and of the maximum distance between corresponding bounding - box edges of the two input objects, and takes the \c densityLimit value as the minimum - distance between consecutive interpolated step centers placed along that distance. - Another way to think of this is that 1/densityLimit is the maximum number of interpolated - step centers to place within each point of the \c pathDistance. - - For example, if the \c pathDistance is 10 pts, and the maximum bounding box edge - separation is less than 10 pts, and the density limit is 0.125 (1/8), then the - calculated steps will be at most 80 no matter how different the colors are. - - Use to avoid many blend steps crowded into a short distance, when the blend would - look as smooth with a much smaller number of steps. - - Ignored if zero, negative, or greater than 4.0. - @param steps [out] A buffer in which to return the number of steps. - @param pathDistance Used to calculate the separation between the start and end objects, - instead of the object bounds, when the distance is needed either for objects that - are not appropriate for smooth color or to perform the density limit calculations. - If the maximum bounding box edge separation is greater than this value, the - bounding box edge separation is used instead. - - If the objects are appropriate for smooth color, and the density limit is zero, - this parameter is ignored, and the function returns the same number of - steps as \c #SmoothColorBlendSteps(). - */ - AIAPI AIErr (*SmoothColorBlendStepsAlongPath) ( AIArtHandle startPath, AIArtHandle endPath, - AIReal densityLimit, ai::int16 *steps, AIReal pathDistance ); - -} AIPathInterpolateSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIPathInterp__ +#define __AIPathInterp__ + +/* + * Name: AIPathInterpolate.h + * Purpose: Adobe Illustrator Path Interpolation Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIPathInterpolate.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPathInterpolateSuite "AI Path Interpolate Suite" +#define kAIPathInterpolateSuiteVersion4 AIAPI_VERSION(4) +#define kAIPathInterpolateSuiteVersion kAIPathInterpolateSuiteVersion4 +#define kAIPathInterpolateVersion kAIPathInterpolateSuiteVersion + + + +/******************************************************************************* + ** + ** Types + ** + **/ + + +/** A knot in an \c #AIFlattenedPath. */ +typedef struct { + /** The distance in points from the previous knot. */ + AIReal lengthFromLastKnot; + /** The distance of this knot from the beginning of the path, expressed as a + fractional value from [0.0..1.0]. */ + AIReal fractionalLengthAlongPath; +} AIKnot; + + +/** Represents a path after flattening. */ +typedef struct { + /** The length of the flattened path in document points. */ + AIReal totalPathLength; + /** The number of knots in flattened path. */ + ai::int16 ctKnots; + /** The knots in the flattened path, an array of size \c ctKnots. */ + AIKnot knots[1]; +} AIFlattenedPath; + + +/** Identifies a specific point along a path, in two different ways. + Used to keep track of the point selections on a partially selected path, + if they will be needed after the path is modified. These values + (along with the number of points the path had before modification) + can be used to match a point value to its corresponding point after + the modification. Depending on the type of modification, one of the + representations changes, but the other remains invariant. + + \li If the number of points after an edit is the same as when the match + was specified, use \c segmentOffset. Use for transformations or distortions of + the whole path, as well as edits that move some or all of the points. + \li If the number of points after an edit is different from when the match + was specified, use \c flattenedOffset. Use for edits that add or delete + points without changing the geometry of the path. +*/ +typedef struct { + /** An \c #AIReal in which the integer part is an anchor point + index into the \c #AIPathSegment list of a path, and the fractional part + is a t-value along the bezier between that anchor + point and the next one (usually 0). This is the same as the \e offset. + See AITextPathSuite::GetTextPathOffset(). + + This can change after points are inserted or deleted in the path. + */ + AIReal segmentOffset; + /** An \c #AIReal in which only the fractional part is significant, + and represents the t-value along the entire flattened path length. + + This can change if anchor or control points are moved. + */ + AIReal fractionalOffset; +} AIAnchorIdentifier; + + +/** Installation data for \c #AIPathInterpolateSuite::InsertInterpolants(): + + Initialize the \c parent, \c paintOrder and \c refChild + to describe where to install the first interpolated path. + + \li If \c refChild is non-null, it must be a child of \c parent, + and the \c paintOrder must be \c #kPlaceBelow or \c #kPlaceAbove. + \li If \c refChild is \c NULL, \c paintOrder must be \c #kPlaceInsideOnTop + or \c #kPlaceInsideOnBottom. + + +*/ +typedef struct +{ + /** The parent art object in the paint order of the current document's art tree. */ + AIArtHandle parent; + /** The prepositional object if \c paintOrder is \c #kPlaceBelow or \c #kPlaceAbove, + otherwise \c NULL. */ + AIArtHandle refChild; + /** The paint order position of the new path, relative to the \c refChild object, + an \c #AITypes::AIPaintOrder value. */ + ai::int16 paintOrder; + /** For default interpolation (when the post-install callback is \c NULL); ignored otherwise. + \li When true, each path is linked as the sibling of the previous one, + so that the last created path, the one most like the supplied end path, + is on the bottom. + \li When false, the previous path becomes the sibling of the next one created, + so that the last created path, the one most like the supplied end path, + is on the top.*/ + AIBoolean endOnBottom; + /** Developer-defined data to pass to the developer-defined post-install callback. */ + void *clientData; +} AIPathInstallData; + +/** Callback function for \c #AIPathInterpolateSuite::InsertInterpolants(), + called after each new path is created and interpolated. + Use to determine how the next path should be installed. + You can also use it to abort the interpolation + (for a user interruption, for example) or to do other post-processing. + @param art The new path object. + @param installData [in, out] A structure that describes how the path + was installed in the paint order. Update this to describe how + the next path should be installed. + */ +typedef ASErr (*PostInstallCB)( AIArtHandle art, AIPathInstallData *installData ); + + +/** Opaque reference to a style-interpolation object. + See \c #AIPathInterpolateSuite::NewStyleInterpolator() */ +typedef struct _t_AIStyleInterpolator* AIStyleInterpolator; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that allow you to interpolate paths and styles, + creating a smooth blend between two existing art objects. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPathInterpolateSuite and \c #kAIPathInterpolateVersion. +*/ +typedef struct { + + /** Calculates the default number of steps for a smooth blend between two paths or compound + paths, based primarily on the maximum distance in any color channel between the two paint + styles, and assuming that the interpolated step objects will be placed with their + centers on a straight line between the centers of the two blended objects. + @note If the objects are not appropriate for shading, either because there is + no color channel difference (the objects are painted with the same color), + or because they are painted with multiple colors (such as gradients + and patterns), or because they have effects or their outline is too complex + for shading (such as type objects, groups and symbols), the calculation + is based on the separation between objects instead, so that the space + between them is filled with objects that almost overlap or barely overlap. + See \c #AppropriateForSmoothColor() to determine whether this function + will base the step calculation on a color difference or the spacial separation. + @param startPath The starting art object. Usually a path or compound path. + @param endPath The ending art object. Usually a path or compound path. + @param densityLimit When positive, calculates the maximum distance from a bounding + box edge of one path to the corresponding bounding box edge of the other path, + and takes the \c densityLimit value as the minimum separation (in document points) + between consecutive interpolated edges within that span. Another way to think of + this is that 1/densityLimit is the maximum number of interpolated path edges to + place in a point of separation between bounding box edges. + + For example, if the maximum bounding box edge distance between the two blended + paths is 4 points, and the density limit is 0.125 (1/8), then steps are at most + 32 no matter how different the colors are. + + Use to avoid many paths crowded into a tiny distance, when the blend would look + the same with a much smaller number of paths. + + If the blend is intended for print, a value of about 1/4 to 1/8 point will give + smooth color. If it is intended for screen only, a value of 1 pt may be sufficient. + + Ignored if zero, negative, or greater than 4.0. + @param steps [out] A buffer in which to return the number of steps. + @see \c #SmoothColorBlendStepsAlongPath() for calculating an appropriate number + of steps when the interpolated objects will not be placed along a straight line + between the centers of the \c startPath and the \c endPath. + */ + AIAPI AIErr (*SmoothColorBlendSteps) ( AIArtHandle startPath, AIArtHandle endPath, + AIReal densityLimit, ai::int16 *steps ); + + /** Counts the number of segments of a path that are in \c #kSegmentPointSelected state. + @param path The path object. + @param count [out] A buffer in which to return the number of selected segments. + */ + AIAPI AIErr (*GetPathSelectedSegmentCount) ( AIArtHandle path, ai::int16 *count ); + + /** Translates from a partially selected path to arrays recording which points are + selected, in the form of offsets. Ignores non-p0 selections. + Use to store points across events that may insert or delete anchor points. + @param path The path object. + @param count The number of members allocated for the anchor-ID array. If less + than the number of selected points, only this number are translated. + If both paths are partially selected and the number of points differs, + uses the lowest point count. + @param anchorIDs [out] A buffer in which to return an array of anchor ID values. + All fractional parts of the \c segmentOffset values are zero. + If fewer than \c count points are selected, the remaining members are filled + with anchor IDs whose values are all 0. + You must allocate memory for this array, and free it when no longer needed. + @see PathSelectionSegNumbers() (use to communicate with \c #InsertInterpolants() + when the number of segments is known.) + */ + AIAPI AIErr (*PathSelectionToAnchorIDs) ( AIArtHandle path, ai::int16 count, AIAnchorIdentifier *anchorIDs ); + + /** Translates from a partially selected path to an array of selected points. + Ignores non-p0 selections. + Use to communicate with \c #InsertInterpolants() when the number of segments is known. + @param path The path object. + @param count The number of members allocated for the point array. If less + than the number of selected points, only this number are translated. + If both paths are partially selected and the number of points differs, + uses the lowest point count. + @param selectedPoints [out] A buffer in which to return an array of point values. + If fewer than \c count points are selected, the remaining members are filled + with points whose values are all 0. + You must allocate memory for this array, and free it when no longer needed. + @see PathSelectionToAnchorIDs() (use to store points across events that may insert or + delete anchor points.) + */ + AIAPI AIErr (*PathSelectionToSegNumbers) ( AIArtHandle path, ai::int16 count, ai::int16 *selectedPoints ); + + /** Selects a set of anchor points in a path. + @param path The path object. + @param count The number of members allocated for the point array. + @param selectPoints A set of point values, an array of size \c count. + You must allocate memory for this array, and free it when no longer needed. + */ + AIAPI AIErr (*SelectAnchorPoints) ( AIArtHandle path, ai::int16 count, ai::int16 *selectPoints ); + + /** Creates and installs the paths that represent an interpolation between two existing paths. + /li If both paths are fully selected, or if either path is not selected at all, then + the selection state of the anchor points is ignored, and both paths are entirely + flattened to get the point correspondences for interpolation. + + /li If one path is partially selected, and the other is fully or partially selected, + the function builds anchor-point arrays corresponding to the partial selections + and specified matches. + + @param startPath The starting path. Can be \c NULL if end path is given. + @param endPath The ending path. Can be \c NULL if start path is given. + @param substituteCenter A point where all points gather at one end, if the + path for that end is \c NULL. Ignored if both paths are specified. + @param useStyleFromPath If one of the two paths is \c NULL and the + other is part of a compound path (an "extra hole"), + this is the backmost object in the compound path for the other end. + @param steps The number of steps between the two paths. + @param numMatchPairs The number of values in the matches arrays. + \li When positive, the corresponding values in the two match arrays specify pairs. + \li When 0 or negative, the matches arrays are ignored, and + matching starts at the top left corner of both paths + for a closed path, or the leftmost endpoint for an open path, + and proceeds clockwise. + @param matches1 An array of match values of size \c numMatchPairs. + @param matches2 An array of match values of size \c numMatchPairs. + @param clientCallback A developer-defined callback to call after each new path is installed. + Can determine how the next path is installed, provide information for the insertion operation, + or perform other post-processing on the new paths. + + If \c NULL, the default behavior is to link each path to the + previously created one. See \c #AIPathInstallData. + */ + AIAPI AIErr (*InsertInterpolants) ( AIArtHandle startPath, + AIArtHandle endPath, + AIRealPoint *substituteCenter, + AIArtHandle useStyleFromPath, + ai::int16 steps, + ai::int16 numMatchPairs, ai::int16 *matches1, ai::int16 *matches2, + AIPathInstallData *installData, + PostInstallCB clientCallback); + + /** Calculates the length of a set of path segments. + @param path The path object. + @param ixStart The starting point. + @param count [in, out] The number of members allocated for the segment-length array. + Returns the number of segment lengths calculated. + @param segLengths [out] A buffer in which to return an array of segment length values. + You must allocate memory for this array, and free it when no longer needed. + @param flatness An upper bound on the error between the line segments + and the true curve. + */ + AIAPI AIErr (*MeasurePathSegments) ( AIArtHandle path, + ai::int16 ixStart, ai::int16 count, + AIReal *segLengths, + AIReal flatness ); + + // New in AI 9: + + /** Allocates and initializes a style interpolation object for use with + \c #ApplyInterpolatedStyle(). Not needed with \c #InsertInterpolants(), + which automatically applies interpolated styles to the paths it creates. + Use when you create the intermediate objects yourself--for example, + to apply interpolated styles to group objects or text objects, or to + interpolate path outlines using a different technique. + + This version includes object-specific data about how the style is + applied to a particular object (random seeds, scale factors, + gradient matrices, and so on) that is not encapsulated in the + \c #AIArtStyleHandle. For a version that creates an interpolation + object from the styles themselves, see \c #NewArtStyleInterpolator(). + + One, but not both of the source objects can be \c NULL. In this case, + the interpolator applies a copy of the other art style. This avoids the + need to interpolate down to nothing. + + @param styleSource0 The source art object for the first style. + @param styleSource1 The source art object for the second style. + */ + AIAPI AIErr (*NewStyleInterpolator) ( AIStyleInterpolator* interpolator, AIArtHandle styleSource0, AIArtHandle styleSource1 ); + + /** Frees memory for a style interpolator that is no longer needed. + @param interpolator The style interpolation object. Upon return, this reference is invalid. + */ + AIAPI AIErr (*DisposeStyleInterpolator) ( AIStyleInterpolator interpolator ); + + /** Uses a style interpolator to create and apply an interpolated style to an + interpolated art object. + @param interpolator The interpolation object, as returned by \c #NewStyleInterpolator + or \c #NewArtStyleInterpolator. + @param targetArt The intermediate object to which to apply the style. + @param fraction The distance from the source objects. 0 to apply the style from the + first source object, 1 to apply the style from the second source object, + or an interpolation point between the two. + @note If the art styles are not comparable, the function ignores the + \c fraction value and applies the style of the first source object. + */ + AIAPI AIErr (*ApplyInterpolatedStyle) ( AIStyleInterpolator interpolator, AIArtHandle targetArt, AIReal fraction ); + + /** Allocates and initializes a style interpolation object for use with + \c #ApplyInterpolatedStyle(). This version uses the style objects directly, + and does not include object-specific data about how the style is + applied to a particular object (random seeds, scale factors, + gradient matrices, and so on) that is not encapsulated in the + \c #AIArtStyleHandle. + + One, but not both of the source objects can be \c NULL. In this case, + the interpolator applies a copy of the other art style. This avoids the + need to interpolate down to nothing. + @param interpolator [out] A buffer in which to return the new interpolation object. + @param style0 The first art style object. + @param style1 The second art style object. + @see \c #NewStyleInterpolator() + */ + AIAPI AIErr (*NewArtStyleInterpolator) ( AIStyleInterpolator* interpolator, AIArtStyleHandle style0, AIArtStyleHandle style1 ); + + /** Retrieves an intermediate art style created by a style interpolation object + that would be applied for a specific call to \c #ApplyInterpolatedStyle(). + @param interpolator The interpolation object, as returned by \c #NewStyleInterpolator + or \c #NewArtStyleInterpolator. + @param fraction The distance from the source objects. 0 for the style from the + first source object, 1 for the style from the second source object, + or an interpolation point between the two. + @param result [out] A buffer in which to return the new art style. + */ + AIAPI AIErr (*GetInterpolatedArtStyle) ( AIStyleInterpolator interpolator, AIReal fraction, AIArtStyleHandle* result ); + + // New in AI 11: + + /** Reports whether two art objects are suitable for smooth color blending. To be suitable, + both must be either paths or compound paths, and be painted with different, simple solid colors + (not gradients, patterns, or active styles). One or both objects can have transparency. + (Note that this function returns a boolean value, not an error code.) + @param art1 The first art object. + @param art2 The second art object. + @return True if the two objects are suitable for smooth color blending. + */ + AIAPI AIBoolean (*AppropriateForSmoothColor) ( AIArtHandle art1, AIArtHandle art2 ); + + /** Calculates the default number of steps for a smooth blend between two paths or compound + paths, based primarily on the maximum distance in any color channel between the two paint + styles, and assuming that the interpolated step objects will be placed with their + centers on an arbitrary path of length \c pathDistance. + + Specifically intended for blends along non-default spine paths. + + @note If the objects are not appropriate for shading, either because there is + no color channel difference (the objects are painted with the same color), + or because they are painted with multiple colors (such as gradients + and patterns), or because they have effects or their outline is too complex + for shading (such as type objects, groups and symbols), the calculation + is based on the spacial separation between objects instead, so that the space + between objects placed along a path of length \c pathDistance will be filled + with objects that almost overlap or barely overlap. + See \c #AppropriateForSmoothColor() to determine whether this function + will base the step calculation on the color difference or the separation along + the spine path. + + @param startPath The starting art object, usually a path or compound path. + @param endPath The ending art object, usually a path or compound path. + @param densityLimit When positive (and less than or equal to 4.0), calculates the + maximum of \c pathDistance and of the maximum distance between corresponding bounding + box edges of the two input objects, and takes the \c densityLimit value as the minimum + distance between consecutive interpolated step centers placed along that distance. + Another way to think of this is that 1/densityLimit is the maximum number of interpolated + step centers to place within each point of the \c pathDistance. + + For example, if the \c pathDistance is 10 pts, and the maximum bounding box edge + separation is less than 10 pts, and the density limit is 0.125 (1/8), then the + calculated steps will be at most 80 no matter how different the colors are. + + Use to avoid many blend steps crowded into a short distance, when the blend would + look as smooth with a much smaller number of steps. + + Ignored if zero, negative, or greater than 4.0. + @param steps [out] A buffer in which to return the number of steps. + @param pathDistance Used to calculate the separation between the start and end objects, + instead of the object bounds, when the distance is needed either for objects that + are not appropriate for smooth color or to perform the density limit calculations. + If the maximum bounding box edge separation is greater than this value, the + bounding box edge separation is used instead. + + If the objects are appropriate for smooth color, and the density limit is zero, + this parameter is ignored, and the function returns the same number of + steps as \c #SmoothColorBlendSteps(). + */ + AIAPI AIErr (*SmoothColorBlendStepsAlongPath) ( AIArtHandle startPath, AIArtHandle endPath, + AIReal densityLimit, ai::int16 *steps, AIReal pathDistance ); + +} AIPathInterpolateSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathStyle.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathStyle.h index 8cbbfc1..63fddcf 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathStyle.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathStyle.h @@ -1,700 +1,702 @@ -#ifndef __AIPathStyle__ -#define __AIPathStyle__ - -/* - * Name: AIPathStyle.h - * Author: - * Date: - * Purpose: Adobe Illustrator Path Style Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIDocument__ -#include "AIDocument.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#ifndef __AIEntry__ -#include "AIEntry.h" -#endif - -#include "IAIFilePath.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIPathStyle.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPathStyleSuite "AI Path Style Suite" -#define kAIPathStyleSuiteVersion13 AIAPI_VERSION(13) -#define kAIPathStyleSuiteVersion kAIPathStyleSuiteVersion13 -#define kAIPathStyleVersion kAIPathStyleSuiteVersion - -/** Maximum number of dash components for a stroke */ -#define kMaxDashComponents 6 - -/** Types of line caps for strokes. */ -enum AILineCap { - /** Butt line caps */ - kAIButtCap = 0, - /** Round line caps */ - kAIRoundCap, - /** Projecting line caps */ - kAIProjectingCap -}; - -/** Types of line joins for strokes. */ -enum AILineJoin { - /** Miter line joins */ - kAIMiterJoin = 0, - /** Round line joins */ - kAIRoundJoin, - /** Bevel line joins */ - kAIBevelJoin -}; - -/** @ingroup Notifiers - See \c #AIPathStyleSuite */ -#define kAIBeginImportStylesNotifier "AI Begin Import Styles Notifier" -/** @ingroup Notifiers - See \c #AIPathStyleSuite */ -#define kAIEndImportStylesNotifier "AI End Import Styles Notifier" - - -/** @ingroup Errors - See \c #AIPathStyleSuite */ -#define kTooManyDashComponents 'DASH' -/** @ingroup Errors - See \c #AIPathStyleSuite */ -#define kCantImportStyles '!Imp' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Describes how to fill a path. - A \c #AIPathStyle::fill value. -*/ -struct AIFillStyle { - /** Fill color */ - AIColor color; - /** When true, print any art beneath this, then print the fill of this object over it. - When false, knock out art beneath this art at print time */ - AIBoolean overprint; - void Init() - { - overprint = false; - color.kind = kNoneColor; - } -}; - -/** The fields of an \c #AIFillStyle that are specified by a partial - style. An \c #AIPathStyleMap::fill value - */ -struct AIFillStyleMap { - AIColorMap color; - AIBoolean overprint; - void Init() - { - overprint = false; - color.kind = false; - } -}; - -/** Describes a dash pattern for stroking a path. - An \c #AIStrokeStyle::dash value. - @see PostScript documentation. - */ -struct AIDashStyle { - /** The number of valid values in the dash array, 0 if solid */ - ai::int16 length; - /** Dash offset */ - AIFloat offset; - /** Dash array */ - AIFloat array[kMaxDashComponents]; - void Init() - { - length = 0; - offset = kAIRealZero; - } -}; - -/** The fields of an \c #AIDashStyle that are specified by a partial - style. An \c #AIStrokeStyleMap::dash value. - */ -struct AIDashStyleMap { - AIBoolean length; - AIBoolean offset; - AIBoolean array[kMaxDashComponents]; - void Init() - { - length = false; - offset = false; - } -}; - -/** Describes how to stroke a path. - An \c #AIPathStyle::stroke value. -*/ -struct AIStrokeStyle { - /** Stroke color */ - AIColor color; - /** Overprint - not meaningful if the color is a pattern */ - AIBoolean overprint; - /** Line width in points */ - AIReal width; - /** Stroke dash */ - struct AIDashStyle dash; - /** Line cap */ - enum AILineCap cap; - /** Line join */ - enum AILineJoin join; - /** Line miter limit */ - AIReal miterLimit; - - void Init() - { - overprint = false; - width = kAIRealZero; - dash.Init(); - color.kind = kNoneColor; - cap = kAIButtCap; - join = kAIMiterJoin; - miterLimit = kAIRealZero; - } - -}; - -/** The fields of an \c #AIStrokeStyle that are specified by a partial - style. An \c #AIPathStyleMap::stroke value. */ -struct AIStrokeStyleMap { - AIColorMap color; - AIBoolean overprint; - AIBoolean width; - struct AIDashStyleMap dash; - AIBoolean cap; - AIBoolean join; - AIBoolean miterLimit; - void Init() - { - overprint = false; - width = false; - dash.Init(); - cap = false; - join = false; - miterLimit = false; - color.kind = false; - } -}; - -/** Describes how to paint the fill and stroke of a path. - \li A full style completely specifies the paint information. - \li A \e partial style can specify a subset - of the painting information. It can be used to represent - the common paint attributes of a selection, for instance, - or to modify a subset of attributes without affecting the others. - In this case the path style is paired with a style \e map, - an \c #AIPathStyleMap specifying the subset of attributes that have - valid values. - - Be careful not to pass partial styles to functions that require - full styles; unspecified fields can contain invalid values. - */ -struct AIPathStyle { - /** Whether or not to fill the path. */ - AIBoolean fillPaint; - /** Whether or not to stroke the path */ - AIBoolean strokePaint; - /** Fill style, if fillPaint is true */ - struct AIFillStyle fill; - /** Stroke style, if strokePaint is true */ - struct AIStrokeStyle stroke; - /** @deprecated. Use \c #AIArtSuite::SetArtUserAttr(). - Whether or not to use this as a clipping path */ - AIBoolean clip; - /** @deprecated. Use \c #AIArtSuite::SetArtUserAttr(). - Whether or not to lock the clipping path */ - AIBoolean lockClip; - /** When true, use the even-odd rule to determine path insideness */ - AIBoolean evenodd; - /** Path's resolution */ - AIReal resolution; - void Init() - { - fillPaint = false; - strokePaint = false; - fill.Init(); - stroke.Init(); - clip = false; - lockClip = false; - evenodd = false; - resolution = 800.0; - } -}; - -/** A true value indicates a field of a partial style that contains - a valid value in an accompanying \c #AIPathStyle. */ -struct AIPathStyleMap { - AIBoolean fillPaint; - AIBoolean strokePaint; - struct AIFillStyleMap fill; - struct AIStrokeStyleMap stroke; - AIBoolean clip; - AIBoolean lockClip; - AIBoolean evenodd; - AIBoolean resolution; - void Init() - { - fillPaint = false; - strokePaint = false; - fill.Init(); - stroke.Init(); - clip = false; - lockClip = false; - evenodd = false; - resolution = false; - } -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions to access or set stroke and fill paint style information - for art objects. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPathStyleSuite and \c #kAIPathStyleVersion. -*/ -struct AIPathStyleSuite { - - /** Retrieves the path style used to fill and/or stroke a path art object. - @param path The art object. - @param style [out] A buffer in which to return the style. - @return The error \c #kBadParameterErr if the art object is not an - allowed type. - */ - AIAPI AIErr (*GetPathStyle) ( AIArtHandle path, AIPathStyle *style ); - - /** Sets the path style used to fill and/or stroke a path art object, if - the object is one of these types: -
\c #kPathArt -
\c #kCompoundPathArt -
\c #kRasterArt -
\c #kMeshArt -
\c #kPlacedArt -
\c #kTextFrameArt - - For group types, (\c #kGroupArt, \c #kPluginArt, \c #kSymbolArt), - modifies the existing fill or stroke. If there is no existing fill or - stroke value, has no effect. Use the \c #AIArtStyleSuite to add a new - fill or stroke to a group object. - - @param path The art object. - @param style The new style. - @return The error \c #kBadParameterErr if the art object is not an - allowed type (\c #kForeignArt, \c #kLegacyTextArt, \c #kUnknownArt). - */ - AIAPI AIErr (*SetPathStyle) ( AIArtHandle path, const AIPathStyle *style ); - - - /** Retrieves the common attributes of the current selected objects - @param style [out] A buffer in which to return the partial style containing - the common attributes. - @param stylemap [out] A buffer in which to return the map indicating which - fields of the partial style contain valid values. - @param advStrokeParams [out, optional] A pointer to a dictionary ref which may be created - and populated with common advanced stroke parameters. - */ - AIAPI AIErr (*GetCurrentPathStyle) ( AIPathStyle *style, AIPathStyleMap *stylemap, AIDictionaryRef *advStrokeParams ); - - /** Applies a path style to any currently selected and paint-targeted objects. - For this function to apply, a targeted object must be a path or compound path, - or have a style that already contains a fill or stroke. - If a targeted object has an active style, the new style is merged - into the focal fill and stroke filters. Any effects and non-focal fills - and strokes remain unmodified. - @param style The new partial style. - @param stylemap The map indicating which fields of the partial style - contain valid values. - @param advStrokeParams [optional] A dictionary ref containing advanced stroke - parameters, may be null. - @note To completely replace active styles, use - \c #SetCurrentPathStyleForceSimple() - */ - AIAPI AIErr (*SetCurrentPathStyle) ( AIPathStyle *style, AIPathStyleMap *stylemap, ConstAIDictionaryRef advStrokeParams ); - - /** Imports styles from a file, and creates a new document containing the styles. - Use the \c #AIArtStyleSuite and \c #AISwatchListSuite to access the information. - For instance, use \c #AISwatchListSuite::GetSwatchList to import colors from - the document. - @param source The file that contains the styles. - @param newdoc [out] A buffer in which to return the new document. - */ - AIAPI AIErr (*ImportStyles) ( const ai::FilePath &source, AIDocumentHandle *newdoc ); - - /** Imports mixed-colorspace styles from a file, and creates a new document - containing the styles. Rarely needed; use only to allow a mixed colorspace - in a swatch library. Mixed colorspaces are not allowed in artwork. - (\c #ImportStyles() always converts to a single colorspace.) - @param source The file that contains the styles. - @param newdoc [out] A buffer in which to return the new document. - */ - AIAPI AIErr (*ImportStylesMixedColorSpace) ( const ai::FilePath &source, AIDocumentHandle *newdoc ); - - /** Applies a color to the stroke or fill of an art object. Generally - does what you would want to do when applying a color. It sets the - gradient vector to the default, handles compound paths, and so on. - For example, if you have an object that is stroked with a dashed line - and you pass in a new color with \c onStroke true, the old - dash pattern is retained. If the object did not have a stroke before, the - function looks for one in the current paint style. If the current paint style - does not have a stroke, it uses a sensible default. - @param art The art object. - @param color The new color. - @param onStroke True to apply the color only to strokes, false to apply only to fill. - @note The function enumerates container objects. Do not call - on both a container and its children. - */ - AIAPI AIErr (*SetObjectAIColor) ( AIArtHandle art, const AIColor *color, AIBoolean onStroke ); - - /** Reports whether and how a path style makes use of a specific color in its - fill or stroke. - @param pathStyle The full or partial path style. - @param psMap The map indicating which fields of the partial style - contain valid values, or \c NULL for a full style. - @param color The color. - @param matchTint When false, the tint percentage for spot and - global process colors is not considered. - @param lookForIndirectUsage When true, and if the path style is a pattern, - searches the pattern definition for the color. - @param usage [out] A buffer in which to return the result. - */ - AIAPI AIErr (*PathStyleUsesAIColor) ( const AIPathStyle *pathStyle, - const AIPathStyleMap *psMap, - const AIColor *color, - AIBoolean matchTint, - AIBoolean lookForIndirectUsage, - AIColorUsedHow *usage ); - - /** Applies a color to a path style in a typical way, as for the Swatch palette. - \li If the new color is a gradient or pattern, ignores its vector and - transform. If the path style is of the same type, retains its vector - and transform. Otherwise, uses default values. - \li If the new color is a spot color, uses the tint. - \li Uses reasonable defaults when changing from one kind of color - to another (such as solid to pattern or gradient) or when - assigning color to a fill or stroke that was previously unpainted. - - @param pathStyle The full or partial path style. Modified in place. - @param psMap The map indicating which fields of the partial style - contain valid values, or \c NULL for a full style. - @param newColor The new color. - @param matchColor Optional. If supplied, \c onStroke is ignored and the - new color is applied to the stroke or fill that matches this color. - Matching is exact, including color space. Never assigns paint to an - unpainted stroke or fill unless the value is \c #kNoneColor. - @param onStroke If \c matchColor is \c NULL, then when true, applies the - new color to stroke, and when false, applies it to fill. To apply - to both, you must call the function twice. - @param useOldTint When true, and the new color and match color are - both custom colors, uses the tint from the match color. When false, - uses the tint from the new color. - @param destination The art object that uses the style, Used if a bounding - box is needed to calculate a gradient vector. If it is a compound path, - calculates bounds from the entire compound group. - @param whatChanged [out] Optional. A buffer in which to return a structure - indicating what part of the path style was changed. - */ - AIAPI AIErr (*ApplyAIColorToPathStyle) ( AIPathStyle *pathStyle, - AIPathStyleMap *psMap, // can be null - const AIColor *newColor, - const AIColor *matchColor, - AIBoolean onStroke, - AIBoolean useOldTint, - AIArtHandle destination, - AIColorUsedHow *whatChanged ); - - /** Reports whether and how an art object uses a color. - @param art The art object. Can be of any type. - @param targetColor The color. - @param matchTint When false, the tint percentage for spot and - global process colors is not considered. - @param lookForIndirectUsage When true, checks for a match - inside patterns, gradients, and graph designs. When false, - still checks inside the graph style change records of graph - objects, but not in patterns, gradients, or graph designs. - @param usage [out] A buffer in which to return the result. - */ - AIAPI AIErr (*ObjectUsesAIColor) ( AIArtHandle art, - const AIColor *targetColor, - AIBoolean matchTint, - AIBoolean lookForIndirectUsage, - AIColorUsedHow *usage ); - - /** Replaces one color with another in an art object. - - For direct usage of the old color (that is, a stroke or fill, including inside graph - path style change records), calls \c #SetObjectAIColor() to set the new color. - Does not replace indirectly used colors--that is, those inside patterns, gradients, - or graph designs used by the art object. - - You can replace pattern or gradient colors by defining a new - pattern or gradient, then calling this function for the pattern or gradient - object itself, with the new replacement object. - @param art The art object, or \c NULL to replace the color in - all art in the current document. Can be any type except \c #kPlacedArt, - including those that are reported as \c #kMysteryPathArt - (paths inside text paths and graphs), and those that are - reported as \c #kUnknownArt, such as graphs and layer masks. - @param oldColor The color to replace. - @param newColor The new color. - @param useOldTint When true, and both colors are custom colors, uses - the tint from the old color. When false, uses the tint from the - new color. - @param madeReplacement [out] Optional. A buffer in which to return - true if a replacement was made. - */ - AIAPI AIErr (*ReplaceObjectAIColor) ( AIArtHandle art, - const AIColor *oldColor, const AIColor *newColor, - AIBoolean useOldTint, - AIBoolean *madeReplacement /* can be NULL */ ); - - /** Retrieves the default path style that tools should use when creating new objects other - than text objects. - @param style [out] A buffer in which to return the path style. - */ - AIAPI AIErr (*GetInitialPathStyle) ( AIPathStyle *style ); - - /** Sets the default path style that tools should use when creating new objects other - than text objects. - @param style The new path style. - */ - AIAPI AIErr (*SetInitialPathStyle) ( const AIPathStyle *style ); - - /** Retrieves the default path style that tools should use when creating text objects. - @param style [out] A buffer in which to return the path style. - */ - AIAPI AIErr (*GetInitialTextStyle) ( AIPathStyle *style ); - - /** Sets the default path style that tools should use when creating text objects. - @param style The new path style. - */ - AIAPI AIErr (*SetInitialTextStyle) ( const AIPathStyle *style ); - - /** Makes a color appropriate for the artwork in the current document. - For example, if it uses a pattern that is not available, replaces it - with an equivalent pattern that is available. - @param color The color (typically from clipboard artwork). - */ - AIAPI AIErr (*RetargetForCurrentDoc) ( AIColor *color) ; - - /** Applies a path style to any currently selected and paint-targeted objects. - For this function to apply, a targeted object must be a path or compound path, - or have a style that already contains a fill or stroke. - When a selected object has an active style, merges the input style values - only with the paint attributes, and gives the object that simple style. - Compare \c #SetCurrentPathStyle(). - @param style The new partial style, or \c NULL to replace all - selected active styles with the simple style corresponding to their focal - fill and/or stroke filters. - @param stylemap The map indicating which fields of the partial style - contain valid values, or \c NULL if style is not supplied. - */ - AIAPI AIErr (*SetCurrentPathStyleForceSimple) ( AIPathStyle *style, AIPathStyleMap* stylemap ); - - /** Applies a path style to a path object. When the path has an active style, - merges the input style values only with the paint attributes, and gives - the object that simple style. Compare \c #SetPathStyle(). - @param path The path object. - @param style The new style, or \c NULL to replace the - active style with the simple style corresponding to the focal - fill and/or stroke filters. - */ - AIAPI AIErr (*SetPathStyleForceSimple) ( AIArtHandle path, const AIPathStyle *style ); - - /** Interpolates a new style between two path styles. - @param style0 The first path style object. - @param style1 The second path style object. - @param styleOut [out] A buffer in which to return the new path style. - @param percent The distance from the source styles. 0 to return the first - style, 1 to return the second style, or an interpolation point - between the two. - @see\c #AIPathInterpolateSuite. */ - AIAPI AIErr (*InterpolatePathStyle) ( const AIPathStyle *style0, const AIPathStyle *style1, - AIPathStyle *styleOut, AIReal percent); - - /** Interpolates a color between two colors. - @param color0 The first color. - @param color1 The second color. - @param colorOut [out] A buffer in which to return the new color. - If the colors are of incompatible types, such as two patterns, - returns the first color. - @see \c #AIPathInterpolateSuite - */ - AIAPI AIErr (*InterpolateAIColor) ( const AIColor *color0, const AIColor *color1, AIColor *colorOut, - AIReal fraction ); - - // New for AI12: - - /** Sets the synchronization state for the initial path style. When synchronization - is on (which it usually is) Illustrator synchronizes the initial path style - with the current path style whenever the selection changes, and when calls - are made to \c #GetCurrentPathStyle(), \c #SetCurrentPathStyle(), - \c #GetInitialPathStyle() or \c #SetInitialPathStyle(). - The Swatches palette, Color palette, and Toolbox all show the - current path style. - - When synchronization is off, the initial path style and the current path style - become independent. In this mode, getting or setting the current path style does not - affect the initial path style, and getting or setting the initial path style does not affect - the current path style or the current selection. The palettes and Toolbox show - the initial path style rather than the current path style. - @param syncInitialPathStyle \li True to turn synchronization on, false to - turn it off. - @note You might want to maintain a tool-specific style that is not - modified when the selection changes. This allows the user to have a selection, - choose a specific tool and color, and not have the color apply to the current - selection. This is used by the paintbucket tool, for example. - To get this behavior, turn synchronization off, then get and set the - initial style (rather than the current style) while the tool is selected. - */ - AIAPI AIErr (*SetSyncInitialPathStyle) ( AIBoolean syncInitialPathStyle ); - - /** Reports the synchronization state for the initial path style. - (Note that this function returns a boolean value, not an error code.) - @return True if synchronization is on. - @see \c #SetSyncInitialPathStyle() - */ - AIAPI AIBoolean (*GetSyncInitialPathStyle)(); - - // New for AI 13: - - /** Examines or modifies colors in an object by calling a developer-defined callback function. - @param art The art object, or \c NULL to iterate through the entire art tree of - the current document. - @param adjustColorCallback The developer-defined callback procedure. - @param clientData Optional developer-defined data to pass through to the callback. - @param controlFlags Options for how colors are enumerated to the callback, - a logical OR of \c #VisitAIColorFlagValues. - @param madeReplacement [out] Optional, a buffer in which to return true if any - colors were replaced. - @note You can use this to simply visit all the colors used in a document or in the selection, - for static purposes such as building up a collection of colors or compiling statistics on them. - You could iterate twice, once to collect statistics and again to make changes, for example - to average colors or to posterize art based on a histogram of the colors that it uses. - */ - AIAPI AIErr (*AdjustObjectAIColors) ( AIArtHandle art, - AIAdjustColorFunc adjustColorCallback, void *clientData, - VisitAIColorFlags controlFlags, - AIBoolean *madeReplacement ); - - /** Retrieves the path style used to fill and/or stroke a path art object and - the visibility of fill and stroke. - @param path The art object. - @param style [out] A buffer in which to return the style. - @param fillVisible [out] A buffer in which to return true if fill is visible. - @param strokeVisible [out] A buffer in which to return true if stroke is visible. - @return The error \c #kBadParameterErr if the art object is not an - allowed type. - */ - AIAPI AIErr (*GetPathStyleEx) ( AIArtHandle path, AIPathStyle *style, AIBoolean* fillVisible, AIBoolean* strokeVisible ); - - - /** Sets the path style used to fill and/or stroke a path art object - and the visibility of fill and stroke, if the object is one of these types: -
\c #kPathArt -
\c #kCompoundPathArt -
\c #kRasterArt -
\c #kMeshArt -
\c #kPlacedArt -
\c #kTextFrameArt - - For group types, (\c #kGroupArt, \c #kPluginArt, \c #kSymbolArt), - modifies the existing fill or stroke. If there is no existing fill or - stroke value, has no effect. Use the \c #AIArtStyleSuite to add a new - fill or stroke to a group object. - - @param path The art object. - @param style The new style. - @return The error \c #kBadParameterErr if the art object is not an - allowed type (\c #kForeignArt, \c #kLegacyTextArt, \c #kUnknownArt). - */ - AIAPI AIErr (*SetPathStyleEx) ( AIArtHandle path, const AIPathStyle *style, AIBoolean fillVisible, AIBoolean strokeVisible ); - - - /** Retrieves the common attributes of the current selected objects - @param style [out] A buffer in which to return the partial style containing - the common attributes. - @param stylemap [out] A buffer in which to return the map indicating which - fields of the partial style contain valid values. - */ - AIAPI AIErr (*GetCurrentPathStyleEx) ( AIPathStyle *style, AIPathStyleMap* stylemap, AIBoolean* fillVisible, AIBoolean* strokeVisible ); - - /** Applies a path style to any currently selected and paint-targeted objects. - For this function to apply, a targeted object must be a path or compound path, - or have a style that already contains a fill or stroke. - If a targeted object has an active style, the new style is merged - into the focal fill and stroke filters. Any effects and non-focal fills - and strokes remain unmodified. - @param style The new partial style. - @param stylemap The map indicating which fields of the partial style - contain valid values. - @param fillVisible True if fill should be visible. - @param strokeVisible True if stroke should be visible. - @note To completely replace active styles, use - \c #SetCurrentPathStyleForceSimple() - */ - AIAPI AIErr (*SetCurrentPathStyleEx) ( AIPathStyle *style, AIPathStyleMap* stylemap, AIBoolean fillVisible, AIBoolean strokeVisible ); - -}; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIPathStyle__ +#define __AIPathStyle__ + +/* + * Name: AIPathStyle.h + * Author: + * Date: + * Purpose: Adobe Illustrator Path Style Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIDocument__ +#include "AIDocument.h" +#endif + +#ifndef __AIRealMath__ +#include "AIRealMath.h" +#endif + +#ifndef __AIEntry__ +#include "AIEntry.h" +#endif + +#include "IAIFilePath.hpp" + +#include "AIHeaderBegin.h" + +/** @file AIPathStyle.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPathStyleSuite "AI Path Style Suite" +#define kAIPathStyleSuiteVersion14 AIAPI_VERSION(14) +#define kAIPathStyleSuiteVersion kAIPathStyleSuiteVersion14 +#define kAIPathStyleVersion kAIPathStyleSuiteVersion + +/** Maximum number of dash components for a stroke */ +#define kMaxDashComponents 6 + +/** Types of line caps for strokes. */ +enum AILineCap { + /** Butt line caps */ + kAIButtCap = 0, + /** Round line caps */ + kAIRoundCap, + /** Projecting line caps */ + kAIProjectingCap +}; + +/** Types of line joins for strokes. */ +enum AILineJoin { + /** Miter line joins */ + kAIMiterJoin = 0, + /** Round line joins */ + kAIRoundJoin, + /** Bevel line joins */ + kAIBevelJoin +}; + +/** @ingroup Notifiers + See \c #AIPathStyleSuite */ +#define kAIBeginImportStylesNotifier "AI Begin Import Styles Notifier" +/** @ingroup Notifiers + See \c #AIPathStyleSuite */ +#define kAIEndImportStylesNotifier "AI End Import Styles Notifier" + + +/** @ingroup Errors + See \c #AIPathStyleSuite */ +#define kTooManyDashComponents 'DASH' +/** @ingroup Errors + See \c #AIPathStyleSuite */ +#define kCantImportStyles '!Imp' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Describes how to fill a path. + A \c #AIPathStyle::fill value. +*/ +struct AIFillStyle { + /** Fill color */ + AIColor color; + /** When true, print any art beneath this, then print the fill of this object over it. + When false, knock out art beneath this art at print time */ + AIBoolean overprint; + void Init() + { + overprint = false; + color.Init(); + } +}; + +/** The fields of an \c #AIFillStyle that are specified by a partial + style. An \c #AIPathStyleMap::fill value + */ +struct AIFillStyleMap { + AIColorMap color; + AIBoolean overprint; + void Init() + { + overprint = false; + color.Init(); + } +}; + +/** Describes a dash pattern for stroking a path. + An \c #AIStrokeStyle::dash value. + @see PostScript documentation. + */ +struct AIDashStyle { + /** The number of valid values in the dash array, 0 if solid */ + ai::int16 length; + /** Dash offset */ + AIFloat offset; + /** Dash array */ + AIFloat array[kMaxDashComponents]; + void Init() + { + length = 0; + offset = kAIRealZero; + } +}; + +/** The fields of an \c #AIDashStyle that are specified by a partial + style. An \c #AIStrokeStyleMap::dash value. + */ +struct AIDashStyleMap { + AIBoolean length; + AIBoolean offset; + AIBoolean array[kMaxDashComponents]; + void Init() + { + length = false; + offset = false; + } +}; + +/** Describes how to stroke a path. + An \c #AIPathStyle::stroke value. +*/ +struct AIStrokeStyle { + /** Stroke color */ + AIColor color; + /** Overprint - not meaningful if the color is a pattern */ + AIBoolean overprint; + /** Line width in points */ + AIReal width; + /** Stroke dash */ + struct AIDashStyle dash; + /** Line cap */ + enum AILineCap cap; + /** Line join */ + enum AILineJoin join; + /** Line miter limit */ + AIReal miterLimit; + + void Init() + { + overprint = false; + width = kAIRealZero; + dash.Init(); + color.Init(); + cap = kAIButtCap; + join = kAIMiterJoin; + miterLimit = kAIRealZero; + } + +}; + +/** The fields of an \c #AIStrokeStyle that are specified by a partial + style. An \c #AIPathStyleMap::stroke value. */ +struct AIStrokeStyleMap { + AIColorMap color; + AIBoolean overprint; + AIBoolean width; + struct AIDashStyleMap dash; + AIBoolean cap; + AIBoolean join; + AIBoolean miterLimit; + void Init() + { + overprint = false; + width = false; + dash.Init(); + cap = false; + join = false; + miterLimit = false; + color.Init(); + } +}; + +/** Describes how to paint the fill and stroke of a path. + \li A full style completely specifies the paint information. + \li A \e partial style can specify a subset + of the painting information. It can be used to represent + the common paint attributes of a selection, for instance, + or to modify a subset of attributes without affecting the others. + In this case the path style is paired with a style \e map, + an \c #AIPathStyleMap specifying the subset of attributes that have + valid values. + + Be careful not to pass partial styles to functions that require + full styles; unspecified fields can contain invalid values. + */ +struct AIPathStyle { + /** Whether or not to fill the path. */ + AIBoolean fillPaint; + /** Whether or not to stroke the path */ + AIBoolean strokePaint; + /** Fill style, if fillPaint is true */ + struct AIFillStyle fill; + /** Stroke style, if strokePaint is true */ + struct AIStrokeStyle stroke; + /** @deprecated. Use \c #AIArtSuite::SetArtUserAttr(). + Whether or not to use this as a clipping path */ + AIBoolean clip; + /** @deprecated. Use \c #AIArtSuite::SetArtUserAttr(). + Whether or not to lock the clipping path */ + AIBoolean lockClip; + /** When true, use the even-odd rule to determine path insideness */ + AIBoolean evenodd; + /** Path's resolution */ + AIReal resolution; + void Init() + { + fillPaint = false; + strokePaint = false; + fill.Init(); + stroke.Init(); + clip = false; + lockClip = false; + evenodd = false; + resolution = 800.0; + } +}; + +/** A true value indicates a field of a partial style that contains + a valid value in an accompanying \c #AIPathStyle. */ +struct AIPathStyleMap { + AIBoolean fillPaint; + AIBoolean strokePaint; + struct AIFillStyleMap fill; + struct AIStrokeStyleMap stroke; + AIBoolean clip; + AIBoolean lockClip; + AIBoolean evenodd; + AIBoolean resolution; + void Init() + { + fillPaint = false; + strokePaint = false; + fill.Init(); + stroke.Init(); + clip = false; + lockClip = false; + evenodd = false; + resolution = false; + } +}; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions to access or set stroke and fill paint style information + for art objects. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPathStyleSuite and \c #kAIPathStyleVersion. +*/ +struct AIPathStyleSuite { + + /** Retrieves the path style used to fill and/or stroke a path art object. + @param path The art object. + @param style [out] A buffer in which to return the style. + @param outHasAdvFill : Set to 'true' if there is advance fill applied on path e.g. smooth style shading. + @return The error \c #kBadParameterErr if the art object is not an + allowed type. + */ + AIAPI AIErr (*GetPathStyle) ( AIArtHandle path, AIPathStyle *style, AIBoolean *outHasAdvFill ); + + /** Sets the path style used to fill and/or stroke a path art object, if + the object is one of these types: +
\c #kPathArt +
\c #kCompoundPathArt +
\c #kRasterArt +
\c #kMeshArt +
\c #kPlacedArt +
\c #kTextFrameArt + + For group types, (\c #kGroupArt, \c #kPluginArt, \c #kSymbolArt), + modifies the existing fill or stroke. If there is no existing fill or + stroke value, has no effect. Use the \c #AIArtStyleSuite to add a new + fill or stroke to a group object. + + @param path The art object. + @param style The new style. + @return The error \c #kBadParameterErr if the art object is not an + allowed type (\c #kForeignArt, \c #kLegacyTextArt, \c #kUnknownArt). + */ + AIAPI AIErr (*SetPathStyle) ( AIArtHandle path, const AIPathStyle *style ); + + + /** Retrieves the common attributes of the current selected objects + @param style [out] A buffer in which to return the partial style containing + the common attributes. + @param stylemap [out] A buffer in which to return the map indicating which + fields of the partial style contain valid values. + @param outHasAdvFill : Set to 'true' if there is advance fill applied on path e.g. smooth style shading. + @param advStrokeParams [out, optional] A pointer to a dictionary ref which may be created + and populated with common advanced stroke parameters. + */ + AIAPI AIErr (*GetCurrentPathStyle) ( AIPathStyle *style, AIPathStyleMap *stylemap, AIDictionaryRef *advStrokeParams, AIBoolean *outHasAdvFill); + + /** Applies a path style to any currently selected and paint-targeted objects. + For this function to apply, a targeted object must be a path or compound path, + or have a style that already contains a fill or stroke. + If a targeted object has an active style, the new style is merged + into the focal fill and stroke filters. Any effects and non-focal fills + and strokes remain unmodified. + @param style The new partial style. + @param stylemap The map indicating which fields of the partial style + contain valid values. + @param advStrokeParams [optional] A dictionary ref containing advanced stroke + parameters, may be null. + @note To completely replace active styles, use + \c #SetCurrentPathStyleForceSimple() + */ + AIAPI AIErr (*SetCurrentPathStyle) ( AIPathStyle *style, AIPathStyleMap *stylemap, ConstAIDictionaryRef advStrokeParams ); + + /** Imports styles from a file, and creates a new document containing the styles. + Use the \c #AIArtStyleSuite and \c #AISwatchListSuite to access the information. + For instance, use \c #AISwatchListSuite::GetSwatchList to import colors from + the document. + @param source The file that contains the styles. + @param newdoc [out] A buffer in which to return the new document. + */ + AIAPI AIErr (*ImportStyles) ( const ai::FilePath &source, AIDocumentHandle *newdoc ); + + /** Imports mixed-colorspace styles from a file, and creates a new document + containing the styles. Rarely needed; use only to allow a mixed colorspace + in a swatch library. Mixed colorspaces are not allowed in artwork. + (\c #ImportStyles() always converts to a single colorspace.) + @param source The file that contains the styles. + @param newdoc [out] A buffer in which to return the new document. + */ + AIAPI AIErr (*ImportStylesMixedColorSpace) ( const ai::FilePath &source, AIDocumentHandle *newdoc ); + + /** Applies a color to the stroke or fill of an art object. Generally + does what you would want to do when applying a color. It sets the + gradient vector to the default, handles compound paths, and so on. + For example, if you have an object that is stroked with a dashed line + and you pass in a new color with \c onStroke true, the old + dash pattern is retained. If the object did not have a stroke before, the + function looks for one in the current paint style. If the current paint style + does not have a stroke, it uses a sensible default. + @param art The art object. + @param color The new color. + @param onStroke True to apply the color only to strokes, false to apply only to fill. + @note The function enumerates container objects. Do not call + on both a container and its children. + */ + AIAPI AIErr (*SetObjectAIColor) ( AIArtHandle art, const AIColor *color, AIBoolean onStroke ); + + /** Reports whether and how a path style makes use of a specific color in its + fill or stroke. + @param pathStyle The full or partial path style. + @param psMap The map indicating which fields of the partial style + contain valid values, or \c NULL for a full style. + @param color The color. + @param matchTint When false, the tint percentage for spot and + global process colors is not considered. + @param lookForIndirectUsage When true, and if the path style is a pattern, + searches the pattern definition for the color. + @param usage [out] A buffer in which to return the result. + */ + AIAPI AIErr (*PathStyleUsesAIColor) ( const AIPathStyle *pathStyle, + const AIPathStyleMap *psMap, + const AIColor *color, + AIBoolean matchTint, + AIBoolean lookForIndirectUsage, + AIColorUsedHow *usage ); + + /** Applies a color to a path style in a typical way, as for the Swatch palette. + \li If the new color is a gradient or pattern, ignores its vector and + transform. If the path style is of the same type, retains its vector + and transform. Otherwise, uses default values. + \li If the new color is a spot color, uses the tint. + \li Uses reasonable defaults when changing from one kind of color + to another (such as solid to pattern or gradient) or when + assigning color to a fill or stroke that was previously unpainted. + + @param pathStyle The full or partial path style. Modified in place. + @param psMap The map indicating which fields of the partial style + contain valid values, or \c NULL for a full style. + @param newColor The new color. + @param matchColor Optional. If supplied, \c onStroke is ignored and the + new color is applied to the stroke or fill that matches this color. + Matching is exact, including color space. Never assigns paint to an + unpainted stroke or fill unless the value is \c #kNoneColor. + @param onStroke If \c matchColor is \c NULL, then when true, applies the + new color to stroke, and when false, applies it to fill. To apply + to both, you must call the function twice. + @param useOldTint When true, and the new color and match color are + both custom colors, uses the tint from the match color. When false, + uses the tint from the new color. + @param destination The art object that uses the style, Used if a bounding + box is needed to calculate a gradient vector. If it is a compound path, + calculates bounds from the entire compound group. + @param whatChanged [out] Optional. A buffer in which to return a structure + indicating what part of the path style was changed. + */ + AIAPI AIErr (*ApplyAIColorToPathStyle) ( AIPathStyle *pathStyle, + AIPathStyleMap *psMap, // can be null + const AIColor *newColor, + const AIColor *matchColor, + AIBoolean onStroke, + AIBoolean useOldTint, + AIArtHandle destination, + AIColorUsedHow *whatChanged ); + + /** Reports whether and how an art object uses a color. + @param art The art object. Can be of any type. + @param targetColor The color. + @param matchTint When false, the tint percentage for spot and + global process colors is not considered. + @param lookForIndirectUsage When true, checks for a match + inside patterns, gradients, and graph designs. When false, + still checks inside the graph style change records of graph + objects, but not in patterns, gradients, or graph designs. + @param usage [out] A buffer in which to return the result. + */ + AIAPI AIErr (*ObjectUsesAIColor) ( AIArtHandle art, + const AIColor *targetColor, + AIBoolean matchTint, + AIBoolean lookForIndirectUsage, + AIColorUsedHow *usage ); + + /** Replaces one color with another in an art object. + + For direct usage of the old color (that is, a stroke or fill, including inside graph + path style change records), calls \c #SetObjectAIColor() to set the new color. + Does not replace indirectly used colors--that is, those inside patterns, gradients, + or graph designs used by the art object. + + You can replace pattern or gradient colors by defining a new + pattern or gradient, then calling this function for the pattern or gradient + object itself, with the new replacement object. + @param art The art object, or \c NULL to replace the color in + all art in the current document. Can be any type except \c #kPlacedArt, + including those that are reported as \c #kMysteryPathArt + (paths inside text paths and graphs), and those that are + reported as \c #kUnknownArt, such as graphs and layer masks. + @param oldColor The color to replace. + @param newColor The new color. + @param useOldTint When true, and both colors are custom colors, uses + the tint from the old color. When false, uses the tint from the + new color. + @param madeReplacement [out] Optional. A buffer in which to return + true if a replacement was made. + */ + AIAPI AIErr (*ReplaceObjectAIColor) ( AIArtHandle art, + const AIColor *oldColor, const AIColor *newColor, + AIBoolean useOldTint, + AIBoolean *madeReplacement /* can be NULL */ ); + + /** Retrieves the default path style that tools should use when creating new objects other + than text objects. + @param style [out] A buffer in which to return the path style. + */ + AIAPI AIErr (*GetInitialPathStyle) ( AIPathStyle *style ); + + /** Sets the default path style that tools should use when creating new objects other + than text objects. + @param style The new path style. + */ + AIAPI AIErr (*SetInitialPathStyle) ( const AIPathStyle *style ); + + /** Retrieves the default path style that tools should use when creating text objects. + @param style [out] A buffer in which to return the path style. + */ + AIAPI AIErr (*GetInitialTextStyle) ( AIPathStyle *style ); + + /** Sets the default path style that tools should use when creating text objects. + @param style The new path style. + */ + AIAPI AIErr (*SetInitialTextStyle) ( const AIPathStyle *style ); + + /** Makes a color appropriate for the artwork in the current document. + For example, if it uses a pattern that is not available, replaces it + with an equivalent pattern that is available. + @param color The color (typically from clipboard artwork). + */ + AIAPI AIErr (*RetargetForCurrentDoc) ( AIColor *color) ; + + /** Applies a path style to any currently selected and paint-targeted objects. + For this function to apply, a targeted object must be a path or compound path, + or have a style that already contains a fill or stroke. + When a selected object has an active style, merges the input style values + only with the paint attributes, and gives the object that simple style. + Compare \c #SetCurrentPathStyle(). + @param style The new partial style, or \c NULL to replace all + selected active styles with the simple style corresponding to their focal + fill and/or stroke filters. + @param stylemap The map indicating which fields of the partial style + contain valid values, or \c NULL if style is not supplied. + */ + AIAPI AIErr (*SetCurrentPathStyleForceSimple) ( AIPathStyle *style, AIPathStyleMap* stylemap ); + + /** Applies a path style to a path object. When the path has an active style, + merges the input style values only with the paint attributes, and gives + the object that simple style. Compare \c #SetPathStyle(). + @param path The path object. + @param style The new style, or \c NULL to replace the + active style with the simple style corresponding to the focal + fill and/or stroke filters. + */ + AIAPI AIErr (*SetPathStyleForceSimple) ( AIArtHandle path, const AIPathStyle *style ); + + /** Interpolates a new style between two path styles. + @param style0 The first path style object. + @param style1 The second path style object. + @param styleOut [out] A buffer in which to return the new path style. + @param percent The distance from the source styles. 0 to return the first + style, 1 to return the second style, or an interpolation point + between the two. + @see\c #AIPathInterpolateSuite. */ + AIAPI AIErr (*InterpolatePathStyle) ( const AIPathStyle *style0, const AIPathStyle *style1, + AIPathStyle *styleOut, AIReal percent); + + /** Interpolates a color between two colors. + @param color0 The first color. + @param color1 The second color. + @param colorOut [out] A buffer in which to return the new color. + If the colors are of incompatible types, such as two patterns, + returns the first color. + @see \c #AIPathInterpolateSuite + */ + AIAPI AIErr (*InterpolateAIColor) ( const AIColor *color0, const AIColor *color1, AIColor *colorOut, + AIReal fraction ); + + // New for AI12: + + /** Sets the synchronization state for the initial path style. When synchronization + is on (which it usually is) Illustrator synchronizes the initial path style + with the current path style whenever the selection changes, and when calls + are made to \c #GetCurrentPathStyle(), \c #SetCurrentPathStyle(), + \c #GetInitialPathStyle() or \c #SetInitialPathStyle(). + The Swatches palette, Color palette, and Toolbox all show the + current path style. + + When synchronization is off, the initial path style and the current path style + become independent. In this mode, getting or setting the current path style does not + affect the initial path style, and getting or setting the initial path style does not affect + the current path style or the current selection. The palettes and Toolbox show + the initial path style rather than the current path style. + @param syncInitialPathStyle \li True to turn synchronization on, false to + turn it off. + @note You might want to maintain a tool-specific style that is not + modified when the selection changes. This allows the user to have a selection, + choose a specific tool and color, and not have the color apply to the current + selection. This is used by the paintbucket tool, for example. + To get this behavior, turn synchronization off, then get and set the + initial style (rather than the current style) while the tool is selected. + */ + AIAPI AIErr (*SetSyncInitialPathStyle) ( AIBoolean syncInitialPathStyle ); + + /** Reports the synchronization state for the initial path style. + (Note that this function returns a boolean value, not an error code.) + @return True if synchronization is on. + @see \c #SetSyncInitialPathStyle() + */ + AIAPI AIBoolean (*GetSyncInitialPathStyle)(); + + // New for AI 13: + + /** Examines or modifies colors in an object by calling a developer-defined callback function. + @param art The art object, or \c NULL to iterate through the entire art tree of + the current document. + @param adjustColorCallback The developer-defined callback procedure. + @param clientData Optional developer-defined data to pass through to the callback. + @param controlFlags Options for how colors are enumerated to the callback, + a logical OR of \c #VisitAIColorFlagValues. + @param madeReplacement [out] Optional, a buffer in which to return true if any + colors were replaced. + @note You can use this to simply visit all the colors used in a document or in the selection, + for static purposes such as building up a collection of colors or compiling statistics on them. + You could iterate twice, once to collect statistics and again to make changes, for example + to average colors or to posterize art based on a histogram of the colors that it uses. + */ + AIAPI AIErr (*AdjustObjectAIColors) ( AIArtHandle art, + AIAdjustColorFunc adjustColorCallback, void *clientData, + VisitAIColorFlags controlFlags, + AIBoolean *madeReplacement ); + + /** Retrieves the path style used to fill and/or stroke a path art object and + the visibility of fill and stroke. + @param path The art object. + @param style [out] A buffer in which to return the style. + @param fillVisible [out] A buffer in which to return true if fill is visible. + @param strokeVisible [out] A buffer in which to return true if stroke is visible. + @return The error \c #kBadParameterErr if the art object is not an + allowed type. + */ + AIAPI AIErr (*GetPathStyleEx) ( AIArtHandle path, AIPathStyle *style, AIBoolean* fillVisible, AIBoolean* strokeVisible ); + + + /** Sets the path style used to fill and/or stroke a path art object + and the visibility of fill and stroke, if the object is one of these types: +
\c #kPathArt +
\c #kCompoundPathArt +
\c #kRasterArt +
\c #kMeshArt +
\c #kPlacedArt +
\c #kTextFrameArt + + For group types, (\c #kGroupArt, \c #kPluginArt, \c #kSymbolArt), + modifies the existing fill or stroke. If there is no existing fill or + stroke value, has no effect. Use the \c #AIArtStyleSuite to add a new + fill or stroke to a group object. + + @param path The art object. + @param style The new style. + @return The error \c #kBadParameterErr if the art object is not an + allowed type (\c #kForeignArt, \c #kLegacyTextArt, \c #kUnknownArt). + */ + AIAPI AIErr (*SetPathStyleEx) ( AIArtHandle path, const AIPathStyle *style, AIBoolean fillVisible, AIBoolean strokeVisible ); + + + /** Retrieves the common attributes of the current selected objects + @param style [out] A buffer in which to return the partial style containing + the common attributes. + @param stylemap [out] A buffer in which to return the map indicating which + fields of the partial style contain valid values. + */ + AIAPI AIErr (*GetCurrentPathStyleEx) ( AIPathStyle *style, AIPathStyleMap* stylemap, AIBoolean* fillVisible, AIBoolean* strokeVisible ); + + /** Applies a path style to any currently selected and paint-targeted objects. + For this function to apply, a targeted object must be a path or compound path, + or have a style that already contains a fill or stroke. + If a targeted object has an active style, the new style is merged + into the focal fill and stroke filters. Any effects and non-focal fills + and strokes remain unmodified. + @param style The new partial style. + @param stylemap The map indicating which fields of the partial style + contain valid values. + @param fillVisible True if fill should be visible. + @param strokeVisible True if stroke should be visible. + @note To completely replace active styles, use + \c #SetCurrentPathStyleForceSimple() + */ + AIAPI AIErr (*SetCurrentPathStyleEx) ( AIPathStyle *style, AIPathStyleMap* stylemap, AIBoolean fillVisible, AIBoolean strokeVisible ); + +}; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathfinder.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathfinder.h index 7fbfade..9667b5e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathfinder.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPathfinder.h @@ -1,402 +1,476 @@ -#ifndef __AIPathfinder__ -#define __AIPathfinder__ - -/* - * Name: AIPathfinder.h - * $Revision: 7 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Pathfinder Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIFilter__ -#include "AIFilter.h" -#endif - -#ifndef __AIMenu__ -#include "AIMenu.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - - -#include "AIHeaderBegin.h" - - -/** @file AIPathfinder.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** Pathfinder suite name */ -#define kAIPathfinderSuite "AI Pathfinder Suite" -/** Pathfinder suite version */ -#define kAIPathfinderSuiteVersion6 AIAPI_VERSION(6) -/** Pathfinder suite name */ -#define kAIPathfinderSuiteVersion kAIPathfinderSuiteVersion6 -/** Pathfinder suite version */ -#define kAIPathfinderVersion kAIPathfinderSuiteVersion - -/** The default value for \c #AIOptions::ipmPrecision */ -#define kDefaultPrecision 10.0 -/** The default value for \c #AIOptions::removeRedundantPoints */ -#define kRemoveRedundantPointsDefault 0 -/** The default value for \c #AIOptions::flags \c #kExtractUnpaintedArtwork flag */ -#define kExtractUnpaintedArtworkDefault 0 -/** The default value for the \c #AIOptions::flags \c #kAllowEmptyOutput flag */ -#define kAllowEmptyOutputDefault 0 -/** The default value for the \c #AIOptions::flags #kIgnoreEvenOddFillRule flag */ -#define kIgnoreEvenOddFillRuleDefault 0 - -/** The default value for \c #AIMixParameters::softRate */ -#define kSoftRateDefault 0.5 -/** The default value for \c #AIMixParameters::convertCustomColors */ -#define kMixConvertCustomColorsDefault 1 - -// Trap parameters -/** The default value for \c #AITrapParameters::trapThickness */ -#define kTrapThicknessDefault 0.25 -/** The default value for \c #AITrapParameters::heightWidthAspectRatio */ -#define kHeightWidthAspectRatioDefault 1.0 -/** The default value for \c #AITrapParameters::trapTint */ -#define kTrapTintDefault 0.4 -/** The default value for \c #AITrapParameters::maximumTint */ -#define kMaximumTintDefault 1.0 -/** The default value for \c #AITrapParameters::tintTolerance */ -#define kTintToleranceDefault 0.05 -/** The default value for \c #AITrapParameters::reverseTrap */ -#define kReverseTrapDefault 0 -/** The default value for \c #AITrapParameters::convertCustomColors */ -#define kTrapConvertCustomColorsDefault 0 - - -/** The number of points in a micron. */ -#define pointsPerMicron (72.0 / 25400.0) - -/** Flag values for \c #AIOptions::flags */ -enum AIOptionsFlagValues { - /** When set, remove unpainted artwork from the result of processing. */ - kExtractUnpaintedArtwork = 0x00001, - /** When set, these functions can produce empty output:
- \c #AIPathfinderSuite::DoBackMinusFrontEffect(), - \c #AIPathfinderSuite::DoFrontMinusBackEffect(), - \c #AIPathfinderSuite::DoIntersectEffect(), - \c #AIPathfinderSuite::DoExcludeEffect() */ - kAllowEmptyOutput = 0x10000, - /** When set, assume that all paths use the non-zero fill rule rather - than the even-odd fill rule. */ - kIgnoreEvenOddFillRule = 0x20000, - /** When set, suppresses the progress report during a pathfinder operation. - Available in AI 13 and later. */ - kSuppressProgressDialog = 0x40000, - /** When set, result objects are deselected. - Available in AI 13 and later. */ - kDeselectResultArts = 0x80000 - -}; - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Convenience type definition. */ -typedef double dbl; - -/** Options that control how pathfinder operations are performed. */ -typedef struct { - /** Pathfinding precision, in microns. - The number of microns in a point is given by \c #pointsPerMicron. - Default value is \c #kDefaultPrecision */ - double ipmPrecision; - /** Nonzero to remove redundant points. Default value is \c #kRemoveRedundantPointsDefault */ - ai::int32 removeRedundantPoints; - /** Option flags, a logical OR of \c #AIOptionsFlagValues. */ - ai::int32 flags; -} AIOptions; - -/** Mixing parameters for \c #AIParameters */ -typedef struct { - /** The percentage of visibility in overlapping colors. - Default value is \c #kSoftRateDefault */ - double softRate; - /** Nonzero to convert custom colors when mixing. - Default value is \c #kMixConvertCustomColorsDefault */ - ai::int32 convertCustomColors; -} AIMixParameters; - -/** Trapping parameters for \c #AIParameters. - These correspond to UI values offered in the Pathfinder - palette's Trap dialog; see user documentation for - explanations. */ -typedef struct { - /** Trap thickness, in points. - Default value is \c #kTrapThicknessDefault */ - double trapThickness; - /** Height to width aspect ratio. 1.0 is 1:1, 2.0 is 2:1. - Default value is \c #kHeightWidthAspectRatioDefault */ - double heightWidthAspectRatio; - /** Tint. - Default value is \c #kTrapTintDefault */ - double trapTint; - /** Maximum tint (default is recommended). - Default value is \c #kMaximumTintDefault */ - double maximumTint; - /** Tint tolerance (default is recommended). - Default value is \c #kTintToleranceDefault */ - double tintTolerance; - /** Nonzero to reverse trap. - Default value is \c #kReverseTrapDefault */ - ai::int32 reverseTrap; - /** Nonzero to convert custom colors. - Default value is \c #kTrapConvertCustomColorsDefault */ - ai::int32 convertCustomColors; -} AITrapParameters; - -/** Mixing and trapping parameters for \c #AIPathfinderData::parameters */ -typedef struct { - /** Parameters for mixing operations. */ - AIMixParameters mixParameters; - /** Parameters for trapping operations. */ - AITrapParameters trapParameters; -} AIParameters; - -/** Defines how to perform a pathfinder operation. */ -typedef struct { - /** Options that control how pathfinder operations are performed. */ - AIOptions options; - /** Parameters for mixing and trapping operations. */ - AIParameters parameters; - /** A pointer to an array of selected art objects on which to perform - the operation. */ - AIArtHandle *fSelectedArt; - /** The number of members of the \c fSelectedArt array. */ - ai::int32 fSelectedArtCount; - /** Not used. Pass 0. */ - ai::int32 fAlertInfoID; -} AIPathfinderData; - - -/** The contents of a Pathfinder message. */ -typedef struct { - /** The message data. */ - SPMessageData d; - /** How to perform the pathfinder operation. */ - AIPathfinderData pathfinderData; -} AIPathfinderMessage; - -/** Compound shape modes. These control how objects inside a compound - shape group interact with each other. Shapes are drawn from the bottom - object up. See \c #AIPathfinderSuite::SetShapeMode(). */ -typedef enum AIShapeMode -{ - /** Applies the Unite effect to each succeeding object and the previous shape. */ - kAIShapeModeAdd = 0, - /** Applies the Back-minus-front effect to each succeeding object and the previous shape. */ - kAIShapeModeSubtract, - /** Applies the Intersect effect to each succeeding object and the previous shape. */ - kAIShapeModeIntersect, - /** Applies the Exclude effect to each succeeding object and the previous shape. */ - kAIShapeModeExclude -} AIShapeMode; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that perform operations on \e paths (art objects - of type \c #kPathArt), which apply various effects to selected path art. - The operations correspond to those available in the Pathfinder palette and Effect menu. - - Additional functions allow manipulation of \e compound \e shapes, plug-in groups to - which you can apply effects. See \c #AIPluginGroupSuite. In a compound shape group, - the bottom object in the group is drawn, then modified by the next object above it - according to the interaction mode (\c #AIShapeMode). Each succeeding object can be added to, - subtracted from, intersected with, or excluded from the drawing. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPathfinderSuite and \c #kAIPathfinderVersion. - */ -typedef struct { - - /** Applies a Unite effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoUniteEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies an Intersect effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoIntersectEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies an Exclude effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoExcludeEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Back-minus-front effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoBackMinusFrontEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Front-minus-back effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoFrontMinusBackEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Divide effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoDivideEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Outline effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoOutlineEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Trim effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoTrimEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Merge effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoMergeEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Crop effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoCropEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Hard effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoHardEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Soft effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoSoftEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Applies a Trap effect to selected art. - @param data The structure containing the selected art and operation parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*DoTrapEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Retrieves the parameters for the Hard effect pathfinder operation. - @param data [out] A structure in which to return the relevant parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*GetHardEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Retrieves the parameters for the Soft effect pathfinder operation. - @param data [out] A structure in which to return the relevant parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*GetSoftEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Retrieves the parameters for the Trap effect pathfinder operation. - @param data [out] A structure in which to return the relevant parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*GetTrapEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); - - /** Retrieves the global options for Pathfinder and Effect operations. - @param data [out] A structure in which to return the relevant parameters. - @param message Not used. Pass an object in which all fields are \c NULL. - */ - AIAPI AIErr (*GetGlobalOptions) ( AIPathfinderData *data, AIFilterMessage *message ); - - // New in AI 10.0: Compound Shapes - /** Retrieves the compound shape mode for an art plug-in group object. - (Note that this function returns a constant value, not an error code.) - @param art The art object, a plug-in group. - @return The shape mode value. - */ - AIAPI AIShapeMode (*GetShapeMode) ( AIArtHandle art ); - - /** Sets the compound shape mode for an art plug-in group object. This controls what - effects are applied as successive objects are drawn. - @param art The art object of type \c #kPluginArt. - @param The new shape mode value. - */ - AIAPI AIErr (*SetShapeMode) ( AIArtHandle art, AIShapeMode mode ); - - /** Creates a new, empty, compound shape at a specified position in the paint order - of the current document's art tree. Use the \c #AIPluginGroupSuite - to add objects to the group. - @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new art object of type \c #kPluginArt. - */ - AIAPI AIErr (*NewCompoundShape) ( ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Reports whether an art object is a compound shape. - @param art The art object. - @param isCompoundShape A buffer in which to return true if the art is a compound shape. - */ - AIAPI AIErr (*IsCompoundShape) ( AIArtHandle art, AIBoolean *isCompoundShape ); - - /** Expands a shape into a single path or compound path, by applying the Unite effect to - each component art object. - @param inOutArt [in, out] A buffer containing the shape art object, - in which to return the path object. - */ - AIAPI AIErr (*FlattenArt) ( AIArtHandle *inOutArt ); - -} AIPathfinderSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIPathfinder__ +#define __AIPathfinder__ + +/* + * Name: AIPathfinder.h + * $Revision: 7 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Pathfinder Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIFilter__ +#include "AIFilter.h" +#endif + +#ifndef __AIMenu__ +#include "AIMenu.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + + +#include "AIHeaderBegin.h" + + +/** @file AIPathfinder.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** Pathfinder suite name */ +#define kAIPathfinderSuite "AI Pathfinder Suite" +/** Pathfinder suite version */ +#define kAIPathfinderSuiteVersion7 AIAPI_VERSION(7) +/** Pathfinder suite name */ +#define kAIPathfinderSuiteVersion kAIPathfinderSuiteVersion7 +/** Pathfinder suite version */ +#define kAIPathfinderVersion kAIPathfinderSuiteVersion + +/** The default value for \c #AIOptions::ipmPrecision */ +#define kDefaultPrecision 10.0 +/** The default value for \c #AIOptions::removeRedundantPoints */ +#define kRemoveRedundantPointsDefault 0 +/** The default value for \c #AIOptions::flags \c #kExtractUnpaintedArtwork flag */ +#define kExtractUnpaintedArtworkDefault 0 +/** The default value for the \c #AIOptions::flags \c #kAllowEmptyOutput flag */ +#define kAllowEmptyOutputDefault 0 +/** The default value for the \c #AIOptions::flags #kIgnoreEvenOddFillRule flag */ +#define kIgnoreEvenOddFillRuleDefault 0 + +/** The default value for \c #AIMixParameters::softRate */ +#define kSoftRateDefault 0.5 +/** The default value for \c #AIMixParameters::convertCustomColors */ +#define kMixConvertCustomColorsDefault 1 + +// Trap parameters +/** The default value for \c #AITrapParameters::trapThickness */ +#define kTrapThicknessDefault 0.25 +/** The default value for \c #AITrapParameters::heightWidthAspectRatio */ +#define kHeightWidthAspectRatioDefault 1.0 +/** The default value for \c #AITrapParameters::trapTint */ +#define kTrapTintDefault 0.4 +/** The default value for \c #AITrapParameters::maximumTint */ +#define kMaximumTintDefault 1.0 +/** The default value for \c #AITrapParameters::tintTolerance */ +#define kTintToleranceDefault 0.05 +/** The default value for \c #AITrapParameters::reverseTrap */ +#define kReverseTrapDefault 0 +/** The default value for \c #AITrapParameters::convertCustomColors */ +#define kTrapConvertCustomColorsDefault 0 + + +/** The number of points in a micron. */ +#define pointsPerMicron (72.0 / 25400.0) + +/** Flag values for \c #AIOptions::flags */ +enum AIOptionsFlagValues { + /** When set, remove unpainted artwork from the result of processing. */ + kExtractUnpaintedArtwork = 0x00001, + /** When set, these functions can produce empty output:
+ \c #AIPathfinderSuite::DoBackMinusFrontEffect(), + \c #AIPathfinderSuite::DoFrontMinusBackEffect(), + \c #AIPathfinderSuite::DoIntersectEffect(), + \c #AIPathfinderSuite::DoExcludeEffect() */ + kAllowEmptyOutput = 0x10000, + /** When set, assume that all paths use the non-zero fill rule rather + than the even-odd fill rule. */ + kIgnoreEvenOddFillRule = 0x20000, + /** When set, suppresses the progress report during a pathfinder operation. + Available in AI 13 and later. */ + kSuppressProgressDialog = 0x40000, + /** When set, result objects are deselected. + Available in AI 13 and later. */ + kDeselectResultArts = 0x80000 +}; + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Convenience type definition. */ +typedef double dbl; + +/** Options that control how pathfinder operations are performed. */ +struct AIOptions { + /** Pathfinding precision, in microns. + The number of microns in a point is given by \c #pointsPerMicron. + Default value is \c #kDefaultPrecision */ + double ipmPrecision; + bool allowNonOptimizedDeletion; + /** Nonzero to remove redundant points. Default value is \c #kRemoveRedundantPointsDefault */ + ai::int32 removeRedundantPoints; + /** Option flags, a logical OR of \c #AIOptionsFlagValues. */ + ai::int32 flags; + /** Initializes members to their default value. */ + void Init() + { + ipmPrecision = kDefaultPrecision; + removeRedundantPoints = kRemoveRedundantPointsDefault; + flags = 0; + allowNonOptimizedDeletion = false; + } +}; + +/** Mixing parameters for \c #AIParameters */ +struct AIMixParameters { + /** The percentage of visibility in overlapping colors. + Default value is \c #kSoftRateDefault */ + double softRate; + /** Nonzero to convert custom colors when mixing. + Default value is \c #kMixConvertCustomColorsDefault */ + ai::int32 convertCustomColors; + /** Initializes members to their default value. */ + void Init() + { + softRate = kSoftRateDefault; + convertCustomColors = kMixConvertCustomColorsDefault; + } +}; + +/** Trapping parameters for \c #AIParameters. + These correspond to UI values offered in the Pathfinder + palette's Trap dialog; see user documentation for + explanations. */ +struct AITrapParameters { + /** Trap thickness, in points. + Default value is \c #kTrapThicknessDefault */ + double trapThickness; + /** Height to width aspect ratio. 1.0 is 1:1, 2.0 is 2:1. + Default value is \c #kHeightWidthAspectRatioDefault */ + double heightWidthAspectRatio; + /** Tint. + Default value is \c #kTrapTintDefault */ + double trapTint; + /** Maximum tint (default is recommended). + Default value is \c #kMaximumTintDefault */ + double maximumTint; + /** Tint tolerance (default is recommended). + Default value is \c #kTintToleranceDefault */ + double tintTolerance; + /** Nonzero to reverse trap. + Default value is \c #kReverseTrapDefault */ + ai::int32 reverseTrap; + /** Nonzero to convert custom colors. + Default value is \c #kTrapConvertCustomColorsDefault */ + ai::int32 convertCustomColors; + /** Initializes members to their default value. */ + void Init() + { + trapThickness = kTrapThicknessDefault; + heightWidthAspectRatio = kHeightWidthAspectRatioDefault; + trapTint = kTrapTintDefault; + maximumTint = kMaximumTintDefault; + tintTolerance = kTintToleranceDefault; + reverseTrap = kReverseTrapDefault; + convertCustomColors = kTrapConvertCustomColorsDefault; + } +}; + +/** Mixing and trapping parameters for \c #AIPathfinderData::parameters */ +struct AIParameters { + /** Parameters for mixing operations. */ + AIMixParameters mixParameters; + /** Parameters for trapping operations. */ + AITrapParameters trapParameters; + /** Initializes members to their default value. */ + void Init() + { + mixParameters.Init(); + trapParameters.Init(); + } +}; + +/** Defines how to perform a pathfinder operation. */ +struct AIPathfinderData { + /** Options that control how pathfinder operations are performed. */ + AIOptions options; + /** Parameters for mixing and trapping operations. */ + AIParameters parameters; + /** A pointer to an array of selected art objects on which to perform + the operation. */ + AIArtHandle *fSelectedArt; + /** The number of members of the \c fSelectedArt array. */ + ai::int32 fSelectedArtCount; + /* output art after executing the effect*/ + AIArtHandle fOutputArt; + + /** Not used. Pass 0. */ + ai::int32 fAlertInfoID; + /** Initializes members to their default value. */ + void Init() + { + options.Init(); + parameters.Init(); + fSelectedArt = nullptr; + fSelectedArtCount = 0; + fAlertInfoID = 0; + fOutputArt = nullptr; + } +}; + + +/** The contents of a Pathfinder message. */ +struct AIPathfinderMessage { + /** The message data. */ + SPMessageData d; + /** How to perform the pathfinder operation. */ + AIPathfinderData pathfinderData; +}; + +/** Compound shape modes. These control how objects inside a compound + shape group interact with each other. Shapes are drawn from the bottom + object up. See \c #AIPathfinderSuite::SetShapeMode(). */ +enum AIShapeMode +{ + /** Applies the Unite effect to each succeeding object and the previous shape. */ + kAIShapeModeAdd = 0, + /** Applies the Back-minus-front effect to each succeeding object and the previous shape. */ + kAIShapeModeSubtract, + /** Applies the Intersect effect to each succeeding object and the previous shape. */ + kAIShapeModeIntersect, + /** Applies the Exclude effect to each succeeding object and the previous shape. */ + kAIShapeModeExclude +}; + + +/** For internal use. */ +struct PathfinderLiveEffectParamsStruct +{ + enum PathfinderEffectType + { + kUniteEffectType, + kIntersectEffectType, + kExcludeEffectType, + kBackMinusFrontEffectType, + kFrontMinusBackEffectType, + kDivideEffectType, + kOutlineEffectType, + kTrimEffectType, + kMergeEffectType, + kCropEffectType, + kHardEffectType, + kSoftEffectType, + kTrapEffectType, + } fEffectType; + AIOptions fOptions; + AIParameters fParameters; + /** Initializes members to their default value. */ + void Init() + { + fEffectType = kUniteEffectType; + fOptions.Init(); + fParameters.Init(); + } +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that perform operations on \e paths (art objects + of type \c #kPathArt), which apply various effects to selected path art. + The operations correspond to those available in the Pathfinder palette and Effect menu. + + Additional functions allow manipulation of \e compound \e shapes, plug-in groups to + which you can apply effects. See \c #AIPluginGroupSuite. In a compound shape group, + the bottom object in the group is drawn, then modified by the next object above it + according to the interaction mode (\c #AIShapeMode). Each succeeding object can be added to, + subtracted from, intersected with, or excluded from the drawing. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPathfinderSuite and \c #kAIPathfinderVersion. + */ +struct AIPathfinderSuite { + + /** Applies a Unite effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoUniteEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies an Intersect effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoIntersectEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies an Exclude effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoExcludeEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Back-minus-front effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoBackMinusFrontEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Front-minus-back effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoFrontMinusBackEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Divide effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoDivideEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Outline effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoOutlineEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Trim effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoTrimEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Merge effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoMergeEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Crop effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoCropEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Hard effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoHardEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Soft effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoSoftEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Applies a Trap effect to selected art. + @param data The structure containing the selected art and operation parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*DoTrapEffect) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Retrieves the parameters for the Hard effect pathfinder operation. + @param data [out] A structure in which to return the relevant parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*GetHardEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Retrieves the parameters for the Soft effect pathfinder operation. + @param data [out] A structure in which to return the relevant parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*GetSoftEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Retrieves the parameters for the Trap effect pathfinder operation. + @param data [out] A structure in which to return the relevant parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*GetTrapEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); + + /** Retrieves the global options for Pathfinder and Effect operations. + @param data [out] A structure in which to return the relevant parameters. + @param message Not used. Pass an object in which all fields are \c NULL. + */ + AIAPI AIErr (*GetGlobalOptions) ( AIPathfinderData *data, AIFilterMessage *message ); + + // New in AI 10.0: Compound Shapes + /** Retrieves the compound shape mode for an art plug-in group object. + (Note that this function returns a constant value, not an error code.) + @param art The art object, a plug-in group. + @return The shape mode value. + */ + AIAPI AIShapeMode (*GetShapeMode) ( AIArtHandle art ); + + /** Sets the compound shape mode for an art plug-in group object. This controls what + effects are applied as successive objects are drawn. + @param art The art object of type \c #kPluginArt. + @param The new shape mode value. + */ + AIAPI AIErr (*SetShapeMode) ( AIArtHandle art, AIShapeMode mode ); + + /** Creates a new, empty, compound shape at a specified position in the paint order + of the current document's art tree. Use the \c #AIPluginGroupSuite + to add objects to the group. + @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object for the paint order. + @param newArt [out] A buffer in which to return the new art object of type \c #kPluginArt. + */ + AIAPI AIErr (*NewCompoundShape) ( ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); + + /** Reports whether an art object is a compound shape. + @param art The art object. + @param isCompoundShape A buffer in which to return true if the art is a compound shape. + */ + AIAPI AIErr (*IsCompoundShape) ( AIArtHandle art, AIBoolean *isCompoundShape ); + + /** Expands a shape into a single path or compound path, by applying the Unite effect to + each component art object. + @param inOutArt [in, out] A buffer containing the shape art object, + in which to return the path object. + */ + AIAPI AIErr (*FlattenArt) ( AIArtHandle *inOutArt ); + +}; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPattern.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPattern.h index 0ae0d18..8b25c22 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPattern.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPattern.h @@ -1,274 +1,274 @@ -#ifndef __AIPattern__ -#define __AIPattern__ - -/* - * Name: AIPattern.h - * Author: - * Date: - * Purpose: Adobe Illustrator Pattern Fill Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2010 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif - - -#include "AIHeaderBegin.h" - - -/** @file AIPattern.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPatternSuite "AI Pattern Suite" -#define kAIPatternSuiteVersion10 AIAPI_VERSION(10) -#define kAIPatternSuiteVersion kAIPatternSuiteVersion10 -#define kAIPatternVersion kAIPatternSuiteVersion - -/** @ingroup Notifiers - See \c #AIPatternSuite */ -#define kAIArtPatternChangedNotifier "AI Art Pattern Changed Notifier" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Prototype for an iteration callback function. - See \c #AIPatternSuite::IteratePattern(). - @param art The current generated art object. - @return Nothing. - */ -typedef void (*AIPatternProcPtr)(AIArtHandle art); - -/** Pointer to a user-defined iteration callback procedure. */ -typedef AIPatternProcPtr AIPatternUPP; - -/** Convenience macro to invokes a developer-defined routine for an art object. */ -#define CallAIPatternProc(userRoutine, art) \ - (*(userRoutine))((art)) -/** Convenience macro to cast a developer-defined routine - to a pattern callback procedure. For example: - @verbatim -void MyUserProc(AIArtHandle art); -AIArtHandle group; - -AIPatternUPP myUserProcUPP = NewAIPatternProc(MyUserProc); -CallAIPatternProc(myUserProcUPP, group); - @endverbatim -*/ -#define NewAIPatternProc(userRoutine) \ - (AIPatternUPP)(userRoutine) - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that allow you to create, delete, and modify - \e patterns. Illustrator uses patterns to fill or stroke with a repeating tile - of art objects, which can be transformed before painting. - - \li A pattern \e definition is the artwork that defines the pattern tile. - It is a group of art objects where the backmost object is a square - that defines the size of the tile. The square must be parallel - to the X and Y axes. - - \li Instance parameters, in an \c #AIPatternStyle structure, define - how a pattern is used to paint a particular instance of a fill or stroke. - A transformation matrix is used to position the pattern for the - painting operation. - - Each document keeps a list of associated patterns. To copy a pattern from another - document into the current document, put the pattern object into an \c AIColor structure - and use \c #AIPathStyleSuite::RetargetForCurrentDoc(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPatternSuite and \c #kAIPatternVersion. - */ -typedef struct { - - /** Creates and initialized a new pattern object. Pass the returned reference - to \c #SetPatternName() and \c #SetPatternArt() to set the name and source art. - @param newPattern [out] A buffer in which to return the new pattern object. - */ - AIAPI AIErr (*NewPattern) ( AIPatternHandle *newPattern ); - - /** Deletes a pattern from the current document. If the pattern is used - for an objectís fill, the fill becomes black. - @param pattern The pattern object. - */ - AIAPI AIErr (*DeletePattern) ( AIPatternHandle pattern ); - - /** Creates a copy of the pattern source artwork and places it - into the current document at the center of the current view, - in the current layer and insertion group. This is the equivalent - of using the Paste command. - @param pattern The pattern object. - @return The error \c #kUntouchableLayerErr if the current layer or - current insertion group is locked or hidden. - */ - AIAPI AIErr (*GetPattern) ( AIPatternHandle pattern ); - - /** Collects the selected artwork in the current document and makes it the - source art for a pattern. - - The selected artwork must be usable as a pattern. - It can be any art object whose type is \c kGroupArt, as long as the - bottom object is a bounding rectangle with no fill and no stroke, - the size of the tile, parallel to the X and Y axes. - @param pattern The pattern object. - @return An error (non-zero) if the current selection is not usable as a pattern. - */ - AIAPI AIErr (*SetPattern) ( AIPatternHandle pattern ); - - /** Gets the number of patterns available to the current document. - Use with \c #GetNthPattern() to iterate through all patterns. - @param count [out] A buffer in which to return the number of patterns. - */ - AIAPI AIErr (*CountPatterns) ( ai::int32 *count ); - - /** Retrieves a pattern reference by index position. - Use with \c #CountPatterns() to iterate through all patterns. - @param n The 0-based position index. - @param pattern [out] A buffer in which to return the pattern object. - @return The error \c #kBadParameterErr if the index is out of range. - */ - AIAPI AIErr (*GetNthPattern) ( ai::int32 n, AIPatternHandle *pattern ); - - /** Retrieves the art object (of type \c #kGroupArt) that defines - the source art for a pattern. - @param pattern The pattern object. - @param art [out] A buffer in which to return the art object. - */ - AIAPI AIErr (*GetPatternArt) ( AIPatternHandle pattern, AIArtHandle *art ); - - /** Sets the source art for a pattern. - @param pattern The pattern object. - @param art The new source art, of type \c #kGroupArt. The backmost - object of the group must be a bounding rectangle with no fill and - no stroke, to be used in tiling the pattern. - @return An error (non-zero) if the specified art is not usable as a pattern. - */ - AIAPI AIErr (*SetPatternArt) ( AIPatternHandle pattern, AIArtHandle art ); - - /** Retrieves the name of a pattern. - @param pattern The pattern object. - @param name [out] A buffer in which to return the name string. - */ - AIAPI AIErr (*GetPatternName) ( AIPatternHandle pattern, ai::UnicodeString& name ); - - /** Sets the name of a pattern. Pattern names must be unique within the - global pattern list. - @param pattern The pattern object. - @param name The new name. - @see \c #NewPatternName() - */ - AIAPI AIErr (*SetPatternName) ( AIPatternHandle pattern, const ai::UnicodeString& name ); - - /** Retrieves a pattern by name. - @param name The name. - @param pattern [out] A buffer in which to return the pattern object. - @return The error \c #kNameNotFoundErr if there is no pattern - with the given name. - */ - AIAPI AIErr (*GetPatternByName) ( const ai::UnicodeString& name, AIPatternHandle *pattern ); - - /** Renders a path filled with a pattern. Breaks up the specified artwork into tiles - the size of its pattern, and, for each tile, generates any artwork needed to draw - that tile on the page. Passes the generated artwork to a procedure that you define - for further processing. - @param art The path art object. - @param style A path style with a pattern fill. - @param proc The developer-defined callback procedure. - */ - AIAPI AIErr (*IteratePattern) ( AIArtHandle art, AIPathStyle *style, AIPatternProcPtr proc ); - - /** Creates a unique name for a pattern, which can be passed to \c #SetPatternName(). - @param newName The base name. The string is modified in place to create a unique name. - \li If no existing pattern has this name, it is returned. - \li If a pattern already has this name, appends a numeric value to the string - or increments the current numeric end value to make the name unique. - */ - AIAPI AIErr (*NewPatternName) ( ai::UnicodeString& newName ); - - /** Retrieves the tile bounds for a pattern. - @param pattern The pattern object. - @param bounds [out] A buffer in which to return the bounding rectangle. - */ - AIAPI AIErr (*GetPatternTileBounds) ( AIPatternHandle pattern, AIRealRectPtr bounds ); - - /** Reports whether a pattern object references a valid pattern in the - current document. - (Note that this function returns a boolean value, not an error code.) - @param pattern The pattern object. - @return True if the pattern object is valid. - */ - AIAPI AIBoolean (*ValidatePattern) ( AIPatternHandle pattern ); - - AIAPI AIErr (*EnterPatternEditMode) (AIPatternHandle pattern); - - AIAPI AIErr (*EndPatternEditMode) ( AIPatternHandle pattern, AIBoolean updatePattern ); - - /** Reports whether PatternEditMode is currently active, either globally or on a specified pattern. - (Note that this function returns a boolean value, not an error code.) - @param patternUnderEdit [optional, in/out] if non-null and pointing to a non-null value on input, then - the function returns true only if that pattern is being edited - if null on input or pointing to a null value on input, then this - function returns true if ANY pattern is being edited, and returns - that pattern in this pointer - @param isolatedPatternArt [optional, out] if non-null, returns the art object that will be used to - create the new pattern definition upon exit from PatternEditMode - (May be either a plugin group or a group. If it is a plugin group, - the plugin group is responsible for knowing how to redefine the - pattern. If it is a group, the group will become the new pattern art.) - */ - AIAPI AIBoolean (*GetPatternEditMode) ( AIPatternHandle *patternUnderEdit, AIArtHandle *isolatedPatternArt ); - - -} AIPatternSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIPattern__ +#define __AIPattern__ + +/* + * Name: AIPattern.h + * Author: + * Date: + * Purpose: Adobe Illustrator Pattern Fill Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2010 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIPathStyle__ +#include "AIPathStyle.h" +#endif + + +#include "AIHeaderBegin.h" + + +/** @file AIPattern.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPatternSuite "AI Pattern Suite" +#define kAIPatternSuiteVersion10 AIAPI_VERSION(10) +#define kAIPatternSuiteVersion kAIPatternSuiteVersion10 +#define kAIPatternVersion kAIPatternSuiteVersion + +/** @ingroup Notifiers + See \c #AIPatternSuite */ +#define kAIArtPatternChangedNotifier "AI Art Pattern Changed Notifier" + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Prototype for an iteration callback function. + See \c #AIPatternSuite::IteratePattern(). + @param art The current generated art object. + @return Nothing. + */ +typedef void (*AIPatternProcPtr)(AIArtHandle art); + +/** Pointer to a user-defined iteration callback procedure. */ +typedef AIPatternProcPtr AIPatternUPP; + +/** Convenience macro to invokes a developer-defined routine for an art object. */ +#define CallAIPatternProc(userRoutine, art) \ + (*(userRoutine))((art)) +/** Convenience macro to cast a developer-defined routine + to a pattern callback procedure. For example: + @verbatim +void MyUserProc(AIArtHandle art); +AIArtHandle group; + +AIPatternUPP myUserProcUPP = NewAIPatternProc(MyUserProc); +CallAIPatternProc(myUserProcUPP, group); + @endverbatim +*/ +#define NewAIPatternProc(userRoutine) \ + (AIPatternUPP)(userRoutine) + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that allow you to create, delete, and modify + \e patterns. Illustrator uses patterns to fill or stroke with a repeating tile + of art objects, which can be transformed before painting. + + \li A pattern \e definition is the artwork that defines the pattern tile. + It is a group of art objects where the backmost object is a square + that defines the size of the tile. The square must be parallel + to the X and Y axes. + + \li Instance parameters, in an \c #AIPatternStyle structure, define + how a pattern is used to paint a particular instance of a fill or stroke. + A transformation matrix is used to position the pattern for the + painting operation. + + Each document keeps a list of associated patterns. To copy a pattern from another + document into the current document, put the pattern object into an \c AIColor structure + and use \c #AIPathStyleSuite::RetargetForCurrentDoc(). + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPatternSuite and \c #kAIPatternVersion. + */ +typedef struct { + + /** Creates and initialized a new pattern object. Pass the returned reference + to \c #SetPatternName() and \c #SetPatternArt() to set the name and source art. + @param newPattern [out] A buffer in which to return the new pattern object. + */ + AIAPI AIErr (*NewPattern) ( AIPatternHandle *newPattern ); + + /** Deletes a pattern from the current document. If the pattern is used + for an objectís fill, the fill becomes black. + @param pattern The pattern object. + */ + AIAPI AIErr (*DeletePattern) ( AIPatternHandle pattern ); + + /** Creates a copy of the pattern source artwork and places it + into the current document at the center of the current view, + in the current layer and insertion group. This is the equivalent + of using the Paste command. + @param pattern The pattern object. + @return The error \c #kUntouchableLayerErr if the current layer or + current insertion group is locked or hidden. + */ + AIAPI AIErr (*GetPattern) ( AIPatternHandle pattern ); + + /** Collects the selected artwork in the current document and makes it the + source art for a pattern. + + The selected artwork must be usable as a pattern. + It can be any art object whose type is \c kGroupArt, as long as the + bottom object is a bounding rectangle with no fill and no stroke, + the size of the tile, parallel to the X and Y axes. + @param pattern The pattern object. + @return An error (non-zero) if the current selection is not usable as a pattern. + */ + AIAPI AIErr (*SetPattern) ( AIPatternHandle pattern ); + + /** Gets the number of patterns available to the current document. + Use with \c #GetNthPattern() to iterate through all patterns. + @param count [out] A buffer in which to return the number of patterns. + */ + AIAPI AIErr (*CountPatterns) ( ai::int32 *count ); + + /** Retrieves a pattern reference by index position. + Use with \c #CountPatterns() to iterate through all patterns. + @param n The 0-based position index. + @param pattern [out] A buffer in which to return the pattern object. + @return The error \c #kBadParameterErr if the index is out of range. + */ + AIAPI AIErr (*GetNthPattern) ( ai::int32 n, AIPatternHandle *pattern ); + + /** Retrieves the art object (of type \c #kGroupArt) that defines + the source art for a pattern. + @param pattern The pattern object. + @param art [out] A buffer in which to return the art object. + */ + AIAPI AIErr (*GetPatternArt) ( AIPatternHandle pattern, AIArtHandle *art ); + + /** Sets the source art for a pattern. + @param pattern The pattern object. + @param art The new source art, of type \c #kGroupArt. The backmost + object of the group must be a bounding rectangle with no fill and + no stroke, to be used in tiling the pattern. + @return An error (non-zero) if the specified art is not usable as a pattern. + */ + AIAPI AIErr (*SetPatternArt) ( AIPatternHandle pattern, AIArtHandle art ); + + /** Retrieves the name of a pattern. + @param pattern The pattern object. + @param name [out] A buffer in which to return the name string. + */ + AIAPI AIErr (*GetPatternName) ( AIPatternHandle pattern, ai::UnicodeString& name ); + + /** Sets the name of a pattern. Pattern names must be unique within the + global pattern list. + @param pattern The pattern object. + @param name The new name. + @see \c #NewPatternName() + */ + AIAPI AIErr (*SetPatternName) ( AIPatternHandle pattern, const ai::UnicodeString& name ); + + /** Retrieves a pattern by name. + @param name The name. + @param pattern [out] A buffer in which to return the pattern object. + @return The error \c #kNameNotFoundErr if there is no pattern + with the given name. + */ + AIAPI AIErr (*GetPatternByName) ( const ai::UnicodeString& name, AIPatternHandle *pattern ); + + /** Renders a path filled with a pattern. Breaks up the specified artwork into tiles + the size of its pattern, and, for each tile, generates any artwork needed to draw + that tile on the page. Passes the generated artwork to a procedure that you define + for further processing. + @param art The path art object. + @param style A path style with a pattern fill. + @param proc The developer-defined callback procedure. + */ + AIAPI AIErr (*IteratePattern) ( AIArtHandle art, AIPathStyle *style, AIPatternProcPtr proc ); + + /** Creates a unique name for a pattern, which can be passed to \c #SetPatternName(). + @param newName The base name. The string is modified in place to create a unique name. + \li If no existing pattern has this name, it is returned. + \li If a pattern already has this name, appends a numeric value to the string + or increments the current numeric end value to make the name unique. + */ + AIAPI AIErr (*NewPatternName) ( ai::UnicodeString& newName ); + + /** Retrieves the tile bounds for a pattern. + @param pattern The pattern object. + @param bounds [out] A buffer in which to return the bounding rectangle. + */ + AIAPI AIErr (*GetPatternTileBounds) ( AIPatternHandle pattern, AIRealRectPtr bounds ); + + /** Reports whether a pattern object references a valid pattern in the + current document. + (Note that this function returns a boolean value, not an error code.) + @param pattern The pattern object. + @return True if the pattern object is valid. + */ + AIAPI AIBoolean (*ValidatePattern) ( AIPatternHandle pattern ); + + AIAPI AIErr (*EnterPatternEditMode) (AIPatternHandle pattern); + + AIAPI AIErr (*EndPatternEditMode) ( AIPatternHandle pattern, AIBoolean updatePattern ); + + /** Reports whether PatternEditMode is currently active, either globally or on a specified pattern. + (Note that this function returns a boolean value, not an error code.) + @param patternUnderEdit [optional, in/out] if non-null and pointing to a non-null value on input, then + the function returns true only if that pattern is being edited + if null on input or pointing to a null value on input, then this + function returns true if ANY pattern is being edited, and returns + that pattern in this pointer + @param isolatedPatternArt [optional, out] if non-null, returns the art object that will be used to + create the new pattern definition upon exit from PatternEditMode + (May be either a plugin group or a group. If it is a plugin group, + the plugin group is responsible for knowing how to redefine the + pattern. If it is a group, the group will become the new pattern art.) + */ + AIAPI AIBoolean (*GetPatternEditMode) ( AIPatternHandle *patternUnderEdit, AIArtHandle *isolatedPatternArt ); + + +} AIPatternSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPerspectiveGrid.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPerspectiveGrid.h index f86dfb8..b5451c0 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPerspectiveGrid.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPerspectiveGrid.h @@ -1,230 +1,230 @@ -#ifndef __AIPerspectiveGrid__ -#define __AIPerspectiveGrid__ - -/* -* Name: AIPerspectiveGrid.h -* Date: Started 2009 -* Purpose: Adobe Illustrator Perspective Grid suite. This suite lets -* clients query different settings from the currently defined -* Perspective Grid in the document. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -/******************************************************************************* -** -** Imports -** -**/ - -#include "AITypes.h" -#include "AIPerspectiveTransform.h" - -#include "AIHeaderBegin.h" - -/** @file AIPerspectiveGrid.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIPerspectiveGridSuite "AI Perspective Grid Suite" -#define kAIPerspectiveGridSuiteVersion AIAPI_VERSION(3) -#define kAIPerspectiveGridVersion kAIPerspectiveGridSuiteVersion - -/** @ingroup Notifiers - Sent when perspective grid parameters are changed. -*/ -#define kAIPerspectiveParamsChangedNotifier "AI Perspective Parameters Changed Notifier" - -/** @ingroup Notifiers - Sent when perspective grid visibility is changed. -*/ -#define kAIPerspectiveGridVisibilityChangedNotifier "AI Perspective Grid Visibility Changed Notifier" - - -/******************************************************************************* -** -** Types -** -**/ - -/** Type constants for perspective grid. - @see \c #AIPerspectiveGridSuite */ -enum PerspectiveGridType -{ - kInvalidGridType = 0, ///< Dummy value - kOnePointGridType, ///< One-point grid - kTwoPointGridType, ///< Two-point grid - kThreePointGridType ///< Three-point grid -}; - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites - This suite allows you to query and set parameters of the currently defined - perspective grid in a document. It can also be used to convert points between - artwork and perspective-grid coordinate systems.
- This example checks that a grid is currently defined, makes it visible, and - translates the origin point on the left grid plane into artboard coordinates. - @code - Fn() - { - AIBoolean defined = sAIPerspectiveGrid->IsGridDefined(); - AIErr status = sAIPerspectiveGrid->ShowGrid(true); - AIRealPoint pt = {0, 0}; - status = sAIPerspectiveGrid->PGPointToArtworkPoint(pt, kGridLeftPlane); - //The point is now in artwork coordinates. - } - @endcode - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPerspectiveGridSuite and \c #kAIPerspectiveGridVersion. -*/ -typedef struct { - - /** Reports whether the perspective grid is visible in the current document. - (Note that this function returns a Boolean value, not an error code.) - @return True if the perspective grid is visible. - */ - AIAPI AIBoolean (*IsGridVisible) (); - - /** Shows or hides the currently defined perspective grid in the current document. - @param flag [in] True to make the perspective grid visible, - false to hide it. - */ - AIAPI AIErr (*ShowGrid)(AIBoolean flag); - - /** Reports whether a perspective grid is defined in the current document. - (Note that this function returns a Boolean value, not an error code.) - @return True if a perspective grid is defined. - */ - AIAPI AIBoolean (*IsGridDefined)(); - - /** Reports whether the currently defined perspective grid in the current document is locked. - (Note that this function returns a Boolean value, not an error code.) - @return True if the perspective grid is locked. - */ - AIAPI AIBoolean (*IsGridLocked)(); - - /** Locks or unlocks the currently defined perspective grid in the current document. - @param flag [in] True to lock the perspective grid, false to unlock it. - */ - AIAPI AIErr (*LockGrid)(AIBoolean flag); - - /** Reports whether the station point of the currently defined perspective grid - in the current document is locked. - (Note that this function returns a Boolean value, not an error code.) - @return True if station point is locked. - */ - AIAPI AIBoolean (*IsGridStationPointLocked)(); - - /** Locks or unlocks the station point of the currently defined perspective grid - in the current document. - @param flag [in] True to lock the station point, false to unlock it. - */ - AIAPI AIErr (*LockGridStationPoint)(AIBoolean flag); - - /** Reports whether rulers are visible in the currently defined perspective grid - in the current document. - (Note that this function returns a Boolean value, not an error code.) - @return True if rulers are visible. - */ - AIAPI AIBoolean (*IsGridRulerVisible)(); - - /** Shows or hides the rulers in the currently defined perspective grid - in the current document. - @param flag [in] True to show rulers, false to hide them. - */ - AIAPI AIErr (*ShowGridRuler)(AIBoolean flag); - - /** Reports whether snap-to-grid is enabled in the currently defined perspective grid - in the current document. - (Note that this function returns a Boolean value, not an error code.) - @return True if snap-to-grid is enabled. - */ - AIAPI AIBoolean (*IsSnapToGridEnabled)(); - - /** Enables or disables snap-to-grid in the currently defined perspective grid - in the current document. - @param flag [in] True to enable, false to disable snap-to-grid. - */ - AIAPI AIErr (*SnapToGrid)(AIBoolean flag); - - /** Retrieves the snapping tolerance value of the currently defined perspective grid - in the current document. - @param snapTolerance [out] A buffer in which to return the snapping tolerance value. - */ - AIAPI AIErr (*GetGridSnapTolerance) (AIReal& snapTolerance); - - /** Sets the default perspective-grid preset (the two-point grid) as the active preset in the current document. - */ - AIAPI AIErr (*SetDefaultPreset)(); - - /** Converts global ruler coordinates into perspective grid coordinates. - @param pt [in/out] A buffer in which to pass the original point and return the converted point. - @param plane [in] The perspective-grid plane containing the point. - */ - AIAPI AIErr (*ArtworkPointToPGPoint) (AIRealPoint& pt, GridPlaneType plane); - - /** Converts perspective grid coordinates into global ruler coordinates. - @param pt [in/out] A buffer in which to pass the original point and return the converted point. - @param plane [in] The perspective-grid plane containing the point. - */ - AIAPI AIErr (*PGPointToArtworkPoint)(AIRealPoint& pt, GridPlaneType plane); - - /** Retrieves the ruler unit of currently defined perspective grid in the current document. - @param unit [out] A buffer in which to return the unit. - */ - AIAPI AIErr (*GetPGRulerUnit)(AIUnits& unit); - - /** Switches between multiple planes of the currently defined perspective grid - in the current document. - */ - AIAPI AIErr (*SwitchActivePlane) (); - - /** Sets the active plane of the currently defined perspective grid - in the current document. - @param gridPlane The plane to make active. - */ - AIAPI AIErr (*SetActivePlane) (GridPlaneType gridPlane); - - /** Retrieves the active plane of the currently defined perspective grid - in the current document. - @param out_gridPlaneType [out] A buffer in which to return the active plane constant. - */ - AIAPI AIErr (*GetActivePlane) (GridPlaneType& out_gridPlaneType); - - /** Retrieves the type of the currently defined perspective grid in the current document. - @param out_gridType [out] A buffer in which to return the type constant. - */ - AIAPI AIErr (*GetActiveGridType) (PerspectiveGridType& out_gridType); - - /** Switches between multiple planes of the currently defined perspective grid - in the current document, using keyboard shortcut keys. Call from a - drag loop to allow the user to switch planes using shortcut keys during the - drag operation. This is handled automatically by perspective-aware tools; - that is those that set the option \c #kToolWantsAlternateSelectionTool. - */ - AIAPI AIErr (*SwitchActivePlaneFromKB) (); - -} AIPerspectiveGridSuite; - -#include "AIHeaderEnd.h" - -#endif // __AIPerspectiveGrid__ +#ifndef __AIPerspectiveGrid__ +#define __AIPerspectiveGrid__ + +/* +* Name: AIPerspectiveGrid.h +* Date: Started 2009 +* Purpose: Adobe Illustrator Perspective Grid suite. This suite lets +* clients query different settings from the currently defined +* Perspective Grid in the document. +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2009 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +/******************************************************************************* +** +** Imports +** +**/ + +#include "AITypes.h" +#include "AIPerspectiveTransform.h" + +#include "AIHeaderBegin.h" + +/** @file AIPerspectiveGrid.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIPerspectiveGridSuite "AI Perspective Grid Suite" +#define kAIPerspectiveGridSuiteVersion AIAPI_VERSION(3) +#define kAIPerspectiveGridVersion kAIPerspectiveGridSuiteVersion + +/** @ingroup Notifiers + Sent when perspective grid parameters are changed. +*/ +#define kAIPerspectiveParamsChangedNotifier "AI Perspective Parameters Changed Notifier" + +/** @ingroup Notifiers + Sent when perspective grid visibility is changed. +*/ +#define kAIPerspectiveGridVisibilityChangedNotifier "AI Perspective Grid Visibility Changed Notifier" + + +/******************************************************************************* +** +** Types +** +**/ + +/** Type constants for perspective grid. + @see \c #AIPerspectiveGridSuite */ +enum PerspectiveGridType +{ + kInvalidGridType = 0, ///< Dummy value + kOnePointGridType, ///< One-point grid + kTwoPointGridType, ///< Two-point grid + kThreePointGridType ///< Three-point grid +}; + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites + This suite allows you to query and set parameters of the currently defined + perspective grid in a document. It can also be used to convert points between + artwork and perspective-grid coordinate systems.
+ This example checks that a grid is currently defined, makes it visible, and + translates the origin point on the left grid plane into artboard coordinates. + @code + Fn() + { + AIBoolean defined = sAIPerspectiveGrid->IsGridDefined(); + AIErr status = sAIPerspectiveGrid->ShowGrid(true); + AIRealPoint pt = {0, 0}; + status = sAIPerspectiveGrid->PGPointToArtworkPoint(pt, kGridLeftPlane); + //The point is now in artwork coordinates. + } + @endcode + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPerspectiveGridSuite and \c #kAIPerspectiveGridVersion. +*/ +typedef struct { + + /** Reports whether the perspective grid is visible in the current document. + (Note that this function returns a Boolean value, not an error code.) + @return True if the perspective grid is visible. + */ + AIAPI AIBoolean (*IsGridVisible) (); + + /** Shows or hides the currently defined perspective grid in the current document. + @param flag [in] True to make the perspective grid visible, + false to hide it. + */ + AIAPI AIErr (*ShowGrid)(AIBoolean flag); + + /** Reports whether a perspective grid is defined in the current document. + (Note that this function returns a Boolean value, not an error code.) + @return True if a perspective grid is defined. + */ + AIAPI AIBoolean (*IsGridDefined)(); + + /** Reports whether the currently defined perspective grid in the current document is locked. + (Note that this function returns a Boolean value, not an error code.) + @return True if the perspective grid is locked. + */ + AIAPI AIBoolean (*IsGridLocked)(); + + /** Locks or unlocks the currently defined perspective grid in the current document. + @param flag [in] True to lock the perspective grid, false to unlock it. + */ + AIAPI AIErr (*LockGrid)(AIBoolean flag); + + /** Reports whether the station point of the currently defined perspective grid + in the current document is locked. + (Note that this function returns a Boolean value, not an error code.) + @return True if station point is locked. + */ + AIAPI AIBoolean (*IsGridStationPointLocked)(); + + /** Locks or unlocks the station point of the currently defined perspective grid + in the current document. + @param flag [in] True to lock the station point, false to unlock it. + */ + AIAPI AIErr (*LockGridStationPoint)(AIBoolean flag); + + /** Reports whether rulers are visible in the currently defined perspective grid + in the current document. + (Note that this function returns a Boolean value, not an error code.) + @return True if rulers are visible. + */ + AIAPI AIBoolean (*IsGridRulerVisible)(); + + /** Shows or hides the rulers in the currently defined perspective grid + in the current document. + @param flag [in] True to show rulers, false to hide them. + */ + AIAPI AIErr (*ShowGridRuler)(AIBoolean flag); + + /** Reports whether snap-to-grid is enabled in the currently defined perspective grid + in the current document. + (Note that this function returns a Boolean value, not an error code.) + @return True if snap-to-grid is enabled. + */ + AIAPI AIBoolean (*IsSnapToGridEnabled)(); + + /** Enables or disables snap-to-grid in the currently defined perspective grid + in the current document. + @param flag [in] True to enable, false to disable snap-to-grid. + */ + AIAPI AIErr (*SnapToGrid)(AIBoolean flag); + + /** Retrieves the snapping tolerance value of the currently defined perspective grid + in the current document. + @param snapTolerance [out] A buffer in which to return the snapping tolerance value. + */ + AIAPI AIErr (*GetGridSnapTolerance) (AIReal& snapTolerance); + + /** Sets the default perspective-grid preset (the two-point grid) as the active preset in the current document. + */ + AIAPI AIErr (*SetDefaultPreset)(); + + /** Converts global ruler coordinates into perspective grid coordinates. + @param pt [in/out] A buffer in which to pass the original point and return the converted point. + @param plane [in] The perspective-grid plane containing the point. + */ + AIAPI AIErr (*ArtworkPointToPGPoint) (AIRealPoint& pt, GridPlaneType plane); + + /** Converts perspective grid coordinates into global ruler coordinates. + @param pt [in/out] A buffer in which to pass the original point and return the converted point. + @param plane [in] The perspective-grid plane containing the point. + */ + AIAPI AIErr (*PGPointToArtworkPoint)(AIRealPoint& pt, GridPlaneType plane); + + /** Retrieves the ruler unit of currently defined perspective grid in the current document. + @param unit [out] A buffer in which to return the unit. + */ + AIAPI AIErr (*GetPGRulerUnit)(AIUnits& unit); + + /** Switches between multiple planes of the currently defined perspective grid + in the current document. + */ + AIAPI AIErr (*SwitchActivePlane) (); + + /** Sets the active plane of the currently defined perspective grid + in the current document. + @param gridPlane The plane to make active. + */ + AIAPI AIErr (*SetActivePlane) (GridPlaneType gridPlane); + + /** Retrieves the active plane of the currently defined perspective grid + in the current document. + @param out_gridPlaneType [out] A buffer in which to return the active plane constant. + */ + AIAPI AIErr (*GetActivePlane) (GridPlaneType& out_gridPlaneType); + + /** Retrieves the type of the currently defined perspective grid in the current document. + @param out_gridType [out] A buffer in which to return the type constant. + */ + AIAPI AIErr (*GetActiveGridType) (PerspectiveGridType& out_gridType); + + /** Switches between multiple planes of the currently defined perspective grid + in the current document, using keyboard shortcut keys. Call from a + drag loop to allow the user to switch planes using shortcut keys during the + drag operation. This is handled automatically by perspective-aware tools; + that is those that set the option \c #kToolWantsAlternateSelectionTool. + */ + AIAPI AIErr (*SwitchActivePlaneFromKB) (); + +} AIPerspectiveGridSuite; + +#include "AIHeaderEnd.h" + +#endif // __AIPerspectiveGrid__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPerspectiveTransform.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPerspectiveTransform.h index 5b12dc8..924e2bb 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPerspectiveTransform.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPerspectiveTransform.h @@ -1,237 +1,237 @@ -#ifndef __AIPerspectiveTransform__ -#define __AIPerspectiveTransform__ - -/* -* Name: AIPerspectiveTransform.h -* Date: Started 2009 -* Purpose: Adobe Illustrator Perspective Transform suite. This suite lets -* clients project/reverse project point/arts in the currently defined -* perspective grid in the document. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIPerspectiveTransform.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPerspectiveTransformSuite "AI Perspective Transform Suite" -#define kAIPerspectiveTransformSuiteVersion AIAPI_VERSION(3) -#define kAIPerspectiveTransformVersion kAIPerspectiveTransformSuiteVersion - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Type constants for perspective grid plane. */ -enum GridPlaneType{ - kInvalidGridPlane = -2, ///< Invalid grid plane - kCurrentlyActivePlane = -1, ///< Currently active grid plane - kGridLeftPlane = 0, ///< Left plane - kGridRightPlane, ///< Right plane - kGridFloorPlane, ///< Floor plane - kGridNoPlane ///< No active plane -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to project or reverse-project points and art objects - using the currently defined perspective grid in the current document. -*/ - -typedef struct { - - /** Projects an art object into perspective, using the currently defined - perspective grid in the current document. - Breaks down the object into segments, and projects each of the points of - each segment into perspective. - (Note that this method returns a Boolean value, not an error code.) - @param art [in, out] The art object, modified in place on success. - @param activePlane The plane in which to project the art. - @param planeOffset A pointer to the plane offset, or NULL to use the current plane offset. - @return True on success. - */ - AIAPI AIBoolean (*PutInPerspective) (AIArtHandle art, GridPlaneType activePlane, AIReal* planeOffset); - - /** Reverse-projects art from perspective. Replaces the passed object handle with - the handle to the original art object that was projected into perspective. - (Note that this method returns a Boolean value, not an error code.) - @param art [in, out] The art object, modified in place on success. - @return True on success. - */ - AIAPI AIBoolean (*GetOriginalArt)(AIArtHandle art); - - /** Reverse-projects a point from perspective. Replaces the passed point with - the original point on the canvas that was projected into perspective. - (Note that this method returns a Boolean value, not an error code.) - @param point [in, out] A buffer that supplies the original point, and that returns the modified point. - @param activePlane The plane on which the point was projected. - @param planeOffset A pointer to the plane offset, or NULL to use the current plane offset. - @return True on success. - */ - AIAPI AIBoolean (*GetOriginalPoint) (AIRealPoint& point, GridPlaneType activePlane, AIReal* planeOffset); - - /** Projects a point into perspective. Replaces the passed point, which is assumed to be in - normal 2D space, with the point projected onto the given plane in the current perspective grid - of the current document. - (Note that this method returns a Boolean value, not an error code.) - @param point [in, out] A buffer that supplies the original point, and that returns the modified point. - @param activePlane The plane onto which to project the point. - @param planeOffset A pointer to the plane offset, or NULL to use the current plane offset. - @return True on success. - */ - AIAPI AIBoolean (*GetPerspectivePoint) (AIRealPoint& point, GridPlaneType activePlane, AIReal* planeOffset); - - /** Transforms art into perspective on the current perspective grid - of the current document, using the supplied transformation matrix. - (Note that this method returns a Boolean value, not an error code.) - @param art The art object. - @param transform The transformation matrix to be applied to the original dimensions of the art. - @return True on success. - */ - AIAPI AIBoolean (*ApplyTransformInPerspective) (AIArtHandle art, AIRealMatrix transform); - - /** Reports whether art is currently in perspective. - (Note that this method returns a Boolean value, not an error code.) - @param art The art object. - @return True if the art is in perspective. - */ - AIAPI AIBoolean (*IsArtInPerspective) (AIArtHandle art); - - /** Releases art from the perspective grid, preserving the appearance. -
  • For perspective plug-in objects (created for putting text and symbols in perspective), - replaces the plug-in art with the result art, and deletes the plug-in art from the artwork tree. - You will no longer be able to edit text or symbols associated with this perspective plug-in object.
  • -
  • For a group or container, the group and all its children are released from the perspective grid recursively.
- @param art The art object, or NULL to operate on current selection. - */ - AIAPI AIErr (*ReleaseArtFromPerspective) (AIArtHandle art); - - /** Attaches art to the perspective grid, preserving the appearance. - For a group or container, the group and all its children are recursively attached to the current active - plane of the perspective grid. - @param art The art object, or NULL to operate on current selection. - */ - AIAPI AIErr (*AttachArtToPerspective) (AIArtHandle art); - - /** Reports whether art can be attached to the perspective grid. - (Note that this method returns a Boolean value, not an error code.) - @param art The art object, or NULL to operate on current selection. - @return True if the art can be attached to the perspective grid. - */ - AIAPI AIBoolean (*CanAttachToPerspective) (AIArtHandle art); - - /** Reports whether art can be released from the perspective grid. - (Note that this method returns a Boolean value, not an error code.) - @param art The art object, or NULL to operate on current selection. - @return True if the art can be released from the perspective grid. - */ - AIAPI AIBoolean (*CanReleaseFromPerspective) (AIArtHandle art); - - /** Reports whether art is a perspective plug-in group object, created for putting - text and symbols in perspective. - (Note that this method returns a Boolean value, not an error code.) - @param art The art object. - @return True if the art is a perspective plug-in group object - */ - AIAPI AIBoolean (*IsPerspectivePluginObject) (AIArtHandle art); - - /** Retrieves the type of art contained in a given perspective plug-in object. - Currently, only Text and Symbol art objects can be placed in a perspective plug-in object. - @param art The perspective plug-in object. - @param type [out] A buffer in which to return the type of perspective object, - one of \c #kTextFrameArt or \c #kSymbolArt. - */ - AIAPI AIErr (*GetTypeOfPerspectiveObject)(AIArtHandle art, ai::int16 &type); - - /** Reports whether user is currently editing the original art (text or symbol) - of a given perspective plug-in object. - (Note that this method returns a Boolean value, not an error code.) - @param art The perspective plug-in art object. - @return True if the original art is being edited. - */ - AIAPI AIBoolean (*IsPerspectiveObjectEditingOriginal)(AIArtHandle art); - - /** Places art in a given perspective plane at a given position. - @param art The art object. - @param startPoint Start point of a placement drag operation. - @param endPoint End point of a placement drag operation. - @param plane The plane in which to place the art object. - */ - AIAPI AIErr (*PlaceArtInPerspective) (AIArtHandle art, AIRealPoint startPoint, AIRealPoint endPoint, GridPlaneType plane); - - /** Retrieves the offset of art on the perspective plane on which it is placed. - (Note that this method returns a numeric value, not an error code.) - @param art The art object in perspective. - @return The offset value. - */ - AIAPI AIReal (*GetObjectPlaneOffset) (AIArtHandle art); - - /** Retrieves the perspective plane for art that is currently in perspective. - @param art The art object in perspective. - @param objectPlane [out] A buffer in which to return the plane on which the art object is placed. - */ - AIAPI AIErr (*GetObjectPlane) (AIArtHandle art, GridPlaneType *objectPlane); - - - /** This method places two points into perspective with one another on a given plane. - If needed, modifies the point values in place; for example, if the end point goes - beyond the vanishing point. You can choose to return the offset used to perform - the transformation, which reflects the depth of the plane. - @param startPt [in/out] Document coordinates of start point. Modified in place if necessary. - @param endPt [in/out] Document coordinates of end point. Modified in place if necessary. - @param gridPlane [in] The grid plane. - @param offset [optional, out] A buffer in which to return the offset used for the transformation. - */ - AIAPI AIErr (*ConstrainPtsInPlane)(AIRealPoint& startPt, AIRealPoint& endPt, GridPlaneType& gridPlane, AIReal *offset); - - /** Reports whether selected objects are at different offsets on the perspective grid plane. - @param isMultiOffsetSelection [out] A buffer in which to return true if selected objects are at different offsets. - */ - AIAPI AIErr (*IsSelectionInMultipleOffset)(AIBoolean* isMultiOffsetSelection); - - /** Retrieves the perspective bounds from a perspective art object. The perspective grid - scale is not considered in the returned bounds. - @param art The perspective art object. - @param flags Bit flags that specify which bounds to return, a logical OR of \c #AIArtBoundsOptions constants. - @param bounds [out] A buffer in which to return the perspective art bounds. - */ - AIAPI AIErr (*GetOriginalArtBounds) (AIArtHandle art, ai::int32 flags, AIRealRect& bounds); - -} AIPerspectiveTransformSuite; - -#include "AIHeaderEnd.h" - -#endif // __AIPerspectiveTransform__ +#ifndef __AIPerspectiveTransform__ +#define __AIPerspectiveTransform__ + +/* +* Name: AIPerspectiveTransform.h +* Date: Started 2009 +* Purpose: Adobe Illustrator Perspective Transform suite. This suite lets +* clients project/reverse project point/arts in the currently defined +* perspective grid in the document. +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2009 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIPerspectiveTransform.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPerspectiveTransformSuite "AI Perspective Transform Suite" +#define kAIPerspectiveTransformSuiteVersion AIAPI_VERSION(3) +#define kAIPerspectiveTransformVersion kAIPerspectiveTransformSuiteVersion + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Type constants for perspective grid plane. */ +enum GridPlaneType{ + kInvalidGridPlane = -2, ///< Invalid grid plane + kCurrentlyActivePlane = -1, ///< Currently active grid plane + kGridLeftPlane = 0, ///< Left plane + kGridRightPlane, ///< Right plane + kGridFloorPlane, ///< Floor plane + kGridNoPlane ///< No active plane +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite allows you to project or reverse-project points and art objects + using the currently defined perspective grid in the current document. +*/ + +typedef struct { + + /** Projects an art object into perspective, using the currently defined + perspective grid in the current document. + Breaks down the object into segments, and projects each of the points of + each segment into perspective. + (Note that this method returns a Boolean value, not an error code.) + @param art [in, out] The art object, modified in place on success. + @param activePlane The plane in which to project the art. + @param planeOffset A pointer to the plane offset, or NULL to use the current plane offset. + @return True on success. + */ + AIAPI AIBoolean (*PutInPerspective) (AIArtHandle art, GridPlaneType activePlane, AIReal* planeOffset); + + /** Reverse-projects art from perspective. Replaces the passed object handle with + the handle to the original art object that was projected into perspective. + (Note that this method returns a Boolean value, not an error code.) + @param art [in, out] The art object, modified in place on success. + @return True on success. + */ + AIAPI AIBoolean (*GetOriginalArt)(AIArtHandle art); + + /** Reverse-projects a point from perspective. Replaces the passed point with + the original point on the canvas that was projected into perspective. + (Note that this method returns a Boolean value, not an error code.) + @param point [in, out] A buffer that supplies the original point, and that returns the modified point. + @param activePlane The plane on which the point was projected. + @param planeOffset A pointer to the plane offset, or NULL to use the current plane offset. + @return True on success. + */ + AIAPI AIBoolean (*GetOriginalPoint) (AIRealPoint& point, GridPlaneType activePlane, AIReal* planeOffset); + + /** Projects a point into perspective. Replaces the passed point, which is assumed to be in + normal 2D space, with the point projected onto the given plane in the current perspective grid + of the current document. + (Note that this method returns a Boolean value, not an error code.) + @param point [in, out] A buffer that supplies the original point, and that returns the modified point. + @param activePlane The plane onto which to project the point. + @param planeOffset A pointer to the plane offset, or NULL to use the current plane offset. + @return True on success. + */ + AIAPI AIBoolean (*GetPerspectivePoint) (AIRealPoint& point, GridPlaneType activePlane, AIReal* planeOffset); + + /** Transforms art into perspective on the current perspective grid + of the current document, using the supplied transformation matrix. + (Note that this method returns a Boolean value, not an error code.) + @param art The art object. + @param transform The transformation matrix to be applied to the original dimensions of the art. + @return True on success. + */ + AIAPI AIBoolean (*ApplyTransformInPerspective) (AIArtHandle art, AIRealMatrix transform); + + /** Reports whether art is currently in perspective. + (Note that this method returns a Boolean value, not an error code.) + @param art The art object. + @return True if the art is in perspective. + */ + AIAPI AIBoolean (*IsArtInPerspective) (AIArtHandle art); + + /** Releases art from the perspective grid, preserving the appearance. +
  • For perspective plug-in objects (created for putting text and symbols in perspective), + replaces the plug-in art with the result art, and deletes the plug-in art from the artwork tree. + You will no longer be able to edit text or symbols associated with this perspective plug-in object.
  • +
  • For a group or container, the group and all its children are released from the perspective grid recursively.
+ @param art The art object, or NULL to operate on current selection. + */ + AIAPI AIErr (*ReleaseArtFromPerspective) (AIArtHandle art); + + /** Attaches art to the perspective grid, preserving the appearance. + For a group or container, the group and all its children are recursively attached to the current active + plane of the perspective grid. + @param art The art object, or NULL to operate on current selection. + */ + AIAPI AIErr (*AttachArtToPerspective) (AIArtHandle art); + + /** Reports whether art can be attached to the perspective grid. + (Note that this method returns a Boolean value, not an error code.) + @param art The art object, or NULL to operate on current selection. + @return True if the art can be attached to the perspective grid. + */ + AIAPI AIBoolean (*CanAttachToPerspective) (AIArtHandle art); + + /** Reports whether art can be released from the perspective grid. + (Note that this method returns a Boolean value, not an error code.) + @param art The art object, or NULL to operate on current selection. + @return True if the art can be released from the perspective grid. + */ + AIAPI AIBoolean (*CanReleaseFromPerspective) (AIArtHandle art); + + /** Reports whether art is a perspective plug-in group object, created for putting + text and symbols in perspective. + (Note that this method returns a Boolean value, not an error code.) + @param art The art object. + @return True if the art is a perspective plug-in group object + */ + AIAPI AIBoolean (*IsPerspectivePluginObject) (AIArtHandle art); + + /** Retrieves the type of art contained in a given perspective plug-in object. + Currently, only Text and Symbol art objects can be placed in a perspective plug-in object. + @param art The perspective plug-in object. + @param type [out] A buffer in which to return the type of perspective object, + one of \c #kTextFrameArt or \c #kSymbolArt. + */ + AIAPI AIErr (*GetTypeOfPerspectiveObject)(AIArtHandle art, ai::int16 &type); + + /** Reports whether user is currently editing the original art (text or symbol) + of a given perspective plug-in object. + (Note that this method returns a Boolean value, not an error code.) + @param art The perspective plug-in art object. + @return True if the original art is being edited. + */ + AIAPI AIBoolean (*IsPerspectiveObjectEditingOriginal)(AIArtHandle art); + + /** Places art in a given perspective plane at a given position. + @param art The art object. + @param startPoint Start point of a placement drag operation. + @param endPoint End point of a placement drag operation. + @param plane The plane in which to place the art object. + */ + AIAPI AIErr (*PlaceArtInPerspective) (AIArtHandle art, AIRealPoint startPoint, AIRealPoint endPoint, GridPlaneType plane); + + /** Retrieves the offset of art on the perspective plane on which it is placed. + (Note that this method returns a numeric value, not an error code.) + @param art The art object in perspective. + @return The offset value. + */ + AIAPI AIReal (*GetObjectPlaneOffset) (AIArtHandle art); + + /** Retrieves the perspective plane for art that is currently in perspective. + @param art The art object in perspective. + @param objectPlane [out] A buffer in which to return the plane on which the art object is placed. + */ + AIAPI AIErr (*GetObjectPlane) (AIArtHandle art, GridPlaneType *objectPlane); + + + /** This method places two points into perspective with one another on a given plane. + If needed, modifies the point values in place; for example, if the end point goes + beyond the vanishing point. You can choose to return the offset used to perform + the transformation, which reflects the depth of the plane. + @param startPt [in/out] Document coordinates of start point. Modified in place if necessary. + @param endPt [in/out] Document coordinates of end point. Modified in place if necessary. + @param gridPlane [in] The grid plane. + @param offset [optional, out] A buffer in which to return the offset used for the transformation. + */ + AIAPI AIErr (*ConstrainPtsInPlane)(AIRealPoint& startPt, AIRealPoint& endPt, GridPlaneType& gridPlane, AIReal *offset); + + /** Reports whether selected objects are at different offsets on the perspective grid plane. + @param isMultiOffsetSelection [out] A buffer in which to return true if selected objects are at different offsets. + */ + AIAPI AIErr (*IsSelectionInMultipleOffset)(AIBoolean* isMultiOffsetSelection); + + /** Retrieves the perspective bounds from a perspective art object. The perspective grid + scale is not considered in the returned bounds. + @param art The perspective art object. + @param flags Bit flags that specify which bounds to return, a logical OR of \c #AIArtBoundsOptions constants. + @param bounds [out] A buffer in which to return the perspective art bounds. + */ + AIAPI AIErr (*GetOriginalArtBounds) (AIArtHandle art, ai::int32 flags, AIRealRect& bounds); + +} AIPerspectiveTransformSuite; + +#include "AIHeaderEnd.h" + +#endif // __AIPerspectiveTransform__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPhotoshopPrefs.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPhotoshopPrefs.h index d57a828..04274a2 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPhotoshopPrefs.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPhotoshopPrefs.h @@ -1,271 +1,271 @@ -#ifndef __AIPhotoshopPrefs_h__ -#define __AIPhotoshopPrefs_h__ -/* - * Name: AIPhotoshopPrefs.h - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1996-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/* - A subset of the definitions found in the Preferences.h, PhotoshopDefs.h, - and ColorModes.h files, which were taken from the Illustrator 9 PlugInDev - source tree. - - ...PluginDev:PhotoshopFileFormat:Src:New:Preferences.h - ...PluginDev:PhotoshopFileFormat:Src:PhotoshopDefs.h - ...PluginDev:PhotoshopFileFormat:Src:New:ColorModes.h - - This subset contains only the definitions needed to call the Photoshop - export plug-in from another plug-in, using the public SDK interfaces. - - 2/21/00 Andy Bachorski - - - Writers: - - (afb) Andy Bachorski - - Change History (most recent first): - - 9/14/01 afb Add missing #include of AIRaster.h (for definition of uint8). - 4/23/01 mgupta Added PSD prefixes to most of the constants - - < > 3/22/01 afb Updated to match definitions in Preferences.h - -*/ - - -#include "AIRaster.h" - -#include "AIHeaderBegin.h" - -// ------------------------------------------------------------------ -// mgupta, moved from PhotoshopDefs.h -// Color space constants for the menu items -// and preferences. -const ai::uint8 kRasterizeToRGB = 1; -const ai::uint8 kRasterizeToCMYK = 2; -const ai::uint8 kRasterizeToGrayscale = 3; -const ai::uint8 kRasterizeToBitmap = 4; - - -// ------------------------------------------------------------------ -// mgupta, moved from ColorModes.h -// These are the output color spaces -// that a user can choose, for writing -// his psd files. These values are -// button id's in the user interface: - -enum PSDPluginColorMode // ex. PluginColorMode -{ - ePluginRGB = kRasterizeToRGB, - ePluginCMYK = kRasterizeToCMYK, - ePluginGrayscale = kRasterizeToGrayscale, - ePluginDummy = 0xFFFFFFFF -}; //omit unsupported modes. - -enum PSDExportFormat -{ - eTextNotLive = 0, // Export Text As Raster.Scripting plug-in may use this flag. - eUnsupportedTextFormat = eTextNotLive, // the text can not be exported in available export formats so export as raster. - ePhotoshop8 = 1 << 0, - ePhotoshop6 = 1 << 1 -}; - -enum AntiAliasOptions -{ - ANTIALIAS_NONE = 0, - ANTIALIAS_AGM = 1, - ANTIALIAS_SUPERSAMPLING -}; - -// ------------------------------------------------------------------------------------ -// Grace 5/21/98 -// Move from Preferences.cpp -// -// mgupta April 4, 2001 -// Added default defines - -#define kPSDPreferencePrefix "PhotoshopFileFormat" - -#define kPSDFormatName "Photoshop psd" -#define kPSDExportFormatName "Photoshop PSD Export" -#define kPSDImportFormatName "Photoshop PSD Import" -#define kPSDFormatExtn "psd, pdd" - -//rbansal 20010521 Adding the keys for Import Options -#define kPSDImportOption "PSD Import Option" -#define kDefaultPSDImportOption 1 //rbansal 20010528 dfaukt option change to Layers to Objects - -#define kPSDImportImageMaps "ImageMaps" -#define kDefaultPSDImportImageMaps true - -#define kPSDImportSlices "Slices" -#define kDefaultPSDImportSlices true -//end import slices - -#define kPSDImportHiddenLayers "HiddenLayers" -#define kDefaultPSDImportHiddenLayers false - -//Layer Comps -#define kPSDShowPreview "ShowPreview" -#define kDefaultPSDShowPreview true - -#define kPSDSelectedLayerCompID "SelectedLayerCompID" -#define kPSDDefaultSelectedLayerCompID -1 - -#define kPSDSelectedLayerCompName "SelectedLayerCompName" -#define kPSDDefaultLayerCompName "" - -#define kPSDAntiAliasPref "AntiAlias" -#define kPSDDefaultAntiAliasPref ANTIALIAS_SUPERSAMPLING - -#define kPSDColorModelPref "ColorModel" -#define kPSDDefaultColorModelPref ePluginRGB - -#define kPSDExportFormatPref "ExportFormat" -#define kPSDDefaultExportFormatPref ePhotoshop8 - -#define kPSDDPIPref "DPI" -#define kPSDDefaultDPIPref _ShortToAIReal(150) - -// mgupta, 04/27/01 -// This item will store the custom value the user may have entered -// ABTS Bug #426012 -#define kPSDOtherDPIPref "CustomDpi" - -#define kPSDWriteLayersPref "WriteLayers" -#define kPSDDefaultWriteLayerPref true - -#define kPSDWhichProfile "WhichProfile" - -#define kPSDHiddenLayersPref "HiddenLayers" -#define kPSDDefaultHiddenLayersPref false - -#define kPSDWriteNestedLayersAsLayersPref "NestedLayers" -#define kPSDDefaultWriteNestedLayersPref true - -#define kPSDLiveTextPref "LiveText" -#define kPSDDefaultLiveTextPref true - -#define kPSDWriteSlicesPref "Slices" -#define kPSDDefaultWriteSlicesPref true - -#define kPSDWriteImageMapsPref "ImageMaps" -#define kPSDDefaultImageMapsPref true - -#define kPSDWriteCompoundShapesPref "CompoundShapes" -#define kPSDDefaultCompoundShapesPref true - -#define kPSDWriteMaxEditabilityPref "Maximize Ediability" -#define kPSDDefaultMaxEditabilityPref true - -// [mgupta: 5/31/2001] ABTS #431842 -#define kPSDNoHiddenLayersWarning "NoHiddenLayersWarning" -#define kPSDNo100LayersWarning "No100LayersWarning" -#define kPSDNoImageMapsWarning "NoImageMapsWarning" -#define kPSDNoSelectiveMergeWarning "NoSelectiveMergeWarning" - -#define kPSDSuppressUnsupportedDepthWarning "SuppressUnsupportedDepthWarning" -#define kPSDApplyPixelAspectRatio "PixelAspectRatio" - -#define kPSDDefaultTurnOffWarningPref false - -// [hsuri: 5/12/2012] Option to preserve spot color information -#define kPSDPreserveSotColors "PreserveSpotColors" - -#define kPSDSpotOptionsApplyToAll "SpotOptionApplyToAll" -#define kPSDSpotOptions "SpotOptions" -#define kPSDSuppressSwatchConflictWarning "SuppressSwatchConflictWarning" - -#define kPSDSuppressNonSquarePixelWarning "SuppressNonSquarePixelWarning" -#define kPSDSuppressLibrarySpotInkWarning "LibrarySpotInkWarning" -#define kAIPSScriptCallSelector "AI Script" -// ------------------------------------------------------------------------------------ - -struct PSDExportPrefs //ex. PluginPrefs -{ - ai::int32 mWhichProfile; - AntiAliasOptions mAntiAlias; - AIBoolean mWriteLayers; - AIReal mResolution; // dots per inch - PSDPluginColorMode mColorModel; - AIBoolean mIncludeHiddenLayers; - AIBoolean mWriteNestedLayersAsLayers; //nchandra - AIBoolean mLiveText; - AIBoolean mNo100LayersWarning; - AIBoolean mNoImageMapsWarning; - AIBoolean bHasSelectiveMerge; - AIBoolean mNoSelectiveMergeWarning; //Ac. - AIBoolean mNoHiddenLayersWarning; - AIBoolean mWriteSlices; //mgupta++ - AIBoolean mWriteImageMaps; //mgupta++ - AIBoolean mWriteCompoundShapes; //mgupta++ - AIReal mOtherResolution; //mgupta++ - ai::int32 mExportFormat; - AIBoolean mMaxEditability; - AIBoolean mPreserveSpotColors; -}; - - -// nchandra: 20000212 Added this enum for the import types -// retain transparency is coupled with the psLayersToFlat -enum PSDImportOptions -{ - noImport = 0, - psLayersToAIObjects = 1, - psLayersToAIFlat = 2 -}; - -enum PSDUpdateLinkOptions -{ - psKeepLayerVisibilityOverrides = 0, - psUsePhotoshopLayerVisibility = 1, - psUpdateLinkNotApplicable = 2 -}; - -struct PSDImportPrefs -{ - //Actual import parameters - PSDImportOptions mImportOption; - PSDUpdateLinkOptions mUpdateLinkOption; - AIBoolean bImportImageMaps; - AIBoolean bImportSlices; - - //previous values. used in conjunction with current import operation to - //determine enabling/disabling of controls in import dialog box - AIBoolean mHasReadableLayers; - AIBoolean bPreviousImportImageMaps; - AIBoolean bPreviousImportSlices; - PSDImportOptions mPreviousOption; - AIBoolean mDontChangePreviousIMapImportStatus; - AIBoolean mDontChangePreviousSliceImportStatus; - AIBoolean mDontChangePreviousHiddenLayerImportStatus; - - AIBoolean bNotDragDrop; - AIBoolean mColorModeMismatch; - - AIBoolean bApplyPixelAspectRatioCorrection; - AIBoolean bCBPixelAspectRatioChecked; - AIReal mPixelAspectRatio; - - AIBoolean bShowLayerCompsPreview; - AIBoolean bImportHiddenLayers; - AIBoolean bPreviousImportHiddenLayers; - AIBoolean bReadImageDone; - ai::int32 iSelectedLayerCompIndex; -}; - -#include "AIHeaderEnd.h" - -#endif //__AIPhotoshopPrefs_h__ +#ifndef __AIPhotoshopPrefs_h__ +#define __AIPhotoshopPrefs_h__ +/* + * Name: AIPhotoshopPrefs.h + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1996-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/* + A subset of the definitions found in the Preferences.h, PhotoshopDefs.h, + and ColorModes.h files, which were taken from the Illustrator 9 PlugInDev + source tree. + + ...PluginDev:PhotoshopFileFormat:Src:New:Preferences.h + ...PluginDev:PhotoshopFileFormat:Src:PhotoshopDefs.h + ...PluginDev:PhotoshopFileFormat:Src:New:ColorModes.h + + This subset contains only the definitions needed to call the Photoshop + export plug-in from another plug-in, using the public SDK interfaces. + + 2/21/00 Andy Bachorski + + + Writers: + + (afb) Andy Bachorski + + Change History (most recent first): + + 9/14/01 afb Add missing #include of AIRaster.h (for definition of uint8). + 4/23/01 mgupta Added PSD prefixes to most of the constants + + < > 3/22/01 afb Updated to match definitions in Preferences.h + +*/ + + +#include "AIRaster.h" + +#include "AIHeaderBegin.h" + +// ------------------------------------------------------------------ +// mgupta, moved from PhotoshopDefs.h +// Color space constants for the menu items +// and preferences. +const ai::uint8 kRasterizeToRGB = 1; +const ai::uint8 kRasterizeToCMYK = 2; +const ai::uint8 kRasterizeToGrayscale = 3; +const ai::uint8 kRasterizeToBitmap = 4; + + +// ------------------------------------------------------------------ +// mgupta, moved from ColorModes.h +// These are the output color spaces +// that a user can choose, for writing +// his psd files. These values are +// button id's in the user interface: + +enum PSDPluginColorMode // ex. PluginColorMode +{ + ePluginRGB = kRasterizeToRGB, + ePluginCMYK = kRasterizeToCMYK, + ePluginGrayscale = kRasterizeToGrayscale, + ePluginDummy = 0xFFFFFFFF +}; //omit unsupported modes. + +enum PSDExportFormat +{ + eTextNotLive = 0, // Export Text As Raster.Scripting plug-in may use this flag. + eUnsupportedTextFormat = eTextNotLive, // the text can not be exported in available export formats so export as raster. + ePhotoshop8 = 1 << 0, + ePhotoshop6 = 1 << 1 +}; + +enum AntiAliasOptions +{ + ANTIALIAS_NONE = 0, + ANTIALIAS_AGM = 1, + ANTIALIAS_SUPERSAMPLING +}; + +// ------------------------------------------------------------------------------------ +// Grace 5/21/98 +// Move from Preferences.cpp +// +// mgupta April 4, 2001 +// Added default defines + +#define kPSDPreferencePrefix "PhotoshopFileFormat" + +#define kPSDFormatName "Photoshop psd" +#define kPSDExportFormatName "Photoshop PSD Export" +#define kPSDImportFormatName "Photoshop PSD Import" +#define kPSDFormatExtn "psd,psb,pdd" + +//rbansal 20010521 Adding the keys for Import Options +#define kPSDImportOption "PSD Import Option" +#define kDefaultPSDImportOption 1 //rbansal 20010528 dfaukt option change to Layers to Objects + +#define kPSDImportImageMaps "ImageMaps" +#define kDefaultPSDImportImageMaps true + +#define kPSDImportSlices "Slices" +#define kDefaultPSDImportSlices true +//end import slices + +#define kPSDImportHiddenLayers "HiddenLayers" +#define kDefaultPSDImportHiddenLayers false + +//Layer Comps +#define kPSDShowPreview "ShowPreview" +#define kDefaultPSDShowPreview true + +#define kPSDSelectedLayerCompID "SelectedLayerCompID" +#define kPSDDefaultSelectedLayerCompID -1 + +#define kPSDSelectedLayerCompName "SelectedLayerCompName" +#define kPSDDefaultLayerCompName "" + +#define kPSDAntiAliasPref "AntiAlias" +#define kPSDDefaultAntiAliasPref ANTIALIAS_SUPERSAMPLING + +#define kPSDColorModelPref "ColorModel" +#define kPSDDefaultColorModelPref ePluginRGB + +#define kPSDExportFormatPref "ExportFormat" +#define kPSDDefaultExportFormatPref ePhotoshop8 + +#define kPSDDPIPref "DPI" +#define kPSDDefaultDPIPref _ShortToAIReal(150) + +// mgupta, 04/27/01 +// This item will store the custom value the user may have entered +// ABTS Bug #426012 +#define kPSDOtherDPIPref "CustomDpi" + +#define kPSDWriteLayersPref "WriteLayers" +#define kPSDDefaultWriteLayerPref true + +#define kPSDWhichProfile "WhichProfile" + +#define kPSDHiddenLayersPref "HiddenLayers" +#define kPSDDefaultHiddenLayersPref false + +#define kPSDWriteNestedLayersAsLayersPref "NestedLayers" +#define kPSDDefaultWriteNestedLayersPref true + +#define kPSDLiveTextPref "LiveText" +#define kPSDDefaultLiveTextPref true + +#define kPSDWriteSlicesPref "Slices" +#define kPSDDefaultWriteSlicesPref true + +#define kPSDWriteImageMapsPref "ImageMaps" +#define kPSDDefaultImageMapsPref true + +#define kPSDWriteCompoundShapesPref "CompoundShapes" +#define kPSDDefaultCompoundShapesPref true + +#define kPSDWriteMaxEditabilityPref "Maximize Ediability" +#define kPSDDefaultMaxEditabilityPref true + +// [mgupta: 5/31/2001] ABTS #431842 +#define kPSDNoHiddenLayersWarning "NoHiddenLayersWarning" +#define kPSDNo100LayersWarning "No100LayersWarning" +#define kPSDNoImageMapsWarning "NoImageMapsWarning" +#define kPSDNoSelectiveMergeWarning "NoSelectiveMergeWarning" + +#define kPSDSuppressUnsupportedDepthWarning "SuppressUnsupportedDepthWarning" +#define kPSDApplyPixelAspectRatio "PixelAspectRatio" + +#define kPSDDefaultTurnOffWarningPref false + +// [hsuri: 5/12/2012] Option to preserve spot color information +#define kPSDPreserveSotColors "PreserveSpotColors" + +#define kPSDSpotOptionsApplyToAll "SpotOptionApplyToAll" +#define kPSDSpotOptions "SpotOptions" +#define kPSDSuppressSwatchConflictWarning "SuppressSwatchConflictWarning" + +#define kPSDSuppressNonSquarePixelWarning "SuppressNonSquarePixelWarning" +#define kPSDSuppressLibrarySpotInkWarning "LibrarySpotInkWarning" +#define kAIPSScriptCallSelector "AI Script" +// ------------------------------------------------------------------------------------ + +struct PSDExportPrefs //ex. PluginPrefs +{ + ai::int32 mWhichProfile{}; + AntiAliasOptions mAntiAlias{}; + AIBoolean mWriteLayers{}; + AIReal mResolution{}; // dots per inch + PSDPluginColorMode mColorModel{}; + AIBoolean mIncludeHiddenLayers{}; + AIBoolean mWriteNestedLayersAsLayers{}; //nchandra + AIBoolean mLiveText{}; + AIBoolean mNo100LayersWarning{}; + AIBoolean mNoImageMapsWarning{}; + AIBoolean bHasSelectiveMerge{}; + AIBoolean mNoSelectiveMergeWarning{}; //Ac. + AIBoolean mNoHiddenLayersWarning{}; + AIBoolean mWriteSlices{}; //mgupta++ + AIBoolean mWriteImageMaps{}; //mgupta++ + AIBoolean mWriteCompoundShapes{}; //mgupta++ + AIReal mOtherResolution{}; //mgupta++ + ai::int32 mExportFormat{}; + AIBoolean mMaxEditability{}; + AIBoolean mPreserveSpotColors{}; +}; + + +// nchandra: 20000212 Added this enum for the import types +// retain transparency is coupled with the psLayersToFlat +enum PSDImportOptions +{ + noImport = 0, + psLayersToAIObjects = 1, + psLayersToAIFlat = 2 +}; + +enum PSDUpdateLinkOptions +{ + psKeepLayerVisibilityOverrides = 0, + psUsePhotoshopLayerVisibility = 1, + psUpdateLinkNotApplicable = 2 +}; + +struct PSDImportPrefs +{ + //Actual import parameters + PSDImportOptions mImportOption; + PSDUpdateLinkOptions mUpdateLinkOption; + AIBoolean bImportImageMaps; + AIBoolean bImportSlices; + + //previous values. used in conjunction with current import operation to + //determine enabling/disabling of controls in import dialog box + AIBoolean mHasReadableLayers; + AIBoolean bPreviousImportImageMaps; + AIBoolean bPreviousImportSlices; + PSDImportOptions mPreviousOption; + AIBoolean mDontChangePreviousIMapImportStatus; + AIBoolean mDontChangePreviousSliceImportStatus; + AIBoolean mDontChangePreviousHiddenLayerImportStatus; + + AIBoolean bNotDragDrop; + AIBoolean mColorModeMismatch; + + AIBoolean bApplyPixelAspectRatioCorrection; + AIBoolean bCBPixelAspectRatioChecked; + AIReal mPixelAspectRatio; + + AIBoolean bShowLayerCompsPreview; + AIBoolean bImportHiddenLayers; + AIBoolean bPreviousImportHiddenLayers; + AIBoolean bReadImageDone; + ai::int32 iSelectedLayerCompIndex; +}; + +#include "AIHeaderEnd.h" + +#endif //__AIPhotoshopPrefs_h__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlaced.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlaced.h index 17f82ce..dab30c4 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlaced.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlaced.h @@ -1,450 +1,436 @@ -#ifndef __AIPlaced__ -#define __AIPlaced__ - -/* - * Name: AIPlaced.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Placed Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef _AIRaster_ -#include "AIRaster.h" -#endif - -#include "IAIFilePath.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIPlaced.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPlacedSuite "AI Placed Suite" -#define kAIPlacedSuiteVersion9 AIAPI_VERSION(9) -#define kAIPlacedSuiteVersion kAIPlacedSuiteVersion9 -#define kAIPlacedVersion kAIPlacedSuiteVersion - - -/** Types of placed object. */ -enum AIPlacedObjectType { - /** EPS file */ - kEPSType = 0, - /** Not EPS */ - kOtherType -}; - -/** Methods for positioning and sizing a linked object. - @see \c #AIPlacedSuite::SetPlaceOptions(), \c #AIPlacedSuite::GetPlaceOptions() */ -enum PlaceMethod { - /** Preserve original dimensions regardless of bounding box size and transformations. */ - kAsIs, - /** Fill bounding box while preserving proportions. Can overlap edges in one dimension. */ - kFill, - /** Fit fully inside bounding box while preserving proportions. */ - kFit, - /** Fit to bounding box; replaced file preserves bounds but not proportions. */ - kConform, - /** Fit to bounding box; replaced file preserves transformations and tries to preserve size. - Default. */ - kReconform -}; - -/** Alignment options for positioning a linked object. - @see \c #AIPlacedSuite::SetPlaceOptions(), \c #AIPlacedSuite::GetPlaceOptions() */ -enum PlaceAlignment { - kTopLeft, - kMidLeft, - kBotLeft, - - kTopMid, - kMidMid, - kBotMid, - - kTopRight, - kMidRight, - kBotRight -}; - -/** Request types for \c #AIPlacedSuite::ExecPlaceRequest(). */ -typedef enum PlaceRequestMode { - /** Place the file. If the new art can be read, places it, and - returns the new art handle in \c #AIPlaceRequestData::m_hNewArt.*/ - kVanillaPlace = 0, - /** Consult selection for whether to place or replace. - \li If exactly one placed object is selected, show "File.Place" dialog - to query user on whether to simply place the new art, or use it - to replace the selection. - \li If there is no selection, or if more than one placed object is - selected, simply places the new art and returns the - new art handle in \c #AIPlaceRequestData::m_hNewArt. */ - kQueryReplace, - /** Replace the file. The art to be replaced must be in - \c #AIPlaceRequestData::m_hOldArt. */ - kForceReplace, - /** Replace placed art with its parsed contents. Returns the group - containing the new art tree in \c #AIPlaceRequestData::m_hNewArt. */ - kUnlinkPlaced, - /** Create new art in current layer's top group, if allowed by that - layer's editability and visibility states.. You must specify the art - type you want created in \c #AIPlaceRequestData::m_lParam. Returns the - new art handle in \c #AIPlaceRequestData::m_hNewArt. */ - kCreateNewArt, - /** Replace the file, first validating the \c #SPPlatformFileSpecification. - The art to be replaced must be in \c #AIPlaceRequestData::m_hOldArt.*/ - kForceReplaceEx, - /** Replace placed art with its parsed contents, querying user - for parameters. Returns the group containing the new art tree - in \c #AIPlaceRequestData::m_hNewArt.*/ - kQueryUnlinkPlaced -} ePlaceRequestMode; - -/** Flag value to represent plates used by Placed object */ -typedef enum -{ - /** Placed object has Black(K) Plate */ - kAIPlacedHasBlack = (1<<0), - /** Placed object has Cyan Plate */ - kAIPlacedHasCyan = (1<<1), - /** Placed object has Magenta Plate */ - kAIPlacedHasMagenta = (1<<2), - /** Placed object has Yellow Plate */ - kAIPlacedHasYellow = (1<<3), - /** Placed object has at least one spot Plate */ - kAIPlacedHasCustomColors = (1<<4) -} AIPlacedPlateInfo; - - -typedef enum -{ - /*Default Place Type will be done, with no position size changed of placed art*/ - kAIPlaceTransformTypeNone = 0, - /*Art will be transformed w.r.t to current zoom and fit to current view*/ - kAIPlacedTransformTypeFitToView = 1 - -} AIPlaceTransformType; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Request data for \c #AIPlacedSuite::ExecPlaceRequest(). - Initialize all fields, even when not expecting to use them. -*/ -struct AIPlaceRequestData -{ - AIPlaceRequestData() : m_lPlaceMode(0), m_hOldArt(NULL), m_hNewArt(NULL), m_pFilePath(NULL), m_lParam(0), m_filemethod(0), m_disableTemplate(false), m_doShowParamDialog(false), m_PlaceTransformType(kAIPlaceTransformTypeNone){} - - /** The type of placement request, a \c #PlaceRequestMode constant - which determines what operation is performed. */ - ai::int32 m_lPlaceMode; - - /** Art to be replaced. */ - AIArtHandle m_hOldArt; - - /** Returns the handle for new art that was placed or created. */ - AIArtHandle m_hNewArt; - - /** File path of the placed file. If \c NULL, shows a File Place dialog - to query the user for the path and any relevant placement options. */ - const ai::FilePath *m_pFilePath; - - /** The type of art to create for the \c #kCreateNewArt request, - an \c #AIArtType value. */ - ai::int32 m_lParam; - - /** 0 to place or import the file, 1 to link the file. */ - ai::int16 m_filemethod; - - /** True to disable the Template placement option. */ - ASBoolean m_disableTemplate; - - /** True to show the parameters dialog even when the file path is known. */ - AIBoolean m_doShowParamDialog; - - /** to trigger what kind of placement you want */ - AIPlaceTransformType m_PlaceTransformType; -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions that allow you to access and manipulate - \e placed \e art. Illustrator uses placed art to link artwork contained - in external files into an Illustrator document. For a file to be linked, - there must be an installed file-format plug-in that supports linking the format. - - A placed object is defined by its file specification and a matrix positioning - the file content in the document. - - After creating an empty placed object, use \c #SetPlacedBoundingBox() to - set initial bounds, then call \c #AIArtSuite::UpdateArtworkLink() to read - the content of the referenced file. If the file is read successfully, - the initial bounds are replaced by the true bounds from the file. If the read fails, - the bounds are not changed, and, if this function were not used to - set them, the result would be a placed object without width or height. - - All file types except EPS also have a group of art objects that represents - the parsed contents of the file.When a file-format plug-in is requested to - link a file other than an EPS, it does the following: - - \li Creates a placed object for the linked file, setting its file specification - to reference the file. - \li Calls \c #SetPlacedObject() to create a group to contain the artwork - representing the content of the linked file. - \li Reads the content of the linked file, creating the artwork to represent - the content. - \li Sets the matrix of the placed object as needed to position the content - in the document. - - The transformation matrix of a placed image is the concatenation of all of the - transforms applied to the image after it has been placed. The matrix begins as - a simple translate which positions the image on the page. You can also rotate, - scale and shear the image. - - Placement options control how a linked image is positioned and scaled - relative to the bounds of the placed object. Placement is - adjusted whenever the image size changes; that is, when the file changes - on disk, or when it is explicitly relinked with \c #SetPlacedFileSpecification(). - The replacement image can be placed into the bounds of the original object, or - the bounds of the original object can be scaled, and the replacement placed - into the resulting bounds. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPlacedSuite and \c #kAIPlacedVersion. - */ -typedef struct AIPlacedSuite { - - /** Retrieves the file specification for the linked file of a placed object. - If the linked file does not exist, the returned file specification - supplies only the file name. - @param placed The placed object. - @param file [out] A buffer in which to return the file specification. - */ - AIAPI AIErr (*GetPlacedFileSpecification) ( AIArtHandle placed, ai::FilePath &file ); - - /** Associates a placed object with a linked file. If the file is an EPS, - immediately parses the contents and acquires the PICT preview. - Otherwise, defers parsing until you request it with - \c #AIArtSuite::UpdateArtworkLink() or \c #AIDocumentSuite::UpdateLinks(). - @param placed The placed object. - @param file The file specification. If this identifies an EPS, i - */ - AIAPI AIErr (*SetPlacedFileSpecification) ( AIArtHandle placed, const ai::FilePath &file ); - - /** Retrieves the transformation matrix that positions the content of a placed art object's - linked file in the document. Use with \c #SetPlacedMatrix() to modify the transformation. - @param placed The placed object. - @param matrix [out] A buffer in which to return the transformation matrix. - @see \c #ConcatPlacedMatrix() - */ - AIAPI AIErr (*GetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix ); - - /** Sets the transformation matrix of a placed art object. The matrix includes - the simple translate that places the image on the page, as well as any rotate, - scale, and shear values. Use with \c #GetPlacedMatrix() to modify the transformation. - @param placed The placed object. - @param matrix The new transformation matrix. - @see \c #ConcatPlacedMatrix() - */ - AIAPI AIErr (*SetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix ); - - /** Retrieves the boundary dimensions of placed art, regardless of the - transformations applied to it. - @param placed The placed object. - @param bbox [out] A buffer in which to return the bounding rectangle. - */ - AIAPI AIErr (*GetPlacedBoundingBox) ( AIArtHandle placed, AIRealRect *bbox ); - - /** Creates or clears and returns a group art object to hold the parsed content of - the linked file for a placed object. File-format plug-ins call this when reading - the content of a linked file. - @param placed The placed object. - @param group [out] A buffer in which to return the group art object. - */ - AIAPI AIErr (*SetPlacedObject) ( AIArtHandle placed, AIArtHandle *group ); - - /** Gets the number of custom colors used by a placed art object for an EPS file. Use with - \c #GetNthPlacedCustomColorName() to iterate through the colors and get their names. - @param art The placed object. - @param count [out] A buffer in which to return the number of spot colors. - @return The error \c #kBadParameterErr if the linked file is not an EPS. - @see \c #AICustomColorSuite. - */ - AIAPI AIErr (*CountPlacedCustomColors) ( AIArtHandle art, ai::int32 *count ); - - /** Retrieves the name of custom color used by a placed art object for an EPS file. - Use with \c #CountPlacedCustomColors to iterate through the custom colors. - @param art The placed art object. - @param num The 0-based position index of the color. - @param name [out] A buffer in which to return the color name. - @return The error \c #kBadParameterErr if the linked file is not an EPS. - */ - AIAPI AIErr (*GetNthPlacedCustomColorName) ( AIArtHandle art, ai::int32 num, ai::UnicodeString& name ); - - /** Changes a linked placed-art or raster-art object to an embedded art object. - @param placed The art object, of type \c #kPlacedArt or \c #kRasterArt. - @param native [out] A buffer in which to return the new embedded art object. - @param askForParam When true, show dialog for user input if needed. - */ - AIAPI AIErr (*MakePlacedObjectNative) ( AIArtHandle placed, AIArtHandle *native, AIBoolean askForParam ); - - /** Retrieves the type of a placed object (EPS or other file type). - @param placed The art object, of type \c #kPlacedArt or \c #kRasterArt. - @param pPlacedType [out] A buffer in which to return the type constant, - an \c #AIPlacedObjectType value. - */ - AIAPI AIErr (*GetPlacedType) ( AIArtHandle placed, ai::int16 *pPlacedType ); - - /** Retrieves the art group representing the parsed content of the - non-EPS linked file for a placed object. - @param placed The placed object. - @param group [out] A buffer in which to return the art group object. - @return The error \c #kBadParameterErr if the linked file is not an EPS. - */ - AIAPI AIErr (*GetPlacedChild) ( AIArtHandle placed, AIArtHandle *group ); - - /** Executes a request related to a placed object. - The request can place or replace the art, either explicitly - or in relation to the current selection. - @param placeRequestData An \c #AIPlaceRequestData structure in which to - specify the request and return results. - */ - AIAPI AIErr (*ExecPlaceRequest)( AIPlaceRequestData &placeRequestData ); - - /** Retrieves the file information for a placed object's linked file (such - as the creation and modification dates), as stored from the most recent - file read operation. - @param placed The placed object. - @param spFileInfo [out] A buffer in which to return the file information. - @note Compare this file information (stored with the placed object) - to the current information for the file itself (\c #GetPlacedFileInfoFromFile()) - to determine if the file has changed. - */ - AIAPI AIErr (*GetPlacedFileInfoFromArt)( AIArtHandle placed, SPPlatformFileInfo *spFileInfo ); - - /** Retrieves the file information for a placed object's linked file (such - as the creation and modification dates), from the file itself (as opposed to - the file information stored with the object). - @param placed The placed object. - @param spFileInfo [out] A buffer in which to return the file information. - @see \c #GetPlacedFileInfoFromArt() - */ - AIAPI AIErr (*GetPlacedFileInfoFromFile)( AIArtHandle placed, SPPlatformFileInfo *spFileInfo ); - - /** Retrieves the path specification for the file associated with a placed-art object. - @param placed The placed object. - @param path [out] A buffer in which to return the platform-specific file path string. - */ - AIAPI AIErr (*GetPlacedFilePathFromArt)( AIArtHandle placed, ai::UnicodeString &path ); - - /** Concatenates a new transformation onto the existing transformation matrix - for a placed object. - @param placed The placed object. - @param concat The new transformation matrix. - */ - AIAPI AIErr (*ConcatPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *concat ); - - // New for Illustrator 10 - - /** Sets the placement options for a placed object, used to scale and place the - linked image relative to the bounds of the placed object. Placement is - adjusted whenever the image size changes; that is, when the file changes - on disk, or when it is explicitly relinked with \c #SetPlacedFileSpecification(). - @param placed The placed object. - @param method The way to position and size the linked object. - @param alignment The way to align the linked object - @param clip True to clip the linked object. - */ - AIAPI AIErr (*SetPlaceOptions) ( AIArtHandle placed, enum PlaceMethod method, enum PlaceAlignment alignment, AIBoolean clip ); - - /** Retrieves the placement options for a placed object. See \c #SetPlaceOptions(). - @param placed The placed object. - @param method [out] A buffer in which to return the method used to position and size the linked object. - @param alignment [out] A buffer in which to return the alignment of the linked object. - @param clip [out] A buffer in which to return true if the linked object is clipped. - */ - AIAPI AIErr (*GetPlaceOptions) ( AIArtHandle placed, enum PlaceMethod *method, enum PlaceAlignment *alignment, AIBoolean *clip ); - - /** Retrieves the size, placement, and transformation of a placed object itself, - and of its linked image.The matrices are those used to transform the object and - image from the original bounds to their current locations on the screen. - With the \c #kConform placement option, these are the same. - @param placed The placed object. - @param size [out] A buffer in which to return the size (the X and Y dimensions) - of the original image. - @param viewBounds [out] A buffer in which to return the bounding box of the placed object. - @param viewMatrix [out] A buffer in which to return the transformation matrix of the placed object. - @param imageBounds [out] A buffer in which to return the bounding box of the linked image. - @param imageMatrix [out] A buffer in which to return the transformation matrix of the linked image. - */ - AIAPI AIErr (*GetPlacedDimensions) ( AIArtHandle placed, AIRealPoint *size, AIRealRect *viewBounds, AIRealMatrix *viewMatrix, - AIRealRect *imageBounds, AIRealMatrix *imageMatrix ); - - // New for Illustrator 12 - - /** Sets the preliminary bounding box information for a placed object. - @param art The placed object. - @param bbox The bounding rectangle. - */ - AIAPI AIErr (*SetPlacedBoundingBox) ( AIArtHandle art, AIRealRect* bbox ); - - /** Retrieves the raster record describing the image for a placed object - that represents a placed, linked image. - @param art The placed object. - @param info [out] A buffer in which to return the information. - @param israster [out] A buffer in which to return if the placed object - does represent an image, false if it does not. - */ - AIAPI AIErr (*GetRasterInfo) ( AIArtHandle art, AIRasterRecord* info, AIBoolean* israster ); - /** Gets the process colors plates used by a placed art object for an EPS file or a placed, linked image. - @param art The placed object. - @param plateInfo [out] A buffer in which to return which plates are used by the placed object - */ - AIAPI AIErr (*GetProcessPlatesInfo) (AIArtHandle art, AIPlacedPlateInfo * plateInfo); - -} AIPlacedSuite; - -#include "AIHeaderEnd.h" - -#endif +/************************************************************************* + * ADOBE CONFIDENTIAL + * ___________________ + * + * Copyright 1986 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + **************************************************************************/ +#pragma once + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef _AIRaster_ +#include "AIRaster.h" +#endif + +#include "IAIFilePath.hpp" +#include "AIPlacedTypes.h" +#include "AIHeaderBegin.h" + +/** @file AIPlaced.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPlacedSuite "AI Placed Suite" +#define kAIPlacedSuiteVersion10 AIAPI_VERSION(10) +#define kAIPlacedSuiteVersion kAIPlacedSuiteVersion10 +#define kAIPlacedVersion kAIPlacedSuiteVersion + + +/*******************************************************************************/ +using ai::PlaceMethod; +using ai::PlaceAlignment; +using ai::kAsIs; +using ai::kFill; +using ai::kFit; +using ai::kConform; +using ai::kReconform; +using ai::kTopLeft; +using ai::kMidLeft; +using ai::kBotLeft; +using ai::kTopMid; +using ai::kMidMid; +using ai::kBotMid; +using ai::kTopRight; +using ai::kMidRight; +using ai::kBotRight; +/***/ + +/** Types of placed object. */ +enum AIPlacedObjectType { + /** EPS file */ + kEPSType = 0, + /** Not EPS */ + kOtherType +}; + +/** Request types for \c #AIPlacedSuite::ExecPlaceRequest(). */ +typedef enum PlaceRequestMode { + /** Place the file. If the new art can be read, places it, and + returns the new art handle in \c #AIPlaceRequestData::m_hNewArt.*/ + kVanillaPlace = 0, + /** Consult selection for whether to place or replace. + \li If exactly one placed object is selected, show "File.Place" dialog + to query user on whether to simply place the new art, or use it + to replace the selection. + \li If there is no selection, or if more than one placed object is + selected, simply places the new art and returns the + new art handle in \c #AIPlaceRequestData::m_hNewArt. */ + kQueryReplace, + /** Replace the file. The art to be replaced must be in + \c #AIPlaceRequestData::m_hOldArt. */ + kForceReplace, + /** Replace placed art with its parsed contents. Returns the group + containing the new art tree in \c #AIPlaceRequestData::m_hNewArt. */ + kUnlinkPlaced, + /** Create new art in current layer's top group, if allowed by that + layer's editability and visibility states.. You must specify the art + type you want created in \c #AIPlaceRequestData::m_lParam. Returns the + new art handle in \c #AIPlaceRequestData::m_hNewArt. */ + kCreateNewArt, + /** Replace the file, first validating the \c #SPPlatformFileSpecification. + The art to be replaced must be in \c #AIPlaceRequestData::m_hOldArt.*/ + kForceReplaceEx, + /** Replace placed art with its parsed contents, querying user + for parameters. Returns the group containing the new art tree + in \c #AIPlaceRequestData::m_hNewArt.*/ + kQueryUnlinkPlaced +} ePlaceRequestMode; + +/** Flag value to represent plates used by Placed object */ +typedef enum +{ + /** Placed object has Black(K) Plate */ + kAIPlacedHasBlack = (1<<0), + /** Placed object has Cyan Plate */ + kAIPlacedHasCyan = (1<<1), + /** Placed object has Magenta Plate */ + kAIPlacedHasMagenta = (1<<2), + /** Placed object has Yellow Plate */ + kAIPlacedHasYellow = (1<<3), + /** Placed object has at least one spot Plate */ + kAIPlacedHasCustomColors = (1<<4) +} AIPlacedPlateInfo; + + +typedef enum +{ + /*Default Place Type will be done, with no position size changed of placed art*/ + kAIPlaceTransformTypeNone = 0, + /*Art will be transformed w.r.t to current zoom and fit to current view*/ + kAIPlacedTransformTypeFitToView = 1 + +} AIPlaceTransformType; + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Request data for \c #AIPlacedSuite::ExecPlaceRequest(). + Initialize all fields, even when not expecting to use them. +*/ +struct AIPlaceRequestData +{ + AIPlaceRequestData() : m_lPlaceMode(0), m_hOldArt(NULL), m_hNewArt(NULL), m_pFilePath(NULL), m_lParam(0), m_filemethod(0), m_disableTemplate(false), m_doShowParamDialog(false), m_PlaceTransformType(kAIPlaceTransformTypeNone){} + + /** The type of placement request, a \c #PlaceRequestMode constant + which determines what operation is performed. */ + ai::int32 m_lPlaceMode; + + /** Art to be replaced. */ + AIArtHandle m_hOldArt; + + /** Returns the handle for new art that was placed or created. */ + AIArtHandle m_hNewArt; + + /** File path of the placed file. If \c NULL, shows a File Place dialog + to query the user for the path and any relevant placement options. */ + const ai::FilePath *m_pFilePath; + + /** The type of art to create for the \c #kCreateNewArt request, + an \c #AIArtType value. */ + ai::int32 m_lParam; + + /** 0 to place or import the file, 1 to link the file. */ + ai::int16 m_filemethod; + + /** True to disable the Template placement option. */ + ASBoolean m_disableTemplate; + + /** True to show the parameters dialog even when the file path is known. */ + AIBoolean m_doShowParamDialog; + + /** to trigger what kind of placement you want */ + AIPlaceTransformType m_PlaceTransformType; +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides functions that allow you to access and manipulate + \e placed \e art. Illustrator uses placed art to link artwork contained + in external files into an Illustrator document. For a file to be linked, + there must be an installed file-format plug-in that supports linking the format. + + A placed object is defined by its file specification and a matrix positioning + the file content in the document. + + After creating an empty placed object, use \c #SetPlacedBoundingBox() to + set initial bounds, then call \c #AIArtSuite::UpdateArtworkLink() to read + the content of the referenced file. If the file is read successfully, + the initial bounds are replaced by the true bounds from the file. If the read fails, + the bounds are not changed, and, if this function were not used to + set them, the result would be a placed object without width or height. + + All file types except EPS also have a group of art objects that represents + the parsed contents of the file.When a file-format plug-in is requested to + link a file other than an EPS, it does the following: + + \li Creates a placed object for the linked file, setting its file specification + to reference the file. + \li Calls \c #SetPlacedObject() to create a group to contain the artwork + representing the content of the linked file. + \li Reads the content of the linked file, creating the artwork to represent + the content. + \li Sets the matrix of the placed object as needed to position the content + in the document. + + The transformation matrix of a placed image is the concatenation of all of the + transforms applied to the image after it has been placed. The matrix begins as + a simple translate which positions the image on the page. You can also rotate, + scale and shear the image. + + Placement options control how a linked image is positioned and scaled + relative to the bounds of the placed object. Placement is + adjusted whenever the image size changes; that is, when the file changes + on disk, or when it is explicitly relinked with \c #SetPlacedFileSpecification(). + The replacement image can be placed into the bounds of the original object, or + the bounds of the original object can be scaled, and the replacement placed + into the resulting bounds. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPlacedSuite and \c #kAIPlacedVersion. + */ +typedef struct AIPlacedSuite { + + /** Retrieves the file specification for the linked file of a placed object. + If the linked file does not exist, the returned file specification + supplies only the file name. + @param placed The placed object. + @param file [out] A buffer in which to return the file specification. + */ + AIAPI AIErr (*GetPlacedFileSpecification) ( AIArtHandle placed, ai::FilePath &file ); + + /** Associates a placed object with a linked file. If the file is an EPS, + immediately parses the contents and acquires the PICT preview. + Otherwise, defers parsing until you request it with + \c #AIArtSuite::UpdateArtworkLink() or \c #AIDocumentSuite::UpdateLinks(). + @param placed The placed object. + @param file The file specification. If this identifies an EPS, i + */ + AIAPI AIErr (*SetPlacedFileSpecification) ( AIArtHandle placed, const ai::FilePath &file ); + + /** Retrieves the transformation matrix that positions the content of a placed art object's + linked file in the document. Use with \c #SetPlacedMatrix() to modify the transformation. + @param placed The placed object. + @param matrix [out] A buffer in which to return the transformation matrix. + @see \c #ConcatPlacedMatrix() + */ + AIAPI AIErr (*GetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix ); + + /** Sets the transformation matrix of a placed art object. The matrix includes + the simple translate that places the image on the page, as well as any rotate, + scale, and shear values. Use with \c #GetPlacedMatrix() to modify the transformation. + @param placed The placed object. + @param matrix The new transformation matrix. + @see \c #ConcatPlacedMatrix() + */ + AIAPI AIErr (*SetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix ); + + /** Retrieves the boundary dimensions of placed art, regardless of the + transformations applied to it. + @param placed The placed object. + @param bbox [out] A buffer in which to return the bounding rectangle. + */ + AIAPI AIErr (*GetPlacedBoundingBox) ( AIArtHandle placed, AIRealRect *bbox ); + + /** Creates or clears and returns a group art object to hold the parsed content of + the linked file for a placed object. File-format plug-ins call this when reading + the content of a linked file. + @param placed The placed object. + @param group [out] A buffer in which to return the group art object. + */ + AIAPI AIErr (*SetPlacedObject) ( AIArtHandle placed, AIArtHandle *group ); + + /** Gets the number of custom colors used by a placed art object for an EPS file. Use with + \c #GetNthPlacedCustomColorName() to iterate through the colors and get their names. + @param art The placed object. + @param count [out] A buffer in which to return the number of spot colors. + @return The error \c #kBadParameterErr if the linked file is not an EPS. + @see \c #AICustomColorSuite. + */ + AIAPI AIErr (*CountPlacedCustomColors) ( AIArtHandle art, ai::int32 *count ); + + /** Retrieves the name of custom color used by a placed art object for an EPS file. + Use with \c #CountPlacedCustomColors to iterate through the custom colors. + @param art The placed art object. + @param num The 0-based position index of the color. + @param name [out] A buffer in which to return the color name. + @return The error \c #kBadParameterErr if the linked file is not an EPS. + */ + AIAPI AIErr (*GetNthPlacedCustomColorName) ( AIArtHandle art, ai::int32 num, ai::UnicodeString& name ); + + /** Changes a linked placed-art or raster-art object to an embedded art object. + @param placed The art object, of type \c #kPlacedArt or \c #kRasterArt. + @param native [out] A buffer in which to return the new embedded art object. + @param askForParam When true, show dialog for user input if needed. + */ + AIAPI AIErr (*MakePlacedObjectNative) ( AIArtHandle placed, AIArtHandle *native, AIBoolean askForParam ); + + /** Retrieves the type of a placed object (EPS or other file type). + @param placed The art object, of type \c #kPlacedArt or \c #kRasterArt. + @param pPlacedType [out] A buffer in which to return the type constant, + an \c #AIPlacedObjectType value. + */ + AIAPI AIErr (*GetPlacedType) ( AIArtHandle placed, ai::int16 *pPlacedType ); + + /** Retrieves the art group representing the parsed content of the + non-EPS linked file for a placed object. + @param placed The placed object. + @param group [out] A buffer in which to return the art group object. + @return The error \c #kBadParameterErr if the linked file is not an EPS. + */ + AIAPI AIErr (*GetPlacedChild) ( AIArtHandle placed, AIArtHandle *group ); + + /** Executes a request related to a placed object. + The request can place or replace the art, either explicitly + or in relation to the current selection. + @param placeRequestData An \c #AIPlaceRequestData structure in which to + specify the request and return results. + */ + AIAPI AIErr (*ExecPlaceRequest)( AIPlaceRequestData &placeRequestData ); + + /** Retrieves the file information for a placed object's linked file (such + as the creation and modification dates), as stored from the most recent + file read operation. + @param placed The placed object. + @param spFileInfo [out] A buffer in which to return the file information. + @note Compare this file information (stored with the placed object) + to the current information for the file itself (\c #GetPlacedFileInfoFromFile()) + to determine if the file has changed. + */ + AIAPI AIErr (*GetPlacedFileInfoFromArt)( AIArtHandle placed, SPPlatformFileInfo *spFileInfo ); + + /** Retrieves the file information for a placed object's linked file (such + as the creation and modification dates), from the file itself (as opposed to + the file information stored with the object). + @param placed The placed object. + @param spFileInfo [out] A buffer in which to return the file information. + @see \c #GetPlacedFileInfoFromArt() + */ + AIAPI AIErr (*GetPlacedFileInfoFromFile)( AIArtHandle placed, SPPlatformFileInfo *spFileInfo ); + + /** Retrieves the path specification for the file associated with a placed-art object. + @param placed The placed object. + @param path [out] A buffer in which to return the platform-specific file path string. + */ + AIAPI AIErr (*GetPlacedFilePathFromArt)( AIArtHandle placed, ai::UnicodeString &path ); + + /** Concatenates a new transformation onto the existing transformation matrix + for a placed object. + @param placed The placed object. + @param concat The new transformation matrix. + */ + AIAPI AIErr (*ConcatPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *concat ); + + // New for Illustrator 10 + + /** Sets the placement options for a placed object, used to scale and place the + linked image relative to the bounds of the placed object. Placement is + adjusted whenever the image size changes; that is, when the file changes + on disk, or when it is explicitly relinked with \c #SetPlacedFileSpecification(). + @param placed The placed object. + @param method The way to position and size the linked object. + @param alignment The way to align the linked object + @param clip True to clip the linked object. + */ + AIAPI AIErr (*SetPlaceOptions) ( AIArtHandle placed, enum PlaceMethod method, enum PlaceAlignment alignment, AIBoolean clip ); + + /** Retrieves the placement options for a placed object. See \c #SetPlaceOptions(). + @param placed The placed object. + @param method [out] A buffer in which to return the method used to position and size the linked object. + @param alignment [out] A buffer in which to return the alignment of the linked object. + @param clip [out] A buffer in which to return true if the linked object is clipped. + */ + AIAPI AIErr (*GetPlaceOptions) ( AIArtHandle placed, enum PlaceMethod *method, enum PlaceAlignment *alignment, AIBoolean *clip ); + + /** Retrieves the size, placement, and transformation of a placed object itself, + and of its linked image.The matrices are those used to transform the object and + image from the original bounds to their current locations on the screen. + With the \c #kConform placement option, these are the same. + @param placed The placed object. + @param size [out] A buffer in which to return the size (the X and Y dimensions) + of the original image. + @param viewBounds [out] A buffer in which to return the bounding box of the placed object. + @param viewMatrix [out] A buffer in which to return the transformation matrix of the placed object. + @param imageBounds [out] A buffer in which to return the bounding box of the linked image. + @param imageMatrix [out] A buffer in which to return the transformation matrix of the linked image. + */ + AIAPI AIErr (*GetPlacedDimensions) ( AIArtHandle placed, AIRealPoint *size, AIRealRect *viewBounds, AIRealMatrix *viewMatrix, + AIRealRect *imageBounds, AIRealMatrix *imageMatrix ); + + // New for Illustrator 12 + + /** Sets the preliminary bounding box information for a placed object. + @param art The placed object. + @param bbox The bounding rectangle. + */ + AIAPI AIErr (*SetPlacedBoundingBox) ( AIArtHandle art, AIRealRect* bbox ); + + /** Retrieves the raster record describing the image for a placed object + that represents a placed, linked image. + @param art The placed object. + @param info [out] A buffer in which to return the information. + @param israster [out] A buffer in which to return if the placed object + does represent an image, false if it does not. + */ + AIAPI AIErr (*GetRasterInfo) ( AIArtHandle art, AIRasterRecord* info, AIBoolean* israster ); + /** Gets the process colors plates used by a placed art object for an EPS file or a placed, linked image. + @param art The placed object. + @param plateInfo [out] A buffer in which to return which plates are used by the placed object + */ + AIAPI AIErr (*GetProcessPlatesInfo) (AIArtHandle art, AIPlacedPlateInfo * plateInfo); + + /* Check if Placed Linked Object File is damaged(corrupt) or not. + @param art The placed object. + */ + AIAPI AIBoolean(*IsPlacedFileDamaged) (AIArtHandle art); + +} AIPlacedSuite; + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlacedTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlacedTypes.h new file mode 100644 index 0000000..46b8123 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlacedTypes.h @@ -0,0 +1,56 @@ +/************************************************************************* + * ADOBE CONFIDENTIAL + * ___________________ + * + * Copyright 2018 Adobe Systems Incorporated + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe Systems Incorporated and its suppliers, + * if any. The intellectual and technical concepts contained + * herein are proprietary to Adobe Systems Incorporated and its + * suppliers and are protected by all applicable intellectual property + * laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe Systems Incorporated. + **************************************************************************/ + +#pragma once +#ifndef __AIPlacedTypes__ +#define __AIPlacedTypes__ + +namespace ai{ + /** Methods for positioning and sizing a linked object. + @see \c #AIPlacedSuite::SetPlaceOptions(), \c #AIPlacedSuite::GetPlaceOptions() */ + enum PlaceMethod { + /** Preserve original dimensions regardless of bounding box size and transformations. */ + kAsIs, + /** Fill bounding box while preserving proportions. Can overlap edges in one dimension. */ + kFill, + /** Fit fully inside bounding box while preserving proportions. */ + kFit, + /** Fit to bounding box; replaced file preserves bounds but not proportions. */ + kConform, + /** Fit to bounding box; replaced file preserves transformations and tries to preserve size. + Default. */ + kReconform + }; + + /** Alignment options for positioning a linked object. + @see \c #AIPlacedSuite::SetPlaceOptions(), \c #AIPlacedSuite::GetPlaceOptions() */ + enum PlaceAlignment { + kTopLeft, + kMidLeft, + kBotLeft, + + kTopMid, + kMidMid, + kBotMid, + + kTopRight, + kMidRight, + kBotRight + }; +} +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlanarObject.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlanarObject.h index 23ccebc..afa85e4 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlanarObject.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlanarObject.h @@ -1,294 +1,294 @@ -#ifndef __AIPlanarObject__ -#define __AIPlanarObject__ - -/* - * Name: AIPlanarObject.h - * Author: - * Date: - * Purpose: Adobe Illustrator Planar Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIArt__ -#include "AIArt.h" -#endif -#ifndef __AIPath__ -#include "AIPath.h" -#endif -#ifndef __AIArtStyle__ -#include "AIArtStyle.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIPlanarObject.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPlanarObjectSuite "AI Planar Object Suite" -#define kAIPlanarObjectSuiteVersion4 AIAPI_VERSION(4) -#define kAIPlanarObjectSuiteVersion kAIPlanarObjectSuiteVersion4 -#define kAIPlanarObjectVersion kAIPlanarObjectSuiteVersion - - -/** The \c #AIPreferenceSuite suffix for whether - complexity warnings have been disabled. */ -#define kLivePaintComplexityWarning "LivePaintComplexityWarning" - -/** Identifies the planar object plug-in as the current plug-in selection */ -#define kPlanarObjectPluginSelection "Planar FaceEdgeSelection" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference for a planar object. This is an intermediate object, - NOT an art object handle. Use only with the \c #AIPlanarObjectSuite. */ -typedef struct _AIPlanarObject* AIPlanarObjectHandle; - -/** Options for creating a planar object - with \c #AIPlanarObjectSuite::NewPlanarObject() */ -typedef struct -{ - /** The maximum size gap (in points) between real edges to be treated - as an implied edge for separating faces.*/ - AIReal gapMax; - /** True to enable gap detection. Default is false. */ - AIBoolean gapDetectEnabled; -} AIGapOptions; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions for working with \e planar \e objects, - which are temporary objects used to construct a planar plug-in-group art object. - Use these functions to create, populate, and query the attributes of - planar objects, and to create art from planar objects. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPlanarObjectSuite and \c #kAIPlanarObjectVersion. - */ -typedef struct { - - /** Begins construction of a planar object. After creation, add paths to the object - using functions such as \c #AddPath(). - @param matrix A transformation matrix that translates from the art-object - space into the planar-object space. - @param gapOptions Creation options for gap detection. Optional; gap detection - is off by default. - */ - AIAPI AIPlanarObjectHandle (*NewPlanarObject) ( const AIRealMatrix* matrix, const AIGapOptions* gapOptions ); - - /** Adds a path to a planar object. - @note Even when consecutive segments share the same stroke and same styles on each side, - the styles are \e not coalesced into a multi-segment data structure. For example, a - path that separates only two faces must have the same styles repeated in each style array. - - @param object The planar object. - @param segmentCount The number of segments in the path. - @param segments The path segments, an array of size \c segmentCount for a - closed path, or of size \c segmentCount+1 for an open path. (A path segment - is an anchor point with its two handles, and an open path has one more - anchor point than it has bezier segments.) - @param leftFill Style objects containing the paint style for the fill - to the left of each corresponding segment. An array of size \c segmentCount. - A \c NULL entry specifies no fill. An entry that refers to the outside of - the planar object must be \c NULL. - @param rightFill Style objects containing the paint style for the fill - to the right of each corresponding segment. An array of size \c segmentCount. - A \c NULL entry specifies no fill. An entry that refers to the outside of - the planar object must be \c NULL. - @param stroke Style objects containing the paint style for the stroke - of each corresponding segment. An array of size \c segmentCount. - A \c NULL entry specifies no stroke. - @param closed True to create a closed path. - - @note The added paths must, collectively, specify a consistent planar map. - in which paths intersect only at endpoints of the Bezier curves - (except for intersections that result from rounding and path flattening inaccuracy), - Each face of the map must have a consistent style, as defined by the style - of each bounding path. - - @return An error if a violation of conditions is detected; however, - it is not always possible to detect whether conditions have been violated. - The results of a violation are, in general, undefined. - */ - AIAPI AIErr (*AddPath) ( - AIPlanarObjectHandle object, int segmentCount, AIPathSegment *segments, - AIArtStyleHandle *leftFill, AIArtStyleHandle *rightFill, AIArtStyleHandle *stroke, - AIBoolean closed ); - - /* Adds a path to a planar object, for a path that has uniform stroke style - and separates only two faces, such as a closed shape surrounded entirely by one - other face. - @param object The planar object. - @param segmentCount The number of segments in the path. - @param segments The path segments, an array of size \c segmentCount for a - closed path, or of size \c segmentCount+1 for an open path. (A path segment - is an anchor point with its two handles, and an open path has one more - anchor point than it has bezier segments.) - @param leftFill A style object containing the paint style for the fill - to the left of all segments. - @param rightFill A style object containing the paint style for the fill - to the right of all segments. - @param stroke A style object containing the paint style for the stroke - of all segments. - @param closed True to create a closed path. - */ - AIAPI AIErr (*AddPathUniform) ( - AIPlanarObjectHandle object, int segmentCount, AIPathSegment *segments, - AIArtStyleHandle leftFill, AIArtStyleHandle rightFill, AIArtStyleHandle stroke, - AIBoolean closed ); - - /** Abandons the creation of a planar object. - @param object The planar object. After the call, this handle is no longer valid. - */ - AIAPI AIErr (*Abandon) ( AIPlanarObjectHandle object ); - - /** Creates a new planar plug-in group art object from a planar object. - The new edit group contains paths constructed from the segments and styles - of the paths added to the planar object.There might not be a one-to-one - correspondence between the number of paths added and the final contents of - the edit group, as the function can coalesce or split paths to maximize - editability and preserve validity of the planar map. - @param object The planar object. After the call, this handle is no longer valid. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object. - @param newArt [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*CreateArt) ( AIPlanarObjectHandle object, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Reports whether an art object is a planar plug-in group. - (Note that this function returns a boolean value, not an error code.) - @param art The art object. - @return True if the art is a planar plug-in group. - */ - AIAPI AIBoolean (*IsPlanarArtObject) ( AIArtHandle art ); - - /** Reports whether a selection can be converted to a planar object, - based on the amount of memory available. Warns if the complexity - is too great, and allows the user to choose whether to continue - or cancel. - - Succeeds if the conversion is simple enough that no - warning is needed, or if the user chooses to continue. - If user interaction is disabled (by using \c #ASUserInteractionSuite - or because you are running a script), the function succeeds, but - still reports whether the complexity merits a warning. - @param fromPlanarMap True if \c pathOrEdgeCount specifies the number of - edges in the planar map.
False if \c pathOrEdgeCount specifies - the number of legacy paths in a selection or in the result art - of a tracing object. - @param pathOrEdgeCount The number of edges in the planar map, - or the number of legacy paths in a selection or in the result art - of a tracing object. - @param gapOptions Proposed gap detection options. Can be \c NULL; default is - no gap detection. - @param warningDisplayed [out] Optional. A buffer in which to return true if - the complexity warning was displayed. You might want to check this to prevent - displaying a redundant warning if complexity checks might be made - at multiple places. If user interaction is disabled, returns true - if the complexity was sufficient to merit the warning. - @return \c #kNoErr if no warning was necessary, or if the complexity - warning was displayed and the user clicked Continue to accept the risk, - or if user interaction is disabled, -
The error \c #kCanceledErr if the complexity warning was displayed and - the user clicked Cancel. - */ - AIAPI AIErr (*ComplexConversionCanceled) ( AIBoolean fromPlanarMap, ai::int32 pathOrEdgeCount, - const AIGapOptions* gapOptions, AIBoolean *warningDisplayed /*output*/ ); - - // New for AI 13 - /** Erases a shape from a Live Paint planar object. - @param pathBlob A path or compound path object for the shape to erase. It is always be treated as closed. - The object is not modified. - @param planarObject A planar object plug-in group. This object is modified in place. - @param erasedSomething [out] Optional. A buffer in which to return true if the function - made any modification in the planar object. - */ - AIAPI AIErr (*EraseBlob)( AIArtHandle pathBlob, AIArtHandle planarObject, AIBoolean* erasedSomething ); - - /** Selects all faces that have the same style (fill color) as the currently - selected faces. - If the currently selected faces have mixed styles, or if there are - no faces selected, does nothing. Use \c #CanSelectSimilarFaceStyle() - to check whether this is the case. - */ - AIAPI AIErr (*SelectSimilarFaceStyle)(void); - /** Reports whether all faces that have the same style (fill color) as the - currently selected faces can be selected using \c #SelectSimilarFaceStyle(). - (Note that this function returns a boolean value, not an error code.) - @return True if similar face styles can be selected, false otherwise. - */ - AIAPI AIBoolean (*CanSelectSimilarFaceStyle)(void); - - - /** Selects all edges that have the same edge weight as the currently - selected edges. - If the currently selected edges have mixed edge weights, or if there - are no edges selected, does nothing. Use \c #CanSelectSimilarEdgeWeights() - to check whether this is the case. - */ - AIAPI AIErr (*SelectSimilarEdgeWeights)(void); - /** Reports whether all edges that have the same edge weight as the currently - selected edges can be selected using \c #SelectSimilarEdgeWeights(). - (Note that this function returns a boolean value, not an error code.) - @return True if similar edge weights can be selected, false otherwise. - */ - AIAPI AIBoolean (*CanSelectSimilarEdgeWeights)(void); - - - /** Selects all edges that have the same color as the currently - selected edges. - If the currently selected edges have mixed colors, or if there - are no edges selected, does nothing. Use \c #CanSelectSimilarEdgeColors() - to check whether this is the case. - */ - AIAPI AIErr (*SelectSimilarEdgeColors)(void); - /** Reports whether all edges that have the same color as the currently - selected edges can be selected using \c #SelectSimilarEdgeColors(). - (Note that this function returns a boolean value, not an error code.) - @return True if similar edge colors can be selected, false otherwise. - */ - AIAPI AIBoolean (*CanSelectSimilarEdgeColors)(void); - - - -} AIPlanarObjectSuite; - - -#include "AIHeaderEnd.h" - - -#endif // __AIPlanarObject__ +#ifndef __AIPlanarObject__ +#define __AIPlanarObject__ + +/* + * Name: AIPlanarObject.h + * Author: + * Date: + * Purpose: Adobe Illustrator Planar Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIArt__ +#include "AIArt.h" +#endif +#ifndef __AIPath__ +#include "AIPath.h" +#endif +#ifndef __AIArtStyle__ +#include "AIArtStyle.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIPlanarObject.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPlanarObjectSuite "AI Planar Object Suite" +#define kAIPlanarObjectSuiteVersion4 AIAPI_VERSION(4) +#define kAIPlanarObjectSuiteVersion kAIPlanarObjectSuiteVersion4 +#define kAIPlanarObjectVersion kAIPlanarObjectSuiteVersion + + +/** The \c #AIPreferenceSuite suffix for whether + complexity warnings have been disabled. */ +#define kLivePaintComplexityWarning "LivePaintComplexityWarning" + +/** Identifies the planar object plug-in as the current plug-in selection */ +#define kPlanarObjectPluginSelection "Planar FaceEdgeSelection" +#define kPlanarGroupObject "Adobe Planar Group" + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference for a planar object. This is an intermediate object, + NOT an art object handle. Use only with the \c #AIPlanarObjectSuite. */ +typedef struct _AIPlanarObject* AIPlanarObjectHandle; + +/** Options for creating a planar object + with \c #AIPlanarObjectSuite::NewPlanarObject() */ +typedef struct +{ + /** The maximum size gap (in points) between real edges to be treated + as an implied edge for separating faces.*/ + AIReal gapMax; + /** True to enable gap detection. Default is false. */ + AIBoolean gapDetectEnabled; +} AIGapOptions; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides functions for working with \e planar \e objects, + which are temporary objects used to construct a planar plug-in-group art object. + Use these functions to create, populate, and query the attributes of + planar objects, and to create art from planar objects. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPlanarObjectSuite and \c #kAIPlanarObjectVersion. + */ +typedef struct { + + /** Begins construction of a planar object. After creation, add paths to the object + using functions such as \c #AddPath(). + @param matrix A transformation matrix that translates from the art-object + space into the planar-object space. + @param gapOptions Creation options for gap detection. Optional; gap detection + is off by default. + */ + AIAPI AIPlanarObjectHandle (*NewPlanarObject) ( const AIRealMatrix* matrix, const AIGapOptions* gapOptions ); + + /** Adds a path to a planar object. + @note Even when consecutive segments share the same stroke and same styles on each side, + the styles are \e not coalesced into a multi-segment data structure. For example, a + path that separates only two faces must have the same styles repeated in each style array. + + @param object The planar object. + @param segmentCount The number of segments in the path. + @param segments The path segments, an array of size \c segmentCount for a + closed path, or of size \c segmentCount+1 for an open path. (A path segment + is an anchor point with its two handles, and an open path has one more + anchor point than it has bezier segments.) + @param leftFill Style objects containing the paint style for the fill + to the left of each corresponding segment. An array of size \c segmentCount. + A \c NULL entry specifies no fill. An entry that refers to the outside of + the planar object must be \c NULL. + @param rightFill Style objects containing the paint style for the fill + to the right of each corresponding segment. An array of size \c segmentCount. + A \c NULL entry specifies no fill. An entry that refers to the outside of + the planar object must be \c NULL. + @param stroke Style objects containing the paint style for the stroke + of each corresponding segment. An array of size \c segmentCount. + A \c NULL entry specifies no stroke. + @param closed True to create a closed path. + + @note The added paths must, collectively, specify a consistent planar map. + in which paths intersect only at endpoints of the Bezier curves + (except for intersections that result from rounding and path flattening inaccuracy), + Each face of the map must have a consistent style, as defined by the style + of each bounding path. + + @return An error if a violation of conditions is detected; however, + it is not always possible to detect whether conditions have been violated. + The results of a violation are, in general, undefined. + */ + AIAPI AIErr (*AddPath) ( + AIPlanarObjectHandle object, int segmentCount, AIPathSegment *segments, + AIArtStyleHandle *leftFill, AIArtStyleHandle *rightFill, AIArtStyleHandle *stroke, + AIBoolean closed ); + + /* Adds a path to a planar object, for a path that has uniform stroke style + and separates only two faces, such as a closed shape surrounded entirely by one + other face. + @param object The planar object. + @param segmentCount The number of segments in the path. + @param segments The path segments, an array of size \c segmentCount for a + closed path, or of size \c segmentCount+1 for an open path. (A path segment + is an anchor point with its two handles, and an open path has one more + anchor point than it has bezier segments.) + @param leftFill A style object containing the paint style for the fill + to the left of all segments. + @param rightFill A style object containing the paint style for the fill + to the right of all segments. + @param stroke A style object containing the paint style for the stroke + of all segments. + @param closed True to create a closed path. + */ + AIAPI AIErr (*AddPathUniform) ( + AIPlanarObjectHandle object, int segmentCount, AIPathSegment *segments, + AIArtStyleHandle leftFill, AIArtStyleHandle rightFill, AIArtStyleHandle stroke, + AIBoolean closed ); + + /** Abandons the creation of a planar object. + @param object The planar object. After the call, this handle is no longer valid. + */ + AIAPI AIErr (*Abandon) ( AIPlanarObjectHandle object ); + + /** Creates a new planar plug-in group art object from a planar object. + The new edit group contains paths constructed from the segments and styles + of the paths added to the planar object.There might not be a one-to-one + correspondence between the number of paths added and the final contents of + the edit group, as the function can coalesce or split paths to maximize + editability and preserve validity of the planar map. + @param object The planar object. After the call, this handle is no longer valid. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object. + @param newArt [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*CreateArt) ( AIPlanarObjectHandle object, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); + + /** Reports whether an art object is a planar plug-in group. + (Note that this function returns a boolean value, not an error code.) + @param art The art object. + @return True if the art is a planar plug-in group. + */ + AIAPI AIBoolean (*IsPlanarArtObject) ( AIArtHandle art ); + + /** Reports whether a selection can be converted to a planar object, + based on the amount of memory available. Warns if the complexity + is too great, and allows the user to choose whether to continue + or cancel. + + Succeeds if the conversion is simple enough that no + warning is needed, or if the user chooses to continue. + If user interaction is disabled (by using \c #ASUserInteractionSuite + or because you are running a script), the function succeeds, but + still reports whether the complexity merits a warning. + @param fromPlanarMap True if \c pathOrEdgeCount specifies the number of + edges in the planar map.
False if \c pathOrEdgeCount specifies + the number of legacy paths in a selection or in the result art + of a tracing object. + @param pathOrEdgeCount The number of edges in the planar map, + or the number of legacy paths in a selection or in the result art + of a tracing object. + @param gapOptions Proposed gap detection options. Can be \c NULL; default is + no gap detection. + @param warningDisplayed [out] Optional. A buffer in which to return true if + the complexity warning was displayed. You might want to check this to prevent + displaying a redundant warning if complexity checks might be made + at multiple places. If user interaction is disabled, returns true + if the complexity was sufficient to merit the warning. + @return \c #kNoErr if no warning was necessary, or if the complexity + warning was displayed and the user clicked Continue to accept the risk, + or if user interaction is disabled, +
The error \c #kCanceledErr if the complexity warning was displayed and + the user clicked Cancel. + */ + AIAPI AIErr (*ComplexConversionCanceled) ( AIBoolean fromPlanarMap, ai::int32 pathOrEdgeCount, + const AIGapOptions* gapOptions, AIBoolean *warningDisplayed /*output*/ ); + + // New for AI 13 + /** Erases a shape from a Live Paint planar object. + @param pathBlob A path or compound path object for the shape to erase. It is always be treated as closed. + The object is not modified. + @param planarObject A planar object plug-in group. This object is modified in place. + @param erasedSomething [out] Optional. A buffer in which to return true if the function + made any modification in the planar object. + */ + AIAPI AIErr (*EraseBlob)( AIArtHandle pathBlob, AIArtHandle planarObject, AIBoolean* erasedSomething ); + + /** Selects all faces that have the same style (fill color) as the currently + selected faces. + If the currently selected faces have mixed styles, or if there are + no faces selected, does nothing. Use \c #CanSelectSimilarFaceStyle() + to check whether this is the case. + */ + AIAPI AIErr (*SelectSimilarFaceStyle)(void); + /** Reports whether all faces that have the same style (fill color) as the + currently selected faces can be selected using \c #SelectSimilarFaceStyle(). + (Note that this function returns a boolean value, not an error code.) + @return True if similar face styles can be selected, false otherwise. + */ + AIAPI AIBoolean (*CanSelectSimilarFaceStyle)(void); + + + /** Selects all edges that have the same edge weight as the currently + selected edges. + If the currently selected edges have mixed edge weights, or if there + are no edges selected, does nothing. Use \c #CanSelectSimilarEdgeWeights() + to check whether this is the case. + */ + AIAPI AIErr (*SelectSimilarEdgeWeights)(void); + /** Reports whether all edges that have the same edge weight as the currently + selected edges can be selected using \c #SelectSimilarEdgeWeights(). + (Note that this function returns a boolean value, not an error code.) + @return True if similar edge weights can be selected, false otherwise. + */ + AIAPI AIBoolean (*CanSelectSimilarEdgeWeights)(void); + + + /** Selects all edges that have the same color as the currently + selected edges. + If the currently selected edges have mixed colors, or if there + are no edges selected, does nothing. Use \c #CanSelectSimilarEdgeColors() + to check whether this is the case. + */ + AIAPI AIErr (*SelectSimilarEdgeColors)(void); + /** Reports whether all edges that have the same color as the currently + selected edges can be selected using \c #SelectSimilarEdgeColors(). + (Note that this function returns a boolean value, not an error code.) + @return True if similar edge colors can be selected, false otherwise. + */ + AIAPI AIBoolean (*CanSelectSimilarEdgeColors)(void); + + + +} AIPlanarObjectSuite; + + +#include "AIHeaderEnd.h" + + +#endif // __AIPlanarObject__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlatformMemory.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlatformMemory.h index c838076..1a7b6e9 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlatformMemory.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlatformMemory.h @@ -1,104 +1,104 @@ - -#ifndef __AIPlatformMemory__ -#define __AIPlatformMemory__ - -/* - * Name: AIPlatformMemory.h - * $Revision: 1 $ - * Author: Dave Lazarony - * Date: 7/1/96 - * Purpose: Wrapper suite for calling the Mac OS or Windows platform - * memory manager. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __ASTypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIPlatformMemory.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPlatformMemorySuite "AI Platform Memory Suite" -#define kAIPlatformMemorySuiteVersion AIAPI_VERSION(3) -#define kAIPlatformMemoryVersion kAIPlatformMemorySuiteVersion - - -/******************************************************************************* - ** - ** Suite Record - ** - **/ - -/** @ingroup Suites - This suite provides functions with which to manage memory for \c #ASSliceSettings - values, used with the \c #AIOptimizationSettingsSuite. Do not use them for other - memory management. In general, use the \c #AIBlockSuite or - \c #SPBlocksSuite to allocate memory. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPlatformMemorySuite and \c #kAIPlatformMemoryVersion. - */ -typedef struct { - /** Allocates a block of memory. - @param size The number of bytes to allocate. - @param handle [out] A buffer in which to return the memory handle object. - */ - ASAPI ASErr (*New)(size_t size, ASHandle *handle); - /** Frees a block of memory allocated with \c #New(). - @param handle The memory handle object. - */ - ASAPI ASErr (*Delete)(ASHandle handle); - /** Retrieves the size of a block of memory allocated with \c #New(). - @param handle The memory handle object. - @param size [out] A buffer in which to return the number of bytes allocated. - */ - ASAPI ASErr (*GetSize)(ASHandle handle, size_t *size); - /** Resizes a block of memory allocated with \c #New(). - @param handle [in, out] A buffer in which to pass the old object and return the - resized object. - @param newSize The number of bytes to allocate. - */ - ASAPI ASErr (*Resize)(ASHandle *handle, size_t newSize); - /** Locks a memory block, so that the operating system does not move it. - This is the equivalent of \c HLock() in Mac OS or \c GlobalLock() in Windows. - @param handle The memory handle. - @param dataPtr [out] A buffer in which to return a pointer - to the locked memory block. - */ - ASAPI ASErr (*Lock)(ASHandle handle, void **dataPtr); - /** Unlocks a memory block that was locked with \c #Lock(). - @param handle The memory handle. - */ - ASAPI ASErr (*UnLock)(ASHandle handle); - -} AIPlatformMemorySuite; - - -#include "AIHeaderEnd.h" - + +#ifndef __AIPlatformMemory__ +#define __AIPlatformMemory__ + +/* + * Name: AIPlatformMemory.h + * $Revision: 1 $ + * Author: Dave Lazarony + * Date: 7/1/96 + * Purpose: Wrapper suite for calling the Mac OS or Windows platform + * memory manager. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __ASTypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIPlatformMemory.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPlatformMemorySuite "AI Platform Memory Suite" +#define kAIPlatformMemorySuiteVersion AIAPI_VERSION(3) +#define kAIPlatformMemoryVersion kAIPlatformMemorySuiteVersion + + +/******************************************************************************* + ** + ** Suite Record + ** + **/ + +/** @ingroup Suites + This suite provides functions with which to manage memory for \c #ASSliceSettings + values, used with the \c #AIOptimizationSettingsSuite. Do not use them for other + memory management. In general, use the \c #AIBlockSuite or + \c #SPBlocksSuite to allocate memory. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPlatformMemorySuite and \c #kAIPlatformMemoryVersion. + */ +typedef struct { + /** Allocates a block of memory. + @param size The number of bytes to allocate. + @param handle [out] A buffer in which to return the memory handle object. + */ + ASAPI ASErr (*New)(size_t size, ASHandle *handle); + /** Frees a block of memory allocated with \c #New(). + @param handle The memory handle object. + */ + ASAPI ASErr (*Delete)(ASHandle handle); + /** Retrieves the size of a block of memory allocated with \c #New(). + @param handle The memory handle object. + @param size [out] A buffer in which to return the number of bytes allocated. + */ + ASAPI ASErr (*GetSize)(ASHandle handle, size_t *size); + /** Resizes a block of memory allocated with \c #New(). + @param handle [in, out] A buffer in which to pass the old object and return the + resized object. + @param newSize The number of bytes to allocate. + */ + ASAPI ASErr (*Resize)(ASHandle *handle, size_t newSize); + /** Locks a memory block, so that the operating system does not move it. + This is the equivalent of \c HLock() in Mac OS or \c GlobalLock() in Windows. + @param handle The memory handle. + @param dataPtr [out] A buffer in which to return a pointer + to the locked memory block. + */ + ASAPI ASErr (*Lock)(ASHandle handle, void **dataPtr); + /** Unlocks a memory block that was locked with \c #Lock(). + @param handle The memory handle. + */ + ASAPI ASErr (*UnLock)(ASHandle handle); + +} AIPlatformMemorySuite; + + +#include "AIHeaderEnd.h" + #endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlugin.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlugin.h index 3d94351..4111a64 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlugin.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPlugin.h @@ -1,168 +1,182 @@ -#ifndef __AIPlugin__ -#define __AIPlugin__ - -/* - * Name: AIPlugin.h - * $Revision: 10 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Standard Plug-in Includes and Definitions - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#ifndef __SPAccess__ -#include "SPAccess.h" -#endif - -#ifndef __SPInterf__ -#include "SPInterf.h" -#endif - -#ifndef __SPProps__ -#include "SPProps.h" -#endif - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPluginSuite "AI Plugin Suite" -#define kAIPluginSuiteVersion AIAPI_VERSION(5) - -/** @ingroup Notifiers - Sent after all plug-ins have received and - processed \c #kAIApplicationStartedNotifier. -*/ -#define kAIAllPluginStartedNotifier "AI All Plug-ins Started Notifier" - -/** @ingroup Notifiers - Sent before Illustrator sends the application-stopped notifier. -*/ -#define kAIPluginStoppingNotifier "AI All Plug-ins Stopping Notifier" - - - -/** Options available to plug-ins. */ -enum AIPluginOptions { - /** When true (the default for plug-in filters) Illustrator automatically - selects any artwork a plug-in modifies while running, - and that art remains selected when the plug-in finishes running. - Any artwork that was in a selected state on entry but not touched by the - plug-in is deselected. - - When false (the default for all other plug-ins) the plug-in handles - the selection and deselection of artwork before exit. - */ - kPluginWantsResultsAutoSelectedOption = (1<<1), - /** When true, retains the state of partially selected path objects in the plug-in - when an Undo operation is performed. - - When false (the default), when a plug-in edits a partially selected path object - and the edit is undone, Illustrator does not retain the partial selection - state that existed prior to the edit. - */ - kPluginWantsPartialPathSelectionOption = (1<<2) - - -}; - -/** @ingroup Suites - These functions access Illustrator-specific plug-in options, and allow - Illustrator plug-ins to send messages to one another. - - @note The original version of this suite, version 2, has been largely replaced by - the PICA \c #SPPluginsSuite, a core suite available to other Adobe applications. - Use that suite to access the plug-in list, identify their type and location, and so on. - Similarly, it is better to use the PICA \c #SPInterfaceSuite to send messages. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPluginSuite and \c #kAIPluginSuiteVersion. - */ -typedef struct { - - /** Retrieves the Illustrator-specific options for a plug-in. - @param plugin The plug-in reference. - @param options [out] A buffer in which to return the options, - an #AIPluginOptions value. - */ - AIAPI AIErr (*GetPluginOptions) ( SPPluginRef plugin, ai::int32 *options ); - - /** Sets the Illustrator-specific options for a plug-in. - @param plugin The plug-in reference. - @param options The new options, an #AIPluginOptions value. - */ - AIAPI AIErr (*SetPluginOptions) ( SPPluginRef plugin, ai::int32 options ); - - /** Sets up data for sending a message to another plug-in. - @param plug-in The destination plug-in. - @param data A pointer to the message data. - @see \c #CallPlugin() - */ - AIAPI AIErr (*SetupPluginData) ( SPPluginRef plugin, void *data ); - - /** Sends a message to the main entry point of another Illustrator plug-in. - For example: - @code -// The plug-in reference for the plug-in to call. -SPPluginRef somePlugin; -// A plug-in message structure, contains an SPMessageData as first member. -AISomePluginMessage message; - -// fill out the message structure -error = sAIPluginSetupPluginData(somePlugin, &message.d); -// send the message to the plug-in -if (!error) - error = sAIPluginCallPlugin(somePlugin, kSomePluginSelector, &message ); -// release the message data memory. -if (!error) - error = sAIPluginEmptyPluginData(somePlugin, &message.d); -@endcode - @param plugin The destination plug-in. - @param selector The selector for the destination plug-in, see @ref Selectors. - @param message The message, of the type suitable for the selector. - @note It is recommended that you use the newer PICA \c #SPInterfaceSuite to send messages. - */ - AIAPI AIErr (*CallPlugin) ( SPPluginRef plugin, const char *selector, void *message ); - - /** Ensures that the destination plug-in's global data (as sent in \c #SPMessageData::globals) - is properly stored back into the plug-in that modified it when responding to the message. - @param plugin The destination plug-in. - @param data A pointer to the message data. - @note It is recommended that you use the newer PICA \c #SPInterfaceSuite to send messages. - */ - AIAPI AIErr (*EmptyPluginData) ( SPPluginRef plugin, void *data ); - -} AIPluginSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIPlugin__ +#define __AIPlugin__ + +/* + * Name: AIPlugin.h + * $Revision: 10 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Standard Plug-in Includes and Definitions + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#ifndef __SPAccess__ +#include "SPAccess.h" +#endif + +#ifndef __SPInterf__ +#include "SPInterf.h" +#endif + +#ifndef __SPProps__ +#include "SPProps.h" +#endif + + +#include "AIHeaderBegin.h" + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPluginSuite "AI Plugin Suite" +#define kAIPluginSuiteVersion AIAPI_VERSION(5) + +/** @ingroup Notifiers + Sent after all plug-ins have received and + processed \c #kAIApplicationStartedNotifier. +*/ +#define kAIAllPluginStartedNotifier "AI All Plug-ins Started Notifier" + +/** @ingroup Notifiers + Sent before Illustrator sends the application-stopped notifier. +*/ +#define kAIPluginStoppingNotifier "AI All Plug-ins Stopping Notifier" + + + +/** Options available to plug-ins. */ +enum AIPluginOptions { + /** When true (the default for plug-in filters) Illustrator automatically + selects any artwork a plug-in modifies while running, + and that art remains selected when the plug-in finishes running. + Any artwork that was in a selected state on entry but not touched by the + plug-in is deselected. + + When false (the default for all other plug-ins) the plug-in handles + the selection and deselection of artwork before exit. + */ + kPluginWantsResultsAutoSelectedOption = (1<<1), + /** When true, retains the state of partially selected path objects in the plug-in + when an Undo operation is performed. + + When false (the default), when a plug-in edits a partially selected path object + and the edit is undone, Illustrator does not retain the partial selection + state that existed prior to the edit. + */ + kPluginWantsPartialPathSelectionOption = (1<<2), + + /** + When true, Plugin will participate in the Ai'Fast Exit framework and all shutdown sequence notifiers and messages are not sent to the plugin. + e.g. kAIPluginStoppingNotifier and kAIApplicationShutdownNotifier Notifiers + and Messages + with (caller = kSPInterfaceCaller, selector = kSPInterfaceCaller) and + with (caller = kSPAccessCaller, selector = kSPAccessUnloadSelector) + are not sent to the plugin. + + It is expected that these plugins registers for kAISaveUserDataNotifier notifier and only saves persistent data in this notifier. + Plugin *must not* cleanup any resource in this notifier handler. e.g. Plugin must not delete any object, + destroy any thread or free up memory etc. in this notifier. + + After kAISaveUserDataNotifier message is sent, app will quit immediately and resources will be released to the OS automatically. + */ + kPluginWantsFastExitOption = (1 << 3) +}; + +/** @ingroup Suites + These functions access Illustrator-specific plug-in options, and allow + Illustrator plug-ins to send messages to one another. + + @note The original version of this suite, version 2, has been largely replaced by + the PICA \c #SPPluginsSuite, a core suite available to other Adobe applications. + Use that suite to access the plug-in list, identify their type and location, and so on. + Similarly, it is better to use the PICA \c #SPInterfaceSuite to send messages. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPluginSuite and \c #kAIPluginSuiteVersion. + */ +typedef struct { + + /** Retrieves the Illustrator-specific options for a plug-in. + @param plugin The plug-in reference. + @param options [out] A buffer in which to return the options, + an #AIPluginOptions value. + */ + AIAPI AIErr (*GetPluginOptions) ( SPPluginRef plugin, ai::int32 *options ); + + /** Sets the Illustrator-specific options for a plug-in. + @param plugin The plug-in reference. + @param options The new options, an #AIPluginOptions value. + */ + AIAPI AIErr (*SetPluginOptions) ( SPPluginRef plugin, ai::int32 options ); + + /** Sets up data for sending a message to another plug-in. + @param plug-in The destination plug-in. + @param data A pointer to the message data. + @see \c #CallPlugin() + */ + AIAPI AIErr (*SetupPluginData) ( SPPluginRef plugin, void *data ); + + /** Sends a message to the main entry point of another Illustrator plug-in. + For example: + @code +// The plug-in reference for the plug-in to call. +SPPluginRef somePlugin; +// A plug-in message structure, contains an SPMessageData as first member. +AISomePluginMessage message; + +// fill out the message structure +error = sAIPluginSetupPluginData(somePlugin, &message.d); +// send the message to the plug-in +if (!error) + error = sAIPluginCallPlugin(somePlugin, kSomePluginSelector, &message ); +// release the message data memory. +if (!error) + error = sAIPluginEmptyPluginData(somePlugin, &message.d); +@endcode + @param plugin The destination plug-in. + @param selector The selector for the destination plug-in, see @ref Selectors. + @param message The message, of the type suitable for the selector. + @note It is recommended that you use the newer PICA \c #SPInterfaceSuite to send messages. + */ + AIAPI AIErr (*CallPlugin) ( SPPluginRef plugin, const char *selector, void *message ); + + /** Ensures that the destination plug-in's global data (as sent in \c #SPMessageData::globals) + is properly stored back into the plug-in that modified it when responding to the message. + @param plugin The destination plug-in. + @param data A pointer to the message data. + @note It is recommended that you use the newer PICA \c #SPInterfaceSuite to send messages. + */ + AIAPI AIErr (*EmptyPluginData) ( SPPluginRef plugin, void *data ); + +} AIPluginSuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPluginGroup.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPluginGroup.h index 525090e..aa287dd 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPluginGroup.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPluginGroup.h @@ -1,1771 +1,1784 @@ -#ifndef __AIPluginGroup__ -#define __AIPluginGroup__ - -/* - * Name: AIPluginGroup.h - * Purpose: Adobe Illustrator Plugin Group Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1995-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/** @file AIPluginGroup.h */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif -#ifndef __AIArt__ -#include "AIArt.h" -#endif -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif -#ifndef __AIArtStyle__ -#include "AIArtStyle.h" -#endif - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPluginGroupSuite "AI Plugin Group Suite" -#define kAIPluginGroupSuiteVersion6 AIAPI_VERSION(6) -#define kAIPluginGroupSuiteVersion kAIPluginGroupSuiteVersion6 -#define kAIPluginGroupVersion kAIPluginGroupSuiteVersion - - -// These are the AI 6 style plug-in class messages. -// They are only needed temporarily until Joe T's prototype plug-ins are updated -// <> -#define kSelectorAINotifyObject "AI Notify Plugin Object" -#define kSelectorAIUpdateObject "AI Update Plugin Object" - - -// These are the AI 7 style plug-in group messages (split into caller and request) -// <> - -/** @ingroup Callers - See \c #AIPluginGroupSuite */ -#define kCallerAIPluginGroup "AI Plugin Group" - -/** @ingroup Selectors - Notifies a plug-in group of edits to the edit group. - An \c #AIPluginGroupMessage::code value indicates the - type of editing operation being performed. An - \c #AIPluginGroupMessage::time value indicates what stage of - the operation is in progress. - - When the handler returns \c #kNoErr, the plug-in object is marked - as "dirty" (in need of \c #kSelectorAIUpdateArt). To prevent this, - return \c #kMarkValidPluginGroupReply. If the handler returns - \c #kDontCarePluginGroupReply, retains the state of the object, - and does not mark it as clean or dirty. - - If the handler returns \c #kWantsAfterMsgPluginGroupReply from a - \c #kBeforeOperationTime notify-edits message, a single - \c #kAfterOperationTime message is sent at the end of the transaction, - just before the Undo recording is closed, and before the update message. - The code is \c #kChangeOperationCode, regardless of whether a more - specific code was sent at \c #kBeforeOperationTime). - This is the appropriate place to make any changes to the edit art. - - @note An edit to children of the edit art does NOT always send a - notify-edits message, although every edit sends an update message. - Notify-edits is meant for highly structured objects where - the different descendants have specific roles to play in the plug-in. - Basic edits that are likely to require a specific response from plug-ins - trigger the notify-edits message. Changes that are harder to generalize - trigger only the update message. -

- For blend objects, for example, moving a spine point should cause - the objects to move onto the spine, but moving a blend component should cause - the spine point to move with the art object. Looking only at the post-edit - state of the edit art, it would be hard to detect the difference between those - two edits, since in both of them the only easily detected discrepancy, without - knowing which paths were edited, is that the art elements are off the spine. */ -#define kSelectorAINotifyEdits "AI Notify Edits" - -/** @ingroup Selectors - Notifies a plug-in group that the result group needs to be rebuilt. - See \c #AIPluginGroupSuite */ -#define kSelectorAIUpdateArt "AI Update" - -/** @ingroup Selectors - Asks a plug-in group whether the Layers palette shows edit groups. - See \c #AIPluginGroupSuite */ -#define kSelectorAICanShowContents "AI Show Contents" - -/** @ingroup Selectors - Asks a plug-in group to interpolate plug-in data and dictionary contents - when interpolations are made into a blend between plug-in groups. - @see \c #kPluginGroupBlendAsPluginGroup - - Uses \c #AIPluginGroupMessage::time to indicate what stage of - the operation is in progress. Not sent at \c #kCheckOperationTime, but you - can use the \c #kBeforeOperationTime message to check whether the operation is allowed. - - At all stages, \c #AIPluginGroupMessage::preEditArt is the plug-in group being - blended from (the one closest to t=0), and \c #AIPluginGroupMessage::postEditArt - is the plug-in group being blended to (the one closest to t=1). - - \c #AIPluginGroupMessage::art is only used at \c #kDuringOperationTime. - - When the stage is \c #kBeforeOperationTime: - \li If the plug-in returns \c #kRefusePluginGroupReply, - the interpolated steps are ordinary groups blending the result groups, - just as if the \c #kPluginGroupBlendAsPluginGroup option was off or the - plug-in groups were of different classes. No further messages are sent. - This lets the plug-in decide whether the two groups are blendable as plug-in - groups based on their data or contents. - \li If the plug-in returns \c #kDontCarePluginGroupReply, the edit groups - are blended, then the \c #kSelectorAIUpdateArt message is sent. - There are no \c #kDuringOperationTime or \c #kAfterOperationTime messages. - The intermediate objects are of the same plug-in group class. - Their plug-in data and dictionary contents are duplicated from - the \c postEditArt object.
- This reply is meant for plug-in groups that do everything identically - for all of their objects and do not need any extra data. It could also - be returned when the plug-in determines that the two objects - have the same data. - - \li If the two plug-in groups are blendable as plug-in groups, - and you need to interpolate their data, set up any data you - will need for the \c #kDuringOperationTime messages, then return - either \c #kNoErr or \c #kWantsAfterMsgPluginGroupReply. - - The \c #kBeforeOperationTime message is the time to do anything - that you want to do only once per blend, instead of once per step, - such as finding and recording the commonalities, differences, and - blendable aspects of the two objects. This temporary data can be - stored in \c #AIPluginGroupMessage::AIInterruptData, or attached to the - \c preEditArt and \c postEditArt objects. - - The \c #kDuringOperationTime message is sent only when the \c #kBeforeOperationTime - message returns either \c #kNoErr or \c #kWantsAfterMsgPluginGroupReply. For each step, - Illustrator creates a plug-in group of the same class, blends the edit group contents - as if they were ordinary groups, and passes that interpolated object in - \c #AIPluginGroupMessage::art (which is used only at this stage). -
\c #AIPluginGroupMessage::t indicates which step has been reached. - The interpolated objects are created with empty dictionaries - and no plug-in data. This is the time for the plug-in to attach any - interpolated data. - - The \c #kAfterOperationTime message is sent after all the interpolated steps - have been created, if \c #kWantsAfterMsgPluginGroupReply was returned from any of the - \c #kBeforeOperationTime or \c #kDuringOperationTime notifications. It - gives you a chance to release any data you have set up. - - Any reply other than these is treated as an error and causes the blend - not to be created at all. - */ -#define kSelectorAIInterpolateData "AI Interpolate Data" - -/** @ingroup Selectors - Asks a plug-in group to replace symbols used in its dictionary. - Sent to plug-in groups that are selected when user chooses Replace Symbol - in the Symbol palette. You are not required to handle this notification, - even if the plug-in group uses symbols. The sender does not modify the dictionary. - See \c #AIReplaceSymbolMessageData - \li If your handler rebuilds the result group, call \c #AIPluginGroupSuite::MarkPluginArtClean(). - If you modify only the dictionary, call \c #AIPluginGroupSuite::MarkPluginArtDirty(), - so that the update notification is sent upon return from the handler. - \li If the handler performs the symbol replacement, return \c #kDidSymbolReplacement - The caller uses this to decide whether to set the Undo/Redo strings, and so on.*/ -#define kSelectorAIReplaceSymbol "AI Art Replace Symbol" - -/** @ingroup Selectors - Asks a plug-in group whether it allows art objects of a given type in its edit group. - Sent if the plug-in group option \c #kPluginGroupRestrictsArtTypes is on. - Sent before an insertion into the edit group is made, whether interactive or programmatic. - Not sent if the plug-in group is as under construction within the - current context. - - Valid return values are: - \li \c #kNoErr: Plug-in groups managed by this plug-in do allow art objects of the given type. - \li \c #kRefusePluginGroupReply: Plug-in groups managed by this plug-in do not allow art objects - of the given type. - \li \c #kCheckPluginGroupReply: Requests a \c #kSelectorAINotifyEdits notification - with \c code \c #kTopologyOperationCode and \c subCode \c #kPasteIntoOpCode, - so that the plug-in manager can take other factors into account, such as the options - attached to the specific plug-in group receiving the new art. - - See \c #AIPluginArtTypeMessageData */ -#define kSelectorAIDisallowsArtTypeQuery "AI Plugin Group Disallow Art Type" - -/** @ingroup Selectors - Asks a plug-in group to perform a custom hit test. - Sent when \c #AIHitTestSuite::CustomHitTest() is called for a plug-in group, - when a hit occurs within the bounds of the plug-in group object. - \li If the handler finds a hit, return \c #kCustomHitPluginGroupReply and store the - custom hit information in \c #AIPluginGroupCustomHitTestData::CustomHitData. - \li If the handler does not find a hit, return \c #kNoErr - - See \c #AIPluginGroupCustomHitTestData */ -#define kSelectorAIPerformCustomHitTest "AI Plugin Group Perform Custom Hit Test" - -/** @ingroup Selectors - Asks a plug-in group to collect the paint styles of all objects - for which it privately manages styles. - Sent if the \c #kPluginGroupManagesPaintStyles option flag is on. - Your handler iterates the art styles or path styles in plug-in group art to a - callback function, which can examine, but not modify the art styles and art objects. - - Call the desired callback function repeatedly until either all the relevant styles - have been iterated, or until the callback returns an error or \c #kIterationCanQuitReply. - Return this as the result of the notification. - - Use to process information about style-related attributes of - selected objects, such as fill or stroke attributes, when the styles do not map - directly onto the styles of selected objects within the edit group. - A stroke style, for example, might apply only to certain bezier segments - and not to an entire path.You can keep styles in a dictionary, along with - information about parts of the edit group and/or result group to which those styles apply. - - You can iterate partial styles to privately accumulate a report for multiple objects. - Invalid fields, as identified by the style map, are considered \e mixed in the plug-in group. - For example, if \c fillPaint is false in the style map, it means that some - potentially-fillable contents are filled, and some are not filled. - If it is difficult or time-consuming to determine which styles - correspond to selected objects, you can privately cache the results of an accumulated style and - style map, and call the path-style callback only once with those cached results. Clear the cache - on a selection-changed or properties-changed notifier. - - See \c #AIPluginGroupCollectPaintStylesData */ -#define kSelectorAICollectPaintStyles "AI Plugin Group Collect Paint Styles" - -/** @ingroup Selectors - Sent only if the \c #kPluginGroupManagesPaintStyles option flag is on. - Asks the plug-in group to merge a path style into those of its selected descendants, - or perform a transformation on the path styles. See \c #AIPluginGroupApplyPaintStylesData, - - @note The notify-edits message informs the plug-in group that - styles are being transformed externally, while this message - asks the plug-in group to do the transformation. - */ -#define kSelectorAIApplyPaintStyles "AI Plugin Group Apply Paint Styles" - -/** @ingroup Selectors - Asks a plug-in group to apply a developer-defined color-mapping - callback function to objects for which it privately manages styles or colors. - - Initiated by plug-ins or other system components that want to alter all the colors - in a collection of objects. Your handler must iterate through the colors within - the plug-in group that fit the request, passing them to the supplied callback. - - The message data, \c #AIPluginGroupAdjustColorsData, contains three callback procedures, - for colors, styles, and patterns. Your handler must execute the proper callback - on each data entry of the appropriate type that contains meaningful colors; that is, - those that can affect the colors in the result art. - - \li If the plug-in group contains art objects with meaningful colors in its dictionary or - plug-in group data, (for example,the content art of Envelope objects in Edit Envelope mode), - call \c #AIPathStyleSuite::AdjustObjectAIColors() for those objects, passing in the - \c #AIPluginGroupAdjustColorsData::adjustColorCallback and - \c #AIPluginGroupAdjustColorsData::callbackData. - - \li You need not process art objects whose colors are ignored in building the result art; - for example, the gradient mesh that defines the distortion in an Envelope object. - - For private color data not contained in an \c #AIArtHandle, choose the callback - that most directly matches the data types the plug-in stores. For example, if it - stores an \c #AIArtStyleHandle, use the style callback, rather than attempting - to iterate the colors in the art style. - - If the option \c #kPluginGroupManagesPaintStyles is on for the plug-in, the handler - for this message performs the entire adjustment for the plug-in group. If the option is off, - the colors in the edit group are further processed after this handler - completes, unless your handler returns \c #kSkipEditGroupReply. - - To initiate this request to a plug-in group that your plug-in does not manage, - call \c #AIPluginGroupSuite::PluginArtAdjustColors(). - - @note Adobe internal developers: See \c AIPluginSelectionAdjustColors in - Adobe internal suite \c AIPluginSelection for when the plug-in group - manages its own selection mode. - */ -#define kSelectorAIAdjustColors "AI Plugin Group Adjust Colors" - - /** @ingroup Selectors - Sent to plug-ins where the \c #kPluginGroupAskToShowContents option is set, - to request the "Show Contents" mode. The plug-in should enter a mode where the - contents are shown and editable. - If this does not make sense for a particular plug-in group, ignore the call. */ - #define kSelectorAIShowContents "AI Plugin Group Show Contents" - -/** Options for \c #AIPluginGroupSuite::AddAIPluginGroup(). - Options affect how operations on a plug-in group affect the - result group, and whether the notifications are sent after an operation. - Notifications include \c #kSelectorAIUpdateArt "AI Update" and - \c #kTransformOperationCode "AI Notify Edits". - (Options cannot be changed after the class is defined.) */ -enum AIPluginGroupOptions { - /** If on, updates are triggered by edits to non-descendant objects - that overlap the bounds of the editable art. This is intended for objects - with lens-like effects (distorting what they move over), or - avoidance behavior (moving away from what moves over them). */ - kPluginGroupWantsOverlapUpdateOption = (1<<1), - /** If on, when the entire plug-in group is translated as a whole, the - result group is transformed as well, and no update message is sent. */ - kPluginGroupWantsAutoTranslateOption = (1<<2), - /** If on, when the entire plug-in group is scaled uniformly, the - result group is transformed as well, and no update message is sent. */ - kPluginGroupWantsAutoUScaleOption = (1<<3), - /** If on, when the entire plug-in group is transformed as a whole by any matrix, - the result group is transformed as well, and no update message is sent. - The notify-edits message is sent to let the plug-in know what has been done; - A zero return from the automatically-handled operation types is treated - like a \c #kDontCarePluginGroupReply return, so you need not register for - the notify-edits message if you do not need to respond to it. */ - kPluginGroupWantsAutoTransformOption = (1<<4), - /** If on, hit testing by other tools does fill hit testing on the edit group. - (The plug-in's own tool controls its own hit testing.) By default, - the edit group is only outline-hit, because objects in the edit group - are not previewed. Use this options if you copy the edit group contents into the - result group and then add things, making it appear that the edit - group paths are previewed. This allows direct selection of individual editable - paths with a fill click. - - When on, if there are some edit group objects whose fills or strokes are - \e not copied into the result group, you must check style change notifications - to turn off any fill or stroke paint that the user has given to those objects. - Otherwise, hits can occur on elements you have not painted. - See also \c #kPluginGroupForceFillHitOnClosedPaths. */ - kPluginGroupDoEditFillHitOption = (1<<5), - /** If off (the default), when a user edit removes all objects from the edit group, - the whole plug-in group object is deleted (analogous to the behavior of non-layer groups). - If on, the plug-in group remains in the artwork after its edit group has been emptied. - Use for objects that build their result art based entirely on private data that requires - no edit art, or that behave like layers in that they can maintain the drawing insertion - focus while empty. For implementing layer-like plugin groups, see also the flags - #kPluginGroupDoNotTarget and #kPluginGroupDoNotSmartTarget. */ - kPluginGroupKeepWhenEmptyOption = (1<<6), - - /** If on, the objects in the result group behave like fill of the - objects in the edit group. You could use this, for example, to - implement ink hatching. Setting this flag informs other plug-ins - of your plug-in group's behavior. For example, an Expand Fill filter - could expand plug-in groups if this flag is on, or a Fill Color could - refuse to assign a pattern or gradient fill to the edit group objects, - knowing that the result group is acting as the fill. (Assigning solid color - should be permitted, since fill-like plug-in groups often colorize their fills.) - Default is off. */ - kPluginGroupIsFillLike = (1<<7), - /** If on, the objects in the result group behave like stroke of the - objects in the edit group. You could use this, for example, for brushes. - Setting this flag informs other plug-ins of your plug-in group's behavior. - For example, an Expand Stroke filter could expand plug-in groups if this - flag is on, or the Stroke palette could ignore stroke attributes, - knowing that the result group is acting as the stroke. Default is off. - - If both this and \c #kPluginGroupIsFillLike are off, the result group objects - are treated as related to the edit group in some way other than fill or stroke - effect. An example is path interpolation blends. */ - kPluginGroupIsStrokeLike = (1<<8), - - /** If on, the plug-in group object can never be targeted. - Illustrator always recurses into the contents of the edit group - to find targeted objects, regardless of whether the plug-in group object - is fully selected. This flag prevents users from targeting the - plug-in group and applying styles, transparency or effects to that level, - even via the Layers or Appearance panels. - Also, if this flag and #kPluginGroupKeepWhenEmptyOption are both on, - then the plugin group will act very much like a layer, in that commands - such as Group, Cut, Delete, Copy and copy-drag will operate upon the contents - of the edit group, somewhat as if it were only partially selected, rather - than the entire plugin group. See also #kPluginGroupDoNotSmartTarget. - */ - kPluginGroupDoNotTarget = (1<<9), - /** If on, selecting any piece inside the edit group automatically targets - the plug-in group level. This targeting behavior is similar to that of - compound paths. Fill/stroke changes apply to the plug-in group level, - and the "Contents" field is not shown in the Appearance palette. - The Compound Shapes plug-in group uses this option. - Users can still target the objects inside the edit group - individually in the Layers palette. */ - kPluginGroupAlwaysSmartTarget = (1<<10), - /** If on, the plug-in group is not targeted when fully selected. Users must - target the plug-in group through the Layers panel or the Appearance panel. - Also, if this flag and #kPluginGroupKeepWhenEmptyOption are both on, - then the plugin group will act very much like a layer, in that commands - such as Group, Cut, Delete, Copy and copy-drag will operate upon the contents - of the edit group, somewhat as if it were only partially selected, rather - than the entire plugin group. See also #kPluginGroupDoNotTarget. - Do not set both this option and \c #kPluginGroupAlwaysSmartTarget for the - same plug-in group. */ - kPluginGroupDoNotSmartTarget = (1<<11), - - /** If on, plug-in objects of this plug-in group can be clipping objects. - The result art of a clipping object is used as a clip, if its type - makes this possible. */ - kPluginGroupCanBeClipping = (1<<12), - - /** If on, the Layers palette always shows the contents of the edit group. */ - kPluginGroupAlwaysShowContents = (1<<13), - /** If on, the Layers palette queries the plug-in group with the - \c #kSelectorAICanShowContents message to ask if it may expand - the plug-in group. The plug-in group should reply with \c #kRefusePluginGroupReply - if it is \e not okay to expand. */ - kPluginGroupAskToShowContents = (1<<14), - - /** Together with \c #kPluginGroupBlendAsPluginGroup, defines how plug-in groups - other than blends act when they appear inside a blend. This one is tested first. - - If on, and the selection includes any other plug-in group with this flag on, - the Make Blend command is disabled. Also, fully selected plug-in groups with - this option on do not respond to clicks of the Blend tool (although you can - still create blends INSIDE of them.) - - If the selection contains no plug-in groups with this flag on, then plug-in groups - that are blended to anything other than another plug-in group of the same class - with the \c #kPluginGroupBlendAsPluginGroup flag on are treated as if they - were their result group. The interpolated objects are ordinary groups. */ - kPluginGroupDisableBlends = (1<<15), - - /** Together with \c #kPluginGroupDisableBlends, defines how plug-in groups - other than blends act when they appear inside a blend. - \c #kPluginGroupDisableBlends is tested first. - - If the blend includes two adjacent plug-in groups of the same plug-in class, - and this option on for that class, then the interpolated objects - are also of the same plug-in class. The contents of the edit groups of - the two plug-in objects are blended as if they were ordinary groups. The plug-in - can then interpolate the plug-in group data and dictionary contents; - see \c #kSelectorAIInterpolateData. Finally the interpolated plug-in groups are - sent the \c #kSelectorAIUpdateArt message. */ - kPluginGroupBlendAsPluginGroup = (1<<16), - - /** If on, the plug-in group restricts which types of objects can be inserted - into its edit group, and should handle the \c #kSelectorAIDisallowsArtTypeQuery - message. This differs from the check you do for a \c #kBeforeOperationTime - \c #kSelectorAINotifyEdits response, in that such a check passes in - a specific prospective-contents object to a specific plug-in group, and checks - whether that object can be inserted. The \c #AIPluginArtTypeMessageData does not - have a specific art object, only an art type. You can use it, for example, to - disable tools or commands that might otherwise create a new object of that type, - or to provide cancel feedback on mouse over. */ - kPluginGroupRestrictsArtTypes = (1<<17), - - /** Provides a lighter-weight, less flexible version of customized fill hit testing. - - If on, the plug-in group is treated as if it supplied fill paint on closed paths, - so that selection tools select those paths in the edit group when clicking - in their interiors, even if they have no fill paint of their own and no ancestor art style supplies - fill paint. - - See also \c #kPluginGroupForceFillHitOnAllPaths (the same, but for all paths) - - Edit fill hit testing is done only after outline testing fails to hit anything in - the whole edit group, so front contents do not obscure outlines of back contents. It is also done - only if something is hit in the result group, so that paths that are unfilled and that do not - overlap any filled region are not selected. - - If on, this option takes precedence over \c #kPluginGroupDoEditFillHitOption, meaning that - the plug-in group has private data that it uses to supply fills (rather than edit objects - being copied into the result group). - - This option is not the best choice if the plug-in group supplies private fills - on only some parts of the edit group, or if the fill geometry is transformed. In that case, - custom hit testing allows more customization, but takes longer. */ - kPluginGroupForceFillHitOnClosedPaths = (1<<18), - - /** Provides a lighter-weight, less flexible version of customized fill hit testing. - - If on, the plug-in group is treated as if it supplied fill paint on all paths, - so that selection tools select those paths in the edit group when clicking - in their interiors, even if they have no fill paint of their own and no ancestor art style supplies - fill paint. - - See \c #kPluginGroupForceFillHitOnClosedPaths for additional details. */ - kPluginGroupForceFillHitOnAllPaths = (1<<19), - - /** If on, paint styles applied to content of this plug-in group should not be obtained or set - by accessing the art styles of objects in the edit group, but instead by asking the plug-in group to - get or set the paint styles attached to objects that it considers selected. The plug-in - receives the \c #kSelectorAICollectPaintStyles message when Illustrator would normally - iterate the art styles attached to children of the edit group, and receives the - \c #kSelectorAIApplyPaintStyles message when Illustrator would normally set the art - styles attached to children of the edit group. - - See also \c #AIPluginGroupCollectPaintStylesData, \c #AIPluginGroupApplyPaintStylesData - - Use if art styles attached to selected objects in the edit group do not reflect what the user - sees as the selected styles. (The contents of the edit group are not previewed, so the styles - in the result group are what the user sees, and they may not correspond directly to the styles used - in the edit group.) Also useful for plug-in groups that manage selection state in a way that does - not map directly onto object selection within the edit group. - - This flag is not compatible with any of the target flags (\c #kPluginGroupDoNotTarget, - \c #kPluginGroupAlwaysSmartTarget, \c #kPluginGroupDoNotSmartTarget). - */ - kPluginGroupManagesPaintStyles = (1<<20), - - /** If on, the plugin group allows at least some grouping operations to be performed - inside of it. Grouping operations include Group, Ungroup, Make Compound, Make Clip, - and their corresponding Release operations, plus Expand Appearance and Expand, - since they typically convert a leaf object into a group. If off, no grouping - operations are attempted and no #kCheckOperationTime message is sent. - The reason there is a flag rather than just using a #kCheckOperationTime message - before the edit, as is done for most kinds of edits, is that until CS 6, grouping - operations were unilaterally disallowed inside all plugin groups. Since the default - for no response to a kCheckOperationTime message is to assume that the operation - IS allowed, in order not to alter the runtime environment for legacy plugins we - must default to sending no message and not attempting the operation. - */ - kPluginGroupPermitsGroupCmds = (1<<21) -}; - - -// These are the errors returned by calls to AIPluginGroup suite functions (other than the AIArt standards). - -/** @ingroup Errors - Plug-in group not found (when looked up by name). See \c #AIPluginGroupSuite */ -#define kUnknownPluginGroupErr 'GRP?' -/** @ingroup Errors - Plug-in group already attached to an object. See \c #AIPluginGroupSuite::SetPluginArtPluginGroup() */ -#define kAttachedPluginGroupErr 'GRP!' -/** @ingroup Errors - See \c #AIPluginGroupSuite::SetPluginArtDataCount() */ -#define kTooMuchDataPluginGroupErr 'FULL' - -/** Limit on the size of the data store in a plug-in group. */ -#define kPluginStoreLimit ( 32 * 1024 ) - - -/** @ingroup Errors - Return code for response to \c #kSelectorAIDisallowsArtTypeQuery when - \c #AIPluginGroupMessage::time is \c #kCheckOperationTime, - if the edit should not happen. */ -#define kRefusePluginGroupReply 'RFSE' -/** @ingroup Errors - Return code for response to \c #kSelectorAIDisallowsArtTypeQuery when - \c #AIPluginGroupMessage::time is \c #kCheckOperationTime, - if the plug-in group wants to get a \c #kSelectorAINotifyEdits message with - \c #kCheckOperationTime to refine the answer to the query. */ -#define kCheckPluginGroupReply 'CHEK' -/** @ingroup Errors - Return code for response to \c #kSelectorAIInterpolateData, - if the plug-in group wants to get a \c #kAfterOperationTime message - before the \c #kSelectorAIUpdateArt message. */ -#define kWantsAfterMsgPluginGroupReply 'AFTR' -/** @ingroup Errors - Return code for response to \c #kSelectorAIReplaceSymbol message - if the plug-in group did perform the requested replacement. */ -#define kDidSymbolReplacement 'dsRP' - -/** @ingroup Errors - Return code for response to \c #kSelectorAINotifyEdits - at \c #kAfterOperationTime, if the plug-in group has already updated - the object. (The default behavior, on \c #kNoErr, is to mark - the object as dirty, in need of \c #kSelectorAIUpdateArt.) - - @see \c #AIPluginGroupSuite::MarkPluginArtClean() */ -#define kMarkValidPluginGroupReply 'VALD' -/** @ingroup Errors - Return code for response to \c #kSelectorAINotifyEdits at - \c #kAfterOperationTime, if the edit is irrelevant to this plug-in. - For example, changing the "show center" attribute or locking edit-art - contents rarely affects the result art. - Retains the state of the object, and does not mark it as clean or dirty. */ -#define kDontCarePluginGroupReply 'MOOT' -/** @ingroup Errors - Return code for response to \c #kSelectorAINotifyEdits. - If returned from \c #kAfterOperationTime with \c #kReadOperationCode, - it means that the plug-in group should be destroyed upon return. - If returned from \c #kAfterOperationTime with \c #kChangeOperationCode, - it means that the plugin deleted itself in response to the notification, - and therefore should not be dereferenced afterwards. (It is invalid for - a plugin group to delete itself when handling other notifications.) -*/ -#define kDestroyPluginGroupReply 'TRSH' -/** @ingroup Errors - Return code for response to \c #kSelectorAIPerformCustomHitTest, - message if the custom hit test wants to report a hit. - A return of \c #kNoErr means a hit will not be reported */ -#define kCustomHitPluginGroupReply 'CHIT' -/** @ingroup Errors - Return code for response to \c #kSelectorAIAdjustColors message if - the plug-in group does not want the colors in the edit group to be visited. */ -#define kSkipEditGroupReply 'skpE' - - -/** For the \c #kSelectorAINotifyEdits and \c #kSelectorAIInterpolateData - messages, an operation time that indicates the - relationship of the notification to the stage of the operation. - An \c #AIPluginGroupMessage::AIOperationTime value. - The times are: -
\c #kCheckOperationTime -
\c #kBeforeOperationTime -
\c #kAfterOperationTime -
\c #kDuringOperationTime - - @note You must not dispose of or reorder any artwork objects during a - \c #kCheckOperationTime or \c #kBeforeOperationTime notification. - Any editing must wait until \c #kAfterOperationTime. -*/ -typedef const char *AIOperationTime; - -// the times themselves - -/** Determine whether the plug-in allows this operation. Not sent - for \c #kSelectorAIInterpolateData. - An \c #AIPluginGroupMessage::time value.*/ -#define kCheckOperationTime "AI Check Operation Time" -/** Prepare for the operation to occur. - An \c #AIPluginGroupMessage::AIOperationTime value.*/ -#define kBeforeOperationTime "AI Before Operation Time" -/** The operation has completed. - An \c #AIPluginGroupMessage::AIOperationTime value. */ -#define kAfterOperationTime "AI After Operation Time" -/** The operation is ongoing. Sent only for \c #kSelectorAIInterpolateData. - An \c #AIPluginGroupMessage::AIOperationTime value. */ -#define kDuringOperationTime "AI During Operation Time" - - -/** For \c #kSelectorAINotifyEdits, an \c #AIPluginGroupMessage::code - value that indicates the type of editing operation being performed. - - These code values refer to the entire plug-in group object: -
\c #kReadOperationCode -
\c #kWriteOperationCode -
\c #kAttachOperationCode -
\c #kExpandOperationCode - - For these code values, the editing parameters, - \c #AIPluginGroupMessage::preEditArt and \c #AIPluginGroupMessage::postEditArt - indicate the edit group or member that has been or will be edited: -
\c #kOrderingOperationCode -
\c #kTransformOperationCode -
\c #kGeometryOperationCode -
\c #kTopologyOperationCode -
\c #kDeleteOperationCode -
\c #kAttributeOperationCode -
\c #kStyleOperationCode -
\c #kChangeOperationCode - - The editing parameters are valid only during \c #kCheckOperationTime and - \c #kBeforeOperationTime, where one notify-edits message is sent for - each top-level affected or selected descendant of the plug-in object. - For example, if an entire group is selected but its parent is not fully selected, - that group is passed as the \c preEditArt, but not its children. - - For some codes, additional subcodes indicate which of several operations of - the given type is occurring. Subcodes are \c #AIErr (four-byte \c char) values, - that can be used in debugging as well as allowing switch statements. - */ -typedef const char *AIOperationCode; - -// the codes themselves - -/** Translate data from external to internal representation at - \c #kAfterOperationTime. */ -#define kReadOperationCode "AI Read Operation Code" -/** Translate data from internal to external representation at - \c #kBeforeOperationTime, and back to internal at \c #kAfterOperationTime. - \c Also sent at #kCheckOperationTime when a plug-in can reply - kRefusePluginGroupReply to indicate that the plug-in art cannot be written and - must be expanded (reply kNoErr otherwise). - */ -#define kWriteOperationCode "AI Write Operation Code" -/** Sent when \c #AIPluginGroupSuite::UseAIPluginGroup() is called to associate - a specific plug-in object with the plug-in group. Allows you to check for - consistency and confirm that the group can accept the given object. - */ -#define kAttachOperationCode "AI Attach Operation Code" -/** Sent only at \c #kCheckOperationTime and \c #kBeforeOperationTime (after an - Expand, the object no longer exists). The plug-in art object is about to be - expanded, that is, replaced by its result art contents. Remove from the result - art descendants any tags or other state specific to the plug-in, and remove - from the plug-in's global data anything that tracks this art object. */ -#define kExpandOperationCode "AI Expand Operation Code" -/** Send to front, back, forward, backward. See \c #AIOrderingOperationSubcodes for - subcode values. */ -#define kOrderingOperationCode "AI Ordering Operation Code" -/** Matrix operations on whole objects. See \c #AITransformOperationSubcodes for subcode - values. */ -#define kTransformOperationCode "AI Transform Operation Code" -/** Segments of a path have been modified. See \c #AIGeometryOperationSubcodes for subcode - values. */ -#define kGeometryOperationCode "AI Geometry Operation Code" -/** A single object is being replaced by multiple. Also covers paste into edit art. - See \c #AITopologyOperationSubcodes for subcode values. - @note A join of two paths is indicated by a Geometry of one followed by a Delete - of the other, not a Topology (because the \c preEditArt must always be a - single existing descendant of the edit art group). */ -#define kTopologyOperationCode "AI Topology Operation Code" -/** An element of the edit art group is being deleted */ -#define kDeleteOperationCode "AI Delete Operation Code" -/** Lock/unlock, show/hide, or changing the name or xml UID. - See \c #AIAttributeOperationSubcodes for subcode values. */ -#define kAttributeOperationCode "AI Attribute Operation Code" -/** Path style or text style modifications. See \c #AIStyleOperationSubcodes for subcode - values. */ -#define kStyleOperationCode "AI Style Operation Code" -/** Sent only at \c #kAfterOperationTime, a generic or mixed operation occurred that - does not fit into other categories. Provides no other details of the operation. */ -#define kChangeOperationCode "AI Change Operation Code" - - -// - -/** Subcode values for \c #kChangeOperationCode (only at \c #kAfterOperationTime) */ -enum AIChangeOperationSubcodes { - /** Something in the edit group has been modified by plug-in calls, and - Illustrator is about to pop the context. There will have been no - \c #kBeforeOperationTime notification. Handler must not modify anything other - than the plug-in object itself (because it is called in a loop that - is processing the artwork tree). */ - kPluginSyncArtOpCode = 'PLUG' -}; - -/** Subcode values for \c #kOrderingOperationCode */ -enum AIOrderingOperationSubcodes { - kSendToBackOpCode = 'BACK', - kSendToFrontOpCode = 'FRNT', - kSendBackwardOpCode = 'DOWN', - kSendForwardOpCode = 'UPWD', - kReverseGroupOpCode = 'RVRS', - - /** The \c #AIPluginGroupMessage::preEditArt is in the plug-in group, - and is being moved to another location which is also inside the plug-in group. - See \c #AIPluginGroupMessage::insertionOrder and \c #AIPluginGroupMessage::destinationArt - for the destination of the move. - Used only if the movement is not equivalent to one of the more specific commands above. */ - kSendInternalOpCode = 'SINT', - - /** The \c #AIPluginGroupMessage::preEditArt is in the plug-in group, and is about - to be reordered to a location outside the plug-in group. - See \c #AIPluginGroupMessage::insertionOrder and \c #AIPluginGroupMessage::destinationArt - for the destination of the move. - This is a chance to remove any private dictionary entries from the \c preEditArt.) */ - kReorderOutCode = 'MVOT', - - /** The \c #AIPluginGroupMessage::preEditArt is outside the plug-in group, and is - about to be reordered to a location inside the plug-in group, - See \c #AIPluginGroupMessage::insertionOrder and \c #AIPluginGroupMessage::destinationArt - for the destination of the move. - (Typically handled in the same way as a \c #kPasteIntoOpCode for \c #kTopologyOperationCode.) */ - kReorderIntoOpCode = 'MVIN' -}; - -/** Subcode values for \c #kTransformOperationCode */ -enum AITransformOperationSubcodes { - kTranslationOpCode = 'MOVE', - kRotationOpCode = 'ROTA', - kUniformScaleOpCode = 'USCA', - kNonUniformScaleOpCode = 'NSCA', - kShearOpCode = 'SHER', - kReflectionOpCode = 'REFL', - kMixedTransformOpCode = 'MTFM' -}; - -/** Subcode values for \c #kGeometryOperationCode */ -enum AIGeometryOperationSubcodes { - kMiscPathChangeOpCode = 'GEOM', - /** Unused */ - kMovePointsOpCode = 'MPTS', - /** Unused */ - kAdjustControlsOpCode = 'ADJC', - /** Unused */ - kAddPointsOpCode = '+PTS', - /** Unused */ - kRemovePointsOpCode = '-PTS', - /** Unused */ - kReverseSegmentsOpCode = 'RVRS', - /** Unused */ - kOpenCloseOpCode = 'OPCL', - /** Unused */ - kSwapSymbolsOpCode = 'SWSM' -}; - -/** Subcode values for \c #kTopologyOperationCode These are sent - at \c #kBeforeOperationTime, and provide additional information - about what type of change is about to occur. Your handler can update - private data, but must not make any changes to the edit group. -*/ -enum AITopologyOperationSubcodes { - /** One path is replaced by two. */ - kScissorOpCode = 'SCIZ', - /** The \c #AIPluginGroupMessage::postEditArt (or its children if it is a group) - will be inserted into the edit art below \c #AIPluginGroupMessage::preEditArt - (which is the same as \c #AIPluginGroupMessage::destinationArt.) - */ - kPasteBelowOpCode = 'PBEL', - /** The \c #AIPluginGroupMessage::postEditArt (or its children if it is a group) - will be inserted above \c #AIPluginGroupMessage::preEditArt - (which is the same as \c #AIPluginGroupMessage::destinationArt.) */ - kPasteIntoOpCode = 'PINT', - /** The \c #AIPluginGroupMessage::postEditArt (or its children if it is a group) - will be inserted below \c #AIPluginGroupMessage::preEditArt - (which is the same as \c #AIPluginGroupMessage::destinationArt.) */ - kPasteAboveOpCode = 'PABV', - /** The \c #AIPluginGroupMessage::postEditArt is a transformed copy of \c preEditArt. - Typically it will be inserted above \c #AIPluginGroupMessage::preEditArt. - Check \c #AIPluginGroupMessage::destinationArt and \c #AIPluginGroupMessage::insertionOrder - for the insertion location. */ - kTransformCopyOpCode = 'TCOP', - /** The \c #AIPluginGroupMessage::preEditArt will be changed into a type path. */ - kTypePathChangeOpCode = 'TYCH', - /** Unused */ - kReplaceOneOpCode = 'REP1', - /** Unused */ - kReplaceByManyOpCode = 'REPM', - /** The \c #AIPluginGroupMessage::postEditArt is a non-transformed copy of \c preEditArt, - which will be inserted in the art edit group or a descendant. - Check \c #AIPluginGroupMessage::destinationArt and - \c #AIPluginGroupMessage::insertionOrder for the insertion location. - */ - kDuplicateInsideOpCode = 'DUPi', - /** Sent only at \c #kAfterOperationTime. The \c #AIPluginGroupMessage::postEditArt - is a copy of \c preEditArt which was moved outside the plug-in group. - Allows you to remove any private tags or dictionary entries - from the \c postEditArt. */ - kDuplicateOutsideOpCode = 'DUPo', - /** The selected objects inside the plugin group are to be combined into a - group, compound path, or clipping group. The \c #AIPluginGroupMessage::preEditArt - is the first encountered selected component of the plugin group, which determines - where the new group will be placed in the stacking order. At \c #kCheckOperationTime - and \c #kBeforeOperationTime the \c #AIPluginGroupMessage::postEditArt is an - empty art object of the type that is going to be created. The plugin can call - \c #AIArtSuite::GetArtType() to determine whether a group or compound path is being - created, and can call \c #AIGroupSuite::GetGroupClipped() when the type is \c #kGroupArt - to determine when a clipping group is being created. The \c postEditArt at pre-edit - time is not necessarily the same \c AIArtHandle that is created, - and is definitely not in the art tree; it has a null parent. - If this message is sent at \c #kAfterOperationTime, the \c postEditArt is the - resulting group or compound path art. - This operation code is sent only if the \c #kPluginGroupPermitsGroupCmds option - is set. If that option is off, no group operations are attempted. - */ - kMakeGroupOpCode = 'GRUP', - /** The \c #AIPluginGroupMessage::preEditArt will be ungrouped or released. - If it is a nested plugin group, it will be replaced by its edit art group. - This operation code is sent only if the #kPluginGroupPermitsGroupCmds option - is set. If that option is off, no release group operations are attempted. - */ - kReleaseGroupOpCode = 'UNGP', - /** If non-null, the \c #AIPluginGroupMessage::preEditArt will be expanded into a group - that expands all or part of the appearance. If it is a nested plugin group, it will - be expanded into its result group. If it is an object with an active art style, - it will be replaced by the styled art. If it has a basic appearance, either the - fills or strokes or both will be expanded. If the \c preEditArt is null or is the - plugin group itself, then the plugin group is partially selected and is about to be - examined by one of the Expand commands. This gives the plugin group a chance to return - \c #kRefusePluginGroupReply to skip examination of the contents, if the plugin group - disallows all expansions inside (but allows \c #kMakeGroupOpCode and/or \c #kReleaseGroupOpCode.) - No attempt is made to inform the plugin group of the details of the operation, - as there are too many variations, and the main intent is to ask whether the expansion - is allowed at all. - This operation code is sent only if the \c #kPluginGroupPermitsGroupCmds option - is set. If that option is off, no expansion operations are attempted inside the - plugin group. - See also \c #kExpandOperationCode for notifications of the expansion of the entire - plugin group. - */ - kExpandInsideOpCode = 'ExpI' -}; - -/** Subcode values for \c #kStyleOperationCode */ -enum AIStyleOperationSubcodes { - kPathStyleOpCode = 'PATH', - /** Unused */ - kTextStyleOpCode = 'ATET', - /** Unused */ - kArtStyleOpCode = 'ARTS' -}; - -/** Subcode values for \c #kAttributeOperationCode - By default, a c #kNoErr return (usually meaning the notification was not handled) - for the Name subcode does not mark the plugin group dirty, because it is not - expected to change the contents of the result group for a typical plugin group. - This is in contrast to most edit notifications, which mark the plugin group - dirty unless it receives a \c #kDontCarePluginGroupReply from a \c #kBeforeOperationTime - notification or a \c #kMarkValidPluginGroupReply from a \c #kAfterOperationTime notification. - Since there is no reply that tells the plugin group to invalidate itself on these - notifications, if a rebuild is wanted on a change of name the plugin group - should call \c #AIPluginGroupSuite::MarkPluginArtDirty() while handling the message. -*/ -enum AIAttributeOperationSubcodes { - kHideOpCode = 'HIDE', - kShowOpCode = 'SHOW', - kLockOpCode = 'LOCK', - kUnlockOpCode = 'UNLK', - kSetNameOpCode = 'NAME' -}; - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a plug-in group, never dereferenced. - Access with \c #AIPluginGroupSuite. */ -typedef struct _t_AIClassOpaque *AIPluginGroupHandle; - -/** Developer-defined data for \c #AIInterruptProc callback. */ -typedef void *AIInterruptData; -/** Callback function prototype for \c #AIPluginGroupMessage::proc. - An update or interpolate handler that will take a long time can - call this function any number of times, to give time back to the - core for other processing (such as preview and other event handling). - When it returns an error, your handler should stop processing and - return the error. It will get a chance again later to update. - @param art The art object. - @param data Developer-defined data to pass through. - @return An error to halt processing of the update or interpolate notification. - */ -typedef ASErr (*AIInterruptProc)( AIArtHandle art, AIInterruptData data ); - -/** \c #AIPluginGroupMessage::style value.*/ -union StyleUnion { - /** The path style. If partial, the \c #AIPluginGroupMessage::styleMap - indicates which fields are valid. */ - AIPathStyle *path_s; - /** Unused */ - AIArtStyleHandle art_s; -}; - -/** \c #AIPluginGroupMessage::styleMap value.*/ -union StyleMapUnion { - /** A style map that indicates which fields are valid in - a partial \c #AIPluginGroupMessage::style value. */ - AIPathStyleMap *path_s_map; -}; - - -/** Sent with the \c #kSelectorAINotifyEdits, \c #kSelectorAIUpdateArt, - \c #kSelectorAICanShowContents and \c #kSelectorAIInterpolateData notifications. - - The \c #kSelectorAINotifyEdits notifies of edits in the edit group. In this case the \c time - and \c code members provide more information about the stage of the editing - operation and the operation being performed. Additional members provide information - about what is being edited, how it is being edited and the replacement art that will - be the edited result.
- Process this information and return one of these error codes to control how the operation - proceeds: -
\c #kRefusePluginGroupReply -
\c #kWantsAfterMsgPluginGroupReply -
\c #kMarkValidPluginGroupReply -
\c #kDontCarePluginGroupReply -
\c #kDestroyPluginGroupReply - - The \c #kSelectorAIUpdateArt message is sent to request that the plug-in group manager - rebuild the result group in response to edits in the edit group. In this case the - only the \c proc and \c data fields are used. -*/ -struct AIPluginGroupMessage { - /** The message data. */ - SPMessageData d; - /** The plug-in group object. */ - AIPluginGroupHandle entry; - /** The plug-in group art object. */ - AIArtHandle art; - - /** For \c #kSelectorAINotifyEdits and \c #kSelectorAIInterpolateData - messages, the stage of the operation (check if allowed, before, during, after). */ - AIOperationTime time; - - /** For \c #kSelectorAINotifyEdits, the specific operation being performed. */ - AIOperationCode code; - - // Editing parameters - - /** For \c #kSelectorAINotifyEdits, the descendant of the edit art group that - is about to be edited. */ - AIArtHandle preEditArt; - - /** For \c #kSelectorAINotifyEdits, the object what will be in the edit group when the - operation completes. For edits that change attributes but keep the same art object - (such as most style operations), the same as \c preEditArt. At \c #kBeforeOperationTime, - the attributes have not yet been modified. - If not the same as \c preEditArt, the object is not in the edit art group until - \c #kAfterOperationTime. Transformation, geometry changes or attribute changes - have already been performed on the object, but is has not yet been inserted into the artwork. - - @note You must not dispose of or reorder any artwork objects during a - \c #kCheckOperationTime or \c #kBeforeOperationTime notification. - Any editing must wait until \c #kAfterOperationTime. */ - AIArtHandle postEditArt; - - /** For some operation codes, a subcodes that further describes - the operation being performed. See \c #AIOperationCode. - Subcodes are four-byte chars like \c AIErr, that facilitate debugging - while still allowing switch statements. */ - AIErr subCode; - - /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kTransformOperationCode - or \c subCode is \c #kTransformCopyOpCode. - The matrix used for the transformation. */ - AIRealMatrix matrix; - - /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kStyleOperationCode. - The style that was modified. */ - StyleUnion style; - - /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kStyleOperationCode. - Indicates which fields of \c style are valid, if it is a partial style. - If \c NULL, all style fields are valid. */ - StyleMapUnion styleMap; - - /** For \c #kSelectorAIUpdateArt and \c #kSelectorAIInterpolateData, - A callback that allows you to interrupt lengthy processing. */ - AIInterruptProc proc; - - /** For \c #kSelectorAIUpdateArt and \c #kSelectorAIInterpolateData. - Developer-defined data to pass through to the \c proc callback. */ - AIInterruptData data; - - // ----New fields added in AI10----- - - /** For \c #kSelectorAIInterpolateData. -
At \c #kBeforeOperationTime or \c #kAfterOperationTime, - the number of steps in the blend. -
At \c #kDuringOperationTime, the number of this step (first step is 1). */ - int steps; - - /** For \c #kSelectorAIInterpolateData. -
The distance of this interpolation between the source and destination - of the blend. [0..1], where 0 is the source (\c preEditArt) and 1 is - the destination (\c postEditArt). */ - AIReal t; - - // Editing parameter - - /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kGeometryOperationCode - and \c subCode is \c #kSwapSymbolsOpCode. In this case, \c art is a symbol - instance in the edit group, and this is the replacement symbol. - (If your plug-in group uses symbols in its art dictionary, see also - \c #kSelectorAIReplaceSymbol.) */ - AIPatternHandle toSymbol; - - // ----New fields added in AI12---- - - /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kTransformOperationCode or - \c subCode is \c #kTransformCopyOpCode. Transformation options, - a logical OR of \c #AITransformArtOptions. */ - ai::int32 transformFlags; - - /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kTransformOperationCode or - \c subCode is \c #kTransformCopyOpCode. - If \c transformFlags contains \c #kScaleLines, the factor by which the strokes - are scaled. */ - AIReal transformLineScale; - - /** For reordering, duplicating, and pasting operations, the preposition object in the paint - order, for relative placement of the new object. See \c #AIArtSuite::NewArt. */ - AIArtHandle destinationArt; - - /** For \c #kSelectorAINotifyEdits, supplied for reordering, duplicating and - pasting operations. The paint-order placement of the new object, - relative to the \c destinationArt object. Cannot be \c #kPlaceAboveAll - or \c #kPlaceBelowAll (because the object must go inside a plug-in group). - Never \c #kPlaceDefault (it is translated into a more specific - paint order before notification). */ - AIPaintOrder insertionOrder; - - /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kReadOperationCode - \c #kWriteOperationCode. The version of the Illustrator file - being read from or written to. For other operations, the value is 0. */ - AIVersion aiVersion; - -}; - - -/** Data for the \c #kSelectorAIReplaceSymbol notification. */ -struct AIReplaceSymbolMessageData { - /** The message data. */ - SPMessageData d; - /** The plug-in group. */ - AIPluginGroupHandle entry; - /** The plug-in group art object. */ - AIArtHandle art; - /** A symbol to be replaced, referenced by the plug-in group - in its dictionary, or \c NULL to replace all used symbols. */ - AIPatternHandle targetSymbol; - /** The replacement symbol. */ - AIPatternHandle replacementSymbol; -}; - - -/** Data for the \c #kSelectorAIDisallowsArtTypeQuery notification. */ -struct AIPluginArtTypeMessageData { - /** The message data. */ - SPMessageData d; - /** The plug-in group for which insertion is requested. */ - AIPluginGroupHandle entry; - /** The \c #AIArtType of art potentially inserted into the group. */ - short artType; -}; - - -// Function pointers used for callbacks when storing custom hit data -/** A callback that you must supply with the \c #AIPluginGroupCustomHitTestData::CustomHitData, - that casts the void* data to the appropriate type and disposes of it properly. */ -typedef AIAPI void (*AICustomHitDataDeleteFunc)(void*); - -/** Data for the \c #kSelectorAIPerformCustomHitTest notification. */ -struct AIPluginGroupCustomHitTestData { - /** The message data. */ - SPMessageData d; - /** The plug-in group. */ - AIPluginGroupHandle entry; - /** The plug-in group art object that was hit. */ - AIArtHandle art; - /** The hit location coordinates. */ - AIRealPoint location; - /** A structure in which to record custom hit information. - Access after the hit test with \c #AIHitTestSuite::GetCustomHitData() */ - struct - { - /** [in] The data that was provided to \c #AIHitTestSuite::CustomHitTest() */ - void* inData; - /** [out] Developer-defined custom hit data. Your plug-in is reponsible for - allocating and cleaning up this heap-based data. */ - void* outData; - /** [out] A callback function that properly deletes the - returned custom hit data. Required.*/ - AICustomHitDataDeleteFunc deleteFunc; - } CustomHitData; - -}; - - -/** Prototype for the \c #AIPluginGroupCollectPaintStylesData::artStyleCallback. - Can examine, but not modify the art styles and art objects. - @param artStyle The current art style. - @param gradientContext \c NULL if gradient vectors in the style are relative - to the whole plug-in group. Otherwise, gradient vectors in the style are - relative to this art object. - @param usage How the style is used (in fills or strokes), an \c #AIPaintUsage value. - @param callbackData Developer-defined data passed from the notification message. - */ -typedef AIAPI ASErr (*AIProcessArtStyleFunc)(const AIArtStyleHandle artStyle, - AIArtHandle gradientContext, ai::int32 usage, void *callbackData ); - -/** Prototype for the \c #AIPluginGroupCollectPaintStylesData::pathStyleCallback. - Can examine, but not modify the path styles and art objects. - @param pathStyle The current path style. - @param psMap A style map that identifies the valid fields in a partial style. - Can be \c NULL. - @param gradientContext \c NULL if gradient vectors in the style are relative - to the whole plug-in group. Otherwise, gradient vectors in the style are - relative to this art object. - @param usage How the style is used (in fills or strokes), an \c #AIPaintUsage value. - @param callbackData Developer-defined data passed from the notification message. - */ -typedef AIAPI ASErr (*AIProcessPathStyleFunc)(const AIPathStyle *pathStyle, const AIPathStyleMap *psMap, - AIArtHandle gradientContext, ai::int32 usage, void *callbackData ); - -/** @ingroup Errors - Returned by an \c AIProcessArtStyleFunc, \c AIProcessPathStyleFunc, or \c AIAdjustColorFunc - in non-error situations that nonetheless mean the iteration should be terminated - without processing any remaining styles. This could be used, for instance, if the - callback functions were searching for a particular global object and could quit - as soon as it appeared. */ -#define kIterationCanQuitReply 'DONE' - -/** Data for the \c #kSelectorAICollectPaintStyles notification. */ -struct AIPluginGroupCollectPaintStylesData { - /** The message data. */ - SPMessageData d; - /** The plug-in group. */ - AIPluginGroupHandle entry; - /** The plug-in group art object whose style contents are being queried */ - AIArtHandle pluginArt; - /** True to iterate only selected styles. (Currently always true.) */ - AIBoolean selectedOnly; - /** Developer-defined data to pass through to the callbacks. */ - void* callbackData; - /** A callback function that examines the art styles in the plug-in art. */ - AIProcessArtStyleFunc artStyleCallback; - /** A callback function that examines the path styles in the plug-in art. */ - AIProcessPathStyleFunc pathStyleCallback; - -}; - -/** Data for the \c #kSelectorAIApplyPaintStyles message. */ -struct AIPluginGroupApplyPaintStylesData { - /** The message data. */ - SPMessageData d; - /** The plug-in group. */ - AIPluginGroupHandle entry; - /** The plug-in group art object whose style contents are being modified */ - AIArtHandle pluginArt; - - /** When true, apply a transformation using \c matrix, \c transformFlags, - and \c transformLineScale, and ignore \c pathStyle and \c pathStyleMap. -
When false, merge styles using \c pathStyle and \c pathStyleMap, and ignore - \c matrix, \c transformFlags, and \c transformLineScale. */ - AIBoolean applyStyleTransform; - - /** Fill and stroke information to be merged into the current style. */ - AIPathStyle pathStyle; - /** A style map the indicates which fields are valid in a partial path style. */ - AIPathStyleMap pathStyleMap; - - /** The transformation matrix. */ - AIRealMatrix matrix; - /** Transformation options, a logical OR of \c #AITransformArtOptions. - \c #kTransformObjects and \c #kTransformChildren are always off, - and at least one of \c #kTransformFillGradients, \c #kTransformFillPatterns, - \c #kTransformStrokePatterns, \c #kTransformStrokeGradients, or \c #kScaleLines is on. */ - ai::int32 transformFlags; - /** If the \c #kScaleLines option is on, the factor by which to scale the strokes. */ - AIReal transformLineScale; - -}; - - -/** Callback function prototype used to process colors from art style handles - directly contained in the dictionary of a plug-in group. Passed to \c #kSelectorAIAdjustColors - in \c #AIPluginGroupAdjustColorsData::adjustArtStyleCallback. - Allows various concerned plug-ins to work with the contained styles: - - \li The plug-in with art style handles in its dictionary can use this to find those art styles, - \li Another plug-in that implements the effects inside the art styles can use it to access their colors. - \li Another plug-in can provides the color-adjustment callback to do the actual color mapping. - - This callback is not typically provided by a third-party plug-in, but is provided internally - by the implementation of \c #AIPathStyleSuite::AdjustObjectAIColors(), or by - \c #AIPluginGroupSuite::PluginArtAdjustColors(). A plug-in groups with art styles - in its dictionary need only call this callback, not implement it. - @param oldArtStyle The art style to be examined. It is not altered. - @param newArtStyle [out] A buffer in which to return the art style after color adjustment. - If no colors are changed, contains the input style. - @param userData A pointer to developer-defined data needed for the modification, - acquired from the message data. - */ -typedef AIErr (*AIAdjustArtStyleFunc) ( AIArtStyleHandle oldArtStyle, AIArtStyleHandle *newArtStyle, void *userData ); - -/** Data for the \c #kSelectorAIAdjustColors notification. */ -struct AIPluginGroupAdjustColorsData { - /** The message data. */ - SPMessageData d; - /** The plug-in group. */ - AIPluginGroupHandle entry; - /** The plug-in group art object whose style contents are being modified. */ - AIArtHandle pluginArt; // IN - - /** When true, iterate only selected colors.In this case, the plug-in group - was at least partially selected in object selection mode. */ - AIBoolean selectedOnly; - /** When true, iterate colors used in fills. */ - AIBoolean adjustFills; - /** When true, iterate colors used in strokes. */ - AIBoolean adjustStrokes; - /** Developer-defined data to pass through to the callback. - Can contain extra parameters needed by the color mapping.*/ - void* callbackData; - - /** A developer-defined callback function that processes colors. Call on any colors - that are directly contained in the plug-in group's private data; that is, not contained - within an \c #AIArtStyleHandle, \c #AIPatternHandle, or an \c #AIArtHandle. */ - AIAdjustColorFunc adjustColorCallback; - - /** [out] Set to true if the handler modified any colors. */ - AIBoolean modifiedSomething; - - /** A developer-defined callback function to examine or modify colors contained - in patterns, symbols, brush patterns or graph designs. Called on objects of these - types that may contain meaningful colors and that are directly stored in the - plug-in group's private data; that is, not contained within an - \c #AIArtStyleHandle, \c #AIPatternHandle, or an \c #AIArtHandle. - Fill patterns, for example, are usually stored in an \c #AIColor, and - brush patterns are usually stored in an \c #AIArtStyleHandle. - You will typically call this for symbol handles that are stored independently - of symbol instances. - - The function does not modify the input pattern. It returns a processed - handle of the same type, which the plug-in group should store if it is - different from the input handle. - */ - AIAdjustPatternHandleFunc adjustPatternHandleCallback; - - /** A developer-defined callback function to examine or modify colors contained - in art styles, including the private parameters of Live Effects. - Call on any art style handles that are directly stored in the plug-in group's - private data; that is, not attached to any art object. - - The function does not modify the input style. It returns a processed - art style, which the plug-in group should store if it is - different from the input handle. - */ - AIAdjustArtStyleFunc adjustArtStyleCallback; - -}; - -/*** Descriptive information for a new plug-in group. - See \c #AIPluginGroupSuite::AddAIPluginGroup().*/ -struct AIAddPluginGroupData { - /** Major version number. */ - ai::int32 major; - /** Minor version number. */ - ai::int32 minor; - /** Localized descriptive string for error messages. */ - const char *desc; -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions for working with \e plug-in \e groups. - - A plug-in group organizes artwork that is acted upon by a particular plug-in. - A plug-in group object is a container of plug-in group art objects. - It maintains two groups of art objects; one group that the user interacts - with (the \e edit \e group), and another group that your plug-in generates - (the \e result \e group). Use the functions in this suite to create - these groups and to access their contents. - - Register a plug-in group during startup to manage plug-in group art objects - of a particular type, using \c #AIPluginGroupSuite::AddAIPluginGroup(). - Store the returned plug-in group handle in \c globals, to use in - creating plug-in group art objects. All plug-in group art objects - must associate themselves with a plug-in group by calling - \c #AIPluginGroupSuite::UseAIPluginGroup(). - - A plug-in group art object is an art object with the type \c #kPluginArt. The - edit art group and result art group are art objects with the type - \c #kGroupArt, but they are not children of the plug-in group art object. - Access them with \c #AIPluginGroupSuite::GetPluginArtEditArt() and - \c #AIPluginGroupSuite::GetPluginArtResultArt(). - \li Members of the edit group are hidden, but are editable and selectable. - \li Members of the result group become visible, but are not selectable. - - You can define and store arbitrary data with a plug-group art object, using - \c #AIPluginGroupSuite::SetPluginArtDataRange(), - \c #AIPluginGroupSuite::GetPluginArtDataRange(), - \c #AIPluginGroupSuite::SetPluginArtDataCount(), - and \c #AIPluginGroupSuite::GetPluginArtDataCount(). - - A plug-in that manages plug-in groups can receive these selectors, - with \c #kCallerAIPluginGroup as the caller, accompanied by - an \c #AIPluginGroupMessage: -
\c #kSelectorAINotifyEdits -
\c #kSelectorAIUpdateArt -
\c #kSelectorAICanShowContents -
\c #kSelectorAIInterpolateData - - It can also receive these selectors: -
\c #kSelectorAIReplaceSymbol (sends \c #AIReplaceSymbolMessageData) -
\c #kSelectorAIDisallowsArtTypeQuery (sends \c #AIPluginArtTypeMessageData) -
\c #kSelectorAIPerformCustomHitTest (sends \c #AIPluginGroupCustomHitTestData) -
\c #kSelectorAICollectPaintStyles (sends \c #AIPluginGroupCollectPaintStylesData) -
\c #kSelectorAIApplyPaintStyles (sends \c #AIPluginGroupApplyPaintStylesData) -
\c #kSelectorAIAdjustColors (sends \c #AIPluginGroupAdjustColorsData) - - The Live Blend tool is an example of how plug-in groups are used. - A live blend is created by drawing two objects, then clicking them - separately with the blend tool. After the second click, the tool draws - a series of intermediate objects between the original source and destination - objects to create a smooth blend between them. Only the source and destination - objects are selectable or editable. When you edit or move the source or - destination objects, the intermediate objects are regenerated. The document - contains only the original two objects in the art tree. - In this case, the source and destination art objects (as well as the spine - which links the two objects) are children of the edit group, and the intermediate - objects (as well as a copy of the original source and destination objects) are - children of the result group. - - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPluginGroupSuite and \c #kAIPluginGroupVersion. - - @section Plug-in Group Example - - First, register the plug-in group: - -@code -sAIPluginGroup->AddAIPluginGroup ( - message->d.self, - "My Plugin Group Plugin", - &pluginGroupData, - kPluginGroupWantsAutoTransformOption, - &g->myPluginGroupHandle - ); -@endcode - - Create the plug-in group art, typically in response to a menu item or a click - in your dialog, then associate the plug-in group art with the plug-in group. - -@code -sAIArt->NewArt( kPluginArt, kPlaceAboveAll, NULL, &pluginGroupArt ); -sAIPluginGroup->UseAIPluginGroup (pluginGroupArt, g->myPluginGroupHandle ); -@endcode - - This activates the plug-in group art and allows you to access - its edit and result groups. - - Upon activation, your plug-in starts to receive notifications. - In response to \c #kSelectorAIUpdateArt or \c #kSelectorAINotifyEdits - notifications, you must regenerate the objects in the result group - The update message is the easiest and most effective notifier to use. - It is sent whenever any of the edit-group objects are modified. - In your main loop, listen for the \c #kCallerAIPluginGroup caller - and \c #kSelectorAIUpdateArt selector and respond by regenerating the - result-group objects according to the new state of the edit-group objects. - */ -struct AIPluginGroupSuite { - - /** Creates a plug-in group. - @param self This plug-in. - @param name A unique identifying name for the plug-in group. - This name is displayed in error messages, and differs - from the \e default name used in the Layers - and Appearance palettes; see \c #SetAIPluginGroupDefaultName(). - @param data The version and error-reporting information for the group. - @param options Option flags that determine the behavior of members, - a logical OR of \c #AIPluginGroupOptions. You cannot change these - after they are set. - @param entry [out] A buffer in which to return the plug-in group object. - */ - AIAPI AIErr (*AddAIPluginGroup) ( SPPluginRef self, const char *name, AIAddPluginGroupData *data, ai::int32 options, AIPluginGroupHandle *entry ); - - /** Associates a plug-in group art object with a plug-in group, activating - the plug-in group and automatically creating the contained edit and - result groups. After calling this function, your plug-in starts to - receive plug-in group selectors. - - You can only access the edit and result groups through this art object; - see \c #GetPluginArtEditArt() and \c #GetPluginArtResultArt(). - - The art object inherits the plug-in group's name and version attributes, - which you can then access either through the group (\c #GetAIPluginGroupName(), - for example) or the art object (\c #GetPluginArtName()). The plug-in group - name is used for error messages, and differs from the art object's name, - used in the Layers and Appearance palettes; see \c #GetAIPluginGroupDefaultName(). - - You can move the art object to a new plug-in group with \c #SetPluginArtPluginGroup(). - @param art An art object of type \c #kPluginArt, created with \c #AIArtSuite::NewArt(). - @param entry The plug-in group object. - */ - AIAPI AIErr (*UseAIPluginGroup) ( AIArtHandle art, AIPluginGroupHandle entry ); - - /** Retrieves the name of a plug-in group. This name is displayed in error messages, - and can differ from the display name (called the \e default name) used in - the Layers and Appearance palettes; see \c #GetAIPluginGroupDefaultName(). - @param entry The plug-in group object. - @param name [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetAIPluginGroupName) ( AIPluginGroupHandle entry, char **name ); - - /** Retrieves the version information of a plug-in group. - @param entry The plug-in group object. - @param major [out] A buffer in which to return the major version number. - @param minor [out] A buffer in which to return the minor version number. - */ - AIAPI AIErr (*GetAIPluginGroupVersion) ( AIPluginGroupHandle entry, ai::int32 *major, ai::int32 *minor ); - - /** Retrieves the description of a plug-in group, a localized string that Illustrator - uses for error reporting. - @param entry The plug-in group object. - @param desc [out] A buffer in which to return the description. - */ - AIAPI AIErr (*GetAIPluginGroupDescription) ( AIPluginGroupHandle entry, char **desc ); - - /** Retrieves the option flags of a plug-in group. - @param entry The plug-in group object. - @param options [out] A buffer in which to return the options, a logical OR - of \c #AIPluginGroupOptions. - */ - AIAPI AIErr (*GetAIPluginGroupOptions) ( AIPluginGroupHandle entry, ai::int32 *options ); - - /** Retrieves a reference to the plug-in that created a plug-in group. - You can pass this reference to functions in the \c #AIPluginSuite. - @param entry The plug-in group object. - @param plugin [out] A buffer in which to return the plug-in object. - */ - AIAPI AIErr (*GetAIPluginGroupPlugin) ( AIPluginGroupHandle entry, SPPluginRef *plugin ); - - /** Gets the number of currently registered plug-in group managers. Use with - \c #GetNthAIPluginGroup() to iterate through plug-in groups (which can belong - to different plug-ins). - @param count [out] A buffer in which to return the number of groups. - */ - AIAPI AIErr (*CountAIPluginGroups) ( ai::int32 *count ); - - /** Retrieves a reference to a plug-in group by position index in the current list - of registered plug-in group managers. Use with \c #CountAIPluginGroups to - iterate through plug-in groups (which can belong to different plug-ins). - @param n The 0-based index position. - @param entry [out] A buffer in which to return the plug-in group object. - */ - AIAPI AIErr (*GetNthAIPluginGroup) ( ai::int32 index, AIPluginGroupHandle *entry ); - - /** Retrieves the name of the plug-in group that manages a plug-in group art object. - @param art The plug-in group art object. - @param name [out] A buffer in which to return the plug-in group name. - */ - AIAPI AIErr (*GetPluginArtName) ( AIArtHandle art, char **name ); - - /** Sets the name of the plug-in group that manages a plug-in group art object. - @param art The plug-in group art object. - @param name The new unique identifying name for the plug-in group. */ - AIAPI AIErr (*SetPluginArtName) ( AIArtHandle art, char *name ); - - /** Retrieves the version information for the plug-in group that manages - a plug-in group art object. - @param art The plug-in group art object. - @param major [out] A buffer in which to return the major version number. - @param minor [out] A buffer in which to return the minor version number. - */ - AIAPI AIErr (*GetPluginArtVersion) ( AIArtHandle art, ai::int32 *major, ai::int32 *minor ); - - /** Sets the version information for the plug-in group that manages - a plug-in group art object. - @param art The plug-in group art object. - @param major The new major version number. - @param minor The new minor version number. - */ - AIAPI AIErr (*SetPluginArtVersion) ( AIArtHandle art, ai::int32 major, ai::int32 minor ); - - /** Retrieves the plug-in group that manages a plug-in group art object. - @param art The plug-in group art object. - @param entry [out] A buffer in which to return the plug-in group object. - */ - AIAPI AIErr (*GetPluginArtPluginGroup) ( AIArtHandle art, AIPluginGroupHandle *entry ); - - /** Sets the plug-in group that manages a plug-in group art object. - @param art The plug-in group art object. - @param entry The new plug-in group object. - */ - AIAPI AIErr (*SetPluginArtPluginGroup) ( AIArtHandle art ); - - /** Retrieves the edit group art object from the plug-in group art object. - @param art The plug-in group art object. - @param editArt [out] A buffer in which to return the edit group art object. - - @note The edit group art object is \e not a child of the - the plug-in group art object. You can access it with this function, - and it can be returned by \c #AIMatchingArtSuite::GetSelectedArt(), which - can also return the plug-in group art object itself.
- \c #AIMatchingArtSuite::GetSelectedArt() or \c #AIMatchingArtSuite::GetMatchingArt() - can return objects in the edit group. - */ - AIAPI AIErr (*GetPluginArtEditArt) ( AIArtHandle art, AIArtHandle *editArt ); - - /** Replaces the edit group of a plug-in group art object. - @param art The plug-in group art object. - @param editArt The new edit group object, an art object of type \c #kGroupArt. - */ - AIAPI AIErr (*SetPluginArtEditArt) ( AIArtHandle art, AIArtHandle editArt ); - - /** Retrieves the result group art object from the plug-in group art object. - @param art The plug-in group art object. - @param resultArt [out] A buffer in which to return the result group art object. - - @note The result group art object is \e not a child of the - the plug-in group art object. You can access it only with this function. - */ - AIAPI AIErr (*GetPluginArtResultArt) ( AIArtHandle art, AIArtHandle *resultArt ); - - /** Replaces the result group of a plug-in group art object. - @param art The plug-in group art object. - @param resultArt The new result group object, an art object of type \c #kGroupArt. - */ - AIAPI AIErr (*SetPluginArtResultArt) ( AIArtHandle art, AIArtHandle resultArt ); - - /** Gets the size of the developer-defined data store for a plug-in group art object. - Store data using \c #SetPluginArtDataRange(), and access it with \c #GetPluginArtDataRange(). - The data is stored as a hexadecimal-encoded string of bytes. - @param art The plug-in group art object. - @param count [out] A buffer in which to return the number of bytes of data - stored, or 0 if there is no data associated with the art object. - */ - AIAPI AIErr (*GetPluginArtDataCount) ( AIArtHandle art, size_t *count ); - - /** Sets the size of the developer-defined data store for a plug-in group art object. - Store data using \c #SetPluginArtDataRange(), and access it with \c #GetPluginArtDataRange(). - The data is stored as a hexadecimal-encoded string of bytes. - @param art The plug-in group art object. - @param count The number of bytes of data. - */ - AIAPI AIErr (*SetPluginArtDataCount) ( AIArtHandle art, size_t count ); - - /** Retrieves data from the developer-defined data store for a plug-in group art object. - The data is stored as a hexadecimal-encoded string of bytes. - @param art The plug-in group art object. - @param data [out] A buffer in which to return the data. - @param index An offset into the data store at which to start reading. - @param count A number of bytes to read from the data store. - */ - AIAPI AIErr (*GetPluginArtDataRange) ( AIArtHandle art, void *data, size_t index, size_t count ); - - /** Writes data to the developer-defined data store for a plug-in group art object. - The data is stored as a hexadecimal-encoded string of bytes. - @param art The plug-in group art object. - @param data A pointer to the developer-defined data. - @param index An offset into the data store at which to start writing. - @param count A number of bytes to write to the data store. - */ - AIAPI AIErr (*SetPluginArtDataRange) ( AIArtHandle art, void *data, size_t index, size_t count ); - - - /** Marks a plug-in group art object as dirty, meaning that the contained art has - been modified since the last update operation. This forces an update notification; - see \c #kSelectorAIUpdateArt. - - Illustrator generally detects when a plug-in group object needs - to have the result art rebuilt. It sends an update message when - the object is first created, and whenever the group's data or any object - in the edit group has been edited (outside of the update message handler itself). - You might need to specifically mark the art as changed if objects have external - dependencies; for instance, reference to a pattern or other global object, - or an artwork attribute such as the page size. If you detect relevant changes - through other notifications, you can trigger an update by calling this function. - @param art The plug-in group art object. - @see \c #MarkPluginArtClean(), \c #MarkPluginArtSilent() - */ - AIAPI AIErr (*MarkPluginArtDirty) ( AIArtHandle art ); - - /** Marks a plug-in group art object as clean, meaning that the contained art has - not been modified since the last update operation. - - A menu command or tool action typically modifies the edit art or the - object's data, then rebuilds the result art. The modifications trigger - a notify-edit message, and also mark the plug-in object dirty, causing - a redundant update if the result art has already been updated. - Use this function in an external notification handler, after updating - the result group, to prevent the redundant update. - - @param art The plug-in group art object. - @see \c #MarkPluginArtDirty(), \c #MarkPluginArtSilent() - @note This function is intended for use within a GoMenu or AITool handler, or a notification - from some other suite. When a handler for \c #kSelectorAINotifyEdits - returns \c #kNoErr, it marks the plug-in object as dirty (in need of - \c #kSelectorAIUpdateArt), even if the handler called this function. To prevent - this, the handler must return \c #kMarkValidPluginGroupReply. - */ - AIAPI AIErr (*MarkPluginArtClean) ( AIArtHandle art ); - - // New for AI10: clipping attribute for plug-in group objects - - /** Reports whether a plug-in group art object is a clipping object. When it is, - the result group constructed by the plug-in group manager should - contain one or more paths that are set to clip. - @param art The plug-in group art object. - @param clipping [out] A buffer in which to return true if the object - is a clipping object. - */ - AIAPI AIErr (*GetPluginArtClipping) ( AIArtHandle art, AIBoolean *clipping ); - - /** Sets the clipping state of a plug-in group art object. - @param art The plug-in group art object. - @param clipping True to make the object a clipping object, false to - turn clipping off. - @return \c #kBadParameterErr if the associated group does not specify the option - \c #kPluginGroupCanBeClipping. - */ - AIAPI AIErr (*SetPluginArtClipping) ( AIArtHandle art, AIBoolean clipping ); - - /** Retrieves the default name for a plug-in group, as returned by - \c #AIArtSuite::GetArtName(). This name is used in - the Layers and Appearance palettes, and can differ from the name - assigned at creation, which is displayed in error messages; - see \c #GetAIPluginGroupName(). - @param art The plug-in group object. - @param name [out] A buffer in which to return the default name, or \c NULL, - in which case \c #AIArtSuite::GetArtName() returns the description string. - */ - AIAPI AIErr (*GetAIPluginGroupDefaultName) ( AIPluginGroupHandle entry, char** name ); - - /** Sets the default name for a plug-in group, as returned by - \c #AIArtSuite::GetArtName(). This name is used in - the Layers and Appearance palettes, and can differ from the name - assigned at creation, which is displayed in error messages; - see \c #GetAIPluginGroupName(). - @param entry The plug-in group object. - @param name The new default name, or \c NULL, in which case \c #AIArtSuite::GetArtName() - returns the description string. - */ - AIAPI AIErr (*SetAIPluginGroupDefaultName) ( AIPluginGroupHandle entry, const char* name ); - - /** Retrieves the earliest Illustrator version that this plug-in group supports. - @param entry The plug-in group object. - @param appVersion [out] A buffer in which to return the version constant. - @see \c #SetAIPluginGroupAppVersion() - */ - AIAPI AIErr (*GetAIPluginGroupAppVersion) ( AIPluginGroupHandle entry, AIVersion* appVersion ); - - /** Sets the earliest Illustrator version that this plug-in group supports. - When Illustrator writes out this plug-in group, if writing to an earlier file - format, it writes out only the result group. - - If not specifically set, the version default is 8. Plug-in groups are not supported in versions - earlier than 8. - @param entry The plug-in group object. - @param appVersion The version constant. - */ - AIAPI AIErr (*SetAIPluginGroupAppVersion) ( AIPluginGroupHandle entry, AIVersion appVersion ); - - // New for AI12: - - /** Prevents subsequent modifications to the edit group from marking the object dirty (changed) and - triggering the update notification. Does not prevent the marking of the result group. - The status is cleared when the context is popped. - @param art The plug-in group art object. - @see \c #MarkPluginArtClean(), \c #MarkPluginArtDirty() - */ - AIAPI AIErr (*MarkPluginArtSilent) ( AIArtHandle art ); - - /** @deprecated As of AI13 (CS3), this function is deprecated in favor of - \c #AIPathStyleSuite::AdjustObjectAIColors(), a more powerful and flexible treatment - of colors in global objects such as patterns, gradients, symbols, brushes, and - Live Effects. Color filter plug-ins that iterate the artwork contents themselves - and only use this function for plug-in groups with that have the flag - \c #kPluginGroupManagesPaintStyles, should now use \c #AIPathStyleSuite::AdjustObjectAIColors() - to process the entire selection. In this case, the new function emulates - the previous behavior; it sends an c\ #AIPluginGroupAdjustColorsData - message in which both the pattern and style adjustment callbacks do nothing. - - Modifies colors in all art managed by a plug-in group, by calling a developer-defined callback function. - @param art The plug-in group art object. - @param adjustColorCallback The developer-defined callback procedure. - @param callbackData Optional developer-defined data to pass through to the callback. - @param modifiedSomething [out] Optional, a buffer in which to return true if any - colors were modified. - @param adjustFills True to modify colors in fill. - @param adjustStrokes True to modify colors in strokes. - @param selectionOnly True to modify colors only in selected objects. - @return Any error reported by the callback function. - @note This function s intended for the use of plug-ins \e other \e than - the one implementing the plug-in group. - */ - AIAPI AIErr (*PluginArtAdjustColors) ( AIArtHandle art, AIAdjustColorFunc adjustColorCallback, - void *callbackData, ASBoolean *modifiedSomething, - AIBoolean adjustFills, AIBoolean adjustStrokes, - AIBoolean selectionOnly ); - -}; - - -#include "AIHeaderEnd.h" - -#endif - +#ifndef __AIPluginGroup__ +#define __AIPluginGroup__ + +/* + * Name: AIPluginGroup.h + * Purpose: Adobe Illustrator Plugin Group Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1995-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/** @file AIPluginGroup.h */ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif +#ifndef __AIArt__ +#include "AIArt.h" +#endif +#ifndef __AIPathStyle__ +#include "AIPathStyle.h" +#endif +#ifndef __AIArtStyle__ +#include "AIArtStyle.h" +#endif + +#include "AIHeaderBegin.h" + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPluginGroupSuite "AI Plugin Group Suite" +#define kAIPluginGroupSuiteVersion6 AIAPI_VERSION(6) +#define kAIPluginGroupSuiteVersion kAIPluginGroupSuiteVersion6 +#define kAIPluginGroupVersion kAIPluginGroupSuiteVersion + + +// These are the AI 6 style plug-in class messages. +// They are only needed temporarily until Joe T's prototype plug-ins are updated +// <> +#define kSelectorAINotifyObject "AI Notify Plugin Object" +#define kSelectorAIUpdateObject "AI Update Plugin Object" + + +// These are the AI 7 style plug-in group messages (split into caller and request) +// <> + +/** @ingroup Callers + See \c #AIPluginGroupSuite */ +#define kCallerAIPluginGroup "AI Plugin Group" + +/** @ingroup Selectors + Notifies a plug-in group of edits to the edit group. + An \c #AIPluginGroupMessage::code value indicates the + type of editing operation being performed. An + \c #AIPluginGroupMessage::time value indicates what stage of + the operation is in progress. + + When the handler returns \c #kNoErr, the plug-in object is marked + as "dirty" (in need of \c #kSelectorAIUpdateArt). To prevent this, + return \c #kMarkValidPluginGroupReply. If the handler returns + \c #kDontCarePluginGroupReply, retains the state of the object, + and does not mark it as clean or dirty. + + If the handler returns \c #kWantsAfterMsgPluginGroupReply from a + \c #kBeforeOperationTime notify-edits message, a single + \c #kAfterOperationTime message is sent at the end of the transaction, + just before the Undo recording is closed, and before the update message. + The code is \c #kChangeOperationCode, regardless of whether a more + specific code was sent at \c #kBeforeOperationTime). + This is the appropriate place to make any changes to the edit art. + + @note An edit to children of the edit art does NOT always send a + notify-edits message, although every edit sends an update message. + Notify-edits is meant for highly structured objects where + the different descendants have specific roles to play in the plug-in. + Basic edits that are likely to require a specific response from plug-ins + trigger the notify-edits message. Changes that are harder to generalize + trigger only the update message. +

+ For blend objects, for example, moving a spine point should cause + the objects to move onto the spine, but moving a blend component should cause + the spine point to move with the art object. Looking only at the post-edit + state of the edit art, it would be hard to detect the difference between those + two edits, since in both of them the only easily detected discrepancy, without + knowing which paths were edited, is that the art elements are off the spine. */ +#define kSelectorAINotifyEdits "AI Notify Edits" + +/** @ingroup Selectors + Notifies a plug-in group that the result group needs to be rebuilt. + See \c #AIPluginGroupSuite */ +#define kSelectorAIUpdateArt "AI Update" + +/** @ingroup Selectors + Asks a plug-in group whether the Layers palette shows edit groups. + See \c #AIPluginGroupSuite */ +#define kSelectorAICanShowContents "AI Show Contents" + +/** @ingroup Selectors + Asks a plug-in group to interpolate plug-in data and dictionary contents + when interpolations are made into a blend between plug-in groups. + @see \c #kPluginGroupBlendAsPluginGroup + + Uses \c #AIPluginGroupMessage::time to indicate what stage of + the operation is in progress. Not sent at \c #kCheckOperationTime, but you + can use the \c #kBeforeOperationTime message to check whether the operation is allowed. + + At all stages, \c #AIPluginGroupMessage::preEditArt is the plug-in group being + blended from (the one closest to t=0), and \c #AIPluginGroupMessage::postEditArt + is the plug-in group being blended to (the one closest to t=1). + + \c #AIPluginGroupMessage::art is only used at \c #kDuringOperationTime. + + When the stage is \c #kBeforeOperationTime: + \li If the plug-in returns \c #kRefusePluginGroupReply, + the interpolated steps are ordinary groups blending the result groups, + just as if the \c #kPluginGroupBlendAsPluginGroup option was off or the + plug-in groups were of different classes. No further messages are sent. + This lets the plug-in decide whether the two groups are blendable as plug-in + groups based on their data or contents. + \li If the plug-in returns \c #kDontCarePluginGroupReply, the edit groups + are blended, then the \c #kSelectorAIUpdateArt message is sent. + There are no \c #kDuringOperationTime or \c #kAfterOperationTime messages. + The intermediate objects are of the same plug-in group class. + Their plug-in data and dictionary contents are duplicated from + the \c postEditArt object.
+ This reply is meant for plug-in groups that do everything identically + for all of their objects and do not need any extra data. It could also + be returned when the plug-in determines that the two objects + have the same data. + + \li If the two plug-in groups are blendable as plug-in groups, + and you need to interpolate their data, set up any data you + will need for the \c #kDuringOperationTime messages, then return + either \c #kNoErr or \c #kWantsAfterMsgPluginGroupReply. + + The \c #kBeforeOperationTime message is the time to do anything + that you want to do only once per blend, instead of once per step, + such as finding and recording the commonalities, differences, and + blendable aspects of the two objects. This temporary data can be + stored in \c #AIPluginGroupMessage::AIInterruptData, or attached to the + \c preEditArt and \c postEditArt objects. + + The \c #kDuringOperationTime message is sent only when the \c #kBeforeOperationTime + message returns either \c #kNoErr or \c #kWantsAfterMsgPluginGroupReply. For each step, + Illustrator creates a plug-in group of the same class, blends the edit group contents + as if they were ordinary groups, and passes that interpolated object in + \c #AIPluginGroupMessage::art (which is used only at this stage). +
\c #AIPluginGroupMessage::t indicates which step has been reached. + The interpolated objects are created with empty dictionaries + and no plug-in data. This is the time for the plug-in to attach any + interpolated data. + + The \c #kAfterOperationTime message is sent after all the interpolated steps + have been created, if \c #kWantsAfterMsgPluginGroupReply was returned from any of the + \c #kBeforeOperationTime or \c #kDuringOperationTime notifications. It + gives you a chance to release any data you have set up. + + Any reply other than these is treated as an error and causes the blend + not to be created at all. + */ +#define kSelectorAIInterpolateData "AI Interpolate Data" + +/** @ingroup Selectors + Asks a plug-in group to replace symbols used in its dictionary. + Sent to plug-in groups that are selected when user chooses Replace Symbol + in the Symbol palette. You are not required to handle this notification, + even if the plug-in group uses symbols. The sender does not modify the dictionary. + See \c #AIReplaceSymbolMessageData + \li If your handler rebuilds the result group, call \c #AIPluginGroupSuite::MarkPluginArtClean(). + If you modify only the dictionary, call \c #AIPluginGroupSuite::MarkPluginArtDirty(), + so that the update notification is sent upon return from the handler. + \li If the handler performs the symbol replacement, return \c #kDidSymbolReplacement + The caller uses this to decide whether to set the Undo/Redo strings, and so on.*/ +#define kSelectorAIReplaceSymbol "AI Art Replace Symbol" + +/** @ingroup Selectors + Asks a plug-in group whether it allows art objects of a given type in its edit group. + Sent if the plug-in group option \c #kPluginGroupRestrictsArtTypes is on. + Sent before an insertion into the edit group is made, whether interactive or programmatic. + Not sent if the plug-in group is as under construction within the + current context. + + Valid return values are: + \li \c #kNoErr: Plug-in groups managed by this plug-in do allow art objects of the given type. + \li \c #kRefusePluginGroupReply: Plug-in groups managed by this plug-in do not allow art objects + of the given type. + \li \c #kCheckPluginGroupReply: Requests a \c #kSelectorAINotifyEdits notification + with \c code \c #kTopologyOperationCode and \c subCode \c #kPasteIntoOpCode, + so that the plug-in manager can take other factors into account, such as the options + attached to the specific plug-in group receiving the new art. + + See \c #AIPluginArtTypeMessageData */ +#define kSelectorAIDisallowsArtTypeQuery "AI Plugin Group Disallow Art Type" + +/** @ingroup Selectors + Asks a plug-in group to perform a custom hit test. + Sent when \c #AIHitTestSuite::CustomHitTest() is called for a plug-in group, + when a hit occurs within the bounds of the plug-in group object. + \li If the handler finds a hit, return \c #kCustomHitPluginGroupReply and store the + custom hit information in \c #AIPluginGroupCustomHitTestData::CustomHitData. + \li If the handler does not find a hit, return \c #kNoErr + + See \c #AIPluginGroupCustomHitTestData */ +#define kSelectorAIPerformCustomHitTest "AI Plugin Group Perform Custom Hit Test" + +/** @ingroup Selectors + Asks a plug-in group to collect the paint styles of all objects + for which it privately manages styles. + Sent if the \c #kPluginGroupManagesPaintStyles option flag is on. + Your handler iterates the art styles or path styles in plug-in group art to a + callback function, which can examine, but not modify the art styles and art objects. + + Call the desired callback function repeatedly until either all the relevant styles + have been iterated, or until the callback returns an error or \c #kIterationCanQuitReply. + Return this as the result of the notification. + + Use to process information about style-related attributes of + selected objects, such as fill or stroke attributes, when the styles do not map + directly onto the styles of selected objects within the edit group. + A stroke style, for example, might apply only to certain bezier segments + and not to an entire path.You can keep styles in a dictionary, along with + information about parts of the edit group and/or result group to which those styles apply. + + You can iterate partial styles to privately accumulate a report for multiple objects. + Invalid fields, as identified by the style map, are considered \e mixed in the plug-in group. + For example, if \c fillPaint is false in the style map, it means that some + potentially-fillable contents are filled, and some are not filled. + If it is difficult or time-consuming to determine which styles + correspond to selected objects, you can privately cache the results of an accumulated style and + style map, and call the path-style callback only once with those cached results. Clear the cache + on a selection-changed or properties-changed notifier. + + See \c #AIPluginGroupCollectPaintStylesData */ +#define kSelectorAICollectPaintStyles "AI Plugin Group Collect Paint Styles" + +/** @ingroup Selectors + Sent only if the \c #kPluginGroupManagesPaintStyles option flag is on. + Asks the plug-in group to merge a path style into those of its selected descendants, + or perform a transformation on the path styles. See \c #AIPluginGroupApplyPaintStylesData, + + @note The notify-edits message informs the plug-in group that + styles are being transformed externally, while this message + asks the plug-in group to do the transformation. + */ +#define kSelectorAIApplyPaintStyles "AI Plugin Group Apply Paint Styles" + +/** @ingroup Selectors + Asks a plug-in group to apply a developer-defined color-mapping + callback function to objects for which it privately manages styles or colors. + + Initiated by plug-ins or other system components that want to alter all the colors + in a collection of objects. Your handler must iterate through the colors within + the plug-in group that fit the request, passing them to the supplied callback. + + The message data, \c #AIPluginGroupAdjustColorsData, contains three callback procedures, + for colors, styles, and patterns. Your handler must execute the proper callback + on each data entry of the appropriate type that contains meaningful colors; that is, + those that can affect the colors in the result art. + + \li If the plug-in group contains art objects with meaningful colors in its dictionary or + plug-in group data, (for example,the content art of Envelope objects in Edit Envelope mode), + call \c #AIPathStyleSuite::AdjustObjectAIColors() for those objects, passing in the + \c #AIPluginGroupAdjustColorsData::adjustColorCallback and + \c #AIPluginGroupAdjustColorsData::callbackData. + + \li You need not process art objects whose colors are ignored in building the result art; + for example, the gradient mesh that defines the distortion in an Envelope object. + + For private color data not contained in an \c #AIArtHandle, choose the callback + that most directly matches the data types the plug-in stores. For example, if it + stores an \c #AIArtStyleHandle, use the style callback, rather than attempting + to iterate the colors in the art style. + + If the option \c #kPluginGroupManagesPaintStyles is on for the plug-in, the handler + for this message performs the entire adjustment for the plug-in group. If the option is off, + the colors in the edit group are further processed after this handler + completes, unless your handler returns \c #kSkipEditGroupReply. + + To initiate this request to a plug-in group that your plug-in does not manage, + call \c #AIPluginGroupSuite::PluginArtAdjustColors(). + + @note Adobe internal developers: See \c AIPluginSelectionAdjustColors in + Adobe internal suite \c AIPluginSelection for when the plug-in group + manages its own selection mode. + */ +#define kSelectorAIAdjustColors "AI Plugin Group Adjust Colors" + + /** @ingroup Selectors + Sent to plug-ins where the \c #kPluginGroupAskToShowContents option is set, + to request the "Show Contents" mode. The plug-in should enter a mode where the + contents are shown and editable. + If this does not make sense for a particular plug-in group, ignore the call. */ + #define kSelectorAIShowContents "AI Plugin Group Show Contents" + + /** @ingroup Selectors + Sent to plug-ins whose art objects have been changed after changing the document scale + The plug-in should make changes to the data associated with the corresponding art object + w.r.t the new scale of the document*/ +#define kSelectorAIPluginArtDocScaleChange "AI Plugin Group Adjust New Document Scale" + + +/** Options for \c #AIPluginGroupSuite::AddAIPluginGroup(). + Options affect how operations on a plug-in group affect the + result group, and whether the notifications are sent after an operation. + Notifications include \c #kSelectorAIUpdateArt "AI Update" and + \c #kTransformOperationCode "AI Notify Edits". + (Options cannot be changed after the class is defined.) */ +enum AIPluginGroupOptions { + /** If on, updates are triggered by edits to non-descendant objects + that overlap the bounds of the editable art. This is intended for objects + with lens-like effects (distorting what they move over), or + avoidance behavior (moving away from what moves over them). */ + kPluginGroupWantsOverlapUpdateOption = (1<<1), + /** If on, when the entire plug-in group is translated as a whole, the + result group is transformed as well, and no update message is sent. */ + kPluginGroupWantsAutoTranslateOption = (1<<2), + /** If on, when the entire plug-in group is scaled uniformly, the + result group is transformed as well, and no update message is sent. */ + kPluginGroupWantsAutoUScaleOption = (1<<3), + /** If on, when the entire plug-in group is transformed as a whole by any matrix, + the result group is transformed as well, and no update message is sent. + The notify-edits message is sent to let the plug-in know what has been done; + A zero return from the automatically-handled operation types is treated + like a \c #kDontCarePluginGroupReply return, so you need not register for + the notify-edits message if you do not need to respond to it. */ + kPluginGroupWantsAutoTransformOption = (1<<4), + /** If on, hit testing by other tools does fill hit testing on the edit group. + (The plug-in's own tool controls its own hit testing.) By default, + the edit group is only outline-hit, because objects in the edit group + are not previewed. Use this options if you copy the edit group contents into the + result group and then add things, making it appear that the edit + group paths are previewed. This allows direct selection of individual editable + paths with a fill click. + + When on, if there are some edit group objects whose fills or strokes are + \e not copied into the result group, you must check style change notifications + to turn off any fill or stroke paint that the user has given to those objects. + Otherwise, hits can occur on elements you have not painted. + See also \c #kPluginGroupForceFillHitOnClosedPaths. */ + kPluginGroupDoEditFillHitOption = (1<<5), + /** If off (the default), when a user edit removes all objects from the edit group, + the whole plug-in group object is deleted (analogous to the behavior of non-layer groups). + If on, the plug-in group remains in the artwork after its edit group has been emptied. + Use for objects that build their result art based entirely on private data that requires + no edit art, or that behave like layers in that they can maintain the drawing insertion + focus while empty. For implementing layer-like plugin groups, see also the flags + #kPluginGroupDoNotTarget and #kPluginGroupDoNotSmartTarget. */ + kPluginGroupKeepWhenEmptyOption = (1<<6), + + /** If on, the objects in the result group behave like fill of the + objects in the edit group. You could use this, for example, to + implement ink hatching. Setting this flag informs other plug-ins + of your plug-in group's behavior. For example, an Expand Fill filter + could expand plug-in groups if this flag is on, or a Fill Color could + refuse to assign a pattern or gradient fill to the edit group objects, + knowing that the result group is acting as the fill. (Assigning solid color + should be permitted, since fill-like plug-in groups often colorize their fills.) + Default is off. */ + kPluginGroupIsFillLike = (1<<7), + /** If on, the objects in the result group behave like stroke of the + objects in the edit group. You could use this, for example, for brushes. + Setting this flag informs other plug-ins of your plug-in group's behavior. + For example, an Expand Stroke filter could expand plug-in groups if this + flag is on, or the Stroke palette could ignore stroke attributes, + knowing that the result group is acting as the stroke. Default is off. + + If both this and \c #kPluginGroupIsFillLike are off, the result group objects + are treated as related to the edit group in some way other than fill or stroke + effect. An example is path interpolation blends. */ + kPluginGroupIsStrokeLike = (1<<8), + + /** If on, the plug-in group object can never be targeted. + Illustrator always recurses into the contents of the edit group + to find targeted objects, regardless of whether the plug-in group object + is fully selected. This flag prevents users from targeting the + plug-in group and applying styles, transparency or effects to that level, + even via the Layers or Appearance panels. + Also, if this flag and #kPluginGroupKeepWhenEmptyOption are both on, + then the plugin group will act very much like a layer, in that commands + such as Group, Cut, Delete, Copy and copy-drag will operate upon the contents + of the edit group, somewhat as if it were only partially selected, rather + than the entire plugin group. See also #kPluginGroupDoNotSmartTarget. + */ + kPluginGroupDoNotTarget = (1<<9), + /** If on, selecting any piece inside the edit group automatically targets + the plug-in group level. This targeting behavior is similar to that of + compound paths. Fill/stroke changes apply to the plug-in group level, + and the "Contents" field is not shown in the Appearance palette. + The Compound Shapes plug-in group uses this option. + Users can still target the objects inside the edit group + individually in the Layers palette. */ + kPluginGroupAlwaysSmartTarget = (1<<10), + /** If on, the plug-in group is not targeted when fully selected. Users must + target the plug-in group through the Layers panel or the Appearance panel. + Also, if this flag and #kPluginGroupKeepWhenEmptyOption are both on, + then the plugin group will act very much like a layer, in that commands + such as Group, Cut, Delete, Copy and copy-drag will operate upon the contents + of the edit group, somewhat as if it were only partially selected, rather + than the entire plugin group. See also #kPluginGroupDoNotTarget. + Do not set both this option and \c #kPluginGroupAlwaysSmartTarget for the + same plug-in group. */ + kPluginGroupDoNotSmartTarget = (1<<11), + + /** If on, plug-in objects of this plug-in group can be clipping objects. + The result art of a clipping object is used as a clip, if its type + makes this possible. */ + kPluginGroupCanBeClipping = (1<<12), + + /** If on, the Layers palette always shows the contents of the edit group. */ + kPluginGroupAlwaysShowContents = (1<<13), + /** If on, the Layers palette queries the plug-in group with the + \c #kSelectorAICanShowContents message to ask if it may expand + the plug-in group. The plug-in group should reply with \c #kRefusePluginGroupReply + if it is \e not okay to expand. */ + kPluginGroupAskToShowContents = (1<<14), + + /** Together with \c #kPluginGroupBlendAsPluginGroup, defines how plug-in groups + other than blends act when they appear inside a blend. This one is tested first. + + If on, and the selection includes any other plug-in group with this flag on, + the Make Blend command is disabled. Also, fully selected plug-in groups with + this option on do not respond to clicks of the Blend tool (although you can + still create blends INSIDE of them.) + + If the selection contains no plug-in groups with this flag on, then plug-in groups + that are blended to anything other than another plug-in group of the same class + with the \c #kPluginGroupBlendAsPluginGroup flag on are treated as if they + were their result group. The interpolated objects are ordinary groups. */ + kPluginGroupDisableBlends = (1<<15), + + /** Together with \c #kPluginGroupDisableBlends, defines how plug-in groups + other than blends act when they appear inside a blend. + \c #kPluginGroupDisableBlends is tested first. + + If the blend includes two adjacent plug-in groups of the same plug-in class, + and this option on for that class, then the interpolated objects + are also of the same plug-in class. The contents of the edit groups of + the two plug-in objects are blended as if they were ordinary groups. The plug-in + can then interpolate the plug-in group data and dictionary contents; + see \c #kSelectorAIInterpolateData. Finally the interpolated plug-in groups are + sent the \c #kSelectorAIUpdateArt message. */ + kPluginGroupBlendAsPluginGroup = (1<<16), + + /** If on, the plug-in group restricts which types of objects can be inserted + into its edit group, and should handle the \c #kSelectorAIDisallowsArtTypeQuery + message. This differs from the check you do for a \c #kBeforeOperationTime + \c #kSelectorAINotifyEdits response, in that such a check passes in + a specific prospective-contents object to a specific plug-in group, and checks + whether that object can be inserted. The \c #AIPluginArtTypeMessageData does not + have a specific art object, only an art type. You can use it, for example, to + disable tools or commands that might otherwise create a new object of that type, + or to provide cancel feedback on mouse over. */ + kPluginGroupRestrictsArtTypes = (1<<17), + + /** Provides a lighter-weight, less flexible version of customized fill hit testing. + + If on, the plug-in group is treated as if it supplied fill paint on closed paths, + so that selection tools select those paths in the edit group when clicking + in their interiors, even if they have no fill paint of their own and no ancestor art style supplies + fill paint. + + See also \c #kPluginGroupForceFillHitOnAllPaths (the same, but for all paths) + + Edit fill hit testing is done only after outline testing fails to hit anything in + the whole edit group, so front contents do not obscure outlines of back contents. It is also done + only if something is hit in the result group, so that paths that are unfilled and that do not + overlap any filled region are not selected. + + If on, this option takes precedence over \c #kPluginGroupDoEditFillHitOption, meaning that + the plug-in group has private data that it uses to supply fills (rather than edit objects + being copied into the result group). + + This option is not the best choice if the plug-in group supplies private fills + on only some parts of the edit group, or if the fill geometry is transformed. In that case, + custom hit testing allows more customization, but takes longer. */ + kPluginGroupForceFillHitOnClosedPaths = (1<<18), + + /** Provides a lighter-weight, less flexible version of customized fill hit testing. + + If on, the plug-in group is treated as if it supplied fill paint on all paths, + so that selection tools select those paths in the edit group when clicking + in their interiors, even if they have no fill paint of their own and no ancestor art style supplies + fill paint. + + See \c #kPluginGroupForceFillHitOnClosedPaths for additional details. */ + kPluginGroupForceFillHitOnAllPaths = (1<<19), + + /** If on, paint styles applied to content of this plug-in group should not be obtained or set + by accessing the art styles of objects in the edit group, but instead by asking the plug-in group to + get or set the paint styles attached to objects that it considers selected. The plug-in + receives the \c #kSelectorAICollectPaintStyles message when Illustrator would normally + iterate the art styles attached to children of the edit group, and receives the + \c #kSelectorAIApplyPaintStyles message when Illustrator would normally set the art + styles attached to children of the edit group. + + See also \c #AIPluginGroupCollectPaintStylesData, \c #AIPluginGroupApplyPaintStylesData + + Use if art styles attached to selected objects in the edit group do not reflect what the user + sees as the selected styles. (The contents of the edit group are not previewed, so the styles + in the result group are what the user sees, and they may not correspond directly to the styles used + in the edit group.) Also useful for plug-in groups that manage selection state in a way that does + not map directly onto object selection within the edit group. + + This flag is not compatible with any of the target flags (\c #kPluginGroupDoNotTarget, + \c #kPluginGroupAlwaysSmartTarget, \c #kPluginGroupDoNotSmartTarget). + */ + kPluginGroupManagesPaintStyles = (1<<20), + + /** If on, the plugin group allows at least some grouping operations to be performed + inside of it. Grouping operations include Group, Ungroup, Make Compound, Make Clip, + and their corresponding Release operations, plus Expand Appearance and Expand, + since they typically convert a leaf object into a group. If off, no grouping + operations are attempted and no #kCheckOperationTime message is sent. + The reason there is a flag rather than just using a #kCheckOperationTime message + before the edit, as is done for most kinds of edits, is that until CS 6, grouping + operations were unilaterally disallowed inside all plugin groups. Since the default + for no response to a kCheckOperationTime message is to assume that the operation + IS allowed, in order not to alter the runtime environment for legacy plugins we + must default to sending no message and not attempting the operation. + */ + kPluginGroupPermitsGroupCmds = (1<<21) +}; + + +// These are the errors returned by calls to AIPluginGroup suite functions (other than the AIArt standards). + +/** @ingroup Errors + Plug-in group not found (when looked up by name). See \c #AIPluginGroupSuite */ +#define kUnknownPluginGroupErr 'GRP?' +/** @ingroup Errors + Plug-in group already attached to an object. See \c #AIPluginGroupSuite::SetPluginArtPluginGroup() */ +#define kAttachedPluginGroupErr 'GRP!' +/** @ingroup Errors + See \c #AIPluginGroupSuite::SetPluginArtDataCount() */ +#define kTooMuchDataPluginGroupErr 'FULL' + +/** Limit on the size of the data store in a plug-in group. */ +#define kPluginStoreLimit ( 32 * 1024 ) + + +/** @ingroup Errors + Return code for response to \c #kSelectorAIDisallowsArtTypeQuery when + \c #AIPluginGroupMessage::time is \c #kCheckOperationTime, + if the edit should not happen. */ +#define kRefusePluginGroupReply 'RFSE' +/** @ingroup Errors + Return code for response to \c #kSelectorAIDisallowsArtTypeQuery when + \c #AIPluginGroupMessage::time is \c #kCheckOperationTime, + if the plug-in group wants to get a \c #kSelectorAINotifyEdits message with + \c #kCheckOperationTime to refine the answer to the query. */ +#define kCheckPluginGroupReply 'CHEK' +/** @ingroup Errors + Return code for response to \c #kSelectorAIInterpolateData, + if the plug-in group wants to get a \c #kAfterOperationTime message + before the \c #kSelectorAIUpdateArt message. */ +#define kWantsAfterMsgPluginGroupReply 'AFTR' +/** @ingroup Errors + Return code for response to \c #kSelectorAIReplaceSymbol message + if the plug-in group did perform the requested replacement. */ +#define kDidSymbolReplacement 'dsRP' + +/** @ingroup Errors + Return code for response to \c #kSelectorAINotifyEdits + at \c #kAfterOperationTime, if the plug-in group has already updated + the object. (The default behavior, on \c #kNoErr, is to mark + the object as dirty, in need of \c #kSelectorAIUpdateArt.) + + @see \c #AIPluginGroupSuite::MarkPluginArtClean() */ +#define kMarkValidPluginGroupReply 'VALD' +/** @ingroup Errors + Return code for response to \c #kSelectorAINotifyEdits at + \c #kAfterOperationTime, if the edit is irrelevant to this plug-in. + For example, changing the "show center" attribute or locking edit-art + contents rarely affects the result art. + Retains the state of the object, and does not mark it as clean or dirty. */ +#define kDontCarePluginGroupReply 'MOOT' +/** @ingroup Errors + Return code for response to \c #kSelectorAINotifyEdits. + If returned from \c #kAfterOperationTime with \c #kReadOperationCode, + it means that the plug-in group should be destroyed upon return. + If returned from \c #kAfterOperationTime with \c #kChangeOperationCode, + it means that the plugin deleted itself in response to the notification, + and therefore should not be dereferenced afterwards. (It is invalid for + a plugin group to delete itself when handling other notifications.) +*/ +#define kDestroyPluginGroupReply 'TRSH' +/** @ingroup Errors + Return code for response to \c #kSelectorAIPerformCustomHitTest, + message if the custom hit test wants to report a hit. + A return of \c #kNoErr means a hit will not be reported */ +#define kCustomHitPluginGroupReply 'CHIT' +/** @ingroup Errors + Return code for response to \c #kSelectorAIAdjustColors message if + the plug-in group does not want the colors in the edit group to be visited. */ +#define kSkipEditGroupReply 'skpE' + + +/** For the \c #kSelectorAINotifyEdits and \c #kSelectorAIInterpolateData + messages, an operation time that indicates the + relationship of the notification to the stage of the operation. + An \c #AIPluginGroupMessage::AIOperationTime value. + The times are: +
\c #kCheckOperationTime +
\c #kBeforeOperationTime +
\c #kAfterOperationTime +
\c #kDuringOperationTime + + @note You must not dispose of or reorder any artwork objects during a + \c #kCheckOperationTime or \c #kBeforeOperationTime notification. + Any editing must wait until \c #kAfterOperationTime. +*/ +typedef const char *AIOperationTime; + +// the times themselves + +/** Determine whether the plug-in allows this operation. Not sent + for \c #kSelectorAIInterpolateData. + An \c #AIPluginGroupMessage::time value.*/ +#define kCheckOperationTime "AI Check Operation Time" +/** Prepare for the operation to occur. + An \c #AIPluginGroupMessage::AIOperationTime value.*/ +#define kBeforeOperationTime "AI Before Operation Time" +/** The operation has completed. + An \c #AIPluginGroupMessage::AIOperationTime value. */ +#define kAfterOperationTime "AI After Operation Time" +/** The operation is ongoing. Sent only for \c #kSelectorAIInterpolateData. + An \c #AIPluginGroupMessage::AIOperationTime value. */ +#define kDuringOperationTime "AI During Operation Time" + + +/** For \c #kSelectorAINotifyEdits, an \c #AIPluginGroupMessage::code + value that indicates the type of editing operation being performed. + + These code values refer to the entire plug-in group object: +
\c #kReadOperationCode +
\c #kWriteOperationCode +
\c #kAttachOperationCode +
\c #kExpandOperationCode + + For these code values, the editing parameters, + \c #AIPluginGroupMessage::preEditArt and \c #AIPluginGroupMessage::postEditArt + indicate the edit group or member that has been or will be edited: +
\c #kOrderingOperationCode +
\c #kTransformOperationCode +
\c #kGeometryOperationCode +
\c #kTopologyOperationCode +
\c #kDeleteOperationCode +
\c #kAttributeOperationCode +
\c #kStyleOperationCode +
\c #kChangeOperationCode + + The editing parameters are valid only during \c #kCheckOperationTime and + \c #kBeforeOperationTime, where one notify-edits message is sent for + each top-level affected or selected descendant of the plug-in object. + For example, if an entire group is selected but its parent is not fully selected, + that group is passed as the \c preEditArt, but not its children. + + For some codes, additional subcodes indicate which of several operations of + the given type is occurring. Subcodes are \c #AIErr (four-byte \c char) values, + that can be used in debugging as well as allowing switch statements. + */ +typedef const char *AIOperationCode; + +// the codes themselves + +/** Translate data from external to internal representation at + \c #kAfterOperationTime. */ +#define kReadOperationCode "AI Read Operation Code" +/** Translate data from internal to external representation at + \c #kBeforeOperationTime, and back to internal at \c #kAfterOperationTime. + \c Also sent at #kCheckOperationTime when a plug-in can reply + kRefusePluginGroupReply to indicate that the plug-in art cannot be written and + must be expanded (reply kNoErr otherwise). + */ +#define kWriteOperationCode "AI Write Operation Code" +/** Sent when \c #AIPluginGroupSuite::UseAIPluginGroup() is called to associate + a specific plug-in object with the plug-in group. Allows you to check for + consistency and confirm that the group can accept the given object. + */ +#define kAttachOperationCode "AI Attach Operation Code" +/** Sent only at \c #kCheckOperationTime and \c #kBeforeOperationTime (after an + Expand, the object no longer exists). The plug-in art object is about to be + expanded, that is, replaced by its result art contents. Remove from the result + art descendants any tags or other state specific to the plug-in, and remove + from the plug-in's global data anything that tracks this art object. */ +#define kExpandOperationCode "AI Expand Operation Code" +/** Send to front, back, forward, backward. See \c #AIOrderingOperationSubcodes for + subcode values. */ +#define kOrderingOperationCode "AI Ordering Operation Code" +/** Matrix operations on whole objects. See \c #AITransformOperationSubcodes for subcode + values. */ +#define kTransformOperationCode "AI Transform Operation Code" +/** Segments of a path have been modified. See \c #AIGeometryOperationSubcodes for subcode + values. */ +#define kGeometryOperationCode "AI Geometry Operation Code" +/** A single object is being replaced by multiple. Also covers paste into edit art. + See \c #AITopologyOperationSubcodes for subcode values. + @note A join of two paths is indicated by a Geometry of one followed by a Delete + of the other, not a Topology (because the \c preEditArt must always be a + single existing descendant of the edit art group). */ +#define kTopologyOperationCode "AI Topology Operation Code" +/** An element of the edit art group is being deleted */ +#define kDeleteOperationCode "AI Delete Operation Code" +/** Lock/unlock, show/hide, or changing the name or xml UID. + See \c #AIAttributeOperationSubcodes for subcode values. */ +#define kAttributeOperationCode "AI Attribute Operation Code" +/** Path style or text style modifications. See \c #AIStyleOperationSubcodes for subcode + values. */ +#define kStyleOperationCode "AI Style Operation Code" +/** Sent only at \c #kAfterOperationTime, a generic or mixed operation occurred that + does not fit into other categories. Provides no other details of the operation. */ +#define kChangeOperationCode "AI Change Operation Code" + + +// + +/** Subcode values for \c #kChangeOperationCode (only at \c #kAfterOperationTime) */ +enum AIChangeOperationSubcodes { + /** Something in the edit group has been modified by plug-in calls, and + Illustrator is about to pop the context. There will have been no + \c #kBeforeOperationTime notification. Handler must not modify anything other + than the plug-in object itself (because it is called in a loop that + is processing the artwork tree). */ + kPluginSyncArtOpCode = 'PLUG' +}; + +/** Subcode values for \c #kOrderingOperationCode */ +enum AIOrderingOperationSubcodes { + kSendToBackOpCode = 'BACK', + kSendToFrontOpCode = 'FRNT', + kSendBackwardOpCode = 'DOWN', + kSendForwardOpCode = 'UPWD', + kReverseGroupOpCode = 'RVRS', + + /** The \c #AIPluginGroupMessage::preEditArt is in the plug-in group, + and is being moved to another location which is also inside the plug-in group. + See \c #AIPluginGroupMessage::insertionOrder and \c #AIPluginGroupMessage::destinationArt + for the destination of the move. + Used only if the movement is not equivalent to one of the more specific commands above. */ + kSendInternalOpCode = 'SINT', + + /** The \c #AIPluginGroupMessage::preEditArt is in the plug-in group, and is about + to be reordered to a location outside the plug-in group. + See \c #AIPluginGroupMessage::insertionOrder and \c #AIPluginGroupMessage::destinationArt + for the destination of the move. + This is a chance to remove any private dictionary entries from the \c preEditArt.) */ + kReorderOutCode = 'MVOT', + + /** The \c #AIPluginGroupMessage::preEditArt is outside the plug-in group, and is + about to be reordered to a location inside the plug-in group, + See \c #AIPluginGroupMessage::insertionOrder and \c #AIPluginGroupMessage::destinationArt + for the destination of the move. + (Typically handled in the same way as a \c #kPasteIntoOpCode for \c #kTopologyOperationCode.) */ + kReorderIntoOpCode = 'MVIN' +}; + +/** Subcode values for \c #kTransformOperationCode */ +enum AITransformOperationSubcodes { + kTranslationOpCode = 'MOVE', + kRotationOpCode = 'ROTA', + kUniformScaleOpCode = 'USCA', + kNonUniformScaleOpCode = 'NSCA', + kShearOpCode = 'SHER', + kReflectionOpCode = 'REFL', + kMixedTransformOpCode = 'MTFM' +}; + +/** Subcode values for \c #kGeometryOperationCode */ +enum AIGeometryOperationSubcodes { + kMiscPathChangeOpCode = 'GEOM', + /** Unused */ + kMovePointsOpCode = 'MPTS', + /** Unused */ + kAdjustControlsOpCode = 'ADJC', + /** Unused */ + kAddPointsOpCode = '+PTS', + /** Unused */ + kRemovePointsOpCode = '-PTS', + /** Unused */ + kReverseSegmentsOpCode = 'RVRS', + /** Unused */ + kOpenCloseOpCode = 'OPCL', + /** Unused */ + kSwapSymbolsOpCode = 'SWSM' +}; + +/** Subcode values for \c #kTopologyOperationCode These are sent + at \c #kBeforeOperationTime, and provide additional information + about what type of change is about to occur. Your handler can update + private data, but must not make any changes to the edit group. +*/ +enum AITopologyOperationSubcodes { + /** One path is replaced by two. */ + kScissorOpCode = 'SCIZ', + /** The \c #AIPluginGroupMessage::postEditArt (or its children if it is a group) + will be inserted into the edit art below \c #AIPluginGroupMessage::preEditArt + (which is the same as \c #AIPluginGroupMessage::destinationArt.) + */ + kPasteBelowOpCode = 'PBEL', + /** The \c #AIPluginGroupMessage::postEditArt (or its children if it is a group) + will be inserted above \c #AIPluginGroupMessage::preEditArt + (which is the same as \c #AIPluginGroupMessage::destinationArt.) */ + kPasteIntoOpCode = 'PINT', + /** The \c #AIPluginGroupMessage::postEditArt (or its children if it is a group) + will be inserted below \c #AIPluginGroupMessage::preEditArt + (which is the same as \c #AIPluginGroupMessage::destinationArt.) */ + kPasteAboveOpCode = 'PABV', + /** The \c #AIPluginGroupMessage::postEditArt is a transformed copy of \c preEditArt. + Typically it will be inserted above \c #AIPluginGroupMessage::preEditArt. + Check \c #AIPluginGroupMessage::destinationArt and \c #AIPluginGroupMessage::insertionOrder + for the insertion location. */ + kTransformCopyOpCode = 'TCOP', + /** The \c #AIPluginGroupMessage::preEditArt will be changed into a type path. */ + kTypePathChangeOpCode = 'TYCH', + /** Unused */ + kReplaceOneOpCode = 'REP1', + /** Unused */ + kReplaceByManyOpCode = 'REPM', + /** The \c #AIPluginGroupMessage::postEditArt is a non-transformed copy of \c preEditArt, + which will be inserted in the art edit group or a descendant. + Check \c #AIPluginGroupMessage::destinationArt and + \c #AIPluginGroupMessage::insertionOrder for the insertion location. + */ + kDuplicateInsideOpCode = 'DUPi', + /** Sent only at \c #kAfterOperationTime. The \c #AIPluginGroupMessage::postEditArt + is a copy of \c preEditArt which was moved outside the plug-in group. + Allows you to remove any private tags or dictionary entries + from the \c postEditArt. */ + kDuplicateOutsideOpCode = 'DUPo', + /** The selected objects inside the plugin group are to be combined into a + group, compound path, or clipping group. The \c #AIPluginGroupMessage::preEditArt + is the first encountered selected component of the plugin group, which determines + where the new group will be placed in the stacking order. At \c #kCheckOperationTime + and \c #kBeforeOperationTime the \c #AIPluginGroupMessage::postEditArt is an + empty art object of the type that is going to be created. The plugin can call + \c #AIArtSuite::GetArtType() to determine whether a group or compound path is being + created, and can call \c #AIGroupSuite::GetGroupClipped() when the type is \c #kGroupArt + to determine when a clipping group is being created. The \c postEditArt at pre-edit + time is not necessarily the same \c AIArtHandle that is created, + and is definitely not in the art tree; it has a null parent. + If this message is sent at \c #kAfterOperationTime, the \c postEditArt is the + resulting group or compound path art. + This operation code is sent only if the \c #kPluginGroupPermitsGroupCmds option + is set. If that option is off, no group operations are attempted. + */ + kMakeGroupOpCode = 'GRUP', + /** The \c #AIPluginGroupMessage::preEditArt will be ungrouped or released. + If it is a nested plugin group, it will be replaced by its edit art group. + This operation code is sent only if the #kPluginGroupPermitsGroupCmds option + is set. If that option is off, no release group operations are attempted. + */ + kReleaseGroupOpCode = 'UNGP', + /** If non-null, the \c #AIPluginGroupMessage::preEditArt will be expanded into a group + that expands all or part of the appearance. If it is a nested plugin group, it will + be expanded into its result group. If it is an object with an active art style, + it will be replaced by the styled art. If it has a basic appearance, either the + fills or strokes or both will be expanded. If the \c preEditArt is null or is the + plugin group itself, then the plugin group is partially selected and is about to be + examined by one of the Expand commands. This gives the plugin group a chance to return + \c #kRefusePluginGroupReply to skip examination of the contents, if the plugin group + disallows all expansions inside (but allows \c #kMakeGroupOpCode and/or \c #kReleaseGroupOpCode.) + No attempt is made to inform the plugin group of the details of the operation, + as there are too many variations, and the main intent is to ask whether the expansion + is allowed at all. + This operation code is sent only if the \c #kPluginGroupPermitsGroupCmds option + is set. If that option is off, no expansion operations are attempted inside the + plugin group. + See also \c #kExpandOperationCode for notifications of the expansion of the entire + plugin group. + */ + kExpandInsideOpCode = 'ExpI' +}; + +/** Subcode values for \c #kStyleOperationCode */ +enum AIStyleOperationSubcodes { + kPathStyleOpCode = 'PATH', + /** Unused */ + kTextStyleOpCode = 'ATET', + /** Unused */ + kArtStyleOpCode = 'ARTS' +}; + +/** Subcode values for \c #kAttributeOperationCode + By default, a c #kNoErr return (usually meaning the notification was not handled) + for the Name subcode does not mark the plugin group dirty, because it is not + expected to change the contents of the result group for a typical plugin group. + This is in contrast to most edit notifications, which mark the plugin group + dirty unless it receives a \c #kDontCarePluginGroupReply from a \c #kBeforeOperationTime + notification or a \c #kMarkValidPluginGroupReply from a \c #kAfterOperationTime notification. + Since there is no reply that tells the plugin group to invalidate itself on these + notifications, if a rebuild is wanted on a change of name the plugin group + should call \c #AIPluginGroupSuite::MarkPluginArtDirty() while handling the message. +*/ +enum AIAttributeOperationSubcodes { + kHideOpCode = 'HIDE', + kShowOpCode = 'SHOW', + kLockOpCode = 'LOCK', + kUnlockOpCode = 'UNLK', + kSetNameOpCode = 'NAME' +}; + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a plug-in group, never dereferenced. + Access with \c #AIPluginGroupSuite. */ +typedef struct _t_AIClassOpaque *AIPluginGroupHandle; + +/** Developer-defined data for \c #AIInterruptProc callback. */ +typedef void *AIInterruptData; +/** Callback function prototype for \c #AIPluginGroupMessage::proc. + An update or interpolate handler that will take a long time can + call this function any number of times, to give time back to the + core for other processing (such as preview and other event handling). + When it returns an error, your handler should stop processing and + return the error. It will get a chance again later to update. + @param art The art object. + @param data Developer-defined data to pass through. + @return An error to halt processing of the update or interpolate notification. + */ +typedef ASErr (*AIInterruptProc)( AIArtHandle art, AIInterruptData data ); + +/** \c #AIPluginGroupMessage::style value.*/ +union StyleUnion { + /** The path style. If partial, the \c #AIPluginGroupMessage::styleMap + indicates which fields are valid. */ + AIPathStyle *path_s; + /** Unused */ + AIArtStyleHandle art_s; +}; + +/** \c #AIPluginGroupMessage::styleMap value.*/ +union StyleMapUnion { + /** A style map that indicates which fields are valid in + a partial \c #AIPluginGroupMessage::style value. */ + AIPathStyleMap *path_s_map; +}; + + +/** Sent with the \c #kSelectorAINotifyEdits, \c #kSelectorAIUpdateArt, + \c #kSelectorAICanShowContents and \c #kSelectorAIInterpolateData notifications. + + The \c #kSelectorAINotifyEdits notifies of edits in the edit group. In this case the \c time + and \c code members provide more information about the stage of the editing + operation and the operation being performed. Additional members provide information + about what is being edited, how it is being edited and the replacement art that will + be the edited result.
+ Process this information and return one of these error codes to control how the operation + proceeds: +
\c #kRefusePluginGroupReply +
\c #kWantsAfterMsgPluginGroupReply +
\c #kMarkValidPluginGroupReply +
\c #kDontCarePluginGroupReply +
\c #kDestroyPluginGroupReply + + The \c #kSelectorAIUpdateArt message is sent to request that the plug-in group manager + rebuild the result group in response to edits in the edit group. In this case the + only the \c proc and \c data fields are used. +*/ +struct AIPluginGroupMessage { + /** The message data. */ + SPMessageData d; + /** The plug-in group object. */ + AIPluginGroupHandle entry; + /** The plug-in group art object. */ + AIArtHandle art; + + /** For \c #kSelectorAINotifyEdits and \c #kSelectorAIInterpolateData + messages, the stage of the operation (check if allowed, before, during, after). */ + AIOperationTime time; + + /** For \c #kSelectorAINotifyEdits, the specific operation being performed. */ + AIOperationCode code; + + // Editing parameters + + /** For \c #kSelectorAINotifyEdits, the descendant of the edit art group that + is about to be edited. */ + AIArtHandle preEditArt; + + /** For \c #kSelectorAINotifyEdits, the object what will be in the edit group when the + operation completes. For edits that change attributes but keep the same art object + (such as most style operations), the same as \c preEditArt. At \c #kBeforeOperationTime, + the attributes have not yet been modified. + If not the same as \c preEditArt, the object is not in the edit art group until + \c #kAfterOperationTime. Transformation, geometry changes or attribute changes + have already been performed on the object, but is has not yet been inserted into the artwork. + + @note You must not dispose of or reorder any artwork objects during a + \c #kCheckOperationTime or \c #kBeforeOperationTime notification. + Any editing must wait until \c #kAfterOperationTime. */ + AIArtHandle postEditArt; + + /** For some operation codes, a subcodes that further describes + the operation being performed. See \c #AIOperationCode. + Subcodes are four-byte chars like \c AIErr, that facilitate debugging + while still allowing switch statements. */ + AIErr subCode; + + /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kTransformOperationCode + or \c subCode is \c #kTransformCopyOpCode. + The matrix used for the transformation. */ + AIRealMatrix matrix; + + /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kStyleOperationCode. + The style that was modified. */ + StyleUnion style; + + /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kStyleOperationCode. + Indicates which fields of \c style are valid, if it is a partial style. + If \c NULL, all style fields are valid. */ + StyleMapUnion styleMap; + + /** For \c #kSelectorAIUpdateArt and \c #kSelectorAIInterpolateData, + A callback that allows you to interrupt lengthy processing. */ + AIInterruptProc proc; + + /** For \c #kSelectorAIUpdateArt and \c #kSelectorAIInterpolateData. + Developer-defined data to pass through to the \c proc callback. */ + AIInterruptData data; + + // ----New fields added in AI10----- + + /** For \c #kSelectorAIInterpolateData. +
At \c #kBeforeOperationTime or \c #kAfterOperationTime, + the number of steps in the blend. +
At \c #kDuringOperationTime, the number of this step (first step is 1). */ + int steps; + + /** For \c #kSelectorAIInterpolateData. +
The distance of this interpolation between the source and destination + of the blend. [0..1], where 0 is the source (\c preEditArt) and 1 is + the destination (\c postEditArt). */ + AIReal t; + + // Editing parameter + + /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kGeometryOperationCode + and \c subCode is \c #kSwapSymbolsOpCode. In this case, \c art is a symbol + instance in the edit group, and this is the replacement symbol. + (If your plug-in group uses symbols in its art dictionary, see also + \c #kSelectorAIReplaceSymbol.) */ + AIPatternHandle toSymbol; + + // ----New fields added in AI12---- + + /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kTransformOperationCode or + \c subCode is \c #kTransformCopyOpCode. Transformation options, + a logical OR of \c #AITransformArtOptions. */ + ai::int32 transformFlags; + + /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kTransformOperationCode or + \c subCode is \c #kTransformCopyOpCode. + If \c transformFlags contains \c #kScaleLines, the factor by which the strokes + are scaled. */ + AIReal transformLineScale; + + /** For reordering, duplicating, and pasting operations, the preposition object in the paint + order, for relative placement of the new object. See \c #AIArtSuite::NewArt. */ + AIArtHandle destinationArt; + + /** For \c #kSelectorAINotifyEdits, supplied for reordering, duplicating and + pasting operations. The paint-order placement of the new object, + relative to the \c destinationArt object. Cannot be \c #kPlaceAboveAll + or \c #kPlaceBelowAll (because the object must go inside a plug-in group). + Never \c #kPlaceDefault (it is translated into a more specific + paint order before notification). */ + AIPaintOrder insertionOrder; + + /** For \c #kSelectorAINotifyEdits, supplied if \c code is \c #kReadOperationCode + \c #kWriteOperationCode. The version of the Illustrator file + being read from or written to. For other operations, the value is 0. */ + AIVersion aiVersion; + + /**For \c #kSelectorAIPluginArtDocScaleChange, supplied if there is a change in the document scale, + the corresponding plugin can make changes according to the relative scale + */ + AIReal relativeScaleFactor; + + +}; + + +/** Data for the \c #kSelectorAIReplaceSymbol notification. */ +struct AIReplaceSymbolMessageData { + /** The message data. */ + SPMessageData d; + /** The plug-in group. */ + AIPluginGroupHandle entry; + /** The plug-in group art object. */ + AIArtHandle art; + /** A symbol to be replaced, referenced by the plug-in group + in its dictionary, or \c NULL to replace all used symbols. */ + AIPatternHandle targetSymbol; + /** The replacement symbol. */ + AIPatternHandle replacementSymbol; +}; + + +/** Data for the \c #kSelectorAIDisallowsArtTypeQuery notification. */ +struct AIPluginArtTypeMessageData { + /** The message data. */ + SPMessageData d; + /** The plug-in group for which insertion is requested. */ + AIPluginGroupHandle entry; + /** The \c #AIArtType of art potentially inserted into the group. */ + short artType; +}; + + +// Function pointers used for callbacks when storing custom hit data +/** A callback that you must supply with the \c #AIPluginGroupCustomHitTestData::CustomHitData, + that casts the void* data to the appropriate type and disposes of it properly. */ +typedef AIAPI void (*AICustomHitDataDeleteFunc)(void*); + +/** Data for the \c #kSelectorAIPerformCustomHitTest notification. */ +struct AIPluginGroupCustomHitTestData { + /** The message data. */ + SPMessageData d; + /** The plug-in group. */ + AIPluginGroupHandle entry; + /** The plug-in group art object that was hit. */ + AIArtHandle art; + /** The hit location coordinates. */ + AIRealPoint location; + /** A structure in which to record custom hit information. + Access after the hit test with \c #AIHitTestSuite::GetCustomHitData() */ + struct + { + /** [in] The data that was provided to \c #AIHitTestSuite::CustomHitTest() */ + void* inData; + /** [out] Developer-defined custom hit data. Your plug-in is reponsible for + allocating and cleaning up this heap-based data. */ + void* outData; + /** [out] A callback function that properly deletes the + returned custom hit data. Required.*/ + AICustomHitDataDeleteFunc deleteFunc; + } CustomHitData; + +}; + + +/** Prototype for the \c #AIPluginGroupCollectPaintStylesData::artStyleCallback. + Can examine, but not modify the art styles and art objects. + @param artStyle The current art style. + @param gradientContext \c NULL if gradient vectors in the style are relative + to the whole plug-in group. Otherwise, gradient vectors in the style are + relative to this art object. + @param usage How the style is used (in fills or strokes), an \c #AIPaintUsage value. + @param callbackData Developer-defined data passed from the notification message. + */ +typedef AIAPI ASErr (*AIProcessArtStyleFunc)(const AIArtStyleHandle artStyle, + AIArtHandle gradientContext, ai::int32 usage, void *callbackData ); + +/** Prototype for the \c #AIPluginGroupCollectPaintStylesData::pathStyleCallback. + Can examine, but not modify the path styles and art objects. + @param pathStyle The current path style. + @param psMap A style map that identifies the valid fields in a partial style. + Can be \c NULL. + @param gradientContext \c NULL if gradient vectors in the style are relative + to the whole plug-in group. Otherwise, gradient vectors in the style are + relative to this art object. + @param usage How the style is used (in fills or strokes), an \c #AIPaintUsage value. + @param callbackData Developer-defined data passed from the notification message. + */ +typedef AIAPI ASErr (*AIProcessPathStyleFunc)(const AIPathStyle *pathStyle, const AIPathStyleMap *psMap, + AIArtHandle gradientContext, ai::int32 usage, void *callbackData ); + +/** @ingroup Errors + Returned by an \c AIProcessArtStyleFunc, \c AIProcessPathStyleFunc, or \c AIAdjustColorFunc + in non-error situations that nonetheless mean the iteration should be terminated + without processing any remaining styles. This could be used, for instance, if the + callback functions were searching for a particular global object and could quit + as soon as it appeared. */ +#define kIterationCanQuitReply 'DONE' + +/** Data for the \c #kSelectorAICollectPaintStyles notification. */ +struct AIPluginGroupCollectPaintStylesData { + /** The message data. */ + SPMessageData d; + /** The plug-in group. */ + AIPluginGroupHandle entry; + /** The plug-in group art object whose style contents are being queried */ + AIArtHandle pluginArt; + /** True to iterate only selected styles. (Currently always true.) */ + AIBoolean selectedOnly; + /** Developer-defined data to pass through to the callbacks. */ + void* callbackData; + /** A callback function that examines the art styles in the plug-in art. */ + AIProcessArtStyleFunc artStyleCallback; + /** A callback function that examines the path styles in the plug-in art. */ + AIProcessPathStyleFunc pathStyleCallback; + +}; + +/** Data for the \c #kSelectorAIApplyPaintStyles message. */ +struct AIPluginGroupApplyPaintStylesData { + /** The message data. */ + SPMessageData d; + /** The plug-in group. */ + AIPluginGroupHandle entry; + /** The plug-in group art object whose style contents are being modified */ + AIArtHandle pluginArt; + + /** When true, apply a transformation using \c matrix, \c transformFlags, + and \c transformLineScale, and ignore \c pathStyle and \c pathStyleMap. +
When false, merge styles using \c pathStyle and \c pathStyleMap, and ignore + \c matrix, \c transformFlags, and \c transformLineScale. */ + AIBoolean applyStyleTransform; + + /** Fill and stroke information to be merged into the current style. */ + AIPathStyle pathStyle; + /** A style map the indicates which fields are valid in a partial path style. */ + AIPathStyleMap pathStyleMap; + + /** The transformation matrix. */ + AIRealMatrix matrix; + /** Transformation options, a logical OR of \c #AITransformArtOptions. + \c #kTransformObjects and \c #kTransformChildren are always off, + and at least one of \c #kTransformFillGradients, \c #kTransformFillPatterns, + \c #kTransformStrokePatterns, \c #kTransformStrokeGradients, or \c #kScaleLines is on. */ + ai::int32 transformFlags; + /** If the \c #kScaleLines option is on, the factor by which to scale the strokes. */ + AIReal transformLineScale; + +}; + + +/** Callback function prototype used to process colors from art style handles + directly contained in the dictionary of a plug-in group. Passed to \c #kSelectorAIAdjustColors + in \c #AIPluginGroupAdjustColorsData::adjustArtStyleCallback. + Allows various concerned plug-ins to work with the contained styles: + + \li The plug-in with art style handles in its dictionary can use this to find those art styles, + \li Another plug-in that implements the effects inside the art styles can use it to access their colors. + \li Another plug-in can provides the color-adjustment callback to do the actual color mapping. + + This callback is not typically provided by a third-party plug-in, but is provided internally + by the implementation of \c #AIPathStyleSuite::AdjustObjectAIColors(), or by + \c #AIPluginGroupSuite::PluginArtAdjustColors(). A plug-in groups with art styles + in its dictionary need only call this callback, not implement it. + @param oldArtStyle The art style to be examined. It is not altered. + @param newArtStyle [out] A buffer in which to return the art style after color adjustment. + If no colors are changed, contains the input style. + @param userData A pointer to developer-defined data needed for the modification, + acquired from the message data. + */ +typedef AIErr (*AIAdjustArtStyleFunc) ( AIArtStyleHandle oldArtStyle, AIArtStyleHandle *newArtStyle, void *userData ); + +/** Data for the \c #kSelectorAIAdjustColors notification. */ +struct AIPluginGroupAdjustColorsData { + /** The message data. */ + SPMessageData d; + /** The plug-in group. */ + AIPluginGroupHandle entry; + /** The plug-in group art object whose style contents are being modified. */ + AIArtHandle pluginArt; // IN + + /** When true, iterate only selected colors.In this case, the plug-in group + was at least partially selected in object selection mode. */ + AIBoolean selectedOnly; + /** When true, iterate colors used in fills. */ + AIBoolean adjustFills; + /** When true, iterate colors used in strokes. */ + AIBoolean adjustStrokes; + /** Developer-defined data to pass through to the callback. + Can contain extra parameters needed by the color mapping.*/ + void* callbackData; + + /** A developer-defined callback function that processes colors. Call on any colors + that are directly contained in the plug-in group's private data; that is, not contained + within an \c #AIArtStyleHandle, \c #AIPatternHandle, or an \c #AIArtHandle. */ + AIAdjustColorFunc adjustColorCallback; + + /** [out] Set to true if the handler modified any colors. */ + AIBoolean modifiedSomething; + + /** A developer-defined callback function to examine or modify colors contained + in patterns, symbols, brush patterns or graph designs. Called on objects of these + types that may contain meaningful colors and that are directly stored in the + plug-in group's private data; that is, not contained within an + \c #AIArtStyleHandle, \c #AIPatternHandle, or an \c #AIArtHandle. + Fill patterns, for example, are usually stored in an \c #AIColor, and + brush patterns are usually stored in an \c #AIArtStyleHandle. + You will typically call this for symbol handles that are stored independently + of symbol instances. + + The function does not modify the input pattern. It returns a processed + handle of the same type, which the plug-in group should store if it is + different from the input handle. + */ + AIAdjustPatternHandleFunc adjustPatternHandleCallback; + + /** A developer-defined callback function to examine or modify colors contained + in art styles, including the private parameters of Live Effects. + Call on any art style handles that are directly stored in the plug-in group's + private data; that is, not attached to any art object. + + The function does not modify the input style. It returns a processed + art style, which the plug-in group should store if it is + different from the input handle. + */ + AIAdjustArtStyleFunc adjustArtStyleCallback; + +}; + +/*** Descriptive information for a new plug-in group. + See \c #AIPluginGroupSuite::AddAIPluginGroup().*/ +struct AIAddPluginGroupData { + /** Major version number. */ + ai::int32 major; + /** Minor version number. */ + ai::int32 minor; + /** Localized descriptive string for error messages. */ + const char *desc; +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions for working with \e plug-in \e groups. + + A plug-in group organizes artwork that is acted upon by a particular plug-in. + A plug-in group object is a container of plug-in group art objects. + It maintains two groups of art objects; one group that the user interacts + with (the \e edit \e group), and another group that your plug-in generates + (the \e result \e group). Use the functions in this suite to create + these groups and to access their contents. + + Register a plug-in group during startup to manage plug-in group art objects + of a particular type, using \c #AIPluginGroupSuite::AddAIPluginGroup(). + Store the returned plug-in group handle in \c globals, to use in + creating plug-in group art objects. All plug-in group art objects + must associate themselves with a plug-in group by calling + \c #AIPluginGroupSuite::UseAIPluginGroup(). + + A plug-in group art object is an art object with the type \c #kPluginArt. The + edit art group and result art group are art objects with the type + \c #kGroupArt, but they are not children of the plug-in group art object. + Access them with \c #AIPluginGroupSuite::GetPluginArtEditArt() and + \c #AIPluginGroupSuite::GetPluginArtResultArt(). + \li Members of the edit group are hidden, but are editable and selectable. + \li Members of the result group become visible, but are not selectable. + + You can define and store arbitrary data with a plug-group art object, using + \c #AIPluginGroupSuite::SetPluginArtDataRange(), + \c #AIPluginGroupSuite::GetPluginArtDataRange(), + \c #AIPluginGroupSuite::SetPluginArtDataCount(), + and \c #AIPluginGroupSuite::GetPluginArtDataCount(). + + A plug-in that manages plug-in groups can receive these selectors, + with \c #kCallerAIPluginGroup as the caller, accompanied by + an \c #AIPluginGroupMessage: +
\c #kSelectorAINotifyEdits +
\c #kSelectorAIUpdateArt +
\c #kSelectorAICanShowContents +
\c #kSelectorAIInterpolateData + + It can also receive these selectors: +
\c #kSelectorAIReplaceSymbol (sends \c #AIReplaceSymbolMessageData) +
\c #kSelectorAIDisallowsArtTypeQuery (sends \c #AIPluginArtTypeMessageData) +
\c #kSelectorAIPerformCustomHitTest (sends \c #AIPluginGroupCustomHitTestData) +
\c #kSelectorAICollectPaintStyles (sends \c #AIPluginGroupCollectPaintStylesData) +
\c #kSelectorAIApplyPaintStyles (sends \c #AIPluginGroupApplyPaintStylesData) +
\c #kSelectorAIAdjustColors (sends \c #AIPluginGroupAdjustColorsData) + + The Live Blend tool is an example of how plug-in groups are used. + A live blend is created by drawing two objects, then clicking them + separately with the blend tool. After the second click, the tool draws + a series of intermediate objects between the original source and destination + objects to create a smooth blend between them. Only the source and destination + objects are selectable or editable. When you edit or move the source or + destination objects, the intermediate objects are regenerated. The document + contains only the original two objects in the art tree. + In this case, the source and destination art objects (as well as the spine + which links the two objects) are children of the edit group, and the intermediate + objects (as well as a copy of the original source and destination objects) are + children of the result group. + + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPluginGroupSuite and \c #kAIPluginGroupVersion. + + @section Plug-in Group Example + + First, register the plug-in group: + +@code +sAIPluginGroup->AddAIPluginGroup ( + message->d.self, + "My Plugin Group Plugin", + &pluginGroupData, + kPluginGroupWantsAutoTransformOption, + &g->myPluginGroupHandle + ); +@endcode + + Create the plug-in group art, typically in response to a menu item or a click + in your dialog, then associate the plug-in group art with the plug-in group. + +@code +sAIArt->NewArt( kPluginArt, kPlaceAboveAll, NULL, &pluginGroupArt ); +sAIPluginGroup->UseAIPluginGroup (pluginGroupArt, g->myPluginGroupHandle ); +@endcode + + This activates the plug-in group art and allows you to access + its edit and result groups. + + Upon activation, your plug-in starts to receive notifications. + In response to \c #kSelectorAIUpdateArt or \c #kSelectorAINotifyEdits + notifications, you must regenerate the objects in the result group + The update message is the easiest and most effective notifier to use. + It is sent whenever any of the edit-group objects are modified. + In your main loop, listen for the \c #kCallerAIPluginGroup caller + and \c #kSelectorAIUpdateArt selector and respond by regenerating the + result-group objects according to the new state of the edit-group objects. + */ +struct AIPluginGroupSuite { + + /** Creates a plug-in group. + @param self This plug-in. + @param name A unique identifying name for the plug-in group. + This name is displayed in error messages, and differs + from the \e default name used in the Layers + and Appearance palettes; see \c #SetAIPluginGroupDefaultName(). + @param data The version and error-reporting information for the group. + @param options Option flags that determine the behavior of members, + a logical OR of \c #AIPluginGroupOptions. You cannot change these + after they are set. + @param entry [out] A buffer in which to return the plug-in group object. + */ + AIAPI AIErr (*AddAIPluginGroup) ( SPPluginRef self, const char *name, AIAddPluginGroupData *data, ai::int32 options, AIPluginGroupHandle *entry ); + + /** Associates a plug-in group art object with a plug-in group, activating + the plug-in group and automatically creating the contained edit and + result groups. After calling this function, your plug-in starts to + receive plug-in group selectors. + + You can only access the edit and result groups through this art object; + see \c #GetPluginArtEditArt() and \c #GetPluginArtResultArt(). + + The art object inherits the plug-in group's name and version attributes, + which you can then access either through the group (\c #GetAIPluginGroupName(), + for example) or the art object (\c #GetPluginArtName()). The plug-in group + name is used for error messages, and differs from the art object's name, + used in the Layers and Appearance palettes; see \c #GetAIPluginGroupDefaultName(). + + You can move the art object to a new plug-in group with \c #SetPluginArtPluginGroup(). + @param art An art object of type \c #kPluginArt, created with \c #AIArtSuite::NewArt(). + @param entry The plug-in group object. + */ + AIAPI AIErr (*UseAIPluginGroup) ( AIArtHandle art, AIPluginGroupHandle entry ); + + /** Retrieves the name of a plug-in group. This name is displayed in error messages, + and can differ from the display name (called the \e default name) used in + the Layers and Appearance palettes; see \c #GetAIPluginGroupDefaultName(). + @param entry The plug-in group object. + @param name [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetAIPluginGroupName) ( AIPluginGroupHandle entry, char **name ); + + /** Retrieves the version information of a plug-in group. + @param entry The plug-in group object. + @param major [out] A buffer in which to return the major version number. + @param minor [out] A buffer in which to return the minor version number. + */ + AIAPI AIErr (*GetAIPluginGroupVersion) ( AIPluginGroupHandle entry, ai::int32 *major, ai::int32 *minor ); + + /** Retrieves the description of a plug-in group, a localized string that Illustrator + uses for error reporting. + @param entry The plug-in group object. + @param desc [out] A buffer in which to return the description. + */ + AIAPI AIErr (*GetAIPluginGroupDescription) ( AIPluginGroupHandle entry, char **desc ); + + /** Retrieves the option flags of a plug-in group. + @param entry The plug-in group object. + @param options [out] A buffer in which to return the options, a logical OR + of \c #AIPluginGroupOptions. + */ + AIAPI AIErr (*GetAIPluginGroupOptions) ( AIPluginGroupHandle entry, ai::int32 *options ); + + /** Retrieves a reference to the plug-in that created a plug-in group. + You can pass this reference to functions in the \c #AIPluginSuite. + @param entry The plug-in group object. + @param plugin [out] A buffer in which to return the plug-in object. + */ + AIAPI AIErr (*GetAIPluginGroupPlugin) ( AIPluginGroupHandle entry, SPPluginRef *plugin ); + + /** Gets the number of currently registered plug-in group managers. Use with + \c #GetNthAIPluginGroup() to iterate through plug-in groups (which can belong + to different plug-ins). + @param count [out] A buffer in which to return the number of groups. + */ + AIAPI AIErr (*CountAIPluginGroups) ( ai::int32 *count ); + + /** Retrieves a reference to a plug-in group by position index in the current list + of registered plug-in group managers. Use with \c #CountAIPluginGroups to + iterate through plug-in groups (which can belong to different plug-ins). + @param n The 0-based index position. + @param entry [out] A buffer in which to return the plug-in group object. + */ + AIAPI AIErr (*GetNthAIPluginGroup) ( ai::int32 index, AIPluginGroupHandle *entry ); + + /** Retrieves the name of the plug-in group that manages a plug-in group art object. + @param art The plug-in group art object. + @param name [out] A buffer in which to return the plug-in group name. + */ + AIAPI AIErr (*GetPluginArtName) ( AIArtHandle art, char **name ); + + /** Sets the name of the plug-in group that manages a plug-in group art object. + @param art The plug-in group art object. + @param name The new unique identifying name for the plug-in group. */ + AIAPI AIErr (*SetPluginArtName) ( AIArtHandle art, char *name ); + + /** Retrieves the version information for the plug-in group that manages + a plug-in group art object. + @param art The plug-in group art object. + @param major [out] A buffer in which to return the major version number. + @param minor [out] A buffer in which to return the minor version number. + */ + AIAPI AIErr (*GetPluginArtVersion) ( AIArtHandle art, ai::int32 *major, ai::int32 *minor ); + + /** Sets the version information for the plug-in group that manages + a plug-in group art object. + @param art The plug-in group art object. + @param major The new major version number. + @param minor The new minor version number. + */ + AIAPI AIErr (*SetPluginArtVersion) ( AIArtHandle art, ai::int32 major, ai::int32 minor ); + + /** Retrieves the plug-in group that manages a plug-in group art object. + @param art The plug-in group art object. + @param entry [out] A buffer in which to return the plug-in group object. + */ + AIAPI AIErr (*GetPluginArtPluginGroup) ( AIArtHandle art, AIPluginGroupHandle *entry ); + + /** Sets the plug-in group that manages a plug-in group art object. + @param art The plug-in group art object. + @param entry The new plug-in group object. + */ + AIAPI AIErr (*SetPluginArtPluginGroup) ( AIArtHandle art ); + + /** Retrieves the edit group art object from the plug-in group art object. + @param art The plug-in group art object. + @param editArt [out] A buffer in which to return the edit group art object. + + @note The edit group art object is \e not a child of the + the plug-in group art object. You can access it with this function, + and it can be returned by \c #AIMatchingArtSuite::GetSelectedArt(), which + can also return the plug-in group art object itself.
+ \c #AIMatchingArtSuite::GetSelectedArt() or \c #AIMatchingArtSuite::GetMatchingArt() + can return objects in the edit group. + */ + AIAPI AIErr (*GetPluginArtEditArt) ( AIArtHandle art, AIArtHandle *editArt ); + + /** Replaces the edit group of a plug-in group art object. + @param art The plug-in group art object. + @param editArt The new edit group object, an art object of type \c #kGroupArt. + */ + AIAPI AIErr (*SetPluginArtEditArt) ( AIArtHandle art, AIArtHandle editArt ); + + /** Retrieves the result group art object from the plug-in group art object. + @param art The plug-in group art object. + @param resultArt [out] A buffer in which to return the result group art object. + + @note The result group art object is \e not a child of the + the plug-in group art object. You can access it only with this function. + */ + AIAPI AIErr (*GetPluginArtResultArt) ( AIArtHandle art, AIArtHandle *resultArt ); + + /** Replaces the result group of a plug-in group art object. + @param art The plug-in group art object. + @param resultArt The new result group object, an art object of type \c #kGroupArt. + */ + AIAPI AIErr (*SetPluginArtResultArt) ( AIArtHandle art, AIArtHandle resultArt ); + + /** Gets the size of the developer-defined data store for a plug-in group art object. + Store data using \c #SetPluginArtDataRange(), and access it with \c #GetPluginArtDataRange(). + The data is stored as a hexadecimal-encoded string of bytes. + @param art The plug-in group art object. + @param count [out] A buffer in which to return the number of bytes of data + stored, or 0 if there is no data associated with the art object. + */ + AIAPI AIErr (*GetPluginArtDataCount) ( AIArtHandle art, size_t *count ); + + /** Sets the size of the developer-defined data store for a plug-in group art object. + Store data using \c #SetPluginArtDataRange(), and access it with \c #GetPluginArtDataRange(). + The data is stored as a hexadecimal-encoded string of bytes. + @param art The plug-in group art object. + @param count The number of bytes of data. + */ + AIAPI AIErr (*SetPluginArtDataCount) ( AIArtHandle art, size_t count ); + + /** Retrieves data from the developer-defined data store for a plug-in group art object. + The data is stored as a hexadecimal-encoded string of bytes. + @param art The plug-in group art object. + @param data [out] A buffer in which to return the data. + @param index An offset into the data store at which to start reading. + @param count A number of bytes to read from the data store. + */ + AIAPI AIErr (*GetPluginArtDataRange) ( AIArtHandle art, void *data, size_t index, size_t count ); + + /** Writes data to the developer-defined data store for a plug-in group art object. + The data is stored as a hexadecimal-encoded string of bytes. + @param art The plug-in group art object. + @param data A pointer to the developer-defined data. + @param index An offset into the data store at which to start writing. + @param count A number of bytes to write to the data store. + */ + AIAPI AIErr (*SetPluginArtDataRange) ( AIArtHandle art, void *data, size_t index, size_t count ); + + + /** Marks a plug-in group art object as dirty, meaning that the contained art has + been modified since the last update operation. This forces an update notification; + see \c #kSelectorAIUpdateArt. + + Illustrator generally detects when a plug-in group object needs + to have the result art rebuilt. It sends an update message when + the object is first created, and whenever the group's data or any object + in the edit group has been edited (outside of the update message handler itself). + You might need to specifically mark the art as changed if objects have external + dependencies; for instance, reference to a pattern or other global object, + or an artwork attribute such as the page size. If you detect relevant changes + through other notifications, you can trigger an update by calling this function. + @param art The plug-in group art object. + @see \c #MarkPluginArtClean(), \c #MarkPluginArtSilent() + */ + AIAPI AIErr (*MarkPluginArtDirty) ( AIArtHandle art ); + + /** Marks a plug-in group art object as clean, meaning that the contained art has + not been modified since the last update operation. + + A menu command or tool action typically modifies the edit art or the + object's data, then rebuilds the result art. The modifications trigger + a notify-edit message, and also mark the plug-in object dirty, causing + a redundant update if the result art has already been updated. + Use this function in an external notification handler, after updating + the result group, to prevent the redundant update. + + @param art The plug-in group art object. + @see \c #MarkPluginArtDirty(), \c #MarkPluginArtSilent() + @note This function is intended for use within a GoMenu or AITool handler, or a notification + from some other suite. When a handler for \c #kSelectorAINotifyEdits + returns \c #kNoErr, it marks the plug-in object as dirty (in need of + \c #kSelectorAIUpdateArt), even if the handler called this function. To prevent + this, the handler must return \c #kMarkValidPluginGroupReply. + */ + AIAPI AIErr (*MarkPluginArtClean) ( AIArtHandle art ); + + // New for AI10: clipping attribute for plug-in group objects + + /** Reports whether a plug-in group art object is a clipping object. When it is, + the result group constructed by the plug-in group manager should + contain one or more paths that are set to clip. + @param art The plug-in group art object. + @param clipping [out] A buffer in which to return true if the object + is a clipping object. + */ + AIAPI AIErr (*GetPluginArtClipping) ( AIArtHandle art, AIBoolean *clipping ); + + /** Sets the clipping state of a plug-in group art object. + @param art The plug-in group art object. + @param clipping True to make the object a clipping object, false to + turn clipping off. + @return \c #kBadParameterErr if the associated group does not specify the option + \c #kPluginGroupCanBeClipping. + */ + AIAPI AIErr (*SetPluginArtClipping) ( AIArtHandle art, AIBoolean clipping ); + + /** Retrieves the default name for a plug-in group, as returned by + \c #AIArtSuite::GetArtName(). This name is used in + the Layers and Appearance palettes, and can differ from the name + assigned at creation, which is displayed in error messages; + see \c #GetAIPluginGroupName(). + @param art The plug-in group object. + @param name [out] A buffer in which to return the default name, or \c NULL, + in which case \c #AIArtSuite::GetArtName() returns the description string. + */ + AIAPI AIErr (*GetAIPluginGroupDefaultName) ( AIPluginGroupHandle entry, char** name ); + + /** Sets the default name for a plug-in group, as returned by + \c #AIArtSuite::GetArtName(). This name is used in + the Layers and Appearance palettes, and can differ from the name + assigned at creation, which is displayed in error messages; + see \c #GetAIPluginGroupName(). + @param entry The plug-in group object. + @param name The new default name, or \c NULL, in which case \c #AIArtSuite::GetArtName() + returns the description string. + */ + AIAPI AIErr (*SetAIPluginGroupDefaultName) ( AIPluginGroupHandle entry, const char* name ); + + /** Retrieves the earliest Illustrator version that this plug-in group supports. + @param entry The plug-in group object. + @param appVersion [out] A buffer in which to return the version constant. + @see \c #SetAIPluginGroupAppVersion() + */ + AIAPI AIErr (*GetAIPluginGroupAppVersion) ( AIPluginGroupHandle entry, AIVersion* appVersion ); + + /** Sets the earliest Illustrator version that this plug-in group supports. + When Illustrator writes out this plug-in group, if writing to an earlier file + format, it writes out only the result group. + + If not specifically set, the version default is 8. Plug-in groups are not supported in versions + earlier than 8. + @param entry The plug-in group object. + @param appVersion The version constant. + */ + AIAPI AIErr (*SetAIPluginGroupAppVersion) ( AIPluginGroupHandle entry, AIVersion appVersion ); + + // New for AI12: + + /** Prevents subsequent modifications to the edit group from marking the object dirty (changed) and + triggering the update notification. Does not prevent the marking of the result group. + The status is cleared when the context is popped. + @param art The plug-in group art object. + @see \c #MarkPluginArtClean(), \c #MarkPluginArtDirty() + */ + AIAPI AIErr (*MarkPluginArtSilent) ( AIArtHandle art ); + + /** @deprecated As of AI13 (CS3), this function is deprecated in favor of + \c #AIPathStyleSuite::AdjustObjectAIColors(), a more powerful and flexible treatment + of colors in global objects such as patterns, gradients, symbols, brushes, and + Live Effects. Color filter plug-ins that iterate the artwork contents themselves + and only use this function for plug-in groups with that have the flag + \c #kPluginGroupManagesPaintStyles, should now use \c #AIPathStyleSuite::AdjustObjectAIColors() + to process the entire selection. In this case, the new function emulates + the previous behavior; it sends an c\ #AIPluginGroupAdjustColorsData + message in which both the pattern and style adjustment callbacks do nothing. + + Modifies colors in all art managed by a plug-in group, by calling a developer-defined callback function. + @param art The plug-in group art object. + @param adjustColorCallback The developer-defined callback procedure. + @param callbackData Optional developer-defined data to pass through to the callback. + @param modifiedSomething [out] Optional, a buffer in which to return true if any + colors were modified. + @param adjustFills True to modify colors in fill. + @param adjustStrokes True to modify colors in strokes. + @param selectionOnly True to modify colors only in selected objects. + @return Any error reported by the callback function. + @note This function s intended for the use of plug-ins \e other \e than + the one implementing the plug-in group. + */ + AIAPI AIErr (*PluginArtAdjustColors) ( AIArtHandle art, AIAdjustColorFunc adjustColorCallback, + void *callbackData, ASBoolean *modifiedSomething, + AIBoolean adjustFills, AIBoolean adjustStrokes, + AIBoolean selectionOnly ); + +}; + + +#include "AIHeaderEnd.h" + +#endif + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPluginNames.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPluginNames.h index 7a44c94..137ce1c 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPluginNames.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPluginNames.h @@ -1,288 +1,327 @@ -#ifndef __AIPluginNames__ -#define __AIPluginNames__ - -/* - * Name: AIPluginNames.h - * Date: Feb 14, 1997 - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - * Includes names for all plugins - * - */ - - -#define kAIAppPluginName "Adobe AI Application Plugin" - - -#define k3DPluginName "3D v2" -#define kAboutPluginsPluginName "Adobe Illustrator About Plug-ins" -#define kActionManagerPluginName "AdobeActionManager" -#define kActionPalettePluginName "AdobeActionPalette" -#define kActionPalettePluginNameEx "ActionPalette for API Context" -#define kAddAnchorPointsPluginName "Add Anchor Points" -#define kAddArrowHeadsPluginName "AddArrowHeads v3" -#define kAdjustColorsPluginName "Adjust" -#define kAdobeOnlinePluginName "AdobeOnline" -#define kAdvancedSelectPluginName "Advanced Select" -#define kAltGyphPalettePluginName "Alternate Glyph Palette" -#define kAPIUnitTestPluginName "API Unit Test Plugin" -#define kAppBarControlsPluginName "Adobe App Bar Controls Host" -#define kArtConvertersPluginName "Art Converters v2" -#define kArtOnPathBrushPluginName "AdobeArtBrushTool" -#define kAlignPalettePluginName "AdobeAlignObjects" -#define kArtStylePluginName "Adobe Art Style Plugin" -#define kAssetManagementPluginName "Asset Management" -#define kAssetManagementUIPluginName "Asset ManagementUI" -#define kAIAATPluginName "AAT for AI" -#define kAttributesPalettePluginName kAIAppPluginName -#define kBeautifulStrokesPluginName "BeautifulStrokes Suite" -#define kBoundingBoxPluginName "BoundingBox" -#define kBrushManagerPluginName "AdobeBrushMgr" -#define kCalligraphicBrushPluginName "Adobe Calligraphic Brush Tool" -#define kCharParaStylesPluginName "Character and Paragraph Styles" -#define kCharacterPalettePluginName kAIAppPluginName -#define kCleanupPluginName "Cleanup" -#define kColorsPluginName "Colors" -#define kColorHarmonyPluginName "Adobe Color Harmony Plugin" -#define kControlPalettePluginName "Control Palette Plugin" -#define kCropPluginName "Adobe Crop Tool" -#define kCSSExtractPluginName "CSSExtract" -#define kCSSExtractUIPluginName "CSSExtractUI" -#define kCurvatureToolPluginName "Adobe Curvature Tool" -#define kCurvatureToolUIPluginName "Adobe Curvature ToolUI" -#define kDBrushBrushPluginName "Adobe dBrush Brush Tool" -#define kDBrushToolUIPluginName "Adobe dBrush Brush Tool UI" -#define kDeformPluginName "Adobe Deform Plugin" -#define kDiffusionRasterPluginName "AdobeDiffusionRaster" -#define kDistortPluginName "Distort v2" -#define kDocInfoPluginName "DocInfo" -#define kDocWindowPluginName "Document Window Plugin" -#define kExperimentationName "Experimentation Plugin" -#define kHelloPluginName "Hello Experience Plugin" -#define kToolPenPluginName "Pen Tool Plugin" -#define kDropShadowPluginName "DropShadow" -#define kDXFDWGFormatPluginName "Adobe DXFDWG Format" -#define kEraserPluginName "Adobe Eraser Tool" -#define kEurekaPluginName "AdobeEurekaPlugin" -#define kExpandPluginName "Expand" -#define kExpandSuitePluginName "ExpandS" -#define kEyeBucketPluginName "AdobeTextDropper" -#define kFileClipboardPrefPluginName "FileClipboardPreference" -#define kFindPluginName "Find" -#define kFindReplaceUIPluginName "Find Replace UI" -#define kFlarePluginName "Adobe Flare Plugin" -#define kFlatteningPreviewPluginName "Flattening Preview" -#define kFlattenSuitePluginName "Flatten Suite" -#define kFlattenTransparencyPluginName "FlattenTransparency" -#define kFOConversionSuitePluginName "FO Conversion Suite" -#define kFrameworkSuitePluginName "FrameworkS" -#define kFuzzyEffectPluginName "FuzzyEffect v2" -#define kGeometrySuitePluginName "Adobe Geometry Suite" -#define kGIF89PluginName "GIF89a Plugin" -#define kGradientMeshPluginName "GradientMeshPlugin" // SmoothShade -#define kInfoPalettePluginName kAIAppPluginName -#define kInversePluginName "Inverse" -#define kJPEGPluginName "JPEG Plugin" -#define kJPEG2KPluginName "JPEG2K Plugin" -#define kKeyboardShortcutsPluginName "KBSC Plugin" -#define kKinsokuDlgPluginName "Kinsoku Dlg" -#define kKnifeToolPluginName "Knife Tool" -#define kLassoPluginName "Lasso" -#define kLayersPalettePluginName "AdobeLayerPalette" -#define kLinkPalettePluginName "AdobeLinkPalette" -#define kLiquifyPluginName "Liquify" -#define kLiveBlendsPluginName "Adobe Path Blends" -#define kMagicWandPluginName "Magic Wand" -#define kMaskHelperPluginName "MaskHelper v2" -#define kMojikumiPluginName "Mojikumi UI" -#define kMPSCommonPluginName "MPSCommon" -#define kMPSExportPluginName "MPSExport" -#define kMPSParserPluginName "MPSParser" -#define kFXGFileFormatPluginName "FXG" -#define kFXGFileFormatUIPluginName "FXG UI" -#define kNavigatorPalettePluginName "AdobeNavigator" -#define kObjectMosaicPluginName "AI Object Mosaic Plug-in" -#define kObjectMosaicUIPluginName "ObjectMosaicUI" -#define kOffsetPathPluginName "OffsetPath v2" -#define kOffsetPathUIPluginName "OffsetPath UI Plugin" -#define kOSExpressViewsPluginName "OS ExpressViews" -#define kOverprintPluginName "Overprint" -#define kOverrideCCSuitePluginName "AIOverrideColorConversionS" -#define kPaintStylePalettesPluginName "AdobePaintStyle" -#define kParagraphPalettePluginName kAIAppPluginName -#define kPathfinderPluginName "AdobePathfinderPalette" -#define kPathfinderSuitePluginName "Pathfinder Suite" -#define kPathSuitePluginName "Path Suite" -#define kPDFFormatPluginName "PDF File Format" -#define kPDFFormatUIPluginName "PDF File Format UI" -#define kPDFSuitePluginName "PDF Suite" -#define kPenAndInkPluginName "Pen And Ink plugin" //No longer used -#define kPhotoshopAdapterPluginName "Photoshop Plugin Adapter" -#define kPlanarEditPluginName "Adobe Planar Edit Plugin" -#define kPNGFileFormatPluginName "PNG File Format" -#define kPrintPluginName "Print Plugin" -#define kPSDImportPluginName "Adobe PSD File Import" -#define kPSDImportUIPluginName "Adobe PSD File Import UI" -#define kPSDExportPluginName "Adobe PSD File Export" -#define kPSDExportUIPluginName "Adobe PSD File Export UI" -#define kPunkPluginName "Punk v2" -#define kRasterizePluginName "Rasterize Plugin" -#define kRasterize8PluginName "Rasterize 8" -#define kReshapeToolPluginName "Reshape Tool" -#define kReshapeToolUIPluginName "Reshape Tool UI" -#define kGlobAdjToolUIPluginName "GlobAdjToolUI" -#define kRoughenPluginName "Roughen v2" -#define kRoughenUIPluginName "RoughenUI" -#define kRoundCornersPluginName "Round v2" -#define kSangamMapperPluginName "AISangamMapper" -#define kSaturatePluginName "Saturate" -#define kSaveForWebAIPluginName "Save4Web" -#define kScatterBrushPluginName "Adobe Scatter Brush Tool" -#define kScribblePluginName "Scribble v2" -#define kScribbleFillPluginName "Adobe Scribble Fill" -#define kScriptingSupportPluginName "ScriptingSupport" -#define kScriptsMenuPluginName "Scripts Menu" -#define kSegmentToolsPluginName "Segment Tools" -#define kSeparationPreviewPluginName "SeparationPreviewPlugin" -#define kShapeSuitePluginName "Shape Suite" -#define kShapeEffectPluginName "ShapeEffects v2" -#define kShapeToolPluginName "ShapeTool" -#define kSimplifyPluginName "Simplify" -#define kSlicingPluginName "AdobeSlicingPlugin" -#define kSlicingUIPluginName "AdobeSlicingUI" -#define kSnapomaticPluginName "Snapomatic" -#define kSpellCheckDictionaryPluginName "Spell Check Dictionary" -#define kSpellCheckUIPluginName "Spell Check UI" -#define kStrokeOffsetPluginName "Stroke Offset v2" -#define kSvgFileFormatPluginName "SvgFileFormat" -#define kSvgFileFormatUIPluginName "SvgFileFormatUI" -#define kSvgFilterEffectPluginName "SVG Filter Effect v2" -#define kSWFExportPluginName "SWFExport" -#define kSWFExportUIPluginName "SWFExport UI" -#define kSwatchPalettePluginName "AdobeSwatch_" -#define kSymbolismPluginName "Adobe Symbolism" // particle systems -#define kSymbolPalettePluginName "Adobe Symbol Palette Plugin" -#define kTextColumnsPluginName "TxtColumns" -#define kTextExportPluginName "TextExport" -#define kTextFindPluginName "TextFind" //No longer used -#define kTextFindFontPluginName "TextFindFont" -#define kTextSmartPunctuationPluginName "Smart Punctuation" -#define kTextSpellPluginName "TextSpell" //No longer used -#define kTextWrapDlgPluginName "TextWrap Dlg" -#define kTIFFFileFormatPluginName "TIFF File Format" -#define kTIFFFileFormatUIPluginName "TIFF File Format UI" -#define kToolPalettePluginName "AdobeBuiltInToolbox" -#define kToolSelectorPluginName "AdobeToolSelector" -#define kTracingObjectPluginName "Adobe Tracing Object" -#define kTracingUIPluginName "Adobe Tracing UI" -#define kTransformPluginName "Transform v2" -#define kTransformPalettePluginName "AdobeTransformObjects" -#define kTransparencyPalettePluginName "AdobeTransparencyEditor" -#define kTrimMarkPluginName "TrimMark v2" -#define kTwirlToolPluginName "Twirl v2" -#define kTypeCasePluginName "TypeCase" -#define kUnitTestingPluginName "Unit Testing" -#define kUnitTestingSamplePluginName "Unit Testing Sample" -#define kVariablesPalettePluginName "Adobe Variables Palette" -#define kWelcomeScreenPluginName "Adobe Welcome Screen" -#define kWorkspacePluginName "Adobe Custom Workspace" -#define kZigZagPluginName "ZigZag v2" -#define kZigZagUIPluginName "ZigZagUI" -#define kServicesPluginName "Services" -#define kNudgePluginName "Adobe Nudge" -#define kAIBottlenecksPluginName "AI Bottlenecks Plugin" -#define kPerspectivePluginName "Adobe Perspective Guides" -#define kPunkUIPluginName "PuckerAndBloatUI" -#define kAIArtOnPathBrushToolUIPluginName "ArtOnPathBrushToolUI" -#define kUserInterfacePluginName "Adobe Illustrator User Interface" -#define kBrushManagerUIPluginName "AdobeBrushMgrUI" -#define kCurveFittingSuitePluginName "CurveFittingSuite" -#define kSketchingToolsPluginName "SketchingTools" -#define kPlanetXPUIPluginName "PlanetXUI" -#define kExpandUIPluginName "ExpandUI" -#define kDxfDwgUIPluginName "DxfDwgUI" -#define kPathfinderUIPluginName "PathfinderUI" -#define kRasterizeUIPluginName "RasterizeUI" -#define kSelectionUIPluginName "SelectionUI" -#define kPerspectiveUIPluginName "PerspectiveUI" -#define kScribbleUIPluginName "ScribbleUI" -#define kTextExportUIPluginName "TextExportUI" -#define kDeformUIPluginName "DeformUI" -#define kSangamFormatsUIPluginName "SangamFormatsUI" -#define kCleanupUIPluginName "CleanupUI" -#define kFlashTextPanelPluginName "FlashTextPanel" -#define kRoundUIPluginName "RoundUI" -#define kJPEGFormatUIPluginName "JPEGFormatUI" -#define kArtboardPalettePluginName "AdobeArtboardPanel" -#define kVariablesPaletteUIPluginName "VariablesPaletteUI" -#define kLinkPaletteUIPluginName "LinkPaletteUI" -#define kJPEGFormatUIPluginName "JPEGFormatUI" -#define kSimplifyUIPluginName "SimplifyUI" -#define kTracingOptionsUIPluginName "TracingOptionsUI" -#define kParticleSystemUIPluginName "ParticleSystemUI" -#define kShapeEffectUIPluginName "ShapeEffectUI" -#define kTransformUIPluginName "TransformUI" -#define kFuzzyEffectUIPluginName "FuzzyEffectUI" -#define kFlareUIPluginName "FlareUI" -#define kDynamicCornersPluginName "DynamicCorners" -#define kContextMenuTouchPluginName "ContextMenuTouch" -#define kPNGExportPluginName "PNGExport" -#define kJSONFormatPluginName "JSONFormat" -#define kAIMenuConfiguratorPluginName "MenuConfigurator" - -// Required plug-ins provided by ADM -#define kASDataStreamPluginName "ASDataStream Plugin" -#define kADMEveParserPluginName "ADMEveParser Plugin" - -#define kAINewSamplePlugin "AI New Sample Plugin" -#define kSampleUIPluginName "Sample UI Plugin" -#define kSaturateUIPluginName "SaturateUI" -#define kFlattenTransparencyUIPluginName "FlattenTransparencyUI" -#define kTwirlToolUIPluginName "TwirlToolUI" -#define kIllustratorUIPluginName "IllustratorUI" -#define kScribbleFillUIPluginName "ScribbleFillUI" -#define kPreferenceUIPluginName "AIPreferenceUI" -#define kDropShadowUIPluginName "DropShadowUI" -#define kDistortUIPluginName "DistortUI" -#define kVectorizePluginName "Vectorize" -#define kVectorizeUIPluginName "VectorizeUI" - -#define kLiveBlendsUIPluginName "LiveBlendsUI" -#define kScatterBrushToolUIPluginName "ScatterBrushToolUI" -#define kShaperUIPluginName "ShaperUI" -#define kShaperPluginName "Shaper" - -#define kLiquifyToolUIPluginName "LiquifyToolUI" -#define kAddArrowUIPluginName "AddArrowUI" -#define kAIToolBoxUIPluginName "AI Toolbox UI Plugin" -#define kPSLFilterAdapterPluginName "PSLFilterAdapter" -#define kPSLFilterAdapterUIPluginName "PSLFilterAdapterUI" -#define kAIPackagePluginName "Package" -#define kAILiveShapesPluginName "Adobe Live Shapes" -#define kAILiveShapesUIPluginName "Adobe Live Shapes UI" -#define kAITouchStatusBarUIPluginName "Touch Status Bar UI" -#define kAIInfoGraphicPluginName "Adobe InfoGraphic" -#define kAIInfoGraphicUIPluginName "Adobe InfoGrahic UI" -#define kAIDesignLibraryPluginName "Design Library" -#define kSmartExportPluginName "SmartExport" -#define kSmartExportUIPluginName "SmartExportUI" -#define kIdeaFileFormatUIPluginName "Idea File Format UI" -#define kAIVulcanServicePluginName "Vulcan Service" -#define kAIShapeCorePluginName "Shape Core" -#define kAIShapeCoreUIPluginName "Shape Core UI" -#define kAISymmetryPluginName "Symmetry" -#define kAISymmetryUIPluginName "SymmetryUI" -#define kOnBoardingPluginName "OnBoarding" -#define kAIToolPluginName "AI Tool Plugin" -#define kAIPGFFileFormatPluginName "Adobe PGF File Format" -#define kMultiEveDialogUIPluginName "Adobe Multi Eve Dialog UI" -#endif +#pragma once + +/* +* Name: AIPluginNames.h +* Date: Feb 14, 1997 +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 1986-2016 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +* Includes names for all plugins +* +*/ + + +#define kAIAppPluginName "Adobe AI Application Plugin" + + +#define k3DPluginName "3D v2" +#define k3DLibPluginName "3D Lib" +#define kAboutPluginsPluginName "Adobe Illustrator About Plug-ins" +#define kActionManagerPluginName "AdobeActionManager" +#define kActionPalettePluginName "AdobeActionPalette" +#define kActionPalettePluginNameEx "ActionPalette for API Context" +#define kAddAnchorPointsPluginName "Add Anchor Points" +#define kAddArrowHeadsPluginName "AddArrowHeads v3" +#define kAdjustColorsPluginName "Adjust" +#define kAdobeOnlinePluginName "AdobeOnline" +#define kAdvancedSelectPluginName "Advanced Select" +#define kAltGyphPalettePluginName "Alternate Glyph Palette" +#define kAPIUnitTestPluginName "API Unit Test Plugin" +#define kAppBarControlsPluginName "Adobe App Bar Controls Host" +#define kArtConvertersPluginName "Art Converters v2" +#define kArtOnPathBrushPluginName "AdobeArtBrushTool" +#define kAlignPalettePluginName "AdobeAlignObjects" +#define kArtStylePluginName "Adobe Art Style Plugin" +#define kAssetManagementPluginName "Asset Management" +#define kAssetManagementUIPluginName "Asset ManagementUI" +#define kAIAATPluginName "AAT for AI" +#define kAttributesPalettePluginName kAIAppPluginName +#define kBeautifulStrokesPluginName "BeautifulStrokes Suite" +#define kBoundingBoxPluginName "BoundingBox" +#define kBrushManagerPluginName "AdobeBrushMgr" +#define kCalligraphicBrushPluginName "Adobe Calligraphic Brush Tool" +#define kCalligraphicBrushToolUIPluginName "Adobe Calligraphic Brush Tool UI" +#define kCharParaStylesPluginName "Character and Paragraph Styles" +#define kCharacterPalettePluginName kAIAppPluginName +#define kCleanupPluginName "Cleanup" +#define kColorsPluginName "Colors" +#define kColorHarmonyPluginName "Adobe Color Harmony Plugin" +#define kControlPalettePluginName "Control Palette Plugin" +#define kControlPanelPluginName "Control Panel Plugin" +#define kCropPluginName "Adobe Crop Tool" +#define kCSSExtractPluginName "CSSExtract" +#define kCSSExtractUIPluginName "CSSExtractUI" +#define kCurvatureToolPluginName "Adobe Curvature Tool" +#define kCurvatureToolUIPluginName "Adobe Curvature ToolUI" +#define kDBrushBrushPluginName "Adobe dBrush Brush Tool" +#define kDBrushToolUIPluginName "Adobe dBrush Brush Tool UI" +#define kDeformPluginName "Adobe Deform Plugin" +#define kDiffusionRasterPluginName "AdobeDiffusionRaster" +#define kDistortPluginName "Distort v2" +#define kDocInfoPluginName "DocInfo" +#define kDocWindowPluginName "Document Window Plugin" +#define kExperimentationName "Experimentation Plugin" +#define kHelloPluginName "Hello Experience Plugin" +#define kAdobeSymbolModelPluginName "Adobe Symbol Model Plugin" +#define kAdobeRepeatModelPluginName "Adobe Repeat Model Plugin" +#define kToolPenPluginName "Pen Tool Plugin" +#define kDropShadowPluginName "DropShadow" +#define kEraserPluginName "Adobe Eraser Tool" +#define kEurekaPluginName "AdobeEurekaPlugin" +#define kExpandPluginName "Expand" +#define kExpandSuitePluginName "ExpandS" +#define kEyeBucketPluginName "AdobeTextDropper" +#define kFileClipboardPrefPluginName "FileClipboardPreference" +#define kFindPluginName "Find" +#define kFindReplaceUIPluginName "Find Replace UI" +#define kFlarePluginName "Adobe Flare Plugin" +#define kFlatteningPreviewPluginName "Flattening Preview" +#define kFlattenSuitePluginName "Flatten Suite" +#define kFlattenTransparencyPluginName "FlattenTransparency" +#define kFOConversionSuitePluginName "FO Conversion Suite" +#define kFrameworkSuitePluginName "FrameworkS" +#define kFuzzyEffectPluginName "FuzzyEffect v2" +#define kGeometrySuitePluginName "Adobe Geometry Suite" +#define kGIF89PluginName "GIF89a Plugin" +#define kGradientMeshPluginName "GradientMeshPlugin" // SmoothShade +#define kInfoPalettePluginName kAIAppPluginName +#define kInversePluginName "Inverse" +#define kJPEGPluginName "JPEG Plugin" +#define kJPEG2KPluginName "JPEG2K Plugin" +#define kKeyboardShortcutsPluginName "KBSC Plugin" +#define kKinsokuDlgPluginName "Kinsoku Dlg" +#define kKnifeToolPluginName "Knife Tool" +#define kLassoPluginName "Lasso" +#define kLayersPalettePluginName "AdobeLayerPalette" +#define kLinkPalettePluginName "AdobeLinkPalette" +#define kLiquifyPluginName "Liquify" +#define kLiveBlendsPluginName "Adobe Path Blends" +#define kMagicWandPluginName "Magic Wand" +#define kMaskHelperPluginName "MaskHelper v2" +#define kMojikumiPluginName "Mojikumi UI" +#define kMPSCommonPluginName "MPSCommon" +#define kMPSExportPluginName "MPSExport" +#define kMPSParserPluginName "MPSParser" +#define kFXGFileFormatPluginName "FXG" +#define kFXGFileFormatUIPluginName "FXG UI" +#define kNavigatorPalettePluginName "AdobeNavigator" +#define kObjectMosaicPluginName "AI Object Mosaic Plug-in" +#define kObjectMosaicUIPluginName "ObjectMosaicUI" +#define kOffsetPathPluginName "OffsetPath v2" +#define kOffsetPathUIPluginName "OffsetPath UI Plugin" +#define kOSExpressViewsPluginName "OS ExpressViews" +#define kOverprintPluginName "Overprint" +#define kOverrideCCSuitePluginName "AIOverrideColorConversionS" +#define kPaintStylePalettesPluginName "AdobePaintStyle" +#define kParagraphPalettePluginName kAIAppPluginName +#define kPathfinderPluginName "AdobePathfinderPalette" +#define kPathfinderSuitePluginName "Pathfinder Suite" +#define kPathSuitePluginName "Path Suite" +#define kPDFFormatPluginName "PDF File Format" +#define kPDFFormatUIPluginName "PDF File Format UI" +#define kPDFSuitePluginName "PDF Suite" +#define kPenAndInkPluginName "Pen And Ink plugin" //No longer used +#define kPhotoshopAdapterPluginName "Photoshop Plugin Adapter" +#define kPlanarEditPluginName "Adobe Planar Edit Plugin" +#define kPNGFileFormatPluginName "PNG File Format" +#define kPrintPluginName "Print Plugin" +#define kPSDImportPluginName "Adobe PSD File Import" +#define kPSDImportUIPluginName "Adobe PSD File Import UI" +#define kPSDExportPluginName "Adobe PSD File Export" +#define kPSDExportUIPluginName "Adobe PSD File Export UI" +#define kPunkPluginName "Punk v2" +#define kRasterizePluginName "Rasterize Plugin" +#define kRasterize8PluginName "Rasterize 8" +#define kReshapeToolPluginName "Reshape Tool" +#define kReshapeToolUIPluginName "Reshape Tool UI" +#define kGlobAdjToolUIPluginName "GlobAdjToolUI" +#define kRoughenPluginName "Roughen v2" +#define kRoughenUIPluginName "RoughenUI" +#define kRoundCornersPluginName "Round v2" +#define kSangamMapperPluginName "AISangamMapper" +#define kSaturatePluginName "Saturate" +#define kSaveForWebAIPluginName "Save4Web" +#define kScatterBrushPluginName "Adobe Scatter Brush Tool" +#define kScribblePluginName "Scribble v2" +#define kScribbleFillPluginName "Adobe Scribble Fill" +#define kScriptingSupportPluginName "ScriptingSupport" +#define kScriptsMenuPluginName "Scripts Menu" +#define kSegmentToolsPluginName "Segment Tools" +#define kSelectiveUnlockPluginName "Adobe Selective Unlock Plugin" +#define kSenseiAgentsPluginName "Adobe Sensei Agents Plugin" +#define kSeparationPreviewPluginName "SeparationPreviewPlugin" +#define kShapeSuitePluginName "Shape Suite" +#define kShapeEffectPluginName "ShapeEffects v2" +#define kShapeToolPluginName "ShapeTool" +#define kSimplifyPluginName "Simplify" +#define kSlicingPluginName "AdobeSlicingPlugin" +#define kSlicingUIPluginName "AdobeSlicingUI" +#define kSnapomaticPluginName "Snapomatic" +#define kSpellCheckDictionaryPluginName "Spell Check Dictionary" +#define kSpellCheckUIPluginName "Spell Check UI" +#define kStrokeOffsetPluginName "Stroke Offset v2" +#define kSvgFileFormatPluginName "SvgFileFormat" +#define kSvgFileFormatUIPluginName "SvgFileFormatUI" +#define kSvgFilterEffectPluginName "SVG Filter Effect v2" +#define kSwatchPalettePluginName "AdobeSwatch_" +#define kSymbolismPluginName "Adobe Symbolism" // particle systems +#define kSymbolPalettePluginName "Adobe Symbol Palette Plugin" +#define kTextColumnsPluginName "TxtColumns" +#define kTextExportPluginName "TextExport" +#define kTextFindPluginName "TextFind" //No longer used +#define kTextFindFontPluginName "TextFindFont" +#define kTextSmartPunctuationPluginName "Smart Punctuation" +#define kTextSpellPluginName "TextSpell" //No longer used +#define kTextWrapDlgPluginName "TextWrap Dlg" +#define kTextModelNamePluginName "TextModel" +#define kTIFFFileFormatPluginName "TIFF File Format" +#define kTIFFFileFormatUIPluginName "TIFF File Format UI" +#define kToolPalettePluginName "AdobeBuiltInToolbox" +#define kToolSelectorPluginName "AdobeToolSelector" +#define kTracingObjectPluginName "Adobe Tracing Object" +#define kTracingUIPluginName "Adobe Tracing UI" +#define kTransformPluginName "Transform v2" +#define kTransformPalettePluginName "AdobeTransformObjects" +#define kTransparencyPalettePluginName "AdobeTransparencyEditor" +#define kTrimMarkPluginName "TrimMark v2" +#define kTwirlToolPluginName "Twirl v2" +#define kTypeCasePluginName "TypeCase" +#define kUnitTestingPluginName "Unit Testing" +#define kUnitTestingSamplePluginName "Unit Testing Sample" +#define kVariablesPalettePluginName "Adobe Variables Palette" +#define kWelcomeScreenPluginName "Adobe Welcome Screen" +#define kWorkspacePluginName "Adobe Custom Workspace" +#define kZigZagPluginName "ZigZag v2" +#define kZigZagUIPluginName "ZigZagUI" +#define kServicesPluginName "Services" +#define kNudgePluginName "Adobe Nudge" +#define kAIBottlenecksPluginName "AI Bottlenecks Plugin" +#define kPerspectivePluginName "Adobe Perspective Guides" +#define kPunkUIPluginName "PuckerAndBloatUI" +#define kAIArtOnPathBrushToolUIPluginName "ArtOnPathBrushToolUI" +#define kUserInterfacePluginName "Adobe Illustrator User Interface" +#define kBrushManagerUIPluginName "AdobeBrushMgrUI" +#define kCurveFittingSuitePluginName "CurveFittingSuite" +#define kSketchingToolsPluginName "SketchingTools" +#define kPlanetXPUIPluginName "PlanetXUI" +#define kExpandUIPluginName "ExpandUI" +#define kDxfDwgUIPluginName "DxfDwgUI" +#define kPathfinderUIPluginName "PathfinderUI" +#define kRasterizeUIPluginName "RasterizeUI" +#define kSelectionUIPluginName "SelectionUI" +#define kPerspectiveUIPluginName "PerspectiveUI" +#define kScribbleUIPluginName "ScribbleUI" +#define kTextExportUIPluginName "TextExportUI" +#define kDeformUIPluginName "DeformUI" +#define kSangamFormatsUIPluginName "SangamFormatsUI" +#define kCleanupUIPluginName "CleanupUI" +#define kFlashTextPanelPluginName "FlashTextPanel" +#define kRoundUIPluginName "RoundUI" +#define kJPEGFormatUIPluginName "JPEGFormatUI" +#define kArtboardPalettePluginName "AdobeArtboardPanel" +#define kVariablesPaletteUIPluginName "VariablesPaletteUI" +#define kLinkPaletteUIPluginName "LinkPaletteUI" +#define kJPEGFormatUIPluginName "JPEGFormatUI" +#define kSimplifyUIPluginName "SimplifyUI" +#define kTracingOptionsUIPluginName "TracingOptionsUI" +#define kParticleSystemUIPluginName "ParticleSystemUI" +#define kShapeEffectUIPluginName "ShapeEffectUI" +#define kTransformUIPluginName "TransformUI" +#define kFuzzyEffectUIPluginName "FuzzyEffectUI" +#define kFlareUIPluginName "FlareUI" +#define kDynamicCornersPluginName "DynamicCorners" +#define kContextMenuTouchPluginName "ContextMenuTouch" +#define kPNGExportPluginName "PNGExport" +#define kJSONFormatPluginName "JSONFormat" +#define kAIMenuConfiguratorPluginName "MenuConfigurator" + +// Required plug-ins provided by ADM +#define kASDataStreamPluginName "ASDataStream Plugin" +#define kADMEveParserPluginName "ADMEveParser Plugin" + +#define kAINewSamplePlugin "AI New Sample Plugin" +#define kSampleUIPluginName "Sample UI Plugin" +#define kSaturateUIPluginName "SaturateUI" +#define kFlattenTransparencyUIPluginName "FlattenTransparencyUI" +#define kTwirlToolUIPluginName "TwirlToolUI" +#define kIllustratorUIPluginName "IllustratorUI" +#define kScribbleFillUIPluginName "ScribbleFillUI" +#define kPreferenceUIPluginName "AIPreferenceUI" +#define kDropShadowUIPluginName "DropShadowUI" +#define kDistortUIPluginName "DistortUI" +#define kVectorizePluginName "Vectorize" +#define kVectorizeUIPluginName "VectorizeUI" + +#define kLiveBlendsUIPluginName "LiveBlendsUI" +#define kScatterBrushToolUIPluginName "ScatterBrushToolUI" +#define kShaperUIPluginName "ShaperUI" +#define kShaperPluginName "Shaper" + +#define kLiquifyToolUIPluginName "LiquifyToolUI" +#define kAddArrowUIPluginName "AddArrowUI" +#define kAIToolBoxUIPluginName "AI Toolbox UI Plugin" +#define kPSLFilterAdapterPluginName "PSLFilterAdapter" +#define kPSLFilterAdapterUIPluginName "PSLFilterAdapterUI" +#define kAIPackagePluginName "Package" +#define kAILiveShapesPluginName "Adobe Live Shapes" +#define kAILiveShapesUIPluginName "Adobe Live Shapes UI" +#define kAITouchStatusBarUIPluginName "Touch Status Bar UI" +#define kAIInfoGraphicPluginName "Adobe InfoGraphic" +#define kAIInfoGraphicUIPluginName "Adobe InfoGrahic UI" +#define kAIDesignLibraryPluginName "Design Library" +#define kSmartExportPluginName "SmartExport" +#define kSmartExportUIPluginName "SmartExportUI" +#define kAIVulcanServicePluginName "Vulcan Service" +#define kAIShapeCorePluginName "Shape Core" +#define kAIShapeCoreUIPluginName "Shape Core UI" +#define kAISymmetryPluginName "Symmetry" +#define kAISymmetryUIPluginName "SymmetryUI" +#define kOnBoardingPluginName "OnBoarding" +#define kAIToolPluginName "AI Tool Plugin" +#define kAIPGFFileFormatPluginName "Adobe PGF File Format" +#define kMultiEveDialogUIPluginName "Adobe Multi Eve Dialog UI" +#define kCropUIPluginName "Adobe Crop UI" +#define kVectorSculptingUIPluginName "Adobe Vector Sculpting UI" +#define kVectorSculptingPluginName "Vector Sculpting" +#define kPropertiesPanelPluginName "Properties Panel" +#define kTouchBarPluginName "Adobe Touch Bar" +#define kTorqExtensionPluginName "Adobe Torq Extension" +#define kRadialDevicePluginName "Adobe Radial Device" +#define kDiffusionColoringPluginName "Adobe Diffusion Coloring" +#define kSmartEditPluginName "Adobe Smart Edit" +#define kSmartEditUIPluginName "Adobe Smart Edit UI" +#define kDeepLearningPluginName "Adobe Deep Learning" +#define kAdobeLicenseManagerPluginName "AdobeLicenseManager" +#define kAdobeDebugPanel "Adobe Debug Panel" +#define kCloudAIUIPluginName "Adobe Cloud AIUI" +#define kCloudAIPluginName "Adobe Cloud AI" +#define kAIRobinServicePluginName "AI Robin Service" +#define kAIRobinClientPluginName "AI Robin Client" +#define kUxpExtensionPluginName "Adobe Uxp Extension" +#define kAIAeroPluginName "AI Aero" +#define kCCLibAccessorPluginName "AI CCLibAccessor Plugin" +#define kImageDecoderEncoderPluginName "Adobe Image Decoder Encoder" +#define kTaskManagerUIPluginName "Adobe Task Manager UI" +#define kSwatchLibsCorePluginName "Adobe Swatch Libs Core" +#define kMultiThreadedRasterizationPluginName "Adobe Multi Threaded Rasterization" +#define kDxfDwgFileFormatPluginName "Adobe DxfDwg File Format" +#define kRecolorCorePluginName "Adobe Recolor Core" +#define kFontSessionPluginName "Adobe Font Session" +#define kAISafeModePluginName "AI Safe Mode Plugin" +#define kRepeatArtsUIPluginName "Adobe Repeat Arts UI" +#if defined(ILLUSTRATOR_MINIMAL) +#define kShapeAwareTransformPluginName "Shape Aware Xform" +#endif +#define kGeometry3DPluginName "Adobe Geometry3D" +#define kGeometry3DUIPluginName "Adobe Geometry3DUI" +#define kMaterialsPluginName "Adobe Materials" +#define kCommentingPluginName "Adobe Commenting" +#define kCloudDocumentLinkPluginName "Adobe Cloud Document Link" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPragma.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPragma.h index 1763674..df974dd 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPragma.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPragma.h @@ -1,33 +1,33 @@ -/***********************************************************************/ -/* */ -/* AIPragma.h */ -/* Makes #defines for #pragmas to eliminate compiler dependencies */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 2001-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/* Started by Dave MacLachlan, 09/27/2001 */ -/* */ -/***********************************************************************/ - -#ifndef __AIPragma__ -#define __AIPragma__ - -#ifndef __ASConfig__ -#include "ASConfig.h" -#endif - -#error Don't want this file! - - -#endif +/***********************************************************************/ +/* */ +/* AIPragma.h */ +/* Makes #defines for #pragmas to eliminate compiler dependencies */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 2001-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/* Started by Dave MacLachlan, 09/27/2001 */ +/* */ +/***********************************************************************/ + +#ifndef __AIPragma__ +#define __AIPragma__ + +#ifndef __ASConfig__ +#include "ASConfig.h" +#endif + +#error Don't want this file! + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreference.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreference.h index 58f8135..8ea0382 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreference.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreference.h @@ -1,473 +1,480 @@ -#ifndef __AIPreference__ -#define __AIPreference__ - -/* - * Name: AIPreference.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Preference Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIFixedMath__ -#include "AIFixedMath.h" -#endif - -#ifndef __SPPlugins__ -#include "SPPlugs.h" -#endif - -#ifndef __AIMenu__ -#include "AIMenu.h" -#endif - -#include "IAIUnicodeString.h" -#include "IAIFilePath.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIPreference.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPreferenceSuite "AI Preference Suite" -#define kAIPreferenceSuiteVersion6 AIAPI_VERSION(6) -#define kAIPreferenceSuiteVersion kAIPreferenceSuiteVersion6 -#define kAIPreferenceVersion kAIPreferenceSuiteVersion - -/** @ingroup Notifiers - Sent when a change is made to the preferences. - See \c #AIPreferenceSuite */ -#define kAIPreferenceChangedNotifier "AI Preference Changed Notifier" - - -/** @ingroup Callers - See \c #AIPreferenceSuite */ -#define kAIPreferenceCaller "AI Preference" -/** @ingroup Selectors - See \c #AIPreferenceSuite */ -#define kAIPreferenceInitSelector "Init Preference Panel" -/** @ingroup Selectors - See \c #AIPreferenceSuite */ -#define kAIPreferenceOKSelector "Preference Dialog OK" -/** @ingroup Selectors - See \c #AIPreferenceSuite */ -#define kAIPreferenceCancelSelector "Preference Dialog Cancel" -/** @ingroup Selectors - See \c #AIPreferenceSuite */ -#define kAIPreferenceUpdateSelector "Preference Dialog Upadate" - -/** If you add a preference for a Disable checkbox to the alert dialog, call - AIPreferenceSuite::PutBooleanPreference( - kAIPreferenceTurnOffWarningPrefix, - "your plug-in unique string", - value) - This allows Illustrator to clear the General preference. - <> */ -#define kAIPreferenceTurnOffWarningPrefix "DontShowWarningAgain" - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a preference item group, never dereferenced. - Access with \c #AIPreferenceSuite */ -typedef struct _t_AIPreferenceItemGroupOpaque *AIPreferenceItemGroupHandle; - -/** Type for a date/time value stored in preferences, */ -typedef ai::uint32 AIPreferenceDateTime; - -/** Message sent by the preference selectors. */ -struct AIPreferencePanelMessage { - /** Message data */ - SPMessageData d; - /** The preference item group */ - AIPreferenceItemGroupHandle itemGroup; -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides cross-platform access to Illustrator - preferences. It allows you to store your plug-in’s preferences, - save them at shutdown, and restore them at startup. The suite also - allows you to access Illustrator application preferences at any time. - - Illustrator reads the preferences file from disk only once, when the - application is first launched, and writes it only once, when the - application quits. The Preference suite functions interact with - the preferences stored in memory, not with the preferences file on disk. - - @section PluginPrefs Accessing Plug-in Preferences - - This suite also allows you to add your plug-in preferences to the - Preferences dialog box. Generally, your plug-in reads its own - preferences during the startup message action and writes them at shutdown. - - You get and set values according to their data type. The suite provides - accessors (get and put functions) for each of the basic data types: - boolean, integer, real, C string, block, fixed, fract, Pascal string, - date/time stamp, point, rect, and file spec. - - Each function in the suite takes three arguments: - \li The \e prefix, which is generally your plug-in’s name. - \li The \e suffix, which is the name of a specific preference - item in your plug-in. - \li The \e value, which is the new value to be associated with - the named preference (for put) or a buffer in which to return - its current value (for get). If a get function does not find - the prefix/suffix pair in the preferences file, the value - argument remains unchanged; you should preset the buffer - to the default value for the preference you are retrieving. - - For predefined prefixes and suffixes of application and Adobe plug-in - preferences, see \c AIPreferenceKeys.h. - - This example saves and retrieves preferences for a window position - and visibility status: - \verbatim -// save preferences for plug-in dialog -error = sPref->PutBooleanPreference(kPluginName, "dialogShowing", g->dialogShowing); -error = sPref->PutPointPreference(kPluginName, "dialogPosition", &g->dialogPosition); -//retrieve preferences for plug-in dialog -g->dialogShowing = false; // default is not visible -error = sPref->GetBooleanPreference(kPluginName, "dialogShowing", &g->dialogShowing); -g->dialogPosition = { 100 , 100 }; // default position -error = sPref->GetPointPreference(kPluginName, "dialogPosition", &g->dialogPosition); - \endverbatim - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPreferenceSuite and \c #kAIPreferenceVersion. - - @section AppPrefs Accessing Application Preferences - - Application preferences are predefined. You can examine the preferences - file to find their names. - \li To specify an application preference, use \c NULL for the prefix. - For the suffix, use a path derived from the preference file without - the leading slash character. See also predefined suffixes in - \c AIPreferenceKeys.h. - \li There is no direct way to determine the data type of an application - preference. You must determine the data type based on your knowledge - of Illustrator and the appearance of the value in the preference file. - - For example, the constrain angle used by the Illustrator tools is an application - preference. It is stored in the preference file at follows: - \verbatim -/constrain { - /sin 0.0 - /cos 16.0 - /angle 0.0 - } - \endverbatim - - These values are real numbers. To retrieve the value of \c sin, - use the accessor for the \c AIReal type: - \verbatim -AIReal r; -error = sPref->GetRealPreference(nil, "constrain/sin", &r); - \endverbatim - - The snap-to-point option is displayed as a checkbox in the General Preferences - dialog, which implies that it has a boolean value. It is stored in the file as follows: - \verbatim -/snapToPoint 1 - \endverbatim - - To retrieve the setting, use the boolean accessor: - \verbatim -AIBoolean snap; -error = sPref->GetBooleanPreference(nil, "snapToPoint", &snap); - \endverbatim -*/ -typedef struct AIPreferenceSuite { - - /** Retrieves a boolean preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetBooleanPreference) ( const char *prefix, const char *suffix, AIBoolean *value ); - - /** Sets a boolean preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutBooleanPreference) ( const char *prefix, const char *suffix, AIBoolean value ); - - /** Retrieves an integer preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetIntegerPreference) ( const char *prefix, const char *suffix, ai::int32 *value ); - - /** Sets an integer preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutIntegerPreference) ( const char *prefix, const char *suffix, ai::int32 value ); - - /** Retrieves a real-number preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRealPreference) ( const char *prefix, const char *suffix, double *value ); - - /** Sets a real-number preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutRealPreference) ( const char *prefix, const char *suffix, double value ); - - /** Retrieves a C-string preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetStringPreference) ( const char *prefix, const char *suffix, char *value ); - - /** Sets a C-string preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutStringPreference) ( const char *prefix, const char *suffix, const char *value ); - - /** Retrieves a Unicode string preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetUnicodeStringPreference) ( const char *prefix, const char *suffix, ai::UnicodeString& value ); - - /** Sets a Unicode string preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutUnicodeStringPreference) ( const char *prefix, const char *suffix, const ai::UnicodeString& value ); - - /** Retrieves a block preference created with \c #PutBlockPreference(). - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param address [out] A buffer in which to return the value. - @param size The number of bytes allocated at \c address. - */ - AIAPI AIErr (*GetBlockPreference) ( const char *prefix, const char *suffix, void *address, ai::int32 size ); - - /** Sets a block preference. Use this to store data that does - not fit one of the basic types. For example, you could store - a color value as a single block preference rather than - three or four separate integer preferences. - - The preference file is a human-readable (and editable) ASCII file, and - you should respect this in block data that you create. For example, - write out color values as ASCII strings, not as binary values. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param address A buffer containing the new value. - @param size The number of bytes allocated at \c address. - */ - AIAPI AIErr (*PutBlockPreference) ( const char *prefix, const char *suffix, void *address, ai::int32 size ); - - /** Retrieves a fixed-number preference. (For compatibility with AI7 and earlier.) - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetFixedPreference) ( const char *prefix, const char *suffix, AIFixed *value ); - - - /** Sets a fixed-number preference. (For compatibility with AI7 and earlier.) - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutFixedPreference) ( const char *prefix, const char *suffix, AIFixed value ); - - /** Retrieves a fractional preference. (For compatibility with AI7 and earlier.) - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetFractPreference) ( const char *prefix, const char *suffix, AIFract *value ); - - /** Sets a fractional preference. (For compatibility with AI7 and earlier.) - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutFractPreference) ( const char *prefix, const char *suffix, AIFract value ); - - /** Retrieves a Pascal-string preference. (For compatibility with AI7 and earlier.) - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetPascalPreference) ( const char *prefix, const char *suffix, unsigned char *value ); - - /** Sets a Pascal-string preference. (For compatibility with AI7 and earlier.) - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutPascalPreference) ( const char *prefix, const char *suffix, const unsigned char *value ); - - /** Retrieves a date-time preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDateTimePreference) ( const char *prefix, const char *suffix, AIPreferenceDateTime *value ); - - /** Sets a date-time preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutDateTimePreference) ( const char *prefix, const char *suffix, AIPreferenceDateTime *value ); - - /** Retrieves a point preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetPointPreference) ( const char *prefix, const char *suffix, AIPoint *value ); - - /** Sets a point preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutPointPreference) ( const char *prefix, const char *suffix, AIPoint *value ); - - /** Retrieves a rectangle preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRectPreference) ( const char *prefix, const char *suffix, AIRect *value ); - - /** Sets a rectangle preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutRectPreference) ( const char *prefix, const char *suffix, AIRect *value ); - - /** Retrieves a file path specification preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetFilePathSpecificationPreference) ( const char *prefix, const char *suffix, ai::FilePath &value ); - - /** Sets a file path specification preference. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutFilePathSpecificationPreference) ( const char *prefix, const char *suffix, const ai::FilePath &value ); - - /** Deletes a preference that was defined by your plug-in. - Do not attempt to remove any other preferences. - @param prefix The name of the plug-in. - @param suffix The name of the preference. - */ - AIAPI AIErr (*RemovePreference) ( const char *prefix, const char *suffix ); - - /** Adds a panel to the Preferences dialog, using a dialog you define to - query the user for your plug-in preferences. Adds a menu item for your panel - to the Preferences submenu, creating and returning the menu item object. - @param pluginRef The plug-in object. - @param itemText The localizable string that appears in the Preferences submenu - and in the Preferences dialog pop-up menu. - @param dialogID The unique identifier of the dialog you have defined in your - plug-in resources. The elements are added to the Preferences dialog - as an item group. See \c #ADMDialogSuite10 and \c #ADMItemSuite9. - @param options Not used. Pass 0. - @param prefItemGroup [out] A buffer in which to return the new dialog item-group - reference for the panel. This panel object is passed back as part of the - \c #AIPreferencePanelMessage when the panel is shown in the dialog. Use it - with \c #GetPreferencePanelBaseItemIndex() - to access the dialog items when the panel is displayed. - @param menuItem [out] A buffer in which to return the new menu item reference. - */ - AIAPI AIErr (*AddPreferencePanel) (SPPluginRef pluginRef, unsigned char *itemText, ai::int32 dialogID, ai::int32 options, - AIPreferenceItemGroupHandle *prefItemGroup, AIMenuItemHandle *menuItem); - - /** Retrieves the index position of the base item from a preference item group. - All identifiers for items in your Preferences panel are offset by this value. - The call is only valid when the Preferences dialog is displayed. - @param prefItemGroup TThe panel item-group object, as returned by - \c #AddPreferencePanel(). - @param baseIndex [out] A buffer in which to return the 0-based position - index of the base item. - */ - AIAPI AIErr (*GetPreferencePanelBaseItemIndex) (AIPreferenceItemGroupHandle prefItemGroup, ai::int32 *baseIndex); - - /** Displays a plug-in-defined panel in the Preferences dialog. Called - by the menu item that was created by \c #AddPreferencePanel(). - @param prefItemGroup The panel item-group object, as returned by - \c #AddPreferencePanel(). - */ - AIAPI AIErr (*ShowPreferencePanel) (AIPreferenceItemGroupHandle prefItemGroup); - - /** Retrieves an integer preference for 64 bit data type. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetLargeIntegerPreference) ( const char *prefix, const char *suffix, ai::int64 *value ); - - /** Sets an integer preference for 64 bit data type. - @param prefix The name of the plug-in, or \c NULL for an application preference. - @param suffix The name of the preference. - @param value The new value. - */ - AIAPI AIErr (*PutLargeIntegerPreference) ( const char *prefix, const char *suffix, ai::int64 value ); - -} AIPreferenceSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIPreference__ +#define __AIPreference__ + +/* + * Name: AIPreference.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Preference Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIFixedMath__ +#include "AIFixedMath.h" +#endif + +#ifndef __SPPlugins__ +#include "SPPlugs.h" +#endif + +#ifndef __AIMenu__ +#include "AIMenu.h" +#endif + +#include "IAIUnicodeString.h" +#include "IAIFilePath.hpp" + +#include "AIHeaderBegin.h" + +/** @file AIPreference.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIPreferenceSuite "AI Preference Suite" +#define kAIPreferenceSuiteVersion7 AIAPI_VERSION(7) +#define kAIPreferenceSuiteVersion kAIPreferenceSuiteVersion7 +#define kAIPreferenceVersion kAIPreferenceSuiteVersion + +/** @ingroup Notifiers + Sent when a change is made to the preferences. + See \c #AIPreferenceSuite */ +#define kAIPreferenceChangedNotifier "AI Preference Changed Notifier" + + +/** @ingroup Callers + See \c #AIPreferenceSuite */ +#define kAIPreferenceCaller "AI Preference" +/** @ingroup Selectors + See \c #AIPreferenceSuite */ +#define kAIPreferenceInitSelector "Init Preference Panel" +/** @ingroup Selectors + See \c #AIPreferenceSuite */ +#define kAIPreferenceOKSelector "Preference Dialog OK" +/** @ingroup Selectors + See \c #AIPreferenceSuite */ +#define kAIPreferenceCancelSelector "Preference Dialog Cancel" +/** @ingroup Selectors + See \c #AIPreferenceSuite */ +#define kAIPreferenceUpdateSelector "Preference Dialog Upadate" + +/** If you add a preference for a Disable checkbox to the alert dialog, call + AIPreferenceSuite::PutBooleanPreference( + kAIPreferenceTurnOffWarningPrefix, + "your plug-in unique string", + value) + This allows Illustrator to clear the General preference. + <> */ +#define kAIPreferenceTurnOffWarningPrefix "DontShowWarningAgain" + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a preference item group, never dereferenced. + Access with \c #AIPreferenceSuite */ +typedef struct _t_AIPreferenceItemGroupOpaque *AIPreferenceItemGroupHandle; + +/** Type for a date/time value stored in preferences, */ +typedef ai::uint32 AIPreferenceDateTime; + +/** Message sent by the preference selectors. */ +struct AIPreferencePanelMessage { + /** Message data */ + SPMessageData d; + /** The preference item group */ + AIPreferenceItemGroupHandle itemGroup; +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides cross-platform access to Illustrator + preferences. It allows you to store your plug-in’s preferences, + save them at shutdown, and restore them at startup. The suite also + allows you to access Illustrator application preferences at any time. + + Illustrator reads the preferences file from disk only once, when the + application is first launched, and writes it only once, when the + application quits. The Preference suite functions interact with + the preferences stored in memory, not with the preferences file on disk. + + @section PluginPrefs Accessing Plug-in Preferences + + This suite also allows you to add your plug-in preferences to the + Preferences dialog box. Generally, your plug-in reads its own + preferences during the startup message action and writes them at shutdown. + + You get and set values according to their data type. The suite provides + accessors (get and put functions) for each of the basic data types: + boolean, integer, real, C string, block, fixed, fract, Pascal string, + date/time stamp, point, rect, and file spec. + + Each function in the suite takes three arguments: + \li The \e prefix, which is generally your plug-in’s name. + \li The \e suffix, which is the name of a specific preference + item in your plug-in. + \li The \e value, which is the new value to be associated with + the named preference (for put) or a buffer in which to return + its current value (for get). If a get function does not find + the prefix/suffix pair in the preferences file, the value + argument remains unchanged; you should preset the buffer + to the default value for the preference you are retrieving. + + For predefined prefixes and suffixes of application and Adobe plug-in + preferences, see \c AIPreferenceKeys.h. + + This example saves and retrieves preferences for a window position + and visibility status: + \verbatim +// save preferences for plug-in dialog +error = sPref->PutBooleanPreference(kPluginName, "dialogShowing", g->dialogShowing); +error = sPref->PutPointPreference(kPluginName, "dialogPosition", &g->dialogPosition); +//retrieve preferences for plug-in dialog +g->dialogShowing = false; // default is not visible +error = sPref->GetBooleanPreference(kPluginName, "dialogShowing", &g->dialogShowing); +g->dialogPosition = { 100 , 100 }; // default position +error = sPref->GetPointPreference(kPluginName, "dialogPosition", &g->dialogPosition); + \endverbatim + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIPreferenceSuite and \c #kAIPreferenceVersion. + + @section AppPrefs Accessing Application Preferences + + Application preferences are predefined. You can examine the preferences + file to find their names. + \li To specify an application preference, use \c NULL for the prefix. + For the suffix, use a path derived from the preference file without + the leading slash character. See also predefined suffixes in + \c AIPreferenceKeys.h. + \li There is no direct way to determine the data type of an application + preference. You must determine the data type based on your knowledge + of Illustrator and the appearance of the value in the preference file. + + For example, the constrain angle used by the Illustrator tools is an application + preference. It is stored in the preference file at follows: + \verbatim +/constrain { + /sin 0.0 + /cos 16.0 + /angle 0.0 + } + \endverbatim + + These values are real numbers. To retrieve the value of \c sin, + use the accessor for the \c AIReal type: + \verbatim +AIReal r; +error = sPref->GetRealPreference(nullptr, "constrain/sin", &r); + \endverbatim + + The snap-to-point option is displayed as a checkbox in the General Preferences + dialog, which implies that it has a boolean value. It is stored in the file as follows: + \verbatim +/snapToPoint 1 + \endverbatim + + To retrieve the setting, use the boolean accessor: + \verbatim +AIBoolean snap; +error = sPref->GetBooleanPreference(nullptr, "snapToPoint", &snap); + \endverbatim +*/ +struct AIPreferenceSuite { + + /** Retrieves a boolean preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetBooleanPreference) ( const char *prefix, const char *suffix, AIBoolean *value ); + + /** Sets a boolean preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutBooleanPreference) ( const char *prefix, const char *suffix, AIBoolean value ); + + /** Retrieves an integer preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetIntegerPreference) ( const char *prefix, const char *suffix, ai::int32 *value ); + + /** Sets an integer preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutIntegerPreference) ( const char *prefix, const char *suffix, ai::int32 value ); + + /** Retrieves a real-number preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRealPreference) ( const char *prefix, const char *suffix, double *value ); + + /** Sets a real-number preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutRealPreference) ( const char *prefix, const char *suffix, double value ); + + /** Retrieves a C-string preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetStringPreference) ( const char *prefix, const char *suffix, char *value ); + + /** Sets a C-string preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutStringPreference) ( const char *prefix, const char *suffix, const char *value ); + + /** Retrieves a Unicode string preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetUnicodeStringPreference) ( const char *prefix, const char *suffix, ai::UnicodeString& value ); + + /** Sets a Unicode string preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutUnicodeStringPreference) ( const char *prefix, const char *suffix, const ai::UnicodeString& value ); + + /** Retrieves a block preference created with \c #PutBlockPreference(). + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param address [out] A buffer in which to return the value. + @param size The number of bytes allocated at \c address. + */ + AIAPI AIErr (*GetBlockPreference) ( const char *prefix, const char *suffix, void *address, ai::int32 size ); + + /** Sets a block preference. Use this to store data that does + not fit one of the basic types. For example, you could store + a color value as a single block preference rather than + three or four separate integer preferences. + + The preference file is a human-readable (and editable) ASCII file, and + you should respect this in block data that you create. For example, + write out color values as ASCII strings, not as binary values. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param address A buffer containing the new value. + @param size The number of bytes allocated at \c address. + */ + AIAPI AIErr (*PutBlockPreference) ( const char *prefix, const char *suffix, void *address, ai::int32 size ); + + /** Retrieves a fixed-number preference. (For compatibility with AI7 and earlier.) + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetFixedPreference) ( const char *prefix, const char *suffix, AIFixed *value ); + + + /** Sets a fixed-number preference. (For compatibility with AI7 and earlier.) + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutFixedPreference) ( const char *prefix, const char *suffix, AIFixed value ); + + /** Retrieves a fractional preference. (For compatibility with AI7 and earlier.) + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetFractPreference) ( const char *prefix, const char *suffix, AIFract *value ); + + /** Sets a fractional preference. (For compatibility with AI7 and earlier.) + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutFractPreference) ( const char *prefix, const char *suffix, AIFract value ); + + /** Retrieves a Pascal-string preference. (For compatibility with AI7 and earlier.) + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetPascalPreference) ( const char *prefix, const char *suffix, unsigned char *value ); + + /** Sets a Pascal-string preference. (For compatibility with AI7 and earlier.) + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutPascalPreference) ( const char *prefix, const char *suffix, const unsigned char *value ); + + /** Retrieves a date-time preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetDateTimePreference) ( const char *prefix, const char *suffix, AIPreferenceDateTime *value ); + + /** Sets a date-time preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutDateTimePreference) ( const char *prefix, const char *suffix, AIPreferenceDateTime *value ); + + /** Retrieves a point preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetPointPreference) ( const char *prefix, const char *suffix, AIPoint *value ); + + /** Sets a point preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutPointPreference) ( const char *prefix, const char *suffix, AIPoint *value ); + + /** Retrieves a rectangle preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRectPreference) ( const char *prefix, const char *suffix, AIRect *value ); + + /** Sets a rectangle preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutRectPreference) ( const char *prefix, const char *suffix, AIRect *value ); + + /** Retrieves a file path specification preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetFilePathSpecificationPreference) ( const char *prefix, const char *suffix, ai::FilePath &value ); + + /** Sets a file path specification preference. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutFilePathSpecificationPreference) ( const char *prefix, const char *suffix, const ai::FilePath &value ); + + /** Deletes a preference that was defined by your plug-in. + Do not attempt to remove any other preferences. + @param prefix The name of the plug-in. + @param suffix The name of the preference. + */ + AIAPI AIErr (*RemovePreference) ( const char *prefix, const char *suffix ); + + /** Adds a panel to the Preferences dialog, using a dialog you define to + query the user for your plug-in preferences. Adds a menu item for your panel + to the Preferences submenu, creating and returning the menu item object. + @param pluginRef The plug-in object. + @param itemText The localizable string that appears in the Preferences submenu + and in the Preferences dialog pop-up menu. + @param dialogID The unique identifier of the dialog you have defined in your + plug-in resources. The elements are added to the Preferences dialog + as an item group. See \c #ADMDialogSuite10 and \c #ADMItemSuite9. + @param options Not used. Pass 0. + @param prefItemGroup [out] A buffer in which to return the new dialog item-group + reference for the panel. This panel object is passed back as part of the + \c #AIPreferencePanelMessage when the panel is shown in the dialog. Use it + with \c #GetPreferencePanelBaseItemIndex() + to access the dialog items when the panel is displayed. + @param menuItem [out] A buffer in which to return the new menu item reference. + */ + AIAPI AIErr (*AddPreferencePanel) (SPPluginRef pluginRef, unsigned char *itemText, ai::int32 dialogID, ai::int32 options, + AIPreferenceItemGroupHandle *prefItemGroup, AIMenuItemHandle *menuItem); + + /** Retrieves the index position of the base item from a preference item group. + All identifiers for items in your Preferences panel are offset by this value. + The call is only valid when the Preferences dialog is displayed. + @param prefItemGroup TThe panel item-group object, as returned by + \c #AddPreferencePanel(). + @param baseIndex [out] A buffer in which to return the 0-based position + index of the base item. + */ + AIAPI AIErr (*GetPreferencePanelBaseItemIndex) (AIPreferenceItemGroupHandle prefItemGroup, ai::int32 *baseIndex); + + /** Displays a plug-in-defined panel in the Preferences dialog. Called + by the menu item that was created by \c #AddPreferencePanel(). + @param prefItemGroup The panel item-group object, as returned by + \c #AddPreferencePanel(). + */ + AIAPI AIErr (*ShowPreferencePanel) (AIPreferenceItemGroupHandle prefItemGroup); + + /** Retrieves an integer preference for 64 bit data type. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetLargeIntegerPreference) ( const char *prefix, const char *suffix, ai::int64 *value ); + + /** Sets an integer preference for 64 bit data type. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param value The new value. + */ + AIAPI AIErr (*PutLargeIntegerPreference) ( const char *prefix, const char *suffix, ai::int64 value ); + + /** Checks if a Preference Exists. + @param prefix The name of the plug-in, or \c NULL for an application preference. + @param suffix The name of the preference. + @param doesExist[out] A buffer in which to return whether the preference exists or not. + */ + AIAPI AIErr (*PreferenceExists) (const char* prefix, const char* suffix, AIBoolean* doesExist); + +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreferenceKeys.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreferenceKeys.h index fb91709..67c5d8b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreferenceKeys.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIPreferenceKeys.h @@ -1,628 +1,1146 @@ -#ifndef __AIPreferenceKeys__ -#define __AIPreferenceKeys__ - -/* - * Name: AIPreferenceKeys.h - * Purpose: To define shared preference keys, defaults, and other - * relevant information. - * Notes: When sharing preferences between plugins and the main app, - * either a) use a null prefix, or b) access the preferences from - * the main app via the AIPreference suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/** Preference prefix: Use low-resolution proxy for linked EPS files */ -#define kUseLowResProxyPrefix nullptr -/** Preference suffix: Use low-resolution proxy for linked EPS files */ -#define kUseLowResProxySuffix ((const char *)"useLowResProxy") -/** Preference default: Use low-resolution proxy for linked EPS files */ -const bool kUseLowResProxyDefault= false; - - -/** Preference prefix: Display Bitmaps as Anti-Aliased images in Pixel Preview */ -#define kDisplayBitmapsAsAntiAliasedPixelPreviewPrefix nullptr -/** Preference suffix: Display Bitmaps as Anti-Aliased images in Pixel Preview */ -#define kDisplayBitmapsAsAntiAliasedPixelPreviewSuffix ((const char *)"DisplayBitmapsAsAntiAliasedPixelPreview") -/** Preference default: Display Bitmaps as Anti-Aliased images in Pixel Preview */ -const bool kDisplayBitmapsAsAntiAliasedPixelPreviewDefault= false; - - - -/** Preference prefix: EPS rasterization resolution for linked EPS/DCS files */ -#define kEPSResolutionPrefix nullptr -/** Preference suffix: EPS rasterization resolution for linked EPS/DCS files */ -#define kEPSResolutionSuffix ((const char *)"EPSResolution") -/** Preference default: EPS rasterization resolution for linked EPS/DCS files */ -const ai::int32 kEPSResolutionDefault = 300; - -/** Preference prefix: Update linked file options */ -#define kFileClipboardPrefix ((const char *)"FileClipboard") -/** Preference suffix: Update linked file options */ -#define kLinkOptionsSuffix ((const char *)"linkoptions") -/** Preference options: Update linked file options */ -enum UpdateLinkOptions {AUTO, MANUAL, ASKWHENMODIFIED}; -/** Preference default: Update linked file options */ -const UpdateLinkOptions kLinkOptionsDefault= ASKWHENMODIFIED; - -/** Preference prefix: Enable OPI feature for linked EPS files */ -#define kEnableOPIPrefix nullptr -/** Preference suffix: Enable OPI feature for linked EPS files */ -#define kEnableOPISuffix ((const char *)"enableOPI") -/** Preference default: Enable OPI feature for linked EPS files */ -const bool kEnableOPIDefault = false; - -/** Preference suffix: Clipboard, copy SVG code*/ -#define kcopySVGCodeSuffix "copySVGCode" -/** Preference suffix: Clipboard, copy SVG code*/ -#define kcopySVGCBFormatSuffix "copySVGCBFormat" -/** Preference suffix: Clipboard, copy as PDF*/ -#define kcopyAsPDFSuffix "copyAsPDF" -/** Preference suffix: Clipboard, copy as Illustrator clipboard */ -#define kcopyAsAICBSuffix "copyAsAICB" -/** Preference suffix: Clipboard, append extension */ -#define kappendExtensionSuffix "appendExtension" -/** Preference suffix: Clipboard, lowercase */ -#define klowerCaseSuffix "lowerCase" -/** Preference suffix: Clipboard, flatten */ -#define kflattenSuffix "flatten" -/** Preference suffix: Clipboard options */ -#define kAICBOptionSuffix "AICBOption" - - - -/** Preferences: Illustrator clipboard option values */ -enum AICBOptions {PRESERVE_PATH, PRESERVE_APPEARANCE_OVERPRINT}; -/** Preference default:Clipboard options */ -const AICBOptions kAICBOptionsDefault= PRESERVE_APPEARANCE_OVERPRINT; - -/** @ingroup PreferenceKeys - Version Cue preference */ -#define kUseVersionCue "useVersionCue" - -/** @ingroup PreferenceKeys - Whether screen display uses a black preserving color transformation - for converting CMYK to RGB or gray. The black preserving transform maps CMYK - 0,0,0,1 to the darkest black available. Not colorimetrically accurate - but sometimes preferable for viewing CMYK black line art and text. The - default value is given by \c #kAIPrefDefaultOnscreenBlackPres. */ -#define kAIPrefKeyOnscreenBlackPres ((const char*) "blackPreservation/Onscreen") -/** @ingroup PreferenceKeys - Default value for \c #kAIPrefKeyOnscreenBlackPres. */ -#define kAIPrefDefaultOnscreenBlackPres true - -/** @ingroup PreferenceKeys - Whether printing and export uses a black preserving color transformation - for converting CMYK to RGB or gray. The black preserving transform maps CMYK - 0,0,0,1 to the darkest black available. Not colorimetrically accurate - but sometimes preferable for viewing CMYK black line art and text. The - default value is given by \c #kAIPrefDefaultExportBlackPres. */ -#define kAIPrefKeyExportBlackPres ((const char*) "blackPreservation/Export") -/** @ingroup PreferenceKeys - Default value for \c #kAIPrefKeyExportBlackPres. */ -#define kAIPrefDefaultExportBlackPres true - -/** @ingroup PreferenceKeys - Sets the guide style (solid or dashed). - The default value is given by \c #kAIPrefDefaultGuideStyle. */ -#define kAIPrefKeyGuideStyle ((const char*)"Guide/Style") -/** @ingroup PreferenceKeys - The \c #kAIPrefKeyGuideStyle value for solid guides. */ -#define kAIPrefGuideStyleSolid 0 -/** @ingroup PreferenceKeys - The \c #kAIPrefKeyGuideStyle value for dashed guides. */ -#define kAIPrefGuideStyleDashed 1 -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyGuideStyle. */ -#define kAIPrefDefaultGuideStyle kAIPrefGuideStyleSolid - -/** @ingroup PreferenceKeys - Sets the red component of the Guide color. - The default value is given by \c #kAIPrefDefaultGuideColorRed. */ -#define kAIPrefKeyGuideColorRed ((const char*)"Guide/Color/red") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyGuideColorRed. */ -#define kAIPrefDefaultGuideColorRed (0x4A3D/65535.0f) - -/** @ingroup PreferenceKeys - Sets the green component of the Guide color. - The default value is given by \c #kAIPrefDefaultGuideColorGreen. */ -#define kAIPrefKeyGuideColorGreen ((const char*)"Guide/Color/green") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyGuideColorGreen. */ -#define kAIPrefDefaultGuideColorGreen (1.0f) - -/** @ingroup PreferenceKeys - Sets the blue component of the Guide color. - The default value is given by \c #kAIPrefDefaultGuideColorBlue. */ -#define kAIPrefKeyGuideColorBlue ((const char*)"Guide/Color/blue") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyGuideColorBlue. */ -#define kAIPrefDefaultGuideColorBlue (1.0f) - -/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in) - Sets the red component of the SmartGuide color. - The default value is given by \c #kAIPrefDefaultSmartGuideColorRed. */ -#define kAIPrefKeySmartGuideColorRed ((const char*)"snapomatic/Color/red_19_2") -/** @ingroup PreferenceKeys for Smart Guides - The default value for \c #kAIPrefKeySmartGuideColorRed. */ -#define kAIPrefDefaultSmartGuideColorRed (1.0f) - -/** @ingroup PreferenceKeys for Smart Guides - Sets the green component of the SmartGuide color. - The default value is given by \c #kAIPrefDefaultGuideColorGreen. */ -#define kAIPrefKeySmartGuideColorGreen ((const char*)"snapomatic/Color/green_19_2") -/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in) - The default value for \c #kAIPrefKeySmartGuideColorGreen. */ -#define kAIPrefDefaultSmartGuideColorGreen (0x4A3D/65535.0f) - -/** @ingroup PreferenceKeys for Smart Guides - Sets the blue component of the SmartGuide color. - The default value is given by \c #kAIPrefDefaultSmartGuideColorBlue. */ -#define kAIPrefKeySmartGuideColorBlue ((const char*)"snapomatic/Color/blue_19_2") -/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in) - The default value for \c #kAIPrefKeySmartGuideColorBlue. */ -#define kAIPrefDefaultSmartGuideColorBlue (1.0f) - -/** @ingroup PreferenceKeys - Whether to show the slice numbers or not. - The default value is given by \c #kAIPrefDefaultShowSliceNumbers. */ -#define kAIPrefKeyShowSliceNumbers ((const char*)"plugin/AdobeSlicingPlugin/showSliceNumbers") -/** @ingroup PreferenceKeys - Default value for \c #kAIPrefKeyShowSliceNumbers. */ -#define kAIPrefDefaultShowSliceNumbers true - -/** @ingroup PreferenceKeys for Slicing feedback - Sets the red component of the Slicing feedback color. - The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorRed. */ -#define kAIPrefKeySlicingFeedbackColorRed ((const char*)"plugin/AdobeSlicingPlugin/feedback/red") -/** @ingroup PreferenceKeys for Slicing feedback - The default value for \c #kAIPrefKeySlicingFeedbackColorRed. */ -#define kAIPrefDefaultSlicingFeedbackColorRed (0xFFFF) - -/** @ingroup PreferenceKeys for Slicing feedback - Sets the green component of the Slicing feedback color. - The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorGreen. */ -#define kAIPrefKeySlicingFeedbackColorGreen ((const char*)"plugin/AdobeSlicingPlugin/feedback/green") -/** @ingroup PreferenceKeys for Slicing feedback - The default value for \c #kAIPrefKeySlicingFeedbackColorGreen. */ -#define kAIPrefDefaultSlicingFeedbackColorGreen (0x4A3D) - -/** @ingroup PreferenceKeys for Slicing feedback - Sets the blue component of the Slicing feedback color. - The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorBlue. */ -#define kAIPrefKeySlicingFeedbackColorBlue ((const char*)"plugin/AdobeSlicingPlugin/feedback/blue") -/** @ingroup PreferenceKeys for Slicing feedback - The default value for \c #kAIPrefKeySlicingFeedbackColorBlue. */ -#define kAIPrefDefaultSlicingFeedbackColorBlue (0x4A3D) - -/** @ingroup PreferenceKeys - Sets the greeking threshold for text drawing. Text rendered at a point size less than - or equal to the greeking threshold is rendered greeked. - The default value is given by \c #kAIPrefDefaultTextGreekingThreshold. */ -#define kAIPrefKeyTextGreekingThreshold ((const char*)"text/greekingThreshold") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyTextGreekingThreshold. */ -#define kAIPrefDefaultTextGreekingThreshold (6.0f) - -/** @ingroup PreferenceKeys - Sets the legacy gradient-mesh object conversion options when opening a legacy - document (from an Illustrator version before CS 3). */ -#define kAIPrefKeyLegacyGradientMeshConversionOptions ((const char*) "open/legacyGradientMeshConversion") -/** @ingroup PreferenceKeys - Key values for \c #kAIPrefKeyLegacyGradientMeshConversionOptions. */ -enum LegacyGradientMeshConversionOptions {MESH_UNKNOWN, MESH_PRESERVE_SPOT, MESH_PRESERVE_APPEARANCE}; - -/** @ingroup PreferenceKeys - Sets the tolerance preference for selection. Integer, a number of pixels. */ -#define kAIPrefKeySelectionTolerance ((const char*) "selectionTolerance") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeySelectionTolerance. */ -#define kAIPrefDefaultSelectionTolerance (3) - -/** @ingroup PreferenceKeys - Sets the tolerance preference for selection in touch workspace. Integer, a number of pixels. */ -#define kAIPrefKeyTWSSelectionTolerance ((const char*) "tws/SelectionTolerance") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyTWSSelectionTolerance. */ -#define kAIPrefDefaultTWSSelectionTolerance (10) - -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefDefaultCornerAngleLimit. */ -#define kAIPrefDefaultCornerAngleLimit (177.0) - -/** @ingroup PreferenceKeys -Determines whether strokes and effects will be scaled or not. */ -#define kAIPrefKeyScaleStrokesAndEffects ((const char*)"scaleLineWeight") -/** @ingroup PreferenceKeys - Determines whether or not anchor points will be highlighted on mouseover. */ -#define kAIPrefKeyHighlightAnchorOnMouseover ((const char*)"highlightAnchorOnMouseOver") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyHighlightAnchorOnMouseover. */ -const bool kAIPrefKeyHighlightAnchorOnMouseoverDefault = true; - -/** @ingroup PreferenceKeys - Whether to show the legacy artboard conversion options when opening a legacy - document (from an Illustrator version before CS 4). */ -#define kShowArtboardConversionDialogKey ((const char*) "LegacyArtboardOptions/ShowDialog") -/** @ingroup PreferenceKeys - Sets the legacy artboard conversion options " Legacy Artboard" when opening a legacy - document (from an Illustrator version before CS 4). */ -#define kAIArtboardConversionDialogArtboardKey ((const char*) "LegacyArtboardOptions/artboard") -/** @ingroup PreferenceKeys - Sets the legacy artboard conversion options " Crop Area" when opening a legacy - document (from an Illustrator version before CS 4). */ -#define kAIArtboardConversionDialogCropAreaKey ((const char*) "LegacyArtboardOptions/cropAreas") -/** @ingroup PreferenceKeys - Sets the legacy artboard conversion options " Print tiles" when opening a legacy - document (from an Illustrator version before CS 4). */ -#define kAIArtboardConversionDialogTilesKey ((const char*) "LegacyArtboardOptions/pageTiles") -/** @ingroup PreferenceKeys - Sets the legacy artboard conversion options "Artwork Bounds" when opening a legacy - document (from an Illustrator version before CS 4). */ -#define kAIArtboardConversionDialogArtworkBoundsKey ((const char*) "LegacyArtboardOptions/artworkBounds") - -/** @ingroup PreferenceKeys - Turns the Pixel Grid On/Off - The default value is given by \c #kAIPrefDefaultShowPixelGrid. */ -#define kAIPrefKeyShowPixelGrid ((const char*)"Guide/ShowPixelGrid") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyGuideColorRed. */ -#define kAIPrefDefaultShowPixelGrid TRUE - -/** @ingroup PreferenceKeys - Determines whether or not link info will be shown in links panel */ -#define kAIPrefKeyShowLinkInfo ((const char*)"showLinkInfo") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefKeyShowLinkInfo. */ -const bool kAIPrefKeyShowLinkInfoDefault = false; - -/** @ingroup PreferenceKeys - creative cloud pref - preferences and workspaces. - The default value is given by \c #kAIPrefDefaultCreativeCloudPreferences. */ -#define kAIPrefCreativeCloudPreferences ((const char*)"CreativeCloud/preferences") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudPreferences. */ -#define kAIPrefDefaultCreativeCloudPreferences TRUE - -/** @ingroup PreferenceKeys - creative cloud pref - Swatches - The default value is given by \c #kAIPrefDefaultCreativeCloudSwatches. */ -#define kAIPrefCreativeCloudSwatches ((const char*)"CreativeCloud/Swatches") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudSwatches. */ -#define kAIPrefDefaultCreativeCloudSwatches TRUE - - -/** @ingroup PreferenceKeys - creative cloud pref - Presets - The default value is given by \c #kAIPrefDefaultCreativeCloudPresets. */ -#define kAIPrefCreativeCloudPresets ((const char*)"CreativeCloud/Presets") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudPresets. */ -#define kAIPrefDefaultCreativeCloudPresets TRUE - -/** @ingroup PreferenceKeys - creative cloud pref - Symbols - The default value is given by \c #kAIPrefDefaultCreativeCloudSymbols. */ -#define kAIPrefCreativeCloudSymbols ((const char*)"CreativeCloud/Symbols") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudSymbols. */ -#define kAIPrefDefaultCreativeCloudSymbols TRUE - -/** @ingroup PreferenceKeys - creative cloud pref - Brushes - The default value is given by \c #kAIPrefDefaultCreativeCloudBrushes. */ -#define kAIPrefCreativeCloudBrushes ((const char*)"CreativeCloud/Brushes") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudBrushes. */ -#define kAIPrefDefaultCreativeCloudBrushes TRUE - -/** @ingroup PreferenceKeys - creative cloud pref - Graphic Styles - The default value is given by \c #kAIPrefDefaultCreativeCloudGraphicStyles. */ -#define kAIPrefCreativeCloudGraphicStyles ((const char*)"CreativeCloud/GraphicStyles") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudGraphicStyles. */ -#define kAIPrefDefaultCreativeCloudGraphicStyles TRUE - -/** @ingroup PreferenceKeys - creative cloud pref - Workspaces - The default value is given by \c #kAIPrefDefaultCreativeCloudWorkspaces. */ -#define kAIPrefCreativeCloudWorkspaces ((const char*)"CreativeCloud/Workspaces") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudWorkspaces. */ -#define kAIPrefDefaultCreativeCloudWorkspaces TRUE - -/** @ingroup PreferenceKeys - creative cloud pref - Keyboard shortcuts - The default value is given by \c #kAIPrefDefaultCreativeCloudKBS. */ -#define kAIPrefCreativeCloudKBS ((const char*)"CreativeCloud/KBS") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudKeyboard shortcuts. */ -#define kAIPrefDefaultCreativeCloudKBS TRUE - - -/** @ingroup PreferenceKeys - creative cloud pref - Asian Settings - The default value is given by \c #kAIPrefDefaultCreativeCloudAsianSettings. */ -#define kAIPrefCreativeCloudAsianSettings ((const char*)"CreativeCloud/AsianSettings") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudAsianSettings. */ -#define kAIPrefDefaultCreativeCloudAsianSettings TRUE - -/** @ingroup PreferenceKeys - creative cloud pref - Conflict Handling Action - The default value is given by \c #kAIPrefDefaultCreativeCloudConflictHandling. */ -#define kAIPrefCreativeCloudConflictHandling ((const char*)"CreativeCloud/ConflictHandling") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudConflictHandling. */ -#define kAIPrefDefaultCreativeCloudConflictHandling AIPreferenceUtil::kAskMe - -/** @ingroup PreferenceKeys - creative cloud pref - Sync Popup state - The default value is given by \c #kAIPrefDefaultCreativeCloudSyncPopup. */ -#define kAIPrefCreativeCloudSyncPopup ((const char*)"CreativeCloud/SyncPopup") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefCreativeCloudSyncPopup. */ -#define kAIPrefDefaultCreativeCloudSyncPopup AIPreferenceUtil::kAllSettings - -/** @ingroup PreferenceKeys - Live Shape pref - Constrain dimensions - The default value is given by \c #kAIPrefDefaultLiveShapesConstrainDimensions. */ -#define kAIPrefLiveShapesConstrainDimensions ((const char*)"LiveShapes/constrainDimensions") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefLiveShapesConstrainDimensions. */ -#define kAIPrefDefaultLiveShapesConstrainDimensions TRUE - -/** @ingroup PreferenceKeys - Live Shape pref - Constrain radii - The default value is given by \c #kAIPrefDefaultLiveShapesConstrainRadii. */ -#define kAIPrefLiveShapesConstrainRadii ((const char*)"LiveShapes/constrainRadii") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefLiveShapeConstrainRadii. */ -#define kAIPrefDefaultLiveShapesConstrainRadii TRUE - -/** @ingroup PreferenceKeys - Live Shape pref - Constrain angles in pie - The default value is given by \c #kAIPrefDefaultLiveShapesConstrainPieAngles. */ -#define kAIPrefLiveShapesConstrainPieAngles ((const char*)"LiveShapes/constrainPieAngles") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefLiveShapesConstrainPieAngles. */ -#define kAIPrefDefaultLiveShapesConstrainPieAngles FALSE - -/** @ingroup PreferenceKeys - Live Shape pref - Auto show shape properties UI on shape creation - The default value is given by \c #kAIPrefDefaultLiveShapesAutoShowPropertiesUI. */ -#define kAIPrefLiveShapesAutoShowPropertiesUI ((const char*)"LiveShapes/autoShowPropertiesUIOnCreatingShape") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefLiveShapeAutoShowPropertiesUI. */ -#define kAIPrefDefaultLiveShapesAutoShowPropertiesUI FALSE - -/** @ingroup PreferenceKeys - Live Shape pref - Hide shape widgets for shape tool - The default value is given by \c #kAIPrefDefaultLiveShapesHideWidgetsForShapeTool. */ -#define kAIPrefLiveShapesHideWidgetsForShapeTools ((const char*)"LiveShapes/hideWidgetsForShapeTools") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefLiveShapesHideWidgetsForShapeTool. */ -#define kAIPrefDefaultLiveShapesHideWidgetsForShapeTools FALSE - -/** @ingroup PreferenceKeys - Policy for preserving corners: governs the way corners are modified while transformations, e.g. scaling radii, maintaining corner radii value - The default value is given by \c #kAIPrefDefaultPreserveCornersPolicy. */ -#define kAIPrefPreserveCornersPolicy ((const char*)"policyForPreservingCorners") -/** @ingroup PreferenceKeys - Key values for \c #kAIPrefPreserveCornersPolicy. */ -enum CornerPreservePolicy { kAIPrefScaleCornersRadii = 1, kAIPrefMaintainCornersRadii }; -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefPreserveCornersPolicy. */ -const CornerPreservePolicy kAIPrefDefaultPreserveCornersPolicy = kAIPrefMaintainCornersRadii; - -/** @ingroup PreferenceKeys - Performance pref - GPU Support detected*/ -#define kAIPrefPerformanceGPUSupported ((const char*)"Performance/GPUSupported") -/** @ingroup PreferenceKeys - Performance pref - Enable GPU rendering*/ -#define kAIPrefPerformanceEnableGPU ((const char*)"Performance/EnableGPU_Ver19_2") - -/** @ingroup PreferenceKeys - Performance pref - Enable Animated Zoom*/ -#define kAIPrefPerformanceAnimZoom ((const char*)"Performance/AnimZoom") - -/** @ingroup PreferenceKeys - Performance pref - Enable Thin Filled Paths */ -#define kAIPrefPerformanceEnableThinFilledPaths ((const char*)"Performance/EnableThinFilledPaths") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefPerformanceEnableThinFilledPaths. */ -#define kAIPrefDefaultPerformanceEnableThinFilledPaths false - -/** @ingroup PreferenceKeys - Performance pref - Enable GPU rendering for CMYK */ -#define kAIPrefPerformanceEnableCMYK ((const char*)"Performance/EnableCMYK") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefPerformanceEnableCMYK. */ -#define kAIPrefDefaultPerformanceEnableCMYK false - -/** @ingroup PreferenceKeys -Performance pref - Display Setting */ -#define kAIPrefPerformanceDisplaySetting ((const char*)"Performance/DisplaySetting") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefPerformanceDisplaySetting. */ -#define kAIPrefDefaultPerformanceDisplaySetting (0) - -/** @ingroup PreferenceKeys -Performance pref - MSAA Value */ -#define kAIPrefPerformanceMSAAValue ((const char*)"Performance/MSAAValue") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefPerformanceMSAAValue. */ -#define kAIPrefDefaultPerformanceMSAAValue (0) - -/** @ingroup PreferenceKeys - Crash Recovery pref - Automatically Save CheckBox Value*/ -#define kAIPrefCrashRecoveryAutomaticallySave ((const char*)"CrashRecovery/AutomaticallySave") - -/** @ingroup PreferenceKeys - Crash Recovery pref - Minimum enforced time between two consecutive incremental save operations*/ -#define kAIPrefCrashRecoveryIdleLoopTimeInterval ((const char*)"CrashRecovery/IdleLoopTimeInterval") - -/** @ingroup PreferenceKeys - Crash Recovery pref - Folder location where incremental files are saved*/ -#define kAIPrefCrashRecoveryFolderLocation ((const char*)"CrashRecovery/RecoveryFolderLocation") - -/** @ingroup PreferenceKeys - Crash Recovery pref - Turn off for Complex file Checkbox value*/ -#define kAIPrefCrashRecoveryTurnOffForComplexDocument ((const char*)"CrashRecovery/TurnOffForComplexDocument") - -/** @ingroup PreferenceKeys - Scale Illustrator UI */ -#define kAIPrefScaleUI ((const char*)"UIPreferences/scaleUI") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefScaleUI. */ -#define kAIPrefDefaultScaleUI true - -/** @ingroup PreferenceKeys - Scale Illustrator UI to higher supported or lower supported scale factor. Value 0 means snap to lower supported scale factor while 1 means snap to higher one. */ -#define kAIPrefSnapUIScaleFactor ((const char*)"UIPreferences/snapUIScaleFactor") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefSnapUIScaleFactor. */ -#define kAIPrefDefaultSnapUIScaleFactor 1 - -/** @ingroup PreferenceKeys - Touch Pref - Switch to Touch Workspace on Detaching Keyboard - The default value is given by \c #kAIPrefDefaultTWSKeyboardDetach. */ -#define kAIPrefTWSKeyboardDetach ((const char*)"TouchPreferenceUI/TWSKeyboardDetach") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefTWSKeyboardDetach. */ -#define kAIPrefDefaultTWSKeyboardDetach true -/** @ingroup PreferenceKeys - Touch Pref - Use Precise Cursors - The default value is given by \c #kAIPrefDefaultPreciseCursors. */ -#define kAIPrefPreciseCursors ((const char*)"TouchPreferenceUI/PreciseCursor") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefPreciseCursors. */ -#define kAIPrefDefaultPreciseCursors true -/** @ingroup PreferenceKeys -Determines whether or not to enable constrain scaling in Shaper in TWS. */ -#define kAIPrefShaperConstrainScale ((const char*)"shaper/constrainScaling") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefShaperConstrainScale. */ -#define kAIPrefShaperConstrainScaleDefault false -/** @ingroup PreferenceKeys - Touch Pref - Soft Message Default Duration - The default value is given by \c #kAIPrefDefault/SoftMessageDuration. */ -#define kAIPrefSoftMessageDuration ((const char*)"TouchPreferenceUI/SoftMessageDuration") - /** @ingroup PreferenceKeys - The default value for \c #kAIPrefSoftMessageDuration. */ -#define kAIPrefDefaultSoftMessageDuration (4.0f) - -/** @ingroup PreferenceKeys -ExpFeatures Pref - Enable Creative Cloud Charts -The default value is given by \c #kAIPrefDefaultEnableCCCharts. */ -#define kAIPrefEnableCCCharts ((const char*)"ExpFeaturesPreferenceUI/EnableCCCharts") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefEnableCCCharts. */ -#define kAIPrefDefaultEnableCCCharts false - -/** @ingroup PreferenceKeys - Making New Rectangular Area Text Auto Sizable by default */ -#define kAIPrefTextBoxAutoSizing ((const char*)"text/autoSizing") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefTextBoxAutoSizing. */ -#define kAIPrefTextBoxAutoSizingDefaultValue false - -/** @ingroup PreferenceKeys -Determines whether or not to show What's New Dialog */ -#define kAIPrefDontShowMissingFontDlg ((const char*)"DontShowMissingFontDialogPreference") -/** @ingroup PreferenceKeys - The default value for \c #kAIPrefShowMissingFontDlg. */ -const bool kAIPrefDontShowMissingFontDlgDefault = false; - -/** @ingroup PreferenceKeys -Determines whether or not UIDs are automatically assigned to art objects, in the document being created */ -#define kAIPrefAutoAssignUIDsForDocCreated ((const char*)"AutoAssignUIDsForDocCreatedPreference") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefAutoAssignUIDsForDocCreated. */ -const bool kAIPrefAutoAssignUIDsForDocCreatedDefault = false; - -/** @ingroup PreferenceKeys -Determines whether or not UIDs are automatically assigned to art objects, in the document being opened */ -#define kAIPrefAutoAssignUIDsForDocOpened ((const char*)"AutoAssignUIDsForDocOpenedPreference") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefAutoAssignUIDsForDocOpened. */ -const bool kAIPrefAutoAssignUIDsForDocOpenedDefault = false; - -/** @ingroup PreferenceKeys -Determines whether or not to hide corner widgets based on Angle */ -#define kAIPrefHideCornerWidgetBasedOnAngle ((const char*)"liveCorners/hideCornerWidgetBasedOnAngle") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefHideCornerWidgetBasedOnAngle. */ -const bool kAIPrefHideCornerWidgetBasedOnAngleDefault = true; - -/** @ingroup PreferenceKeys -Sets the Corner Angle Limit for Hiding Corner Widgets */ -#define kAIPrefCornerAngleLimit ((const char*)"liveCorners/cornerAngleLimit") - -/** @ingroup PreferenceKeys -Determines whether or not to show bounding box */ -#define kAIPrefShowBoundingBox ((const char*)"showBoundingBox") - - -#define kShowRecentFileWSKey ((const char*)"Hello/RecentFileWS") -/** @ingroup PreferenceKeys -The default value for \c #kShowRecentFileWSKey. */ -const bool kAIPrefShowRecentFileWSDefault = false; - -#define kShowHomeScreenWSKey ((const char*)"Hello/ShowHomeScreenWS") -/** @ingroup PreferenceKeys -The default value for \c #kShowHomeScreenWSKey. */ -const bool kAIPrefShowHomeScreenWSDefault = true; - -/** @ingroup PreferenceKeys -Determines whether or not to show Tool Guides. Used in AI 19.2 or greater */ -#define kAISnappingPrefShowToolGuides ((const char*)"smartGuides/showToolGuides") -/** @ingroup PreferenceKeys -The default value for \c #kAISnappingPrefShowToolGuides. */ -const bool kAISnappingPrefShowToolGuidesDefault = false; - -/** Preference prefix: Number of Default Recent File */ -#define kRecentFileNumberPrefix nullptr -/** Preference suffix: Number of Default Recent File */ -#define kRecentFileNumberSuffix ((const char *)"RecentFileNumber") -/** Preference default:Number of Default Recent File */ -const unsigned int kRecentFileNumberDefault = 20; -/** @ingroup PreferenceKeys -Determines the tolerance for snapping to angles while rotating a live shape. Used in AI 19.2 or greater */ -#define kAISnappingPrefAngularTolerance ((const char*)"smartGuides/angularTolerance") -/** @ingroup PreferenceKeys -The default value for \c #kAISnappingPrefAngularTolerance. */ -const ai::int32 kAISnappingPrefAngularToleranceDefault = 2; - -/** @ingroup PreferenceKeys -Live Shape pref - Determines whether shapes created by Shape Tools(Rectangle, Polygon, Ellipse, Line) are live. -The default value is given by \c #kAIPrefDefaultCreateLiveShapes. */ -#define kAIPrefCreateLiveShapes ((const char*)"LiveShapes/createLiveShapes") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefCreateLiveShapes. */ -#define kAIPrefDefaultCreateLiveShapes TRUE - -/** @ingroup PreferenceKeys -Linked files pref - Determines if the UNC(Universal Naming Convention) path needs to be used or the default -path of file needs to be used. Only makes sense for Windows. \c #kAIPrefUseUNCPath. */ -#define kAIPrefUseUNCPath ((const char*)"FilePath/UNCPath") -/** @ingroup PreferenceKeys -The default value for \c #kAIPrefUseUNCPath. */ -#define kAIPrefDefaultUseUNCPath TRUE - -/** Preference default:Number of Default Recent Presets */ -const unsigned int kRecentPresetsNumberDefault = 20; - -#endif +#ifndef __AIPreferenceKeys__ +#define __AIPreferenceKeys__ + +/* + * Name: AIPreferenceKeys.h + * Purpose: To define shared preference keys, defaults, and other + * relevant information. + * Notes: When sharing preferences between plugins and the main app, + * either a) use a null prefix, or b) access the preferences from + * the main app via the AIPreference suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2001-2014 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/** Preference prefix: Use low-resolution proxy for linked EPS files */ +#define kUseLowResProxyPrefix nullptr +/** Preference suffix: Use low-resolution proxy for linked EPS files */ +#define kUseLowResProxySuffix ((const char *)"useLowResProxy") +/** Preference default: Use low-resolution proxy for linked EPS files */ +const bool kUseLowResProxyDefault= false; + +/** Preference prefix: Use System Default app for Editing linked Image files */ +#define kUseSysDefEditLinkPrefix nullptr +/** Preference suffix: Use System Default app for Editing linked Image files */ +#define kUseSysDefEditLinkSuffix ((const char *)"useSysDefEdit") +/** Preference default: Use System Default app for Editing linked Image files */ +const bool kUseSysDefEditLinkDefault= false; + +/** Preference prefix: Display Bitmaps as Anti-Aliased images in Pixel Preview */ +#define kDisplayBitmapsAsAntiAliasedPixelPreviewPrefix nullptr +/** Preference suffix: Display Bitmaps as Anti-Aliased images in Pixel Preview */ +#define kDisplayBitmapsAsAntiAliasedPixelPreviewSuffix ((const char *)"DisplayBitmapsAsAntiAliasedPixelPreview") +/** Preference default: Display Bitmaps as Anti-Aliased images in Pixel Preview */ +const bool kDisplayBitmapsAsAntiAliasedPixelPreviewDefault= false; + + + +/** Preference prefix: EPS rasterization resolution for linked EPS/DCS files */ +#define kEPSResolutionPrefix nullptr +/** Preference suffix: EPS rasterization resolution for linked EPS/DCS files */ +#define kEPSResolutionSuffix ((const char *)"EPSResolution") +/** Preference default: EPS rasterization resolution for linked EPS/DCS files */ +const ai::int32 kEPSResolutionDefault = 300; + +/** Preference prefix: Update linked file options */ +#define kFileClipboardPrefix ((const char *)"FileClipboard") +/** Preference suffix: Update linked file options */ +#define kLinkOptionsSuffix ((const char *)"linkoptions") +/** Preference options: Update linked file options */ +enum UpdateLinkOptions {AUTO, MANUAL, ASKWHENMODIFIED}; +/** Preference default: Update linked file options */ +const UpdateLinkOptions kLinkOptionsDefault= ASKWHENMODIFIED; + +/** Preference prefix: Enable OPI feature for linked EPS files */ +#define kEnableOPIPrefix nullptr +/** Preference suffix: Enable OPI feature for linked EPS files */ +#define kEnableOPISuffix ((const char *)"enableOPI") +/** Preference default: Enable OPI feature for linked EPS files */ +const bool kEnableOPIDefault = false; + +/** Preference suffix: Clipboard, copy SVG code*/ +#define kcopySVGCodeSuffix "copySVGCode" +/** Preference suffix: Clipboard, copy SVG code*/ +#define kcopySVGCBFormatSuffix "copySVGCBFormat" +/** Preference suffix: Clipboard, copy as PDF*/ +#define kcopyAsPDFSuffix "copyAsPDF" +/** Preference suffix: Clipboard, copy as SVG*/ +#define kcopyAsSVGSuffix "copyAsSVG" +/** Preference suffix: Clipboard, copy as Illustrator clipboard */ +#define kcopyAsAICBSuffix "copyAsAICB" +/** Preference suffix: Clipboard, append extension */ +#define kappendExtensionSuffix "appendExtension" +/** Preference suffix: Clipboard, lowercase */ +#define klowerCaseSuffix "lowerCase" +/** Preference suffix: Clipboard, flatten */ +#define kflattenSuffix "flatten" +/** Preference suffix: Clipboard options */ +#define kAICBOptionSuffix "AICBOption" +/** Preference suffix: Clipboard, paste without formatting*/ +#define kPasteWithoutFormattingSuffix "pasteWithoutFormatting" + + +/** Preferences: Illustrator clipboard option values */ +enum AICBOptions {PRESERVE_PATH, PRESERVE_APPEARANCE_OVERPRINT}; +/** Preference default:Clipboard options */ +const AICBOptions kAICBOptionsDefault= PRESERVE_APPEARANCE_OVERPRINT; + +/** @ingroup PreferenceKeys + Version Cue preference */ +#define kUseVersionCue "useVersionCue" + +/** @ingroup PreferenceKeys + Whether screen display uses a black preserving color transformation + for converting CMYK to RGB or gray. The black preserving transform maps CMYK + 0,0,0,1 to the darkest black available. Not colorimetrically accurate, + but sometimes preferable for viewing CMYK black line art and text. The + default value is given by \c #kAIPrefDefaultOnscreenBlackPres. */ +#define kAIPrefKeyOnscreenBlackPres ((const char*) "blackPreservation/Onscreen") +/** @ingroup PreferenceKeys + Default value for \c #kAIPrefKeyOnscreenBlackPres. */ +#define kAIPrefDefaultOnscreenBlackPres true + +/** @ingroup PreferenceKeys + Whether printing and exporting uses a black preserving color transformation + for converting CMYK to RGB or gray. The black preserving transform maps CMYK + 0,0,0,1 to the darkest black available. Not colorimetrically accurate, + but sometimes preferable for viewing CMYK black line art and text. The + default value is given by \c #kAIPrefDefaultExportBlackPres. */ +#define kAIPrefKeyExportBlackPres ((const char*) "blackPreservation/Export") +/** @ingroup PreferenceKeys + Default value for \c #kAIPrefKeyExportBlackPres. */ +#define kAIPrefDefaultExportBlackPres true + +/** @ingroup PreferenceKeys + Sets the guide style (solid or dashed). + The default value is given by \c #kAIPrefDefaultGuideStyle. */ +#define kAIPrefKeyGuideStyle ((const char*)"Guide/Style") +/** @ingroup PreferenceKeys + The \c #kAIPrefKeyGuideStyle value for solid guides. */ +#define kAIPrefGuideStyleSolid 0 +/** @ingroup PreferenceKeys + The \c #kAIPrefKeyGuideStyle value for dashed guides. */ +#define kAIPrefGuideStyleDashed 1 +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyGuideStyle. */ +#define kAIPrefDefaultGuideStyle kAIPrefGuideStyleSolid + +/** @ingroup PreferenceKeys + Sets the red component of the Guide color. + The default value is given by \c #kAIPrefDefaultGuideColorRed. */ +#define kAIPrefKeyGuideColorRed ((const char*)"Guide/Color/red") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyGuideColorRed. */ +#define kAIPrefDefaultGuideColorRed (0x4A3D/65535.0f) + +/** @ingroup PreferenceKeys + Sets the green component of the Guide color. + The default value is given by \c #kAIPrefDefaultGuideColorGreen. */ +#define kAIPrefKeyGuideColorGreen ((const char*)"Guide/Color/green") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyGuideColorGreen. */ +#define kAIPrefDefaultGuideColorGreen (1.0f) + +/** @ingroup PreferenceKeys + Sets the blue component of the Guide color. + The default value is given by \c #kAIPrefDefaultGuideColorBlue. */ +#define kAIPrefKeyGuideColorBlue ((const char*)"Guide/Color/blue") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyGuideColorBlue. */ +#define kAIPrefDefaultGuideColorBlue (1.0f) + +/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in) */ + +/** Determines whether or not to show Tool Guides. Used in AI 19.2 or greater */ +#define kAISnappingPrefShowToolGuides ((const char*)"smartGuides/showToolGuides") +/** @ingroup PreferenceKeys + The default value for \c #kAISnappingPrefShowToolGuides. */ +const bool kAISnappingPrefShowToolGuidesDefault = false; + +/** @ingroup PreferenceKeys + Determines the tolerance for snapping to angles while rotating a live shape. Used in AI 19.2 or greater */ +#define kAISnappingPrefAngularTolerance ((const char*)"smartGuides/angularTolerance") +/** @ingroup PreferenceKeys + The default value for \c #kAISnappingPrefAngularTolerance. */ +const ai::int32 kAISnappingPrefAngularToleranceDefault = 2; + +/** Sets the red component of the SmartGuide color. + The default value is given by \c #kAIPrefDefaultSmartGuideColorRed. */ +#define kAIPrefKeySmartGuideColorRed ((const char*)"snapomatic/Color/red_19_2") +/** @ingroup PreferenceKeys for Smart Guides + The default value for \c #kAIPrefKeySmartGuideColorRed. */ +#define kAIPrefDefaultSmartGuideColorRed (1.0f) + +/** @ingroup PreferenceKeys for Smart Guides + Sets the green component of the SmartGuide color. + The default value is given by \c #kAIPrefDefaultGuideColorGreen. */ +#define kAIPrefKeySmartGuideColorGreen ((const char*)"snapomatic/Color/green_19_2") +/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in) + The default value for \c #kAIPrefKeySmartGuideColorGreen. */ +#define kAIPrefDefaultSmartGuideColorGreen (0x4A3D/65535.0f) + +/** @ingroup PreferenceKeys for Smart Guides + Sets the blue component of the SmartGuide color. + The default value is given by \c #kAIPrefDefaultSmartGuideColorBlue. */ +#define kAIPrefKeySmartGuideColorBlue ((const char*)"snapomatic/Color/blue_19_2") +/** @ingroup PreferenceKeys for Smart Guides (Snapomatic Plug-in) + The default value for \c #kAIPrefKeySmartGuideColorBlue. */ +#define kAIPrefDefaultSmartGuideColorBlue (1.0f) + +/** Sets the red component of the GlyphGuide color. + The default value is given by \c #kAIPrefDefaultGlyphGuideColorRed. */ +#define kAIPrefKeyGlyphGuideColorRed ((const char*)"snapomatic/GlyphColor/red") +/** @ingroup PreferenceKeys for Glyph Guides + The default value for \c #kAIPrefKeyGlyphGuideColorRed. */ +#define kAIPrefDefaultGlyphGuideColorRed ((110)/255.0f) + +/** @ingroup PreferenceKeys for Glyph Guides + Sets the green component of the GlyphGuide color. + The default value is given by \c #kAIPrefDefaultGuideColorGreen. */ +#define kAIPrefKeyGlyphGuideColorGreen ((const char*)"snapomatic/GlyphColor/green") +/** @ingroup PreferenceKeys for Glyph Guides (Snapomatic Plug-in) + The default value for \c #kAIPrefKeyGlyphGuideColorGreen. */ +#define kAIPrefDefaultGlyphGuideColorGreen ((205)/255.0f) + +/** @ingroup PreferenceKeys for Glyph Guides + Sets the blue component of the GlyphGuide color. + The default value is given by \c #kAIPrefDefaultGlyphGuideColorBlue. */ +#define kAIPrefKeyGlyphGuideColorBlue ((const char*)"snapomatic/GlyphColor/blue") +/** @ingroup PreferenceKeys for Glyph Guides (Snapomatic Plug-in) + The default value for \c #kAIPrefKeyGlyphGuideColorBlue. */ +#define kAIPrefDefaultGlyphGuideColorBlue ((75)/255.0f) + + +/** @ingroup PreferenceKeys + Determines whether to show smart Guide labels */ +#define kAISnappingPrefShowLabels ((const char*)"smartGuides/showLabels") +/** @ingroup PreferenceKeys + Determines whether to show Construction guides */ +#define kAISnappingPrefShowConstructionGuides ((const char*)"smartGuides/showConstructionGuides") +/** @ingroup PreferenceKeys + Determines whether Object Highlighting is turned on*/ +#define kAISnappingPrefObjectHighlighting ((const char*)"smartGuides/showObjectHighlighting") +/** @ingroup PrefereceKeys + The default value for \c #kAISnappingPrefObjectHighlighting.*/ +constexpr bool kAIPrefDefaultShowObjectHighlighting = true; +/** @ingroup PreferenceKeys + Determines whether to show Readouts */ +#define kAISnappingPrefShowReadouts ((const char*)"smartGuides/showReadouts") +/** @ingroup PreferenceKeys + Determines whether to show alignment Guides */ +#define kAISnappingPrefShowAlignmentGuides ((const char*)"smartGuides/showAlignmentGuides") +/** @ingroup PreferenceKeys + Default value for \c #kAISnappingPrefShowAlignmentGuides. */ +#define kAIPrefDefaultShowALignmentGuides true +/** @ingroup PreferenceKeys + Determines whether to show equalSpacing Guides */ +#define kAISnappingPrefSpacingGuides ((const char*)"smartGuides/showSpacingGuides") +/** @ingroup PreferenceKeys + Determines whether to snap to active artboard content only */ +#define kAIPrefSnapToActiveArtboardContent ((const char*)"smartGuides/snapToActiveArtboardContent") +/** @ingroup PreferenceKeys + Default value for \c #kAIPrefSnapToActiveArtboardContent. */ +#define kAIPrefDefaultSnapToActiveArtboardContent false +/** @ingroup PreferenceKeys + Determines whether to show Rotational guides */ +#define kAISnappingPrefShowRotationalGuides ((const char*)"smartGuides/showRotationalGuides") +/** @ingroup PreferenceKeys + Sets the Smart Guides Tolerance*/ +#define kAISnappingPrefSmartGuidesTolerance ((const char*)"smartGuides/tolerance") +/** @ingroup PreferenceKeys + The default value for \c #kAISnappingPrefSmartGuidesTolerance. */ +const ai::int32 kAISnappingPrefSmartGuidesToleranceDefault = 4; +/** @ingroup PreferenceKeys + Sets the Rotational Snapping Arc Tolerance */ +#define kAISnappingPrefRotationalSnapArcTolerance ((const char*)"smartGuides/rotationalSnapArcTolerance") +/** @ingroup PreferenceKeys + Determines whether smart Guides is enabled */ +#define kAISnappingPrefShowSmartGuides ((const char*)"smartGuides/isEnabled") +#define kAISnappingPrefShowSmartGuidesDefault true + /** @ingroup PreferenceKeys + Determines whether snap to point is enabled */ +#define kAISnappingPrefSnapToPoint ((const char*)"snapToPoint") + /** @ingroup PreferenceKeys + Default value for \c #kAISnappingPrefSnapToPoint. */ +#define kAIPrefDefaultSnapToPoint true + /** @ingroup PreferenceKeys + Snap to point Tolerance */ +#define kAISnapToPointTolerance ((const char*)"snappingTolerance") + +/** @ingroup PreferenceKeys + Enable Snap to Glyph*/ +#define kAIPrefSnapToGlyph ((const char*)"snapToGlyph") +#define kAIPrefSnapToGlyphDefault true + +/** @ingroup PreferenceKeys + Show Snap to Glyph Expanded State*/ +#define kAIPrefShowSnapToGlyphOpt ((const char*)"showSnapToGlyphOpt") + +/** @ingroup PreferenceKeys + Enable Text Anchor Point Snapping*/ +#define kAIPrefTextAnchorPointSnapping ((const char*)"textAnchorPointSnapping") +#define kAIPrefTextAnchorPointSnappingDefault true + +/** @ingroup PreferenceKeys + Enable Text Line ( Important Line ) Snapping*/ +#define kAIPrefTextLineSnapping ((const char*)"textLineSnapping") +#define kAIPrefTextLineSnappingDefault true + +/** @ingroup PreferenceKeys +Enable Text Snapping with baseline which is a primary line, +baseline and closed bounds of lines*/ +#define kAIPrefTextBaselineSnapping ((const char*)"textBaselineLineSnapping") +#define kAIPrefTextBaselineSnappingDefault true + +/** @ingroup PreferenceKeys +Enable Text Snapping with xheight which is also a primary line, +baseline and closed bounds of lines*/ +#define kAIPrefTextXHeightSnapping ((const char*)"textXHeightSnapping") +#define kAIPrefTextXHeightSnappingDefault true + +/** @ingroup PreferenceKeys +Enable Text Snapping with line tight bounds which is also a primary line, +baseline and closed bounds of lines*/ +#define kAIPrefTextLineBoundSnapping ((const char*)"textLineBoundsSnapping") +#define kAIPrefTextLineBoundSnappingDefault true + +/** @ingroup PreferenceKeys +Enable Text Snapping with Japanese glyph Centre bounds */ +#define kAIPrefJTextCenterSnapping ((const char*)"japTextCentreSnapping") +#define kAIPrefJTextCenterSnappingDefault true + +/** @ingroup PreferenceKeys +Enable Text Snapping with Japanese TextEmBox Line */ +#define kAIPrefJTextEMBoxSnapping ((const char*)"japTextEMBoxLineSnapping") +#define kAIPrefJTextEMBoxSnappingDefault true + +/** @ingroup PreferenceKeys +Enable Text Snapping only with first line in multiple lines text object., +baseline and closed bounds of lines*/ +#define kAIPrefTextFirstLineSnapping ((const char*)"textFirstLineSnapping") +#define kAIPrefTextFirstLineSnappingDefault false + +/** @ingroup PreferenceKeys +Enable Text Snapping with all possible lines, +baseline and closed bounds of lines*/ +#define kAIPrefTextAllVisualLinesSnapping ((const char*)"textAllVisualLinesSnapping") +#define kAIPrefTextAllVisualLinesSnappingDefault false + +/** @ingroup PreferenceKeys +Enable Text Snapping with important lines, currently important lines include visual lines near +baseline, x-height etc., +baseline and closed bounds of lines*/ +#define kAIPrefTextImportantVisualLinesSnapping ((const char*)"textImportantVisualLinesSnapping") +#define kAIPrefTextImportantVisualLinesSnappingDefault false + +/** @ingroup PreferenceKeys + Enable Angular Guides*/ +#define kAIPrefShowAngularGuides ((const char*)"angularGuides") +#define kAIPrefShowAngularGuidesDefault true + +/** @ingroup PreferenceKeys + Show font Height Options*/ +#define kAIPrefShowFontHeightOption ((const char*)"fontHeightOption") +#define kAIPrefShowFontHeightOptionDefault false + +/** @ingroup PreferenceKeys + Snap To Pixel Explicit User Action*/ +#define kAIPrefSnapToPixelAction ((const char*)"snapToPixelOnUserAction") +#define kAIPrefSnapToPixelActionDefault false + +/** @ingroup PreferenceKeys + Whether to show the slice numbers or not. + The default value is given by \c #kAIPrefDefaultShowSliceNumbers. */ +#define kAIPrefKeyShowSliceNumbers ((const char*)"plugin/AdobeSlicingPlugin/showSliceNumbers") +/** @ingroup PreferenceKeys + Default value for \c #kAIPrefKeyShowSliceNumbers. */ +#define kAIPrefDefaultShowSliceNumbers true + +/** @ingroup PreferenceKeys for Slicing feedback + Sets the red component of the Slicing feedback color. + The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorRed. */ +#define kAIPrefKeySlicingFeedbackColorRed ((const char*)"plugin/AdobeSlicingPlugin/feedback/red") +/** @ingroup PreferenceKeys for Slicing feedback + The default value for \c #kAIPrefKeySlicingFeedbackColorRed. */ +#define kAIPrefDefaultSlicingFeedbackColorRed (0xFFFF) + +/** @ingroup PreferenceKeys for Slicing feedback + Sets the green component of the Slicing feedback color. + The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorGreen. */ +#define kAIPrefKeySlicingFeedbackColorGreen ((const char*)"plugin/AdobeSlicingPlugin/feedback/green") +/** @ingroup PreferenceKeys for Slicing feedback + The default value for \c #kAIPrefKeySlicingFeedbackColorGreen. */ +#define kAIPrefDefaultSlicingFeedbackColorGreen (0x4A3D) + +/** @ingroup PreferenceKeys for Slicing feedback + Sets the blue component of the Slicing feedback color. + The default value is given by \c #kAIPrefDefaultSlicingFeedbackColorBlue. */ +#define kAIPrefKeySlicingFeedbackColorBlue ((const char*)"plugin/AdobeSlicingPlugin/feedback/blue") +/** @ingroup PreferenceKeys for Slicing feedback + The default value for \c #kAIPrefKeySlicingFeedbackColorBlue. */ +#define kAIPrefDefaultSlicingFeedbackColorBlue (0x4A3D) + +/** @ingroup PreferenceKeys + Sets the greeking threshold for text drawing. Text rendered at a point size less than + or equal to the greeking threshold is rendered greeked. + The default value is given by \c #kAIPrefDefaultTextGreekingThreshold. */ +#define kAIPrefKeyTextGreekingThreshold ((const char*)"text/greekingThreshold") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyTextGreekingThreshold. */ +#define kAIPrefDefaultTextGreekingThreshold (6.0f) + +/** @ingroup PreferenceKeys +Check if the Font Menu needs to Show English Name. +The default value is given by \c #kAIPrefDefaultTextFontEnglishName. */ +#define kAIPrefKeyTextFontEnglishName ((const char*)"text/useEnglishFontNames") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefKeyTextGreekingThreshold. */ +const bool kAIPrefDefaultTextFontEnglishName = false; + +/** @ingroup PreferenceKeys +Check the size of the font preview image size in font menu +The default value is given by \c #kAIPrefDefaultTextFontFaceSize. */ +#define kAIPrefKeyTextFontFaceSize ((const char*)"text/fontMenu/faceSizeMultiplier") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefKeyTextGreekingThreshold. */ +const ai::int32 kAIPrefDefaultTextFontFaceSize = 1; + +/** @ingroup PreferenceKeys +Check the size of the font preview image size in font menu +The default value is given by \c #kAIPrefDefaultTextFontFaceSize. */ +#define kAIPrefKeyTextSampleTextOpt ((const char*)"text/fontflyout/SampleTextOpt") + +/** @ingroup PreferenceKeys +Check if the Font Menu needs to Show Preview +The default value is given by \c #kAIPrefDefaultTextFontShowInFace. */ +#define kAIPrefKeyTextFontShowInFace ((const char*)"text/fontMenu/showInFace") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefKeyTextGreekingThreshold. */ +const bool kAIPrefDefaultTextFontShowInFace = true; + +/** @ingroup PreferenceKeys +Check if the Font Menu needs to Typekit Japanese Fonts in Find More Section +The default value is given by \c #kAIPrefDefaultJapaneseFontPreview. */ +#define kAIPrefKeyTextJapaneseFontPreview ((const char*)"text/fontMenu/japaneseFontPreview") +/** @ingroup PreferenceKeys*/ +const bool kAIPrefDefaultJapaneseFontPreview = false; + +/** @ingroup PreferenceKeys +Check if the Font Menu needs to be ordered in terms of language scripts +The default value is given by \c #kAIPrefDefaultTextFontShowInFace. */ +#define kAIPrefKeyTextFontGroupByLang ((const char*)"text/groupTypeMenuByLanguage") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefKeyTextGreekingThreshold. */ +const bool kAIPrefDefaultTextFontGroupByLang = true; + +/** @ingroup PreferenceKeys +Check if the Font Menu needs to Show Preview +The default value is given by \c #kAIPrefDefaultTextFontShowInFace. */ +#define kAIPrefKeyTextFontSubMenuInFace ((const char*)"text/fontMenu/showSubMenusInFace") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefKeyTextGreekingThreshold. */ +const bool kAIPrefDefaultTextFontSubMenuInFace = false; +/** @ingroup PreferenceKeys +Check if the Font Menu needs to Show Onboarding +The default value is given by \c #kAIPrefDefaultFontNeedsExploreModeOnbaording. */ +#define kAIPrefKeyFontNeedsExploreModeOnboarding ((const char*)"text/fontMenu/needsExploreModeOnboarding") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefDefaultFontNeedsExploreModeOnbaording. */ +const bool kAIPrefDefaultFontNeedsExploreModeOnboarding = true; + + +/** @ingroup PreferenceKeys +Check if the Font Menu needs to Show Onboarding +The default value is given by \c #kAIPrefDefaultFontNeedsExploreModeOnbaording. */ +#define kAIPrefKeyDontShowAutoActivateOnboarding ((const char*)"text/dontshowAutoActivateOnboarding") + +/** @ingroup PreferenceKeys +Check the count for Font Menu Shown Onboarding +The default value is given by \c #kAIPrefDefaultFontExplrModeOnbrdngShownCount. */ +#define kAIPrefKeyAutoActivateOnbrdngCount ((const char*)"text/activateOnbrdngShownCount") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefDefaultFontExplrModeOnbrdngShownCount. */ +const ai::int32 kAIPrefDefaultAutoActivateOnbrdngCount = 0; + +/** @ingroup PreferenceKeys + Check if the Font Menu needs to Show Explore Tab + The default value is given by \c #kAIPrefDefaultFontNeedsExploreModeOnbaording. */ +#define kAIPrefKeyShowFontExploreTab ((const char*)"showFindMoreTabV2") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefDefaultFontNeedsExploreModeOnbaording. */ +const bool kAIPrefDefaultShowFontExploreTab = true; + +/** @ingroup PreferenceKeys +Check the count for Font Menu Shown Onboarding +The default value is given by \c #kAIPrefDefaultFontExplrModeOnbrdngShownCount. */ +#define kAIPrefKeyFontExplrModeOnbrdngShownCount ((const char*)"text/fontMenu/exploreModeOnbrdngShownCount") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefDefaultFontExplrModeOnbrdngShownCount. */ +const ai::int32 kAIPrefDefaultFontExplrModeOnbrdngShownCount = 0; + +/** @ingroup PreferenceKeys + Sets the legacy gradient-mesh object conversion options when opening a legacy + document (from an Illustrator version before CS 3). */ +#define kAIPrefKeyLegacyGradientMeshConversionOptions ((const char*) "open/legacyGradientMeshConversion") +/** @ingroup PreferenceKeys + Key values for \c #kAIPrefKeyLegacyGradientMeshConversionOptions. */ +enum LegacyGradientMeshConversionOptions {MESH_UNKNOWN, MESH_PRESERVE_SPOT, MESH_PRESERVE_APPEARANCE}; + +/** @ingroup PreferenceKeys + Sets the tolerance preference for selection. Integer, a number of pixels. */ +#define kAIPrefKeySelectionTolerance ((const char*) "selectionTolerance") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeySelectionTolerance. */ +#define kAIPrefDefaultSelectionTolerance (3) + +/** @ingroup PreferenceKeys + Sets the tolerance preference for selection in touch workspace. Integer, a number of pixels. */ +#define kAIPrefKeyTWSSelectionTolerance ((const char*) "tws/SelectionTolerance") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyTWSSelectionTolerance. */ +#define kAIPrefDefaultTWSSelectionTolerance (10) + +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefDefaultCornerAngleLimit. */ +#define kAIPrefDefaultCornerAngleLimit (177.0) + +/** @ingroup PreferenceKeys +Determines whether strokes and effects will be scaled or not. */ +#define kAIPrefKeyScaleStrokesAndEffects ((const char*)"scaleLineWeight") +/** @ingroup PreferenceKeys + Determines whether or not anchor points will be highlighted on mouseover. */ +#define kAIPrefKeyHighlightAnchorOnMouseover ((const char*)"highlightAnchorOnMouseOver") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyHighlightAnchorOnMouseover. */ +const bool kAIPrefKeyHighlightAnchorOnMouseoverDefault = true; + +/** @ingroup PreferenceKeys + Whether to show the legacy artboard conversion options when opening a legacy + document (from an Illustrator version before CS 4). */ +#define kShowArtboardConversionDialogKey ((const char*) "LegacyArtboardOptions/ShowDialog") +/** @ingroup PreferenceKeys + Sets the legacy artboard conversion options " Legacy Artboard" when opening a legacy + document (from an Illustrator version before CS 4). */ +#define kAIArtboardConversionDialogArtboardKey ((const char*) "LegacyArtboardOptions/artboard") +/** @ingroup PreferenceKeys + Sets the legacy artboard conversion options " Crop Area" when opening a legacy + document (from an Illustrator version before CS 4). */ +#define kAIArtboardConversionDialogCropAreaKey ((const char*) "LegacyArtboardOptions/cropAreas") +/** @ingroup PreferenceKeys + Sets the legacy artboard conversion options " Print tiles" when opening a legacy + document (from an Illustrator version before CS 4). */ +#define kAIArtboardConversionDialogTilesKey ((const char*) "LegacyArtboardOptions/pageTiles") +/** @ingroup PreferenceKeys + Sets the legacy artboard conversion options "Artwork Bounds" when opening a legacy + document (from an Illustrator version before CS 4). */ +#define kAIArtboardConversionDialogArtworkBoundsKey ((const char*) "LegacyArtboardOptions/artworkBounds") + +/** @ingroup PreferenceKeys + Turns the Pixel Grid On/Off + The default value is given by \c #kAIPrefDefaultShowPixelGrid. */ +#define kAIPrefKeyShowPixelGrid ((const char*)"Guide/ShowPixelGrid") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyGuideColorRed. */ +#define kAIPrefDefaultShowPixelGrid TRUE + +/** @ingroup PreferenceKeys + Determines whether or not link info will be shown in links panel */ +#define kAIPrefKeyShowLinkInfo ((const char*)"showLinkInfo") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyShowLinkInfo. */ +const bool kAIPrefKeyShowLinkInfoDefault = false; + +/** @ingroup PreferenceKeys + creative cloud pref - preferences and workspaces. + The default value is given by \c #kAIPrefDefaultCreativeCloudPreferences. */ +#define kAIPrefCreativeCloudPreferences ((const char*)"CreativeCloud/preferences") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudPreferences. */ +#define kAIPrefDefaultCreativeCloudPreferences TRUE + +/** @ingroup PreferenceKeys + creative cloud pref - Swatches + The default value is given by \c #kAIPrefDefaultCreativeCloudSwatches. */ +#define kAIPrefCreativeCloudSwatches ((const char*)"CreativeCloud/Swatches") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudSwatches. */ +#define kAIPrefDefaultCreativeCloudSwatches TRUE + + +/** @ingroup PreferenceKeys + creative cloud pref - Presets + The default value is given by \c #kAIPrefDefaultCreativeCloudPresets. */ +#define kAIPrefCreativeCloudPresets ((const char*)"CreativeCloud/Presets") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudPresets. */ +#define kAIPrefDefaultCreativeCloudPresets TRUE + +/** @ingroup PreferenceKeys + creative cloud pref - Symbols + The default value is given by \c #kAIPrefDefaultCreativeCloudSymbols. */ +#define kAIPrefCreativeCloudSymbols ((const char*)"CreativeCloud/Symbols") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudSymbols. */ +#define kAIPrefDefaultCreativeCloudSymbols TRUE + +/** @ingroup PreferenceKeys + creative cloud pref - Brushes + The default value is given by \c #kAIPrefDefaultCreativeCloudBrushes. */ +#define kAIPrefCreativeCloudBrushes ((const char*)"CreativeCloud/Brushes") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudBrushes. */ +#define kAIPrefDefaultCreativeCloudBrushes TRUE + +/** @ingroup PreferenceKeys + creative cloud pref - Graphic Styles + The default value is given by \c #kAIPrefDefaultCreativeCloudGraphicStyles. */ +#define kAIPrefCreativeCloudGraphicStyles ((const char*)"CreativeCloud/GraphicStyles") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudGraphicStyles. */ +#define kAIPrefDefaultCreativeCloudGraphicStyles TRUE + +/** @ingroup PreferenceKeys + creative cloud pref - Workspaces + The default value is given by \c #kAIPrefDefaultCreativeCloudWorkspaces. */ +#define kAIPrefCreativeCloudWorkspaces ((const char*)"CreativeCloud/Workspaces") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudWorkspaces. */ +#define kAIPrefDefaultCreativeCloudWorkspaces TRUE + +/** @ingroup PreferenceKeys + creative cloud pref - Keyboard shortcuts + The default value is given by \c #kAIPrefDefaultCreativeCloudKBS. */ +#define kAIPrefCreativeCloudKBS ((const char*)"CreativeCloud/KBS") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudKeyboard shortcuts. */ +#define kAIPrefDefaultCreativeCloudKBS TRUE + + +/** @ingroup PreferenceKeys + creative cloud pref - Asian Settings + The default value is given by \c #kAIPrefDefaultCreativeCloudAsianSettings. */ +#define kAIPrefCreativeCloudAsianSettings ((const char*)"CreativeCloud/AsianSettings") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudAsianSettings. */ +#define kAIPrefDefaultCreativeCloudAsianSettings TRUE + +/** @ingroup PreferenceKeys + creative cloud pref - Conflict Handling Action + The default value is given by \c #kAIPrefDefaultCreativeCloudConflictHandling. */ +#define kAIPrefCreativeCloudConflictHandling ((const char*)"CreativeCloud/ConflictHandling") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudConflictHandling. */ +#define kAIPrefDefaultCreativeCloudConflictHandling AIPreferenceUtil::kAskMe + +/** @ingroup PreferenceKeys + creative cloud pref - Sync Popup state + The default value is given by \c #kAIPrefDefaultCreativeCloudSyncPopup. */ +#define kAIPrefCreativeCloudSyncPopup ((const char*)"CreativeCloud/SyncPopup") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefCreativeCloudSyncPopup. */ +#define kAIPrefDefaultCreativeCloudSyncPopup AIPreferenceUtil::kAllSettings + +/** @ingroup PreferenceKeys + Live Shape pref - Constrain dimensions + The default value is given by \c #kAIPrefDefaultLiveShapesConstrainDimensions. */ +#define kAIPrefLiveShapesConstrainDimensions ((const char*)"LiveShapes/constrainDimensions") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefLiveShapesConstrainDimensions. */ +#define kAIPrefDefaultLiveShapesConstrainDimensions TRUE + +/** @ingroup PreferenceKeys + Live Shape pref - Constrain radii + The default value is given by \c #kAIPrefDefaultLiveShapesConstrainRadii. */ +#define kAIPrefLiveShapesConstrainRadii ((const char*)"LiveShapes/constrainRadii") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefLiveShapeConstrainRadii. */ +#define kAIPrefDefaultLiveShapesConstrainRadii TRUE + +/** @ingroup PreferenceKeys + Live Shape pref - Constrain angles in pie + The default value is given by \c #kAIPrefDefaultLiveShapesConstrainPieAngles. */ +#define kAIPrefLiveShapesConstrainPieAngles ((const char*)"LiveShapes/constrainPieAngles") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefLiveShapesConstrainPieAngles. */ +#define kAIPrefDefaultLiveShapesConstrainPieAngles FALSE + +/** @ingroup PreferenceKeys + Live Shape pref - Auto show shape properties UI on shape creation + The default value is given by \c #kAIPrefDefaultLiveShapesAutoShowPropertiesUI. */ +#define kAIPrefLiveShapesAutoShowPropertiesUI ((const char*)"LiveShapes/autoShowPropertiesUIOnCreatingShape") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefLiveShapeAutoShowPropertiesUI. */ +#define kAIPrefDefaultLiveShapesAutoShowPropertiesUI FALSE + +/** @ingroup PreferenceKeys + Live Shape pref - Hide shape widgets for shape tool + The default value is given by \c #kAIPrefDefaultLiveShapesHideWidgetsForShapeTool. */ +#define kAIPrefLiveShapesHideWidgetsForShapeTools ((const char*)"LiveShapes/hideWidgetsForShapeTools") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefLiveShapesHideWidgetsForShapeTool. */ +#define kAIPrefDefaultLiveShapesHideWidgetsForShapeTools FALSE + +/** @ingroup PreferenceKeys + Policy for preserving corners: governs the way corners are modified while transformations, e.g. scaling radii, maintaining corner radii value + The default value is given by \c #kAIPrefDefaultPreserveCornersPolicy. */ +#define kAIPrefPreserveCornersPolicy ((const char*)"policyForPreservingCorners") +/** @ingroup PreferenceKeys + Key values for \c #kAIPrefPreserveCornersPolicy. */ +enum CornerPreservePolicy { kAIPrefScaleCornersRadii = 1, kAIPrefMaintainCornersRadii }; +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefPreserveCornersPolicy. */ +const CornerPreservePolicy kAIPrefDefaultPreserveCornersPolicy = kAIPrefMaintainCornersRadii; + +/** @ingroup PreferenceKeys + Performance pref - GPU Support detected*/ +#define kAIPrefPerformanceGPUSupported ((const char*)"Performance/GPUSupported") +/** @ingroup PreferenceKeys + Performance pref - Enable GPU rendering*/ +#define kAIPrefPerformanceEnableGPU ((const char*)"Performance/EnableGPU_Ver19_2") + +/** @ingroup PreferenceKeys + Performance pref - Enable Animated Zoom*/ +#define kAIPrefPerformanceAnimZoom ((const char*)"Performance/AnimZoom") + +/** @ingroup PreferenceKeys + Performance pref - Auto Switch Engine*/ +#define kAIPrefPerformanceAutoSwitchEngine ((const char*)"Performance/AutoSwitchEngine") + +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefPerformanceEnableThinFilledPaths. */ +#define kAIPrefDefaultPerformanceEnableThinFilledPaths false + +/** @ingroup PreferenceKeys + Auto Spell Check Pref - Enable Dynamic Spelling*/ +#define kAIPrefDynamicSpelling ((const char*)"dynamicspelling") +#define kAIPrefDynamicSpellingDefault false + +/** @ingroup PreferenceKeys + Auto Spell Check Pref - Ignnore Repeaed Words*/ +#define kAISpellIgnoreRepeatedWordPref ((const char*)"IgnoreRepeatedWord") +#define kAISpellIgnoreRepeatedWordPrefDefault false + +/** @ingroup PreferenceKeys + Auto Spell Check Pref - Ignore word with unncapitalized start of sentece*/ +#define kAISpellIgnoreUncapSentenceStartPref ((const char*)"IgnoreUncapSentenceStart") +#define kAISpellIgnoreUncapSentenceStartPrefDefault false + +/** @ingroup PreferenceKeys + Auto Spell Check Pref - Ignore word with all uppercase*/ +#define kAISpellIgnoreWordAllCapPref ((const char*)"IgnoreWordAllCap") +#define kAISpellIgnoreWordAllCapPrefDefault false + +/** @ingroup PreferenceKeys + Auto Spell Check Pref - Ignore word with roman numerals*/ +#define kAISpellIgnoreRomanNumeralPref ((const char*)"IgnoreRomanNumeral") +#define kAISpellIgnoreRomanNumeralPrefDefault false + +/** @ingroup PreferenceKeys + Auto Spell Check Pref - Ignore Word with numbers*/ +#define kAISpellIgnoreWordWithNumberPref ((const char*)"IgnoreWordWithNumber") +#define kAISpellIgnoreWordWithNumberPrefDefault false + + + +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefPerformanceDisplaySetting. */ +#define kAIPrefDefaultPerformanceDisplaySetting (0) + +/** @ingroup PreferenceKeys + Crash Recovery pref - Automatically Save CheckBox Value*/ +#define kAIPrefCrashRecoveryAutomaticallySave ((const char*)"CrashRecovery/AutomaticallySave") + +/** @ingroup PreferenceKeys + Crash Recovery pref - Minimum enforced time between two consecutive incremental save operations*/ +#define kAIPrefCrashRecoveryIdleLoopTimeInterval ((const char*)"CrashRecovery/IdleLoopTimeInterval") + +/** @ingroup PreferenceKeys + Crash Recovery pref - Folder location where incremental files are saved*/ +#define kAIPrefCrashRecoveryFolderLocation ((const char*)"CrashRecovery/RecoveryFolderLocation") + +/** @ingroup PreferenceKeys + Crash Recovery pref - Turn off for Complex file Checkbox value*/ +#define kAIPrefCrashRecoveryTurnOffForComplexDocument ((const char*)"CrashRecovery/TurnOffForComplexDocument") + +/** @ingroup PreferenceKeys + Scale Illustrator UI */ +#define kAIPrefScaleUI ((const char*)"UIPreferences/scaleUI") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefScaleUI. */ +#define kAIPrefDefaultScaleUI true + +/** @ingroup PreferenceKeys + Scale Cursors */ +#define kAIPrefScaleCursor ((const char*)"UIPreferences/scaleCursor") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefScaleCursor. */ +#define kAIPrefDefaultScaleCursor true + +/** @ingroup PreferenceKeys + App Scale Factor */ +#define kAIPrefAppScaleFactor ((const char*)"UIPreferences/appScaleFactor") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefAppScaleFactor. */ +#define kAIPrefDefaultAppScaleFactor (1.0f) + +#define kAIPrefIsDefaultScaleShown ((const char*)"UIPreferences/defaultScaleFactorLaunch") +/** @ingroup PreferenceKeys + Large Tab size preference */ +#define kAIPrefWorkspaceTabsSize ((const char*)"UIPreferences/workspaceTabsSize") +/** @ingroup PreferenceKeys + Key values for \c #kAIPrefWorkspaceTabsSize. */ +enum WorkspaceTabSize { kAIPrefTabSize_Small = 1, kAIPrefTabSize_Large }; +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefWorkspaceTabsSize. */ +const WorkspaceTabSize kAIPrefDefaultTabSize = kAIPrefTabSize_Large; + +/** @ingroup PreferenceKeys + Scale Illustrator UI to higher supported or lower supported scale factor. Value 0 means snap to lower supported scale factor while 1 means snap to higher one. */ +#define kAIPrefSnapUIScaleFactor ((const char*)"UIPreferences/snapUIScaleFactor") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefSnapUIScaleFactor. */ +#define kAIPrefDefaultSnapUIScaleFactor 1 + +/** @ingroup PreferenceKeys + Touch Pref - Switch to Touch Workspace on Detaching Keyboard + The default value is given by \c #kAIPrefDefaultTWSKeyboardDetach. */ +#define kAIPrefTWSKeyboardDetach ((const char*)"TouchPreferenceUI/TWSKeyboardDetach") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefTWSKeyboardDetach. */ +#define kAIPrefDefaultTWSKeyboardDetach true +/** @ingroup PreferenceKeys + Touch Pref - Use Precise Cursors + The default value is given by \c #kAIPrefDefaultPreciseCursors. */ +#define kAIPrefPreciseCursors ((const char*)"TouchPreferenceUI/PreciseCursor") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefPreciseCursors. */ +#define kAIPrefDefaultPreciseCursors true +/** @ingroup PreferenceKeys +Determines whether or not to enable constrain scaling in Shaper in TWS. */ +#define kAIPrefShaperConstrainScale ((const char*)"shaper/constrainScaling") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefShaperConstrainScale. */ +#define kAIPrefShaperConstrainScaleDefault false +/** @ingroup PreferenceKeys + Touch Pref - Soft Message Default Duration + The default value is given by \c #kAIPrefDefault/SoftMessageDuration. */ +#define kAIPrefSoftMessageDuration ((const char*)"TouchPreferenceUI/SoftMessageDuration") + /** @ingroup PreferenceKeys + The default value for \c #kAIPrefSoftMessageDuration. */ +#define kAIPrefDefaultSoftMessageDuration (4.0f) + +/** @ingroup PreferenceKeys +ExpFeatures Pref - Enable Creative Cloud Charts +The default value is given by \c #kAIPrefDefaultEnableCCCharts. */ +#define kAIPrefEnableCCCharts ((const char*)"ExpFeaturesPreferenceUI/EnableCCCharts") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefEnableCCCharts. */ +#define kAIPrefDefaultEnableCCCharts false + +/** @ingroup PreferenceKeys + Making New Rectangular Area Text Auto Sizable by default */ +#define kAIPrefTextBoxAutoSizing ((const char*)"text/autoSizing") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefTextBoxAutoSizing. */ +#define kAIPrefTextBoxAutoSizingDefaultValue false + + +/** @ingroup PreferenceKeys + Making Alternate Glyph Widget on screen visible */ +#define kAIPrefTextEnableAltGlyph ((const char*)"text/enableAlternateGlyph") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefTextEnableAlternateGlyph. */ +#define kAIPrefTextEnableAltGlyphDefaultValue true + +/** @ingroup PreferenceKeys + Enable Precise Bounding Box for Point Text */ +#define kAIPrefTextEnablePreciseBBox ((const char*)"text/enablePreciseBBox") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefTextEnablePreciseBBox. */ +#define kAIPrefTextEnablePreciseBBoxDefaultValue false + +/** @ingroup PreferenceKeys +Fill the newly created text object with the place holder text */ +#define kAIPrefFillWithDefaultText ((const char*)"text/fillWithDefaultText") +#define kAIPrefFillWithDefaultTextJP ((const char*)"text/fillWithDefaultTextJP") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefFillWithDefaultText. */ +#define kAIPrefFillWithDefaultTextDefaultValue true +#define kAIPrefFillWithDefaultTextJPDefaultValue false + +/** @ingroup PreferenceKeys +Determines whether or not to show What's New Dialog */ +#define kAIPrefAutoActivateMissingFont ((const char*)"AutoActivateMissingFont") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefShowMissingFontDlg. */ +const bool kAIPrefAutoActivateMissingFontDefault = false; + +/* Determines whether or not to show What's New Dialog */ +#define kAIPrefDontShowMissingFontDlg ((const char*)"DontShowMissingFontDialogPreference") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefShowMissingFontDlg. */ +const bool kAIPrefDontShowMissingFontDlgDefault = false; + +/** @ingroup PreferenceKeys +Determines whether or not UIDs are automatically assigned to art objects, in the document being created */ +#define kAIPrefAutoAssignUIDsForDocCreated ((const char*)"AutoAssignUIDsForDocCreatedPreference") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefAutoAssignUIDsForDocCreated. */ +const bool kAIPrefAutoAssignUIDsForDocCreatedDefault = false; + +/** @ingroup PreferenceKeys +Determines whether or not UIDs are automatically assigned to art objects, in the document being opened */ +#define kAIPrefAutoAssignUIDsForDocOpened ((const char*)"AutoAssignUIDsForDocOpenedPreference") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefAutoAssignUIDsForDocOpened. */ +const bool kAIPrefAutoAssignUIDsForDocOpenedDefault = false; + +/** @ingroup PreferenceKeys +Determines whether or not to hide corner widgets based on Angle */ +#define kAIPrefHideCornerWidgetBasedOnAngle ((const char*)"liveCorners/hideCornerWidgetBasedOnAngle") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefHideCornerWidgetBasedOnAngle. */ +const bool kAIPrefHideCornerWidgetBasedOnAngleDefault = true; + +#define kAIPrefMoveLockedAndHiddenArt ((const char*)"moveLockedAndHiddenArt") + +/** @ingroup PreferenceKeys +Sets the Corner Angle Limit for Hiding Corner Widgets */ +#define kAIPrefCornerAngleLimit ((const char*)"liveCorners/cornerAngleLimit") + +/** @ingroup PreferenceKeys +Determines whether or not to show bounding box */ +#define kAIPrefShowBoundingBox ((const char*)"showBoundingBox") + +#define kShowNewDocDialogKey ((const char*)"Hello/NewDoc") +/** @ingroup PreferenceKeys +The default value for \c #kShowCmdNDialogKey. */ +const bool kAIPrefShowNewDocDialogDefault = false; + +#define kShowHomeScreenWSKey ((const char*)"Hello/ShowHomeScreenWS") +/** @ingroup PreferenceKeys +The default value for \c #kShowHomeScreenWSKey. */ +const bool kAIPrefShowHomeScreenWSDefault = true; + +/** Preference prefix: Number of Default Recent File */ +#define kAIRecentFileNumberPrefix nullptr +/** Preference suffix: Number of Default Recent File */ +#define kAIRecentFileNumberSuffix ((const char *)"RecentFileNumber") +/** Preference default:Number of Default Recent File */ +const unsigned int kAIRecentFileNumberDefault = 20; + +/** @ingroup PreferenceKeys +Live Shape pref - Determines whether shapes created by Shape Tools(Rectangle, Polygon, Ellipse, Line) are live. +The default value is given by \c #kAIPrefDefaultCreateLiveShapes. */ +#define kAIPrefCreateLiveShapes ((const char*)"LiveShapes/createLiveShapes") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefCreateLiveShapes. */ +#define kAIPrefDefaultCreateLiveShapes TRUE + +/** @ingroup PreferenceKeys +Linked files pref - Determines if the UNC(Universal Naming Convention) path needs to be used or the default +path of file needs to be used. Only makes sense for Windows. \c #kAIPrefUseUNCPath. */ +#define kAIPrefWindowsUseUNCPath ((const char*)"FilePath/WindowsUseUNCPath") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefUseUNCPath. */ +#define kAIPrefDefaultWindowsUseUNCPath FALSE + +/** Preference default:Number of Default Recent Presets */ +const unsigned int kRecentPresetsNumberDefault = 20; + +/** @ingroup PreferenceKeys +Search pref for searchbox on application bar */ +#define kApplicationBarSearchOption ((const char*) "layout/0/ApplicationBarOption") + +/** Preference prefix: Number of Default Recent Fonts */ +#define kAIRecentFontNumberPrefix nullptr +/** Preference suffix: Number of Default Recent Fonts */ +#define kAIRecentFontNumberSuffix ((const char *)"text/recentFontMenu/showNEntries") +/** Preference default:Number of Default Recent File */ +const unsigned int kAIRecentFontNumberDefault = 10; + +/** @ingroup PreferenceKeys +Preference prefix: Number of Default Recent Fonts */ +#define kAIPrefKeyMissingGlyphPrefix nullptr +/** Prefix to Check the Missing Glyph Protection preference . +The default value is given by \c #kAIPrefDefaultTextFontLock. */ +#define kAIPrefKeyTextMissingGlyphSuffix ((const char*)"text/doFontLocking") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefKeyTextGreekingThreshold. */ +const bool kAIPrefDefaultTextMissingGlyph = true; + +/** @ingroup PreferenceKeys + Check if the Sync Warning is required to be shown to the user. + The default value is given by \c #kAIPrefDefaultWarningShowInCharPanel. */ +#define kAISyncFontWarningPref ((const char*)"text/Warning/ShowInCharPanel") +/** @ingroup PreferenceKeys + The default value for \c #kAIPrefKeyTextGreekingThreshold. */ +const bool kAISyncFontWarningPrefDefault = false; + + +/** @ingroup PreferenceKeys +To check whether link object can have a resource path on network or not. +The default value is given by \c #kAIPrefDefaultDisabledNetworkLinkedObject. */ +#define kAIPrefDisabledNetworkLinkedObject ((const char*)"PlacedObject/DisabledNetworkLinkedObject") +/** @ingroup PreferenceKeys +The default value for \c #kAIPrefDisabledNetworkLinkedObject. */ +const bool kAIPrefDefaultDisabledNetworkLinkedObject = false; + +/** @ingroup PreferenceKeys +Whether to ignore the error or not, when "bad EPS error" is encountered while updated a link object. +The default value is given by \c #kAIIgnoreBadEPSErrorInUpdatingLinkedObjectPrefDefault. */ +#define kAIIgnoreBadEPSErrorInUpdatingLinkedObjectPref ((const char*)"PlacedObject/IgnoreBadEPSErrorInUpdatingLinkedObject") +/** @ingroup PreferenceKeys +The default value for \c #kAIIgnoreBadEPSErrorInUpdatingLinkedObjectPref. */ +const bool kAIIgnoreBadEPSErrorInUpdatingLinkedObjectPrefDefault = false; + +/** Preference suffix: Default Parent Folder path for File Export/Save */ +#define kDefaultExportSaveParentPath ((const char*) "defaultPath") + + +/** @ingroup PreferenceKeys +Shows the actual document view. +The default value is given by \c #kAIPrefDefaultEnableActualView. */ +#define kAIEnableActualView ((const char*) "EnableActualViewPreview") +/** @ingroup PreferenceKeys +The default value for \c #kAIEnableActualView.*/ +const bool kAIPrefDefaultEnableActualView = true; + +/** @ingroup PreferenceKeys +Shows the actual document view. +The default value is given by \c #kAIPrefDefaultEnableActualView. */ +#define kAIEnableActualTextSpaceAlign ((const char*) "EnableActualTextSpaceAlign") +/** @ingroup PreferenceKeys +The default value for \c #kAIEnableActualTextSpaceAlign.*/ +const bool kAIPrefDefaultEnableActualTextSpaceAlign = false; + +/** @ingroup PreferenceKeys +Shows the actual document view. +The default value is given by \c #kAIPrefDefaultEnableActualView. */ +#define kAIEnableActualAreaTextSpaceAlign ((const char*) "EnableActualAreaTextSpaceAlign") +/** @ingroup PreferenceKeys +The default value for \c #kAIEnableActualTextSpaceAlign.*/ +const bool kAIPrefDefaultEnableActualAreaTextSpaceAlign = false; + +/** @ingroup PreferenceKeys + Show the area type options preview on canvas in Area type option Dialog + The default value is given by \c #kAreaTypeDialogPreviewPrefDefault. */ +#define kAreaTypeDialogPreviewPref ((const char*) "AreatypeOptionsPreview") +/** @ingroup PreferenceKeys + The default value for \c #kAreaTypeDialogPreviewPref.*/ +const bool kAreaTypeDialogPreviewPrefDefault = true; + + +/** @ingroup PreferenceKeys +To check whether content aware default is to be enabled or not.*/ + +#if (defined (_WIN64) || defined(MAC_ENV)) +const bool kAIEnableContentAwareDefaultValue= true; +#else +const bool kAIEnableContentAwareDefaultValue = false; +#endif + +#define kAIEnableContentAwareDefaults ((const char*) "EnableContentAwareDefaults") + +/** @ingroup PreferenceKeys + Allows show/hide rulers across all documents. User won't have to select "Show Ruler" for each document. + The default value is given by \c #kAIPrefDefaultUseGlobalRulers.*/ +#define kAIPrefUseGlobalRulers ((const char*) "useGlobalRulers") + +/** @ingroup PreferenceKeys + Current setting for show/hide ruler, kAIPrefUseGlobalRulers will show/hide rulers across all documents based on this preference*/ +#define kAIPrefGlobalRulersVisible ((const char*) "globalRulersVisible") + +/** @ingroup PrefereceKeys + The default value for \c #kAIPrefUseGlobalRulers.*/ +constexpr bool kAIPrefDefaultUseGlobalRulers = false; + +/** @ingroup PreferenceKeys +Enables Lock icon to be shown on clicking locked objects */ +#define kAIPrefShowLockIcon ((const char*) "showLockIcon") + +/** @ingroup PrefereceKeys +The default value for \c #kAIPrefShowLockIcon.*/ +constexpr bool kAIPrefDefaultShowLockIcon = false; + +/** @ingroup PreferenceKeys +Enables whether to highlight locked objects on marquee selection.*/ +#define kAIPrefHighlightLockedObjects ((const char*) "highlightLockedObjects") + +/** @ingroup PrefereceKeys +The default value for \c #kAIPrefDefaultHighlightLockedObjects.*/ +constexpr bool kAIPrefDefaultHighlightLockedObjects = false; + +/** Preference : Illustrator Major Version */ +#define kAIIllustratorMajorVersion ((const char *)"Illustrator version") + +/** Preference : Illustrator Full Version in format like 24.0.0*/ +#define kAIPrefDialogDimVersion ((const char *)"PrefDialogDimensionVersion") + +#define kAIEnableOptimizedNetworkOperationsKey ((const char*) "aiOptimizeNetworkOperations") +constexpr bool kAIEnableOptimizedNetworkOperationsDefaultValue = true; + +/** @ingroup PreferenceKeys + Link transform Pref key */ +#define kAIPrefLinkTransform ((const char*) "linkTransform") +/** @ingroup PrefereceKeys + The default value for \c linkTransform pref key.*/ +constexpr bool kAIPrefDefaultLinkTransform = false; + +/** Preference Prefix: CDP Don't Show Again Onboarding Checkbox.*/ +#define kAIPrefCDPDontShowAgainPrefix nullptr +/** Preference Suffix: Don't Show Again Onboarding Checkbox.*/ +#define kAIPrefCDPDontShowAgainSuffix ((const char*) "dontShowAgainOnboarding") +/** Preference Default: Don't Show Again Onboarding Checkbox Default.*/ +constexpr bool kAIPrefCDPDontShowAgainDefault = false; + +#define kPrefArtboardPrefix "CropAreaPrefix" + +#define kPrefToggleMoveArtwrkWithArtbrd "MoveContentWithArtbrd" + +/** Preference Prefix: Save As Copy is invoked.*/ +#define kAIPrefSavingAsCopyPrefix nullptr +/** Preference Suffix: Save As Copy is invoked.*/ +#define kAIPrefSavingAsCopySuffix ((const char*) "savingAsCopy") +/** Preference Default: Default for Save As Copy preference.*/ +constexpr bool kaiPrefSavingAsCopyDefault = false; + +/** Preference Prefix: Switching from native OS dialog to CDP.*/ +#define kAIPrefSwitchingNativeToCDPDlgPrefix nullptr +/** Preference Suffix: Switching from native OS dialog to CDP.*/ +#define kAIPrefSwitchingNativeToCDPDlgSuffix ((const char*) "SwitchingNativeToCDPDlg") +/** Preference Default: Default for switching from native OS dialog to CDP preference.*/ +constexpr bool kaiPrefSwitchingNativeToCDPDlgDefault = false; + +/** Preference Prefix: Saving before invite to edit.*/ +#define kAIPrefSavingBeforeInviteToEditPrefix nullptr +/** Preference Suffix: Saving before invite to edit.*/ +#define kAIPrefSavingBeforeInviteToEditSuffix ((const char*) "SavingBeforeInviteToEdit") +/** Preference Default: Default for Saving before invite to edit preference.*/ +constexpr bool kAIPrefSavingBeforeInviteToEditDefault = false; + +/** Preference Prefix: Replacing links*/ +#define kAIPrefReplacingLinksPrefix nullptr +/** Preference Suffix: Replacing links*/ +#define kAIPrefReplacingLinksSuffix ((const char*) "ReplacingLinks") + +constexpr bool kAIPrefSavingFromInviteToEditDefault = false; + +/** Preference Prefix: Saving from invite to edit */ +#define kAIPrefSavingFromInviteToEditPrefix nullptr +/** Preference Suffix: Saving from invite to edit*/ +#define kAIPrefSavingFromInviteToEditSuffix ((const char*) "SavingFromInviteToEdit") + +/** Preference Suffix: Enable GPU Rendering for 3D AILib.*/ +#define kAIPrefEnableGPURenderingFor3DAILibSuffix ((const char*) "EnableGPURenderingFor3DAILib") + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRandom.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRandom.h index b9571ce..dba0ada 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRandom.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRandom.h @@ -1,114 +1,114 @@ -#ifndef __AIRandom__ -#define __AIRandom__ - -/* - * Name: AIRandom.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Random Number Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIRandom.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIRandomSuite "AI Random Suite" -#define kAIRandomSuiteVersion5 AIAPI_VERSION(5) -#define kAIRandomSuiteVersion kAIRandomSuiteVersion5 -#define kAIRandomVersion kAIRandomSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Together with the \c #AIRandomBellCurveSuite, this suite allows you - to add a degree of randomness, or "noise" to an effect. This suite provides - an even distribution of random numbers (as opposed to numbers - distributed along a standard probability curve). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIRandomSuite and \c #kAIRandomVersion. -*/ -typedef struct { - - /** Gets a random number in the range [0.0..1.0]. - (Note that this function returns a numeric value, not an error code.) - @return The random number. - */ - AIAPI AIReal (*FloatRnd) ( void ); - - /** Sets the random number seed used to generate subsequent random - numbers. Use to restart a sequence of random numbers, for example for - debugging. See \c #GetRndSeed() for an example.
- (Note that this function does not return an error code.) - @param The new seed number, or 0 to set to an initial - seed based on the current date and time. - - */ - AIAPI void (*SetRndSeed) ( ai::int32 seed ); - - /** Retrieves the current random-number seed. The initial seed - is based on the current date and time.
- (Note that this function returns a numeric value, not an error code.) - @return The random seed. - - To restart a random number sequence, get and save the seed, - generate the random numbers, then reset the seed with \c #SetRndSeed() - and generate the sequence again. For example, these two random loops - generate the same sequence: -@code -AIReal r; -short i; -long seed = sRandom->GetRndSeed(); -for ( i = 0; i < 10; ++i ) { - r = sRandom->FloatRnd(); -} -sRandom->SetRndSeed( seed ); -for ( i = 0; i < 10; ++i ) { - r = sRandom->FloatRnd(); -} -@endcode - */ - AIAPI ai::int32 (*GetRndSeed) ( void ); - -} AIRandomSuite; - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIRandom__ +#define __AIRandom__ + +/* + * Name: AIRandom.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Random Number Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIRandom.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIRandomSuite "AI Random Suite" +#define kAIRandomSuiteVersion5 AIAPI_VERSION(5) +#define kAIRandomSuiteVersion kAIRandomSuiteVersion5 +#define kAIRandomVersion kAIRandomSuiteVersion + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Together with the \c #AIRandomBellCurveSuite, this suite allows you + to add a degree of randomness, or "noise" to an effect. This suite provides + an even distribution of random numbers (as opposed to numbers + distributed along a standard probability curve). + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIRandomSuite and \c #kAIRandomVersion. +*/ +typedef struct { + + /** Gets a random number in the range [0.0..1.0]. + (Note that this function returns a numeric value, not an error code.) + @return The random number. + */ + AIAPI AIReal (*FloatRnd) ( void ); + + /** Sets the random number seed used to generate subsequent random + numbers. Use to restart a sequence of random numbers, for example for + debugging. See \c #GetRndSeed() for an example.
+ (Note that this function does not return an error code.) + @param The new seed number, or 0 to set to an initial + seed based on the current date and time. + + */ + AIAPI void (*SetRndSeed) ( ai::int32 seed ); + + /** Retrieves the current random-number seed. The initial seed + is based on the current date and time.
+ (Note that this function returns a numeric value, not an error code.) + @return The random seed. + + To restart a random number sequence, get and save the seed, + generate the random numbers, then reset the seed with \c #SetRndSeed() + and generate the sequence again. For example, these two random loops + generate the same sequence: +@code +AIReal r; +short i; +long seed = sRandom->GetRndSeed(); +for ( i = 0; i < 10; ++i ) { + r = sRandom->FloatRnd(); +} +sRandom->SetRndSeed( seed ); +for ( i = 0; i < 10; ++i ) { + r = sRandom->FloatRnd(); +} +@endcode + */ + AIAPI ai::int32 (*GetRndSeed) ( void ); + +} AIRandomSuite; + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRandomBellCurve.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRandomBellCurve.h index 1dcf9b5..8aee813 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRandomBellCurve.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRandomBellCurve.h @@ -1,116 +1,116 @@ -#ifndef __AIRandomBellCurve__ -#define __AIRandomBellCurve__ - -/* - * Name: AIRandomBellCurve.h - * $Revision: 4 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Random Number Bell Curve Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIRandomBellCurve.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIRandomBellCurveSuite "AI Random Bell Curve Suite" -#define kAIRandomBellCurveSuiteVersion AIAPI_VERSION(4) -#define kAIRandomBellCurveVersion kAIRandomBellCurveSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Together with the \c #AIRandomSuite, allows you to add a degree of randomness, - or "noise" to an effect. This suite provides numbers distributed along a - standard probability curve (as opposed to an even distribution of random numbers). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIRandomBellCurveSuite and \c #kAIRandomBellCurveVersion. -*/ -typedef struct { - - /** Gets a random number with normal probability distribution centered on - zero and with a standard deviation of one. -
(Note that this function returns a numeric value, not an error code.) - - The value returned is in the range -1 to +1 about - 70% of the time (see table below) and the distribution of values in this - range is close to linear. The probability of a value occurring outside this - range drops off quickly the farther you get from the origin. - - - - - - - - - - - -
Output Range % result in this range
-0.5 to +0.5 about 40%
-1.0 to +1.0 about 70%
-1.5 to +1.5 about 86%
-2.0 to +2.0 about 96%
-3.0 to +3.0 >99%
-5.0 to +5.0 100%
-infinity to 0.0 50%
0.0 to +infinity 50%
- - In theory, this routine could occasionally generate very large positive or - negative values but in fact, no numbers outside the range -5 to +5 are generated. - */ - AIAPI AIFixed (*FixedRndBellCurve) ( void ); - - /** Sets the random number seed used to generate subsequent random - numbers. Use to restart a sequence of random numbers, for example for - debugging. See \c #AIRandomSuite::GetRndSeed() for an example.
- (Note that this function does not return an error code.) - @param The new seed number, or 0 to set to an initial - seed based on the current date and time. - */ - AIAPI void (*SetRndSeedBellCurve) ( ai::int32 seed ); - - /** Retrieves the current random-number seed. The initial seed - is based on the current date and time.
- (Note that this function returns a numeric value, not an error code.) - @return The random seed. - @see \c #AIRandomSuite::GetRndSeed() - */ - AIAPI ai::int32 (*GetRndSeedBellCurve) ( void ); - -} AIRandomBellCurveSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIRandomBellCurve__ +#define __AIRandomBellCurve__ + +/* + * Name: AIRandomBellCurve.h + * $Revision: 4 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Random Number Bell Curve Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIRandomBellCurve.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIRandomBellCurveSuite "AI Random Bell Curve Suite" +#define kAIRandomBellCurveSuiteVersion AIAPI_VERSION(4) +#define kAIRandomBellCurveVersion kAIRandomBellCurveSuiteVersion + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Together with the \c #AIRandomSuite, allows you to add a degree of randomness, + or "noise" to an effect. This suite provides numbers distributed along a + standard probability curve (as opposed to an even distribution of random numbers). + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIRandomBellCurveSuite and \c #kAIRandomBellCurveVersion. +*/ +typedef struct { + + /** Gets a random number with normal probability distribution centered on + zero and with a standard deviation of one. +
(Note that this function returns a numeric value, not an error code.) + + The value returned is in the range -1 to +1 about + 70% of the time (see table below) and the distribution of values in this + range is close to linear. The probability of a value occurring outside this + range drops off quickly the farther you get from the origin. + + + + + + + + + + + +
Output Range % result in this range
-0.5 to +0.5 about 40%
-1.0 to +1.0 about 70%
-1.5 to +1.5 about 86%
-2.0 to +2.0 about 96%
-3.0 to +3.0 >99%
-5.0 to +5.0 100%
-infinity to 0.0 50%
0.0 to +infinity 50%
+ + In theory, this routine could occasionally generate very large positive or + negative values but in fact, no numbers outside the range -5 to +5 are generated. + */ + AIAPI AIFixed (*FixedRndBellCurve) ( void ); + + /** Sets the random number seed used to generate subsequent random + numbers. Use to restart a sequence of random numbers, for example for + debugging. See \c #AIRandomSuite::GetRndSeed() for an example.
+ (Note that this function does not return an error code.) + @param The new seed number, or 0 to set to an initial + seed based on the current date and time. + */ + AIAPI void (*SetRndSeedBellCurve) ( ai::int32 seed ); + + /** Retrieves the current random-number seed. The initial seed + is based on the current date and time.
+ (Note that this function returns a numeric value, not an error code.) + @return The random seed. + @see \c #AIRandomSuite::GetRndSeed() + */ + AIAPI ai::int32 (*GetRndSeedBellCurve) ( void ); + +} AIRandomBellCurveSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRaster.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRaster.h index 87505e9..7fa60a3 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRaster.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRaster.h @@ -1,851 +1,820 @@ -#ifndef __AIRaster__ -#define __AIRaster__ - -/* - * Name: AIRaster.h - * $Revision: 24 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Raster Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#include "IAIFilePath.hpp" -#include "IAIColorSpace.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIRaster.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIRasterSuite "AI Raster Suite" -#define kAIRasterSuiteVersion10 AIAPI_VERSION(10) -#define kAIRasterSuiteVersion kAIRasterSuiteVersion10 -#define kAIRasterVersion kAIRasterSuiteVersion - - -/** Options for raster data, bit flags for \c #AIRasterRecord::flags. */ -enum AIRasterFlags { - /** Used only for 1-bit gray images. When set, the 1-bit data - is to be used as a mask. In this case the path style of the image indicates - the color that the bits of the image with a value of 1 are painted. */ - kRasterMaskImageType = 0x0002, - /** Used only for 1-bit gray images. Reverses the sense of the component - values so that for a gray image 0=white and 1=black and for an image mask - the 0 value pixels are painted. */ - kRasterInvertBits = 0x0004, - /** Used only for 8-bit spot color rasters, or 16-bit if there is an extra - alpha channel. When set, the gray component values are interpreted in - the subtractive color spaces. */ - kRasterGraySubtractive = 0x0008 -}; - -/** Maximum number of channels per image pixel */ -#define kMaxChannels 32 - -/** Maximum number of spot color channels per image pixel */ -#define kMaxSpotChannels 27 - -/** Color models for raster data */ -enum AIRasterColorSpace { - /** Flag indicating that the color model has an alpha channel. The alpha - component appears after the color components. */ - kColorSpaceHasAlpha = 0x10, - - /** Each pixel value for a gray color space has a single component - describing a grayscale value. The gray color space is additive so the minimum - value represents black and the maximum represents white. */ - kGrayColorSpace = 0, - /** Each pixel value for a RGB color space has three components which - represent red, green and blue respectively. The RGB color space is additive. */ - kRGBColorSpace = 1, - /** Each pixel value for a CMYK color space has four components which - represent cyan, magenta, yellow and black respectively. The CMYK color space - is subtractive. */ - kCMYKColorSpace = 2, - /** Not valid as an image type; can occur only in placed linked - files. See \c #AIPlacedSuite::GetRasterInfo(). */ - kLabColorSpace = 3, - /** Each pixel value for a separation color space has a single component - describing a tint value. The separation color space is subtractive so the minimum - value represents white and the maximum represents black. */ - kSeparationColorSpace = 4, - /** Each pixel value for an NChannel color space has of a variable number of - components which represent individual channels in the NChannel color space. - The process components of the color space could be either additive or subtractive. - The spot components of the color space are subtractive. */ - kNChannelColorSpace = 5, - /** Each pixel value for an indexed color space has a single component - describing an index value into a color lookup table. The number of components - in the color lookup table depends on the base color space of the indexed - color space. */ - kIndexedColorSpace = 6, - - /** A gray color space with an alpha channel. */ - kAlphaGrayColorSpace = (kGrayColorSpace | kColorSpaceHasAlpha), - /** An RGB color space with an alpha channel. */ - kAlphaRGBColorSpace = (kRGBColorSpace | kColorSpaceHasAlpha), - /** A CMYK color space with an alpha channel. */ - kAlphaCMYKColorSpace = (kCMYKColorSpace | kColorSpaceHasAlpha), - /** A LAB color space with an alpha channel. */ - kAlphaLabColorSpace = (kLabColorSpace | kColorSpaceHasAlpha), - /** A separation color space with an alpha channel. */ - kAlphaSeparationColorSpace = (kSeparationColorSpace | kColorSpaceHasAlpha), - /** An NChannel color space with an alpha channel. */ - kAlphaNChannelColorSpace = (kNChannelColorSpace | kColorSpaceHasAlpha), - /** An indexed color space with an alpha channel. */ - kAlphaIndexedColorSpace = (kIndexedColorSpace | kColorSpaceHasAlpha), - - kInvalidColorSpace = 0xFF -}; - -/** @ingroup Errors - See \c #AIRasterSuite */ -#define kRasterTypeNotSupportedErr 'RTYP' -/** @ingroup Errors - Raster has already been specified. See \c #AIRasterSuite */ -#define kRasterSpecifiedErr 'RSPE' -/** @ingroup Errors - Raster bits-per-pixel not supported. See \c #AIRasterSuite */ -#define kRasterBitsPerPixelsNotSupportedErr 'RBIT' -/** @ingroup Errors - See \c #AIRasterSuite */ -#define kRasterLinkFileNotFoundErr 'RFNF' -/** @ingroup Errors - See \c #AIRasterSuite */ -#define kRasterLinkPluginNotFoundErr 'RPNF' -/** @ingroup Errors - See \c #AIRasterSuite */ -#define kRasterScratchDiskFullErr 'RFUL' - - -/** Link states for \c #AIRasterLink::linkstate. Direct linking of images is deprecated - (although still supported). Create linked objects using the \c #AIPlacedSuite. */ -enum AIRasterLinkState { - /** The image is linked; when saving native round-trip information, - image data is not saved into the file. */ - kAIRasterLinked = 0, - /** The image is embedded; when saving native round-trip information, - image data is saved with the file. */ - kAIRasterEmbedded = 1 -}; - -/** Data states for \c #AIRasterLink::datastate. Direct linking of images is deprecated - (although still supported). Create linked objects using the \c #AIPlacedSuite. */ -enum AIRasterDataState { - /** No data is available for the image (for example, when a - document is opened and the linked file cannot be found). */ - kAIRasterNoData = 0, - /** Data is available and is the same data that was read from - the linked file (that is, it has not been modified since being read). */ - kAIRasterLinkData = 1, - /** Data is available and it has been modified since it was read from - the file (for example, a Photoshop filter might have been run on the image). */ - kAIRasterEditedData = 2 -}; - -/** Flags for \c #AIRasterSuite::ResolveRasterLink(). Direct linking of images is deprecated - (although still supported). Create linked objects using the \c #AIPlacedSuite. */ -enum AIResolveRasterLinkFlags { - /** Only update if the data is not embedded */ - kAIResolveCheckExternal = (1<<0), - /** Only update if the file has changed */ - kAIResolveCheckFile = (1<<1), - /** Report errors to user and show progress */ - kAIResolveVerbose = (1<<2), - /** Allow a replacement file to be selected in case of error */ - kAIResolveReplace = (1<<3), - /** Do automatic searching for a replacement */ - kAIResolveSearch = (1<<4) -}; - -/** Flags for \c #AIRasterSuite::SplitChannels() */ - enum AISplitRasterFlags { - /** Decompose the original raster into an array of rasters specified in the standard - color spaces (Gray, RGB, CMYK and spot Separation). If - the original raster contains a partial set of CMYK process colors, - it is expanded to the full process colors. */ - kAISplitRasterStandard = 0x0000, - /** Decompose the CMYK process channels of the original raster - into individual process Separation color spaces. If - the original raster contains a partial set of CMYK process colors, - is \e not expanded to the full process channels. */ - kAISplitRasterSeparateProcess = 0x0001 -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** A slice, which defines a subset of a raster data to be copied or - replaced, in \c #AITile::bounds. The slice of the source and - destination are of equal dimensions, but differ in location. - - The \c top, \c bottom, \c left, and \c right values specify - the rectangle containing the pixel data. As you iterate through a - raster object accessing slices of pixels, these values change, - controlling which section of the pixel map is being processed. - - The slice values for local pixel data are typically the same as - the bounding rectangle of the tile (although you can also iterate - through slices in a tile). - - The \c front and \c back, together with the \c #AITile::channelInterleave - value, the control which of the pixel channels should be copied. - The \c front value specifies the first channel to be affected, and the - \c back value specifies the last channel + 1. See @ref ChannelInterleaving. - */ -typedef struct AISlice { - ai::int32 top, left, bottom, right, front, back; -} AISlice; - - -/** A tile, which describes local storage for copying image data to and from. - Use with \c #AIRasterSuite::GetRasterTile() and \c #AIRasterSuite::SetRasterTile(). - */ -typedef struct AITile { - /** A pointer to the memory containing the local copy of the pixels. Can be - a generic block of memory or a platform-specific data structure. - Must be allocated by the plug-in. */ - void *data; - /** The slice that defines the tile (a subset of the pixel map to - be copied in one iteration), a rectangular area plus depth - information that controls how interleaving occurs. - See @ref ChannelInterleaving. */ - AISlice bounds; - /** The number of bytes in a row of pixel data. */ - ai::int32 rowBytes; - /** The number of bytes used to specify a single pixel. For a raw RGB pixel, - for example, it is 3. */ - ai::int32 colBytes; - /** When 0, the tile receives all color data for a single pixel together. -
When non-zero, the tile receives all data for a color together - (in a planar form). In this case, the value is the number of bytes - making up a single plane. For instance if the pixel map is - 80 by 80 pixels and the RGB data is in a planar form, the - value is 6400. */ - ai::int32 planeBytes; - /** Together with the slice information, this array specifies how to change - the order of bytes making up a pixel when transferring between - a raster art object and the tile data. See @ref ChannelInterleaving.*/ - ai::int16 channelInterleave[kMaxChannels]; -} AITile; - - -/** An RGB color table. */ -typedef struct AIRGBColorRec { - ai::uint8 mustBeZero; // MUST BE ZERO!!!! - ai::uint8 red; - ai::uint8 green; - ai::uint8 blue; -} AIRGBColorRec; - -/** An extended (16-bit) RGB color table. */ -typedef struct AIExtendedRGBColorRec { - ai::uint16 mustBeZero; // MUST BE ZERO!!!! - ai::uint16 red; - ai::uint16 green; - ai::uint16 blue; -} AIExtendedRGBColorRec; - -/** A CMYK color table. */ -typedef struct AICMYKColorRec { - ai::uint8 cyan; - ai::uint8 magenta; - ai::uint8 yellow; - ai::uint8 black; -} AICMYKColorRec; - - -/** Configuration information for the raster image data associated with an art - object of type \c #kRasterArt. Use with \c #AIRasterSuite::GetRasterInfo() - and \c #AIRasterSuite::SetRasterInfo(). */ -typedef struct AIRasterRecord { - /** Flags defining additional options for the image. A logical - OR of \c #AIRasterFlags. */ - ai::uint16 flags; - /** The width and height of the image data in pixels. The top left value of - the bounds must be zero. The right value gives the width and the bottom - value the height. (The coordinate system for a raster object is inverted - on the vertical axis with respect to the Illustrator artboard coordinate - system.) */ - AIRect bounds; - /** The number of bytes in a single row of pixel data. Not needed - for \c #AIRasterSuite::SetRasterInfo(). 1-bit data is packed so - that there are 8 pixels per byte. - \li If \c bitsPerPixel is 1 (for a black-and-white bitmap), the value is: - rasterRecord.bounds.right / 8 + 1 - \li For all other \c bitsPerPixel values, the value is: - rasterRecord.bounds.right * (rasterRecord.bitsPerPixel / 8) */ - ai::int32 byteWidth; - /** The color model of the pixel data, which can include an alpha channel, - an \c #AIRasterColorSpace constant. */ - ai::int16 colorSpace; - /** The number of bits used to define each pixel in the pixel map. - Valid values depend on the color space: - Gray: 1 (black and white) or 8 (gray) - RGB: 24 (8 bits for each color) or 48 (16 bits for each color) - CMYK: 32 (8 bits for each color) - */ - ai::int16 bitsPerPixel; - /** For an image that has been converted from one color space to another, - the original color space, an \c #AIRasterColorSpace constant. -
If the image has not been converted, the value is -1. */ - ai::int16 originalColorSpace; - - /** Default ctor */ - AIRasterRecord() - : flags(0), byteWidth(0), bitsPerPixel(0), - colorSpace(kInvalidColorSpace), originalColorSpace(kInvalidColorSpace) - { - bounds.left = bounds.top = bounds.right = bounds.bottom = 0; - } -} AIRasterRecord; - - -/** Link information about an image. Direct linking of images is deprecated - (although still supported). Create linked objects using the \c #AIPlacedSuite. */ -struct AIRasterLink { - /** The source file for the image data (the linked file). */ - ai::FilePath file; - /** The link state, an \c #AIRasterLinkState constant. */ - ai::int32 linkstate; - /** The data state, an \c #AIRasterDataState constant. */ - ai::int32 datastate; -}; - - -/** Parameters for controlling the curve fitting used when outlining a raster. - Keep parameters within valid ranges to avoid excessive performance impact. - To reduce performance impact, try increasing smoothness and fidelity tolerance. - See \c AIRasterSuite::ExtractOutline() */ -typedef struct AIRasterOutlineParams { - /** Valid range [0 to 5] inclusive. */ - ai::int32 noiseFilterDegree; - /** Valid range [-1 to 1] inclusive. */ - double cornerAngleTolerance; - /** Valid range [0 to 100] inclusive. */ - double smoothnessTolerance; - /** Valid range greater than 0. */ - double fidelityTolerance; -} AIRasterOutlineParams; - -/** When extracting an outline from a raster, the curves are enumerated to - these callbacks. See \c AIRasterSuite::ExtractOutline() */ -typedef struct AIRasterOutlineConsumer { - /** Called at the beginning of the enumeration, use to initialize processing. - @param self The current curve. - @param knots The number of knots in the curve. - */ - AIAPI AIErr (*BeginComponent) ( void* self, ai::int32 knots ); - /** Called for each knot in each curve. - @param self The current curve. - @param in The in-point for the current knot. - @param p The p-point for the current knot. - @param out The out-point for the current knot. - */ - AIAPI AIErr (*PutKnot) ( void* self, AIRealPoint in, AIRealPoint p, AIRealPoint out); - /** Called at the end of the enumeration, use to terminate processing. - @param self The current curve. - */ - AIAPI AIErr (*EndComponent) ( void* self ); -} AIRasterOutlineConsumer; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions with which to access and modify the - data associated with an art object of type \c #kRasterArt. - (Use \c #AIArtSuite, \c #AIMatchingArtSuite, or \c #AIArtSetSuite - to create or access the raster art object itself.) - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIRasterSuite and \c #kAIRasterVersion. - - The art associated with a raster object is defined by its pixel data - and a matrix that positions the pixel data in the document. This information - is kept in an \c #AIRasterRecord associated with the raster art object. - This suite allows you to work with the raster data as whole, for instance by - getting and setting its transformation matrix; or at a pixel level, using - the tile functions. - - All values in the associated raster record are initialized to zero - when you create a raster art object with \c #AIArtSuite::NewArt(). - Retrieve the structure from the new art object using \c #GetRasterInfo(), - and use \c #SetRasterInfo() to update the object. - - Set to the rectangle containing the pixel map using \c #SetRasterInfo(). - This is not the same rectangle as the artwork bounds, which Illustrator - calculates and provides. The origin of a raster art object is in the top - left corner; the coordinate system for a raster object is inverted on the - vertical axis with respect to the Illustrator artboard coordinate system. - - All pixel data in a raster object uses a base resolution of 72 pixels - per inch (PPI). You cannot directly specify the resolution; it is set - from the bounds and the raster matrix. For a one inch square image - at 72 PPI, the scale component of the raster matrix is set to 1.0 and - the bounds would be 72 x 72. To create a one inch square image at 300 PPI, - set the bounds to 300 x 300; the scale becomes 0.24 (72/300). - - Keep your local pixel data in a \e tile (\c #AITile). Use \c #GetRasterTile() - to retrieve pixels from the pixel map and create a tile, and - \c #SetRasterTile() to copy pixel information from the tile to the pixel map. - - When copying or replacing image data between a raster art object - and a local data buffer (tile), it can be impractical to work with - all the information at one time. You can define and work with a more - practical subset of the data called a \e slice. Slices are defined in - parameters of the functions that copy the data, \c #GetRasterTile and - \c #SetRasterTile(). - - A slice in the \c #AITile structure defines the tile (the area to be copied or replaced), - and additional slices are defined for both the raster art object (\c artSlice) and - for the local data buffer (\c workSlice). The one for the source controls - how the transfer occurs: - \li When copying from the raster art object to local data, \c #GetRasterTile() - iterates over art slices. - \li When copying from the local data to the raster art object, - \c #SetRasterTile() iterates over work slices. - - @section ChannelInterleaving Channel Interleaving - - Together with the slice information (see \c #AISlice), the - \c #AITile::channelInterleave array specifies how to change the order of - bytes making up a pixel when transferring between a raster art object and - the tile data buffer. This is useful when translating between similar - but not identical color formats. - - The array contains a value for each channel, or color byte to be transferred. - The array index of a value specifies the source, for bytes read in order from - the internal bitmap. The array value maps the corresponding byte to a - destination position. - - If there is no change in the data order, the array would be: - \verbatim -myTile.channelInterleave[0] = 0; -myTile.channelInterleave[1] = 1; -myTile.channelInterleave[2] = 2; -myTile.channelInterleave[3] = 3; - \endverbatim - ... - An example of using the channel interleave is transferring from the internal - RGB format to a Mac OS GWorld PixMap. The internal format uses 3 bytes in - the order R G B to define a pixel. The GWorld uses 4 bytes in the order - A R G B, where the A byte is the alpha channel information. - - When transferring between the raster art object and the GWorld, - the channel interleave specifies the mapping between the two - incompatible forms. To transfer from the raster object to the - GWorld this mapping would be used: - \verbatim -GWorldTile.channelInterleave[0] = 1; // Map 24-bit red value to 32-bit red value -GWorldTile.channelInterleave[1] = 2; // Map 24-bit green value to 32bit green value -GWorldTile.channelInterleave[2] = 3; // Map 24-bit blue value to 32-bit blue value -GWorldTile.channelInterleave[3] = 0; // Unused, handled by the slice definition - \endverbatim - - Only three channels are mapped. The alpha channel of the GWorld receives - no information. To transfer from the GWorld back to the raster object, - this mapping would be used: - \verbatim -GWorldTile.channelInterleave[0] = 0; // Alpha channel ignored, handled by slice definition -GWorldTile.channelInterleave[1] = 0; // Map 32-bit red value to 24-bit red value -GWorldTile.channelInterleave[2] = 1; // Map 32-bit green value to 24bit green value -GWorldTile.channelInterleave[3] = 2; // Map 32-bit blue value to 24-bit blue value - \endverbatim - - Here the data in the alpha channel of the GWorld is not transferred - back to the raster object. - - This example sets the art-object slice’s \c front and \c back values - to limit the \c channelInterleave array: - \verbatim -GWorldTile.channelInterleave[0] = 1; // Map 24-bit red value to 32-bit red value -GWorldTile.channelInterleave[1] = 2; // Map 24-bit green value to 32bit green value -GWorldTile.channelInterleave[2] = 3; // Map 24-bit blue value to 32-bit blue value -GWorldTile.channelInterleave[3] = 0; // Unused, handled by the slice definition -artSlice.front = 0; -artSlice.back = 3; - \endverbatim - - Because \c artSlice.back is set to 3, only the color information for - the first three channels is copied. When transferring data from the - GWorld back to the raster art object, the GWorld’s slice controls the - channel interleave. To skip the alpha channel, \c GWorldSlice.front is - set to channel 1, causing channel 0 to be ignored. - - \verbatim -GWorldTile.channelInterleave[0] = 0; // Alpha channel is ignored, handled by the slice definition -GWorldTile.channelInterleave[1] = 0; // Map 32-bit red value to 24-bit red value -GWorldTile.channelInterleave[2] = 1; // Map 32-bit green value to 24bit green value -GWorldTile.channelInterleave[3] = 2; // Map 32-bit blue value to 24-bit blue value -GWorldSlice.front = 1; -GWorldSlice.back = 4; - \endverbatim - */ -typedef struct AIRasterSuite { - - /** Retrieves the raster record associated with a raster art object. - @param raster An art object of type \c #kRasterArt. - @param info [out] A buffer in which to return the raster record. - */ - AIAPI AIErr (*GetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info ); - - /** Associates a raster record with a raster art object. After setting - the record, use other functions such as \c #SetColorSpaceInfo() to - specify the image data configuration. - @param raster An art object of type \c #kRasterArt. - @param info The raster record. - */ - AIAPI AIErr (*SetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info ); - - /** Retrieves the file information associated with a raster art object - for a link. (Direct linking of images is deprecated, although still supported. - Create linked objects using the \c #AIPlacedSuite.) - @param raster An art object of type \c #kRasterArt. - @param file [out] A buffer in which to return the file specification. - */ - AIAPI AIErr (*GetRasterFileSpecification) ( AIArtHandle raster, ai::FilePath& file ); - - /** Not implemented. Returns \c #kNotImplementedErr. */ - AIAPI AIErr (*SetRasterFileSpecification) ( AIArtHandle raster, const ai::FilePath& ); - - /** Retrieves the transformation matrix for a raster art object. This is the - concatenation of all transforms applied to the image after it was created. - It typically contains at least the initial translation and a scale; - see \c #SetRasterMatrix(). - @param raster An art object of type \c #kRasterArt. - @param matrix [out] A buffer in which to return the matrix. - */ - AIAPI AIErr (*GetRasterMatrix) ( AIArtHandle raster, AIRealMatrix *matrix ); - - /** Sets the transformation matrix for a raster art object. - All raster data is internally kept at 72 PPI and uses the object’s - scale to set a resolution. - @param raster An art object of type \c #kRasterArt. - @param matrix The new matrix. - */ - AIAPI AIErr (*SetRasterMatrix) ( AIArtHandle raster, AIRealMatrix *matrix ); - - /** Retrieves the raster image bounding box of a raster art object. - @param raster An art object of type \c #kRasterArt. - @param bbox [out] A buffer in which to return the bounding rectangle. - @note The raster bounding box, as specified for \c #SetRasterInfo() - or \c #SetRasterBoundingBox(), is not the same rectangle - as the artwork bounds, which Illustrator calculates - and provides for any art object. To do transformations, - use \c #AIArtSuite::GetArtBounds(). - */ - AIAPI AIErr (*GetRasterBoundingBox) ( AIArtHandle raster, AIRealRect *bbox ); - - /** Sets the raster image bounding box of a raster art object. - @param raster An art object of type \c #kRasterArt. - @param bbox The bounding rectangle for the raster image. - The top left value must be zero. The right value gives - the width and the bottom value the height. (The coordinate - system for a raster object is inverted on the vertical - axis with respect to the Illustrator artboard coordinate - system.) - @see \c #GetRasterBoundingBox(), \c #AIRasterRecord::bounds - */ - AIAPI AIErr (*SetRasterBoundingBox) ( AIArtHandle raster, AIRealRect *bbox ); - - /** Copies all or part of the pixel data for a raster art object into a - local buffer (a tile). Use with \c #SetRasterTile() to filter raster data. - @param raster An art object of type \c #kRasterArt. - @param artSlice The slice that defines a subset of the pixel map to be copied. - @param workTile The tile, which defines the data buffer in which - pixel data is returned, and parameters for the transfer operation. - @param workSlice The slice that defines a subset of the local data buffer - to which to copy data. Typically, the bounds are the same as those - of the work tile. - */ - AIAPI AIErr (*GetRasterTile) ( AIArtHandle raster, AISlice *artSlice, AITile *workTile, AISlice *workSlice ); - - /** Copies pixel data in a local buffer (a tile) to all or part of - a raster art object’s pixel map. This can be used, for instance, - when reading a raster file format into a new raster art object. - @param raster An art object of type \c #kRasterArt. - @param artSlice The slice that defines a subset of the pixel map to be replaced. - @param workTile The tile, which defines the data buffer in which - pixel data is returned, and parameters for the transfer operation. - @param workSlice The slice that defines a subset of the local data buffer - from which to copy data. Typically, the bounds are the same as those - of the work tile. - */ - AIAPI AIErr (*SetRasterTile) ( AIArtHandle raster, AISlice *artSlice, AITile *workTile, AISlice *workSlice ); - - /** Retrieves the link information for a raster object that is a link. - (Direct linking of images is deprecated, although still supported. - Create linked objects using the \c #AIPlacedSuite.) - @param raster An art object of type \c #kRasterArt. - @param link [out] A buffer in which to return the link information. - */ - AIAPI AIErr (*GetRasterLink) ( AIArtHandle raster, AIRasterLink &link ); - - /** Sets link information for a raster object. - (Direct linking of images is deprecated, although still supported. - Create linked objects using the \c #AIPlacedSuite.) - @param raster An art object of type \c #kRasterArt. - @param link The link information. - */ - AIAPI AIErr (*SetRasterLink) ( AIArtHandle raster, const AIRasterLink &link ); - - /** Retrieves the link information for a raster art object, and reloads - the raster data if needed. Marks the data as unmodified, but does not - change the embedded state. - - Depending on the option flags, this can force reload, regardless of - the embedded or modified state. If the flags do not specify that - resolution should be forced, it is done only if the linked to data - is more recent than the current copy. - - Attempting to resolve a link can fail for any of the following reasons: - \li No link source is specified - \li The link source is not found (\c #kRasterLinkFileNotFoundErr) - \li A plug-in that can load the link source data is not found - (\c #kRasterLinkPluginNotFoundErr) - \li The link source data cannot be read - \li Out of memory - - (Direct linking of images is deprecated, although still supported. - Create linked objects using the \c #AIPlacedSuite.) - @param raster An art object of type \c #kRasterArt. - @param flags Option flags for how the operation is performed. - A logical OR of \c #AIResolveRasterLinkFlags. - */ - AIAPI AIErr (*ResolveRasterLink) ( AIArtHandle raster, ai::int32 flags ); - - /** Retrieves the file information associated with a raster art object - that is a link, such as the time the file was created and last modified. - This information is stored with the object from when the file - was last read; compare to the current file information to check - if the file has changed.
- (Direct linking of images is deprecated, although still supported. - Create linked objects using the \c #AIPlacedSuite.) - @param raster An art object of type \c #kRasterArt. - @param pSPFileInfo [out] A buffer in which to return the file information, - @see \c #GetRasterFileInfoFromFile() - */ - AIAPI AIErr (*GetRasterFileInfoFromArt) ( AIArtHandle raster, SPPlatformFileInfo *pSPFileInfo ); - - /** Retrieves the file information for the file associated with a raster art object - that is a link, such as the time the file was created and last modified. - Compare to the file information stored with the object to check - if the file has changed since it was last read.
- (Direct linking of images is deprecated, although still supported. - Create linked objects using the \c #AIPlacedSuite.) - @param raster An art object of type \c #kRasterArt. - @param pSPFileInfo [out] A buffer in which to return the file information, - @see \c #GetRasterFileInfoFromArt() - */ - AIAPI AIErr (*GetRasterFileInfoFromFile) ( AIArtHandle raster, SPPlatformFileInfo *pSPFileInfo ); - - /** Retrieves the path for the file associated with a raster art object that is a link. -
(Direct linking of images is deprecated, although still supported. - Create linked objects using the \c #AIPlacedSuite.) - @param raster An art object of type \c #kRasterArt. - @param path [out] A buffer in which to return the platform-specific path. - */ - AIAPI AIErr (*GetRasterFilePathFromArt) ( AIArtHandle raster, ai::UnicodeString &path ); - - /** Retrieves the number of levels in the MIP map that stores the raster data - for a raster art object. - @param raster An art object of type \c #kRasterArt. - @param count [out] A buffer in which to return the number of levels - (Currently always 6.) - */ - AIAPI AIErr (*CountLevels) ( AIArtHandle raster, ai::int32* count ); - - /** Retrieves the bitmap format information for a level in the MIP map for - a raster art object. Use with \c #CountLevels() to iterate through levels. - @param raster An art object of type \c #kRasterArt. - @param level The 0-based level index. - @param info [out] A buffer in which to return the bitmap information. - @note In the returned raster record: - \li The \c flags are those you would get by querying the image - as a whole. - \li The \c bounds are those of the image at the given level of - the MIP map. Each level is a power of two less than the - previous one, with odd dimensions rounded up. For example, - levelWidth = (prevLevelWidth + 1) / 2 -
Do not rely on this algorithm, however. The only important - property maintained is that any rectangle contained within the base - image is contained within an image at a given level after - scaling to that level, even if its dimensions are rounded up. - \li The \c byteWidth is ignored. - \li The \c colorSpace and \c bitsPerPixel describe the format of - the pixel data at the given level of the MIP map (currently - always the same as that of the base image). The subsampled - levels of a bitmap's MIP map are bitmaps; random sampling is - used to avoid aliasing. - */ - AIAPI AIErr (*GetLevelInfo) ( AIArtHandle raster, ai::int32 level, AIRasterRecord *info ); - - /** Retrieves the tile information for a level in the MIP map for a - raster art object. Use with \c #CountLevels() to iterate through levels. - @param raster An art object of type \c #kRasterArt. - @param level The 0-based level index. - @param artSlice The slice that defines a subset of the pixel map to be copied. - @param workTile The tile, which defines the data buffer in which - pixel data is returned, and parameters for the transfer operation. - @param workSlice The slice that defines a subset of the local data buffer - to which to copy data. Typically, the bounds are the same as those - of the work tile. - @see \c #GetRasterTile() - */ - AIAPI AIErr (*GetLevelTile) ( AIArtHandle raster, ai::int32 level, AISlice *artSlice, - AITile *workTile, AISlice *workSlice ); - - /** Extracts an outline path from the image data, and enumerates the curves - to the supplied callback functions. - @param raster An art object of type \c #kRasterArt. - @param params Parameters that control the curve fitting, or \c NULL - to use defaults. Keep parameters within valid ranges to - avoid excessive performance impact. - @param consumer The developer-defined callbacks. - */ - AIAPI AIErr (*ExtractOutline) ( AIArtHandle raster, const AIRasterOutlineParams* params, - AIRasterOutlineConsumer* consumer ); - - /** Post-concatenate a transformation onto the matrix applied to a raster object. - @param raster An art object of type \c #kRasterArt. - @param concat The new transformation matrix information. - */ - AIAPI AIErr (*ConcatRasterMatrix) ( AIArtHandle raster, AIRealMatrix *concat ); - - /** Attaches additional color space information to a raster art object, - required for non-standard color spaces (Separation, NChannel, and Indexed). - @param raster An art object of type \c #kRasterArt. - @param cs The color space information, with the same number of - colors and channels as the color space specified in - the \c #AIRasterRecord::colorSpace. - */ - AIAPI AIErr (*SetColorSpaceInfo) ( AIArtHandle raster, const ai::ColorSpace &cs); - - /** Retrieves the additional color space information from a raster art object, - which is required for non-standard color spaces (Separation, NChannel, and Indexed). - @param raster An art object of type \c #kRasterArt. - @param cs [out] A buffer in which to return the color space information - @note If the raster is a colorized grayscale image, returns the actual color space - used for the colorization.
- If the color space info for non-standard color space has not been specified, - returns an error code and an invalid color space. - */ - AIAPI AIErr (*GetColorSpaceInfo) ( AIArtHandle raster, ai::ColorSpace &cs); - - /** Enables or disables overprinting for a raster object. - @param raster An art object of type \c #kRasterArt. - @param enable True to enable overprint, false to disable it. - */ - AIAPI AIErr (*SetOverprint) ( AIArtHandle raster, AIBoolean enable); - - /** Retrieves the overprint status for a raster object. - @param raster An art object of type \c #kRasterArt. - @param enable [out] A buffer in which to return true if - overprint is enabled, false if it is disabled. - */ - AIAPI AIErr (*GetOverprint) ( AIArtHandle raster, AIBoolean *status ); - - /** Reports whether a raster object is a colorized grayscale or bitmap image. - @param raster An art object of type \c #kRasterArt. - @param isColorized [out] A buffer in which to return true if the raster - is a colorized grayscale or bitmap image. - @param isAdditive [out] Optional. A buffer in which to return true if the - raster should be interpreted as additive. - */ - AIAPI AIErr (*IsColorized) ( AIArtHandle raster, AIBoolean *isColorized, AIBoolean *isAdditive ); - - /** Clears the colorization on a colorized grayscale or bitmap image. - @param raster An art object of type \c #kRasterArt. - */ - AIAPI AIErr (*ClearColorization) ( AIArtHandle raster ); - /** Converts the colors in a raster object to a non-indexed color space. - @param raster [in, out] An art object of type \c #kRasterArt, which is modified in place. - @param dstCS The destination color space, which must not be indexed. - */ - AIAPI AIErr (*ConvertColors) ( AIArtHandle *raster, const ai::ColorSpace &dstCS ); - /** Inverts the colors in a raster object. - @param raster [in, out] An art object of type \c #kRasterArt, which is modified in place. - */ - AIAPI AIErr (*InvertColors) ( AIArtHandle *raster ); - - /** Decomposes a raster object into an array of rasters specified in the standard - color spaces (Gray, RGB, CMYK and spot Separation). - The alpha channel from the original raster is duplicated among all the - output rasters. - @param raster An art object of type \c #kRasterArt. - @param rasterArray [out] A buffer in which to return a pointer to a - block of memory containing the array of new raster art objects. - You must release the memory block when it is no longer - needed using \c #SPBasicSuite::FreeBlock(). - @param numRasters [out] A buffer in which to return the number of objects - in the raster array, 0 if no rasters are constructed. - @param flag How to treat CMYK process channels, one of the constants - \c #kAISplitRasterStandard or \c #kAISplitRasterSeparateProcess. - @see \c #InterleaveChannels() - */ - AIAPI AIErr (*SplitChannels) ( AIArtHandle raster, AIArtHandle **rasterArray, ai::int32 *numRasters, ai::uint32 flags ); - - /** Interleaves the color channels from an array of raster objects and - recombines them into a single raster. - The source rasters and the destination raster must have the same width and height. 1-bit bitmap rasters are - not allowed in the input raster array. The alpha channel of the output raster is the average of all the alpha - channels in the input raster array (if there are any). It is ok that not all the input rasters have alpha - channels. - @param rasterArray A pointer to a block of memory containing the array of raster art objects - to be interleaved. - @param numRasters The number of objects in the raster array. - @param raster [out] A buffer in which to return the combined raster, an - art object of type \c #kRasterArt. - @param flag Not used. Pass \c NULL. - @see \c #SplitChannels() - */ - AIAPI AIErr (*InterleaveChannels) ( AIArtHandle *rasterArray, ai::int32 numRasters, AIArtHandle *raster, ai::uint32 flags ); - -} AIRasterSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIRaster__ +#define __AIRaster__ + +/* + * Name: AIRaster.h + * $Revision: 24 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Raster Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#include "IAIFilePath.hpp" +#include "IAIColorSpace.hpp" +#include "AIRasterTypes.h" +#include "AIHeaderBegin.h" + +/** @file AIRaster.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIRasterSuite "AI Raster Suite" +#define kAIRasterSuiteVersion10 AIAPI_VERSION(10) +#define kAIRasterSuiteVersion kAIRasterSuiteVersion10 +#define kAIRasterVersion kAIRasterSuiteVersion + +/*******************************************************************************/ +using AIRasterColorSpace = ai::RasterColorSpace; +using AIRasterDataState = ai::RasterDataState; +using ai::kColorSpaceHasAlpha; +using ai::kGrayColorSpace; +using ai::kRGBColorSpace; +using ai::kCMYKColorSpace; +using ai::kLabColorSpace; +using ai::kSeparationColorSpace; +using ai::kNChannelColorSpace; +using ai::kIndexedColorSpace; +using ai::kAlphaGrayColorSpace; +using ai::kAlphaRGBColorSpace; +using ai::kAlphaCMYKColorSpace; +using ai::kAlphaLabColorSpace; +using ai::kAlphaSeparationColorSpace; +using ai::kAlphaNChannelColorSpace; +using ai::kAlphaIndexedColorSpace; +using ai::kInvalidColorSpace; +using ai::kAIRasterNoData; +using ai::kAIRasterLinkData; +using ai::kAIRasterEditedData; + /**/ + +/** Options for raster data, bit flags for \c #AIRasterRecord::flags. */ +enum AIRasterFlags { + /** Used only for 1-bit gray images. When set, the 1-bit data + is to be used as a mask. In this case the path style of the image indicates + the color that the bits of the image with a value of 1 are painted. */ + kRasterMaskImageType = 0x0002, + /** Used only for 1-bit gray images. Reverses the sense of the component + values so that for a gray image 0=white and 1=black and for an image mask + the 0 value pixels are painted. */ + kRasterInvertBits = 0x0004, + /** Used only for 8-bit spot color rasters, or 16-bit if there is an extra + alpha channel. When set, the gray component values are interpreted in + the subtractive color spaces. */ + kRasterGraySubtractive = 0x0008 +}; + +/** Maximum number of channels per image pixel */ +#define kMaxChannels 32 + +/** Maximum number of spot color channels per image pixel */ +#define kMaxSpotChannels 27 + +/** @ingroup Errors + See \c #AIRasterSuite */ +#define kRasterTypeNotSupportedErr 'RTYP' +/** @ingroup Errors + Raster has already been specified. See \c #AIRasterSuite */ +#define kRasterSpecifiedErr 'RSPE' +/** @ingroup Errors + Raster bits-per-pixel not supported. See \c #AIRasterSuite */ +#define kRasterBitsPerPixelsNotSupportedErr 'RBIT' +/** @ingroup Errors + See \c #AIRasterSuite */ +#define kRasterLinkFileNotFoundErr 'RFNF' +/** @ingroup Errors + See \c #AIRasterSuite */ +#define kRasterLinkPluginNotFoundErr 'RPNF' +/** @ingroup Errors + See \c #AIRasterSuite */ +#define kRasterScratchDiskFullErr 'RFUL' + + +/** Link states for \c #AIRasterLink::linkstate. Direct linking of images is deprecated + (although still supported). Create linked objects using the \c #AIPlacedSuite. */ +enum AIRasterLinkState { + /** The image is linked; when saving native round-trip information, + image data is not saved into the file. */ + kAIRasterLinked = 0, + /** The image is embedded; when saving native round-trip information, + image data is saved with the file. */ + kAIRasterEmbedded = 1 +}; + +/** Flags for \c #AIRasterSuite::ResolveRasterLink(). Direct linking of images is deprecated + (although still supported). Create linked objects using the \c #AIPlacedSuite. */ +enum AIResolveRasterLinkFlags { + /** Only update if the data is not embedded */ + kAIResolveCheckExternal = (1<<0), + /** Only update if the file has changed */ + kAIResolveCheckFile = (1<<1), + /** Report errors to user and show progress */ + kAIResolveVerbose = (1<<2), + /** Allow a replacement file to be selected in case of error */ + kAIResolveReplace = (1<<3), + /** Do automatic searching for a replacement */ + kAIResolveSearch = (1<<4) +}; + +/** Flags for \c #AIRasterSuite::SplitChannels() */ + enum AISplitRasterFlags { + /** Decompose the original raster into an array of rasters specified in the standard + color spaces (Gray, RGB, CMYK and spot Separation). If + the original raster contains a partial set of CMYK process colors, + it is expanded to the full process colors. */ + kAISplitRasterStandard = 0x0000, + /** Decompose the CMYK process channels of the original raster + into individual process Separation color spaces. If + the original raster contains a partial set of CMYK process colors, + is \e not expanded to the full process channels. */ + kAISplitRasterSeparateProcess = 0x0001 +}; + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** A slice, which defines a subset of a raster data to be copied or + replaced, in \c #AITile::bounds. The slice of the source and + destination are of equal dimensions, but differ in location. + + The \c top, \c bottom, \c left, and \c right values specify + the rectangle containing the pixel data. As you iterate through a + raster object accessing slices of pixels, these values change, + controlling which section of the pixel map is being processed. + + The slice values for local pixel data are typically the same as + the bounding rectangle of the tile (although you can also iterate + through slices in a tile). + + The \c front and \c back, together with the \c #AITile::channelInterleave + value, the control which of the pixel channels should be copied. + The \c front value specifies the first channel to be affected, and the + \c back value specifies the last channel + 1. See @ref ChannelInterleaving. + */ +typedef struct AISlice { + ai::int32 top, left, bottom, right, front, back; + void Init() + { + top = left = bottom = right = front = back = 0; + } +} AISlice; + + +/** A tile, which describes local storage for copying image data to and from. + Use with \c #AIRasterSuite::GetRasterTile() and \c #AIRasterSuite::SetRasterTile(). + */ +typedef struct AITile { + /** A pointer to the memory containing the local copy of the pixels. Can be + a generic block of memory or a platform-specific data structure. + Must be allocated by the plug-in. */ + void *data; + /** The slice that defines the tile (a subset of the pixel map to + be copied in one iteration), a rectangular area plus depth + information that controls how interleaving occurs. + See @ref ChannelInterleaving. */ + AISlice bounds; + /** The number of bytes in a row of pixel data. */ + ai::int32 rowBytes; + /** The number of bytes used to specify a single pixel. For a raw RGB pixel, + for example, it is 3. */ + ai::int32 colBytes; + /** When 0, the tile receives all color data for a single pixel together. +
When non-zero, the tile receives all data for a color together + (in a planar form). In this case, the value is the number of bytes + making up a single plane. For instance if the pixel map is + 80 by 80 pixels and the RGB data is in a planar form, the + value is 6400. */ + ai::int32 planeBytes; + /** Together with the slice information, this array specifies how to change + the order of bytes making up a pixel when transferring between + a raster art object and the tile data. See @ref ChannelInterleaving.*/ + ai::int16 channelInterleave[kMaxChannels]; + void Init() + { + data = nullptr; + bounds.Init(); + rowBytes = colBytes = planeBytes = 0; + for (size_t i = 0; (i < kMaxChannels); ++i) + { + channelInterleave[i] = 0; + } + } +} AITile; + + +/** An RGB color table. */ +typedef struct AIRGBColorRec { + ai::uint8 mustBeZero; // MUST BE ZERO!!!! + ai::uint8 red; + ai::uint8 green; + ai::uint8 blue; +} AIRGBColorRec; + +/** An extended (16-bit) RGB color table. */ +typedef struct AIExtendedRGBColorRec { + ai::uint16 mustBeZero; // MUST BE ZERO!!!! + ai::uint16 red; + ai::uint16 green; + ai::uint16 blue; +} AIExtendedRGBColorRec; + +/** A CMYK color table. */ +typedef struct AICMYKColorRec { + ai::uint8 cyan; + ai::uint8 magenta; + ai::uint8 yellow; + ai::uint8 black; +} AICMYKColorRec; + + +/** Configuration information for the raster image data associated with an art + object of type \c #kRasterArt. Use with \c #AIRasterSuite::GetRasterInfo() + and \c #AIRasterSuite::SetRasterInfo(). */ +typedef struct AIRasterRecord { + /** Flags defining additional options for the image. A logical + OR of \c #AIRasterFlags. */ + ai::uint16 flags; + /** The width and height of the image data in pixels. The top left value of + the bounds must be zero. The right value gives the width and the bottom + value the height. (The coordinate system for a raster object is inverted + on the vertical axis with respect to the Illustrator artboard coordinate + system.) */ + AIRect bounds; + /** The number of bytes in a single row of pixel data. Not needed + for \c #AIRasterSuite::SetRasterInfo(). 1-bit data is packed so + that there are 8 pixels per byte. + \li If \c bitsPerPixel is 1 (for a black-and-white bitmap), the value is: + rasterRecord.bounds.right / 8 + 1 + \li For all other \c bitsPerPixel values, the value is: + rasterRecord.bounds.right * (rasterRecord.bitsPerPixel / 8) */ + ai::int32 byteWidth; + /** The color model of the pixel data, which can include an alpha channel, + an \c #AIRasterColorSpace constant. */ + ai::int16 colorSpace; + /** The number of bits used to define each pixel in the pixel map. + Valid values depend on the color space: + Gray: 1 (black and white) or 8 (gray) + RGB: 24 (8 bits for each color) or 48 (16 bits for each color) + CMYK: 32 (8 bits for each color) + */ + ai::int16 bitsPerPixel; + /** For an image that has been converted from one color space to another, + the original color space, an \c #AIRasterColorSpace constant. +
If the image has not been converted, the value is -1. */ + ai::int16 originalColorSpace; + + /** Default ctor */ + AIRasterRecord() + : flags(0), byteWidth(0), bitsPerPixel(0), + colorSpace(kInvalidColorSpace), originalColorSpace(kInvalidColorSpace) + { + bounds.left = bounds.top = bounds.right = bounds.bottom = 0; + } +} AIRasterRecord; + + +/** Link information about an image. Direct linking of images is deprecated + (although still supported). Create linked objects using the \c #AIPlacedSuite. */ +struct AIRasterLink { + /** The source file for the image data (the linked file). */ + ai::FilePath file; + /** The link state, an \c #AIRasterLinkState constant. */ + ai::int32 linkstate; + /** The data state, an \c #AIRasterDataState constant. */ + ai::int32 datastate; +}; + + +/** Parameters for controlling the curve fitting used when outlining a raster. + Keep parameters within valid ranges to avoid excessive performance impact. + To reduce performance impact, try increasing smoothness and fidelity tolerance. + See \c AIRasterSuite::ExtractOutline() */ +typedef struct AIRasterOutlineParams { + /** Valid range [0 to 5] inclusive. */ + ai::int32 noiseFilterDegree; + /** Valid range [-1 to 1] inclusive. */ + double cornerAngleTolerance; + /** Valid range [0 to 100] inclusive. */ + double smoothnessTolerance; + /** Valid range greater than 0. */ + double fidelityTolerance; +} AIRasterOutlineParams; + +/** When extracting an outline from a raster, the curves are enumerated to + these callbacks. See \c AIRasterSuite::ExtractOutline() */ +typedef struct AIRasterOutlineConsumer { + /** Called at the beginning of the enumeration, use to initialize processing. + @param self The current curve. + @param knots The number of knots in the curve. + */ + AIAPI AIErr (*BeginComponent) ( void* self, ai::int32 knots ); + /** Called for each knot in each curve. + @param self The current curve. + @param in The in-point for the current knot. + @param p The p-point for the current knot. + @param out The out-point for the current knot. + */ + AIAPI AIErr (*PutKnot) ( void* self, AIRealPoint in, AIRealPoint p, AIRealPoint out); + /** Called at the end of the enumeration, use to terminate processing. + @param self The current curve. + */ + AIAPI AIErr (*EndComponent) ( void* self ); +} AIRasterOutlineConsumer; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions with which to access and modify the + data associated with an art object of type \c #kRasterArt. + (Use \c #AIArtSuite, \c #AIMatchingArtSuite, or \c #AIArtSetSuite + to create or access the raster art object itself.) + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIRasterSuite and \c #kAIRasterVersion. + + The art associated with a raster object is defined by its pixel data + and a matrix that positions the pixel data in the document. This information + is kept in an \c #AIRasterRecord associated with the raster art object. + This suite allows you to work with the raster data as whole, for instance by + getting and setting its transformation matrix; or at a pixel level, using + the tile functions. + + All values in the associated raster record are initialized to zero + when you create a raster art object with \c #AIArtSuite::NewArt(). + Retrieve the structure from the new art object using \c #GetRasterInfo(), + and use \c #SetRasterInfo() to update the object. + + Set to the rectangle containing the pixel map using \c #SetRasterInfo(). + This is not the same rectangle as the artwork bounds, which Illustrator + calculates and provides. The origin of a raster art object is in the top + left corner; the coordinate system for a raster object is inverted on the + vertical axis with respect to the Illustrator artboard coordinate system. + + All pixel data in a raster object uses a base resolution of 72 pixels + per inch (PPI). You cannot directly specify the resolution; it is set + from the bounds and the raster matrix. For a one inch square image + at 72 PPI, the scale component of the raster matrix is set to 1.0 and + the bounds would be 72 x 72. To create a one inch square image at 300 PPI, + set the bounds to 300 x 300; the scale becomes 0.24 (72/300). + + Keep your local pixel data in a \e tile (\c #AITile). Use \c #GetRasterTile() + to retrieve pixels from the pixel map and create a tile, and + \c #SetRasterTile() to copy pixel information from the tile to the pixel map. + + When copying or replacing image data between a raster art object + and a local data buffer (tile), it can be impractical to work with + all the information at one time. You can define and work with a more + practical subset of the data called a \e slice. Slices are defined in + parameters of the functions that copy the data, \c #GetRasterTile and + \c #SetRasterTile(). + + A slice in the \c #AITile structure defines the tile (the area to be copied or replaced), + and additional slices are defined for both the raster art object (\c artSlice) and + for the local data buffer (\c workSlice). The one for the source controls + how the transfer occurs: + \li When copying from the raster art object to local data, \c #GetRasterTile() + iterates over art slices. + \li When copying from the local data to the raster art object, + \c #SetRasterTile() iterates over work slices. + + @section ChannelInterleaving Channel Interleaving + + Together with the slice information (see \c #AISlice), the + \c #AITile::channelInterleave array specifies how to change the order of + bytes making up a pixel when transferring between a raster art object and + the tile data buffer. This is useful when translating between similar + but not identical color formats. + + The array contains a value for each channel, or color byte to be transferred. + The array index of a value specifies the source, for bytes read in order from + the internal bitmap. The array value maps the corresponding byte to a + destination position. + + If there is no change in the data order, the array would be: + \verbatim +myTile.channelInterleave[0] = 0; +myTile.channelInterleave[1] = 1; +myTile.channelInterleave[2] = 2; +myTile.channelInterleave[3] = 3; + \endverbatim + ... + An example of using the channel interleave is transferring from the internal + RGB format to a Mac OS GWorld PixMap. The internal format uses 3 bytes in + the order R G B to define a pixel. The GWorld uses 4 bytes in the order + A R G B, where the A byte is the alpha channel information. + + When transferring between the raster art object and the GWorld, + the channel interleave specifies the mapping between the two + incompatible forms. To transfer from the raster object to the + GWorld this mapping would be used: + \verbatim +GWorldTile.channelInterleave[0] = 1; // Map 24-bit red value to 32-bit red value +GWorldTile.channelInterleave[1] = 2; // Map 24-bit green value to 32bit green value +GWorldTile.channelInterleave[2] = 3; // Map 24-bit blue value to 32-bit blue value +GWorldTile.channelInterleave[3] = 0; // Unused, handled by the slice definition + \endverbatim + + Only three channels are mapped. The alpha channel of the GWorld receives + no information. To transfer from the GWorld back to the raster object, + this mapping would be used: + \verbatim +GWorldTile.channelInterleave[0] = 0; // Alpha channel ignored, handled by slice definition +GWorldTile.channelInterleave[1] = 0; // Map 32-bit red value to 24-bit red value +GWorldTile.channelInterleave[2] = 1; // Map 32-bit green value to 24bit green value +GWorldTile.channelInterleave[3] = 2; // Map 32-bit blue value to 24-bit blue value + \endverbatim + + Here the data in the alpha channel of the GWorld is not transferred + back to the raster object. + + This example sets the art-object slice’s \c front and \c back values + to limit the \c channelInterleave array: + \verbatim +GWorldTile.channelInterleave[0] = 1; // Map 24-bit red value to 32-bit red value +GWorldTile.channelInterleave[1] = 2; // Map 24-bit green value to 32bit green value +GWorldTile.channelInterleave[2] = 3; // Map 24-bit blue value to 32-bit blue value +GWorldTile.channelInterleave[3] = 0; // Unused, handled by the slice definition +artSlice.front = 0; +artSlice.back = 3; + \endverbatim + + Because \c artSlice.back is set to 3, only the color information for + the first three channels is copied. When transferring data from the + GWorld back to the raster art object, the GWorld’s slice controls the + channel interleave. To skip the alpha channel, \c GWorldSlice.front is + set to channel 1, causing channel 0 to be ignored. + + \verbatim +GWorldTile.channelInterleave[0] = 0; // Alpha channel is ignored, handled by the slice definition +GWorldTile.channelInterleave[1] = 0; // Map 32-bit red value to 24-bit red value +GWorldTile.channelInterleave[2] = 1; // Map 32-bit green value to 24bit green value +GWorldTile.channelInterleave[3] = 2; // Map 32-bit blue value to 24-bit blue value +GWorldSlice.front = 1; +GWorldSlice.back = 4; + \endverbatim + */ +typedef struct AIRasterSuite { + + /** Retrieves the raster record associated with a raster art object. + @param raster An art object of type \c #kRasterArt. + @param info [out] A buffer in which to return the raster record. + */ + AIAPI AIErr (*GetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info ); + + /** Associates a raster record with a raster art object. After setting + the record, use other functions such as \c #SetColorSpaceInfo() to + specify the image data configuration. + @param raster An art object of type \c #kRasterArt. + @param info The raster record. + */ + AIAPI AIErr (*SetRasterInfo) ( AIArtHandle raster, AIRasterRecord *info ); + + /** Retrieves the file information associated with a raster art object + for a link. (Direct linking of images is deprecated, although still supported. + Create linked objects using the \c #AIPlacedSuite.) + @param raster An art object of type \c #kRasterArt. + @param file [out] A buffer in which to return the file specification. + */ + AIAPI AIErr (*GetRasterFileSpecification) ( AIArtHandle raster, ai::FilePath& file ); + + /** Not implemented. Returns \c #kNotImplementedErr. */ + AIAPI AIErr (*SetRasterFileSpecification) ( AIArtHandle raster, const ai::FilePath& ); + + /** Retrieves the transformation matrix for a raster art object. This is the + concatenation of all transforms applied to the image after it was created. + It typically contains at least the initial translation and a scale; + see \c #SetRasterMatrix(). + @param raster An art object of type \c #kRasterArt. + @param matrix [out] A buffer in which to return the matrix. + */ + AIAPI AIErr (*GetRasterMatrix) ( AIArtHandle raster, AIRealMatrix *matrix ); + + /** Sets the transformation matrix for a raster art object. + All raster data is internally kept at 72 PPI and uses the object’s + scale to set a resolution. + @param raster An art object of type \c #kRasterArt. + @param matrix The new matrix. + */ + AIAPI AIErr (*SetRasterMatrix) ( AIArtHandle raster, AIRealMatrix *matrix ); + + /** Retrieves the raster image bounding box of a raster art object. + @param raster An art object of type \c #kRasterArt. + @param bbox [out] A buffer in which to return the bounding rectangle. + @note The raster bounding box, as specified for \c #SetRasterInfo() + or \c #SetRasterBoundingBox(), is not the same rectangle + as the artwork bounds, which Illustrator calculates + and provides for any art object. To do transformations, + use \c #AIArtSuite::GetArtBounds(). + */ + AIAPI AIErr (*GetRasterBoundingBox) ( AIArtHandle raster, AIRealRect *bbox ); + + /** Sets the raster image bounding box of a raster art object. + @param raster An art object of type \c #kRasterArt. + @param bbox The bounding rectangle for the raster image. + The top left value must be zero. The right value gives + the width and the bottom value the height. (The coordinate + system for a raster object is inverted on the vertical + axis with respect to the Illustrator artboard coordinate + system.) + @see \c #GetRasterBoundingBox(), \c #AIRasterRecord::bounds + */ + AIAPI AIErr (*SetRasterBoundingBox) ( AIArtHandle raster, AIRealRect *bbox ); + + /** Copies all or part of the pixel data for a raster art object into a + local buffer (a tile). Use with \c #SetRasterTile() to filter raster data. + @param raster An art object of type \c #kRasterArt. + @param artSlice The slice that defines a subset of the pixel map to be copied. + @param workTile The tile, which defines the data buffer in which + pixel data is returned, and parameters for the transfer operation. + @param workSlice The slice that defines a subset of the local data buffer + to which to copy data. Typically, the bounds are the same as those + of the work tile. + */ + AIAPI AIErr (*GetRasterTile) ( AIArtHandle raster, AISlice *artSlice, AITile *workTile, AISlice *workSlice ); + + /** Copies pixel data in a local buffer (a tile) to all or part of + a raster art object’s pixel map. This can be used, for instance, + when reading a raster file format into a new raster art object. + @param raster An art object of type \c #kRasterArt. + @param artSlice The slice that defines a subset of the pixel map to be replaced. + @param workTile The tile, which defines the data buffer in which + pixel data is returned, and parameters for the transfer operation. + @param workSlice The slice that defines a subset of the local data buffer + from which to copy data. Typically, the bounds are the same as those + of the work tile. + */ + AIAPI AIErr (*SetRasterTile) ( AIArtHandle raster, AISlice *artSlice, AITile *workTile, AISlice *workSlice ); + + /** Retrieves the link information for a raster object that is a link. + (Direct linking of images is deprecated, although still supported. + Create linked objects using the \c #AIPlacedSuite.) + @param raster An art object of type \c #kRasterArt. + @param link [out] A buffer in which to return the link information. + */ + AIAPI AIErr (*GetRasterLink) ( AIArtHandle raster, AIRasterLink &link ); + + /** Sets link information for a raster object. + (Direct linking of images is deprecated, although still supported. + Create linked objects using the \c #AIPlacedSuite.) + @param raster An art object of type \c #kRasterArt. + @param link The link information. + */ + AIAPI AIErr (*SetRasterLink) ( AIArtHandle raster, const AIRasterLink &link ); + + /** Retrieves the link information for a raster art object, and reloads + the raster data if needed. Marks the data as unmodified, but does not + change the embedded state. + + Depending on the option flags, this can force reload, regardless of + the embedded or modified state. If the flags do not specify that + resolution should be forced, it is done only if the linked to data + is more recent than the current copy. + + Attempting to resolve a link can fail for any of the following reasons: + \li No link source is specified + \li The link source is not found (\c #kRasterLinkFileNotFoundErr) + \li A plug-in that can load the link source data is not found + (\c #kRasterLinkPluginNotFoundErr) + \li The link source data cannot be read + \li Out of memory + + (Direct linking of images is deprecated, although still supported. + Create linked objects using the \c #AIPlacedSuite.) + @param raster An art object of type \c #kRasterArt. + @param flags Option flags for how the operation is performed. + A logical OR of \c #AIResolveRasterLinkFlags. + */ + AIAPI AIErr (*ResolveRasterLink) ( AIArtHandle raster, ai::int32 flags ); + + /** Retrieves the file information associated with a raster art object + that is a link, such as the time the file was created and last modified. + This information is stored with the object from when the file + was last read; compare to the current file information to check + if the file has changed.
+ (Direct linking of images is deprecated, although still supported. + Create linked objects using the \c #AIPlacedSuite.) + @param raster An art object of type \c #kRasterArt. + @param pSPFileInfo [out] A buffer in which to return the file information, + @see \c #GetRasterFileInfoFromFile() + */ + AIAPI AIErr (*GetRasterFileInfoFromArt) ( AIArtHandle raster, SPPlatformFileInfo *pSPFileInfo ); + + /** Retrieves the file information for the file associated with a raster art object + that is a link, such as the time the file was created and last modified. + Compare to the file information stored with the object to check + if the file has changed since it was last read.
+ (Direct linking of images is deprecated, although still supported. + Create linked objects using the \c #AIPlacedSuite.) + @param raster An art object of type \c #kRasterArt. + @param pSPFileInfo [out] A buffer in which to return the file information, + @see \c #GetRasterFileInfoFromArt() + */ + AIAPI AIErr (*GetRasterFileInfoFromFile) ( AIArtHandle raster, SPPlatformFileInfo *pSPFileInfo ); + + /** Retrieves the path for the file associated with a raster art object that is a link. +
(Direct linking of images is deprecated, although still supported. + Create linked objects using the \c #AIPlacedSuite.) + @param raster An art object of type \c #kRasterArt. + @param path [out] A buffer in which to return the platform-specific path. + */ + AIAPI AIErr (*GetRasterFilePathFromArt) ( AIArtHandle raster, ai::UnicodeString &path ); + + /** Retrieves the number of levels in the MIP map that stores the raster data + for a raster art object. + @param raster An art object of type \c #kRasterArt. + @param count [out] A buffer in which to return the number of levels + (Currently always 6.) + */ + AIAPI AIErr (*CountLevels) ( AIArtHandle raster, ai::int32* count ); + + /** Retrieves the bitmap format information for a level in the MIP map for + a raster art object. Use with \c #CountLevels() to iterate through levels. + @param raster An art object of type \c #kRasterArt. + @param level The 0-based level index. + @param info [out] A buffer in which to return the bitmap information. + @note In the returned raster record: + \li The \c flags are those you would get by querying the image + as a whole. + \li The \c bounds are those of the image at the given level of + the MIP map. Each level is a power of two less than the + previous one, with odd dimensions rounded up. For example, + levelWidth = (prevLevelWidth + 1) / 2 +
Do not rely on this algorithm, however. The only important + property maintained is that any rectangle contained within the base + image is contained within an image at a given level after + scaling to that level, even if its dimensions are rounded up. + \li The \c byteWidth is ignored. + \li The \c colorSpace and \c bitsPerPixel describe the format of + the pixel data at the given level of the MIP map (currently + always the same as that of the base image). The subsampled + levels of a bitmap's MIP map are bitmaps; random sampling is + used to avoid aliasing. + */ + AIAPI AIErr (*GetLevelInfo) ( AIArtHandle raster, ai::int32 level, AIRasterRecord *info ); + + /** Retrieves the tile information for a level in the MIP map for a + raster art object. Use with \c #CountLevels() to iterate through levels. + @param raster An art object of type \c #kRasterArt. + @param level The 0-based level index. + @param artSlice The slice that defines a subset of the pixel map to be copied. + @param workTile The tile, which defines the data buffer in which + pixel data is returned, and parameters for the transfer operation. + @param workSlice The slice that defines a subset of the local data buffer + to which to copy data. Typically, the bounds are the same as those + of the work tile. + @see \c #GetRasterTile() + */ + AIAPI AIErr (*GetLevelTile) ( AIArtHandle raster, ai::int32 level, AISlice *artSlice, + AITile *workTile, AISlice *workSlice ); + + /** Extracts an outline path from the image data, and enumerates the curves + to the supplied callback functions. + @param raster An art object of type \c #kRasterArt. + @param params Parameters that control the curve fitting, or \c NULL + to use defaults. Keep parameters within valid ranges to + avoid excessive performance impact. + @param consumer The developer-defined callbacks. + */ + AIAPI AIErr (*ExtractOutline) ( AIArtHandle raster, const AIRasterOutlineParams* params, + AIRasterOutlineConsumer* consumer ); + + /** Post-concatenate a transformation onto the matrix applied to a raster object. + @param raster An art object of type \c #kRasterArt. + @param concat The new transformation matrix information. + */ + AIAPI AIErr (*ConcatRasterMatrix) ( AIArtHandle raster, AIRealMatrix *concat ); + + /** Attaches additional color space information to a raster art object, + required for non-standard color spaces (Separation, NChannel, and Indexed). + @param raster An art object of type \c #kRasterArt. + @param cs The color space information, with the same number of + colors and channels as the color space specified in + the \c #AIRasterRecord::colorSpace. + */ + AIAPI AIErr (*SetColorSpaceInfo) ( AIArtHandle raster, const ai::ColorSpace &cs); + + /** Retrieves the additional color space information from a raster art object, + which is required for non-standard color spaces (Separation, NChannel, and Indexed). + @param raster An art object of type \c #kRasterArt. + @param cs [out] A buffer in which to return the color space information + @note If the raster is a colorized grayscale image, returns the actual color space + used for the colorization.
+ If the color space info for non-standard color space has not been specified, + returns an error code and an invalid color space. + */ + AIAPI AIErr (*GetColorSpaceInfo) ( AIArtHandle raster, ai::ColorSpace &cs); + + /** Enables or disables overprinting for a raster object. + @param raster An art object of type \c #kRasterArt. + @param enable True to enable overprint, false to disable it. + */ + AIAPI AIErr (*SetOverprint) ( AIArtHandle raster, AIBoolean enable); + + /** Retrieves the overprint status for a raster object. + @param raster An art object of type \c #kRasterArt. + @param enable [out] A buffer in which to return true if + overprint is enabled, false if it is disabled. + */ + AIAPI AIErr (*GetOverprint) ( AIArtHandle raster, AIBoolean *status ); + + /** Reports whether a raster object is a colorized grayscale or bitmap image. + @param raster An art object of type \c #kRasterArt. + @param isColorized [out] A buffer in which to return true if the raster + is a colorized grayscale or bitmap image. + @param isAdditive [out] Optional. A buffer in which to return true if the + raster should be interpreted as additive. + */ + AIAPI AIErr (*IsColorized) ( AIArtHandle raster, AIBoolean *isColorized, AIBoolean *isAdditive ); + + /** Clears the colorization on a colorized grayscale or bitmap image. + @param raster An art object of type \c #kRasterArt. + */ + AIAPI AIErr (*ClearColorization) ( AIArtHandle raster ); + /** Converts the colors in a raster object to a non-indexed color space. + @param raster [in, out] An art object of type \c #kRasterArt, which is modified in place. + @param dstCS The destination color space, which must not be indexed. + */ + AIAPI AIErr (*ConvertColors) ( AIArtHandle *raster, const ai::ColorSpace &dstCS ); + /** Inverts the colors in a raster object. + @param raster [in, out] An art object of type \c #kRasterArt, which is modified in place. + */ + AIAPI AIErr (*InvertColors) ( AIArtHandle *raster ); + + /** Decomposes a raster object into an array of rasters specified in the standard + color spaces (Gray, RGB, CMYK and spot Separation). + The alpha channel from the original raster is duplicated among all the + output rasters. + @param raster An art object of type \c #kRasterArt. + @param rasterArray [out] A buffer in which to return a pointer to a + block of memory containing the array of new raster art objects. + You must release the memory block when it is no longer + needed using \c #SPBasicSuite::FreeBlock(). + @param numRasters [out] A buffer in which to return the number of objects + in the raster array, 0 if no rasters are constructed. + @param flag How to treat CMYK process channels, one of the constants + \c #kAISplitRasterStandard or \c #kAISplitRasterSeparateProcess. + @see \c #InterleaveChannels() + */ + AIAPI AIErr (*SplitChannels) ( AIArtHandle raster, AIArtHandle **rasterArray, ai::int32 *numRasters, ai::uint32 flags ); + + /** Interleaves the color channels from an array of raster objects and + recombines them into a single raster. + The source rasters and the destination raster must have the same width and height. 1-bit bitmap rasters are + not allowed in the input raster array. The alpha channel of the output raster is the average of all the alpha + channels in the input raster array (if there are any). It is ok that not all the input rasters have alpha + channels. + @param rasterArray A pointer to a block of memory containing the array of raster art objects + to be interleaved. + @param numRasters The number of objects in the raster array. + @param raster [out] A buffer in which to return the combined raster, an + art object of type \c #kRasterArt. + @param flag Not used. Pass \c NULL. + @see \c #SplitChannels() + */ + AIAPI AIErr (*InterleaveChannels) ( AIArtHandle *rasterArray, ai::int32 numRasters, AIArtHandle *raster, ai::uint32 flags ); +} AIRasterSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterExport.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterExport.h new file mode 100644 index 0000000..fb460cf --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterExport.h @@ -0,0 +1,80 @@ +/************************************************************************* +* ADOBE CONFIDENTIAL +* ___________________ +* +* Copyright 2017 Adobe Systems Incorporated +* All Rights Reserved. +* +* NOTICE: All information contained herein is, and remains +* the property of Adobe Systems Incorporated and its suppliers, +* if any. The intellectual and technical concepts contained +* herein are proprietary to Adobe Systems Incorporated and its +* suppliers and are protected by all applicable intellectual property +* laws, including trade secret and copyright laws. +* Dissemination of this information or reproduction of this material +* is strictly forbidden unless prior written permission is obtained +* from Adobe Systems Incorporated. +**************************************************************************/ + + +#pragma once + +#include "AITypes.h" +#include "AIFilePath.h" +#include "AIDictionary.h" +#include "IAIRef.h" +#include "AIHeaderBegin.h" + + +#define kAIRasterExportSuite "AI Raster Export Suite" +#define kAIRasterExportSuiteVersion AIAPI_VERSION(1) + + +enum AIRasterFileFormats:ai::uint8 +{ + kAIFormatUnknown = 0, + kAIFormatPSD, + kAIFormatTIFF +}; + + +struct AIRasterExportSuite { + + // This function allows the client to export an art in various formats. It accepts several parameters: + // @param hRaster is the opaque reference to an art object which need not be raster art. API will rasterize it first. + // @param filePath is the location of exported file. + // @param AIRasterFileFormats are the supported file formats. + // @param ConstAIDictionaryRef is a dictionary variable taken up by the client. + /* + #include "AITIFFKeys.h" + #include "IAIDictionary.hpp" + #include "AIRasterExport.h" + #include "AITypes.h" + #include "AIDictionary.h" + #include "AIDictionaryKeyHelper.hpp" + + use_suite_required(AIRasterExport) + use_suite_required(AIDictionary) + + #define kAiAntiAlias "AntiAlias" + + DictionaryKeyDeclareAndDefine(kAIAntiAliasKey, kAiAntiAlias); + + AIErr ExportToTiff(const AIArtHandle hRaster, const ai::FilePath& path) + { + ai::Dictionary dict; + dict.Set(kAIAntiAliasKey, 1); + return sAIRasterExport->RasterExport(hRaster, path, kAIFormatTIFF, dict.get()); + } + + */ + AIAPI AIErr(*RasterExport)(const AIArtHandle hRaster, const ai::FilePath& filePath, AIRasterFileFormats format, + ai::Ref formatOptionsDict); + +}; + + +#include "AIHeaderEnd.h" + + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterTypes.h new file mode 100644 index 0000000..43f5eaa --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterTypes.h @@ -0,0 +1,93 @@ +/************************************************************************* + * ADOBE CONFIDENTIAL + * ___________________ + * + * Copyright 2018 Adobe Systems Incorporated + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe Systems Incorporated and its suppliers, + * if any. The intellectual and technical concepts contained + * herein are proprietary to Adobe Systems Incorporated and its + * suppliers and are protected by all applicable intellectual property + * laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe Systems Incorporated. + **************************************************************************/ + +#pragma once +#ifndef __AIRasterTypes__ +#define __AIRasterTypes__ + +namespace ai { + /** Color models for raster data */ + enum RasterColorSpace { + /** Flag indicating that the color model has an alpha channel. The alpha + component appears after the color components. */ + kColorSpaceHasAlpha = 0x10, + + /** Each pixel value for a gray color space has a single component + describing a grayscale value. The gray color space is additive so the minimum + value represents black and the maximum represents white. */ + kGrayColorSpace = 0, + /** Each pixel value for a RGB color space has three components which + represent red, green and blue respectively. The RGB color space is additive. */ + kRGBColorSpace = 1, + /** Each pixel value for a CMYK color space has four components which + represent cyan, magenta, yellow and black respectively. The CMYK color space + is subtractive. */ + kCMYKColorSpace = 2, + /** Not valid as an image type; can occur only in placed linked + files. See \c #AIPlacedSuite::GetRasterInfo(). */ + kLabColorSpace = 3, + /** Each pixel value for a separation color space has a single component + describing a tint value. The separation color space is subtractive so the minimum + value represents white and the maximum represents black. */ + kSeparationColorSpace = 4, + /** Each pixel value for an NChannel color space has of a variable number of + components which represent individual channels in the NChannel color space. + The process components of the color space could be either additive or subtractive. + The spot components of the color space are subtractive. */ + kNChannelColorSpace = 5, + /** Each pixel value for an indexed color space has a single component + describing an index value into a color lookup table. The number of components + in the color lookup table depends on the base color space of the indexed + color space. */ + kIndexedColorSpace = 6, + + /** A gray color space with an alpha channel. */ + kAlphaGrayColorSpace = (kGrayColorSpace | kColorSpaceHasAlpha), + /** An RGB color space with an alpha channel. */ + kAlphaRGBColorSpace = (kRGBColorSpace | kColorSpaceHasAlpha), + /** A CMYK color space with an alpha channel. */ + kAlphaCMYKColorSpace = (kCMYKColorSpace | kColorSpaceHasAlpha), + /** A LAB color space with an alpha channel. */ + kAlphaLabColorSpace = (kLabColorSpace | kColorSpaceHasAlpha), + /** A separation color space with an alpha channel. */ + kAlphaSeparationColorSpace = (kSeparationColorSpace | kColorSpaceHasAlpha), + /** An NChannel color space with an alpha channel. */ + kAlphaNChannelColorSpace = (kNChannelColorSpace | kColorSpaceHasAlpha), + /** An indexed color space with an alpha channel. */ + kAlphaIndexedColorSpace = (kIndexedColorSpace | kColorSpaceHasAlpha), + + kInvalidColorSpace = 0xFF + }; + + + /** Data states for \c #AIRasterLink::datastate. Direct linking of images is deprecated + (although still supported). Create linked objects using the \c #AIPlacedSuite. */ + enum RasterDataState { + /** No data is available for the image (for example, when a + document is opened and the linked file cannot be found). */ + kAIRasterNoData = 0, + /** Data is available and is the same data that was read from + the linked file (that is, it has not been modified since being read). */ + kAIRasterLinkData = 1, + /** Data is available and it has been modified since it was read from + the file (for example, a Photoshop filter might have been run on the image). */ + kAIRasterEditedData = 2 + }; +} + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterize.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterize.h index fc22b8c..56362ea 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterize.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRasterize.h @@ -1,421 +1,456 @@ -#ifndef __AIRasterize__ -#define __AIRasterize__ - -/* - * Name: AIRasterize.h - * $Revision: 8 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Rasterize Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIArtSet__ -#include "AIArtSet.h" -#endif - -#ifndef __AIColorConversion__ -#include "AIColorConversion.h" -#endif - -#ifndef __AIFixedMath__ -#include "AIFixedMath.h" -#endif - -#ifndef __AIRaster__ -#include "AIRaster.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIRasterize.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIRasterizeSuite "AI Rasterize Suite" -#define kAIRasterizeSuiteVersion10 AIAPI_VERSION(10) - -/* Latest version */ -#define kAIRasterizeSuiteVersion kAIRasterizeSuiteVersion10 -#define kAIRasterizeVersion kAIRasterizeSuiteVersion - -/** The default anti-aliasing factor when rasterizing with anti-aliasing. */ -#define kAIRasterizeDefaultAntialiasing 2 - - -/** @ingroup DictKeys - Key for the Live Effect rasterization parameter - dictionary, stored in the document dictionary. Provides - default settings for automatic rasterization that is part - of a Live Effect.*/ -#define kAIAutoRasterSettingsKey "AI Auto Rasterize" -/** @ingroup DictKeys - Default setting for automatic rasterization. - Entry value is an \c #AIRasterizeType. An integer. */ -#define kDefaultRasterizeType "colr" -/** @ingroup DictKeys - Default setting for automatic rasterization. - An integer, a dots-per-inch resolution value. */ -#define kDefaultRasterizeDPI "dpi." -/** @ingroup DictKeys - Default setting for automatic rasterization. - A boolean, whether to use anti-aliasing. */ -#define kDefaultRasterizeAlias "alis" -/** @ingroup DictKeys - Default setting for automatic rasterization. - A boolean, whether to preserve spot colors. If undefined, consider as false. */ -#define kDefaultRasterizePreserveSpot "spot" -/** @ingroup DictKeys - Default setting for automatic rasterization. - A boolean, whether to create a mask. */ -#define kDefaultRasterizeMask "mask" -/** @ingroup DictKeys - Default setting for automatic rasterization. - An \c AIReal, a number of document points for padding. */ -#define kDefaultRasterizePadding "padd" - - -/** If the document does not have auto-rasterize settings specified in the - document dictionary (see \c #kAIAutoRasterSettingsKey), - use the values stored in the application preferences under this key. */ -#define kRasterizePrefPrefix "Rasterize/Defaults" - - -/** @ingroup Errors - Returned when attempting to rasterize artwork with settings - that exceed the maximum width. The maximum width is affected - by the antialiasing factor and by the color model of the - target raster. See \c #AIRasterizeSuite. */ -#define kAIRasterizeTooWideErr 'R2Wd' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** The desired color model and opacity of generated raster art. - See \c #AIRasterizeSuite. */ -enum AIRasterizeType { - /** RGB no alpha */ - kRasterizeRGB = 0, - /** CMYK no alpha */ - kRasterizeCMYK, - /** Grayscale no alpha */ - kRasterizeGrayscale, - /** opaque bitmap */ - kRasterizeBitmap, - /** RGB with alpha */ - kRasterizeARGB, - /** CMYK with alpha */ - kRasterizeACMYK, - /** Grayscale with alpha */ - kRasterizeAGrayscale, - /** Bitmap with transparent 0-pixels */ - kRasterizeABitmap, - /** Separation no alpha */ - kRasterizeSeparation, - /** Separation with alpha */ - kRasterizeASeparation, - /** NChannel no alpha */ - kRasterizeNChannel, - /** NChannel with alpha */ - kRasterizeANChannel -}; - -/** Options for how to perform rasterization. Bit flags can - be combined with logical OR. */ -enum AIRasterizeOptions { - /** Clear all options */ - kRasterizeOptionsNone = 0, - /** When set, incorporates layer attributes (such as opacity and blend mode) - into the raster result. Otherwise, ignore layers in the input set. */ - kRasterizeOptionsDoLayers = 1, - /** When set, rasterize against a black background, rather than white. */ - kRasterizeOptionsAgainstBlack = 2, - /** When set, do not align 72 dpi images to the pixel grid. */ - kRasterizeOptionsDontAlign = 4, - /** When set, convert text to outlines before rasterizing it. */ - kRasterizeOptionsOutlineText = 8, - /** When set, do not supersample; preserve type hinting. */ - kRasterizeOptionsHinted = 16, - /** When set, use the Document Raster Effects Settings resolution. */ - kRasterizeOptionsUseEffectsRes = 32, - /** When set, use a minimum of 5 tiles when rasterizing with - anti-alias on (useful for better user feedback on progress bars). */ - kRasterizeOptionsUseMinTiles = 64, - /** When set, matte transparency with CMYK white. */ - kRasterizeOptionsCMYKWhiteMatting = 128, - /** When set, rasterize to spot-color raster when a single separation channel is sufficient. */ - kRasterizeOptionsSpotColorRasterOk = 256, - /** When set, rasterization to NChannel image is allowed. */ - kRasterizeOptionsNChannelOk = 512 -}; - -/** Rasterization settings are collected into a single structure - describing the type of raster desired, resolution, amount of - anti-aliasing and other options. */ -struct AIRasterizeSettings { - AIRasterizeSettings () : - type(kRasterizeGrayscale), - resolution(0), - antialiasing(1), - options(kRasterizeOptionsNone), - ccoptions(AIColorConvertOptions::kDefault), - preserveSpotColors(false) - { - } - AIRasterizeSettings ( AIRasterizeType iType, - AIReal iResolution, - short iAntialiasing, - AIRasterizeOptions iOptions, - AIColorConvertOptions iCcoptions, - AIBoolean iPreserveSpotColors) : - type(iType), - resolution(iResolution), - antialiasing(iAntialiasing), - options(iOptions), - ccoptions(iCcoptions), - preserveSpotColors(iPreserveSpotColors) - { - } - AIRasterizeSettings (const AIRasterizeSettings& src) : - type(src.type), - resolution(src.resolution), - antialiasing(src.antialiasing), - options(src.options), - ccoptions(src.ccoptions), - preserveSpotColors(src.preserveSpotColors) - { - } - AIRasterizeSettings& operator= (const AIRasterizeSettings& src) - { - type = src.type; - resolution = src.resolution; - antialiasing = src.antialiasing; - options = src.options; - ccoptions = src.ccoptions; - preserveSpotColors = src.preserveSpotColors; - return *this; - } - - /** Color model and bit depth of raster to be produced */ - AIRasterizeType type; - /** The resolution in dots-per-inch. Use 0 or 72 for 72 dpi */ - AIReal resolution; - /** The supersampling factor, less than 2 for none, 2 or more - for anti-aliasing. */ - short antialiasing; - /** Additional options for how rasterization is performed, - a logical OR of \c #AIRasterizeOptions. */ - AIRasterizeOptions options; - /** Color conversion options, a logical OR of \c #AIColorConvertOptions. */ - AIColorConvertOptions ccoptions; - /** When true, preserve spot colors when possible. */ - AIBoolean preserveSpotColors; -}; - -/** The image resampling method for \c #AIRasterizeSuite::ImageResample(). */ -enum AIResamplingType { - /** Default (anti-aliasing off). Fast, lowest quality */ - kSubsample = 0, - /** Averaging sample (anti-aliasing on). Slower, better quality */ - kDownsample, - /** Weighted average sample. Slowest, best quality */ - kBicubicDownsample - -}; - -/** Progress callback function prototype for rasterization. You can supply - this procedure to display a progress bar during a lengthy operation. - @param current The index of the current tile being rasterized. - @param total The total number of tiles to be rasterized. - @return False to cancel the operation, otherwise true. - */ -typedef AIAPI AIBoolean (*AIRasterizeProgressProc)(ai::int32 current, ai::int32 total); - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions that allow you to convert any art - set (see \c #AIArtSetSuite) into a single image, represented by - a standard raster art object (an art object of type \c #kRasterArt). - - You can specify the bounds of rasterization, the destination color space, - the image resolution, and whether the image will be anti-aliased. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIRasterizeSuite and \c #kAIRasterizeSuiteVersion. - */ -typedef struct { - -/** Retrieves the bounds for an entire art set. - @param artSet The art set object. - @param artBounds [out] A buffer in which to return the bounding rectangle. - @param honorCropBox When true, and if cropping has been set, \c artBounds - returns the crop box for the art. If false, or if no crop - box has been set, \c artBounds returns the entire bounding box. - */ - AIAPI AIErr (*ComputeArtBounds) ( AIArtSet artSet, - AIRealRect *artBounds, - AIBoolean honorCropBox ); - -/** Creates a raster art object from an art set. - @param artSet The art set object. - @param settings Settings that describe the type of raster desired, - resolution, amount of anti-aliasing and other options. - @param artBounds The bounding rectangle for the art - to rasterize, which can be the one returned by \c #ComputeArtBounds(). - @param paintOrder The paint order, relative to the \c prep object, - for the placement of the new object, an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param raster [out] A buffer in which to return the new raster art object. - @param progressProc A callback function that presents a progress dialog - during a lengthy operation. - */ - AIAPI AIErr (*Rasterize) ( AIArtSet artSet, - AIRasterizeSettings *settings, - AIRealRect *artBounds, - short paintOrder, - AIArtHandle prepArt, - AIArtHandle *raster, - AIRasterizeProgressProc progressProc ); - -/** Creates a clipping mask from the result of rasterization of an art set. - The function creates a clip group, places it in a new mask group, - and returns the mask group. The clip group contains a union of all - art objects in the art set, and an additional raster art object. - This is the same as setting "Create Clipping Mask" when using - the Object > Rasterize menu command. - @param artSet The art set object. The function disposes of the art - objects contained in this set, but does not dispose of this variable. - @param paintOrder The paint order, which determines how the - new mask group is placed relative to the raster art. - Must be \c #kPlaceAbove or \c #kPlaceBelow. - @param rasterArt A raster art object to be included in the clip group. - The result of a call to \c #Rasterize() on the supplied art set. - @param maskGroup [out] A buffer in which to return the new mask object. - */ - AIAPI AIErr (*CreateMask) ( AIArtSet artSet, - short paintOrder, - AIArtHandle rasterArt, - AIArtHandle *maskGroup ); - -/** Creates a raster art object from an art set, adding padding. - in both the horizontal and vertical dimension. - @param artSet The art set object. - @param settings Settings that describe the type of raster desired, - resolution, amount of anti-aliasing and other options. - If the setting specify an alpha channel, the padding pixels - are fully transparent. Otherwise, they are white. - @param artBounds The bounding rectangle for the art - to rasterize, which can be the one returned by \c #ComputeArtBounds(). - @param paintOrder The paint order, relative to the \c prep object, - for the placement of the new object, an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param raster [out] A buffer in which to return the new raster art object. - @param progressProc A callback function that presents a progress dialog - during a lengthy operation. - @param padding The amount of padding to add to the resulting raster image, - a number of document points. - */ - AIAPI AIErr (*RasterizeWithPadding) ( AIArtSet artSet, - AIRasterizeSettings *settings, - AIRealRect *artBounds, - short paintOrder, - AIArtHandle prepArt, - AIArtHandle *raster, - AIRasterizeProgressProc progressProc, - AIReal padding ); - -/** Creates a raster art object from all of the art in the current document. - @param settings Settings that describe the type of raster desired, - resolution, amount of anti-aliasing and other options. - @param artBounds The bounding rectangle for the art - to rasterize, which can be the one returned by \c #ComputeArtBounds(). - @param paintOrder The paint order, relative to the \c prep object, - for the placement of the new object, an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param raster [out] A buffer in which to return the new raster art object. - @param progressProc A callback function that presents a progress dialog - during a lengthy operation. - @param options A set of option flags that control how the rasterization is performed. - A logical OR of \c #AIRasterizeOptions. - */ - AIAPI AIErr (*RasterizeDocument) ( AIRasterizeSettings *settings, - short paintOrder, - AIArtHandle prepArt, - AIArtHandle *raster, - AIRasterizeProgressProc progressProc, - ai::int32 options ); - -/** Creates a new raster object by downsampling an existing raster object. - @param rasterArt The raster art object. - @param flag The type of sampling to perform, trading off speed and quality. - @param resolution The resolution for the resulting image, in dots-per-inch (dpi) - or equivalently displayed as pixels-per-inch (ppi) in the UI. - @param paintOrder The paint order, relative to the \c prep object, - for the placement of the new object, an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newRasterArt [out] A buffer in which to return the new raster art object. - */ - - AIAPI AIErr (*ImageResample) (AIArtHandle rasterArt, - const AIResamplingType flag, - const AIReal resolution, - const short paintOrder, - AIArtHandle prepArt, - AIArtHandle *newRasterArt); - -/** Reports whether rasterization can preserve spot colors for an art set. - @param artSet The art set object. - @param canPreserveSpotColor [out] A buffer in which to return true - if spot colors can be preserved. - */ - - AIAPI AIErr (*CheckSpotColorPreservation) (AIArtSet artSet, - AIBoolean *canPreserveSpotColor); - -} AIRasterizeSuite; - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIRasterize__ +#define __AIRasterize__ + +/* + * Name: AIRasterize.h + * $Revision: 8 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Rasterize Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIArtSet__ +#include "AIArtSet.h" +#endif + +#ifndef __AIColorConversion__ +#include "AIColorConversion.h" +#endif + +#ifndef __AIFixedMath__ +#include "AIFixedMath.h" +#endif + +#ifndef __AIRaster__ +#include "AIRaster.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIRasterize.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIRasterizeSuite "AI Rasterize Suite" +#define kAIRasterizeSuiteVersion12 AIAPI_VERSION(12) + +/* Latest version */ +#define kAIRasterizeSuiteVersion kAIRasterizeSuiteVersion12 +#define kAIRasterizeVersion kAIRasterizeSuiteVersion + +/** The default anti-aliasing factor when rasterizing with anti-aliasing. */ +#define kAIRasterizeDefaultAntialiasing 2 + + +/** @ingroup DictKeys + Key for the Live Effect rasterization parameter + dictionary, stored in the document dictionary. Provides + default settings for automatic rasterization that is part + of a Live Effect.*/ +#define kAIAutoRasterSettingsKey "AI Auto Rasterize" +/** @ingroup DictKeys + Default setting for automatic rasterization. + Entry value is an \c #AIRasterizeType. An integer. */ +#define kDefaultRasterizeType "colr" +/** @ingroup DictKeys + Default setting for automatic rasterization. + An integer, a dots-per-inch resolution value. */ +#define kDefaultRasterizeDPI "dpi." +/** @ingroup DictKeys + Default setting for automatic rasterization. + A boolean, whether to use anti-aliasing. */ +#define kDefaultRasterizeAlias "alis" +/** @ingroup DictKeys + Default setting for automatic rasterization. + A boolean, whether to preserve spot colors. If undefined, consider as false. */ +#define kDefaultRasterizePreserveSpot "spot" +/** @ingroup DictKeys + Default setting for automatic rasterization. + A boolean, whether to create a mask. */ +#define kDefaultRasterizeMask "mask" +/** @ingroup DictKeys + Default setting for automatic rasterization. + An \c AIReal, a number of document points for padding. */ +#define kDefaultRasterizePadding "padd" + + +/** If the document does not have auto-rasterize settings specified in the + document dictionary (see \c #kAIAutoRasterSettingsKey), + use the values stored in the application preferences under this key. */ +#define kRasterizePrefPrefix "Rasterize/Defaults" + + +/** @ingroup Errors + Returned when attempting to rasterize artwork with settings + that exceed the maximum width. The maximum width is affected + by the antialiasing factor and by the color model of the + target raster. See \c #AIRasterizeSuite. */ +#define kAIRasterizeTooWideErr 'R2Wd' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** The desired color model and opacity of generated raster art. + See \c #AIRasterizeSuite. */ +enum AIRasterizeType { + /** RGB no alpha */ + kRasterizeRGB = 0, + /** CMYK no alpha */ + kRasterizeCMYK, + /** Grayscale no alpha */ + kRasterizeGrayscale, + /** opaque bitmap */ + kRasterizeBitmap, + /** RGB with alpha */ + kRasterizeARGB, + /** CMYK with alpha */ + kRasterizeACMYK, + /** Grayscale with alpha */ + kRasterizeAGrayscale, + /** Bitmap with transparent 0-pixels */ + kRasterizeABitmap, + /** Separation no alpha */ + kRasterizeSeparation, + /** Separation with alpha */ + kRasterizeASeparation, + /** NChannel no alpha */ + kRasterizeNChannel, + /** NChannel with alpha */ + kRasterizeANChannel +}; + +/** Options for how to perform rasterization. Bit flags can + be combined with logical OR. */ +enum AIRasterizeOptions { + /** Clear all options */ + kRasterizeOptionsNone = 0, + /** When set, incorporates layer attributes (such as opacity and blend mode) + into the raster result. Otherwise, ignores layers in the input set. */ + kRasterizeOptionsDoLayers = 1<<0, + /** When set, rasterize against a black background, rather than white. */ + kRasterizeOptionsAgainstBlack = 1<<1, + /** When set, does not align 72 dpi images to the pixel grid. */ + kRasterizeOptionsDontAlign = 1<<2, + /** When set, converts text to outlines before rasterizing it. */ + kRasterizeOptionsOutlineText = 1<<3, + /** When set, does not supersamples; preserves type hinting. */ + kRasterizeOptionsHinted = 1<<4, + /** When set, uses the Document Raster Effects Settings resolution. */ + kRasterizeOptionsUseEffectsRes = 1<<5, + /** When set, uses a minimum of 5 tiles when rasterizing with + anti-alias on (useful for better user feedback on progress bars). */ + kRasterizeOptionsUseMinTiles = 1<<6, + /** When set, matte transparency with CMYK white. */ + kRasterizeOptionsCMYKWhiteMatting = 1<<7, + /** When set, rasterizes to spot-color raster when a single separation channel is sufficient. */ + kRasterizeOptionsSpotColorRasterOk = 1<<8, + /** When set, rasterization to NChannel image is allowed. */ + kRasterizeOptionsNChannelOk = 1<<9, + /** [Internal] When set, fill path and stroke with black color and ignore transparency */ + kFillBlackAndIgnoreTransparancy = 1<<10 +}; + +/** Rasterization settings are collected into a single structure + describing the type of raster desired, resolution, amount of + anti-aliasing, and other options. */ +struct AIRasterizeSettings { + AIRasterizeSettings () : + type(kRasterizeGrayscale), + resolution(0), + antialiasing(1), + options(kRasterizeOptionsNone), + ccoptions(AIColorConvertOptions::kDefault), + preserveSpotColors(false) + { + } + AIRasterizeSettings ( AIRasterizeType iType, + AIReal iResolution, + short iAntialiasing, + AIRasterizeOptions iOptions, + AIColorConvertOptions iCcoptions, + AIBoolean iPreserveSpotColors) : + type(iType), + resolution(iResolution), + antialiasing(iAntialiasing), + options(iOptions), + ccoptions(iCcoptions), + preserveSpotColors(iPreserveSpotColors) + { + } + AIRasterizeSettings (const AIRasterizeSettings& src) : + type(src.type), + resolution(src.resolution), + antialiasing(src.antialiasing), + options(src.options), + ccoptions(src.ccoptions), + preserveSpotColors(src.preserveSpotColors) + { + } + AIRasterizeSettings& operator= (const AIRasterizeSettings& src) + { + type = src.type; + resolution = src.resolution; + antialiasing = src.antialiasing; + options = src.options; + ccoptions = src.ccoptions; + preserveSpotColors = src.preserveSpotColors; + return *this; + } + + /** Color model and bit depth of raster to be produced */ + AIRasterizeType type; + /** The resolution in dots-per-inch. Use 0 or 72 for 72 dpi */ + AIReal resolution; + /** The supersampling factor, less than 2 for none, 2 or more + for anti-aliasing. */ + short antialiasing; + /** Additional options for how rasterization is performed, + a logical OR of \c #AIRasterizeOptions. */ + AIRasterizeOptions options; + /** Color conversion options, a logical OR of \c #AIColorConvertOptions. */ + AIColorConvertOptions ccoptions; + /** When true, preserve spot colors wherever possible. */ + AIBoolean preserveSpotColors; +}; + +/** The image resampling method for \c #AIRasterizeSuite::ImageResample(). */ +enum AIResamplingType { + /** Default (anti-aliasing off). Fast, lowest quality */ + kSubsample = 0, + /** Averaging sample (anti-aliasing on). Slower, better quality */ + kDownsample, + /** Weighted average sample. Slowest, best quality */ + kBicubicDownsample + +}; + +/** Progress callback function prototype for rasterization. You can supply + this procedure to display a progress bar during a lengthy operation. + @param current The index of the current tile being rasterized. + @param total The total number of tiles to be rasterized. + @return False to cancel the operation; otherwise true. + */ +typedef AIAPI AIBoolean (*AIRasterizeProgressProc)(ai::int32 current, ai::int32 total); + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite provides functions that allow you to convert any art + set (see \c #AIArtSetSuite) into a single image, represented by + a standard raster art object (an art object of type \c #kRasterArt). + + You can specify the bounds of rasterization, the destination color space, + the image resolution, and whether the image will be anti-aliased. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIRasterizeSuite and \c #kAIRasterizeSuiteVersion. + */ +typedef struct { + +/** Retrieves the bounds for an entire art set. + @param artSet The art set object. + @param artBounds [out] A buffer in which to return the bounding rectangle. + @param honorCropBox When true, and if cropping has been set, \c artBounds + returns the crop box for the art. If false, or if no crop + box has been set, \c artBounds returns the entire bounding box. + */ + AIAPI AIErr (*ComputeArtBounds) ( AIArtSet artSet, + AIRealRect *artBounds, + AIBoolean honorCropBox ); + +/** Creates a raster art object from an art set. + @param artSet The art set object. + @param settings Settings that describe the type of raster desired, + resolution, amount of anti-aliasing, and other options. + @param artBounds The bounding rectangle for the art + to rasterize, which can be the one returned by \c #ComputeArtBounds(). + @param paintOrder The paint order, relative to the \c prep object, + for the placement of the new object, an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param raster [out] A buffer in which to return the new raster art object. + @param progressProc A callback function that presents a progress dialog + during a lengthy operation. + */ + AIAPI AIErr (*Rasterize) ( AIArtSet artSet, + AIRasterizeSettings *settings, + AIRealRect *artBounds, + short paintOrder, + AIArtHandle prepArt, + AIArtHandle *raster, + AIRasterizeProgressProc progressProc ); + +/** Creates a clipping mask from the result of rasterization of an art set. + The function creates a clip group, places it in a new mask group, + and returns the mask group. The clip group contains a union of all + art objects in the art set, and an additional raster art object. + This is the same as setting "Create Clipping Mask" when using + the Object > Rasterize menu command. + @param artSet The art set object. The function disposes of the art + objects contained in this set, but does not dispose off this variable. + @param paintOrder The paint order, which determines how the + new mask group is placed relative to the raster art. + Must be \c #kPlaceAbove or \c #kPlaceBelow. + @param rasterArt A raster art object to be included in the clip group. + The result of a call to \c #Rasterize() on the supplied art set. + @param maskGroup [out] A buffer in which to return the new mask object. + */ + AIAPI AIErr (*CreateMask) ( AIArtSet artSet, + short paintOrder, + AIArtHandle rasterArt, + AIArtHandle *maskGroup ); + +/** Creates a raster art object from an art set, adding padding + in both the horizontal and vertical dimensions. + @param artSet The art set object. + @param settings Settings that describe the type of raster desired, + resolution, amount of anti-aliasing, and other options. + If the setting specify an alpha channel, the padding pixels + are fully transparent. Otherwise, they are white. + @param artBounds The bounding rectangle for the art + to rasterize, which can be the one returned by \c #ComputeArtBounds(). + @param paintOrder The paint order, relative to the \c prep object, + for the placement of the new object, an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param raster [out] A buffer in which to return the new raster art object. + @param progressProc A callback function that presents a progress dialog + during a lengthy operation. + @param padding The amount of padding to add to the resulting raster image, + a number of document points. + */ + AIAPI AIErr (*RasterizeWithPadding) ( AIArtSet artSet, + AIRasterizeSettings *settings, + AIRealRect *artBounds, + short paintOrder, + AIArtHandle prepArt, + AIArtHandle *raster, + AIRasterizeProgressProc progressProc, + AIReal padding ); + +/** Creates a raster art object from all of the art in the current document. + @param settings Settings that describe the type of raster desired, + resolution, amount of anti-aliasing and other options. + @param artBounds The bounding rectangle for the art + to rasterize, which can be the one returned by \c #ComputeArtBounds(). + @param paintOrder The paint order, relative to the \c prep object, + for the placement of the new object, an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param raster [out] A buffer in which to return the new raster art object. + @param progressProc A callback function that presents a progress dialog + during a lengthy operation. + @param options A set of option flags that control how the rasterization is performed. + A logical OR of \c #AIRasterizeOptions. + */ + AIAPI AIErr (*RasterizeDocument) ( AIRasterizeSettings *settings, + short paintOrder, + AIArtHandle prepArt, + AIArtHandle *raster, + AIRasterizeProgressProc progressProc, + ai::int32 options ); + +/** Creates a new raster object by downsampling an existing raster object. + @param rasterArt The raster art object. + @param flag The type of sampling to perform, trading off speed and quality. + @param resolution The resolution for the resulting image, in dots-per-inch (dpi) + or equivalently displayed as pixels-per-inch (ppi) in the UI. + @param paintOrder The paint order, relative to the \c prep object, + for the placement of the new object, an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param newRasterArt [out] A buffer in which to return the new raster art object. + */ + + AIAPI AIErr (*ImageResample) (AIArtHandle rasterArt, + const AIResamplingType flag, + const AIReal resolution, + const short paintOrder, + AIArtHandle prepArt, + AIArtHandle *newRasterArt); + +/** Reports whether rasterization can preserve spot colors for an art set. + @param artSet The art set object. + @param canPreserveSpotColor [out] A buffer in which to return true + if spot colors can be preserved. + */ + + AIAPI AIErr (*CheckSpotColorPreservation) (AIArtSet artSet, + AIBoolean *canPreserveSpotColor); + + AIAPI void (*SnapRasterRectToPixelGrid)(AIRealRect &rect, AIReal ppi); + + + /** Creates a raster art object from an art set, adding padding + in both the horizontal and vertical dimensions. + @param artSet The art set object. + @param settings Settings that describe the type of raster desired, + resolution, amount of anti-aliasing, and other options. + If the setting specify an alpha channel, the padding pixels + are fully transparent. Otherwise, they are white. + @param artBounds The bounding rectangle for the art + to rasterize, which can be the one returned by \c #ComputeArtBounds(). + @param paintOrder The paint order, relative to the \c prep object, + for the placement of the new object, an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param raster [out] A buffer in which to return the new raster art object. + @param progressProc A callback function that presents a progress dialog + during a lengthy operation. + @param padding The amount of padding to add to the resulting raster image, + a number of document points. + @param bgColor The color to be filled in the padded area. Supported color types are RGB and CMYK process colors. + */ + AIAPI AIErr (*RasterizeWithPaddingAndBGColor) ( AIArtSet artSet, + AIRasterizeSettings *settings, + AIRealRect *artBounds, + short paintOrder, + AIArtHandle prepArt, + AIArtHandle *raster, + AIRasterizeProgressProc progressProc, + AIReal padding, + AIColor* bgColor); + + +} AIRasterizeSuite; + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealBezier.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealBezier.h index 135a8fe..2228e9a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealBezier.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealBezier.h @@ -1,213 +1,213 @@ -#ifndef __AIRealBezier__ -#define __AIRealBezier__ - -/* - * Name: AIRealBezier.h - * Purpose: Adobe Illustrator bezier suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIRealBezier.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIRealBezierSuite "AI Real Bezier Suite" -#define kAIRealBezierSuiteVersion4 AIAPI_VERSION(4) -#define kAIRealBezierSuiteVersion kAIRealBezierSuiteVersion4 -#define kAIRealBezierVersion kAIRealBezierSuiteVersion - -/** Return values for \c #AIRealBezierSuite::AdjustThroughPoint(). */ -enum AIAdjustThroughPointResult { - /** Same slope, but opposite side of p0 */ - kAIBezierAdjustReflectedp1 = 1, - /** Same slope, but opposite side of p3 */ - kAIBezierAdjustReflectedp2 = 2, - /** Different slope for p0 to p1 */ - kAIBezierAdjustRotatedp1 = 4, - /** Different slope for p3 to p2 */ - kAIBezierAdjustRotatedp2 = 8 -}; - -/******************************************************************************* - ** - ** Typedefs - ** - **/ - -/** A cubic Bezier, defined by its four control points. */ -typedef struct { - AIRealPoint p0; - AIRealPoint p1; - AIRealPoint p2; - AIRealPoint p3; -} AIRealBezier, *AIRealBezierPtr; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides utilities for working with cubic Beziers curves. - - Most of the functions in this suite do not return \c #AIErr values. - For the most part, they return nothing, or return the result of the operation. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIRealBezierSuite and \c #kAIRealBezierVersion. - */ -typedef struct { - - /** Sets the four control points that define a cubic Bezier. - @param b The Bezier object. - @param p0 The first point. - @param p1 The second point. - @param p2 The third point. - @param p3 The fourth point. - */ - AIAPI void (*Set) (AIRealBezier* b, AIRealPoint* p0, AIRealPoint* p1, - AIRealPoint* p2, AIRealPoint* p3); - /** Translates a cubic Bezier by a vector. - @param b The Bezier object. - @param dh The horizontal vector value. - @param dv The vertical vector value. - */ - AIAPI void (*Offset) (AIRealBezier* b, AIReal dh, AIReal dv); - - /** Applies a transformation matrix to a cubic Bezier. - @param b The Bezier object. - @param m The transformation matrix. - */ - AIAPI void (*Transform) (AIRealBezier* b, AIRealMatrix* m); - - /** Finds a point for a given input to a cubic Bezier. - @param b The Bezier object. - @param t The input value. - @param p [out] A buffer in which to return the corresponding point. - */ - AIAPI void (*Evaluate) (AIRealBezier* b, AIReal t, AIRealPoint* p); - - /** Finds a tangent for a given input to a cubic Bezier. - @param b The Bezier object. - @param t The input value. - @param v [out] A buffer in which to return the corresponding tangent. - */ - AIAPI void (*Tangent) (AIRealBezier* b, AIReal t, AIRealPoint* v); - - /** Finds the normal for a given input to a cubic Bezier. - @param b The Bezier object. - @param t The input value. - @param v [out] A buffer in which to return the corresponding normal. - */ - AIAPI void (*Normal) (AIRealBezier* b, AIReal t, AIRealPoint* v); - - /** Splits a cubic Bezier at a point that results from a given input value. - Either \c b1 or \c b2 may be null. - @param b The Bezier object. - @param t The input value for the point at which to split. - @param b1 [out] A buffer in which to return the cubic Bezier for the first half. - @param b2 [out] A buffer in which to return the cubic Bezier for the second half. - */ - AIAPI void (*Divide) (AIRealBezier* b, AIReal t, AIRealBezier* b1, - AIRealBezier* b2); - - /** Reports whether a cubic Bezier intersects a rectangle. Draws the Bezier - curve into a bitmap, and tests whether any of the marked pixels are - contained within the supplied rectangle. - (Note that this function returns a boolean value, not an error code.) - @param b The Bezier object. - @param r The rectangle. - @param scale The scale factor for bitmap resolution, a percentage - value where 1.0 (100%) is 72 DPI. - @return True if the bezier intersects the rectangle, false otherwise. - */ - AIAPI AIBoolean (*IntersectsRect)(AIRealBezier* b, AIRealRect* r, AIReal scale); - - // New for AI8.0. - - /** Calculates the length of a cubic Bezier curve. - (Note that this function returns a numeric value, not an error code.) - @param b The Bezier object. - @param flatness The accuracy with which to approximate the curve. - A number of document points that is the maximum allowed distance - of any line segment, at its furthest point, from the curve it - approximates. - @return The length in document points. - */ - AIAPI AIReal (*Length) (AIRealBezier* b, AIReal flatness); - - /** Finds the point and tangent for a given input to a cubic Bezier. - This convenience function is the same as calling both - \c #Evaluate() and \c #Tangent(). - @param b The Bezier object. - @param t The input value. - @param p [out] A buffer in which to return the point. - @param v [out] A buffer in which to return the tangent. - */ - AIAPI void (*PointAndTangent) (AIRealBezier* b, AIReal t, AIRealPoint* p, AIRealPoint *v); - - /** Adjusts a cubic Bezier such that it passes through a given input value. - (Note that this function returns a constant value, not an error code.) - @param b The Bezier object. - @param p The point. - @param t The input value. - @return An \c #AIAdjustThroughPointResult value that indicates - how the Bezier was adjusted. - */ - AIAPI ai::uint16 (*AdjustThroughPoint) (AIRealBezier* b, AIRealPoint* p, AIReal t); - - // New for AI12 - - /** Finds the input value to a cubic Bezier that results in a point - at a given distance along the curve. - @param bez The Bezier object. - @param length The distance in points, must be less than the total length - of the curve. - @param total_length the total length of the curve. See \c #Length(). - @param flatness The accuracy with which to approximate the curve. - A value of 1e-2 is suggested. - @param t [out] A buffer in which to return the input value. - */ - AIAPI AIErr (*TAtLength) ( AIRealBezier* bez , - AIReal length , - AIReal total_length , - AIReal flatness, - AIReal* t ); - -} AIRealBezierSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIRealBezier__ +#define __AIRealBezier__ + +/* + * Name: AIRealBezier.h + * Purpose: Adobe Illustrator bezier suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIRealBezier.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIRealBezierSuite "AI Real Bezier Suite" +#define kAIRealBezierSuiteVersion4 AIAPI_VERSION(4) +#define kAIRealBezierSuiteVersion kAIRealBezierSuiteVersion4 +#define kAIRealBezierVersion kAIRealBezierSuiteVersion + +/** Return values for \c #AIRealBezierSuite::AdjustThroughPoint(). */ +enum AIAdjustThroughPointResult { + /** Same slope, but opposite side of p0 */ + kAIBezierAdjustReflectedp1 = 1, + /** Same slope, but opposite side of p3 */ + kAIBezierAdjustReflectedp2 = 2, + /** Different slope for p0 to p1 */ + kAIBezierAdjustRotatedp1 = 4, + /** Different slope for p3 to p2 */ + kAIBezierAdjustRotatedp2 = 8 +}; + +/******************************************************************************* + ** + ** Typedefs + ** + **/ + +/** A cubic Bezier, defined by its four control points. */ +typedef struct { + AIRealPoint p0; + AIRealPoint p1; + AIRealPoint p2; + AIRealPoint p3; +} AIRealBezier, *AIRealBezierPtr; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides utilities for working with cubic Beziers curves. + + Most of the functions in this suite do not return \c #AIErr values. + For the most part, they return nothing, or return the result of the operation. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIRealBezierSuite and \c #kAIRealBezierVersion. + */ +typedef struct { + + /** Sets the four control points that define a cubic Bezier. + @param b The Bezier object. + @param p0 The first point. + @param p1 The second point. + @param p2 The third point. + @param p3 The fourth point. + */ + AIAPI void (*Set) (AIRealBezier* b, AIRealPoint* p0, AIRealPoint* p1, + AIRealPoint* p2, AIRealPoint* p3); + /** Translates a cubic Bezier by a vector. + @param b The Bezier object. + @param dh The horizontal vector value. + @param dv The vertical vector value. + */ + AIAPI void (*Offset) (AIRealBezier* b, AIReal dh, AIReal dv); + + /** Applies a transformation matrix to a cubic Bezier. + @param b The Bezier object. + @param m The transformation matrix. + */ + AIAPI void (*Transform) (AIRealBezier* b, AIRealMatrix* m); + + /** Finds a point for a given input to a cubic Bezier. + @param b The Bezier object. + @param t The input value. + @param p [out] A buffer in which to return the corresponding point. + */ + AIAPI void (*Evaluate) (AIRealBezier* b, AIReal t, AIRealPoint* p); + + /** Finds a tangent for a given input to a cubic Bezier. + @param b The Bezier object. + @param t The input value. + @param v [out] A buffer in which to return the corresponding tangent. + */ + AIAPI void (*Tangent) (AIRealBezier* b, AIReal t, AIRealPoint* v); + + /** Finds the normal for a given input to a cubic Bezier. + @param b The Bezier object. + @param t The input value. + @param v [out] A buffer in which to return the corresponding normal. + */ + AIAPI void (*Normal) (AIRealBezier* b, AIReal t, AIRealPoint* v); + + /** Splits a cubic Bezier at a point that results from a given input value. + Either \c b1 or \c b2 may be null. + @param b The Bezier object. + @param t The input value for the point at which to split. + @param b1 [out] A buffer in which to return the cubic Bezier for the first half. + @param b2 [out] A buffer in which to return the cubic Bezier for the second half. + */ + AIAPI void (*Divide) (AIRealBezier* b, AIReal t, AIRealBezier* b1, + AIRealBezier* b2); + + /** Reports whether a cubic Bezier intersects a rectangle. Draws the Bezier + curve into a bitmap, and tests whether any of the marked pixels are + contained within the supplied rectangle. + (Note that this function returns a boolean value, not an error code.) + @param b The Bezier object. + @param r The rectangle. + @param scale The scale factor for bitmap resolution, a percentage + value where 1.0 (100%) is 72 DPI. + @return True if the bezier intersects the rectangle, false otherwise. + */ + AIAPI AIBoolean (*IntersectsRect)(AIRealBezier* b, AIRealRect* r, AIReal scale); + + // New for AI8.0. + + /** Calculates the length of a cubic Bezier curve. + (Note that this function returns a numeric value, not an error code.) + @param b The Bezier object. + @param flatness The accuracy with which to approximate the curve. + A number of document points that is the maximum allowed distance + of any line segment, at its furthest point, from the curve it + approximates. + @return The length in document points. + */ + AIAPI AIReal (*Length) (AIRealBezier* b, AIReal flatness); + + /** Finds the point and tangent for a given input to a cubic Bezier. + This convenience function is the same as calling both + \c #Evaluate() and \c #Tangent(). + @param b The Bezier object. + @param t The input value. + @param p [out] A buffer in which to return the point. + @param v [out] A buffer in which to return the tangent. + */ + AIAPI void (*PointAndTangent) (AIRealBezier* b, AIReal t, AIRealPoint* p, AIRealPoint *v); + + /** Adjusts a cubic Bezier such that it passes through a given input value. + (Note that this function returns a constant value, not an error code.) + @param b The Bezier object. + @param p The point. + @param t The input value. + @return An \c #AIAdjustThroughPointResult value that indicates + how the Bezier was adjusted. + */ + AIAPI ai::uint16 (*AdjustThroughPoint) (AIRealBezier* b, AIRealPoint* p, AIReal t); + + // New for AI12 + + /** Finds the input value to a cubic Bezier that results in a point + at a given distance along the curve. + @param bez The Bezier object. + @param length The distance in points, must be less than the total length + of the curve. + @param total_length the total length of the curve. See \c #Length(). + @param flatness The accuracy with which to approximate the curve. + A value of 1e-2 is suggested. + @param t [out] A buffer in which to return the input value. + */ + AIAPI AIErr (*TAtLength) ( AIRealBezier* bez , + AIReal length , + AIReal total_length , + AIReal flatness, + AIReal* t ); + +} AIRealBezierSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealMath.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealMath.h index b33b758..8c60093 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealMath.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRealMath.h @@ -1,711 +1,721 @@ -#ifndef __AIRealMath__ -#define __AIRealMath__ - -/* - * Name: AIRealMath.h - * $Revision: 28 $ - * Author: - * Date: - * Purpose: Adobe Illustrator AIReal Math Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include // for floor and ceil -#include - -#include "AIHeaderBegin.h" - -/** @file AIRealMath.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIRealMathSuite "AI Real Math Suite" -#define kAIRealMathSuiteVersion AIAPI_VERSION(4) -#define kAIRealMathVersion kAIRealMathSuiteVersion - -// Most of this stuff is completely unnecessary, and is just here to ease the -// transition between Fixed and AIReal. We should probably make a later pass -// to clean the unnecessary stuff out. - -// common AIReal constants -#define kAIRealMax ((AIReal)(DBL_MAX / 10.0F)) -#define kAIRealMin ((AIReal)-(DBL_MAX / 10.0F)) -#define kAIRealUnknown ((AIReal)DBL_MAX) - -#define kAIFloatUnknown ((AIFloat)FLT_MAX) - -#ifndef kAIRealOne -#define kAIRealOne ((AIReal) 1.0) -#endif -#ifndef kAIRealZero -#define kAIRealZero ((AIReal) 0.0) -#endif - -#ifndef kAIFloatOne -#define kAIFloatOne (1.0f) -#endif - -#ifndef kAIFloatZero -#define kAIFloatZero (0.0f) -#endif - -#define kAIRealHundredth ((AIReal) 0.01) -#define kAIRealSixteenth ((AIReal) (1.0/16.0)) -#define kAIRealTenth ((AIReal) 0.1) -#define kAIRealEighth ((AIReal) 0.125) - -#ifndef kAIRealQuarter -#define kAIRealQuarter ((AIReal) 0.25) -#endif - -#ifndef kAIRealHalf -#define kAIRealHalf ((AIReal) 0.5) -#endif - -#define kAIRealSevenEighths ((AIReal) 0.875) -#define kAIRealOneThird ((AIReal) (1.0/3.0)) -#define kAIRealTwoThirds ((AIReal) (2.0/3.0)) -#define kAIRealFourThirds ((AIReal) (4.0/3.0)) -#define kAIRealThreeHalves ((AIReal) 1.5) - -#define kAIPi 3.141592653589793238462643383279502884197169399375 -#define kAIDoublePi ((double) kAIPi) -#define kAIRealPi ((AIReal) kAIPi) -#define kAIRealPi4 ((AIReal) (kAIPi/4.0)) -#define kAIRealPi2 ((AIReal) (kAIPi/2.0)) -#define kAIReal3PiOver2 ((AIReal) (kAIRealThreeHalves*kAIPi)) -#define kAIRealTwoPi ((AIReal) (kAIPi*2.0)) - -#define kAIRealSquareRootOfTwo ((AIReal) 1.4142135623) /* 2^(1/2) */ -#define kAIRealSquareRootOfThree ((AIReal) 1.7320508075688772935274463415059) /* 3^(1/2) */ -#define kAIRealAvogadrosOther ((AIReal) 0.5522847498) /* (4/3) [2^(1/2) - 1] */ -#define kAIRealGolden ((AIReal) 1.6180339888) /* [1 + 5^(1/2)]/2 */ - -#define kSmallestFixedNumberEquivalent_Tolerance ((AIReal) (1.0 / (1 << 16)) ) // 1 / 2^16 -#define kAIRealTolerance kSmallestFixedNumberEquivalent_Tolerance - - -/******************************************************************************* - ** - ** Macros - ** - **/ - -#if __BUILD_PLUGIN__ - -// This code used to depend on WIN_ENV. But fmin, round, and floor are not ANSI, -// and they don't seem to be available on the Mac. - -#define _AIRealMIN(x, y) ((x) > (y) ? (y) : (x)) -#define _AIRealMAX(x, y) ((x) > (y) ? (x) : (y)) -#define _AIRealAbs(x) ((x) >= kAIRealZero ? (x) : -(x)) - -#define _AIRealRound( x) (AIReal)( (x) > 0 ? floor((x) + 0.5) : ceil((x) - 0.5)) -// NOTE: Trunc() trunc toward 0 -#define _AIRealTrunc( x) (AIReal)( (x) > 0 ? floor((x)) : ceil((x))) -#define _AIRealFloor( x) (AIReal)floor( x) - -#if 0 // Formerly #ifndef WIN_ENV - #define _AIRealMIN( x, y) fmin( (x), (y)) - #define _AIRealMAX( x, y) fmax( (x), (y)) - - #define _AIRealRound( x) (AIReal)round( x) - #define _AIRealFloor( x) (AIReal)floor( x) - #define _AIRealTrunc( x) (AIReal)trunc( x) -#endif - -// type conversion macros -#define _ShortToAIReal(a) ((AIReal) (a)) -#define _AIRealRoundToShort(a) ((ai::int16) _AIRealRound(a)) -#define _AIRealTruncToShort(a) ((ai::int16) _AIRealTrunc(a)) - -// other macros - -#define _AIRealFraction(a) ((AIReal) ((a) - _AIRealTrunc(a))) -#define _AIRealAverage(a, b) ((AIReal) (((a) + (b)) / 2.0)) -#define _AIRealHalf(a) ((AIReal) ((a) / 2.0)) -#define _AIRealOverflow(a) ((a) == kAIRealMax || (a) == kAIRealMin) - -#define _AIRealSign(a) ((AIReal) ((a) > 0 ? +1 : ((a) < 0 ? -1 : 0))) - -//FIXME: Removed AIRealCeiling, because the definition of its fixed counterpart -//implies that it's meaningless for floats. -//#define _AIRealCeiling(a) _AIRealFloor((a) + kAIRealOne1) - - -#endif - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions for working with the \c #AIReal values that - Illustrator uses for coordinates. (An \c #AIReal is a C \c float type.) - You can work with \c #AIReal values directly, - with those contained in position structures for points and rectangles, - and with those contained in transformation matrices. - - The functions in this suite do not return \c #AIErr values. For the most part, - they return nothing, or return the result of the operation. - - @note Adobe Illustrator 8.0 changed all coordinate measurements from - \c #AIFixed to \c #AIReal data types. This change affected many suites; - in particular, the \c #AIFixedMathSuite was superseded by this suite. - For backward compatibility, this suite provides functions that convert - between \c #AIReal and \c #AIFixed numbers. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIRealMathSuite and \c #kAIRealMathVersion. - */ -typedef struct { - - /** Adds two real numbers. - @param a The first number. - @param b The second number. - @return The result. In case of overflow or underflow, - returns the system-defined maximum or minimum constant. - */ - AIAPI AIReal (*AIRealAdd) ( AIReal a, AIReal b ); - - /** Multiplies two real numbers. - @param a The first number. - @param b The second number. - @return The result. In case of overflow or underflow, - returns the system-defined maximum or minimum constant. - */ - AIAPI AIReal (*AIRealMul) ( AIReal a, AIReal b ); - - /** Divides two real numbers (a/b). - @param a The first number. - @param b The second number. - @return The result. In case of overflow, underflow, or divide by 0, - returns the system-defined maximum or minimum constant. - */ - AIAPI AIReal (*AIRealDiv) ( AIReal a, AIReal b ); - - /** Divides two integers (a/b). - @param a The first number. - @param b The second number. - @return The result. In case of overflow or underflow, - returns the system-defined maximum or minimum constant. - */ - AIAPI AIReal (*ShortRatio) ( ai::int16 a, ai::int16 b ); - - /** Divides two real numbers (a/b). This is the same as \c #AIRealDiv(). - @param a The first number. - @param b The second number. - @return The result. In case of overflow, underflow, or divide by 0, - returns the system-defined maximum or minimum constant. - */ - AIAPI AIReal (*AIRealRatio) ( AIReal a, AIReal b ); - - /** Multiplies two sets of numbers and then adds them together: (a * b) + (c * d). - @param a The first number of the first pair. - @param b The second number of the first pair. - @param c The first number of the second pair. - @param d The second number of the second pair. - @return The result. In case of overflow or underflow, - returns the system-defined maximum or minimum constant. - */ - AIAPI AIReal (*AIRealMulAdd) ( AIReal a, AIReal b, AIReal c, AIReal d ); - - /** Rounds a real number to a given multiple. - @param a The number. - @param multiple The multiple; for example, 0.01 to round - to the nearest hundredth, or 0.05 to round to the - nearest twentieth. Must not be 0. - @param ceiling When true, round up. When false, round down. - (Up and down are signed-- that is, floor -0.5 is -1 - and ceiling -0.5 is 0, not the other way around.) - @note When working with decimals, the result is subject to general - \c #AIReal accuracy problems. - */ - AIAPI AIReal (*AIRealMultiple) (AIReal a, AIReal multiple, AIBoolean ceiling ); - - /** Computes the sine of a real number in radians. - @param a The number. - @return The result. - */ - AIAPI AIReal (*AIRealSin) ( AIReal a ); - - /** Computes the cosine of a real number in radians. - @param a The number. - @return The result. - */ - AIAPI AIReal (*AIRealCos) ( AIReal a ); - - /** Computes the arctangent of an angle in radians, where a and b - are two real numbers such that a/b is the tangent of the angle - @param a The first number. - @param b The second number. - @return The result. - */ - AIAPI AIReal (*AIRealATan) ( AIReal a, AIReal b ); - - /** Converts an angle expressed in degrees to radians. - @param degree The number of degrees in the angle. - @return The number of radians in the angle. - */ - AIAPI AIReal (*DegreeToRadian) ( AIReal degree ); - - /** Converts an angle expressed in radians to degrees. - @param radian The number of radians in the angle. - @return The number of degrees in the angle. - */ - AIAPI AIReal (*RadianToDegree) ( AIReal radian ); - - /** Computes the square root of a real number. - @param a The number. - @return The result. - */ - AIAPI AIReal (*AIRealSqrt) ( AIReal a ); - - /** Computes the length of a vector starting at (0,0) and ending at (a,b). - This is the same as AIRealSqrt(a*a + b*b). - @param a The X coordinate of the endpoint. - @param b The Y coordinate of the endpoint. - @return The result. - */ - AIAPI AIReal (*AIRealLength) ( AIReal a, AIReal b ); - - /** Computes a value between two real numbers by interpolating - from \c b at \c t=0 to \c a at \c t=1. For example, if t=0.5, - the function returns the average of a and b. If a = 0, b = 1, - and t = 0.25, the function returns 0.75. - @param a The first number. - @param b The second number. - @param t A percentage of (b-a), expressed as a number between 0 and 1. - @return The result. - */ - AIAPI AIReal (*AIRealInterpolate) ( AIReal a, AIReal b, AIReal t ); - - /** Adds two points by adding the two X values and the two Y values. - No overflow checking is done. - @param a The first point. - @param b The second point. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealPointAdd) ( const AIRealPoint *a, const AIRealPoint *b, AIRealPoint *result ); - - /** Subtracts point a from point b by subtracting the corresponding component values. - No overflow checking is done. - @param a The first point. - @param b The second point. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealPointSubtract) ( const AIRealPoint *a, const AIRealPoint *b, AIRealPoint *result ); - - /** Tests for exact equality of two points. - @param a The first point. - @param b The second point. - @param result [out] A buffer in which to return true if the points have the same - coordinate values. - */ - AIAPI AIBoolean (*AIRealPointEqual) ( const AIRealPoint *a, const AIRealPoint *b ); - - /** Tests whether two points are within a specified square proximity of each other. - This is true if an axis-aligned, closed rectangle of a given tolerance - can be placed such that it can contain the two points. - @param a The first point. - @param b The second point. - @param tolerance The proximity value, the maximum allowed distance between - the X and Y coordinates of the points. - @param result [out] A buffer in which to return true if the points can be - contained. - */ - AIAPI AIBoolean (*AIRealPointClose) ( const AIRealPoint *a, const AIRealPoint *b, AIReal tolerance ); - - /** Computes the angle made by the vector \c ab with the X-axis. - @param a The first point. - @param b The second point. - @return The result, in radians. - */ - AIAPI AIReal (*AIRealPointAngle) ( const AIRealPoint *a, const AIRealPoint *b ); - - /** Computes the length of the vector \c ab. The result is always positive. - @param a The first point. - @param b The second point. - @return The result. - */ - AIAPI AIReal (*AIRealPointLength) ( const AIRealPoint *a, const AIRealPoint *b ); - - /** Computes the location of a point a given distance and angle from the page origin. - @param length The distance. - @param angle The angle in radians, counter-clockwise with respect to the X axis. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealPointLengthAngle) ( AIReal length, AIReal angle, AIRealPoint *result ); - - /** Computes the location of a point between two points by interpolating new - coordinate values between the corresponding coordinates of the points. - The result is a * t + b * (1-t) - @param a The first point. - @param b The second point. - @param t A percentage of (b-a), expressed as a number between 0 and 1. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealPointInterpolate) ( const AIRealPoint *a, const AIRealPoint *b, AIReal t, AIRealPoint *result ); - - /** Sets the coordinate values in a rectangle. (In the Illustrator - art coordinate system, the origin, (0, 0), is at the bottom left corner - of a page. X and Y values increase upward and to the right.) - @param a The rectangle object. - @param left The left side location.. - @param top The top side location. - @param right The right side location. - @param bottom The bottom side location. - */ - AIAPI void (*AIRealRectSet) ( AIRealRect *a, AIReal left, AIReal top, AIReal right, AIReal bottom ); - - /** Tests whether two rectangles equal (have the same coordinate values). - Uses an inexact equality test to account for floating-point errors. - @param a The first rectangle. - @param b The second rectangle. - @return True if the rectangles are equal. - */ - AIAPI AIBoolean (*AIRealRectEqual) ( const AIRealRect *a, const AIRealRect *b ); - - /** Tests whether a rectangle is empty (invalid). - A rectangle is invalid if the right edge is equal to or - less than the left edge, or the top edge is equal to or - less than the bottom edge. - @param a The rectangle. - @return True if the rectangle is empty. - */ - AIAPI AIBoolean (*AIRealRectEmpty) ( const AIRealRect *a ); - - /** Moves the edges of a rectangle in or out by a uniform amount. - Positive values for \c h or \c v move the corresponding sides in, - negative values move the sides out. - @param a The rectangle. - @param h The number of document points to move the edges in or out horizontally. - @param v The number of document points to move the edges in or out vertically. - */ - AIAPI void (*AIRealRectInset) ( AIRealRect *a, AIReal h, AIReal v ); - - /** Moves a rectangle by adding given values to the sides. Positive values - for \c h or \c v move the corresponding rectangle up or right, - negative values move it down or left. - @param a The rectangle. - @param h The number of document points to move the rectangle horizontally. - @param v The number of document points to move the rectangle vertically. - */ - AIAPI void (*AIRealRectOffset) ( AIRealRect *a, AIReal h, AIReal v ); - - /** Creates a new rectangle that is the union of two rectangles. - @param a The first rectangle. - @param b The second rectangle. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealRectUnion) ( const AIRealRect *a, const AIRealRect *b, AIRealRect *result ); - - /** Creates a new rectangle by enlarging a given rectangle to enclose a given point. - @param a The point. - @param b The rectangle. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealPointUnion) ( const AIRealPoint *a, const AIRealRect *b, AIRealRect *result ); - - /** Tests whether two rectangles overlap (have any points in common). - @param a The first rectangle. - @param b The second rectangle. - @return True if the rectangles overlap. - */ - AIAPI AIBoolean (*AIRealRectOverlap) ( const AIRealRect *a, const AIRealRect *b ); - - /** Creates a new rectangle that is the intersection of two rectangles. - @param a The first rectangle. - @param b The second rectangle. - @param result [out] A buffer in which to return the result. - @return False if the result is an empty (invalid) rectangle, true otherwise. - */ - AIAPI AIBoolean (*AIRealRectIntersect) ( const AIRealRect *a, const AIRealRect *b, AIRealRect *result ); - - /** Tests whether one rectangle is inside (entirely contained in) another rectangle. - Both must be open or both closed. - @param a The first rectangle. - @param b The second rectangle. - @return True if the set of points contained by \c a is also contained by \c b. - */ - AIAPI AIBoolean (*AIRealRectInAIRealRect) ( const AIRealRect *a, const AIRealRect *b ); - - /** Tests whether a point is inside a rectangle. The point is considered - inside if it is on one of the rectangle’s sides. - @param a The point. - @param b The closed rectangle. - @return True if the point is contained in the closed rectangle. - */ - AIAPI AIBoolean (*AIRealPointInAIRealRect) ( const AIRealPoint *a, const AIRealRect *b ); - - /** Rounds rectangle coordinates to integer values such that the result - rectangle contains the original. Does not necessarily return the smallest such - rectangle; takes the floor of the coordinates and adds 1 to the top - and right. - @param a The rectangle. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealRectAlign) ( const AIRealRect *a, AIRealRect *result ); - - /** Sets the scale, rotation, and translation values of a transformation matrix. - @param m The matrix object. - @param a New a value. - @param b New b value. - @param c New c value. - @param d New d value. - @param tx New horizontal translation value. - @param ty New vertical translation value. - */ - AIAPI void (*AIRealMatrixSet) ( AIRealMatrix *m, AIReal a, AIReal b, AIReal c, AIReal d, AIReal tx, AIReal ty ); - - /** Sets a transformation matrix to the identity matrix. - @param m The matrix object. - */ - AIAPI void (*AIRealMatrixSetIdentity) ( AIRealMatrix *m ); - - /** Tests two matrices for exact equality. - @param m The first matrix. - @param n The second matrix. - @return True if the matrices are equal. - */ - AIAPI AIBoolean (*AIRealMatrixEqual) ( const AIRealMatrix *m, const AIRealMatrix *n ); - - /** Tests whether a transformation matrix is the identity matrix. - @param m The matrix object. - @return True if the matrix is the identity matrix. - */ - AIAPI AIBoolean (*AIRealMatrixIdentity) ( const AIRealMatrix *m ); - - /** Tests whether a matrix is singular (cannot be inverted). - @param m The matrix object. - @return True if the matrix is singular. - */ - AIAPI AIBoolean (*AIRealMatrixSingular) ( const AIRealMatrix *m ); - - /** Initializes a transformation matrix to a single translation. - @param m The matrix object. - @param tx New horizontal translation value in document points. - @param ty New vertical translation value in document points. - */ - AIAPI void (*AIRealMatrixSetTranslate) ( AIRealMatrix *m, AIReal tx, AIReal ty ); - - /** Initializes scale values for a transformation matrix. - @param m The matrix object. - @param h New horizontal scale value, a percentage where 1 is 100%. - @param v New vertical scale value, a percentage where 1 is 100%. - */ - AIAPI void (*AIRealMatrixSetScale) ( AIRealMatrix *m, AIReal h, AIReal v ); - - /** Initializes a transformation matrix to a single rotation. - @param m The matrix object. - @param angle New angle value in radians. - */ - AIAPI void (*AIRealMatrixSetRotate) ( AIRealMatrix *m, AIReal angle ); - - /** Concatenates translation values to the existing translation in a - transformation matrix. The matrix must be initialized first. - @param m The matrix object. - @param tx New horizontal translation value in document points. - @param ty New vertical translation value in document points. - */ - AIAPI void (*AIRealMatrixConcatTranslate) ( AIRealMatrix *m, AIReal tx, AIReal ty ); - - /** Concatenates scale values to the existing scale in a - transformation matrix. The matrix must be initialized first. - @param m The matrix object. - @param h New horizontal scale value. - @param v New vertical scale value. - */ - AIAPI void (*AIRealMatrixConcatScale) ( AIRealMatrix *m, AIReal h, AIReal v ); - - /** Concatenates a rotation value to the existing rotation in a - transformation matrix. The matrix must be initialized first. - @param m The matrix object. - @param angle New angle value in radians. - */ - AIAPI void (*AIRealMatrixConcatRotate) ( AIRealMatrix *m, AIReal angle ); - - /** Creates a new transformation matrix by concatenating one matrix to another. - @param m The first matrix object. - @param n The second matrix object. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealMatrixConcat) (const AIRealMatrix *m, const AIRealMatrix *n, AIRealMatrix *result ); - - /** Inverts a transformation matrix. - @param m The matrix object. - @return 3 if the matrix could not be inverted or kNoErr on success. - */ - AIAPI ai::int16 (*AIRealMatrixInvert) (AIRealMatrix *m ); - - /** Transforms a point using a transformation matrix. - @param m The matrix. - @param a The point. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIRealMatrixXformPoint) ( const AIRealMatrix *m, const AIRealPoint *a, AIRealPoint *result ); - - /** Converts an \c #AIReal value to an \c #AIFixed value. - @param r The real value. - @return The fixed value. - */ - AIAPI AIFixed (*AIRealToAIFixed) ( AIReal r ); - - /** Converts an \c #AIFixed value to an \c #AIReal value. - @param f The fixed value. - @return The real value. - */ - AIAPI AIReal (*AIFixedToAIReal) ( AIFixed f ); - - /** Converts an \c #AIRealPoint value to an \c #AIFixedPoint value. - @param r The real point. - @param f [out] A buffer in which to return the fixed point. - */ - AIAPI void (*AIRealPointToAIFixedPoint) ( const AIRealPoint *r, AIFixedPoint *f ); - - /** Converts an \c #AIFixedPoint value to an \c #AIRealPoint value. - @param f The fixed point. - @param r [out] A buffer in which to return the real point. - */ - AIAPI void (*AIFixedPointToAIRealPoint) ( const AIFixedPoint *f, AIRealPoint *r ); - - /** Converts an \c #AIRealRect value to an \c #AIFixedRect value. - @param r The real rectangle. - @param f [out] A buffer in which to return the fixed rectangle. - */ - AIAPI void (*AIRealRectToAIFixedRect) ( const AIRealRect *r, AIFixedRect *f ); - - /** Converts an \c #AIFixedRect value to an \c #AIRealRect value. - @param f The fixed rectangle. - @param r [out] A buffer in which to return the real rectangle. - */ - AIAPI void (*AIFixedRectToAIRealRect) ( const AIFixedRect *f, AIRealRect *r ); - - /** Converts an \c #AIRealMatrix value to an \c #AIFixedMatrix value. - @param r The real matrix. - @param f [out] A buffer in which to return the fixed matrix. - */ - AIAPI void (*AIRealMatrixToAIFixedMatrix) ( const AIRealMatrix *r, AIFixedMatrix *f ); - - /** Converts an \c #AIFixedMatrix value to an \c #AIRealMatrix value. - @param f The fixed matrix. - @param r [out] A buffer in which to return the real matrix. - */ - AIAPI void (*AIFixedMatrixToAIRealMatrix) ( const AIFixedMatrix *f, AIRealMatrix *r ); - - -// AIAPI void (*AIFloatMatrixToAIRealMatrix) ( const AIFloatMatrix *f, AIRealMatrix *r ); - - AIAPI void (*AIFloatMatrixToAIRealMatrix) ( const AIFloatMatrix *f, AIRealMatrix *r ); - - - AIAPI void (*AIFloatPointToAIRealPoint) ( const AIFloatPoint *f, AIRealPoint *r ); - - - - /** Tests whether an \c #AIReal value is \c #kAIRealUnknown, - the special value Illustrator uses to represent unknown quantities. - This is sometimes used as a parameter to signal - a special condition; for example, use of a default value. - @param r The real number. - @return True if the value is equal to \c #kAIRealUnknown. - */ - - - AIAPI AIBoolean (*IsAIRealUnknown) ( AIReal r ); - - /** Tests whether an \c #AIReal value is \c #kAIRealUnknown ("not a number"). - This constant is used for mathematically undefined values such as 0/0. - @param r The real number. - @return True if the value is equal to \c #kAIRealUnknown. - */ - AIAPI AIBoolean (*AIRealIsNAN) ( AIReal r ); - - /** Tests whether two real numbers are within a percentage of one another. - @param a The first number. - @param b The second number. - @param percent A number between 0 and 1, where 1.0 is 100%. - @return For a > b, true if abs(a) - abs(b) < abs(b) * percent. -
For b > a, true if abs(a) < abs(b) * percent. - */ - AIAPI AIBoolean (*AlmostEqual) (const AIReal a, const AIReal b, const AIReal percent); - - /** Tests whether two real numbers are within a tolerance of one another. - @param a The first number. - @param b The second number. - @param tolerance The tolerance. - @return True if abs(a-b) <= tolerance - */ - AIAPI AIBoolean (*EqualWithinTol) (const AIReal a, const AIReal b, const AIReal tolerance); - - /** Retrieves the translation values from a transformation matrix. - @param m The matrix. - @param tx [out] A buffer in which to return the horizontal translation value. - @param ty [out] A buffer in which to return the vertical translation value. - */ - AIAPI void (*AIRealMatrixGetTranslate) ( const AIRealMatrix *m, AIReal *tx, AIReal *ty ); - - /** Retrieves the scaling values from a transformation matrix. - @param m The matrix. - @param h [out] A buffer in which to return the horizontal scaling value. - @param v [out] A buffer in which to return the vertical scaling value. - */ - AIAPI void (*AIRealMatrixGetScale) ( const AIRealMatrix *m, AIReal *h, AIReal *v ); - - /** Retrieves the angle of rotation from a transformation matrix. - @param m The matrix. - @param angle [out] A buffer in which to return the angle in radians. - */ - AIAPI void (*AIRealMatrixGetRotate) ( const AIRealMatrix *m, AIReal *angle ); - - /** Creates a new \c #AIDoubleRect rectangle that is the union - of two \c #AIDoubleRect rectangles. - @param a The first rectangle. - @param b The second rectangle. - @param result [out] A buffer in which to return the result. - */ - AIAPI void (*AIDoubleRectUnion) ( const AIDoubleRect *a, const AIDoubleRect *b, AIDoubleRect *result ); - - /** Restricts an angle to a given range. - @param angle The angle to be restricted in radians. - @param startAngle The beginning of the range in radians. - For startAngle=n, the range is [n, (n + 2 * pi)). - @return The restricted angle. - */ - AIAPI AIReal(*RestrictAngleToRange)(AIReal angle, AIReal startAngle); -} AIRealMathSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIRealMath__ +#define __AIRealMath__ + +/* + * Name: AIRealMath.h + * $Revision: 28 $ + * Author: + * Date: + * Purpose: Adobe Illustrator AIReal Math Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#include // for floor and ceil +#include + +#include "AIHeaderBegin.h" + +/** @file AIRealMath.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIRealMathSuite "AI Real Math Suite" +#define kAIRealMathSuiteVersion AIAPI_VERSION(5) +#define kAIRealMathVersion kAIRealMathSuiteVersion + +// Most of this stuff is completely unnecessary, and is just here to ease the +// transition between Fixed and AIReal. We should probably make a later pass +// to clean the unnecessary stuff out. + +// common AIReal constants +#define kAIRealMax ((AIReal)(DBL_MAX / 10.0F)) +#define kAIRealMin ((AIReal)-(DBL_MAX / 10.0F)) +#define kAIRealUnknown ((AIReal)DBL_MAX) + +#define kAIFloatUnknown ((AIFloat)FLT_MAX) + +#ifndef kAIRealOne +#define kAIRealOne ((AIReal) 1.0) +#endif +#ifndef kAIRealZero +#define kAIRealZero ((AIReal) 0.0) +#endif + +#ifndef kAIFloatOne +#define kAIFloatOne (1.0f) +#endif + +#ifndef kAIFloatZero +#define kAIFloatZero (0.0f) +#endif + +#define kAIRealHundredth ((AIReal) 0.01) +#define kAIRealSixteenth ((AIReal) (1.0/16.0)) +#define kAIRealTenth ((AIReal) 0.1) +#define kAIRealEighth ((AIReal) 0.125) + +#ifndef kAIRealQuarter +#define kAIRealQuarter ((AIReal) 0.25) +#endif + +#ifndef kAIRealHalf +#define kAIRealHalf ((AIReal) 0.5) +#endif + +#define kAIRealSevenEighths ((AIReal) 0.875) +#define kAIRealOneThird ((AIReal) (1.0/3.0)) +#define kAIRealTwoThirds ((AIReal) (2.0/3.0)) +#define kAIRealFourThirds ((AIReal) (4.0/3.0)) +#define kAIRealThreeHalves ((AIReal) 1.5) + +#define kAIPi 3.141592653589793238462643383279502884197169399375 +#define kAIDoublePi ((double) kAIPi) +#define kAIRealPi ((AIReal) kAIPi) +#define kAIRealPi4 ((AIReal) (kAIPi/4.0)) +#define kAIRealPi2 ((AIReal) (kAIPi/2.0)) +#define kAIReal3PiOver2 ((AIReal) (kAIRealThreeHalves*kAIPi)) +#define kAIRealTwoPi ((AIReal) (kAIPi*2.0)) + +#define kAIRealSquareRootOfTwo ((AIReal) 1.4142135623) /* 2^(1/2) */ +#define kAIRealSquareRootOfThree ((AIReal) 1.7320508075688772935274463415059) /* 3^(1/2) */ +#define kAIRealAvogadrosOther ((AIReal) 0.5522847498) /* (4/3) [2^(1/2) - 1] */ +#define kAIRealGolden ((AIReal) 1.6180339888) /* [1 + 5^(1/2)]/2 */ + +#define kSmallestFixedNumberEquivalent_Tolerance ((AIReal) (1.0 / (1 << 16)) ) // 1 / 2^16 +#define kAIRealTolerance kSmallestFixedNumberEquivalent_Tolerance + +#define kAIMinTransformDimensionValue ((AIReal) 0.00001) +#define kAIToleranceForZero ((AIReal) (1.0 / (1 << 19)) ) // 1 / 2^19 + + +/******************************************************************************* + ** + ** Macros + ** + **/ + +#if __BUILD_PLUGIN__ + +// This code used to depend on WIN_ENV. But fmin, round, and floor are not ANSI, +// and they don't seem to be available on the Mac. + +#define _AIRealMIN(x, y) ((x) > (y) ? (y) : (x)) +#define _AIRealMAX(x, y) ((x) > (y) ? (x) : (y)) +#define _AIRealAbs(x) ((x) >= kAIRealZero ? (x) : -(x)) + +#define _AIRealRound( x) (AIReal)( (x) > 0 ? floor((x) + 0.5) : ceil((x) - 0.5)) +// NOTE: Trunc() trunc toward 0 +#define _AIRealTrunc( x) (AIReal)( (x) > 0 ? floor((x)) : ceil((x))) +#define _AIRealFloor( x) (AIReal)floor( x) + +#if 0 // Formerly #ifndef WIN_ENV + #define _AIRealMIN( x, y) fmin( (x), (y)) + #define _AIRealMAX( x, y) fmax( (x), (y)) + + #define _AIRealRound( x) (AIReal)round( x) + #define _AIRealFloor( x) (AIReal)floor( x) + #define _AIRealTrunc( x) (AIReal)trunc( x) +#endif + +// type conversion macros +#define _ShortToAIReal(a) ((AIReal) (a)) +#define _AIRealRoundToShort(a) ((ai::int16) _AIRealRound(a)) +#define _AIRealTruncToShort(a) ((ai::int16) _AIRealTrunc(a)) + +// other macros + +#define _AIRealFraction(a) ((AIReal) ((a) - _AIRealTrunc(a))) +#define _AIRealAverage(a, b) ((AIReal) (((a) + (b)) / 2.0)) +#define _AIRealHalf(a) ((AIReal) ((a) / 2.0)) +#define _AIRealOverflow(a) ((a) == kAIRealMax || (a) == kAIRealMin) + +#define _AIRealSign(a) ((AIReal) ((a) > 0 ? +1 : ((a) < 0 ? -1 : 0))) + +//FIXME: Removed AIRealCeiling, because the definition of its fixed counterpart +//implies that it's meaningless for floats. +//#define _AIRealCeiling(a) _AIRealFloor((a) + kAIRealOne1) + + +#endif + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions for working with the \c #AIReal values that + Illustrator uses for coordinates. (An \c #AIReal is a C \c float type.) + You can work with \c #AIReal values directly, + with those contained in position structures for points and rectangles, + and with those contained in transformation matrices. + + The functions in this suite do not return \c #AIErr values. For the most part, + they return nothing, or return the result of the operation. + + @note Adobe Illustrator 8.0 changed all coordinate measurements from + \c #AIFixed to \c #AIReal data types. This change affected many suites; + in particular, the \c #AIFixedMathSuite was superseded by this suite. + For backward compatibility, this suite provides functions that convert + between \c #AIReal and \c #AIFixed numbers. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIRealMathSuite and \c #kAIRealMathVersion. + */ +typedef struct { + + /** Adds two real numbers. + @param a The first number. + @param b The second number. + @return The result. In case of overflow or underflow, + returns the system-defined maximum or minimum constant. + */ + AIAPI AIReal (*AIRealAdd) ( AIReal a, AIReal b ); + + /** Multiplies two real numbers. + @param a The first number. + @param b The second number. + @return The result. In case of overflow or underflow, + returns the system-defined maximum or minimum constant. + */ + AIAPI AIReal (*AIRealMul) ( AIReal a, AIReal b ); + + /** Divides two real numbers (a/b). + @param a The first number. + @param b The second number. + @return The result. In case of overflow, underflow, or divide by 0, + returns the system-defined maximum or minimum constant. + */ + AIAPI AIReal (*AIRealDiv) ( AIReal a, AIReal b ); + + /** Divides two integers (a/b). + @param a The first number. + @param b The second number. + @return The result. In case of overflow or underflow, + returns the system-defined maximum or minimum constant. + */ + AIAPI AIReal (*ShortRatio) ( ai::int16 a, ai::int16 b ); + + /** Divides two real numbers (a/b). This is the same as \c #AIRealDiv(). + @param a The first number. + @param b The second number. + @return The result. In case of overflow, underflow, or divide by 0, + returns the system-defined maximum or minimum constant. + */ + AIAPI AIReal (*AIRealRatio) ( AIReal a, AIReal b ); + + /** Multiplies two sets of numbers and then adds them together: (a * b) + (c * d). + @param a The first number of the first pair. + @param b The second number of the first pair. + @param c The first number of the second pair. + @param d The second number of the second pair. + @return The result. In case of overflow or underflow, + returns the system-defined maximum or minimum constant. + */ + AIAPI AIReal (*AIRealMulAdd) ( AIReal a, AIReal b, AIReal c, AIReal d ); + + /** Rounds a real number to a given multiple. + @param a The number. + @param multiple The multiple; for example, 0.01 to round + to the nearest hundredth, or 0.05 to round to the + nearest twentieth. Must not be 0. + @param ceiling When true, round up. When false, round down. + (Up and down are signed-- that is, floor -0.5 is -1 + and ceiling -0.5 is 0, not the other way around.) + @note When working with decimals, the result is subject to general + \c #AIReal accuracy problems. + */ + AIAPI AIReal (*AIRealMultiple) (AIReal a, AIReal multiple, AIBoolean ceiling ); + + /** Computes the sine of a real number in radians. + @param a The number. + @return The result. + */ + AIAPI AIReal (*AIRealSin) ( AIReal a ); + + /** Computes the cosine of a real number in radians. + @param a The number. + @return The result. + */ + AIAPI AIReal (*AIRealCos) ( AIReal a ); + + /** Computes the arctangent of an angle in radians, where a and b + are two real numbers such that a/b is the tangent of the angle + @param a The first number. + @param b The second number. + @return The result. + */ + AIAPI AIReal (*AIRealATan) ( AIReal a, AIReal b ); + + /** Converts an angle expressed in degrees to radians. + @param degree The number of degrees in the angle. + @return The number of radians in the angle. + */ + AIAPI AIReal (*DegreeToRadian) ( AIReal degree ); + + /** Converts an angle expressed in radians to degrees. + @param radian The number of radians in the angle. + @return The number of degrees in the angle. + */ + AIAPI AIReal (*RadianToDegree) ( AIReal radian ); + + /** Computes the square root of a real number. + @param a The number. + @return The result. + */ + AIAPI AIReal (*AIRealSqrt) ( AIReal a ); + + /** Computes the length of a vector starting at (0,0) and ending at (a,b). + This is the same as AIRealSqrt(a*a + b*b). + @param a The X coordinate of the endpoint. + @param b The Y coordinate of the endpoint. + @return The result. + */ + AIAPI AIReal (*AIRealLength) ( AIReal a, AIReal b ); + + /** Computes a value between two real numbers by interpolating + from \c b at \c t=0 to \c a at \c t=1. For example, if t=0.5, + the function returns the average of a and b. If a = 0, b = 1, + and t = 0.25, the function returns 0.75. + @param a The first number. + @param b The second number. + @param t A percentage of (b-a), expressed as a number between 0 and 1. + @return The result. + */ + AIAPI AIReal (*AIRealInterpolate) ( AIReal a, AIReal b, AIReal t ); + + /** Adds two points by adding the two X values and the two Y values. + No overflow checking is done. + @param a The first point. + @param b The second point. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealPointAdd) ( const AIRealPoint *a, const AIRealPoint *b, AIRealPoint *result ); + + /** Subtracts point a from point b by subtracting the corresponding component values. + No overflow checking is done. + @param a The first point. + @param b The second point. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealPointSubtract) ( const AIRealPoint *a, const AIRealPoint *b, AIRealPoint *result ); + + /** Tests for exact equality of two points. + @param a The first point. + @param b The second point. + @param result [out] A buffer in which to return true if the points have the same + coordinate values. + */ + AIAPI AIBoolean (*AIRealPointEqual) ( const AIRealPoint *a, const AIRealPoint *b ); + + /** Tests whether two points are within a specified square proximity of each other. + This is true if an axis-aligned, closed rectangle of a given tolerance + can be placed such that it can contain the two points. + @param a The first point. + @param b The second point. + @param tolerance The proximity value, the maximum allowed distance between + the X and Y coordinates of the points. + @param result [out] A buffer in which to return true if the points can be + contained. + */ + AIAPI AIBoolean (*AIRealPointClose) ( const AIRealPoint *a, const AIRealPoint *b, AIReal tolerance ); + + /** Computes the angle made by the vector \c ab with the X-axis. + @param a The first point. + @param b The second point. + @return The result, in radians. + */ + AIAPI AIReal (*AIRealPointAngle) ( const AIRealPoint *a, const AIRealPoint *b ); + + /** Computes the length of the vector \c ab. The result is always positive. + @param a The first point. + @param b The second point. + @return The result. + */ + AIAPI AIReal (*AIRealPointLength) ( const AIRealPoint *a, const AIRealPoint *b ); + + /** Computes the location of a point a given distance and angle from the page origin. + @param length The distance. + @param angle The angle in radians, counter-clockwise with respect to the X axis. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealPointLengthAngle) ( AIReal length, AIReal angle, AIRealPoint *result ); + + /** Computes the location of a point between two points by interpolating new + coordinate values between the corresponding coordinates of the points. + The result is a * t + b * (1-t) + @param a The first point. + @param b The second point. + @param t A percentage of (b-a), expressed as a number between 0 and 1. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealPointInterpolate) ( const AIRealPoint *a, const AIRealPoint *b, AIReal t, AIRealPoint *result ); + + /** Sets the coordinate values in a rectangle. (In the Illustrator + art coordinate system, the origin, (0, 0), is at the bottom left corner + of a page. X and Y values increase upward and to the right.) + @param a The rectangle object. + @param left The left side location.. + @param top The top side location. + @param right The right side location. + @param bottom The bottom side location. + */ + AIAPI void (*AIRealRectSet) ( AIRealRect *a, AIReal left, AIReal top, AIReal right, AIReal bottom ); + + /** Tests whether two rectangles equal (have the same coordinate values). + Uses an inexact equality test to account for floating-point errors. + @param a The first rectangle. + @param b The second rectangle. + @return True if the rectangles are equal. + */ + AIAPI AIBoolean (*AIRealRectEqual) ( const AIRealRect *a, const AIRealRect *b ); + + /** Tests whether a rectangle is empty (invalid). + A rectangle is invalid if the right edge is equal to or + less than the left edge, or the top edge is equal to or + less than the bottom edge. + @param a The rectangle. + @return True if the rectangle is empty. + */ + AIAPI AIBoolean (*AIRealRectEmpty) ( const AIRealRect *a ); + + /** Moves the edges of a rectangle in or out by a uniform amount. + Positive values for \c h or \c v move the corresponding sides in, + negative values move the sides out. + @param a The rectangle. + @param h The number of document points to move the edges in or out horizontally. + @param v The number of document points to move the edges in or out vertically. + */ + AIAPI void (*AIRealRectInset) ( AIRealRect *a, AIReal h, AIReal v ); + + /** Moves a rectangle by adding given values to the sides. Positive values + for \c h or \c v move the corresponding rectangle up or right, + negative values move it down or left. + @param a The rectangle. + @param h The number of document points to move the rectangle horizontally. + @param v The number of document points to move the rectangle vertically. + */ + AIAPI void (*AIRealRectOffset) ( AIRealRect *a, AIReal h, AIReal v ); + + /** Creates a new rectangle that is the union of two rectangles. + @param a The first rectangle. + @param b The second rectangle. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealRectUnion) ( const AIRealRect *a, const AIRealRect *b, AIRealRect *result ); + + /** Creates a new rectangle by enlarging a given rectangle to enclose a given point. + @param a The point. + @param b The rectangle. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealPointUnion) ( const AIRealPoint *a, const AIRealRect *b, AIRealRect *result ); + + /** Tests whether two rectangles overlap (have any points in common). + @param a The first rectangle. + @param b The second rectangle. + @return True if the rectangles overlap. + */ + AIAPI AIBoolean (*AIRealRectOverlap) ( const AIRealRect *a, const AIRealRect *b ); + + /** Creates a new rectangle that is the intersection of two rectangles. + @param a The first rectangle. + @param b The second rectangle. + @param result [out] A buffer in which to return the result. + @return False if the result is an empty (invalid) rectangle, true otherwise. + */ + AIAPI AIBoolean (*AIRealRectIntersect) ( const AIRealRect *a, const AIRealRect *b, AIRealRect *result ); + + /** Tests whether one rectangle is inside (entirely contained in) another rectangle. + Both must be open or both closed. + @param a The first rectangle. + @param b The second rectangle. + @return True if the set of points contained by \c a is also contained by \c b. + */ + AIAPI AIBoolean (*AIRealRectInAIRealRect) ( const AIRealRect *a, const AIRealRect *b ); + + /** Tests whether a point is inside a rectangle. The point is considered + inside if it is on one of the rectangle’s sides. + @param a The point. + @param b The closed rectangle. + @return True if the point is contained in the closed rectangle. + */ + AIAPI AIBoolean (*AIRealPointInAIRealRect) ( const AIRealPoint *a, const AIRealRect *b ); + + /** Rounds rectangle coordinates to integer values such that the result + rectangle contains the original. Does not necessarily return the smallest such + rectangle; takes the floor of the coordinates and adds 1 to the top + and right. + @param a The rectangle. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealRectAlign) ( const AIRealRect *a, AIRealRect *result ); + + /** Sets the scale, rotation, and translation values of a transformation matrix. + @param m The matrix object. + @param a New a value. + @param b New b value. + @param c New c value. + @param d New d value. + @param tx New horizontal translation value. + @param ty New vertical translation value. + */ + AIAPI void (*AIRealMatrixSet) ( AIRealMatrix *m, AIReal a, AIReal b, AIReal c, AIReal d, AIReal tx, AIReal ty ); + + /** Sets a transformation matrix to the identity matrix. + @param m The matrix object. + */ + AIAPI void (*AIRealMatrixSetIdentity) ( AIRealMatrix *m ); + + /** Tests two matrices for exact equality. + @param m The first matrix. + @param n The second matrix. + @return True if the matrices are equal. + */ + AIAPI AIBoolean (*AIRealMatrixEqual) ( const AIRealMatrix *m, const AIRealMatrix *n ); + + /** Tests whether a transformation matrix is the identity matrix. + @param m The matrix object. + @return True if the matrix is the identity matrix. + */ + AIAPI AIBoolean (*AIRealMatrixIdentity) ( const AIRealMatrix *m ); + + /** Tests whether a matrix is singular (cannot be inverted). + @param m The matrix object. + @return True if the matrix is singular. + */ + AIAPI AIBoolean (*AIRealMatrixSingular) ( const AIRealMatrix *m ); + + /** Initializes a transformation matrix to a single translation. + @param m The matrix object. + @param tx New horizontal translation value in document points. + @param ty New vertical translation value in document points. + */ + AIAPI void (*AIRealMatrixSetTranslate) ( AIRealMatrix *m, AIReal tx, AIReal ty ); + + /** Initializes scale values for a transformation matrix. + @param m The matrix object. + @param h New horizontal scale value, a percentage where 1 is 100%. + @param v New vertical scale value, a percentage where 1 is 100%. + */ + AIAPI void (*AIRealMatrixSetScale) ( AIRealMatrix *m, AIReal h, AIReal v ); + + /** Initializes a transformation matrix to a single rotation. + @param m The matrix object. + @param angle New angle value in radians. + */ + AIAPI void (*AIRealMatrixSetRotate) ( AIRealMatrix *m, AIReal angle ); + + /** Concatenates translation values to the existing translation in a + transformation matrix. The matrix must be initialized first. + @param m The matrix object. + @param tx New horizontal translation value in document points. + @param ty New vertical translation value in document points. + */ + AIAPI void (*AIRealMatrixConcatTranslate) ( AIRealMatrix *m, AIReal tx, AIReal ty ); + + /** Concatenates scale values to the existing scale in a + transformation matrix. The matrix must be initialized first. + @param m The matrix object. + @param h New horizontal scale value. + @param v New vertical scale value. + */ + AIAPI void (*AIRealMatrixConcatScale) ( AIRealMatrix *m, AIReal h, AIReal v ); + + /** Concatenates a rotation value to the existing rotation in a + transformation matrix. The matrix must be initialized first. + @param m The matrix object. + @param angle New angle value in radians. + */ + AIAPI void (*AIRealMatrixConcatRotate) ( AIRealMatrix *m, AIReal angle ); + + /** Creates a new transformation matrix by concatenating one matrix to another. + @param m The first matrix object. + @param n The second matrix object. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealMatrixConcat) (const AIRealMatrix *m, const AIRealMatrix *n, AIRealMatrix *result ); + + /** Inverts a transformation matrix. + @param m The matrix object. + @return 3 if the matrix could not be inverted or kNoErr on success. + */ + AIAPI ai::int16 (*AIRealMatrixInvert) (AIRealMatrix *m ); + + /** Transforms a point using a transformation matrix. + @param m The matrix. + @param a The point. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealMatrixXformPoint) ( const AIRealMatrix *m, const AIRealPoint *a, AIRealPoint *result ); + + /** Transforms a rect using a transformation matrix. + @param m The matrix. + @param a The rect. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIRealMatrixXformRect) ( const AIRealMatrix *m, const AIRealRect *a, AIRealRect *result ); + + /** Converts an \c #AIReal value to an \c #AIFixed value. + @param r The real value. + @return The fixed value. + */ + AIAPI AIFixed (*AIRealToAIFixed) ( AIReal r ); + + /** Converts an \c #AIFixed value to an \c #AIReal value. + @param f The fixed value. + @return The real value. + */ + AIAPI AIReal (*AIFixedToAIReal) ( AIFixed f ); + + /** Converts an \c #AIRealPoint value to an \c #AIFixedPoint value. + @param r The real point. + @param f [out] A buffer in which to return the fixed point. + */ + AIAPI void (*AIRealPointToAIFixedPoint) ( const AIRealPoint *r, AIFixedPoint *f ); + + /** Converts an \c #AIFixedPoint value to an \c #AIRealPoint value. + @param f The fixed point. + @param r [out] A buffer in which to return the real point. + */ + AIAPI void (*AIFixedPointToAIRealPoint) ( const AIFixedPoint *f, AIRealPoint *r ); + + /** Converts an \c #AIRealRect value to an \c #AIFixedRect value. + @param r The real rectangle. + @param f [out] A buffer in which to return the fixed rectangle. + */ + AIAPI void (*AIRealRectToAIFixedRect) ( const AIRealRect *r, AIFixedRect *f ); + + /** Converts an \c #AIFixedRect value to an \c #AIRealRect value. + @param f The fixed rectangle. + @param r [out] A buffer in which to return the real rectangle. + */ + AIAPI void (*AIFixedRectToAIRealRect) ( const AIFixedRect *f, AIRealRect *r ); + + /** Converts an \c #AIRealMatrix value to an \c #AIFixedMatrix value. + @param r The real matrix. + @param f [out] A buffer in which to return the fixed matrix. + */ + AIAPI void (*AIRealMatrixToAIFixedMatrix) ( const AIRealMatrix *r, AIFixedMatrix *f ); + + /** Converts an \c #AIFixedMatrix value to an \c #AIRealMatrix value. + @param f The fixed matrix. + @param r [out] A buffer in which to return the real matrix. + */ + AIAPI void (*AIFixedMatrixToAIRealMatrix) ( const AIFixedMatrix *f, AIRealMatrix *r ); + + +// AIAPI void (*AIFloatMatrixToAIRealMatrix) ( const AIFloatMatrix *f, AIRealMatrix *r ); + + AIAPI void (*AIFloatMatrixToAIRealMatrix) ( const AIFloatMatrix *f, AIRealMatrix *r ); + + + AIAPI void (*AIFloatPointToAIRealPoint) ( const AIFloatPoint *f, AIRealPoint *r ); + + + + /** Tests whether an \c #AIReal value is \c #kAIRealUnknown, + the special value Illustrator uses to represent unknown quantities. + This is sometimes used as a parameter to signal + a special condition; for example, use of a default value. + @param r The real number. + @return True if the value is equal to \c #kAIRealUnknown. + */ + + + AIAPI AIBoolean (*IsAIRealUnknown) ( AIReal r ); + + /** Tests whether an \c #AIReal value is \c #kAIRealUnknown ("not a number"). + This constant is used for mathematically undefined values such as 0/0. + @param r The real number. + @return True if the value is equal to \c #kAIRealUnknown. + */ + AIAPI AIBoolean (*AIRealIsNAN) ( AIReal r ); + + /** Tests whether two real numbers are within a percentage of one another. + @param a The first number. + @param b The second number. + @param percent A number between 0 and 1, where 1.0 is 100%. + @return For a > b, true if abs(a) - abs(b) < abs(b) * percent. +
For b > a, true if abs(a) < abs(b) * percent. + */ + AIAPI AIBoolean (*AlmostEqual) (const AIReal a, const AIReal b, const AIReal percent); + + /** Tests whether two real numbers are within a tolerance of one another. + @param a The first number. + @param b The second number. + @param tolerance The tolerance. + @return True if abs(a-b) <= tolerance + */ + AIAPI AIBoolean (*EqualWithinTol) (const AIReal a, const AIReal b, const AIReal tolerance); + + /** Retrieves the translation values from a transformation matrix. + @param m The matrix. + @param tx [out] A buffer in which to return the horizontal translation value. + @param ty [out] A buffer in which to return the vertical translation value. + */ + AIAPI void (*AIRealMatrixGetTranslate) ( const AIRealMatrix *m, AIReal *tx, AIReal *ty ); + + /** Retrieves the scaling values from a transformation matrix. + @param m The matrix. + @param h [out] A buffer in which to return the horizontal scaling value. + @param v [out] A buffer in which to return the vertical scaling value. + */ + AIAPI void (*AIRealMatrixGetScale) ( const AIRealMatrix *m, AIReal *h, AIReal *v ); + + /** Retrieves the angle of rotation from a transformation matrix. + @param m The matrix. + @param angle [out] A buffer in which to return the angle in radians. + */ + AIAPI void (*AIRealMatrixGetRotate) ( const AIRealMatrix *m, AIReal *angle ); + + /** Creates a new \c #AIDoubleRect rectangle that is the union + of two \c #AIDoubleRect rectangles. + @param a The first rectangle. + @param b The second rectangle. + @param result [out] A buffer in which to return the result. + */ + AIAPI void (*AIDoubleRectUnion) ( const AIDoubleRect *a, const AIDoubleRect *b, AIDoubleRect *result ); + + /** Restricts an angle to a given range. + @param angle The angle to be restricted in radians. + @param startAngle The beginning of the range in radians. + For startAngle=n, the range is [n, (n + 2 * pi)). + @return The restricted angle. + */ + AIAPI AIReal(*RestrictAngleToRange)(AIReal angle, AIReal startAngle); +} AIRealMathSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRepeat.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRepeat.h new file mode 100644 index 0000000..7f56951 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRepeat.h @@ -0,0 +1,364 @@ +/************************************************************************* + * + * ADOBE CONFIDENTIAL + * + * Copyright 2020 Adobe + * + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. If you have received this file from a source other than Adobe, + * then your use, modification, or distribution of it requires the prior + * written permission of Adobe. + * + **************************************************************************/ + +#pragma once + +#include "AITypes.h" +#include "AIHitTest.h" +#include "IAIAutoBuffer.h" +//#include "IAIArtSet.hpp" +#include "AIArtSet.h" +#include "AIHeaderBegin.h" + +#define kAIRepeatSuite "AI Repeat Suite" +#define kAIRepeatSuiteVersion2 AIAPI_VERSION(2) +#define kAIRepeatSuiteVersion kAIRepeatSuiteVersion2 +#define kAIRepeatVersion kAIRepeatSuiteVersion + +namespace AIRepeat +{ + enum class AIRepeatMergeState : ai::uint8 + { + /** stroke ovverides fill at arts intersection */ + kOverlap, + /** fill ovverides stroke at arts intersection */ + kCombine, + }; + + enum class AIRepeatGridShiftType : ai::uint8 + { + /** create a normal grid of arts*/ + kNone, + /** create a grid after shifting alternate rows by half*/ + kHorizontal, + /** create a grid after shifting alternate columns by half*/ + kVertical, + /** create a grid after shifting both alternate rows and columns by half*/ + kHorizontalAndVertical + }; + + enum class AIRepeatGridFlipType : ai::uint8 + { + /** create a normal grid of arts*/ + kNone, + /** flip the alternate rows about y axis */ + kHorizontal, + /** flip the alternate rows about x axis */ + kVertical, + /** flip the alternate rows about both x and y axis */ + kHorizontalAndVertical + }; + /** Radial repeat, repeats an art in a circular fashion with multiple instances. + User can change its properties like center, radius, startAngle of the circular arc, + total engle of the arc, number of instances and Merge state which combines all arts + such that the stroke of intersecting arts does not override the fill of those arts. + With all these properties RadialConfig is constructed. + */ + struct RadialConfig + { + /** center of radial repeat art */ + AIRealPoint center; + /** radius of radial repeat art */ + AIReal radius = 0; + /** start angle of the radial repeat art's circular arc */ + AIReal startAngle = 0; + /** total angle of the radial repeat art's circular arc */ + AIReal totalAngle = 0; + /** angle by which the object is rotated about the centre of radial config + Also, 0 for this value means base art is at the top i.e. in Cartesian coordinates, base art is at +Y axis line */ + AIReal rotationAlongTheCircle = 0; + /** number of instances of radial repeat art */ + ai::uint32 numberOfInstances = 8; + /** reverse overlap of radial repeat art */ + AIBoolean reverseOverlap = false; + /** whether the radial repeat art's circular arc from startAngle to (startAngle + totalAngle) is in clockwise direction or not */ + AIBoolean clockwiseArc = true; + /** Merge State of radial repeat art */ + AIRepeatMergeState mergeState = AIRepeatMergeState::kOverlap; + }; + /** RadialUpdate is an enum class with each flag represent which property of + radial repeat gets updated. + */ + enum class RadialUpdate : ai::uint8 + { + /** update the center of radial repeat art */ + kCenter = 1 << 0, + /** update the radius of radial repeat art */ + kRadius = 1 << 1, + /** update the start angle of radial repeat art */ + kStartAngle = 1 << 2, + /** update the end angle of radial repeat art */ + kEndAngle = 1 << 3, + /** update the end angle of radial repeat art */ + kRotationAngle = 1 << 4, + /** update number od instances of radial repeat art */ + kNumberOfInstances = 1 << 5, + /** update the merge state of radial repeat art */ + kMergeState = 1 << 6, + /** update all the properties of Radial Repeat*/ + kAll = (kCenter | kRadius | kStartAngle | kEndAngle | kRotationAngle | kNumberOfInstances | kMergeState) + }; + + /** Grid repeat, repeats an art in a grid fashion. + User can change its properties like number of instances in a row, + number of instances in a column, manipulate spacing between rows and columns, + and Merge state which combines all arts such that the stroke of intersecting + arts does not override the fill of those arts. + With all these properties GridConfig is constructed. + */ + struct GridConfig + { + /** spacing between each rows */ + AIReal horizontalSpacing = 10; + /** spacing between each columns */ + AIReal verticalSpacing = 10; + /** horizontal offset of first instance */ + AIReal horizontalOffset = 0; + /** vertical offset of first instance */ + AIReal verticalOffset = 0; + /** main art bounds */ + AIRealRect bounds; + /** Merge State of grid repeat art */ + AIRepeatMergeState mergeState = AIRepeatMergeState::kOverlap; + /** shift type of grid repeat art */ + AIRepeatGridShiftType patternType = AIRepeatGridShiftType::kNone; + /** row flip type of grid repeat art */ + AIRepeatGridFlipType rowFlipType = AIRepeatGridFlipType::kNone; + /** flip type of grid repeat art */ + AIRepeatGridFlipType columnFlipType = AIRepeatGridFlipType::kNone; + }; + + + /** GridUpdate is an enum class with each flag represent which property of grid + repeat gets updated. + */ + enum class GridUpdate : ai::uint8 + { + /** update the number of instances in each column of grid repeat art */ + kRowInstances = 1 << 0, + /** update the number of instances in each column of grid repeat art */ + kColumnInstances = 1 << 1, + /** Update spacing between rows of grid repeat art */ + kHorizontalSpacing = 1 << 2, + /** Update spacing between coloumns of grid repeat art */ + kVerticalSpacing = 1 << 3, + /** update the bounds of grid repeat art */ + kBounds = 1 << 4, + /** update the merge state of grid repeat art */ + kMergeState = 1 << 5, + /** update all the properties of Grid Repeat*/ + kAll = (kRowInstances | kColumnInstances | kHorizontalSpacing | kVerticalSpacing | kBounds | kMergeState) + }; + /** Symmetry repeat, repeats an art in a symmetry fashion around a symmetry axis. + User can change its properties like changing spacing between object to its symmetry axis, + and Merge state which combines all arts such that the stroke of intersecting + arts does not override the fill of those arts. + With all these properties SymmetryConfig is constructed. + */ + struct SymmetryConfig + { + /** spacing between object to symmetry axis */ + AIRealPoint axisCenter; + /** symmetry axis rotation angle wrt x-axis in anti-clockwise fashion*/ + AIReal axisRotationAngleInRadians = 0; + /** Angle of normal to symmetry axis. This axis normal has same axisCenter as that of symmetry axis. At new + object creation, initially axis normal should be at an angle of 90 degrees from axis in anti-clockwise fashion.*/ + AIReal axisNormalAngleInRadians = 0; + /** Merge State of symmetry repeat art */ + AIRepeatMergeState mergeState = AIRepeatMergeState::kOverlap; + }; + /** SymmetryUpdate is an enum class with each flag represent which property of symmetry + repeat gets updated. + */ + enum class SymmetryUpdate : ai::uint8 + { + /** Update spacing between symmetry axis to object */ + kAxisCenter = 1 << 0, + /** Update axis rotation angle wrt x-axis */ + kAxisRotation = 1 << 1, + /** update the merge state of symmetry repeat art */ + kMergeState = 1 << 2, + /** update all the properties of Symmetry Repeat*/ + kAll = (kAxisCenter | kAxisRotation | kMergeState) + }; + /** Concentric repeat, repeats an art in a concentric fashion. + User can change its properties like changing number of instances inside, + and Merge state which combines all arts such that the stroke of intersecting + arts does not override the fill of those arts. + With all these properties ConcentricConfig is constructed. + */ + struct ConcentricConfig + { + /** number of instances of Concentric repeat art */ + ai::uint32 numberOfInstances = 1; + /** Merge State of Concentric repeat art */ + AIRepeatMergeState mergeState = AIRepeatMergeState::kOverlap; + }; + /** ConcentricUpdate is an enum class with each flag represent which property of Concentric + repeat gets updated. + */ + enum class ConcentricUpdate : ai::uint8 + { + /** update number of instances of Concentric repeat art */ + kNumberOfInstances = 1 << 0, + /** update the merge state of Concentric repeat art */ + kMergeState = 1 << 1, + /** update all the properties of Concentric Repeat*/ + kAll = (kNumberOfInstances | kMergeState) + }; + +} + +struct AIRepeatSuite +{ + /** Create a new repeat art. This API converts input AIArtHandle to radial repeat object + + @Param ai::ArtSet arts: Input arts which needs to be repeated + @Param RadialConfig radial repeat configurations + @Param AIArtHandle *newRadialRepeatArt: Radial repeat art + */ + AIAPI AIErr(*CreateRadialRepeatArt) (const ai::AutoBuffer& arts, const AIRepeat::RadialConfig& config, AIArtHandle& newRadialRepeatArt); + + /** Create a new repeat art. This API converts input AIArtHandle to grid repeat object + + @Param ai::ArtSet arts: Input arts which needs to be repeated + @Param GridConfig grid repeat configurations + @Param AIArtHandle *newGridRepeatArt: Radial repeat art + */ + AIAPI AIErr(*CreateGridRepeatArt) (const ai::AutoBuffer& arts, const AIRepeat::GridConfig& config, AIArtHandle& newGridRepeatArt); + + /** Create a new repeat art. This API converts input AIArtHandle to symmetry repeat object + + @Param ai::ArtSet arts: Input arts which needs to be repeated + @Param SymmetryConfig symmetry repeat configurations + @Param AIArtHandle *newSymmetryRepeatArt: Symmetry repeat art + */ + AIAPI AIErr(*CreateSymmetryRepeatArt) (const ai::AutoBuffer& arts, const AIRepeat::SymmetryConfig& config, AIArtHandle& newSymmetryRepeatArt); + + /** Create a new repeat art. This API converts input AIArtHandle to concentric repeat object + + @Param ai::ArtSet arts: Input arts which needs to be repeated + @Param ConcentricConfig concentric repeat configurations + @Param AIArtHandle *newConcentricRepeatArt: Concentric repeat art + */ + AIAPI AIErr(*CreateConcentricRepeatArt) (const ai::AutoBuffer& arts, const AIRepeat::ConcentricConfig& config, AIArtHandle& newConcentricRepeatArt); + + /** Update Grid repeat configurations i.e. number of rows, columns, spacing etc + + @Param AIArtHandle art: Grid repeat art whose configuration needs to be changed + @Param GridConfig config: updated grid repeat configurations + @Param GridUpdate state: specify which properties of grid repeat gets updated + */ + AIAPI AIErr (*SetGridConfiguration) (AIArtHandle art, const AIRepeat::GridConfig& config, AIRepeat::GridUpdate state); + + /** Get Grid repeat configurations i.e. number of rows, columns, spacing etc + + @Param AIArtHandle art: Grid repeat art whose configuration is required + @Param GridConfig config: Return grid configurations in this variable + */ + AIAPI AIErr (*GetGridConfiguration) (AIArtHandle art, AIRepeat::GridConfig& config); + + /** Update Radial repeat configurations i.e. number of arts, center, radial radius etc + + @Param AIArtHandle art: Radial repeat art whose configuration needs to be changed + @Param RadialConfig config: updated radial repeat configurations + @Param RadialUpdate state: specify which properties of radial repeat gets updated + */ + AIAPI AIErr (*SetRadialConfiguration) (AIArtHandle art, const AIRepeat::RadialConfig& config, AIRepeat::RadialUpdate state); + + /** Get Radial repeat configurations i.e. number of arts, circle center, radius etc + + @Param AIArtHandle art: Radial repeat art whose configuration is required + @Param RadialConfig config: Return radial configurations in this variable + */ + AIAPI AIErr (*GetRadialConfiguration) (AIArtHandle art, AIRepeat::RadialConfig& config); + + /** Update Symmetry repeat configurations i.e. perpendicular distance from symmetry axis, symmetry axis rotation angle wrt x-axis etc + + @Param AIArtHandle art: Symmetry repeat art whose configuration needs to be changed + @Param SymmetryConfig config: updated symmetry repeat configurations + @Param SymmetryUpdate state: specify which properties of symmetry repeat gets updated + */ + AIAPI AIErr (*SetSymmetryConfiguration) (AIArtHandle art, const AIRepeat::SymmetryConfig& config, AIRepeat::SymmetryUpdate state); + + /** Get Symmetry repeat configurations i.e. perpendicular distance from symmetry axis, symmetry axis rotation angle wrt x-axis etc + + @Param AIArtHandle art: Symmetry repeat art whose configuration is required + @Param SymmetryConfig config: Return symmetry configurations in this variable + */ + AIAPI AIErr (*GetSymmetryConfiguration) (AIArtHandle art, AIRepeat::SymmetryConfig& config); + + /** Update Concentric repeat configurations i.e. number of instances etc + + @Param AIArtHandle art: Concentric repeat art whose configuration needs to be changed + @Param ConcentricConfig config: updated concentric repeat configurations + @Param ConcentricUpdate state: specify which properties of concentric repeat gets updated + */ + AIAPI AIErr (*SetConcentricConfiguration) (AIArtHandle art, const AIRepeat::ConcentricConfig& config, AIRepeat::ConcentricUpdate state); + + /** Get Concentric repeat configurations i.e. number of instances etc + + @Param AIArtHandle art: Concentric repeat art whose configuration is required + @Param ConcentricConfig config: Return concentric configurations in this variable + */ + AIAPI AIErr (*GetConcentricConfiguration) (AIArtHandle art, AIRepeat::ConcentricConfig& config); + + /** Get main art which was repeated + + @Param AIArtHandle art: Radial/Grid/Symmetry/Concentric repeat art whose main art is required + @Param AIArtHandle mainArt: Return main art + */ + AIAPI AIErr (*GetMainArt) (AIArtHandle art, AIArtHandle& mainArt); + + /** Get all children arts of main art which was repeated + + @Param AIArtHandle art: Radial/Grid/Symmetry/Concentric repeat art whose children arts of main art are required + @Param AIArtHandle mainArts: Return children arts of main art + */ + AIAPI AIErr (*GetMainArts) (AIArtHandle art, AIArtSet& mainArts); + + /** Get height and width of main art + + @Param AIArtHandle art: Radial/Grid/Symmetry/Concentric repeat art whose main arts are required + @Param double& height: Out param to return height of main art + @Param double& width: Out param to return width of main art + */ + AIAPI AIErr (*GetMainArtSize)(AIArtHandle art, AIReal& height, AIReal& width); + + /** + Checks if given art is Repeat art + + @Param AiArtHandle art: Art which has to checked for repeat art type + */ + AIAPI AIBoolean (*IsRepeatArt)(AIArtHandle art); + + /** + Checks if Repeat art is Symmetry or Radial Repeat or Grid Repeat Art + + @Param ai::int16 artType: ArtType of the Repeat art to be checked (kSymmetryArt / kRadialRepeatArt / kGridRepeatArt) + */ + AIAPI AIBoolean(*IsRepeatArtType)(ai::int16 artType); + + /** + Invalidate Repeat art + + @Param AiArtHandle art: Art which has to be invalidated + */ + AIAPI AIErr(*Invalidate)(AIArtHandle art); + +}; + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRuntime.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRuntime.h index 7b8530a..07861da 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRuntime.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIRuntime.h @@ -1,311 +1,346 @@ -#ifndef __AIRuntime__ -#define __AIRuntime__ - -/* - * Name: AIRuntime.h - * $Revision: 11 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Runtime Environment. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AINameSpace__ -#include "AINameSpace.h" -#endif - -#ifndef __AIStringPool__ -#include "AIStringPool.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIUnicodeString__ -#include "AIUnicodeString.h" -#endif //__AIUnicodeString__ - -#ifndef __AIFont__ -#include "AIFont.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIRuntime.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIRuntimeSuite "AI Runtime Suite" -#define kAIRuntimeSuiteVersion12 AIAPI_VERSION(12) -#define kAIRuntimeSuiteVersion kAIRuntimeSuiteVersion12 -#define kAIRuntimeVersion kAIRuntimeSuiteVersion - -/** @ingroup Notifiers - Your plug-in can subscribe to this notifier when it receives the startup - selector. It receives the notification only once, when the application - has completed the startup process. This provides an opportunity to perform - additional setup operations such as restoring plug-in window positions and - visibility, or operations that depend on suites unavailable at an earlier time. -*/ -#define kAIApplicationStartedNotifier "AI Application Started Notifier" -/** @ingroup Notifiers - Sent at application shutdown, allows you to clean up private data. See - \c #AIRuntimeSuite. */ -#define kAIApplicationShutdownNotifier "AI Application Shutdown Notifier" - -/** @ingroup Notifiers - Sent when the application is activated. */ -const char* const kAIApplicationActivatedNotifier = "AI Application Activated Notifier"; - -/** @ingroup Notifiers - Sent when the application is deactivated. */ -const char* const kAIApplicationDeactivatedNotifier = "AI Application Deactivated Notifier"; - -/** Operating system versions for Mac OS. */ -enum AISystemOSVersion { - kAIMacSystemNineOne = 0x0910, - kAIMacSystemTen = 0x1000, - kAIMacSystemOne = 0x1010, - kAIMacSystemTwo = 0x1020, - kAIMacSystemThree = 0x1030, - kAIMacSystemFour = 0x1040 -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Application name */ -typedef const char *AIAppName; -/** Application version */ -typedef const char *AIAppVersion; -/** User name, as registered for the application. */ -typedef const char *AIUserName; -/** User organization, as registered for the application. */ -typedef const char *AIUserOrganization; -/** User serial number, as registered for the application. */ -typedef const char *AIUserSerialNumber; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provide functions that allow you to obtain information - about the name and version number of the plug-in host application. - You can access application instances of the name space and string - pool data structures, and the user name, organization, and serial - number registered for the application. - - The following notifiers are associated with the runtime suite: -
\c #kAIApplicationStartedNotifier -
\c #kAIApplicationShutdownNotifier - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIRuntimeSuite and \c #kAIRuntimeVersion. -*/ -struct AIRuntimeSuite { - - /** Retrieves the name of the host application running the plug-in. - You can use the name to verify that your plug-in is running in - a supported host application. You can also use the name and - serial number to key your plug-in to an installed application. - @param name [out] A buffer in which to return the name, - as a C-string from the application string pool. - Do not modify the returned string. - */ - AIAPI AIErr (*GetAppName) ( AIAppName *name ); - - /** Retrieves the file specification of the host application running the plug-in. - @param name [out] A buffer in which to return the file specification. - */ - AIAPI AIErr (*GetAppFileSpecification) ( ai::FilePath &file ); - - /** Retrieves the user name, as registered with the application when - it was installed. - @param name [out] A buffer in which to return the name, - as a C-string from the application string pool. - Do not modify the returned string. - */ - AIAPI AIErr (*GetUserName) ( AIUserName *name ); - - /** Retrieves the user organization, as registered with the application when - it was installed. - @param organization [out] A buffer in which to return the organization, - as a C-string from the application string pool. - Do not modify the returned string. - */ - AIAPI AIErr (*GetUserOrganization) ( AIUserOrganization *organization ); - - /** Retrieves the user serial number, as registered with the application when - it was installed. - @param serialNumber [out] A buffer in which to return the serial number, - as a C-string from the application string pool. - Do not modify the returned string. - */ - AIAPI AIErr (*GetUserSerialNumber) ( AIUserSerialNumber *serialNumber ); - - /** Retrieves a reference to the namespace of the host application - running the plug-in. - - A plug-in can create its own namespace in which to store arbitrary data, - but it can also use this function to access the application’s namespace. - The application preferences (among other things) are stored in the - application namespace. - - Your plug-in should not modify the application’s existing namespace data - directly, but it can create new data within the application namespace. - @param space [out] A buffer in which to return the namespace reference. - */ - AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space ); - - /** Retrieves a reference to the string pool of the host application - running the plug-in. - - Illustrator maintains a string pool which any plug-in can access. - Runtime data for a host is stored in this string pool, and the strings - returned by functions in this suite belong to the application string pool. - These references point to the C-string data in the pool, and should - not be modified. If you need to modify such a string, copy it to - local storage. See \c #AIStringPoolSuite. - @param pool [out] A buffer in which to return the string-pool reference. - */ - AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool ); - - /** Gets the amount of physical RAM on the computer, which you can use - as an estimate of free application memory available. - (Note that this function returns a numeric value, not an error code.) - @return The number of bytes of RAM. - */ - AIAPI size_t (*GetAppFreeMem) ( void ); - - /** Shows the about box for the application. */ - AIAPI AIErr (*ShowAppAboutBox) ( void ); - - /** Retrieves the version of the operating system the application is running on. - (Note that this function returns a constant value, not an error code.) - @return An #AISystemOSVersion value. - */ - AIAPI ai::int32 (*GetSystemVersion) ( void ); - - /** Reports whether the operating system is Mac OS X. - @return True if the operating system is Mac OS X. - */ - AIAPI AIBoolean (*GetIsSystemMacOSX) ( void ); - - /** Retrieves the major version number of the application - (X where the version number is X.Y.Z). - (Note that this function returns a numeric value, not an error code.) - @return The major version number. - */ - AIAPI ai::int32 (*GetAppMajorVersion) ( void ); - - /** Retrieves the minor version number of the application - (Y where the version number is X.Y.Z). - (Note that this function returns a numeric value, not an error code.) - @return The minor version number. - */ - AIAPI ai::int32 (*GetAppMinorVersion) ( void ); - - /** Retrieves the revision number of the application - (Z where the version number is X.Y.Z). - (Note that this function returns a numeric value, not an error code.) - @return The revision number. - */ - AIAPI ai::int32 (*GetAppRevisionVersion) ( void ); - - /** Retrieves the Unicode name of the host application running the plug-in. - @param name [out] A buffer in which to return the name, - as a Unicode string. - */ - AIAPI AIErr (*GetAppNameUS) ( ai::UnicodeString& name ); - - /** Retrieves the Unicode user name, as registered with the application when - it was installed. - @param name [out] A buffer in which to return the name, - as a Unicode string. - */ - AIAPI AIErr (*GetUserNameUS) ( ai::UnicodeString& name ); - - /** Retrieves the Unicode organization name, as registered with the application when - it was installed. - @param organization [out] A buffer in which to return the name, - as a Unicode string. - */ - AIAPI AIErr (*GetUserOrganizationUS) ( ai::UnicodeString& organization ); - - /** Retrieves the default script for the application. - @param script [out] A buffer in which to return the script reference. - */ - AIAPI AIErr (*GetDefaultScript) ( AIFaceScript *script); - - /** Used internally. */ - AIAPI AIBoolean (*GetIsHonestyBuild) ( void ); - - /** Used internally. */ - AIAPI AIBoolean (*GetIsProductTryAndDie) ( void ); - - // New in Illustrator 13 - - /** Used internally. Reports whether this is an executable build. */ - AIAPI AIBoolean (*GetIsExeBuild) ( void ); - - /** Launches the Adobe Help Viewer and shows an Illustrator help page. - @param pageID A null terminated UTF-8 string for the help page ID, - or a NULL pointer to bring up the default help page. - */ - AIAPI AIErr (*ShowAdobeHelp) (const char *pageID); - - /** Retrieves the application build number. - - @param isDebug [out] A buffer in which to return a flag, or NULL if flag is not needed. - Returns true if this is a debug build, false if this is a release build. - @returns the revision number. - */ - AIAPI ai::int32 (*GetAppBuildNumber) ( AIBoolean *isDebug ); - - - /** Retrieves Adobe user's GUID and AdobeID. - - @returns 0 if fails - */ - AIAPI ai::int32 (*GetUserAdobeID) (const char **userGUID, const char **userAdobeID); -}; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIRuntime__ +#define __AIRuntime__ + +/* + * Name: AIRuntime.h + * $Revision: 11 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Runtime Environment. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2016 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AINameSpace__ +#include "AINameSpace.h" +#endif + +#ifndef __AIStringPool__ +#include "AIStringPool.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#ifndef __AIUnicodeString__ +#include "AIUnicodeString.h" +#endif //__AIUnicodeString__ + +#ifndef __AIFont__ +#include "AIFont.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIRuntime.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIRuntimeSuite "AI Runtime Suite" +#define kAIRuntimeSuiteVersion14 AIAPI_VERSION(14) +#define kAIRuntimeSuiteVersion kAIRuntimeSuiteVersion14 +#define kAIRuntimeVersion kAIRuntimeSuiteVersion + +/** @ingroup Notifiers + Your plug-in can subscribe to this notifier when it receives the startup + selector. It receives the notification only once, when the application + has completed the startup process. This provides an opportunity to perform + additional setup operations such as restoring plug-in window positions and + visibility, or operations that depend on suites unavailable at an earlier time. +*/ +#define kAIApplicationStartedNotifier "AI Application Started Notifier" +/** @ingroup Notifiers + Sent at application shutdown, allows you to clean up private data. See + \c #AIRuntimeSuite. */ +#define kAIApplicationShutdownNotifier "AI Application Shutdown Notifier" + +/** @ingroup Notifiers + Sent to plugins to persist any user data like preferences, logs, settings etc. + Do not perform any memory or resource cleanups in this notifier, as this might be sent multiple times in a session. + Use \c kAIApplicationShutdownNotifier for cleanup. */ +#define kAISaveUserDataNotifier "AI Save User Data Notifier" + +/** @ingroup Notifiers + Sent when the application is activated. */ +const char* const kAIApplicationActivatedNotifier = "AI Application Activated Notifier"; + +/** @ingroup Notifiers + Sent when the application is deactivated. */ +const char* const kAIApplicationDeactivatedNotifier = "AI Application Deactivated Notifier"; + +/** @ingroup Notifiers + Sent when the application or system/OS is going to sleep. */ +const char* const kAIApplicationSuspendedNotifier = "AI Application Suspended Notifier"; + +/** @ingroup Notifiers + Sent when the application or system/OS is awaking from sleep. */ +const char* const kAIApplicationResumedNotifier = "AI Application Resumed Notifier"; + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Application name */ +typedef const char *AIAppName; +/** Application version */ +typedef const char *AIAppVersion; +/** User name, as registered for the application. */ +typedef const char *AIUserName; +/** User organization, as registered for the application. */ +typedef const char *AIUserOrganization; +/** User serial number, as registered for the application. */ +typedef const char *AIUserSerialNumber; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provide functions that allow you to obtain information + about the name and version number of the plug-in host application. + You can access application instances of the name space and string + pool data structures, and the user name, organization, and serial + number registered for the application. + + The following notifiers are associated with the runtime suite: +
\c #kAIApplicationStartedNotifier +
\c #kAIApplicationShutdownNotifier + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIRuntimeSuite and \c #kAIRuntimeVersion. +*/ +struct AIRuntimeSuite { + + /** Retrieves the name of the host application running the plug-in. + You can use the name to verify that your plug-in is running in + a supported host application. You can also use the name and + serial number to key your plug-in to an installed application. + @param name [out] A buffer in which to return the name, + as a C-string from the application string pool. + Do not modify the returned string. + */ + AIAPI AIErr (*GetAppName) ( AIAppName *name ); + + /** Retrieves the file specification of the host application running the plug-in. + @param name [out] A buffer in which to return the file specification. + */ + AIAPI AIErr (*GetAppFileSpecification) ( ai::FilePath &file ); + + /** Retrieves the user name, as registered with the application when + it was installed. + @param name [out] A buffer in which to return the name, + as a C-string from the application string pool. + Do not modify the returned string. + */ + AIAPI AIErr (*GetUserName) ( AIUserName *name ); + + /** Retrieves the user organization, as registered with the application when + it was installed. + @param organization [out] A buffer in which to return the organization, + as a C-string from the application string pool. + Do not modify the returned string. + */ + AIAPI AIErr (*GetUserOrganization) ( AIUserOrganization *organization ); + + /** Retrieves the user serial number, as registered with the application when + it was installed. + @param serialNumber [out] A buffer in which to return the serial number, + as a C-string from the application string pool. + Do not modify the returned string. + */ + AIAPI AIErr (*GetUserSerialNumber) ( AIUserSerialNumber *serialNumber ); + + /** Retrieves a reference to the namespace of the host application + running the plug-in. + + A plug-in can create its own namespace in which to store arbitrary data, + but it can also use this function to access the applications namespace. + The application preferences (among other things) are stored in the + application namespace. + + Your plug-in should not modify the applications existing namespace data + directly, but it can create new data within the application namespace. + @param space [out] A buffer in which to return the namespace reference. + */ + AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space ); + + /** Retrieves a reference to the string pool of the host application + running the plug-in. + + Illustrator maintains a string pool which any plug-in can access. + Runtime data for a host is stored in this string pool, and the strings + returned by functions in this suite belong to the application string pool. + These references point to the C-string data in the pool, and should + not be modified. If you need to modify such a string, copy it to + local storage. See \c #AIStringPoolSuite. + @param pool [out] A buffer in which to return the string-pool reference. + */ + AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool ); + + /** Gets the amount of physical RAM on the computer, which you can use + as an estimate of free application memory available. + (Note that this function returns a numeric value, not an error code.) + @return The number of bytes of RAM. + */ + AIAPI size_t (*GetAppFreeMem) ( void ); + + /** Shows the about box for the application. */ + AIAPI AIErr (*ShowAppAboutBox) ( void ); + + /** Retrieves the version of the operating system the application is running on. + (Note that this function returns a constant value, not an error code.) + @return An integer value of the form: (majorVersion * 100 + minorVersion). + */ + AIAPI ai::int32 (*GetSystemVersion) ( void ); + + /** Reports whether the operating system is Mac OS X. + @return True if the operating system is Mac OS X. + */ + AIAPI AIBoolean (*GetIsSystemMacOSX) ( void ); + + /** Retrieves the major version number of the application + (X where the version number is X.Y.Z). + (Note that this function returns a numeric value, not an error code.) + @return The major version number. + */ + AIAPI ai::int32 (*GetAppMajorVersion) ( void ); + + /** Retrieves the minor version number of the application + (Y where the version number is X.Y.Z). + (Note that this function returns a numeric value, not an error code.) + @return The minor version number. + */ + AIAPI ai::int32 (*GetAppMinorVersion) ( void ); + + /** Retrieves the revision number of the application + (Z where the version number is X.Y.Z). + (Note that this function returns a numeric value, not an error code.) + @return The revision number. + */ + AIAPI ai::int32 (*GetAppRevisionVersion) ( void ); + + /** Retrieves the Unicode name of the host application running the plug-in. + @param name [out] A buffer in which to return the name, + as a Unicode string. + */ + AIAPI AIErr (*GetAppNameUS) ( ai::UnicodeString& name ); + + /** Retrieves the Unicode user name, as registered with the application when + it was installed. + @param name [out] A buffer in which to return the name, + as a Unicode string. + */ + AIAPI AIErr (*GetUserNameUS) ( ai::UnicodeString& name ); + + /** Retrieves the Unicode organization name, as registered with the application when + it was installed. + @param organization [out] A buffer in which to return the name, + as a Unicode string. + */ + AIAPI AIErr (*GetUserOrganizationUS) ( ai::UnicodeString& organization ); + + /** Retrieves the default script for the application. + @param script [out] A buffer in which to return the script reference. + */ + AIAPI AIErr (*GetDefaultScript) ( AIFaceScript *script); + + /** Used internally. */ + AIAPI AIBoolean (*GetIsHonestyBuild) ( void ); + + /** Used internally. */ + AIAPI AIBoolean (*GetIsProductTryAndDie) ( void ); + + // Introduced in Illustrator 13 + + /** Used internally. Reports whether this is an executable build. */ + AIAPI AIBoolean (*GetIsExeBuild) ( void ); + + /** Launches the Adobe Help Viewer and shows an Illustrator help page. + @param pageID A null terminated UTF-8 string for the help page ID, + or a NULL pointer to bring up the default help page. + */ + AIAPI AIErr (*ShowAdobeHelp) (const char *pageID); + + /** Retrieves the application build number. + + @param isDebug [out] A buffer in which to return a flag, or NULL if flag is not needed. + Returns true if this is a debug build, false if this is a release build. + @returns the revision number. + */ + AIAPI ai::int32 (*GetAppBuildNumber) ( AIBoolean *isDebug ); + + + /** Retrieves Adobe user's GUID and AdobeID. + + @returns 0 if fails + */ + AIAPI ai::int32 (*GetUserAdobeID) (const char **userGUID, const char **userAdobeID); + + /** Returns true, if the application is AIRobin instead of Illustrator. + AIRobin is the background helper process of Illustrator. + @returns true, if application is AIRobin. */ + + AIAPI AIBoolean (*IsAIRobin) (void); + + AIAPI void (*PostQuit)(void); + + /** + Pauses the Idle events suppression when the app is in background. This will allow plugins to perform and receive idle notifications + Even when the app is in background. This must be turned back on by calling ResumeIdleEventSuspensionInBackground + */ + AIAPI AIErr (*PauseIdleEventSuspensionInBackground)(); + + /** + Resumes the Idle events suppression when the app is in the background. This must be called after PauseIdleEventSuspensionInBackground + */ + AIAPI AIErr(*ResumeIdleEventSuspensionInBackground)(); + + /** + Pauses the idle event suppression when the app is in the background for a specified number of seconds. It will automatically resume + after the time have elapsed after calling the API. There is no need for specifically resuming when calling this API. + */ + AIAPI AIErr(*PauseIdleEventSuspensionInBackgroundFor)(ai::uint32 seconds); + + /** + * Returns true if Idle events processing is suspended when the app is in the background. + */ + AIAPI AIBoolean(*AreIdleEventsSuspendedInBackground)(); + +}; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISFWUtilities.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISFWUtilities.h index e15e7af..c36c91b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISFWUtilities.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISFWUtilities.h @@ -1,94 +1,94 @@ -#ifndef __AISFWUTILITIES__ -#define __AISFWUTILITIES__ - -/* - * Name: AISFWUtilities.h - * Purpose: Adobe Illustrator Save For Web Utilities Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif -#ifndef __AIDataFilter__ -#include "AIDataFilter.h" -#endif -#ifndef __AIFileFormat__ -#include "AIFileFormat.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AISFWUtilities.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAISFWUtilitiesSuite "AI SFW Utilities Suite" -#define kAISFWUtilitiesSuiteVersion4 AIAPI_VERSION(4) - -/* Latest version */ -#define kAISFWUtilitiesSuiteVersion kAISFWUtilitiesSuiteVersion4 -#define kAISFWUtilitiesVersion kAISFWUtilitiesSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides access to save-for-Web features. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAISFWUtilitiesSuite and \c #kAISFWUtilitiesSuiteVersion. - */ -typedef struct { - - /** Retrieves the location of the file in which application Save-For-Web - settings are saved. - @param outFileSpec [out] A buffer in which to return the file - specification. - */ - AIAPI AIErr (*GetSaveSettingsDirectory) (ai::FilePath &outFileSpec); - - /** Displays the Slice Options dialog, which allows the user - to set the options for an image slice. This is the dialog shown - when you create a slice in the document (draw an object, choose Object>Slice>Make), - select it, and choose Object>Slice>Slice Options. Modifiable options - in this dialog include slice type, name, URL, target, message, alternate - text, and background color. - @param inSliceID The unique slice identifier. - */ - AIAPI AIErr (*ShowSliceOptions) (ai::int32 inSliceID); - -} AISFWUtilitiesSuite; - - -#include "AIHeaderEnd.h" - - -#endif - +#ifndef __AISFWUTILITIES__ +#define __AISFWUTILITIES__ + +/* + * Name: AISFWUtilities.h + * Purpose: Adobe Illustrator Save For Web Utilities Suite + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif +#ifndef __AIDataFilter__ +#include "AIDataFilter.h" +#endif +#ifndef __AIFileFormat__ +#include "AIFileFormat.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AISFWUtilities.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAISFWUtilitiesSuite "AI SFW Utilities Suite" +#define kAISFWUtilitiesSuiteVersion4 AIAPI_VERSION(4) + +/* Latest version */ +#define kAISFWUtilitiesSuiteVersion kAISFWUtilitiesSuiteVersion4 +#define kAISFWUtilitiesVersion kAISFWUtilitiesSuiteVersion + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides access to save-for-Web features. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAISFWUtilitiesSuite and \c #kAISFWUtilitiesSuiteVersion. + */ +typedef struct { + + /** Retrieves the location of the file in which application Save-For-Web + settings are saved. + @param outFileSpec [out] A buffer in which to return the file + specification. + */ + AIAPI AIErr (*GetSaveSettingsDirectory) (ai::FilePath &outFileSpec); + + /** Displays the Slice Options dialog, which allows the user + to set the options for an image slice. This is the dialog shown + when you create a slice in the document (draw an object, choose Object>Slice>Make), + select it, and choose Object>Slice>Slice Options. Modifiable options + in this dialog include slice type, name, URL, target, message, alternate + text, and background color. + @param inSliceID The unique slice identifier. + */ + AIAPI AIErr (*ShowSliceOptions) (ai::int32 inSliceID); + +} AISFWUtilitiesSuite; + + +#include "AIHeaderEnd.h" + + +#endif + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISVGFilter.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISVGFilter.h index 3125c96..24f5c51 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISVGFilter.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISVGFilter.h @@ -1,206 +1,206 @@ -#ifndef __AISVGFilter__ -#define __AISVGFilter__ - -/* - * Name: AISVGFilter.h - * $Revision: 2 $ - * Author: - * Date: - * Purpose: Adobe Illustrator SVG Filter Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIArtStyle.h" -#include "AIUID.h" -#include "AIXMLElement.h" - -#include "AIHeaderBegin.h" - -/** @file AISVGFilter.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAISVGFilterSuite "AI SVG Filter Suite" -#define kAISVGFilterSuiteVersion1 AIAPI_VERSION(1) -#define kAISVGFilterSuiteVersion4 AIAPI_VERSION(4) -#define kAISVGFilterSuiteVersion kAISVGFilterSuiteVersion4 -#define kAISVGFilterVersion kAISVGFilterSuiteVersion - -/** @ingroup Notifiers - See \c #AISVGFilterSuite */ -#define kAISVGFilterChangedNotifier "AI SVG Filter Changed Notifier" -/** @ingroup Notifiers - See \c #AISVGFilterAddedNotifierData. */ -#define kAISVGFilterAddedNotifier "AI SVG Filter Added Notifier" - -/** @ingroup Errors - Identifier in use. See \c #AISVGFilterSuite. - */ -#define kXMLIDCollisionErr kUIDNotUnique -/** @ingroup Errors - Identifier changed. See \c #AISVGFilterSuite. */ -#define kXMLIDChangedErr 'IDCN' -/** @ingroup Errors - No SVG filter available. See \c #AISVGFilterSuite. */ -#define kNoSVGFilterErr '!SFE' -/** @ingroup Errors - Attempt to redefine existing SVG filter with new XML identifier. - See \c #AISVGFilterSuite. */ -#define kSVGFilterRedefErr 'SRDE' - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Notification data for \c #kAISVGFilterAddedNotifier */ -typedef struct { - /** The document */ - AIDocumentHandle document; - /** The SVG filter */ - AISVGFilterHandle filter; -} AISVGFilterAddedNotifierData; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - - The SVG-filter Effect makes it possible to apply SVG filters to Illustrator artwork, - from a global list associated with the current document. - Filters are preserved, if possible, when the SVG file is written. - - This suite provides functions that allow you to manage the global - list of SVG filters, attach filters to art, and manipulate art with SVG filters attached. - - Although AISVGFilterHandles are reference counted objects this suite does not - increment the reference count before returning it to you as with other reference counted - objects. - - These notifiers are associated with SVG filters: -
\c #kAISVGFilterChangedNotifier -
\c #kAISVGFilterAddedNotifier - - These error codes are associated with SVG filters: -
\c #kXMLIDCollisionErr -
\c #kXMLIDChangedErr -
\c #kNoSVGFilterErr -
\c #kSVGFilterRedefErr - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAISVGFilterSuite and \c #kAISVGFilterVersion. - */ -typedef struct { - - /** Creates a new SVG filter in the current document. - @param newFilter [out] A buffer in which to return the new filter. - */ - AIAPI AIErr (*NewSVGFilter) ( AISVGFilterHandle *newFilter ); - - /** Deletes an SVG filter from the current document. - @param filter The filter. - */ - AIAPI AIErr (*DeleteSVGFilter) ( AISVGFilterHandle filter ); - - /** Gets the number of SVG filters in the current document. Use with - \c #GetNthSVGFilter() to iterate through filters. - @param count [out] A buffer in which to return the count. - */ - AIAPI AIErr (*CountSVGFilters) ( ai::int32 *count ); - - /** Retrieves an SVG filter from the filter list for the current document. - Use with \c #CountSVGFilters() to iterate through filters. - @param n The 0-based position index. - @param filter [out] A buffer in which to return the filter. - */ - AIAPI AIErr (*GetNthSVGFilter) ( ai::int32 n, AISVGFilterHandle *filter ); - - /** Sets the contents of an SVG filter. - @param filter The SVG filter. - @param filterContents The XML node containing the new contents. - @param forceUniqueID True to rename the filter to have a unique identifier, if - necessary. Retrieve the XML identifier from the filter object with \c #GetSVGFilterUIDName()) - @return \c #kXMLIDCollisionErr error if \c forceUniqueID is false, and - if The XML identifier is already in use in the current document. -
\c #kXMLIDChangedErr if \c forceUniqueID is true and the XML identifier - was changed to make it unique. - */ - AIAPI AIErr (*SetSVGFilterContents) ( AISVGFilterHandle filter, AIXMLNodeRef filterContents, - AIBool8 forceUniqueID ); - - /** Retrieves the contents of an SVG filter. - @param filter The SVG filter. - @param filterContents [out] A buffer in which to return the XML node containing the contents. - */ - AIAPI AIErr (*GetSVGFilterContents) ( AISVGFilterHandle filter, AIXMLNodeRef *filterContents ); - - /** Retrieves the filter handle associated with an identifying name string. - @param name The name string. - @param filter [out] A buffer in which to return the filter. - */ - AIAPI AIErr (*GetSVGFilter) ( const ai::UnicodeString& name, AISVGFilterHandle *filter ); - - /** Retrieves the identifying name string for a filter handle, - @param filter The SVG filter. - @param name [out] A buffer in which to return the name string. - */ - AIAPI AIErr (*GetSVGFilterUIDName) (AISVGFilterHandle filter, ai::UnicodeString& name); - - /** Retrieves a copy of art that is used for an SVG Filter Effect on the specified art object. - @param art The input art object. - @param svgArt [out] A buffer in which to return a copy of the SVG filter art, or null if there is no SVG Filter Effect attached to the input art object. - You are responsible for freeing this copy using \c #DisposeFilterArt(). - */ - AIAPI AIErr (*GetSVGFilterArt) ( AIArtHandle art, AIArtHandle* svgArt ); - - /** Disposes of the input/output art for an SVG filter, as returned - by \c #GetSVGFilterArt(). - @param art The SVG art. - */ - AIAPI AIErr (*DisposeFilterArt) ( AIArtHandle art ); - - /** Applies an SVG filter to artwork. - @param art The artwork. - @param filter The SVG filter. - */ - AIAPI AIErr (*AttachFilter) ( AIArtHandle art, AISVGFilterHandle filter ); - - /** Generates an SVG filter to represent an art style, if possible. - @param artStyle The art style object. - @param filter [out] A buffer in which to return the SVG filter. - @return \c #kNoSVGFilterErr error if the style cannot be represented as SVG. - */ - AIAPI AIErr (*SVGFilterFromAIArtStyle) ( const AIArtStyleHandle artStyle, AISVGFilterHandle *filter); - -} AISVGFilterSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AISVGFilter__ +#define __AISVGFilter__ + +/* + * Name: AISVGFilter.h + * $Revision: 2 $ + * Author: + * Date: + * Purpose: Adobe Illustrator SVG Filter Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AIArtStyle.h" +#include "AIUID.h" +#include "AIXMLElement.h" + +#include "AIHeaderBegin.h" + +/** @file AISVGFilter.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAISVGFilterSuite "AI SVG Filter Suite" +#define kAISVGFilterSuiteVersion1 AIAPI_VERSION(1) +#define kAISVGFilterSuiteVersion4 AIAPI_VERSION(4) +#define kAISVGFilterSuiteVersion kAISVGFilterSuiteVersion4 +#define kAISVGFilterVersion kAISVGFilterSuiteVersion + +/** @ingroup Notifiers + See \c #AISVGFilterSuite */ +#define kAISVGFilterChangedNotifier "AI SVG Filter Changed Notifier" +/** @ingroup Notifiers + See \c #AISVGFilterAddedNotifierData. */ +#define kAISVGFilterAddedNotifier "AI SVG Filter Added Notifier" + +/** @ingroup Errors + Identifier in use. See \c #AISVGFilterSuite. + */ +#define kXMLIDCollisionErr kUIDNotUnique +/** @ingroup Errors + Identifier changed. See \c #AISVGFilterSuite. */ +#define kXMLIDChangedErr 'IDCN' +/** @ingroup Errors + No SVG filter available. See \c #AISVGFilterSuite. */ +#define kNoSVGFilterErr '!SFE' +/** @ingroup Errors + Attempt to redefine existing SVG filter with new XML identifier. + See \c #AISVGFilterSuite. */ +#define kSVGFilterRedefErr 'SRDE' + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Notification data for \c #kAISVGFilterAddedNotifier */ +typedef struct { + /** The document */ + AIDocumentHandle document; + /** The SVG filter */ + AISVGFilterHandle filter; +} AISVGFilterAddedNotifierData; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + + The SVG-filter Effect makes it possible to apply SVG filters to Illustrator artwork, + from a global list associated with the current document. + Filters are preserved, if possible, when the SVG file is written. + + This suite provides functions that allow you to manage the global + list of SVG filters, attach filters to art, and manipulate art with SVG filters attached. + + Although AISVGFilterHandles are reference counted objects this suite does not + increment the reference count before returning it to you as with other reference counted + objects. + + These notifiers are associated with SVG filters: +
\c #kAISVGFilterChangedNotifier +
\c #kAISVGFilterAddedNotifier + + These error codes are associated with SVG filters: +
\c #kXMLIDCollisionErr +
\c #kXMLIDChangedErr +
\c #kNoSVGFilterErr +
\c #kSVGFilterRedefErr + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAISVGFilterSuite and \c #kAISVGFilterVersion. + */ +typedef struct { + + /** Creates a new SVG filter in the current document. + @param newFilter [out] A buffer in which to return the new filter. + */ + AIAPI AIErr (*NewSVGFilter) ( AISVGFilterHandle *newFilter ); + + /** Deletes an SVG filter from the current document. + @param filter The filter. + */ + AIAPI AIErr (*DeleteSVGFilter) ( AISVGFilterHandle filter ); + + /** Gets the number of SVG filters in the current document. Use with + \c #GetNthSVGFilter() to iterate through filters. + @param count [out] A buffer in which to return the count. + */ + AIAPI AIErr (*CountSVGFilters) ( ai::int32 *count ); + + /** Retrieves an SVG filter from the filter list for the current document. + Use with \c #CountSVGFilters() to iterate through filters. + @param n The 0-based position index. + @param filter [out] A buffer in which to return the filter. + */ + AIAPI AIErr (*GetNthSVGFilter) ( ai::int32 n, AISVGFilterHandle *filter ); + + /** Sets the contents of an SVG filter. + @param filter The SVG filter. + @param filterContents The XML node containing the new contents. + @param forceUniqueID True to rename the filter to have a unique identifier, if + necessary. Retrieve the XML identifier from the filter object with \c #GetSVGFilterUIDName()) + @return \c #kXMLIDCollisionErr error if \c forceUniqueID is false, and + if The XML identifier is already in use in the current document. +
\c #kXMLIDChangedErr if \c forceUniqueID is true and the XML identifier + was changed to make it unique. + */ + AIAPI AIErr (*SetSVGFilterContents) ( AISVGFilterHandle filter, AIXMLNodeRef filterContents, + AIBool8 forceUniqueID ); + + /** Retrieves the contents of an SVG filter. + @param filter The SVG filter. + @param filterContents [out] A buffer in which to return the XML node containing the contents. + */ + AIAPI AIErr (*GetSVGFilterContents) ( AISVGFilterHandle filter, AIXMLNodeRef *filterContents ); + + /** Retrieves the filter handle associated with an identifying name string. + @param name The name string. + @param filter [out] A buffer in which to return the filter. + */ + AIAPI AIErr (*GetSVGFilter) ( const ai::UnicodeString& name, AISVGFilterHandle *filter ); + + /** Retrieves the identifying name string for a filter handle, + @param filter The SVG filter. + @param name [out] A buffer in which to return the name string. + */ + AIAPI AIErr (*GetSVGFilterUIDName) (AISVGFilterHandle filter, ai::UnicodeString& name); + + /** Retrieves a copy of art that is used for an SVG Filter Effect on the specified art object. + @param art The input art object. + @param svgArt [out] A buffer in which to return a copy of the SVG filter art, or null if there is no SVG Filter Effect attached to the input art object. + You are responsible for freeing this copy using \c #DisposeFilterArt(). + */ + AIAPI AIErr (*GetSVGFilterArt) ( AIArtHandle art, AIArtHandle* svgArt ); + + /** Disposes of the input/output art for an SVG filter, as returned + by \c #GetSVGFilterArt(). + @param art The SVG art. + */ + AIAPI AIErr (*DisposeFilterArt) ( AIArtHandle art ); + + /** Applies an SVG filter to artwork. + @param art The artwork. + @param filter The SVG filter. + */ + AIAPI AIErr (*AttachFilter) ( AIArtHandle art, AISVGFilterHandle filter ); + + /** Generates an SVG filter to represent an art style, if possible. + @param artStyle The art style object. + @param filter [out] A buffer in which to return the SVG filter. + @return \c #kNoSVGFilterErr error if the style cannot be represented as SVG. + */ + AIAPI AIErr (*SVGFilterFromAIArtStyle) ( const AIArtStyleHandle artStyle, AISVGFilterHandle *filter); + +} AISVGFilterSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISVGTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISVGTypes.h index 0af8cfe..0bf46f1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISVGTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISVGTypes.h @@ -1,182 +1,182 @@ -#ifndef _AISVGTYPES_H_ -#define _AISVGTYPES_H_ - -/* - * Name: AISVGTypes.h - * Purpose: Adobe Illustrator SVG Types. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "AIHeaderBegin.h" - -// ----------------------------------------------------------------------------- -// Types. -// ----------------------------------------------------------------------------- - -/** The format for images within an SVG file.*/ -typedef enum _AISVGImageFormats -{ - kAISVGFormatDefault = 1, - kAISVGFormatJPEG, - kAISVGFormatGIF, - kAISVGFormatPNG -} AISVGImageFormats; - -/** The number of digits of precision after the decimal when rounding numbers. */ -typedef enum _AISVGCoordinatePrecision -{ - kAISVGPrecision_1 = 1, - kAISVGPrecision_2, - kAISVGPrecision_3, - kAISVGPrecision_4, - kAISVGPrecision_5, - kAISVGPrecision_6, - kAISVGPrecision_7 - -} AISVGCoordinatePrecision; - -/** The type of SVG rendering. */ -typedef enum _AISVGRendering -{ - kAISVGRenderingProgressive = 1, - kAISVGRenderingBatched -} AISVGRendering; - -/** How to subset fonts in the SVG. */ -typedef enum _AISVGFontSubsetting -{ - kAISVGSubsettingNone = 1, - kAISVGSubsettingGlyphsOnly, - kAISVGSubsettingCommonEnglishOnly, - kAISVGSubsettingGlyphsPlusEnglish, - kAISVGSubsettingCommonRomanOnly, - kAISVGSubsettingGlyphsPlusRoman, - kAISVGSubsettingOutputEntireFont -} AISVGFontSubsetting; - -/** Whether to embed fonts or create separate, linked files. */ -typedef enum _AISVGFileLocation -{ - kAISVGLocationEmbed = 1, - kAISVGLocationLink -} AISVGFileLocation; - -/** The character set to use for the SVG file. */ -typedef enum _AISVGDocumentEncoding -{ - /** ASCII */ - kAISVGISO8859Encoding = 1, - /** UTF 8 */ - kAISVGUTF8Encoding, - /** UTF 16 */ - kAISVGUTF16Encoding -} AISVGDocumentEncoding; - -/** The compression to use for the SVG file. */ -typedef enum _AISVGFileCompression -{ - kAISVGCompressionNone = 1, - kAISVGCompressionGZIP - -} AISVGFileCompression; - -/** How style information should be exported. */ -typedef enum _AISVGStyle -{ - kAISVGInLineStyle = 1, // 'style' attributes on the SVG elements - kAISVGEntityStyle, // 'style' attributes that contain entity references - kAISVGCSSStyle, // 'class' attributes with corresponding CSS styles - kAISVGPresentationAttrsStyle // presentation attributes on the SVG elements -} AISVGStyle; - -/** Units to use for dimensions and positions */ -typedef enum _AISVGUnits -{ - kAISVGUnitCentimeters = 0, - kAISVGUnitEms, - kAISVGUnitInches, - kAISVGUnitPicas, - kAISVGUnitPixels, - kAISVGUnitPoints, - kAISVGUnitMillimeters -} AISVGUnits; - -/** The resolution measurement unit. */ -typedef enum _AISVGResolution -{ - kAISVGPixelsPerInch = 0, - kAISVGPixelsPerCentimeter -} AISVGResolution; - -/** What types of fonts to embed. */ -typedef enum _AISVGEmbedFontFormats -{ - kAISVGEmbedFontTrueType = 0, - kAISVGEmbedFontType1 , - kAISVGEmbedFontBoth -} AISVGEmbedFontFormats; - -/** Whether images are embedded or saved as separate files. */ -typedef enum _AISVGRasterLocation -{ - kAISVGImageEmbed = 1, - kAISVGImagelink, - kAISVGImagePreserve -} AISVGRasterLocation; - -//** The SVG DTD type. */ -typedef enum _AISVGDTD -{ - kAISVGDTD10 = -1, - kAISVGDTD11, - kAISVGDTDTiny11, - kAISVGDTDTiny11Plus, - kAISVGDTDBasic11, - kAISVGDTDTiny12 -} AISVGDTD; - -/** What type of font to use. */ -typedef enum _AISVGFontType -{ - kAISVGFontCEF = 0, - kAISVGFontSVG, - kAISVGFontOutline -} AISVGFontType; - -/** How to treat text in paths. */ -typedef enum _AISVGTextOnPath -{ - kAISVGTextOnPathSVG = 0, - kAISVGTextOnPathIllustrator -} AISVGTextOnPath; - -/** Rectangle, defined by upper left corner point, width and height */ -typedef struct _AISVGRect -{ - float x; - float y; - float width; - float height; -} AISVGRect; - -/** Id/Class type to be used in svg to be exported */ -typedef enum _AISVGIdType -{ - kAISVGIdMinimal = 0, - kAISVGIdRegular, - kAISVGIdUnique -} AISVGIdType; - -#include "AIHeaderEnd.h" - -#endif // _AISVGTYPES_H_ +#ifndef _AISVGTYPES_H_ +#define _AISVGTYPES_H_ + +/* + * Name: AISVGTypes.h + * Purpose: Adobe Illustrator SVG Types. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2014 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "AIHeaderBegin.h" + +// ----------------------------------------------------------------------------- +// Types. +// ----------------------------------------------------------------------------- + +/** The format for images within an SVG file.*/ +typedef enum _AISVGImageFormats +{ + kAISVGFormatDefault = 1, + kAISVGFormatJPEG, + kAISVGFormatGIF, + kAISVGFormatPNG +} AISVGImageFormats; + +/** The number of digits of precision after the decimal when rounding numbers. */ +typedef enum _AISVGCoordinatePrecision +{ + kAISVGPrecision_1 = 1, + kAISVGPrecision_2, + kAISVGPrecision_3, + kAISVGPrecision_4, + kAISVGPrecision_5, + kAISVGPrecision_6, + kAISVGPrecision_7 + +} AISVGCoordinatePrecision; + +/** The type of SVG rendering. */ +typedef enum _AISVGRendering +{ + kAISVGRenderingProgressive = 1, + kAISVGRenderingBatched +} AISVGRendering; + +/** How to subset fonts in the SVG. */ +typedef enum _AISVGFontSubsetting +{ + kAISVGSubsettingNone = 1, + kAISVGSubsettingGlyphsOnly, + kAISVGSubsettingCommonEnglishOnly, + kAISVGSubsettingGlyphsPlusEnglish, + kAISVGSubsettingCommonRomanOnly, + kAISVGSubsettingGlyphsPlusRoman, + kAISVGSubsettingOutputEntireFont +} AISVGFontSubsetting; + +/** Whether to embed fonts or create separate, linked files. */ +typedef enum _AISVGFileLocation +{ + kAISVGLocationEmbed = 1, + kAISVGLocationLink +} AISVGFileLocation; + +/** The character set to use for the SVG file. */ +typedef enum _AISVGDocumentEncoding +{ + /** ASCII */ + kAISVGISO8859Encoding = 1, + /** UTF 8 */ + kAISVGUTF8Encoding, + /** UTF 16 */ + kAISVGUTF16Encoding +} AISVGDocumentEncoding; + +/** The compression to use for the SVG file. */ +typedef enum _AISVGFileCompression +{ + kAISVGCompressionNone = 1, + kAISVGCompressionGZIP + +} AISVGFileCompression; + +/** How style information should be exported. */ +typedef enum _AISVGStyle +{ + kAISVGInLineStyle = 1, // 'style' attributes on the SVG elements + kAISVGEntityStyle, // 'style' attributes that contain entity references + kAISVGCSSStyle, // 'class' attributes with corresponding CSS styles + kAISVGPresentationAttrsStyle // presentation attributes on the SVG elements +} AISVGStyle; + +/** Units to use for dimensions and positions */ +typedef enum _AISVGUnits +{ + kAISVGUnitCentimeters = 0, + kAISVGUnitEms, + kAISVGUnitInches, + kAISVGUnitPicas, + kAISVGUnitPixels, + kAISVGUnitPoints, + kAISVGUnitMillimeters +} AISVGUnits; + +/** The resolution measurement unit. */ +typedef enum _AISVGResolution +{ + kAISVGPixelsPerInch = 0, + kAISVGPixelsPerCentimeter +} AISVGResolution; + +/** What types of fonts to embed. */ +typedef enum _AISVGEmbedFontFormats +{ + kAISVGEmbedFontTrueType = 0, + kAISVGEmbedFontType1 , + kAISVGEmbedFontBoth +} AISVGEmbedFontFormats; + +/** Whether images are embedded or saved as separate files. */ +typedef enum _AISVGRasterLocation +{ + kAISVGImageEmbed = 1, + kAISVGImagelink, + kAISVGImagePreserve +} AISVGRasterLocation; + +//** The SVG DTD type. */ +typedef enum _AISVGDTD +{ + kAISVGDTD10 = -1, + kAISVGDTD11, + kAISVGDTDTiny11, + kAISVGDTDTiny11Plus, + kAISVGDTDBasic11, + kAISVGDTDTiny12 +} AISVGDTD; + +/** What type of font to use. */ +typedef enum _AISVGFontType +{ + kAISVGFontCEF = 0, + kAISVGFontSVG, + kAISVGFontOutline +} AISVGFontType; + +/** How to treat text in paths. */ +typedef enum _AISVGTextOnPath +{ + kAISVGTextOnPathSVG = 0, + kAISVGTextOnPathIllustrator +} AISVGTextOnPath; + +/** Rectangle, defined by upper left corner point, width and height */ +typedef struct _AISVGRect +{ + float x; + float y; + float width; + float height; +} AISVGRect; + +/** Id/Class type to be used in svg to be exported */ +typedef enum _AISVGIdType +{ + kAISVGIdMinimal = 0, + kAISVGIdRegular, + kAISVGIdUnique +} AISVGIdType; + +#include "AIHeaderEnd.h" + +#endif // _AISVGTYPES_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIScriptMessage.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIScriptMessage.h index 1f42a81..8d700e3 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIScriptMessage.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIScriptMessage.h @@ -1,91 +1,91 @@ -#ifndef __AIScriptMessage__ -#define __AIScriptMessage__ - -/* - * Name: AIScriptMessage.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator AIScriptMessage. - * - * Copyright (c) 2010 Adobe Systems Incorporated, All Rights Reserved. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __SPAccess__ -#include "SPAccess.h" -#endif - -#include "IAIUnicodeString.h" - -#include "AIHeaderBegin.h" - -/** @file AIScriptMessage.h */ -/******************************************************************************* - ** - ** Constants - ** - **/ -#define kCallerAIScriptMessage "AI Script Message Caller" - - -/** - Script message structure -*/ -struct AIScriptMessage { - /** A buffer in which to return the modified artwork when the message is completed. */ - AIScriptMessage():art(NULL) {} - /** The message data */ - SPMessageData d; - /** The art to be operated on. */ - AIArtHandle art; - /** Developer-defined input parameters to the message. */ - ai::UnicodeString inParam; - /** Developer-defined output parameters for the message. */ - ai::UnicodeString outParam; -}; - -/* -Sample code to send a script message - -AIErr SendScriptMessage(const char* pluginName, const char* selector, const ai::Unicodestring& inputString, ai::Unicodestring& outString) -{ - SPPluginRef pluginRef; - error = sSPPlugins->GetNamedPlugin(pluginName, &pluginRef); - - if (!error) - { - AIScriptMessage msg; - msg.inParam = inputString; - - error = sSPInterface->SetupMessageData(pluginRef, &msg.d); - if (!error) - { - error = sSPInterface->SendMessage(pluginRef, kCallerAIScriptMessage, selector, &msg, &spResult); - if (spResult) - error = spResult; - - sSPInterface->EmptyMessageData(pluginRef, &msg.d); - - if(!error) - outString = msg.outParam; - } - } - - return error; -} -*/ -#include "AIHeaderEnd.h" - - -#endif // __AIScriptMessage__ +#ifndef __AIScriptMessage__ +#define __AIScriptMessage__ + +/* + * Name: AIScriptMessage.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator AIScriptMessage. + * + * Copyright (c) 2010 Adobe Systems Incorporated, All Rights Reserved. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __SPAccess__ +#include "SPAccess.h" +#endif + +#include "IAIUnicodeString.h" + +#include "AIHeaderBegin.h" + +/** @file AIScriptMessage.h */ +/******************************************************************************* + ** + ** Constants + ** + **/ +#define kCallerAIScriptMessage "AI Script Message Caller" + + +/** + Script message structure +*/ +struct AIScriptMessage { + /** A buffer in which to return the modified artwork when the message is completed. */ + AIScriptMessage():art(NULL) {} + /** The message data */ + SPMessageData d; + /** The art to be operated on. */ + AIArtHandle art; + /** Developer-defined input parameters to the message. */ + ai::UnicodeString inParam; + /** Developer-defined output parameters for the message. */ + ai::UnicodeString outParam; +}; + +/* +Sample code to send a script message + +AIErr SendScriptMessage(const char* pluginName, const char* selector, const ai::Unicodestring& inputString, ai::Unicodestring& outString) +{ + SPPluginRef pluginRef; + error = sSPPlugins->GetNamedPlugin(pluginName, &pluginRef); + + if (!error) + { + AIScriptMessage msg; + msg.inParam = inputString; + + error = sSPInterface->SetupMessageData(pluginRef, &msg.d); + if (!error) + { + error = sSPInterface->SendMessage(pluginRef, kCallerAIScriptMessage, selector, &msg, &spResult); + if (spResult) + error = spResult; + + sSPInterface->EmptyMessageData(pluginRef, &msg.d); + + if(!error) + outString = msg.outParam; + } + } + + return error; +} +*/ +#include "AIHeaderEnd.h" + + +#endif // __AIScriptMessage__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISelectionContextManager.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISelectionContextManager.h new file mode 100644 index 0000000..a8e846c --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISelectionContextManager.h @@ -0,0 +1,364 @@ +/************************************************************************* + * + * ADOBE CONFIDENTIAL + * + * Copyright 2018 Adobe Systems Incorporated + * + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. If you have received this file from a source other than Adobe, + * then your use, modification, or distribution of it requires the prior + * written permission of Adobe. + * + **************************************************************************/ + + + +#pragma once + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AITypes.h" + +#include "AIHeaderBegin.h" + +/** @file AISelectionContextManager.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ +/*suite details*/ +#define kAISelectionContextManagerSuite "AI Selection Context Manager Suite" +#define kAISelectionContextManagerSuiteVersion1 AIAPI_VERSION(1) +#define kAISelectionContextManagerSuiteVersion kAISelectionContextManagerSuiteVersion1 +#define kAISelectionContextManagerVersion kAISelectionContextManagerSuiteVersion + +/*top level document prop error*/ +#define kNoTopLevelDocumentPropsError '!TLP' + +/** +* This suite works only for the current selection. +*/ + +/******************************************************************************* +* Below enum AISelectionLevelContext helps to find out context at different level. +*******************************************************************************/ + +enum AISelectionLevelContext : ai::uint16 +{ + /** + * Default Value + */ + kAISelectionNoneContext = 0, + + /** + * Context that is a direct child of a layer is termed as Below context. + */ + kAISelectionTopLevelContext = 1<<0, + + /** + * Any context present in the current selection, irrespective of parent or sibling. + */ + kAISelectionAnyLevelContext = 1<<1, + + /** + * Context that is a direct child of a layer or a group is termed as an object-level context. + */ + kAISelectionObjectLevelContext = 1<<2, + + /** + * Combined of Above Context. + */ + kAISelectionCompleteContext = kAISelectionTopLevelContext | kAISelectionAnyLevelContext | kAISelectionObjectLevelContext +}; + +/******************************************************************************* +* AISelectionCountDetailsFlag enum class provides context[Also Object Type] count. +* General Terminiology for keywords: +* TypeCount : Provides total different Type of context at different Level. +* TotalObjectCount: Total context count irrespective of type. +*******************************************************************************/ + +enum class AISelectionCountDetailsFlag : ai::uint16 +{ + /** + * Total count of different types of context present at top level. + */ + kTopLevelObjectTypeCount, + + /** + * Total context count present at top level. + */ + kTopLevelTotalObjectCount, + + /** + * Total count of different types of context present at object level. + */ + kObjectLevelObjectTypeCount, + + /** + * Total count of context present at object level. + */ + kObjectLevelTotalObjectCount +}; + +using AISelectionContext = ai::SizeType; + +/******************************************************************************* +* Below Enum class provides different flag of context.Below enum can be used for +* API IsSelectionContextFlagPresent. +* Use Multiple Flag If Looking for Multiple Context. +*******************************************************************************/ + +enum class AISelectionContextFlags : ai::uint16 +{ + /** + * To find if any art is present in the current selection. + */ + kAISelectionNone = 0, + + /** + * To find if any art context is present in the current selection. + */ + kAISelectionHasPathArt, + kAISelectionHasMultiplePaths, + + /** + * To find if a path art (open/close) context is present in the current selection. + */ + kAISelectionHasOpenPathArt, + kAISelectionHasClosePathArt, + + /** + * To find if a Live Shape context is present in the current selection. + */ + kAISelectionHasLiveShapeArt, + kAISelectionHasMultipleLiveShapeArt, + + /** + * To find if a group context is present in the current selection. + * Compound group or Clip group, or, layer or sub-layer can share the same context. + */ + kAISelectionHasGroupObject, + kAISelectionHasMultipleGroupObject, + + /** + * To find if a normal group context is present in the current selection. + */ + kAISelectionHasNormalGroup, + kAISelectionHasMultipleNormalGroup, + + /** + * To find if a compound path context is present in the current selection. + */ + kAISelectionHasCompoundGroup, + kAISelectionHasMultipleCompoundGroup, + + /** + * To find if a clip group context is present in the current selection. + */ + kAISelectionHasClipGroup, + kAISelectionHasMultipleClipGroup, + + /** + * To find if a normal group (not a layer or a sub-layer) is present in the current selection. + */ + kAISelectionHasNormalNonLayerGroup, + kAISelectionHasMultipleNormalNonLayerGroup, + + /** + * To find if an image art (embed or unembed) is present in the current selection. + */ + kAISelectionHasImageArt, + kAISelectionHasMultipleImageArt, + + /** + * To find if an embed image or an unembed art context is present in the current selection. + */ + kAISelectionHasEmbedImageArt, + kAISelectionHasUnEmbedImageArt, + kAISelectionHasMultipleUnEmbedImageArt, + + /** + * To find if a text art context is present in the current selection. + */ + kAISelectionHasTextArt, + kAISelectionHasMultipleTextArt, + + /** + * To find if a symbol art context is present in the current selection. + */ + kAISelectionHasSymbol, + kAISelectionHasMultipleSymbol, + + /** + * To find if a symbol art context is present in the current selection. + */ + kAISelectionHasSymbolSet, + kAISelectionHasMultipleSymbolSet, + + /** + * To find if a Live Paint art context is present in the current selection. + */ + kAISelectionHasLivePaintGroup, + kAISelectionHasMultipleLivePaintGroup, + + /** + * To find if a shaper context is present in the current selection. + */ + kAISelectionHasShaperGroup, + kAISelectionHasMultipleShaperGroup, + + /** + * To find if a graph context is present in the current selection. + */ + kAISelectionHasGraphObjects, + kAISelectionHasMultipleGraphObjects, + + /** + * To find if a traced context is present in the current selection. + */ + kAISelectionHasTracedbject, + kAISelectionHasMultipleTracedbject, + + /** + * To find if an anchor point context is present in the current selection. + */ + kAISelectionHasAnchorPoint, + kAISelectionHasMultipleAnchorPoint, + + /** + * To find if a wrap envelope context is present in the current selection. + */ + kAISelectionHasWarpEnvelope, + kAISelectionHasMultipleWarpEnvelope, + + /** + * To find if a mesh envelope context is present in the current selection. + */ + kAISelectionHasMeshEnvelope, + kAISelectionHasMultipleMeshEnvelope, + + /** + * To find if a top envelope context is present in the current selection. + */ + kAISelectionHasTopEnvelope, + kAISelectionHasMultipleTopEnvelope, + + /** + * To find if an envelope context is present in the current selection. + */ + kAISelectionHasEnvelope, + kAISelectionHasMultipleEnvelope, + + /** + * To find if a blend context is present in the current selection. + */ + kAISelectionHasBlend, + kAISelectionHasMultipleBlend, + + /** + * To find if a mesh context is present in the current selection. + */ + kAISelectionHasMeshObject, + kAISelectionHasMultipleMeshObject, + + /** + * To find if a transformed symbol context is present in the current selection. + */ + kAISelectionHasTransformedSymbolInstance, + kAISelectionHasGuides, + + + /** + * To find if the selected symbol has reset the transformation properties. + */ + kAISelectionResetSymbolTransformation, + + /** + * To find if global editing can be applied on the current selection. + */ + kAISelectionCanEnableGlobalEditing, + + /** + * To find if a symmetry repeat context is present in the current selection. + */ + kAISelectionHasSymmetryRepeat, + kAISelectionHasMultipleSymmetryRepeat, + + /** + * To find if a radial repeat context is present in the current selection. + */ + kAISelectionHasRadialRepeat, + kAISelectionHasMultipleRadialRepeat, + + /** + * To find if a grid repeat context is present in the current selection. + */ + kAISelectionHasGridRepeat, + kAISelectionHasMultipleGridRepeat + + /*all new context should be added at end*/ +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + + /** @ingroup Suites + This suite provides functions to access current selection context information. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAISelectionContextManagerSuite and \c #kAISelectionContextManagerVersion. +*/ + +struct AISelectionContextManagerSuite +{ + /** + * The API below is used to find different context present at different levels. + + @param inFlag : Indicates context in which you are interested. + @param queryLevelContext : You need to specify the level at which the context is expected. + + The function below returns true if the context is present, and returs false otherwise. + + * Example-1 : + * To find if a text object is present in the current selection and not inside any group. + + * IsSelectionContextFlagPresent(AISelectionContextFlags::kAISelectionHasTextArt,AISelectionLevelContext::kAISelectionTopLevelContext); + + * Example-2 : + * To find if any selected object includes a path. + + * IsSelectionContextFlagPresent(AISelectionContextFlags:: kAISelectionHasPathArt, AISelectionLevelContext::kAISelectionAnyLevelContext); + */ + AIAPI AIBoolean (*IsSelectionContextFlagPresent) (AISelectionContextFlags inFlag, AISelectionLevelContext queryLevelContext); + + /** + * The API below is used to find context count at different levels. + + @param inFlag : indicates context in which user is intertested. + @param outCount [out] : outCount is the total context value, including contexts that represents objects, present in the current selection. + return kNoErr in case of No Error. + * Example-1: + * To find how many different types of context are present in the current selection. + + * ai::SizeType outCount = 0 ; + * GetSelectionCountDetails (AISelectionCountDetailsFlag::kTopLevelObjectTypeCount, outCount ) + */ + AIAPI AIErr (*GetSelectionCountDetails) (AISelectionCountDetailsFlag inFlag, ai::SizeType &outCount ); + +}; + +#include "AIHeaderEnd.h" + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIShapeConstruction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIShapeConstruction.h index b5bb271..7f65c72 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIShapeConstruction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIShapeConstruction.h @@ -1,374 +1,385 @@ -#ifndef __AIShapeConstruction__ -#define __AIShapeConstruction__ - -/* - * Name: AIShapeConstruction.h - * Purpose: Adobe Illustrator utility routines for some basic shapes construction. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1996-2015 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AITypes.h" -#include "AIArt.h" - - -#include "AIHeaderBegin.h" - -/** @file AIShapeConstruction.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIShapeConstructionSuite "AI Shape Construction Suite" -#define kAIShapeConstructionSuiteVersion AIAPI_VERSION(8) -#define kAIShapeConstructionVersion kAIShapeConstructionSuiteVersion - - -/** @ingroup Errors - See \c #AIShapeConstructionSuite */ -#define kNoSegmentsError '0SEG' -/** @ingroup Errors - See \c #AIShapeConstructionSuite */ -#define kArtworkTooComplexErr 'cmp!' - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides utilities for creating paths whose shapes - describe a particular geometric figure. All of the utilities take parameters - that describe the geometric figure and return a new art object. The art object - is created in the art tree at the current insertion point as returned by - \c #AIArtSuite::GetInsertionPoint(). - - @note The shape suite is supplied by a plug-in, which the user can remove. - Clients of the shape suite should fail gracefully if it is not available. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIShapeConstructionSuite and \c #kAIShapeConstructionVersion. - */ -typedef struct { - /** Creates a path for a rectangle. - @param fromPoint The upper left point. - @param toPoint The lower right point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointRect)( AIRealPoint fromPoint, AIRealPoint toPoint, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for a rectangle of a given size. - @param fromPoint The upper left point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeRect)( AIRealPoint fromPoint, AIRealPoint size, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for an oval from two focus points. - @param fromPoint The first focus point. - @param toPoint The second focus point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param isCircumscribed True to circumscribe the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointOval)( AIRealPoint fromPoint, AIRealPoint toPoint, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, AIBoolean isCircumscribed, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for an oval of a given size. - @param fromPoint The source point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeOval)( AIRealPoint fromPoint, AIRealPoint size, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for a rounded rectangle. - @param fromPoint The upper left point. - @param toPoint The lower right point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointRoundedRect)( AIRealPoint fromPoint, AIRealPoint toPoint, AIRealPoint radius, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for a rounded rectangle of a given size. - @param fromPoint The upper left point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeRoundedRect)( AIRealPoint fromPoint, AIRealPoint size, AIRealPoint radius, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for a rectangle from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRect)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt); - - /** Creates a path for a rectangle of a given size, centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCenteredRect)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a rounded rectangle from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRoundedRect)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIReal horizRadius, AIReal vertRadius, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a rounded rectangle of a given size, centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param horizRadius The horizontal radius of the rounded corners, in document points. - @param vertRadius The vertical radius of the rounded corners, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCenteredRoundedRect)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIReal horizRadius, AIReal vertRadius, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval inscribed within a rectangle, - from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewInscribedOval)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval circumscribed around a rectangle, - from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCircumscribedOval)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval inscribed within a rectangle of a given size, - centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewInscribedCenteredOval)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval circumscribed around a rectangle of a given size, - centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCircumscribedCenteredOval)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a regular polygon of a given radius, - centered around a point. - @param numSides The number of sides. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param radius The radius, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRegularPolygon)( ai::uint16 numSides, - AIReal centerX, AIReal centerY, AIReal radius, - AIBoolean reversed, AIArtHandle *newArt ); - /** Creates a path for a regular polygon with a given vertex point, - centered around a point. - @param numsides The number of sides. - @param center The center point. - @param vertex The vertex point. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRegularPolygonPoint)( ai::uint16 numsides, - AIRealPoint center, AIRealPoint vertex, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an n-pointed star with a given radius, - centered around a point. - @param numPoints The number of star points. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param radius1 The first radius, in document points. - @param radius2 The second radius, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewStar)( ai::uint16 numPoints, - AIReal centerX, AIReal centerY, - AIReal radius1, AIReal radius2, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an n-pointed star with a given vertex point and radius ratio, - centered around a point. - @param numPoints The number of star points. - @param center The center point. - @param vertex The vertex point. - @param radiusRation The radius ratio. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewStarPoint)( ai::uint16 numPoints, - AIRealPoint center, AIRealPoint vertex, - AIReal radiusRatio, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for spiral around a point. - @param firstArcCenter The center point for the first arc of the spiral. - @param start The starting point. - @param decayPercent The decay ration expressed as a percentage. - @param numQuarterTurns The number of quarter turns. - @param clockwiseFromOutside True to spiral clockwise. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewSpiral)( AIRealPoint firstArcCenter, AIRealPoint start, - AIReal decayPercent, ai::int16 numQuarterTurns, - AIBoolean clockwiseFromOutside, AIArtHandle *newArt ); - - /** Creates a path for elliptical pie around a point. - @param center The center point for the ellipse of which this pie is a part of. - @param width The width of the ellipse of which this pie is a part of. - @param height The height of the ellipse of which this pie is a part of. - @param rotationAngle The rotation angle of the ellipse of which this pie is a part of. - @param startAngle absolute start angle of the pie. - @param endAngle absolute end angle of the pie. - @param isReversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewEllipticalPie)(AIRealPoint center, AIReal width, AIReal height, - AIReal rotationAngle, AIReal startAngle, AIReal endAngle, - AIBoolean isReversed, AIArtHandle *newArt); - - /** Creates a path for a line. - @param startPoint The starting point of line. - @param endPoint The end point of line. - @param art [out] A buffer in which to return the new path object. - */ - - AIAPI AIErr(*NewLinePoint)(const AIRealPoint& startPoint, const AIRealPoint& endPoint, - AIArtHandle *newArt); - - /** Creates a path for a line. - @param center The coordinate of the center of line (Mid point of line). - @param length of line in document points. - @param rotationAngle absolute rotation angle of the line. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr(*NewLine)(const AIRealPoint& center, const AIReal length, const AIReal - rotationAngle, AIArtHandle *newArt); - - -} AIShapeConstructionSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIShapeConstruction__ +#define __AIShapeConstruction__ + +/* + * Name: AIShapeConstruction.h + * Purpose: Adobe Illustrator utility routines for some basic shapes construction. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1996-2015 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AITypes.h" +#include "AIArt.h" + + +#include "AIHeaderBegin.h" + +/** @file AIShapeConstruction.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIShapeConstructionSuite "AI Shape Construction Suite" +#define kAIShapeConstructionSuiteVersion AIAPI_VERSION(8) +#define kAIShapeConstructionVersion kAIShapeConstructionSuiteVersion + + +/** @ingroup Errors + See \c #AIShapeConstructionSuite */ +#define kNoSegmentsError '0SEG' +/** @ingroup Errors + See \c #AIShapeConstructionSuite */ +#define kArtworkTooComplexErr 'cmp!' + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides utilities for creating paths whose shapes + describe a particular geometric figure. All of the utilities take parameters + that describe the geometric figure and return a new art object. The art object + is created in the art tree at the current insertion point as returned by + \c #AIArtSuite::GetInsertionPoint(). + + @note The shape suite is supplied by a plug-in, which the user can remove. + Clients of the shape suite should fail gracefully if it is not available. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIShapeConstructionSuite and \c #kAIShapeConstructionVersion. + */ +typedef struct { + /** Creates a path for a rectangle. + @param fromPoint The upper left point. + @param toPoint The lower right point. + @param isCentered True to center the figure. + @param isReversed True to reverse the figure. + @param isConstrained True to constrain the figure. + @param honorConstrainAngle True to constrain the angle. + @param art [out] A buffer in which to return the new path object. + @param size [out] A buffer in which to return a point giving the + horizontal and vertical size of the figure, in document points. + */ + AIAPI AIErr (*NewPointPointRect)( AIRealPoint fromPoint, AIRealPoint toPoint, + AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, + AIBoolean honorConstrainAngle, + AIArtHandle *art, AIRealPoint *size ); + + /** Creates a path for a rectangle of a given size. + @param fromPoint The upper left point. + @param size A point whose components specify the horizontal and vertical + size of the figure, in document points. + @param isCentered True to center the figure. + @param isReversed True to reverse the figure. + @param isConstrained True to constrain the figure. + @param honorConstrainAngle True to constrain the angle. + @param art [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewPointSizeRect)( AIRealPoint fromPoint, AIRealPoint size, + AIBoolean isCentered, AIBoolean isReversed, + AIBoolean honorConstrainAngle, + AIArtHandle *art ); + + /** Creates a path for an oval from two focus points. + @param fromPoint The first focus point. + @param toPoint The second focus point. + @param isCentered True to center the figure. + @param isReversed True to reverse the figure. + @param isConstrained True to constrain the figure. + @param isCircumscribed True to circumscribe the figure. + @param honorConstrainAngle True to constrain the angle. + @param art [out] A buffer in which to return the new path object. + @param size [out] A buffer in which to return a point giving the + horizontal and vertical size of the figure, in document points. + */ + AIAPI AIErr (*NewPointPointOval)( AIRealPoint fromPoint, AIRealPoint toPoint, + AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, AIBoolean isCircumscribed, + AIBoolean honorConstrainAngle, + AIArtHandle *art, AIRealPoint *size ); + + /** Creates a path for an oval of a given size. + @param fromPoint The source point. + @param size A point whose components specify the horizontal and vertical + size of the figure, in document points. + @param isCentered True to center the figure. + @param isReversed True to reverse the figure. + @param isConstrained True to constrain the figure. + @param honorConstrainAngle True to constrain the angle. + @param art [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewPointSizeOval)( AIRealPoint fromPoint, AIRealPoint size, + AIBoolean isCentered, AIBoolean isReversed, + AIBoolean honorConstrainAngle, + AIArtHandle *art ); + + /** Creates a path for a rounded rectangle. + @param fromPoint The upper left point. + @param toPoint The lower right point. + @param isCentered True to center the figure. + @param isReversed True to reverse the figure. + @param isConstrained True to constrain the figure. + @param honorConstrainAngle True to constrain the angle. + @param art [out] A buffer in which to return the new path object. + @param size [out] A buffer in which to return a point giving the + horizontal and vertical size of the figure, in document points. + */ + AIAPI AIErr (*NewPointPointRoundedRect)( AIRealPoint fromPoint, AIRealPoint toPoint, AIRealPoint radius, + AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, + AIBoolean honorConstrainAngle, + AIArtHandle *art, AIRealPoint *size ); + + /** Creates a path for a rounded rectangle of a given size. + @param fromPoint The upper left point. + @param size A point whose components specify the horizontal and vertical + size of the figure, in document points. + @param isCentered True to center the figure. + @param isReversed True to reverse the figure. + @param isConstrained True to constrain the figure. + @param honorConstrainAngle True to constrain the angle. + @param art [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewPointSizeRoundedRect)( AIRealPoint fromPoint, AIRealPoint size, AIRealPoint radius, + AIBoolean isCentered, AIBoolean isReversed, + AIBoolean honorConstrainAngle, + AIArtHandle *art ); + + /** Creates a path for a rectangle from page coordinates for the sides. + @param top The X coordinate of the top. + @param left The Y coordinate of the left edge. + @param bottom The X coordinate of the bottom. + @param right The Y coordinate of the right edge. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewRect)( AIReal top, AIReal left, + AIReal bottom, AIReal right, + AIBoolean reversed, AIArtHandle *newArt); + + /** Creates a path for a rectangle of a given size, centered around a point. + @param centerX The X coordinate of the center. + @param centerY The Y coordinate of the center. + @param height The height in document points. + @param width The width in document points. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewCenteredRect)( AIReal centerX, AIReal centerY, + AIReal height, AIReal width, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for a rounded rectangle from page coordinates for the sides. + @param top The X coordinate of the top. + @param left The Y coordinate of the left edge. + @param bottom The X coordinate of the bottom. + @param right The Y coordinate of the right edge. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewRoundedRect)( AIReal top, AIReal left, + AIReal bottom, AIReal right, + AIReal horizRadius, AIReal vertRadius, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for a rounded rectangle of a given size, centered around a point. + @param centerX The X coordinate of the center. + @param centerY The Y coordinate of the center. + @param height The height in document points. + @param width The width in document points. + @param horizRadius The horizontal radius of the rounded corners, in document points. + @param vertRadius The vertical radius of the rounded corners, in document points. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewCenteredRoundedRect)( AIReal centerX, AIReal centerY, + AIReal height, AIReal width, + AIReal horizRadius, AIReal vertRadius, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for an oval inscribed within a rectangle, + from page coordinates for the sides. + @param top The X coordinate of the top. + @param left The Y coordinate of the left edge. + @param bottom The X coordinate of the bottom. + @param right The Y coordinate of the right edge. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewInscribedOval)( AIReal top, AIReal left, + AIReal bottom, AIReal right, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for an oval circumscribed around a rectangle, + from page coordinates for the sides. + @param top The X coordinate of the top. + @param left The Y coordinate of the left edge. + @param bottom The X coordinate of the bottom. + @param right The Y coordinate of the right edge. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewCircumscribedOval)( AIReal top, AIReal left, + AIReal bottom, AIReal right, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for an oval inscribed within a rectangle of a given size, + centered around a point. + @param centerX The X coordinate of the center. + @param centerY The Y coordinate of the center. + @param height The height in document points. + @param width The width in document points. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewInscribedCenteredOval)( AIReal centerX, AIReal centerY, + AIReal height, AIReal width, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for an oval circumscribed around a rectangle of a given size, + centered around a point. + @param centerX The X coordinate of the center. + @param centerY The Y coordinate of the center. + @param height The height in document points. + @param width The width in document points. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewCircumscribedCenteredOval)( AIReal centerX, AIReal centerY, + AIReal height, AIReal width, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for a regular polygon of a given radius, + centered around a point. + @param numSides The number of sides. + @param centerX The X coordinate of the center. + @param centerY The Y coordinate of the center. + @param radius The radius, in document points. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewRegularPolygon)( ai::uint16 numSides, + AIReal centerX, AIReal centerY, AIReal radius, + AIBoolean reversed, AIArtHandle *newArt ); + /** Creates a path for a regular polygon with a given vertex point, + centered around a point. + @param numsides The number of sides. + @param center The center point. + @param vertex The vertex point. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewRegularPolygonPoint)( ai::uint16 numsides, + AIRealPoint center, AIRealPoint vertex, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for an n-pointed star with a given radius, + centered around a point. + @param numPoints The number of star points. + @param centerX The X coordinate of the center. + @param centerY The Y coordinate of the center. + @param radius1 The first radius, in document points. + @param radius2 The second radius, in document points. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewStar)( ai::uint16 numPoints, + AIReal centerX, AIReal centerY, + AIReal radius1, AIReal radius2, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for an n-pointed star with a given vertex point and radius ratio, + centered around a point. + @param numPoints The number of star points. + @param center The center point. + @param vertex The vertex point. + @param radiusRation The radius ratio. + @param reversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewStarPoint)( ai::uint16 numPoints, + AIRealPoint center, AIRealPoint vertex, + AIReal radiusRatio, + AIBoolean reversed, AIArtHandle *newArt ); + + /** Creates a path for spiral around a point. + @param firstArcCenter The center point for the first arc of the spiral. + @param start The starting point. + @param decayPercent The decay ration expressed as a percentage. + @param numQuarterTurns The number of quarter turns. + @param clockwiseFromOutside True to spiral clockwise. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewSpiral)( AIRealPoint firstArcCenter, AIRealPoint start, + AIReal decayPercent, ai::int16 numQuarterTurns, + AIBoolean clockwiseFromOutside, AIArtHandle *newArt ); + + /** Creates a path for elliptical pie around a point. + @param center The center point for the ellipse of which this pie is a part of. + @param width The width of the ellipse of which this pie is a part of. + @param height The height of the ellipse of which this pie is a part of. + @param rotationAngle The rotation angle of the ellipse of which this pie is a part of. + @param startAngle absolute start angle of the pie. + @param endAngle absolute end angle of the pie. + @param isReversed True to reverse the figure. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr (*NewEllipticalPie)(AIRealPoint center, AIReal width, AIReal height, + AIReal rotationAngle, AIReal startAngle, AIReal endAngle, + AIBoolean isReversed, AIArtHandle *newArt); + + /** Creates a path for a line. + @param startPoint The starting point of line. + @param endPoint The end point of line. + @param art [out] A buffer in which to return the new path object. + */ + + AIAPI AIErr(*NewLinePoint)(const AIRealPoint& startPoint, const AIRealPoint& endPoint, + AIArtHandle *newArt); + + /** Creates a path for a line. + @param center The coordinate of the center of line (Mid point of line). + @param length of line in document points. + @param rotationAngle absolute rotation angle of the line. + @param art [out] A buffer in which to return the new path object. + */ + AIAPI AIErr(*NewLine)(const AIRealPoint& center, const AIReal length, const AIReal + rotationAngle, AIArtHandle *newArt); + +#if defined(ILLUSTRATOR_MINIMAL) + /** Creates a path for circular arc. + @param center center point for the circle of which the arc is a part of. + @param startAngle absolute start angle of the arc in radians. + @param endAngle absolute end angle of the arc in radians. + @param outerRadius radius of outer arc.. + @param innerRadius radius of inner arc. + @param newArt [out] A buffer in which to return the new path object. + */ + AIAPI AIErr(*NewCircularArc)(const AIRealPoint& center, const AIReal startAngle, const AIReal endAngle, const AIReal outerRadius, const AIReal innerRadius, AIArtHandle* newArt); +#endif + +} AIShapeConstructionSuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISliceTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISliceTypes.h index 21fbf8b..ba415b5 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISliceTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISliceTypes.h @@ -1,126 +1,126 @@ -#ifndef __SLICE_TYPES_H__ -#define __SLICE_TYPES_H__ - -/* -* Name: AISliceTypes.h -* Purpose: This file contains information related to slices without much overhead. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 1999-2007 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - - -#include "ASTypes.h" - -#include "AIHeaderBegin.h" - -/** @file AISliceTypes.h */ - -#ifdef __cplusplus -namespace ai { -#endif - - /** Version of ImageReady slices. */ - const ASInt32 kImageReadySlicesVersion = 5; - /** Version of ImageReady slices. */ - const ASInt32 kImageReadySlicesOriginVersion = 6; - - /** Identifies an invalid slice. */ - const ASInt32 kInvalidSliceID = -1; - /** Identifies the default slice. */ - const ASInt32 kDefaultSliceID = 0; - /** Identifies an invalid slice group. */ - const ASInt32 kInvalidSliceGroupID = -1; - /** Identifies the default slice group. */ - const ASInt32 kDefaultSliceGroupID = 0; - /** Identifies the first specifically defined slice group. */ - const ASInt32 kFirstUserSliceGroupID = 1; - /** Identifies the first group with a single slice (unlinked slice). */ - const ASInt32 kFirstUserSliceSoloGroupID = kFirstUserSliceGroupID + 100000; - - /** Minimum slice dimension value. */ - const ASInt32 kMinSliceDim = 1; - /** Internal */ - const ASInt32 kForceEnumSize = 0x7FFFFFFF; - - /** Identifies how a slice was created. */ - enum ESliceOrigin { - /** Created automatically, "autoOrigin" */ - eSliceOrigin_autoGenerated, - /** Created as part of layer creation, "layerOrigin" */ - eSliceOrigin_layerGenerated, - /** Created by the user, "userOrigin" */ - eSliceOrigin_userGenerated, - /** Internal */ - eSliceOrigin_Unknown = kForceEnumSize - }; - - /** Identifies the type of a slice; see \c #ASSliceSettings. */ - enum ESliceType { - /** "noImageType" */ - eSliceType_NoImage, - /** "imageType" */ - eSliceType_Image, - /** "rollovertType" */ - eSliceType_Rollover, - /** "likedType" */ - eSliceType_LinkedText, - eSliceType_Unknown = kForceEnumSize - }; - - /** Horizontal alignment types for slices; see \c #ASSliceSettings. */ - enum ESliceHorzAlign { - /** Default, "defaultHAlign" */ - eSliceHorzAlign_Default = 0, - /** Left, "leftHAlign" */ - eSliceHorzAlign_Left, - /** Center, "centerHAlign" */ - eSliceHorzAlign_Center, - /** Right, "rightHAlign" */ - eSliceHorzAlign_Right, - /** Internal */ - eSliceHorzAlign_Unknown = kForceEnumSize - }; - - /** Vertical alignment types for slices; see \c #ASSliceSettings. */ - enum ESliceVertAlign { - /** Default, "defaultVAlign" */ - eSliceVertAlign_Default = 0, - /** Top, "topVAlign" */ - eSliceVertAlign_Top, - /** Middle, "middleVAlign" */ - eSliceVertAlign_Middle, - /** Bottom, "bottomVAlign" */ - eSliceVertAlign_Bottom, - /** Baseline, "baselineVAlign" */ - eSliceVertAlign_Baseline, - /** Internal */ - eSlicevertAlign_Unknown = kForceEnumSize - }; - - /** Background color types for slices; see \c #ASSliceSettings. */ - enum ESliceBGColorType { - /** Color, "colorBGColor" */ - eSliceBGColorType_Color = 0, - /** None, "noneBGColor" */ - eSliceBGColorType_None, - /** Matte, "matteBGColor" */ - eSliceBGColorType_Matte, - /** Internal */ - eSliceBGColorType_Unknown = kForceEnumSize - }; - -#ifdef __cplusplus - } // namespace -#endif - -#include "AIHeaderEnd.h" -#endif +#ifndef __SLICE_TYPES_H__ +#define __SLICE_TYPES_H__ + +/* +* Name: AISliceTypes.h +* Purpose: This file contains information related to slices without much overhead. +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 1999-2007 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + + +#include "ASTypes.h" + +#include "AIHeaderBegin.h" + +/** @file AISliceTypes.h */ + +#ifdef __cplusplus +namespace ai { +#endif + + /** Version of ImageReady slices. */ + const ASInt32 kImageReadySlicesVersion = 5; + /** Version of ImageReady slices. */ + const ASInt32 kImageReadySlicesOriginVersion = 6; + + /** Identifies an invalid slice. */ + const ASInt32 kInvalidSliceID = -1; + /** Identifies the default slice. */ + const ASInt32 kDefaultSliceID = 0; + /** Identifies an invalid slice group. */ + const ASInt32 kInvalidSliceGroupID = -1; + /** Identifies the default slice group. */ + const ASInt32 kDefaultSliceGroupID = 0; + /** Identifies the first specifically defined slice group. */ + const ASInt32 kFirstUserSliceGroupID = 1; + /** Identifies the first group with a single slice (unlinked slice). */ + const ASInt32 kFirstUserSliceSoloGroupID = kFirstUserSliceGroupID + 100000; + + /** Minimum slice dimension value. */ + const ASInt32 kMinSliceDim = 1; + /** Internal */ + const ASInt32 kForceEnumSize = 0x7FFFFFFF; + + /** Identifies how a slice was created. */ + enum ESliceOrigin { + /** Created automatically, "autoOrigin" */ + eSliceOrigin_autoGenerated, + /** Created as part of layer creation, "layerOrigin" */ + eSliceOrigin_layerGenerated, + /** Created by the user, "userOrigin" */ + eSliceOrigin_userGenerated, + /** Internal */ + eSliceOrigin_Unknown = kForceEnumSize + }; + + /** Identifies the type of a slice; see \c #ASSliceSettings. */ + enum ESliceType { + /** "noImageType" */ + eSliceType_NoImage, + /** "imageType" */ + eSliceType_Image, + /** "rollovertType" */ + eSliceType_Rollover, + /** "likedType" */ + eSliceType_LinkedText, + eSliceType_Unknown = kForceEnumSize + }; + + /** Horizontal alignment types for slices; see \c #ASSliceSettings. */ + enum ESliceHorzAlign { + /** Default, "defaultHAlign" */ + eSliceHorzAlign_Default = 0, + /** Left, "leftHAlign" */ + eSliceHorzAlign_Left, + /** Center, "centerHAlign" */ + eSliceHorzAlign_Center, + /** Right, "rightHAlign" */ + eSliceHorzAlign_Right, + /** Internal */ + eSliceHorzAlign_Unknown = kForceEnumSize + }; + + /** Vertical alignment types for slices; see \c #ASSliceSettings. */ + enum ESliceVertAlign { + /** Default, "defaultVAlign" */ + eSliceVertAlign_Default = 0, + /** Top, "topVAlign" */ + eSliceVertAlign_Top, + /** Middle, "middleVAlign" */ + eSliceVertAlign_Middle, + /** Bottom, "bottomVAlign" */ + eSliceVertAlign_Bottom, + /** Baseline, "baselineVAlign" */ + eSliceVertAlign_Baseline, + /** Internal */ + eSlicevertAlign_Unknown = kForceEnumSize + }; + + /** Background color types for slices; see \c #ASSliceSettings. */ + enum ESliceBGColorType { + /** Color, "colorBGColor" */ + eSliceBGColorType_Color = 0, + /** None, "noneBGColor" */ + eSliceBGColorType_None, + /** Matte, "matteBGColor" */ + eSliceBGColorType_Matte, + /** Internal */ + eSliceBGColorType_Unknown = kForceEnumSize + }; + +#ifdef __cplusplus + } // namespace +#endif + +#include "AIHeaderEnd.h" +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISlicing.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISlicing.h index 7b3e75c..5a5dbc7 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISlicing.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISlicing.h @@ -1,821 +1,790 @@ -#ifndef __AISLICING__ -#define __AISLICING__ - -/* -* Name: AISlicing.h -* $Revision: 2 $ -* Author: -* Date: -* Purpose: Adobe Illustrator Slicing Suite. -* - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. -* -*/ - - -/******************************************************************************* -** -** Imports -** -**/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __SLICETYPES__ -#include "AISliceTypes.h" -#endif - -#ifndef __AIDataFilter__ -#include "AIDataFilter.h" -#endif - -#ifndef __AIEntry__ -#include "AIEntry.h" -#endif - -#ifndef __AIPlatformMemory__ -#include "AIPlatformMemory.h" -#endif - -#ifndef __AIHTMLCONVERSION__ -#include "AIHTMLConversion.h" -#endif - -#ifndef AIFLASHPREFS_H -#include "AIFlashPrefs.h" -#endif - -#ifndef _AISVGACTION_H_ -#include "AISVGAction.h" -#endif - -#ifndef __AIDict__ -#include "AIDictionary.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AISlicing.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAISlicingSuite "AI Slicing Suite" -#define kAISlicingSuiteVersion4 AIAPI_VERSION(4) -#define kAISlicingSuiteVersion kAISlicingSuiteVersion4 -#define kAISlicingVersion kAISlicingSuiteVersion - -#define kAIOptimizationSettingsSuite "AI Optimization Settings Suite" -#define kAIOptimizationSettingsSuiteVersion3 AIAPI_VERSION(3) -#define kAIOptimizationSettingsSuiteVersion kAIOptimizationSettingsSuiteVersion3 -#define kAIOptimizationSettingsVersion kAIOptimizationSettingsSuiteVersion - - -/** @ingroup Notifiers -See \c #AISlicingSuite */ -#define kAISlicingChangedNotifier "AI Slicing Changed" -/** @ingroup MenuGroups -See \c #AISlicingSuite */ -#define kAISliceCommandsMenuGroup "AI Slice Commands Menu Group" - - -/******************************************************************************* -** -** Types -** -**/ -/** Image formats for slices. -See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ -enum ASOptimizedFileFormat - { - /** GIF format*/ - asffGIF89a, - /** JPEG format */ - asffJPEG, - /** PNG8 format */ - asffPNG8, - /** PNG24 format */ - asffPNG24, - /** Automatic format choice ("auto") */ - asffAuto, - /** Invalid format ("") */ - asffInvalidFormat, - /** Mixed formats ("mixed") */ - asffMixedFormat, - /** SWF format */ - asffSWF, - /** SVG format */ - asffSVG - }; - -/** Slice dithering methods; see \c #ASGIFSettings, \c #ASPNG8Settings. */ -enum ASDitherAlgorithm - { - /** "none" */ - asdaNone, - /** "diffusion" */ - asdaDiffusion, - /** "pattern" */ - asdaPattern, - /** "whiteNoise" */ - asdaWhiteNoise, - /** "noise" */ - asdaBlueNoise - }; - -/** Slice noise-reduction methods; see \c #ASGIFSettings, \c #ASPNG8Settings. */ -enum ASReductionAlgorithm - { - /** "adaptive" */ - asraAdaptive, - /** "selective" */ - asraSelective, - /** "perceptual" */ - asraPerceptual, - /** "macintoshSystem" */ - asraMacintoshSystem, - /** "windowsSystem" */ - asraWindowsSystem, - /** "web" */ - asraWeb, - /** "custom" */ - asraImageReadyCustom, - /** "fileBased" */ - asraFileBased, - /** "neuralNet" */ - asraNeuralNet, - /** "fauxPerceptual" */ - asraFauxPerceptual - }; - -/** A array entry for a color-shifting optimization setting. -Allows you to map a range of colors to a single -color, in order to reduce the overall number of colors for optimization. -@see \c #AIOptimizationSettingsSuite::GetColorShiftEntries() -*/ -typedef struct - { - /** Start of range */ - AIRGBColor rangeStart; - /** End of range */ - AIRGBColor rangeEnd; - /** A color to which all the colors in this range can be mapped. */ - AIRGBColor remapColor; - } -ASColorShiftEntry; - -/** GIF optimization settings for slices. -See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ -typedef struct - { - /** True to use transparency. */ - AIBoolean transparency; - /** True to include caption with slice. */ - AIBoolean includeCaption; - /** True to use interlacing. */ - AIBoolean interlaced; - - /** True to use no matte color. */ - AIBoolean noMatteColor; - /** The matte color, if used. */ - AIRGBColor matteColor; - - /** True to do automatic reduction. */ - AIBoolean autoReduced; - /** True to use a rollover master palette. */ - AIBoolean rolloverMasterPalette; - - /** Percentage of tolerance level [0...100] for shifting colors to the closest web palette equivalents. - A higher value shifts more colors.*/ - ai::int32 webShiftedPercentage; - /** Number of colors. */ - ai::int32 numberOfColors; - /** Quality, range [0..100]. Amount of lossiness allowed in GIF compression */ - ai::int32 qualitySetting; - /** The dithering method. */ - ASDitherAlgorithm ditherAlgorithm; - /** The dithering percentage, [0..100], where 100 is maximum dithering. */ - ai::int32 ditherPercentage; - /** The reduction method. */ - ASReductionAlgorithm reductionAlgorithm; - - /** Opaque reference to the reduction algorithm filename. - See \c #ASSliceSettings for memory allocation rules. */ - ASHandle reductionAlgorithmFilename; - /** The dithering method for transparency. */ - ASDitherAlgorithm transparencyDitherAlgorithm; - } ASGIFSettings; - -/** JPEG optimization settings. -See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ -typedef struct - { - /** Obsolete, ignored */ - AIBoolean transparency; - /** True to use no matte color. */ - AIBoolean noMatteColor; - /** The matte color, if used. */ - AIRGBColor matteColor; - /** True to optimize. */ - AIBoolean optimized; - /** Quality, range [0..100], where 100 is best quality. */ - ai::int32 qualitySetting; - /** True to create slice progressively. */ - AIBoolean multiplePasses; - /** Blurring, range [0..2], where 2 is most blurring */ - AIReal blurAmount; - /** True to embed the color profile. */ - AIBoolean embedICCProfile; - } ASJPEGSettings; - -/** PNG8 optimization settings. -See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ -typedef struct - { - /** True to use transparency. */ - AIBoolean transparency; - /** Not used */ - AIBoolean includeCaption; - /** True to use interlacing. */ - AIBoolean interlaced; - /** True to use no matte color. */ - AIBoolean noMatteColor; - /** The matte color, if used. */ - AIRGBColor matteColor; - - /** True to do automatic reduction. */ - AIBoolean autoReduced; - /** True to use a rollover master palette. */ - AIBoolean rolloverMasterPalette; - /** Percentage of tolerance level [0...100] for shifting colors to the closest web palette equivalents. - A higher value shifts more colors.*/ - ai::int32 webShiftedPercentage; - /** Number of colors. */ - ai::int32 numberOfColors; - - /** The dithering method. */ - ASDitherAlgorithm ditherAlgorithm; - /** The dithering percentage, [0..100], where 100 is maximum dithering. */ - ai::int32 ditherPercentage; - /** The reduction method. */ - ASReductionAlgorithm reductionAlgorithm; - - /** Opaque reference to the reduction algorithm filename. - See \c #ASSliceSettings for memory allocation rules. */ - ASHandle reductionAlgorithmFilename; - /** The dithering method for transparency. */ - ASDitherAlgorithm transparencyDitherAlgorithm; - } ASPNG8Settings; - -/** PNG24 optimization settings. -See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ -typedef struct - { - /** True to use transparency. */ - AIBoolean transparency; - /** Not used */ - AIBoolean includeCaption; - /** True to use interlacing. */ - AIBoolean interlaced; - /** True to use no matte color. */ - AIBoolean noMatteColor; - /** The matte color, if used. */ - AIRGBColor matteColor; - /** True to filter image. */ - AIBoolean filtered; - } ASPNG24Settings; - -/** SVG optimization settings. -See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ -typedef struct - { - /** How to subset fonts in the SVG. */ - AISVGFontSubsetting fontSubsetting; - /** Whether to embed or link fonts. */ - AISVGFileLocation fontLocation; - /** Whether to embed or link raster data. */ - AISVGRasterLocation imageLocation; - /** Deprecated, do not use. Value is ignored. */ - AIBoolean obsolete; - /** The compression method. */ - AISVGFileCompression compression; - /** The number of digits of precision after the decimal when rounding numbers. */ - AISVGCoordinatePrecision precision; - /** The character set to use for the SVG file. */ - AISVGDocumentEncoding encoding; - /** How style information should be exported. */ - AISVGStyle style; - /** The SVG DTD type. */ - AISVGDTD dtd; - /** What type of font to use. */ - AISVGFontType fontType; - /** True to optimize the SVG. */ - AIBoolean optimize; - } ASSVGSettings; - -/** SWF optimization settings. -See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ -typedef struct - { - /** Export options for layers */ - FlashExportOption exportOption; - /** The frame rate. */ - AIReal frameRate; - /** True to create a continuous loop. */ - AIBoolean loop; - /** True to make SWF read-only. */ - AIBoolean readOnly; - /** The curve quality, [0..10] where 10 is best quality. */ - ai::int32 curveQuality; - /** True to preserve appearance. */ - AIBoolean preserveAppearance; - /** True to compress SWF. */ - AIBoolean compressed; - /** True to save text as outline. */ - AIBoolean outlineText; - /** The Flash Player version [1..8]*/ - ai::int32 flashPlayerVersion; - } ASSWFSettings; - -/** Optimization settings for appropriate format. -See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ -typedef union - { - ASGIFSettings gif; - ASJPEGSettings jpeg; - ASPNG8Settings png8; - ASPNG24Settings png24; - ASSVGSettings svg; - ASSWFSettings swf; - } ASOptimizationSettingsUnion; - -/** File format for save with appropriate optimization settings. -See \c #AIOptimizationSettingsSuite. */ -typedef struct ASOptimizationSettings - { - /** The file format. */ - ASOptimizedFileFormat fileFormat; - /** The file settings. */ - ASOptimizationSettingsUnion s; - } ASOptimizationSettings; - -/** Slice definition information. -The handles are opaque references to the data. -They are used to identify the blocks of memory managed by the \c #AIPlatformMemorySuite. -\li For set calls, you must allocate the handle. -\li For get calls, you can allocate and supply a handle, or specify NULL -for the function to allocate a handle automatically. -In either case, you must release handles when you no longer need them. -@see \c #AIOptimizationSettingsSuite::SetOptimizationSettings(), -\c #AIOptimizationSettingsSuite::GetOptimizationSettings(), -\c #AIOptimizationSettingsSuite::SetSliceOptimizationSettings() -*/ -typedef struct - { - /** Identifies the slice group to which this slice belongs. */ - ai::int32 groupID; - /** The type of slice. */ - ai::ESliceType type; - /** True if text is HTML. */ - AIBoolean textIsHTML; - /** True if text in cells is HTML. */ - AIBoolean cellTextIsHTML; - /** The horizontal alignment type. */ - ai::ESliceHorzAlign horzAlign; - /** The vertical alignment type. */ - ai::ESliceVertAlign vertAlign; - /** The background color type. */ - ai::ESliceBGColorType bgColorType; - /** The background color. */ - AIRGBColor bgColor; - - /** Opaque reference to the name object for this slice. */ - ASHandle hName; - /** Opaque reference to the URL object for this slice. */ - ASHandle hURL; - /** Opaque reference to the target object for this slice. */ - ASHandle hTarget; - /** Opaque reference to the message object for this slice. */ - ASHandle hMessage; - /** Opaque reference to the alternate tag object for this slice. */ - ASHandle hAltTag; - /** Opaque reference to the cell-text object for this slice. */ - ASHandle hCellText; - } ASSliceSettings; - - -typedef void* AISavedSliceListRef; - - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides functions that allow you to create and manipulate -\e image \e slices, subsets of raster data that can be used in copying from -one buffer to another. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAISlicingSuite and \c #kAISlicingSuiteVersion. -*/ -typedef struct { - - /** Designates an art object as a slice. - @param art The art object. - @param sliceID [in, out] Optionally, a unique identifier to use if possible. Upon - return, the unique slice identifier actually assigned. - @param fromPlace True if called from a plug-in file format. - False if called from a menu or tool. - */ - AIAPI AIErr (*MakeSlice)(AIArtHandle art, ai::int32 *sliceID, AIBoolean fromPlace); - - /** Creates a rectangle with no fill and no stroke and makes it a slice. - @param placeAboveArt The art object above which to place the new slice in the paint order. - @param sliceID [in, out] Optionally, a unique identifier to use if possible. Upon - return, the unique identifier actually assigned to the new slice. - @param selected True to select the new slice. - @param fromPlace True if called from a plug-in file format. - False if called from a menu or tool. - */ - AIAPI AIErr (*CreateSlice)(AIArtHandle placeAboveArt, ai::int32 *sliceID, AIBoolean selected, AIBoolean fromPlace); - - /** Deletes slice art and its slicing information. - @param sliceID The unique identifier of the slice, as assigned on creation. - */ - AIAPI AIErr (*DeleteSlice)(ai::int32 sliceID); - - /** Removes the slicing designation from an art object, but does not delete the art. - @param art The art object. - */ - AIAPI AIErr (*Unslice)(AIArtHandle art); - - /** Retrieves the unique slice identifier of an art object. - (Note that this function returns a numeric value, not an error code.) - @param art The art object. - @return The unique slice identifier, or \c #kInvalidSliceID if the art is not a slice. - */ - AIAPI ai::int32 (*GetArtSliceID)(AIArtHandle art); - - /** Retrieves the art object for a slice - (Note that this function returns an object value, not an error code.) - @param sliceID The unique slice identifier. - @return The associated art object, or \c NULL if there is no such slice. - */ - AIAPI AIArtHandle (*GetSliceArt)(ai::int32 sliceID); - - /** Retrieves a unique identifier suitable for a slice. - (Note that this function returns a numeric value, not an error code.) - @return A unique slice identifier. - */ - AIAPI ai::int32 (*GetUniqueSliceID)(void); - - /** Reports whether a unique identifier is currently used to identify a slice. - (Note that this function returns a boolean value, not an error code.) - @param sliceID The slice identifier. - @return True if the identifier is in use. - */ - AIAPI AIBoolean (*SliceExists)(ai::int32 sliceID); - - /** Retrieves the number of slices in the slice list. Use with - \c #GetIndexedSliceID() to iterate through slices. - (Note that this function returns a numeric value, not an error code.) - @return The number of slices. - */ - AIAPI ai::int32 (*GetSliceCount)(void); - - /** Retrieves a slice from the slice list by position index. Use with - \c #GetSliceCount() to iterate through slices. - (Note that this function returns a numeric value, not an error code.) - @param index The 0-based position index. - @return The unique slice identifier. - */ - AIAPI ai::int32 (*GetIndexedSliceID)(ai::int32 index); - - /** Sets the bounding rectangle for a no fill/no stroke slice. - Does not affect a slice associated with any other art. - @param sliceID The unique slice identifier. - @param boundsRect The new bounding rectangle. - */ - AIAPI AIErr (*SetSliceBounds)(ai::int32 sliceID, AIRealRect *boundsRect); - - /** Retrieves the bounding rectangle for a slice, including the border. - @param sliceID The unique slice identifier. - @param boundsRect [out] A buffer in which to return the bounding rectangle. - */ - AIAPI AIErr (*GetSliceBounds)(ai::int32 sliceID, AIRealRect *boundsRect); - - /** Sets a border for a slice, which is the appended to the art visual bounds - to generate the slice bounds. - @param sliceID The unique slice identifier. - @param borderRect The new border rectangle. - */ - AIAPI AIErr (*SetSliceBorder)(ai::int32 sliceID, AIRealRect *borderRect); - - /** Retrieves the border rectangle for a slice. - @param sliceID The unique slice identifier. - @param borderRect [out] A buffer in which to return the border rectangle. - */ - AIAPI AIErr (*GetSliceBorder)(ai::int32 sliceID, AIRealRect *borderRect); - - /** Set the definition information for a slice. - @param sliceID The unique slice identifier. - @param settings The new slice information. - */ - AIAPI AIErr (*SetSliceSettings)(ai::int32 sliceID, ASSliceSettings *settings); - - /** Retrieves the definition information for a slice. - @param sliceID The unique slice identifier. - @param settings [out] A buffer in which to return the information. - */ - AIAPI AIErr (*GetSliceSettings)(ai::int32 sliceID, ASSliceSettings *settings); - - /** Sets a single slice attribute. - @param sliceID The unique slice identifier. - @param key The slice information attribute key. - @param valueEntry The new attribute value. - */ - AIAPI AIErr (*SetSliceSetting)(ai::int32 sliceID, const AIDictKey &key, AIEntryRef valueEntry); - - /** Retrieves a single slice attribute. - @param sliceID The unique slice identifier. - @param key The slice information attribute key. - @param valueEntry [out] A buffer in which to return the attribute value. - */ - AIAPI AIErr (*GetSliceSetting)(ai::int32 sliceID, const AIDictKey &key, AIEntryRef *valueEntry); - - /** Reports whether a slice can be converted to text. - (Note that this function returns a boolean value, not an error code.) - @param sliceID The unique slice identifier. - @return True if the slice can be converted to text. - */ - AIAPI AIBoolean (*SliceIsText)(ai::int32 sliceID); - - /** Marks a slice so that it is converted to HTML text on output. - @param sliceID The unique slice identifier. - @param HTMLTextOptions The text conversion options, - a logical OR of \c #AIHTMLConversionOptions values. - */ - AIAPI AIErr (*SetSliceIsHTMLText)(ai::int32 sliceID, ai::int32 HTMLTextOptions); - - /** Reports whether a slice is converted to HTML text on output. - (Note that this function returns a boolean value, not an error code.) - @param sliceID The unique slice identifier. - @param HTMLTextOptions [out] A buffer in which to return the - text conversion options, a logical OR of - \c #AIHTMLConversionOptions values. - @return True if the slice is marked to be converted to HTML text, false otherwise. - */ - AIAPI AIBoolean (*GetSliceIsHTMLText)(ai::int32 sliceID, ai::int32 *HTMLTextOptions); - - /** Converts a slice to text. - @param sliceID The unique slice identifier. - @param options The text conversion options, a logical OR of - \c #AIHTMLConversionOptions values. - @param text [out] A buffer in which to return the text object. - The call allocates and frees the text handle; you can - resize it using \c #AIPlatformMemorySuite::Resize(). - */ - AIAPI AIErr (*GetSliceAsHTMLText)(ai::int32 sliceID, ai::int32 options, ASHandle *text); - - /** Reports whether a slice is on a given layer. - (Note that this function returns a boolean value, not an error code.) - @param sliceID The unique slice identifier. - @param layer The layer. - @return True if the slice is on the layer. - */ - AIAPI AIBoolean (*SliceIsOnLayer)(ai::int32 sliceID, AILayerHandle layer); - - /** Temporarily replaces the slice list with an empty slice list and the optimizations - list with the settings of a specified slice. - @param groupID The unique slice identifier. <> - @param oldSliceList [out] A buffer in which to return an opaque references - to the current full lists, to be passed to \c #RestoreSliceList(). */ - AIAPI AIErr (*ReplaceSliceList)(ai::int32 groupID, AISavedSliceListRef *oldSliceList); - - /** Restores the slice list after a call to \c #ReplaceSliceList(). - @param oldSliceList The slice list to restore. - */ - AIAPI AIErr (*RestoreSliceList)(AISavedSliceListRef oldSliceList); - - /** Reports whether a slice is selected. - (Note that this function returns a boolean value, not an error code.) - @param sliceID The unique slice identifier. - @return True if the slice is selected. - */ - AIAPI AIBoolean (*SliceIsSelected)(ai::int32 sliceID); - - /** Retrieves all selected slices. - @param sliceIDList [out] A buffer in which to return an array of unique - slice identifiers. - @param count [out] A buffer in which to return the number of entries in the array. - */ - AIAPI AIErr (*GetSelectedSliceList)(ai::int32 **sliceIDList, ai::int32 *count); - - /** Frees memory allocated for a slice list by \c #GetSelectedSliceList(). - @param sliceIDList The slice list. - */ - AIAPI AIErr (*ReleaseSelectedSliceList)(ai::int32 *sliceIDList); - - // New in Illustrator 11 - - /** Duplicates all artwork in the current document that lies within a rectangle, - and adds it to a specified art group. - @param sliceBounds The bounding rectangle. - @param outputGroup The group art object. - */ - AIAPI AIErr (*DuplicateArtWithinRect)( AIRealRect sliceBounds , AIArtHandle outputGroup ); - - /** Transfers the slicing attributes from one art object to another. - Use with operations that create a new object that is intended replace the original and - adopt its identity; for example, a conversion operation such as from a path to - a gradient mesh. See also \c #AIArtSuite::TransferAttributes(). - @param srcart The source art object. - @param dstart The destination art object. - */ - AIAPI AIErr (*TransferSliceAttributes)( AIArtHandle srcart, AIArtHandle dstart ); - - } AISlicingSuite; - -/** @ingroup Suites - -This suite provides functions that allow you to access format-specific -optimization settings and color table information, used for saving and placing images. - -A file format plug-in must use the functions \c #SetSliceOptimizationID(), -\c #SetSliceOptimizationSettings(), and \c #SetSliceOptimizationSetting() -to attach settings directly to a sliced art object during a file place operation -when the main optimization settings database is unavailable. -After the Place command, optimization settings attached to the object are inserted into -the main database. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIOptimizationSettingsSuite and \c #kAIOptimizationSettingsSuiteVersion. -*/ -typedef struct - { - /** Gets the number of optimization settings groups in the settings-group list. - Use with \c #GetIndexedOptimizationSettingsID() to iterate through settings groups. - (Note that this function returns a numeric value, not an error code.) - @return The number of settings groups. - */ - AIAPI ai::int32 (*GetOptimizationSettingsCount)(void); - - /** Retrieves an optimization settings group from the settings-group list, by position - index. Use with \c #GetOptimizationSettingsCount() to iterate through settings groups. - (Note that this function returns a numeric value, not an error code.) - @param index The 0-based position index. - @return The unique identifier of an optimization settings group. - */ - AIAPI ai::int32 (*GetIndexedOptimizationSettingsID)(ai::int32 index); - - /** Removes an optimization settings group from the settings-group list. - (Note that this function does not return an error code.) - @param optimizationID The unique identifier of the optimization settings group. - */ - AIAPI void (*DeleteOptimizationSettings)(ai::int32 optimizationID); - - /** Retrieves a unique identifier suitable for an optimization settings group. - (Note that this function returns a numeric value, not an error code.) - @return A unique identifier for an optimization settings group. - */ - AIAPI ai::int32 (*GetUniqueOptimizationSettingsID)(void); - - /** Reports whether a unique identifier is currently used - to identify an optimization settings group. - (Note that this function returns a boolean value, not an error code.) - @param optimizationID The optimization settings group identifier. - @return True if the identifier is in use. - */ - AIAPI AIBoolean (*OptimizationSettingsExists)(ai::int32 optimizationID); - - /** Sets the optimization settings for a settings group. - @param optimizationID The optimization settings group identifier. - @param settings The new settings structure. - */ - AIAPI AIErr (*SetOptimizationSettings)(ai::int32 optimizationID, ASOptimizationSettings *settings); - - /** Retrieves the optimization settings for a settings group. - @param optimizationID The optimization settings group identifier. - @param settings [out] A buffer in which to return the settings structure. - */ - AIAPI AIErr (*GetOptimizationSettings)(ai::int32 optimizationID, ASOptimizationSettings *settings); - - /** Sets a single optimization settings attribute. - @param optimizationID The optimization settings group identifier. - @param key The settings information attribute key. - @param valueEntry The new attribute value. - */ - AIAPI AIErr (*SetOptimizationSetting)(ai::int32 optimizationID, const AIDictKey& key, AIEntryRef valueEntry); - - /** Retrieves a single optimization settings attribute. - @param optimizationID The optimization settings group identifier. - @param key The settings information attribute key. - @param valueEntry [out] A buffer in which to return the attribute value. - */ - AIAPI AIErr (*GetOptimizationSetting)(ai::int32 optimizationID, const AIDictKey& key, AIEntryRef *valueEntry); - - /** Associates a slice with an optimization group settings identifier. A file format plug-in - should use this before placing a sliced image, followed by \c #SetSliceOptimizationSettings(). - @param slice The slice identifier. - @param optimizationID The optimization settings group identifier. - */ - AIAPI AIErr (*SetSliceOptimizationID)(ai::int32 sliceID, ai::int32 optimizationID); - - /** Sets the optimization settings for a slice. A file format plug-in should use this - before placing a sliced image. - @param sliceID The slice identifier. - @param settings The new settings structure. - */ - AIAPI AIErr (*SetSliceOptimizationSettings)(ai::int32 sliceID, ASOptimizationSettings *settings); - - /** Sets a single optimization settings attribute for a slice. Use to supplement - optimization information after it has been created with \c #SetSliceOptimizationSettings(). - @param sliceID The slice identifier. - @param key The settings information attribute key. - @param valueEntry The new attribute value. - */ - AIAPI AIErr (*SetSliceOptimizationSetting)(ai::int32 sliceID, const AIDictKey&key, AIEntryRef valueEntry); - - /** Retrieves a color table associated with an optimization settings group. - You must always initialize the color table to 256 \c #AIRGBColor entries. - @param optimizationID The optimization settings group identifier. - @param numColors [in, out] When \c colors is \c NULL, a buffer in which to return the number of entries - needed for the \c colors array. For subsequent calls, pass in the number of entries - in the \c colors array. - @param colors [in, out] A buffer in which to return the color array. For the first call, pass \c NULL, - to get the number of entries, then allocate an array and pass it to a second call to fill the array. - @param exact [out] A buffer in which to return true if the color exactly matches the request. <> - */ - AIAPI AIErr (*GetColorTable)(ai::int32 optimizationID, ai::int32* numColors, AIRGBColor* colors, AIBoolean* exact); - - /** Sets the color table associated with an optimization settings group. - @param optimizationID The optimization settings group identifier. - @param numColors The number of entries in the \c colors array. - @param colors The color array. You must always initialize the color table to 256 \c #AIRGBColor entries. - @param exact True to use exact color matching.<> - */ - AIAPI AIErr (*SetColorTable)(ai::int32 optimizationID, ai::int32 numColors, AIRGBColor* colors, AIBoolean exact); - - /** Retrieves the locked colors in the color table associated with an optimization settings group. - You must always initialize the color table to 256 \c #AIRGBColor entries. - @param optimizationID The optimization settings group identifier. - @param numColors [in, out] When \c colors is \c NULL, a buffer in which to return the number of entries - needed for the \c colors array. For subsequent calls, pass in the number of entries - in the \c colors array. - @param colors [in, out] A buffer in which to return the locked color array. For the first call, pass \c NULL, - to get the number of entries, then allocate an array and pass it to a second call to fill the array. - */ - AIAPI AIErr (*GetLockedColors)(ai::int32 optimizationID, ai::int32* numColors, AIRGBColor* colors); - - /** Sets locked colors in the color table associated with an optimization settings group. - @param optimizationID The optimization settings group identifier. - @param numColors The number of entries in the \c colors array. - @param colors The locked color array. You must always initialize the color table to 256 \c #AIRGBColor entries. - */ - AIAPI AIErr (*SetLockedColors)(ai::int32 optimizationID, ai::int32 numColors, AIRGBColor* colors); - - /** Retrieves the color shift information for the color table associated with an optimization settings group. - You must always initialize the color table to 256 \c #AIRGBColor entries. - Color shifting allows you to map a range of colors to a single - color, in order to reduce the overall number of colors - @param optimizationID The optimization settings group identifier. - @param numEntries [in, out] When \c entries is \c NULL, a buffer in which to return the number of entries - needed for the \c colors array. For subsequent calls, pass in the number of entries - in the \c colors array. - @param entries [in, out] A buffer in which to return the array of color-shift entries. For the first call, pass \c NULL, - to get the number of entries, then allocate an array and pass it to a second call to fill the array. - */ - AIAPI AIErr (*GetColorShiftEntries)(ai::int32 optimizationID, ai::int32* numEntries, ASColorShiftEntry *entries); - - /** Sets color shift information for the color table associated with an optimization settings group. - Color shifting allows you to map a range of colors to a single - color, in order to reduce the overall number of colors - @param optimizationID The optimization settings group identifier. - @param numEntries The number of entries in the \c entries array. - @param entries The array of color-shift entries. You must always initialize the color table to 256 \c #AIRGBColor entries. - */ - AIAPI AIErr (*SetColorShiftEntries)(ai::int32 optimizationID, ai::int32 numEntries, ASColorShiftEntry *entries); - - } AIOptimizationSettingsSuite; - - -#include "AIHeaderEnd.h" - - -#endif \ No newline at end of file +#ifndef __AISLICING__ +#define __AISLICING__ + +/* +* Name: AISlicing.h +* $Revision: 2 $ +* Author: +* Date: +* Purpose: Adobe Illustrator Slicing Suite. +* + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. +* +*/ + + +/******************************************************************************* +** +** Imports +** +**/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __SLICETYPES__ +#include "AISliceTypes.h" +#endif + +#ifndef __AIDataFilter__ +#include "AIDataFilter.h" +#endif + +#ifndef __AIEntry__ +#include "AIEntry.h" +#endif + +#ifndef __AIPlatformMemory__ +#include "AIPlatformMemory.h" +#endif + +#ifndef __AIHTMLCONVERSION__ +#include "AIHTMLConversion.h" +#endif + +#ifndef _AISVGACTION_H_ +#include "AISVGAction.h" +#endif + +#ifndef __AIDict__ +#include "AIDictionary.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AISlicing.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAISlicingSuite "AI Slicing Suite" +#define kAISlicingSuiteVersion4 AIAPI_VERSION(4) +#define kAISlicingSuiteVersion kAISlicingSuiteVersion4 +#define kAISlicingVersion kAISlicingSuiteVersion + +#define kAIOptimizationSettingsSuite "AI Optimization Settings Suite" +#define kAIOptimizationSettingsSuiteVersion3 AIAPI_VERSION(3) +#define kAIOptimizationSettingsSuiteVersion kAIOptimizationSettingsSuiteVersion3 +#define kAIOptimizationSettingsVersion kAIOptimizationSettingsSuiteVersion + + +/** @ingroup Notifiers +See \c #AISlicingSuite */ +#define kAISlicingChangedNotifier "AI Slicing Changed" +/** @ingroup MenuGroups +See \c #AISlicingSuite */ +#define kAISliceCommandsMenuGroup "AI Slice Commands Menu Group" + + +/******************************************************************************* +** +** Types +** +**/ +/** Image formats for slices. +See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ +enum ASOptimizedFileFormat + { + /** GIF format*/ + asffGIF89a, + /** JPEG format */ + asffJPEG, + /** PNG8 format */ + asffPNG8, + /** PNG24 format */ + asffPNG24, + /** Automatic format choice ("auto") */ + asffAuto, + /** Invalid format ("") */ + asffInvalidFormat, + /** Mixed formats ("mixed") */ + asffMixedFormat, + /** SVG format */ + asffSVG + }; + +/** Slice dithering methods; see \c #ASGIFSettings, \c #ASPNG8Settings. */ +enum ASDitherAlgorithm + { + /** "none" */ + asdaNone, + /** "diffusion" */ + asdaDiffusion, + /** "pattern" */ + asdaPattern, + /** "whiteNoise" */ + asdaWhiteNoise, + /** "noise" */ + asdaBlueNoise + }; + +/** Slice noise-reduction methods; see \c #ASGIFSettings, \c #ASPNG8Settings. */ +enum ASReductionAlgorithm + { + /** "adaptive" */ + asraAdaptive, + /** "selective" */ + asraSelective, + /** "perceptual" */ + asraPerceptual, + /** "macintoshSystem" */ + asraMacintoshSystem, + /** "windowsSystem" */ + asraWindowsSystem, + /** "web" */ + asraWeb, + /** "custom" */ + asraImageReadyCustom, + /** "fileBased" */ + asraFileBased, + /** "neuralNet" */ + asraNeuralNet, + /** "fauxPerceptual" */ + asraFauxPerceptual + }; + +/** A array entry for a color-shifting optimization setting. +Allows you to map a range of colors to a single +color, in order to reduce the overall number of colors for optimization. +@see \c #AIOptimizationSettingsSuite::GetColorShiftEntries() +*/ +typedef struct + { + /** Start of range */ + AIRGBColor rangeStart; + /** End of range */ + AIRGBColor rangeEnd; + /** A color to which all the colors in this range can be mapped. */ + AIRGBColor remapColor; + } +ASColorShiftEntry; + +/** GIF optimization settings for slices. +See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ +typedef struct + { + /** True to use transparency. */ + AIBoolean transparency; + /** True to include caption with slice. */ + AIBoolean includeCaption; + /** True to use interlacing. */ + AIBoolean interlaced; + + /** True to use no matte color. */ + AIBoolean noMatteColor; + /** The matte color, if used. */ + AIRGBColor matteColor; + + /** True to do automatic reduction. */ + AIBoolean autoReduced; + /** True to use a rollover Primary palette. */ + AIBoolean rolloverPrimaryPalette; + + /** Percentage of tolerance level [0...100] for shifting colors to the closest web palette equivalents. + A higher value shifts more colors.*/ + ai::int32 webShiftedPercentage; + /** Number of colors. */ + ai::int32 numberOfColors; + /** Quality, range [0..100]. Amount of lossiness allowed in GIF compression */ + ai::int32 qualitySetting; + /** The dithering method. */ + ASDitherAlgorithm ditherAlgorithm; + /** The dithering percentage, [0..100], where 100 is maximum dithering. */ + ai::int32 ditherPercentage; + /** The reduction method. */ + ASReductionAlgorithm reductionAlgorithm; + + /** Opaque reference to the reduction algorithm filename. + See \c #ASSliceSettings for memory allocation rules. */ + ASHandle reductionAlgorithmFilename; + /** The dithering method for transparency. */ + ASDitherAlgorithm transparencyDitherAlgorithm; + } ASGIFSettings; + +/** JPEG optimization settings. +See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ +typedef struct + { + /** Obsolete, ignored */ + AIBoolean transparency; + /** True to use no matte color. */ + AIBoolean noMatteColor; + /** The matte color, if used. */ + AIRGBColor matteColor; + /** True to optimize. */ + AIBoolean optimized; + /** Quality, range [0..100], where 100 is best quality. */ + ai::int32 qualitySetting; + /** True to create slice progressively. */ + AIBoolean multiplePasses; + /** Blurring, range [0..2], where 2 is most blurring */ + AIReal blurAmount; + /** True to embed the color profile. */ + AIBoolean embedICCProfile; + } ASJPEGSettings; + +/** PNG8 optimization settings. +See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ +typedef struct + { + /** True to use transparency. */ + AIBoolean transparency; + /** Not used */ + AIBoolean includeCaption; + /** True to use interlacing. */ + AIBoolean interlaced; + /** True to use no matte color. */ + AIBoolean noMatteColor; + /** The matte color, if used. */ + AIRGBColor matteColor; + + /** True to do automatic reduction. */ + AIBoolean autoReduced; + /** True to use a rollover Primary palette. */ + AIBoolean rolloverPrimaryPalette; + /** Percentage of tolerance level [0...100] for shifting colors to the closest web palette equivalents. + A higher value shifts more colors.*/ + ai::int32 webShiftedPercentage; + /** Number of colors. */ + ai::int32 numberOfColors; + + /** The dithering method. */ + ASDitherAlgorithm ditherAlgorithm; + /** The dithering percentage, [0..100], where 100 is maximum dithering. */ + ai::int32 ditherPercentage; + /** The reduction method. */ + ASReductionAlgorithm reductionAlgorithm; + + /** Opaque reference to the reduction algorithm filename. + See \c #ASSliceSettings for memory allocation rules. */ + ASHandle reductionAlgorithmFilename; + /** The dithering method for transparency. */ + ASDitherAlgorithm transparencyDitherAlgorithm; + } ASPNG8Settings; + +/** PNG24 optimization settings. +See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ +typedef struct + { + /** True to use transparency. */ + AIBoolean transparency; + /** Not used */ + AIBoolean includeCaption; + /** True to use interlacing. */ + AIBoolean interlaced; + /** True to use no matte color. */ + AIBoolean noMatteColor; + /** The matte color, if used. */ + AIRGBColor matteColor; + /** True to filter image. */ + AIBoolean filtered; + } ASPNG24Settings; + +/** SVG optimization settings. +See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ +typedef struct + { + /** How to subset fonts in the SVG. */ + AISVGFontSubsetting fontSubsetting; + /** Whether to embed or link fonts. */ + AISVGFileLocation fontLocation; + /** Whether to embed or link raster data. */ + AISVGRasterLocation imageLocation; + /** Deprecated, do not use. Value is ignored. */ + AIBoolean obsolete; + /** The compression method. */ + AISVGFileCompression compression; + /** The number of digits of precision after the decimal when rounding numbers. */ + AISVGCoordinatePrecision precision; + /** The character set to use for the SVG file. */ + AISVGDocumentEncoding encoding; + /** How style information should be exported. */ + AISVGStyle style; + /** The SVG DTD type. */ + AISVGDTD dtd; + /** What type of font to use. */ + AISVGFontType fontType; + /** True to optimize the SVG. */ + AIBoolean optimize; + } ASSVGSettings; + +/** Optimization settings for appropriate format. +See \c #ASOptimizationSettings, \c #AIOptimizationSettingsSuite. */ +typedef union + { + ASGIFSettings gif; + ASJPEGSettings jpeg; + ASPNG8Settings png8; + ASPNG24Settings png24; + ASSVGSettings svg; + } ASOptimizationSettingsUnion; + +/** File format for save with appropriate optimization settings. +See \c #AIOptimizationSettingsSuite. */ +typedef struct ASOptimizationSettings + { + /** The file format. */ + ASOptimizedFileFormat fileFormat; + /** The file settings. */ + ASOptimizationSettingsUnion s; + } ASOptimizationSettings; + +/** Slice definition information. +The handles are opaque references to the data. +They are used to identify the blocks of memory managed by the \c #AIPlatformMemorySuite. +\li For set calls, you must allocate the handle. +\li For get calls, you can allocate and supply a handle, or specify NULL +for the function to allocate a handle automatically. +In either case, you must release handles when you no longer need them. +@see \c #AIOptimizationSettingsSuite::SetOptimizationSettings(), +\c #AIOptimizationSettingsSuite::GetOptimizationSettings(), +\c #AIOptimizationSettingsSuite::SetSliceOptimizationSettings() +*/ +typedef struct + { + /** Identifies the slice group to which this slice belongs. */ + ai::int32 groupID; + /** The type of slice. */ + ai::ESliceType type; + /** True if text is HTML. */ + AIBoolean textIsHTML; + /** True if text in cells is HTML. */ + AIBoolean cellTextIsHTML; + /** The horizontal alignment type. */ + ai::ESliceHorzAlign horzAlign; + /** The vertical alignment type. */ + ai::ESliceVertAlign vertAlign; + /** The background color type. */ + ai::ESliceBGColorType bgColorType; + /** The background color. */ + AIRGBColor bgColor; + + /** Opaque reference to the name object for this slice. */ + ASHandle hName; + /** Opaque reference to the URL object for this slice. */ + ASHandle hURL; + /** Opaque reference to the target object for this slice. */ + ASHandle hTarget; + /** Opaque reference to the message object for this slice. */ + ASHandle hMessage; + /** Opaque reference to the alternate tag object for this slice. */ + ASHandle hAltTag; + /** Opaque reference to the cell-text object for this slice. */ + ASHandle hCellText; + } ASSliceSettings; + + +typedef void* AISavedSliceListRef; + + +/******************************************************************************* +** +** Suite +** +**/ + +/** @ingroup Suites +This suite provides functions that allow you to create and manipulate +\e image \e slices, subsets of raster data that can be used in copying from +one buffer to another. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAISlicingSuite and \c #kAISlicingSuiteVersion. +*/ +typedef struct { + + /** Designates an art object as a slice. + @param art The art object. + @param sliceID [in, out] Optionally, a unique identifier to use if possible. Upon + return, the unique slice identifier actually assigned. + @param fromPlace True if called from a plug-in file format. + False if called from a menu or tool. + */ + AIAPI AIErr (*MakeSlice)(AIArtHandle art, ai::int32 *sliceID, AIBoolean fromPlace); + + /** Creates a rectangle with no fill and no stroke and makes it a slice. + @param placeAboveArt The art object above which to place the new slice in the paint order. + @param sliceID [in, out] Optionally, a unique identifier to use if possible. Upon + return, the unique identifier actually assigned to the new slice. + @param selected True to select the new slice. + @param fromPlace True if called from a plug-in file format. + False if called from a menu or tool. + */ + AIAPI AIErr (*CreateSlice)(AIArtHandle placeAboveArt, ai::int32 *sliceID, AIBoolean selected, AIBoolean fromPlace); + + /** Deletes slice art and its slicing information. + @param sliceID The unique identifier of the slice, as assigned on creation. + */ + AIAPI AIErr (*DeleteSlice)(ai::int32 sliceID); + + /** Removes the slicing designation from an art object, but does not delete the art. + @param art The art object. + */ + AIAPI AIErr (*Unslice)(AIArtHandle art); + + /** Retrieves the unique slice identifier of an art object. + (Note that this function returns a numeric value, not an error code.) + @param art The art object. + @return The unique slice identifier, or \c #kInvalidSliceID if the art is not a slice. + */ + AIAPI ai::int32 (*GetArtSliceID)(AIArtHandle art); + + /** Retrieves the art object for a slice + (Note that this function returns an object value, not an error code.) + @param sliceID The unique slice identifier. + @return The associated art object, or \c NULL if there is no such slice. + */ + AIAPI AIArtHandle (*GetSliceArt)(ai::int32 sliceID); + + /** Retrieves a unique identifier suitable for a slice. + (Note that this function returns a numeric value, not an error code.) + @return A unique slice identifier. + */ + AIAPI ai::int32 (*GetUniqueSliceID)(void); + + /** Reports whether a unique identifier is currently used to identify a slice. + (Note that this function returns a boolean value, not an error code.) + @param sliceID The slice identifier. + @return True if the identifier is in use. + */ + AIAPI AIBoolean (*SliceExists)(ai::int32 sliceID); + + /** Retrieves the number of slices in the slice list. Use with + \c #GetIndexedSliceID() to iterate through slices. + (Note that this function returns a numeric value, not an error code.) + @return The number of slices. + */ + AIAPI ai::int32 (*GetSliceCount)(void); + + /** Retrieves a slice from the slice list by position index. Use with + \c #GetSliceCount() to iterate through slices. + (Note that this function returns a numeric value, not an error code.) + @param index The 0-based position index. + @return The unique slice identifier. + */ + AIAPI ai::int32 (*GetIndexedSliceID)(ai::int32 index); + + /** Sets the bounding rectangle for a no fill/no stroke slice. + Does not affect a slice associated with any other art. + @param sliceID The unique slice identifier. + @param boundsRect The new bounding rectangle. + */ + AIAPI AIErr (*SetSliceBounds)(ai::int32 sliceID, AIRealRect *boundsRect); + + /** Retrieves the bounding rectangle for a slice, including the border. + @param sliceID The unique slice identifier. + @param boundsRect [out] A buffer in which to return the bounding rectangle. + */ + AIAPI AIErr (*GetSliceBounds)(ai::int32 sliceID, AIRealRect *boundsRect); + + /** Sets a border for a slice, which is the appended to the art visual bounds + to generate the slice bounds. + @param sliceID The unique slice identifier. + @param borderRect The new border rectangle. + */ + AIAPI AIErr (*SetSliceBorder)(ai::int32 sliceID, AIRealRect *borderRect); + + /** Retrieves the border rectangle for a slice. + @param sliceID The unique slice identifier. + @param borderRect [out] A buffer in which to return the border rectangle. + */ + AIAPI AIErr (*GetSliceBorder)(ai::int32 sliceID, AIRealRect *borderRect); + + /** Set the definition information for a slice. + @param sliceID The unique slice identifier. + @param settings The new slice information. + */ + AIAPI AIErr (*SetSliceSettings)(ai::int32 sliceID, ASSliceSettings *settings); + + /** Retrieves the definition information for a slice. + @param sliceID The unique slice identifier. + @param settings [out] A buffer in which to return the information. + */ + AIAPI AIErr (*GetSliceSettings)(ai::int32 sliceID, ASSliceSettings *settings); + + /** Sets a single slice attribute. + @param sliceID The unique slice identifier. + @param key The slice information attribute key. + @param valueEntry The new attribute value. + */ + AIAPI AIErr (*SetSliceSetting)(ai::int32 sliceID, const AIDictKey &key, AIEntryRef valueEntry); + + /** Retrieves a single slice attribute. + @param sliceID The unique slice identifier. + @param key The slice information attribute key. + @param valueEntry [out] A buffer in which to return the attribute value. + */ + AIAPI AIErr (*GetSliceSetting)(ai::int32 sliceID, const AIDictKey &key, AIEntryRef *valueEntry); + + /** Reports whether a slice can be converted to text. + (Note that this function returns a boolean value, not an error code.) + @param sliceID The unique slice identifier. + @return True if the slice can be converted to text. + */ + AIAPI AIBoolean (*SliceIsText)(ai::int32 sliceID); + + /** Marks a slice so that it is converted to HTML text on output. + @param sliceID The unique slice identifier. + @param HTMLTextOptions The text conversion options, + a logical OR of \c #AIHTMLConversionOptions values. + */ + AIAPI AIErr (*SetSliceIsHTMLText)(ai::int32 sliceID, ai::int32 HTMLTextOptions); + + /** Reports whether a slice is converted to HTML text on output. + (Note that this function returns a boolean value, not an error code.) + @param sliceID The unique slice identifier. + @param HTMLTextOptions [out] A buffer in which to return the + text conversion options, a logical OR of + \c #AIHTMLConversionOptions values. + @return True if the slice is marked to be converted to HTML text, false otherwise. + */ + AIAPI AIBoolean (*GetSliceIsHTMLText)(ai::int32 sliceID, ai::int32 *HTMLTextOptions); + + /** Converts a slice to text. + @param sliceID The unique slice identifier. + @param options The text conversion options, a logical OR of + \c #AIHTMLConversionOptions values. + @param text [out] A buffer in which to return the text object. + The call allocates and frees the text handle; you can + resize it using \c #AIPlatformMemorySuite::Resize(). + */ + AIAPI AIErr (*GetSliceAsHTMLText)(ai::int32 sliceID, ai::int32 options, ASHandle *text); + + /** Reports whether a slice is on a given layer. + (Note that this function returns a boolean value, not an error code.) + @param sliceID The unique slice identifier. + @param layer The layer. + @return True if the slice is on the layer. + */ + AIAPI AIBoolean (*SliceIsOnLayer)(ai::int32 sliceID, AILayerHandle layer); + + /** Temporarily replaces the slice list with an empty slice list and the optimizations + list with the settings of a specified slice. + @param groupID The unique slice identifier. <> + @param oldSliceList [out] A buffer in which to return an opaque references + to the current full lists, to be passed to \c #RestoreSliceList(). */ + AIAPI AIErr (*ReplaceSliceList)(ai::int32 groupID, AISavedSliceListRef *oldSliceList); + + /** Restores the slice list after a call to \c #ReplaceSliceList(). + @param oldSliceList The slice list to restore. + */ + AIAPI AIErr (*RestoreSliceList)(AISavedSliceListRef oldSliceList); + + /** Reports whether a slice is selected. + (Note that this function returns a boolean value, not an error code.) + @param sliceID The unique slice identifier. + @return True if the slice is selected. + */ + AIAPI AIBoolean (*SliceIsSelected)(ai::int32 sliceID); + + /** Retrieves all selected slices. + @param sliceIDList [out] A buffer in which to return an array of unique + slice identifiers. + @param count [out] A buffer in which to return the number of entries in the array. + */ + AIAPI AIErr (*GetSelectedSliceList)(ai::int32 **sliceIDList, ai::int32 *count); + + /** Frees memory allocated for a slice list by \c #GetSelectedSliceList(). + @param sliceIDList The slice list. + */ + AIAPI AIErr (*ReleaseSelectedSliceList)(ai::int32 *sliceIDList); + + // New in Illustrator 11 + + /** Duplicates all artwork in the current document that lies within a rectangle, + and adds it to a specified art group. + @param sliceBounds The bounding rectangle. + @param outputGroup The group art object. + */ + AIAPI AIErr (*DuplicateArtWithinRect)( AIRealRect sliceBounds , AIArtHandle outputGroup ); + + /** Transfers the slicing attributes from one art object to another. + Use with operations that create a new object that is intended replace the original and + adopt its identity; for example, a conversion operation such as from a path to + a gradient mesh. See also \c #AIArtSuite::TransferAttributes(). + @param srcart The source art object. + @param dstart The destination art object. + */ + AIAPI AIErr (*TransferSliceAttributes)( AIArtHandle srcart, AIArtHandle dstart ); + + } AISlicingSuite; + +/** @ingroup Suites + +This suite provides functions that allow you to access format-specific +optimization settings and color table information, used for saving and placing images. + +A file format plug-in must use the functions \c #SetSliceOptimizationID(), +\c #SetSliceOptimizationSettings(), and \c #SetSliceOptimizationSetting() +to attach settings directly to a sliced art object during a file place operation +when the main optimization settings database is unavailable. +After the Place command, optimization settings attached to the object are inserted into +the main database. + +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIOptimizationSettingsSuite and \c #kAIOptimizationSettingsSuiteVersion. +*/ +typedef struct + { + /** Gets the number of optimization settings groups in the settings-group list. + Use with \c #GetIndexedOptimizationSettingsID() to iterate through settings groups. + (Note that this function returns a numeric value, not an error code.) + @return The number of settings groups. + */ + AIAPI ai::int32 (*GetOptimizationSettingsCount)(void); + + /** Retrieves an optimization settings group from the settings-group list, by position + index. Use with \c #GetOptimizationSettingsCount() to iterate through settings groups. + (Note that this function returns a numeric value, not an error code.) + @param index The 0-based position index. + @return The unique identifier of an optimization settings group. + */ + AIAPI ai::int32 (*GetIndexedOptimizationSettingsID)(ai::int32 index); + + /** Removes an optimization settings group from the settings-group list. + (Note that this function does not return an error code.) + @param optimizationID The unique identifier of the optimization settings group. + */ + AIAPI void (*DeleteOptimizationSettings)(ai::int32 optimizationID); + + /** Retrieves a unique identifier suitable for an optimization settings group. + (Note that this function returns a numeric value, not an error code.) + @return A unique identifier for an optimization settings group. + */ + AIAPI ai::int32 (*GetUniqueOptimizationSettingsID)(void); + + /** Reports whether a unique identifier is currently used + to identify an optimization settings group. + (Note that this function returns a boolean value, not an error code.) + @param optimizationID The optimization settings group identifier. + @return True if the identifier is in use. + */ + AIAPI AIBoolean (*OptimizationSettingsExists)(ai::int32 optimizationID); + + /** Sets the optimization settings for a settings group. + @param optimizationID The optimization settings group identifier. + @param settings The new settings structure. + */ + AIAPI AIErr (*SetOptimizationSettings)(ai::int32 optimizationID, ASOptimizationSettings *settings); + + /** Retrieves the optimization settings for a settings group. + @param optimizationID The optimization settings group identifier. + @param settings [out] A buffer in which to return the settings structure. + */ + AIAPI AIErr (*GetOptimizationSettings)(ai::int32 optimizationID, ASOptimizationSettings *settings); + + /** Sets a single optimization settings attribute. + @param optimizationID The optimization settings group identifier. + @param key The settings information attribute key. + @param valueEntry The new attribute value. + */ + AIAPI AIErr (*SetOptimizationSetting)(ai::int32 optimizationID, const AIDictKey& key, AIEntryRef valueEntry); + + /** Retrieves a single optimization settings attribute. + @param optimizationID The optimization settings group identifier. + @param key The settings information attribute key. + @param valueEntry [out] A buffer in which to return the attribute value. + */ + AIAPI AIErr (*GetOptimizationSetting)(ai::int32 optimizationID, const AIDictKey& key, AIEntryRef *valueEntry); + + /** Associates a slice with an optimization group settings identifier. A file format plug-in + should use this before placing a sliced image, followed by \c #SetSliceOptimizationSettings(). + @param slice The slice identifier. + @param optimizationID The optimization settings group identifier. + */ + AIAPI AIErr (*SetSliceOptimizationID)(ai::int32 sliceID, ai::int32 optimizationID); + + /** Sets the optimization settings for a slice. A file format plug-in should use this + before placing a sliced image. + @param sliceID The slice identifier. + @param settings The new settings structure. + */ + AIAPI AIErr (*SetSliceOptimizationSettings)(ai::int32 sliceID, ASOptimizationSettings *settings); + + /** Sets a single optimization settings attribute for a slice. Use to supplement + optimization information after it has been created with \c #SetSliceOptimizationSettings(). + @param sliceID The slice identifier. + @param key The settings information attribute key. + @param valueEntry The new attribute value. + */ + AIAPI AIErr (*SetSliceOptimizationSetting)(ai::int32 sliceID, const AIDictKey&key, AIEntryRef valueEntry); + + /** Retrieves a color table associated with an optimization settings group. + You must always initialize the color table to 256 \c #AIRGBColor entries. + @param optimizationID The optimization settings group identifier. + @param numColors [in, out] When \c colors is \c NULL, a buffer in which to return the number of entries + needed for the \c colors array. For subsequent calls, pass in the number of entries + in the \c colors array. + @param colors [in, out] A buffer in which to return the color array. For the first call, pass \c NULL, + to get the number of entries, then allocate an array and pass it to a second call to fill the array. + @param exact [out] A buffer in which to return true if the color exactly matches the request. <> + */ + AIAPI AIErr (*GetColorTable)(ai::int32 optimizationID, ai::int32* numColors, AIRGBColor* colors, AIBoolean* exact); + + /** Sets the color table associated with an optimization settings group. + @param optimizationID The optimization settings group identifier. + @param numColors The number of entries in the \c colors array. + @param colors The color array. You must always initialize the color table to 256 \c #AIRGBColor entries. + @param exact True to use exact color matching.<> + */ + AIAPI AIErr (*SetColorTable)(ai::int32 optimizationID, ai::int32 numColors, AIRGBColor* colors, AIBoolean exact); + + /** Retrieves the locked colors in the color table associated with an optimization settings group. + You must always initialize the color table to 256 \c #AIRGBColor entries. + @param optimizationID The optimization settings group identifier. + @param numColors [in, out] When \c colors is \c NULL, a buffer in which to return the number of entries + needed for the \c colors array. For subsequent calls, pass in the number of entries + in the \c colors array. + @param colors [in, out] A buffer in which to return the locked color array. For the first call, pass \c NULL, + to get the number of entries, then allocate an array and pass it to a second call to fill the array. + */ + AIAPI AIErr (*GetLockedColors)(ai::int32 optimizationID, ai::int32* numColors, AIRGBColor* colors); + + /** Sets locked colors in the color table associated with an optimization settings group. + @param optimizationID The optimization settings group identifier. + @param numColors The number of entries in the \c colors array. + @param colors The locked color array. You must always initialize the color table to 256 \c #AIRGBColor entries. + */ + AIAPI AIErr (*SetLockedColors)(ai::int32 optimizationID, ai::int32 numColors, AIRGBColor* colors); + + /** Retrieves the color shift information for the color table associated with an optimization settings group. + You must always initialize the color table to 256 \c #AIRGBColor entries. + Color shifting allows you to map a range of colors to a single + color, in order to reduce the overall number of colors + @param optimizationID The optimization settings group identifier. + @param numEntries [in, out] When \c entries is \c NULL, a buffer in which to return the number of entries + needed for the \c colors array. For subsequent calls, pass in the number of entries + in the \c colors array. + @param entries [in, out] A buffer in which to return the array of color-shift entries. For the first call, pass \c NULL, + to get the number of entries, then allocate an array and pass it to a second call to fill the array. + */ + AIAPI AIErr (*GetColorShiftEntries)(ai::int32 optimizationID, ai::int32* numEntries, ASColorShiftEntry *entries); + + /** Sets color shift information for the color table associated with an optimization settings group. + Color shifting allows you to map a range of colors to a single + color, in order to reduce the overall number of colors + @param optimizationID The optimization settings group identifier. + @param numEntries The number of entries in the \c entries array. + @param entries The array of color-shift entries. You must always initialize the color table to 256 \c #AIRGBColor entries. + */ + AIAPI AIErr (*SetColorShiftEntries)(ai::int32 optimizationID, ai::int32 numEntries, ASColorShiftEntry *entries); + + } AIOptimizationSettingsSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISmoothShadingStyle.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISmoothShadingStyle.h new file mode 100644 index 0000000..46f6be6 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISmoothShadingStyle.h @@ -0,0 +1,148 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2018 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AITypes.h" +#include "AIPath.h" +#include "AIPathStyle.h" +#include "AIArtStyle.h" +#include "IAIAutoBuffer.h" +#include "IAILiteralString.h" + +#include "AIHeaderBegin.h" + +struct AIColorPoint +{ + AIFillStyle fillStyle; + AIBoolean isFillPoint; + AIRealPoint position; + AIReal strength; + AIReal opacity; +}; + +struct AIColorSegment +{ + AIFillStyle fillStyle; + AIPathSegment segment; + AIReal opacity; +}; + +struct AIColorCurve +{ + ai::AutoBuffer segments; + AIBoolean closed; +}; + +struct AISmoothShadingStyle +{ + ai::AutoBuffer colorPoints; + + ai::AutoBuffer colorCurves; + + /** A unique identifying name of the smooth style, not localized. Name should be in ASCII.*/ + ai::UnicodeString name; + + AISmoothShadingStyle() = default; + AISmoothShadingStyle (AISmoothShadingStyle&&) = default; // Move constructor + + AISmoothShadingStyle (const AISmoothShadingStyle&) = default; //copy constructor + + AISmoothShadingStyle& operator= (const AISmoothShadingStyle& rhs) + { + if ( this != &rhs ) + { + colorPoints = rhs.colorPoints; + colorCurves = rhs.colorCurves; + name = rhs.name; + } + return *this; + } +}; + +typedef struct AISmoothShadingStyle* AISmoothShadingStylePtr; + +/******************************************************************************* +** +** Constants +** +*******************************************************************************/ + +#define kAISmoothShadingStyleSuite "AI Smooth Shading Style Suite" +#define kAISmoothShadingStyleSuiteVersion1 AIAPI_VERSION(1) +#define kAISmoothShadingStyleSuiteVersion kAISmoothShadingStyleSuiteVersion1 +#define kAISmoothShadingStyleVersion kAISmoothShadingStyleSuiteVersion + +/******************************************************************************* +** +** Suite +** +********************************************************************************/ +/** @ingroup Suites +This suite provides you functions which allow you to interact with the smooth style. +Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAISmoothShadingStyleSuite and \c #kAISmoothShadingStyleVersion. +*/ + + +struct AISmoothShadingStyleSuite { + + /** Returns true if focus fill is SmoothShading else returns false + @param inArtStyle: Input artsyle. + **/ + AIAPI AIBoolean (*IsFocusSmoothShading) (AIArtStyleHandle inArtStyle); + + /** Determines if inArt has SmoothShading in focus + Direct use of this api is more optimal than fetching the art style of art and then calling IsFocusSmoothShading. + @param inArtStyle: Input artsyle. + @param containsSmoothShading: is set to true if inArt has smoothshading in focus + @param isVisible: is set to true if inArt has smoothshading and is visible + **/ + AIAPI void(*ArtHasFocusSmoothShading) (AIArtHandle inArt, AIBoolean& containsSmoothShading, AIBoolean& isVisible); + + /** Returns true if focal fill in inArtStyle1 and focal fill in inArtStyle2 are same. + @param inArtStyle1: Input art style 1. + @param inArtStyle2: Input art style 2. + **/ + AIAPI AIBoolean (*CompareFocusSmoothFill )(AIArtStyleHandle inArtStyle1, AIArtStyleHandle inArtStyle2); + + /** Returns true if both smooth shadings are same. + @param inArtStyle1: Input smooth shading style 1. + @param inArtStyle2: Input smooth shading style 2. + **/ + AIAPI AIBoolean (*Compare) (const AISmoothShadingStyle& inSmoothShading1, const AISmoothShadingStyle& inSmoothShading2); + + /** Returns true if inArtStyle contains at least one SmoothShading field + @param inArtStyle1: ArtStyle to search for. + **/ + AIAPI AIBoolean (*ContainsSmoothShading) (AIArtStyleHandle inArtStyle); + + /** Returns true if style of inArt contains at least one SmoothShading field + @param inArt: art to search for. + If you want to check for an art, it more optimal to call this api rather than first getting the style and then calling ContainsSmoothShading over it. + **/ + AIAPI AIBoolean (*ArtContainsSmoothShading) (AIArtHandle inArt); + + /** Retrieves focus SmoothShadingStyle information if art style has focus fill as smooth shading else returns false. + @param artStyle The art style. + @param outSmoothStyle [out] A buffer in which to return the SmoothShadingStyle style. + */ + + AIAPI AIBoolean (*GetFocusSmoothShadingStyle)(AIArtStyleHandle artStyle, AISmoothShadingStyle &outSmoothStyle); + +}; + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringFormatUtils.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringFormatUtils.h index 50b913b..ffe5445 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringFormatUtils.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringFormatUtils.h @@ -1,194 +1,194 @@ -#ifndef __AIStringFormatUtils__ -#define __AIStringFormatUtils__ - -/* - * Name: AIStringFormatUtils.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator String Format Utilities Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "IAIStringFormatUtils.h" - -#include "AIHeaderBegin.h" - -/** @file AIStringFormatUtils.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIStringFormatUtilsSuite "AI String Format Utils Suite" -#define kAIStringFormatUtilsSuiteVersion AIAPI_VERSION(3) -#define kAIStringFormatUtilsVersion kAIStringFormatUtilsSuiteVersion - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** @ingroup Errors - The input string could not be parsed into a number. */ -#define kCannotParseStringError 'NF!P' - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides support for the \c ai::NumberFormat and - \c ai::Locale classes in plug-ins. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIStringFormatUtilsSuite and \c #kAIStringFormatUtilsVersion. -*/ -struct AIStringFormatUtilsSuite { - - /* Locale class support */ - - /** Retrieves the language and region code string for a locale object. - @param id The locale identifier. - @param locale [out] A buffer in which to return the result string. - */ - AIAPI AIErr (*GetLocaleString)(const ai::LocaleID id, ai::AutoBuffer& locale); - - /** Retrieves the locale object identifier for a language and region code string. - @param locale The language and region code string. - @param id [out] A buffer in which to return the locale identifier. - */ - AIAPI AIErr (*GetLocaleID)(const char* locale, ai::LocaleID& id ); - - - /* Number format creation & destruction */ - - /** Initializes a \c ai::NumberFormat object for a locale. - @param format The number format object. - @param locale The locale object identifier. - */ - AIAPI AIErr (*Initialize) (ai::NumberFormat& format, const ai::LocaleID locale); - - /** Initializes \c #ai::NumberFormat object with the default system setting - for number formatting, using the factory method \c #ai::NumberFormat::getFormat. - @param format The number format object. - */ - AIAPI AIErr (*InitializeDefaultInstance) (ai::NumberFormat& format); - - /** Copies one number format object into another. - If the source format object is empty or uninitialized, empties - the destination format object. - @param format The destination format object. - @param format2 The source format object. - */ - AIAPI AIErr (*Copy) (ai::NumberFormat& format, const ai::NumberFormat& format2); - - /** Deletes the contents of a number format object. - @param format The format object. - */ - AIAPI AIErr (*Destroy) (ai::NumberFormat& format); - - /* Basic operations */ - - /** Formats a float value into a string using a \c ai::NumberFormat object. - @param format The number format object. - @param value The numeric value to be formatted. - @param precision The maximum number of digits allowed after the decimal point. If the - precision of \c value is bigger than this, applies input rounding. - @param padToPrecision If true, and if the precision of the input value is less - than \c precision, pad with zeroes after the decimal place so that the - number of digits after the decimal in the formatted string matches the precision. - @param str [out] A buffer in which to return the formatted string. - */ - AIAPI AIErr (*RealToString) (ai::NumberFormat& format, const float value, const ai::int32 precision, - AIBoolean padToPrecision, ai::UnicodeString& str); - - /** Formats an integer value into a string using a \c ai::NumberFormat object. - @param format The number format object. - @param value The numeric value to be formatted. - @param str [out] A buffer in which to return the formatted string. - */ - AIAPI AIErr (*IntegerToString) (ai::NumberFormat& format, const ai::int32 value, ai::UnicodeString& str); - - /** Formats a double value into a string using a \c #ai::NumberFormat object. - @param format The number format object. - @param value The numeric value to be formatted. - @param precision The maximum number of digits allowed after the decimal point. If the - precision of \c value is bigger than this, applies input rounding. - @param padToPrecision If true, and if the precision of the input value is less - than \c precision, pad with zeroes after the decimal place so that the - number of digits after the decimal in the formatted string matches the precision. - @param str [out] A buffer in which to return the formatted string. - */ - AIAPI AIErr (*DoubleToString) (ai::NumberFormat& format, const double value, const ai::int32 precision, - AIBoolean padToPrecision, ai::UnicodeString& str); - - /** Parses a string into a float value using a \c ai::NumberFormat object. - @param format The number format object. - @param str The string to be converted. - @param value [out] A buffer in which to return the numeric value. - @returns \c #kBadParameterErr error if the string cannot be parsed - into a valid numeric value. - */ - AIAPI AIErr (*StringToReal) (ai::NumberFormat& format, const ai::UnicodeString& str, float& value); - - /** Parses a string into an integer value using a \c ai::NumberFormat object. - @param format The number format object. - @param str The string to be converted. - @param value [out] A buffer in which to return the numeric value. - @returns \c #kBadParameterErr error if the string cannot be parsed - into a valid numeric value. - */ - AIAPI AIErr (*StringToInteger) (ai::NumberFormat& format, const ai::UnicodeString& str, ai::int32& value); - - /** Parses a input string into a double value. using a \c ai::NumberFormat object. - @param format The number format object. - @param str The string to be converted. - @param value [out] A buffer in which to return the numeric value. - @returns \c #kBadParameterErr error if the string cannot be parsed - into a valid numeric value. - */ - AIAPI AIErr (*StringToDouble) (ai::NumberFormat& format, const ai::UnicodeString& str, double& value); - - /** Retrieves the decimal separator character used by the locale of a \c ai::NumberFormat object. - @param format The number format object. - @param str [out] A buffer in which to return the decimal separator character. - */ - AIAPI AIErr (*GetDecimalSeparator) (ai::NumberFormat& format, ai::UnicodeString& str); - - /** Retrieves the thousands separator character used by the locale of a \c ai::NumberFormat object. - @param format The number format object. - @param str [out] A buffer in which to return the thousands separator character. - */ - AIAPI AIErr (*GetThousandsSeparator) (ai::NumberFormat& format, ai::UnicodeString& str); -}; - - -#include "AIHeaderEnd.h" - - - -#endif // __AIStringFormatUtils__ +#ifndef __AIStringFormatUtils__ +#define __AIStringFormatUtils__ + +/* + * Name: AIStringFormatUtils.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator String Format Utilities Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "IAIStringFormatUtils.h" + +#include "AIHeaderBegin.h" + +/** @file AIStringFormatUtils.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIStringFormatUtilsSuite "AI String Format Utils Suite" +#define kAIStringFormatUtilsSuiteVersion AIAPI_VERSION(3) +#define kAIStringFormatUtilsVersion kAIStringFormatUtilsSuiteVersion + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** @ingroup Errors + The input string could not be parsed into a number. */ +#define kCannotParseStringError 'NF!P' + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides support for the \c ai::NumberFormat and + \c ai::Locale classes in plug-ins. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIStringFormatUtilsSuite and \c #kAIStringFormatUtilsVersion. +*/ +struct AIStringFormatUtilsSuite { + + /* Locale class support */ + + /** Retrieves the language and region code string for a locale object. + @param id The locale identifier. + @param locale [out] A buffer in which to return the result string. + */ + AIAPI AIErr (*GetLocaleString)(const ai::LocaleID id, ai::AutoBuffer& locale); + + /** Retrieves the locale object identifier for a language and region code string. + @param locale The language and region code string. + @param id [out] A buffer in which to return the locale identifier. + */ + AIAPI AIErr (*GetLocaleID)(const char* locale, ai::LocaleID& id ); + + + /* Number format creation & destruction */ + + /** Initializes a \c ai::NumberFormat object for a locale. + @param format The number format object. + @param locale The locale object identifier. + */ + AIAPI AIErr (*Initialize) (ai::NumberFormat& format, const ai::LocaleID locale); + + /** Initializes \c #ai::NumberFormat object with the default system setting + for number formatting, using the factory method \c #ai::NumberFormat::getFormat. + @param format The number format object. + */ + AIAPI AIErr (*InitializeDefaultInstance) (ai::NumberFormat& format); + + /** Copies one number format object into another. + If the source format object is empty or uninitialized, empties + the destination format object. + @param format The destination format object. + @param format2 The source format object. + */ + AIAPI AIErr (*Copy) (ai::NumberFormat& format, const ai::NumberFormat& format2); + + /** Deletes the contents of a number format object. + @param format The format object. + */ + AIAPI AIErr (*Destroy) (ai::NumberFormat& format); + + /* Basic operations */ + + /** Formats a float value into a string using a \c ai::NumberFormat object. + @param format The number format object. + @param value The numeric value to be formatted. + @param precision The maximum number of digits allowed after the decimal point. If the + precision of \c value is bigger than this, applies input rounding. + @param padToPrecision If true, and if the precision of the input value is less + than \c precision, pad with zeroes after the decimal place so that the + number of digits after the decimal in the formatted string matches the precision. + @param str [out] A buffer in which to return the formatted string. + */ + AIAPI AIErr (*RealToString) (ai::NumberFormat& format, const float value, const ai::int32 precision, + AIBoolean padToPrecision, ai::UnicodeString& str); + + /** Formats an integer value into a string using a \c ai::NumberFormat object. + @param format The number format object. + @param value The numeric value to be formatted. + @param str [out] A buffer in which to return the formatted string. + */ + AIAPI AIErr (*IntegerToString) (ai::NumberFormat& format, const ai::int32 value, ai::UnicodeString& str); + + /** Formats a double value into a string using a \c #ai::NumberFormat object. + @param format The number format object. + @param value The numeric value to be formatted. + @param precision The maximum number of digits allowed after the decimal point. If the + precision of \c value is bigger than this, applies input rounding. + @param padToPrecision If true, and if the precision of the input value is less + than \c precision, pad with zeroes after the decimal place so that the + number of digits after the decimal in the formatted string matches the precision. + @param str [out] A buffer in which to return the formatted string. + */ + AIAPI AIErr (*DoubleToString) (ai::NumberFormat& format, const double value, const ai::int32 precision, + AIBoolean padToPrecision, ai::UnicodeString& str); + + /** Parses a string into a float value using a \c ai::NumberFormat object. + @param format The number format object. + @param str The string to be converted. + @param value [out] A buffer in which to return the numeric value. + @returns \c #kBadParameterErr error if the string cannot be parsed + into a valid numeric value. + */ + AIAPI AIErr (*StringToReal) (ai::NumberFormat& format, const ai::UnicodeString& str, float& value); + + /** Parses a string into an integer value using a \c ai::NumberFormat object. + @param format The number format object. + @param str The string to be converted. + @param value [out] A buffer in which to return the numeric value. + @returns \c #kBadParameterErr error if the string cannot be parsed + into a valid numeric value. + */ + AIAPI AIErr (*StringToInteger) (ai::NumberFormat& format, const ai::UnicodeString& str, ai::int32& value); + + /** Parses a input string into a double value. using a \c ai::NumberFormat object. + @param format The number format object. + @param str The string to be converted. + @param value [out] A buffer in which to return the numeric value. + @returns \c #kBadParameterErr error if the string cannot be parsed + into a valid numeric value. + */ + AIAPI AIErr (*StringToDouble) (ai::NumberFormat& format, const ai::UnicodeString& str, double& value); + + /** Retrieves the decimal separator character used by the locale of a \c ai::NumberFormat object. + @param format The number format object. + @param str [out] A buffer in which to return the decimal separator character. + */ + AIAPI AIErr (*GetDecimalSeparator) (ai::NumberFormat& format, ai::UnicodeString& str); + + /** Retrieves the thousands separator character used by the locale of a \c ai::NumberFormat object. + @param format The number format object. + @param str [out] A buffer in which to return the thousands separator character. + */ + AIAPI AIErr (*GetThousandsSeparator) (ai::NumberFormat& format, ai::UnicodeString& str); +}; + + +#include "AIHeaderEnd.h" + + + +#endif // __AIStringFormatUtils__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringPool.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringPool.h index 7291f01..f9d14a2 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringPool.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIStringPool.h @@ -1,108 +1,108 @@ -#ifndef __AIStringPool__ -#define __AIStringPool__ - -/* - * Name: AIStringPool.h - * $Revision: 4 $ - * Author: - * Date: - * Purpose: Adobe Illustrator String Pool Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIStringPool.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIStringPoolSuite "AI String Pool Suite" -#define kAIStringPoolSuiteVersion AIAPI_VERSION(4) -#define kAIStringPoolVersion kAIStringPoolSuiteVersion - - -/** @ingroup Errors - See \c #AIStringPoolSuite */ -#define kStringPoolErr 'SPER' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -typedef struct StringPool AIStringPool; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions for working with \e string \e pools. - A string pool contains a collection of NULL-terminated character sequences. No - single string appears in the pool more than once. You can compare two strings - from the pool for equality by comparing their addresses. You can obtain the application - string pool using \c #AIRuntimeSuite::GetAppStringPool(), or you can use these - functions to create your own string pool. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIStringPoolSuite and \c #kAIStringPoolVersion. - */ -typedef struct { - - /** Creates a new string pool. The plug-in is responsible for freeing the - pool when it is no longer needed. - @param pool [out] A buffer in which to return the new string pool object. - */ - AIAPI AIErr (*AllocateStringPool) ( AIStringPool **pool ); - - /** Disposes of a string pool that was created with \c #AllocateStringPool(). - @param pool The string pool object. - */ - AIAPI AIErr (*DisposeStringPool) ( AIStringPool *pool ); - - /** Retrieves a string entry from a string pool, or creates it and adds it - to the pool if it is not already there. - @param pool The string pool object. - @param string The string value of the matching or new pool entry. - @param wstring [out] A buffer in which to return the pool entry. - */ - AIAPI AIErr (*MakeWString) ( AIStringPool *pool, const char *string, char **wstring ); - -} AIStringPoolSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AIStringPool__ +#define __AIStringPool__ + +/* + * Name: AIStringPool.h + * $Revision: 4 $ + * Author: + * Date: + * Purpose: Adobe Illustrator String Pool Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIStringPool.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIStringPoolSuite "AI String Pool Suite" +#define kAIStringPoolSuiteVersion AIAPI_VERSION(4) +#define kAIStringPoolVersion kAIStringPoolSuiteVersion + + +/** @ingroup Errors + See \c #AIStringPoolSuite */ +#define kStringPoolErr 'SPER' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +typedef struct StringPool AIStringPool; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions for working with \e string \e pools. + A string pool contains a collection of NULL-terminated character sequences. No + single string appears in the pool more than once. You can compare two strings + from the pool for equality by comparing their addresses. You can obtain the application + string pool using \c #AIRuntimeSuite::GetAppStringPool(), or you can use these + functions to create your own string pool. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIStringPoolSuite and \c #kAIStringPoolVersion. + */ +typedef struct { + + /** Creates a new string pool. The plug-in is responsible for freeing the + pool when it is no longer needed. + @param pool [out] A buffer in which to return the new string pool object. + */ + AIAPI AIErr (*AllocateStringPool) ( AIStringPool **pool ); + + /** Disposes of a string pool that was created with \c #AllocateStringPool(). + @param pool The string pool object. + */ + AIAPI AIErr (*DisposeStringPool) ( AIStringPool *pool ); + + /** Retrieves a string entry from a string pool, or creates it and adds it + to the pool if it is not already there. + @param pool The string pool object. + @param string The string value of the matching or new pool entry. + @param wstring [out] A buffer in which to return the pool entry. + */ + AIAPI AIErr (*MakeWString) ( AIStringPool *pool, const char *string, char **wstring ); + +} AIStringPoolSuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchLibraries.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchLibraries.h index bfa5960..6a54c87 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchLibraries.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchLibraries.h @@ -1,459 +1,472 @@ -#ifndef __AISwatchLibraries__ -#define __AISwatchLibraries__ - -/* - * Name: AISwatchLibraries.h - * Author: Neal Tucker - * Date: 3/11/97 - * Purpose: Adobe Illustrator Swatch Libraries Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AISwatchList__ -#include "AISwatchList.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AISwatchLibraries.h */ - -// AISwatchLibs Suite -#define kAISwatchLibrariesSuite "AI Swatch Libraries Suite" -#define kAISwatchLibrariesSuiteVersion AIAPI_VERSION(7) -#define kAISwatchLibrariesVersion kAISwatchLibrariesSuiteVersion - -/** @ingroup Callers - Caller ID for messages sent to plug-ins from the Swatch Libraries plug-in. -*/ -#define kAISwatchLibsCaller "Swatch Libraries" - -/******************************************************************************* - ** - ** Types - ** - **/ -typedef struct _t_OS_MenuPtr* AIMenuPtr; - -/** @ingroup Notifiers - Sent when the Swatch Library is opened and has been modified since the last load - or when it is reloaded because the user saved to it. - */ -#define kAISwatchLibraryChangedNotifier "AI Swatch Library Changed Notifier" - -/** Message data sent with #kAISwatchLibraryChangedNotifier. - Use with \c #AISwatchLibrariesSuite::GetActiveSwatchList(). - */ -typedef struct { - /** The updated swatch list. */ - AISwatchListRef swatchList; - /** The unique identifier of the swatch library that was modified. */ - ai::int32 swatchLibraryID; -} AISwatchLibraryChangedNotifierData; - - -/** Specifies a swatch position relative to the currently active swatch - in a document Swatch palette. The behavior depends on whether wrapping - is on or off. - See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ -typedef enum { - /** The active swatch itself. */ - kAICurDocSwatch, - /** The next swatch in the group or list. */ - kAINextDocSwatch, - /** The previous swatch in the group or list. */ - kAIPrevDocSwatch, - /** The first swatch in the next group. */ - kAISwatchInNextDocSwatchGroup, - /** The last swatch in the previous group. */ - kAISwatchInPrevDocSwatchGroup -} AIRelativeDocSwatchKind; - -/** Specifies which Swatches palette for the current document is the target of a swatch selection - query. See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() - */ -typedef enum { - /** The main swatches palette in the regular palette. */ - kAIMainDocSwatches, - /** The Fill swatches palette in the Control palette. When the toolbox's - Fill/Stroke indicator is in Fill mode, this has the same selection - as the main document Swatches palette. */ - kAIDocFillSwatches, - /** The Stroke swatches palette in the Control palette. When the toolbox's - Fill/Stroke indicator is in Stroke mode, this has the same selection - as the main document Swatches palette. */ - kAIDocStrokeSwatches -} AIWhichDocSwatchesPalette; - - -/** Specifies the library types that should be included when building a library list. - See \c #AISwatchLibrariesSuite::BuildLibrariesList(). For the various folder types - see \c #AIFoldersSuite */ -typedef ai::uint32 AISwatchLibraryType; - -/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Swatches folder. - This does not include the preset color books, gradients and patterns folders.*/ -#define kAIPresetSwatches 1 -/** An \c #AISwatchLibraryType value. Include all libraries in the Preset ColorBooks folder.*/ -#define kAIPresetColorBooks 2 -/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Gradients folder.*/ -#define kAIPresetGradients 4 -/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Patterns folder.*/ -#define kAIPresetPatterns 8 -/** An \c #AISwatchLibraryType value. Include all libraries in the User Writable Swatch libraries folder.*/ -#define kAIUserWritableSwatches 16 -/** An \c #AISwatchLibraryType value. Include other libraries opened from Illustrator. */ -#define kAIOtherLibraries 32 -/** An \c #AISwatchLibraryType value. Include all libraries. */ -#define kAIAllSwatchLibraries kAIPresetSwatches | kAIPresetColorBooks | kAIPresetGradients | kAIPresetPatterns | kAIUserWritableSwatches | kAIOtherLibraries - -/** @ingroup Errors -See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ -#define kSwatchDoesNotExistErr '!SNE' - -/** @ingroup Errors -See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ -#define kNoActiveSwatchError '!NAS' - - -/** Supplied by the Swatch Libraries plug-in, these functions - allow you to open, access, and manipulate libraries of color, - custom color, pattern, and gradient swatches, also called swatch lists. - - You can collect all swatches, or all patterns, gradients, or custom colors - from all open libraries into a single list sorted by name, and - iterate through the resulting swatch list. - - \e Color \e books contain collections of pre-defined colors, - such as the Pantone colors. Some color book definitions and names - have changed from previous versions. For example, in Illustrator 12 and later, - Pantone solids are LAB, but were formerly CMYK. - \li \c #FindStandardBookColor() finds named colors in the - current color books. - \li \c #FindLegacyBookColor() find the previous color definition. - \li \c #MapLegacyColorName() maps a legacy color name to a current one. - */ -typedef struct -{ - /** Gets the number of currently known swatch libraries, including the swatch list - of the current open document. Use with \c #GetNthLibrary() to iterate through - known libraries. - - A library is known if it is located in the Presets folder and appears - in the Swatch Libraries menu, or if it has been opened at some time - during the current session with the Other Libraries command. - You can get a swatch list from a known library regardless of whether it is - open or closed. - @note Closing a swatch palette does not remove its swatches from memory, - but closing a document does clear the corresponding swatch list. - @param num [out] A buffer in which to return the number of open libraries. - */ - AIErr ASAPI (*CountLibraries)(ai::int32 *num); - - /** Retrieves the swatch list for a known swatch library by position index. Use with - \c #CountLibraries() to iterate through libraries. Use the \c #AISwatchListSuite - to access and modify the returned list. - @param num The 0-based position index. Use 0 or a negative number to get the swatch - list for the current document. The first real library starts at index 1. - @param swatchlist [out] A buffer in which to return the swatch list, or \c NULL if - the swatch library has not been opened during this session. - @see \c #OpenNthLibrary() to open a library. - */ - AIErr ASAPI (*GetNthLibrary)(ai::int32 num, AISwatchListRef *swatchlist); - - /** Retrieves the name of any swatch library in the list, whether it has been opened - or not. - @param num The 0-based position index of the library. - @param name [out] A buffer in which to return the name. The name of the - swatch library for the current document (\c num <= 0) is the empty string. - */ - AIErr ASAPI (*GetNthLibraryName)(ai::int32 num, ai::UnicodeString& name); - - // Aggregate list access - - /** Counts the aggregate number of all swatches in all libraries that have swatch lists. - Use with \c #GetNthLibrarySwatch() to iterate through all swatches. - @param num [out] A buffer in which to return the number of swatches. - */ - AIErr ASAPI (*CountLibrarySwatches)(ai::int32 *num); - - /** Retrieves a swatch by position index from the list of all swatches. - Use with \c #CountLibrarySwatches() to iterate through all swatches. - @param num The 0-based position index. - @param swatch [out] A buffer in which to return the swatch. - */ - AIErr ASAPI (*GetNthLibrarySwatch)(ai::int32 num, AISwatchRef *swatch); - - /** Counts the aggregate number of all pattern swatches in all open libraries. - Use with \c #GetNthLibraryPattern() to iterate through all patterns. - @param num [out] A buffer in which to return the number of patterns. - */ - AIErr ASAPI (*CountLibraryPatterns)(ai::int32 *num); - - /** Retrieves a pattern swatch by position index from the list of all patterns. - Use with \c #CountLibraryPatterns() to iterate through all patterns. - @param num The 0-based position index. - @param pattern [out] A buffer in which to return the pattern. - */ - AIErr ASAPI (*GetNthLibraryPattern)(ai::int32 num, AIPatternHandle *pattern); - - /** Counts the aggregate number of all gradient swatches in all open libraries. - Use with \c #GetNthLibraryGradient() to iterate through all gradients. - @param num [out] A buffer in which to return the number of gradients. - */ - AIErr ASAPI (*CountLibraryGradients)(ai::int32 *num); - - /** Retrieves a gradient swatch by position index from the list of all gradients. - Use with \c #CountLibraryGradients() to iterate through all gradients. - @param num The 0-based position index. - @param gradient [out] A buffer in which to return the gradient. - */ - AIErr ASAPI (*GetNthLibraryGradient)(ai::int32 num, AIGradientHandle *gradient); - - /** Counts the aggregate number of all custom color swatches in all open libraries. - Use with \c #GetNthLibraryCustomColor() to iterate through all custom color swatches. - @param num [out] A buffer in which to return the number of custom color swatches. - */ - AIErr ASAPI (*CountLibraryCustomColors)(ai::int32 *num); - - /** Retrieves a custom color swatch by position index from the list of all custom color swatches. - Use with \c #CountLibraryCustomColors() to iterate through all custom color swatches. - @param num The 0-based position index. - @param ccolor [out] A buffer in which to return the custom color swatch. - */ - AIErr ASAPI (*GetNthLibraryCustomColor)(ai::int32 num, AICustomColorHandle *ccolor); - - // Color book access, new in AI12 (CS2) - - /** Searches the color books to find the definition of a specific named - color. Color books contain collections of predefined colors, such as - the Pantone colors. A color book need not have been opened to be included - in the search. - (Note that this function returns a boolean value, not an error code.) - @param name The name string of the desired color. - @param color [out] A buffer in which to return the custom color definition, if found. - @return True if the color is found in a color book, false otherwise. - */ - AIBoolean ASAPI (*FindStandardBookColor)(const ai::UnicodeString& name, AICustomColor* color); - - /** Searches the legacy color books to find the previous definition of a specific named - color. A legacy color book need not have been opened to be included in the search. - (Note that this function returns a boolean value, not an error code.) - @param name The name string of the desired color. - @param color [out] A buffer in which to return the custom color definition, if found. - @return True if the color is found in a legacy color book, false otherwise. - */ - AIBoolean ASAPI (*FindLegacyBookColor)(const ai::UnicodeString& name, AICustomColor* color); - - /** Maps a legacy color name to its corresponding name in the current color books. - @param src The legacy color-book name. - @param dst [out] A buffer in which to return the current color-book name, - or the empty string if no mapping is defined. - */ - AIErr ASAPI (*MapLegacyColorName)(const ai::UnicodeString& src, ai::UnicodeString& dst); - - // Palette and Selection control, new for AI13 (CS3) - - /** Retrieves a swatch list from a swatch library. Opens the library file and reads - swatches even if the library has not yet been opened during the session. - Use the \c #AISwatchListSuite to access and modify the returned list. - @param num The 0-based position index. Use 0 or a negative number to get the swatch - list for the current open document, if any. - @param showPalette True to create and show a palette for the library. - @param swatchlist [out] A buffer in which to return the swatch list. - */ - AIErr ASAPI (*OpenNthLibrary)(ai::int32 num, AIBoolean showPalette, AISwatchListRef *swatchList ); - - /** Reports whether a swatch library is currently displayed in an open palette. - (Note that this function returns a boolean value, not an error code.) - @param num The 0-based position index of the swatch library in the list of known libraries. - @param shouldBeVisible : Default value is true - If set true, it ensures that the library asked for, must be currently visible. - else it returns true for all libraries, which were ever opened. - */ - AIBoolean ASAPI (*NthLibraryIsOpen)( ai::int32 num , bool shouldBeVisible); - - - /** Selects a swatch in the main Swatches palette, if it is open and its color kind is shown. - (Note that this function returns a boolean value, not an error code.) - @param index The 0-based position index into the main document's list of the swatch. - @param deselectOthers True to also deselect any other selected swatches if the specified color is visible. - @return True if the swatch was successfully selected, false if it was not. This can - occur if the palette is closed or does not show the specified swatch, or if the index - is invalid. - */ - - AIBoolean ASAPI (*SelectNthDocumentSwatchIfVisible) ( ai::int32 index, AIBoolean deselectOthers ); - - /** Selects a color group and all of the group's swatches in the main Swatches palette, - if it is open and the group is shown. - (Note that this function returns a boolean value, not an error code.) - @param index The 0-based position index into the main document's list of color groups, - or -1 to select the last color group in the document, or -2 or less - to deselect all fully selected color groups. Selected swatches in partially - selected color groups are not deselected. - @param deselectOthers True to also deselect any other selected swatches or color groups - if the specified group is visible. - @return True if the group was successfully selected, false if it was not. This can - occur if the palette is closed or does not show the specified swatch, or if the index - is invalid. - @note This function is intended to used by other plug-ins that create color groups, - to select the groups they have just inserted into the list. - */ - AIBoolean ASAPI (*SelectNthDocColorGroupIfVisible) ( ai::int32 index, AIBoolean deselectOthers ); - - /** Rebuilds the libraries menu, populating it with the current list of libraries. - The list is refreshed if the supplied change stamp does not match the - supplied change stamp. The internal change stamp has an initial value of 1. - Pass a change stamp of 0 to build the list the first time, or to force an update, - or to uncheck all libraries in the list. - @param librariesList The ADM hierarchy list object for the libraries list. - @param startIndex The 0-based index at which the first library entry is created. - @param includeLibraryTypes The library types to include when building the list, - a logical OR of \c #AISwatchLibraryType values. - @param contentChangeStampRef [in/out] On input, a pointer to a change stamp number - to compare with the current internal latest-change stamp. If the input stamp is - less than the internal stamp, the list is updated, and this buffer filled with the - new internal stamp value. - @param checkLibraryID Optional. A pointer to a library's unique identifier. The - entry for that library is drawn with a check mark in the ADM list. - */ - AIErr ASAPI (*BuildLibrariesList) ( AIMenuPtr librariesList, AISwatchLibraryType includeLibraryTypes, ai::int32 startIndex, ai::int32 *contentChangeStampRef, int *checkLibraryID); - - /** Retrieves the swatch list for a swatch library by active list entry, opening the file - and reading the swatches from it if it has not yet been opened during the session. - Use the \c #AISwatchListSuite to access and modify the returned list. - @param librariesList The ADM hierarchy list object for the libraries - menu with the active entry. - @param swatchlist [out] A buffer in which to return the swatch list. - @param activeLibraryID [out] Optional, a buffer in which to return - the active library's unique indentifier. - */ - AIErr ASAPI (*GetActiveSwatchList) ( AISwatchListRef *swatchlist, ai::int32 activeLibraryID); - - /** Counts the total number of selected swatches in the main document Swatches palette. Use this function - to allocate an appropriately sized array of AIColors before calling \c #GetSelectedDocSwatchColors(). - (Note that this function returns an integer value, not an error code.) - @return The number of selected swatches. - */ - ai::int32 ASAPI (*CountSelectedDocSwatches) ( ); - - /** Retrieves an array of colors for the selected document swatches. The - members are ordered as they appear in the document Swatches palette, - left to right and top to bottom. - @param colors [out] A buffer in which to return the colors. - Use \c #CountSelectedDocSwatches() to determine how much memory to allocate. - @param bufferSize The number of elements in the colors array. If there are - more selected colors, only this many are returned. - */ - AIErr ASAPI (*GetSelectedDocSwatchColors) ( AIColor *colors, ai::int32 bufferSize ); - - /** Counts the total number of selected swatch groups in the document Swatch palette. Use - to allocate an array of \c #AISwatchGroupRef before calling - \c #GetSelectedDocSwatchGroups(). - @return The number of selected swatch groups, or - 0 if there is no document open or no Swatches palette. - */ - ai::int32 ASAPI (*CountSelectedDocSwatchGroups) ( ); - - /** Returns an array of the document's selected swatch groups. - The groups are ordered as they appear in the document Swatches palette, - left to right and top to bottom. - @param swatchGroups [out] A buffer in which to return the groups. - Use \c #CountSelectedDocSwatchGroups() to determine how much memory to allocate. - @param bufferSize The number of elements in the groups array. If there are - more selected groups, only this many are returned. - */ - AIErr ASAPI (*GetSelectedDocSwatchGroups) ( AISwatchGroupRef *swatchGroups, ai::int32 bufferSize ); - - /** Retrieves a document swatch in a specified position in the list, relative - to the currently \e active document swatch, as determined by \c IADMHierachyList::GetActiveLeafEntry(). - If one swatch is selected, it is the active swatch. If multiple swatches are selected, - the active one is the last swatch entry to be selected. - @param selectKind The position of the desired swatch, relative to the - active swatch. - @param selectIt When true, the relative swatch becomes selected and all other swatches - are deslected. When false, the swatch selection state remains unchanged. - @param wrap When true, the last swatch in a swatch group wraps to the first swatch - in the same group, and the last swatch group wraps to the first group. -
When wrapping is on, if a swatch group only contains one swatch, the next or previous - swatch is the same one. Similarly, if there is only one swatch group - the next or previous group is the same group. -
Ungrouped swatches in the document swatch list are treated as if they are in a group - that follows the last defined swatch group. - @param targetPalette The swatch palette to search in (main, fill, or stroke). - @param relativeSwatch [out] A buffer in which to return the swatch in the specified relation - to the active swatch, or \c NULL if there is no active swatch or if there is no swatch - at the relative location. The returned error reflects which condition occurred. - @return The error \c #kSwatchDoesNotExistErr if the next or previous swatch does not exist. - When wrapping is on, this error cannot occur. -
The error \c #kNoActiveSwatchError if no swatch is currently selected in the - specified Swatch palette. - */ - AIErr ASAPI (*GetRelativeDocSwatch) ( AIRelativeDocSwatchKind selectKind, AIBoolean selectIt, AIBoolean wrap, - AIWhichDocSwatchesPalette targetPalette, AISwatchRef *relativeSwatch ); - - /** Retrieves an array of references of the selected document swatches. The - members are ordered as they appear in the document Swatches palette, - left to right and top to bottom. - @param swatchRefs [out] A buffer in which to return the references of swatches. - Use \c #CountSelectedDocSwatches() to determine how much memory to allocate. - @param bufferSize The number of elements in the return array. If there are - more selected swatches, only this many are returned. - */ - AIErr ASAPI (*GetSelectedDocSwatchRefs) ( AISwatchRef *swatchRefs, ai::int32 bufferSize ); - - - /** Searches the color book with specified ID to find the definition of a specified named - color. Color books contain collections of predefined colors, such as the Pantone colors. - (Note that this function returns a boolean value, not an error code.) - @param name The name string of the desired color. - @param bookID The id for the book in which color should be searched. - @param color [out] A buffer in which to return the custom color definition, if found. - @return True if the color is found, false otherwise. - */ - AIBoolean ASAPI (*FindColorInBook)(const ai::UnicodeString& name, ai::int32 bookID, AICustomColor* color); - - /** Counts the total number of selected swatches in the main document Swatches palette not in a selected group. - Use this function to allocate an appropriately sized array of AIColors before calling - \c #GetSelectedDocSwatchRefsNotInAnySelectedGroup(). - (Note that this function returns an integer value, not an error code.) - @return The number of selected swatches. - */ - ai::int32 ASAPI(*CountSelectedDocSwatchesNotInAnySelectedGroup) (); - - /** Retrieves an array of colors for the selected document swatches not in any selected group. The - members are ordered as they appear in the document Swatches palette, - left to right and top to bottom. - @param colors [out] A buffer in which to return the colors. - Use \c #CountSelectedDocSwatches() to determine how much memory to allocate. - @param bufferSize The number of elements in the colors array. If there are - more selected colors, only this many are returned. - */ - AIErr ASAPI(*GetSelectedDocSwatchRefsNotInAnySelectedGroup) (AISwatchRef *colors, ai::int32 bufferSize); - - -} AISwatchLibrariesSuite; - - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AISwatchLibraries__ +#define __AISwatchLibraries__ + +/* + * Name: AISwatchLibraries.h + * Author: Neal Tucker + * Date: 3/11/97 + * Purpose: Adobe Illustrator Swatch Libraries Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __ASTypes__ +#include "ASTypes.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AISwatchList__ +#include "AISwatchList.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AISwatchLibraries.h */ + +// AISwatchLibs Suite +#define kAISwatchLibrariesSuite "AI Swatch Libraries Suite" +#define kAISwatchLibrariesSuiteVersion AIAPI_VERSION(8) +#define kAISwatchLibrariesVersion kAISwatchLibrariesSuiteVersion + +/** @ingroup Callers + Caller ID for messages sent to plug-ins from the Swatch Libraries plug-in. +*/ +#define kAISwatchLibsCaller "Swatch Libraries" + +/******************************************************************************* + ** + ** Types + ** + **/ +typedef struct _t_OS_MenuPtr* AIMenuPtr; + +/** @ingroup Notifiers + Sent when the Swatch Library is opened and has been modified since the last load + or when it is reloaded because the user saved to it. + */ +#define kAISwatchLibraryChangedNotifier "AI Swatch Library Changed Notifier" + +/** Message data sent with #kAISwatchLibraryChangedNotifier. + Use with \c #AISwatchLibrariesSuite::GetActiveSwatchList(). + */ +typedef struct { + /** The updated swatch list. */ + AISwatchListRef swatchList; + /** The unique identifier of the swatch library that was modified. */ + ai::int32 swatchLibraryID; +} AISwatchLibraryChangedNotifierData; + + +/** Specifies a swatch position relative to the currently active swatch + in a document Swatch palette. The behavior depends on whether wrapping + is on or off. + See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ +typedef enum { + /** The active swatch itself. */ + kAICurDocSwatch, + /** The next swatch in the group or list. */ + kAINextDocSwatch, + /** The previous swatch in the group or list. */ + kAIPrevDocSwatch, + /** The first swatch in the next group. */ + kAISwatchInNextDocSwatchGroup, + /** The last swatch in the previous group. */ + kAISwatchInPrevDocSwatchGroup +} AIRelativeDocSwatchKind; + +/** Specifies which Swatches palette for the current document is the target of a swatch selection + query. See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() + */ +typedef enum { + /** The main swatches palette in the regular palette. */ + kAIMainDocSwatches, + /** The Fill swatches palette in the Control palette. When the toolbox's + Fill/Stroke indicator is in Fill mode, this has the same selection + as the main document Swatches palette. */ + kAIDocFillSwatches, + /** The Stroke swatches palette in the Control palette. When the toolbox's + Fill/Stroke indicator is in Stroke mode, this has the same selection + as the main document Swatches palette. */ + kAIDocStrokeSwatches +} AIWhichDocSwatchesPalette; + + +/** Specifies the library types that should be included when building a library list. + See \c #AISwatchLibrariesSuite::BuildLibrariesList(). For the various folder types + see \c #AIFoldersSuite */ +typedef ai::uint32 AISwatchLibraryType; + +/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Swatches folder. + This does not include the preset color books, gradients and patterns folders.*/ +#define kAIPresetSwatches 1 +/** An \c #AISwatchLibraryType value. Include all libraries in the Preset ColorBooks folder.*/ +#define kAIPresetColorBooks 2 +/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Gradients folder.*/ +#define kAIPresetGradients 4 +/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Patterns folder.*/ +#define kAIPresetPatterns 8 +/** An \c #AISwatchLibraryType value. Include all libraries in the User Writable Swatch libraries folder.*/ +#define kAIUserWritableSwatches 16 +/** An \c #AISwatchLibraryType value. Include other libraries opened from Illustrator. */ +#define kAIOtherLibraries 32 +/** An \c #AISwatchLibraryType value. Include all libraries. */ +#define kAIAllSwatchLibraries kAIPresetSwatches | kAIPresetColorBooks | kAIPresetGradients | kAIPresetPatterns | kAIUserWritableSwatches | kAIOtherLibraries + +/** @ingroup Errors +See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ +#define kSwatchDoesNotExistErr '!SNE' + +/** @ingroup Errors +See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ +#define kNoActiveSwatchError '!NAS' + + +/** Supplied by the Swatch Libraries plug-in, these functions + allow you to open, access, and manipulate libraries of color, + custom color, pattern, and gradient swatches, also called swatch lists. + + You can collect all swatches, or all patterns, gradients, or custom colors + from all open libraries into a single list sorted by name, and + iterate through the resulting swatch list. + + \e Color \e books contain collections of pre-defined colors, + such as the Pantone colors. Some color book definitions and names + have changed from previous versions. For example, in Illustrator 12 and later, + Pantone solids are LAB, but were formerly CMYK. + \li \c #FindStandardBookColor() finds named colors in the + current color books. + \li \c #FindLegacyBookColor() find the previous color definition. + \li \c #MapLegacyColorName() maps a legacy color name to a current one. + */ +typedef struct +{ + /** Gets the number of currently known swatch libraries, including the swatch list + of the current open document. Use with \c #GetNthLibrary() to iterate through + known libraries. + + A library is known if it is located in the Presets folder and appears + in the Swatch Libraries menu, or if it has been opened at some time + during the current session with the Other Libraries command. + You can get a swatch list from a known library regardless of whether it is + open or closed. + @note Closing a swatch palette does not remove its swatches from memory, + but closing a document does clear the corresponding swatch list. + @param num [out] A buffer in which to return the number of open libraries. + */ + AIErr ASAPI (*CountLibraries)(ai::int32 *num); + + /** Retrieves the swatch list for a known swatch library by position index. Use with + \c #CountLibraries() to iterate through libraries. Use the \c #AISwatchListSuite + to access and modify the returned list. + @param num The 0-based position index. Use 0 or a negative number to get the swatch + list for the current document. The first real library starts at index 1. + @param swatchlist [out] A buffer in which to return the swatch list, or \c NULL if + the swatch library has not been opened during this session. + @see \c #OpenNthLibrary() to open a library. + */ + AIErr ASAPI (*GetNthLibrary)(ai::int32 num, AISwatchListRef *swatchlist); + + /** Retrieves the name of any swatch library in the list, whether it has been opened + or not. + @param num The 0-based position index of the library. + @param name [out] A buffer in which to return the name. The name of the + swatch library for the current document (\c num <= 0) is the empty string. + */ + AIErr ASAPI (*GetNthLibraryName)(ai::int32 num, ai::UnicodeString& name); + + // Aggregate list access + + /** Counts the aggregate number of all swatches in all libraries that have swatch lists. + Use with \c #GetNthLibrarySwatch() to iterate through all swatches. + @param num [out] A buffer in which to return the number of swatches. + */ + AIErr ASAPI (*CountLibrarySwatches)(ai::int32 *num); + + /** Retrieves a swatch by position index from the list of all swatches. + Use with \c #CountLibrarySwatches() to iterate through all swatches. + @param num The 0-based position index. + @param swatch [out] A buffer in which to return the swatch. + */ + AIErr ASAPI (*GetNthLibrarySwatch)(ai::int32 num, AISwatchRef *swatch); + + /** Counts the aggregate number of all pattern swatches in all open libraries. + Use with \c #GetNthLibraryPattern() to iterate through all patterns. + @param num [out] A buffer in which to return the number of patterns. + */ + AIErr ASAPI (*CountLibraryPatterns)(ai::int32 *num); + + /** Retrieves a pattern swatch by position index from the list of all patterns. + Use with \c #CountLibraryPatterns() to iterate through all patterns. + @param num The 0-based position index. + @param pattern [out] A buffer in which to return the pattern. + */ + AIErr ASAPI (*GetNthLibraryPattern)(ai::int32 num, AIPatternHandle *pattern); + + /** Counts the aggregate number of all gradient swatches in all open libraries. + Use with \c #GetNthLibraryGradient() to iterate through all gradients. + @param num [out] A buffer in which to return the number of gradients. + */ + AIErr ASAPI (*CountLibraryGradients)(ai::int32 *num); + + /** Retrieves a gradient swatch by position index from the list of all gradients. + Use with \c #CountLibraryGradients() to iterate through all gradients. + @param num The 0-based position index. + @param gradient [out] A buffer in which to return the gradient. + */ + AIErr ASAPI (*GetNthLibraryGradient)(ai::int32 num, AIGradientHandle *gradient); + + /** Counts the aggregate number of all custom color swatches in all open libraries. + Use with \c #GetNthLibraryCustomColor() to iterate through all custom color swatches. + @param num [out] A buffer in which to return the number of custom color swatches. + */ + AIErr ASAPI (*CountLibraryCustomColors)(ai::int32 *num); + + /** Retrieves a custom color swatch by position index from the list of all custom color swatches. + Use with \c #CountLibraryCustomColors() to iterate through all custom color swatches. + @param num The 0-based position index. + @param ccolor [out] A buffer in which to return the custom color swatch. + */ + AIErr ASAPI (*GetNthLibraryCustomColor)(ai::int32 num, AICustomColorHandle *ccolor); + + // Color book access, new in AI12 (CS2) + + /** Searches the color books to find the definition of a specific named + color. Color books contain collections of predefined colors, such as + the Pantone colors. A color book need not have been opened to be included + in the search. + (Note that this function returns a boolean value, not an error code.) + @param name The name string of the desired color. + @param color [out] A buffer in which to return the custom color definition, if found. + @return True if the color is found in a color book, false otherwise. + */ + AIBoolean ASAPI (*FindStandardBookColor)(const ai::UnicodeString& name, AICustomColor* color); + + /** Searches the legacy color books to find the previous definition of a specific named + color. A legacy color book need not have been opened to be included in the search. + (Note that this function returns a boolean value, not an error code.) + @param name The name string of the desired color. + @param color [out] A buffer in which to return the custom color definition, if found. + @return True if the color is found in a legacy color book, false otherwise. + */ + AIBoolean ASAPI (*FindLegacyBookColor)(const ai::UnicodeString& name, AICustomColor* color); + + /** Maps a legacy color name to its corresponding name in the current color books. + @param src The legacy color-book name. + @param dst [out] A buffer in which to return the current color-book name, + or the empty string if no mapping is defined. + */ + AIErr ASAPI (*MapLegacyColorName)(const ai::UnicodeString& src, ai::UnicodeString& dst); + + // Palette and Selection control, new for AI13 (CS3) + + /** Retrieves a swatch list from a swatch library. Opens the library file and reads + swatches even if the library has not yet been opened during the session. + Use the \c #AISwatchListSuite to access and modify the returned list. + @param num The 0-based position index. Use 0 or a negative number to get the swatch + list for the current open document, if any. + @param showPalette True to create and show a palette for the library. + @param swatchlist [out] A buffer in which to return the swatch list. + */ + AIErr ASAPI (*OpenNthLibrary)(ai::int32 num, AIBoolean showPalette, AISwatchListRef *swatchList ); + + /** Reports whether a swatch library is currently displayed in an open palette. + (Note that this function returns a boolean value, not an error code.) + @param num The 0-based position index of the swatch library in the list of known libraries. + @param shouldBeVisible : Default value is true + If set true, it ensures that the library asked for, must be currently visible. + else it returns true for all libraries, which were ever opened. + */ + AIBoolean ASAPI (*NthLibraryIsOpen)( ai::int32 num , bool shouldBeVisible); + + + /** Selects a swatch in the main Swatches palette, if it is open and its color kind is shown. + (Note that this function returns a boolean value, not an error code.) + @param index The 0-based position index into the main document's list of the swatch. + @param deselectOthers True to also deselect any other selected swatches if the specified color is visible. + @return True if the swatch was successfully selected, false if it was not. This can + occur if the palette is closed or does not show the specified swatch, or if the index + is invalid. + */ + + AIBoolean ASAPI (*SelectNthDocumentSwatchIfVisible) ( ai::int32 index, AIBoolean deselectOthers ); + + /** Selects a color group and all of the group's swatches in the main Swatches palette, + if it is open and the group is shown. + (Note that this function returns a boolean value, not an error code.) + @param index The 0-based position index into the main document's list of color groups, + or -1 to select the last color group in the document, or -2 or less + to deselect all fully selected color groups. Selected swatches in partially + selected color groups are not deselected. + @param deselectOthers True to also deselect any other selected swatches or color groups + if the specified group is visible. + @return True if the group was successfully selected, false if it was not. This can + occur if the palette is closed or does not show the specified swatch, or if the index + is invalid. + @note This function is intended to used by other plug-ins that create color groups, + to select the groups they have just inserted into the list. + */ + AIBoolean ASAPI (*SelectNthDocColorGroupIfVisible) ( ai::int32 index, AIBoolean deselectOthers ); + + /** Rebuilds the libraries menu, populating it with the current list of libraries. + The list is refreshed if the supplied change stamp does not match the + supplied change stamp. The internal change stamp has an initial value of 1. + Pass a change stamp of 0 to build the list the first time, or to force an update, + or to uncheck all libraries in the list. + @param librariesList The ADM hierarchy list object for the libraries list. + @param startIndex The 0-based index at which the first library entry is created. + @param includeLibraryTypes The library types to include when building the list, + a logical OR of \c #AISwatchLibraryType values. + @param contentChangeStampRef [in/out] On input, a pointer to a change stamp number + to compare with the current internal latest-change stamp. If the input stamp is + less than the internal stamp, the list is updated, and this buffer filled with the + new internal stamp value. + @param checkLibraryID Optional. A pointer to a library's unique identifier. The + entry for that library is drawn with a check mark in the ADM list. + */ + AIErr ASAPI (*BuildLibrariesList) ( AIMenuPtr librariesList, AISwatchLibraryType includeLibraryTypes, ai::int32 startIndex, ai::int32 *contentChangeStampRef, int *checkLibraryID); + + /** Retrieves the swatch list for a swatch library by active list entry, opening the file + and reading the swatches from it if it has not yet been opened during the session. + Use the \c #AISwatchListSuite to access and modify the returned list. + @param librariesList The ADM hierarchy list object for the libraries + menu with the active entry. + @param swatchlist [out] A buffer in which to return the swatch list. + @param activeLibraryID [out] Optional, a buffer in which to return + the active library's unique indentifier. + */ + AIErr ASAPI (*GetActiveSwatchList) ( AISwatchListRef *swatchlist, ai::int32 activeLibraryID); + + /** Counts the total number of selected swatches in the main document Swatches palette. Use this function + to allocate an appropriately sized array of AIColors before calling \c #GetSelectedDocSwatchColors(). + (Note that this function returns an integer value, not an error code.) + @return The number of selected swatches. + */ + ai::int32 ASAPI (*CountSelectedDocSwatches) ( ); + + /** Retrieves an array of colors for the selected document swatches. The + members are ordered as they appear in the document Swatches palette, + left to right and top to bottom. + @param colors [out] A buffer in which to return the colors. + Use \c #CountSelectedDocSwatches() to determine how much memory to allocate. + @param bufferSize The number of elements in the colors array. If there are + more selected colors, only this many are returned. + */ + AIErr ASAPI (*GetSelectedDocSwatchColors) ( AIColor *colors, ai::int32 bufferSize ); + + /** Counts the total number of selected swatch groups in the document Swatch palette. Use + to allocate an array of \c #AISwatchGroupRef before calling + \c #GetSelectedDocSwatchGroups(). + @return The number of selected swatch groups, or + 0 if there is no document open or no Swatches palette. + */ + ai::int32 ASAPI (*CountSelectedDocSwatchGroups) ( ); + + /** Returns an array of the document's selected swatch groups. + The groups are ordered as they appear in the document Swatches palette, + left to right and top to bottom. + @param swatchGroups [out] A buffer in which to return the groups. + Use \c #CountSelectedDocSwatchGroups() to determine how much memory to allocate. + @param bufferSize The number of elements in the groups array. If there are + more selected groups, only this many are returned. + */ + AIErr ASAPI (*GetSelectedDocSwatchGroups) ( AISwatchGroupRef *swatchGroups, ai::int32 bufferSize ); + + /** Retrieves a document swatch in a specified position in the list, relative + to the currently \e active document swatch, as determined by \c IADMHierachyList::GetActiveLeafEntry(). + If one swatch is selected, it is the active swatch. If multiple swatches are selected, + the active one is the last swatch entry to be selected. + @param selectKind The position of the desired swatch, relative to the + active swatch. + @param selectIt When true, the relative swatch becomes selected and all other swatches + are deslected. When false, the swatch selection state remains unchanged. + @param wrap When true, the last swatch in a swatch group wraps to the first swatch + in the same group, and the last swatch group wraps to the first group. +
When wrapping is on, if a swatch group only contains one swatch, the next or previous + swatch is the same one. Similarly, if there is only one swatch group + the next or previous group is the same group. +
Ungrouped swatches in the document swatch list are treated as if they are in a group + that follows the last defined swatch group. + @param targetPalette The swatch palette to search in (main, fill, or stroke). + @param relativeSwatch [out] A buffer in which to return the swatch in the specified relation + to the active swatch, or \c NULL if there is no active swatch or if there is no swatch + at the relative location. The returned error reflects which condition occurred. + @return The error \c #kSwatchDoesNotExistErr if the next or previous swatch does not exist. + When wrapping is on, this error cannot occur. +
The error \c #kNoActiveSwatchError if no swatch is currently selected in the + specified Swatch palette. + */ + AIErr ASAPI (*GetRelativeDocSwatch) ( AIRelativeDocSwatchKind selectKind, AIBoolean selectIt, AIBoolean wrap, + AIWhichDocSwatchesPalette targetPalette, AISwatchRef *relativeSwatch ); + + /** Retrieves an array of references of the selected document swatches. The + members are ordered as they appear in the document Swatches palette, + left to right and top to bottom. + @param swatchRefs [out] A buffer in which to return the references of swatches. + Use \c #CountSelectedDocSwatches() to determine how much memory to allocate. + @param bufferSize The number of elements in the return array. If there are + more selected swatches, only this many are returned. + */ + AIErr ASAPI (*GetSelectedDocSwatchRefs) ( AISwatchRef *swatchRefs, ai::int32 bufferSize ); + + + /** Searches the color book with specified ID to find the definition of a specified named + color. Color books contain collections of predefined colors, such as the Pantone colors. + (Note that this function returns a boolean value, not an error code.) + @param name The name string of the desired color. + @param bookID The id for the book in which color should be searched. + @param color [out] A buffer in which to return the custom color definition, if found. + @return True if the color is found, false otherwise. + */ + AIBoolean ASAPI (*FindColorInBook)(const ai::UnicodeString& name, ai::int32 bookID, AICustomColor* color); + + /** Counts the total number of selected swatches in the main document Swatches palette not in a selected group. + Use this function to allocate an appropriately sized array of AIColors before calling + \c #GetSelectedDocSwatchRefsNotInAnySelectedGroup(). + (Note that this function returns an integer value, not an error code.) + @return The number of selected swatches. + */ + ai::int32 ASAPI(*CountSelectedDocSwatchesNotInAnySelectedGroup) (); + + /** Retrieves an array of colors for the selected document swatches not in any selected group. The + members are ordered as they appear in the document Swatches palette, + left to right and top to bottom. + @param colors [out] A buffer in which to return the colors. + Use \c #CountSelectedDocSwatches() to determine how much memory to allocate. + @param bufferSize The number of elements in the colors array. If there are + more selected colors, only this many are returned. + */ + AIErr ASAPI(*GetSelectedDocSwatchRefsNotInAnySelectedGroup) (AISwatchRef *colors, ai::int32 bufferSize); + + /** Retrieves the absolute path of any swatch library in the list, whether it has been opened + or not. + @param num The 0-based position index of the library. + @param path [out] returns the path of the nth Swatch Library + */ + AIErr ASAPI(*GetNthLibraryPath)(ai::int32 num, ai::FilePath& path); + + /** Open the SwatchLibrary using library path. + To support open as swatches library from the script api. + @param path [in] the path of file containing Swatch Library + */ + AIErr ASAPI(*OpenLibraryByPath)(const ai::FilePath& path); + + +} AISwatchLibrariesSuite; + + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchList.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchList.h index af83c02..b56cab2 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchList.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISwatchList.h @@ -1,670 +1,674 @@ -#ifndef __AISwatchList__ -#define __AISwatchList__ - -/* - * Name: AISwatchList.h - * Author: - * Date: - * Purpose: Adobe Illustrator Swatch list management - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIDocument__ -#include "AIDocument.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AISwatchList.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ -#define kAISwatchListSuite "AI Swatch List Suite" -#define kAISwatchListSuiteVersion7 AIAPI_VERSION(7) -#define kAISwatchListSuiteVersion kAISwatchListSuiteVersion7 -#define kAISwatchListVersion kAISwatchListSuiteVersion - -#define kAISwatchGroupSuite "AI Swatch Group Suite" -#define kAISwatchGroupSuiteVersion3 AIAPI_VERSION(3) -#define kAISwatchGroupSuiteVersion kAISwatchGroupSuiteVersion3 -#define kAISwatchGroupVersion kAISwatchGroupSuiteVersion - -/** @ingroup Notifier - Sent when a change is made to any swatch library from swatch library dialog. - Changes include change of swatch library using left/right arrow keys. */ -#define kAISwatchLibraryDialogChangedNotifier "AI Swatch Library Dialog Changed Notifier" - -/** @ingroup Notifier - Sent when a change is made to any swatch list for any - open document (including libraries). Changes include insertion or - deletion of a swatch, and redefinition of a swatch color or - name. No data is sent with the notifier. Use \c #AISwatchListSuite - functions to determine what change occurred. */ -#define kAISwatchListChangedNotifier "AI Swatch List Changed Notifier" -/** @ingroup Notifier - Sent when the definition of an object in the swatch list has changed. - Can be followed by a \c #kAISwatchListChangedNotifier if the swatch list itself has also - changed. If both are sent, both have the same \c refStamp as their notifier data. - See \c #AISwatchListSuite. */ -#define kAISwatchListChangedInternallyNotifier "AI Swatch List Changed Internally Notifier" -/** @ingroup Notifier - Sent when a color is replaced in a swatch. See \c #AISwatchListSuite. */ -#define kAISwatchReplaceColorNotifier "AI Swatch Replace Color Notifier" // used only by SwatchLib -/** @ingroup Notifier - Sent when a new swatch is created. See \c #AISwatchListSuite. */ -#define kAICreateNewSwatchNotifier "AI Create New Swatch Notifier" // used only by PaintStyle - -/** @ingroup Notifier - Sent when a new swatch is created. See \c #AISwatchListSuite. */ -#define kAICreateNewSwatchWithDefaultParamNotifier "AI Create New Swatch With Default Param Notifier" // used only by PaintStyle - -/** @ingroup Notifier - Sent when the selection state of the document Swatches palette changes. See \c #AISwatchListSuite. */ -#define kAIDocSwatchesSelectionChangedNotifier "AI Doc Swatches Selection Changed Notifier" - -/** @ingroup Errors - See \c #AISwatchListSuite. */ -#define kCantDeleteSwatchErr '!XDS' -/** @ingroup Errors - See \c #AISwatchListSuite. */ -#define kInvalidSwatchTypeForDest '!vST' -/** @ingroup Errors - See \c #AISwatchGroupSuite. */ -#define kTooManySwatchGroupsErr '>#sg' -/** @ingroup Errors - See \c #AISwatchGroupSuite. */ -#define kTooManySwatchesInGrpErr '>#sw' - -/** Maximum allowed number of swatch groups. See \c #AISwatchGroupSuite. */ -#define kMaxNumberSwatchGroups ((ASInt16) 0x7FFF) // 32767 -/** Maximum allowed number of swatches in a swatch group. See \c #AISwatchGroupSuite. */ -#define kMaxNumberSwatchesPerGroup ((ASInt16) 0xFFFF) // 65535 - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a swatch. See \c #AISwatchListSuite. */ -typedef struct _AISwatchOpaque *AISwatchRef; -/** Opaque reference to a swatch list. See \c #AISwatchListSuite. */ -typedef struct _AISwatchListOpaque *AISwatchListRef; - -/** Opaque reference to a swatch group.See \c #AISwatchGroupSuite. */ -typedef struct _AISwatchGroupOpaque *AISwatchGroupRef; - -/** Restrictions on the kinds of swatches allowed in a swatch groups. - See \c #AISwatchGroupSuite::NewSwatchGroup(), - \c #AISwatchGroupSuite::GetSwatchGroupKind(). */ -typedef enum -{ - /** The group can contain any kind of swatches, and usually has a null name. - The first swatch group (index 0) must be of this kind.*/ - kAISGKindGeneric, - /** The group cannot contain patterns or gradients, but can contain - tints of global colors. Is usually named.*/ - kAISGKindSolidColorsOnly, - /** The group is only allowed to contain pattern swatches. Is usually named.*/ - kAISGKindPatternsOnly, - /** The group is only allowed to contain gradient swatches. Is usually named. */ - kAISGKindGradientsOnly -} AISwatchGroupKind; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that allow you to access and modify \e swatches and - \e swatch \e lists. Each Illustrator document has an associated swatch list - which contains the document’s color swatches as shown in the Swatches palette. - - You can use \c #GetSwatchList() or functions from the \c #AISwatchLibrariesSuite - to obtain a swatch list reference. Typically, however, you need only - the current document's swatch list, so for convenience all functions that take an - \c #AISwatchListRef accept \c NULL to indicate the current document's - swatch list. - - The elements in a swatch list are of type \c #AISwatchRef. A swatch is - an \c #AIColor and an associated name. For \c #AIColor types that are themselves - defined by a named object (custom colors, patterns and gradients) the swatch name - is always the same as the name of the object. For other types of \c #AIColor, - the swatch name is independent. - - Swatch lists are hierarchically organized into \e swatch \e groups, - which can be named; see the \c #AISwatchGroupSuite. In \c #InsertNthSwatch(), an - index of -1 inserts at the end of the general swatches group (group 0). - Accessor functions in this suite treat groups as if they were flattened, - so that an index of 0 is the first swatch in the first group, and index numbers - simply continue into the next group. An exception is the deprecated \c #GetNextSwatch(), - which works only within a group. Use \c #GetNthSwatch() instead for iteration. - - There are three notifiers associated with swatch lists: -
\c #kAISwatchListChangedNotifier -
\c #kAISwatchListChangedInternallyNotifier -
\c #kAISwatchReplaceColorNotifier - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAISwatchListSuite and \c #kAISwatchListVersion. -*/ -typedef struct { - - /** Gets the total number of swatches in a swatch list, including those in all groups. - (Note that this function returns a numeric value, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @return The number of swatches in the list. - */ - ai::int32 ASAPI (*CountSwatches) (AISwatchListRef list); - - /** Retrieves the first swatch in a swatch list. - (Note that this function returns an object, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @return The swatch reference. - @see \c #GetNextSwatch() - */ - AISwatchRef ASAPI (*GetFirstSwatch) (AISwatchListRef list); - - /** @deprecated Retrieves the next swatch in a swatch group within a swatch list. Use - to find the swatch following one for which you do not have an index (retrieved, - for example, with \c #AISwatchListSuite::GetSwatchByNameAndType()). Do not use for iteration. - (Note that this function returns an object, not an error code.) - @note It is recommended that you use \c #CountSwatches() and \c #GetNthSwatch() - for iteration. This function cannot be used to iterate through a list - that contains multiple groups, and is inefficient for iteration even - within a group. . - @param prev The previous swatch in the list. - @return The swatch reference, or \c NULL if the previous swatch is the last in the group. - @see \c #AISwatchGroupSuite::LocateSwatch() to find a swatch with an unknown index. - */ - AISwatchRef ASAPI (*GetNextSwatch) (AISwatchRef prev); - - /** Retrieves a swatch from a swatch list by position index. Use with \c #CountSwatches() - to iterate through swatches. This is more efficient than \c #GetNextSwatch() - (Note that this function returns an object, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @param index The 0-based position index in the list, disregarding groups. - @return The swatch reference. - */ - AISwatchRef ASAPI (*GetNthSwatch) (AISwatchListRef list, ai::int32 index); - - /** Retrieves a swatch by name from a swatch list. - (Note that this function returns an object, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @param name The swatch name. - @return The swatch reference, or a \c NULL swatch reference if no such swatch name is found. - */ - AISwatchRef ASAPI (*GetSwatchByName) (AISwatchListRef list, const ai::UnicodeString& name); - - /** Creates a new swatch and inserts it into a swatch list. - Use \c #SetSwatchName() and \c #SetAIColor() to set the name and - color of the swatch after it has been inserted. - (Note that this function returns an object, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @param index The 0-based position index for the insertion point, disregarding groups. - \li If this is the first position of a named group in the list, the swatch - is inserted into the preceding group. Use \c #AISwatchGroupSuite - to control the group placement explicitly. - \li A value of -1 appends the new swatch at the end of the general - swatches group (group 0). - - The positions of the swatch previously at this index, and of - all succeeding swatches, are incremented. - @return The swatch reference for the new swatch. - */ - AISwatchRef ASAPI (*InsertNthSwatch) (AISwatchListRef list, ai::int32 index); - - /** Removes a swatch specified by index position from a swatch list. If the swatch is - a custom color swatch and it contains the last reference to that global color - in the swatch list, then the custom color is also deleted from the document and - any usages replaced by the equivalent process color. - @param list The swatch list, or \c NULL for the current document's swatch list. - @param index The 0-based position index of the swatch, disregarding groups. - The positions of all succeeding swatches, are decremented. - @return\c #kCantDeleteSwatchErr if the index is out of range. - */ - ASErr ASAPI (*RemoveNthSwatch) (AISwatchListRef list, ai::int32 index); - - /** Retrieves the color definition of a swatch. - @param swatch The swatch reference. - @param aicolor [out] A buffer in which to return the color definition. - Can be any color type supported by Illustrator. - */ - ASErr ASAPI (*GetAIColor) (AISwatchRef swatch, AIColor *aicolor); - - /** Sets the color definition for a swatch. - @param swatch The swatch reference. - @param aicolor The new color definition. Can be any color type supported by Illustrator, - if the type is allowed in the containing swatch group. - @return The error \c #kInvalidSwatchTypeForDest if the color type is not - allowed in the containing swatch group. - */ - ASErr ASAPI (*SetAIColor) (AISwatchRef swatch, AIColor *aicolor); - - /** Retrieves the name of a swatch. - @param swatch The swatch reference. - @param name [out] A buffer in which to return the name string. - */ - ASErr ASAPI (*GetSwatchName) (AISwatchRef swatch, ai::UnicodeString& name); - - /** Sets the name of a swatch. If the swatch identifies a custom color, pattern, or gradient, - also changes the name of the underlying object. - @param swatch The swatch reference. - @param name The new name string. - */ - ASErr ASAPI (*SetSwatchName) (AISwatchRef swatch, const ai::UnicodeString& name); - - /** Retrieves the swatch list for a document. - @param document The document, or \c NULL for the current document. - Use the \c #AIDocumentListSuite or \c #AIPathStyleSuite::ImportStyles() - to obtain a document handle. - @param list [out] A buffer in which to return the swatch list. - */ - ASErr ASAPI (*GetSwatchList) (AIDocumentHandle document, AISwatchListRef *list); - - /** Retrieves the first swatch in a list that uses a specified color. For patterns and gradients, - checks only that the gradient or pattern objects match, does not check that - other parameters such as the gradient matrix also match. For all other types, - checks all color fields. - (Note that this function returns an object, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @param aicolor The color to match. - @return The matching swatch reference. - */ - AISwatchRef ASAPI (*GetSwatchByColor) (AISwatchListRef list, const AIColor *aicolor); - - /** Retrieves the first swatch in a list with a given name and color type. - (Note that this function returns an object, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @param name The color name to match. - @param type The color type to match. - @return The matching swatch reference. - */ - AISwatchRef ASAPI (*GetSwatchByNameAndType) (AISwatchListRef list, const ai::UnicodeString& name, AIColorTag type); - - /** Removes a specific swatch from a swatch list. This is relatively inefficient, because it must search - the entire swatch list for the swatch. If you know the swatch group and index, - and if it is not a custom color or you want to remove custom colors, then - \c #AISwatchGroupSuite::RemoveNthSwatch() is more efficient. - - @param list The swatch list, or \c NULL for the current document's swatch list. - @param swatch The swatch reference. - @param deleteCustomColor When true, and the swatch references a custom color, - also deletes the custom color. In this case, objects that use the color are - converted to process colors. - */ - ASErr ASAPI (*RemoveSwatch) (AISwatchListRef list, AISwatchRef swatch, ASBoolean deleteCustomColor); - -} AISwatchListSuite; - - -// New in AI13 (CS3) - -/** @ingroup Suites - Swatch lists are hierarchically organized into \e swatch \e groups, - which can be named. This suite provides functions to create, access, and manipulate - the groups, and explicitly control the group placement of swatches within the list. - Swatch groups were introduced in Illustrator 13. - - The first group, called the general swatch group, is typically unnamed and can contain - any type of swatch. The first swatch group can be named, but cannot be removed or reordered. - Swatches that are not assigned to a specific group are considered part of the - general swatch group. If no groups have been defined, all swatches are - in this group, whose index is 0. - - Other groups are explicitly created and named, and can restrict the types of - swatches that belong to them. The first such group is at index 1. - - @see \c #AISwatchListSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAISwatchGroupSuite and \c #kAISwatchGroupVersion. - */ -typedef struct { - - /** Reports the number of swatch groups in a swatch list. There is always at - least one, the unnamed general swatch group. - (Note that this function returns an integer value, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @return The number of swatch groups. - */ - ai::int32 ASAPI (*CountSwatchGroups) (AISwatchListRef list); - - /** Retrieves a swatch group from a swatch list. - (Note that this function returns an object value, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @param index The 0-based position index in the list of groups. The first named - group, if any, is at index 1. - @return The swatch group reference. - */ - AISwatchGroupRef (*GetNthSwatchGroup) (AISwatchListRef list, ai::int32 index); - - /** Retrieves a swatch group by name from a swatch list. Group names need not - be unique with a list; if there is more than one matching group, the first one - is returned. - (Note that this function returns an object, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @param name The swatch group name. - @return The swatch group reference, or a \c NULL swatch reference if no such group name is found. - */ - AISwatchGroupRef ASAPI (*GetSwatchGroupByName) (AISwatchListRef list, const ai::UnicodeString& name); - - /** Creates a new swatch group in a swatch list. The new group is initially unnamed and - contains no swatches. Use \c #SetSwatchGroupName() to assign a name, and \c #InsertNthSwatch() - or \c #ReorderSwatchBetweenGroups() to add members. - @param list The swatch list, or \c NULL for the current document's swatch list. - @param groupKind The types of swatches that are allowed in the group. - @param atIndex The group position index at which to insert the group, or -1 to append - it to the current groups. - @param swatchGroup [out] A buffer in which to return the new swatch group object. - @return \c #kBadParameterErr if index is 0. -
\c #kTooManySwatchGroupsErr if there are already - \c #kMaxNumberSwatchGroups in the swatch list. */ - ASErr ASAPI (*NewSwatchGroup) ( AISwatchListRef list, AISwatchGroupKind groupKind, - ai::int32 atIndex, AISwatchGroupRef *newGroup ); - - /** Reports whether a swatch group is in a swatch list. - (Note that this function returns a boolean value, not an error code.) - @param list The swatch list, or \c NULL for the current document's swatch list. - @param swatchGroup The swatch group object. - @param indexFoundAt [out] A buffer in which to return the 0-based index - into the swatch list at which the group was found. - @return True if the group is in the list. - */ - ASBoolean ASAPI (*SwatchGroupIsInList) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ai::int32 *indexFoundAt ); - - /** Removes a swatch group from a swatch list by index position. You cannot remove - the general swatch group (index 0). The index positions of all later groups are decremented. - @param list The swatch list, or \c NULL for the current document's swatch list. - @param index The 0-based index position of the swatch to remove. - @param deleteSwatches When false, moves the member swatches into the general group, - unless a swatch with the same name and definition is already in that group. - When true, deletes the member swatches along with the group. - If a member swatch is a custom color swatch and it contains the last reference - to a global color in the swatch list, the custom color is not deleted from the document. - Use \c #AISwatchGroupSuite::RemoveSwatch() to delete the last reference to a spot color. - @return #kCantDeleteSwatchErr if the index is 0 or greater than - the number of swatch groups, or if the swatch group contains an undeletable swatch. - */ - ASErr ASAPI (*RemoveNthSwatchGroup) (AISwatchListRef list, ai::int32 index, ASBoolean deleteSwatches ); - - /** Removes a specific swatch group from a swatch list. - @param list The swatch list, or \c NULL for the current document's swatch list. - @param swatchGroup The swatch group object. - @param deleteSwatches When false, moves the member swatches into the general group, - unless a swatch with the same name and definition is already in that group. - When true, deletes the member swatches along with the group. - If a member swatch is a custom color swatch and it contains the last reference - to a global color in the swatch list, the custom color is not deleted from the document. - Use \c #AISwatchGroupSuite::RemoveSwatch() to delete the last reference to a spot color. - @return \c #kBadParameterErr if the swatch group is not in the list. - @note This function must search the entire list. If you have the index position of the group, - \c #RemoveNthSwatchGroup () is more efficient. - */ - ASErr ASAPI (*RemoveSwatchGroup) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ASBoolean deleteSwatches); - - /** Changes the position of a swatch group specified by index within a swatch list. - Other group index values change accordingly. You cannot move another group to position 0, or move the general - group to any other position. - @param list The swatch list, or \c NULL for the current document's swatch list. - @param fromIndex The current 0-based position index of the group to move. - @param newIndex The new 0-based position index. - @return \c #kBadParameterErr if either index is 0, or is greater than the number of swatch groups. -
If both index values are 0, returns \c #kNoErr but does nothing. - */ - ASErr ASAPI (*ReorderNthSwatchGroup) (AISwatchListRef list, ai::int32 fromIndex, ai::int32 newIndex ); - - /** Changes the position of a swatch group specified by reference within a swatch list. - Other group index values change accordingly. You cannot move another group to position 0, or move the general - group to any other position. - @param list The swatch list, or \c NULL for the current document's swatch list. - @param swatchGroup The swatch group object. - @param newIndex The new 0-based position index. - @return \c #kBadParameterErr if the new index is 0, or is greater than the number of swatch groups. - or if the group is not in the list, or is the general group. - @note This function must search the entire list. If you have the index position of the group, - \c #ReorderNthSwatchGroup () is more efficient. - */ - ASErr ASAPI (*ReorderSwatchGroup) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ai::int32 newIndex ); - - /** Retrieves the name of a swatch group. - @param swatchGroup The swatch group object. - @param name [out] A buffer in which to return the name string, or the empty - string if no name has been assigned. - */ - ASErr ASAPI (*GetSwatchGroupName) (AISwatchGroupRef swatchGroup, ai::UnicodeString& name); - - /** Sets the name of a swatch group. Group names need not be unique. - @param swatchGroup The swatch group object. - @param name The new name string. - */ - ASErr ASAPI (*SetSwatchGroupName) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name); - - /** Reports what kind of swatches a group can contain. This is set on creation and - cannot be modified. - (Note that this function returns a constant value, not an error code.) - @param swatchGroup The swatch group object. - @return The allowed-swatch-type constant. - */ - AISwatchGroupKind ASAPI (*GetSwatchGroupKind) (AISwatchGroupRef swatchGroup); - - /** Reports whether a swatch group allows colors of a specific type. - (Note that this function returns a boolean value, not an error code.) - @param swatchGroup The swatch group object. - @param colorKind The color type constant. - @return True if the type is allowed. - */ - ASBoolean ASAPI (*AllowsColorKind) (AISwatchGroupRef swatchGroup, AIColorTag colorKind); - - /** Moves a swatch to a new position within a swatch group. - @param swatchGroup The swatch group object. - @param swatch The swatch object. - @param toIndex The new 0-based index position, or -1 to move the swatch to the end of - the group. Other position index values change accordingly. - @return \c #kBadParameterErr if the index is greater than the number of swatches - in the group, or if the swatch is not in the group. - */ - ASErr ASAPI (*ReorderSwatch) (AISwatchGroupRef swatchGroup, AISwatchRef swatch, ai::int32 toIndex ); - - /** Move the swatch at fromIndex to toIndex within the same group. toIndex can be -1 to move to the end. - Returns kBadParameterErr if either fromIndex or toIndex is greater than count-1, or if fromIndex is less than 0. */ - - /** Moves a swatch to a new position within a swatch group. - @param swatchGroup The swatch group object. - @param fromIndex The current 0-based index position of the swatch. - @param toIndex The new 0-based index position, or -1 to move the swatch to the end of - the group. Other position index values change accordingly. - @return \c #kBadParameterErr if either index is greater than the number of swatches - in the group, or if the from index is less than 0. - */ - ASErr ASAPI (*ReorderNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 fromIndex, ai::int32 toIndex ); - - /** Reports the number of swatches in a swatch group. - (Note that this function returns an integer value, not an error code.) - @param swatchGroup The swatch group object. - @return The number of swatches. - */ - ai::int32 ASAPI (*CountSwatches) (AISwatchGroupRef swatchGroup); - - /** Retrieves a swatch from a swatch group by position index. - (Note that this function returns an object value, not an error code.) - @param swatchGroup The swatch group object. - @param index The 0-based position index. - @return The swatch object, or a \c NULL object if the index is invalid. - */ - AISwatchRef ASAPI (*GetNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 index); - - /** Retrieves a swatch from a swatch group by name. - (Note that this function returns an object value, not an error code.) - @param swatchGroup The swatch group object. - @param name The swatch name string. - @return The swatch object, or a \c NULL object if no matching swatch is found. - - */ - AISwatchRef ASAPI (*GetSwatchByName) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name); - - /** Retrieves the first swatch within a swatch group with a specified color. For patterns and - gradients, checks that the gradient or pattern objects match, but does not check that - the other parameters such as the gradient matrix or pattern matrix also match. For all other types, - checks all fields for a match. In particular, spot color and global color swatches check the tint. - (Note that this function returns an object value, not an error code.) - @param swatchGroup The swatch group object. - @param aicolor The color. - @return The swatch object, or a \c NULL object if no matching swatch is found. - */ - AISwatchRef ASAPI (*GetSwatchByColor) (AISwatchGroupRef swatchGroup, const AIColor *aicolor); - - /** Retrieves the first swatch within a swatch group with a given name and color type. - (Note that this function returns an object value, not an error code.) - @param swatchGroup The swatch group object. - @param name The swatch name string. - @param type The color type constant. - @return The swatch object, or a \c NULL object if no matching swatch is found. - */ - AISwatchRef ASAPI (*GetSwatchByNameAndType) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name, AIColorTag type); - - /** Creates a new swatch and inserts it into a swatch group. - (Note that this function returns an object value, not an error code.) - @param swatchGroup The swatch group object. - @param aicolor The color for the new swatch. - @param index The 0-based index position at which to insert the new swatch, or -1 to - append it to the end of the group. The swatch previously at this index - and all swatches following it in the list are bumped down the list by one position. - @return The new swatch object, or a \c NULL object if the index is invalid, there is not - enough memory, the swatch group already contains \c #kMaxNumberSwatchesPerGroup, - or the swatch type is not allowed for this group. See \c #AISwatchGroupKind. - */ - AISwatchRef ASAPI (*InsertNthSwatch) (AISwatchGroupRef swatchGroup, AIColor *aicolor, ai::int32 index); - - /** Removes a swatch specified by index position from a swatch group. - @param swatchGroup The swatch group object. - @param index The 0-based index position of the swatch in the group. Other swatch - position index values are adjusted accordingly. - @param deleteCustomColor When true, and the swatch is a custom color swatch and - contains the last reference to that custom color in the entire swatch list, - the custom color is also deleted from the document and any usages replaced by - the equivalent process color. -
When false, deletes a custom color only if it is unused. Otherwise, moves - it to the general group. If this is the general group, the swatch is in use, and - this is the only reference in the list, the function returns \c #kCantDeleteSwatchErr. - @param swatchNotUsed When true, global colors are not replaced in the document and are forcefully - deleted. It should be used, if it is already been ensured that the color is not used anywhere. - @return \c #kBadParameterErr if the index is not within the swatch group. -
\c #kCantDeleteSwatchErr if the swatch cannot be deleted for any reason. - */ - ASErr ASAPI (*RemoveNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 index, ASBoolean deleteCustomColor, bool swatchNotUsed); - - /** Removes a specific swatch from a group. Swatch position index values are adjusted accordingly. - (If the index is known, \c #RemoveNthSwatch() is more efficient.) - @param swatchGroup The swatch group object. - @param swatch The swatch object. - @param deleteCustomColor When true, and the swatch is a custom color swatch and - contains the last reference to that custom color in the entire swatch list, - the custom color is also deleted from the document and any usages replaced by - the equivalent process color. -
When false, deletes a custom color only if it is unused. Otherwise, moves - it to the general group. If this is the general group, the swatch is in use, and - this is the only reference in the list, the function returns \c #kCantDeleteSwatchErr. - @return \c #kBadParameterErr if the swatch is not in the swatch group. -
\c #kCantDeleteSwatchErr if the swatch cannot be deleted for any reason. - */ - ASErr ASAPI (*RemoveSwatch) (AISwatchGroupRef swatchGroup, AISwatchRef swatch, ASBoolean deleteCustomColor); - - /** Retrieves the group of a specific swatch in a swatch list. - Requires an exact match with the swatch object; swatches for the same color and name - are not considered equivalent. - @param list The swatch list, or \c NULL for the current document's swatch list. - @param swatch The swatch object. - @param containingSwatchGroup [out] A buffer in which to return the containing group object, - or a \c NULL object if the swatch is not in the list. - @param groupIndex [out] Optional. A buffer in which to return the 0-based index position - of this group within the list. - @param swatchIndex [out] Optional. A buffer in which to return the 0-based index position - of this swatch within the group. - */ - ASErr ASAPI (*LocateSwatch) (AISwatchListRef list, AISwatchRef swatch, AISwatchGroupRef *containingSwatchGroup, ai::int32 *groupIndex, ai::int32 *swatchIndex); - - /** Moves a swatch from one group to another within the same list. Other index positions within - both groups are adjusted accordingly. - @param fromGroup The group object that currently contains the swatch. - @param fromIndex The 0-based index of the swatch in the current group. - @param toGroup The destination group object. - @param toIndex The 0-based index at which to insert the swatch in the destination group, - or -1 to append it to the end of the group. - @return \c #kBadParameterErr if the source index is less than 0, or if either index is - greater than the number of swatches in its group, or if the two swatch groups are - not in the same swatch list. -
\c #kInvalidSwatchTypeForDest if the swatch is a type that - is not allowed in the destination group. - */ - ASErr ASAPI (*ReorderSwatchBetweenGroups) ( AISwatchGroupRef fromGroup, ai::int32 fromIndex, AISwatchGroupRef toGroup, ai::int32 toIndex ); - - /** Reports whether a swatch group is displayed in the open state (showing swatches) - the next time it is loaded into a palette that is in list view and shows color groups. - This status is saved on behalf of the Swatches palette, so that it can persist while the - document is closed or inactive. - - This preference does not guarantee that the swatches - are visible, even if this swatch group is in the active document, - because the Swatches palette might not show color groups, or might - not be in list view. - (Note that this function returns a boolean value, not an error code.) - @param swatchGroup The swatch group object. - @return True if the swatch group should be open in list view. - */ - ASBoolean ASAPI (*WantsToBeOpenIfInListView) ( AISwatchGroupRef swatchGroup ); - - /** Sets whether a swatch group is displayed in the open state (showing swatches) - the next time it is loaded into a palette that is in list view and shows color groups. - This status is saved on behalf of the Swatches palette, so that it can persist while the - document is closed or inactive. - - If a plug-in other than the Swatches palette changes this value, - it does not, by itself, trigger an update to the Swatches palette. - However, it the change is made at the same time as another change that does - trigger an update, such as adding a new swatch group or a new swatch, - the Swatches palette honors the setting when the swatch group - is next displayed in list view. - @param swatchGroup The swatch group object. - @param whatItWants True to display the group in the open state, false to - display it in the closed state. - @return \c #kBadParameterErr if the no swatch group is supplied. - */ - ASErr ASAPI (*SetWantsToBeOpenIfInListView) ( AISwatchGroupRef swatchGroup, ASBoolean whatItWants ); - -} AISwatchGroupSuite; - - -#include "AIHeaderEnd.h" - -#endif +#ifndef __AISwatchList__ +#define __AISwatchList__ + +/* + * Name: AISwatchList.h + * Author: + * Date: + * Purpose: Adobe Illustrator Swatch list management + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIDocument__ +#include "AIDocument.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AISwatchList.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ +#define kAISwatchListSuite "AI Swatch List Suite" +#define kAISwatchListSuiteVersion7 AIAPI_VERSION(7) +#define kAISwatchListSuiteVersion kAISwatchListSuiteVersion7 +#define kAISwatchListVersion kAISwatchListSuiteVersion + +#define kAISwatchGroupSuite "AI Swatch Group Suite" +#define kAISwatchGroupSuiteVersion3 AIAPI_VERSION(3) +#define kAISwatchGroupSuiteVersion kAISwatchGroupSuiteVersion3 +#define kAISwatchGroupVersion kAISwatchGroupSuiteVersion + +/** @ingroup Notifier + Sent when a change is made to any swatch library from swatch library dialog. + Changes include change of swatch library using left/right arrow keys. */ +#define kAISwatchLibraryDialogChangedNotifier "AI Swatch Library Dialog Changed Notifier" + +/** @ingroup Notifier + Sent when a change is made to any swatch list for any + open document (including libraries). Changes include insertion or + deletion of a swatch, and redefinition of a swatch color or + name. No data is sent with the notifier. Use \c #AISwatchListSuite + functions to determine what change occurred. */ +#define kAISwatchListChangedNotifier "AI Swatch List Changed Notifier" +/** @ingroup Notifier + Sent when the definition of an object in the swatch list has changed. + Can be followed by a \c #kAISwatchListChangedNotifier if the swatch list itself has also + changed. If both are sent, both have the same \c refStamp as their notifier data. + See \c #AISwatchListSuite. */ +#define kAISwatchListChangedInternallyNotifier "AI Swatch List Changed Internally Notifier" +/** @ingroup Notifier + Sent when a color is replaced in a swatch. See \c #AISwatchListSuite. */ +#define kAISwatchReplaceColorNotifier "AI Swatch Replace Color Notifier" // used only by SwatchLib +/** @ingroup Notifier + Sent when a new swatch is created. See \c #AISwatchListSuite. */ +#define kAICreateNewSwatchNotifier "AI Create New Swatch Notifier" // used only by PaintStyle + +/** @ingroup Notifier + Sent when a selected swatch is deleted. See \c #AISwatchListSuite. */ +#define kAIDeleteSwatchNotifier "AI Delete Selected Swatch Notifier" // used only by PaintStyle + +/** @ingroup Notifier + Sent when a new swatch is created. See \c #AISwatchListSuite. */ +#define kAICreateNewSwatchWithDefaultParamNotifier "AI Create New Swatch With Default Param Notifier" // used only by PaintStyle + +/** @ingroup Notifier + Sent when the selection state of the document Swatches palette changes. See \c #AISwatchListSuite. */ +#define kAIDocSwatchesSelectionChangedNotifier "AI Doc Swatches Selection Changed Notifier" + +/** @ingroup Errors + See \c #AISwatchListSuite. */ +#define kCantDeleteSwatchErr '!XDS' +/** @ingroup Errors + See \c #AISwatchListSuite. */ +#define kInvalidSwatchTypeForDest '!vST' +/** @ingroup Errors + See \c #AISwatchGroupSuite. */ +#define kTooManySwatchGroupsErr '>#sg' +/** @ingroup Errors + See \c #AISwatchGroupSuite. */ +#define kTooManySwatchesInGrpErr '>#sw' + +/** Maximum allowed number of swatch groups. See \c #AISwatchGroupSuite. */ +#define kMaxNumberSwatchGroups ((ASInt16) 0x7FFF) // 32767 +/** Maximum allowed number of swatches in a swatch group. See \c #AISwatchGroupSuite. */ +#define kMaxNumberSwatchesPerGroup ((ASInt16) 0xFFFF) // 65535 + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a swatch. See \c #AISwatchListSuite. */ +typedef struct _AISwatchOpaque *AISwatchRef; +/** Opaque reference to a swatch list. See \c #AISwatchListSuite. */ +typedef struct _AISwatchListOpaque *AISwatchListRef; + +/** Opaque reference to a swatch group.See \c #AISwatchGroupSuite. */ +typedef struct _AISwatchGroupOpaque *AISwatchGroupRef; + +/** Restrictions on the kinds of swatches allowed in a swatch groups. + See \c #AISwatchGroupSuite::NewSwatchGroup(), + \c #AISwatchGroupSuite::GetSwatchGroupKind(). */ +typedef enum +{ + /** The group can contain any kind of swatches, and usually has a null name. + The first swatch group (index 0) must be of this kind.*/ + kAISGKindGeneric, + /** The group cannot contain patterns or gradients, but can contain + tints of global colors. Is usually named.*/ + kAISGKindSolidColorsOnly, + /** The group is only allowed to contain pattern swatches. Is usually named.*/ + kAISGKindPatternsOnly, + /** The group is only allowed to contain gradient swatches. Is usually named. */ + kAISGKindGradientsOnly +} AISwatchGroupKind; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that allow you to access and modify \e swatches and + \e swatch \e lists. Each Illustrator document has an associated swatch list + which contains the document’s color swatches as shown in the Swatches palette. + + You can use \c #GetSwatchList() or functions from the \c #AISwatchLibrariesSuite + to obtain a swatch list reference. Typically, however, you need only + the current document's swatch list, so for convenience all functions that take an + \c #AISwatchListRef accept \c NULL to indicate the current document's + swatch list. + + The elements in a swatch list are of type \c #AISwatchRef. A swatch is + an \c #AIColor and an associated name. For \c #AIColor types that are themselves + defined by a named object (custom colors, patterns and gradients) the swatch name + is always the same as the name of the object. For other types of \c #AIColor, + the swatch name is independent. + + Swatch lists are hierarchically organized into \e swatch \e groups, + which can be named; see the \c #AISwatchGroupSuite. In \c #InsertNthSwatch(), an + index of -1 inserts at the end of the general swatches group (group 0). + Accessor functions in this suite treat groups as if they were flattened, + so that an index of 0 is the first swatch in the first group, and index numbers + simply continue into the next group. An exception is the deprecated \c #GetNextSwatch(), + which works only within a group. Use \c #GetNthSwatch() instead for iteration. + + There are three notifiers associated with swatch lists: +
\c #kAISwatchListChangedNotifier +
\c #kAISwatchListChangedInternallyNotifier +
\c #kAISwatchReplaceColorNotifier + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAISwatchListSuite and \c #kAISwatchListVersion. +*/ +typedef struct { + + /** Gets the total number of swatches in a swatch list, including those in all groups. + (Note that this function returns a numeric value, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @return The number of swatches in the list. + */ + ai::int32 ASAPI (*CountSwatches) (AISwatchListRef list); + + /** Retrieves the first swatch in a swatch list. + (Note that this function returns an object, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @return The swatch reference. + @see \c #GetNextSwatch() + */ + AISwatchRef ASAPI (*GetFirstSwatch) (AISwatchListRef list); + + /** @deprecated Retrieves the next swatch in a swatch group within a swatch list. Use + to find the swatch following one for which you do not have an index (retrieved, + for example, with \c #AISwatchListSuite::GetSwatchByNameAndType()). Do not use for iteration. + (Note that this function returns an object, not an error code.) + @note It is recommended that you use \c #CountSwatches() and \c #GetNthSwatch() + for iteration. This function cannot be used to iterate through a list + that contains multiple groups, and is inefficient for iteration even + within a group. . + @param prev The previous swatch in the list. + @return The swatch reference, or \c NULL if the previous swatch is the last in the group. + @see \c #AISwatchGroupSuite::LocateSwatch() to find a swatch with an unknown index. + */ + AISwatchRef ASAPI (*GetNextSwatch) (AISwatchRef prev); + + /** Retrieves a swatch from a swatch list by position index. Use with \c #CountSwatches() + to iterate through swatches. This is more efficient than \c #GetNextSwatch() + (Note that this function returns an object, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @param index The 0-based position index in the list, disregarding groups. + @return The swatch reference. + */ + AISwatchRef ASAPI (*GetNthSwatch) (AISwatchListRef list, ai::int32 index); + + /** Retrieves a swatch by name from a swatch list. + (Note that this function returns an object, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @param name The swatch name. + @return The swatch reference, or a \c NULL swatch reference if no such swatch name is found. + */ + AISwatchRef ASAPI (*GetSwatchByName) (AISwatchListRef list, const ai::UnicodeString& name); + + /** Creates a new swatch and inserts it into a swatch list. + Use \c #SetSwatchName() and \c #SetAIColor() to set the name and + color of the swatch after it has been inserted. + (Note that this function returns an object, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @param index The 0-based position index for the insertion point, disregarding groups. + \li If this is the first position of a named group in the list, the swatch + is inserted into the preceding group. Use \c #AISwatchGroupSuite + to control the group placement explicitly. + \li A value of -1 appends the new swatch at the end of the general + swatches group (group 0). + + The positions of the swatch previously at this index, and of + all succeeding swatches, are incremented. + @return The swatch reference for the new swatch. + */ + AISwatchRef ASAPI (*InsertNthSwatch) (AISwatchListRef list, ai::int32 index); + + /** Removes a swatch specified by index position from a swatch list. If the swatch is + a custom color swatch and it contains the last reference to that global color + in the swatch list, then the custom color is also deleted from the document and + any usages replaced by the equivalent process color. + @param list The swatch list, or \c NULL for the current document's swatch list. + @param index The 0-based position index of the swatch, disregarding groups. + The positions of all succeeding swatches, are decremented. + @return\c #kCantDeleteSwatchErr if the index is out of range. + */ + ASErr ASAPI (*RemoveNthSwatch) (AISwatchListRef list, ai::int32 index); + + /** Retrieves the color definition of a swatch. + @param swatch The swatch reference. + @param aicolor [out] A buffer in which to return the color definition. + Can be any color type supported by Illustrator. + */ + ASErr ASAPI (*GetAIColor) (AISwatchRef swatch, AIColor *aicolor); + + /** Sets the color definition for a swatch. + @param swatch The swatch reference. + @param aicolor The new color definition. Can be any color type supported by Illustrator, + if the type is allowed in the containing swatch group. + @return The error \c #kInvalidSwatchTypeForDest if the color type is not + allowed in the containing swatch group. + */ + ASErr ASAPI (*SetAIColor) (AISwatchRef swatch, AIColor *aicolor); + + /** Retrieves the name of a swatch. + @param swatch The swatch reference. + @param name [out] A buffer in which to return the name string. + */ + ASErr ASAPI (*GetSwatchName) (AISwatchRef swatch, ai::UnicodeString& name); + + /** Sets the name of a swatch. If the swatch identifies a custom color, pattern, or gradient, + also changes the name of the underlying object. + @param swatch The swatch reference. + @param name The new name string.Limit is 31 chars, more than 31 chars will be removed + */ + ASErr ASAPI (*SetSwatchName) (AISwatchRef swatch, const ai::UnicodeString& name); + + /** Retrieves the swatch list for a document. + @param document The document, or \c NULL for the current document. + Use the \c #AIDocumentListSuite or \c #AIPathStyleSuite::ImportStyles() + to obtain a document handle. + @param list [out] A buffer in which to return the swatch list. + */ + ASErr ASAPI (*GetSwatchList) (AIDocumentHandle document, AISwatchListRef *list); + + /** Retrieves the first swatch in a list that uses a specified color. For patterns and gradients, + checks only that the gradient or pattern objects match, does not check that + other parameters such as the gradient matrix also match. For all other types, + checks all color fields. + (Note that this function returns an object, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @param aicolor The color to match. + @return The matching swatch reference. + */ + AISwatchRef ASAPI (*GetSwatchByColor) (AISwatchListRef list, const AIColor *aicolor); + + /** Retrieves the first swatch in a list with a given name and color type. + (Note that this function returns an object, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @param name The color name to match. + @param type The color type to match. + @return The matching swatch reference. + */ + AISwatchRef ASAPI (*GetSwatchByNameAndType) (AISwatchListRef list, const ai::UnicodeString& name, AIColorTag type); + + /** Removes a specific swatch from a swatch list. This is relatively inefficient, because it must search + the entire swatch list for the swatch. If you know the swatch group and index, + and if it is not a custom color or you want to remove custom colors, then + \c #AISwatchGroupSuite::RemoveNthSwatch() is more efficient. + + @param list The swatch list, or \c NULL for the current document's swatch list. + @param swatch The swatch reference. + @param deleteCustomColor When true, and the swatch references a custom color, + also deletes the custom color. In this case, objects that use the color are + converted to process colors. + */ + ASErr ASAPI (*RemoveSwatch) (AISwatchListRef list, AISwatchRef swatch, ASBoolean deleteCustomColor); + +} AISwatchListSuite; + + +// New in AI13 (CS3) + +/** @ingroup Suites + Swatch lists are hierarchically organized into \e swatch \e groups, + which can be named. This suite provides functions to create, access, and manipulate + the groups, and explicitly control the group placement of swatches within the list. + Swatch groups were introduced in Illustrator 13. + + The first group, called the general swatch group, is typically unnamed and can contain + any type of swatch. The first swatch group can be named, but cannot be removed or reordered. + Swatches that are not assigned to a specific group are considered part of the + general swatch group. If no groups have been defined, all swatches are + in this group, whose index is 0. + + Other groups are explicitly created and named, and can restrict the types of + swatches that belong to them. The first such group is at index 1. + + @see \c #AISwatchListSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAISwatchGroupSuite and \c #kAISwatchGroupVersion. + */ +typedef struct { + + /** Reports the number of swatch groups in a swatch list. There is always at + least one, the unnamed general swatch group. + (Note that this function returns an integer value, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @return The number of swatch groups. + */ + ai::int32 ASAPI (*CountSwatchGroups) (AISwatchListRef list); + + /** Retrieves a swatch group from a swatch list. + (Note that this function returns an object value, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @param index The 0-based position index in the list of groups. The first named + group, if any, is at index 1. + @return The swatch group reference. + */ + AISwatchGroupRef (*GetNthSwatchGroup) (AISwatchListRef list, ai::int32 index); + + /** Retrieves a swatch group by name from a swatch list. Group names need not + be unique with a list; if there is more than one matching group, the first one + is returned. + (Note that this function returns an object, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @param name The swatch group name. + @return The swatch group reference, or a \c NULL swatch reference if no such group name is found. + */ + AISwatchGroupRef ASAPI (*GetSwatchGroupByName) (AISwatchListRef list, const ai::UnicodeString& name); + + /** Creates a new swatch group in a swatch list. The new group is initially unnamed and + contains no swatches. Use \c #SetSwatchGroupName() to assign a name, and \c #InsertNthSwatch() + or \c #ReorderSwatchBetweenGroups() to add members. + @param list The swatch list, or \c NULL for the current document's swatch list. + @param groupKind The types of swatches that are allowed in the group. + @param atIndex The group position index at which to insert the group, or -1 to append + it to the current groups. + @param swatchGroup [out] A buffer in which to return the new swatch group object. + @return \c #kBadParameterErr if index is 0. +
\c #kTooManySwatchGroupsErr if there are already + \c #kMaxNumberSwatchGroups in the swatch list. */ + ASErr ASAPI (*NewSwatchGroup) ( AISwatchListRef list, AISwatchGroupKind groupKind, + ai::int32 atIndex, AISwatchGroupRef *newGroup ); + + /** Reports whether a swatch group is in a swatch list. + (Note that this function returns a boolean value, not an error code.) + @param list The swatch list, or \c NULL for the current document's swatch list. + @param swatchGroup The swatch group object. + @param indexFoundAt [out] A buffer in which to return the 0-based index + into the swatch list at which the group was found. + @return True if the group is in the list. + */ + ASBoolean ASAPI (*SwatchGroupIsInList) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ai::int32 *indexFoundAt ); + + /** Removes a swatch group from a swatch list by index position. You cannot remove + the general swatch group (index 0). The index positions of all later groups are decremented. + @param list The swatch list, or \c NULL for the current document's swatch list. + @param index The 0-based index position of the swatch to remove. + @param deleteSwatches When false, moves the member swatches into the general group, + unless a swatch with the same name and definition is already in that group. + When true, deletes the member swatches along with the group. + If a member swatch is a custom color swatch and it contains the last reference + to a global color in the swatch list, the custom color is not deleted from the document. + Use \c #AISwatchGroupSuite::RemoveSwatch() to delete the last reference to a spot color. + @return #kCantDeleteSwatchErr if the index is 0 or greater than + the number of swatch groups, or if the swatch group contains an undeletable swatch. + */ + ASErr ASAPI (*RemoveNthSwatchGroup) (AISwatchListRef list, ai::int32 index, ASBoolean deleteSwatches ); + + /** Removes a specific swatch group from a swatch list. + @param list The swatch list, or \c NULL for the current document's swatch list. + @param swatchGroup The swatch group object. + @param deleteSwatches When false, moves the member swatches into the general group, + unless a swatch with the same name and definition is already in that group. + When true, deletes the member swatches along with the group. + If a member swatch is a custom color swatch and it contains the last reference + to a global color in the swatch list, the custom color is not deleted from the document. + Use \c #AISwatchGroupSuite::RemoveSwatch() to delete the last reference to a spot color. + @return \c #kBadParameterErr if the swatch group is not in the list. + @note This function must search the entire list. If you have the index position of the group, + \c #RemoveNthSwatchGroup () is more efficient. + */ + ASErr ASAPI (*RemoveSwatchGroup) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ASBoolean deleteSwatches); + + /** Changes the position of a swatch group specified by index within a swatch list. + Other group index values change accordingly. You cannot move another group to position 0, or move the general + group to any other position. + @param list The swatch list, or \c NULL for the current document's swatch list. + @param fromIndex The current 0-based position index of the group to move. + @param newIndex The new 0-based position index. + @return \c #kBadParameterErr if either index is 0, or is greater than the number of swatch groups. +
If both index values are 0, returns \c #kNoErr but does nothing. + */ + ASErr ASAPI (*ReorderNthSwatchGroup) (AISwatchListRef list, ai::int32 fromIndex, ai::int32 newIndex ); + + /** Changes the position of a swatch group specified by reference within a swatch list. + Other group index values change accordingly. You cannot move another group to position 0, or move the general + group to any other position. + @param list The swatch list, or \c NULL for the current document's swatch list. + @param swatchGroup The swatch group object. + @param newIndex The new 0-based position index. + @return \c #kBadParameterErr if the new index is 0, or is greater than the number of swatch groups. + or if the group is not in the list, or is the general group. + @note This function must search the entire list. If you have the index position of the group, + \c #ReorderNthSwatchGroup () is more efficient. + */ + ASErr ASAPI (*ReorderSwatchGroup) (AISwatchListRef list, AISwatchGroupRef swatchGroup, ai::int32 newIndex ); + + /** Retrieves the name of a swatch group. + @param swatchGroup The swatch group object. + @param name [out] A buffer in which to return the name string, or the empty + string if no name has been assigned. + */ + ASErr ASAPI (*GetSwatchGroupName) (AISwatchGroupRef swatchGroup, ai::UnicodeString& name); + + /** Sets the name of a swatch group. Group names need not be unique. + @param swatchGroup The swatch group object. + @param name The new name string. + */ + ASErr ASAPI (*SetSwatchGroupName) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name); + + /** Reports what kind of swatches a group can contain. This is set on creation and + cannot be modified. + (Note that this function returns a constant value, not an error code.) + @param swatchGroup The swatch group object. + @return The allowed-swatch-type constant. + */ + AISwatchGroupKind ASAPI (*GetSwatchGroupKind) (AISwatchGroupRef swatchGroup); + + /** Reports whether a swatch group allows colors of a specific type. + (Note that this function returns a boolean value, not an error code.) + @param swatchGroup The swatch group object. + @param colorKind The color type constant. + @return True if the type is allowed. + */ + ASBoolean ASAPI (*AllowsColorKind) (AISwatchGroupRef swatchGroup, AIColorTag colorKind); + + /** Moves a swatch to a new position within a swatch group. + @param swatchGroup The swatch group object. + @param swatch The swatch object. + @param toIndex The new 0-based index position, or -1 to move the swatch to the end of + the group. Other position index values change accordingly. + @return \c #kBadParameterErr if the index is greater than the number of swatches + in the group, or if the swatch is not in the group. + */ + ASErr ASAPI (*ReorderSwatch) (AISwatchGroupRef swatchGroup, AISwatchRef swatch, ai::int32 toIndex ); + + /** Move the swatch at fromIndex to toIndex within the same group. toIndex can be -1 to move to the end. + Returns kBadParameterErr if either fromIndex or toIndex is greater than count-1, or if fromIndex is less than 0. */ + + /** Moves a swatch to a new position within a swatch group. + @param swatchGroup The swatch group object. + @param fromIndex The current 0-based index position of the swatch. + @param toIndex The new 0-based index position, or -1 to move the swatch to the end of + the group. Other position index values change accordingly. + @return \c #kBadParameterErr if either index is greater than the number of swatches + in the group, or if the from index is less than 0. + */ + ASErr ASAPI (*ReorderNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 fromIndex, ai::int32 toIndex ); + + /** Reports the number of swatches in a swatch group. + (Note that this function returns an integer value, not an error code.) + @param swatchGroup The swatch group object. + @return The number of swatches. + */ + ai::int32 ASAPI (*CountSwatches) (AISwatchGroupRef swatchGroup); + + /** Retrieves a swatch from a swatch group by position index. + (Note that this function returns an object value, not an error code.) + @param swatchGroup The swatch group object. + @param index The 0-based position index. + @return The swatch object, or a \c NULL object if the index is invalid. + */ + AISwatchRef ASAPI (*GetNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 index); + + /** Retrieves a swatch from a swatch group by name. + (Note that this function returns an object value, not an error code.) + @param swatchGroup The swatch group object. + @param name The swatch name string. + @return The swatch object, or a \c NULL object if no matching swatch is found. + + */ + AISwatchRef ASAPI (*GetSwatchByName) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name); + + /** Retrieves the first swatch within a swatch group with a specified color. For patterns and + gradients, checks that the gradient or pattern objects match, but does not check that + the other parameters such as the gradient matrix or pattern matrix also match. For all other types, + checks all fields for a match. In particular, spot color and global color swatches check the tint. + (Note that this function returns an object value, not an error code.) + @param swatchGroup The swatch group object. + @param aicolor The color. + @return The swatch object, or a \c NULL object if no matching swatch is found. + */ + AISwatchRef ASAPI (*GetSwatchByColor) (AISwatchGroupRef swatchGroup, const AIColor *aicolor); + + /** Retrieves the first swatch within a swatch group with a given name and color type. + (Note that this function returns an object value, not an error code.) + @param swatchGroup The swatch group object. + @param name The swatch name string. + @param type The color type constant. + @return The swatch object, or a \c NULL object if no matching swatch is found. + */ + AISwatchRef ASAPI (*GetSwatchByNameAndType) (AISwatchGroupRef swatchGroup, const ai::UnicodeString& name, AIColorTag type); + + /** Creates a new swatch and inserts it into a swatch group. + (Note that this function returns an object value, not an error code.) + @param swatchGroup The swatch group object. + @param aicolor The color for the new swatch. + @param index The 0-based index position at which to insert the new swatch, or -1 to + append it to the end of the group. The swatch previously at this index + and all swatches following it in the list are bumped down the list by one position. + @return The new swatch object, or a \c NULL object if the index is invalid, there is not + enough memory, the swatch group already contains \c #kMaxNumberSwatchesPerGroup, + or the swatch type is not allowed for this group. See \c #AISwatchGroupKind. + */ + AISwatchRef ASAPI (*InsertNthSwatch) (AISwatchGroupRef swatchGroup, AIColor *aicolor, ai::int32 index); + + /** Removes a swatch specified by index position from a swatch group. + @param swatchGroup The swatch group object. + @param index The 0-based index position of the swatch in the group. Other swatch + position index values are adjusted accordingly. + @param deleteCustomColor When true, and the swatch is a custom color swatch and + contains the last reference to that custom color in the entire swatch list, + the custom color is also deleted from the document and any usages replaced by + the equivalent process color. +
When false, deletes a custom color only if it is unused. Otherwise, moves + it to the general group. If this is the general group, the swatch is in use, and + this is the only reference in the list, the function returns \c #kCantDeleteSwatchErr. + @param swatchNotUsed When true, global colors are not replaced in the document and are forcefully + deleted. It should be used, if it is already been ensured that the color is not used anywhere. + @return \c #kBadParameterErr if the index is not within the swatch group. +
\c #kCantDeleteSwatchErr if the swatch cannot be deleted for any reason. + */ + ASErr ASAPI (*RemoveNthSwatch) (AISwatchGroupRef swatchGroup, ai::int32 index, ASBoolean deleteCustomColor, bool swatchNotUsed); + + /** Removes a specific swatch from a group. Swatch position index values are adjusted accordingly. + (If the index is known, \c #RemoveNthSwatch() is more efficient.) + @param swatchGroup The swatch group object. + @param swatch The swatch object. + @param deleteCustomColor When true, and the swatch is a custom color swatch and + contains the last reference to that custom color in the entire swatch list, + the custom color is also deleted from the document and any usages replaced by + the equivalent process color. +
When false, deletes a custom color only if it is unused. Otherwise, moves + it to the general group. If this is the general group, the swatch is in use, and + this is the only reference in the list, the function returns \c #kCantDeleteSwatchErr. + @return \c #kBadParameterErr if the swatch is not in the swatch group. +
\c #kCantDeleteSwatchErr if the swatch cannot be deleted for any reason. + */ + ASErr ASAPI (*RemoveSwatch) (AISwatchGroupRef swatchGroup, AISwatchRef swatch, ASBoolean deleteCustomColor); + + /** Retrieves the group of a specific swatch in a swatch list. + Requires an exact match with the swatch object; swatches for the same color and name + are not considered equivalent. + @param list The swatch list, or \c NULL for the current document's swatch list. + @param swatch The swatch object. + @param containingSwatchGroup [out] A buffer in which to return the containing group object, + or a \c NULL object if the swatch is not in the list. + @param groupIndex [out] Optional. A buffer in which to return the 0-based index position + of this group within the list. + @param swatchIndex [out] Optional. A buffer in which to return the 0-based index position + of this swatch within the group. + */ + ASErr ASAPI (*LocateSwatch) (AISwatchListRef list, AISwatchRef swatch, AISwatchGroupRef *containingSwatchGroup, ai::int32 *groupIndex, ai::int32 *swatchIndex); + + /** Moves a swatch from one group to another within the same list. Other index positions within + both groups are adjusted accordingly. + @param fromGroup The group object that currently contains the swatch. + @param fromIndex The 0-based index of the swatch in the current group. + @param toGroup The destination group object. + @param toIndex The 0-based index at which to insert the swatch in the destination group, + or -1 to append it to the end of the group. + @return \c #kBadParameterErr if the source index is less than 0, or if either index is + greater than the number of swatches in its group, or if the two swatch groups are + not in the same swatch list. +
\c #kInvalidSwatchTypeForDest if the swatch is a type that + is not allowed in the destination group. + */ + ASErr ASAPI (*ReorderSwatchBetweenGroups) ( AISwatchGroupRef fromGroup, ai::int32 fromIndex, AISwatchGroupRef toGroup, ai::int32 toIndex ); + + /** Reports whether a swatch group is displayed in the open state (showing swatches) + the next time it is loaded into a palette that is in list view and shows color groups. + This status is saved on behalf of the Swatches palette, so that it can persist while the + document is closed or inactive. + + This preference does not guarantee that the swatches + are visible, even if this swatch group is in the active document, + because the Swatches palette might not show color groups, or might + not be in list view. + (Note that this function returns a boolean value, not an error code.) + @param swatchGroup The swatch group object. + @return True if the swatch group should be open in list view. + */ + ASBoolean ASAPI (*WantsToBeOpenIfInListView) ( AISwatchGroupRef swatchGroup ); + + /** Sets whether a swatch group is displayed in the open state (showing swatches) + the next time it is loaded into a palette that is in list view and shows color groups. + This status is saved on behalf of the Swatches palette, so that it can persist while the + document is closed or inactive. + + If a plug-in other than the Swatches palette changes this value, + it does not, by itself, trigger an update to the Swatches palette. + However, it the change is made at the same time as another change that does + trigger an update, such as adding a new swatch group or a new swatch, + the Swatches palette honors the setting when the swatch group + is next displayed in list view. + @param swatchGroup The swatch group object. + @param whatItWants True to display the group in the open state, false to + display it in the closed state. + @return \c #kBadParameterErr if the no swatch group is supplied. + */ + ASErr ASAPI (*SetWantsToBeOpenIfInListView) ( AISwatchGroupRef swatchGroup, ASBoolean whatItWants ); + +} AISwatchGroupSuite; + + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISymbol.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISymbol.h index 7a2b29a..095667e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISymbol.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AISymbol.h @@ -1,1048 +1,1059 @@ -#ifndef __AISymbol__ -#define __AISymbol__ - -/* - * Name: AISymbol.h - * Author: - * Date: - * Purpose: Adobe Illustrator Symbol Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1990-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AISymbol.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAISymbolSuite "AI Symbol Suite" -#define kAISymbolSuiteVersion7 AIAPI_VERSION(7) -#define kAISymbolSuiteVersion kAISymbolSuiteVersion7 -#define kAISymbolVersion kAISymbolSuiteVersion - -#define kAISymbolPaletteSuite "AI Symbol Palette Suite" -#define kAISymbolPaletteSuiteVersion3 AIAPI_VERSION(3) -#define kAISymbolPaletteSuiteVersion kAISymbolPaletteSuiteVersion3 -#define kAISymbolPaletteVersion kAISymbolPaletteSuiteVersion - - -/** @ingroup Notifiers - Sent when symbols are added, deleted, redefined (including indirectly due to redefinition - of elements used inside the symbol pattern), renamed, sorted or moved in the symbol list. - This message is sent even when the affected symbols are unlisted. - See \c #AISymbolSuite */ -#define kAIArtSymbolSetChangedNotifier "AI Art Symbol Set Changed Notifier" -/** @ingroup Notifiers - Sent after \c #kAIArtSymbolSetChangedNotifier, with the same time stamp. - Provides details of the change. The notify data is an\c #AISymbolSetChangeNotifierData. */ -#define kAIArtSymbolSetDetailedChangeNotifier "AI Art Symbol Set Detailed Change Notifier" -/** @ingroup Notifiers - Sent when symbols are added to, removed from, or reordered in the symbol list. - This message is NOT sent when unlisted symbols are created, deleted or modified, - nor when the definitions or names of symbols are changed, even if they are listed. - See \c #AISymbolSuite */ -#define kAIArtSymbolListChangedNotifier "AI Art Symbol List Changed Notifier" -/** @ingroup Notifiers - Sent when a symbol instance is double-clicked. */ -#define kAIArtSymbolDoubleClickedNotifier "AI Art Symbol Double Clicked Notifier" - -/** Maximum number of real characters in a symbol name. - When retrieving a name, the buffer size should be at least this value + 1. - If it is less, the name is truncated. */ -#define kMaxSymbolNameLength 63 - - -/** @ingroup Errors - Attempt to modify a symbol that is not in the current document. - See \c #AISymbolSuite */ -#define kSymbolNotInCurrentDocument 'SYnD' -/** @ingroup Errors - Symbol definitions cannot contain instances of the symbol being redefined. - See \c #AISymbolSuite */ -#define kCircularSymbolDefinitionErr '@in@' -/** @ingroup Errors - Symbol definitions cannot contain graphs. See \c #AISymbolSuite */ -#define kNoGraphsInSymbolDefErr '#in@' -/** @ingroup Errors - Symbol definitions cannot contain linked (non-embedded) images. - See \c #AISymbolSuite */ -#define kNoLinkedImagesInSymbolDefErr '!%i@' -/** @ingroup Errors -Symbol definitions cannot contain Text and symbol in Perspective. -See \c #AISymbolSuite */ -#define kNoPerspectiveInSymbolDefErr '$in@' -/** @ingroup Errors - Miscellaneous problems with the definition art for symbols. See \c #AISymbolSuite. */ -#define kInvalidSymbolDefErr '!#Sd' -/** @ingroup Errors - Symbol cannot be deleted because it is used in Live Effects. See \c #AISymbolSuite. */ -#define kCantDeleteSymbolUsedInLiveEffectsErr '!Del' - - -/** @ingroup DictKeys - When a plug-in group object is selected and has this key, it is selected - as if it were an instance of the associated symbol. - - To select a specific symbol in the Symbols palette when the plug-in group - is selected (and no instance of a different symbol is also selected): -@code - AIDictionaryRef dictionary=NULL; - sAIArt->GetDictionary(pluginArt, &dictionary); - sAIDictionary->Set(dictionary, - sAIDictionary->Key(kAISymbolToSelectDictKey), - sAIEntry->FromSymbolPattern(myMainSymbol)); - sAIDictionary->Release(dictionary); -@endcode -*/ -#define kAISymbolToSelectDictKey "AISymbolToSelect" - - -/* Types */ -/** The type of symbol change that triggered the notification, - sent in \c #AISymbolSetChangeNotifierData. */ -typedef enum { - kSymbolAdded, - kSymbolDeleted, - kSymbolRenamed, - kSymbolChanged -} AISymbolChangeType; - -/** Bit flags for the search scope in \c #AISymbolSuite::ArtUsesSymbolPattern(). - If none of the first five flags is set, then the only objects that report using - a symbol are actual instances of that symbol. - */ -enum AISymbolSearchScope { - /** Search dictionary of the input art object (that is, inside the - art style definition attached to the root object. */ - kSearchArtDictionary = 0x0001, - /** Search children of groups and other containers. - @note If on, also searches in effect dictionaries in descendants, - regardless of \c #kSearchArtDictionary value. */ - kSearchDescendants = 0x0002, - /** Search styled art and the result groups of plug-in groups. */ - kSearchVisualRepresentation = 0x0004, - /** Search the symbol pattern definitions of any symbol instances. */ - kSearchNestedSymbolPatterns = 0x0008, - /** Search for symbols in effect parameters. */ - kSearchEffectDictionaries = 0x0040, - /** Turns on all previous flags. */ - kSymbolSearchEverywhere = 0x004F, - /** Do not search invisible objects or the edit groups of plug-in groups. */ - kSearchPrintingOnly = 0x0010, - /** Check only for symbols listed in the palette; ignore unlisted ones. */ - kSymbolSearchListedOnly = 0x0020 -}; - -/** Bit flags for the global object usage result from - \c #AISymbolSuite::ArtUsesSymbolPattern(). */ -enum AISymbolGlobalObjectUsage { - /** Used in graph designs. */ - kUsedInGraphDesigns = 0x0001, - /** Used in graph designs that are themselves in use. */ - kUsedInUsedGraphDesigns = 0x0002, - /** Used in the definition of other symbols. */ - kUsedInOtherSymbols = 0x0004, - /** Used in the definition of symbols that are themselves in use. */ - kUsedInUsedSymbols = 0x0008 -}; - -/** Symbol type used when exporting to Flash. - @see \c #AISymbolSuite::SetSymbolExportType(), - \c #AISymbolSuite::GetSymbolExportType() */ -enum AISymbolFlashExportType -{ - /** Corresponds to Graphic Symbol type in Flash. */ - kGraphicType = 0x01, - /** Corresponds to Movie Clip Symbol type in Flash. */ - kMovieClipType = 0x02 -}; - -/** Symbol registration point. - \c #AISymbolSuite::NewSymbolPattern() - \c #AISymbolSuite::NewSymbolPatternFromSel() - \c #AISymbolSuite::NewSymbolPatternFromSelGetBounds()*/ -enum AISymbolRegistrationPoint -{ - kSymbolTopLeftPoint = 0x01, - kSymbolTopMiddlePoint, - kSymbolTopRightPoint, - kSymbolMiddleLeftPoint, - kSymbolCenterPoint, - kSymbolMiddleRightPoint, - kSymbolBottomLeftPoint, - kSymbolBottomMiddlePoint, - kSymbolBottomRightPoint, - kSymbolRegistrationPointUndefined = 0xffffffff -}; - -/** Data sent with \c #kAIArtSymbolSetDetailedChangeNotifier. - Provides details of the change that triggered the previous - \c #kAIArtSymbolSetChangedNotifier. */ -typedef struct { - /** The same time stamp as that of the matching - \c #kAIArtSymbolSetChangedNotifier. */ - size_t timestamp; - /** The number of entries in the \c changedSymbols and - \c changeTypes lists. */ - size_t count; - /** A list of symbols that have changed. */ - AIPatternHandle *changedSymbols; - /** A parallel list of the type of change that occurred - for each symbol in \c changedSymbols. */ - AISymbolChangeType *changeTypes; -} AISymbolSetChangeNotifierData; - -/** Data sent with \c #kAIArtSymbolDoubleClickedNotifier. */ -typedef struct { - /** The symbol art object that was double-clicked. */ - AIArtHandle symbolArt; -} AISymbolInstanceDoubleClickedNotifierData; - -/******************************************************************************* - ** - ** AISymbol Suite - ** - **/ - -/** @ingroup Suites - This suite is always available. The functions allow you to query and manipulate - the symbol patterns and symbol instances in a document. Symbol instances - are art objects of type \c #kSymbolArt, and are associated with a transformation - matrix. - - These notifiers are related to symbols: -
\c #kAIArtSymbolSetChangedNotifier -
\c #kAIArtSymbolSetDetailedChangeNotifier - - These dictionary keys are related to symbols: -
\c #kAISymbolToSelectDictKey - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAISymbolSuite and \c #kAISymbolVersion. - - @section ListedUnlistedSymbols Listed and Unlisted Symbols - - \li Listed symbols appear in the Symbols palette, and are saved when a document - is closed, even if there are no instances of them in the document. They can be considered - public, shared between documents. - - \li Unlisted symbols do not appear in the Symbols palette. When the document - is saved, they are not written out unless there is at least one instance of the symbol - used in the document. Unlisted symbols can be considered private to a specific document. - - Ordering of the global symbol list affects only listed symbols. When you retrieve - unlisted symbols, their order is usually, but not always, that of creation. - The position index is not guaranteed to remain constant between calls. - - Unlisted symbols are intended for instances that are automatically - generated in a context where they are not directly selectable, such as the result group - of a plug-in art object (for instance, the intermediate steps of a blend or the particles - of a particle system), or the styled art of an object with a complex appearance. - They are systematically derived by the plug-in group or a Live Effect from one - or more listed symbols. - - Symbol instances that appear in ordinary selectable contexts should always be - based on listed symbols, but they do not become listed automatically. Any - command that expands objects like plug-in groups or appearances should call - \c #MakeSymbolPatternListed() on any symbols used by instances in the expanded art. - It is not necessary to first call \c #IsSymbolPatternListed(); if the symbol is already - listed, the call does nothing. - - Unlike art styles, for which being unlisted is tied to having an anonymous name - (see \c #AIArtStyleSuite), an unlisted symbol can have any name. When you create - unlisted symbols, you should give names that will make sense if they later become listed, - so that Expand commands do not need to rename them without sufficient context. - To avoid name conflicts, use names that are unlikely to be chosen by a user. - - For example, if a particle system or brush generates unlisted symbols by - tinting listed symbols, it can use names like 'Snowflake autotinted - 10Y' and 'Snowflake autotinted 8C 5M', where Snowflake is the name of the listed - symbol, and the word 'autotinted' is in a string resource that can be - localized. Using 'autotinted' instead of simply 'tinted' decreases - the likelihood that a user would coincidentally assign that name to a listed - symbol. - -*/ -typedef struct { - - /** Counts the number of symbol definitions in the global list for the current document. - Use with \c #GetNthSymbolPattern() to iterate through listed or through listed and - unlisted symbols. - @param count [out] A buffer in which to return the number of symbols. - @param includeUnlisted When true, include unlisted symbols in the count. - When false, count only listed symbols. See @ref ListedUnlistedSymbols. - */ - AIAPI AIErr (*CountSymbolPatterns) ( ai::int32 *count, ASBoolean includeUnlisted ); - - /** Retrieves a symbol pattern from the global list for the current document.Use - with \c #CountSymbolPatterns() to iterate through listed or through listed and - unlisted symbols. - @param n The 0-based position index. - @param symbolPattern [out] A buffer in which to return the symbol reference. - @param includeUnlisted When true, get both listed and unlisted symbols. - When false, get only listed symbols. See @ref ListedUnlistedSymbols. - */ - AIAPI AIErr (*GetNthSymbolPattern) ( ai::int32 n, AIPatternHandle *symbolPattern, ASBoolean includeUnlisted ); - - /** Retrieves a symbol pattern by name from the current document. - @param name The name string. - @param symbolPattern [out] A buffer in which to return the symbol reference, - or a \c NULL object if no such symbol is found. - */ - AIAPI AIErr (*GetSymbolPatternByName) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern ); - - /** Retrieves a symbol pattern by name from a specified document. - @param name The name string. - @param symbolPattern [out] A buffer in which to return the symbol reference, - or a \c NULL object if no such symbol is found. - @param document The document. Use the \c #AIDocumentListSuite - or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. - */ - AIAPI AIErr (*GetSymbolByNameFromDocument) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern, - AIDocumentHandle document ); - - /** Counts the number of symbol definitions in the global list of a specified document. - Use with \c #GetNthSymbolPatternFromDocument() to iterate through listed (public) symbols. - @param count [out] A buffer in which to return the number of symbols. - @param document The document. Use the \c #AIDocumentListSuite - or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. - */ - AIAPI AIErr (*CountSymbolPatternsFromDocument) ( ai::int32* count, AIDocumentHandle document ); - - /** Retrieves a symbol pattern from the global list for a specified document. - Use with \c #CountSymbolPatternsFromDocument() to iterate through listed (public) symbols. - @param n The 0-based position index. - @param symbolPattern [out] A buffer in which to return the symbol reference. - @param document The document. Use the \c #AIDocumentListSuite - or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. - */ - AIAPI AIErr (*GetNthSymbolPatternFromDocument) ( ai::int32 n, AIPatternHandle *symbolPattern, - AIDocumentHandle document ); - - /** Creates a new symbol definition from specified source art, which is copied as - the defining art for the new symbol. - @param newSymbolPattern [out] A buffer in which to return the new symbol reference. - @param definitionArt The source art, or \c NULL to create a symbol whose definition - is an empty group. - @param registrationPoint The registration point of the new symbol pattern. - @param transformDefinitionArt True to move the registration point of the new symbol pattern to the canvas origin. - @param unlisted When true, make the new symbol unlisted. Use \c #SetSymbolPatternName() - to name unlisted symbols. See @ref ListedUnlistedSymbols. - */ - AIAPI AIErr (*NewSymbolPattern) ( AIPatternHandle *newSymbolPattern, AIArtHandle definitionArt, AISymbolRegistrationPoint registrationPoint, ASBoolean transformDefinitionArt, ASBoolean unlisted ); - - /** Creates a new listed symbol definition from selected art, which is copied as the - defining art for the new symbol. If no art is selected, creates a symbol - whose definition is an empty group. - @param symbolPattern [out] A buffer in which to return the new symbol reference. - @param registrationPoint The registration point of the new symbol pattern. - */ - AIAPI AIErr (*NewSymbolPatternFromSel) ( AIPatternHandle *symbolPattern , AISymbolRegistrationPoint registrationPoint); - - /** Creates a new listed symbol definition from selected art, which is copied as the - defining art for the new symbol, and reports the bounds of the selected art. - (You cannot call \c #AIArtSuite::GetArtBounds() for the symbol pattern art after - defining it, because the definition art is copied and moved.) Use to insert an - instance of the new symbol in place of the selection. - @param symbolPattern [out] A buffer in which to return the new symbol reference. - @param selectionBounds [out] A buffer in which to return the bounding box - of the selected art. - @param registrationPoint The registration point of the new symbol pattern. - */ - AIAPI AIErr (*NewSymbolPatternFromSelGetBounds) ( AIPatternHandle *symbolPattern, AIRealRect *selectionBounds , AISymbolRegistrationPoint registrationPoint); - - /** Deletes a symbol definition. - @param symbolPattern The symbol reference. - - @return The error \c #kCantDeleteSymbolUsedInLiveEffectsErr if the symbol pattern is used in a Live Effect. - The error \c #kBadParameterErr if NULL is passed. - */ - AIAPI AIErr (*DeleteSymbolPattern) ( AIPatternHandle symbolPattern ); - - /** Reports whether a symbol is still known to the system. A symbol reference can - change if you retain it between message. To ensure a valid reference, get - the reference from the \c #kAIArtSymbolSetChangedNotifier.
- (Note that this function returns a Boolean value, not an error code.) - @param symbolPatter The symbol reference. - @return True if the symbol is a valid reference. - */ - AIAPI AIBoolean (*ValidateSymbolPattern) ( AIPatternHandle symbolPattern ); - - - // Functions for examining and modifying a symbol definition - - /** Retrieves a read-only handle to the definition art of a symbol. You can examine or - duplicate the returned art, but cannot edit it. - @param pattern The symbol pattern reference. - @param art [out] A buffer in which to return the definition art. - */ - AIAPI AIErr (*GetSymbolPatternArt) ( AIPatternHandle pattern, AIArtHandle *art ); - - /** Creates a copy of a symbol pattern's definition artwork and places it - into the current document at the center of the current view, at the current - layer and using the current insertion mode. It is the equivalent of using - a simple Paste command. - @param symbolPattern The symbol pattern reference. - @return The error \c #kUntouchableLayerErr if the current layer or - current insertion group is locked or hidden. - @see \c #AIPatternSuite::GetPattern() - @note To get an editable copy of a symbol, it is better to use - \c #AIDictionarySuite::NewArtEntry() to create a group that - is not in the artwork tree, insert the definition copy into that - using \c #CopySymbolPatternArt(), and then delete the dictionary entry. - This avoids modifying the art tree and triggering unneeded synchronization - and change notifications. This technique is often used by export filters - to make systematic adjustments to Illustrator art before converting - it to an easy-to-export form. - */ - AIAPI AIErr (*PasteSymbolPatternArt) ( AIPatternHandle symbolPattern ); - - /** Creates a copy of a symbol pattern's definition artwork and places it - into the current document at a specified place in the paint order. - @param symbolPattern The symbol pattern reference. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] Optional. A buffer in which to return the new art object. - */ - AIAPI AIErr (*CopySymbolPatternArt) ( AIPatternHandle symbolPattern, - ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Creates a copy of source art and makes it the defining art for a symbol. Updates - any existing instances of the symbol. - @param symbolPattern The symbol pattern reference. - @param definitionArt The source art. - @param transformDefinitionArt True to move the registration point of the symbol pattern to the canvas origin. - */ - AIAPI AIErr (*SetSymbolPatternArt) ( AIPatternHandle symbolPattern, AIArtHandle definitionArt , ASBoolean transformDefinationArt); - - /** Copies selected art and makes it the defining art for a symbol. Updates - any existing instances of the symbol. - @param symbolPattern The symbol pattern reference. - @see \c #AIPatternSuite::SetPattern() - */ - AIAPI AIErr (*SetSymbolPatternFromSel) ( AIPatternHandle symbolPattern ); - - - // The functions below use C strings. If you have or want Pascal strings, you can - // also get and set the name of a symbol using GetPatternName and SetPatternName - // from AIPattern.h. - - /** Retrieves the name of a symbol. - @param symbolPattern The symbol pattern reference. - @param name [out] A buffer in which to return the name string. Truncates - a name that is too long to fit in the buffer. - @return \c #kNameTooLongErr error if the name was truncated. - */ - AIAPI AIErr (*GetSymbolPatternName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name ); - - /** Sets the name of a symbol. - @param name The new name string. - @return \c #kNameTooLongErr error if the name length exceeds \c #kMaxSymbolNameLength. -
\c #kInvalidNameErr error if the name contains illegal characters, - is of zero length, or consists entirely of spaces. -
\c #kNameInUseErr if the name is already used for another symbol. -
In any error case, the symbol name remains unchanged. - @see \c #SetSymbolPatternBaseName() - */ - AIAPI AIErr (*SetSymbolPatternName) ( AIPatternHandle symbolPattern, const ai::UnicodeString& name ); - - /** Strips any hidden characters from the end of a symbol name to create - a displayable string. - @param name [in, out] The symbol name string, which is modified in place. - */ - AIAPI AIErr (*GetSymbolPatternDisplayName) ( ai::UnicodeString& name ); - - /** Sets the name of a symbol, appending numbers to a name string that is - already in use to make it unique. If the name string is very long, - it can be truncated before the numbers are appended. - @param symbolPattern The symbol pattern reference. - @param name The new name string. - */ - AIAPI AIErr (*SetSymbolPatternBaseName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name ); - - /** Creates a new symbol instance in the center of the current document view. - @param symbolPattern The symbol pattern reference. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new instance, - an art object of type \c #kSymbolArt. - @return \c #kBadParameterErr error if there are no symbols defined - in the current document. - */ - AIAPI AIErr (*NewInstanceCenteredInView) ( AIPatternHandle symbolPattern, - ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Creates a new symbol instance with its center at a specified location. - @param symbolPattern The symbol pattern reference. - @param center The location, in page coordinates. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new instance, - an art object of type \c #kSymbolArt. - @return \c #kBadParameterErr error if there are no symbols defined - in the current document. - */ - AIAPI AIErr (*NewInstanceAtLocation) ( AIPatternHandle symbolPattern, AIRealPoint center, - ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Creates a new symbol instance with a specified transformation matrix. - @param symbolPattern The symbol pattern reference. - @param transform The transformation matrix. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new instance, - an art object of type \c #kSymbolArt. - @return \c #kBadParameterErr error if there are no symbols defined - in the current document. - */ - AIAPI AIErr (*NewInstanceWithTransform) ( AIPatternHandle symbolPattern, AIRealMatrix *transform, - ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Retrieves the symbol pattern definition of a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param symbolPattern [out] A buffer in which to return the symbol pattern reference. - */ - AIAPI AIErr (*GetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle *symbolPattern ); - - /** Sets the symbol pattern definition of a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param symbolPattern The symbol pattern reference. - */ - AIAPI AIErr (*SetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle symbolPattern ); - - /** Retrieves the transformation matrix that Illustrator uses to transform specified symbol art - into a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param transform [out] A buffer in which to return the transformation matrix. - @see \c #AIHardSoftSuite for a discussion of coordinate systems. - @note Use \c #AIHardSoftSuite::AIRealMatrixRealSoft() and - \c #AIHardSoftSuite::AIRealMatrixRealHard() to translate between - the hard and soft forms of the matrix (\e not - \c #AIHardSoftSuite::AIRealMatrixHarden() and - \c #AIHardSoftSuite::AIRealMatrixSoften(), which affect - only the tx ty components). - */ - AIAPI AIErr (*GetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Sets the application transformation matrix for a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param transform The new transformation matrix. - @see \c #GetHardTransformOfSymbolArt() - */ - AIAPI AIErr (*SetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Retrieves the transformation matrix that a plug-in can use to transform to transform - specified symbol art into a symbol instance (using the \c #AITransformArtSuite). - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param transform [out] A buffer in which to return the transformation matrix. - @see \c #AIHardSoftSuite for a discussion of coordinate systems. - */ - AIAPI AIErr (*GetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Sets the plug-in transformation matrix for a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param transform The new transformation matrix. - @see \c #GetSoftTransformOfSymbolArt() - */ - AIAPI AIErr (*SetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Expands a symbol instance and places the resulting art into the artwork tree. - The function preserves the appearance, not the editability, of the symbol - definition. - \li If the instance transformation matrix is a simple placement matrix, - this is equivalent to \c #BreakLinkToSymbol(). - \li If the matrix includes a scale, rotation, shear, or reflection, - the function expands any appearances or plug-in groups inside - the symbol definition, then applies the matrix. - \li If the matrix includes a shear or a non-uniform scale, the function - expands strokes before applying the matrix. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - This object is not deleted. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param expandedArt [out] Optional. A buffer in which to return the new art object. - */ - AIAPI AIErr (*InsertExpandedSymbolArt) ( AIArtHandle symbolArt, - ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); - - /** Reports whether a symbol definition is listed in the current document. - If the symbol belongs to a different document, it will return false - even if the symbol is listed in the document to which it belongs. - See @ref ListedUnlistedSymbols for the definition of listed and unlisted symbols.
- (Note that this function returns a Boolean value, not an error code.) - @param symbolPattern The symbol pattern reference. - @return True if the symbol pattern is listed in the current document. - */ - AIAPI AIBoolean (*IsSymbolPatternListed) ( AIPatternHandle symbolPattern ); - - /** Makes a symbol definition, which must be in the symbol set of the current document, listed. - See @ref ListedUnlistedSymbols. - @param symbolPattern The symbol pattern reference. - */ - AIAPI AIErr (*MakeSymbolPatternListed) ( AIPatternHandle symbolPattern ); - - /** Makes a symbol definition unlisted. See @ref ListedUnlistedSymbols. - @param symbolPattern The symbol pattern reference. - */ - AIAPI AIErr (*UnlistSymbolPattern) ( AIPatternHandle symbolPattern ); - - /** Sorts the listed symbols in the global list of symbols, alphabetically by name. - See @ref ListedUnlistedSymbols. - */ - AIAPI AIErr (*SortListedSymbolPatterns) ( void ); - - /** Moves a listed symbol to a specific index position in the global list of symbols. - Increments the position of the symbol previously at that index, and of all - subsequent listed symbols. See @ref ListedUnlistedSymbols. - @param symbolPattern The symbol pattern reference. - @param index The new 0-based index position, or -1 to move to the - end of the list. - */ - AIAPI AIErr (*MoveSymbolPatternInList) ( AIPatternHandle symbolPattern, int index ); - - /** Reports whether an art object uses a specified symbol in a specified way.
- (Note that this function returns a Boolean value, not an error code.) - @param art The art object, or \c NULL to search the entire artwork tree. - In this case, the search includes descendants regardless of the - value of the \c #kSearchDescendants flag. - @param searchScope The scope of the search, a logical OR of \c #AISymbolSearchScope - bit flags. - @param targetSymbol The symbol reference, or \c NULL to search for any symbol. - @param oneFoundSymbol [out] Optional. When \c targetSymbol is \c NULL, a buffer - in which to return a single matching symbol found within the search scope, - or \c NULL if more than one matching symbol is found. - - @note \c oneFoundSymbol is used by the Symbols palette to decide which symbol to select. - If an object uses multiple symbols, nothing is selected. The scope for this - type of usage should not include \c #kSearchNestedSymbolPatterns. For example, if - symbol A's definition includes symbol B, and the user selects an instance of - symbol A, symbol A should be selected in the palette. If the user selects - a particle set containing instances of both symbol A and symbol B, - neither symbol should be selected in the palette. - - @param allFoundSymbols [out] Optional. When \c targetSymbol is \c NULL, a buffer - in which to return the handle of an array of matching symbols, of size \c foundCount. - This memory is allocated by the function, and you must free it using - \c #AIMdMemorySuite::MdMemoryDisposeHandle(). - - If no art object is specified, you can still specify the output array. This is how - the "Select All Unused" command in the Symbols palette is implemented. - - If an art object is specified, use this array to examine patterns - that are referenced by a plug-in group that puts multiple symbols in its dictionary, - such as a particle set. - @param foundCount [out] When \c targetSymbol is \c NULL, a buffer in which to - return the size of the \c allFoundSymbols array. - @param globalObjectUsage Not implemented. - @return True if any matching symbols are found. - */ - AIAPI AIBoolean (*ArtUsesSymbolPattern) ( AIArtHandle art, ai::int16 searchScope, AIPatternHandle targetSymbol, - AIPatternHandle *oneFoundSymbol, - AIPatternHandle ***allFoundSymbols, int *foundCount, - int *globalObjectUsage); - - /** Creates a copy of a symbol's definition artwork, transforms it - using the matrix of a symbol instance, and places it into the - current document at a specified place in the paint order. Transfers - attributes from the symbol instance to the transformed art. - - Does not do any internal expansion of strokes, active styles or plug-in groups - inside the symbol definition, even when a rotational or shear transform is applied. - Preserves the full structure and editability of the symbol definition, - at the cost of sometimes not preserving the appearance of the instance. - - This is the equivalent of calling \c #CopySymbolPatternArt() and then performing - the transformation using the \c #AITransformArtSuite, but is more efficient. - If the instance matrix is a simple placement matrix, this is equivalent to - \c #InsertExpandedSymbolArt(). - - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - This object is not deleted. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param expandedArt [out] Optional. A buffer in which to return the new art object. - */ - AIAPI AIErr (*BreakLinkToSymbol) ( AIArtHandle symbolArt, - ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); - - /** Retargets a symbol pattern, fill pattern, or brush pattern for the current document. - Creates a new pattern if needed, with the same definition art and a unique name based on - the source pattern's name. All other global objects (colors, patterns, brushes, styles, - and so on) used indirectly in the definition are similarly retargeted, using - an existing object if one matches and creating a new one otherwise. - - The new pattern is made listed in the current document if it was listed in the source - document, and made unlisted in the current document if it was unlisted in the source - document. In this context, a listed symbol never matches an unlisted one, even if it has - the same name and definition. - - Use for drag-and-drop between library palettes and the main document palette. - @param srcPattern A symbol pattern, fill pattern, or brush pattern reference. - @param dstPattern [out] A buffer in which to return the new pattern, or - an existing pattern in the current document with the same name and definition, - or the source pattern if it was already in the current document. - - @note Fill patterns are usually retargeted indirectly using the - \c #AIPathStyleSuite, and brush patterns using the \c #AIObjectSetSuite. - @see \c #AIPatternSuite, \c #AIObjectSetSuite::RetargetForCurrentDocument(), - \c #AIPathStyleSuite::RetargetForCurrentDoc(), \c #RetargetForCurrentDocumentAsUnlisted() - */ - AIAPI AIErr (*RetargetForCurrentDocument) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern ); - - // New for Illustrator 11: - - /** Creates a copy of a symbol pattern's definition artwork, converts it to outline - using specified options, and places the result into the current document - at a specified place in the paint order. - @param symbolPattern The symbol pattern reference. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] Optional. A buffer in which to return the new art object, or - a \c NULL object if no outline can be generated. - @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: -
\c #kOutlineExpandAppearance -
\c #kOutlineEliminateUnpainted -
\c #kOutlineAddStrokes -
\c #kOutlineSubtractStrokes -
\c #kOutlineAlwaysIncludeFillArea -
\c #kOutlineAlwaysStrokeStraightLines - */ - AIAPI AIErr (*CopySymbolPatternOutline) ( AIPatternHandle symbolPattern, - ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt, ai::int32 convertToOutlineOptions ); - - /** Expands a symbol definition, outlines the symbol definition, applies the instance - transformation to the outlined definition art. and finally places the transformed - outline art into the artwork tree. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - This object is not deleted. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param expandedArt [out] Optional. A buffer in which to return result art. - @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: -
\c #kOutlineExpandAppearance -
\c #kOutlineEliminateUnpainted -
\c #kOutlineAddStrokes -
\c #kOutlineSubtractStrokes -
\c #kOutlineAlwaysIncludeFillArea -
\c #kOutlineAlwaysStrokeStraightLines - @see \c #InsertExpandedSymbolArt() - */ - AIAPI AIErr (*InsertSymbolArtOutline) ( AIArtHandle symbolArt, - ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *expandedArt, ai::int32 convertToOutlineOptions ); - - /** Retrieves a cached outline for a symbol pattern, if one has been generated for a given - set of conversion options. You can examine or duplicate the returned outline art, but cannot edit it. - @param symbolPattern The symbol pattern reference. - @param outlineArt [out] A buffer in which to return the cached outline art, or \c NULL - if no cached outline has been generated for the given options. - @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: -
\c #kOutlineExpandAppearance -
\c #kOutlineEliminateUnpainted -
\c #kOutlineAddStrokes -
\c #kOutlineSubtractStrokes -
\c #kOutlineAlwaysIncludeFillArea -
\c #kOutlineAlwaysStrokeStraightLines - */ - AIAPI AIErr (*PeekCachedPatternOutline) ( AIPatternHandle symbolPattern, AIArtHandle *outlineArt, ai::int32 convertToOutlineOptions ); - - // New for Illustrator 13: - - /** Sets a symbol definition from selected art, and reports the bounds of the selected art. - @param symbolPattern The symbol pattern reference. - @param selectionBounds [out] Optional. A buffer in which to return the bounding box - of the selected art. - @see \c #NewSymbolPatternFromSelGetBounds. - */ - AIAPI AIErr (*SetSymbolPatternFromSelGetBounds) ( AIPatternHandle symbolPattern, AIRealRect *selectionBounds ); - - - /** Sets the symbol export type for a symbol pattern, to use when exporting the - symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param exportType The Flash export type. - */ - AIAPI AIErr (*SetSymbolExportType) ( AIPatternHandle symbolPattern, AISymbolFlashExportType exportType); - - /** Retrieves the symbol export type for a symbol pattern, used when exporting the symbol - to Flash. - @param symbolPattern The symbol pattern reference. - @param exportType [out] The Flash export type. - */ - AIAPI AIErr (*GetSymbolExportType) ( AIPatternHandle symbolPattern, AISymbolFlashExportType *exportType); - - - /** Sets the symbol "Enable guides for 9-slice scaling" option for a symbol pattern, - to use when exporting the symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param enableGuides True to turn 9-slice scaling on, false to turn it off. - */ - AIAPI AIErr (*SetSymbolEnableGuides) ( AIPatternHandle symbolPattern, AIBoolean enableGuides); - - /** Retrieves the symbol "Enable guides for 9-slice scaling" option for a symbol pattern, - used when exporting the symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param enableGuides [out] A buffer in which to return true if - 9-slice scaling is on, false if it is off. - */ - AIAPI AIErr (*GetSymbolEnableGuides) ( AIPatternHandle symbolPattern, AIBoolean *enableGuides); - - /** Sets the symbol scaling grid for 9-slice scaling for a symbol pattern, - to be used when exporting the symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param slice9Grid The rectangular area of the center slice. - */ - AIAPI AIErr (*SetSymbol9SliceGrid) ( AIPatternHandle symbolPattern, AIRealRect slice9Grid); - - /** Retrieves the symbol scaling grid for 9-slice scaling for a symbol pattern, - used when exporting the symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param slice9Grid [out] A buffer in which to return the rectangular area of the center slice. - */ - AIAPI AIErr (*GetSymbol9SliceGrid) ( AIPatternHandle symbolPattern, AIRealRect *slice9Grid); - - // Symbol editing workflow (new in AI13/CS3) - - /** Starts an editing session for a symbol pattern. - - Invokes isolation mode on a copy of the prototype of the pattern, and places the - copy on the artboard. If a symbol art is specified, the copy is placed in the same - location as the symbol instance, hiding the original. Otherwise, the copy is placed in the - center of the artboard. - - You can start nested editing sessions for nested symbols. - - Editing changes are signaled with \c #AILayerList::kAIIsolationModeChangedNotifier - and \c #AILayerList::kAIBeforeIsolationModeChangedNotifier. Use \c #ValidateSymbolEditingArt() - to validate the art being edited. - - @post Use \c #EndEditingSymbolDefinition() to end the editing session, optionally updating - the symbol pattern's prototype with the changes in the copy before returning it to - the artboard. - - @post Use \c #ExitSymbolEditMode() to force all symbol editing sessions to end without - saving any changes. - - @param symbolPattern The symbol pattern reference. - @param symbolArt Optional. A symbol art object whose definition needs to be edited. - - @return May return #AIIsolationMode::kCantIsolateFromCurrentModeErr - */ - AIAPI AIErr (*SetEditingSymbolDefinition) ( AIPatternHandle symbolPattern, AIArtHandle symbolArt); - - /** Ends an editing session for a symbol pattern, allowing you to apply or discard the changes - made during the session. The corresponding symbol instance that was hidden when - setting the symbol in edit mode is made visible. - @param symbolPattern The symbol pattern reference. - @param updateSymbol True to apply the edits to the pattern, false to discard the editing - changes and restore the original symbol pattern. - @pre \c #SetEditingSymbolDefinition() - */ - AIAPI AIErr (*EndEditingSymbolDefinition) ( AIPatternHandle symbolPattern, AIBoolean updateSymbol); - - /** Reports whether symbol edit mode is active.
- (Note that this function returns a Boolean value, not an error code.) - @return True if at least one symbol pattern is being edited, false otherwise. - */ - AIAPI AIBoolean (*GetSymbolEditMode) (); - - /** Ends all current symbol editing sessions, restoring the original symbol pattern - prototypes to the artboard and discarding all changes made while editing. - - To save any changes, and to restore the per-symbol editing state information, - use \c #EndEditingSymbolDefinition() for each symbol being edited. - @pre \c #SetEditingSymbolDefinition() - */ - AIAPI AIErr (*ExitSymbolEditMode) ( ); - - /** Reports whether a symbol pattern is currently being edited.
- (Note that this function returns a Boolean value, not an error code.) - @param symbolPattern The symbol pattern reference. - @return True if at the symbol pattern is being edited, false otherwise. - */ - AIAPI AIBoolean (*EditingSymbolPattern) (AIPatternHandle symbolPattern); - - /** Reports whether an art object represents the prototype of a symbol pattern that is - currently being edited, and if true, optionally returns the pattern being edited. - @param art The art object reference. - @param symbolPattern [out] Optional. A buffer in which to return the symbol pattern. - @return True if the art object does represent the prototype of a symbol pattern that is - currently being edited, false otherwise. - */ - AIAPI AIBoolean (*IsSymbolEditingArtType) ( AIArtHandle art, AIPatternHandle *symbolPattern); - - /** Validates the editing art object that represents the prototype of a - symbol pattern that is being edited. - The editing art could become invalid due to operations such as duplicate or delete. - If the symbol pattern's editing art is not a valid art object, looks under the parent - for an art object whose state represents the editing art of the given symbol pattern, - and sets it as the valid editing art. If there is no valid art object under the parent, - creates an empty group and sets it as the valid editing art. - - Use this in response to the \c #AILayerList::kAIBeforeIsolationModeChangedNotifier, - with the information received by calling \c #AIIsolationModeSuite::GetIsolatedArtAndParents(). - @param symbolPattern The symbol pattern reference. - @param editingArtParent Parent object that contains the editing art. - */ - AIAPI AIErr (*ValidateSymbolEditingArt) ( AIPatternHandle symbolPattern, AIArtHandle editingArtParent); - - /** Sets the Pixel Perfect status for a symbol and its instances. - @param symbolPattern The symbol pattern reference. - @param isPixelPerfect True to make the symbol and its instances Pixel Perfect, false otherwise. - */ - AIAPI AIErr (*SetSymbolPixelPerfect) ( AIPatternHandle symbolPattern, AIBoolean isPixelPerfect); - - /** Retrieves a symbol's Pixel Perfect status. - @param symbolPattern The symbol pattern reference. - @param isPixelPerfect [out] A buffer in which to return true if the symbol is Pixel Perfect, false otherwise. - */ - AIAPI AIErr (*GetSymbolEnablePixelPerfect) ( AIPatternHandle symbolPattern, AIBoolean* isPixelPerfect); - - /** Reports whether symbol art is scaled with 9-slice scaling. Not all instances - of a symbol pattern that has 9-slice scaling guides actually use 9-slice scaling. - For example, an instance can have no scaling. - @param symbolArt [in] The symbol instance, an art object of type \c #kSymbolArt. - @param is9SliceScaled [out] A buffer in which to return true if the symbol art is scaled with 9-slice scaling. - */ - - AIAPI AIErr (*IsSymbolArt9SliceScaled) (AIArtHandle symbolArt, AIBoolean* is9SliceScaled); - - /** Retargets a symbol pattern, fill pattern, or brush pattern for the current document. - Creates a new pattern if needed, with the same definition art and a unique name based on - the source pattern's name. All other global objects (colors, patterns, brushes, styles, - and so on) used indirectly in the definition are similarly retargeted, using - an existing object if one matches and creating a new one otherwise. - - The new pattern is NOT made listed in the current document, even if it was listed in the source - document. - - Use this function when the source symbol is in a document that is being used - as a content resource to support an effect, such as 3D Bevels or Arrowheads, where - you might want the symbols to be visible in the Symbols panel of the resource document, but - not in the Symbols panel of the documents where the effect is in use. - - This differs from first calling \c #RetargetForCurrentDocument() and then \c #UnlistSymbolPattern() - in that \c #RetargetForCurrentDocument() causes a \c #kAIArtSymbolListChangedNotifier to be sent, - and this function does not, thereby circumventing any notification to clients who care only - about changes to listed symbols. - - @param srcPattern A symbol pattern, fill pattern, or brush pattern reference. - @param dstPattern [out] A buffer in which to return the new pattern, or - an existing pattern in the current document with the same name and definition, - or the source pattern if it was already in the current document. - - @note Fill patterns are usually retargeted indirectly using the - \c #AIPathStyleSuite, and brush patterns using the \c #AIObjectSetSuite. - @see \c #AIPatternSuite, \c #AIObjectSetSuite::RetargetForCurrentDocument(), - \c #AIPathStyleSuite::RetargetForCurrentDoc() - */ - AIAPI AIErr (*RetargetForCurrentDocumentAsUnlisted) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern ); - -} AISymbolSuite; - - -/******************************************************************************* - ** - ** AISymbolPalette suite - ** - **/ - - -/** @ingroup Suites - These functions access and manipulate the currency and selection state - of symbols. The suite is exported by the Symbols palette, which is not a - required plug-in, so it can be unavailable. Selection and currency of - symbols is not otherwise supported. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAISymbolPaletteSuite and \c #kAISymbolPaletteVersion. - */ -typedef struct { - /** Retrieves the current symbol. - @param symbolPattern [out] A buffer in which to return the symbol reference. - */ - AIAPI AIErr (*GetCurrentSymbol) ( AIPatternHandle *symbolPattern ); - - /** Makes a symbol current. - @param symbolPattern The symbol reference. - */ - AIAPI AIErr (*SetCurrentSymbol) ( AIPatternHandle symbolPattern ); - - /** Reports the selection state of a symbol.
- (Note that this function returns a Boolean value, not an error code.) - @param symbolPattern The symbol reference. - @return True if the symbol is selected. - */ - AIAPI AIBoolean (*IsSymbolSelected) ( AIPatternHandle symbolPattern ); - - /** Counts selected symbols. Use with \c #GetNthSelectedSymbol() to - iterate through selected symbols.
- (Note that this function returns a numeric value, not an error code.) - @return The number of selected symbols. - */ - AIAPI ai::int32 (*CountSelectedSymbols) ( void ); - - /** Retrieves a selected symbol by position index. Use with - \c #CountSelectedSymbols() to iterate through selected symbols. - @param n The 0-based position index. - @param symbolPattern [out] A buffer in which to return the symbol reference. - */ - AIAPI AIErr (*GetNthSelectedSymbol) ( ai::int32 n, AIPatternHandle *symbolPattern ); - - /** Reports whether the Symbol palette is visible.
- (Note that this function returns a Boolean value, not an error code.) - @return True if the Symbol palette is shown. - */ - AIAPI AIBoolean (*IsPaletteVisible) ( void ); -} AISymbolPaletteSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AISymbol__ +#define __AISymbol__ + +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 1990 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIPathStyle__ +#include "AIPathStyle.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AISymbol.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAISymbolSuite "AI Symbol Suite" +#define kAISymbolSuiteVersion8 AIAPI_VERSION(8) +#define kAISymbolSuiteVersion kAISymbolSuiteVersion8 +#define kAISymbolVersion kAISymbolSuiteVersion + +#define kAISymbolPaletteSuite "AI Symbol Palette Suite" +#define kAISymbolPaletteSuiteVersion3 AIAPI_VERSION(3) +#define kAISymbolPaletteSuiteVersion kAISymbolPaletteSuiteVersion3 +#define kAISymbolPaletteVersion kAISymbolPaletteSuiteVersion + + +/** @ingroup Notifiers + Sent when symbols are added, deleted, redefined (including indirectly due to redefinition + of elements used inside the symbol pattern), renamed, sorted or moved in the symbol list. + This message is sent even when the affected symbols are unlisted. + See \c #AISymbolSuite */ +#define kAIArtSymbolSetChangedNotifier "AI Art Symbol Set Changed Notifier" +/** @ingroup Notifiers + Sent after \c #kAIArtSymbolSetChangedNotifier, with the same time stamp. + Provides details of the change. The notify data is an\c #AISymbolSetChangeNotifierData. */ +#define kAIArtSymbolSetDetailedChangeNotifier "AI Art Symbol Set Detailed Change Notifier" +/** @ingroup Notifiers + Sent when symbols are added to, removed from, or reordered in the symbol list. + This message is NOT sent when unlisted symbols are created, deleted or modified, + nor when the definitions or names of symbols are changed, even if they are listed. + See \c #AISymbolSuite */ +#define kAIArtSymbolListChangedNotifier "AI Art Symbol List Changed Notifier" +/** @ingroup Notifiers + Sent when a symbol instance is double-clicked. */ +#define kAIArtSymbolDoubleClickedNotifier "AI Art Symbol Double Clicked Notifier" + +/** Maximum number of real characters in a symbol name. + When retrieving a name, the buffer size should be at least this value + 1. + If it is less, the name is truncated. */ +#define kMaxSymbolNameLength 63 + + +/** @ingroup Errors + Attempt to modify a symbol that is not in the current document. + See \c #AISymbolSuite */ +#define kSymbolNotInCurrentDocument 'SYnD' +/** @ingroup Errors + Symbol definitions cannot contain instances of the symbol being redefined. + See \c #AISymbolSuite */ +#define kCircularSymbolDefinitionErr '@in@' +/** @ingroup Errors + Symbol definitions cannot contain graphs. See \c #AISymbolSuite */ +#define kNoGraphsInSymbolDefErr '#in@' +/** @ingroup Errors + Symbol definitions cannot contain linked (non-embedded) images. + See \c #AISymbolSuite */ +#define kNoLinkedImagesInSymbolDefErr '!%i@' +/** @ingroup Errors +Symbol definitions cannot contain Text and symbol in Perspective. +See \c #AISymbolSuite */ +#define kNoPerspectiveInSymbolDefErr '$in@' +/** @ingroup Errors + Miscellaneous problems with the definition art for symbols. See \c #AISymbolSuite. */ +#define kInvalidSymbolDefErr '!#Sd' +/** @ingroup Errors + Symbol cannot be deleted because it is used in Live Effects. See \c #AISymbolSuite. */ +#define kCantDeleteSymbolUsedInLiveEffectsErr '!Del' + + +/** @ingroup DictKeys + When a plug-in group object is selected and has this key, it is selected + as if it were an instance of the associated symbol. + + To select a specific symbol in the Symbols palette when the plug-in group + is selected (and no instance of a different symbol is also selected): +@code + AIDictionaryRef dictionary=NULL; + sAIArt->GetDictionary(pluginArt, &dictionary); + sAIDictionary->Set(dictionary, + sAIDictionary->Key(kAISymbolToSelectDictKey), + sAIEntry->FromSymbolPattern(myMainSymbol)); + sAIDictionary->Release(dictionary); +@endcode +*/ +#define kAISymbolToSelectDictKey "AISymbolToSelect" + + +/* Types */ +/** The type of symbol change that triggered the notification, + sent in \c #AISymbolSetChangeNotifierData. */ +typedef enum { + kSymbolAdded, + kSymbolDeleted, + kSymbolRenamed, + kSymbolChanged +} AISymbolChangeType; + +/** Bit flags for the search scope in \c #AISymbolSuite::ArtUsesSymbolPattern(). + If none of the first five flags is set, then the only objects that report using + a symbol are actual instances of that symbol. + */ +enum AISymbolSearchScope { + /** Search dictionary of the input art object (that is, inside the + art style definition attached to the root object. */ + kSearchArtDictionary = 0x0001, + /** Search children of groups and other containers. + @note If on, also searches in effect dictionaries in descendants, + regardless of \c #kSearchArtDictionary value. */ + kSearchDescendants = 0x0002, + /** Search styled art and the result groups of plug-in groups. */ + kSearchVisualRepresentation = 0x0004, + /** Search the symbol pattern definitions of any symbol instances. */ + kSearchNestedSymbolPatterns = 0x0008, + /** Search for symbols in effect parameters. */ + kSearchEffectDictionaries = 0x0040, + /** Turns on all previous flags. */ + kSymbolSearchEverywhere = 0x004F, + /** Do not search invisible objects or the edit groups of plug-in groups. */ + kSearchPrintingOnly = 0x0010, + /** Check only for symbols listed in the palette; ignore unlisted ones. */ + kSymbolSearchListedOnly = 0x0020 +}; + +/** Bit flags for the global object usage result from + \c #AISymbolSuite::ArtUsesSymbolPattern(). */ +enum AISymbolGlobalObjectUsage { + /** Used in graph designs. */ + kUsedInGraphDesigns = 0x0001, + /** Used in graph designs that are themselves in use. */ + kUsedInUsedGraphDesigns = 0x0002, + /** Used in the definition of other symbols. */ + kUsedInOtherSymbols = 0x0004, + /** Used in the definition of symbols that are themselves in use. */ + kUsedInUsedSymbols = 0x0008 +}; + +/** Symbol type used when exporting to Flash. + @see \c #AISymbolSuite::SetSymbolExportType(), + \c #AISymbolSuite::GetSymbolExportType() */ +enum AISymbolFlashExportType +{ + /** Corresponds to Graphic Symbol type in Flash. */ + kGraphicType = 0x01, + /** Corresponds to Movie Clip Symbol type in Flash. */ + kMovieClipType = 0x02 +}; + +/** Symbol registration point. + \c #AISymbolSuite::NewSymbolPattern() + \c #AISymbolSuite::NewSymbolPatternFromSel() + \c #AISymbolSuite::NewSymbolPatternFromSelGetBounds()*/ +enum AISymbolRegistrationPoint +{ + kSymbolTopLeftPoint = 0x01, + kSymbolTopMiddlePoint, + kSymbolTopRightPoint, + kSymbolMiddleLeftPoint, + kSymbolCenterPoint, + kSymbolMiddleRightPoint, + kSymbolBottomLeftPoint, + kSymbolBottomMiddlePoint, + kSymbolBottomRightPoint, + kSymbolRegistrationPointUndefined = 0xffffffff +}; + +/** Data sent with \c #kAIArtSymbolSetDetailedChangeNotifier. + Provides details of the change that triggered the previous + \c #kAIArtSymbolSetChangedNotifier. */ +typedef struct { + /** The same time stamp as that of the matching + \c #kAIArtSymbolSetChangedNotifier. */ + size_t timestamp; + /** The number of entries in the \c changedSymbols and + \c changeTypes lists. */ + size_t count; + /** A list of symbols that have changed. */ + AIPatternHandle *changedSymbols; + /** A parallel list of the type of change that occurred + for each symbol in \c changedSymbols. */ + AISymbolChangeType *changeTypes; +} AISymbolSetChangeNotifierData; + +/** Data sent with \c #kAIArtSymbolDoubleClickedNotifier. */ +typedef struct { + /** The symbol art object that was double-clicked. */ + AIArtHandle symbolArt; +} AISymbolInstanceDoubleClickedNotifierData; + +enum SymbolDeleteChoice +{ + kExpandInstances, + kDeleteInstances +}; +/******************************************************************************* + ** + ** AISymbol Suite + ** + **/ + +/** @ingroup Suites + This suite is always available. The functions allow you to query and manipulate + the symbol patterns and symbol instances in a document. Symbol instances + are art objects of type \c #kSymbolArt, and are associated with a transformation + matrix. + + These notifiers are related to symbols: +
\c #kAIArtSymbolSetChangedNotifier +
\c #kAIArtSymbolSetDetailedChangeNotifier + + These dictionary keys are related to symbols: +
\c #kAISymbolToSelectDictKey + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAISymbolSuite and \c #kAISymbolVersion. + + @section ListedUnlistedSymbols Listed and Unlisted Symbols + + \li Listed symbols appear in the Symbols palette, and are saved when a document + is closed, even if there are no instances of them in the document. They can be considered + public, shared between documents. + + \li Unlisted symbols do not appear in the Symbols palette. When the document + is saved, they are not written out unless there is at least one instance of the symbol + used in the document. Unlisted symbols can be considered private to a specific document. + + Ordering of the global symbol list affects only listed symbols. When you retrieve + unlisted symbols, their order is usually, but not always, that of creation. + The position index is not guaranteed to remain constant between calls. + + Unlisted symbols are intended for instances that are automatically + generated in a context where they are not directly selectable, such as the result group + of a plug-in art object (for instance, the intermediate steps of a blend or the particles + of a particle system), or the styled art of an object with a complex appearance. + They are systematically derived by the plug-in group or a Live Effect from one + or more listed symbols. + + Symbol instances that appear in ordinary selectable contexts should always be + based on listed symbols, but they do not become listed automatically. Any + command that expands objects like plug-in groups or appearances should call + \c #MakeSymbolPatternListed() on any symbols used by instances in the expanded art. + It is not necessary to first call \c #IsSymbolPatternListed(); if the symbol is already + listed, the call does nothing. + + Unlike art styles, for which being unlisted is tied to having an anonymous name + (see \c #AIArtStyleSuite), an unlisted symbol can have any name. When you create + unlisted symbols, you should give names that will make sense if they later become listed, + so that Expand commands do not need to rename them without sufficient context. + To avoid name conflicts, use names that are unlikely to be chosen by a user. + + For example, if a particle system or brush generates unlisted symbols by + tinting listed symbols, it can use names like 'Snowflake autotinted + 10Y' and 'Snowflake autotinted 8C 5M', where Snowflake is the name of the listed + symbol, and the word 'autotinted' is in a string resource that can be + localized. Using 'autotinted' instead of simply 'tinted' decreases + the likelihood that a user would coincidentally assign that name to a listed + symbol. + +*/ +typedef struct { + + /** Counts the number of symbol definitions in the global list for the current document. + Use with \c #GetNthSymbolPattern() to iterate through listed or through listed and + unlisted symbols. + @param count [out] A buffer in which to return the number of symbols. + @param includeUnlisted When true, include unlisted symbols in the count. + When false, count only listed symbols. See @ref ListedUnlistedSymbols. + */ + AIAPI AIErr (*CountSymbolPatterns) ( ai::int32 *count, ASBoolean includeUnlisted ); + + /** Retrieves a symbol pattern from the global list for the current document.Use + with \c #CountSymbolPatterns() to iterate through listed or through listed and + unlisted symbols. + @param n The 0-based position index. + @param symbolPattern [out] A buffer in which to return the symbol reference. + @param includeUnlisted When true, get both listed and unlisted symbols. + When false, get only listed symbols. See @ref ListedUnlistedSymbols. + */ + AIAPI AIErr (*GetNthSymbolPattern) ( ai::int32 n, AIPatternHandle *symbolPattern, ASBoolean includeUnlisted ); + + /** Retrieves a symbol pattern by name from the current document. + @param name The name string. + @param symbolPattern [out] A buffer in which to return the symbol reference, + or a \c NULL object if no such symbol is found. + */ + AIAPI AIErr (*GetSymbolPatternByName) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern ); + + /** Retrieves a symbol pattern by name from a specified document. + @param name The name string. + @param symbolPattern [out] A buffer in which to return the symbol reference, + or a \c NULL object if no such symbol is found. + @param document The document. Use the \c #AIDocumentListSuite + or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. + */ + AIAPI AIErr (*GetSymbolByNameFromDocument) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern, + AIDocumentHandle document ); + + /** Counts the number of symbol definitions in the global list of a specified document. + Use with \c #GetNthSymbolPatternFromDocument() to iterate through listed (public) symbols. + @param count [out] A buffer in which to return the number of symbols. + @param document The document. Use the \c #AIDocumentListSuite + or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. + */ + AIAPI AIErr (*CountSymbolPatternsFromDocument) ( ai::int32* count, AIDocumentHandle document ); + + /** Retrieves a symbol pattern from the global list for a specified document. + Use with \c #CountSymbolPatternsFromDocument() to iterate through listed (public) symbols. + @param n The 0-based position index. + @param symbolPattern [out] A buffer in which to return the symbol reference. + @param document The document. Use the \c #AIDocumentListSuite + or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. + */ + AIAPI AIErr (*GetNthSymbolPatternFromDocument) ( ai::int32 n, AIPatternHandle *symbolPattern, + AIDocumentHandle document ); + + /** Creates a new symbol definition from specified source art, which is copied as + the defining art for the new symbol. + @param newSymbolPattern [out] A buffer in which to return the new symbol reference. + @param definitionArt The source art, or \c NULL to create a symbol whose definition + is an empty group. + @param registrationPoint The registration point of the new symbol pattern. + @param transformDefinitionArt True to move the registration point of the new symbol pattern to the canvas origin. + @param unlisted When true, make the new symbol unlisted. Use \c #SetSymbolPatternName() + to name unlisted symbols. See @ref ListedUnlistedSymbols. + */ + AIAPI AIErr (*NewSymbolPattern) ( AIPatternHandle *newSymbolPattern, AIArtHandle definitionArt, AISymbolRegistrationPoint registrationPoint, ASBoolean transformDefinitionArt, ASBoolean unlisted ); + + /** Creates a new listed symbol definition from selected art, which is copied as the + defining art for the new symbol. If no art is selected, creates a symbol + whose definition is an empty group. + @param symbolPattern [out] A buffer in which to return the new symbol reference. + @param registrationPoint The registration point of the new symbol pattern. + */ + AIAPI AIErr (*NewSymbolPatternFromSel) ( AIPatternHandle *symbolPattern , AISymbolRegistrationPoint registrationPoint); + + /** Creates a new listed symbol definition from selected art, which is copied as the + defining art for the new symbol, and reports the bounds of the selected art. + (You cannot call \c #AIArtSuite::GetArtBounds() for the symbol pattern art after + defining it, because the definition art is copied and moved.) Use to insert an + instance of the new symbol in place of the selection. + @param symbolPattern [out] A buffer in which to return the new symbol reference. + @param selectionBounds [out] A buffer in which to return the bounding box + of the selected art. + @param registrationPoint The registration point of the new symbol pattern. + */ + AIAPI AIErr (*NewSymbolPatternFromSelGetBounds) ( AIPatternHandle *symbolPattern, AIRealRect *selectionBounds , AISymbolRegistrationPoint registrationPoint); + + /** Deletes a symbol definition. + @param symbolPattern The symbol reference. + + @return The error \c #kCantDeleteSymbolUsedInLiveEffectsErr if the symbol pattern is used in a Live Effect. + The error \c #kBadParameterErr if NULL is passed. + */ + AIAPI AIErr (*DeleteSymbolPattern) ( AIPatternHandle symbolPattern ); + + /** Reports whether a symbol is still known to the system. A symbol reference can + change if you retain it between message. To ensure a valid reference, get + the reference from the \c #kAIArtSymbolSetChangedNotifier.
+ (Note that this function returns a Boolean value, not an error code.) + @param symbolPatter The symbol reference. + @return True if the symbol is a valid reference. + */ + AIAPI AIBoolean (*ValidateSymbolPattern) ( AIPatternHandle symbolPattern ); + + + // Functions for examining and modifying a symbol definition + + /** Retrieves a read-only handle to the definition art of a symbol. You can examine or + duplicate the returned art, but cannot edit it. + @param pattern The symbol pattern reference. + @param art [out] A buffer in which to return the definition art. + */ + AIAPI AIErr (*GetSymbolPatternArt) ( AIPatternHandle pattern, AIArtHandle *art ); + + /** Creates a copy of a symbol pattern's definition artwork and places it + into the current document at the center of the current view, at the current + layer and using the current insertion mode. It is the equivalent of using + a simple Paste command. + @param symbolPattern The symbol pattern reference. + @return The error \c #kUntouchableLayerErr if the current layer or + current insertion group is locked or hidden. + @see \c #AIPatternSuite::GetPattern() + @note To get an editable copy of a symbol, it is better to use + \c #AIDictionarySuite::NewArtEntry() to create a group that + is not in the artwork tree, insert the definition copy into that + using \c #CopySymbolPatternArt(), and then delete the dictionary entry. + This avoids modifying the art tree and triggering unneeded synchronization + and change notifications. This technique is often used by export filters + to make systematic adjustments to Illustrator art before converting + it to an easy-to-export form. + */ + AIAPI AIErr (*PasteSymbolPatternArt) ( AIPatternHandle symbolPattern ); + + /** Creates a copy of a symbol pattern's definition artwork and places it + into the current document at a specified place in the paint order. + @param symbolPattern The symbol pattern reference. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param newArt [out] Optional. A buffer in which to return the new art object. + */ + AIAPI AIErr (*CopySymbolPatternArt) ( AIPatternHandle symbolPattern, + ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); + + /** Creates a copy of source art and makes it the defining art for a symbol. Updates + any existing instances of the symbol. + @param symbolPattern The symbol pattern reference. + @param definitionArt The source art. + @param transformDefinitionArt True to move the registration point of the symbol pattern to the canvas origin. + */ + AIAPI AIErr (*SetSymbolPatternArt) ( AIPatternHandle symbolPattern, AIArtHandle definitionArt , ASBoolean transformDefinationArt); + + /** Copies selected art and makes it the defining art for a symbol. Updates + any existing instances of the symbol. + @param symbolPattern The symbol pattern reference. + @see \c #AIPatternSuite::SetPattern() + */ + AIAPI AIErr (*SetSymbolPatternFromSel) ( AIPatternHandle symbolPattern ); + + + // The functions below use C strings. If you have or want Pascal strings, you can + // also get and set the name of a symbol using GetPatternName and SetPatternName + // from AIPattern.h. + + /** Retrieves the name of a symbol. + @param symbolPattern The symbol pattern reference. + @param name [out] A buffer in which to return the name string. Truncates + a name that is too long to fit in the buffer. + @return \c #kNameTooLongErr error if the name was truncated. + */ + AIAPI AIErr (*GetSymbolPatternName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name ); + + /** Sets the name of a symbol. + @param name The new name string. + @return \c #kNameTooLongErr error if the name length exceeds \c #kMaxSymbolNameLength. +
\c #kInvalidNameErr error if the name contains illegal characters, + is of zero length, or consists entirely of spaces. +
\c #kNameInUseErr if the name is already used for another symbol. +
In any error case, the symbol name remains unchanged. + @see \c #SetSymbolPatternBaseName() + */ + AIAPI AIErr (*SetSymbolPatternName) ( AIPatternHandle symbolPattern, const ai::UnicodeString& name ); + + /** Strips any hidden characters from the end of a symbol name to create + a displayable string. + @param name [in, out] The symbol name string, which is modified in place. + */ + AIAPI AIErr (*GetSymbolPatternDisplayName) ( ai::UnicodeString& name ); + + /** Sets the name of a symbol, appending numbers to a name string that is + already in use to make it unique. If the name string is very long, + it can be truncated before the numbers are appended. + @param symbolPattern The symbol pattern reference. + @param name The new name string. + */ + AIAPI AIErr (*SetSymbolPatternBaseName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name ); + + /** Creates a new symbol instance in the center of the current document view. + @param symbolPattern The symbol pattern reference. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param newArt [out] A buffer in which to return the new instance, + an art object of type \c #kSymbolArt. + @return \c #kBadParameterErr error if there are no symbols defined + in the current document. + */ + AIAPI AIErr (*NewInstanceCenteredInView) ( AIPatternHandle symbolPattern, + ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); + + /** Creates a new symbol instance with its center at a specified location. + @param symbolPattern The symbol pattern reference. + @param center The location, in page coordinates. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param newArt [out] A buffer in which to return the new instance, + an art object of type \c #kSymbolArt. + @return \c #kBadParameterErr error if there are no symbols defined + in the current document. + */ + AIAPI AIErr (*NewInstanceAtLocation) ( AIPatternHandle symbolPattern, AIRealPoint center, + ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); + + /** Creates a new symbol instance with a specified transformation matrix. + @param symbolPattern The symbol pattern reference. + @param transform The transformation matrix. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param newArt [out] A buffer in which to return the new instance, + an art object of type \c #kSymbolArt. + @return \c #kBadParameterErr error if there are no symbols defined + in the current document. + */ + AIAPI AIErr (*NewInstanceWithTransform) ( AIPatternHandle symbolPattern, AIRealMatrix *transform, + ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt ); + + /** Retrieves the symbol pattern definition of a symbol instance. + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + @param symbolPattern [out] A buffer in which to return the symbol pattern reference. + */ + AIAPI AIErr (*GetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle *symbolPattern ); + + /** Sets the symbol pattern definition of a symbol instance. + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + @param symbolPattern The symbol pattern reference. + */ + AIAPI AIErr (*SetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle symbolPattern ); + + /** Retrieves the transformation matrix that Illustrator uses to transform specified symbol art + into a symbol instance. + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + @param transform [out] A buffer in which to return the transformation matrix. + @see \c #AIHardSoftSuite for a discussion of coordinate systems. + @note Use \c #AIHardSoftSuite::AIRealMatrixRealSoft() and + \c #AIHardSoftSuite::AIRealMatrixRealHard() to translate between + the hard and soft forms of the matrix (\e not + \c #AIHardSoftSuite::AIRealMatrixHarden() and + \c #AIHardSoftSuite::AIRealMatrixSoften(), which affect + only the tx ty components). + */ + AIAPI AIErr (*GetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); + + /** Sets the application transformation matrix for a symbol instance. + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + @param transform The new transformation matrix. + @see \c #GetHardTransformOfSymbolArt() + */ + AIAPI AIErr (*SetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); + + /** Retrieves the transformation matrix that a plug-in can use to transform to transform + specified symbol art into a symbol instance (using the \c #AITransformArtSuite). + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + @param transform [out] A buffer in which to return the transformation matrix. + @see \c #AIHardSoftSuite for a discussion of coordinate systems. + */ + AIAPI AIErr (*GetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); + + /** Sets the plug-in transformation matrix for a symbol instance. + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + @param transform The new transformation matrix. + @see \c #GetSoftTransformOfSymbolArt() + */ + AIAPI AIErr (*SetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); + + /** Expands a symbol instance and places the resulting art into the artwork tree. + The function preserves the appearance, not the editability, of the symbol + definition. + \li If the instance transformation matrix is a simple placement matrix, + this is equivalent to \c #BreakLinkToSymbol(). + \li If the matrix includes a scale, rotation, shear, or reflection, + the function expands any appearances or plug-in groups inside + the symbol definition, then applies the matrix. + \li If the matrix includes a shear or a non-uniform scale, the function + expands strokes before applying the matrix. + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + This object is not deleted. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param expandedArt [out] Optional. A buffer in which to return the new art object. + */ + AIAPI AIErr (*InsertExpandedSymbolArt) ( AIArtHandle symbolArt, + ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); + + /** Reports whether a symbol definition is listed in the current document. + If the symbol belongs to a different document, it will return false + even if the symbol is listed in the document to which it belongs. + See @ref ListedUnlistedSymbols for the definition of listed and unlisted symbols.
+ (Note that this function returns a Boolean value, not an error code.) + @param symbolPattern The symbol pattern reference. + @return True if the symbol pattern is listed in the current document. + */ + AIAPI AIBoolean (*IsSymbolPatternListed) ( AIPatternHandle symbolPattern ); + + /** Makes a symbol definition, which must be in the symbol set of the current document, listed. + See @ref ListedUnlistedSymbols. + @param symbolPattern The symbol pattern reference. + */ + AIAPI AIErr (*MakeSymbolPatternListed) ( AIPatternHandle symbolPattern ); + + /** Makes a symbol definition unlisted. See @ref ListedUnlistedSymbols. + @param symbolPattern The symbol pattern reference. + */ + AIAPI AIErr (*UnlistSymbolPattern) ( AIPatternHandle symbolPattern ); + + /** Sorts the listed symbols in the global list of symbols, alphabetically by name. + See @ref ListedUnlistedSymbols. + */ + AIAPI AIErr (*SortListedSymbolPatterns) ( void ); + + /** Moves a listed symbol to a specific index position in the global list of symbols. + Increments the position of the symbol previously at that index, and of all + subsequent listed symbols. See @ref ListedUnlistedSymbols. + @param symbolPattern The symbol pattern reference. + @param index The new 0-based index position, or -1 to move to the + end of the list. + */ + AIAPI AIErr (*MoveSymbolPatternInList) ( AIPatternHandle symbolPattern, int index ); + + /** Reports whether an art object uses a specified symbol in a specified way.
+ (Note that this function returns a Boolean value, not an error code.) + @param art The art object, or \c NULL to search the entire artwork tree. + In this case, the search includes descendants regardless of the + value of the \c #kSearchDescendants flag. + @param searchScope The scope of the search, a logical OR of \c #AISymbolSearchScope + bit flags. + @param targetSymbol The symbol reference, or \c NULL to search for any symbol. + @param oneFoundSymbol [out] Optional. When \c targetSymbol is \c NULL, a buffer + in which to return a single matching symbol found within the search scope, + or \c NULL if more than one matching symbol is found. + + @note \c oneFoundSymbol is used by the Symbols palette to decide which symbol to select. + If an object uses multiple symbols, nothing is selected. The scope for this + type of usage should not include \c #kSearchNestedSymbolPatterns. For example, if + symbol A's definition includes symbol B, and the user selects an instance of + symbol A, symbol A should be selected in the palette. If the user selects + a particle set containing instances of both symbol A and symbol B, + neither symbol should be selected in the palette. + + @param allFoundSymbols [out] Optional. When \c targetSymbol is \c NULL, a buffer + in which to return the handle of an array of matching symbols, of size \c foundCount. + This memory is allocated by the function, and you must free it using + \c #AIMdMemorySuite::MdMemoryDisposeHandle(). + + If no art object is specified, you can still specify the output array. This is how + the "Select All Unused" command in the Symbols palette is implemented. + + If an art object is specified, use this array to examine patterns + that are referenced by a plug-in group that puts multiple symbols in its dictionary, + such as a particle set. + @param foundCount [out] When \c targetSymbol is \c NULL, a buffer in which to + return the size of the \c allFoundSymbols array. + @param globalObjectUsage Not implemented. + @return True if any matching symbols are found. + */ + AIAPI AIBoolean (*ArtUsesSymbolPattern) ( AIArtHandle art, ai::int16 searchScope, AIPatternHandle targetSymbol, + AIPatternHandle *oneFoundSymbol, + AIPatternHandle ***allFoundSymbols, int *foundCount, + int *globalObjectUsage); + + /** Creates a copy of a symbol's definition artwork, transforms it + using the matrix of a symbol instance, and places it into the + current document at a specified place in the paint order. Transfers + attributes from the symbol instance to the transformed art. + + Does not do any internal expansion of strokes, active styles or plug-in groups + inside the symbol definition, even when a rotational or shear transform is applied. + Preserves the full structure and editability of the symbol definition, + at the cost of sometimes not preserving the appearance of the instance. + + This is the equivalent of calling \c #CopySymbolPatternArt() and then performing + the transformation using the \c #AITransformArtSuite, but is more efficient. + If the instance matrix is a simple placement matrix, this is equivalent to + \c #InsertExpandedSymbolArt(). + + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + This object is not deleted. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param expandedArt [out] Optional. A buffer in which to return the new art object. + */ + AIAPI AIErr (*BreakLinkToSymbol) ( AIArtHandle symbolArt, + ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); + + /** Retargets a symbol pattern, fill pattern, or brush pattern for the current document. + Creates a new pattern if needed, with the same definition art and a unique name based on + the source pattern's name. All other global objects (colors, patterns, brushes, styles, + and so on) used indirectly in the definition are similarly retargeted, using + an existing object if one matches and creating a new one otherwise. + + The new pattern is made listed in the current document if it was listed in the source + document, and made unlisted in the current document if it was unlisted in the source + document. In this context, a listed symbol never matches an unlisted one, even if it has + the same name and definition. + + Use for drag-and-drop between library palettes and the main document palette. + @param srcPattern A symbol pattern, fill pattern, or brush pattern reference. + @param dstPattern [out] A buffer in which to return the new pattern, or + an existing pattern in the current document with the same name and definition, + or the source pattern if it was already in the current document. + + @note Fill patterns are usually retargeted indirectly using the + \c #AIPathStyleSuite, and brush patterns using the \c #AIObjectSetSuite. + @see \c #AIPatternSuite, \c #AIObjectSetSuite::RetargetForCurrentDocument(), + \c #AIPathStyleSuite::RetargetForCurrentDoc(), \c #RetargetForCurrentDocumentAsUnlisted() + */ + AIAPI AIErr (*RetargetForCurrentDocument) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern ); + + // New for Illustrator 11: + + /** Creates a copy of a symbol pattern's definition artwork, converts it to outline + using specified options, and places the result into the current document + at a specified place in the paint order. + @param symbolPattern The symbol pattern reference. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param newArt [out] Optional. A buffer in which to return the new art object, or + a \c NULL object if no outline can be generated. + @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: +
\c #kOutlineExpandAppearance +
\c #kOutlineEliminateUnpainted +
\c #kOutlineAddStrokes +
\c #kOutlineSubtractStrokes +
\c #kOutlineAlwaysIncludeFillArea +
\c #kOutlineAlwaysStrokeStraightLines + */ + AIAPI AIErr (*CopySymbolPatternOutline) ( AIPatternHandle symbolPattern, + ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt, ai::int32 convertToOutlineOptions ); + + /** Expands a symbol definition, outlines the symbol definition, applies the instance + transformation to the outlined definition art. and finally places the transformed + outline art into the artwork tree. + @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. + This object is not deleted. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param expandedArt [out] Optional. A buffer in which to return result art. + @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: +
\c #kOutlineExpandAppearance +
\c #kOutlineEliminateUnpainted +
\c #kOutlineAddStrokes +
\c #kOutlineSubtractStrokes +
\c #kOutlineAlwaysIncludeFillArea +
\c #kOutlineAlwaysStrokeStraightLines + @see \c #InsertExpandedSymbolArt() + */ + AIAPI AIErr (*InsertSymbolArtOutline) ( AIArtHandle symbolArt, + ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *expandedArt, ai::int32 convertToOutlineOptions ); + + /** Retrieves a cached outline for a symbol pattern, if one has been generated for a given + set of conversion options. You can examine or duplicate the returned outline art, but cannot edit it. + @param symbolPattern The symbol pattern reference. + @param outlineArt [out] A buffer in which to return the cached outline art, or \c NULL + if no cached outline has been generated for the given options. + @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: +
\c #kOutlineExpandAppearance +
\c #kOutlineEliminateUnpainted +
\c #kOutlineAddStrokes +
\c #kOutlineSubtractStrokes +
\c #kOutlineAlwaysIncludeFillArea +
\c #kOutlineAlwaysStrokeStraightLines + */ + AIAPI AIErr (*PeekCachedPatternOutline) ( AIPatternHandle symbolPattern, AIArtHandle *outlineArt, ai::int32 convertToOutlineOptions ); + + // New for Illustrator 13: + + /** Sets a symbol definition from selected art, and reports the bounds of the selected art. + @param symbolPattern The symbol pattern reference. + @param selectionBounds [out] Optional. A buffer in which to return the bounding box + of the selected art. + @see \c #NewSymbolPatternFromSelGetBounds. + */ + AIAPI AIErr (*SetSymbolPatternFromSelGetBounds) ( AIPatternHandle symbolPattern, AIRealRect *selectionBounds ); + + + /** Sets the symbol export type for a symbol pattern, to use when exporting the + symbol to Flash. + @param symbolPattern The symbol pattern reference. + @param exportType The Flash export type. + */ + AIAPI AIErr (*SetSymbolExportType) ( AIPatternHandle symbolPattern, AISymbolFlashExportType exportType); + + /** Retrieves the symbol export type for a symbol pattern, used when exporting the symbol + to Flash. + @param symbolPattern The symbol pattern reference. + @param exportType [out] The Flash export type. + */ + AIAPI AIErr (*GetSymbolExportType) ( AIPatternHandle symbolPattern, AISymbolFlashExportType *exportType); + + + /** Sets the symbol "Enable guides for 9-slice scaling" option for a symbol pattern, + to use when exporting the symbol to Flash. + @param symbolPattern The symbol pattern reference. + @param enableGuides True to turn 9-slice scaling on, false to turn it off. + */ + AIAPI AIErr (*SetSymbolEnableGuides) ( AIPatternHandle symbolPattern, AIBoolean enableGuides); + + /** Retrieves the symbol "Enable guides for 9-slice scaling" option for a symbol pattern, + used when exporting the symbol to Flash. + @param symbolPattern The symbol pattern reference. + @param enableGuides [out] A buffer in which to return true if + 9-slice scaling is on, false if it is off. + */ + AIAPI AIErr (*GetSymbolEnableGuides) ( AIPatternHandle symbolPattern, AIBoolean *enableGuides); + + /** Sets the symbol scaling grid for 9-slice scaling for a symbol pattern, + to be used when exporting the symbol to Flash. + @param symbolPattern The symbol pattern reference. + @param slice9Grid The rectangular area of the center slice. + */ + AIAPI AIErr (*SetSymbol9SliceGrid) ( AIPatternHandle symbolPattern, AIRealRect slice9Grid); + + /** Retrieves the symbol scaling grid for 9-slice scaling for a symbol pattern, + used when exporting the symbol to Flash. + @param symbolPattern The symbol pattern reference. + @param slice9Grid [out] A buffer in which to return the rectangular area of the center slice. + */ + AIAPI AIErr (*GetSymbol9SliceGrid) ( AIPatternHandle symbolPattern, AIRealRect *slice9Grid); + + // Symbol editing workflow (new in AI13/CS3) + + /** Starts an editing session for a symbol pattern. + + Invokes isolation mode on a copy of the prototype of the pattern, and places the + copy on the artboard. If a symbol art is specified, the copy is placed in the same + location as the symbol instance, hiding the original. Otherwise, the copy is placed in the + center of the artboard. + + You can start nested editing sessions for nested symbols. + + Editing changes are signaled with \c #AILayerList::kAIIsolationModeChangedNotifier + and \c #AILayerList::kAIBeforeIsolationModeChangedNotifier. Use \c #ValidateSymbolEditingArt() + to validate the art being edited. + + @post Use \c #EndEditingSymbolDefinition() to end the editing session, optionally updating + the symbol pattern's prototype with the changes in the copy before returning it to + the artboard. + + @post Use \c #ExitSymbolEditMode() to force all symbol editing sessions to end without + saving any changes. + + @param symbolPattern The symbol pattern reference. + @param symbolArt Optional. A symbol art object whose definition needs to be edited. + + @return May return #AIIsolationMode::kCantIsolateFromCurrentModeErr + */ + AIAPI AIErr (*SetEditingSymbolDefinition) ( AIPatternHandle symbolPattern, AIArtHandle symbolArt); + + /** Ends an editing session for a symbol pattern, allowing you to apply or discard the changes + made during the session. The corresponding symbol instance that was hidden when + setting the symbol in edit mode is made visible. + @param symbolPattern The symbol pattern reference. + @param updateSymbol True to apply the edits to the pattern, false to discard the editing + changes and restore the original symbol pattern. + @pre \c #SetEditingSymbolDefinition() + */ + AIAPI AIErr (*EndEditingSymbolDefinition) ( AIPatternHandle symbolPattern, AIBoolean updateSymbol); + + /** Reports whether symbol edit mode is active.
+ (Note that this function returns a Boolean value, not an error code.) + @return True if at least one symbol pattern is being edited, false otherwise. + */ + AIAPI AIBoolean (*GetSymbolEditMode) (); + + /** Ends all current symbol editing sessions, restoring the original symbol pattern + prototypes to the artboard and discarding all changes made while editing. + + To save any changes, and to restore the per-symbol editing state information, + use \c #EndEditingSymbolDefinition() for each symbol being edited. + @pre \c #SetEditingSymbolDefinition() + */ + AIAPI AIErr (*ExitSymbolEditMode) ( ); + + /** Reports whether a symbol pattern is currently being edited.
+ (Note that this function returns a Boolean value, not an error code.) + @param symbolPattern The symbol pattern reference. + @return True if at the symbol pattern is being edited, false otherwise. + */ + AIAPI AIBoolean (*EditingSymbolPattern) (AIPatternHandle symbolPattern); + + /** Reports whether an art object represents the prototype of a symbol pattern that is + currently being edited, and if true, optionally returns the pattern being edited. + @param art The art object reference. + @param symbolPattern [out] Optional. A buffer in which to return the symbol pattern. + @return True if the art object does represent the prototype of a symbol pattern that is + currently being edited, false otherwise. + */ + AIAPI AIBoolean (*IsSymbolEditingArtType) ( AIArtHandle art, AIPatternHandle *symbolPattern); + + /** Validates the editing art object that represents the prototype of a + symbol pattern that is being edited. + The editing art could become invalid due to operations such as duplicate or delete. + If the symbol pattern's editing art is not a valid art object, looks under the parent + for an art object whose state represents the editing art of the given symbol pattern, + and sets it as the valid editing art. If there is no valid art object under the parent, + creates an empty group and sets it as the valid editing art. + + Use this in response to the \c #AILayerList::kAIBeforeIsolationModeChangedNotifier, + with the information received by calling \c #AIIsolationModeSuite::GetIsolatedArtAndParents(). + @param symbolPattern The symbol pattern reference. + @param editingArtParent Parent object that contains the editing art. + */ + AIAPI AIErr (*ValidateSymbolEditingArt) ( AIPatternHandle symbolPattern, AIArtHandle editingArtParent); + + /** Sets the Pixel Perfect status for a symbol and its instances. + @param symbolPattern The symbol pattern reference. + @param isPixelPerfect True to make the symbol and its instances Pixel Perfect, false otherwise. + */ + AIAPI AIErr (*SetSymbolPixelPerfect) ( AIPatternHandle symbolPattern, AIBoolean isPixelPerfect); + + /** Retrieves a symbol's Pixel Perfect status. + @param symbolPattern The symbol pattern reference. + @param isPixelPerfect [out] A buffer in which to return true if the symbol is Pixel Perfect, false otherwise. + */ + AIAPI AIErr (*GetSymbolEnablePixelPerfect) ( AIPatternHandle symbolPattern, AIBoolean* isPixelPerfect); + + /** Reports whether symbol art is scaled with 9-slice scaling. Not all instances + of a symbol pattern that has 9-slice scaling guides actually use 9-slice scaling. + For example, an instance can have no scaling. + @param symbolArt [in] The symbol instance, an art object of type \c #kSymbolArt. + @param is9SliceScaled [out] A buffer in which to return true if the symbol art is scaled with 9-slice scaling. + */ + + AIAPI AIErr (*IsSymbolArt9SliceScaled) (AIArtHandle symbolArt, AIBoolean* is9SliceScaled); + + /** Retargets a symbol pattern, fill pattern, or brush pattern for the current document. + Creates a new pattern if needed, with the same definition art and a unique name based on + the source pattern's name. All other global objects (colors, patterns, brushes, styles, + and so on) used indirectly in the definition are similarly retargeted, using + an existing object if one matches and creating a new one otherwise. + + The new pattern is NOT made listed in the current document, even if it was listed in the source + document. + + Use this function when the source symbol is in a document that is being used + as a content resource to support an effect, such as 3D Bevels or Arrowheads, where + you might want the symbols to be visible in the Symbols panel of the resource document, but + not in the Symbols panel of the documents where the effect is in use. + + This differs from first calling \c #RetargetForCurrentDocument() and then \c #UnlistSymbolPattern() + in that \c #RetargetForCurrentDocument() causes a \c #kAIArtSymbolListChangedNotifier to be sent, + and this function does not, thereby circumventing any notification to clients who care only + about changes to listed symbols. + + @param srcPattern A symbol pattern, fill pattern, or brush pattern reference. + @param dstPattern [out] A buffer in which to return the new pattern, or + an existing pattern in the current document with the same name and definition, + or the source pattern if it was already in the current document. + + @note Fill patterns are usually retargeted indirectly using the + \c #AIPathStyleSuite, and brush patterns using the \c #AIObjectSetSuite. + @see \c #AIPatternSuite, \c #AIObjectSetSuite::RetargetForCurrentDocument(), + \c #AIPathStyleSuite::RetargetForCurrentDoc() + */ + AIAPI AIErr (*RetargetForCurrentDocumentAsUnlisted) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern ); + + /** Deletes a symbol definition and expands or deletes the instances of symbol as per the choice taken + @param symbolPattern The symbol reference. + @param deleteChoice, expand or delete the instance as per the enum SymbolDeleteChoice. + @return The error \c #kBadParameterErr if NULL is passed. If symbol is used in effect dictionaries then the artstyle is marked dirty and the next execution is expected to take care of the deleted symbol + This api is slower since it involves expansion/delete of instance so use it only if you want exactly this behavior + */ + AIAPI AIErr(*DeleteSymbolPatternEx) (AIPatternHandle srcPattern, ai::uint32 deleteChoice); + +} AISymbolSuite; + + +/******************************************************************************* + ** + ** AISymbolPalette suite + ** + **/ + + +/** @ingroup Suites + These functions access and manipulate the currency and selection state + of symbols. The suite is exported by the Symbols palette, which is not a + required plug-in, so it can be unavailable. Selection and currency of + symbols is not otherwise supported. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAISymbolPaletteSuite and \c #kAISymbolPaletteVersion. + */ +typedef struct { + /** Retrieves the current symbol. + @param symbolPattern [out] A buffer in which to return the symbol reference. + */ + AIAPI AIErr (*GetCurrentSymbol) ( AIPatternHandle *symbolPattern ); + + /** Makes a symbol current. + @param symbolPattern The symbol reference. + */ + AIAPI AIErr (*SetCurrentSymbol) ( AIPatternHandle symbolPattern ); + + /** Reports the selection state of a symbol.
+ (Note that this function returns a Boolean value, not an error code.) + @param symbolPattern The symbol reference. + @return True if the symbol is selected. + */ + AIAPI AIBoolean (*IsSymbolSelected) ( AIPatternHandle symbolPattern ); + + /** Counts selected symbols. Use with \c #GetNthSelectedSymbol() to + iterate through selected symbols.
+ (Note that this function returns a numeric value, not an error code.) + @return The number of selected symbols. + */ + AIAPI ai::int32 (*CountSelectedSymbols) ( void ); + + /** Retrieves a selected symbol by position index. Use with + \c #CountSelectedSymbols() to iterate through selected symbols. + @param n The 0-based position index. + @param symbolPattern [out] A buffer in which to return the symbol reference. + */ + AIAPI AIErr (*GetNthSelectedSymbol) ( ai::int32 n, AIPatternHandle *symbolPattern ); + + /** Reports whether the Symbol palette is visible.
+ (Note that this function returns a Boolean value, not an error code.) + @return True if the Symbol palette is shown. + */ + AIAPI AIBoolean (*IsPaletteVisible) ( void ); +} AISymbolPaletteSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITIFFKeys.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITIFFKeys.h new file mode 100644 index 0000000..4e86d17 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITIFFKeys.h @@ -0,0 +1,52 @@ +/* +* Name: AITIFFKeys.h +* Purpose: Adobe Illustrator TIFF Options Dictionary Keys. +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2014 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + + +/******************************************************************************* +** +** Imports +** +**/ + +#pragma once + +#include "AIHeaderBegin.h" + + +enum AIAntialiasType:ai::uint8 +{ + kAIAntialiasNone = 1, + kAIAntialiasArtOptimized, + kAIAntialiasTypeOptimized +}; +/******************************************************************************* +** +** Constants +** +**/ + +/* Use with \c #AIDicionarySuite::SetIntegerEntry. */ +#define kAITIFFColorModelOption "TIFFColorModel" + +/* Use with \c #AIDicionarySuite::SetBooleanEntry. */ +#define kAITIFFLZWCompressionOption "TIFFLZWCompression" + +/* Use with \c #AIDicionarySuite::SetIntegerEntry with reference to enum AIAntialiasType. */ +#define kAITIFFAntiAliasOption "TIFFAntiAlias" + + +#include "AIHeaderEnd.h" + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITabletData.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITabletData.h index 9959233..050b9c4 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITabletData.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITabletData.h @@ -1,196 +1,196 @@ -#ifndef __AITabletData__ -#define __AITabletData__ - -/* - * Name: AITabletData.h - * $Revision: 3 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Tablet Data Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AITabletData.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAITabletDataSuite "AI TabletData Suite" -#define kAITabletDataSuiteVersion AIAPI_VERSION(3) -#define kAITabletDataVersion kAITabletDataSuiteVersion - - -/** Types of tablet data that can be stored with a path. */ -typedef enum { - /** Stylus pressure. */ - kTabletPressure = 0, - /** Stylus wheel pressure, also called tangential or barrel pressure */ - kTabletStylusWheel, - /** Tilt, also called altitude. */ - kTabletTilt, - /** Bearing, also called azimuth. */ - kTabletBearing, - /** Rotation. */ - kTabletRotation, - /** internal */ - kTabletTypeCount //Put all new tablet types before this -} AITabletDataType; - - -/** Tablet data is described by an array of (offset, value) pairs. Both values are - in the range [0,1]. Internally the data is stored as an array of small integers - such that the offsets have a maximum resolution of 1/100 and the values have - a maximum resolution of 1/256. - */ -typedef struct { - /** Tablet data offset, in the range [0..1]. */ - AIReal offset; - /** Tablet data value, in the range [0..1]. */ - AIReal value; -} AITabletProfile; - -/** @ingroup Errors - See \c #AITabletDataSuite */ -#define kNotEnoughSpace '!spc' - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that allow you to access and manipulate - tablet-device data that is attached to path objects. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAITabletDataSuite and \c #kAITabletDataVersion. - */ -typedef struct { - - /** Retrieves tablet data attached to a path. - @param path The path object. - @param profile [in, out] An array in which to return the tablet data. If no data is - present, this is set to \c NULL and \c count is set to 0. If the array is not - large enough, \c count is set to the size of the array needed, and - \c #kNotEnoughSpace is returned. - @param count [in, out] The size of the array passed. On return, - the number of entries filled in the array, or, if the passed - array is not large enough, the size of the array needed. - @param type The type of tablet data to retrieve. - @return \c #kNotEnoughSpace error if the passed array is not large enough to hold the data. - */ - AIAPI AIErr (*GetTabletData) ( AIArtHandle path, AITabletProfile **profile, ai::int32 *count, AITabletDataType type ); - - /** Sets tablet data for a path. - @param path The path object. - @param profile An array containing the tablet data. - @param count The size of the array passed. - @param type The type of the tablet data. - */ - AIAPI AIErr (*SetTabletData) ( AIArtHandle path, AITabletProfile *profile, ai::int32 count, AITabletDataType type ); - - /** Reports whether tablet data is being stored with a path. - @param path The path object. - @param inUse [out] A buffer in which to return true if a tablet - is in use for the path. - */ - AIAPI AIErr (*GetTabletDataInUse) ( AIArtHandle path, AIBoolean *inUse ); - - /** Sets the state of tablet use for a path. - @param path The path object. - @param inUse True if a tablet is in use for the path, false otherwise. - */ - AIAPI AIErr (*SetTabletDataInUse) ( AIArtHandle path, AIBoolean inUse ); - - /** Splits a set of tablet data into two sets to go with the two parts of a split path. - @param orig An array containing the original tablet data. - @param origCount The number of entries in the original data array. - @param part1 [out] An array in which to return the first part of the tablet data. - @param part1Count [in, out] The size of the part-one array. On return, the number - of elements filled. - @param part2 [in, out] An array in which to return the second part of the tablet data. - @param part2Count [in, out] The size of the part-two array. On return, the number - of elements filled. - @param split A value between [0..1] which indicates the offset at which - to split the data. A value of 0.5, for example, splits the data in half. - Used to rescale the offsets in the new tablet data sets. - @return The error \c #kNotEnoughSpace if either output array is not big - enough to hold the returned data. - */ - AIAPI AIErr (*SplitTabletData) ( AITabletProfile *orig, ai::int32 origCount, - AITabletProfile **part1, ai::int32 *part1Count, AITabletProfile **part2, ai::int32 *part2Count, - AIReal split ); - - /** Extends the size of a set of tablet data. - @param orig An array containing the original tablet data. - @param origCount The number of entries in the original data array. - @param extendedProfile [in, out] A buffer in which to pass additional - profile data to merge with the original, and return the merged profile. - @param extendedCount [in, out] A buffer in which to pass then number of entries in the - additional profile data and return the size of the merged profile. - @param newStart The index of the beginning of new data in the extended profile. - @param newEnd The index of the end of new data in the extended profile. - */ - AIAPI AIErr (*ExtendTabletData) ( AITabletProfile *orig, ai::int32 origCount, - AITabletProfile **extendedProfile, ai::int32 *extendedCount, AIReal newStart, AIReal newEnd ); - - /** Combines two sets of tablet data into a single set. - @param part1 An array containing the first part of the tablet data. - @param part1Count The size of the part-one array. - @param part2 An array containing the second part of the tablet data. - @param part2Count The size of the part-two array. - @param joined [out] An array in which to return the combined tablet data. - @param joinedCount [in, out] The size of the joined array. On return, the number - of elements filled. - @param part1Ends A value between [0..1] which indicates the offset at which - the first part of the tablet data ends. Must be less than or equal to - \c part2Begins. Used to rescale the offsets in the new tablet data. - @param part2Begins A value between [0..1] which indicates the offset at which - the second part of the tablet data begins. Must be greater than or equal to - \c part1Ends. Used to rescale the offsets in the new tablet data. - @return The error \c #kNotEnoughSpace if the output array is not big - enough to hold the returned data. - */ - AIAPI AIErr (*JoinTabletData) ( AITabletProfile *part1, ai::int32 part1Count, - AITabletProfile *part2, ai::int32 part2Count, AITabletProfile **joined, ai::int32 *joinedCount, - AIReal part1Ends, AIReal part2Begins); - -} AITabletDataSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AITabletData__ +#define __AITabletData__ + +/* + * Name: AITabletData.h + * $Revision: 3 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Tablet Data Suite + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AITabletData.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAITabletDataSuite "AI TabletData Suite" +#define kAITabletDataSuiteVersion AIAPI_VERSION(3) +#define kAITabletDataVersion kAITabletDataSuiteVersion + + +/** Types of tablet data that can be stored with a path. */ +typedef enum { + /** Stylus pressure. */ + kTabletPressure = 0, + /** Stylus wheel pressure, also called tangential or barrel pressure */ + kTabletStylusWheel, + /** Tilt, also called altitude. */ + kTabletTilt, + /** Bearing, also called azimuth. */ + kTabletBearing, + /** Rotation. */ + kTabletRotation, + /** internal */ + kTabletTypeCount //Put all new tablet types before this +} AITabletDataType; + + +/** Tablet data is described by an array of (offset, value) pairs. Both values are + in the range [0,1]. Internally the data is stored as an array of small integers + such that the offsets have a maximum resolution of 1/100 and the values have + a maximum resolution of 1/256. + */ +typedef struct { + /** Tablet data offset, in the range [0..1]. */ + AIReal offset; + /** Tablet data value, in the range [0..1]. */ + AIReal value; +} AITabletProfile; + +/** @ingroup Errors + See \c #AITabletDataSuite */ +#define kNotEnoughSpace '!spc' + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that allow you to access and manipulate + tablet-device data that is attached to path objects. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAITabletDataSuite and \c #kAITabletDataVersion. + */ +typedef struct { + + /** Retrieves tablet data attached to a path. + @param path The path object. + @param profile [in, out] An array in which to return the tablet data. If no data is + present, this is set to \c NULL and \c count is set to 0. If the array is not + large enough, \c count is set to the size of the array needed, and + \c #kNotEnoughSpace is returned. + @param count [in, out] The size of the array passed. On return, + the number of entries filled in the array, or, if the passed + array is not large enough, the size of the array needed. + @param type The type of tablet data to retrieve. + @return \c #kNotEnoughSpace error if the passed array is not large enough to hold the data. + */ + AIAPI AIErr (*GetTabletData) ( AIArtHandle path, AITabletProfile **profile, ai::int32 *count, AITabletDataType type ); + + /** Sets tablet data for a path. + @param path The path object. + @param profile An array containing the tablet data. + @param count The size of the array passed. + @param type The type of the tablet data. + */ + AIAPI AIErr (*SetTabletData) ( AIArtHandle path, AITabletProfile *profile, ai::int32 count, AITabletDataType type ); + + /** Reports whether tablet data is being stored with a path. + @param path The path object. + @param inUse [out] A buffer in which to return true if a tablet + is in use for the path. + */ + AIAPI AIErr (*GetTabletDataInUse) ( AIArtHandle path, AIBoolean *inUse ); + + /** Sets the state of tablet use for a path. + @param path The path object. + @param inUse True if a tablet is in use for the path, false otherwise. + */ + AIAPI AIErr (*SetTabletDataInUse) ( AIArtHandle path, AIBoolean inUse ); + + /** Splits a set of tablet data into two sets to go with the two parts of a split path. + @param orig An array containing the original tablet data. + @param origCount The number of entries in the original data array. + @param part1 [out] An array in which to return the first part of the tablet data. + @param part1Count [in, out] The size of the part-one array. On return, the number + of elements filled. + @param part2 [in, out] An array in which to return the second part of the tablet data. + @param part2Count [in, out] The size of the part-two array. On return, the number + of elements filled. + @param split A value between [0..1] which indicates the offset at which + to split the data. A value of 0.5, for example, splits the data in half. + Used to rescale the offsets in the new tablet data sets. + @return The error \c #kNotEnoughSpace if either output array is not big + enough to hold the returned data. + */ + AIAPI AIErr (*SplitTabletData) ( AITabletProfile *orig, ai::int32 origCount, + AITabletProfile **part1, ai::int32 *part1Count, AITabletProfile **part2, ai::int32 *part2Count, + AIReal split ); + + /** Extends the size of a set of tablet data. + @param orig An array containing the original tablet data. + @param origCount The number of entries in the original data array. + @param extendedProfile [in, out] A buffer in which to pass additional + profile data to merge with the original, and return the merged profile. + @param extendedCount [in, out] A buffer in which to pass then number of entries in the + additional profile data and return the size of the merged profile. + @param newStart The index of the beginning of new data in the extended profile. + @param newEnd The index of the end of new data in the extended profile. + */ + AIAPI AIErr (*ExtendTabletData) ( AITabletProfile *orig, ai::int32 origCount, + AITabletProfile **extendedProfile, ai::int32 *extendedCount, AIReal newStart, AIReal newEnd ); + + /** Combines two sets of tablet data into a single set. + @param part1 An array containing the first part of the tablet data. + @param part1Count The size of the part-one array. + @param part2 An array containing the second part of the tablet data. + @param part2Count The size of the part-two array. + @param joined [out] An array in which to return the combined tablet data. + @param joinedCount [in, out] The size of the joined array. On return, the number + of elements filled. + @param part1Ends A value between [0..1] which indicates the offset at which + the first part of the tablet data ends. Must be less than or equal to + \c part2Begins. Used to rescale the offsets in the new tablet data. + @param part2Begins A value between [0..1] which indicates the offset at which + the second part of the tablet data begins. Must be greater than or equal to + \c part1Ends. Used to rescale the offsets in the new tablet data. + @return The error \c #kNotEnoughSpace if the output array is not big + enough to hold the returned data. + */ + AIAPI AIErr (*JoinTabletData) ( AITabletProfile *part1, ai::int32 part1Count, + AITabletProfile *part2, ai::int32 part2Count, AITabletProfile **joined, ai::int32 *joinedCount, + AIReal part1Ends, AIReal part2Begins); + +} AITabletDataSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITag.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITag.h index 435040b..9179dde 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITag.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITag.h @@ -1,166 +1,166 @@ -#ifndef __AITag__ -#define __AITag__ - -/* - * Name: AITag.h - * $Revision: 4 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Tag Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AITag.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAITagSuite "AI Tag Suite" -#define kAITagSuiteVersion AIAPI_VERSION(4) -#define kAITagVersion kAITagSuiteVersion - -/** @ingroup Notifiers - See \c #AITagSuite */ -#define kAITagChangedNotifier "AI Tag Changed Notifier" - -/** @ingroup Errors - See \c #AITagSuite */ -#define kBadTagTypeErr 'TGTY' -/** @ingroup Errors - See \c #AITagSuite */ -#define kBadTagNameErr 'TGNM' -/** @ingroup Errors - See \c #AITagSuite */ -#define kBadTagDataErr 'TGDT' -/** @ingroup Errors - See \c #AITagSuite */ -#define kTagNotFoundErr 'TGNF' - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Tags allow you to assign arbitrary data to Illustrator artwork - objects. This suite is generally deprecated in favor of the more powerful - facilities provided by the \c #AIDictionarySuite. Tags are actually stored - as string entries in the art object dictionary. Use \c #AIArtSuite::GetDictionary() - to get the art object dictionary. - - A tag is data attached to an artwork object, containing a descriptive name, - a tag type, a change count, and the tag data itself. - - \li A tag name can contain up to 30 characters (alphanumeric characters and - '_'). Illustrator does not check for duplicate names, so you should make sure - you choose unique tag names. Do not use spaces in tag names. - \li The only tag type supported by Illustrator is "string", which represents - a null-terminated C string up to 200 characters. - \li Each time an artwork tag is changed, Illustrator increments - the change count. - - The \c #kAITagChangedNotifier is associated with the tag suite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAITagSuite and \c #kAITagVersion. - */ -typedef struct AITagSuite { - - /** Associates a tag with an art object. - @param object The object, an \c #AIArtHandle. - @param name A unique identifier for the tag. - @param type The tag type, the literal "string". - - Additional arguments that follow depend on the type of data. - For string types, pass a pointer to the C string to be associated with the tag. - */ - AIErr (*SetTag) ( void *object, const char *name, const char *type, ... ); - - /** Retrieves a tag for an object. - @param object The object, an \c #AIArtHandle. - @param name The unique identifier for the tag. - @param type The tag type, the literal "string". - - Additional arguments that follow depend on the type of data. - For string types, pass a pointer to a char * in which to return - the string associated with the tag. You do not need to allocate - space for the tag string; the function returns a pointer to the - existing string. Do not directly modify the string; use \c #SetTag() instead. - */ - AIErr (*GetTag) ( void *object, const char *name, const char *type, ... ); - - /** Gets the type of a tag (always "string"), and can be used to determine - whether a tag of a given name exists. - @param object The object, an \c #AIArtHandle. - @param name The unique identifier for the tag. - @param type [out] Optional. A pointer to a pointer in which to return - the address of the tag type string if the tag exists. - Call with \c NULL to opt out. - */ - AIErr (*GetTagType) ( void *object, const char *name,const char **type ); - - /** Retrieves the number of times an object tag has changed. - @param object The object, an \c #AIArtHandle. - @param name The unique identifier for the tag. - @param count [out] A buffer in which to return the number of changes. - */ - AIErr (*GetTagChangeCount) ( void *object, const char *name, ai::int32 *count ); - - /** Frees memory associated with a tag. Do not remove tags that you did not create. - @param object The object, an \c #AIArtHandle - @param name The unique identifier for the tag. - */ - AIErr (*RemoveTag) ( void *object, const char *name ); - - /** Reports how many tags are associated with an object. Use with \c #GetNthTag() - to iterate through tags. - @param object The object, an \c #AIArtHandle. - @param count [out] A buffer in which to return the number of tags. - */ - AIErr (*CountTags) ( void *object, ai::int32 *count ); - - /** Retrieves a tag from an art object by position index. Use with \c #CountTags() - to iterate through tags. - @param object The object, an \c #AIArtHandle. - @param n The 0-based position index. - @param name [out] A buffer in which to return the unique identifier for the tag. - */ - AIErr (*GetNthTag) ( void *object, ai::int32 n, char **name ); - -} AITagSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AITag__ +#define __AITag__ + +/* + * Name: AITag.h + * $Revision: 4 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Tag Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AITag.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAITagSuite "AI Tag Suite" +#define kAITagSuiteVersion AIAPI_VERSION(4) +#define kAITagVersion kAITagSuiteVersion + +/** @ingroup Notifiers + See \c #AITagSuite */ +#define kAITagChangedNotifier "AI Tag Changed Notifier" + +/** @ingroup Errors + See \c #AITagSuite */ +#define kBadTagTypeErr 'TGTY' +/** @ingroup Errors + See \c #AITagSuite */ +#define kBadTagNameErr 'TGNM' +/** @ingroup Errors + See \c #AITagSuite */ +#define kBadTagDataErr 'TGDT' +/** @ingroup Errors + See \c #AITagSuite */ +#define kTagNotFoundErr 'TGNF' + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + Tags allow you to assign arbitrary data to Illustrator artwork + objects. This suite is generally deprecated in favor of the more powerful + facilities provided by the \c #AIDictionarySuite. Tags are actually stored + as string entries in the art object dictionary. Use \c #AIArtSuite::GetDictionary() + to get the art object dictionary. + + A tag is data attached to an artwork object, containing a descriptive name, + a tag type, a change count, and the tag data itself. + + \li A tag name can contain up to 30 characters (alphanumeric characters and + '_'). Illustrator does not check for duplicate names, so you should make sure + you choose unique tag names. Do not use spaces in tag names. + \li The only tag type supported by Illustrator is "string", which represents + a null-terminated C string up to 200 characters. + \li Each time an artwork tag is changed, Illustrator increments + the change count. + + The \c #kAITagChangedNotifier is associated with the tag suite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAITagSuite and \c #kAITagVersion. + */ +typedef struct AITagSuite { + + /** Associates a tag with an art object. + @param object The object, an \c #AIArtHandle. + @param name A unique identifier for the tag. + @param type The tag type, the literal "string". + + Additional arguments that follow depend on the type of data. + For string types, pass a pointer to the C string to be associated with the tag. + */ + AIErr (*SetTag) ( void *object, const char *name, const char *type, ... ); + + /** Retrieves a tag for an object. + @param object The object, an \c #AIArtHandle. + @param name The unique identifier for the tag. + @param type The tag type, the literal "string". + + Additional arguments that follow depend on the type of data. + For string types, pass a pointer to a char * in which to return + the string associated with the tag. You do not need to allocate + space for the tag string; the function returns a pointer to the + existing string. Do not directly modify the string; use \c #SetTag() instead. + */ + AIErr (*GetTag) ( void *object, const char *name, const char *type, ... ); + + /** Gets the type of a tag (always "string"), and can be used to determine + whether a tag of a given name exists. + @param object The object, an \c #AIArtHandle. + @param name The unique identifier for the tag. + @param type [out] Optional. A pointer to a pointer in which to return + the address of the tag type string if the tag exists. + Call with \c NULL to opt out. + */ + AIErr (*GetTagType) ( void *object, const char *name,const char **type ); + + /** Retrieves the number of times an object tag has changed. + @param object The object, an \c #AIArtHandle. + @param name The unique identifier for the tag. + @param count [out] A buffer in which to return the number of changes. + */ + AIErr (*GetTagChangeCount) ( void *object, const char *name, ai::int32 *count ); + + /** Frees memory associated with a tag. Do not remove tags that you did not create. + @param object The object, an \c #AIArtHandle + @param name The unique identifier for the tag. + */ + AIErr (*RemoveTag) ( void *object, const char *name ); + + /** Reports how many tags are associated with an object. Use with \c #GetNthTag() + to iterate through tags. + @param object The object, an \c #AIArtHandle. + @param count [out] A buffer in which to return the number of tags. + */ + AIErr (*CountTags) ( void *object, ai::int32 *count ); + + /** Retrieves a tag from an art object by position index. Use with \c #CountTags() + to iterate through tags. + @param object The object, an \c #AIArtHandle. + @param n The 0-based position index. + @param name [out] A buffer in which to return the unique identifier for the tag. + */ + AIErr (*GetNthTag) ( void *object, ai::int32 n, char **name ); + +} AITagSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITextFrame.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITextFrame.h index c4c166d..68adb5f 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITextFrame.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITextFrame.h @@ -1,521 +1,521 @@ -#ifndef __AITextFrame__ -#define __AITextFrame__ - -/* - * Name: AITextFrame.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Text Frame Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIFONT__ -#include "AIFont.h" -#endif - -#ifndef __AIHitTest__ -#include "AIHitTest.h" -#endif - -#ifndef __ATESuites__ -#include "ATESuites.h" -#endif - -#ifdef __cplusplus -using ATE::TextRangesRef; -using ATE::TextRangeRef; -using ATE::TextFrameRef; -#endif - -#include "AIHeaderBegin.h" - -/** @file AITextFrame.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAITextFrameSuite "AI Text Frame Suite" - -#define kAITextFrameSuiteVersion4 AIAPI_VERSION(4) -#define kAITextFrameSuiteVersion kAITextFrameSuiteVersion4 -#define kAITextFrameVersion kAITextFrameSuiteVersion - -#define kAITextFrameMESuite "AI Text Frame ME Suite" -#define kAITextFrameMESuiteVersion3 AIAPI_VERSION(3) -#define kAITextFrameMESuiteVersion kAITextFrameMESuiteVersion3 -#define kAITextFrameMEVersion kAITextFrameMESuiteVersion - - -#define kAITextFrameVersion kAITextFrameSuiteVersion - -#define kAITextFrameHitSuite "AI Text Frame Hit Suite" -#define kAITextFrameHitSuiteVersion2 AIAPI_VERSION(2) -#define kAITextFrameHitSuiteVersion kAITextFrameHitSuiteVersion2 -#define kAITextFrameHitVersion kAITextFrameHitSuiteVersion - -/** Types of text frames. See \c #AITextFrameSuite. */ -typedef enum { - kUnknownTextType = -1, - /** Point text, defined by an anchor point for the position - of the first character. */ - kPointTextType, - /** In-path text, an associated path object defines the area - the text flows into. */ - kInPathTextType, - /** On-path text, an associated path object defines the area - the text flows along. */ - kOnPathTextType -} AITextType; - -/** An opaque reference to a text frame. See \c #AITextFrameSuite. */ -typedef AITextType AITextFrameType; - -/** Text direction constants. See \c #AITextFrameMESuite. */ -enum AITextDirection{ - kAITextLeftToRightDirection, - kAITextRightToLeftDirection -}; - -/** Parts of a text object that can be hit. See \c #AITextFrameHitSuite. */ -enum AITextPart { - kAITextNowhere = 0, - /** Direct hit on text */ - kAITextText = 1, - /** Hit on "in" port of either in-path or on-path text. */ - kAITextInport = 2, - /** Hit on "out" port of either in-path or on-path text. */ - kAITextOutPort = 3, - /** Hit on start point of on-path text. */ - kAITextStart = 4, - /** Hit on middle point of on-path text. */ - kAITextMiddle = 5, - /** Hit on end point of OnPath text. */ - kAITextEnd = 6 -}; - -/** Types of Text Antialiasing available. See \c #AITextFrameHitSuite. */ -enum TextAntialiasingAvailableTypes -{ - kTextAntialiasingInvalid = 0, - kTextAntialiasingNone, - kTextAntialiasingSharp, - kTextAntialiasingCrisp, - kTextAntialiasingStrong -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that manage art objects of - type \c #kTextFrameArt. Introduced in Illustrator 11. - - There are three types of text frames; \e point - text, \e in-path text, and \e on-path text. - - \li Point text is defined by an anchor point for the position - of the first character. - \li In-path and on-path text have an associated path object - that defines the area the text flows into or along. respectively. - - In-path and on-path text frames can be linked together. Linked text frames - need not be the same type. They can be in different groups, and can be on - different layers. The text content linked frames is called a \e story. - Use the Adobe Text Engine (ATE) functions to access and manipulate - the story and its visual attributes. Related suites include: -
\c #AIATECurrentTextFeaturesSuite -
\c #AIATEPaintSuite -
\c #AIATETextUtilSuite -
\c #AITextFrameHitSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAITextFrameSuite and \c #kAITextFrameVersion. - */ -typedef struct { - - /** Creates a new point text object at a given position in the paint order. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param anchor The start point of the baseline of the first character. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewPointText) ( ai::int16 paintOrder, AIArtHandle prep, AITextOrientation orient, - AIRealPoint anchor, AIArtHandle *newTextFrame ); - /** Creates a new in-path text object at a given position in the paint order. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewInPathText) ( ai::int16 paintOrder, AIArtHandle prep, AITextOrientation orient, - AIArtHandle path, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); - - /** Creates a new on-path text object at a given position in the paint order, placing - the text with a starting and ending path segment. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param startT The 0-based index of the segment of the path at which the text starts. - @param endT The 0-based index of the segment of the path at which the text ends. If less - than the start value, defaults to the number of segments (the end of the path). - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewOnPathText) ( ai::int16 paintOrder, AIArtHandle prep, AITextOrientation orient, - AIArtHandle path, AIReal startT, AIReal endT, AIArtHandle baseFrame, - AIBool8 append, AIArtHandle *newTextFrame ); - - /** Creates a new on-path text object at a given position in the paint order, placing - the text with an anchor point. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param anchor The start point of the baseline of the first character. - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewOnPathText2) ( ai::int16 paintOrder, AIArtHandle prep, AITextOrientation orient, - AIArtHandle path, AIRealPoint anchor, AIArtHandle baseFrame, - AIBool8 append, AIArtHandle *newTextFrame ); - - /** Retrieves the type of a text frame. - @param textFrame The text frame object. - @param type [out] A buffer in which to return the type. - */ - AIAPI AIErr (*GetType) ( AIArtHandle textFrame, AITextFrameType *type ); - - /** Retrieves the orientation of a text frame. - @param textFrame The text frame object. - @param orient [out] A buffer in which to return the orientation value. - */ - AIAPI AIErr (*GetOrientation) ( AIArtHandle textFrame, AITextOrientation *orient ); - - /** Sets the orientation of a text frame. - @param textFrame The text frame object. - @param orient The new orientation value. - */ - AIAPI AIErr (*SetOrientation) ( AIArtHandle textFrame, AITextOrientation orient ); - - /** Retrieves the Antialiasing option of a text frame. - @param textFrame The text frame object. - @param tAntialias [out] A buffer in which to return the Antialiasing options. - */ - AIAPI AIErr (*GetTextAntialias) ( AIArtHandle textFrame, TextAntialiasingAvailableTypes *tAntialias ); - - /** Sets the Antialiasing option of a text frame. - @param textFrame The text frame object. - @param tAntialias The new Antialiasing option. - */ - AIAPI AIErr (*SetTextAntialias) ( AIArtHandle textFrame, TextAntialiasingAvailableTypes tAntialias ); - - /** Retrieves the anchor point of a point-text text frame. - Use the \c #AITransformArtSuite to change the anchor point. - @param textFrame The text frame object. - @param anchor [out] A buffer in which to return the anchor point. - @return The error \c #kBadParameterErr if the text frame is not a point-text type. - */ - AIAPI AIErr (*GetPointTextAnchor)( AIArtHandle textFrame, AIRealPoint *anchor ); - - /** Retrieves the path associated with an in-path or on-path text range. - Use the \c #AIPathSuite to access and manipulate the path. - @param textFrame The text frame object. - @param pathObject [out] A buffer in which to return the path object, or - \c NULL if the text frame is a point-text type. - - @note You can use \c #AIArtSuite::DuplicateArt() copy the path object, - but you cannot specify the target location in terms of the returned path object. - For example, you cannot place the duplicate path above or below the source path. - */ - AIAPI AIErr (*GetPathObject) ( AIArtHandle textFrame, AIArtHandle *pathObject ); - - /** Retrieves the starting and ending path segments of an on-path text range. - @param textFrame The text frame object. - @param startT [out] A buffer in which to return the 0-based index of - the starting segment. - @param endT [out] A buffer in which to return the 0-based index of - the ending segment. It is always greater than or equal to the starting - segment's index. - */ - AIAPI AIErr (*GetOnPathTextTRange)( AIArtHandle textFrame, AIReal *startT, AIReal *endT ); - - /** Sets the starting and ending path segments of an on-path text range. - @param textFrame The text frame object. - @param startT The 0-based index of the starting segment. - @param endT The 0-based index of the ending segment. Must be - greater than or equal to the starting segment's index. - */ - AIAPI AIErr (*SetOnPathTextTRange)( AIArtHandle textFrame, AIReal startT, AIReal endT ); - - /** Retrieves the ATE text range object for the text contained in an Illustrator text frame. - @param textFrame The text frame object. - @param textRange [out] A buffer in which to return the text range object. - This object is reference counted. You must release it when it is no - longer needed, using the \c #ATE::ITextRange class - @note If this frame is the last one in the chain AND it has overflow text, - \c ITextRange(textRange).getEnd() includes the hidden text. - */ - AIAPI AIErr (*GetATETextRange) ( AIArtHandle textFrame, TextRangeRef* textRange ); - - /** Retrieves the ATE text frame object corresponding to an Illustrator text frame object. - @param textFrame The text frame object. - @param ATE_textFrame [out] A buffer in which to return the ATE text frame object. - This object is reference counted. You must release it when it is no - longer needed, using the \c #ATE::ITextFrame class - */ - AIAPI AIErr (*GetATETextFrame) ( AIArtHandle textFrame, TextFrameRef* ATE_textFrame ); - - /** Retrieves the Illustrator text frame object corresponding to an ATE text frame object. - @param ATE_textFrame The ATE text frame object. - @param textFrame [out] A buffer in which to return the Illustrator text frame object. - */ - AIAPI AIErr (*GetAITextFrame) ( TextFrameRef ATE_textFrame, AIArtHandle* textFrame ); - - /** Retrieves the ATE text range object for the selected text contained in an - Illustrator text frame. Selections can be discontiguous. - @param textFrame The text frame object. - @param textRange [out] A buffer in which to return the text range object. - This object is reference counted. You must release it when it is no - longer needed, using the \c #ATE::ITextRange class - */ - AIAPI AIErr (*GetATETextSelection)( AIArtHandle textFrame, TextRangesRef* Selection ); - - /** Retrieves the ATE text range object for the insertion point that corresponds - to a hit on a text frame object, as obtained with the \c #AIHitTestSuite. - @param hitRef The hit object. - @param textRange [out] A buffer in which to return the text range object. - This object is reference counted. You must release it when it is no - longer needed, using the \c #ATE::ITextRange class - */ - AIAPI AIErr (*DoTextFrameHit) ( const AIHitRef hitRef, TextRangeRef* textRange ); - - /** Converts the text in a text frame object to outlines in a new art object. - If the text frame has an active style, that style is applied to the outlines. - Other attributes, including the opacity mask. are not copied. If the text frame - is set to clip, a single clipping compound path is created to contain the outlines. - The style and opacity mask are not applied to this compound path. - @param textFrame The text frame object. This object is not deleted. - @param outline [out] A buffer in which to return the new outline text. - */ - AIAPI AIErr (*CreateOutline) ( AIArtHandle textFrame, AIArtHandle *outline ); - - /** Links two in-path text frame objects. Upon return, they share the same story. - @param baseFrame The first in-path text frame object. - @param nextFrame The second in-path text frame object. - */ - AIAPI AIErr (*Link) ( AIArtHandle baseFrame, AIArtHandle nextFrame ); - - /** Unlinks a text frame object from its current story, or breaks the story - into two parts before or after a given frame. - @param frame The text frame object. - @param before When true, if \c after is false, break the story into two - groups before this frame, so that the second part starts - with this frame. - @param after When true, if \c before is false, break the story into two - groups after this frame, so that the first part ends - with this frame. - - \li If both \c before and \c after are true, the frame is removed from the - story. - \li If both \c before and \c after are false, nothing happens. - */ - AIAPI AIErr (*Unlink) ( AIArtHandle frame, AIBool8 before, AIBool8 after ); - - /** Creates a new Illustrator text frame object based on ATE version 2 blob data. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param data A pointer to a binary blob. - @param size The number of bytes in the data block. - @param index The 0-based position index of the new text object - in the SLO TextObject list. - */ - AIAPI AIErr (*CreateATEV2Text) ( ai::int16 paintOrder, AIArtHandle prep, void* data, - size_t size, ai::int32 index, AIArtHandle *newTextFrame ); - - /** Retrieves the ATE version 2 blob data for the current artwork. - @param data [out] A buffer in which to return the binary blob. You must - free this data using \c #SPBlocksSuite::SPFreeBlock(). - @param size [out]] A buffer in which to return the number of bytes in the data block. - */ - AIAPI AIErr (*GetATEV2Data) ( void** data, size_t* size ); - - /** Retrieves the story index of a text frame. - @param frame The text frame object. - @param index The 0-based index, or -1 if the frame does not belong - to the current artwork or is part of the result art of a - plug-in group or styled art. - */ - AIAPI AIErr (*GetStoryIndex) ( AIArtHandle frame, ai::int32* index ); - - /** Retrieves the frame index of a linked text frame in its story. - @param frame The text frame object. - @param index The 0-based index, or -1 if the frame does not belong - to the current artwork or is part of the result art of a - plug-in group or styled art. - */ - AIAPI AIErr (*GetFrameIndex) ( AIArtHandle frame, ai::int32* index ); - - /** Reports whether a text frame is part of a linked text story. - @param frame The text frame object. - @param linked [out] A buffer in which to return true if the text frame is linked. - */ - AIAPI AIErr (*PartOfLinkedText) ( AIArtHandle frame, AIBool8* linked ); -} AITextFrameSuite; - - -/** @ingroup Suites - - This suite is used in conjunction with \c #AITextFrameSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAITextFrameMESuite and \c #kAITextFrameMEVersion. - */ -typedef struct { - - /** Retrieves the orientation of text in a text frame (left-to-right or right-to-left). - @param textFrame The text freme object. - @parem dir [out] A buffer in which to return the text-direction constant. - */ - AIAPI AIErr (*GetDirection) ( AIArtHandle textFrame, AITextDirection *dir ); - - /** Sets the orientation of text in a text frame (left-to-right or right-to-left). - @param textFrame The text freme object. - @parem dir The text-direction constant. - */ - AIAPI AIErr (*SetDirection) ( AIArtHandle textFrame, AITextDirection dir ); - - /** Creates a new point text object at a given position in the paint order. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param anchor The start point of the baseline of the first character. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewPointTextME) ( short paintOrder, AIArtHandle prep, AITextOrientation orient,AITextDirection dir, AIRealPoint anchor, AIArtHandle *newTextFrame ); - - /** Creates a new in-path text object at a given position in the paint order. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewInPathTextME) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, AITextDirection dir, AIArtHandle path, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); - - /** Creates a new on-path text object at a given position in the paint order, placing - the text with a starting and ending path segment. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param startT The 0-based index of the segment of the path at which the text starts. - @param endT The 0-based index of the segment of the path at which the text ends. If less - than the start value, defaults to the number of segments (the end of the path). - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewOnPathTextME) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, AITextDirection dir, AIArtHandle path, AIReal startT, AIReal endT, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); - - /** Creates a new on-path text object at a given position in the paint order, placing - the text with an anchor point. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param anchor The start point of the baseline of the first character. - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewOnPathText2ME) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, AITextDirection dir, AIArtHandle path, AIRealPoint anchor, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); - - /** - - */ - AIAPI AIErr (*FullReflow) ( AIArtHandle newTextFrame ); - -} AITextFrameMESuite; - - -/** @ingroup Suites - - This suite is used in conjunction with \c #AIHitTestSuite and \c #AITextFrameSuite. - When the \c #AIHitTestSuite returns a hit reference that identifies a hit - on a text frame, use this function to further interrogate the hit. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAITextFrameHitSuite and \c #kAITextFrameHitVersion. - */ -typedef struct { - - /** Reports which element of a text frame was hit. - (Note that this function returns a constant value, not an error code.) - @param The hit reference. - @return An \c #AITextPart value. */ - AIAPI ai::int32 (*GetPart) (AIHitRef hit); - -} AITextFrameHitSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AITextFrame__ +#define __AITextFrame__ + +/* + * Name: AITextFrame.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Text Frame Object Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIFONT__ +#include "AIFont.h" +#endif + +#ifndef __AIHitTest__ +#include "AIHitTest.h" +#endif + +#ifndef __ATESuites__ +#include "ATESuites.h" +#endif + +#ifdef __cplusplus +using ATE::TextRangesRef; +using ATE::TextRangeRef; +using ATE::TextFrameRef; +#endif + +#include "AIHeaderBegin.h" + +/** @file AITextFrame.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAITextFrameSuite "AI Text Frame Suite" + +#define kAITextFrameSuiteVersion4 AIAPI_VERSION(4) +#define kAITextFrameSuiteVersion kAITextFrameSuiteVersion4 +#define kAITextFrameVersion kAITextFrameSuiteVersion + +#define kAITextFrameMESuite "AI Text Frame ME Suite" +#define kAITextFrameMESuiteVersion3 AIAPI_VERSION(3) +#define kAITextFrameMESuiteVersion kAITextFrameMESuiteVersion3 +#define kAITextFrameMEVersion kAITextFrameMESuiteVersion + + +#define kAITextFrameVersion kAITextFrameSuiteVersion + +#define kAITextFrameHitSuite "AI Text Frame Hit Suite" +#define kAITextFrameHitSuiteVersion2 AIAPI_VERSION(2) +#define kAITextFrameHitSuiteVersion kAITextFrameHitSuiteVersion2 +#define kAITextFrameHitVersion kAITextFrameHitSuiteVersion + +/** Types of text frames. See \c #AITextFrameSuite. */ +typedef enum { + kUnknownTextType = -1, + /** Point text, defined by an anchor point for the position + of the first character. */ + kPointTextType, + /** In-path text, an associated path object defines the area + the text flows into. */ + kInPathTextType, + /** On-path text, an associated path object defines the area + the text flows along. */ + kOnPathTextType +} AITextType; + +/** An opaque reference to a text frame. See \c #AITextFrameSuite. */ +typedef AITextType AITextFrameType; + +/** Text direction constants. See \c #AITextFrameMESuite. */ +enum AITextDirection{ + kAITextLeftToRightDirection, + kAITextRightToLeftDirection +}; + +/** Parts of a text object that can be hit. See \c #AITextFrameHitSuite. */ +enum AITextPart { + kAITextNowhere = 0, + /** Direct hit on text */ + kAITextText = 1, + /** Hit on "in" port of either in-path or on-path text. */ + kAITextInport = 2, + /** Hit on "out" port of either in-path or on-path text. */ + kAITextOutPort = 3, + /** Hit on start point of on-path text. */ + kAITextStart = 4, + /** Hit on middle point of on-path text. */ + kAITextMiddle = 5, + /** Hit on end point of OnPath text. */ + kAITextEnd = 6 +}; + +/** Types of Text Antialiasing available. See \c #AITextFrameHitSuite. */ +enum TextAntialiasingAvailableTypes +{ + kTextAntialiasingInvalid = 0, + kTextAntialiasingNone, + kTextAntialiasingSharp, + kTextAntialiasingCrisp, + kTextAntialiasingStrong +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides functions that manage art objects of + type \c #kTextFrameArt. Introduced in Illustrator 11. + + There are three types of text frames; \e point + text, \e in-path text, and \e on-path text. + + \li Point text is defined by an anchor point for the position + of the first character. + \li In-path and on-path text have an associated path object + that defines the area the text flows into or along. respectively. + + In-path and on-path text frames can be linked together. Linked text frames + need not be the same type. They can be in different groups, and can be on + different layers. The text content linked frames is called a \e story. + Use the Adobe Text Engine (ATE) functions to access and manipulate + the story and its visual attributes. Related suites include: +
\c #AIATECurrentTextFeaturesSuite +
\c #AIATEPaintSuite +
\c #AIATETextUtilSuite +
\c #AITextFrameHitSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAITextFrameSuite and \c #kAITextFrameVersion. + */ +typedef struct { + + /** Creates a new point text object at a given position in the paint order. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param orient The text orientation value. + @param anchor The start point of the baseline of the first character. + @param newTextFrame [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*NewPointText) ( ai::int16 paintOrder, AIArtHandle prep, AITextOrientation orient, + AIRealPoint anchor, AIArtHandle *newTextFrame ); + /** Creates a new in-path text object at a given position in the paint order. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param orient The text orientation value. + @param path The associated path object (an art object of type \c #kPathArt). + @param baseFrame Optional. Another text frame with which to link the new text frame. + @param append When true, append the new frame to the base frame, when false, prepend it. + Ignored if \c baseFrame is \c NULL. + @param newTextFrame [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*NewInPathText) ( ai::int16 paintOrder, AIArtHandle prep, AITextOrientation orient, + AIArtHandle path, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); + + /** Creates a new on-path text object at a given position in the paint order, placing + the text with a starting and ending path segment. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param orient The text orientation value. + @param path The associated path object (an art object of type \c #kPathArt). + @param startT The 0-based index of the segment of the path at which the text starts. + @param endT The 0-based index of the segment of the path at which the text ends. If less + than the start value, defaults to the number of segments (the end of the path). + @param baseFrame Optional. Another text frame with which to link the new text frame. + @param append When true, append the new frame to the base frame, when false, prepend it. + Ignored if \c baseFrame is \c NULL. + @param newTextFrame [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*NewOnPathText) ( ai::int16 paintOrder, AIArtHandle prep, AITextOrientation orient, + AIArtHandle path, AIReal startT, AIReal endT, AIArtHandle baseFrame, + AIBool8 append, AIArtHandle *newTextFrame ); + + /** Creates a new on-path text object at a given position in the paint order, placing + the text with an anchor point. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param orient The text orientation value. + @param path The associated path object (an art object of type \c #kPathArt). + @param anchor The start point of the baseline of the first character. + @param baseFrame Optional. Another text frame with which to link the new text frame. + @param append When true, append the new frame to the base frame, when false, prepend it. + Ignored if \c baseFrame is \c NULL. + @param newTextFrame [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*NewOnPathText2) ( ai::int16 paintOrder, AIArtHandle prep, AITextOrientation orient, + AIArtHandle path, AIRealPoint anchor, AIArtHandle baseFrame, + AIBool8 append, AIArtHandle *newTextFrame ); + + /** Retrieves the type of a text frame. + @param textFrame The text frame object. + @param type [out] A buffer in which to return the type. + */ + AIAPI AIErr (*GetType) ( AIArtHandle textFrame, AITextFrameType *type ); + + /** Retrieves the orientation of a text frame. + @param textFrame The text frame object. + @param orient [out] A buffer in which to return the orientation value. + */ + AIAPI AIErr (*GetOrientation) ( AIArtHandle textFrame, AITextOrientation *orient ); + + /** Sets the orientation of a text frame. + @param textFrame The text frame object. + @param orient The new orientation value. + */ + AIAPI AIErr (*SetOrientation) ( AIArtHandle textFrame, AITextOrientation orient ); + + /** Retrieves the Antialiasing option of a text frame. + @param textFrame The text frame object. + @param tAntialias [out] A buffer in which to return the Antialiasing options. + */ + AIAPI AIErr (*GetTextAntialias) ( AIArtHandle textFrame, TextAntialiasingAvailableTypes *tAntialias ); + + /** Sets the Antialiasing option of a text frame. + @param textFrame The text frame object. + @param tAntialias The new Antialiasing option. + */ + AIAPI AIErr (*SetTextAntialias) ( AIArtHandle textFrame, TextAntialiasingAvailableTypes tAntialias ); + + /** Retrieves the anchor point of a point-text text frame. + Use the \c #AITransformArtSuite to change the anchor point. + @param textFrame The text frame object. + @param anchor [out] A buffer in which to return the anchor point. + @return The error \c #kBadParameterErr if the text frame is not a point-text type. + */ + AIAPI AIErr (*GetPointTextAnchor)( AIArtHandle textFrame, AIRealPoint *anchor ); + + /** Retrieves the path associated with an in-path or on-path text range. + Use the \c #AIPathSuite to access and manipulate the path. + @param textFrame The text frame object. + @param pathObject [out] A buffer in which to return the path object, or + \c NULL if the text frame is a point-text type. + + @note You can use \c #AIArtSuite::DuplicateArt() copy the path object, + but you cannot specify the target location in terms of the returned path object. + For example, you cannot place the duplicate path above or below the source path. + */ + AIAPI AIErr (*GetPathObject) ( AIArtHandle textFrame, AIArtHandle *pathObject ); + + /** Retrieves the starting and ending path segments of an on-path text range. + @param textFrame The text frame object. + @param startT [out] A buffer in which to return the 0-based index of + the starting segment. + @param endT [out] A buffer in which to return the 0-based index of + the ending segment. It is always greater than or equal to the starting + segment's index. + */ + AIAPI AIErr (*GetOnPathTextTRange)( AIArtHandle textFrame, AIReal *startT, AIReal *endT ); + + /** Sets the starting and ending path segments of an on-path text range. + @param textFrame The text frame object. + @param startT The 0-based index of the starting segment. + @param endT The 0-based index of the ending segment. Must be + greater than or equal to the starting segment's index. + */ + AIAPI AIErr (*SetOnPathTextTRange)( AIArtHandle textFrame, AIReal startT, AIReal endT ); + + /** Retrieves the ATE text range object for the text contained in an Illustrator text frame. + @param textFrame The text frame object. + @param textRange [out] A buffer in which to return the text range object. + This object is reference counted. You must release it when it is no + longer needed, using the \c #ATE::ITextRange class + @note If this frame is the last one in the chain AND it has overflow text, + \c ITextRange(textRange).getEnd() includes the hidden text. + */ + AIAPI AIErr (*GetATETextRange) ( AIArtHandle textFrame, TextRangeRef* textRange ); + + /** Retrieves the ATE text frame object corresponding to an Illustrator text frame object. + @param textFrame The text frame object. + @param ATE_textFrame [out] A buffer in which to return the ATE text frame object. + This object is reference counted. You must release it when it is no + longer needed, using the \c #ATE::ITextFrame class + */ + AIAPI AIErr (*GetATETextFrame) ( AIArtHandle textFrame, TextFrameRef* ATE_textFrame ); + + /** Retrieves the Illustrator text frame object corresponding to an ATE text frame object. + @param ATE_textFrame The ATE text frame object. + @param textFrame [out] A buffer in which to return the Illustrator text frame object. + */ + AIAPI AIErr (*GetAITextFrame) ( TextFrameRef ATE_textFrame, AIArtHandle* textFrame ); + + /** Retrieves the ATE text range object for the selected text contained in an + Illustrator text frame. Selections can be discontiguous. + @param textFrame The text frame object. + @param textRange [out] A buffer in which to return the text range object. + This object is reference counted. You must release it when it is no + longer needed, using the \c #ATE::ITextRange class + */ + AIAPI AIErr (*GetATETextSelection)( AIArtHandle textFrame, TextRangesRef* Selection ); + + /** Retrieves the ATE text range object for the insertion point that corresponds + to a hit on a text frame object, as obtained with the \c #AIHitTestSuite. + @param hitRef The hit object. + @param textRange [out] A buffer in which to return the text range object. + This object is reference counted. You must release it when it is no + longer needed, using the \c #ATE::ITextRange class + */ + AIAPI AIErr (*DoTextFrameHit) ( const AIHitRef hitRef, TextRangeRef* textRange ); + + /** Converts the text in a text frame object to outlines in a new art object. + If the text frame has an active style, that style is applied to the outlines. + Other attributes, including the opacity mask. are not copied. If the text frame + is set to clip, a single clipping compound path is created to contain the outlines. + The style and opacity mask are not applied to this compound path. + @param textFrame The text frame object. This object is not deleted. + @param outline [out] A buffer in which to return the new outline text. + */ + AIAPI AIErr (*CreateOutline) ( AIArtHandle textFrame, AIArtHandle *outline ); + + /** Links two in-path text frame objects. Upon return, they share the same story. + @param baseFrame The first in-path text frame object. + @param nextFrame The second in-path text frame object. + */ + AIAPI AIErr (*Link) ( AIArtHandle baseFrame, AIArtHandle nextFrame ); + + /** Unlinks a text frame object from its current story, or breaks the story + into two parts before or after a given frame. + @param frame The text frame object. + @param before When true, if \c after is false, break the story into two + groups before this frame, so that the second part starts + with this frame. + @param after When true, if \c before is false, break the story into two + groups after this frame, so that the first part ends + with this frame. + + \li If both \c before and \c after are true, the frame is removed from the + story. + \li If both \c before and \c after are false, nothing happens. + */ + AIAPI AIErr (*Unlink) ( AIArtHandle frame, AIBool8 before, AIBool8 after ); + + /** Creates a new Illustrator text frame object based on ATE version 2 blob data. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param data A pointer to a binary blob. + @param size The number of bytes in the data block. + @param index The 0-based position index of the new text object + in the SLO TextObject list. + */ + AIAPI AIErr (*CreateATEV2Text) ( ai::int16 paintOrder, AIArtHandle prep, void* data, + size_t size, ai::int32 index, AIArtHandle *newTextFrame ); + + /** Retrieves the ATE version 2 blob data for the current artwork. + @param data [out] A buffer in which to return the binary blob. You must + free this data using \c #SPBlocksSuite::SPFreeBlock(). + @param size [out]] A buffer in which to return the number of bytes in the data block. + */ + AIAPI AIErr (*GetATEV2Data) ( void** data, size_t* size ); + + /** Retrieves the story index of a text frame. + @param frame The text frame object. + @param index The 0-based index, or -1 if the frame does not belong + to the current artwork or is part of the result art of a + plug-in group or styled art. + */ + AIAPI AIErr (*GetStoryIndex) ( AIArtHandle frame, ai::int32* index ); + + /** Retrieves the frame index of a linked text frame in its story. + @param frame The text frame object. + @param index The 0-based index, or -1 if the frame does not belong + to the current artwork or is part of the result art of a + plug-in group or styled art. + */ + AIAPI AIErr (*GetFrameIndex) ( AIArtHandle frame, ai::int32* index ); + + /** Reports whether a text frame is part of a linked text story. + @param frame The text frame object. + @param linked [out] A buffer in which to return true if the text frame is linked. + */ + AIAPI AIErr (*PartOfLinkedText) ( AIArtHandle frame, AIBool8* linked ); +} AITextFrameSuite; + + +/** @ingroup Suites + + This suite is used in conjunction with \c #AITextFrameSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAITextFrameMESuite and \c #kAITextFrameMEVersion. + */ +typedef struct { + + /** Retrieves the orientation of text in a text frame (left-to-right or right-to-left). + @param textFrame The text freme object. + @parem dir [out] A buffer in which to return the text-direction constant. + */ + AIAPI AIErr (*GetDirection) ( AIArtHandle textFrame, AITextDirection *dir ); + + /** Sets the orientation of text in a text frame (left-to-right or right-to-left). + @param textFrame The text freme object. + @parem dir The text-direction constant. + */ + AIAPI AIErr (*SetDirection) ( AIArtHandle textFrame, AITextDirection dir ); + + /** Creates a new point text object at a given position in the paint order. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param orient The text orientation value. + @param anchor The start point of the baseline of the first character. + @param newTextFrame [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*NewPointTextME) ( short paintOrder, AIArtHandle prep, AITextOrientation orient,AITextDirection dir, AIRealPoint anchor, AIArtHandle *newTextFrame ); + + /** Creates a new in-path text object at a given position in the paint order. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param orient The text orientation value. + @param path The associated path object (an art object of type \c #kPathArt). + @param baseFrame Optional. Another text frame with which to link the new text frame. + @param append When true, append the new frame to the base frame, when false, prepend it. + Ignored if \c baseFrame is \c NULL. + @param newTextFrame [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*NewInPathTextME) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, AITextDirection dir, AIArtHandle path, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); + + /** Creates a new on-path text object at a given position in the paint order, placing + the text with a starting and ending path segment. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param orient The text orientation value. + @param path The associated path object (an art object of type \c #kPathArt). + @param startT The 0-based index of the segment of the path at which the text starts. + @param endT The 0-based index of the segment of the path at which the text ends. If less + than the start value, defaults to the number of segments (the end of the path). + @param baseFrame Optional. Another text frame with which to link the new text frame. + @param append When true, append the new frame to the base frame, when false, prepend it. + Ignored if \c baseFrame is \c NULL. + @param newTextFrame [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*NewOnPathTextME) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, AITextDirection dir, AIArtHandle path, AIReal startT, AIReal endT, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); + + /** Creates a new on-path text object at a given position in the paint order, placing + the text with an anchor point. + @param paintOrder The paint order position, relative to the \c prep object, + an \c #AITypes::AIPaintOrder value. + @param prep The prepositional art object for the paint order. + @param orient The text orientation value. + @param path The associated path object (an art object of type \c #kPathArt). + @param anchor The start point of the baseline of the first character. + @param baseFrame Optional. Another text frame with which to link the new text frame. + @param append When true, append the new frame to the base frame, when false, prepend it. + Ignored if \c baseFrame is \c NULL. + @param newTextFrame [out] A buffer in which to return the new art object. + */ + AIAPI AIErr (*NewOnPathText2ME) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, AITextDirection dir, AIArtHandle path, AIRealPoint anchor, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); + + /** + + */ + AIAPI AIErr (*FullReflow) ( AIArtHandle newTextFrame ); + +} AITextFrameMESuite; + + +/** @ingroup Suites + + This suite is used in conjunction with \c #AIHitTestSuite and \c #AITextFrameSuite. + When the \c #AIHitTestSuite returns a hit reference that identifies a hit + on a text frame, use this function to further interrogate the hit. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAITextFrameHitSuite and \c #kAITextFrameHitVersion. + */ +typedef struct { + + /** Reports which element of a text frame was hit. + (Note that this function returns a constant value, not an error code.) + @param The hit reference. + @return An \c #AITextPart value. */ + AIAPI ai::int32 (*GetPart) (AIHitRef hit); + +} AITextFrameHitSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITimer.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITimer.h index cb5925e..b2e366a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITimer.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITimer.h @@ -1,195 +1,195 @@ -#ifndef __AITimer__ -#define __AITimer__ - -/* - * Name: AITimer.h - * $Revision: 5 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Timer Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AITimer.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAITimerSuite "AI Timer Suite" -#define kAITimerSuiteVersion AIAPI_VERSION(5) -#define kAITimerVersion kAITimerSuiteVersion - - -/** @ingroup Callers - See \c #AITimerSuite */ -#define kCallerAITimer "AI Timer" - -/** @ingroup Selectors - See \c #AITimerSuite */ -#define kSelectorAIGoTimer "AI Go" - -/** Default number of clock ticks per second. See \c #AITimerSuite */ -#define kTicksPerSecond 60 - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a timer, never dereferenced. Access with \c #AITimerSuite */ -typedef struct _t_AITimerOpaque *AITimerHandle; - -/** The contents of a timer message, sent with \c #kSelectorAIGoTimer */ -typedef struct { - /** The message data. */ - SPMessageData d; - /** The timer plug-in receiving the message. */ - AITimerHandle timer; -} AITimerMessage; - - -/******************************************************************************* - ** - ** Suite Record - ** - **/ - -/** @ingroup Suites - These functions allow you to schedule events by registering timer plug-ins. - Use these functions to add timers, turn timers on and - off, and enumerate and access the installed timer plug-ins. - - Illustrator notifies registered timer plug-ins when a specified period of - time has passed. It sends a message to the plug-in's main entry point - with caller \c #kCallerAITimer and selector \c #kSelectorAIGoTimer. - - Timer periods are specified in clock ticks. There are \c #kTicksPerSecond - ticks in a second. - - Timers are typically used in conjunction with other plug-ins, such as - menus or windows, which determine when an update is needed. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAITimerSuite and \c #kAITimerVersion. - */ -typedef struct { - - /** Adds a timer plug-in to Illustrator. Use at startup. - @param self This plug-in. - @param name The unique identifying name of the timer. - @param period The time period for notification, the number of - clock ticks that should pass before the timer is notified. - For seconds, multiply the number of seconds by \c #kTicksPerSecond. - @param timer [out] A buffer in which to return the timer reference. - If you install more than one timer plug-in, save to compare - to the reference passed in the \c #AITimerMessage to determine - which action to take. - - This call requests notification once a second: -@code - AIErr error; - error = sTimer->AddTimer( message->d.self, "Time for Timer", kTicksPerSecond, &g->secondTimer ); -@endcode - */ - AIAPI AIErr (*AddTimer) ( SPPluginRef self, const char *name, ai::int32 period, - AITimerHandle *timer ); - - /** Retrieves the name string of a timer. - @param time The timer reference. - @param name [out] A buffer in which to return the name string. - Do not modify this string. - */ - AIAPI AIErr (*GetTimerName) ( AITimerHandle timer, char **name ); - - /** Reports whether a timer is active. An active timer receives - periodic notifications. - @param time The timer reference. - @param active [out] A buffer in which to return true if - the timer is active. - */ - AIAPI AIErr (*GetTimerActive) ( AITimerHandle timer, AIBoolean *active ); - - /** Activates or deactivates a timer. You must deactivate timers - as part of terminating the plug-in. - @param time The timer reference. - @param active True to activate the timer, false to deactivate it. - */ - AIAPI AIErr (*SetTimerActive) ( AITimerHandle timer, AIBoolean active ); - - /** Retrieves the notification interval for a timer. - @param time The timer reference. - @param period [out] A buffer in which to return the - interval, in clock ticks. . - */ - AIAPI AIErr (*GetTimerPeriod) ( AITimerHandle timer, ai::int32 *period ); - - /** Sets the notification interval for a timer. - @param time The timer reference. - @param period The new interval, in clock ticks. For seconds, - multiply the number of seconds by \c #kTicksPerSecond. - */ - AIAPI AIErr (*SetTimerPeriod) ( AITimerHandle timer, ai::int32 period ); - - /** Retrieves a reference to the plug-in that installed a timer, to - use with the \c #AIPluginSuite. - @param time The timer reference. - @param plugin [out] A buffer in which to return the - plug-in reference. - */ - AIAPI AIErr (*GetTimerPlugin) ( AITimerHandle timer, SPPluginRef *plugin ); - - /** Counts the number of timers available. Use with \c #GetNthTimer() - to iterate through installed timers. - @param count [out] A buffer in which to return the number - of installed timers. - */ - AIAPI AIErr (*CountTimers) ( ai::int32 *count ); - - /** Retrieves a timer by position index. Use with \c #CountTimers() - to iterate through installed timers. - @param n The 0-based position index. - @param timer [out] A buffer in which to return the timer reference. - */ - AIAPI AIErr (*GetNthTimer) ( ai::int32 n, AITimerHandle *timer ); - -} AITimerSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AITimer__ +#define __AITimer__ + +/* + * Name: AITimer.h + * $Revision: 5 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Timer Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AITimer.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAITimerSuite "AI Timer Suite" +#define kAITimerSuiteVersion AIAPI_VERSION(5) +#define kAITimerVersion kAITimerSuiteVersion + + +/** @ingroup Callers + See \c #AITimerSuite */ +#define kCallerAITimer "AI Timer" + +/** @ingroup Selectors + See \c #AITimerSuite */ +#define kSelectorAIGoTimer "AI Go" + +/** Default number of clock ticks per second. See \c #AITimerSuite */ +#define kTicksPerSecond 60 + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a timer, never dereferenced. Access with \c #AITimerSuite */ +typedef struct _t_AITimerOpaque *AITimerHandle; + +/** The contents of a timer message, sent with \c #kSelectorAIGoTimer */ +typedef struct { + /** The message data. */ + SPMessageData d; + /** The timer plug-in receiving the message. */ + AITimerHandle timer; +} AITimerMessage; + + +/******************************************************************************* + ** + ** Suite Record + ** + **/ + +/** @ingroup Suites + These functions allow you to schedule events by registering timer plug-ins. + Use these functions to add timers, turn timers on and + off, and enumerate and access the installed timer plug-ins. + + Illustrator notifies registered timer plug-ins when a specified period of + time has passed. It sends a message to the plug-in's main entry point + with caller \c #kCallerAITimer and selector \c #kSelectorAIGoTimer. + + Timer periods are specified in clock ticks. There are \c #kTicksPerSecond + ticks in a second. + + Timers are typically used in conjunction with other plug-ins, such as + menus or windows, which determine when an update is needed. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAITimerSuite and \c #kAITimerVersion. + */ +typedef struct { + + /** Adds a timer plug-in to Illustrator. Use at startup. + @param self This plug-in. + @param name The unique identifying name of the timer. + @param period The time period for notification, the number of + clock ticks that should pass before the timer is notified. + For seconds, multiply the number of seconds by \c #kTicksPerSecond. + @param timer [out] A buffer in which to return the timer reference. + If you install more than one timer plug-in, save to compare + to the reference passed in the \c #AITimerMessage to determine + which action to take. + + This call requests notification once a second: +@code + AIErr error; + error = sTimer->AddTimer( message->d.self, "Time for Timer", kTicksPerSecond, &g->secondTimer ); +@endcode + */ + AIAPI AIErr (*AddTimer) ( SPPluginRef self, const char *name, ai::int32 period, + AITimerHandle *timer ); + + /** Retrieves the name string of a timer. + @param time The timer reference. + @param name [out] A buffer in which to return the name string. + Do not modify this string. + */ + AIAPI AIErr (*GetTimerName) ( AITimerHandle timer, char **name ); + + /** Reports whether a timer is active. An active timer receives + periodic notifications. + @param time The timer reference. + @param active [out] A buffer in which to return true if + the timer is active. + */ + AIAPI AIErr (*GetTimerActive) ( AITimerHandle timer, AIBoolean *active ); + + /** Activates or deactivates a timer. You must deactivate timers + as part of terminating the plug-in. + @param time The timer reference. + @param active True to activate the timer, false to deactivate it. + */ + AIAPI AIErr (*SetTimerActive) ( AITimerHandle timer, AIBoolean active ); + + /** Retrieves the notification interval for a timer. + @param time The timer reference. + @param period [out] A buffer in which to return the + interval, in clock ticks. . + */ + AIAPI AIErr (*GetTimerPeriod) ( AITimerHandle timer, ai::int32 *period ); + + /** Sets the notification interval for a timer. + @param time The timer reference. + @param period The new interval, in clock ticks. For seconds, + multiply the number of seconds by \c #kTicksPerSecond. + */ + AIAPI AIErr (*SetTimerPeriod) ( AITimerHandle timer, ai::int32 period ); + + /** Retrieves a reference to the plug-in that installed a timer, to + use with the \c #AIPluginSuite. + @param time The timer reference. + @param plugin [out] A buffer in which to return the + plug-in reference. + */ + AIAPI AIErr (*GetTimerPlugin) ( AITimerHandle timer, SPPluginRef *plugin ); + + /** Counts the number of timers available. Use with \c #GetNthTimer() + to iterate through installed timers. + @param count [out] A buffer in which to return the number + of installed timers. + */ + AIAPI AIErr (*CountTimers) ( ai::int32 *count ); + + /** Retrieves a timer by position index. Use with \c #CountTimers() + to iterate through installed timers. + @param n The 0-based position index. + @param timer [out] A buffer in which to return the timer reference. + */ + AIAPI AIErr (*GetNthTimer) ( ai::int32 n, AITimerHandle *timer ); + +} AITimerSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITool.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITool.h index b02a3a9..751c311 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITool.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITool.h @@ -1,1115 +1,1203 @@ -#ifndef __AITool__ -#define __AITool__ - -/* - * Name: AITool.h - * Author: - * Date: - * Purpose: Adobe Illustrator Tool Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2011 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIEvent__ -#include "AIEvent.h" -#endif - -#ifndef __AIFixedMath__ -#include "AIFixedMath.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIToolNames__ -#include "AIToolNames.h" -#endif - - -#ifndef __ASHelp__ -#include "ASHelp.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef FLT_MAX -#include -#endif - -#include "AIHeaderBegin.h" -/** @file AITool.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIToolSuite "AI Tool Suite" -#define kAIToolSuiteVersion16 AIAPI_VERSION(16) -#define kAIToolSuiteVersion kAIToolSuiteVersion16 -#define kAIToolVersion kAIToolSuiteVersion - -/** @ingroup Notifiers - Sent when effective tool is changed, either permanently or temporarily - using modifier keys (such as Cmd, Cntl, or Spacebar). Data is \c #AIEffectiveToolChangeData - Replaces individual notifiers for tool suspend and resume actions that have been deprecated. - */ -#define kAIEffectiveToolChangedNotifier "AI Effective Tool Changed Notifier" - -/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead - Sent when a property of a plug-in tool is changed, such as - its options, title, icon, or tooltip. */ -#define kAIUserToolChangedNotifier "AI User Tool Changed Notifier" -/** @ingroup Notifiers - Sent when a tool is selected. The data is the \c #AIToolHandle. - Reselection of an already selected tool sends both - \c #kAIToolDeselectedNotifier and \c #kAIToolSelectedNotifier - with the \c #kSelectorAIReselectTool message. */ -#define kAIToolSelectedNotifier "AI Tool Selected Notifier" -/** @ingroup Notifiers - Sent when a tool is deselected. The data is the \c #AIToolHandle. */ -#define kAIToolDeselectedNotifier "AI Tool Deselected Notifier" -/** @ingroup Notifiers - Send to notify tools to invalidate their current view when a scroll - is happening on the document */ -#define kAIInvalidateByScrollNotifier "AI Invalidate By Scroll Notifier" -/** @ingroup Notifiers - Sent to notify tools that they should clear any editing state that - they maintain. Tools other than the current tool might - maintain editing state; for example, selecting the zoom tool - does not clear the editing state of the pen tool, which remembers - the path to which it is adding points. */ -#define kAIToolClearStateNotifier "AI Tool Clear State Notifier" -/** @ingroup Notifiers - Sent when the title string of a tool is changed. - See \c #AIToolSuite::SetToolTitle() */ -#define kAIToolTitleChangedNotifier "AI Tool Title Changed Notifier" -/** @ingroup Notifiers - Sent when a tool's rollover tooltip is changed. */ -#define kAIToolTooltipChangedNotifier "AI Tool Tooltip Changed Notifier" -/** @ingroup Notifiers - Sent when a tool's help ID is changed. See \c #AIToolSuite::SetToolHelpID() */ -#define kAIToolHelpIDChangedNotifier "AI Tool Help ID Changed Notifier" -/** @ingroup Notifiers -Sent when a tool's icon resources are changed. See \c #AIToolSuite::SetToolIcons() */ -#define kAIToolIconChangedNotifier "AI Tool Icon Resources Changed Notifier" -/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead - Sent when the current tool is changed to a different tool. */ -#define kAIToolChangedNotifier "AI Tool Changed Notifier" -/** @ingroup Notifiers - Sent when the tool window has changed. */ -#define kAIToolWindowChangedNotifier "AI Tool Window Changed Notifier" -/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead - Sent when the cursor leaves a document window. */ -#define kAIToolSuspendNotifier "AI Tool Suspend Notifier" -/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead - Sent when the cursor enters a document window. */ -#define kAIToolResumeNotifier "AI Tool Resume Notifier" -/** @ingroup Notifiers - Sent when \c #AIToolTabletPointerType is changed. */ -#define kAIToolTabletPointerTypeChangedNotifier "AI Tablet Pointer Type Changed Notifier" -/** @ingroup Notifiers - Sent when the modifier keys for the current tool are changed. */ -#define kAIToolModifiersChangedNotifier "AI Tool Modifiers Changed Notifier" -/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead - Sent when the user presses the space bar or Alt key(while in Text Tool) to select the scroll tool (\c #kScrollTool) - or zoom tool (\c #kZoomTool), or presses Ctrl+spacebar, or Ctrl+Alt+spacebar - while using another tool. */ -#define kAIToolSuspendedBySpacebarNotifier "AI Tool Suspended by Spacebar Notifier" -/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead - Sent when the user releases the spacebar (or Alt key(while in Text tool) or Ctrl+spacebar, or Ctrl+Alt+spacebar) - to resume using the original tool. */ -#define kAIToolResumedBySpacebarNotifier "AI Tool Resumed by Spacebar Notifier" -/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead - Sent when \c #kSelectTool, \c #kDirectSelectTool, or \c #kDirectObjectSelectTool - is temporarily reselected by pressing Ctrl(Windows) or Cmd(Macintosh) key while - using another tool. - For example, if \c #kDirectSelectTool is selected and you then choose the eraser tool, - pressing the Ctrl or Cmd key temporarily switches back to \c #kDirectSelectTool, and - sends this notification. */ -#define kAIToolSuspendedByCmdKeyNotifier "AI Tool Suspended by Cmd Key Notifier" -/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead - Sent when the original tool is restored from a temporary switch back to - \c #kSelectTool, \c #kDirectSelectTool, or \c #kDirectObjectSelectTool. - Sent when the Ctrl or Cmd key is released. - */ -#define kAIToolResumedByCmdKeyNotifier "AI Tool Resumed by Cmd Key Notifier" - - -// Notifiers sent by built-in tools - -/** @ingroup Notifiers - Sent by the eyedropper when it is selected and dragged. The data is - an \c #AIEyedropperDragNotifyData specifying the event and whether the - path style has changed as a result. */ -#define kAIEyedropperDragNotifier "AI Eyedropper Drag Notifier" - -/** @ingroup Callers - The tool caller. See \c #AIToolSuite. */ -#define kCallerAITool "AI Tool" - -/** @ingroup Selectors - Sent when the tool has been selected (double-clicked) in the Tool palette. - The plug-in can display a tool options dialog. - The message data is an \c #AIToolMessage. */ -#define kSelectorAIEditToolOptions "AI Edit Options" -/** @ingroup Selectors - Sent when the tool is selected and as the cursor is moved over the - artboard with the button up. The plug-in can set the - cursor based on location or some other factor. The message data is an \c #AIToolMessage. */ -#define kSelectorAITrackToolCursor "AI Track Cursor" -/** @ingroup Selectors - Sent when the mouse button is pressed. The message data is an \c #AIToolMessage - that contains the cursor location and modifier key information. */ -#define kSelectorAIToolMouseDown "AI Mouse Down" -/** @ingroup Selectors - Sent on drag (cursor move with button down). The plug-in receives a series - of these selectors. The message data is an \c #AIToolMessage that - contains the cursor location and modifier key information. */ -#define kSelectorAIToolMouseDrag "AI Mouse Drag" -/** @ingroup Selectors - Either follows the mouse-down selector immediately or ends - the mouse-drag selectors. The message data is an \c #AIToolMessage - that contains the cursor location and modifier key information. */ -#define kSelectorAIToolMouseUp "AI Mouse Up" -/** @ingroup Selectors - Sent to a plug-in when its tool has been selected, to allow - initialization. The message data is an \c #AIToolMessage. */ -#define kSelectorAISelectTool "AI Select" -/** @ingroup Selectors - Sent to a plug-in when a different tool is selected, to allow cleanup - of any run-time variables. The message data is an \c #AIToolMessage. */ -#define kSelectorAIDeselectTool "AI Deselect" -/** @ingroup Selectors - Sent when an already-selected tool is reselected, with both - \c #kAIToolDeselectedNotifier and \c #kAIToolSelectedNotifier. - The message data is an \c #AIToolMessage. */ -#define kSelectorAIReselectTool "AI Reselect" -/** @ingroup Selectors - Sent when shortcut '[' is activated to decrease a diameter. */ -#define kSelectorAIToolDecreaseDiameter "AI Decrease Diameter" -/** @ingroup Selectors - Sent when shortcut ']' is activated to increase a diameter. */ -#define kSelectorAIToolIncreaseDiameter "AI Increase Diameter" -/** @ingroup Selectors -Sent when the user requests a switch to an alternate selection tool by pressing Ctrl (in Windows) -or Cmd (in MacOS) key, while using a tool that allows alternate selection tool, to -determine whether the alternate selection tool is ready to be selected. -Valid return values are: -\li \c #kNoErr: Plug-in tool is not ready to be alternate selection tool. -\li \c #kAcceptAlternateSelectionToolReply: Plug-in tool is ready to be alternate selection tool. -The message data is an \c #AIToolMessage that -contains the alternate selection tool handle. */ -#define kSelectorAIAlternateSelectionToolQuery "AI Alternate Selection Tool Query" -/** @ingroup Selectors -Sent when the user switches to an alternate selection tool by pressing Ctrl (in Windows) -or Cmd (in MacOS) key while using a tool that allows alternate selection tool. -The message data is an \c #AIToolMessage that -contains the alternate-selection tool handle. */ -#define kSelectorAIAlternateSelectionToolActivate "AI Alternate Selection Tool Activate" -/** @ingroup Selectors -Sent when the user switches back from a temporary alternate selection tool. -The message data is an \c #AIToolMessage that -contains the alternate selection tool handle. */ -#define kSelectorAIAlternateSelectionToolDeActivate "AI Alternate Selection Tool DeActivate" - -/** @ingroup Errors -Return code for response to \c #kSelectorAIAlternateSelectionToolQuery when -the alternate selection tool is ready for selection. */ -#define kAcceptAlternateSelectionToolReply 'ASTR' - -/** @ingroup Selectors -This can be used to get strokes directly without listening to mouse down, drag and up events. -The message data is an \c #AIToolDryInkMessage -that contains the cursor location and modifier key information. */ -#define kSelectorAIToolDrawDryInk "AI Tool Draw Dry Ink" - -// Brush tools share these options, so if you add new ones, -// make sure they do not overlap with the brush tool options defined in -// AIBrushMgr.h, which start at 1L<<16 and go up. - -/** Bit flags for options that can be set by a plug-in tool when it is installed - with \c #AIToolSuite::AddTool(), or later with \c #AIToolSuite::SetToolOptions(). */ -enum AIToolOptions { - /** Set to receive \c #kSelectorAITrackToolCursor, which allows you to - control the cursor for your too. When off (the default), a standard arrow - cursor is used for the tool. */ - kToolWantsToTrackCursorOption = (1<<0), - /** Set to disable automatic scrolling. When off (the default), the Illustrator window - scrolls when a tool reaches the edge. For tools that manipulate artwork, - autoscroll is useful. Set this to turn autoscroll off for a tool that - draws to the screen directly, like the built-in Brush tool. */ - kToolDoesntWantAutoScrollOption = (1<<1), - /** Set to buffer the drag selectors and messages and send all of them - to the tool at once. Useful if a tool is calculation intensive. The effect - is no longer real-time, but has a smoother final output. - When off (the default), the tool processes drag selectors and returns frequently, - resulting in near real-time feedback. If there are intensive calculations - during the drag selector, the tool could miss drag notifications, resulting in rougher - tracking. */ - kToolWantsBufferedDraggingOption = (1<<2), - /** Set to maintain the edit context when this tool is selected. For art objects, - keeps all current points and handles selected. For text, keeps the insertion - point in the current location. Set this option for navigational tools like - the Zoom and Scroll tools. */ - kToolMaintainEditContextOption = (1<<3), - /** Set to maintain the text edit context when the tool is selected, - if \c #kToolMaintainEditContextOption is also set. */ - kToolIsTextToolOption = (1<<4), - /** Set to receive \c #kSelectorAIToolDecreaseDiameter and - \c #kSelectorAIToolIncreaseDiameter. Use if the tool needs to change - diameter when either '[' or ']' is pressed. */ - kToolWantsToChangeDiameterOption = (1<<5), - /** Set to allow switching to an alternate selection tool when user presses Ctrl (in Windows) or Cmd (in Mac OS). - This option can be set for any plug-in tool. Set the preferred alternate selection tool - using \c #AIToolSuite::SetAlternateSelectionToolName(). - By default, the alternate tool is \c #kSelectTool(), \c #kDirectSelectTool(), or \c #kDirectObjectSelectTool() - */ - kToolWantsAlternateSelectionTool = (1<<6), - - /** Set to hide a plugin toolset in the tool box. Hidden tools can still be used through shortcuts - or through suite APIs, but are not shown in the tool box. - Must be set or cleared on creation; you cannot change the hidden status with \c #AIToolSuite::SetToolOptions(). - Setting this option for a single tool in a toolset has no effect unless it is set for all tools in the toolset. - It is recommended that you create a set of hidden tools, then show and hide individual tools by adding them to - or removing them from the hidden set. - */ - kToolWantsHiddenToolOption = (1<<7), - - /** Indicates that the tool does not support soft selection modes, when used with the tablet/pen. \c #AIToolSuite::SetSoftSelectedTool(). - The inverted tablet pen tool will still function as the original tool. - */ - kToolDoesntWantSoftSelectionOption = (1<<8), - - /** Indicates that tool does want OS to draw its wet ink and provide its final Ink points to render rather than listening to mouse events - */ - kToolWantsOSHandleInk = (1<<9) - -}; - - -/** Tool information values. See \c #AIToolSuite::SetToolInfoVars(). - All values are real numbers, except these string values, - which are platform-encoded strings passed as \c char*: -
\c kInfoFontAndSize -
\c kInfoTrackOrKern -
\c kInfoText1-6 and \c kInfoLongText1-3 -

\c kInfoTextUnicode1-6 and \c kInfoLongTextUnicode1-3 refer to the - same Info palette slots as \c kInfoText1-6 and \c kInfoLongText1-3, but - values are \c ai::UnicodeString*, which is treated as \c const. - */ -enum AIToolInfoVariable { - kInfoPageX = 0, - kInfoPageY, - kInfoSizeX, - kInfoSizeY, - kInfoDistance, - kInfoVectorAngle, - kInfoScaleX, - kInfoScaleY, - kInfoZoom, - kInfoCornerRoundness, - kInfoRotAngle, - kInfoShearAngle, - kInfoFontAndSize, - kInfoTrackOrKern, - kInfoRawRotAngle, - kInfoDocX, - kInfoDocY, - kInfoText1, - kInfoText2, - kInfoText3, - kInfoText4, - kInfoText5, - kInfoText6, - kInfoLongText3, - /** New in AI15: Pass Custom String for: X Y W H display in info palette */ - kInfoTextX, - kInfoTextY, - kInfoTextW, - kInfoTextH, - - kInfoNumVars, - kInfoBlank, - - // new in AI 12 - kInfoTextUnicode1, - kInfoTextUnicode2, - kInfoTextUnicode3, - kInfoTextUnicode4, - kInfoTextUnicode5, - kInfoTextUnicode6, - kInfoLongTextUnicode1, - kInfoLongTextUnicode2, - kInfoLongTextUnicode3, - - // overlayed items. - kInfoLongText1 = kInfoFontAndSize, - kInfoLongText2 = kInfoTrackOrKern, - - - kInfoEndOfList = -1 // Use this to terminate the infoVars list -}; - -/** An \c #AIToolType value that creates a new group or toolset. - See @ref Toolsets */ -#define kNoTool -2 - -/** A tool number used to indicate a tool group or toolset. - See @ref Toolsets and \c #AIToolSuite::GetToolNumberFromName() */ -typedef short AIToolType; - -/** Tool numbers less than this value are built-in, - numbers greater than this are plug-in. See @ref Toolsets - and \c #AIToolSuite::GetToolNumberFromName() */ -#define kPluginToolOffset 1000 - -/** @ingroup Errors - See \c #AIToolSuite */ -#define kToolCantTrackCursorErr 'TLTK' - -//ToolTime for GetToolNullEventInterval. This type is to be deprecated ASAP. -// <> -typedef double AIToolTime; //Time in Seconds - -#define kToolTimeDurationSecond ((AIToolTime)1.0) -#define kToolTimeDurationMillisecond ((AIToolTime)(kToolTimeDurationSecond/1000)) -#define kToolTimeDurationNoWait ((AIToolTime)0.0) -#define kToolTimeDurationForever ((AIToolTime)(-1.0)) - -#define kToolNormalIconDictKey "ToolNormalIconDictKey" -#define kToolDarkNormalIconDictKey "ToolDarkNormalIconDictKey" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a tool plug-in, never dereferenced. - Access with \c #AIToolSuite. */ -typedef struct _t_AIToolOpaque *AIToolHandle; - -/** Information about the change that caused a - \c #kAIEffectiveToolChangedNotifier notification */ -struct AIEffectiveToolChangeData -{ - /** Name of currently effective tool */ - const char* currentToolName; - /** Name of previous effective tool */ - const char* lastToolName; - /** True if tool change is temporary, false if it - is permanent. Temporary changes occur when user - presses a modifier key such as Cmd or Space. */ - AIBoolean isToolChangeTemporary; - /** Tool handle for current effective tool. - Can be null in case of select or direct-select tool.*/ - AIToolHandle currentToolHandle; - /** Tool handle for previous effective tool. - Can be null if previous tool was select or direct-select, - or if tool has not yet been changed since app launch. */ - AIToolHandle lastToolHandle; -}; - -/** Information needed to add a tool using \c #AIToolSuite::AddTool(). */ -struct AIAddToolData { - /** Display name for tool. */ - const char *title; - /** Short descriptive string shown when tool is activated. */ - const char *tooltip; - /** The Help system identifier. */ - ASHelpID helpID; - /** The icon shown in the Tools palette; must be of type 'PNGI' */ - ai::uint32 normalIconResID; - /** The icon shown in the Tools palette in dark mode; must be of type 'PNGI' */ - ai::uint32 darkIconResID; - /** The Tools palette group to which this tool belongs. - A tool number or \c #kNoTool to create a new group. - See @ref Toolsets. */ - AIToolType sameGroupAs; - /** The Tools palette toolset to which this tool belongs. - A tool number or \c #kNoTool to create a new toolset. - See @ref Toolsets. */ - AIToolType sameToolsetAs; -}; - -/** For internal use only. */ -typedef struct _AIDataStack *AIDataStackRef; - -/** For internal use only. */ -struct AIAddToolDataPrivate { - /** Display name for tool. */ - const char *title; - /** Short descriptive string shown when tool is activated. */ - const char *tooltip; - /** The Help system identifier. */ - ASHelpID helpID; - /** The icon shown in the Tools palette. */ - AIDataStackRef iconResourceDictionary; - /** The Tools palette group to which this tool belongs. - A tool number or \c #kNoTool to create a new group. - See @ref Toolsets. */ - AIToolType sameGroupAs; - /** The Tools palette toolset to which this tool belongs. - A tool number or \c #kNoTool to create a new toolset. - See @ref Toolsets. */ - AIToolType sameToolsetAs; -}; - -/** An \c #AIToolTabletPointerTypeValue describing a type of pointing device. - Used with a pressure-sensitive input device, such as a graphic tablet. */ -typedef ai::int16 AIToolTabletPointerType; - -/** \c #AIToolTabletPointerType constants that describe the type of - input being received from input devices. */ -enum AIToolTabletPointerTypeValue -{ - kAIToolTabletPointerTypeUnknown = 0, - /** Pen end of a stylus. */ - kAIToolTabletPointerTypePen, - /** Mouse or other non-pressure-sensitive pointer device. */ - kAIToolTabletPointerTypeCursor, - /** Eraser end of a stylus. */ - kAIToolTabletPointerTypeEraser -}; - -/** An \c #AIToolPressureValue indicating the amount of force being - applied with a pressure-sensitive input device, such as a graphic tablet. */ -typedef ai::int16 AIToolPressure; -/** \c #AIToolPressure constants that indicate an amount of force applied to a - pressure-sensitive input device. */ -enum AIToolPressureValue -{ - /** The maximum pressure applied by a tool */ - kAIMaxToolPressure = 255, - /** The minimal pressure applied by a tool */ - kAIMinToolPressure = 0, - /** A default value for when there is no pressure data. */ - kAINormalToolPressure = 127 -}; - -/** An \c #AIToolAngleValue describing values of an input device - such as tilt, rotation and bearing of a pen on a graphic tablet. */ -typedef ai::int16 AIToolAngle; -/** \c #AIToolAngle constants that describe values of an input device - such as tilt, rotation and bearing of a pen on a graphic tablet. */ -enum AIToolAngleValue -{ - /** Angle constants in degrees */ - kAIToolAngle0 = 0, - kAIToolAngle90 = 90, - kAIToolAngleNegative179 = -179, - kAIToolAngle180 = 180, - kAIToolAngle360 = 360, - - /** Bearing ranges from -179 to 180 where 0 is up */ - kAIToolMinBearing = kAIToolAngleNegative179, - kAIToolMaxBearing = kAIToolAngle180, - kAIToolNormalBearing = kAIToolAngle0, - - /** Rotation ranges from -179 to 180 where 0 is up */ - kAIToolMinRotation = kAIToolAngleNegative179, - kAIToolMaxRotation = kAIToolAngle180, - kAIToolNormalRotation = kAIToolAngle0, - - /** Tilt ranges from 0 to 90 where 0 means the pen barrel is perpendicular to the tablet's plane - and 90 means the pen barrel is parallel to the tablet's plane. */ - kAIToolMinTilt = kAIToolAngle0, - kAIToolMaxTilt = kAIToolAngle90, - kAIToolNormalTilt = kAIToolMinTilt -}; -/** \c #AITabletCapabilities constants that describe the hardware capabilities of a graphic tablet/ Integrated digitizer. -*/ -enum AITabletCapabilities -{ - /* X-coordinate in the tablet coordinate space. */ - kXCoordinate = 1 << 0, - /* Y-coordinate in the tablet coordinate space. */ - kYCoordinate = 1 << 1, - /* Z-coordinate or the distance of the pen tip from the tablet. */ - kZCoordinate = 1 << 2, - /* Pressure of pen tip perpendicular to tablet surface. */ - kNormalPressure = 1 << 3, - /* Pressure of the pen tip along the plane of the tablet surface. */ - kTangentPressure = 1 << 4, - /* Angle between the axis of pen and the surface of the tablet. */ - kAltitudeOrientation = 1 << 5, - /* Clockwise rotation of the cursor around the z-axis through a full circular range. */ - kAzimuthOrientation = 1 << 6, - /* Clockwise rotation of the cursor around its own axis. */ - kTwistOrientation = 1 << 7 -}; -/** History Data associated with an Event. */ -struct AIEventHistoryData -{ - /** The location of the event */ - AIPoint position; - /** For graphic tablets, tangential pressure on the finger wheel of the airbrush tool. */ - AIToolPressure stylusWheel; - /** How the tool is angled, also called altitude or elevation. */ - AIToolAngle tilt; - /** The direction of tilt, measured clockwise in degrees around the Z axis, also called azimuth, */ - AIToolAngle bearing; - /** Rotation of the tool, measured clockwise in degrees around the tool's barrel. */ - AIToolAngle rotation; -}; -/** The contents of a tool message. */ -struct AIToolMessage { - /** The message data. */ - SPMessageData d; - /** The tool plug-in receiving the message. - If the plug-in has more than one tool installed, it can - determine which one was selected by comparing this handle - to those it has saved in the \c globals variable. */ - AIToolHandle tool; - /** The location of the mouse cursor in page coordinates. */ - AIRealPoint cursor; - /** The amount of force being applied to a pressure-sensitive input device, - such as a graphics tablet. Use \c #AIToolSuite::SystemHasPressure() - to determine if such a device is in use. */ - AIToolPressure pressure; - /** For mouse selectors, the ADM event record for the mouse event, - containing additional information about the event. (ADM is no longer supported).*/ - AIEvent *event; - /** For graphic tablets, tangential pressure on the finger wheel of the airbrush tool. */ - AIToolPressure stylusWheel; - /** How the tool is angled, also called altitude or elevation. */ - AIToolAngle tilt; - /** The direction of tilt, measured clockwise in degrees around the Z axis, also called azimuth, */ - AIToolAngle bearing; - /** Rotation of the tool, measured clockwise in degrees around the tool's barrel. */ - AIToolAngle rotation; - /** The history data associated with the event */ - ai::AutoBuffer eventHistoryData; -}; - -/** The contents of a tool notification. */ -struct AIToolNotifyData { - /** The tool plug-in receiving the notification. If you install more than one tool, - compare to your saved reference to decide how to handle the notification. */ - AIToolHandle tool; -}; - -/** The contents of an eyedropper drag notification, \c #kAIEyedropperDragNotifier. */ -struct AIEyedropperDragNotifyData { - /** The ADM event record for the mouse event. (ADM is no longer supported). */ - AIEvent event; - /** True if the path style has changed as a result of the drag event. */ - AIBoolean pathStyleChanged; -}; - -struct AIDocumentInkParams -{ - enum PenTipShape - { - kPenTipShapeCircle, - kPenTipShapeRectangle - }; - PenTipShape fShape; - AIColor fColor; - AIPoint fSize; - - AIDocumentInkParams() :fShape(kPenTipShapeCircle) - { - fColor.kind = kThreeColor; - fColor.c.rgb.red = 0.0f; - fColor.c.rgb.green = 0.0f; - fColor.c.rgb.blue = 0.0f; - fSize.h = 1; - fSize.v = 1; - } -}; - - -struct AIDocumentInkPoint -{ - AIRealPoint fLocation; - AIToolPressure fPressure; - AIToolPressure fStylusWheel; - AIToolAngle fRotation; - AIToolPressure fBearing; - AIToolPressure fTilt; - - AIDocumentInkPoint() - { - fLocation.h = 0.0; - fLocation.v = 0; - fPressure = 0; - fStylusWheel = kAIToolMinRotation; - fBearing = kAIToolMinBearing; - fRotation = kAIToolMinRotation; - fTilt = kAIToolMinTilt; - } -}; - -/** The contents of a tool message. */ -struct AIToolDryInkMessage { - /** The message data. */ - SPMessageData d; - /** The tool plug-in receiving the message. - If the plug-in has more than one tool installed, it can - determine which one was selected by comparing this handle - to those it has saved in the \c globals variable. */ - AIToolHandle tool; - - /** Future use We might need this for modifiers*/ - AIEvent *event; - - ai::AutoBuffer inkStrokes; - - AIToolDryInkMessage() :tool(0), event(nil) - {} -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to provide plug-in tools for Illustrator. - Plug-in tools can work on existing artwork or create new objects. - Tools that you add appear in the Illustrator Tool palette in their own set, - or as part of an existing tool set. Use the functions in this suite - to add tools, set options, and control the tool’s appearance in the palette. - - Typically, you set the options that control the behavior of a plug-in tool - when you install the tool with \c #AIToolSuite::AddTool(). You can modify - them later with \c #AIToolSuite::SetToolOptions(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIToolSuite and \c #kAIToolVersion. - - @section Toolsets Toolsets and Groups in the Tools Palette - - In the Tools palette, \e a toolset is a collection related tools. - When there is more than one tool in a toolset, only the frontmost tool's - icon is shown in the palette, with a triangle in the lower left corner - to indicate the presence of additional tools. The entire toolset - is shown when the user holds the mouse button down on the topmost tool. - - A \e group is a collection of toolsets. Groups are separated by vertical - space in the palette. - - To create a new group or toolset, pass \c #kNoTool for - \c #AIAddToolData::sameGroupAs or \c #AIAddToolData::sameToolsetAs. - For example, to create a new tool group: - @code -toolData.title = "MyTool1"; -toolData.tooltip = "MyTool1 Tooltip"; -toolData.sameGroupAs = kNoTool; -toolData.sameToolsetAs = kNoTool; - @endcode - - To add a new toolset to this group: - @code -toolData.title = "MyTool2"; -toolData.tooltip = "MyTool2 Tooltip"; -error = sTool->GetToolNumberFromName("MyTool1", &toolData.sameGroupAs); -toolData.sameToolsetAs = kNoTool; - @endcode - - To add tools to this toolset: - @code -toolData.title = "MyTool2a"; -toolData.tooltip = "Tool2a Tooltip"; -error = sTool->GetToolNumberFromName("MyTool1", &toolData.sameGroupAs); -error = sTool->GetToolNumberFromName("MyTool2", &toolData.sameToolsetAs); - @endcode - - @section ToolBehavior Tool Behavior - - Implement tool behavior by defining handlers for the caller/selector pairs - and messages that plug-in tools receive, particularly the mouse selectors. - Check for selectors in the plug-in's main function. - - Your mouse selector handlers can create or modify art objects directly. - A tool can select and work on several art objects at once. - The application updates the window between calls to the plug-in, so the - new or changed artwork appears as the mouse moves. - Use \c #AIUndoSuite::UndoChanges() before processing the tool drag, - in order to maintain a known artwork state from which to redraw changes. - - Because multiple plug-ins can be running at once, - the artwork state can change in the course of using your tool. - To verify that a specific artwork state exists, you can use a plug-in - notifier to indicate that the artwork selection or properties - have been changed. See the \c #AINotifierSuite. - - The caller for tool plug-ins is \c #kCallerAITool. - - These selectors are sent: -
\c #kSelectorAIEditToolOptions -
\c #kSelectorAITrackToolCursor -
\c #kSelectorAIToolMouseDown -
\c #kSelectorAIToolMouseDrag -
\c #kSelectorAIToolMouseUp -
\c #kSelectorAISelectTool -
\c #kSelectorAIDeselectTool -
\c #kSelectorAIReselectTool - - These notifiers are related to tools: -
\c #kAIUserToolChangedNotifier -
\c #kAIToolSelectedNotifier -
\c #kAIToolDeselectedNotifier -
\c #kAIToolClearStateNotifier -
\c #kAIToolTitleChangedNotifier -
\c #kAIToolTooltipChangedNotifier -
\c #kAIToolHelpIDChangedNotifier -
\c #kAIToolChangedNotifier -
\c #kAIToolWindowChangedNotifier -
\c #kAIToolSuspendNotifier -
\c #kAIToolResumeNotifier -
\c #kAIEyedropperDragNotifier - - */ -struct AIToolSuite { - - /** Installs a plug-in tool. Use at startup. - @param self This plug-in. - @param name The unique name of this tool. - @param data Information on how to display this tool in the Tool palette. - @param options Option flags that control the tool's behavior, a logical OR - of \c #AIToolOptions constants. - @param tool [out] A buffer in which to return the tool reference. If you - install multiple tools, save to compare to the tool reference in tool - message data. - */ - AIAPI AIErr (*AddTool) ( SPPluginRef self, const char *name, - AIAddToolData *data, ai::int32 options, - AIToolHandle *tool ); - - /** For internal use only */ - AIAPI AIErr (*AddToolPrivate) ( SPPluginRef self, const char *name, - AIAddToolDataPrivate *data, ai::int32 options, - AIToolHandle *tool ); - - /** Retrieves the unique identifying name of a tool. - To get the localizable title that appears in the UI, use \c #GetToolTitle(). - @param tool The tool reference. - @param name [out] A pointer to point to the name string. Do - not modify this string. - */ - AIAPI AIErr (*GetToolName) ( AIToolHandle tool, char **name ); - - /** Retrieves the option flags of a tool. To retain the existing flags when - setting options with \c #SetToolOptions(), obtain them with this function - and do a logical OR with the new flags. - @param tool The tool reference. - @param options [out] A buffer in which to return the options value, a logical - OR of \c #AIToolOptions constants. - */ - AIAPI AIErr (*GetToolOptions) ( AIToolHandle tool, ai::int32 *options ); - - /** Sets the option flags of a tool. To retain the existing flags when - setting options, obtain them with \c #GetToolOptions() - and do a logical OR with the new flags. - @param tool The tool reference. - @param options The new options value, a logical OR of \c #AIToolOptions constants. - */ - AIAPI AIErr (*SetToolOptions) ( AIToolHandle tool, ai::int32 options ); - - /** Retrieves the plug-in that installed a tool. - @param tool The tool reference. - @param plugin [out] A buffer in which to return the plug-in reference, - which can be used with \c #AIPluginSuite functions. - */ - AIAPI AIErr (*GetToolPlugin) ( AIToolHandle tool, SPPluginRef *plugin ); - - /** Retrieves the currently selected plug-in tool. If the current tool - is a built-in tool, returns NULL. - See \c #AIToolboxSuite::GetCurrentToolType() or \c #GetCurrentToolName() - for retrieving the current tool including built-in tools. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetSelectedTool) ( AIToolHandle *tool ); - - /** Selects a plug-in tool programmatically. This is the same as the user - selecting the tool in the Tool palette. - To select built-in tools, see \c #SetSelectedToolByName() - @param tool The tool reference. - */ - AIAPI AIErr (*SetSelectedTool) ( AIToolHandle tool ); - - /** Gets the number of installed plug-in tools. Use with \c #GetNthTool() - to iterate through plug-in tools. - @param count [out] A buffer in which to return the number of tools. - */ - AIAPI AIErr (*CountTools) ( ai::int32 *count ); - - /** Retrieves a tool by index position. Use with \c #CountTools() - to iterate through plug-in tools. - @param n The 0-based position index. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetNthTool) ( ai::int32 n, AIToolHandle *tool ); - - /** Retrieves a plug-in tool by its tool number, as assigned when it is created - with \c #AddTool(), and obtained by calling \c #GetToolNumberFromHandle. - See @ref Toolsets. - If the toolNum is the number of a built-in tool, returns NULL, since - built-in tools do not have an AIToolHandle. - @param toolNum The tool number. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetToolHandleFromNumber) ( AIToolType toolNum, AIToolHandle *tool ); - - /** Retrieves a tool number from a tool's unique name. Use to find the numbers of - built-in tools, in order to place your tool in an existing group or toolset. - See @ref Toolsets. - @param name The tool name. The names of Illustrator's built-in tools - can be found in \c AIToolNames.h. - @param toolNum [out] A buffer in which to return the tool number. - */ - AIAPI AIErr (*GetToolNumberFromName) ( const char *name, AIToolType *toolNum ); - - /** Retrieves a tool number for a tool. Use to find the numbers of - plug-in tools, in order to place your tool in an existing group or toolset. - See @ref Toolsets. - @param tool The tool reference. - @param toolNum [out] A buffer in which to return the tool number. */ - AIAPI AIErr (*GetToolNumberFromHandle) ( AIToolHandle tool, AIToolType *toolNum ); - - /** Retrieves the unique name of a tool from its number. To get the localizable - title that appears in the UI, use \c #GetToolTitle(). - @param toolNum The tool number. - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr (*GetToolNameFromNumber) ( AIToolType toolNum, char **name ); - - /** Retrieves the localizable title of a tool, which appears in the UI. - To get the unique, identifying name, use \c #GetToolName(). - @param tool The tool reference. - @param title [out] A pointer to point to the title string. Do not modify - this string. - */ - AIAPI AIErr (*GetToolTitle) ( AIToolHandle tool, char **title ); - - /** Sets the localizable title of a tool, which appears in the UI. - @param tool The tool reference. - @param title The new title string. - */ - AIAPI AIErr (*SetToolTitle) ( AIToolHandle tool, const char *title ); - - - /** Retrieves the tooltip string for a tool. - @param tool The tool reference. - @param tooltip [out] A pointer to point to the tooltip string. Do not modify - this string. - */ - AIAPI AIErr (*GetTooltip) ( AIToolHandle tool, char **tooltip ); - - /** Sets the tooltip string for a tool. - @param tool The tool reference. - @param tooltip The new tooltip string. - */ - AIAPI AIErr (*SetTooltip) ( AIToolHandle tool, const char *tooltip ); - - /** Retrieves the help-system identifier for a tool. - @param tool The tool reference. - @param helpID [out] A buffer in which to return the help ID, - which can be an integer or a pooled string. - */ - AIAPI AIErr (*GetToolHelpID) ( AIToolHandle tool, ASHelpID *helpID ); - - /** Sets the help-system identifier for a tool. - @param tool The tool reference. - @param helpID The new help ID, which can be an integer or a pooled string. - */ - AIAPI AIErr (*SetToolHelpID) ( AIToolHandle tool, ASHelpID helpID ); - - /** Determines which labeled fields are displayed in the Info palette for a tool. - Typically called once at startup to initialize the Info palette. - @param tool The tool reference. - @param infoVars A pointer to the first member of an array of - information variables, which correspond to labeled fields - in Illustrator’s Info palette, as defined in \c #AIToolInfoVariable. - Only the fields included in this array are shown for the tool. - To initialize or set the values in the fields, use \c #SetToolInfoVarValues(). - */ - AIAPI AIErr (*SetToolInfoVars) ( AIToolHandle tool, const ai::int32 infoVars[] ); - - /** Sets field values in the Info palette. Only those fields specified by - \c #SetToolInfoVars() are displayed in the palette. - @param infoVars A pointer to the first member of an array of - information variables, which correspond to labeled fields - in Illustrator’s Info palette. This is the same array specified - by \c #SetToolInfoVars(). - @param values A pointer to the first member of an array of values, - whose positions match those in the \c infoVars array. - - \b Example: -@code -AIErr UpdateInfoPalette( AIToolHandle tool, AIRealPoint origin, AIArtHandle art ) -{ - ASErr error = kNoErr; - if (art) { - static const long infoVars = { kInfoDocX, kInfoDocY, kInfoSizeX, kInfoSizeY, kInfoEndOfList }; - AIReal *infoValues[4]; - AIReal temp[2]; - AIRealRect artBounds; - error = sAIArt->GetArtTransformBounds( art,0, kStroke, &artBounds); - if ( error ) - return error; - temp[0] = artBounds.right - artBounds.left; - temp[1] = artBounds.bottom - artBounds.top; - infoValues[0] = &origin.h; - infoValues[1] = &origin.v; - infoValues[2] = temp; - infoValues[3] = temp +1; - error = sAITool->SetToolInfoVarValues( infoVars, (void**)infoValues); - if ( error ) - return error; - } -} -@endcode - */ - AIAPI AIErr (*SetToolInfoVarValues) ( const ai::int32 *infoVars, void **values ); - - /** Reports whether a pressure-sensitive device such as a graphics tablet - was available on application startup. - @param hasPressure [out] A buffer in which to return true if - a pressure-sensitive device is in use. - */ - AIAPI AIErr (*SystemHasPressure) ( AIBoolean *hasPressure ); - - // New for AI10 - - /** @deprecated Obsolete. Do not use. */ - AIAPI AIErr (*GetToolNullEventInterval) (AIToolHandle tool, AIToolTime *outTime); - - /** @deprecated Obsolete. Do not use. */ - AIAPI AIErr (*SetToolNullEventInterval) (AIToolHandle tool, AIToolTime inTime); - - // New for AI13 - - /** Selects a plug-in tool, but does not highlight - it in the palette or show its tool name in the status bar of the document - window. Indicates this \e soft selection by setting the \c isSoftMode flag. - \c #SetSelectedTool() turns this flag off. - @param tool The tool reference. - */ - AIAPI AIErr (*SetSoftSelectedTool) ( AIToolHandle tool ); - - /** Reports whether there is currently a \e soft tool selection. - Soft mode is entered when a tool, such as the rectangle tool, is - selected and the user implicitly overrides this by drawing with the eraser - end of a tablet stylus. - @param isSoftMode [out] A buffer in which to return true if there is a - soft tool selection. - */ - AIAPI AIErr (*IsSoftModeSelection) ( AIBoolean *isSoftMode ); - - /** Retrieves the name of the tool that will be temporarily selected by pressing Ctrl (in Windows) - or Cmd (in MacOS) key while using this tool. - Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. - @param tool This tool. - @param name A buffer in which to return the name of the alternate selection tool. - */ - AIAPI AIErr (*GetAlternateSelectionToolName) (AIToolHandle tool, char **name); - - /** Sets the tool that will be temporarily selected by pressing Ctrl (in Windows) - or Cmd (in Mac OS) key while using this tool. - Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. - @param tool This tool. - @param name The name of the alternate selection tool. - */ - AIAPI AIErr (*SetAlternateSelectionToolName) (AIToolHandle tool, const char* alternateTool); - - // New for AI16: support for plug-in access to built-in tools - - /** Retrieves the unique name of the currently selected tool. This is the same - name you get from calling \c #AIToolboxSuite::GetCurrentToolType() - followed by \c #GetToolNameFromNumber(). - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr (*GetCurrentToolName) ( const char **name ); - - /** Retrieves the unique name of the currently active tool. This is the same - name you get from \c #currentToolName from \c #AIEffectiveToolChangeData. - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr(*GetCurrentEffectiveToolName) (const char **name); - - /** Retrieves the numerical identifier of the most recently used built-in selection tool, - and optionally retrieves the unique name of the tool, from \c AIToolNames.h. - (Note that this function returns an \c #AIToolType, not an error code.) - @param name [out][optional] A buffer in which to return the name string. - Do not modify this string. Copy it immediately to use it. - @return The numerical identifier. - */ - - AIAPI AIToolType (*GetLastUsedSelectionTool) ( const char **name ); - - /** Select a tool by its unique name identifier. Can be either the name of a plug-in tool, - returned by \c #GetToolName(), or one of the tool name constants from \c AIToolNames.h. - @param name The name of the tool to be selected. - */ - AIAPI AIErr (*SetSelectedToolByName) ( const char *name ); - - /** Reports the hardware capabilities of a graphical tablet or integrated digitizer. - @param hardwareCapabilities [out] A buffer in which to return a - logical OR of \c #AITabletCapabilities contants. - - */ - AIAPI AIErr (*GetTabletHardwareCapabilities) ( ai::int32* hardwareCapabilities ); - - /** Sets tool icons to be used with light and dark UI themes. - @param tool[in] The tool reference. - @param normalIconResource[in] Base file name (without extension) of the PNG icon resource for the light UI theme. - @param darkNormalIconResource[in] Base file name (without extension) of the PNG icon resource for the dark UI theme. - */ - AIAPI AIErr (*SetToolIcons) (AIToolHandle tool, const char *normalIconResourceName, const char *darkNormalIconResourceName); - - /**Retrieves the base filenames (without extension) of the PNG icon resources associated with a tool. - @param tool[in] The tool reference. - @param normalIconResource[out] A buffer in which to return the resource name for light UI theme icon. - @param darkNormalIconResource[out] A buffer in which to return the resource name for dark UI theme icon. - */ - AIAPI AIErr(*GetToolIcons) (const AIToolHandle tool, char **normalIconResourceName, char **darkNormalIconResourceName); - - /** - */ - AIAPI AIErr(*SetDocumentInkParams)(const AIToolHandle tool, const AIDocumentInkParams& inDocInkParams); -}; - - -#include "AIHeaderEnd.h" - - -#endif +#pragma once + +/* + * Name: AITool.h + * Author: + * Date: + * Purpose: Adobe Illustrator Tool Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2017 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AITypes.h" +#include "AIArt.h" +#include "AIEvent.h" +#include "AIFixedMath.h" +#include "AIPlugin.h" +#include "AIToolNames.h" +#include "ASHelp.h" +#include "AIColor.h" + +#ifndef FLT_MAX +#include +#endif + +#include "AIHeaderBegin.h" + +/** @file AITool.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIToolSuite "AI Tool Suite" +#define kAIToolSuiteVersion19 AIAPI_VERSION(19) +#define kAIToolSuiteVersion kAIToolSuiteVersion19 +#define kAIToolVersion kAIToolSuiteVersion + +/** @ingroup Notifiers + Sent when effective tool is changed, either permanently or temporarily + using modifier keys (such as Cmd, Cntl, or Spacebar). Data is + \c #AIEffectiveToolChangeData. + Replaces individual notifiers for tool suspend and resumes actions that have + been deprecated. + @note This notifier is not sent during application startup. */ +#define kAIEffectiveToolChangedNotifier "AI Effective Tool Changed Notifier" + +/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead + Sent when a property of a plug-in tool is changed, such as + its options, title, icon, or tooltip. */ +#define kAIUserToolChangedNotifier "AI User Tool Changed Notifier" +/** @ingroup Notifiers + Sent when a tool is selected. The data is the \c #AIToolHandle. + Reselection of an already selected tool sends both + \c #kAIToolDeselectedNotifier and \c #kAIToolSelectedNotifier + with the \c #kSelectorAIReselectTool message. */ +#define kAIToolSelectedNotifier "AI Tool Selected Notifier" +/** @ingroup Notifiers + Sent when a tool is deselected. The data is the \c #AIToolHandle. */ +#define kAIToolDeselectedNotifier "AI Tool Deselected Notifier" +/** @ingroup Notifiers + Send to notify tools to invalidate their current view when a scroll + is happening on the document */ +#define kAIInvalidateByScrollNotifier "AI Invalidate By Scroll Notifier" +/** @ingroup Notifiers + Sent to notify tools that they should clear any editing state that + they maintain. Tools other than the current tool might + maintain editing state; for example, selecting the zoom tool + does not clear the editing state of the pen tool, which remembers + the path to which it is adding points. */ +#define kAIToolClearStateNotifier "AI Tool Clear State Notifier" +/** @ingroup Notifiers + Sent when the title string of a tool is changed. + See \c #AIToolSuite::SetToolTitle() */ +#define kAIToolTitleChangedNotifier "AI Tool Title Changed Notifier" +/** @ingroup Notifiers + Sent when a tool's rollover tooltip is changed. */ +#define kAIToolTooltipChangedNotifier "AI Tool Tooltip Changed Notifier" +/** @ingroup Notifiers + Obsolete. Not sent anymore. */ +#define kAIToolHelpIDChangedNotifier "AI Tool Help ID Changed Notifier" +/** @ingroup Notifiers +Sent when a tool's icon resources are changed. See \c #AIToolSuite::SetToolIcons() */ +#define kAIToolIconChangedNotifier "AI Tool Icon Resources Changed Notifier" +/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead + Sent when the current tool is changed to a different tool. */ +#define kAIToolChangedNotifier "AI Tool Changed Notifier" +/** @ingroup Notifiers + Sent when the tool window has changed. */ +#define kAIToolWindowChangedNotifier "AI Tool Window Changed Notifier" +/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead + Sent when the cursor leaves a document window. */ +#define kAIToolSuspendNotifier "AI Tool Suspend Notifier" +/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead + Sent when the cursor enters a document window. */ +#define kAIToolResumeNotifier "AI Tool Resume Notifier" +/** @ingroup Notifiers + Sent when \c #AIToolTabletPointerType is changed. */ +#define kAIToolTabletPointerTypeChangedNotifier "AI Tablet Pointer Type Changed Notifier" +/** @ingroup Notifiers + Sent when the modifier keys for the current tool are changed. */ +#define kAIToolModifiersChangedNotifier "AI Tool Modifiers Changed Notifier" +/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead + Sent when the user presses the space bar or Alt key(while in Text Tool) to select the scroll tool (\c #kScrollTool) + or zoom tool (\c #kZoomTool), or presses Ctrl+spacebar, or Ctrl+Alt+spacebar + while using another tool. */ +#define kAIToolSuspendedBySpacebarNotifier "AI Tool Suspended by Spacebar Notifier" +/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead + Sent when the user releases the spacebar (or Alt key(while in Text tool) or Ctrl+spacebar, or Ctrl+Alt+spacebar) + to resume using the original tool. */ +#define kAIToolResumedBySpacebarNotifier "AI Tool Resumed by Spacebar Notifier" +/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead + Sent when \c #kSelectTool, \c #kDirectSelectTool, or \c #kDirectObjectSelectTool + is temporarily reselected by pressing Ctrl(Windows) or Cmd(Macintosh) key while + using another tool. + For example, if \c #kDirectSelectTool is selected and you then choose the eraser tool, + pressing the Ctrl or Cmd key temporarily switches back to \c #kDirectSelectTool, and + sends this notification. */ +#define kAIToolSuspendedByCmdKeyNotifier "AI Tool Suspended by Cmd Key Notifier" +/** @deprecated Use \c #kAIEffectiveToolChangedNotifier instead + Sent when the original tool is restored from a temporary switch back to + \c #kSelectTool, \c #kDirectSelectTool, or \c #kDirectObjectSelectTool. + Sent when the Ctrl or Cmd key is released. + */ +#define kAIToolResumedByCmdKeyNotifier "AI Tool Resumed by Cmd Key Notifier" + + +// Notifiers sent by built-in tools + +/** @ingroup Notifiers + Sent by the eyedropper when it is selected and dragged. The data is + an \c #AIEyedropperDragNotifyData specifying the event and whether the + path style has changed as a result. */ +#define kAIEyedropperDragNotifier "AI Eyedropper Drag Notifier" + +/** @ingroup Callers + The radial device caller. see #AIRadialDeviceMessage +*/ +#define kCallerRadialDevice "AI Radial Device" + +/** #ingroup Selectors + Sent when the radial device is rotated +*/ +#define kSelectorAIRadialDeviceRotated "Radial Device Rotated" + +/** #ingroup Selectors + Sent when the radial device is clicked +*/ +#define kSelectorAIRadialDeviceClicked "Radial Device Clicked" + +/** @ingroup Callers + The tool caller. See \c #AIToolSuite. */ +#define kCallerAITool "AI Tool" + +/** @ingroup Selectors + Sent when the tool has been selected (double-clicked) in the Tool palette. + The plug-in can display a tool options dialog. + The message data is an \c #AIToolMessage. */ +#define kSelectorAIEditToolOptions "AI Edit Options" +/** @ingroup Selectors + Sent when the tool is selected and as the cursor is moved over the + artboard with the button up. The plug-in can set the + cursor based on location or some other factor. The message data is an \c #AIToolMessage. */ +#define kSelectorAITrackToolCursor "AI Track Cursor" +/** @ingroup Selectors + Sent when the mouse button is pressed. The message data is an \c #AIToolMessage + that contains the cursor location and modifier key information. */ +#define kSelectorAIToolMouseDown "AI Mouse Down" +/** @ingroup Selectors + Sent on drag (cursor move with button down). The plug-in receives a series + of these selectors. The message data is an \c #AIToolMessage that + contains the cursor location and modifier key information. */ +#define kSelectorAIToolMouseDrag "AI Mouse Drag" +/** @ingroup Selectors + Either follows the mouse-down selector immediately or ends + the mouse-drag selectors. The message data is an \c #AIToolMessage + that contains the cursor location and modifier key information. */ +#define kSelectorAIToolMouseUp "AI Mouse Up" +/** @ingroup Selectors + Sent to a plug-in when its tool has been selected, to allow + initialization. The message data is an \c #AIToolMessage. */ +#define kSelectorAISelectTool "AI Select" +/** @ingroup Selectors + Sent to a plug-in when a different tool is selected, to allow cleanup + of any run-time variables. The message data is an \c #AIToolMessage. */ +#define kSelectorAIDeselectTool "AI Deselect" +/** @ingroup Selectors + Sent when an already-selected tool is reselected, with both + \c #kAIToolDeselectedNotifier and \c #kAIToolSelectedNotifier. + The message data is an \c #AIToolMessage. */ +#define kSelectorAIReselectTool "AI Reselect" +/** @ingroup Selectors + Sent when shortcut '[' is activated to decrease a diameter. */ +#define kSelectorAIToolDecreaseDiameter "AI Decrease Diameter" +/** @ingroup Selectors + Sent when shortcut ']' is activated to increase a diameter. */ +#define kSelectorAIToolIncreaseDiameter "AI Increase Diameter" +/** @ingroup Selectors +Sent when the user requests a switch to an alternate selection tool by pressing Ctrl (in Windows) +or Cmd (in MacOS) key, while using a tool that allows alternate selection tool, to +determine whether the alternate selection tool is ready to be selected. +Valid return values are: +\li \c #kNoErr: Plug-in tool is not ready to be alternate selection tool. +\li \c #kAcceptAlternateSelectionToolReply: Plug-in tool is ready to be alternate selection tool. +The message data is an \c #AIToolMessage that +contains the alternate selection tool handle. */ +#define kSelectorAIAlternateSelectionToolQuery "AI Alternate Selection Tool Query" +/** @ingroup Selectors +Sent when the user switches to an alternate selection tool by pressing Ctrl (in Windows) +or Cmd (in MacOS) key while using a tool that allows alternate selection tool. +The message data is an \c #AIToolMessage that +contains the alternate-selection tool handle. */ +#define kSelectorAIAlternateSelectionToolActivate "AI Alternate Selection Tool Activate" +/** @ingroup Selectors +Sent when the user switches back from a temporary alternate selection tool. +The message data is an \c #AIToolMessage that +contains the alternate selection tool handle. */ +#define kSelectorAIAlternateSelectionToolDeActivate "AI Alternate Selection Tool DeActivate" + +/** @ingroup Errors +Return code for response to \c #kSelectorAIAlternateSelectionToolQuery when +the alternate selection tool is ready for selection. */ +#define kAcceptAlternateSelectionToolReply 'ASTR' + +/** @ingroup Selectors +This can be used to get strokes directly without listening to mouse down, drag and up events. +The message data is an \c #AIToolDryInkMessage +that contains the cursor location and modifier key information. */ +#define kSelectorAIToolDrawDryInk "AI Tool Draw Dry Ink" + +// Brush tools share these options, so if you add new ones, +// make sure they do not overlap with the brush tool options defined in +// AIBrushMgr.h, which start at 1L<<16 and go up. + +/** Bit flags for options that can be set by a plug-in tool when it is installed + with \c #AIToolSuite::AddTool(), or later with \c #AIToolSuite::SetToolOptions(). */ +enum AIToolOptions { + /** Set to receive \c #kSelectorAITrackToolCursor, which allows you to + control the cursor for your too. When off (the default), a standard arrow + cursor is used for the tool. */ + kToolWantsToTrackCursorOption = (1<<0), + /** Set to disable automatic scrolling. When off (the default), the Illustrator window + scrolls when a tool reaches the edge. For tools that manipulate artwork, + autoscroll is useful. Set this to turn autoscroll off for a tool that + draws to the screen directly, like the built-in Brush tool. */ + kToolDoesntWantAutoScrollOption = (1<<1), + /** Set to buffer the drag selectors and messages and send all of them + to the tool at once. Useful if a tool is calculation intensive. The effect + is no longer real-time, but has a smoother final output. + When off (the default), the tool processes drag selectors and returns frequently, + resulting in near real-time feedback. If there are intensive calculations + during the drag selector, the tool could miss drag notifications, resulting in rougher + tracking. */ + kToolWantsBufferedDraggingOption = (1<<2), + /** Set to maintain the edit context when this tool is selected. For art objects, + keeps all current points and handles selected. For text, keeps the insertion + point in the current location. Set this option for navigational tools like + the Zoom and Scroll tools. */ + kToolMaintainEditContextOption = (1<<3), + /** Set to maintain the text edit context when the tool is selected, + if \c #kToolMaintainEditContextOption is also set. */ + kToolIsTextToolOption = (1<<4), + /** Set to receive \c #kSelectorAIToolDecreaseDiameter and + \c #kSelectorAIToolIncreaseDiameter. Use if the tool needs to change + diameter when either '[' or ']' is pressed. */ + kToolWantsToChangeDiameterOption = (1<<5), + /** Set to allow switching to an alternate selection tool when user presses Ctrl (in Windows) or Cmd (in Mac OS). + This option can be set for any plug-in tool. Set the preferred alternate selection tool + using \c #AIToolSuite::SetAlternateSelectionToolName(). + By default, the alternate tool is \c #kSelectTool(), \c #kDirectSelectTool(), or \c #kDirectObjectSelectTool() + */ + kToolWantsAlternateSelectionTool = (1<<6), + + /** Set to hide a plugin toolset in the tool box. Hidden tools can still be used through shortcuts + or through suite APIs, but are not shown in the tool box. + Must be set or cleared on creation; you cannot change the hidden status with \c #AIToolSuite::SetToolOptions(). + Setting this option for a single tool in a toolset has no effect unless it is set for all tools in the toolset. + It is recommended that you create a set of hidden tools, then show and hide individual tools by adding them to + or removing them from the hidden set. + */ + kToolWantsHiddenToolOption = (1<<7), + + /** Indicates that the tool does not support soft selection modes, when used with the tablet/pen. \c #AIToolSuite::SetSoftSelectedTool(). + The inverted tablet pen tool will still function as the original tool. + */ + kToolDoesntWantSoftSelectionOption = (1<<8), + + /** Indicates that tool does want OS to draw its wet ink and provide its final Ink points to render rather than listening to mouse events + */ + kToolWantsOSHandleInk = (1<<9), + + /** Indicates that the tool has a double-click action associated with it. + */ + kToolHasAlternateAction = (1<<10), + + /** Indicates that the tool wants to handle radial device events such as rotate and click + */ + kToolWantsRadialDeviceEvents = (1 << 11), + + /** Indicates that the tool does not want art style execution suspension while in drag loop + */ + kToolDoesntWantArtStyleExecutionSuspender = (1 << 12), + + /** Indicates that the tool handles its own drag loop and don't use the default toolDragLoop + */ + kToolHasItsOwnDragLoop = (1 << 13) + +}; + + +/** Tool information values. See \c #AIToolSuite::SetToolInfoVars(). + All values are real numbers, except these string values, + which are platform-encoded strings passed as \c char*: +
\c kInfoFontAndSize +
\c kInfoTrackOrKern +
\c kInfoText1-6 and \c kInfoLongText1-3 +

\c kInfoTextUnicode1-6 and \c kInfoLongTextUnicode1-3 refer to the + same Info palette slots as \c kInfoText1-6 and \c kInfoLongText1-3, but + values are \c ai::UnicodeString*, which is treated as \c const. + */ +enum AIToolInfoVariable { + kInfoPageX = 0, + kInfoPageY, + kInfoSizeX, + kInfoSizeY, + kInfoDistance, + kInfoVectorAngle, + kInfoScaleX, + kInfoScaleY, + kInfoZoom, + kInfoCornerRoundness, + kInfoRotAngle, + kInfoShearAngle, + kInfoFontAndSize, + kInfoTrackOrKern, + kInfoRawRotAngle, + kInfoDocX, + kInfoDocY, + kInfoText1, + kInfoText2, + kInfoText3, + kInfoText4, + kInfoText5, + kInfoText6, + kInfoLongText3, + /** Pass Custom String for: X Y W H display in info palette */ + kInfoTextX, + kInfoTextY, + kInfoTextW, + kInfoTextH, + + kInfoNumVars, + kInfoBlank, + + // new in AI 12 + kInfoTextUnicode1, + kInfoTextUnicode2, + kInfoTextUnicode3, + kInfoTextUnicode4, + kInfoTextUnicode5, + kInfoTextUnicode6, + kInfoLongTextUnicode1, + kInfoLongTextUnicode2, + kInfoLongTextUnicode3, + + // overlayed items. + kInfoLongText1 = kInfoFontAndSize, + kInfoLongText2 = kInfoTrackOrKern, + + + kInfoEndOfList = -1 // Use this to terminate the infoVars list +}; + +/** An \c #AIToolType value that creates a new group or toolset. + See @ref Toolsets */ +#define kNoTool -2 + +/** A tool number used to indicate a tool group or toolset. + See @ref Toolsets and \c #AIToolSuite::GetToolNumberFromName() */ +typedef ai::int16 AIToolType; + +/** Tool numbers less than this value are built-in, + numbers greater than this are plug-in. See @ref Toolsets + and \c #AIToolSuite::GetToolNumberFromName() */ +#define kPluginToolOffset 1000 + +/** @ingroup Errors + See \c #AIToolSuite */ +#define kToolCantTrackCursorErr 'TLTK' + +//ToolTime for GetToolNullEventInterval. This type is to be deprecated ASAP. +// <> +typedef double AIToolTime; //Time in Seconds + +#define kToolTimeDurationSecond ((AIToolTime)1.0) +#define kToolTimeDurationMillisecond ((AIToolTime)(kToolTimeDurationSecond/1000)) +#define kToolTimeDurationNoWait ((AIToolTime)0.0) +#define kToolTimeDurationForever ((AIToolTime)(-1.0)) + +#define kToolNormalIconDictKey "ToolNormalIconDictKey" +#define kToolDarkNormalIconDictKey "ToolDarkNormalIconDictKey" + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a tool plug-in, never dereferenced. + Access with \c #AIToolSuite. */ +typedef struct _t_AIToolOpaque *AIToolHandle; + +/** Information about the change that caused a + \c #kAIEffectiveToolChangedNotifier notification. */ +struct AIEffectiveToolChangeData +{ + /** Name of currently effective tool. */ + const char* currentToolName; + /** Name of previous effective tool. */ + const char* lastToolName; + /** True if tool change is temporary, false if it + is permanent. Temporary changes occur when user + presses a modifier key such as Cmd or Space. */ + AIBoolean isToolChangeTemporary; + /** Tool handle for current effective tool. + Can be null in case of select or direct-select tool.*/ + AIToolHandle currentToolHandle; + /** Tool handle for previous effective tool. + Can be null if previous tool was select or direct-select, + or if tool has not yet been changed since app launch. */ + AIToolHandle lastToolHandle; + /** Tool number of the currently effective tool. */ + AIToolType currentToolNum; + /** Tool number of the previously effective tool. */ + AIToolType lastToolNum; +}; + +/** Information needed to add a tool using \c #AIToolSuite::AddTool(). */ +struct AIAddToolData { + /** Display name for tool. */ + ai::UnicodeString title; + /** Short descriptive string shown when tool is activated. */ + ai::UnicodeString tooltip; + /** The icon shown in the Tools palette; must be of type 'PNGI' */ + ai::uint32 normalIconResID = 0; + /** The icon shown in the Tools palette in dark mode; must be of type 'PNGI' */ + ai::uint32 darkIconResID = 0; + /** The Tools palette group to which this tool belongs. + A tool number or \c #kNoTool to create a new group. + See @ref Toolsets. */ + AIToolType sameGroupAs = 0; + /** The Tools palette toolset to which this tool belongs. + A tool number or \c #kNoTool to create a new toolset. + See @ref Toolsets. */ + AIToolType sameToolsetAs = 0; + /* Specifies the type of the incoming icons + enum IconType in AITypes.h*/ + ai::IconType iconType = ai::IconType::kPNG; +}; + +/** For internal use only. */ +typedef struct _AIDataStack *AIDataStackRef; + +/** For internal use only. */ +struct AIAddToolDataPrivate { + /** Display name for tool. */ + ai::UnicodeString title; + /** Short descriptive string shown when tool is activated. */ + ai::UnicodeString tooltip; + /** @deprecated Obsolete. Do not use. */ + AIDataStackRef iconResourceDictionary; + /** The Tools palette group to which this tool belongs. + A tool number or \c #kNoTool to create a new group. + See @ref Toolsets. */ + AIToolType sameGroupAs = 0; + /** The Tools palette toolset to which this tool belongs. + A tool number or \c #kNoTool to create a new toolset. + See @ref Toolsets. */ + AIToolType sameToolsetAs = 0; + /* Specifies the type of the incoming icons + enum IconType in AITypes.h*/ + ai::IconType iconType = ai::IconType::kInvalid; +}; + +/** An \c #AIToolTabletPointerTypeValue describing a type of pointing device. + Used with a pressure-sensitive input device, such as a graphic tablet. */ +typedef ai::int16 AIToolTabletPointerType; + +/** \c #AIToolTabletPointerType constants that describe the type of + input being received from input devices. */ +enum AIToolTabletPointerTypeValue +{ + kAIToolTabletPointerTypeUnknown = 0, + /** Pen end of a stylus. */ + kAIToolTabletPointerTypePen, + /** Mouse or other non-pressure-sensitive pointer device. */ + kAIToolTabletPointerTypeCursor, + /** Eraser end of a stylus. */ + kAIToolTabletPointerTypeEraser +}; + +/** An \c #AIToolPressureValue indicating the amount of force being + applied with a pressure-sensitive input device, such as a graphic tablet. */ +typedef ai::int16 AIToolPressure; +/** \c #AIToolPressure constants that indicate an amount of force applied to a + pressure-sensitive input device. */ +enum AIToolPressureValue +{ + /** The maximum pressure applied by a tool */ + kAIMaxToolPressure = 255, + /** The minimal pressure applied by a tool */ + kAIMinToolPressure = 0, + /** A default value for when there is no pressure data. */ + kAINormalToolPressure = 127 +}; + +/** An \c #AIToolAngleValue describing values of an input device + such as tilt, rotation and bearing of a pen on a graphic tablet. */ +typedef ai::int16 AIToolAngle; +/** \c #AIToolAngle constants that describe values of an input device + such as tilt, rotation and bearing of a pen on a graphic tablet. */ +enum AIToolAngleValue +{ + /** Angle constants in degrees */ + kAIToolAngle0 = 0, + kAIToolAngle90 = 90, + kAIToolAngleNegative179 = -179, + kAIToolAngle180 = 180, + kAIToolAngle360 = 360, + + /** Bearing ranges from -179 to 180 where 0 is up */ + kAIToolMinBearing = kAIToolAngleNegative179, + kAIToolMaxBearing = kAIToolAngle180, + kAIToolNormalBearing = kAIToolAngle0, + + /** Rotation ranges from -179 to 180 where 0 is up */ + kAIToolMinRotation = kAIToolAngleNegative179, + kAIToolMaxRotation = kAIToolAngle180, + kAIToolNormalRotation = kAIToolAngle0, + + /** Tilt ranges from 0 to 90 where 0 means that the pen barrel is perpendicular to the tablet's plane + and 90 means that the pen barrel is parallel to the tablet's plane. */ + kAIToolMinTilt = kAIToolAngle0, + kAIToolMaxTilt = kAIToolAngle90, + kAIToolNormalTilt = kAIToolMinTilt +}; +/** \c #AITabletCapabilities constants that describe the hardware capabilities of a graphic tablet/ Integrated digitizer. +*/ +enum AITabletCapabilities +{ + /* X-coordinate in the tablet coordinate space. */ + kXCoordinate = 1 << 0, + /* Y-coordinate in the tablet coordinate space. */ + kYCoordinate = 1 << 1, + /* Z-coordinate or the distance of the pen tip from the tablet. */ + kZCoordinate = 1 << 2, + /* Pressure of pen tip perpendicular to tablet surface. */ + kNormalPressure = 1 << 3, + /* Pressure of the pen tip along the plane of the tablet surface. */ + kTangentPressure = 1 << 4, + /* Angle between the axis of pen and the surface of the tablet. */ + kAltitudeOrientation = 1 << 5, + /* Clockwise rotation of the cursor around the z-axis through a full circular range. */ + kAzimuthOrientation = 1 << 6, + /* Clockwise rotation of the cursor around its own axis. */ + kTwistOrientation = 1 << 7 +}; + + +enum AIToolMessageFlags +{ + /*Indicates that it is a simulated Tool Message of InkStrokes*/ + kAIToolMsgInkSimulationFlag = 1 << 0, + kAIToolMsgModifierKeyPressedDuringInk = 1 << 1, + + /*Indicates that it is a tool drag over message*/ + kAIToolMsgIsDragOver = 1 << 2 +}; + +/** History Data associated with an Event. */ +struct AIEventHistoryData +{ + /** The location of the event */ + AIPoint position; + /** For graphic tablets, tangential pressure on the finger wheel of the airbrush tool. */ + AIToolPressure stylusWheel; + /** How the tool is angled, also called altitude or elevation. */ + AIToolAngle tilt; + /** The direction of tilt, measured clockwise in degrees around the Z axis, also called azimuth, */ + AIToolAngle bearing; + /** Rotation of the tool, measured clockwise in degrees around the tool's barrel. */ + AIToolAngle rotation; +}; +/** The contents of a tool message. */ +struct AIToolMessage { + /** The message data. */ + SPMessageData d; + /** The tool plug-in receiving the message. + If the plug-in has more than one tool installed, it can + determine which one was selected by comparing this handle + to those it has saved in the \c globals variable. */ + AIToolHandle tool; + /** The location of the mouse cursor in page coordinates. */ + AIRealPoint cursor; + /** The amount of force being applied to a pressure-sensitive input device, + such as a graphics tablet. Use \c #AIToolSuite::SystemHasPressure() + to determine if such a device is in use. */ + AIToolPressure pressure; + /** For mouse selectors, the ADM event record for the mouse event, + containing additional information about the event. (ADM is no longer supported).*/ + AIEvent *event; + /** For graphic tablets, tangential pressure on the finger wheel of the airbrush tool. */ + AIToolPressure stylusWheel; + /** How the tool is angled, also called altitude or elevation. */ + AIToolAngle tilt; + /** The direction of tilt, measured clockwise in degrees around the Z axis, also called azimuth, */ + AIToolAngle bearing; + /** Rotation of the tool, measured clockwise in degrees around the tool's barrel. */ + AIToolAngle rotation; + + /** To give more information to listeners of AIToolMessage, it will be composed of values from AIToolMessageFlags */ + ai::int32 flags; + /** The history data associated with the event */ + ai::AutoBuffer eventHistoryData; +}; + +/** The content of a radial device message. */ +struct AIRadialDeviceMessage +{ + /** The message data. */ + SPMessageData d; + + /** The tool plug-in receiving the message. + If the plug-in has more than one tool installed, it can + determine which one is selected by comparing this handle + to those it saves in the \c globals variable. */ + AIToolHandle tool = nullptr; + + /** Rotation value */ + AIReal rotation = 0.0; +}; + +/** The contents of a tool notification. */ +struct AIToolNotifyData { + /** The tool plug-in receiving the notification. If you install more than one tool, + compare to your saved reference to decide how to handle the notification. */ + AIToolHandle tool; +}; + +/** The contents of an eyedropper drag notification, \c #kAIEyedropperDragNotifier. */ +struct AIEyedropperDragNotifyData { + /** The ADM event record for the mouse event. (ADM is no longer supported). */ + AIEvent event; + /** True if the path style has changed as a result of the drag event. */ + AIBoolean pathStyleChanged; +}; + +struct AIDocumentInkParams +{ + enum PenTipShape + { + kPenTipShapeCircle, + kPenTipShapeRectangle + }; + PenTipShape fShape; + AIColor fColor; + AIPoint fSize; + ai::AutoBuffer fModifiersList; + AIReal fRotation; + AIBoolean fSupportPressure; + AIBoolean fCustomModifierHandling; // Specifying it as true turns off direct ink when a mod key is pressed. + enum PressureBasedVariant + { + kPressuteBasedVariantNone = 1 << 0, + kPressuteBasedVariantDia = 1 << 1, + kPressuteBasedVariantRoundness = 1 << 2, + kPressuteBasedVariantAngle = 1 << 3, + }; + ai::int32 fPressureBasedVariants; + AIDocumentInkParams() :fShape(kPenTipShapeCircle) + { + fColor.kind = kThreeColor; + fColor.c.rgb.red = 0.0f; + fColor.c.rgb.green = 0.0f; + fColor.c.rgb.blue = 0.0f; + fSize.h = 1; + fSize.v = 1; + fRotation = 0.0f; + fSupportPressure = false; + fPressureBasedVariants = 0; + fCustomModifierHandling = false; + } +}; + + +struct AIDocumentInkPoint +{ + AIRealPoint fLocation; + AIToolPressure fPressure; + AIToolPressure fStylusWheel; + AIToolAngle fRotation; + AIToolPressure fBearing; + AIToolPressure fTilt; + + AIDocumentInkPoint() + { + fLocation.h = 0.0; + fLocation.v = 0; + fPressure = 0; + fStylusWheel = kAIToolMinRotation; + fBearing = kAIToolMinBearing; + fRotation = kAIToolMinRotation; + fTilt = kAIToolMinTilt; + } +}; + +/** The contents of a tool message. */ +struct AIToolDryInkMessage { + /** The message data. */ + SPMessageData d; + + /** To give more information to the listeners of AIToolDryInkMessage, it will be composed of values from AIToolMessageFlags */ + ai::int32 flags = 0; + + /** The tool plug-in receiving the message. + If the plug-in has more than one tool installed, it can + determine which one was selected by comparing this handle + to those it has saved in the \c globals variable. */ + AIToolHandle tool; + + /** Future use We might need this for modifiers*/ + AIEvent *event; + + ai::AutoBuffer inkStrokes; + + AIToolDryInkMessage() :tool(0), event(nullptr) + {} +}; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite allows you to provide plug-in tools for Illustrator. + Plug-in tools can work on existing artwork or create new objects. + Tools that you add appear in the Illustrator Tool palette in their own set, + or as part of an existing tool set. Use the functions in this suite + to add tools, set options, and control the tool's appearance in the palette. + + Typically, you set the options that control the behavior of a plug-in tool + when you install the tool with \c #AIToolSuite::AddTool(). You can modify + them later with \c #AIToolSuite::SetToolOptions(). + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIToolSuite and \c #kAIToolVersion. + + @section Toolsets Toolsets and Groups in the Tools Palette + + In the Tools palette, \e a toolset is a collection related tools. + When there is more than one tool in a toolset, only the frontmost tool's + icon is shown in the palette, with a triangle in the lower left corner + to indicate the presence of additional tools. The entire toolset + is shown when the user holds the mouse button down on the topmost tool. + + A \e group is a collection of toolsets. Groups are separated by vertical + space in the palette. + + To create a new group or toolset, pass \c #kNoTool for + \c #AIAddToolData::sameGroupAs or \c #AIAddToolData::sameToolsetAs. + For example, to create a new tool group: + @code +toolData.title = "MyTool1"; +toolData.tooltip = "MyTool1 Tooltip"; +toolData.sameGroupAs = kNoTool; +toolData.sameToolsetAs = kNoTool; + @endcode + + To add a new toolset to this group: + @code +toolData.title = "MyTool2"; +toolData.tooltip = "MyTool2 Tooltip"; +error = sTool->GetToolNumberFromName("MyTool1", &toolData.sameGroupAs); +toolData.sameToolsetAs = kNoTool; + @endcode + + To add tools to this toolset: + @code +toolData.title = "MyTool2a"; +toolData.tooltip = "Tool2a Tooltip"; +error = sTool->GetToolNumberFromName("MyTool1", &toolData.sameGroupAs); +error = sTool->GetToolNumberFromName("MyTool2", &toolData.sameToolsetAs); + @endcode + + @section ToolBehavior Tool Behavior + + Implement tool behavior by defining handlers for the caller/selector pairs + and messages that plug-in tools receive, particularly the mouse selectors. + Check for selectors in the plug-in's main function. + + Your mouse selector handlers can create or modify art objects directly. + A tool can select and work on several art objects at once. + The application updates the window between calls to the plug-in, so the + new or changed artwork appears as the mouse moves. + Use \c #AIUndoSuite::UndoChanges() before processing the tool drag, + in order to maintain a known artwork state from which to redraw changes. + + Because multiple plug-ins can be running at once, + the artwork state can change in the course of using your tool. + To verify that a specific artwork state exists, you can use a plug-in + notifier to indicate that the artwork selection or properties + have been changed. See the \c #AINotifierSuite. + + The caller for tool plug-ins is \c #kCallerAITool. + + These selectors are sent: +
\c #kSelectorAIEditToolOptions +
\c #kSelectorAITrackToolCursor +
\c #kSelectorAIToolMouseDown +
\c #kSelectorAIToolMouseDrag +
\c #kSelectorAIToolMouseUp +
\c #kSelectorAISelectTool +
\c #kSelectorAIDeselectTool +
\c #kSelectorAIReselectTool + + These notifiers are related to tools: +
\c #kAIUserToolChangedNotifier +
\c #kAIToolSelectedNotifier +
\c #kAIToolDeselectedNotifier +
\c #kAIToolClearStateNotifier +
\c #kAIToolTitleChangedNotifier +
\c #kAIToolTooltipChangedNotifier +
\c #kAIToolChangedNotifier +
\c #kAIToolWindowChangedNotifier +
\c #kAIToolSuspendNotifier +
\c #kAIToolResumeNotifier +
\c #kAIEyedropperDragNotifier + + */ +struct AIToolSuite { + + /** Installs a plug-in tool. Use at startup. + @param self This plug-in. + @param name The unique name of this tool. + @param data Information on how to display this tool in the Tool palette. + @param options Option flags that control the tool's behavior, a logical OR + of \c #AIToolOptions constants. + @param tool [out] A buffer in which to return the tool reference. If you + install multiple tools, save to compare to the tool reference in tool + message data. + */ + AIAPI AIErr (*AddTool) ( SPPluginRef self, const char *name, + const AIAddToolData &data, ai::int32 options, + AIToolHandle *tool ); + + /** For internal use only */ + AIAPI AIErr (*AddToolPrivate) ( SPPluginRef self, const char *name, + const AIAddToolDataPrivate &data, ai::int32 options, + AIToolHandle *tool ); + + /** Retrieves the unique identifying name of a tool. + To get the localizable title that appears in the UI, use \c #GetToolTitle(). + @param tool The tool reference. + @param name [out] A pointer to point to the name string. Do + not modify this string. + @note It is more efficient to work with tool numbers rather than + names. See \c #GetToolNumberFromHandle(). + */ + AIAPI AIErr (*GetToolName) ( AIToolHandle tool, char **name ); + + /** Retrieves the option flags of a tool. To retain the existing flags when + setting options with \c #SetToolOptions(), obtain them with this function + and do a logical OR with the new flags. + @param tool The tool reference. + @param options [out] A buffer in which to return the options value, a logical + OR of \c #AIToolOptions constants. + */ + AIAPI AIErr (*GetToolOptions) ( AIToolHandle tool, ai::int32 *options ); + + /** Sets the option flags of a tool. To retain the existing flags when + setting options, obtain them with \c #GetToolOptions() + and do a logical OR with the new flags. + @param tool The tool reference. + @param options The new options value, a logical OR of \c #AIToolOptions constants. + */ + AIAPI AIErr (*SetToolOptions) ( AIToolHandle tool, ai::int32 options ); + + /** Retrieves the plug-in that installed a tool. + @param tool The tool reference. + @param plugin [out] A buffer in which to return the plug-in reference, + which can be used with \c #AIPluginSuite functions. + */ + AIAPI AIErr (*GetToolPlugin) ( AIToolHandle tool, SPPluginRef *plugin ); + + /** Retrieves the currently selected plug-in tool. If the current tool + is a built-in tool, returns NULL. + See \c #AIToolboxSuite::GetCurrentToolType() or \c #GetCurrentToolName() + for retrieving the current tool including built-in tools. + @param tool [out] A buffer in which to return the tool reference. + */ + AIAPI AIErr (*GetSelectedTool) ( AIToolHandle *tool ); + + /** Selects a plug-in tool programmatically. This is the same as the user + selecting the tool in the Tool palette. + To select built-in tools, see \c #SetSelectedToolByName() + @param tool The tool reference. + */ + AIAPI AIErr (*SetSelectedTool) ( AIToolHandle tool ); + + /** Gets the number of installed plug-in tools. Use with \c #GetNthTool() + to iterate through plug-in tools. + @param count [out] A buffer in which to return the number of tools. + */ + AIAPI AIErr (*CountTools) ( ai::int32 *count ); + + /** Retrieves a tool by index position. Use with \c #CountTools() + to iterate through plug-in tools. + @param n The 0-based position index. + @param tool [out] A buffer in which to return the tool reference. + */ + AIAPI AIErr (*GetNthTool) ( ai::int32 n, AIToolHandle *tool ); + + /** Retrieves a plug-in tool by its tool number, as assigned when it is created + with \c #AddTool(), and obtained by calling \c #GetToolNumberFromHandle. + See @ref Toolsets. + If the toolNum is the number of a built-in tool, returns NULL, since + built-in tools do not have an AIToolHandle. + @param toolNum The tool number. + @param tool [out] A buffer in which to return the tool reference. + */ + AIAPI AIErr (*GetToolHandleFromNumber) ( AIToolType toolNum, AIToolHandle *tool ); + + /** Retrieves a tool number from a tool's unique name. Use to find the numbers of + built-in tools, in order to place your tool in an existing group or toolset. + See @ref Toolsets. + @param name The tool name. The names of Illustrator's built-in tools + can be found in \c AIToolNames.h. + @param toolNum [out] A buffer in which to return the tool number. + */ + AIAPI AIErr (*GetToolNumberFromName) ( const char *name, AIToolType *toolNum ); + + /** Retrieves a tool number for a tool. Use to find the numbers of + plug-in tools, in order to place your tool in an existing group or toolset. + See @ref Toolsets. + @param tool The tool reference. + @param toolNum [out] A buffer in which to return the tool number. */ + AIAPI AIErr (*GetToolNumberFromHandle) ( AIToolHandle tool, AIToolType *toolNum ); + + /** Retrieves the unique name of a tool from its number. To get the localizable + title that appears in the UI, use \c #GetToolTitle(). + @param toolNum The tool number. + @param name [out] A pointer to point to the name string. Do not modify + this string. Copy it immediately to use it. + */ + AIAPI AIErr (*GetToolNameFromNumber) ( AIToolType toolNum, char **name ); + + /** Retrieves the localizable title of a tool, which appears in the UI. + To get the unique, identifying name, use \c #GetToolName(). + @param tool The tool reference. + @param title [out] A pointer to point to the title string. Do not modify + this string. + */ + AIAPI AIErr (*GetToolTitle) ( AIToolHandle tool, ai::UnicodeString& title ); + + /** Sets the localizable title of a tool, which appears in the UI. + @param tool The tool reference. + @param title The new title string. + */ + AIAPI AIErr (*SetToolTitle) ( AIToolHandle tool, ai::UnicodeString title ); + + + /** Retrieves the tooltip string for a tool. + @param tool The tool reference. + @param tooltip [out] A pointer to point to the tooltip string. Do not modify + this string. + */ + AIAPI AIErr (*GetTooltip) ( AIToolHandle tool, ai::UnicodeString& tooltip ); + + /** Sets the tooltip string for a tool. + @param tool The tool reference. + @param tooltip The new tooltip string. + */ + AIAPI AIErr (*SetTooltip) ( AIToolHandle tool, ai::UnicodeString tooltip ); + + /** Determines which labeled fields are displayed in the Info palette for a tool. + Typically called once at startup to initialize the Info palette. + @param tool The tool reference. + @param infoVars A pointer to the first member of an array of + information variables, which correspond to labeled fields + in Illustrator's Info palette, as defined in \c #AIToolInfoVariable. + Only the fields included in this array are shown for the tool. + To initialize or set the values in the fields, use \c #SetToolInfoVarValues(). + */ + AIAPI AIErr (*SetToolInfoVars) ( AIToolHandle tool, const ai::int32 infoVars[] ); + + /** Sets field values in the Info palette. Only those fields specified by + \c #SetToolInfoVars() are displayed in the palette. + @param infoVars A pointer to the first member of an array of + information variables, which correspond to labeled fields + in Illustrator'AITs Info palette. This is the same array specified + by \c #SetToolInfoVars(). + @param values A pointer to the first member of an array of values, + whose positions match those in the \c infoVars array. + + \b Example: +@code +AIErr UpdateInfoPalette( AIToolHandle tool, AIRealPoint origin, AIArtHandle art ) +{ + ASErr error = kNoErr; + if (art) { + static const long infoVars = { kInfoDocX, kInfoDocY, kInfoSizeX, kInfoSizeY, kInfoEndOfList }; + AIReal *infoValues[4]; + AIReal temp[2]; + AIRealRect artBounds; + error = sAIArt->GetArtTransformBounds( art,0, kStroke, &artBounds); + if ( error ) + return error; + temp[0] = artBounds.right - artBounds.left; + temp[1] = artBounds.bottom - artBounds.top; + infoValues[0] = &origin.h; + infoValues[1] = &origin.v; + infoValues[2] = temp; + infoValues[3] = temp +1; + error = sAITool->SetToolInfoVarValues( infoVars, (void**)infoValues); + if ( error ) + return error; + } +} +@endcode + */ + AIAPI AIErr (*SetToolInfoVarValues) ( const ai::int32 *infoVars, void **values ); + + /** Reports whether a pressure-sensitive device such as a graphics tablet + was available on application startup. + @param hasPressure [out] A buffer in which to return true if + a pressure-sensitive device is in use. + */ + AIAPI AIErr (*SystemHasPressure) ( AIBoolean *hasPressure ); + + /** @deprecated Obsolete. Do not use. */ + AIAPI AIErr (*GetToolNullEventInterval) (AIToolHandle tool, AIToolTime *outTime); + + /** @deprecated Obsolete. Do not use. */ + AIAPI AIErr (*SetToolNullEventInterval) (AIToolHandle tool, AIToolTime inTime); + + /** Selects a plug-in tool, but does not highlight + it in the palette or show its tool name in the status bar of the document + window. Indicates this \e soft selection by setting the \c isSoftMode flag. + \c #SetSelectedTool() turns this flag off. + @param tool The tool reference. + */ + AIAPI AIErr (*SetSoftSelectedTool) ( AIToolHandle tool ); + + /** Reports whether there is currently a \e soft tool selection. + Soft mode is entered when a tool, such as the rectangle tool, is + selected and the user implicitly overrides this by drawing with the eraser + end of a tablet stylus. + @param isSoftMode [out] A buffer in which to return true if there is a + soft tool selection. + */ + AIAPI AIErr (*IsSoftModeSelection) ( AIBoolean *isSoftMode ); + + /** Retrieves the name of the tool that will be temporarily selected by pressing Ctrl (in Windows) + or Cmd (in MacOS) key while using this tool. + Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. + @param tool This tool. + @param name A buffer in which to return the name of the alternate selection tool. + */ + AIAPI AIErr (*GetAlternateSelectionToolName) (AIToolHandle tool, char **name); + + /** Sets the tool that will be temporarily selected by pressing Ctrl (in Windows) + or Cmd (in Mac OS) key while using this tool. + Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. + @param tool This tool. + @param name The name of the alternate selection tool. + */ + AIAPI AIErr (*SetAlternateSelectionToolName) (AIToolHandle tool, const char* alternateTool); + + /** Retrieves the unique name of the currently selected tool. This is the same + name you get from calling \c #AIToolboxSuite::GetCurrentToolType() + followed by \c #GetToolNameFromNumber(). + @param name [out] A pointer to point to the name string. Do not modify + this string. Copy it immediately to use it. + @note It is more efficient to work with tool numbers rather than + names. See \c #GetCurrentToolNumber(). + */ + AIAPI AIErr (*GetCurrentToolName) ( const char **name ); + + /** Retrieves the number of the currently selected tool. + @param toolNum [out] A buffer in which to return the tool number. + */ + AIAPI AIErr (*GetCurrentToolNumber) ( AIToolType *toolNum ); + + /** Retrieves the currently active plug-in tool. If the currently active + tool is a built-in tool, returns NULL. This is the same value you get + from \c #currentToolHandle in \c #AIEffectiveToolChangeData. + See \c #GetCurrentEffectiveToolNumber() or \c #GetCurrentEffectiveToolName() + for retrieving the current effective tool including built-in tools. + @param tool [out] A buffer in which to return the tool reference. + @note It is more efficient to work with tool numbers rather than + names. + */ + AIAPI AIErr (*GetCurrentEffectiveTool) ( AIToolHandle *tool ); + + /** Retrieves the unique name of the currently active tool. This is the same + value you get from \c #currentToolName in \c #AIEffectiveToolChangeData. + @param name [out] A pointer to point to the name string. Do not modify + this string. Copy it immediately to use it. + @note It is more efficient to work with tool numbers rather than + names. See \c #GetCurrentEffectiveToolNumber(). + */ + AIAPI AIErr (*GetCurrentEffectiveToolName) ( const char **name ); + + /** Retrieves the number of the currently active tool. This is the same + value you get from \c #currentToolNum in \c #AIEffectiveToolChangeData. + @param toolNum [out] A buffer in which to return the tool number. + */ + AIAPI AIErr (*GetCurrentEffectiveToolNumber) ( AIToolType *toolNum ); + + /** Retrieves the numerical identifier of the most recently used built-in selection tool, + and optionally retrieves the unique name of the tool, from \c AIToolNames.h. + (Note that this function returns an \c #AIToolType, not an error code.) + @param name [out][optional] A buffer in which to return the name string. + Do not modify this string. Copy it immediately to use it. + @return The numerical identifier. + */ + + AIAPI AIToolType (*GetLastUsedSelectionTool) ( const char **name ); + + /** Select a tool by its unique name identifier. Can be either the name of a plug-in tool, + returned by \c #GetToolName(), or one of the tool name constants from \c AIToolNames.h. + @param name The name of the tool to be selected. + @note It is more efficient to work with tool numbers rather than + names. See \c #SetSelectedToolByNumber(). + */ + AIAPI AIErr (*SetSelectedToolByName) ( const char *name ); + + /** Select a tool using its tool number. + @param toolNum The tool number. + */ + AIAPI AIErr (*SetSelectedToolByNumber) ( AIToolType toolNum ); + + /** Reports the hardware capabilities of a graphical tablet or integrated digitizer. + @param hardwareCapabilities [out] A buffer in which to return a + logical OR of \c #AITabletCapabilities constants. + */ + AIAPI AIErr (*GetTabletHardwareCapabilities) ( ai::int32* hardwareCapabilities ); + + /** Sets tool icons to be used with light and dark UI themes. + @param tool[in] The tool reference. + @param normalIconResource[in] Base file name (without extension) of the PNG icon resource for the light UI theme. + @param darkNormalIconResource[in] Base file name (without extension) of the PNG icon resource for the dark UI theme. + */ + AIAPI AIErr (*SetToolIcons) (AIToolHandle tool, const char *normalIconResourceName, const char *darkNormalIconResourceName); + + /**Retrieves the base filenames (without extension) of the PNG icon resources associated with a tool. + @param tool[in] The tool reference. + @param normalIconResource[out] A buffer in which to return the resource name for light UI theme icon. + @param darkNormalIconResource[out] A buffer in which to return the resource name for dark UI theme icon. + */ + AIAPI AIErr(*GetToolIcons) (const AIToolHandle tool, char **normalIconResourceName, char **darkNormalIconResourceName); + + /** + */ + AIAPI AIErr(*SetDocumentInkParams)(const AIToolHandle tool, const AIDocumentInkParams& inDocInkParams); + + /** Retrieves the options associated with the tool corresponding to the given tool number. + @param options [out] A buffer in which to return the options value. + */ + AIAPI AIErr (*GetToolOptionsFromNumber) (AIToolType toolNum, ai::int32 *options); + + /** Retrieves the options associated with the tool corresponding to the given tool name. + @param options [out] A buffer in which to return the options value. + @note It is more efficient to work with tool numbers rather than + names. See \c #GetToolOptionsFromNumber(). + */ + AIAPI AIErr (*GetToolOptionsFromName) (const char *toolName, ai::int32 *options); +}; + + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIToolNames.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIToolNames.h index 4be07dc..f2be952 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIToolNames.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIToolNames.h @@ -1,160 +1,175 @@ -#ifndef __AIToolNames__ -#define __AIToolNames__ - -/* - * Name: AIToolNames.h - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2011 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - * Includes names for all standard built-in and plug-in tools - * - */ - -/** @file AIToolNames.h */ - - -/** @ingroup ToolNames */ -/** @{ */ -#define kTypeTool "Adobe Type Tool" -#define kAreaTypeTool "Adobe Area Type Tool" -#define kPathTypeTool "Adobe Path Type Tool" -#define kVerticalTypeTool "Adobe Vertical Type Tool" -#define kVerticalAreaTypeTool "Adobe Vertical Area Type Tool" -#define kVerticalPathTypeTool "Adobe Vertical Path Type Tool" -#define kTextPositioningTool "Adobe Touch Type Tool" - -#define kRTLTypeTool "Adobe Right-To-Left Type Tool" -#define kRTLAreaTypeTool "Adobe Right-To-Left Area Type Tool" -#define kRTLPathTypeTool "Adobe Right-To-Left Path Type Tool" - -#define kRectangleTool "Adobe Rectangle Tool" -#define kRoundedRectangleTool "Adobe Rounded Rectangle Tool" -#define kEllipseTool "Adobe Ellipse Tool" - -#define kSelectTool "Adobe Select Tool" -#define kToggleSelectTool "Adobe Toggle Select Tool" -#define kDirectSelectTool "Adobe Direct Select Tool" -#define kToggleDirectSelectTool "Adobe Toggle Direct Select Tool" -#define kDirectObjectSelectTool "Adobe Direct Object Select Tool" - -#define kScaleTool "Adobe Scale Tool" -#define kRotateTool "Adobe Rotate Tool" -#define kReflectTool "Adobe Reflect Tool" -#define kShearTool "Adobe Shear Tool" - -#define kColumnGraphTool "Adobe Column Graph Tool" -#define kStackedColumnGraphTool "Adobe Stacked Column Graph Tool" -#define kLineGraphTool "Adobe Line Graph Tool" -#define kPieGraphTool "Adobe Pie Graph Tool" -#define kAreaGraphTool "Adobe Area Graph Tool" -#define kScatterGraphTool "Adobe Scatter Graph Tool" -#define kBarGraphTool "Adobe Bar Graph Tool" -#define kStackedBarGraphTool "Adobe Stacked Bar Graph Tool" -#define kRadarGraphTool "Adobe Radar Graph Tool" - -#define kScrollTool "Adobe Scroll Tool" -#define kFreehandTool "Adobe Freehand Tool" -#define kFreehandSmoothTool "Adobe Freehand Smooth Tool" -#define kFreehandEraseTool "Adobe Freehand Erase Tool" -#define kStencilTool "Adobe Stencil Tool" -#define kNaturalJoinTool "Adobe Corner Join Tool" - -#define kPenTool "Adobe Pen Tool" -#define kBlendTool "Adobe Blend Tool" -#define kScissorsTool "Adobe Scissors Tool" -#define kMeasureTool "Adobe Measure Tool" -#define kPageTool "Adobe Page Tool" -#define kZoomTool "Adobe Zoom Tool" -#define kAddAnchorPointTool "Adobe Add Anchor Point Tool" -#define kDeleteAnchorPointTool "Adobe Delete Anchor Point Tool" -#define kConvertDirectionPointTool "Adobe Anchor Point Tool" -#define kGradientVectorTool "Adobe Gradient Vector Tool" -#define kBrushTool "Adobe Brush Tool" -#define kEyedropperTool "Adobe Eyedropper Tool" -#define kReshapeTool "Adobe Reshape Tool" -#define kWidthTool "Adobe Width Tool" -#define kKnifeTool "Adobe Knife Tool" -#define kPolygonTool "Adobe Shape Construction Regular Polygon Tool" -#define kStarTool "Adobe Shape Construction Star Tool" -#define kSpiralTool "Adobe Shape Construction Spiral Tool" - -#define kMeshEditingTool "Adobe Mesh Editing Tool" -#define kFreeTransformTool "Adobe Free Transform Tool" - -#define kDirectLassoTool "Adobe Direct Lasso Tool" - -#define kPluginEllipseTool "Adobe Ellipse Shape Tool" -#define kPluginRectangleTool "Adobe Rectangle Shape Tool" - -// New for AI10 -#define kMagicWandTool "Adobe Magic Wand Tool" - -#define kLineTool "Adobe Line Tool" -#define kArcTool "Adobe Arc Tool" -#define kRectangularGridTool "Adobe Rectangular Grid Tool" -#define kPolarGridTool "Adobe Polar Grid Tool" -#define kFlareTool "Adobe Flare Tool" - -#define kWarpTool "Adobe Warp Tool" -#define kNewTwirlTool "Adobe New Twirl Tool" -#define kPuckerTool "Adobe Pucker Tool" -#define kBloatTool "Adobe Bloat Tool" -#define kScallopTool "Adobe Scallop Tool" -#define kCrystallizeTool "Adobe Cyrstallize Tool" -#define kWrinkleTool "Adobe Wrinkle Tool" - -#define kSliceTool "Adobe Slice Tool" -#define kSliceSelectTool "Adobe Slice Select Tool" - -#define kSymbolSprayerTool "Adobe Symbol Sprayer Tool" -#define kSymbolShifterTool "Adobe Symbol Shifter Tool" -#define kSymbolScruncherTool "Adobe Symbol Scruncher Tool" -#define kSymbolSizerTool "Adobe Symbol Sizer Tool" -#define kSymbolSpinnerTool "Adobe Symbol Spinner Tool" -#define kSymbolStainerTool "Adobe Symbol Stainer Tool" -#define kSymbolScreenerTool "Adobe Symbol Screener Tool" -#define kSymbolStylerTool "Adobe Symbol Styler Tool" - -// New for AI12 -#define kPlanarPaintbucketTool "Adobe Planar Paintbucket Tool" -#define kPlanarFaceSelectTool "Adobe Planar Face Select Tool" - -// New for AI13 -#define kEraserTool "Adobe Eraser Tool" -#define kCropTool "Adobe Crop Tool" - -// New for AI14 -#define kBlobTool "Adobe Blob Brush Tool" - -// New for AI15 -#define kLiveMergeTool "Adobe Shape Builder Tool" -#define kPGTool "Perspective Grid Tool" -#define kPerspectiveSelectionTool "Perspective Selection Tool" -// New for AI16 -#define kPatternTileTool "Adobe Pattern Tile Tool" -// New for AI17 -#define kPlaceGunTool "Adobe Place Gun Tool" - -// New for AI18.1 -#define kAdobeCurvatureTool "Adobe Curvature Tool" - -//New for CC Charts -#define kIGTool "CC Charts Tool" - -//New for 19.0 -#define kAdobeShaperTool "Adobe Shaper Tool" - -//New for 19.3 (October release) -#define kAdobeSymmetryTool "Adobe Symmetry Tool" - -/** @} */ - -#endif +#ifndef __AIToolNames__ +#define __AIToolNames__ + +/* + * Name: AIToolNames.h + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2011 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + * Includes names for all standard built-in and plug-in tools + * + */ + +/** @file AIToolNames.h */ + + +/** @ingroup ToolNames */ +/** @{ */ +#define kTypeTool "Adobe Type Tool" +#define kAreaTypeTool "Adobe Area Type Tool" +#define kPathTypeTool "Adobe Path Type Tool" +#define kVerticalTypeTool "Adobe Vertical Type Tool" +#define kVerticalAreaTypeTool "Adobe Vertical Area Type Tool" +#define kVerticalPathTypeTool "Adobe Vertical Path Type Tool" +#define kTextPositioningTool "Adobe Touch Type Tool" + +#define kRTLTypeTool "Adobe Right-To-Left Type Tool" +#define kRTLAreaTypeTool "Adobe Right-To-Left Area Type Tool" +#define kRTLPathTypeTool "Adobe Right-To-Left Path Type Tool" + +#define kRectangleTool "Adobe Rectangle Tool" +#define kRoundedRectangleTool "Adobe Rounded Rectangle Tool" +#define kEllipseTool "Adobe Ellipse Tool" + +#define kSelectTool "Adobe Select Tool" +#define kToggleSelectTool "Adobe Toggle Select Tool" +#define kDirectSelectTool "Adobe Direct Select Tool" +#define kToggleDirectSelectTool "Adobe Toggle Direct Select Tool" +#define kDirectObjectSelectTool "Adobe Direct Object Select Tool" + +#define kScaleTool "Adobe Scale Tool" +#define kRotateTool "Adobe Rotate Tool" +#define kReflectTool "Adobe Reflect Tool" +#define kShearTool "Adobe Shear Tool" + +#define kColumnGraphTool "Adobe Column Graph Tool" +#define kStackedColumnGraphTool "Adobe Stacked Column Graph Tool" +#define kLineGraphTool "Adobe Line Graph Tool" +#define kPieGraphTool "Adobe Pie Graph Tool" +#define kAreaGraphTool "Adobe Area Graph Tool" +#define kScatterGraphTool "Adobe Scatter Graph Tool" +#define kBarGraphTool "Adobe Bar Graph Tool" +#define kStackedBarGraphTool "Adobe Stacked Bar Graph Tool" +#define kRadarGraphTool "Adobe Radar Graph Tool" + +#define kScrollTool "Adobe Scroll Tool" +#define kFreehandTool "Adobe Freehand Tool" +#define kFreehandSmoothTool "Adobe Freehand Smooth Tool" +#define kFreehandEraseTool "Adobe Freehand Erase Tool" +#define kStencilTool "Adobe Stencil Tool" +#define kNaturalJoinTool "Adobe Corner Join Tool" + +#define kPenTool "Adobe Pen Tool" +#define kBlendTool "Adobe Blend Tool" +#define kScissorsTool "Adobe Scissors Tool" +#define kMeasureTool "Adobe Measure Tool" +#define kPageTool "Adobe Page Tool" +#define kZoomTool "Adobe Zoom Tool" +#define kAddAnchorPointTool "Adobe Add Anchor Point Tool" +#define kDeleteAnchorPointTool "Adobe Delete Anchor Point Tool" +#define kConvertDirectionPointTool "Adobe Anchor Point Tool" +#define kGradientVectorTool "Adobe Gradient Vector Tool" +#define kBrushTool "Adobe Brush Tool" +#define kEyedropperTool "Adobe Eyedropper Tool" +#define kReshapeTool "Adobe Reshape Tool" +#define kWidthTool "Adobe Width Tool" +#define kKnifeTool "Adobe Knife Tool" +#define kPolygonTool "Adobe Shape Construction Regular Polygon Tool" +#define kStarTool "Adobe Shape Construction Star Tool" +#define kSpiralTool "Adobe Shape Construction Spiral Tool" + +#define kMeshEditingTool "Adobe Mesh Editing Tool" +#define kFreeTransformTool "Adobe Free Transform Tool" + +#define kDirectLassoTool "Adobe Direct Lasso Tool" + +#define kPluginEllipseTool "Adobe Ellipse Shape Tool" +#define kPluginRectangleTool "Adobe Rectangle Shape Tool" + +// New for AI10 +#define kMagicWandTool "Adobe Magic Wand Tool" + +#define kLineTool "Adobe Line Tool" +#define kArcTool "Adobe Arc Tool" +#define kRectangularGridTool "Adobe Rectangular Grid Tool" +#define kPolarGridTool "Adobe Polar Grid Tool" +#define kFlareTool "Adobe Flare Tool" + +#define kWarpTool "Adobe Warp Tool" +#define kNewTwirlTool "Adobe New Twirl Tool" +#define kPuckerTool "Adobe Pucker Tool" +#define kBloatTool "Adobe Bloat Tool" +#define kScallopTool "Adobe Scallop Tool" +#define kCrystallizeTool "Adobe Cyrstallize Tool" +#define kWrinkleTool "Adobe Wrinkle Tool" + +#define kSliceTool "Adobe Slice Tool" +#define kSliceSelectTool "Adobe Slice Select Tool" + +#define kSymbolSprayerTool "Adobe Symbol Sprayer Tool" +#define kSymbolShifterTool "Adobe Symbol Shifter Tool" +#define kSymbolScruncherTool "Adobe Symbol Scruncher Tool" +#define kSymbolSizerTool "Adobe Symbol Sizer Tool" +#define kSymbolSpinnerTool "Adobe Symbol Spinner Tool" +#define kSymbolStainerTool "Adobe Symbol Stainer Tool" +#define kSymbolScreenerTool "Adobe Symbol Screener Tool" +#define kSymbolStylerTool "Adobe Symbol Styler Tool" + +// New for AI12 +#define kPlanarPaintbucketTool "Adobe Planar Paintbucket Tool" +#define kPlanarFaceSelectTool "Adobe Planar Face Select Tool" + +// New for AI13 +#define kEraserTool "Adobe Eraser Tool" +#define kCropTool "Adobe Crop Tool" + +// New for AI14 +#define kBlobTool "Adobe Blob Brush Tool" + +// New for AI15 +#define kLiveMergeTool "Adobe Shape Builder Tool" +#define kPGTool "Perspective Grid Tool" +#define kPerspectiveSelectionTool "Perspective Selection Tool" +// New for AI16 +#define kPatternTileTool "Adobe Pattern Tile Tool" +// New for AI17 +#define kPlaceGunTool "Adobe Place Gun Tool" + +// New for AI18.1 +#define kAdobeCurvatureTool "Adobe Curvature Tool" + +//New for Charts +#define kIGTool "Adobe Charts Tool" + +//New for 19.0 +#define kAdobeShaperTool "Adobe Shaper Tool" + +//New for 19.3 (October release) +#define kAdobeSymmetryTool "Adobe Symmetry Tool" + +// New for 22.0 (MAX release) +#define kAdobePuppetWarpTool "Adobe Puppet Warp Tool" + +// New for 22.0 (MAX release) +#define kDiffusionColoringTool "Adobe Diffusion Coloring Tool" + +// New for 23.0 (MAX release) +#define kSmartEditTool "Adobe Smart Edit Tool" + +// New for 24.3 +#define kColorThemePickerTool "Adobe Color Theme Picker Tool" + +//// New for 25.3 +#define kAdobeRotateCanvasTool "Adobe Rotate Canvas Tool" + +/** @} */ + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIToolbox.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIToolbox.h index 3cc126e..11738df 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIToolbox.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIToolbox.h @@ -1,255 +1,290 @@ -#ifndef __AIToolbox__ -#define __AIToolbox__ - -/* - * Name: AIToolbox.h - * $Revision: 14 $ - * Author: Paul Asente - * Date: 3/19/96 - * Purpose: Adobe Illustrator Toolbox Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AITool__ -#include "AITool.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIToolbox.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIToolboxSuite "AI Toolbox Suite" -#define kAIToolboxVersion6 AIAPI_VERSION(6) -#define kAIToolboxVersion kAIToolboxVersion6 -#define kAIToolboxSuiteVersion kAIToolboxVersion - -/** @ingroup Callers - The toolbox caller. See \c #AIToolboxSuite. */ -#define kCallerAIToolbox "AI Toolbox" - -/** @ingroup Selectors - Sent to signal the start of a series of calls - describing tools to be added. Always followed immediately by - \c #kSelectorAIStartToolGroup. The only valid information in - the message is the toolbox. */ -#define kSelectorAIStartToolbox "AI Toolbox Start Toolbox" -/** @ingroup Selectors - Sent to signal the end of a series of calls describing - tools to be added. The only valid information in the - message is the toolbox. */ -#define kSelectorAIEndToolbox "AI Toolbox End Toolbox" -/** @ingroup Selectors - Sent to signal the start of a tool group. (See @ref Toolsets) - Typically many of these are sent. Always followed immediately - by \c #kSelectorAIStartToolSet. The only valid information in the - message is the toolbox.*/ -#define kSelectorAIStartToolGroup "AI Toolbox Start Tool Group" -/** @ingroup Selectors - Sent to signal the end of a tool group. Always followed immediately - by a new \c #kSelectorAIStartToolGroup or \c #kSelectorAIEndToolbox. - The only valid information in the message is the toolbox. */ -#define kSelectorAIEndToolGroup "AI Toolbox End Tool Group" -/** @ingroup Selectors - Sent to signal the start of a tool set. (See @ref Toolsets) - Typically many of these are sent. Always followed immediately - by \c #kSelectorAIAddTool. The only valid information in the - message is the toolbox. */ -#define kSelectorAIStartToolSet "AI Toolbox Start Tool Set" -/** @ingroup Selectors - Sent to signal the end of a tool set. Always followed immediately - by a new \c #kSelectorAIStartToolSet or \c #kSelectorAIEndToolGroup. - The only valid information in the message is the toolbox. */ -#define kSelectorAIEndToolSet "AI Toolbox End Tool Set" -/** @ingroup Selectors - Sent to signal the addition of a tool. Always followed immediately - by another \c #kSelectorAIAddTool or \c #kSelectorAIEndToolSet. - The message is completely filled out. */ -#define kSelectorAIAddTool "AI Toolbox Add Tool" -/** @ingroup Selectors - Sent to add a rollover icon of a tool. Can be sent - any time after the tool has been added. The toolbox, tool, and - icon fields are valid in the message. */ -#define kSelectorAIAddRollover "AI Toolbox Add Rollover" - -/** @ingroup Selectors - Sent to signal that a tool has been selected. The - toolbox and tool fields are valid in the message. */ -#define kSelectorAIToolSelected "AI Toolbox Tool Selected" -/** @ingroup Selectors - Sent to signal that a tool's alternate action has been invoked. - Typically brings up a tool options dialog. The - toolbox and tool fields are valid in the message. */ -#define kSelectorAIAlternateToolActionSelected "AI Toolbox Alternate Tool Action Selected" -/** @ingroup Selectors - Sent to signal a tool cycle. The toolbox and tool fields are valid in the message. - If the currently selected tool is not in the message tool's tool set, - make the message tool the current tool. If the currently selected tool - is in the message tool's tool set, switch to the next tool in the tool set. */ -#define kSelectorAICycleTool "AI Toolbox Cycle Tool" -/** @ingroup Selectors - Sent to signal a tool soft cycle. The toolbox and tool fields are valid in the message. - If the currently selected tool is not in the message tool's tool set, - make the message tool the current tool. - If the currently selected tool is in the message tool's tool set, do nothing. - See \c #AIToolboxSuite::SetTool().*/ -#define kSelectorAISoftCycleTool "AI Toolbox Soft Cycle Tool" - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a toolbox, never dereferenced. Access with the \c #AIToolboxSuite. */ -typedef struct _t_AIToolboxOpaque *AIToolboxHandle; - - -/** The contents of a toolbox message. Valid fields depend on the - selector type. */ -typedef struct { - /** The message data. */ - SPMessageData d; - /** The toolbox reference. */ - AIToolboxHandle toolbox; - /** The tool reference. */ - AIToolType tool; - /** The icon shown in the Tools palette. */ - AIDataStackRef iconResourceDictionary; - /** Unique identifying name for the tool */ - char *name; - /** Localized display name for the tool. */ - char *title; - /** Short descriptive string shown when tool is activated. */ - char *tooltip; - /** The Help system identifier. */ - ASHelpID helpID; -} AIToolboxMessage; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to create additional tool palettes, - of which there can be any number. Some of the selectors are also - useful for other plug-ins that want to know when the current tool changes. - - At startup time, after all the tools have been added, the application sends a set - of messages that describe the current tools. The messages are also sent if - tools are added later, although this is unusual. - - The caller is \c #kCallerAIToolbox. These selectors are sent: -
\c #kSelectorAIStartToolbox -
\c #kSelectorAIEndToolbox -
\c #kSelectorAIStartToolGroup -
\c #kSelectorAIEndToolGroup -
\c #kSelectorAIStartToolSet -
\c #kSelectorAIEndToolSet -
\c #kSelectorAIAddTool -
\c #kSelectorAIAddRollover - - These messages are sent during the execution of the program to notify - other toolboxes of actions taken by a toolbox: -
\c #kSelectorAIToolSelected -
\c #kSelectorAIAlternateToolActionSelected -
\c #kSelectorAICycleTool -
\c #kSelectorAISoftCycleTool - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIToolboxSuite and \c #kAIToolboxVersion. -*/ - -struct AIToolboxSuite { - /** Registers a plug-in to receive toolbox selector messages and to use the - other suite methods. - @param self This plug-in. - @param name The unique identifying name of this plug-in. - @param toolbox [out] A buffer in which to return the toolbox reference. If you - install multiple toolboxes, save to compare to the toolbox reference in - message data. - */ - AIAPI AIErr (*AddToolbox) (SPPluginRef self, const char *name, - AIToolboxHandle *toolbox); - - /** Makes a tool current for a toolbox. - @param toolbox The toolbox reference. Use NULL to set the tool in the built-in toolbox. - @param tool The tool reference. - */ - AIAPI AIErr (*SetTool) (AIToolboxHandle toolbox, AIToolType tool); - - /** Performs the alternate action for a tool, typically to show an options dialog. - Does not change the current tool. - @param toolbox The toolbox reference. - @param tool The tool reference. - */ - AIAPI AIErr (*AlternateAction) (AIToolboxHandle toolbox, AIToolType tool ); - - /** Sends the \c #kSelectorAICycleTool message. - @param toolbox The toolbox reference. - @param tool The tool reference. - */ - AIAPI AIErr (*CycleTool) (AIToolboxHandle toolbox, AIToolType tool); - - /** Gets the number of registered toolboxes. Use with \c #GetNthToolbox() - to iterate through plug-in toolboxes. - @param count [out] A buffer in which to return the number of toolboxes. - */ - AIAPI AIErr (*CountToolboxes) (ai::int32 *count); - - /** Retrieves a toolbox by index position. Use with \c #CountToolboxes() - to iterate through plug-in toolboxes. - @param n The 0-based position index. - @param tool [out] A buffer in which to return the toolbox reference. - */ - AIAPI AIErr (*GetNthToolbox) (ai::int32 n, AIToolboxHandle *toolbox); - - /** Retrieves the currently selected tool type. The plug-in does not need - to register as a toolbox plug-in to use this. - toolNum [out] A buffer in which to return the tool number. - See @ref Toolsets - */ - AIAPI AIErr (*GetCurrentToolType) (AIToolType *toolNum); - -}; - - -#include "AIHeaderEnd.h" - - -#endif - +#ifndef __AIToolbox__ +#define __AIToolbox__ + +/* + * Name: AIToolbox.h + * $Revision: 14 $ + * Author: Paul Asente + * Date: 3/19/96 + * Purpose: Adobe Illustrator Toolbox Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#ifndef __AITool__ +#include "AITool.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIToolbox.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIToolboxSuite "AI Toolbox Suite" +#define kAIToolboxVersion7 AIAPI_VERSION(7) +#define kAIToolboxVersion kAIToolboxVersion7 +#define kAIToolboxSuiteVersion kAIToolboxVersion + +/** @ingroup Callers + The toolbox caller. See \c #AIToolboxSuite. */ +#define kCallerAIToolbox "AI Toolbox" + +/** @ingroup Selectors + Sent to signal the start of a series of calls + describing tools to be added. Always followed immediately by + \c #kSelectorAIStartToolGroup. The only valid information in + the message is the toolbox. */ +#define kSelectorAIStartToolbox "AI Toolbox Start Toolbox" +/** @ingroup Selectors + Sent to signal the end of a series of calls describing + tools to be added. The only valid information in the + message is the toolbox. */ +#define kSelectorAIEndToolbox "AI Toolbox End Toolbox" +/** @ingroup Selectors + Sent to signal the start of a tool group. (See @ref Toolsets) + Typically many of these are sent. Always followed immediately + by \c #kSelectorAIStartToolSet. The only valid information in the + message is the toolbox.*/ +#define kSelectorAIStartToolGroup "AI Toolbox Start Tool Group" +/** @ingroup Selectors + Sent to signal the end of a tool group. Always followed immediately + by a new \c #kSelectorAIStartToolGroup or \c #kSelectorAIEndToolbox. + The only valid information in the message is the toolbox. */ +#define kSelectorAIEndToolGroup "AI Toolbox End Tool Group" +/** @ingroup Selectors + Sent to signal the start of a tool set. (See @ref Toolsets) + Typically many of these are sent. Always followed immediately + by \c #kSelectorAIAddTool. The only valid information in the + message is the toolbox. */ +#define kSelectorAIStartToolSet "AI Toolbox Start Tool Set" +/** @ingroup Selectors + Sent to signal the end of a tool set. Always followed immediately + by a new \c #kSelectorAIStartToolSet or \c #kSelectorAIEndToolGroup. + The only valid information in the message is the toolbox. */ +#define kSelectorAIEndToolSet "AI Toolbox End Tool Set" +/** @ingroup Selectors + Sent to signal the addition of a tool. Always followed immediately + by another \c #kSelectorAIAddTool or \c #kSelectorAIEndToolSet. + The message is completely filled out. */ +#define kSelectorAIAddTool "AI Toolbox Add Tool" +/** @ingroup Selectors + Sent to add a rollover icon of a tool. Can be sent + any time after the tool has been added. The toolbox, tool, and + icon fields are valid in the message. */ +#define kSelectorAIAddRollover "AI Toolbox Add Rollover" + +/** @ingroup Selectors + Sent to signal that a tool has been selected. The + toolbox and tool fields are valid in the message. */ +#define kSelectorAIToolSelected "AI Toolbox Tool Selected" +/** @ingroup Selectors + Sent to signal that a tool's alternate action has been invoked. + Typically brings up a tool options dialog. The + toolbox and tool fields are valid in the message. */ +#define kSelectorAIAlternateToolActionSelected "AI Toolbox Alternate Tool Action Selected" +/** @ingroup Selectors + Sent to signal a tool cycle. The toolbox and tool fields are valid in the message. + If the currently selected tool is not in the message tool's tool set, + make the message tool the current tool. If the currently selected tool + is in the message tool's tool set, switch to the next tool in the tool set. */ +#define kSelectorAICycleTool "AI Toolbox Cycle Tool" +/** @ingroup Selectors + Sent to signal a tool soft cycle. The toolbox and tool fields are valid in the message. + If the currently selected tool is not in the message tool's tool set, + make the message tool the current tool. + If the currently selected tool is in the message tool's tool set, do nothing. + See \c #AIToolboxSuite::SetTool().*/ +#define kSelectorAISoftCycleTool "AI Toolbox Soft Cycle Tool" + +/** + Tool icon Types to be given by clients. +*/ + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a toolbox, never dereferenced. Access with the \c #AIToolboxSuite. */ +typedef struct _t_AIToolboxOpaque *AIToolboxHandle; + +/** \c #AIBuiltInToolBox constants. + */ +enum AIBuiltInToolBox : ai::int16 +{ + /* Basic Toolbox. */ + kAIBasicToolbox = 0, + /* Advanced Toolbox. */ + kAIAdvancedToolbox = 1, +}; + + +/** The contents of a toolbox message. Valid fields depend on the + selector type. */ +struct AIToolboxMessage{ + /** The message data. */ + SPMessageData d = {}; + /** The toolbox reference. */ + AIToolboxHandle toolbox = {}; + /** The tool reference. */ + AIToolType tool = 0; + /** The icon shown in the Tools palette. */ + AIDataStackRef iconResourceDictionary; + /** Unique identifying name for the tool */ + char *name = nullptr; + /** This is a deprecated field and will only be filled with an empty string */ + char *title_deprecated = nullptr; + /** This is a deprecated field and will only be filled with an empty string */ + char *tooltip_deprecated = nullptr; + /** This is a deprecated field and will not be used */ + ASHelpID helpID_deprecated = 0; + + /* Specifies the type of the incoming icons + enum IconType in AITypes.h*/ + ai::IconType iconType = ai::IconType::kInvalid; + /**This is for internal purpose only to hold plugin's priority for group.**/ + AIToolType sameGroupAs =0 ; + /**This is for internal purpose only to hold plugin's priority for set.**/ + AIToolType sameSetAs = 0; + /**This is for internal purpose only to hold a plugin is third party plugin or not.**/ + bool isThirdPartyPlugin = false; + /** Localized display name for the tool. */ + ai::UnicodeString title; + /** Short descriptive string shown when tool is activated. */ + ai::UnicodeString tooltip; +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite allows you to create additional tool palettes, + of which there can be any number. Some of the selectors are also + useful for other plug-ins that want to know when the current tool changes. + + At startup time, after all the tools have been added, the application sends a set + of messages that describe the current tools. The messages are also sent if + tools are added later, although this is unusual. + + The caller is \c #kCallerAIToolbox. These selectors are sent: +
\c #kSelectorAIStartToolbox +
\c #kSelectorAIEndToolbox +
\c #kSelectorAIStartToolGroup +
\c #kSelectorAIEndToolGroup +
\c #kSelectorAIStartToolSet +
\c #kSelectorAIEndToolSet +
\c #kSelectorAIAddTool +
\c #kSelectorAIAddRollover + + These messages are sent during the execution of the program to notify + other toolboxes of actions taken by a toolbox: +
\c #kSelectorAIToolSelected +
\c #kSelectorAIAlternateToolActionSelected +
\c #kSelectorAICycleTool +
\c #kSelectorAISoftCycleTool + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIToolboxSuite and \c #kAIToolboxVersion. +*/ + +struct AIToolboxSuite { + /** Registers a plug-in to receive toolbox selector messages and to use the + other suite methods. + @param self This plug-in. + @param name The unique identifying name of this plug-in. + @param toolbox [out] A buffer in which to return the toolbox reference. If you + install multiple toolboxes, save to compare to the toolbox reference in + message data. + */ + AIAPI AIErr (*AddToolbox) (SPPluginRef self, const char *name, + AIToolboxHandle *toolbox); + + /** Makes a tool current for a toolbox. + @param toolbox The toolbox reference. Use NULL to set the tool in the built-in toolbox. + @param tool The tool reference. + */ + AIAPI AIErr (*SetTool) (AIToolboxHandle toolbox, AIToolType tool); + + /** Performs the alternate action for a tool, typically to show an options dialog. + Does not change the current tool. + @param toolbox The toolbox reference. + @param tool The tool reference. + */ + AIAPI AIErr (*AlternateAction) (AIToolboxHandle toolbox, AIToolType tool ); + + /** Sends the \c #kSelectorAICycleTool message. + @param toolbox The toolbox reference. + @param tool The tool reference. + */ + AIAPI AIErr (*CycleTool) (AIToolboxHandle toolbox, AIToolType tool); + + /** Gets the number of registered toolboxes. Use with \c #GetNthToolbox() + to iterate through plug-in toolboxes. + @param count [out] A buffer in which to return the number of toolboxes. + */ + AIAPI AIErr (*CountToolboxes) (ai::int32 *count); + + /** Retrieves a toolbox by index position. Use with \c #CountToolboxes() + to iterate through plug-in toolboxes. + @param n The 0-based position index. + @param tool [out] A buffer in which to return the toolbox reference. + */ + AIAPI AIErr (*GetNthToolbox) (ai::int32 n, AIToolboxHandle *toolbox); + + /** Retrieves the currently selected tool type. The plug-in does not need + to register as a toolbox plug-in to use this. + toolNum [out] A buffer in which to return the tool number. + See @ref Toolsets + */ + AIAPI AIErr (*GetCurrentToolType) (AIToolType *toolNum); + + /** Retrieves the visibility for a built-in toolbox. + toolBox [in] A built-in toolbox taking \c #AIBuiltInToolBox value. + visible [out] The visibility of the toolbox + + */ + AIAPI AIErr (*GetBuiltInToolboxVisibility) (ai::int16 toolBox, AIBoolean& visible); + +}; + + +#include "AIHeaderEnd.h" + + +#endif + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformAgain.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformAgain.h index 1168616..aca184d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformAgain.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformAgain.h @@ -1,144 +1,144 @@ -#ifndef __AITransformAgain__ -#define __AITransformAgain__ - -/* - * Name: AITransformAgain.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Transform Again Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AITransformAgain.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAITransformAgainSuite "AI Transform Again Suite" -#define kAITransformAgainSuiteVersion4 AIAPI_VERSION(4) -#define kAITransformAgainSuiteVersion kAITransformAgainSuiteVersion4 -#define kAITransformAgainVersion kAITransformAgainSuiteVersion - -/** @ingroup Callers - The transform again caller. See \c #AITransformAgainSuite. */ -#define kCallerAITransformAgain "AI Transform Again" - -/** @ingroup Selectors - The transform again selector. See \c #AITransformAgainSuite. */ -#define kSelectorAITransformAgain "AI Go" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** The contents of a transform again message. See \c #AITransformAgainSuite. */ -typedef struct { - /** The message data */ - SPMessageData d; -} AITransformAgainMessage; - - -/******************************************************************************* - ** - ** Suite Record - ** - **/ - -/** @ingroup Suites - When Illustrator performs a transformation using a built-in tool or menu item, - the user can repeat the action again easily by using the Transform Again command. - This suite allows you to register your plug-in to receive the Transform Again - command. If a tool does a rotation in three dimensions, for example, it could - allow the user to repeat the transformation. - - The Transform Again command does not allow a user interface; you must store any - user parameters needed when your plug-in performs the initial transformation. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAITransformAgainSuite and \c #kAITransformAgainVersion. - */ -typedef struct { - - /** Registers for the \c #kSelectorAITransformAgain selector. Call this - after a transformation is performed, to allow the same transformation - to be repeated if the user chooses the Transform Again menu item. - @code -// add the transform again -sAgain->SetTransformAgain( message->d.self ); - @endcode - The plug-in receives the selector until the user does a different transformation. - If more than one plug-in calls this function, the last one to make the call - receives the selector. - - In response to the \c #kSelectorAITransformAgain selector, the plug-in - should repeat the previous transformation. For example: - @code -// transform again handler -static AIErr repeatTransform (AITransformAgainMessage *message) { - AIErr error = kNoErr; - - error = acquireSuites(message->d.basic); - if (error) goto error; - changeSelection; - sUndo->SetUndoText((char*)g->undoMove, (char*)g->redoMove); - -error: - error = releaseSuites(message->d.basic); - return error; -} - @endcode - @param self This plug-in. - */ - AIAPI AIErr (*SetTransformAgain)( SPPluginRef self ); - - /** Retrieves the plug-in that is currently registered to receive - the next \c #kSelectorAITransformAgain selector. - @param plugin A buffer in which to return the plug-in reference, - or \c NULL if the last transformation was performed by the - application, rather than a plug-in. - */ - AIAPI AIErr (*GetTransformAgain)( SPPluginRef *plugin ); - -} AITransformAgainSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AITransformAgain__ +#define __AITransformAgain__ + +/* + * Name: AITransformAgain.h + * $Revision: 6 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Transform Again Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AITransformAgain.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAITransformAgainSuite "AI Transform Again Suite" +#define kAITransformAgainSuiteVersion4 AIAPI_VERSION(4) +#define kAITransformAgainSuiteVersion kAITransformAgainSuiteVersion4 +#define kAITransformAgainVersion kAITransformAgainSuiteVersion + +/** @ingroup Callers + The transform again caller. See \c #AITransformAgainSuite. */ +#define kCallerAITransformAgain "AI Transform Again" + +/** @ingroup Selectors + The transform again selector. See \c #AITransformAgainSuite. */ +#define kSelectorAITransformAgain "AI Go" + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** The contents of a transform again message. See \c #AITransformAgainSuite. */ +typedef struct { + /** The message data */ + SPMessageData d; +} AITransformAgainMessage; + + +/******************************************************************************* + ** + ** Suite Record + ** + **/ + +/** @ingroup Suites + When Illustrator performs a transformation using a built-in tool or menu item, + the user can repeat the action again easily by using the Transform Again command. + This suite allows you to register your plug-in to receive the Transform Again + command. If a tool does a rotation in three dimensions, for example, it could + allow the user to repeat the transformation. + + The Transform Again command does not allow a user interface; you must store any + user parameters needed when your plug-in performs the initial transformation. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAITransformAgainSuite and \c #kAITransformAgainVersion. + */ +typedef struct { + + /** Registers for the \c #kSelectorAITransformAgain selector. Call this + after a transformation is performed, to allow the same transformation + to be repeated if the user chooses the Transform Again menu item. + @code +// add the transform again +sAgain->SetTransformAgain( message->d.self ); + @endcode + The plug-in receives the selector until the user does a different transformation. + If more than one plug-in calls this function, the last one to make the call + receives the selector. + + In response to the \c #kSelectorAITransformAgain selector, the plug-in + should repeat the previous transformation. For example: + @code +// transform again handler +static AIErr repeatTransform (AITransformAgainMessage *message) { + AIErr error = kNoErr; + + error = acquireSuites(message->d.basic); + if (error) goto error; + changeSelection; + sUndo->SetUndoText((char*)g->undoMove, (char*)g->redoMove); + +error: + error = releaseSuites(message->d.basic); + return error; +} + @endcode + @param self This plug-in. + */ + AIAPI AIErr (*SetTransformAgain)( SPPluginRef self ); + + /** Retrieves the plug-in that is currently registered to receive + the next \c #kSelectorAITransformAgain selector. + @param plugin A buffer in which to return the plug-in reference, + or \c NULL if the last transformation was performed by the + application, rather than a plug-in. + */ + AIAPI AIErr (*GetTransformAgain)( SPPluginRef *plugin ); + +} AITransformAgainSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformArt.h index bbf2a39..6a6ff36 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformArt.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformArt.h @@ -1,147 +1,159 @@ -#ifndef __AITransformArt__ -#define __AITransformArt__ - -/* - * Name: AITransformArt.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Transform Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AITransformArt.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAITransformArtSuite "AI Transform Art Suite" -#define kAITransformArtSuiteVersion3 AIAPI_VERSION(3) -#define kAITransformArtSuiteVersion kAITransformArtSuiteVersion3 -#define kAITransformArtVersion kAITransformArtSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Options that control the behavior of \c #AITransformArtSuite::TransformArt() */ -enum AITransformArtOptions { - /** Transform object geometry */ - kTransformObjects = ((ai::int32) (1<<0)), - /** Apply the transform to gradient fills */ - kTransformFillGradients = ((ai::int32) (1<<1)), - /** Apply the transform to pattern fills */ - kTransformFillPatterns = ((ai::int32) (1<<2)), - /** Apply the transform to pattern strokes */ - kTransformStrokePatterns = ((ai::int32) (1<<3)), - /** Scale the stroke weights by the linescale factor */ - kScaleLines = ((ai::int32) (1<<4)), - /** Transform any opacity masks attached to the objects - if they are set as linked. */ - kTransformLinkedMasks = ((ai::int32) (1<<5)), - /** Apply the transformation recursively. */ - kTransformChildren = ((ai::int32) (1<<6)), - /** Apply the transformation only to selected segments of path objects. */ - kTransformSelectionOnly = ((ai::int32) (1<<7)), - /** Notify parent plug-in groups of the transformation. Affects performance - if \c #AITransformArtSuite::TransformArt() is called during a mouse drag loop. */ - kTransformNotifyPluginGroups = ((ai::int32) (1<<8)), - /** Internal use only. */ - kTransformForPerspectivePlugin = ((ai::int32) (1<<9)), - /** Apply the transform to gradient stroke. */ - kTransformStrokeGradients = ((ai::int32) (1<<10)), - /** Preserve corners during transformations while maintaining radii values*/ - kPreserveCornersMaintainingRadii = ((ai::int32) (1<<11)), - /** Preserve corners during transformations while scaling radii values*/ - kPreserveCornersScalingRadii = ((ai::int32) (1<<12)), - /** Transform all aspects of the art style */ - kTransformEntireArtStyle = kTransformFillGradients | kTransformFillPatterns | kTransformStrokePatterns | kScaleLines | kTransformStrokeGradients, - /** Transform all aspects of the art style that are not affected by transformation preferences. */ - kTransformBasicArtStyle = kTransformFillGradients | kTransformStrokeGradients -}; - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides a function that transforms an art object of any - type by a given transformation matrix, making special transformation routines - for the different art types unnecessary. - - \li Text art, raster art, and placed art objects have associated - transformation matrices. Functions such as \c #AIRasterSuite::GetRasterMatrix() - in the related suites provide access to the matrices. - \c #TransformArt() does not use the associated matrix, but instead uses - a matrix that you pass to the function. - \li Path art objects are simple collections of connected line segments, and - do not have an associated transformation matrix. For these, you must use - the \c #TransformArt() function. - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAITransformArtSuite and \c #kAITransformArtSuiteVersion. - */ -typedef struct { - - /** Transforms an art object by a given transformation matrix. - @param art The art object. - @param matrix The transformation matrix. - @param lineScale The scale factor to apply if the object has a stroke - and the \c #kScaleLines option is set. Expressed as a percentage - in the range [0..1], where 1 is 100%, meaning no scaling. Calculate the - appropriate linescale as a function of the horizontal and vertical scale - factors of the matrix: lineScale = sqrt(Sx) * sqrt(Sy). - @param flags Behavior options, a logical OR of \c #AITransformArtOptions constants. - @note This function does not do a "deep" transform; that is, it does not - automatically traverse into the members of group or compound art objects. - If you wish to do this, you must traverse the artwork tree and call the - function on the member art objects. - */ - AIAPI AIErr (*TransformArt) ( AIArtHandle art, AIRealMatrix *matrix, AIReal lineScale, ai::int32 flags ); - -} AITransformArtSuite; - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AITransformArt__ +#define __AITransformArt__ + +/* + * Name: AITransformArt.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Transform Art Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AIPlugin__ +#include "AIPlugin.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AITransformArt.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAITransformArtSuite "AI Transform Art Suite" +#define kAITransformArtSuiteVersion3 AIAPI_VERSION(3) +#define kAITransformArtSuiteVersion kAITransformArtSuiteVersion3 +#define kAITransformArtVersion kAITransformArtSuiteVersion + + +/******************************************************************************* + ** + ** Types + ** + **/ + +enum FastTransformMode +{ + /** In static mode of FastTransform, graphic images are created only once in the start.*/ + kStatic, + /** In dynamic mode of FastTransform, graphic images are created/modified start as well as during the operation. */ + kDynamic +}; + +/** Options that control the behavior of \c #AITransformArtSuite::TransformArt() */ +enum AITransformArtOptions { + /** Transform object geometry */ + kTransformObjects = ((ai::int32) (1<<0)), + /** Apply the transform to gradient fills */ + kTransformFillGradients = ((ai::int32) (1<<1)), + /** Apply the transform to pattern fills */ + kTransformFillPatterns = ((ai::int32) (1<<2)), + /** Apply the transform to pattern strokes */ + kTransformStrokePatterns = ((ai::int32) (1<<3)), + /** Scale the stroke weights by the linescale factor */ + kScaleLines = ((ai::int32) (1<<4)), + /** Transform any opacity masks attached to the objects + if they are set as linked. */ + kTransformLinkedMasks = ((ai::int32) (1<<5)), + /** Apply the transformation recursively. */ + kTransformChildren = ((ai::int32) (1<<6)), + /** Apply the transformation only to selected segments of path objects. */ + kTransformSelectionOnly = ((ai::int32) (1<<7)), + /** Notify parent plug-in groups of the transformation. Affects performance + if \c #AITransformArtSuite::TransformArt() is called during a mouse drag loop. */ + kTransformNotifyPluginGroups = ((ai::int32) (1<<8)), + /** Internal use only. */ + kTransformForPerspectivePlugin = ((ai::int32) (1<<9)), + /** Apply the transform to gradient stroke. */ + kTransformStrokeGradients = ((ai::int32) (1<<10)), + /** Preserve corners during transformations while maintaining radii values*/ + kPreserveCornersMaintainingRadii = ((ai::int32) (1<<11)), + /** Preserve corners during transformations while scaling radii values*/ + kPreserveCornersScalingRadii = ((ai::int32) (1<<12)), + /** Scale the text wrap offsets by the linescale factor */ + kScaleTextWrapOffset = ((ai::int32) (1<<13)), + /** Transform all aspects of the art style */ + kTransformEntireArtStyle = kTransformFillGradients | kTransformFillPatterns | kTransformStrokePatterns | kScaleLines | kTransformStrokeGradients, + /** Transform all aspects of the art style that are not affected by transformation preferences. */ + kTransformBasicArtStyle = kTransformFillGradients | kTransformStrokeGradients +}; + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides a function that transforms an art object of any + type by a given transformation matrix, making special transformation routines + for the different art types unnecessary. + + \li Text art, raster art, and placed art objects have associated + transformation matrices. Functions such as \c #AIRasterSuite::GetRasterMatrix() + in the related suites provide access to the matrices. + \c #TransformArt() does not use the associated matrix, but instead uses + a matrix that you pass to the function. + \li Path art objects are simple collections of connected line segments, and + do not have an associated transformation matrix. For these, you must use + the \c #TransformArt() function. + + Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAITransformArtSuite and \c #kAITransformArtSuiteVersion. + */ +typedef struct { + + /** Transforms an art object by a given transformation matrix. + @param art The art object. + @param matrix The transformation matrix. + @param lineScale The scale factor to apply if the object has a stroke + and the \c #kScaleLines option is set. Expressed as a percentage + in the range [0..1], where 1 is 100%, meaning no scaling. Calculate the + appropriate linescale as a function of the horizontal and vertical scale + factors of the matrix: lineScale = sqrt(Sx) * sqrt(Sy). + Also, if the object is a text wrap, and \c #kScaleTextWrapOffset + option is set, ,the lineScale is applied to the text wrap offset as well. + @param flags Behavior options, a logical OR of \c #AITransformArtOptions constants. + @note This function does not do a "deep" transform; that is, it does not + automatically traverse into the members of group or compound art objects. + If you wish to do this, you must traverse the artwork tree and call the + function on the member art objects. + */ + AIAPI AIErr (*TransformArt) ( AIArtHandle art, AIRealMatrix *matrix, AIReal lineScale, ai::int32 flags ); + +} AITransformArtSuite; + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformTypes.h index 0b7e04c..432707b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITransformTypes.h @@ -1,159 +1,159 @@ -/************************************************************************* -* -*ADOBE SYSTEMS INCORPORATED -* Copyright 2010 Adobe Systems Incorporated -* All Rights Reserved. -* -*NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the -*terms of the Adobe license agreement accompanying it. If you have received this file from a -*source other than Adobe, then your use, modification, or distribution of it requires the prior -*written permission of Adobe. -* -**************************************************************************/ - -#ifndef AICoreTransformTypesSuite_h__ -#define AICoreTransformTypesSuite_h__ - -///********* Transformations ****************** - -/** Transformation types used in \c #AIOverrideColorConversionSuite. */ - -enum TransformType -{ - nullTransformType, // no transformation - translateTransformType, - scaleTransformType, - rotateTransformType, - reflectTransformType, - shearTransformType, - pluginTransformType, // call a plug-in - compoundTransformType // combines several of the above -}; - -// Save translation in two forms, so that round-off error from converting to -// h/v and back to dist/angle doesn't show up in the distance/angle fields -// when specifying a dist/angle translation and then bringing the dialog -// back up. We use only the h/v form for performing the transformation. -// [Teri 5/24/93] -/** Parameters structure for a Move transformation. -See \c #AIOverrideColorConversionSuite. -*/ -struct TranslateTransform -{ - AIReal h; - AIReal v; - AIReal dist; // in points - AIReal angle; // in degrees -}; - -/** Parameters structure for a Scale transformation. -See \c #AIOverrideColorConversionSuite. -*/ -struct ScaleTransform -{ - AIRealPoint scale; // in percentages, relative to constrain angles - AIReal strokeScale; // the value to multiply strokes by if doLines is true - // (usually sqrt(abs(matrix.a * matrix.d)) - bool uniform; - bool doLines; -}; - -/** Parameters structure for a Rotate transformation. -See \c #AIOverrideColorConversionSuite. - */ -struct RotateTransform -{ - AIReal angle; // in degrees, counter-clockwise - AIReal radians; // in radians -}; - -/** Parameters structure for a Reflect transformation. -See \c #AIOverrideColorConversionSuite. - */ -struct ReflectTransform -{ - AIReal angle; // around which to reflect, in degrees - AIReal radians; // in radians -}; - -/** Parameters structure for a Shear transformation. -See \c #AIOverrideColorConversionSuite. - */ -struct ShearTransform -{ - AIReal shear; // in degrees - AIReal angle; // in degrees -}; - -/** A union of transformation types. -See \c #MatrixTform and \c #AIOverrideColorConversionSuite. - */ -union TransformUnion -{ - TranslateTransform mov; - ScaleTransform sca; - RotateTransform rot; - ReflectTransform ref; - ShearTransform shr; -}; - -/** This structure describes a transformation, in "descriptive" form and matrix form. - If originInMatrix is true, the origin is incorporated into the matrix, and points - can be transformed by the matrix directly. If not, the matrix represents a - transformation around (0,0), and to transform points, they must first be translated - by -origin, then transformed by the matrix, then translated back by +origin. - - Some transformations cannot be represented with the origin in the matrix because - they would get fixed point overflow in the h and v components; for example, scaling by - any factor over 8 around an origin near the center of the screen. - - The TransformUnion struct is sometimes a more convenient description for - transforming patterns, gradients, text anchors, and graph elements. If type - is compoundTransformType, though, only tu.sca.strokeStyle is looked at if - tu.sca.doLines is true. -*/ -struct MatrixTform -{ - AIRealMatrix matrix; - AIRealPoint origin; - /** True if the origin is incorporated into the matrix, and points - can be transformed by the matrix directly. */ - bool originInMatrix; - TransformType type; - TransformUnion tu; -}; - -/** Constants for reference point values in the Preferences dialog Transform panel. - Get values from - \c #AIPreferenceSuite::GetIntegerPreference("AdobeTransformObjects", "AnchorPoint", &anchorPointOut). - Pin indexing scheme, 9 pin - * 0---1---2 - * | | | - * 3---4---5 - * | | | - * 6---7---8 -*/ -enum NinePointReferencePointInPreferences -{ - /** Integer value 0*/ - kAININE_PIN_LEFT_TOP = 0, - /** Integer value 1*/ - kAININE_PIN_MID_TOP, - /** Integer value 2*/ - kAININE_PIN_RIGHT_TOP, - /** Integer value 3*/ - kAININE_PIN_LEFT_MID, - /** Integer value 4*/ - kAININE_PIN_MID_MID, - /** Integer value 5*/ - kAININE_PIN_RIGHT_MID, - /** Integer value 6*/ - kAININE_PIN_LEFT_BOTTOM, - /** Integer value 7*/ - kAININE_PIN_MID_BOTTOM, - /** Integer value 8*/ - kAININE_PIN_RIGHT_BOTTOM -}; - - +/************************************************************************* +* +*ADOBE SYSTEMS INCORPORATED +* Copyright 2010 Adobe Systems Incorporated +* All Rights Reserved. +* +*NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the +*terms of the Adobe license agreement accompanying it. If you have received this file from a +*source other than Adobe, then your use, modification, or distribution of it requires the prior +*written permission of Adobe. +* +**************************************************************************/ + +#ifndef AICoreTransformTypesSuite_h__ +#define AICoreTransformTypesSuite_h__ + +///********* Transformations ****************** + +/** Transformation types used in \c #AIOverrideColorConversionSuite. */ + +enum TransformType +{ + nullTransformType, // no transformation + translateTransformType, + scaleTransformType, + rotateTransformType, + reflectTransformType, + shearTransformType, + pluginTransformType, // call a plug-in + compoundTransformType // combines several of the above +}; + +// Save translation in two forms, so that round-off error from converting to +// h/v and back to dist/angle doesn't show up in the distance/angle fields +// when specifying a dist/angle translation and then bringing the dialog +// back up. We use only the h/v form for performing the transformation. +// [Teri 5/24/93] +/** Parameters structure for a Move transformation. +See \c #AIOverrideColorConversionSuite. +*/ +struct TranslateTransform +{ + AIReal h; + AIReal v; + AIReal dist; // in points + AIReal angle; // in degrees +}; + +/** Parameters structure for a Scale transformation. +See \c #AIOverrideColorConversionSuite. +*/ +struct ScaleTransform +{ + AIRealPoint scale; // in percentages, relative to constrain angles + AIReal strokeScale; // the value to multiply strokes by if doLines is true + // (usually sqrt(abs(matrix.a * matrix.d)) + bool uniform; + bool doLines; +}; + +/** Parameters structure for a Rotate transformation. +See \c #AIOverrideColorConversionSuite. + */ +struct RotateTransform +{ + AIReal angle; // in degrees, counter-clockwise + AIReal radians; // in radians +}; + +/** Parameters structure for a Reflect transformation. +See \c #AIOverrideColorConversionSuite. + */ +struct ReflectTransform +{ + AIReal angle; // around which to reflect, in degrees + AIReal radians; // in radians +}; + +/** Parameters structure for a Shear transformation. +See \c #AIOverrideColorConversionSuite. + */ +struct ShearTransform +{ + AIReal shear; // in degrees + AIReal angle; // in degrees +}; + +/** A union of transformation types. +See \c #MatrixTform and \c #AIOverrideColorConversionSuite. + */ +union TransformUnion +{ + TranslateTransform mov; + ScaleTransform sca; + RotateTransform rot; + ReflectTransform ref; + ShearTransform shr; +}; + +/** This structure describes a transformation, in "descriptive" form and matrix form. + If originInMatrix is true, the origin is incorporated into the matrix, and points + can be transformed by the matrix directly. If not, the matrix represents a + transformation around (0,0), and to transform points, they must first be translated + by -origin, then transformed by the matrix, then translated back by +origin. + + Some transformations cannot be represented with the origin in the matrix because + they would get fixed point overflow in the h and v components; for example, scaling by + any factor over 8 around an origin near the center of the screen. + + The TransformUnion struct is sometimes a more convenient description for + transforming patterns, gradients, text anchors, and graph elements. If type + is compoundTransformType, though, only tu.sca.strokeStyle is looked at if + tu.sca.doLines is true. +*/ +struct MatrixTform +{ + AIRealMatrix matrix; + AIRealPoint origin; + /** True if the origin is incorporated into the matrix, and points + can be transformed by the matrix directly. */ + bool originInMatrix; + TransformType type; + TransformUnion tu; +}; + +/** Constants for reference point values in the Preferences dialog Transform panel. + Get values from + \c #AIPreferenceSuite::GetIntegerPreference("AdobeTransformObjects", "AnchorPoint", &anchorPointOut). + Pin indexing scheme, 9 pin + * 0---1---2 + * | | | + * 3---4---5 + * | | | + * 6---7---8 +*/ +enum NinePointReferencePointInPreferences +{ + /** Integer value 0*/ + kAININE_PIN_LEFT_TOP = 0, + /** Integer value 1*/ + kAININE_PIN_MID_TOP, + /** Integer value 2*/ + kAININE_PIN_RIGHT_TOP, + /** Integer value 3*/ + kAININE_PIN_LEFT_MID, + /** Integer value 4*/ + kAININE_PIN_MID_MID, + /** Integer value 5*/ + kAININE_PIN_RIGHT_MID, + /** Integer value 6*/ + kAININE_PIN_LEFT_BOTTOM, + /** Integer value 7*/ + kAININE_PIN_MID_BOTTOM, + /** Integer value 8*/ + kAININE_PIN_RIGHT_BOTTOM +}; + + #endif //AICoreTransformTypesSuite_h__ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITypes.h index 450899a..c923d60 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AITypes.h @@ -1,553 +1,657 @@ -#ifndef __AITypes__ -#define __AITypes__ - -/* - * Name: AITypes.h - * $Revision: 17 $ - * Author: - * Date: - * Purpose: Adobe Illustrator core type definitions. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2015 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - * - * Includes - * - */ -#ifdef __cplusplus -#include -#endif - -#include "AIBasicTypes.h" - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#include "ADMStdTypes.h"// This is a new file we have added in shared\illustrator\public\api\... - // It contains definition of ADMRect, ADMPoint, ADMUnits ... It has nothing to do with ADM except that the name contains ADM. - -#ifdef WIN_ENV -#include "AIWinDef.h" -#endif - -#ifndef __SPFiles__ -#include "SPFiles.h" -#endif - -#ifndef __SPPlugs__ -#include "SPPlugs.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AITypes.h */ - - - -/******************************************************************************* - * - * Constants - * - */ - -#define kPluginInterfaceVersion6001 0x06000001 // 6.0x1 -#define kPluginInterfaceVersion6002 0x06000020 - -#define kPluginInterfaceVersion7001 0x07000001 // AI 7.0 - -#define kPluginInterfaceVersion6021 0x06000021 // Joe's AI6-based prototype (only needed to run his plugins) -#define kPluginInterfaceVersion8001 0x08000001 // AI 8.0 -#define kPluginInterfaceVersion9001 0x09000001 // AI 9.0 -#define kPluginInterfaceVersion10001 0x10000001 // AI 10.0 -#define kPluginInterfaceVersion11001 0x11000001 // AI 11.0 -#define kPluginInterfaceVersion12001 0x12000001 // AI 12.0 -#define kPluginInterfaceVersion13001 0x13000001 // AI 13.0 -#define kPluginInterfaceVersion14001 0x14000001 // AI 14.0 -#define kPluginInterfaceVersion15001 0x15000001 // AI 15.0 -#define kPluginInterfaceVersion16001 0x16000001 // AI 16.0 -#define kPluginInterfaceVersion17001 0x17000001 // AI 17.0 -#define kPluginInterfaceVersion17011 0x17000011 // AI 17.1 -#define kPluginInterfaceVersion18001 0x18000001 // AI 18.0 -#define kPluginInterfaceVersion18011 0x18000011 // AI 18.1 -#define kPluginInterfaceVersion19001 0x19000001 // AI 19.0 -#define kPluginInterfaceVersion19021 0x19000021 // AI 19.2 -#define kPluginInterfaceVersion20001 0x20000001 // AI 20.0 - -#define kPluginInterfaceVersion kPluginInterfaceVersion20001 - - -#ifdef MAC_ENV -#define AIAPI_VERSION(x) (x + 1000) -#endif - -#ifdef WIN_ENV -#define AIAPI_VERSION(x) (x) -#endif - -#define kPlatformUnloadedSuiteProc NULL - -#if !defined(__BUILD_PLUGIN__) -#if defined(ILLUSTRATOR_H) -#define __BUILD_PLUGIN__ 0 -#else -#define __BUILD_PLUGIN__ 1 -#endif -#endif - -//These are no longer needed. -/** @deprecated */ -#define PUSH_GLOBALS -/** @deprecated */ -#define POP_GLOBALS - -// Determine the platform. -#if !defined(Macintosh) -#if defined(MAC_ENV) -#define Macintosh 1 -#endif -#endif - -#if !defined(MSWindows) -#if defined(WIN_ENV) -#define MSWindows 1 -#endif -#endif - -// Some common error codes. -/** @ingroup Errors - Operation canceled by user */ -#define kCanceledErr 'STOP' -/** @ingroup Errors - No current document */ -#define kNoDocumentErr 'DOC?' -/** @ingroup Errors - A selector was called at an inappropriate time. */ -#define kSelectorClashErr 'CLSH' -/** @ingroup Errors - Specified name not found. */ -#define kNameNotFoundErr 'NAM?' -/** @ingroup Errors - Specified name not unique. */ -#define kNameInUseErr 'NAM2' -/** @ingroup Errors - Specified name not valid. */ -#define kInvalidNameErr 'NA*!' -/** @ingroup Errors - Specified name too long. */ -#define kNameTooLongErr 'NAL!' -/** @ingroup Errors - Undo/Redo Can't be done properly. */ -#define kUndoRedoErr 'UND!' - -/******************************************************************************* - * - * Types - * - */ - -#define AIAPI ASAPI - -/** Opaque reference to an art object. Access using \c #AIArtSuite. */ -typedef struct ArtObject *AIArtHandle; -typedef const struct ArtObject *ConstAIArtHandle; -/** Opaque reference to a layer. Access using \c #AILayerSuite. */ -typedef struct _t_AILayerOpaque *AILayerHandle; -/** Fixed number (obsolete) See \c #AIFixedMathSuite. */ -typedef ASFixed AIFixed; -/** A fractional number greater than -2 and less than 2. Obsolete, use \c AIReal. */ -typedef ASFract AIFract; -/** An unsigned fractional number greater than 0 and less than 4. Obsolete, use \c AIReal. */ -typedef ai::uint32 AIUFract; -/** Real number. See \c #AIRealMathSuite. */ -typedef double AIReal, *AIRealPtr; -/** Floating-point numeric value */ -typedef float AIFloat; -/** Double-byte numeric value */ -typedef double AIDouble; -/** Data stream */ -typedef struct _t_AIStreamOpaque *AIStream; - /** Rectangle specified with \c #AIFixed coordinates. Obsolete, use \c #AIRealRect. */ -typedef ASFixedRect AIFixedRect; - /** Point specified with \c #AIFixed coordinates. Obsolete, use \c #AIRealPoint. */ -typedef ASFixedPoint AIFixedPoint; - /** Transformation matrix specified with \c #AIFixed values. Obsolete, use \c #AIRealMatrix. */ -typedef ASFixedMatrix AIFixedMatrix; - /** Rectangle specified with \c #AIReal coordinates.*/ -typedef struct _t_AIRealRect { - AIReal left, top, right, bottom; -} AIRealRect, *AIRealRectPtr; - -typedef struct _t_AIFloatRect { - AIFloat left, top, right, bottom; -} AIFloatRect, *AIFloatRectPtr; -//typedef AIRealRect AIRealRect, *AIRealRectPtr; -/** Point specified with \c #AIReal coordinates.*/ -typedef struct _t_AIRealMatrix { - AIReal a, b, c, d, tx, ty; - /** Sets to Identity.*/ - void Init() - { - a = 1.0; b = 0.0; - c = 0.0; d = 1.0; - tx = 0.0; ty = 0.0; - } -} AIRealMatrix, *AIRealMatrixPtr; - -//typedef struct _t_AIFloatMatrix { -// AIFloat a, b, c, d, tx, ty; -//} AIFloatMatrix, *AIFloatMatrixPtr; - -typedef ASRealMatrix AIFloatMatrix; -typedef struct _t_AIRealPoint { - AIReal h, v; -} AIRealPoint, *AIRealPointPtr; - -//typedef struct _t_AIFloatPoint { -// AIFloat h, v; -//} AIFloatPoint, *AIFloatPointPtr; -typedef ASRealPoint AIFloatPoint;// *AIRealPointPtr; - -/** Transformation matrix specified with \c #AIReal values.*/ - -//typedef AIRealMatrix AIRealMatrix, *AIRealMatrixPtr; -/** True (1) or false (0) */ -typedef ASBoolean AIBoolean; -/** 1-byte boolean value, true (1) or false (0) */ -typedef ASByte AIBool8; - -typedef ADMRect AIRect; - -typedef ADMPoint AIPoint; - -/** Opaque reference to a Platform View, NSView* on Mac and HWND on Windows . */ -typedef struct _t_AIPlatformViewOpaque *AIPlatformViewRef; - -/** Rectangle specified with \c #AIDouble coordinates.*/ -struct AIDoubleRect { - AIDouble left, top, right, bottom; -}; - -#ifdef MAC_ENV -/** Port reference, Mac OS only, same as Mac OS \c CGrafPtr. */ -typedef struct MacPort_t* AIPortRef; - -/** Window reference, Mac OS only, same as Mac OS \c WindowPtr. */ -typedef struct MacWindow_t* AIWindowRef; - -/** Dialog reference, Mac OS only, same as Mac OS \c DialogPtr. */ -typedef struct MacDialog_t* AIDialogRef; -#endif - -#ifdef WIN_ENV -/** Port reference, Windows only, same as Windows \c HDC. */ -typedef HDC AIPortRef; - -/** Window reference, Windows only, same as Windows \c HWND. */ -typedef HWND AIWindowRef; - -/** Dialog reference, Windows only, same as Windows \c HWND. */ -typedef HWND AIDialogRef; -#endif - -/** Opaque RGB color, access with \c #AIColorConversionSuite. */ -// AIRGBColor is the same as a Macintosh RGBColor on Macintosh and Windows. -/** RGB color record */ -struct AIRGBColor { - /** Color values */ - ai::uint16 red, green, blue; -}; - -/** Event information structure, used by \c #AIToolSuite, \c #AICursorSnapSuite. - AIEvent is the same as a Macintosh EventRecord on Macintosh and Windows. */ -/** Event record. */ -typedef struct _t_AIEvent { - /** The type of event */ - unsigned short what; - /** The event message */ - unsigned long message; - /** The time the event occurred */ - unsigned long when; - /** The location of the event */ - AIPoint where; - /** Event modifiers (other simultaneous events or conditions). - A logical OR of \c #AIEventModifersValue bit flag values. */ - unsigned short modifiers; -} AIEvent; - -/** Opaque error, returned by most suite functions. See @ref Errors */ -typedef ASErr AIErr; - -/** Use the \c #AIColorProfile type instead of an \c ACEProfile* */ -class ACEProfile; -/** Opaque color profile. See \c #AIColorConversionSuite. */ -typedef ACEProfile *AIColorProfile; - -/** An Illustrator menu command identifier. See \c #AICommandManagerSuite. */ -typedef ai::uint32 AICommandID; - -/** A ZString (localizable string) reference. - Enforces the passing of ZStrings. - A ZStrings is a \c char* with a conventional format, - so it is easy to pass a non-ZString by accident. When this - type is specified, the function expects a ZString. - You can cast it back to a \c char* if you need to look inside it. */ -typedef const struct ZREFStruct *ZRef; -#define ZREF(x) ((ZRef)(x)) - -/** The position of an art object, which determines how it is drawn relative to another, - overlapping art object, known as the prep (prepositional) object, - and also whether a path is inside a compound path or group. - \li If the paint order is \c kPlaceAbove or \c kPlaceBelow, the object is drawn above or below the prep object - when the boundaries overlap. - \li If the paint order is \c kPlaceInsideOnTop or \c kPlaceInsideOnBottom,the object is inside the prep object, - which must be a container. - \li If the paint order is \c kPlaceAboveAll or \c kPlaceBelowAll, - the prep object is ignored and the object is placed on top of or at the bottom of the entire document - (that is, inside-on-top the topmost group or inside-on-bottom the bottommost group). - - The paint order is the back-to-front ordering of art objects, also called the occlusion order or Z-order. - It determines which objects obscure others when their bounds overlap. If objects do not overlap, - the paint order is irrelevant to rendering. - - Paint order values are used, for example, when creating art objects with \c #AIArtSuite::NewArt(), copying - or moving art objects, or specifying insertion points for art. - */ -typedef enum AIPaintOrder { - /** Default value */ - kPlaceDefault = 0, - /** Place above the prepositional object */ - kPlaceAbove = 1, - /** Place below the prepositional object */ - kPlaceBelow, - /** Place within and at the top of the prepositional container */ - kPlaceInsideOnTop, - /** Place within and at the bottom of the prepositional container */ - kPlaceInsideOnBottom, - /** Place at the top of the paint order, ignoring prepositional object */ - kPlaceAboveAll, - /** Place at the bottom of the paint order, ignoring prepositional object */ - kPlaceBelowAll -} AIPaintOrder; - -/** How paint is applied--to fills, strokes, or both. */ -typedef enum AIPaintUsage { - kAINotUsed = 0x0000, - /** Paint is applied to fills. */ - kAIUsedOnFill = 0x0001, - /** Paint is applied to strokes. */ - kAIUsedOnStroke = 0x0002, - /** Paint is applied to both fills and strokes. */ - kAIUsedOnBoth = 0x0003 -} AIPaintUsage; - -/** These constants identifier can be used to determine the quadrant in a plane. - | - SecondQ | FirstQ - -------------------- - ThirdQ | FourthQ - | -*/ -namespace ai -{ - typedef enum Quadrant { - kFirstQuadrant = 1, - kSecondQuadrant, - kThirdQuadrant, - kFourthQuadrant - } Quadrant; -} - -/** These constants identify the various shipping versions of Illustrator. */ -typedef enum AIVersion { - kAIVersion1 = 1, - kAIVersion88, - kAIVersion3, - kAIVersion4, - kAIVersion5, - kAIVersion6, - kAIVersion7, - kAIVersion8, - kAIVersion9, - kAIVersion10, - kAIVersion11, - kAIVersion12, - kAIVersion13, - kAIVersion14, - kAIVersion15, - kAIVersion16, - kAIVersion17, - kAIVersion18, - kAIVersion19, - kAIVersion20 -} AIVersion; - -/** These constants identify the various units used in Illustrator. */ -typedef enum AIUnits { - /** None */ - kAINoUnits = 0, - /** Points */ - kAIPointUnits = 1, - /** Inches */ - kAIInchUnits = 2, - /** Millimeters */ - kAIMillimeterUnits = 3, - /** Centimeters */ - kAICentimeterUnits = 4, - /** Picas */ - kAIPicaUnits = 5, - /** Percentage */ - kAIPercentUnits = 6, - /** Degrees */ - kAIDegreeUnits = 7, - /** Q units */ - kAIQUnits = 8, - /** Hexadecimal units */ - kAIBase16Units = 9, - /** Pixels */ - kAIPixelUnits = 10, - /** Time */ - kAITimeUnits = 11, - /** Minimum default */ - kAIMinNormalUnits = kAIPointUnits, - /** Maximum default */ - kAIMaxNormalUnits = kAITimeUnits, - - /** App constant */ - kAIAppUnits1 = 101, - /** App constant */ - kAIAppUnits2 = 102, - /** App constant */ - kAIAppUnits3 = 103, - /** App constant */ - kAIAppUnits4 = 104, - /** App constant */ - kAIAppUnits5 = 105, - /** App constant */ - kAIAppUnits6 = 106, - /** App constant */ - kAIAppUnits7 = 107, - /** App constant */ - kAIAppUnits8 = 108, - /** App constant */ - kAIAppUnits9 = 109, - /** App constant */ - kAIAppUnits10 = 110, - /** App constant */ - kAIMaxAppUnits = kAIAppUnits10, - - /** internal use */ - kAIDummyUnits = 0xFFFFFFFF -} AIUnits; - -typedef struct -{ - AIReal width; - AIReal height; -}AISize; - -#ifdef __cplusplus -namespace ai { - -/** This macro is used to decorate C++ functions and methods that are - guaranteed not to throw. Due to the current state of compiler support - for throw specifications, it is defined to be empty. */ -#define AINOTHROW - - -/** Exception class thrown by C++ classes */ -class Error : public std::exception { -public: - Error (AIErr _err) : err(_err) - {} - operator AIErr () const - {return err;} - -protected: - AIErr err; -}; - -} // end namespace ai -#endif - - -#include "AIHeaderEnd.h" - -// Note: -// 1) Functions which throw must be declared after the AIHeaderEnd.h inclusion -// as AIHeaderBegin puts everything into an extern C. You cannot declare a -// template to have 'C' linkage. -// 2) Exceptions must not be thrown across the API boundary so be sure to catch -// any potential exceptions before exiting your plug-in. - -#ifdef __cplusplus -namespace ai { - -/** Validate an AIErr error code. Throw an ai::Error exception if the provided - code is not kNoErr. - @param err error code to be tested. -*/ -inline void check_ai_error(AIErr err) -{ - if (err != kNoErr) - throw ai::Error(err); -} - -/** Validate that condition is met. Throw an ai::Error exception if the condition - is not met. Unless otherwise specified in \c err the exception is thrown with - kBadParameterErr. - @param condition value to be evaluated as a boolean condition. - @param err [optional] exception value to be thrown as an ai::Error - if /c condition is not met. -*/ -template -inline void check_precondition(T condition, AIErr err = kBadParameterErr) -{ - if (!condition) - throw ai::Error(err); -} - -/** Provides compile-time errors that are similar to run-time assertions. - This is an implementation of Andrei Alexandrescu's CompileTimeChecker. - Use the AI_STATIC_CHECK macro to instantiate a \c CompileTimeChecker object. - For example: - - - AI_STATIC_CHECK(sizeof(wchar_t) == sizeof(unsigned short), wchar_t_size_does_not_match_unsigned_short_size); - -*/ -template struct CompileTimeChecker -{ - CompileTimeChecker(...); -}; -/** There is no instantiation of CompileTimeChecker for a false value. */ -template<> struct CompileTimeChecker {}; - -/** Use to instantiate a \c CompileTimeChecker object for an expression. - @param expr An expression that compiles to the Boolean constant \c true. - If the expression compiles to a false value, the checker cannot be instantiated, - and a compile-time error occurs. - @param msg The compile-time error message that is displayed when the condition is met. - Must be a legal C++ identifier (that is, contains no spaces, cannot begin with a digit, and so on). */ -#define AI_STATIC_CHECK(expr, msg) \ -{\ - class ERROR_##msg {};\ - (void)sizeof(ai::CompileTimeChecker<(expr) != 0>((new ERROR_##msg())));\ -} - -} //end namespace ai -#endif // __cplusplus - -#endif +#ifndef __AITypes__ +#define __AITypes__ + +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 1986 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +/******************************************************************************* + * + * Includes + * + */ +#include "./config/AIConfig.h" + +#ifdef __cplusplus +#include +#endif + +#include "AIBasicTypes.h" +#include "AIErrorCodes.h" + +#ifndef __ASTypes__ +#include "ASTypes.h" +#endif + +#include "ADMStdTypes.h"// This is a new file we have added in shared\illustrator\public\api\... + // It contains definition of ADMRect, ADMPoint, ADMUnits ... It has nothing to do with ADM, except that the name contains ADM. + +#ifdef WIN_ENV +#include "AIWinDef.h" +#endif + +#ifndef __SPFiles__ +#include "SPFiles.h" +#endif + +#ifndef __SPPlugs__ +#include "SPPlugs.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AITypes.h */ + + + +/******************************************************************************* + * + * Constants + * + */ + +#define kPluginInterfaceVersion6001 0x06000001 // 6.0x1 +#define kPluginInterfaceVersion6002 0x06000020 + +#define kPluginInterfaceVersion7001 0x07000001 // AI 7.0 + +#define kPluginInterfaceVersion6021 0x06000021 // Joe's AI6-based prototype (only needed to run his plugins) +#define kPluginInterfaceVersion8001 0x08000001 // AI 8.0 +#define kPluginInterfaceVersion9001 0x09000001 // AI 9.0 +#define kPluginInterfaceVersion10001 0x10000001 // AI 10.0 +#define kPluginInterfaceVersion11001 0x11000001 // AI 11.0 +#define kPluginInterfaceVersion12001 0x12000001 // AI 12.0 +#define kPluginInterfaceVersion13001 0x13000001 // AI 13.0 +#define kPluginInterfaceVersion14001 0x14000001 // AI 14.0 +#define kPluginInterfaceVersion15001 0x15000001 // AI 15.0 +#define kPluginInterfaceVersion16001 0x16000001 // AI 16.0 +#define kPluginInterfaceVersion17001 0x17000001 // AI 17.0 +#define kPluginInterfaceVersion17011 0x17000011 // AI 17.1 +#define kPluginInterfaceVersion18001 0x18000001 // AI 18.0 +#define kPluginInterfaceVersion18011 0x18000011 // AI 18.1 +#define kPluginInterfaceVersion19001 0x19000001 // AI 19.0 +#define kPluginInterfaceVersion19021 0x19000021 // AI 19.2 +#define kPluginInterfaceVersion20001 0x20000001 // AI 20.0 +#define kPluginInterfaceVersion20011 0x20000011 // AI 20.1 +#define kPluginInterfaceVersion21001 0x21000001 // AI 21.0 +#define kPluginInterfaceVersion21011 0x21000011 // AI 21.1 +#define kPluginInterfaceVersion22001 0x22000001 // AI 22.0 +#define kPluginInterfaceVersion22011 0x22000011 // AI 22.1 +#define kPluginInterfaceVersion23001 0x23000001 // AI 23.0 +#define kPluginInterfaceVersion23011 0x23000011 // AI 23.1 +#define kPluginInterfaceVersion24001 0x24000001 // AI 24.0 +#define kPluginInterfaceVersion24011 0x24000011 // AI 24.1 +#define kPluginInterfaceVersion24021 0x24000021 // AI 24.2 +#define kPluginInterfaceVersion24031 0x24000031 // AI 24.3 +#define kPluginInterfaceVersion25001 0x25000001 // AI 25.0 +#define kPluginInterfaceVersion25011 0x25000011 // AI 25.1 +#define kPluginInterfaceVersion25021 0x25000021 // AI 25.2 +#define kPluginInterfaceVersion25031 0x25000031 // AI 25.3 +#define kPluginInterfaceVersion25041 0x25000041 // AI 25.4 +#define kPluginInterfaceVersion26001 0x26000001 // AI 26.0 + +#define kPluginInterfaceVersion kPluginInterfaceVersion26001 + +#ifdef LINUX_ENV +#define AIAPI_VERSION(x) (x + 2000) +#endif + +#ifdef MAC_ENV +#define AIAPI_VERSION(x) (x + 1000) +#endif + +#ifdef WIN_ENV +#define AIAPI_VERSION(x) (x) +#endif + +#define kPlatformUnloadedSuiteProc nullptr + +#if !defined(__BUILD_PLUGIN__) +#if defined(ILLUSTRATOR_H) +#define __BUILD_PLUGIN__ 0 +#else +#define __BUILD_PLUGIN__ 1 +#endif +#endif + +//These are no longer needed. +/** @deprecated */ +#define PUSH_GLOBALS +/** @deprecated */ +#define POP_GLOBALS + +// Determine the platform. +#if !defined(Macintosh) +#if defined(MAC_ENV) +#define Macintosh 1 +#endif +#endif + +#if !defined(MSWindows) +#if defined(WIN_ENV) +#define MSWindows 1 +#endif +#endif + +// Some common error codes. +/** @ingroup Errors + Operation canceled by user */ +#define kCanceledErr 'STOP' +/** @ingroup Errors + No current document */ +#define kNoDocumentErr 'DOC?' +/** @ingroup Errors + A selector was called at an inappropriate time. */ +#define kSelectorClashErr 'CLSH' +/** @ingroup Errors + Specified name not found. */ +#define kNameNotFoundErr 'NAM?' +/** @ingroup Errors + Specified name not unique. */ +#define kNameInUseErr 'NAM2' +/** @ingroup Errors + Specified name not valid. */ +#define kInvalidNameErr 'NA*!' +/** @ingroup Errors + Specified name too long. */ +#define kNameTooLongErr 'NAL!' +/** @ingroup Errors + Undo/Redo Can't be done properly. */ +#define kUndoRedoErr 'UND!' +/** @ingroup Errors + Art bounds are invalid. */ +#define kAIInvalidArtBoundsErr 'IABD' + +/** @ingroup Errors + Resource Permission error. +*/ +#define kAIResourcePermissionErr '!PRM' + +#define kImageTooBigError '!I2B' + +/******************************************************************************* + * + * Types + * + */ + +//Decorators for describing if apis are thread safe or not +#define AI_THREAD_SAFE_API +#define AI_MAIN_THREAD_API + +#define AIAPI AI_MAIN_THREAD_API + + +/** Opaque reference to an art object. Access using \c #AIArtSuite. */ +typedef struct ArtObject *AIArtHandle; +typedef const struct ArtObject *ConstAIArtHandle; + +/** Opaque reference to an Safe Art Handle. Access using \c #AIArtSuite*/ +typedef struct _t_AISafeArtOpaque *AISafeArtHandle; + +/** Opaque reference to a layer. Access using \c #AILayerSuite. */ +typedef struct _t_AILayerOpaque *AILayerHandle; + +/** Opaque reference to a document. Access using \c #AIDocumentSuite. */ +typedef struct _t_AIDocument *AIDocumentHandle; + +/** Fixed number (obsolete) See \c #AIFixedMathSuite. */ +typedef ASFixed AIFixed; +/** A fractional number greater than -2 and less than 2. Obsolete, use \c AIReal. */ +typedef ASFract AIFract; +/** An unsigned fractional number greater than 0 and less than 4. Obsolete, use \c AIReal. */ +typedef ai::uint32 AIUFract; + +typedef AIReal* AIRealPtr; + +/** Data stream */ +typedef struct _t_AIStreamOpaque *AIStream; + /** Rectangle specified with \c #AIFixed coordinates. Obsolete, use \c #AIRealRect. */ +typedef ASFixedRect AIFixedRect; + /** Point specified with \c #AIFixed coordinates. Obsolete, use \c #AIRealPoint. */ +typedef ASFixedPoint AIFixedPoint; + /** Transformation matrix specified with \c #AIFixed values. Obsolete, use \c #AIRealMatrix. */ +typedef ASFixedMatrix AIFixedMatrix; + +typedef ASRealMatrix AIFloatMatrix; + +//typedef struct _t_AIFloatPoint { +// AIFloat h, v; +//} AIFloatPoint, *AIFloatPointPtr; +typedef ASRealPoint AIFloatPoint;// *AIRealPointPtr; + +/** Transformation matrix specified with \c #AIReal values.*/ + +//typedef AIRealMatrix AIRealMatrix, *AIRealMatrixPtr; +/** 1-byte boolean value, true (1) or false (0) */ +typedef ASByte AIBool8; + +/** Opaque reference to a Platform View, NSView* on Mac and HWND on Windows . */ +typedef struct _t_AIPlatformViewOpaque *AIPlatformViewRef; + +#ifdef MAC_ENV +/** Port reference, Mac OS only, same as Mac OS \c CGrafPtr. */ +typedef struct MacPort_t* AIPortRef; + +/** Window reference, Mac OS only, same as Mac OS \c WindowPtr. */ +typedef struct MacWindow_t* AIWindowRef; + +/** Dialog reference, Mac OS only, same as Mac OS \c DialogPtr. */ +typedef struct MacDialog_t* AIDialogRef; +#endif + +#ifdef WIN_ENV +/** Port reference, Windows only, same as Windows \c HDC. */ +typedef HDC AIPortRef; + +/** Window reference, Windows only, same as Windows \c HWND. */ +typedef HWND AIWindowRef; + +/** Dialog reference, Windows only, same as Windows \c HWND. */ +typedef HWND AIDialogRef; +#endif + +#ifdef LINUX_ENV +/** Port reference, Windows only, same as Windows \c HDC. */ +typedef void* AIPortRef; + +/** Window reference, Windows only, same as Windows \c HWND. */ +typedef void* AIWindowRef; + +/** Dialog reference, Windows only, same as Windows \c HWND. */ +typedef void* AIDialogRef; + +typedef /* [wire_marshal] */ void *HMENU; +#endif + +/** Opaque RGB color, access with \c #AIColorConversionSuite. */ +// AIRGBColor is the same as Macintosh RGBColor on Macintosh and Windows. +/** RGB color record */ +struct AIRGBColor { + /** Color values */ + ai::uint16 red, green, blue; +}; + +/** Event information structure, used by \c #AIToolSuite, \c #AICursorSnapSuite. + AIEvent is the same as Macintosh EventRecord on Macintosh and Windows. */ +/** Event record. */ +typedef struct _t_AIEvent { + /** The type of event */ + unsigned short what; + /** The event message */ + unsigned long message; + /** The time when the event occurred */ + unsigned long when; + /** The location of the event */ + AIPoint where; + /** Event modifiers (other simultaneous events or conditions). + A logical OR of \c #AIEventModifersValue bit flag values. */ + unsigned short modifiers; +} AIEvent; + +/** Opaque error, returned by most suite functions. See @ref Errors */ +typedef ASErr AIErr; + +/** Use the \c #AIColorProfile type instead of an \c ACEProfile* */ +class ACEProfile; +/** Opaque color profile. See \c #AIColorConversionSuite. */ +typedef ACEProfile *AIColorProfile; + +/** An Illustrator menu command identifier. See \c #AICommandManagerSuite. */ +typedef ai::uint32 AICommandID; + +/** A ZString (localizable string) reference. + Enforces the passing of ZStrings. + A ZStrings is a \c char* with a conventional format, + so it is easy to pass a non-ZString by accident. When this + type is specified, the function expects a ZString. + You can cast it back to a \c char* if you need to look inside it. */ +typedef const struct ZREFStruct *ZRef; + +inline ZRef ZREF(const char* str) +{ + return reinterpret_cast(str); +} + +/** The position of an art object, which determines how it is drawn relative to another, + overlapping art object, known as the prep (prepositional) object, + and also whether a path is inside a compound path or group. + \li If the paint order is \c kPlaceAbove or \c kPlaceBelow, the object is drawn above or below the prep object + when the boundaries overlap. + \li If the paint order is \c kPlaceInsideOnTop or \c kPlaceInsideOnBottom,the object is inside the prep object, + which must be a container. + \li If the paint order is \c kPlaceAboveAll or \c kPlaceBelowAll, + the prep object is ignored and the object is placed on top of or at the bottom of the entire document + (that is, inside-on-top the topmost group or inside-on-bottom the bottommost group). + + The paint order is the back-to-front ordering of art objects, also called the occlusion order or Z-order. + It determines which objects obscure others when their bounds overlap. If objects do not overlap, + the paint order is irrelevant to rendering. + + Paint order values are used, for example, when creating art objects with \c #AIArtSuite::NewArt(), copying + or moving art objects, or specifying insertion points for art. + */ +typedef enum AIPaintOrder { + /** Default value */ + kPlaceDefault = 0, + /** Place above the prepositional object */ + kPlaceAbove = 1, + /** Place below the prepositional object */ + kPlaceBelow, + /** Place within and at the top of the prepositional container */ + kPlaceInsideOnTop, + /** Place within and at the bottom of the prepositional container */ + kPlaceInsideOnBottom, + /** Place at the top of the paint order, ignoring prepositional object */ + kPlaceAboveAll, + /** Place at the bottom of the paint order, ignoring prepositional object */ + kPlaceBelowAll +} AIPaintOrder; + +/** How paint is applied--to fills, strokes, or both. */ +typedef enum AIPaintUsage { + kAINotUsed = 0x0000, + /** Paint is applied to fills. */ + kAIUsedOnFill = 0x0001, + /** Paint is applied to strokes. */ + kAIUsedOnStroke = 0x0002, + /** Paint is applied to both fills and strokes. */ + kAIUsedOnBoth = 0x0003 +} AIPaintUsage; + +/** These constants identifier can be used to determine the quadrant in a plane. + | + SecondQ | FirstQ + -------------------- + ThirdQ | FourthQ + | +*/ +namespace ai +{ + typedef enum Quadrant { + kFirstQuadrant = 1, + kSecondQuadrant, + kThirdQuadrant, + kFourthQuadrant + } Quadrant; + +/** + Icon Types to be given by clients. +*/ + enum class IconType: ai::uint8 { + kInvalid = 0, + kSVG, + kPNG + }; + +} + +/** These constants identify the various shipping versions of Illustrator. */ +typedef enum AIVersion { + kAIVersion1 = 1, + kAIVersion88, + kAIVersion3, + kAIVersion4, + kAIVersion5, + kAIVersion6, + kAIVersion7, + kAIVersion8, + kAIVersion9, + kAIVersion10, + kAIVersion11, + kAIVersion12, + kAIVersion13, + kAIVersion14, + kAIVersion15, + kAIVersion16, + kAIVersion17, + kAIVersion18, + kAIVersion19, + kAIVersion20, + kAIVersion21, + kAIVersion22, + kAIVersion23, + kAIVersion24, + kAIVersion25, + kAIVersion26, + kAIVersionLatest = kAIVersion26 +} AIVersion; + +/** These constants identify the various units used in Illustrator. */ +typedef enum AIUnits { + /** None */ + kAINoUnits = 0, + /** Points */ + kAIPointUnits = 1, + /** Inches */ + kAIInchUnits = 2, + /** Millimeters */ + kAIMillimeterUnits = 3, + /** Centimeters */ + kAICentimeterUnits = 4, + /** Picas */ + kAIPicaUnits = 5, + /** Percentage */ + kAIPercentUnits = 6, + /** Degrees */ + kAIDegreeUnits = 7, + /** Q units */ + kAIQUnits = 8, + /** Hexadecimal units */ + kAIBase16Units = 9, + /** Pixels */ + kAIPixelUnits = 10, + /** Time */ + kAITimeUnits = 11, + /** Feets units */ + kAIFeetUnits = 12, + /** Ha*/ + kAIHaUnits = 13, + /** Feet Inch*/ + kAIFeetInchUnits = 14, + /** Meter*/ + kAIMeterUnits = 15, + /** Yards*/ + kAIYardUnits = 16, + + /** Minimum default */ + kAIMinNormalUnits = kAIPointUnits, + /** Maximum default */ + kAIMaxNormalUnits = kAIYardUnits, + + /** App constant */ + kAIAppUnits1 = 101, + /** App constant */ + kAIAppUnits2 = 102, + /** App constant */ + kAIAppUnits3 = 103, + /** App constant */ + kAIAppUnits4 = 104, + /** App constant */ + kAIAppUnits5 = 105, + /** App constant */ + kAIAppUnits6 = 106, + /** App constant */ + kAIAppUnits7 = 107, + /** App constant */ + kAIAppUnits8 = 108, + /** App constant */ + kAIAppUnits9 = 109, + /** App constant */ + kAIAppUnits10 = 110, + /** App constant */ + kAIMaxAppUnits = kAIAppUnits10, + + /** internal use */ + kAIDummyUnits = 0xFFFFFFFF +} AIUnits; + +struct AISize +{ + AISize(AIReal w = 0, AIReal h = 0):width(w),height(h) + {} + AIReal width = 0; + AIReal height = 0; +}; + +#ifdef __cplusplus +namespace ai { + +#ifdef AI_HAS_NOEXCEPT +#define AINOEXCEPT noexcept +#else +#define AINOEXCEPT +#endif + +/** This macro is used to decorate C++ functions and methods that are + guaranteed not to throw. Due to the current state of compiler support + for throw specifications, it is defined to be empty. */ +#define AINOTHROW + + +/** Exception class thrown by C++ classes */ +class Error : public std::exception +{ +public: + Error (AIErr err) : mErr(err) {} + + const char* what() const AINOEXCEPT override { return "AI Exception"; } + + operator AIErr () const AINOEXCEPT { return mErr; } + +protected: + AIErr mErr; +}; + +class LogicError : public Error +{ +public: + LogicError(AIErr err, const char* msg) : Error(err), mMsg(msg) {} + + const char* what() const AINOEXCEPT override { return mMsg; } + +protected: + const char* mMsg; +}; + +} // end namespace ai +#endif + + +#include "AIHeaderEnd.h" + +// Note: +// 1) Functions which throw must be declared after the AIHeaderEnd.h inclusion +// as AIHeaderBegin puts everything into an extern C. You cannot declare a +// template to have 'C' linkage. +// 2) Exceptions must not be thrown across the API boundary so be sure to catch +// any potential exceptions before exiting your plug-in. + +#ifdef __cplusplus + +// == and != operators +inline bool operator==(const AIPoint& l, const AIPoint& r) +{ + return l.h == r.h && l.v == r.v; +} +inline bool operator!=(const AIPoint& l, const AIPoint& r) +{ + return !(l == r); +} +inline bool operator==(const AIRect& l, const AIRect& r) +{ + return l.left == r.left && l.top == r.top && l.right == r.right && l.bottom == r.bottom; +} +inline bool operator!=(const AIRect& l, const AIRect& r) +{ + return !(l == r); +} + +namespace ai { + +/** Validate an AIErr error code. Throw an ai::Error exception if the provided + code is not kNoErr. + @param err error code to be tested. +*/ +inline void check_ai_error(AIErr err) +{ + if (err != kNoErr) + throw ai::Error(err); +} + +/** Validate that condition is met. Throw an ai::Error exception if the condition + is not met. Unless otherwise specified in \c err the exception is thrown with + kBadParameterErr. + @param condition value to be evaluated as a boolean condition. + @param err [optional] exception value to be thrown as an ai::Error + if /c condition is not met. +*/ +template +inline void check_precondition(T condition, AIErr err = kBadParameterErr) +{ + if (!condition) + throw ai::Error(err); +} + +/** + Inline method to suppress unused variable warning/error. Compiler optimizes away any call to this method. + e.g. + catch(const ai::Error& e) + { + ai::NOTUSED(e); + } +*/ +template inline void NOTUSED(const T& result) +{ + static_cast(result); +} + +/** Provides compile-time errors that are similar to run-time assertions. + This is an implementation of Andrei Alexandrescu's CompileTimeChecker. + Use the AI_STATIC_CHECK macro to instantiate a \c CompileTimeChecker object. + For example: + + + AI_STATIC_CHECK(sizeof(wchar_t) == sizeof(unsigned short), wchar_t_size_does_not_match_unsigned_short_size); + +*/ + +#ifdef AI_HAS_STATIC_ASSERT +#define AI_STATIC_CHECK(expr, msg) static_assert(expr, #msg); +#else +template struct CompileTimeChecker +{ + CompileTimeChecker(...); +}; +/** There is no instantiation of CompileTimeChecker for a false value. */ +template<> struct CompileTimeChecker {}; + +/** Use to instantiate a \c CompileTimeChecker object for an expression. + @param expr An expression that compiles to the Boolean constant \c true. + If the expression compiles to a false value, the checker cannot be instantiated, + and a compile-time error occurs. + @param msg The compile-time error message that is displayed when the condition is met. + Must be a legal C++ identifier (that is, contains no spaces, cannot begin with a digit, and so on). */ +#define AI_STATIC_CHECK(expr, msg) \ +{\ + class ERROR_##msg {};\ + (void)sizeof(ai::CompileTimeChecker<(expr) != 0>((new ERROR_##msg())));\ +} +#endif // AI_HAS_STATIC_ASSERT + +} //end namespace ai +#endif // __cplusplus + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUID.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUID.h index 2aed2ef..fa566f1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUID.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUID.h @@ -1,496 +1,504 @@ -#ifndef __AIUID__ -#define __AIUID__ - -/* - * Name: AIUID.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Unique ID Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIEntry__ -#include "AIEntry.h" -#endif - -#include "IAIUnicodeString.h" - - -#include "AIHeaderBegin.h" - -/** @file AIUID.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIUIDPoolSuite "AI UID Pool Suite" -#define kAIUIDPoolSuiteVersion6 AIAPI_VERSION(6) -#define kAIUIDPoolSuiteVersion kAIUIDPoolSuiteVersion6 -#define kAIUIDPoolVersion kAIUIDPoolSuiteVersion - -#define kAIUIDSuite "AI UID Suite" -#define kAIUIDSuiteVersion8 AIAPI_VERSION(8) -#define kAIUIDSuiteVersion kAIUIDSuiteVersion8 -#define kAIUIDVersion kAIUIDSuiteVersion - -#define kAIUIDREFSuite "AI UIDREF Suite" -#define kAIUIDREFSuiteVersion8 AIAPI_VERSION(8) -#define kAIUIDREFSuiteVersion kAIUIDREFSuiteVersion8 -#define kAIUIDREFVersion kAIUIDREFSuiteVersion - -#define kAIUIDUtilsSuite "AI UID Utils Suite" -#define kAIUIDUtilsSuiteVersion9 AIAPI_VERSION(9) -#define kAIUIDUtilsSuiteVersion kAIUIDUtilsSuiteVersion9 -#define kAIUIDUtilsVersion kAIUIDUtilsSuiteVersion - - -/** @ingroup Errors - A UID name was specified with an invalid syntax. See \c #AIUIDSuite. */ -#define kUIDBadSyntax 'UIDx' -/** @ingroup Errors - The name specified is already in use by another UID. See \c #AIUIDSuite. */ -#define kUIDNotUnique 'UIDu' -/** @ingroup Errors - UID was not found. See \c #AIUIDSuite. */ -#define kUIDNotFound 'UID!' - - -/** @ingroup Notifiers - Sent when the XML name pool has changed. - Any UIDs or references associated with that name will now - have a different name. See \c #AINamePoolRef. */ -#define kAIXMLNameChangedNotifier "AI XML Name Changed Notifier" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** - A pool of unique names that can be associated with objects such - as identifiers. Each document has its own set of name pools. - A name pool can impose syntactic constraints on the contained names. - @see \c #AIUIDSuite, \c #AIUIDPoolSuite -*/ -typedef struct _t_AINamePool *AINamePoolRef; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - These functions allow you to create, query, and manage - name pools. An identifier (UID) is unique within a given pool, and - has a name which is also unique within that pool; see \c #AINamePoolRef. - Each UID can be stored in only one container, and only once within that container. - - @see \c #AIUIDSuite, \c #AIUIDREFSuite, \c #AIUIDUtilsSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUIDPoolSuite and \c #kAIUIDPoolVersion. - */ - -typedef struct AIUIDPoolSuite { - - /** Increments the reference count for a UID name pool. - When you create a pool, the initial count is 1. - Use \c #Release() to decrement the count. - (Note that this function returns a numeric value, not an error code.) - @param pool The UID name pool reference. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) ( void* pool ); - - /** Decrements the reference count for a UID name pool, and - frees the memory when the reference count is 0. - When you create a pool, the initial count is 1. - Use \c #AddRef() to increment the count. - (Note that this function returns a numeric value, not an error code.) - @param pool The UID name pool reference. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) ( void* pool ); - - /** Retrieves a UID name pool by its name. Currently there is only one - pool, for XML unique ID names. This pool is returned regardless - of the name supplied. - @param name Ignored. - @param pool [out] A buffer in which to return the pool reference. - */ - AIAPI AIErr (*GetPool) ( const char* name, AINamePoolRef* pool ); - - /** Creates a new unique identifier with a name from the name pool. The new - UID has an initial reference count of 1. - @param pool The UID name pool. - @param name Optional. A name that conforms to the syntax - imposed by the pool, and that is not currently in use. - If not specified, the function creates a unique name. - @param uid [out] A buffer in which to return the UID object. - */ - AIAPI AIErr (*NewUID) ( AINamePoolRef pool, const ai::UnicodeString& name, AIUIDRef* uid ); - - /** Creates a new reference to a unique identifier with a name from the name pool. - The new UID reference has an initial reference count of 1. - @param pool The UID name pool. - @param name Optional. A name that conforms to the syntax - imposed by the pool, and that is not currently in use. - If not specified, the function creates a unique name. - @param uidref [out] A buffer in which to return the UID reference object. - */ - AIAPI AIErr (*NewUIDREF) ( AINamePoolRef pool, const ai::UnicodeString& name, AIUIDREFRef* uidref ); - - /** Creates a new unique identifier with a unique name generated from a base name. - @param pool The UID name pool. - @param name Optional. A base name that conforms to the syntax - imposed by the pool. If not specified, or if in use, the function - creates a unique name. - @param uid [out] A buffer in which to return the UID object. - */ - AIAPI AIErr (*NewUIDFromBase) ( AINamePoolRef pool, const ai::UnicodeString& base, AIUIDRef* uid ); - -} AIUIDPoolSuite; - - -/** @ingroup Suites - This suite allows you to access and manage unique identifiers. - A unique identifier (UID) is an object that can be stored in a - a dictionary or an array. A unique identifier cannot occur - in more than one container, or more than once in a container. - - Given a unique ID, you can find its container. For example, - unique IDs are typically found in the dictionary of an art object. - Given such an ID, you can access the associated art object. - An art object name is itself stored as a specially encoded - unique ID in the associated art object dictionary. - - @see \c #AIUIDPoolSuite, \c #AIUIDREFSuite, \c #AIUIDUtilsSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUIDSuite and \c #kAIUIDVersion. -*/ -typedef struct AIUIDSuite { - - /** Increments the reference count for a unique identifier. - When you create a UID, the initial count is 1. - Use \c #Release() to decrement the count. - (Note that this function returns a numeric value, not an error code.) - @param uid The UID object. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) ( void* uid ); - - /** Decrements the reference count for a unique identifier, and - frees the memory when the reference count is 0. - When you create a UID, the initial count is 1. - Use \c #AddRef() to increment the count. - (Note that this function returns a numeric value, not an error code.) - @param uid The UID object. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) ( void* uid ); - - /** Reports whether a unique identifier is currently stored within - some container. A UID cannot occur in more than one - container, or more than once in a container. - (Note that this function returns a boolean value, not an error code.) - @param uid The UID object. - @return True if the UID is contained in a dictionary or array. - */ - AIAPI AIBoolean (*IsInUse) ( AIUIDRef uid ); - - /** Retrieves the UID name pool to which a unique identifier's name belongs. - (Note that this function does not return an error code.) - @param uid The UID object. - @param pool [out] A buffer in which to return the UID name pool, or - \c NULL if the UID is not valid. - */ - AIAPI void (*GetPool) ( AIUIDRef uid, AINamePoolRef* pool ); - - /** Retrieves the name of a unique identifier as a Unicode string. - @param uid The UID object. - @param name [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetName) ( AIUIDRef uid, ai::UnicodeString& name ); - - /** Retrieves the dictionary or array that contains a unique identifier. - (Note that this function returns an object value, not an error code.) - @param uid The UID object. - @return The entry object, or a \c NULL reference if the UID is - not stored in a container. - @see \c #AIEntrySuite - */ - AIAPI AIEntryRef (*GetContainer) ( AIUIDRef uid ); - - /** Creates a new reference to a unique identifier. - The new UID reference has an initial reference count of 1. - @param uid The UID object. - @param ruidref [out] A buffer in which to return the UID reference object. - */ - AIAPI AIErr (*NewUIDREF) ( AIUIDRef uid, AIUIDREFRef* ruidref ); - -} AIUIDSuite; - - -/** @ingroup Suites - This suite allows you to access and manage references to unique identifiers. - The \c #AIEntrySuite provides methods to convert between \c #AIEntryRef - and \c #AIUIDRef. - - Use a UID to tag an object with a unique identifier, then use a UID reference - to make a reference to that object. For example, if your plug-in creates art - objects and you want to attach a unique identifier to an object, first create - a UID and put it in the art object’s dictionary. You can then store - a reference to the object in the document dictionary using an \c #AIUIDRef. - - @see \c #AIUIDPoolSuite, \c #AIUIDSuite, \c #AIUIDUtilsSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUIDREFSuite and \c #kAIUIDREFVersion. -*/ -typedef struct AIUIDREFSuite { - - /** Increments the reference count for a UID reference. - When you create an \c #AIUIDRef, the initial count is 1. - Use \c #Release() to decrement the count. - (Note that this function returns a numeric value, not an error code.) - @param uidref The UID reference object. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) ( void* uidref ); - - /** Decrements the reference count for a UID reference, and - frees the memory when the reference count is 0. - When you create an \c #AIUIDRef, the initial count is 1. - Use \c #AddRef() to increment the count. - (Note that this function returns a numeric value, not an error code.) - @param uidref The UID reference object. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) ( void* uidref ); - - /** Reports whether a UID reference is currently stored within some container. - A UID cannot occur in more than one container, or more than once in a container. - (Note that this function returns a boolean value, not an error code.) - @param uidref The UID reference object. - @return True if the UID reference is contained in a dictionary or array. - */ - AIAPI AIBoolean (*IsInUse) ( AIUIDREFRef uidref ); - - /** Retrieves the UID name pool to which a UID reference's name belongs. - (Note that this function does not return an error code.) - @param uidref The UID reference object. - @param pool [out] A buffer in which to return the UID name pool, or - \c NULL if the UID reference is not valid. - */ - AIAPI void (*GetPool) ( AIUIDREFRef uidref, AINamePoolRef* pool ); - - /** Retrieves the name of a UID reference as a Unicode string - @param uidref The UID reference object. - @param name [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetName) ( AIUIDREFRef uidref, ai::UnicodeString& name ); - - /** Retrieves the dictionary or array that contains a UID reference. - (Note that this function returns an object value, not an error code.) - @param uidref The UID reference object. - @return The entry object, or a \c NULL reference if the UID reference - is not stored in a container. - @see \c #AIEntrySuite - */ - AIAPI AIEntryRef (*GetContainer) ( AIUIDREFRef uidref ); - - /** Retrieves the unique identifier referred to by a UID reference. - (Note that this function does not return an error code.) - @param uidref The UID reference object. - @param uid [out] A buffer in which to return the UID object, - or \c NULL if there is none. - */ - AIAPI void (*GetUID) ( AIUIDREFRef uidref, AIUIDRef* uid ); - -} AIUIDREFSuite; - - -/** @ingroup Suites - This suite allows you to query and manage the unique identifiers for art objects. - @see \c #AIUIDPoolSuite, \c #AIUIDSuite, \c #AIUIDREFSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUIDUtilsSuite and \c #kAIUIDUtilsVersion. -*/ -typedef struct AIUIDUtilsSuite { - - /** Retrieves the unique identifier for an art object. - @param art The art object. - @param create True to assign a generated UID if the object has - none. - @param uid [out] A buffer in which to return the found UID object, - or a generated UID if none is found and \c create is true. - */ - AIAPI AIErr (*GetArtUID) ( AIArtHandle art, AIBoolean create, AIUIDRef* uid ); - - /** Sets the unique identifier of an art object, replacing its current UID, if any. - @param art The art object. - @param uid The new UID object, - */ - AIAPI AIErr (*SetArtUID) ( AIArtHandle art, AIUIDRef uid ); - - /** Transfers the unique identifier of an art object to another art object, - setting the UID of the source art to \c NULL. - @param srcart The source art object. - @param dstart The destination art object. - */ - AIAPI AIErr (*TransferArtUID) ( AIArtHandle srcart, AIArtHandle dstart ); - - /** Retrieves the UID reference for an art object, or assigns a new UID - and creates the reference if needed. - @param art The art object. - @param uidref [out] A buffer in which to return the UID reference object, - */ - AIAPI AIErr (*NewArtUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref ); - - /** Retrieves the art object referenced by a UID reference. - If the UID reference is associated with a text story (a sequence of - linked text frames), retrieves the first frame of the story. - @param uidref The UID reference object, - @param art [out] A buffer in which to return the art object. - */ - AIAPI AIErr (*GetReferencedArt) ( AIUIDREFRef uidref, AIArtHandle* art ); - - /** Retrieves the UID name of an art object. - @param art The art object. - @param name [out] A buffer in which to return the name string, or - the empty string if no UID is assigned. - */ - AIAPI AIErr (*GetArtUIDName) ( AIArtHandle art, ai::UnicodeString& name ); - - /** Sets the UID name of an art object. - @param art The art object. - @param name The new name string. - @return The \c #kUIDNotUnique error if the named UID is already in use. - */ - AIAPI AIErr (*SetArtUIDName) ( AIArtHandle art, const ai::UnicodeString& name ); - - /** Retrieves the name or XML identifier of an art object, depending on the setting of - the user preference "Identify Object by: Object Name/XML ID". - If the preference allows a user to entry arbitrary names, - they are translated internally to valid, unique, XML IDs. This - function translates back to the name that was entered. - @param art The art object. - @param name [out] A buffer in which to return the name string. - @param isDefaultName [out] A buffer in which to return true if the - art object has no name or UID, and the returned string is the default name. - */ - AIAPI AIErr (*GetArtNameOrUID) ( AIArtHandle art, ai::UnicodeString& name, ASBoolean* isDefaultName ); - - /** Sets the name or XML identifier of an art object, depending on the setting of - the user preference "Identify Object by: Object Name/XML ID". - @param art The art object. - @param name The new name string. If the preference allows a user - to entry arbitrary names, this can be any string, which is - translated internally to a valid, unique, XML ID. Otherwise, it - must conform to XML ID syntax. - - */ - AIAPI AIErr (*SetArtNameOrUID) ( AIArtHandle art, const ai::UnicodeString& name ); - - /** Creates a new UID reference based on an existing UID reference, by appending - a numeric suffix to make the name unique. - @param base The base UID reference object. - @param uid [out] A buffer in which to return the new UID reference. - */ - AIAPI AIErr (*MakeUIDFromBase) ( AIUIDRef base, AIUIDRef* uid ); - - /** Creates a new name from a base name, by appending a numeric suffix to - make the name unique. - @param base The base name string. - @param name [out] A buffer in which to return the new name string. - */ - AIAPI AIErr (*MakeUniqueNameFromBase) ( const ai::UnicodeString& base, ai::UnicodeString& name ); - - /** Retrieves the UID reference for the story associated with an art object. - @param art The art object, of type \c #AIArtType::kTextFrameArt. - @param create True to generate and assign a new UID if the story has none. - @param ruid [out] A buffer in which to return the UID reference object. - */ - AIAPI AIErr (*GetStoryUID) (AIArtHandle art, AIBoolean create, AIUIDRef* ruid); - - /** Sets the UID reference for the story associated with an art object. - @param art The art object, of type \c #AIArtType::kTextFrameArt. - @param ruid The new UID reference object. - */ - AIAPI AIErr (*SetStoryUID) ( AIArtHandle art, AIUIDRef uid ); - - /** Transfers the unique identifier from the story associated with a text art object - to the story of another text art object. The UID of the source story is set to \c NULL. - @param srcart The source art object, of type \c #AIArtType::kTextFrameArt. - @param dstart The destination art object, of type \c #AIArtType::kTextFrameArt. - */ - AIAPI AIErr (*TransferStoryUID) ( AIArtHandle srcart, AIArtHandle dstart ); - - /** Creates a new UID reference for the story associated with an art object. - Pass this reference to \c #GetReferencedArt() to retrieve the first - frame of the story (regardless of which frame was used to create the - reference). - @param art The art object, of type \c #AIArtType::kTextFrameArt. - @param ruid The new UID reference object. - */ - AIAPI AIErr (*NewStoryUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref ); - - /** Transfers the unique identifier from the story associated with a text art object - to another art object of any type. The UID of the source story is set to \c NULL. - @param frame The source art object, of type \c #AIArtType::kTextFrameArt. - @param art The destination art object, of any type. - */ - AIAPI AIErr (*TransferStoryUIDToArt) ( AIArtHandle frame, AIArtHandle art ); - - /** Transfers the unique identifier from an art object of any type to the story associated - with a text art object. The UID of the source art object is set to \c NULL. - @param art The source art object, of any type. - @param frame The destination art object, of type \c #AIArtType::kTextFrameArt. - */ - AIAPI AIErr (*TransferArtUIDToStory) ( AIArtHandle art, AIArtHandle frame ); - - /* New for AI 12 */ - - /** Retrieves the source object from which an object being dragged and transformed was derived. - @param target The unique identifier (UID) for the object being dragged. - @param equiv [out] A buffer in which to return the UID of the source object for - the transformation, if found. - @return \c #kUIDNotFound error if the source object UID is not found in the current context. - */ - AIAPI AIErr (*FindEquivUID) ( AIUIDRef target, AIUIDRef& equiv ); - - -} AIUIDUtilsSuite; - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIUID__ +#define __AIUID__ + +/* + * Name: AIUID.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator Unique ID Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIEntry__ +#include "AIEntry.h" +#endif + +#include "IAIUnicodeString.h" + + +#include "AIHeaderBegin.h" + +/** @file AIUID.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIUIDPoolSuite "AI UID Pool Suite" +#define kAIUIDPoolSuiteVersion7 AIAPI_VERSION(7) +#define kAIUIDPoolSuiteVersion kAIUIDPoolSuiteVersion7 +#define kAIUIDPoolVersion kAIUIDPoolSuiteVersion + +#define kAIUIDSuite "AI UID Suite" +#define kAIUIDSuiteVersion8 AIAPI_VERSION(8) +#define kAIUIDSuiteVersion kAIUIDSuiteVersion8 +#define kAIUIDVersion kAIUIDSuiteVersion + +#define kAIUIDREFSuite "AI UIDREF Suite" +#define kAIUIDREFSuiteVersion8 AIAPI_VERSION(8) +#define kAIUIDREFSuiteVersion kAIUIDREFSuiteVersion8 +#define kAIUIDREFVersion kAIUIDREFSuiteVersion + +#define kAIUIDUtilsSuite "AI UID Utils Suite" +#define kAIUIDUtilsSuiteVersion9 AIAPI_VERSION(9) +#define kAIUIDUtilsSuiteVersion kAIUIDUtilsSuiteVersion9 +#define kAIUIDUtilsVersion kAIUIDUtilsSuiteVersion + + +/** @ingroup Errors + A UID name is specified with an invalid syntax. See \c #AIUIDSuite. */ +#define kUIDBadSyntax 'UIDx' +/** @ingroup Errors + The name specified is already in use by another UID. See \c #AIUIDSuite. */ +#define kUIDNotUnique 'UIDu' +/** @ingroup Errors + UID is not found. See \c #AIUIDSuite. */ +#define kUIDNotFound 'UID!' + + +/** @ingroup Notifiers + Sent when the XML name pool has changed. + Any UIDs or references associated with that name will now + have a different name. See \c #AINamePoolRef. */ +#define kAIXMLNameChangedNotifier "AI XML Name Changed Notifier" + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** + A pool of unique names that can be associated with objects such + as identifiers. Each document has its own set of name pools. + A name pool can impose syntactic constraints on the contained names. + @see \c #AIUIDSuite, \c #AIUIDPoolSuite +*/ +typedef struct _t_AINamePool *AINamePoolRef; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + These functions allow you to create, query, and manage + name pools. An identifier (UID) is unique within a given pool, and + has a name which is also unique within that pool; see \c #AINamePoolRef. + Each UID can be stored in only one container, and only once within that container. + + @see \c #AIUIDSuite, \c #AIUIDREFSuite, \c #AIUIDUtilsSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIUIDPoolSuite and \c #kAIUIDPoolVersion. + */ + +typedef struct AIUIDPoolSuite { + + /** Increments the reference count for a UID name pool. + When you create a pool, the initial count is 1. + Use \c #Release() to decrement the count. + (Note that this function returns a numeric value, not an error code.) + @param pool The UID name pool reference. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) ( void* pool ); + + /** Decrements the reference count for a UID name pool, and + frees the memory when the reference count is 0. + When you create a pool, the initial count is 1. + Use \c #AddRef() to increment the count. + (Note that this function returns a numeric value, not an error code.) + @param pool The UID name pool reference. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) ( void* pool ); + + /** Retrieves a UID name pool by its name. Currently there is only one + pool, for XML unique ID names. This pool is returned regardless + of the name supplied. + @param name Ignored. + @param pool [out] A buffer in which to return the pool reference. + */ + AIAPI AIErr (*GetPool) ( const char* name, AINamePoolRef* pool ); + + /** Creates a new unique identifier with a name from the name pool. The new + UID has an initial reference count of 1. + @param pool The UID name pool. + @param name Optional. A name that conforms to the syntax + imposed by the pool, and that is not currently in use. + If not specified, the function creates a unique name. + @param uid [out] A buffer in which to return the UID object. + */ + AIAPI AIErr (*NewUID) ( AINamePoolRef pool, const ai::UnicodeString& name, AIUIDRef* uid ); + + /** Retrieves the UIDRef from its name. + @param pool The UID name pool. + @param name The UID name. + @param uid [out] A buffer in which to return the UID object, + or \c NULL if there is none. + */ + AIAPI AIErr(*GetUID) (AINamePoolRef pool, const ai::UnicodeString& name, AIUIDRef* uid); + + /** Creates a new reference to a unique identifier with a name from the name pool. + The new UID reference has an initial reference count of 1. + @param pool The UID name pool. + @param name Optional. A name that conforms to the syntax + imposed by the pool, and that is not currently in use. + If not specified, the function creates a unique name. + @param uidref [out] A buffer in which to return the UID reference object. + */ + AIAPI AIErr (*NewUIDREF) ( AINamePoolRef pool, const ai::UnicodeString& name, AIUIDREFRef* uidref ); + + /** Creates a new unique identifier with a unique name generated from a base name. + @param pool The UID name pool. + @param name Optional. A base name that conforms to the syntax + imposed by the pool. If not specified, or if in use, the function + creates a unique name. + @param uid [out] A buffer in which to return the UID object. + */ + AIAPI AIErr (*NewUIDFromBase) ( AINamePoolRef pool, const ai::UnicodeString& base, AIUIDRef* uid ); + +} AIUIDPoolSuite; + + +/** @ingroup Suites + This suite allows you to access and manage unique identifiers. + A unique identifier (UID) is an object that can be stored in + a dictionary or an array. A unique identifier cannot occur + in more than one container, or more than once in a container. + + Given a unique ID, you can find its container. For example, + unique IDs are typically found in the dictionary of an art object. + Given such an ID, you can access the associated art object. + An art object name is itself stored as a specially encoded + unique ID in the associated art object dictionary. + + @see \c #AIUIDPoolSuite, \c #AIUIDREFSuite, \c #AIUIDUtilsSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIUIDSuite and \c #kAIUIDVersion. +*/ +typedef struct AIUIDSuite { + + /** Increments the reference count for a unique identifier. + When you create a UID, the initial count is 1. + Use \c #Release() to decrement the count. + (Note that this function returns a numeric value, not an error code.) + @param uid The UID object. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) ( void* uid ); + + /** Decrements the reference count for a unique identifier, and + frees the memory when the reference count is 0. + When you create a UID, the initial count is 1. + Use \c #AddRef() to increment the count. + (Note that this function returns a numeric value, not an error code.) + @param uid The UID object. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) ( void* uid ); + + /** Reports whether a unique identifier is currently stored within + some container. A UID cannot occur in more than one + container, or more than once in a container. + (Note that this function returns a boolean value, not an error code.) + @param uid The UID object. + @return True if the UID is contained in a dictionary or array. + */ + AIAPI AIBoolean (*IsInUse) ( AIUIDRef uid ); + + /** Retrieves the UID name pool to which a unique identifier's name belongs. + (Note that this function does not return an error code.) + @param uid The UID object. + @param pool [out] A buffer in which to return the UID name pool, or + \c NULL if the UID is not valid. + */ + AIAPI void (*GetPool) ( AIUIDRef uid, AINamePoolRef* pool ); + + /** Retrieves the name of a unique identifier as a Unicode string. + @param uid The UID object. + @param name [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetName) ( AIUIDRef uid, ai::UnicodeString& name ); + + /** Retrieves the dictionary or array that contains a unique identifier. + (Note that this function returns an object value, not an error code.) + @param uid The UID object. + @return The entry object, or a \c NULL reference if the UID is + not stored in a container. + @see \c #AIEntrySuite + */ + AIAPI AIEntryRef (*GetContainer) ( AIUIDRef uid ); + + /** Creates a new reference to a unique identifier. + The new UID reference has an initial reference count of 1. + @param uid The UID object. + @param ruidref [out] A buffer in which to return the UID reference object. + */ + AIAPI AIErr (*NewUIDREF) ( AIUIDRef uid, AIUIDREFRef* ruidref ); + +} AIUIDSuite; + + +/** @ingroup Suites + This suite allows you to access and manage references to unique identifiers. + The \c #AIEntrySuite provides methods to convert between \c #AIEntryRef + and \c #AIUIDRef. + + Use a UID to tag an object with a unique identifier, then use a UID reference + to make a reference to that object. For example, if your plug-in creates art + objects and you want to attach a unique identifier to an object, first create + a UID and put it in the art object’s dictionary. You can then store + a reference to the object in the document dictionary using an \c #AIUIDRef. + + @see \c #AIUIDPoolSuite, \c #AIUIDSuite, \c #AIUIDUtilsSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIUIDREFSuite and \c #kAIUIDREFVersion. +*/ +typedef struct AIUIDREFSuite { + + /** Increments the reference count for a UID reference. + When you create an \c #AIUIDRef, the initial count is 1. + Use \c #Release() to decrement the count. + (Note that this function returns a numeric value, not an error code.) + @param uidref The UID reference object. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) ( void* uidref ); + + /** Decrements the reference count for a UID reference, and + frees the memory when the reference count is 0. + When you create an \c #AIUIDRef, the initial count is 1. + Use \c #AddRef() to increment the count. + (Note that this function returns a numeric value, not an error code.) + @param uidref The UID reference object. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) ( void* uidref ); + + /** Reports whether a UID reference is currently stored within some container. + A UID cannot occur in more than one container, or more than once in a container. + (Note that this function returns a boolean value, not an error code.) + @param uidref The UID reference object. + @return True if the UID reference is contained in a dictionary or array. + */ + AIAPI AIBoolean (*IsInUse) ( AIUIDREFRef uidref ); + + /** Retrieves the UID name pool to which a UID reference's name belongs. + (Note that this function does not return an error code.) + @param uidref The UID reference object. + @param pool [out] A buffer in which to return the UID name pool, or + \c NULL if the UID reference is not valid. + */ + AIAPI void (*GetPool) ( AIUIDREFRef uidref, AINamePoolRef* pool ); + + /** Retrieves the name of a UID reference as a Unicode string + @param uidref The UID reference object. + @param name [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetName) ( AIUIDREFRef uidref, ai::UnicodeString& name ); + + /** Retrieves the dictionary or array that contains a UID reference. + (Note that this function returns an object value, not an error code.) + @param uidref The UID reference object. + @return The entry object, or a \c NULL reference if the UID reference + is not stored in a container. + @see \c #AIEntrySuite + */ + AIAPI AIEntryRef (*GetContainer) ( AIUIDREFRef uidref ); + + /** Retrieves the unique identifier referred to by a UID reference. + (Note that this function does not return an error code.) + @param uidref The UID reference object. + @param uid [out] A buffer in which to return the UID object, + or \c NULL if there is none. + */ + AIAPI void (*GetUID) ( AIUIDREFRef uidref, AIUIDRef* uid ); + +} AIUIDREFSuite; + + +/** @ingroup Suites + This suite allows you to query and manage the unique identifiers for art objects. + @see \c #AIUIDPoolSuite, \c #AIUIDSuite, \c #AIUIDREFSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIUIDUtilsSuite and \c #kAIUIDUtilsVersion. +*/ +typedef struct AIUIDUtilsSuite { + + /** Retrieves the unique identifier for an art object. + @param art The art object. + @param create True to assign a generated UID if the object has + none. + @param uid [out] A buffer in which to return the found UID object, + or a generated UID if none is found and \c create is true. + */ + AIAPI AIErr (*GetArtUID) ( AIArtHandle art, AIBoolean create, AIUIDRef* uid ); + + /** Sets the unique identifier of an art object, replacing its current UID, if any. + @param art The art object. + @param uid The new UID object, + */ + AIAPI AIErr (*SetArtUID) ( AIArtHandle art, AIUIDRef uid ); + + /** Transfers the unique identifier of an art object to another art object, + setting the UID of the source art to \c NULL. + @param srcart The source art object. + @param dstart The destination art object. + */ + AIAPI AIErr (*TransferArtUID) ( AIArtHandle srcart, AIArtHandle dstart ); + + /** Retrieves the UID reference for an art object, or assigns a new UID + and creates the reference if needed. + @param art The art object. + @param uidref [out] A buffer in which to return the UID reference object. + */ + AIAPI AIErr (*NewArtUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref ); + + /** Retrieves the art object referenced by a UID reference. + If the UID reference is associated with a text story (a sequence of + linked text frames), retrieves the first frame of the story. + @param uidref The UID reference object, + @param art [out] A buffer in which to return the art object. + */ + AIAPI AIErr (*GetReferencedArt) ( AIUIDREFRef uidref, AIArtHandle* art ); + + /** Retrieves the UID name of an art object. + @param art The art object. + @param name [out] A buffer in which to return the name string, or + the empty string if no UID is assigned. + */ + AIAPI AIErr (*GetArtUIDName) ( AIArtHandle art, ai::UnicodeString& name ); + + /** Sets the UID name of an art object. + @param art The art object. + @param name The new name string. + @return The \c #kUIDNotUnique error if the named UID is already in use. + */ + AIAPI AIErr (*SetArtUIDName) ( AIArtHandle art, const ai::UnicodeString& name ); + + /** Retrieves the name or XML identifier of an art object, depending on the setting of + the user preference "Identify Object by: Object Name/XML ID". + If the preference allows a user to enter arbitrary names, + they are internally translated to valid, unique, XML IDs. This + function translates back to the name that was entered. + @param art The art object. + @param name [out] A buffer in which to return the name string. + @param isDefaultName [out] A buffer in which to return the output as true if the + art object has no name or UID, and the returned string is the default name. + */ + AIAPI AIErr (*GetArtNameOrUID) ( AIArtHandle art, ai::UnicodeString& name, ASBoolean* isDefaultName ); + + /** Sets the name or XML identifier of an art object, depending on the setting of + the user preference "Identify Object by: Object Name/XML ID". + @param art The art object. + @param name The newly named string. If the preference allows a user + to enter arbitrary names, this can be any string, which is + translated internally to a valid, unique, XML ID. Otherwise, it + must conform to XML ID syntax. + + */ + AIAPI AIErr (*SetArtNameOrUID) ( AIArtHandle art, const ai::UnicodeString& name ); + + /** Creates a new UID reference based on an existing UID reference, by appending + a numeric suffix to make the name unique. + @param base The base UID reference object. + @param uid [out] A buffer in which to return the new UID reference. + */ + AIAPI AIErr (*MakeUIDFromBase) ( AIUIDRef base, AIUIDRef* uid ); + + /** Creates a new name from a base name, by appending a numeric suffix to + make the name unique. + @param base The base name string. + @param name [out] A buffer in which to return the new name string. + */ + AIAPI AIErr (*MakeUniqueNameFromBase) ( const ai::UnicodeString& base, ai::UnicodeString& name ); + + /** Retrieves the UID reference for the story associated with an art object. + @param art The art object, of type \c #AIArtType::kTextFrameArt. + @param create True to generate and assign a new UID if the story has none. + @param ruid [out] A buffer in which to return the UID reference object. + */ + AIAPI AIErr (*GetStoryUID) (AIArtHandle art, AIBoolean create, AIUIDRef* ruid); + + /** Sets the UID reference for the story associated with an art object. + @param art The art object, of type \c #AIArtType::kTextFrameArt. + @param ruid The new UID reference object. + */ + AIAPI AIErr (*SetStoryUID) ( AIArtHandle art, AIUIDRef uid ); + + /** Transfers the unique identifier from the story associated with a text art object + to the story of another text art object. The UID of the source story is set to \c NULL. + @param srcart The source art object, of type \c #AIArtType::kTextFrameArt. + @param dstart The destination art object, of type \c #AIArtType::kTextFrameArt. + */ + AIAPI AIErr (*TransferStoryUID) ( AIArtHandle srcart, AIArtHandle dstart ); + + /** Creates a new UID reference for the story associated with an art object. + Pass this reference to \c #GetReferencedArt() to retrieve the first + frame of the story (regardless of which frame was used to create the + reference). + @param art The art object, of type \c #AIArtType::kTextFrameArt. + @param ruid The new UID reference object. + */ + AIAPI AIErr (*NewStoryUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref ); + + /** Transfers the unique identifier from the story associated with a text art object + to another art object of any type. The UID of the source story is set to \c NULL. + @param frame The source art object, of type \c #AIArtType::kTextFrameArt. + @param art The destination art object, of any type. + */ + AIAPI AIErr (*TransferStoryUIDToArt) ( AIArtHandle frame, AIArtHandle art ); + + /** Transfers the unique identifier from an art object of any type to the story associated + with a text art object. The UID of the source art object is set to \c NULL. + @param art The source art object, of any type. + @param frame The destination art object, of type \c #AIArtType::kTextFrameArt. + */ + AIAPI AIErr (*TransferArtUIDToStory) ( AIArtHandle art, AIArtHandle frame ); + + /* Introduced in AI 12 */ + + /** Retrieves the source object from which an object being dragged and transformed was derived. + @param target The unique identifier (UID) for the object being dragged. + @param equiv [out] A buffer in which to return the UID of the source object for + the transformation, if found. + @return \c #kUIDNotFound error if the source object UID is not found in the current context. + */ + AIAPI AIErr (*FindEquivUID) ( AIUIDRef target, AIUIDRef& equiv ); + + +} AIUIDUtilsSuite; + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUITheme.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUITheme.h index 9a05aa9..cf9e37b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUITheme.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUITheme.h @@ -1,152 +1,155 @@ -/* -* Name: AIUITheme.h -* Author: -* Date: -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2007-2008 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#ifndef AIUITheme_h__ -#define AIUITheme_h__ - - - -/******************************************************************************* -** -** Imports -** -**/ - - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIUITheme.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIUIThemeSuite "AI User Interface Theme Suite" -#define kAIUIThemeSuiteVersion AIAPI_VERSION(2) -#define kAIUIThemeVersion kAIUIThemeSuiteVersion - -/******************************************************************************* -** -** Notifier constants -** -**/ -/** @ingroup Notifiers - Sent when UI brightness is changed. -*/ -#define kAIUIBrightnessChangedNotifier "AI UI Brightness Changed Notifier" - -/** Constants for \c #AIUIThemeSuite::GetUIThemeColor() - that identify predefined UI themes. */ -enum AIUIThemeSelector -{ - /** Theme for dialogs. */ - kAIUIThemeSelectorDialog = 0, - - /** Theme for panels. */ - kAIUIThemeSelectorPanel, - - /** Internal use */ - kAIAUIThemeSelectorLast = 0xFFFF -}; - -/** Constants for \c #AIUIThemeSuite::GetUIThemeColor() - that identify predefined UI component colors. */ -enum AIUIComponentColor -{ - /** Invalid component color. */ - kAIUIComponentColorNone = -1, - - /** Current UI background color. */ - kAIUIComponentColorBackground = 0, - - /** Current UI text color. */ - kAIUIComponentColorText, - - /** Current UI focus ring color. */ - kAIUIComponentColorFocusRing, - - /** Current UI text edit color. */ - kAIUIComponentColorEditText, - - /** Current UI text edit background color. */ - kAIUIComponentColorEditTextBackground, - - /** Internal use */ - kAIUIComponentColorLast = 0xFFFF -}; - -/** Color record used to return a theme color from \c #AIUIThemeSuite::GetUIThemeColor(). */ -struct AIUIThemeColor -{ - /** Alpha (transparency) value. */ - AIReal alpha; - /** Red value. */ - AIReal red; - /** Green value. */ - AIReal green; - /** Blue value. */ - AIReal blue; - - /** Default constructor */ - AIUIThemeColor(AIReal a = kAIRealOne, AIReal r = kAIRealZero, AIReal g = kAIRealZero, AIReal b = kAIRealZero) : alpha(a), red(r), green(g), blue(b) {} -}; - - -/******************************************************************************* -** -** Suite -** -**/ -/** @ingroup Suites - This suite allows you to query UI color and brightness parameters. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUIThemeSuite and \c #kAIUIThemeVersion. -*/ - -struct AIUIThemeSuite { - - /** Retrieves a current UI theme color, - @param themeSelector The theme, a constant value from \c #AIUIThemeSelector. - @param componentColor The component color to find, a constant value from \c # AIUIComponentColor. - @param aiColor [out] A buffer in which to return the theme color value. - */ - AIAPI AIErr (*GetUIThemeColor)(ai::int32 themeSelector, ai::int32 componentColor, AIUIThemeColor& aiColor); - - - /** - Reports whether the current UI theme is dark.
- (Note that this function returns a Boolean value, not an error code.) - @return True if the current UI theme is dark, otherwise false. - */ - AIAPI AIBoolean (*IsUIThemeDark)(); - -}; - -#include "AIHeaderEnd.h" - -#endif // AIUITheme_h__ +/* +* Name: AIUITheme.h +* Author: +* Date: +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2007-2008 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +#ifndef AIUITheme_h__ +#define AIUITheme_h__ + + + +/******************************************************************************* +** +** Imports +** +**/ + + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIRealMath__ +#include "AIRealMath.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIUITheme.h */ + +/******************************************************************************* +** +** Constants +** +**/ + +#define kAIUIThemeSuite "AI User Interface Theme Suite" +#define kAIUIThemeSuiteVersion AIAPI_VERSION(2) +#define kAIUIThemeVersion kAIUIThemeSuiteVersion + +/******************************************************************************* +** +** Notifier constants +** +**/ +/** @ingroup Notifiers + Sent when UI brightness is changed. +*/ +#define kAIUIBrightnessChangedNotifier "AI UI Brightness Changed Notifier" + +/** Constants for \c #AIUIThemeSuite::GetUIThemeColor() + that identify predefined UI themes. */ +enum AIUIThemeSelector +{ + /** Theme for dialogs. */ + kAIUIThemeSelectorDialog = 0, + + /** Theme for panels. */ + kAIUIThemeSelectorPanel, + + /** Internal use */ + kAIAUIThemeSelectorLast = 0xFFFF +}; + +/** Constants for \c #AIUIThemeSuite::GetUIThemeColor() + that identify predefined UI component colors. */ +enum AIUIComponentColor +{ + /** Invalid component color. */ + kAIUIComponentColorNone = -1, + + /** Current UI background color. */ + kAIUIComponentColorBackground = 0, + + /** Current UI text color. */ + kAIUIComponentColorText, + + /** Current UI focus ring color. */ + kAIUIComponentColorFocusRing, + + /** Current UI text edit color. */ + kAIUIComponentColorEditText, + + /** Current UI text edit background color. */ + kAIUIComponentColorEditTextBackground, + + /** Current UI border color, */ + kAIUIComponentColorBorder, + + /** Internal use */ + kAIUIComponentColorLast = 0xFFFF +}; + +/** Color record used to return a theme color from \c #AIUIThemeSuite::GetUIThemeColor(). */ +struct AIUIThemeColor +{ + /** Alpha (transparency) value. */ + AIReal alpha; + /** Red value. */ + AIReal red; + /** Green value. */ + AIReal green; + /** Blue value. */ + AIReal blue; + + /** Default constructor */ + AIUIThemeColor(AIReal a = kAIRealOne, AIReal r = kAIRealZero, AIReal g = kAIRealZero, AIReal b = kAIRealZero) : alpha(a), red(r), green(g), blue(b) {} +}; + + +/******************************************************************************* +** +** Suite +** +**/ +/** @ingroup Suites + This suite allows you to query UI color and brightness parameters. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIUIThemeSuite and \c #kAIUIThemeVersion. +*/ + +struct AIUIThemeSuite { + + /** Retrieves a current UI theme color, + @param themeSelector The theme, a constant value from \c #AIUIThemeSelector. + @param componentColor The component color to find, a constant value from \c # AIUIComponentColor. + @param aiColor [out] A buffer in which to return the theme color value. + */ + AIAPI AIErr (*GetUIThemeColor)(ai::int32 themeSelector, ai::int32 componentColor, AIUIThemeColor& aiColor); + + + /** + Reports whether the current UI theme is dark.
+ (Note that this function returns a Boolean value, not an error code.) + @return True if the current UI theme is dark, otherwise false. + */ + AIAPI AIBoolean (*IsUIThemeDark)(); + +}; + +#include "AIHeaderEnd.h" + +#endif // AIUITheme_h__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIURL.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIURL.h index 0183bd5..5481499 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIURL.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIURL.h @@ -1,68 +1,68 @@ -#ifndef _AIURL_H_ -#define _AIURL_H_ - -/* - * Name: AIURL.h - * $Revision: 1 $ - * Purpose: Adobe Illustrator URL Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - *: - */ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIURL.h */ - - -#define kAIURLSuite "AI URL Suite" -#define kAIURLSuiteVersion3 AIAPI_VERSION(3) -#define kAIURLSuiteVersion kAIURLSuiteVersion3 -#define kAIURLVersion kAIURLSuiteVersion - -/** @ingroup Errors - See \c #AIURLSuite */ -#define kFailureErr 'FAIL' - - - -/** @ingroup Suites - This suite provides a simple interface to go to a URL through a web - browser. You can use this to lead users to your web site for updates or other - information. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIURLSuite and \c #kAIURLSuiteVersion. - */ -typedef struct { - /** Reports whether a web browser is available. - (Note that this function returns a boolean value, not an error code.) - @return True if a web browser is available. - */ - ASAPI ASBoolean (*IsBrowserAvailable)(void); - - /** Opens a web browser and displays a URL. - (Note that this function returns a boolean value, not an error code.) - @param url The URL to display. - @return True if the web browser is opened successfully. - */ - ASAPI ASBoolean (*OpenURL)(const char *url); -} AIURLSuite; - - -#include "AIHeaderEnd.h" - - +#ifndef _AIURL_H_ +#define _AIURL_H_ + +/* + * Name: AIURL.h + * $Revision: 1 $ + * Purpose: Adobe Illustrator URL Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + *: + */ + +#ifndef __ASTypes__ +#include "ASTypes.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIURL.h */ + + +#define kAIURLSuite "AI URL Suite" +#define kAIURLSuiteVersion3 AIAPI_VERSION(3) +#define kAIURLSuiteVersion kAIURLSuiteVersion3 +#define kAIURLVersion kAIURLSuiteVersion + +/** @ingroup Errors + See \c #AIURLSuite */ +#define kFailureErr 'FAIL' + + + +/** @ingroup Suites + This suite provides a simple interface to go to a URL through a web + browser. You can use this to lead users to your web site for updates or other + information. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIURLSuite and \c #kAIURLSuiteVersion. + */ +typedef struct { + /** Reports whether a web browser is available. + (Note that this function returns a boolean value, not an error code.) + @return True if a web browser is available. + */ + ASAPI ASBoolean (*IsBrowserAvailable)(void); + + /** Opens a web browser and displays a URL. + (Note that this function returns a boolean value, not an error code.) + @param url The URL to display. + @return True if the web browser is opened successfully. + */ + ASAPI ASBoolean (*OpenURL)(const char *url); +} AIURLSuite; + + +#include "AIHeaderEnd.h" + + #endif // _AIURL_H_ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUUID.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUUID.h new file mode 100644 index 0000000..2f7646b --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUUID.h @@ -0,0 +1,92 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +/******************************************************************************* +** +** Imports +** +**/ + +#include "AITypes.h" +#include "IAIUUID.h" +#include "IAIUnicodeString.h" + +#include "AIHeaderBegin.h" + +/******************************************************************************* +** +** Constants +** +*******************************************************************************/ + +#define kAIUUIDSuite "AI UUID Suite" +#define kAIUUIDSuiteVersion AIAPI_VERSION(3) +#define kAIUUIDVersion kAIUUIDSuiteVersion + +/******************************************************************************* +** +** Suite +** +********************************************************************************/ +/** @ingroup Suites +This suite is in an experimental state, it is not completely production-ready. +These functions allow you to interact with the UUID and associated art +\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants +\c #kAIUUIDSuite and \c #kAIUUIDVersion. +@see \c #ai::uuid */ +struct AIUUIDSuite { + + /** Retrieves the art object associated with the UUID, if the art + is in-scope. + @param _uuid [in] const reference of UUID of art object. + @param art [out] A buffer in which to return the output as the valid art object, + or a null pointer if the art object has been deleted or + moved out of scope. + This API may fail to provide the correct ArtHandle, if an object's dictionary is acquired + but not released after use. (It is not recommended to acquire and hold the dictionary reference + for future use) + */ + AIAPI AIErr(*GetArtHandle)(const ai::uuid &_uuid, AIArtHandle &art); + + /** Retrieves the UUID associated with the art. + @param art [in] The art object. + @param _uuid [out] Reference variable to return the UUID of the art object. + */ + AIAPI AIErr(*GetArtUUID)(AIArtHandle art, ai::uuid &_uuid); + + /** Retrieves the UnicodeString representation of the UUID. + @param _uuid [in] Const reference of the UUID from which UnicodeString need to be created. + @param uStr [out] Reference variable in which to return the UnicodeString representation + of UUID. + */ + AIAPI AIErr(*UUIDToString) (const ai::uuid &_uuid, ai::UnicodeString &uStr); + + /** Retrieves the UUID object by creating it from the UnicodeString. + @param uStr [in] UnicodeString from which the UUID needs to be created. + @param _uuid [out] Reference variable in which to return the UUID object created from the + UnicodeString. + */ + AIAPI AIErr(*StringToUUID) (const ai::UnicodeString &uStr, ai::uuid &_uuid); + + /** Generates new unique UUID. + *@param _uuid [out] Reference variable in which the new generated uuid object is returned* + */ + AIAPI AIErr(*GenerateNewUUID) (ai::uuid &_uuid); +}; + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUndo.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUndo.h index 104c440..106d176 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUndo.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUndo.h @@ -1,215 +1,225 @@ -#ifndef __AIUndo__ -#define __AIUndo__ - -/* - * Name: AIUndo.h - * Author: - * Date: - * Purpose: Adobe Illustrator Undo Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2016 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AITypes.h" -#include "IAIUnicodeString.h" - -#include "AIHeaderBegin.h" - -/** @file AIUndo.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIUndoSuite "AI Undo Suite" -#define kAIUndoSuiteVersion AIAPI_VERSION(8) -#define kAIUndoVersion kAIUndoSuiteVersion - - -/** Undo context types. See \c #AIUndoSuite. */ -enum AIUndoContextKind { - /** A standard context results in the addition of a new transaction which - can be undone/redone by the user */ - kAIStandardUndoContext = 0, - /** A silent context does not cause redos to be discarded and - is skipped over when undoing and redoing. An example is a selection change. */ - kAISilentUndoContext, - /** An appended context is like a standard context, except that - it is combined with the preceding transaction. It does not - appear as a separate transaction. Used, for example, to - collect sequential changes to the color of an object into a - single undo/redo transaction. */ - kAIAppendUndoContext -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suites provides access to the Undo/Redo mechanism. Use these - functions to revert the artwork state to what it was when your - plug-in was called, or to set the text of the Undo/Redo menus. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUndoSuite and \c #kAIUndoVersion. - - @section UndoContext Undo API Contexts - - The \c AIUndoSuite allows you to manipulate the undo \e context for your plug-in. - Generally, each time Illustrator sends a plug-in a selector, it creates - an undo context. The record is created before the plug-in is called and - closed when the plug-in finishes running. The changes made by the plug-in - are accumulated in this record and make up the undo context. When the user - chooses Undo from the Edit menu, the changes of the last complete context - are undone. Redo restores the context changes. - - You can use \c #UndoChanges() to programmatically undo the changes within - the context Illustrator has made for your plug-in. It cannot undo changes - outside of this context. - - For plug-in tools, Illustrator handles undo contexts a little differently. - Instead of generating a context for each selector, it bundles the mouse - selectors into a single context. This allows a plug-in to undo changes - it made last time and then modify the document in response to the - current mouse position. Illustrator then redraws the document when the plug-in - returns control. - - There are three types of undo context, defined by \c #AIUndoContextKind. - Illustrator normally establishes a \c #kAIStandardUndoContext, but notifications - are sent in a \c #kAISilentUndoContext. A plug-in can change the undo context - type with \c #SetSilent() and \c #SetKind(), but only if the plug-in is \e not - operating in a nested context (that is, a context created when another plug-in - is executing). This prevents a plug-in in a nested context from - modifying the behavior of the outer context. - - Undo entries can be tagged with a string and/or an integer. Only standard - contexts can be tagged. -*/ -typedef struct { - - /** Specifies the localizable text(Unicode String) for Undo and Redo menu items. Illustrator - uses these strings for the menus as needed. - @note Illustrator automatically handles the undo mechanism for - plug-in filters. Filters should not use this function. - @param undoText Unicode String text for the Undo menu. - @param redoText Unicode String text for the Redo menu. - */ - AIAPI AIErr (*SetUndoTextUS) ( const ai::UnicodeString& undoText, const ai::UnicodeString& redoText ); - - /** Undoes changes in the current undo context. Clears any changes made - to the artwork since the undo context of the plug-in was created. */ - AIAPI AIErr (*UndoChanges) ( void ); - - /** Undoes changes in the Action palette. Clears any changes made - to the Action palette since the undo context of the plug-in was created. */ - AIAPI AIErr (*SetActionPaletteUndo) ( void ); - - /** @deprecated Obsolete, do not use. */ - AIAPI AIErr (*PurgeAllUndos) ( void ); - - /** Marks or unmarks the current API context as being silent for undo purposes. - See @ref UndoContext. - @param silent True to set the context to \c #kAISilentUndoContext, - false to set it to \c #kAIStandardUndoContext. - */ - AIAPI AIErr (*SetSilent) ( AIBoolean silent ); - - /** Sets the type of the current undo context, but only if the plug-in is \e not - operating in a nested context (that is, a context created when another plug-in - is executing). See @ref UndoContext. - @param kind The new context type, an \c #AIUndoContextKind constant. - */ - AIAPI AIErr (*SetKind) ( ai::int32 kind ); - - /** Counts the number of undo and redo transactions that a user can - perform. Does not count silent or appended transactions. Use with - \c #GetNthTransactionTag() to iterate through transactions in the - current undo context. - @param past [out] A buffer in which to return the number of undo transactions. - @param future [out] A buffer in which to return the number of redo transactions. - - */ - AIAPI AIErr (*CountTransactions) ( ai::int32* past, ai::int32* future ); - - /** Reports whether the current API context is marked as silent for undo purposes. - If the current context is nested, this can return true while the outer - context is not silent. See @ref UndoContext. - @param silent [out] A buffer in which to return true if the current undo context - is silent. - */ - AIAPI AIErr (*IsSilent) ( AIBoolean* silent ); - - /** Sets a Unicode tag string and integer for the undo transaction that is generated - by the current API context. Affects only standard undo contexts; see @ref UndoContext. - @param tagString A descriptive Unicode string. - @param tagInteger An identifying number. - */ - AIAPI AIErr (*SetTagUS) ( const ai::UnicodeString& tagString, ai::int32 tagInteger ); - - /** Retrieves a Unicode tag string and integer for the undo transaction that is generated - by the current API context. Works only standard undo contexts; see @ref UndoContext. - @param tagString [out] A buffer in which to return the descriptive Unicode string. - @param tagInteger [out] A buffer in which to return the identifying number. - */ - AIAPI AIErr (*GetTagUS) ( ai::UnicodeString& tagString, ai::int32* tagInteger ); - - /** Sets a transaction tag (a Unicode string) by position index for the current undo/redo context. - Use with \c #CountTransactions() to iterate through transactions in the - current standard undo context. - @param n The position index. Positive values indicate redo transactions, - negative values indicate undo transactions. No transaction is at index 0. - @param tagString A descriptive Unicode string. - @param tagInteger An identifying number. - */ - AIAPI AIErr (*SetNthTransactionTagUS) ( ai::int32 n, const ai::UnicodeString& tagString, ai::int32 tagInteger ); - - /** Retrieves a transaction tag (a Unicode string) by position index from the current undo/redo context. - Use with \c #CountTransactions() to iterate through transactions in the - current standard undo context. - @param n The position index. Positive values indicate redo transactions, - negative values indicate undo transactions. No transaction is at index 0. - @param tagString [out] A buffer in which to return the descriptive Unicode string. - @param tagInteger [out] A buffer in which to return the identifying number. - */ - AIAPI AIErr (*GetNthTransactionTagUS) ( ai::int32 n, ai::UnicodeString& tagString, ai::int32* tagInteger ); - - /** For internal use only. - Suspend/Resume undo recording. - */ - AIAPI AIErr (*SetRecordingSuspended) ( AIBoolean inSuspend ); - - /** For internal use only. - Reports if undo recording is suspended. - */ - AIAPI AIErr (*IsRecordingSuspended) ( AIBoolean* outIsSuspended ); - -} AIUndoSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#pragma once + +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 1986 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AITypes.h" +#include "IAIUnicodeString.h" + +#include "AIHeaderBegin.h" + +/** @file AIUndo.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIUndoSuite "AI Undo Suite" +#define kAIUndoSuiteVersion AIAPI_VERSION(9) +#define kAIUndoVersion kAIUndoSuiteVersion + + +/** Undo context types. See \c #AIUndoSuite. */ +enum AIUndoContextKind { + /** A standard context results in the addition of a new transaction which + can be undone/redone by the user */ + kAIStandardUndoContext = 0, + /** A silent context does not cause redos to be discarded and + is skipped over when undoing and redoing. An example is a selection change. */ + kAISilentUndoContext, + /** An appended context is like a standard context, except that + it is combined with the preceding transaction. It does not + appear as a separate transaction. Used, for example, to + collect sequential changes to the color of an object into a + single undo/redo transaction. */ + kAIAppendUndoContext +}; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suites provides access to the Undo/Redo mechanism. Use these + functions to revert the artwork state to what it was when your + plug-in was called, or to set the text of the Undo/Redo menus. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIUndoSuite and \c #kAIUndoVersion. + + @section UndoContext Undo API Contexts + + The \c AIUndoSuite allows you to manipulate the undo \e context for your plug-in. + Generally, each time Illustrator sends a plug-in a selector, it creates + an undo context. The record is created before the plug-in is called and + closed when the plug-in finishes running. The changes made by the plug-in + are accumulated in this record and make up the undo context. When the user + chooses Undo from the Edit menu, the changes of the last complete context + are undone. Redo restores the context changes. + + You can use \c #UndoChanges() to programmatically undo the changes within + the context Illustrator has made for your plug-in. It cannot undo changes + outside of this context. + + For plug-in tools, Illustrator handles undo contexts a little differently. + Instead of generating a context for each selector, it bundles the mouse + selectors into a single context. This allows a plug-in to undo changes + it made last time and then modify the document in response to the + current mouse position. Illustrator then redraws the document when the plug-in + returns control. + + There are three types of undo context, defined by \c #AIUndoContextKind. + Illustrator normally establishes a \c #kAIStandardUndoContext, but notifications + are sent in a \c #kAISilentUndoContext. A plug-in can change the undo context + type with \c #SetSilent() and \c #SetKind(), but only if the plug-in is \e not + operating in a nested context (that is, a context created when another plug-in + is executing). This prevents a plug-in in a nested context from + modifying the behavior of the outer context. + + Undo entries can be tagged with a string and/or an integer. Only standard + contexts can be tagged. +*/ +typedef struct { + + /** Specifies the localizable text(Unicode String) for Undo and Redo menu items. Illustrator + uses these strings for the menus as needed. + @note Illustrator automatically handles the undo mechanism for + plug-in filters. Filters should not use this function. + @param undoText Unicode String text for the Undo menu. + @param redoText Unicode String text for the Redo menu. + */ + AIAPI AIErr (*SetUndoTextUS) ( const ai::UnicodeString& undoText, const ai::UnicodeString& redoText ); + + /** Undoes changes in the current undo context. Clears any changes made + to the artwork since the undo context of the plug-in was created. */ + AIAPI AIErr (*UndoChanges) ( void ); + + /** Undoes changes in the Action palette. Clears any changes made + to the Action palette since the undo context of the plug-in was created. */ + AIAPI AIErr (*SetActionPaletteUndo) ( void ); + + /** Undoes and forgets the last transaction. + Any redos available at this point are also forgotten. + This decreases the available undo transactions by one. + Changes made in the last transaction are no longer available for redo. */ + AIAPI AIErr (*RevertAndForgetLastTransaction) ( void ); + + /** Marks or unmarks the current API context as being silent for undo purposes. + See @ref UndoContext. + @param silent True to set the context to \c #kAISilentUndoContext, + false to set it to \c #kAIStandardUndoContext. + */ + AIAPI AIErr (*SetSilent) ( AIBoolean silent ); + + /** Sets the type of the current undo context, but only if the plug-in is \e not + operating in a nested context (that is, a context created when another plug-in + is executing). See @ref UndoContext. + @param kind The new context type, an \c #AIUndoContextKind constant. + */ + AIAPI AIErr (*SetKind) ( ai::int32 kind ); + + /** Counts the number of undo and redo transactions that a user can + perform. Does not count silent or appended transactions. Use with + \c #GetNthTransactionTag() to iterate through transactions in the + current undo context. + @param past [out] A buffer in which to return the number of undo transactions. + @param future [out] A buffer in which to return the number of redo transactions. + + */ + AIAPI AIErr (*CountTransactions) ( ai::int32* past, ai::int32* future ); + + /** Reports whether the current API context is marked as silent for undo purposes. + If the current context is nested, this can return true while the outer + context is not silent. See @ref UndoContext. + @param silent [out] A buffer in which to return true if the current undo context + is silent. + */ + AIAPI AIErr (*IsSilent) ( AIBoolean* silent ); + + /** Sets a Unicode tag string and integer for the undo transaction that is generated + by the current API context. Affects only standard undo contexts; see @ref UndoContext. + @param tagString A descriptive Unicode string. + @param tagInteger An identifying number. + */ + AIAPI AIErr (*SetTagUS) ( const ai::UnicodeString& tagString, ai::int32 tagInteger ); + + /** Retrieves a Unicode tag string and integer for the undo transaction that is generated + by the current API context. Works only standard undo contexts; see @ref UndoContext. + @param tagString [out] A buffer in which to return the descriptive Unicode string. + @param tagInteger [out] A buffer in which to return the identifying number. + */ + AIAPI AIErr (*GetTagUS) ( ai::UnicodeString& tagString, ai::int32* tagInteger ); + + /** Sets a transaction tag (a Unicode string) by position index for the current undo/redo context. + Use with \c #CountTransactions() to iterate through transactions in the + current standard undo context. + @param n The position index. Positive values indicate redo transactions, + negative values indicate undo transactions. No transaction is at index 0. + @param tagString A descriptive Unicode string. + @param tagInteger An identifying number. + */ + AIAPI AIErr (*SetNthTransactionTagUS) ( ai::int32 n, const ai::UnicodeString& tagString, ai::int32 tagInteger ); + + /** Retrieves a transaction tag (a Unicode string) by position index from the current undo/redo context. + Use with \c #CountTransactions() to iterate through transactions in the + current standard undo context. + @param n The position index. Positive values indicate redo transactions, + negative values indicate undo transactions. No transaction is at index 0. + @param tagString [out] A buffer in which to return the descriptive Unicode string. + @param tagInteger [out] A buffer in which to return the identifying number. + */ + AIAPI AIErr (*GetNthTransactionTagUS) ( ai::int32 n, ai::UnicodeString& tagString, ai::int32* tagInteger ); + + /** For internal use only. + Suspend/Resume undo recording. + */ + AIAPI AIErr (*SetRecordingSuspended) ( AIBoolean inSuspend ); + + /** For internal use only. + Reports if undo recording is suspended. + */ + AIAPI AIErr (*IsRecordingSuspended) ( AIBoolean* outIsSuspended ); + +#if defined(ILLUSTRATOR_MINIMAL) + /** For internal use only. + Begin silent changes + */ + AIAPI AIErr (*BeginSilentChanges) ( void ); + + /** For internal use only. + End silent changes + */ + AIAPI AIErr (*EndSilentChanges) ( void ); + +#endif + +} AIUndoSuite; + + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUnicodeString.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUnicodeString.h index 5044c47..1d8d4c5 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUnicodeString.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUnicodeString.h @@ -1,497 +1,506 @@ - -#ifndef __AIUnicodeString__ -#define __AIUnicodeString__ - -/* - * Name: AIUnicodeString.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Unicode String Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "IAIUnicodeString.h" -#include "AICharacterEncoding.h" -#include "AITypes.h" - -#include "AIHeaderBegin.h" - -/** @file AIUnicodeString.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIUnicodeStringSuite "AI Unicode String Suite" -#define kAIUnicodeStringSuiteVersion AIAPI_VERSION(8) -#define kAIUnicodeStringVersion kAIUnicodeStringSuiteVersion - -/******************************************************************************* - ** - ** Types - ** - **/ - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides utilities that allow you to create and manipulate - Unicode strings. - @note It is recommended that you use the wrapper class, \c #ai::UnicodeString, - rather than calling these functions directly. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUnicodeStringSuite and \c #kAIUnicodeStringVersion. - */ -typedef struct { - - /** Initializes a Unicode string with the contents of a C string. - @param str [out] A buffer in which to return the Unicode string. - @param string The C string. - @param srcByteLen The number of bytes in the C string. - @param encoding The encoding type for the new string. - */ - AIAPI AIErr (*Initialize) (ai::UnicodeString& str, const char* string, - ai::UnicodeString::offset_type srcByteLen, AICharacterEncoding encoding); - - /** Initializes a Unicode string with the contents of a UTF-16 encoded string. - @param str [out] A buffer in which to return the Unicode string. - @param utfs The UTF-16 encoded string, an array UTF-16 code units. - @param srcUTF16Count The number of UTF-16 code units to be taken from the source string. - A value of \c npos mean that the source string is 0-terminated. - */ - AIAPI AIErr (*InitializeUTF16) (ai::UnicodeString& str, const ASUnicode* utfs, ai::UnicodeString::offset_type srcUTF16Count); - - /** Initializes a Unicode string with a single UTF-32 code point (character) repeated a - given number of times. - @param str [out] A buffer in which to return the Unicode string. - @param count The number of characters. - @param ch The UTF code point. - */ - AIAPI AIErr (*InitializeUTF32Char) (ai::UnicodeString& str, ai::UnicodeString::offset_type count, - ai::UnicodeString::UTF32TextChar ch); - - /** Deletes the contents of a Unicode string, and reset it to an uninitialized state. - Any pointers to UTF-16 buffers derived from that string become invalid. - @param str The string. - */ - AIAPI AIErr (*Destroy) (ai::UnicodeString& str); - - /* Basic operations (a la std::basic_string) */ - - /** Appends one Unicode string to another. - @param str The string to append to. - @param str2 The string to append. - */ - AIAPI AIErr (*Append) (ai::UnicodeString& str, const ai::UnicodeString& str2); - - /** Appends a sub-string of one Unicode string to another. - @param str The string to append to. - @param str2 The source string for the substring to append. - @param startOffset The 0-based character offset for the substring. - @param count the maximum number of characters for the substring. - */ - AIAPI AIErr (*AppendSubString) (ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Assigns one Unicode string to another. - @param str The destination string. - @param str2 The source string. - */ - AIAPI AIErr (*Assign) (ai::UnicodeString& str, - const ai::UnicodeString& str2); - - /** Copies one Unicode string into another. - @param str The destination string. - @param str2 The source string. If empty or uninitialized, - the destination string is truncated. - */ - AIAPI AIErr (*Copy) (ai::UnicodeString& str, const ai::UnicodeString& str2); - - /** Retrieves the UTF-32 code point at an index position in a Unicode string. - @param str The string. - @param position The 0-based character offset for the character. - @param ch [out] A buffer in which to return the character. - @return An error if the given position is not a valid offset into - the string. - */ - AIAPI AIErr (*GetChar) (const ai::UnicodeString& str, - ai::UnicodeString::size_type position, - ai::UnicodeString::UTF32TextChar& ch); - - /** Clears the contents of a Unicode string. An uninitialized string remains unchanged. - (Note that this function does not return an error code.) - @param str The string. - */ - AIAPI void (*Clear) (ai::UnicodeString& str); - - /** Compares substrings in two Unicode strings. Uninitialized strings - are equal to other uninitialized strings and empty strings, and are less - than initialized, non-empty strings. - (Note that this function returns a numeric value, not an error code.) - @param str The first string (left side of compare). - @param pos The 0-based offset for the first character of the first substring. - @param num The number of characters in the first substring. - @param str2 The second string (right side of compare). - @param startOffset The 0-based offset for the first character of the second substring. - @param count The number of characters in the second substring. - @return 0 if the substrings are equal. -
Positive if the first substring is greater than the second. -
Negative if the second substring is greater than the first. - */ - AIAPI ai::int32 (*Compare) (const ai::UnicodeString& str, - ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num, - const ai::UnicodeString& str2, - ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count); - - /** - * Convert the characters in this to lower case following the conventions of - * the default locale. - * @param UnicodeString to modify via reference - * @return nothing. - */ - AIAPI AIErr (*toLower) (ai::UnicodeString& src); - - /** - * Convert the characters in this to upper case following the conventions of - * the default locale. - * @param UnicodeString to modify via reference - * @return nothing. - */ - AIAPI AIErr (*toUpper) (ai::UnicodeString& src); - - /** Performs a caseless comparison of substrings in two Unicode strings. - Strings are case folded in a locale-independent manner prior to comparison. - Uninitialized strings are equal to other uninitialized strings and - empty strings, and are less than initialized, non-empty strings. - (Note that this function returns a numeric value, not an error code.) - @param str The first string (left side of compare). - @param pos The 0-based offset for the first character of the first substring. - @param num The number of characters in the first substring. - @param str2 The second string (right side of compare). - @param startOffset The 0-based offset for the first character of the second substring. - @param count The number of characters in the second substring. - @return 0 if the substrings are equal. -
Positive if the first substring is greater than the second. -
Negative if the second substring is greater than the first. - */ - AIAPI ai::int32 (*CaseCompare) (const ai::UnicodeString& str, - ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num, - const ai::UnicodeString& str2, - ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count); - - /** Performs a normalized comparison of substrings in two Unicode strings. - Uninitialized strings are equal to other uninitialized strings and - empty strings, and are less than initialized, non-empty strings. - (Note that this function returns a numeric value, not an error code.) - @param str The first string (left side of compare). - @param pos The 0-based offset for the first character of the first substring. - @param num The number of characters in the first substring. - @param str2 The second string (right side of compare). - @param startOffset The 0-based offset for the first character of the second substring. - @param count The number of characters in the second substring. - @return 0 if the substrings are equal. -
Positive if the first substring is greater than the second. -
Negative if the second substring is greater than the first. - */ - AIAPI AIErr (*CanonicalCompare) (const ai::UnicodeString& str, const ai::UnicodeString& str2, ai::int32& compareResult); - - /** Performs a normalized, caseless comparison of substrings in two Unicode strings. - Strings are case folded in a locale-independent manner prior to comparison. - Uninitialized strings are equal to other uninitialized strings and - empty strings, and are less than initialized, non-empty strings. - (Note that this function returns a numeric value, not an error code.) - @param str The first string (left side of compare). - @param pos The 0-based offset for the first character of the first substring. - @param num The number of characters in the first substring. - @param str2 The second string (right side of compare). - @param startOffset The 0-based offset for the first character of the second substring. - @param count The number of characters in the second substring. - @return 0 if the substrings are equal. -
Positive if the first substring is greater than the second. -
Negative if the second substring is greater than the first. - */ - AIAPI AIErr (*CanonicalCaseCompare) (const ai::UnicodeString& str, const ai::UnicodeString& str2, ai::int32& compareResult); - - /** Retrieves the number of UTF-32 code points (characters) in a Unicode string. - (Note that this function returns a numeric value, not an error code.) - @param str The string. - @return The number of characters, 0 for an uninitialized or empty string. - */ - AIAPI ai::UnicodeString::size_type (*Length) (const ai::UnicodeString& str); - - /** Reports whether a Unicode string is empty. - (Note that this function returns a boolean value, not an error code.) - @param str The string. - @return True if the string is uninitialized or empty. - */ - AIAPI AIBool8 (*Empty) (const ai::UnicodeString& str); - - /** Erases characters from a Unicode string. - @param str The string, which is modified in place. - @param startOffset The 0-based index of the first character to erase. - @param count The maximum number of characters to erase. - @return An error if the given position index is not a valid offset into the string. - */ - AIAPI AIErr (*Erase) (ai::UnicodeString& str, - ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Searches for the first occurrence of a character in a substring of a Unicode string. - (Note that this function returns a numeric value, not an error code.) - @param str The string. - @param ch The character to search for. - @param startOffset The 0-based index in \c str at which to start the search. - @return The 0-based character index of the found character, - or \c npos if the character is not found. - */ - AIAPI ai::UnicodeString::size_type (*FindChar) (const ai::UnicodeString& str, - ai::UnicodeString::UTF32TextChar ch, - ai::UnicodeString::size_type startOffset); - - /** Searches for the first occurrence of an entire string within a substring of a Unicode string. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @return The 0-based character index of the found string, - or \c npos if the string is not found. - */ - AIAPI ai::UnicodeString::size_type (*FindString) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset); - - /** Searches for the first occurrence of a substring of one Unicode string within - a substring of another Unicode string. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @param count The maximum number of characters within \c str2 to search for. - @return The 0-based character index of the found string, - or \c npos if the string is not found. - */ - AIAPI ai::UnicodeString::size_type (*FindSubString) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Searches for the first occurrence of a substring of one Unicode string within - a substring of another Unicode string, performing a caseless compare. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @param count The maximum number of characters within \c str2 to search for. - @return The 0-based character index of the found string, - or \c npos if the string is not found. - */ - AIAPI ai::UnicodeString::size_type (*CaseFindSubString) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Searches for the last occurrence of a character in a substring of a Unicode string. - (Note that this function returns a numeric value, not an error code.) - @param str The string. - @param ch The character to search for. - @param startOffset The 0-based index in \c str at which to start the search. - @return The 0-based character index of the found character, - or \c npos if the character is not found. - */ - AIAPI ai::UnicodeString::size_type (*RFindChar) (const ai::UnicodeString& str, - ai::UnicodeString::UTF32TextChar ch, - ai::UnicodeString::size_type startOffset); - - /** Searches for the last occurrence of an entire string within a substring of a Unicode string. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @return The 0-based character index of the found string, - or \c npos if the string is not found. - */ - AIAPI ai::UnicodeString::size_type (*RFindString) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset); - - /** Searches for the last occurrence of a substring of one Unicode string within - a substring of another Unicode string. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @param count The maximum number of characters within \c str2 to search for. - @return The 0-based character index of the found string, - or \c npos if the string is not found. - */ - AIAPI ai::UnicodeString::size_type (*RFindSubString) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Searches for the first occurrence of any character from a subset of one - Unicode string in a substring of another string. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @param count The number of characters from the start of \c str2 to compare. - @return The 0-based character index of the found character, - or \c npos if the character is not found. - */ - AIAPI ai::UnicodeString::size_type (*FindFirstOf) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Searches in a Unicode string for the first occurrence of any character that - does not appear in a subset of another string. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @param count The number of characters from the start of \c str2 to compare. - @return The 0-based character index of the found character, - or \c npos if the character is not found. - */ - AIAPI ai::UnicodeString::size_type (*FindFirstNotOf) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Searches in a Unicode string for the last character that also appears in - a substring of another string. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @param count The number of characters from the start of \c str2 to compare. - @return The 0-based character index of the found character, - or \c npos if the character is not found. - */ - AIAPI ai::UnicodeString::size_type (*FindLastOf) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Searches in a Unicode string for the last character that does not appear in - a substring of another string. - (Note that this function returns a numeric value, not an error code.) - @param str The string to search in. - @param str2 The string to compare against. - @param startOffset The 0-based index in \c str at which to start the search. - @param count The number of characters from the start of \c str2 to compare. - @return The 0-based character index of the found character, - or \c npos if the character is not found. - */ - AIAPI ai::UnicodeString::size_type (*FindLastNotOf) (const ai::UnicodeString& str, - const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count); - - /** Resizes a Unicode string to hold a given number of characters, truncating - or padding it as needed. - @param str The string, which is modified in place. - @param count The number of characters. - @param ch The padding character, if needed. - */ - AIAPI AIErr (*Resize) (ai::UnicodeString& str, ai::UnicodeString::size_type count, ai::UnicodeString::UTF32TextChar ch); - - /** Creates a substring of a Unicode string. - @param subString [in, out] A Unicode string in which to return the substring. - If it is uninitialized on input, it is initialized only if the source - string is initialized and not empty. - @param str The source string. - @param offset The 0-based index in \c str at which to start the substring. - @param count The maximum number of characters to place in the new substring. - */ - AIAPI AIErr (*SubStr) (ai::UnicodeString& subString, - const ai::UnicodeString& str, - ai::UnicodeString::size_type offset, ai::UnicodeString::size_type count); - - /** Swaps the contents of two Unicode strings. - @param str The first string. - @param str2 The second string. - */ - AIAPI AIErr (*SwapStr) (ai::UnicodeString& str, ai::UnicodeString& str2); - - /* non-std::string based functionality */ - - //AIAPI int CaseCompare(const ai::UnicodeString& str, - // ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num, - // const ai::UnicodeString& str2, - // ai::UnicodeString::size_type startOffset, - // ai::UnicodeString::size_type count); - //AIAPI void FoldCase(ai::UnicodeString& str); - - /** Reports whether a Unicode string contains surrogate pairs. - (Note that this function returns a boolean value, not an error code.) - @param str The string. - @return True if it contains at least one surrogate pair. - */ - AIAPI AIBool8 (*HasSurrogates) (const ai::UnicodeString& str); - - /** Retrieves a read-only pointer to a buffer that contains UTF-16 encoded - characters in platform byte order, for a given Unicode string. - (Note that this function returns a numeric value, not an error code.) - @param str The string. - @param buffer [out] The pointer to the buffer. Can be 0 if the string is - empty or uninitialized. Might not be 0 terminated. - @return The length of the buffer in UTF-16 code units. - */ - AIAPI ai::UnicodeString::size_type (*UTF_16) (const ai::UnicodeString& str, - const ai::UnicodeString::UTF16Char*& buffer); - - /** Retrieves the contents of a Unicode string in a given encoding. - @param str The string. - @param encoding The encoding. - @param buffer [out] A buffer in which to return the encoded - contents. Need not be initialized prior to the call. - @param bufferByteCount [out] A buffer in which to return the number of bytes - in the buffer that contain the requested data. The buffer can be - larger than this. - */ - AIAPI AIErr (*GetAs) (const ai::UnicodeString& str, AICharacterEncoding encoding, - ai::AutoBuffer& buffer, ai::UnicodeString::size_type& bufferByteCount); - - /** Initializes a Unicode string from a ZString. (ZStrings are used internally - for localization.) - @param str The string. - @param zStringKey The ZString key. - */ - AIAPI AIErr (*InitializeZString) (ai::UnicodeString& str, ZRef zStringKey); - - /* New for AI13 */ - - /** Normalizes a Unicode string. - @param str The string. - @param form The normalization format. - */ - AIAPI AIErr (*Normalize) (ai::UnicodeString& str, ai::UnicodeString::NormalizedForm form); - - -} AIUnicodeStringSuite; - - -#include "AIHeaderEnd.h" - - - -#endif // __AIUnicodeString__ + +#ifndef __AIUnicodeString__ +#define __AIUnicodeString__ + +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2004 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "IAIUnicodeString.h" +#include "AICharacterEncoding.h" +#include "AITypes.h" + +#include "AIHeaderBegin.h" + +/** @file AIUnicodeString.h */ + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIUnicodeStringSuite "AI Unicode String Suite" +#define kAIUnicodeStringSuiteVersion AIAPI_VERSION(9) +#define kAIUnicodeStringVersion kAIUnicodeStringSuiteVersion + +/******************************************************************************* + ** + ** Types + ** + **/ + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides utilities that allow you to create and manipulate + Unicode strings. + @note It is recommended that you use the wrapper class, \c #ai::UnicodeString, + rather than calling these functions directly. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIUnicodeStringSuite and \c #kAIUnicodeStringVersion. + */ +struct AIUnicodeStringSuite +{ + + /** Initializes a Unicode string with the contents of a C string. + @param str [out] A buffer in which to return the Unicode string. + @param string The C string. + @param srcByteLen The number of bytes in the C string. + @param encoding The encoding type for the new string. + */ + AIAPI AIErr (*Initialize) (ai::UnicodeString& str, const char* string, + ai::UnicodeString::offset_type srcByteLen, AICharacterEncoding encoding); + + /** Initializes a Unicode string with the contents of a UTF-16 encoded string. + @param str [out] A buffer in which to return the Unicode string. + @param utfs The UTF-16 encoded string, an array UTF-16 code units. + @param srcUTF16Count The number of UTF-16 code units to be taken from the source string. + A value of \c npos mean that the source string is 0-terminated. + */ + AIAPI AIErr (*InitializeUTF16) (ai::UnicodeString& str, const ASUnicode* utfs, ai::UnicodeString::offset_type srcUTF16Count); + + /** Initializes a Unicode string with a single UTF-32 code point (character) repeated a + given number of times. + @param str [out] A buffer in which to return the Unicode string. + @param count The number of characters. + @param ch The UTF code point. + */ + AIAPI AIErr (*InitializeUTF32Char) (ai::UnicodeString& str, ai::UnicodeString::offset_type count, + ai::UnicodeString::UTF32TextChar ch); + + /** Deletes the contents of a Unicode string, and reset it to an uninitialized state. + Any pointers to UTF-16 buffers derived from that string become invalid. + @param str The string. + */ + AIAPI AIErr (*Destroy) (ai::UnicodeString& str); + + /* Basic operations (a la std::basic_string) */ + + /** Appends one Unicode string to another. + @param str The string to append to. + @param str2 The string to append. + */ + AIAPI AIErr (*Append) (ai::UnicodeString& str, const ai::UnicodeString& str2); + + /** Appends a sub-string of one Unicode string to another. + @param str The string to append to. + @param str2 The source string for the substring to append. + @param startOffset The 0-based character offset for the substring. + @param count the maximum number of characters for the substring. + */ + AIAPI AIErr (*AppendSubString) (ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Assigns one Unicode string to another. + @param str The destination string. + @param str2 The source string. + */ + AIAPI AIErr (*Assign) (ai::UnicodeString& str, + const ai::UnicodeString& str2); + + /** Copies one Unicode string into another. + @param str The destination string. + @param str2 The source string. If empty or uninitialized, + the destination string is truncated. + */ + AIAPI AIErr (*Copy) (ai::UnicodeString& str, const ai::UnicodeString& str2); + + /** Retrieves the UTF-32 code point at an index position in a Unicode string. + @param str The string. + @param position The 0-based character offset for the character. + @param ch [out] A buffer in which to return the character. + @return An error if the given position is not a valid offset into + the string. + */ + AIAPI AIErr (*GetChar) (const ai::UnicodeString& str, + ai::UnicodeString::size_type position, + ai::UnicodeString::UTF32TextChar& ch); + + /** Clears the contents of a Unicode string. An uninitialized string remains unchanged. + (Note that this function does not return an error code.) + @param str The string. + */ + AIAPI void (*Clear) (ai::UnicodeString& str); + + /** Compares substrings in two Unicode strings. Uninitialized strings + are equal to other uninitialized strings and empty strings, and are less + than initialized, non-empty strings. + (Note that this function returns a numeric value, not an error code.) + @param str The first string (left side of compare). + @param pos The 0-based offset for the first character of the first substring. + @param num The number of characters in the first substring. + @param str2 The second string (right side of compare). + @param startOffset The 0-based offset for the first character of the second substring. + @param count The number of characters in the second substring. + @return 0 if the substrings are equal. +
Positive if the first substring is greater than the second. +
Negative if the second substring is greater than the first. + */ + AIAPI ai::int32 (*Compare) (const ai::UnicodeString& str, + ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num, + const ai::UnicodeString& str2, + ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count); + + /** + * Convert the characters in this to lower case following the conventions of + * the default locale. + * @param UnicodeString to modify via reference + * @return nothing. + */ + AIAPI AIErr (*toLower) (ai::UnicodeString& src); + + /** + * Convert the characters in this to upper case following the conventions of + * the default locale. + * @param UnicodeString to modify via reference + * @return nothing. + */ + AIAPI AIErr (*toUpper) (ai::UnicodeString& src); + + /** Performs a caseless comparison of substrings in two Unicode strings. + Strings are case folded in a locale-independent manner prior to comparison. + Uninitialized strings are equal to other uninitialized strings and + empty strings, and are less than initialized, non-empty strings. + (Note that this function returns a numeric value, not an error code.) + @param str The first string (left side of compare). + @param pos The 0-based offset for the first character of the first substring. + @param num The number of characters in the first substring. + @param str2 The second string (right side of compare). + @param startOffset The 0-based offset for the first character of the second substring. + @param count The number of characters in the second substring. + @return 0 if the substrings are equal. +
Positive if the first substring is greater than the second. +
Negative if the second substring is greater than the first. + */ + AIAPI ai::int32 (*CaseCompare) (const ai::UnicodeString& str, + ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num, + const ai::UnicodeString& str2, + ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count); + + /** Performs a normalized comparison of substrings in two Unicode strings. + Uninitialized strings are equal to other uninitialized strings and + empty strings, and are less than initialized, non-empty strings. + (Note that this function returns a numeric value, not an error code.) + @param str The first string (left side of compare). + @param pos The 0-based offset for the first character of the first substring. + @param num The number of characters in the first substring. + @param str2 The second string (right side of compare). + @param startOffset The 0-based offset for the first character of the second substring. + @param count The number of characters in the second substring. + @return 0 if the substrings are equal. +
Positive if the first substring is greater than the second. +
Negative if the second substring is greater than the first. + */ + AIAPI AIErr (*CanonicalCompare) (const ai::UnicodeString& str, const ai::UnicodeString& str2, ai::int32& compareResult); + + /** Performs a normalized, caseless comparison of substrings in two Unicode strings. + Strings are case folded in a locale-independent manner prior to comparison. + Uninitialized strings are equal to other uninitialized strings and + empty strings, and are less than initialized, non-empty strings. + (Note that this function returns a numeric value, not an error code.) + @param str The first string (left side of compare). + @param pos The 0-based offset for the first character of the first substring. + @param num The number of characters in the first substring. + @param str2 The second string (right side of compare). + @param startOffset The 0-based offset for the first character of the second substring. + @param count The number of characters in the second substring. + @return 0 if the substrings are equal. +
Positive if the first substring is greater than the second. +
Negative if the second substring is greater than the first. + */ + AIAPI AIErr (*CanonicalCaseCompare) (const ai::UnicodeString& str, const ai::UnicodeString& str2, ai::int32& compareResult); + + /** Retrieves the number of UTF-32 code points (characters) in a Unicode string. + (Note that this function returns a numeric value, not an error code.) + @param str The string. + @return The number of characters, 0 for an uninitialized or empty string. + */ + AIAPI ai::UnicodeString::size_type (*Length) (const ai::UnicodeString& str); + + /** Reports whether a Unicode string is empty. + (Note that this function returns a boolean value, not an error code.) + @param str The string. + @return True if the string is uninitialized or empty. + */ + AIAPI AIBool8 (*Empty) (const ai::UnicodeString& str); + + /** Erases characters from a Unicode string. + @param str The string, which is modified in place. + @param startOffset The 0-based index of the first character to erase. + @param count The maximum number of characters to erase. + @return An error if the given position index is not a valid offset into the string. + */ + AIAPI AIErr (*Erase) (ai::UnicodeString& str, + ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Searches for the first occurrence of a character in a substring of a Unicode string. + (Note that this function returns a numeric value, not an error code.) + @param str The string. + @param ch The character to search for. + @param startOffset The 0-based index in \c str at which to start the search. + @return The 0-based character index of the found character, + or \c npos if the character is not found. + */ + AIAPI ai::UnicodeString::size_type (*FindChar) (const ai::UnicodeString& str, + ai::UnicodeString::UTF32TextChar ch, + ai::UnicodeString::size_type startOffset); + + /** Searches for the first occurrence of an entire string within a substring of a Unicode string. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @return The 0-based character index of the found string, + or \c npos if the string is not found. + */ + AIAPI ai::UnicodeString::size_type (*FindString) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset); + + /** Searches for the first occurrence of a substring of one Unicode string within + a substring of another Unicode string. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @param count The maximum number of characters within \c str2 to search for. + @return The 0-based character index of the found string, + or \c npos if the string is not found. + */ + AIAPI ai::UnicodeString::size_type (*FindSubString) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Searches for the first occurrence of a substring of one Unicode string within + a substring of another Unicode string, performing a caseless comparison. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @param count The maximum number of characters within \c str2 to search for. + @return The 0-based character index of the found string, + or \c npos if the string is not found. + */ + AIAPI ai::UnicodeString::size_type (*CaseFindSubString) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Searches for the last occurrence of a character in a substring of a Unicode string. + (Note that this function returns a numeric value, not an error code.) + @param str The string. + @param ch The character to search for. + @param startOffset The 0-based index in \c str at which to start the search. + @return The 0-based character index of the found character, + or \c npos if the character is not found. + */ + AIAPI ai::UnicodeString::size_type (*RFindChar) (const ai::UnicodeString& str, + ai::UnicodeString::UTF32TextChar ch, + ai::UnicodeString::size_type startOffset); + + /** Searches for the last occurrence of an entire string within a substring of a Unicode string. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @return The 0-based character index of the found string, + or \c npos if the string is not found. + */ + AIAPI ai::UnicodeString::size_type (*RFindString) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset); + + /** Searches for the last occurrence of a substring of one Unicode string within + a substring of another Unicode string. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @param count The maximum number of characters within \c str2 to search for. + @return The 0-based character index of the found string, + or \c npos if the string is not found. + */ + AIAPI ai::UnicodeString::size_type (*RFindSubString) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Searches for the first occurrence of any character from a subset of one + Unicode string in a substring of another string. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @param count The number of characters from the start of \c str2 to compare. + @return The 0-based character index of the found character, + or \c npos if the character is not found. + */ + AIAPI ai::UnicodeString::size_type (*FindFirstOf) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Searches in a Unicode string for the first occurrence of any character that + does not appear in a subset of another string. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @param count The number of characters from the start of \c str2 to compare. + @return The 0-based character index of the found character, + or \c npos if the character is not found. + */ + AIAPI ai::UnicodeString::size_type (*FindFirstNotOf) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Searches in a Unicode string for the last character that also appears in + a substring of another string. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @param count The number of characters from the start of \c str2 to compare. + @return The 0-based character index of the found character, + or \c npos if the character is not found. + */ + AIAPI ai::UnicodeString::size_type (*FindLastOf) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Searches in a Unicode string for the last character that does not appear in + a substring of another string. + (Note that this function returns a numeric value, not an error code.) + @param str The string to search in. + @param str2 The string to compare against. + @param startOffset The 0-based index in \c str at which to start the search. + @param count The number of characters from the start of \c str2 to compare. + @return The 0-based character index of the found character, + or \c npos if the character is not found. + */ + AIAPI ai::UnicodeString::size_type (*FindLastNotOf) (const ai::UnicodeString& str, + const ai::UnicodeString& str2, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count); + + /** Resizes a Unicode string to hold a given number of characters, truncating + or padding it as needed. + @param str The string, which is modified in place. + @param count The number of characters. + @param ch The padding character, if needed. + */ + AIAPI AIErr (*Resize) (ai::UnicodeString& str, ai::UnicodeString::size_type count, ai::UnicodeString::UTF32TextChar ch); + + /** Retrieves number of characters (UTF code points) that this string can hold without reallocation. + This may be the same as or more than \c #Length(). + @param str The string. + @return The number of characters that can be held in this string without reallocation. + */ + AIAPI ai::UnicodeString::size_type (*Capacity) (const ai::UnicodeString& str); + + /** Request to change the capacity of this string to accommodate at least the specified number of characters. + If new capacity is greater than the current \c #Capacity(), new storage is allocated, and \c #Capacity() + is made equal or greater than new capacity. + If new capacity is less than or equal to the current \c #Capacity(), there is no effect. + (Note that this function does not return an error code.) + @param str The string, which is modified in place. + @param count The new desired capacity of this string in number of characters. + */ + AIAPI void (*Reserve) (ai::UnicodeString& str, ai::UnicodeString::size_type count); + + /** Creates a substring of a Unicode string. + @param subString [in, out] A Unicode string in which to return the substring. + If it is uninitialized on input, it is initialized only if the source + string is initialized and not empty. + @param str The source string. + @param offset The 0-based index in \c str at which to start the substring. + @param count The maximum number of characters to place in the new substring. + */ + AIAPI AIErr (*SubStr) (ai::UnicodeString& subString, + const ai::UnicodeString& str, + ai::UnicodeString::size_type offset, ai::UnicodeString::size_type count); + + /** Swaps the contents of two Unicode strings. + @param str The first string. + @param str2 The second string. + */ + AIAPI AIErr (*SwapStr) (ai::UnicodeString& str, ai::UnicodeString& str2); + + /* non-std::string based functionality */ + + //AIAPI int CaseCompare(const ai::UnicodeString& str, + // ai::UnicodeString::size_type pos, ai::UnicodeString::size_type num, + // const ai::UnicodeString& str2, + // ai::UnicodeString::size_type startOffset, + // ai::UnicodeString::size_type count); + //AIAPI void FoldCase(ai::UnicodeString& str); + + /** Reports whether a Unicode string contains surrogate pairs. + (Note that this function returns a boolean value, not an error code.) + @param str The string. + @return True if it contains at least one surrogate pair. + */ + AIAPI AIBool8 (*HasSurrogates) (const ai::UnicodeString& str); + + /** Retrieves a read-only pointer to a buffer that contains UTF-16 encoded + characters in platform byte order, for a given Unicode string. + (Note that this function returns a numeric value, not an error code.) + @param str The string. + @param buffer [out] The pointer to the buffer. Can be 0 if the string is + empty or uninitialized. Might not be 0 terminated. + @return The length of the buffer in UTF-16 code units. + */ + AIAPI ai::UnicodeString::size_type (*UTF_16) (const ai::UnicodeString& str, + const ai::UnicodeString::UTF16Char*& buffer); + + /** Retrieves the contents of a Unicode string in a given encoding. + @param str The string. + @param encoding The encoding. + @param buffer [out] A buffer in which to return the encoded + contents. Need not be initialized prior to the call. + @param bufferByteCount [out] A buffer in which to return the number of bytes + in the buffer that contain the requested data. The buffer can be + larger than this. + */ + AIAPI AIErr (*GetAs) (const ai::UnicodeString& str, AICharacterEncoding encoding, + ai::AutoBuffer& buffer, ai::UnicodeString::size_type& bufferByteCount); + + /** Initializes a Unicode string from a ZString. (ZStrings are used internally + for localization.) + @param str The string. + @param zStringKey The ZString key. + */ + AIAPI AIErr (*InitializeZString) (ai::UnicodeString& str, ZRef zStringKey); + + /** Normalizes a Unicode string. + @param str The string. + @param form The normalization format. + */ + AIAPI AIErr (*Normalize) (ai::UnicodeString& str, ai::UnicodeString::NormalizedForm form); + + +}; + +#include "AIHeaderEnd.h" + +#endif // __AIUnicodeString__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUser.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUser.h index 0038aa1..45572ef 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUser.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIUser.h @@ -1,816 +1,930 @@ -#ifndef __AIUser__ -#define __AIUser__ - -/* - * Name: AIUser.h - * $Revision: 15 $ - * Author: - * Date: - * Purpose: Adobe Illustrator User Utilities Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2016 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIMenu__ -#include "AIMenu.h" -#endif - -#ifndef __AIFileFormat__ -#include "AIFileFormat.h" -#endif - -#ifndef __AIDocumentView__ -#include "AIDocumentView.h" -#endif - -#include "IAIFilePath.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIUser.h */ - - -/************************************************************************s******* - ** - ** Constants - ** - **/ - -// v.14.0 -#define kAIUserSuite "AI User Suite" -#define kAIUserSuiteVersion13 AIAPI_VERSION(13) -#define kAIUserSuiteVersion kAIUserSuiteVersion13 -#define kAIUserVersion kAIUserSuiteVersion - -#if Macintosh || MSWindows -#define kAIMacUserSuite "AI Mac User Suite" -#define kAIMacUserSuiteVersion7 AIAPI_VERSION(7) -#define kAIMacUserSuiteVersion kAIMacUserSuiteVersion7 -#define kAIMacUserVersion kAIMacUserSuiteVersion -#endif - -/** Unit formats for \c #AIUserSuite::GetUnitsString().*/ -enum { - /** Short unit format; for example, "in". */ - kShortUnits, - /** Long singular unit format; for example, "inch". */ - kLongSingularUnits, - /** Long plural unit format; for example, "inches". */ - kLongPluralUnits -}; - -/** - Constants for alert button choices. - See \c #AIUserSuite. -**/ -enum AIAnswer { - kAIAnswer_No = 0, - kAIAnswer_Yes, - kAIAnswer_Cancel, - kAIAnswer_Invalid = 0xFFFFFFFF -}; - -/** - Flag values to determine the stage of input for which - a validation callback has been called. - See \c #AIUserSuite::GetInputFromUser() and \c #IsValidInputProc. -**/ -enum AIValidationStage -{ - /** Callback invoked on entry of a single character in the text field. */ - kAIValidationStage_interactive = 0, - /** Callback invoked on dismissal of alert dialog with OK button. */ - kAIValidationStage_onOk = 1 -}; - -/** - Identifiers for predefined cursors. - See \c #AIUserSuite::SetCursor() -**/ -enum AIPredefinedCursor -{ - kAIIBeamCursorID = -1, - kAICrossCursorID = -2, - kAIWaitCursorID = -3, - kAIArrowCursorID = -4 -}; - -/** @ingroup Errors -See \c #AIUserSuite. */ -#define kUnknownUnitsErr '?UNT' - -/** @ingroup Errors - See \c #AIUserSuite::EditInOriginalApp(). */ -#define kApplicationNotFoundErr 'App?' - -/** @ingroup Errors -See \c #AIUserSuite::EditInOriginalApp(). */ -#define kObjectNotLinkedErr '!Lnk' - - -/** Opaque reference to a date-time value. Access with the \c #AIUserSuite. */ -typedef ai::uint32 AIUserDateTime; - -/** Opaque reference to a resource manager handle. See \c #AIUserSuite::CreateCursorResourceMgr().*/ -typedef struct _t_Opaque_AIResourceManagerHandle *AIResourceManagerHandle; - -/** Callback function pointer passed to \c #AIUserSuite::GetInputFromUser(). - Can be called at either of two stages: when the alert dialog OK button is pressed (\c #kAIValidationStage_onOk) - or when a character of text is entered in the text field (\c #kAIValidationStage_interactive). - The function must validate the input string, and return true if the string is valid in the context. - If the string fails validation, return false and set the \c errorStr output parameter to a string - suitable for display in the alert dialog as a tool tip. -*/ -typedef AIBoolean (*IsValidInputProc) (AIValidationStage validationStage, const ai::UnicodeString &input, ai::UnicodeString &errorStr, void *userdata); - -/** Global locale format. Equivalent to the ENGLISH locale. */ -#define kAIUniversalLocaleFormat 0x0000 -/** Local resource locale format. Defined by the locale of the current resource chain. */ -#define kAIResourceLocaleFormat 0x0001 -/** System locale format. Defined by the current system locale. */ -#define kAISystemLocaleFormat 0x0002 - -/** Short date display format. An example of a short date is along the lines of "1/1/2007". The exact form is locale dependent. - See \c #AIUserSuite::GetDateString() */ -#define kAIShortDateFormat 0x0000 -/** Long date display format. An example of a long date is "Tuesday, March 20, 2007". The exact form is locale dependent. - See \c #AIUserSuite::GetDateString() */ -#define kAILongDateFormat 0x0100 -/** Abbreviated date display format. In Windows, equivalent to the short format except in the Japanese locale where it is the long format. - In Mac OS, an abbreviated date is "Tue, Mar 20, 2007". The exact form is locale dependent. - See \c #AIUserSuite::GetDateString() */ -#define kAIAbbrevDateFormat 0x0200 -/** Short time display format. An example is "hh:mm". The exact form is locale dependent. - See \c #AIUserSuite::GetTimeString() */ -#define kAIShortTimeFormat 0x0000 -/** Long time display format. An example is "hh:mm:ss". the exact form is locale dependent. - See \c #AIUserSuite::GetTimeString() */ -#define kAILongTimeFormat 0x0100 - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Information about the kinds of names allowed for a named entity (such as - layers, swatches, and styles). Used to generate a legal name, using - \c #AIUserSuite::NextName() and AIUserSuite::CopyOfName(). - - The following pseudocode indicates how you can create your own AutoNameGenerator class by publicly inheriting AIAutoNameGenerator - and following the implementation guidelines. - -@code - class AutoNameGenerator : public AIAutoNameGenerator { - public: - // Constructor for a name generator. Its supplied with the pluginref in - // case the name generator needs to look in the plugin's resources e.g for - // the default name. The next new name index is supplied since the plugin - // probably needs to store this in its globals so that it can be preserved - // across unload and reload. - AutoNameGenerator (SPPluginRef pluginref, int nextNameIndex) - { - // fill in fDefaultName - GetDefaultName(pluginref); - - // initialize the base members - // note kMaxCollectionStringLength accounts for null terminator and maximumLength does not - maximumLength = kMaxCollectionStringLength-1; - uniqueNames = true; - baseName = fDefaultName; - nextNewNameIndex = nextNameIndex; - HasName = sHasName; - } - - private: - void GetDefaultName (SPPluginRef pluginref) - { - // Somehow initialize fDefaultName with the default name for the - // collection. The pluginref is probably needed in order to look - // up the name in the plugin resources. - } - - AIErr hasName (const ai::UnicodeString &name, AIBoolean &hasit) - { - // Code to answer the question. When comparing 'name' against - // names of objects in the collection it's important to use the - // AIUserSuite::SameName() API. The name generation process does - // not use a simple string comparison. - } - - static AIAPI AIErr sHasName (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit) - { - return static_cast(self).hasName(name, hasit); - } - - ai::UnicodeString fDefaultName; - }; -@endcode -*/ -struct AIAutoNameGenerator -{ - - /** The maximum length for names in the collection, a number of - \c ASUnicode elements. Excludes the null terminator. */ - ai::int32 maximumLength; - - /** True if names in the collection must be unique. */ - AIBoolean uniqueNames; - - /** A base for generating names, a Unicode-encoded string. */ - ai::UnicodeString baseName; - - /** The index to use for the next new name generated. Name generation - functions automatically increment the index. */ - ai::int32 nextNewNameIndex; - - /** A callback function to determine whether a given name is already in - the set. Use \c #AIUserSuite::SameName() to compare names, not simple - string equality. - @param self This structure. - @param name The name to test. - @param hasit [out] An AIBoolean reference in which to return true if the name is - already in the collection. - @return An error to abort name generation; the error code - is returned to the caller. - */ - AIAPI AIErr (*HasName) (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit); -}; - - - - -/** These functions manage a collection of file type specifiers - for dialog functions in \c #AIUserSuite, which show drop-down - lists for each file type. */ -struct AIFileDialogFilters -{ - /** Adds a file-type filter with default pattern (*.*) - (Note that this function does not return an error code.) - @param desc Description of file type. - */ - void AddFilter(const ai::UnicodeString &desc); - - - /** Adds a file-type filter with a \c UnicodeString pattern. - (Note that this function does not return an error code.) - @param desc Description of file type. - @param pattern One or more Windows wildcard patterns to filter - for the file type, separated with semicolons (;). - For example, Addfilter("JPEG Files", "*.jpg;*.jpeg"); - */ - void AddFilter(const ai::UnicodeString &desc, const ai::UnicodeString &pattern); - - /** Retrieves a single string containing type descriptions and patterns. - (Note that this function returns a string value, not an error code.) - @return A string containing a series of null-delimited descriptions - and patterns, terminated by a double-null. For example: - "first description\0first pattern\0...last description\0last pattern\0\0" - */ - const ai::UnicodeString &GetFilter() const; - -private: - ai::UnicodeString filterStr; -}; - -/** -A structure that describes how the result should be returned by \c #AIUserSuite::EvaluateExpression(). -*/ -struct AIExpressionOptions -{ - /** The units in which the output value is expressed, one of the distance-measuring - units from \c #AITypes::AIUnits, or the constant \c #kAINoUnits to indicate an - absolute value. Other values cause parameter errors. - */ - ai::uint32 unit; - - /** The minimum value to which the result is clipped, expressed in the specified units. */ - AIDouble minValue; - - /** The maximum value to which the result is clipped, expressed in the specified units.*/ - AIDouble maxValue; - - /** The previous value of control. Can be any valid value. In case of erroneous or unallowed inStringVal, - finalValue would be same as old value */ - AIDouble oldValue; - - /** The number of digits after the decimal in the result. */ - ai::uint32 precision; - -}; - -/** @ingroup Suites - This suite provides utility functions for working with Illustrator, - including unit conversion utilities and a progress bar. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUserSuite and \c #kAIUserSuiteVersion. - */ -struct AIUserSuite { - - /** Reports whether a user has canceled the current operation. - (Note that this function returns a boolean value, not an error code.) - @return True if the user has canceled an operation - by pressing Command-dot or clicking Cancel or Stop in the - progress bar. - */ - AIAPI AIBoolean (*Cancel) ( void ); - - /** Updates the progress bar. - (Note that this function does not return an error code.) - @param current A number between 0 and \c max that represents - how far the operation has progressed. - @param max The maximum value, representing 100% progress. - */ - AIAPI void (*UpdateProgress) ( ai::int32 current, ai::int32 max ); - - /** Sets the text message displayed in the progress bar. If not provided, - the text line is blank. - (Note that this function does not return an error code.) - @param text The text message. - */ - AIAPI void (*SetProgressText) ( const ai::UnicodeString& text ); - - /** Explicitly close the progress bar if one is currently shown. - (Note that this function does not return an error code.) - */ - AIAPI void (*CloseProgress) ( void ); - - /** Converts a number of document points to a Unicode string, using - the period as a decimal separator. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI void (*AIRealToString) ( AIReal value, short precision, ai::UnicodeString& string ); - - /** Converts a Unicode string containing a number to an \c #AIReal value, - using the period as a decimal separator. - (Note that this function does not return an error code.) - @param string The string to convert. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - /** Converts a number of document points to a Unicode string, using the localized - international utilities (IU) decimal separator. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI void (*IUAIRealToString) ( AIReal value, short precision, ai::UnicodeString& string ); - - /** Converts a Unicode string containing a number to an \c #AIReal value, - using the localized international utilities (IU) decimal separator. - (Note that this function does not return an error code.) - @param string The string to convert. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Converts a number of document points to a formatted Unicode string containing - a number and ruler units, using the localized international utilities (IU) - decimal separator, and the passed preference for precision. If passed precision value is -1 - then user preference for precision is used. - Uses the currently set ruler units, which can be inches, points, or centimeters. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. Pass -1 if user preference for precision should be used. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, ai::int32 precision, ai::UnicodeString& string ); - - /** Converts a formatted Unicode string containing a number expressed in ruler units - to an \c #AIReal value in points. The current ruler units for the artwork - are used as the original units to scale the result, and the user's - preferences for precision are applied. - (Note that this function does not return an error code.) - @param string The string to convert, which uses the localized international utilities (IU) - decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm". - If no unit specifier is included, uses the current ruler units. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Retrieves a string representing the current ruler units. - @param format The format for the result, one of: -
\c #kShortUnits -
\c #kLongSingularUnits -
\c #kLongPluralUnits -
If, for instance, the current unit is inches, the returned string - would be "in", "inch", or "inches". - @param string [out] A buffer in which to return the units string, at least 20 characters. - */ - AIAPI AIErr (*GetUnitsString) ( short format, ai::UnicodeString& string ); - - /** Retrieves the base name of a global object, stripping off any additional - token that was added to make the name unique (by a function such as - \c #AICustomColorSuite::NewCustomColorName(), for example). - @param name [in, out] A string in which to pass a unique name and - return the base name. The string is modified in place. - */ - AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name ); - - /** Opens the appropriate application to edit a placed or raster object. - This is equivalent to an option-double-click on the object with the selection tool. - @param art The placed or raster art object. - @return \c #kApplicationNotFoundErr error if the application is not found. -
\c #kObjectNotLinkedErr error if the object is not a placed or raster object. - */ - AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art ); - - /** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state. Can be useful if - you have code that has its own message processing. */ - AIAPI AIErr (*AppIdle) ( void ); - - /** Builds a directory menu. Available only in Mac OS. Builds a menu consisting of the specified path as well as all parent directories of that path. - @param menu The platform-specific menu object. - @param fileSpec The file object for the directory. - */ - AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec); - - /** Retrieves a directory. Available only in Mac OS. Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu. - @param fileSpec The file object for the directory. - @param index The 0-based index of the directory. - */ - AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, ai::int32 index); - - /** Reveals a file in the Finder. Available only in Mac OS. - @param fileSpec The file object for the file. - */ - AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec); - - /** Disables (dims) the cancel or stop button in the progress bar. - (Note that this function does not return an error code.) - */ - AIAPI void (*DisableProgressCancel) ( void ); - - /** Reports whether it is safe to allocate memory. Call when a timer - or other asynchronous event triggers an action that allocates memory. - Not needed when handling notifications or user events; the plug-in does not receive - these when it is not ok to allocate memory. - (Note that this function returns a boolean value, not an error code.) - @param True if it is safe to allocate memory. False if it is not safe; in this case, - reschedule the action and try again later. - */ - AIAPI AIBoolean (*OKToAllocateMemory) ( void ); - - // New for AI 11 - /** Retrieves the current date and time. - @param outValue [out] A buffer in which to return the current date-time value. - */ - AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue); - - /* Formats a date into a Unicode string. - @param inValue The date to format, or \c NULL to format the current date-time value. - @param formatFlag The format to use, one of: -
\c #kAIShortDateFormat -
\c #kAILongDateFormat -
\c #kAIAbbrevDateFormat - @param dateStringUS [out] A buffer in which to return the formatted date string. - */ - AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS); - - /* Formats a time into a Unicode string. - @param inValue The time to format, or \c NULL to format the current date-time value. - @param formatFlag The format to use, one of: -
\c #kAIShortTimeFormat -
\c #kAILongTimeFormat - @param dateStringUS [out] A buffer in which to return the formatted time string. - */ - AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS); - - /** Retrieves the year value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year); - - /** Retrieves the month value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month); - - /** Retrieves the day value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day); - - /** Retrieves the hour value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour); - - /** Retrieves the minute value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute); - - /** Retrieves the second value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second); - - /** Retrieves the day-of-week value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek); - - /** Launches an application, and optionally opens the current document in it. - @param spFileSpec The file specification for the application's executable. - @param openDoc True to open the current document in the new application. - */ - AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc); - - /** Generates an appropriate name for a named object, such as - a layer, swatch, or style, according to the naming rules for that - collection. - @param set The naming rules. - @param name [out] An ai::UnicodeString in which to return the generated name. - */ - AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name); - - /** Generates an appropriate name for a copy of a named object, such as - a layer, swatch, or style, according to the naming rules for that - collection. - @param set The naming rules. - @param original Original name to copy (may be an empty string). - @param copy [out] An ai::UnicodeString in which to return the generated name. - */ - AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString ©); - - /** Tests for equality of names within a collection of named objects. - Use in the \c #AIAutoNameGenerator::HasName() callback function - to test whether an automatically generated name matches a name - already in the collection. - @param name1 The first name. - @param name2 The second name. - @param same [out] An AIBoolean reference in which to return true if the names - are the same. - */ - AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same); - - - /** Opens a platform-specific dialog for saving a file. - @param title Dialog title. - @param AIFileDialogFilters File types to save. Can be \c NULL. - @param defaultName Default file name to appear in dialog. Can be \c NULL. - @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and - return the full path of the file chosen by the user. - */ - AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath); - - /** Opens a platform-specific dialog for opening a file. - @param title Dialog title. - @param AIFileDialogFilters File types to open. Can be \c NULL. - @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and - return the full path of the file chosen by the user. - */ - AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath); - - /** Opens a platform-specific dialog for choosing a folder. - @param title Dialog title. - @param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and - return the full path of the folder chosen by the user. - */ - AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath); - - /** Displays an alert dialog with a warning icon and OK and Cancel buttons. - @param msg The message to display. - @param defaultOk True to make the OK button the default, false to make Cancel the default. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return True if the dialog was dismissed with the OK button, - false if it was canceled. - */ - AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey); - - /** Displays an alert dialog with a warning icon and an OK button. - @param msg The message to display. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return Nothing. It does not return AIErr - */ - AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey); - - /** Displays an modal alert dialog with a warning icon and an OK button which doesnot get dismissed on ESC key. - @param msg The message to display. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return Nothing. It does not return AIErr - */ - AIAPI void (*MessageAlertEx) (const ai::UnicodeString& msg, const char* dontShowKey); - - /** Displays a predefined dialog with a yes/no question. - The dialog displays text specified with a unicodeString, and - buttons with default labels Yes, No, and Cancel. - @param msg The text string. - @return The \c #AIAnswer constant for the button pressed to dismiss the dialog, - or \c #kAIAnswer_Invalid in case of error. - @see \c #ErrorAlert(), \c #MessageAlert(), \c #YesNoAlert() - */ - AIAPI AIAnswer (*QuestionAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog with a yes/no question. - The dialog displays text specified with a unicodeString, and - buttons with default labels Yes and No. - @param msg The text string. - @return The \c #AIAnswer constant for the button pressed to dismiss the dialog, - or \c #kAIAnswer_Invalid in case of error. - @see \c #ErrorAlert(), \c #MessageAlert(), \c #QuestionAlert() - */ - AIAPI AIAnswer (*YesNoAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog that informs the user that an error occurred. - The dialog displays text specified with a unicodeString, with the platform-specific - error icon at the left, and an OK button. - @param msg The text string. - @return Nothing.It doesnot return an AIErr - @see \c #MessageAlert(), \c #QuestionAlert(), \c #YesNoAlert() - */ - AIAPI void (*ErrorAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog with an informational message. - The dialog displays text specified with a unicodeString, with the - platform-specific message icon at the left, and an OK button. - @param msg The text string. - @return Nothing.It doesnot return an AIErr - @see \c #ErrorAlert(), \c #QuestionAlert(), \c #YesNoAlert() - */ - AIAPI void (*MessageAlert)(const ai::UnicodeString &msg); - - /** Invokes the platform-specific color picker dialog. - @param inLocation[int] The position of the dialog. (-1, -1) centers the dialog on the screen. - @param inColor[in] The initially selected color value. - @param outColor [out] A buffer in which to return the selected color. - @return True if the user selected a color, false otherwise. - */ - AIAPI AIBoolean (*ChooseFromOSColorPicker) (const AIPoint &inLocation, - const AIRGBColor& inColor, AIRGBColor* outColor); - - /** Evaluates a numeric expression to create a formatted string suitable for display. - Call, for example, when a numeric edit control loses focus or the user presses "=". - If the result of evaluation is not a valid numeric value as per options specified, it is recommended that - the associated control display the last known-good value, or a blank string - accompanied by a beep or other error indicator. - - @param expr [in] The expression to be evaluated (typically entered by the user - in the control). - @param options [in] An \c #AIExpressionOptions structure that determines how - a numeric result is obtained. Specifies the units for the - result, a range to which the result is clipped, and the precision. - @param evaluatedExpr [out] A buffer in which to return the formatted display string. - @param isChanged [out] A buffer in which to return true if the result of evaluation - is different from result of user input. Example in case of non numeric input or out of bounds input. - @param numericValue [out] A buffer in which to return the numeric value, according to the specified options. - */ - AIAPI AIErr (*EvaluateExpression)(const ai::UnicodeString& expr, const AIExpressionOptions& options, ai::UnicodeString& evaluatedExpr, - AIBoolean & isChanged , AIDouble& numericValue); - - /** Invokes a modal dialog in which the user must input text. The dialog cannot be dismissed - until text is entered. If default text is provided, however, the user can dismiss the - dialog without changing that text. - - @param title The title for the dialog - @param messageText A text message to display above the input field, or NULL to display no message. - @param label The label for the text field. - @param ioName [in/out] On input, a default string for the text field. This is replaced by text that - the user enters, if any. - @param IsValidInputProc A function pointer to a validation callback that validates the input as typed by the user. - The first parameter to this call is a \c #AIValidationStage constant that reports whether the call is - made upon text entry, or upon dismissal of the dialog. - @param userdata Developer-defined user data to be passed to the validation callback. - @param maxInputChars The maximum number of characters that user can enter in the text field. - */ - AIAPI AIErr (*GetInputFromUser) ( const ai::UnicodeString &title, const ai::UnicodeString* messageText, const ai::UnicodeString &label, ai::UnicodeString& ioField, IsValidInputProc validator, void *userdata, ai::int32 maxInputChars); - - /** Creates a singleton resource manager instance to be used for cursors. - Call once for a plugin, after startup is completed. Destroy the instance on - application shutdown (not plug-in shutdown). - @param inRscMgr [out] A buffer in which to return the resource-manager handle. - @see DisposeCursorResourceMgr() - */ - AIAPI AIErr (*CreateCursorResourceMgr)(SPPluginRef, AIResourceManagerHandle* inRscMgr); - - /** Sets the image to be used for the plug-in's cursor. - @param cursorID The resource ID of the cursor, or a \c #AIPredefinedCursor - constant value to use one of the predefined cursors. Cursor images must be - in PNG format. - @param inRscMgr The resource manager, as returned by \c #CreateCursorResourceMgr(). - */ - AIAPI AIErr (*SetCursor)(ai::int32 cursorID, AIResourceManagerHandle inRscMgr); - - /** Disposes of the plug-in's singleton resource manager. Call once when - \c #kAIApplicationShutdownNotifier is received. Do not call as part of plug-in shutdown. - @param The resource manager handle, as returned on creation. - */ - AIAPI AIErr (*DisposeCursorResourceMgr)(AIResourceManagerHandle); - - /** Reports the current language in use. - @param lang [out] A buffer in which to return the language code. - */ - AIAPI AIErr (*GetAILanguageCode)(ai::UnicodeString& lang); - - /** Reports the maximum scale factor for all the screens in a Mac OS system, - or the application's UI scale factor in a Windows system. - @return The scale factor. - */ - - AIAPI AIReal (*GetMaximumScaleFactorOnSystem)(); - - - /** Reports the ratio of Art Scale factor and View Scale Factor. - (ArtScaleFactor/ ViewScaleFactor) - */ - AIAPI AIReal(*GetArtToViewScaleFactor)(AIDocumentViewHandle view); - - - /** Launches a folder. - @param folderPath Path of the folder to launch. - @return \c #kBadParameterErr if the path object is invalid or references a file rather than a folder. - */ - AIAPI AIErr(*LaunchFolder)(ai::FilePath folderPath); - -}; - - - -/* - Inline members -*/ - inline void AIFileDialogFilters::AddFilter(const ai::UnicodeString &desc) - { - AddFilter(desc, ai::UnicodeString("*")); - } - - inline void AIFileDialogFilters::AddFilter(const ai::UnicodeString &desc, const ai::UnicodeString &pattern) - { - if (!desc.empty() && !pattern.empty()) - { - const ai::UnicodeString::size_type len = filterStr.length(); - if (len) - filterStr.erase(len-1); // erase one null of the previous double null terminators - filterStr.append(desc); - filterStr.append(1, 0); - filterStr.append(pattern); - filterStr.append(2, 0); - } - } - - inline const ai::UnicodeString &AIFileDialogFilters::GetFilter() const - { - return filterStr; - } - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIUser__ +#define __AIUser__ + +/* + * Name: AIUser.h + * $Revision: 15 $ + * Author: + * Date: + * Purpose: Adobe Illustrator User Utilities Suite. + * + * ADOBE INCORPORATED + * Copyright 2019 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AIArt__ +#include "AIArt.h" +#endif + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIColor__ +#include "AIColor.h" +#endif + +#ifndef __AIMenu__ +#include "AIMenu.h" +#endif + +#ifndef __AIFileFormat__ +#include "AIFileFormat.h" +#endif + +#ifndef __AIDocumentView__ +#include "AIDocumentView.h" +#endif + +#include "IAIFilePath.hpp" +#include "IAILocale.h" + +#include "AIHeaderBegin.h" + +/** @file AIUser.h */ + + +/************************************************************************s******* + ** + ** Constants + ** + **/ + +#define kAIUserSuite "AI User Suite" +#define kAIUserSuiteVersion20 AIAPI_VERSION(20) +#define kAIUserSuiteVersion kAIUserSuiteVersion20 +#define kAIUserVersion kAIUserSuiteVersion + + +/** Unit formats for \c #AIUserSuite::GetUnitsString().*/ +enum { + /** Short unit format; for example, "in". */ + kShortUnits, + /** Long singular unit format; for example, "inch". */ + kLongSingularUnits, + /** Long plural unit format; for example, "inches". */ + kLongPluralUnits +}; + +/** + Constants for alert button choices. + See \c #AIUserSuite. +**/ +enum AIAnswer { + kAIAnswer_No = 0, + kAIAnswer_Yes, + kAIAnswer_Cancel, + kAIAnswer_Invalid = 0xFFFFFFFF +}; + +/** + Flag values to determine the stage of input for which + a validation callback has been called. + See \c #AIUserSuite::GetInputFromUser() and \c #IsValidInputProc. +**/ +enum AIValidationStage +{ + /** Callback invoked on entry of a single character in the text field. */ + kAIValidationStage_interactive = 0, + /** Callback invoked on dismissal of alert dialog with OK button. */ + kAIValidationStage_onOk = 1 +}; + +/** + Identifiers for predefined cursors. + See \c #AIUserSuite::SetCursor() +**/ +enum AIPredefinedCursor +{ + kAIIBeamCursorID = -1, + kAICrossCursorID = -2, + kAIWaitCursorID = -3, + kAIArrowCursorID = -4 +}; + +/** @ingroup Errors +See \c #AIUserSuite. */ +#define kUnknownUnitsErr '?UNT' + +/** @ingroup Errors + See \c #AIUserSuite::EditInOriginalApp(). */ +#define kApplicationNotFoundErr 'App?' + +/** @ingroup Errors +See \c #AIUserSuite::EditInOriginalApp(). */ +#define kObjectNotLinkedErr '!Lnk' + + +/** Opaque reference to a date-time value. Access with the \c #AIUserSuite. */ +typedef ai::uint32 AIUserDateTime; + +/** Opaque reference to a resource manager handle. See \c #AIUserSuite::CreateCursorResourceMgr().*/ +typedef struct _t_Opaque_AIResourceManagerHandle *AIResourceManagerHandle; + +/** Callback function pointer passed to \c #AIUserSuite::GetInputFromUser(). + Can be called at either of the two stages: when the OK button in the alert dialog box is pressed (\c #kAIValidationStage_onOk) + or when a text character is entered in the text field (\c #kAIValidationStage_interactive). + The function must validate the input string, and return the output as true if the string is valid in the context. + If the string fails validation, return false and set the \c errorStr output parameter to a string + suitable for display in the alert dialog as a tool tip. +*/ +typedef AIBoolean (*IsValidInputProc) (AIValidationStage validationStage, const ai::UnicodeString &input, ai::UnicodeString &errorStr, void *userdata); + +/** Progress Callback function pointer passed to \c #AIUserSuite::SetUpdateProgressCallback(). + This can be used to implement a custom progress handler. + The first parameter of the function is \c current , a number between 0 and \c max that represents + how far the operation has progressed and the second parameter is \c max , the maximum value, + representing 100% progress. + This progress handler must return the output as: + -true to cancel further processing + -false to continue processing +*/ +typedef AIBoolean (*UpdateProgressProc) (ai::int32 current, ai::int32 max); + +/** Global locale format. Equivalent to the ENGLISH locale. */ +#define kAIUniversalLocaleFormat 0x0000 +/** Local resource locale format. Defined by the locale of the current resource chain. */ +#define kAIResourceLocaleFormat 0x0001 +/** System locale format. Defined by the current system locale. */ +#define kAISystemLocaleFormat 0x0002 + +/** Short date display format. An example of a short date is along the lines of "1/1/2007". The exact form is locale dependent. + See \c #AIUserSuite::GetDateString() */ +#define kAIShortDateFormat 0x0000 +/** Long date display format. An example of a long date is "Tuesday, March 20, 2007". The exact form is locale dependent. + See \c #AIUserSuite::GetDateString() */ +#define kAILongDateFormat 0x0100 +/** Abbreviated date display format. In Windows, equivalent to the short format except in Japanese locale, where it is the long format. + In Mac OS, an abbreviated date is "Tue, Mar 20, 2007". The exact form is locale dependent. + See \c #AIUserSuite::GetDateString() */ +#define kAIAbbrevDateFormat 0x0200 +/** Short time display format. An example is "hh:mm". The exact form is locale dependent. + See \c #AIUserSuite::GetTimeString() */ +#define kAIShortTimeFormat 0x0000 +/** Long time display format. An example is "hh:mm:ss". The exact form is locale dependent. + See \c #AIUserSuite::GetTimeString() */ +#define kAILongTimeFormat 0x0100 + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Information about the kind of names allowed for a named entity (such as + layers, swatches, and styles). Used to generate a legal name, using + \c #AIUserSuite::NextName() and AIUserSuite::CopyOfName(). + + The following pseudocode indicates how you can create your own AutoNameGenerator class by publicly inheriting AIAutoNameGenerator + and following the implementation guidelines. + +@code + class AutoNameGenerator : public AIAutoNameGenerator { + public: + // Constructor for a name generator. Its supplied with the pluginref in + // case the name generator needs to look in the plugin's resources e.g for + // the default name. The next new name index is supplied since the plugin + // probably needs to store this in its globals so that it can be preserved + // across unload and reload. + AutoNameGenerator (SPPluginRef pluginref, int nextNameIndex) + { + // fill in fDefaultName + GetDefaultName(pluginref); + + // initialize the base members + // note kMaxCollectionStringLength accounts for null terminator and maximumLength does not + maximumLength = kMaxCollectionStringLength-1; + uniqueNames = true; + baseName = fDefaultName; + nextNewNameIndex = nextNameIndex; + HasName = sHasName; + } + + private: + void GetDefaultName (SPPluginRef pluginref) + { + // Somehow initialize fDefaultName with the default name for the + // collection. The pluginref is probably needed in order to look + // up the name in the plugin resources. + } + + AIErr hasName (const ai::UnicodeString &name, AIBoolean &hasit) + { + // Code to answer the question. When comparing 'name' against + // names of objects in the collection it's important to use the + // AIUserSuite::SameName() API. The name generation process does + // not use a simple string comparison. + } + + static AIAPI AIErr sHasName (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit) + { + return static_cast(self).hasName(name, hasit); + } + + ai::UnicodeString fDefaultName; + }; +@endcode +*/ +struct AIAutoNameGenerator +{ + + /** The maximum length for names in the collection, a number of + \c ASUnicode elements. Excludes the null terminator. */ + ai::int32 maximumLength; + + /** True if names in the collection must be unique. */ + AIBoolean uniqueNames; + + /** A base for generating names, a Unicode-encoded string. */ + ai::UnicodeString baseName; + + /** The index to use for the next new name generated. Name generation + functions automatically increment the index. */ + ai::int32 nextNewNameIndex; + + /** A callback function to determine whether a given name is already in + the set. Use \c #AIUserSuite::SameName() to compare names, not simple + string equality. + @param self This structure. + @param name The name to test. + @param hasit [out] An AIBoolean reference in which to return true if the name is + already in the collection. + @return An error to abort name generation; the error code + is returned to the caller. + */ + AIAPI AIErr (*HasName) (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit); +}; + + + + +/** These functions manage a collection of file type specifiers + for dialog functions in \c #AIUserSuite, which show drop-down + lists for each file type. */ +struct AIFileDialogFilters +{ + /** Adds a file-type filter with default pattern (*.*) + (Note that this function does not return an error code.) + @param desc Description of file type. + */ + void AddFilter(const ai::UnicodeString &desc); + + + /** Adds a file-type filter with a \c UnicodeString pattern. + (Note that this function does not return an error code.) + @param desc Description of file type. + @param pattern One or more Windows wildcard patterns to filter + for the file type, separated with semicolons (;). + For example, Addfilter("JPEG Files", "*.jpg;*.jpeg"); + */ + void AddFilter(const ai::UnicodeString &desc, const ai::UnicodeString &pattern); + + /** Retrieves a single string containing type descriptions and patterns. + (Note that this function returns a string value, not an error code.) + @return A string containing a series of null-delimited descriptions + and patterns, terminated by a double-null. For example: + "first description\0first pattern\0...last description\0last pattern\0\0" + */ + const ai::UnicodeString &GetFilter() const; + +private: + ai::UnicodeString filterStr; +}; + +/** +A structure that describes how the result should be returned by \c #AIUserSuite::EvaluateExpression(). +*/ +struct AIExpressionOptions +{ + /** The units in which the output value is expressed, one of the distance-measuring + units from \c #AITypes::AIUnits, or the constant \c #kAINoUnits to indicate an + absolute value. Other values cause parameter errors. + */ + ai::uint32 unit; + + /** The minimum value to which the result is clipped, expressed in the specified units. */ + AIDouble minValue; + + /** The maximum value to which the result is clipped, expressed in the specified units.*/ + AIDouble maxValue; + + /** The previous value of control. Can be any valid value. In case of erroneous or unallowed inStringVal, + finalValue would be same as old value */ + AIDouble oldValue; + + /** The number of digits after the decimal in the result. */ + ai::uint32 precision; + +}; + +/** @ingroup Suites + This suite provides utility functions for working with Illustrator, + including unit conversion utilities and a progress bar. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIUserSuite and \c #kAIUserSuiteVersion. + */ +struct AIUserSuite { + + /** Reports whether a user has canceled the current operation. + (Note that this function returns a boolean value, not an error code.) + @return True if the user has canceled an operation + by pressing Command-dot or clicking Cancel or Stop in the + progress bar. + */ + AIAPI AIBoolean (*Cancel) ( void ); + + /** Updates the progress bar. + (Note that this function does not return an error code.) + @param current A number between 0 and \c max that represents + how far the operation has progressed. + @param max The maximum value, representing 100% progress. + */ + AIAPI void (*UpdateProgress) ( ai::int32 current, ai::int32 max ); + + /** Registers the progress callbacks. + (Note that this function does not return an error code.) + @param UpdateProgressProc - A function pointer to progress callback. + The first parameter to this call is \c current , a number between 0 and \c max that represents + how far the operation has progressed and the second parameter is \c max , the maximum value, + representing 100% progress. + */ + AIAPI void(*SetUpdateProgressCallback) (UpdateProgressProc func); + + /** Sets the text message displayed in the progress bar. If not provided, + the text line is blank. + (Note that this function does not return an error code.) + @param text The text message. + */ + AIAPI void (*SetProgressText) ( const ai::UnicodeString& text ); + + /** Explicitly close the progress bar if one is currently shown. + (Note that this function does not return an error code.) + */ + AIAPI void (*CloseProgress) ( void ); + + /** Converts a number of document points to a Unicode string, using + the period as a decimal separator. + (Note that this function does not return an error code.) + @param value The value to convert. + @param precision The number of digits to the right of the decimal, + in the range [0..4]. + @param string [out] A buffer in which to return the converted value, at + least 12 characters. + */ + AIAPI void (*AIRealToString) ( AIReal value, ai::int16 precision, ai::UnicodeString& string ); + + /** Converts a Unicode string containing a number to an \c #AIReal value, + using the period as a decimal separator. + (Note that this function does not return an error code.) + @param string The string to convert. + @param value [out] A buffer in which to return the converted value. + If the string is not a number, this is set to \c #kAIRealUnknown. + */ + AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); + /** Converts a number of document points to a Unicode string, using the localized + international utilities (IU) decimal separator. + (Note that this function does not return an error code.) + @param value The value to convert. + @param precision The number of digits to the right of the decimal, + in the range [0..4]. + @param string [out] A buffer in which to return the converted value, at + least 12 characters. + */ + AIAPI void (*IUAIRealToString) ( AIReal value, ai::int16 precision, ai::UnicodeString& string ); + + /** Converts a number of document points to a Unicode string modified according to the scale of the document, using the localized + international utilities (IU) decimal separator. + (Note that this function does not return an error code.) + @param value The value to convert. + @param precision The number of digits to the right of the decimal, + in the range [0..4]. + @param string [out] A buffer in which to return the converted value, at + least 12 characters. + @param Locale unique identifying code like ai::Locale::kSystem. + */ + AIAPI void (*IUAIRealToStringWithLocale) ( AIReal value, ai::int16 precision, ai::UnicodeString& string, const ai::LocaleID locale ); + + /** Converts a number of document points to a Unicode string, using the localized + international utilities (IU) decimal separator. + (Note that this function does not return an error code.) + @param value The value to convert. + @param precision The number of digits to the right of the decimal, + in the range [0..4]. + @param string [out] A buffer in which to return the converted value, at + least 12 characters. + @param Locale unique identifying code like ai::Locale::kSystem. + */ + AIAPI void (*IUAIRealToStringWithLocaleWithoutScale) ( AIReal value, ai::int16 precision, ai::UnicodeString& string, const ai::LocaleID locale ); + + /** Converts a Unicode string containing a number to an \c #AIReal value, + using the localized international utilities (IU) decimal separator. + (Note that this function does not return an error code.) + @param string The string to convert. + @param value [out] A buffer in which to return the converted value. + If the string is not a number, this is set to \c #kAIRealUnknown. + */ + AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); + + /** Converts a number of document points to a formatted Unicode string containing + a number and ruler units modified according to the scale of the document, using the localized international utilities (IU) + decimal separator, and the passed preference for precision. If passed precision value is -1 + then user preference for precision is used. + Uses the currently set ruler units, which can be inches, points, or centimeters. + (Note that this function does not return an error code.) + @param value The value to convert. + @param precision The number of digits to the right of the decimal, + in the range [0..4]. Pass -1 if user preference for precision should be used. + @param string [out] A buffer in which to return the converted value, at + least 12 characters. + */ + AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, ai::int32 precision, ai::UnicodeString& string ); + + /** Converts a number of document points to a formatted Unicode string containing + a number and ruler units, using the localized international utilities (IU) + decimal separator, and the passed preference for precision. If passed precision value is -1 + then user preference for precision is used. + Uses the currently set ruler units, which can be inches, points, or centimeters. + (Note that this function does not return an error code.) + @param value The value to convert. + @param precision The number of digits to the right of the decimal, + in the range [0..4]. Pass -1 if user preference for precision should be used. + @param string [out] A buffer in which to return the converted value, at + least 12 characters. + */ + AIAPI AIErr (*IUAIRealToStringUnitsWithoutScale) ( AIReal value, ai::int32 precision, ai::UnicodeString& string ); + + /** Converts a formatted Unicode string containing a number expressed in ruler units + to an \c #AIReal value in points according to the current scale of the document. The current ruler units for the artwork + are used as the original units to scale the result, and the user's + preferences for precision are applied. + (Note that this function does not return an error code.) + @param string The string to convert, which uses the localized international utilities (IU) + decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm". + If no unit specifier is included, uses the current ruler units. + @param value [out] A buffer in which to return the converted value. + If the string is not a number, this is set to \c #kAIRealUnknown. + */ + AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value ); + + /** Converts a formatted Unicode string containing a number expressed in ruler units + to an \c #AIReal value in points {ignores the scale of the document}. The current ruler units for the artwork + are used as the original units to scale the result, and the user's + preferences for precision are applied. + (Note that this function does not return an error code.) + @param string The string to convert, which uses the localized international utilities (IU) + decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm". + If no unit specifier is included, uses the current ruler units. + @param value [out] A buffer in which to return the converted value. + If the string is not a number, this is set to \c #kAIRealUnknown. + */ + AIAPI void (*IUStringUnitsToAIRealWithoutScale) ( const ai::UnicodeString& string, AIReal *value ); + + /** Retrieves a string representing the current ruler units. + @param format The format for the result, one of: +
\c #kShortUnits +
\c #kLongSingularUnits +
\c #kLongPluralUnits +
If, for instance, the current unit is inches, the returned string + would be "in", "inch", or "inches". + @param string [out] A buffer in which to return the units string, at least 20 characters. + */ + AIAPI AIErr (*GetUnitsString) ( ai::int16 format, ai::UnicodeString& string ); + + /** Retrieves the base name of a global object, stripping off any additional + token that was added to make the name unique (by a function such as + \c #AICustomColorSuite::NewCustomColorName(), for example). + @param name [in, out] A string in which to pass a unique name and + return the base name. The string is modified in place. + */ + AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name ); + + /** Opens the appropriate application to edit a placed or raster object. + This is equivalent to an option-double-click on the object with the selection tool. + @param art The placed or raster art object. + @return \c #kApplicationNotFoundErr error if the application is not found. +
\c #kObjectNotLinkedErr error if the object is not a placed or raster object. + */ + AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art ); + + /** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state. Can be useful if + you have code that has its own message processing. */ + AIAPI AIErr (*AppIdle) ( void ); + + /** Builds a directory menu. Available only in Mac OS. Builds a menu consisting of the specified path as well as all parent directories of that path. + @param menu The platform-specific menu object. + @param fileSpec The file object for the directory. + */ + AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec); + + /** Retrieves a directory. Available only in Mac OS. Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu. + @param fileSpec The file object for the directory. + @param index The 0-based index of the directory. + */ + AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, ai::int32 index); + + /** Reveals a file in the Finder. Available only in Mac OS. + @param fileSpec The file object for the file. + */ + AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec); + + /** Disables (dims) the cancel or stop button in the progress bar. + (Note that this function does not return an error code.) + */ + AIAPI void (*DisableProgressCancel) ( void ); + + /** Reports whether it is safe to allocate memory. Calls when a timer + or other asynchronous event trigger an action that allocates memory. + Not needed when handling notifications or user events; the plug-in does not receive + these when it is not ok to allocate memory. + (Note that this function returns a boolean value, not an error code.) + @param True if it is safe to allocate memory. False if it is not safe; in this case, + reschedule the action and try again later. + */ + AIAPI AIBoolean (*OKToAllocateMemory) ( void ); + + // Introduced in AI 11 + /** Retrieves the current date and time. + @param outValue [out] A buffer in which to return the current date-time value. + */ + AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue); + + /* Formats a date into a Unicode string. + @param inValue The date to format, or \c NULL to format the current date-time value. + @param formatFlag The format to use, one of: +
\c #kAIShortDateFormat +
\c #kAILongDateFormat +
\c #kAIAbbrevDateFormat + @param dateStringUS [out] A buffer in which to return the formatted date string. + */ + AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS); + + /* Formats a time into a Unicode string. + @param inValue The time to format, or \c NULL to format the current date-time value. + @param formatFlag The format to use, one of: +
\c #kAIShortTimeFormat +
\c #kAILongTimeFormat + @param dateStringUS [out] A buffer in which to return the formatted time string. + */ + AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS); + + /** Retrieves the year value from a date-time. + @param inValue The date-time value, or \c NULL to get the current date-time. + @param year [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year); + + /** Retrieves the month value from a date-time. + @param inValue The date-time value, or \c NULL to get the current date-time. + @param year [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month); + + /** Retrieves the day value from a date-time. + @param inValue The date-time value, or \c NULL to get the current date-time. + @param year [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day); + + /** Retrieves the hour value from a date-time. + @param inValue The date-time value, or \c NULL to get the current date-time. + @param year [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour); + + /** Retrieves the minute value from a date-time. + @param inValue The date-time value, or \c NULL to get the current date-time. + @param year [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute); + + /** Retrieves the second value from a date-time. + @param inValue The date-time value, or \c NULL to get the current date-time. + @param year [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second); + + /** Retrieves the day-of-week value from a date-time. + @param inValue The date-time value, or \c NULL to get the current date-time. + @param year [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek); + + /** Launches an application, and optionally opens the current document in it. + @param spFileSpec The file specification for the application's executable. + @param openDoc True to open the current document in the new application. + */ + AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc); + + /** Generates an appropriate name for a named object, such as + a layer, swatch, or style, according to the naming rules for that + collection. + @param set The naming rules. + @param name [out] An ai::UnicodeString in which to return the generated name. + */ + AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name); + + /** Generates an appropriate name for a copy of a named object, such as + a layer, swatch, or style, according to the naming rules for that + collection. + @param set The naming rules. + @param original Original name to copy (may be an empty string). + @param copy [out] An ai::UnicodeString in which to return the generated name. + */ + AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString ©); + + /** Tests for equality of names within a collection of named objects. + Use in the \c #AIAutoNameGenerator::HasName() callback function + to test whether an automatically generated name matches a name + already in the collection. + @param name1 The first name. + @param name2 The second name. + @param same [out] An AIBoolean reference in which to return true if the names + are the same. + */ + AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same); + + + /** Opens a platform-specific dialog for saving a file. + @param title Dialog title. + @param AIFileDialogFilters File types to save. Can be \c NULL. + @param defaultName Default file name to appear in dialog. Can be \c NULL. + @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and + return the full path of the file chosen by the user. + */ + AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath); + + /** Opens a platform-specific dialog for opening a file. + @param title Dialog title. + @param AIFileDialogFilters File types to open. Can be \c NULL. + @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and + return the full path of the file chosen by the user. + */ + AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath); + + /** Opens a platform-specific dialog for choosing a folder. + @param title Dialog title. + @param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and + return the full path of the folder chosen by the user. + */ + AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath); + + /** Displays an alert dialog with a warning icon and OK and Cancel buttons. + @param msg The message to display. + @param defaultOk True to make the OK button the default, false to make Cancel the default. + @param dontShowKey A preference key to use with the "Do not show again" checkbox, + in which to store the user's choice and save it in the application preferences file. + When \c NULL, the dialog does not include the checkbox. + @return True if the dialog was dismissed with the OK button, + false if it was canceled. + */ + AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey); + + /** Displays an alert dialog with a warning icon and an OK button. + @param msg The message to display. + @param dontShowKey A preference key to use with the "Do not show again" checkbox, + in which to store the user's choice and save it in the application preferences file. + When \c NULL, the dialog does not include the checkbox. + @return Nothing. It does not return AIErr + */ + AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey); + + /** Displays an modal alert dialog with a warning icon and an OK button which doesnot get dismissed on ESC key. + @param msg The message to display. + @param dontShowKey A preference key to use with the "Do not show again" checkbox, + in which to store the user's choice and save it in the application preferences file. + When \c NULL, the dialog does not include the checkbox. + @return Nothing. It does not return AIErr + */ + AIAPI void (*MessageAlertEx) (const ai::UnicodeString& msg, const char* dontShowKey); + + /** Displays a predefined dialog with a yes/no question. + The dialog displays text specified with a unicodeString, and + buttons with default labels Yes, No, and Cancel. + @param msg The text string. + @return The \c #AIAnswer constant for the button pressed to dismiss the dialog, + or \c #kAIAnswer_Invalid in case of error. + @see \c #ErrorAlert(), \c #MessageAlert(), \c #YesNoAlert() + */ + AIAPI AIAnswer (*QuestionAlert)(const ai::UnicodeString &msg); + + /** Displays a predefined dialog with a yes/no question. + The dialog displays text specified with a unicodeString, and + buttons with default labels Yes and No. + @param msg The text string. + @return The \c #AIAnswer constant for the button pressed to dismiss the dialog, + or \c #kAIAnswer_Invalid in case of error. + @see \c #ErrorAlert(), \c #MessageAlert(), \c #QuestionAlert() + */ + AIAPI AIAnswer (*YesNoAlert)(const ai::UnicodeString &msg); + + /** Displays a predefined dialog that informs the user that an error occurred. + The dialog displays text specified with a unicodeString, with the platform-specific + error icon at the left, and an OK button. + @param msg The text string. + @return Nothing.It doesnot return an AIErr + @see \c #MessageAlert(), \c #QuestionAlert(), \c #YesNoAlert() + */ + AIAPI void (*ErrorAlert)(const ai::UnicodeString &msg); + + /** Displays a predefined dialog with an informational message. + The dialog displays text specified with a unicodeString, with the + platform-specific message icon at the left, and an OK button. + @param msg The text string. + @return Nothing.It doesnot return an AIErr + @see \c #ErrorAlert(), \c #QuestionAlert(), \c #YesNoAlert() + */ + AIAPI void (*MessageAlert)(const ai::UnicodeString &msg); + + /** Invokes the platform-specific color picker dialog. + @param inLocation[int] The position of the dialog. (-1, -1) centers the dialog on the screen. + @param inColor[in] The initially selected color value. + @param outColor [out] A buffer in which to return the selected color. + @return True if the user selected a color, false otherwise. + */ + AIAPI AIBoolean (*ChooseFromOSColorPicker) (const AIPoint &inLocation, + const AIRGBColor& inColor, AIRGBColor* outColor); + + /** Evaluates a numeric expression to create a formatted string suitable [This had already the document scale of the document applied] for display. + Call, for example, when a numeric edit control loses focus or the user presses "=". + If the result of evaluation is not a valid numeric value as per options specified, it is recommended that + the associated control display the last known-good value, or a blank string + accompanied by a beep or other error indicator. + + @param expr [in] The expression to be evaluated (typically entered by the user + in the control). + @param options [in] An \c #AIExpressionOptions structure that determines how + a numeric result is obtained. Specifies the units for the + result, a range to which the result is clipped, and the precision. + @param evaluatedExpr [out] A buffer in which to return the formatted display string. + @param isChanged [out] A buffer in which to return true if the result of evaluation + is different from result of user input. Example in case of non numeric input or out of bounds input. + @param numericValue [out] A buffer in which to return the numeric value, according to the specified options. + */ + AIAPI AIErr (*EvaluateExpression)(const ai::UnicodeString& expr, const AIExpressionOptions& options, ai::UnicodeString& evaluatedExpr, + AIBoolean & isChanged , AIDouble& numericValue); + + /** Evaluates a numeric expression to create a formatted string suitable for display. + Call, for example, when a numeric edit control loses focus or the user presses "=". + If the result of evaluation is not a valid numeric value as per options specified, it is recommended that + the associated control display the last known-good value, or a blank string + accompanied by a beep or other error indicator. + + @param expr [in] The expression to be evaluated (typically entered by the user + in the control). + @param options [in] An \c #AIExpressionOptions structure that determines how + a numeric result is obtained. Specifies the units for the + result, a range to which the result is clipped, and the precision. + @param evaluatedExpr [out] A buffer in which to return the formatted display string. + @param isChanged [out] A buffer in which to return true if the result of evaluation + is different from result of user input. Example in case of non numeric input or out of bounds input. + @param numericValue [out] A buffer in which to return the numeric value, according to the specified options. + */ + AIAPI AIErr (*EvaluateExpressionWithoutScale)(const ai::UnicodeString& expr, const AIExpressionOptions& options, ai::UnicodeString& evaluatedExpr, + AIBoolean & isChanged , AIDouble& numericValue); + + /** Invokes a modal dialog in which the user must input text. The dialog cannot be dismissed + until text is entered. If default text is provided, however, the user can dismiss the + dialog without changing that text. + + @param title The title for the dialog + @param messageText A text message to display above the input field, or NULL to display no message. + @param label The label for the text field. + @param ioName [in/out] On input, a default string for the text field. This is replaced by text that + the user enters, if any. + @param IsValidInputProc A function pointer to a validation callback that validates the input as typed by the user. + The first parameter to this call is a \c #AIValidationStage constant that reports whether the call is + made upon text entry, or upon dismissal of the dialog. + @param userdata Developer-defined user data to be passed to the validation callback. + @param maxInputChars The maximum number of characters that user can enter in the text field. + */ + AIAPI AIErr (*GetInputFromUser) ( const ai::UnicodeString &title, const ai::UnicodeString* messageText, const ai::UnicodeString &label, ai::UnicodeString& ioField, IsValidInputProc validator, void *userdata, ai::int32 maxInputChars); + + /** Creates a singleton resource manager instance to be used for cursors. + Call once for a plugin, after startup is completed. Destroy the instance on + application shutdown (not plug-in shutdown). + @param inRscMgr [out] A buffer in which to return the resource-manager handle. + @see DisposeCursorResourceMgr() + */ + AIAPI AIErr (*CreateCursorResourceMgr)(SPPluginRef, AIResourceManagerHandle* inRscMgr); + + /** Sets the image to be used for the plug-in's cursor. + @param cursorID The resource ID of the cursor, or a \c #AIPredefinedCursor + constant value to use one of the predefined cursors. Cursor images must be + in PNG format. + @param inRscMgr The resource manager, as returned by \c #CreateCursorResourceMgr(). + */ + AIAPI AIErr (*SetCursor)(ai::int32 cursorID, AIResourceManagerHandle inRscMgr); + + /** Sets the SVG image to be used for the plug-in's cursor. + @param cursorID The resource ID of the cursor. Cursor images must be + in 2x scaled SVG format. + @param inRscMgr The resource manager, as returned by \c #CreateCursorResourceMgr(). + */ + AIAPI AIErr(*SetSVGCursor)(ai::int32 cursorID, AIResourceManagerHandle inRscMgr); + + /** Disposes of the plug-in's singleton resource manager. Call once when + \c #kAIApplicationShutdownNotifier is received. Do not call as part of plug-in shutdown. + @param The resource manager handle, as returned on creation. + */ + AIAPI AIErr (*DisposeCursorResourceMgr)(AIResourceManagerHandle); + + /** Reports the current language in use. + @param lang [out] A buffer in which to return the language code. + */ + AIAPI AIErr (*GetAILanguageCode)(ai::UnicodeString& lang); + + /** Reports the maximum scale factor for all the screens in a Mac OS system, + or the application's UI scale factor in a Windows system. + @return The scale factor. + */ + + AIAPI AIReal (*GetMaximumScaleFactorOnSystem)(); + + + /** Reports the ratio of Art Scale factor and View Scale Factor. + (ArtScaleFactor/ ViewScaleFactor) + */ + AIAPI AIReal(*GetArtToViewScaleFactor)(AIDocumentViewHandle view); + + /** This API returns the actual application scale factor when Illustrator is launched. + If the application scale factor preference for the current OS exceeds the maximum application + scale factor supported by the Illustrator for the current monitor resolution, the application + scale factor is automatically reset to the maximum scale factor. + */ + AIAPI AIReal(*GetAppScaleFactor)(); + + + /** Launches a folder. + @param folderPath Path of the folder to launch. + @return \c #kBadParameterErr if the path object is invalid or references a file rather than a folder. + */ + AIAPI AIErr(*LaunchFolder)(ai::FilePath folderPath); + + /** Opens the appropriate application to edit a placed or raster object. + This is equivalent to right click the object and select the app for opening it. + @param art The placed or raster art object. + @param appPath The App Executable location to be used for opening the art + @return \c #kApplicationNotFoundErr error if the application is not found. +
\c #kObjectNotLinkedErr error if the object is not a placed or raster object. + */ + AIAPI AIErr(*EditInCustomApp) (AIArtHandle art, const ai::FilePath& appPath); + + /** Opens a platform-specific dialog for opening a file. + @param title Dialog title. + @param AIFileDialogFilters File types to open. Can be \c NULL. + @param iFilePath A buffer in which to pass the directory to browse or \c NULL, + @param oFilePaths A buffer in which to return the full paths of the files chosen by the user. + */ + AIAPI AIErr (*GetFileDialogEx)(const ai::UnicodeString &title, const AIFileDialogFilters*,const ai::FilePath& iFilePath, ai::AutoBuffer &oFilePaths); +}; + + + +/* + Inline members +*/ + inline void AIFileDialogFilters::AddFilter(const ai::UnicodeString &desc) + { + AddFilter(desc, ai::UnicodeString("*")); + } + + inline void AIFileDialogFilters::AddFilter(const ai::UnicodeString &desc, const ai::UnicodeString &pattern) + { + if (!desc.empty() && !pattern.empty()) + { + const ai::UnicodeString::size_type len = filterStr.length(); + if (len) + filterStr.erase(len-1); // erase one null of the previous double null terminators + filterStr.append(desc); + filterStr.append(1, 0); + filterStr.append(pattern); + filterStr.append(2, 0); + } + } + + inline const ai::UnicodeString &AIFileDialogFilters::GetFilter() const + { + return filterStr; + } + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIVectorize.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIVectorize.h index 0587ae3..651a9f7 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIVectorize.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIVectorize.h @@ -1,439 +1,443 @@ -#ifndef __AIVectorize__ -#define __AIVectorize__ - -/* - * Name: AIVectorize.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Vectorize Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIRaster__ -#include "AIRaster.h" -#endif - -#ifndef __AIDictionary__ -#include "AIDictionary.h" -#endif - -#ifndef __AIImageOptimization__ -#include "AIImageOptimization.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIVectorize.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIVectorizeSuite "AI Vectorize Suite" -#define kAIVectorizeSuiteVersion AIAPI_VERSION(1) -#define kAIVectorizeVersion kAIVectorizeSuiteVersion - - - - -/** @ingroup Notifiers - Sent after an Update call is made and completed. - Message data contains the Vectorize object being updated. - See \c #AIVectorizeSuite. */ -#define kAIVectorizeUpdateNotifier "AI Vectorize Update Notifier" - - - -/******************************************************************************* - ** - ** Catalog Keys - Presets - ** - **/ - -/** Catalog key for tracing presets. See \c #AIVectorizeSuite. */ -#define kAITracingPresetsCatalogName "Adobe Vectorize Presets" - -/******************************************************************************* - ** - ** Dictionary Keys - Options - ** - **/ - -/** @ingroup DictKeys - Internal. The document dictionary key for the most recently used preset, a string. - If the key is missing or \c NULL, the "Custom" global preset is assumed. */ -#define kTracingGlobalPresetKey "-adobe/vectorize/options/global/preset" -/** @ingroup DictKeys - Key for the main options dictionary for tracing. See \c #AIVectorizeSuite. */ -#define kTracingOptionsKey "adobe/vectorize/options" -/** @ingroup DictKeys - Internal. Key for the old options dictionary for tracing. */ -#define kTracingOptionsOldKey "-adobe/vectorize/options/old" -/** @ingroup DictKeys - Internal. Key for the artwork cache dictionary for tracing. */ -#define kTracingCacheKey "-adobe/vectorize/cache" -/** @ingroup DictKeys - Key for the tracing statistics dictionary. Includes the path count, color count, PPI, and so on. */ -#define kTracingStatisticsKey "adobe/vectorize/statistics" - -// options contents -/** @ingroup DictKeys - Tracing option key for preset . String. */ -#define kTracingPresetKey "adobe/vectorize/preset" - -/** @ingroup DictKeys - Tracing option key for mode. an \c #AITracingMode constant. */ -#define kTracingModeKey "adobe/vectorize/mode" - -/** @ingroup DictKeys - Tracing option key for threshold. Long. */ -#define kTracingThresholdKey "adobe/vectorize/ip/threshold" - -/** @ingroup DictKeys - Tracing option key for grayscale tracing . Integer. */ -#define kTracingGrayscaleKey "adobe/vectorize/ip/grayscale" - -/** @ingroup DictKeys - Tracing option key for path fidelity. Float. */ -#define kTracingPathFidelityKey "adobe/vectorize/ip/PathFidelity" - -/** @ingroup DictKeys - Tracing option key for corner fidelity. Float. */ -#define kTracingCornerFidelityKey "adobe/vectorize/ip/CornerFidelity" - -/** @ingroup DictKeys - Tracing option key for noise fidelity. Integer. */ -#define kTracingNoiseFidelityKey "adobe/vectorize/ip/NoiseFidelity" - -/** @ingroup DictKeys - Tracing option key for path fidelity. Bool. */ -#define kTracingOverlappingOrAbuttingKey "adobe/vectorize/ip/OverlappingOrAbutting" - -/** @ingroup DictKeys - Tracing option key to to decide which color range is currently selected out of the below 2 color ranges i.e. Limited Color Range or Full color range. */ -#define kTracingTypeColorKey "adobe/vectorize/ip/typecolor" - -/** @ingroup DictKeys - Tracing option key for fetching Limited color slider value. Integer */ -#define kTracingLimitedColorsKey "adobe/vectorize/ip/Limitedcolors" -/** @ingroup DictKeys - Tracing option key for fetching Full color slider value. Float*/ -#define kTracingFullColorsFidelityKey "adobe/vectorize/ip/FullcolorsFidelity" - -/** @ingroup DictKeys - Tracing option key for fetching automatic color slider value. Float*/ -#define kTracingAutomaticColorsFidelityKey "adobe/vectorize/ip/AutomaticcolorsFidelity" - -/** @ingroup DictKeys - Tracing option key for palette swatch library name. String*/ -#define kTracingLibraryName "adobe/vectorize/ip/LibraryName" - -/** @ingroup DictKeys - Tracing option key for color group name of palette swatch library. String*/ -#define kTracingColorGroupName "adobe/vectorize/ip/ColorGroupName" - -/** @ingroup DictKeys - Tracing option key for whether to trace fills. Boolean. */ -#define kTracingFillsKey "adobe/vectorize/tracing/fills" - -/** @ingroup DictKeys - Tracing option key for whether to trace strokes. Boolean. */ -#define kTracingStrokesKey "adobe/vectorize/tracing/strokes" - -/** @ingroup DictKeys - Tracing option key for stroke weight. Float. */ -#define kTracingMaxStrokeWeightKey "adobe/vectorize/tracing/maxstrokeweight" - -/** @ingroup DictKeys - Tracing option key for how to visualize vectors. An \c #AITracingVisualizeVectorType constant. */ -#define kTracingVisualizeKey "adobe/vectorize/visualize" - - -/** @ingroup DictKeys - Tracing option key for whether to output "white" background or not. Boolean. New for CS3. */ -#define kTracingIgnoreWhiteKey "adobe/vectorize/output/ignorewhite" - -#define kTracingSnapCurvesToLinesKey "adobe/vectorize/output/snapcurvestolines" - -// cache contents -/** @ingroup DictKeys - Tracing cache key for tracing art. Art object. */ -#define kTracingTracingArtKey "adobe/vectorize/tracing/art" -/** @ingroup DictKeys - Tracing cache key for preprocessed images. Raster art object. */ -#define kTracingPreprocessedImageKey "adobe/vectorize/preprocessed/image" -/** @ingroup DictKeys - Tracing cache key for whether source art has changed - (used to optimize art regeneration). Boolean. */ -#define kTracingSourceArtChangedKey "adobe/vectorize/src/changed" -/** @ingroup DictKeys - Internal. Tracing cache key for scratch group. Group art object. */ -#define kTracingScratchGroupKey "adobe/vectorize/scratch/group" -/** @ingroup DictKeys - Tracing cache key for the adjusted raster transformation matrix. Matrix. */ -#define kTracingAdjustedRasterMatrixKey "adobe/vectorize/raster/matrix" -/** @ingroup DictKeys - Tracing cache key for the adjusted raster checksum. Integer. */ -#define kTracingAdjustedRasterChecksumKey "adobe/vectorize/raster/checksum" - -// statistics contents -/** @ingroup DictKeys - Tracing statistics key for number of paths generated. Long. */ -#define kTracingPathCountKey "adobe/vectorize/statistics/pathcount" -/** @ingroup DictKeys - Tracing statistics key for number of anchors generated. Long. */ -#define kTracingAnchorCountKey "adobe/vectorize/statistics/anchorcount" -/** @ingroup DictKeys - Tracing statistics key for number of colors used. Long. */ -#define kTracingColorCountKey "adobe/vectorize/statistics/colorcount" - - -#define kTracingResampleDefault (false) -/** Internal */ -#define kTracingModeDefault (0) -#define kTracingThresholdDefault (128) -#define kTracingGrayscaleDefault (50) -/** Empty string means Automatic. */ -#define kTracingPresetStringNameDefault ("$$$/Tracing/Str/Options/DefaultPreset00=[Default]") -#define kLibraryNameDefault ("$$$/VectorizePanel/ColorGroupSelection/NoLibrary=NoLib") -#define kColorGroupNameDefault ("$$$/VectorizePanel/ColorGroupSelection/All=All") -#define kTracingLimitedMaxColorsDefault (30) -#define kTracingFullToneMaxFidelityDefault (100.0f) -#define kTracingAutomaticMaxFidelityDefault (100.0f) -#define kTracingColorTypeDefault (0) -#define kTracingColorGroupDefault (0) -#define kTracingFidelityDefault (50) -#define kTracingPathFidelityDefault (50.0) -#define kTracingCornerFidelityDefault (50.0) -#define kTracingNoiseFidelityDefault (50) -#define kTracingFillsDefault (true) -#define kTracingStrokesDefault (false) -#define kTracingDetectShapesDefault (true) -#define kTracingMaxStrokeWeightDefault (10.0f) - -/** Default is \c #kAIVectorizedResult */ -#define kTracingVisualizeVectorDefault (0) -/** Default is \c #kAITracingVisualizeRasterNone */ -#define kTracingIgnoreWhiteDefault (false) -#define kTracingSnapCurvesToLinesDefault (false) - -/** Internal */ -#define kTracingSourceArtChangedDefault (true) - - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a tracing state object, never dereferenced. - Access with \c #AIVectorizeSuite. */ -typedef struct _t_AITracingState *AITracingStateHandle; - -/** Opaque reference to a view options object, never dereferenced. - Access with \c #AIVectorizeSuite. */ -typedef struct _t_AITracingViewOptions *AITracingViewOptionsHandle; - - - -/** Color models to which an image processing code can be reduced, - an \c #AITracingModeValue. */ -typedef ai::int32 AITracingMode; - -enum ColorType -{ - kAIAutomaticTracingColors, - kAILimitedTracingColors, - kAIFullToneTracingColors, -}; - -/** Color models for \c #AITracingMode */ -enum VectorizeModes -{ - /** Color, either RGB or CMYK depending on source image. */ - kAIVectorizeModeColor, - /** Grayscale. */ - kAIVectorizeModeGray, - /** Monochrome bitmap. */ - kAIVectorizeModeBlackAndWhite -}; - -enum OverlappingAbuttingValue -{ - kAIAbutting, - kAIOverlapping, -}; - -typedef ai::int32 AIVectorizeVisualizeType; -/** Vector modes for tracing output in \c #AITracingVisualizeVectorType. */ -enum AIVectorizeVisualizeVectorValue -{ - //The vector output only - kAIVectorizedResult = 0, - //Displays the vectors along with the path outline - kAIVectorizedObjectWithOutline, - //Displays the traced vectors in outline. - kAIVectorizeOutline, - //The vector outline is displayed along with 50% transparent source image. - kAIVectorWithTransparentImage, - //Displays the source image only - kAISourceImage -}; - - - - -/******************************************************************************* - ** - ** Suite Record - ** - **/ - - -/** @ingroup Suites - This suite gives you access to the object model for the \e tracing art type, - a plug-in group containing: - \li A source image. - \li A posterized/preprocessed version of the source image, called the tracing result or result group. - \li The options used for tracing. - \li The internal tracing state kept by the vectorization engine. - \li The view options that determine which elements of the group to display during update. - - A tracing \e preset is a named collection of state information that can be used to recreate - a commonly used tracing configuration. It includes parameters specific to the - various tracing tasks such as color tracing, black and white tracing, high resolution - tracing, low resolution tracing, and so on. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIVectorizeSuite and \c #kAIVectorizeVersion. - */ -typedef struct { - - /** Creates a tracing group whose source art is the specified raster or foreign object art. - Use \c #Update() to create the result group. - @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object for the paint order. - @param art A raster art object or a foreign object. - @param tracing [out] A buffer in which to return the tracing plug-in group - */ - AIAPI AIErr (*CreateTracing) (ai::int16 paintOrder, AIArtHandle prep, AIArtHandle art, AIArtHandle *tracing); - - /** Reports whether an art object is a tracing group. - (Note that this function returns a boolean value, not an error code.) - @param tracing The art object. - @return True if the art is a tracing group. - */ - AIAPI AIBoolean (*IsTracing) (AIArtHandle tracing); - - /** Retrieves the source art of a tracing group. - @param tracing The tracing group object. - @param raster [out] A buffer in which to return the source art, - a raster art object or foreign object. - */ - AIAPI AIErr (*GetSourceImage) (AIArtHandle tracing, AIArtHandle *raster); - - /** Copies the tracing result art of a tracing group into the current document. - @param tracing The tracing group object. - @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object for the paint order. - @param art [out] A buffer in which to return the copied result group. - @param copyAsViewed True to copy the tracing result as viewed; that is, maintaining the - visual appearance of viewing modes currently in effect. False to copy - as if in the Show-No-Image/Show-Tracing-Result mode. - */ - AIAPI AIErr (*CopyTracingArt) (AIArtHandle tracing, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *art, AIBool8 copyAsViewed); - - /** Retrieves the tracing options dictionary of a tracing group. - @param tracing The tracing group object. - @param options [out] A buffer in which to return the options dictionary. - This is a counted object (see \c AICountedObject.h). - Use the \c Ref class to access it. See \c IAIRef.h. - @see \c #kTracingOptionsKey - */ - AIAPI AIErr (*AcquireTracingOptions) (AIArtHandle tracing, AIDictionaryRef *options); - - /** Retrieves the tracing statistics dictionary of a tracing group. This is a read-only dictionary. - @param tracing The tracing group object. - @param options [out] A buffer in which to return the statistics dictionary. - This is a counted object (see \c AICountedObject.h). - Use the \c Ref class to access it. See \c IAIRef.h. - @see \c #kTracingStatisticsKey - */ - AIAPI AIErr (*AcquireTracingStatistics) (AIArtHandle tracing, AIDictionaryRef *options); - - /** Embeds swatches in the tracing result. Call after changing - the \c #kTracingPaletteKey option value. - @param tracing The tracing group object. - */ - AIAPI AIErr (*EmbedSwatches) (AIArtHandle tracing); - - /** Creates the tracing result from the source art of a tracing group. - Vectorizes the preprocessed image based on the input options. - @param tracing The tracing group object. - */ - AIAPI AIErr (*Update) (AIArtHandle tracing); - - - /** Retrieves the native resolution (if any) of an art object. - @param art The art object, typically a tracing group, raster, or foreign object. - @param dpi [out] A buffer in which to return the native resolution in DPI, - if strictly uniform scaling has been applied to the source art. - or 0 if no native resolution is available. - */ - AIAPI AIErr (*GetNativeResolution) (AIArtHandle art, AIReal *dpi); - - /** Retrieves the effective resolution of a tracing object. - @param art The tracing art object. - @param dpi [out] A buffer in which to return: - \li The resampling DPI if resampling is turned on - \li The effective resolution in DPI if strictly uniform scaling has been applied to the source art. - \li The average of x/y DPI if non-uniform scaling has been applied. - */ - AIAPI AIErr (*GetEffectiveResolution) (AIArtHandle art, AIReal *dpi); - - /** Marks or unmarks a tracing art object as changed. Changed art is reprocessed. - @param tracing The tracing art object. - @param changed True to reprocess the source art, false to mark it as unchanged. - */ - AIAPI AIErr (*SetSourceArtChanged) (AIArtHandle tracing, AIBoolean changed); - -} AIVectorizeSuite; - - - - - - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIVectorize__ +#define __AIVectorize__ + +/* + * Name: AIVectorize.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Vectorize Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIRaster__ +#include "AIRaster.h" +#endif + +#ifndef __AIDictionary__ +#include "AIDictionary.h" +#endif + +#ifndef __AIImageOptimization__ +#include "AIImageOptimization.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIVectorize.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIVectorizeSuite "AI Vectorize Suite" +#define kAIVectorizeSuiteVersion AIAPI_VERSION(1) +#define kAIVectorizeVersion kAIVectorizeSuiteVersion + + + + +/** @ingroup Notifiers + Sent after an Update call is made and completed. + Message data contains the Vectorize object being updated. + See \c #AIVectorizeSuite. */ +#define kAIVectorizeUpdateNotifier "AI Vectorize Update Notifier" + + + +/******************************************************************************* + ** + ** Catalog Keys - Presets + ** + **/ + +/** Catalog key for tracing presets. See \c #AIVectorizeSuite. */ +#define kAITracingPresetsCatalogName "Adobe Vectorize Presets" + +/******************************************************************************* + ** + ** Dictionary Keys - Options + ** + **/ + +/** @ingroup DictKeys + Internal. The document dictionary key for the most recently used preset, a string. + If the key is missing or \c NULL, the "Custom" global preset is assumed. */ +#define kTracingGlobalPresetKey "-adobe/vectorize/options/global/preset" +/** @ingroup DictKeys + Key for the main options dictionary for tracing. See \c #AIVectorizeSuite. */ +#define kTracingOptionsKey "adobe/vectorize/options" +/** @ingroup DictKeys + Internal. Key for the old options dictionary for tracing. */ +#define kTracingOptionsOldKey "-adobe/vectorize/options/old" +/** @ingroup DictKeys + Internal. Key for the artwork cache dictionary for tracing. */ +#define kTracingCacheKey "-adobe/vectorize/cache" +/** @ingroup DictKeys + Key for the tracing statistics dictionary. Includes the path count, color count, PPI, and so on. */ +#define kTracingStatisticsKey "adobe/vectorize/statistics" + +// options contents +/** @ingroup DictKeys + Tracing option key for preset . String. */ +#define kTracingPresetKey "adobe/vectorize/preset" + +/** @ingroup DictKeys + Tracing option key for mode. an \c #AITracingMode constant. */ +#define kTracingModeKey "adobe/vectorize/mode" + +/** @ingroup DictKeys + Tracing option key for threshold. Long. */ +#define kTracingThresholdKey "adobe/vectorize/ip/threshold" + +/** @ingroup DictKeys + Tracing option key for grayscale tracing . Integer. */ +#define kTracingGrayscaleKey "adobe/vectorize/ip/grayscale" + +/** @ingroup DictKeys + Tracing option key for path fidelity. Float. */ +#define kTracingPathFidelityKey "adobe/vectorize/ip/PathFidelity" + +/** @ingroup DictKeys + Tracing option key for corner fidelity. Float. */ +#define kTracingCornerFidelityKey "adobe/vectorize/ip/CornerFidelity" + +/** @ingroup DictKeys + Tracing option key for noise fidelity. Integer. */ +#define kTracingNoiseFidelityKey "adobe/vectorize/ip/NoiseFidelity" + +/** @ingroup DictKeys + Tracing option key for path fidelity. Bool. */ +#define kTracingOverlappingOrAbuttingKey "adobe/vectorize/ip/OverlappingOrAbutting" + +/** @ingroup DictKeys + Tracing option key to to decide which color range is currently selected out of the below 2 color ranges i.e. Limited Color Range or Full color range. */ +#define kTracingTypeColorKey "adobe/vectorize/ip/typecolor" + +/** @ingroup DictKeys + Tracing option key for fetching Limited color slider value. Integer */ +#define kTracingLimitedColorsKey "adobe/vectorize/ip/Limitedcolors" +/** @ingroup DictKeys + Tracing option key for fetching Full color slider value. Float*/ +#define kTracingFullColorsFidelityKey "adobe/vectorize/ip/FullcolorsFidelity" + +/** @ingroup DictKeys + Tracing option key for fetching automatic color slider value. Float*/ +#define kTracingAutomaticColorsFidelityKey "adobe/vectorize/ip/AutomaticcolorsFidelity" + +/** @ingroup DictKeys + Tracing option key for palette swatch library name. String*/ +#define kTracingLibraryName "adobe/vectorize/ip/LibraryName" + +/** @ingroup DictKeys + Tracing option key for palette swatch library path. String*/ +#define kTracingLibraryPath "adobe/vectorize/ip/LibraryPath" + +/** @ingroup DictKeys + Tracing option key for color group name of palette swatch library. String*/ +#define kTracingColorGroupName "adobe/vectorize/ip/ColorGroupName" + +/** @ingroup DictKeys + Tracing option key for whether to trace fills. Boolean. */ +#define kTracingFillsKey "adobe/vectorize/tracing/fills" + +/** @ingroup DictKeys + Tracing option key for whether to trace strokes. Boolean. */ +#define kTracingStrokesKey "adobe/vectorize/tracing/strokes" + +/** @ingroup DictKeys + Tracing option key for stroke weight. Float. */ +#define kTracingMaxStrokeWeightKey "adobe/vectorize/tracing/maxstrokeweight" + +/** @ingroup DictKeys + Tracing option key for how to visualize vectors. An \c #AITracingVisualizeVectorType constant. */ +#define kTracingVisualizeKey "adobe/vectorize/visualize" + + +/** @ingroup DictKeys + Tracing option key for whether to output "white" background or not. Boolean. New for CS3. */ +#define kTracingIgnoreWhiteKey "adobe/vectorize/output/ignorewhite" + +#define kTracingSnapCurvesToLinesKey "adobe/vectorize/output/snapcurvestolines" + +// cache contents +/** @ingroup DictKeys + Tracing cache key for tracing art. Art object. */ +#define kTracingTracingArtKey "adobe/vectorize/tracing/art" +/** @ingroup DictKeys + Tracing cache key for preprocessed images. Raster art object. */ +#define kTracingPreprocessedImageKey "adobe/vectorize/preprocessed/image" +/** @ingroup DictKeys + Tracing cache key for whether source art has changed + (used to optimize art regeneration). Boolean. */ +#define kTracingSourceArtChangedKey "adobe/vectorize/src/changed" +/** @ingroup DictKeys + Internal. Tracing cache key for scratch group. Group art object. */ +#define kTracingScratchGroupKey "adobe/vectorize/scratch/group" +/** @ingroup DictKeys + Tracing cache key for the adjusted raster transformation matrix. Matrix. */ +#define kTracingAdjustedRasterMatrixKey "adobe/vectorize/raster/matrix" +/** @ingroup DictKeys + Tracing cache key for the adjusted raster checksum. Integer. */ +#define kTracingAdjustedRasterChecksumKey "adobe/vectorize/raster/checksum" + +// statistics contents +/** @ingroup DictKeys + Tracing statistics key for number of paths generated. Long. */ +#define kTracingPathCountKey "adobe/vectorize/statistics/pathcount" +/** @ingroup DictKeys + Tracing statistics key for number of anchors generated. Long. */ +#define kTracingAnchorCountKey "adobe/vectorize/statistics/anchorcount" +/** @ingroup DictKeys + Tracing statistics key for number of colors used. Long. */ +#define kTracingColorCountKey "adobe/vectorize/statistics/colorcount" + + +#define kTracingResampleDefault (false) +/** Internal */ +#define kTracingModeDefault (0) +#define kTracingThresholdDefault (128) +#define kTracingGrayscaleDefault (50) +/** Empty string means Automatic. */ +#define kTracingPresetStringNameDefault ("$$$/Tracing/Str/Options/DefaultPreset00=[Default]") +#define kLibraryNameDefault ("$$$/VectorizePanel/ColorGroupSelection/NoLibrary=NoLib") +#define kColorGroupNameDefault ("$$$/VectorizePanel/ColorGroupSelection/All=All") +#define kTracingLimitedMaxColorsDefault (30) +#define kTracingFullToneMaxFidelityDefault (100.0f) +#define kTracingAutomaticMaxFidelityDefault (100.0f) +#define kTracingColorTypeDefault (0) +#define kTracingColorGroupDefault (0) +#define kTracingFidelityDefault (50) +#define kTracingPathFidelityDefault (50.0) +#define kTracingCornerFidelityDefault (50.0) +#define kTracingNoiseFidelityDefault (50) +#define kTracingFillsDefault (true) +#define kTracingStrokesDefault (false) +#define kTracingDetectShapesDefault (true) +#define kTracingMaxStrokeWeightDefault (10.0f) + +/** Default is \c #kAIVectorizedResult */ +#define kTracingVisualizeVectorDefault (0) +/** Default is \c #kAITracingVisualizeRasterNone */ +#define kTracingIgnoreWhiteDefault (false) +#define kTracingSnapCurvesToLinesDefault (false) + +/** Internal */ +#define kTracingSourceArtChangedDefault (true) + +#define kVectorizedObject "Adobe Vectorized Object" + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a tracing state object, never dereferenced. + Access with \c #AIVectorizeSuite. */ +typedef struct _t_AITracingState *AITracingStateHandle; + +/** Opaque reference to a view options object, never dereferenced. + Access with \c #AIVectorizeSuite. */ +typedef struct _t_AITracingViewOptions *AITracingViewOptionsHandle; + + + +/** Color models to which an image processing code can be reduced, + an \c #AITracingModeValue. */ +typedef ai::int32 AITracingMode; + +enum ColorType +{ + kAIAutomaticTracingColors, + kAILimitedTracingColors, + kAIFullToneTracingColors, +}; + +/** Color models for \c #AITracingMode */ +enum VectorizeModes +{ + /** Color, either RGB or CMYK depending on source image. */ + kAIVectorizeModeColor, + /** Grayscale. */ + kAIVectorizeModeGray, + /** Monochrome bitmap. */ + kAIVectorizeModeBlackAndWhite +}; + +enum OverlappingAbuttingValue +{ + kAIAbutting, + kAIOverlapping, +}; + +typedef ai::int32 AIVectorizeVisualizeType; +/** Vector modes for tracing output in \c #AITracingVisualizeVectorType. */ +enum AIVectorizeVisualizeVectorValue +{ + //The vector output only + kAIVectorizedResult = 0, + //Displays the vectors along with the path outline + kAIVectorizedObjectWithOutline, + //Displays the traced vectors in outline. + kAIVectorizeOutline, + //The vector outline is displayed along with 50% transparent source image. + kAIVectorWithTransparentImage, + //Displays the source image only + kAISourceImage +}; + + + + +/******************************************************************************* + ** + ** Suite Record + ** + **/ + + +/** @ingroup Suites + This suite gives you access to the object model for the \e tracing art type, + a plug-in group containing: + \li A source image. + \li A posterized/preprocessed version of the source image, called the tracing result or result group. + \li The options used for tracing. + \li The internal tracing state kept by the vectorization engine. + \li The view options that determine which elements of the group to display during update. + + A tracing \e preset is a named collection of state information that can be used to recreate + a commonly used tracing configuration. It includes parameters specific to the + various tracing tasks such as color tracing, black and white tracing, high resolution + tracing, low resolution tracing, and so on. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIVectorizeSuite and \c #kAIVectorizeVersion. + */ +typedef struct { + + /** Creates a tracing group whose source art is the specified raster or foreign object art. + Use \c #Update() to create the result group. + @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object for the paint order. + @param art A raster art object or a foreign object. + @param tracing [out] A buffer in which to return the tracing plug-in group + */ + AIAPI AIErr (*CreateTracing) (ai::int16 paintOrder, AIArtHandle prep, AIArtHandle art, AIArtHandle *tracing); + + /** Reports whether an art object is a tracing group. + (Note that this function returns a boolean value, not an error code.) + @param tracing The art object. + @return True if the art is a tracing group. + */ + AIAPI AIBoolean (*IsTracing) (AIArtHandle tracing); + + /** Retrieves the source art of a tracing group. + @param tracing The tracing group object. + @param raster [out] A buffer in which to return the source art, + a raster art object or foreign object. + */ + AIAPI AIErr (*GetSourceImage) (AIArtHandle tracing, AIArtHandle *raster); + + /** Copies the tracing result art of a tracing group into the current document. + @param tracing The tracing group object. + @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. + @param prep The prepositional art object for the paint order. + @param art [out] A buffer in which to return the copied result group. + @param copyAsViewed True to copy the tracing result as viewed; that is, maintaining the + visual appearance of viewing modes currently in effect. False to copy + as if in the Show-No-Image/Show-Tracing-Result mode. + */ + AIAPI AIErr (*CopyTracingArt) (AIArtHandle tracing, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *art, AIBool8 copyAsViewed); + + /** Retrieves the tracing options dictionary of a tracing group. + @param tracing The tracing group object. + @param options [out] A buffer in which to return the options dictionary. + This is a counted object (see \c AICountedObject.h). + Use the \c Ref class to access it. See \c IAIRef.h. + @see \c #kTracingOptionsKey + */ + AIAPI AIErr (*AcquireTracingOptions) (AIArtHandle tracing, AIDictionaryRef *options); + + /** Retrieves the tracing statistics dictionary of a tracing group. This is a read-only dictionary. + @param tracing The tracing group object. + @param options [out] A buffer in which to return the statistics dictionary. + This is a counted object (see \c AICountedObject.h). + Use the \c Ref class to access it. See \c IAIRef.h. + @see \c #kTracingStatisticsKey + */ + AIAPI AIErr (*AcquireTracingStatistics) (AIArtHandle tracing, AIDictionaryRef *options); + + /** Embeds swatches in the tracing result. Call after changing + the \c #kTracingPaletteKey option value. + @param tracing The tracing group object. + */ + AIAPI AIErr (*EmbedSwatches) (AIArtHandle tracing); + + /** Creates the tracing result from the source art of a tracing group. + Vectorizes the preprocessed image based on the input options. + @param tracing The tracing group object. + */ + AIAPI AIErr (*Update) (AIArtHandle tracing); + + + /** Retrieves the native resolution (if any) of an art object. + @param art The art object, typically a tracing group, raster, or foreign object. + @param dpi [out] A buffer in which to return the native resolution in DPI, + if strictly uniform scaling has been applied to the source art. + or 0 if no native resolution is available. + */ + AIAPI AIErr (*GetNativeResolution) (AIArtHandle art, AIReal *dpi); + + /** Retrieves the effective resolution of a tracing object. + @param art The tracing art object. + @param dpi [out] A buffer in which to return: + \li The resampling DPI if resampling is turned on + \li The effective resolution in DPI if strictly uniform scaling has been applied to the source art. + \li The average of x/y DPI if non-uniform scaling has been applied. + */ + AIAPI AIErr (*GetEffectiveResolution) (AIArtHandle art, AIReal *dpi); + + /** Marks or unmarks a tracing art object as changed. Changed art is reprocessed. + @param tracing The tracing art object. + @param changed True to reprocess the source art, false to mark it as unchanged. + */ + AIAPI AIErr (*SetSourceArtChanged) (AIArtHandle tracing, AIBoolean changed); + +} AIVectorizeSuite; + + + + + + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWinDef.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWinDef.h index e1541a9..6f34723 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWinDef.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWinDef.h @@ -1,37 +1,37 @@ -#ifndef __AIWinDef__ -#define __AIWinDef__ - -/* - * Name: AIWinDef.h - * Date: Started 2010 - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2010 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifdef WIN_ENV - #ifndef _INC_WINDOWS // if windows.h is not included - - // A way to declare handle similar to how Windows does it - #define DECLARE_AI_WINDOWS_HANDLE(name) struct name##__; typedef struct name##__ *name - - // Declare handles that we are interested in - DECLARE_AI_WINDOWS_HANDLE(HDC); - DECLARE_AI_WINDOWS_HANDLE(HINSTANCE); - DECLARE_AI_WINDOWS_HANDLE(HFONT); - DECLARE_AI_WINDOWS_HANDLE(HWND); - - #undef DECLARE_AI_WINDOWS_HANDLE - - #endif // _INC_WINDOWS -#endif // WIN_ENV - -#endif // __AIWinDef__ +#ifndef __AIWinDef__ +#define __AIWinDef__ + +/* + * Name: AIWinDef.h + * Date: Started 2010 + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2010 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifdef WIN_ENV + #ifndef _INC_WINDOWS // if windows.h is not included + + // A way to declare handle similar to how Windows does it + #define DECLARE_AI_WINDOWS_HANDLE(name) struct name##__; typedef struct name##__ *name + + // Declare handles that we are interested in + DECLARE_AI_WINDOWS_HANDLE(HDC); + DECLARE_AI_WINDOWS_HANDLE(HINSTANCE); + DECLARE_AI_WINDOWS_HANDLE(HFONT); + DECLARE_AI_WINDOWS_HANDLE(HWND); + + #undef DECLARE_AI_WINDOWS_HANDLE + + #endif // _INC_WINDOWS +#endif // WIN_ENV + +#endif // __AIWinDef__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWorkspace.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWorkspace.h index bbbd95e..f63e136 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWorkspace.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIWorkspace.h @@ -1,313 +1,317 @@ -#ifndef __AIWorkspace__ -#define __AIWorkspace__ - -/* - * Name: AIWorkspace.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator Workspace Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __SPAccess__ -#include "SPAccess.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AIWorkspace.h */ -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** @ingroup Constants */ -#define kAIWorkspaceSuite "AI Workspace Suite" -#define kAIWorkspaceSuiteVersion3 AIAPI_VERSION(3) -#define kAIWorkspaceSuiteVersion kAIWorkspaceSuiteVersion3 -#define kAIWorkspaceVersion kAIWorkspaceSuiteVersion - -/** Maximum number of bytes in a workspace name, including null terminator. */ -#define kMaxWSStringLength (64) - - -/** @ingroup Callers - Sent to plug-ins from the workspace manager. See \c #AIWorkspaceSuite. */ -#define kAIWorkspaceCaller "Workspace Manager" - -/** @ingroup Selectors - Sent to plug-ins that own tab palettes to request save of - the current dialog's specific configuration (show/hide option, list view). - To save a configuration value for the current workspace, - use the appropriate \c SetValue() function from the \c #AIWorkspaceSuite, - retrieving the workspace object from the message: - - -sAIWorkspace->SetValue(message->workspace, palette_name, description_of_value, value). - - - Each palette's location, visibility, dock code, dock group, and size of the - current workspace are saved by the Workspaces plug-in. -*/ -#define kAIWSWriteSelector "Write Workspace" -/** @ingroup Selectors - Sent to plug-ins that own tab palettes to request restore of - the current dialog's specific configuration. - To retrieve a configuration value from the current workspace, - use the appropriate \c GetValue() function from the \c #AIWorkspaceSuite, - retrieving the workspace object from the message: - - -sAIWorkspace->GetValue(message->workspace, palette_name, description_of_value, &value). - - - Each palette's location, visibility, dock code, dock group, and size of the - current workspace are restored by the Workspaces plug-in. -*/ -#define kAIWSRestoreSelector "Restore Workspace" -/** @ingroup Selectors - Sent to plug-ins that own tab palettes to reset to hard-coded default values - defined in the plug-in and in \c AIPaletteDefaults.h. - You must configure the palette layout to the initial default. - In addition to a palette's specific configuration (show/hide option, list view), - resets the values of a palette's location, visibility, dock code, dock group, and size. -*/ -#define kAIWSDefaultSelector "Default Workspace" - -/** @ingroup Errors - Workspace name is longer than \c #kMaxWSStringLength. - See \c #AIWorkspaceSuite. */ -#define kWorkspaceNameTooLongErr 'WSNL' - -/** Not used */ -enum AIWorkspaceDefaultValue { - kAIWSDefaultPreset = 1, - kAIWSAICSPreset -}; - -/******************************************************************************* - ** - ** Types - ** - **/ -/** Opaque reference to a workspace. Access with \c #AIWorkspaceSuite. */ -typedef struct _AIWorkspace* AIWorkspaceHandle; - -/** Message sent with workspace selectors. See \c #AIWorkspaceSuite. */ -typedef struct { - /** Message data. */ - SPMessageData d; - /** The workspace receiving the message. */ - AIWorkspaceHandle workspace; - /** The name of the tab palette. If you install multiple palettes, compare to the - saved name to determine which one made the request. */ - const char *dialogName; - /** True when \c #kAIWSDefaultSelector message was sent because a palette - was not found in the current workspace, and an exception was raised. Your - handler can restore the palette layout to the default. */ - AIBoolean restore; - /** Not used. */ - AIWorkspaceDefaultValue flag; -} AIWorkspaceMessage; - -/******************************************************************************* - ** - ** Suites - ** - **/ - -/** @ingroup Suites - This suite allows you to access \e workspaces. - A workspace is an object in which to store the screen layout of floating - tabbed palettes, such as the Tool and Control palettes. - The workspace can store current size, visibility, physical location, docking information, - and any other palette-specific options (such as the list view option in the brushes - palette). - - These functions retrieve and set values in the workspace object, according - to the data type. - - The workspace does not control persistence, which governs the behavior - at startup. This is determined in the individual libraries (Brush, Graphic - Style, Swatch, and Symbol). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIWorkspaceSuite and \c #kAIWorkspaceVersion. -*/ - -typedef struct { - - /** Retrieves an integer value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetIntegerValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, int *value); - - /** Sets an integer value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetIntegerValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, ai::int32 value); - - /** Retrieves a real-number value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRealValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIReal *value); - - /** Sets a real-number value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetRealValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIReal value); - - /** Retrieves a boolean value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetBooleanValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIBoolean *value); - - /** Sets a boolean value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetBooleanValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIBoolean value); - - /** Retrieves a string value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetStringValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, char *value, ai::int32 length); - - /** Sets a string value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetStringValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, const char *value); - - /** Retrieves a point value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetPointValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIPoint *value); - - /** Sets a point value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetPointValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIPoint value); - - /** Retrieves a real-number point value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRealPointValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealPoint *value); - - /** Sets a real-number point value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetRealPointValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealPoint value); - - /** Retrieves a rectangle value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRectValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRect *value); - - /** Sets a rectangle value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetRectValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRect value); - - /** Retrieves a real-number rectangle value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRealRectValue)(AIWorkspaceHandle collectioRef, const char *prefix, const char *suffix, AIRealRect *value); - - /** Sets a real-number rectangle value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetRealRectValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealRect value); - - /** Retrieves a transformation matrix value from a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetRealMatrixValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealMatrix *value); - - /** Sets a transformation matrix value for a workspace. - @param workspace The workspace object. - @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). - @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". - @param value The new value. - */ - AIAPI AIErr (*SetRealMatrixValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealMatrix value); - -} AIWorkspaceSuite; - - - -#include "AIHeaderEnd.h" - - -#endif // __AIWorkspace__ +#ifndef __AIWorkspace__ +#define __AIWorkspace__ + +/* + * Name: AIWorkspace.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator Workspace Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __SPAccess__ +#include "SPAccess.h" +#endif + +#include "AIHeaderBegin.h" + +/** @file AIWorkspace.h */ +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** @ingroup Constants */ +#define kAIWorkspaceSuite "AI Workspace Suite" +#define kAIWorkspaceSuiteVersion3 AIAPI_VERSION(3) +#define kAIWorkspaceSuiteVersion kAIWorkspaceSuiteVersion3 +#define kAIWorkspaceVersion kAIWorkspaceSuiteVersion + +/** Maximum number of bytes in a workspace name, including null terminator. */ +#define kMaxWSStringLength (64) + + +/** @ingroup Notifiers + Sent as a last step when the workspace has been restored. */ +#define kAIWorkspaceRestoreFinishNotifier "AI Workspace Restore Finish Notifier" + +/** @ingroup Callers + Sent to plug-ins from the workspace manager. See \c #AIWorkspaceSuite. */ +#define kAIWorkspaceCaller "Workspace Manager" + +/** @ingroup Selectors + Sent to plug-ins that own tab palettes to request save of + the current dialog's specific configuration (show/hide option, list view). + To save a configuration value for the current workspace, + use the appropriate \c SetValue() function from the \c #AIWorkspaceSuite, + retrieving the workspace object from the message: + + +sAIWorkspace->SetValue(message->workspace, palette_name, description_of_value, value). + + + Each palette's location, visibility, dock code, dock group, and size of the + current workspace are saved by the Workspaces plug-in. +*/ +#define kAIWSWriteSelector "Write Workspace" +/** @ingroup Selectors + Sent to plug-ins that own tab palettes to request restore of + the current dialog's specific configuration. + To retrieve a configuration value from the current workspace, + use the appropriate \c GetValue() function from the \c #AIWorkspaceSuite, + retrieving the workspace object from the message: + + +sAIWorkspace->GetValue(message->workspace, palette_name, description_of_value, &value). + + + Each palette's location, visibility, dock code, dock group, and size of the + current workspace are restored by the Workspaces plug-in. +*/ +#define kAIWSRestoreSelector "Restore Workspace" +/** @ingroup Selectors + Sent to plug-ins that own tab palettes to reset to hard-coded default values + defined in the plug-in and in \c AIPaletteDefaults.h. + You must configure the palette layout to the initial default. + In addition to a palette's specific configuration (show/hide option, list view), + resets the values of a palette's location, visibility, dock code, dock group, and size. +*/ +#define kAIWSDefaultSelector "Default Workspace" + +/** @ingroup Errors + Workspace name is longer than \c #kMaxWSStringLength. + See \c #AIWorkspaceSuite. */ +#define kWorkspaceNameTooLongErr 'WSNL' + +/** Not used */ +enum AIWorkspaceDefaultValue { + kAIWSDefaultPreset = 1, + kAIWSAICSPreset +}; + +/******************************************************************************* + ** + ** Types + ** + **/ +/** Opaque reference to a workspace. Access with \c #AIWorkspaceSuite. */ +typedef struct _AIWorkspace* AIWorkspaceHandle; + +/** Message sent with workspace selectors. See \c #AIWorkspaceSuite. */ +typedef struct { + /** Message data. */ + SPMessageData d; + /** The workspace receiving the message. */ + AIWorkspaceHandle workspace; + /** The name of the tab palette. If you install multiple palettes, compare to the + saved name to determine which one made the request. */ + const char *dialogName; + /** True when \c #kAIWSDefaultSelector message was sent because a palette + was not found in the current workspace, and an exception was raised. Your + handler can restore the palette layout to the default. */ + AIBoolean restore; + /** Not used. */ + AIWorkspaceDefaultValue flag; +} AIWorkspaceMessage; + +/******************************************************************************* + ** + ** Suites + ** + **/ + +/** @ingroup Suites + This suite allows you to access \e workspaces. + A workspace is an object in which to store the screen layout of floating + tabbed palettes, such as the Tool and Control palettes. + The workspace can store current size, visibility, physical location, docking information, + and any other palette-specific options (such as the list view option in the brushes + palette). + + These functions retrieve and set values in the workspace object, according + to the data type. + + The workspace does not control persistence, which governs the behavior + at startup. This is determined in the individual libraries (Brush, Graphic + Style, Swatch, and Symbol). + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIWorkspaceSuite and \c #kAIWorkspaceVersion. +*/ + +typedef struct { + + /** Retrieves an integer value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetIntegerValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, int *value); + + /** Sets an integer value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetIntegerValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, ai::int32 value); + + /** Retrieves a real-number value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRealValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIReal *value); + + /** Sets a real-number value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetRealValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIReal value); + + /** Retrieves a boolean value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetBooleanValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIBoolean *value); + + /** Sets a boolean value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetBooleanValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIBoolean value); + + /** Retrieves a string value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetStringValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, char *value, ai::int32 length); + + /** Sets a string value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetStringValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, const char *value); + + /** Retrieves a point value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetPointValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIPoint *value); + + /** Sets a point value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetPointValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIPoint value); + + /** Retrieves a real-number point value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRealPointValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealPoint *value); + + /** Sets a real-number point value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetRealPointValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealPoint value); + + /** Retrieves a rectangle value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRectValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRect *value); + + /** Sets a rectangle value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetRectValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRect value); + + /** Retrieves a real-number rectangle value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRealRectValue)(AIWorkspaceHandle collectioRef, const char *prefix, const char *suffix, AIRealRect *value); + + /** Sets a real-number rectangle value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetRealRectValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealRect value); + + /** Retrieves a transformation matrix value from a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetRealMatrixValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealMatrix *value); + + /** Sets a transformation matrix value for a workspace. + @param workspace The workspace object. + @param prefix The palette name, as returned by sADMDialog->GetDialogName(fDialog). + @param suffix A configuration item in the plug-in, such as "ListView" or "ShowOption". + @param value The new value. + */ + AIAPI AIErr (*SetRealMatrixValue)(AIWorkspaceHandle workspace, const char *prefix, const char *suffix, AIRealMatrix value); + +} AIWorkspaceSuite; + + + +#include "AIHeaderEnd.h" + + +#endif // __AIWorkspace__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIXMLElement.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIXMLElement.h index d67c941..b3dc926 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIXMLElement.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIXMLElement.h @@ -1,626 +1,626 @@ -#ifndef __AIXMLElement__ -#define __AIXMLElement__ - -/* - * Name: AIXMLNodeRef.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator XML node suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIEntry__ -#include "AIEntry.h" -#endif - -#ifndef __AIDict__ -#include "AIDictionary.h" -#endif - -#ifndef __AIArray__ -#include "AIArray.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIXMLElement.h */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAIXMLNodeSuite "AI XML Node Suite" -#define kAIXMLNodeSuiteVersion5 AIAPI_VERSION(5) -#define kAIXMLNodeSuiteVersion kAIXMLNodeSuiteVersion5 -#define kAIXMLNodeVersion kAIXMLNodeSuiteVersion - -#define kAIXMLDocumentSuite "AI XML Document Suite" -#define kAIXMLDocumentSuiteVersion4 AIAPI_VERSION(4) -#define kAIXMLDocumentSuiteVersion kAIXMLDocumentSuiteVersion4 -#define kAIXMLDocumentVersion kAIXMLDocumentSuiteVersion - -#define kAIXMLElementSuite "AI XML Element Suite" -#define kAIXMLElementSuiteVersion4 AIAPI_VERSION(4) -#define kAIXMLElementSuiteVersion kAIXMLElementSuiteVersion4 -#define kAIXMLElementVersion kAIXMLElementSuiteVersion - -#define kAIXMLNodeListSuite "AI XML Node List Suite" -#define kAIXMLNodeListSuiteVersion3 AIAPI_VERSION(3) -#define kAIXMLNodeListSuiteVersion kAIXMLNodeListSuiteVersion3 -#define kAIXMLNodeListVersion kAIXMLNodeListSuiteVersion - -#define kAIXMLNamedNodeMapSuite "AI XML Named Node Map Suite" -#define kAIXMLNamedNodeMapSuiteVersion4 AIAPI_VERSION(4) -#define kAIXMLNamedNodeMapSuiteVersion kAIXMLNamedNodeMapSuiteVersion4 -#define kAIXMLNamedNodeMapVersion kAIXMLNamedNodeMapSuiteVersion - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** @ingroup Errors - See \c #AIXMLElementSuite, \c #AIXMLNodeListSuite.*/ -#define kAIXMLIndexSizeErr 'xInd' - -/** @ingroup Errors - See \c #AIXMLElementSuite */ -#define kAIXMLDOMStringSizeErr 'xDSt' - -/** @ingroup Errors - See \c #AIXMLDocumentSuite */ -#define kAIXMLHierarchyRequestErr 'xHer' - -/** @ingroup Errors - See \c #AIXMLDocumentSuite */ -#define kAIXMLWrongDocumentErr 'xDoc' - -/** @ingroup Errors - See \c #AIXMLElementSuite, \c #AIXMLDocumentSuite */ -#define kAIXMLInvalidCharacterErr 'xChr' - -/** @ingroup Errors - See \c #AIXMLDocumentSuite */ -#define kAIXMLNoDataAllowedErr 'x!dt' - -/** @ingroup Errors - See \c #AIXMLDocumentSuite */ -#define kAIXMLNoModifyAllowedErr 'x!mo' - -/** @ingroup Errors - See \c #AIXMLDocumentSuite */ -#define kAIXMLNotFoundErr 'x!fd' - -/** @ingroup Errors - See \c #AIXMLDocumentSuite */ -#define kAIXMLNotSupportedErr 'x!sp' - -/** @ingroup Errors - See \c #AIXMLElementSuite */ -#define kAIXMLInUseAttributeErr 'xInU' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to an XML node list. Access with \c #AIXMLNodeListSuite */ -typedef struct _AIXMLNodeList *AIXMLNodeListRef; -/** Opaque reference to an XML named node map. Access with \c #AIXMLNamedNodeMapSuite */ -typedef struct _AIXMLNamedNodeMap *AIXMLNamedNodeMapRef; -/** Opaque reference to an XML name. See \c #AIXMLNodeSuite::NameFromString(), - \c #AIXMLNodeSuite::SetNodeName(). */ -typedef struct _AIXMLName *AIXMLName; -/** An abstract name that can be converted to or from a - simple C string or Unicode string. See \c #AIXMLNodeSuite. */ -typedef AIEntryRef AIXMLString; // entry of type string. - -/** XML node type, an \c #AIXMLNodeTypeValue. See \c #AIXMLNodeSuite::GetNodeType(), - \c #AIXMLDocumentSuite*/ -typedef ai::int32 AIXMLNodeType; -/** Possible values for \c #AIXMLNodeType. */ -enum AIXMLNodeTypeValue { - kAIXMLUnknownNode, - /** Element. See \c #AIXMLDocumentSuite::CreateElement() */ - kAIXMLElementNode, - /** Attribute. See \c #AIXMLDocumentSuite::CreateAttribute() */ - kAIXMLAttributeNode, - /** Text. See \c #AIXMLDocumentSuite::CreateTextNode() */ - kAIXMLTextNode, - /** CData section. See \c #AIXMLDocumentSuite::CreateCDATASection() */ - kAIXMLCDATASectionNode, - /** Comment. See \c #AIXMLDocumentSuite::CreateComment() */ - kAIXMLCommentNode, - /** Not supported */ - kAIXMLEntityReferenceNode, - /** Not supported */ - kAIXMLEntityNode, - /** Not supported */ - kAIXMLProcessingInstructionNode, - /** Not supported */ - kAIXMLDocumentNode, - /** Not supported */ - kAIXMLDocumentTypeNode, - /** Not supported */ - kAIXMLDocumentFragmentNode, - /** Not supported */ - kAIXMLNotationNode -}; - - - -/******************************************************************************* - ** - ** Notifier - ** - **/ - -/** @ingroup Notifiers - Sent when an operation requiring update of metadata is about to occur. - For example, sent before any file format is called or written. - Register for this if you need to keep metadata current. - If you add any function that assumes the metadata is current - (for a metadata browser, for example), send this notifier. - @see \c #AIXMLDocumentSuite -*/ -#define kAIMetadataSyncNotifier "AI Metadata Sync Notifier" - - -/******************************************************************************* - ** - ** Suites - ** - **/ - -// ------ AIXMLNodeSuite ------------------------- -/** @ingroup Suites - This suite allows you to create and manipulate XML nodes. - - The XML node suite provides an approximate implementation of the - XML Level 1 DOM interface for nodes. See - http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247 - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIXMLNodeSuite and \c #kAIXMLNodeVersion. - - The values of "NodeName", "NodeValue", and "Attributes" vary according to - the node type as follows: - - - - - - - - - - - - - - - - - -
NodeName NodeValue Attributes
Element tag name null NamedNodeMap
Attr attribute name attribute value null
Text \#text text value null
CDATASection \#cdata-section CDATA contents null
Comment \#comment comment string null
EntityReference entity ref name null null
Entity entity name null null
P.Instruction target name content null
Document \#document null null
DocumentType document type name null null
DocumentFrag \#document-fragment null null
Notation notation name null null
-*/ -typedef struct { - - // -- nodes -- - - /** Increments the reference count for an XML node. - When you create a node, the initial count is 1. - Use \c #Release() to decrement the count. - (Note that this function returns a numeric value, not an error code.) - @param node The XML node reference. - @return The current reference count. - */ - AIAPI ai::int32 (*AddRef) (AIXMLNodeRef node); - - /** Decrements the reference count for an XML node, and - frees the memory when the reference count is 0. - When you create a node, the initial count is 1. - Use \c #AddRef() to increment the count. - (Note that this function returns a numeric value, not an error code.) - @param node The XML node reference. - @return The current reference count. - */ - AIAPI ai::int32 (*Release) (AIXMLNodeRef node); - - /** Creates an exact duplicate of an XML node. performing a deep copy. - @param src The source node. - @param dst [out] A buffer in which to return the new node. - */ - AIAPI AIErr (*Clone) (AIXMLNodeRef src, AIXMLNodeRef* dst ); - - /** Copies the contents of an XML node into another existing node. - @param node The node whose contents are replaced. - @param src The source node. - */ - AIAPI AIErr (*Copy) (AIXMLNodeRef node, AIXMLNodeRef src); - - /** Retrieves the type of an XML node. - @param node The XML node reference. - @param type [out] A buffer in which to return the type constant. - */ - AIAPI AIErr (*GetNodeType)(AIXMLNodeRef node, AIXMLNodeType *type); - - /** Retrieves the name of an XML node. - @param node The XML node reference. - @param name [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetNodeName)(AIXMLNodeRef node, AIXMLName *name); - - /** Sets the name of an XML node. - @param node The XML node reference. - @param name The new name. - */ - AIAPI AIErr (*SetNodeName)(AIXMLNodeRef node, AIXMLName name); - - /** Retrieves the value of an XML node. - @param node The XML node reference. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetNodeValue)(AIXMLNodeRef node, AIXMLString *value); - - /** Sets the value of an XML node. - @param node The XML node reference. - @param name The new value. - */ - AIAPI AIErr (*SetNodeValue)(AIXMLNodeRef node, AIXMLString value); - - /** Retrieves a node list containing the child nodes of an XML node. - @param node The XML node reference. - @param nodes [out] A buffer in which to return the node list. - */ - AIAPI AIErr (*GetChildNodes)(AIXMLNodeRef node, AIXMLNodeListRef *nodes); - - /** Retrieves a named node map containing the attributes associated - with an XML node. - @param node The XML node reference. - @param attributes [out] A buffer in which to return the node map. - */ - AIAPI AIErr (*GetAttributes)(AIXMLNodeRef node, AIXMLNamedNodeMapRef *attributes); - - /** Inserts a new child node in an XML node. - @param node The XML node reference for the parent node. - @param newchild The new child node. - @param refchild An existing child node before which to insert the new child, - or \c NULL to insert the new child at the end of the child list. - */ - AIAPI AIErr (*InsertBefore)(AIXMLNodeRef node, AIXMLNodeRef newchild, AIXMLNodeRef refchild); - - /** Replaces one child of an XML node with another child node. - @param node The XML node reference for the parent node. - @param newchild The new child node. - @param oldchild An existing child node to replace. - */ - AIAPI AIErr (*ReplaceChild)(AIXMLNodeRef node, AIXMLNodeRef newchild, AIXMLNodeRef oldchild); - - /** Removes a child node from an XML node. - @param node The XML node reference for the parent node. - @param oldchild An existing child node to remove. - */ - AIAPI AIErr (*RemoveChild)(AIXMLNodeRef node, AIXMLNodeRef oldchild); - - /** Appends a new child node to the child list of an XML node. - @param node The XML node reference for the parent node. - @param newchild The new child node. - */ - AIAPI AIErr (*AppendChild)(AIXMLNodeRef node, AIXMLNodeRef newchild); - - /** Reports whether an XML node has any children. - @param node The XML node reference. - @param haschildren [out] A buffer in which to return true if the node has children. - */ - AIAPI AIErr (*HasChildNodes)(AIXMLNodeRef node, AIBoolean *haschildren); - - // -- names -- - - /** Converts a C string to an XML node name. - (Note that this function returns an XML name value, not an error code,) - @param string The C string. - @return The XML name. - */ - AIAPI AIXMLName (*NameFromString) (const char* string); - - /** Converts an XML name to a C string. - (Note that this function returns a string value, not an error code,) - @param name The XML name. - @return The C string. - */ - AIAPI const char* (*StringFromName) (AIXMLName name); - - /** Converts a Unicode string to an XML node name. - (Note that this function returns an XML name value, not an error code,) - @param string The Unicode string. - @return The XML name. - */ - AIAPI AIXMLName (*NameFromUnicodeString) (const ai::UnicodeString& string); - - /** Converts an XML name to a Unicode string. - @param name The XML name. - @param string [out] A buffer in which to return the Unicode string. - */ - AIAPI AIErr (*UnicodeStringFromName) (AIXMLName name, ai::UnicodeString& string); - - // -- private data -- - - /** @deprecated. Obsolete, do not use. */ - AIAPI AIErr (*GetData) (AIXMLNodeRef node, AIDictKey key, AIEntryRef *value); - - /** @deprecated. Obsolete, do not use. */ - AIAPI AIErr (*SetData) (AIXMLNodeRef node, AIDictKey key, AIEntryRef value); - - /** @deprecated. Obsolete, do not use. */ - AIAPI AIErr (*RemoveData) (AIXMLNodeRef node, AIDictKey key); - - // -- utilities -- - - /** Compares two XML nodes for equality. Nodes are equal if they have - the same type, name, and value, and if they each have the same - attributes with the same values. They are deeply - equal if their sequences of child nodes are also equal. - When comparing values, the function converts them to real - numbers if possible, and otherwise compares the strings. - @param node1 The first node. - @param node2 The second node. - @param deep True to perform a deep comparison. - @param result [out] A buffer in which to return true (non-zero) if the nodes are equal. - - @note This is not a part of the XML DOM specification. - */ - AIAPI AIErr (*Compare) (AIXMLNodeRef node1, AIXMLNodeRef node2, AIBoolean deep, ai::int32 *result); - -} AIXMLNodeSuite; - - - - -// ------ AIXMLDocumentSuite ------------------------- -/** @ingroup Suites - An Illustrator document can store an XML document element in its dictionary. - This suite allows you to create and access the XML document and its - contained metadata element. - - When an Illustrator document is exported to SVG, the metadata element - is written to the SVG file. Before writing the file, Illustrator sends - the \c #kAIMetadataSyncNotifier to ensure that the metadata is updated. - When Illustrator reads an SVG file, the metadata in the SVG becomes - the document metadata element. - - This suite provides an approximate implementation of the - XML Level 1 DOM interface for documents. See - http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIXMLDocumentSuite and \c #kAIXMLDocumentVersion. - */ -typedef struct { - - /** Retrieves the XML document for the current Illustrator document, creating - one if none exists. - @param element [out] A buffer in which to return the XML document element. - @note This is not a part of the XML DOM specification. - */ - AIAPI AIErr (*GetDocumentElement)(AIXMLNodeRef *element); - - /** Retrieves the metadata element from the XML document for the current - Illustrator document, creating one if none exists. - @param element [out] A buffer in which to return the metadata element. - @note This is not a part of the XML DOM specification. - */ - AIAPI AIErr (*GetDocumentMetadata)(AIXMLNodeRef *element); - - /** Creates a new metadata element. - @param name The element name. - @param element [out] A buffer in which to return the new element. - */ - AIAPI AIErr (*CreateElement)(AIXMLName name, AIXMLNodeRef *element); - - /** Creates a new metadata attribute. - @param name The attribute name. - @param value The attribute value. - @param attribute [out] A buffer in which to return the new attribute. - */ - AIAPI AIErr (*CreateAttribute)(AIXMLName name, AIXMLString value, AIXMLNodeRef *attribute); - - /** Creates a new metadata text node. - @param string The text string. - @param text [out] A buffer in which to return the new text node. - */ - AIAPI AIErr (*CreateTextNode)(AIXMLString string, AIXMLNodeRef *text); - - /** Creates a new metadata comment node. - @param string The comment string. - @param comment [out] A buffer in which to return the new comment node. - */ - AIAPI AIErr (*CreateComment)(AIXMLString string, AIXMLNodeRef *comment); - - /** Creates a new metadata CDATA node. - @param string The CDATA string. - @param cdata [out] A buffer in which to return the new CDATA node. - */ - AIAPI AIErr (*CreateCDATASection)(AIXMLString string, AIXMLNodeRef *cdata); - - /** Retrieves XML elements at or under a node that match a name pattern. - The matching elements are determined by a pre-order traversal. - @param node A node at any level of the XML tree. - @param name The name pattern to match. The special name "*" matches all elements. - @param count [in, out] On input, the maximum number of matches to return. - On return, the number of array elements actually filled. - @param [in, out] An array of nodes of size \c count, in which to return matching - nodes. - @note This implementation differs from the XML DOM specification. - */ - AIAPI AIErr (*GetElementsByTagName)(AIXMLNodeRef node, AIXMLName name, ai::int32 *count, AIXMLNodeRef *match); - -} AIXMLDocumentSuite; - - - -// ------ AIXMLElementSuite ------------------------- -/** @ingroup Suites - This suite allows you to access XML metadata attributes. - - This suite provides an approximate implementation of the - XML Level 1 DOM interface for elements. See - http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614 - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIXMLElementSuite and \c #kAIXMLElementVersion. - */ -typedef struct { - - // -- attributes -- - - /** Retrieves the value of an XML node's named attribute. - @param element The node. - @param name The attribute name. - @param value [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetAttribute)(AIXMLNodeRef element, AIXMLName name, AIXMLString *value); - - /** Sets the value of an XML node's named attribute. - @param element The node. - @param name The attribute name. - @param value The new value. - */ - AIAPI AIErr (*SetAttribute)(AIXMLNodeRef element, AIXMLName name, AIXMLString value); - - /** Removes a named attribute associated with an XML node. - @param element The node. - @param name The attribute name. - */ - AIAPI AIErr (*RemoveAttribute)(AIXMLNodeRef element, AIXMLName name); - -} AIXMLElementSuite; - - -// ------ AIXMLNodeListSuite ------------------------- -/** @ingroup Suites - This suite allows you to iterate through and manage lists of XML nodes. - - This suite provides an approximate implementation of the - XML Level 1 DOM interface for node lists. See - http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177 - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIXMLNodeListSuite and \c #kAIXMLNodeListVersion. - */ -typedef struct { - - /** Retrieves the number of items in a node list. Use with \c #GetItem() - to iterate through a list. - @param nodes The XML node list. - @param length [out] A buffer in which to return the number of items. - */ - AIAPI AIErr (*GetLength)(AIXMLNodeListRef nodes, ai::int32 *length); - - /** Retrieves an XML node from a node list by position index. Use with \c #GetLength() - to iterate through a list. - @param nodes The XML node list. - @param index The 0-based position index. - @param node [out] A buffer in which to return the node. - */ - AIAPI AIErr (*GetItem)(AIXMLNodeListRef nodes, ai::int32 index, AIXMLNodeRef *node); - - // -- utilities -- - - /** Swaps XML nodes between two node lists. - @param list1 The first XML node list. - @param list2 The second XML node list. - @param position1 The 0-based position index of the node in the first list to move - to \c position2 in the second list. - @param position2 The 0-based position index of the node in the second list to move - to \c position1 in the first list. - @note This is not a part of the XML DOM specification. */ - AIAPI AIErr (*SwapNodes) (AIXMLNodeListRef list1, AIXMLNodeListRef list2, ai::int32 position1, ai::int32 position2); - -} AIXMLNodeListSuite; - - -// ------ AIXMLNamedNodeMapSuite ------------------------- -/** @ingroup Suites - This suite allows you to access XML named node maps. - - This suite provides an approximate implementation of the - XML Level 1 DOM interface for named node maps. See - http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1780488922 - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIXMLNamedNodeMapSuite and \c #kAIXMLNamedNodeMapSuiteVersion. - */ -typedef struct { - - /** Retrieves the size of a named node map. Use with \c #GetItem() to iterate - through items in the map. - @param map The node map. - @param length [out] A buffer in which to return the number of nodes. - */ - AIAPI AIErr (*GetLength)(AIXMLNamedNodeMapRef map, ai::int32 *length); - - /** Retrieves an XML node from a node map by position index. Use with \c #GetLength() - to iterate through a map. - @param map The node map. - @param index The 0-based position index. - @param node [out] A buffer in which to return the node. - */ - AIAPI AIErr (*GetItem)(AIXMLNamedNodeMapRef map, ai::int32 index, AIXMLNodeRef *node); - - /** Retrieves a node by name from a node map. - @param map The node map. - @param name The node name. - @param node [out] A buffer in which to return the node. - */ - AIAPI AIErr (*GetNamedItem)(AIXMLNamedNodeMapRef map, AIXMLName name, AIXMLNodeRef *node); - - /** Adds a named node to a node map, replacing it if it is already included. - @param map The node map. - @param name The node name. - */ - AIAPI AIErr (*SetNamedItem)(AIXMLNamedNodeMapRef map, AIXMLNodeRef node); - - /** Removes a named node from a node map. There is no error if the node - was not in the map. - @param map The node map. - @param name The node name. - */ - AIAPI AIErr (*RemoveNamedItem)(AIXMLNamedNodeMapRef map, AIXMLNodeRef node); - -} AIXMLNamedNodeMapSuite; - - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIXMLElement__ +#define __AIXMLElement__ + +/* + * Name: AIXMLNodeRef.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator XML node suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + +#ifndef __AIEntry__ +#include "AIEntry.h" +#endif + +#ifndef __AIDict__ +#include "AIDictionary.h" +#endif + +#ifndef __AIArray__ +#include "AIArray.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIXMLElement.h */ + +/******************************************************************************* + ** + ** Suite name and version + ** + **/ + +#define kAIXMLNodeSuite "AI XML Node Suite" +#define kAIXMLNodeSuiteVersion5 AIAPI_VERSION(5) +#define kAIXMLNodeSuiteVersion kAIXMLNodeSuiteVersion5 +#define kAIXMLNodeVersion kAIXMLNodeSuiteVersion + +#define kAIXMLDocumentSuite "AI XML Document Suite" +#define kAIXMLDocumentSuiteVersion4 AIAPI_VERSION(4) +#define kAIXMLDocumentSuiteVersion kAIXMLDocumentSuiteVersion4 +#define kAIXMLDocumentVersion kAIXMLDocumentSuiteVersion + +#define kAIXMLElementSuite "AI XML Element Suite" +#define kAIXMLElementSuiteVersion4 AIAPI_VERSION(4) +#define kAIXMLElementSuiteVersion kAIXMLElementSuiteVersion4 +#define kAIXMLElementVersion kAIXMLElementSuiteVersion + +#define kAIXMLNodeListSuite "AI XML Node List Suite" +#define kAIXMLNodeListSuiteVersion3 AIAPI_VERSION(3) +#define kAIXMLNodeListSuiteVersion kAIXMLNodeListSuiteVersion3 +#define kAIXMLNodeListVersion kAIXMLNodeListSuiteVersion + +#define kAIXMLNamedNodeMapSuite "AI XML Named Node Map Suite" +#define kAIXMLNamedNodeMapSuiteVersion4 AIAPI_VERSION(4) +#define kAIXMLNamedNodeMapSuiteVersion kAIXMLNamedNodeMapSuiteVersion4 +#define kAIXMLNamedNodeMapVersion kAIXMLNamedNodeMapSuiteVersion + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** @ingroup Errors + See \c #AIXMLElementSuite, \c #AIXMLNodeListSuite.*/ +#define kAIXMLIndexSizeErr 'xInd' + +/** @ingroup Errors + See \c #AIXMLElementSuite */ +#define kAIXMLDOMStringSizeErr 'xDSt' + +/** @ingroup Errors + See \c #AIXMLDocumentSuite */ +#define kAIXMLHierarchyRequestErr 'xHer' + +/** @ingroup Errors + See \c #AIXMLDocumentSuite */ +#define kAIXMLWrongDocumentErr 'xDoc' + +/** @ingroup Errors + See \c #AIXMLElementSuite, \c #AIXMLDocumentSuite */ +#define kAIXMLInvalidCharacterErr 'xChr' + +/** @ingroup Errors + See \c #AIXMLDocumentSuite */ +#define kAIXMLNoDataAllowedErr 'x!dt' + +/** @ingroup Errors + See \c #AIXMLDocumentSuite */ +#define kAIXMLNoModifyAllowedErr 'x!mo' + +/** @ingroup Errors + See \c #AIXMLDocumentSuite */ +#define kAIXMLNotFoundErr 'x!fd' + +/** @ingroup Errors + See \c #AIXMLDocumentSuite */ +#define kAIXMLNotSupportedErr 'x!sp' + +/** @ingroup Errors + See \c #AIXMLElementSuite */ +#define kAIXMLInUseAttributeErr 'xInU' + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to an XML node list. Access with \c #AIXMLNodeListSuite */ +typedef struct _AIXMLNodeList *AIXMLNodeListRef; +/** Opaque reference to an XML named node map. Access with \c #AIXMLNamedNodeMapSuite */ +typedef struct _AIXMLNamedNodeMap *AIXMLNamedNodeMapRef; +/** Opaque reference to an XML name. See \c #AIXMLNodeSuite::NameFromString(), + \c #AIXMLNodeSuite::SetNodeName(). */ +typedef struct _AIXMLName *AIXMLName; +/** An abstract name that can be converted to or from a + simple C string or Unicode string. See \c #AIXMLNodeSuite. */ +typedef AIEntryRef AIXMLString; // entry of type string. + +/** XML node type, an \c #AIXMLNodeTypeValue. See \c #AIXMLNodeSuite::GetNodeType(), + \c #AIXMLDocumentSuite*/ +typedef ai::int32 AIXMLNodeType; +/** Possible values for \c #AIXMLNodeType. */ +enum AIXMLNodeTypeValue { + kAIXMLUnknownNode, + /** Element. See \c #AIXMLDocumentSuite::CreateElement() */ + kAIXMLElementNode, + /** Attribute. See \c #AIXMLDocumentSuite::CreateAttribute() */ + kAIXMLAttributeNode, + /** Text. See \c #AIXMLDocumentSuite::CreateTextNode() */ + kAIXMLTextNode, + /** CData section. See \c #AIXMLDocumentSuite::CreateCDATASection() */ + kAIXMLCDATASectionNode, + /** Comment. See \c #AIXMLDocumentSuite::CreateComment() */ + kAIXMLCommentNode, + /** Not supported */ + kAIXMLEntityReferenceNode, + /** Not supported */ + kAIXMLEntityNode, + /** Not supported */ + kAIXMLProcessingInstructionNode, + /** Not supported */ + kAIXMLDocumentNode, + /** Not supported */ + kAIXMLDocumentTypeNode, + /** Not supported */ + kAIXMLDocumentFragmentNode, + /** Not supported */ + kAIXMLNotationNode +}; + + + +/******************************************************************************* + ** + ** Notifier + ** + **/ + +/** @ingroup Notifiers + Sent when an operation requiring update of metadata is about to occur. + For example, sent before any file format is called or written. + Register for this if you need to keep metadata current. + If you add any function that assumes the metadata is current + (for a metadata browser, for example), send this notifier. + @see \c #AIXMLDocumentSuite +*/ +#define kAIMetadataSyncNotifier "AI Metadata Sync Notifier" + + +/******************************************************************************* + ** + ** Suites + ** + **/ + +// ------ AIXMLNodeSuite ------------------------- +/** @ingroup Suites + This suite allows you to create and manipulate XML nodes. + + The XML node suite provides an approximate implementation of the + XML Level 1 DOM interface for nodes. See + http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1950641247 + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIXMLNodeSuite and \c #kAIXMLNodeVersion. + + The values of "NodeName", "NodeValue", and "Attributes" vary according to + the node type as follows: + + + + + + + + + + + + + + + + + +
NodeName NodeValue Attributes
Element tag name null NamedNodeMap
Attr attribute name attribute value null
Text \#text text value null
CDATASection \#cdata-section CDATA contents null
Comment \#comment comment string null
EntityReference entity ref name null null
Entity entity name null null
P.Instruction target name content null
Document \#document null null
DocumentType document type name null null
DocumentFrag \#document-fragment null null
Notation notation name null null
+*/ +typedef struct { + + // -- nodes -- + + /** Increments the reference count for an XML node. + When you create a node, the initial count is 1. + Use \c #Release() to decrement the count. + (Note that this function returns a numeric value, not an error code.) + @param node The XML node reference. + @return The current reference count. + */ + AIAPI ai::int32 (*AddRef) (AIXMLNodeRef node); + + /** Decrements the reference count for an XML node, and + frees the memory when the reference count is 0. + When you create a node, the initial count is 1. + Use \c #AddRef() to increment the count. + (Note that this function returns a numeric value, not an error code.) + @param node The XML node reference. + @return The current reference count. + */ + AIAPI ai::int32 (*Release) (AIXMLNodeRef node); + + /** Creates an exact duplicate of an XML node. performing a deep copy. + @param src The source node. + @param dst [out] A buffer in which to return the new node. + */ + AIAPI AIErr (*Clone) (AIXMLNodeRef src, AIXMLNodeRef* dst ); + + /** Copies the contents of an XML node into another existing node. + @param node The node whose contents are replaced. + @param src The source node. + */ + AIAPI AIErr (*Copy) (AIXMLNodeRef node, AIXMLNodeRef src); + + /** Retrieves the type of an XML node. + @param node The XML node reference. + @param type [out] A buffer in which to return the type constant. + */ + AIAPI AIErr (*GetNodeType)(AIXMLNodeRef node, AIXMLNodeType *type); + + /** Retrieves the name of an XML node. + @param node The XML node reference. + @param name [out] A buffer in which to return the name. + */ + AIAPI AIErr (*GetNodeName)(AIXMLNodeRef node, AIXMLName *name); + + /** Sets the name of an XML node. + @param node The XML node reference. + @param name The new name. + */ + AIAPI AIErr (*SetNodeName)(AIXMLNodeRef node, AIXMLName name); + + /** Retrieves the value of an XML node. + @param node The XML node reference. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetNodeValue)(AIXMLNodeRef node, AIXMLString *value); + + /** Sets the value of an XML node. + @param node The XML node reference. + @param name The new value. + */ + AIAPI AIErr (*SetNodeValue)(AIXMLNodeRef node, AIXMLString value); + + /** Retrieves a node list containing the child nodes of an XML node. + @param node The XML node reference. + @param nodes [out] A buffer in which to return the node list. + */ + AIAPI AIErr (*GetChildNodes)(AIXMLNodeRef node, AIXMLNodeListRef *nodes); + + /** Retrieves a named node map containing the attributes associated + with an XML node. + @param node The XML node reference. + @param attributes [out] A buffer in which to return the node map. + */ + AIAPI AIErr (*GetAttributes)(AIXMLNodeRef node, AIXMLNamedNodeMapRef *attributes); + + /** Inserts a new child node in an XML node. + @param node The XML node reference for the parent node. + @param newchild The new child node. + @param refchild An existing child node before which to insert the new child, + or \c NULL to insert the new child at the end of the child list. + */ + AIAPI AIErr (*InsertBefore)(AIXMLNodeRef node, AIXMLNodeRef newchild, AIXMLNodeRef refchild); + + /** Replaces one child of an XML node with another child node. + @param node The XML node reference for the parent node. + @param newchild The new child node. + @param oldchild An existing child node to replace. + */ + AIAPI AIErr (*ReplaceChild)(AIXMLNodeRef node, AIXMLNodeRef newchild, AIXMLNodeRef oldchild); + + /** Removes a child node from an XML node. + @param node The XML node reference for the parent node. + @param oldchild An existing child node to remove. + */ + AIAPI AIErr (*RemoveChild)(AIXMLNodeRef node, AIXMLNodeRef oldchild); + + /** Appends a new child node to the child list of an XML node. + @param node The XML node reference for the parent node. + @param newchild The new child node. + */ + AIAPI AIErr (*AppendChild)(AIXMLNodeRef node, AIXMLNodeRef newchild); + + /** Reports whether an XML node has any children. + @param node The XML node reference. + @param haschildren [out] A buffer in which to return true if the node has children. + */ + AIAPI AIErr (*HasChildNodes)(AIXMLNodeRef node, AIBoolean *haschildren); + + // -- names -- + + /** Converts a C string to an XML node name. + (Note that this function returns an XML name value, not an error code,) + @param string The C string. + @return The XML name. + */ + AIAPI AIXMLName (*NameFromString) (const char* string); + + /** Converts an XML name to a C string. + (Note that this function returns a string value, not an error code,) + @param name The XML name. + @return The C string. + */ + AIAPI const char* (*StringFromName) (AIXMLName name); + + /** Converts a Unicode string to an XML node name. + (Note that this function returns an XML name value, not an error code,) + @param string The Unicode string. + @return The XML name. + */ + AIAPI AIXMLName (*NameFromUnicodeString) (const ai::UnicodeString& string); + + /** Converts an XML name to a Unicode string. + @param name The XML name. + @param string [out] A buffer in which to return the Unicode string. + */ + AIAPI AIErr (*UnicodeStringFromName) (AIXMLName name, ai::UnicodeString& string); + + // -- private data -- + + /** @deprecated. Obsolete, do not use. */ + AIAPI AIErr (*GetData) (AIXMLNodeRef node, AIDictKey key, AIEntryRef *value); + + /** @deprecated. Obsolete, do not use. */ + AIAPI AIErr (*SetData) (AIXMLNodeRef node, AIDictKey key, AIEntryRef value); + + /** @deprecated. Obsolete, do not use. */ + AIAPI AIErr (*RemoveData) (AIXMLNodeRef node, AIDictKey key); + + // -- utilities -- + + /** Compares two XML nodes for equality. Nodes are equal if they have + the same type, name, and value, and if they each have the same + attributes with the same values. They are deeply + equal if their sequences of child nodes are also equal. + When comparing values, the function converts them to real + numbers if possible, and otherwise compares the strings. + @param node1 The first node. + @param node2 The second node. + @param deep True to perform a deep comparison. + @param result [out] A buffer in which to return true (non-zero) if the nodes are equal. + + @note This is not a part of the XML DOM specification. + */ + AIAPI AIErr (*Compare) (AIXMLNodeRef node1, AIXMLNodeRef node2, AIBoolean deep, ai::int32 *result); + +} AIXMLNodeSuite; + + + + +// ------ AIXMLDocumentSuite ------------------------- +/** @ingroup Suites + An Illustrator document can store an XML document element in its dictionary. + This suite allows you to create and access the XML document and its + contained metadata element. + + When an Illustrator document is exported to SVG, the metadata element + is written to the SVG file. Before writing the file, Illustrator sends + the \c #kAIMetadataSyncNotifier to ensure that the metadata is updated. + When Illustrator reads an SVG file, the metadata in the SVG becomes + the document metadata element. + + This suite provides an approximate implementation of the + XML Level 1 DOM interface for documents. See + http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#i-Document + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIXMLDocumentSuite and \c #kAIXMLDocumentVersion. + */ +typedef struct { + + /** Retrieves the XML document for the current Illustrator document, creating + one if none exists. + @param element [out] A buffer in which to return the XML document element. + @note This is not a part of the XML DOM specification. + */ + AIAPI AIErr (*GetDocumentElement)(AIXMLNodeRef *element); + + /** Retrieves the metadata element from the XML document for the current + Illustrator document, creating one if none exists. + @param element [out] A buffer in which to return the metadata element. + @note This is not a part of the XML DOM specification. + */ + AIAPI AIErr (*GetDocumentMetadata)(AIXMLNodeRef *element); + + /** Creates a new metadata element. + @param name The element name. + @param element [out] A buffer in which to return the new element. + */ + AIAPI AIErr (*CreateElement)(AIXMLName name, AIXMLNodeRef *element); + + /** Creates a new metadata attribute. + @param name The attribute name. + @param value The attribute value. + @param attribute [out] A buffer in which to return the new attribute. + */ + AIAPI AIErr (*CreateAttribute)(AIXMLName name, AIXMLString value, AIXMLNodeRef *attribute); + + /** Creates a new metadata text node. + @param string The text string. + @param text [out] A buffer in which to return the new text node. + */ + AIAPI AIErr (*CreateTextNode)(AIXMLString string, AIXMLNodeRef *text); + + /** Creates a new metadata comment node. + @param string The comment string. + @param comment [out] A buffer in which to return the new comment node. + */ + AIAPI AIErr (*CreateComment)(AIXMLString string, AIXMLNodeRef *comment); + + /** Creates a new metadata CDATA node. + @param string The CDATA string. + @param cdata [out] A buffer in which to return the new CDATA node. + */ + AIAPI AIErr (*CreateCDATASection)(AIXMLString string, AIXMLNodeRef *cdata); + + /** Retrieves XML elements at or under a node that match a name pattern. + The matching elements are determined by a pre-order traversal. + @param node A node at any level of the XML tree. + @param name The name pattern to match. The special name "*" matches all elements. + @param count [in, out] On input, the maximum number of matches to return. + On return, the number of array elements actually filled. + @param [in, out] An array of nodes of size \c count, in which to return matching + nodes. + @note This implementation differs from the XML DOM specification. + */ + AIAPI AIErr (*GetElementsByTagName)(AIXMLNodeRef node, AIXMLName name, ai::int32 *count, AIXMLNodeRef *match); + +} AIXMLDocumentSuite; + + + +// ------ AIXMLElementSuite ------------------------- +/** @ingroup Suites + This suite allows you to access XML metadata attributes. + + This suite provides an approximate implementation of the + XML Level 1 DOM interface for elements. See + http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-745549614 + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIXMLElementSuite and \c #kAIXMLElementVersion. + */ +typedef struct { + + // -- attributes -- + + /** Retrieves the value of an XML node's named attribute. + @param element The node. + @param name The attribute name. + @param value [out] A buffer in which to return the value. + */ + AIAPI AIErr (*GetAttribute)(AIXMLNodeRef element, AIXMLName name, AIXMLString *value); + + /** Sets the value of an XML node's named attribute. + @param element The node. + @param name The attribute name. + @param value The new value. + */ + AIAPI AIErr (*SetAttribute)(AIXMLNodeRef element, AIXMLName name, AIXMLString value); + + /** Removes a named attribute associated with an XML node. + @param element The node. + @param name The attribute name. + */ + AIAPI AIErr (*RemoveAttribute)(AIXMLNodeRef element, AIXMLName name); + +} AIXMLElementSuite; + + +// ------ AIXMLNodeListSuite ------------------------- +/** @ingroup Suites + This suite allows you to iterate through and manage lists of XML nodes. + + This suite provides an approximate implementation of the + XML Level 1 DOM interface for node lists. See + http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-536297177 + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIXMLNodeListSuite and \c #kAIXMLNodeListVersion. + */ +typedef struct { + + /** Retrieves the number of items in a node list. Use with \c #GetItem() + to iterate through a list. + @param nodes The XML node list. + @param length [out] A buffer in which to return the number of items. + */ + AIAPI AIErr (*GetLength)(AIXMLNodeListRef nodes, ai::int32 *length); + + /** Retrieves an XML node from a node list by position index. Use with \c #GetLength() + to iterate through a list. + @param nodes The XML node list. + @param index The 0-based position index. + @param node [out] A buffer in which to return the node. + */ + AIAPI AIErr (*GetItem)(AIXMLNodeListRef nodes, ai::int32 index, AIXMLNodeRef *node); + + // -- utilities -- + + /** Swaps XML nodes between two node lists. + @param list1 The first XML node list. + @param list2 The second XML node list. + @param position1 The 0-based position index of the node in the first list to move + to \c position2 in the second list. + @param position2 The 0-based position index of the node in the second list to move + to \c position1 in the first list. + @note This is not a part of the XML DOM specification. */ + AIAPI AIErr (*SwapNodes) (AIXMLNodeListRef list1, AIXMLNodeListRef list2, ai::int32 position1, ai::int32 position2); + +} AIXMLNodeListSuite; + + +// ------ AIXMLNamedNodeMapSuite ------------------------- +/** @ingroup Suites + This suite allows you to access XML named node maps. + + This suite provides an approximate implementation of the + XML Level 1 DOM interface for named node maps. See + http://www.w3.org/TR/1998/REC-DOM-Level-1-19981001/level-one-core.html#ID-1780488922 + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIXMLNamedNodeMapSuite and \c #kAIXMLNamedNodeMapSuiteVersion. + */ +typedef struct { + + /** Retrieves the size of a named node map. Use with \c #GetItem() to iterate + through items in the map. + @param map The node map. + @param length [out] A buffer in which to return the number of nodes. + */ + AIAPI AIErr (*GetLength)(AIXMLNamedNodeMapRef map, ai::int32 *length); + + /** Retrieves an XML node from a node map by position index. Use with \c #GetLength() + to iterate through a map. + @param map The node map. + @param index The 0-based position index. + @param node [out] A buffer in which to return the node. + */ + AIAPI AIErr (*GetItem)(AIXMLNamedNodeMapRef map, ai::int32 index, AIXMLNodeRef *node); + + /** Retrieves a node by name from a node map. + @param map The node map. + @param name The node name. + @param node [out] A buffer in which to return the node. + */ + AIAPI AIErr (*GetNamedItem)(AIXMLNamedNodeMapRef map, AIXMLName name, AIXMLNodeRef *node); + + /** Adds a named node to a node map, replacing it if it is already included. + @param map The node map. + @param name The node name. + */ + AIAPI AIErr (*SetNamedItem)(AIXMLNamedNodeMapRef map, AIXMLNodeRef node); + + /** Removes a named node from a node map. There is no error if the node + was not in the map. + @param map The node map. + @param name The node name. + */ + AIAPI AIErr (*RemoveNamedItem)(AIXMLNamedNodeMapRef map, AIXMLNodeRef node); + +} AIXMLNamedNodeMapSuite; + + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIXMLNameUtil.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIXMLNameUtil.h index eeeeaa8..8eead61 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIXMLNameUtil.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AIXMLNameUtil.h @@ -1,120 +1,120 @@ -#ifndef __AIXMLNameUtil__ -#define __AIXMLNameUtil__ - -/* - * Name: AIXMLNameUtil.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator XML Name Utilities Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIXMLNameUtil.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIXMLNameUtilSuite "AI XML Name Utilities Suite" -#define kAIXMLNameUtilSuiteVersion4 AIAPI_VERSION(4) -#define kAIXMLNameUtilSuiteVersion kAIXMLNameUtilSuiteVersion4 -#define kAIXMLNameUtilVersion kAIXMLNameUtilSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite allows you to create and manipulate XML names, and - convert them to and from strings. An XML name must conform to a - specific syntax; for example, it cannot contain the space character and - must start with a letter. - See http://www.w3.org/TR/REC-xml#NT-Name for the XML name syntax. - - Illustrator uses these functions to convert between art object - names and unique identifiers; see the \c #AIUIDUtilsSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIXMLNameUtilSuite and \c #kAIXMLNameUtilVersion. -*/ -typedef struct AIXMLNameUtilSuite { - - /** Constructs an XML name from a base name, appending a number - to make the name unique. - @param base The base name string. - @param buffer [out] A Unicode string in which to return the XML name. - @param number The number. - @param maxlength The maximum number of characters in the constructed name. - */ - AIAPI AIErr (*NameFromBaseAndNumber) (const ai::UnicodeString& base, ai::UnicodeString& buffer, ai::int32 number, ai::int32 maxlength); - - /** Retrieves the base name from an XML name, stripping off any number - that was appended to make the name unique. - @param name The XML name. - @param buffer [out] A Unicode string in which to return the base name. - */ - AIAPI AIErr (*BaseFromName) (const ai::UnicodeString& name, ai::UnicodeString& buffer); - - /** Reports whether a string contains a valid XML name. - (Note that this function returns a boolean value, not an error code.) - @param name The Unicode string. - @return True if the string contains a valid XML name. - */ - AIAPI AIBoolean (*IsValidName) (const ai::UnicodeString& name); - - /** Constructs a valid XML name from any Unicode string, by replacing spaces with - underscores and other illegal characters with a character sequence that - identifies their hexadecimal equivalent. For example, "99 red balloons" - becomes "_x39_9_red_balloons", because the first character of an XML name - cannot be a number. - @param name The Unicode string. - @param buffer [out] A Unicode string in which to return the XML name. - */ - AIAPI AIErr (*XMLNameFromString) (const ai::UnicodeString& str, ai::UnicodeString& buffer); - - /** Restores a valid XML name to the Unicode string from which it was created using - \c #XMLNameFromString(). - @param name The XML name. - @param buffer [out] A buffer in which to return the converted string. - */ - AIAPI AIErr (*StringFromXMLName) (const ai::UnicodeString& name, ai::UnicodeString& buffer); - -} AIXMLNameUtilSuite; - - -#include "AIHeaderEnd.h" - - -#endif +#ifndef __AIXMLNameUtil__ +#define __AIXMLNameUtil__ + +/* + * Name: AIXMLNameUtil.h + * $Id $ + * Author: + * Date: + * Purpose: Adobe Illustrator XML Name Utilities Suite. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2001-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#ifndef __AITypes__ +#include "AITypes.h" +#endif + + +#include "AIHeaderBegin.h" + +/** @file AIXMLNameUtil.h */ + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kAIXMLNameUtilSuite "AI XML Name Utilities Suite" +#define kAIXMLNameUtilSuiteVersion4 AIAPI_VERSION(4) +#define kAIXMLNameUtilSuiteVersion kAIXMLNameUtilSuiteVersion4 +#define kAIXMLNameUtilVersion kAIXMLNameUtilSuiteVersion + + +/******************************************************************************* + ** + ** Suite + ** + **/ + + +/** @ingroup Suites + This suite allows you to create and manipulate XML names, and + convert them to and from strings. An XML name must conform to a + specific syntax; for example, it cannot contain the space character and + must start with a letter. + See http://www.w3.org/TR/REC-xml#NT-Name for the XML name syntax. + + Illustrator uses these functions to convert between art object + names and unique identifiers; see the \c #AIUIDUtilsSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kAIXMLNameUtilSuite and \c #kAIXMLNameUtilVersion. +*/ +typedef struct AIXMLNameUtilSuite { + + /** Constructs an XML name from a base name, appending a number + to make the name unique. + @param base The base name string. + @param buffer [out] A Unicode string in which to return the XML name. + @param number The number. + @param maxlength The maximum number of characters in the constructed name. + */ + AIAPI AIErr (*NameFromBaseAndNumber) (const ai::UnicodeString& base, ai::UnicodeString& buffer, ai::int32 number, ai::int32 maxlength); + + /** Retrieves the base name from an XML name, stripping off any number + that was appended to make the name unique. + @param name The XML name. + @param buffer [out] A Unicode string in which to return the base name. + */ + AIAPI AIErr (*BaseFromName) (const ai::UnicodeString& name, ai::UnicodeString& buffer); + + /** Reports whether a string contains a valid XML name. + (Note that this function returns a boolean value, not an error code.) + @param name The Unicode string. + @return True if the string contains a valid XML name. + */ + AIAPI AIBoolean (*IsValidName) (const ai::UnicodeString& name); + + /** Constructs a valid XML name from any Unicode string, by replacing spaces with + underscores and other illegal characters with a character sequence that + identifies their hexadecimal equivalent. For example, "99 red balloons" + becomes "_x39_9_red_balloons", because the first character of an XML name + cannot be a number. + @param name The Unicode string. + @param buffer [out] A Unicode string in which to return the XML name. + */ + AIAPI AIErr (*XMLNameFromString) (const ai::UnicodeString& str, ai::UnicodeString& buffer); + + /** Restores a valid XML name to the Unicode string from which it was created using + \c #XMLNameFromString(). + @param name The XML name. + @param buffer [out] A buffer in which to return the converted string. + */ + AIAPI AIErr (*StringFromXMLName) (const ai::UnicodeString& name, ai::UnicodeString& buffer); + +} AIXMLNameUtilSuite; + + +#include "AIHeaderEnd.h" + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASConfig.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASConfig.h index 75f6c41..03452b4 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASConfig.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASConfig.h @@ -1,212 +1,271 @@ -/***********************************************************************/ -/* */ -/* ASConfig.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1996-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/* Started by Dave Lazarony, 01/26/1996 */ -/* */ -/***********************************************************************/ - -#ifndef __ASConfig__ -#define __ASConfig__ - -/* - * Platform constants - * - * These are to be used for platform specific code (i.e. Carbon/Cocoa vs Win32 calls). - * Do not use them for processor or endianness conditionals. See the other defines below - * - * At this time: - * MAC_ENV means Mac OS X (Carbon/Cocoa) - * WIN_ENV means Windows (Win32) - * - */ - -/* - * Defines for Metrowerks - */ -#if defined (__MWERKS__) - #if defined (__POWERPC__) - #ifndef MAC_ENV - #define MAC_ENV - #endif - #elif defined (__INTEL__) - #ifndef WIN_ENV - #define WIN_ENV - #endif - #else - #error Unknown platform - #endif -#endif - -/* - * Defines for GNU (including Xcode and MinGW) - */ -#if defined(__GNUC__) - #if ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) ) - #ifndef MAC_ENV - #define MAC_ENV - #endif - #elif defined (__MINGW32__) - #ifndef WIN_ENV - #define WIN_ENV - #endif - #endif -#endif - -/* - * Defines for Visual C++ on Windows. - */ -#ifdef _MSC_VER - #ifndef WIN_ENV - #define WIN_ENV - #endif -#endif - -/* - * Make certain that one and only one of the platform constants is defined. - */ - -#if !defined(WIN_ENV) && !defined(MAC_ENV) - #error -#endif - -#if defined(WIN_ENV) && defined(MAC_ENV) - #error -#endif - - -/* - * Processor Type - * - * The processor definition is intended for processor specific code (ie Assembly). - * In general you should probably use AS_IS_LITTLE_ENDIAN for most cases. - * If you use AS_POWERPC or AS_X86 try and code up a vanilla c version which will compile up on any processor. - * e.g. - * #if AS_POWERPC - * Do your PPC Stuff - * #elif AS_X86 - * Do your x86 stuff - * #else - * Do the vanilla c version of the processor specific stuff - * #endif - * - * At this time: - * AS_POWERPC means PowerPC (G3/G4/G5 type processors) - * AS_X86 means X86 architecture (Intel/AMD) - * - */ -#ifdef MAC_ENV - #if defined(__POWERPC__) - #define AS_POWERPC 1 - #define AS_X86 0 - #elif defined (__i386__) - #define AS_POWERPC 0 - #define AS_X86 1 - #define AS_X86_32 - #define AS_MAC_32 - #elif defined (__x86_64__) - #define AS_POWERPC 0 - #define AS_X86 1 - #define AS_X86_64 - #define AS_MAC_64 - #else - //We don't care in Rez if we have a processor defined - #ifndef rez - #warning Unknown Processor - Going to compile vanilla versions - #endif - #define AS_POWERPC 0 - #define AS_X86 0 - #endif -#endif - -#ifdef WIN_ENV - #define AS_POWERPC 0 - #define AS_X86 1 - #if defined(_WIN64) - #define AS_X86_64 - #define AS_WIN_64 - #elif defined(_WIN32) - #define AS_X86_32 - #define AS_WIN_32 - #else - #error Unknown MSVC Compiler - #endif -#endif - -//check for consistency -#ifdef MAC_ENV - #if !defined(IOS_ENV) - #if ((!defined(AS_MAC_64) && !defined(AS_MAC_32)) || (defined(AS_MAC_64) && defined(AS_MAC_32)) || (defined(AS_WIN_32) || defined(AS_WIN_64)) ) - #error - #endif - #endif -#endif - -//macro for MAC 64 bit -#ifdef AS_MAC_64 -#define MAC64_ENV -#endif - -//macro for windows 64 bit -#ifdef AS_WIN_64 -#define WIN64_ENV -#endif - -#ifdef WIN_ENV - #if ((!defined(AS_WIN_32) && !defined(AS_WIN_64)) || (defined(AS_WIN_32) && defined(AS_WIN_64)) || (defined(AS_MAC_32) || defined(AS_MAC_64)) ) - #error - #endif -#endif - -#ifdef AS_X86_32 - #if ((!defined(AS_WIN_32) && !defined(AS_MAC_32)) || (defined(AS_MAC_64) || defined(AS_WIN_64)) ) - #error - #endif -#endif - -#ifdef AS_X86_64 - #if ((!defined(AS_WIN_64) && !defined(AS_MAC_64)) || (defined(AS_WIN_32) || defined(AS_MAC_32)) ) - #error - #endif -#endif -/* - * Endianness - * - * What order you expect the bytes to be in. - * If you aren't sure about endianness check out: http://en.wikipedia.org/wiki/Endianness - * - * In general, Intel/AMD processors are little endian, PowerPC is big endian (PowerPC can run in little endian mode though). - * - */ - -#ifdef MAC_ENV - #if defined (__LITTLE_ENDIAN__) - #define AS_IS_LITTLE_ENDIAN 1 - #elif defined (__BIG_ENDIAN__) - #define AS_IS_LITTLE_ENDIAN 0 - #else - //We don't care in Rez if we have a endianness defined - #ifndef rez - #error Unknown Endianness - #endif - #endif -#endif - -#ifdef WIN_ENV - #define AS_IS_LITTLE_ENDIAN 1 -#endif - -#endif /* __ASConfig__ */ +/***********************************************************************/ +/* */ +/* ASConfig.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1996-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/* Started by Dave Lazarony, 01/26/1996 */ +/* */ +/***********************************************************************/ + +#ifndef __ASConfig__ +#define __ASConfig__ + +/* + * Platform constants + * + * These are to be used for platform specific code (i.e. Carbon/Cocoa vs Win32 calls). + * Do not use them for processor or endianness conditionals. See the other defines below + * + * At this time: + * MAC_ENV means Mac OS X (Carbon/Cocoa) + * WIN_ENV means Windows (Win32) + * + */ + +/* + * Defines for Metrowerks + */ +#if defined (__MWERKS__) + #if defined (__POWERPC__) + #ifndef MAC_ENV + #define MAC_ENV + #endif + #elif defined (__INTEL__) + #ifndef WIN_ENV + #define WIN_ENV + #endif + #else + #error Unknown platform + #endif +#endif + +/* + * Defines for GNU (including Xcode and MinGW) + */ +#if defined(__GNUC__) + #if ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) ) + #ifndef MAC_ENV + #define MAC_ENV + #endif + #elif defined (__MINGW32__) + #ifndef WIN_ENV + #define WIN_ENV + #endif + #endif +#endif + +/* + * Defines for Visual C++ on Windows. + */ +#ifdef _MSC_VER + #ifndef WIN_ENV + #define WIN_ENV + #endif +#endif + +/* + * Make certain that one and only one of the platform constants is defined. + */ + +#if !defined(WIN_ENV) && !defined(MAC_ENV) && !defined(LINUX_ENV) + #error +#endif + +#if defined(WIN_ENV) && defined(MAC_ENV) + #error +#endif + +#if defined(WIN_ENV) && defined(LINUX_ENV) + #error +#endif + +#if defined(MAC_ENV) && defined(LINUX_ENV) + #error +#endif + +#if defined(WIN_ENV) && defined(MAC_ENV) && defined(LINUX_ENV) + #error +#endif + +/* + * Processor Type + * + * The processor definition is intended for processor specific code (ie Assembly). + * In general you should probably use AS_IS_LITTLE_ENDIAN for most cases. + * If you use AS_POWERPC or AS_X86 try and code up a vanilla c version which will compile up on any processor. + * e.g. + * #if AS_POWERPC + * Do your PPC Stuff + * #elif AS_X86 + * Do your x86 stuff + * #else + * Do the vanilla c version of the processor specific stuff + * #endif + * + * At this time: + * AS_POWERPC means PowerPC (G3/G4/G5 type processors) + * AS_X86 means X86 architecture (Intel/AMD) + * + */ +#ifdef MAC_ENV + #if defined(IOS_ENV) + #define AS_POWERPC 0 + #define AS_X86 0 + #define AS_ARM 1 + #define AS_ARM_64 + #elif defined(__POWERPC__) + #define AS_POWERPC 1 + #define AS_X86 0 + #define AS_ARM 0 + #elif defined (__i386__) + #define AS_POWERPC 0 + #define AS_X86 1 + #define AS_X86_32 + #define AS_MAC_32 + #define AS_ARM 0 + #elif defined (__x86_64__) + #define AS_POWERPC 0 + #define AS_X86 1 + #define AS_X86_64 + #define AS_MAC_64 + #define AS_ARM 0 + #elif defined (__arm64__) + #define AS_POWERPC 0 + #define AS_X86 0 + #define AS_MAC_64 + #define AS_ARM 1 + #define AS_ARM_64 + #else + //We don't care in Rez if we have a processor defined + #ifndef rez + #warning Unknown Processor - Going to compile vanilla versions + #endif + #define AS_POWERPC 0 + #define AS_X86 0 + #define AS_ARM 0 + #endif +#endif + +#ifdef WIN_ENV + #define AS_POWERPC 0 + #define AS_X86 1 + #define AS_ARM 0 + #if defined(_WIN64) + #define AS_X86_64 + #define AS_WIN_64 + #elif defined(_WIN32) + #define AS_X86_32 + #define AS_WIN_32 + #else + #error Unknown MSVC Compiler + #endif +#endif + +#ifdef LINUX_ENV + #define AS_POWERPC 0 + #define AS_X86 1 + #define AS_X86_64 + #define AS_ARM 0 + #define AS_UNIX_64 +#endif + +//check for consistency +#ifdef MAC_ENV + #if !defined(IOS_ENV) + #if ((!defined(AS_MAC_64) && !defined(AS_MAC_32)) || (defined(AS_MAC_64) && defined(AS_MAC_32)) || (defined(AS_WIN_32) || defined(AS_WIN_64)) ) + #error + #endif + #endif +#endif + +//macro for MAC 64 bit +#ifdef AS_MAC_64 +#define MAC64_ENV +#endif + +//macro for windows 64 bit +#ifdef AS_WIN_64 +#define WIN64_ENV +#endif + +#ifdef WIN_ENV + #if ((!defined(AS_WIN_32) && !defined(AS_WIN_64)) || (defined(AS_WIN_32) && defined(AS_WIN_64)) || (defined(AS_MAC_32) || defined(AS_MAC_64)) ) + #error + #endif +#endif + +#ifdef AS_X86_32 + #if ((!defined(AS_WIN_32) && !defined(AS_MAC_32)) || (defined(AS_MAC_64) || defined(AS_WIN_64)) ) + #error + #endif +#endif + +#ifdef AS_X86_64 + #if ((!defined(AS_WIN_64) && !defined(AS_MAC_64) && !defined(AS_UNIX_64)) || (defined(AS_WIN_32) || defined(AS_MAC_32)) ) + #error + #endif +#endif + +// 32-bit or 64-bit +#if defined(AS_ARCH_64BIT) + #if AS_ARCH_64BIT + #if !defined(AS_X86_64) && !defined(AS_ARM_64) + #error Mismatched 64-bit macros + #endif + #else + #if defined(AS_X86_64) || defined(AS_ARM_64) + #error Mismatched 64-bit macros + #endif + #endif +#else + #if defined(AS_X86_64) || defined(AS_ARM_64) + #define AS_ARCH_64BIT 1 + #else + #define AS_ARCH_64BIT 0 + #endif +#endif + +/* + * Endianness + * + * What order you expect the bytes to be in. + * If you aren't sure about endianness check out: http://en.wikipedia.org/wiki/Endianness + * + * In general, Intel/AMD processors are little endian, PowerPC is big endian (PowerPC can run in little endian mode though). + * + */ + +#ifdef MAC_ENV + #if defined (__LITTLE_ENDIAN__) + #define AS_IS_LITTLE_ENDIAN 1 + #elif defined (__BIG_ENDIAN__) + #define AS_IS_LITTLE_ENDIAN 0 + #else + //We don't care in Rez if we have a endianness defined + #ifndef rez + #error Unknown Endianness + #endif + #endif +#endif + +#ifdef WIN_ENV + #define AS_IS_LITTLE_ENDIAN 1 +#endif + +#ifdef LINUX_ENV + #define AS_IS_LITTLE_ENDIAN 1 +#endif + +#endif /* __ASConfig__ */ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASHelp.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASHelp.h index e2c6e0a..1cd0d62 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASHelp.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASHelp.h @@ -1,209 +1,209 @@ -#ifndef __ASHelp__ -#define __ASHelp__ - -/* - * Name: ASHelp.h - * $Revision: 15 $ - * Author: Rob Sargent - * Date: 2/15/97 - * Purpose: AS Help suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/* - * Includes - */ - -#include "ASTypes.h" -#include "AITypes.h" -#include "SPFiles.h" -#include "SPPlugs.h" - -#include "AIHeaderBegin.h" - - - -/******************************************************************************* - ** - ** Constants - ** - **/ -#define kASHelpSuite "AS Help Suite" -#define kASHelpSuiteVersion1 1 -#define kASHelpSuiteVersion kASHelpSuiteVersion1 -#define kASHelpVersion kASHelpSuiteVersion1 -#define kASHelpSuiteVersion4 4 - -#define kHelpInfoVersion 1 - - -#define kHelpError '!Hlp' - - -#define kHelpMenuType 'Menu' -#define kHelpDialogType 'Dlog' -#define kHelpToolType 'Tool' -#define kHelpPaletteMenuType 'PMnu' -#define kHelpEndType 0 - - -#define kNoHelpID 0 - -#define kHelpFileStrIDProperty 'HlpS' -#define kHelpNativeStrIndex 1 - - -/******************************************************************************* - ** - ** Types - ** - **/ - -// WARNING: The size of these types -// must match the resources -typedef ai::uint32 ASHelpType; -typedef ai::int32 ASHelpKey; // can be an integer or a pooled string pointer - -typedef ai::int32 ASHelpID; - - -// WinHelp/QuickHelp Commands -typedef enum -{ - /* #if(WINVER >= 0x0400) */ - kASHelpCmd_CONTEXTMENU = 0x000a, - kASHelpCmd_FINDER = 0x000b, - kASHelpCmd_WM_HELP = 0x000c, - kASHelpCmd_SETPOPUP_POS = 0x000d, - - kASHelpCmd_TCARD = 0x8000, - kASHelpCmd_TCARD_DATA = 0x0010, - kASHelpCmd_TCARD_OTHER_CALLER = 0x0011, - /* #endif // WINVER >= 0x0400 */ - - kASHelpCmd_CONTEXT = 0x0001, /* Display topic in ulTopic */ - kASHelpCmd_QUIT = 0x0002, /* Terminate help */ - kASHelpCmd_CONTENTS = 0x0003, /* NOTE: HELP_INDEX = HELP_CONTENTS in Windows.h */ - kASHelpCmd_HELPONHELP = 0x0004, /* Display help on using help */ - kASHelpCmd_SETCONTENTS = 0x0005, /* NOTE: HELP_SETINDEX = HELP_SETCONTENTS */ - kASHelpCmd_CONTEXTPOPUP = 0x0008, - kASHelpCmd_FORCEFILE = 0x0009, - kASHelpCmd_KEY = 0x0101, /* Display topic for keyword in offabData */ - kASHelpCmd_COMMAND = 0x0102, - kASHelpCmd_PARTIALKEY = 0x0105, - kASHelpCmd_MULTIKEY = 0x0201, - kASHelpCmd_SETWINPOS = 0x0203 -} ASHelpCommand; - - -typedef struct ASHelpInitInfo -{ - ai::int32 version; - AIWindowRef appWindow; - SPPluginRef appPluginRef; - ASInt16 helpFolderNameStrID; - ASInt16 appHelpFileNameStrID; - ASInt16 helpFolderNameStrIndex; - ASInt16 appHelpFileNameStrIndex; -} ASHelpInitInfo; - - -typedef struct PIHelpFileDesc -{ - ai::int32 fVersion; - ai::int32 fFileNameStrID; -} PIHelpFileDesc; - - - /******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct t_ASHelpSuite1 -{ - ASAPI ASErr (*Init) (ASHelpInitInfo *info); - ASAPI ASErr (*Quit) (void); - - ASAPI ASErr (*SetContextHelpMode) (AIBoolean helpMode); - ASAPI AIBoolean (*InContextHelpMode) (void); - - ASAPI ASErr (*Help) (AIWindowRef asWinRef, SPPlatformFileSpecification *spFile, - ASHelpCommand asHelpCommand, ai::uint32 dwData); - // spFile == NULL uses the App's help file - - ASAPI ASErr (*HelpContents) (SPPluginRef pluginRef); - ASAPI ASErr (*SearchHelp) (SPPluginRef pluginRef); - ASAPI ASErr (*HowToUseHelp) (SPPluginRef pluginRef); - ASAPI ASErr (*ContextHelp) (SPPluginRef pluginRef, ASHelpID helpID); - - ASAPI ASErr (*GetHelpID) (SPPluginRef pluginRef, ASHelpType helpType, - ASHelpKey key1, ASHelpKey key2, ASHelpID *helpID); - - ASAPI ASErr (*TypedHelp) (SPPluginRef pluginRef, ASHelpType helpType, ASHelpKey key1, ASHelpKey key2); - - ASAPI ASErr (*MenuHelp) (SPPluginRef pluginRef, ASHelpKey commandID); - - ASAPI ASErr (*DialogHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey itemID); - // itemID == 0 means whole dialog - - ASAPI ASErr (*PaletteMenuHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey menuItem ); - - ASAPI ASErr (*ToolHelp) (SPPluginRef pluginRef, ASHelpKey toolName ); - // toolName should be a pooled string pointer cast to ASHelpKey - -} ASHelpSuite1; - -typedef ASHelpSuite1 ASHelpSuite; //For historical reasons. - -typedef struct t_ASHelpSuite2 -{ - ASAPI ASErr (*Init) (ASHelpInitInfo *info); - ASAPI ASErr (*Quit) (void); - - ASAPI ASErr (*SetContextHelpMode) (AIBoolean helpMode); - ASAPI AIBoolean (*InContextHelpMode) (void); - - ASAPI ASErr (*Help) (AIWindowRef asWinRef, SPPlatformFileSpecification *spFile, - ASHelpCommand asHelpCommand, ai::uint32 dwData); - // spFile == NULL uses the App's help file - - ASAPI ASErr (*HelpContents) (SPPluginRef pluginRef); - ASAPI ASErr (*SearchHelp) (SPPluginRef pluginRef); - ASAPI ASErr (*HowToUseHelp) (SPPluginRef pluginRef); - ASAPI ASErr (*ContextHelp) (SPPluginRef pluginRef, ASHelpID helpID); - - ASAPI ASErr (*GetHelpID) (SPPluginRef pluginRef, ASHelpType helpType, - ASHelpKey key1, ASHelpKey key2, ASHelpID *helpID); - - ASAPI ASErr (*TypedHelp) (SPPluginRef pluginRef, ASHelpType helpType, ASHelpKey key1, ASHelpKey key2); - - ASAPI ASErr (*MenuHelp) (SPPluginRef pluginRef, ASHelpKey commandID); - - ASAPI ASErr (*DialogHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey itemID); - // itemID == 0 means whole dialog - - ASAPI ASErr (*PaletteMenuHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey menuItem ); - - ASAPI ASErr (*ToolHelp) (SPPluginRef pluginRef, ASHelpKey toolName ); - // toolName should be a pooled string pointer cast to ASHelpKey - - ASAPI ASErr (*ContextHelpQRC) (SPPluginRef pluginRef, ASHelpID helpID); - -} ASHelpSuite2; - -#include "AIHeaderEnd.h" - -#endif +#ifndef __ASHelp__ +#define __ASHelp__ + +/* + * Name: ASHelp.h + * $Revision: 15 $ + * Author: Rob Sargent + * Date: 2/15/97 + * Purpose: AS Help suite + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/* + * Includes + */ + +#include "ASTypes.h" +#include "AITypes.h" +#include "SPFiles.h" +#include "SPPlugs.h" + +#include "AIHeaderBegin.h" + + + +/******************************************************************************* + ** + ** Constants + ** + **/ +#define kASHelpSuite "AS Help Suite" +#define kASHelpSuiteVersion1 1 +#define kASHelpSuiteVersion kASHelpSuiteVersion1 +#define kASHelpVersion kASHelpSuiteVersion1 +#define kASHelpSuiteVersion4 4 + +#define kHelpInfoVersion 1 + + +#define kHelpError '!Hlp' + + +#define kHelpMenuType 'Menu' +#define kHelpDialogType 'Dlog' +#define kHelpToolType 'Tool' +#define kHelpPaletteMenuType 'PMnu' +#define kHelpEndType 0 + + +#define kNoHelpID 0 + +#define kHelpFileStrIDProperty 'HlpS' +#define kHelpNativeStrIndex 1 + + +/******************************************************************************* + ** + ** Types + ** + **/ + +// WARNING: The size of these types +// must match the resources +typedef ai::uint32 ASHelpType; +typedef ai::int32 ASHelpKey; // can be an integer or a pooled string pointer + +typedef ai::int32 ASHelpID; + + +// WinHelp/QuickHelp Commands +typedef enum +{ + /* #if(WINVER >= 0x0400) */ + kASHelpCmd_CONTEXTMENU = 0x000a, + kASHelpCmd_FINDER = 0x000b, + kASHelpCmd_WM_HELP = 0x000c, + kASHelpCmd_SETPOPUP_POS = 0x000d, + + kASHelpCmd_TCARD = 0x8000, + kASHelpCmd_TCARD_DATA = 0x0010, + kASHelpCmd_TCARD_OTHER_CALLER = 0x0011, + /* #endif // WINVER >= 0x0400 */ + + kASHelpCmd_CONTEXT = 0x0001, /* Display topic in ulTopic */ + kASHelpCmd_QUIT = 0x0002, /* Terminate help */ + kASHelpCmd_CONTENTS = 0x0003, /* NOTE: HELP_INDEX = HELP_CONTENTS in Windows.h */ + kASHelpCmd_HELPONHELP = 0x0004, /* Display help on using help */ + kASHelpCmd_SETCONTENTS = 0x0005, /* NOTE: HELP_SETINDEX = HELP_SETCONTENTS */ + kASHelpCmd_CONTEXTPOPUP = 0x0008, + kASHelpCmd_FORCEFILE = 0x0009, + kASHelpCmd_KEY = 0x0101, /* Display topic for keyword in offabData */ + kASHelpCmd_COMMAND = 0x0102, + kASHelpCmd_PARTIALKEY = 0x0105, + kASHelpCmd_MULTIKEY = 0x0201, + kASHelpCmd_SETWINPOS = 0x0203 +} ASHelpCommand; + + +typedef struct ASHelpInitInfo +{ + ai::int32 version; + AIWindowRef appWindow; + SPPluginRef appPluginRef; + ASInt16 helpFolderNameStrID; + ASInt16 appHelpFileNameStrID; + ASInt16 helpFolderNameStrIndex; + ASInt16 appHelpFileNameStrIndex; +} ASHelpInitInfo; + + +typedef struct PIHelpFileDesc +{ + ai::int32 fVersion; + ai::int32 fFileNameStrID; +} PIHelpFileDesc; + + + /******************************************************************************* + ** + ** Suite + ** + **/ + +typedef struct t_ASHelpSuite1 +{ + ASAPI ASErr (*Init) (ASHelpInitInfo *info); + ASAPI ASErr (*Quit) (void); + + ASAPI ASErr (*SetContextHelpMode) (AIBoolean helpMode); + ASAPI AIBoolean (*InContextHelpMode) (void); + + ASAPI ASErr (*Help) (AIWindowRef asWinRef, SPPlatformFileSpecification *spFile, + ASHelpCommand asHelpCommand, ai::uint32 dwData); + // spFile == NULL uses the App's help file + + ASAPI ASErr (*HelpContents) (SPPluginRef pluginRef); + ASAPI ASErr (*SearchHelp) (SPPluginRef pluginRef); + ASAPI ASErr (*HowToUseHelp) (SPPluginRef pluginRef); + ASAPI ASErr (*ContextHelp) (SPPluginRef pluginRef, ASHelpID helpID); + + ASAPI ASErr (*GetHelpID) (SPPluginRef pluginRef, ASHelpType helpType, + ASHelpKey key1, ASHelpKey key2, ASHelpID *helpID); + + ASAPI ASErr (*TypedHelp) (SPPluginRef pluginRef, ASHelpType helpType, ASHelpKey key1, ASHelpKey key2); + + ASAPI ASErr (*MenuHelp) (SPPluginRef pluginRef, ASHelpKey commandID); + + ASAPI ASErr (*DialogHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey itemID); + // itemID == 0 means whole dialog + + ASAPI ASErr (*PaletteMenuHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey menuItem ); + + ASAPI ASErr (*ToolHelp) (SPPluginRef pluginRef, ASHelpKey toolName ); + // toolName should be a pooled string pointer cast to ASHelpKey + +} ASHelpSuite1; + +typedef ASHelpSuite1 ASHelpSuite; //For historical reasons. + +typedef struct t_ASHelpSuite2 +{ + ASAPI ASErr (*Init) (ASHelpInitInfo *info); + ASAPI ASErr (*Quit) (void); + + ASAPI ASErr (*SetContextHelpMode) (AIBoolean helpMode); + ASAPI AIBoolean (*InContextHelpMode) (void); + + ASAPI ASErr (*Help) (AIWindowRef asWinRef, SPPlatformFileSpecification *spFile, + ASHelpCommand asHelpCommand, ai::uint32 dwData); + // spFile == NULL uses the App's help file + + ASAPI ASErr (*HelpContents) (SPPluginRef pluginRef); + ASAPI ASErr (*SearchHelp) (SPPluginRef pluginRef); + ASAPI ASErr (*HowToUseHelp) (SPPluginRef pluginRef); + ASAPI ASErr (*ContextHelp) (SPPluginRef pluginRef, ASHelpID helpID); + + ASAPI ASErr (*GetHelpID) (SPPluginRef pluginRef, ASHelpType helpType, + ASHelpKey key1, ASHelpKey key2, ASHelpID *helpID); + + ASAPI ASErr (*TypedHelp) (SPPluginRef pluginRef, ASHelpType helpType, ASHelpKey key1, ASHelpKey key2); + + ASAPI ASErr (*MenuHelp) (SPPluginRef pluginRef, ASHelpKey commandID); + + ASAPI ASErr (*DialogHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey itemID); + // itemID == 0 means whole dialog + + ASAPI ASErr (*PaletteMenuHelp) (SPPluginRef pluginRef, ASHelpKey dialogID, ASHelpKey menuItem ); + + ASAPI ASErr (*ToolHelp) (SPPluginRef pluginRef, ASHelpKey toolName ); + // toolName should be a pooled string pointer cast to ASHelpKey + + ASAPI ASErr (*ContextHelpQRC) (SPPluginRef pluginRef, ASHelpID helpID); + +} ASHelpSuite2; + +#include "AIHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASMemory.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASMemory.cpp index 7ae0caf..3419d19 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASMemory.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASMemory.cpp @@ -1,130 +1,130 @@ -/* - * Name: ASMemory.cpp - * $Revision: 4 $ - * Author: Dave Lazarony - * Date: 6/28/94 - * Purpose: ASMemory.cpp is used to manage memory allocations through SweetPea. - * This file declares the new and delete operators for memory allocation within - * a plug-in. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "ASTypes.h" -#include "SPBasic.h" - -#include -//#include - -extern "C" SPBasicSuite *sSPBasic; - -void * operator new[](size_t size) throw(std::bad_alloc) -{ - void *addr = nil; - - if (sSPBasic) - { - ASErr error = sSPBasic->AllocateBlock(size, &addr); - if (error) - addr = nil; - } -// else -// DebugStr("\p new() called without sSPBlocks"); - - return addr; -} - -void * operator new(size_t size) throw(std::bad_alloc) -{ - void *addr = nil; - - if (sSPBasic) - { - ASErr error = sSPBasic->AllocateBlock(size, &addr); - if (error) - addr = nil; - } -// else -// DebugStr("\p new() called without sSPBlocks"); - - return addr; -} - -void operator delete(void * p) throw() -{ - if (sSPBasic && p != NULL) - sSPBasic->FreeBlock(p); -// else -// DebugStr("\p delete() called without sSPBlocks"); -} - -void operator delete [] (void * p) throw() -{ - if (sSPBasic && p != NULL) - sSPBasic->FreeBlock(p); -// else -// DebugStr("\p delete() called without sSPBlocks"); -} - - - - -// ------------------------------------------------------- -// No throw versions -// ------------------------------------------------------- -void * operator new[](size_t size, const std::nothrow_t&) throw() -{ - void *addr = nil; - - if (sSPBasic) - { - ASErr error = sSPBasic->AllocateBlock(size, &addr); - if (error) - addr = nil; - } -// else -// DebugStr("\p new() called without sSPBlocks"); - - return addr; -} - -void * operator new(size_t size, const std::nothrow_t&) throw() -{ - void *addr = nil; - - if (sSPBasic) - { - ASErr error = sSPBasic->AllocateBlock(size, &addr); - if (error) - addr = nil; - } -// else -// DebugStr("\p new() called without sSPBlocks"); - - return addr; -} - -void operator delete(void * p, const std::nothrow_t&) throw() -{ - if (sSPBasic && p != NULL) - sSPBasic->FreeBlock(p); -// else -// DebugStr("\p delete() called without sSPBlocks"); -} - -void operator delete [] (void * p, const std::nothrow_t&) throw() -{ - if (sSPBasic && p != NULL) - sSPBasic->FreeBlock(p); -// else -// DebugStr("\p delete() called without sSPBlocks"); -} +/* + * Name: ASMemory.cpp + * $Revision: 4 $ + * Author: Dave Lazarony + * Date: 6/28/94 + * Purpose: ASMemory.cpp is used to manage memory allocations through SweetPea. + * This file declares the new and delete operators for memory allocation within + * a plug-in. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "ASTypes.h" +#include "SPBasic.h" + +#include +//#include + +extern "C" SPBasicSuite *sSPBasic; + +void * operator new[](size_t size) throw(std::bad_alloc) +{ + void *addr = nullptr; + + if (sSPBasic) + { + ASErr error = sSPBasic->AllocateBlock(size, &addr); + if (error) + addr = nullptr; + } +// else +// DebugStr("\p new() called without sSPBlocks"); + + return addr; +} + +void * operator new(size_t size) throw(std::bad_alloc) +{ + void *addr = nullptr; + + if (sSPBasic) + { + ASErr error = sSPBasic->AllocateBlock(size, &addr); + if (error) + addr = nullptr; + } +// else +// DebugStr("\p new() called without sSPBlocks"); + + return addr; +} + +void operator delete(void * p) throw() +{ + if (sSPBasic && p != NULL) + sSPBasic->FreeBlock(p); +// else +// DebugStr("\p delete() called without sSPBlocks"); +} + +void operator delete [] (void * p) throw() +{ + if (sSPBasic && p != NULL) + sSPBasic->FreeBlock(p); +// else +// DebugStr("\p delete() called without sSPBlocks"); +} + + + + +// ------------------------------------------------------- +// No throw versions +// ------------------------------------------------------- +void * operator new[](size_t size, const std::nothrow_t&) throw() +{ + void *addr = nullptr; + + if (sSPBasic) + { + ASErr error = sSPBasic->AllocateBlock(size, &addr); + if (error) + addr = nullptr; + } +// else +// DebugStr("\p new() called without sSPBlocks"); + + return addr; +} + +void * operator new(size_t size, const std::nothrow_t&) throw() +{ + void *addr = nullptr; + + if (sSPBasic) + { + ASErr error = sSPBasic->AllocateBlock(size, &addr); + if (error) + addr = nullptr; + } +// else +// DebugStr("\p new() called without sSPBlocks"); + + return addr; +} + +void operator delete(void * p, const std::nothrow_t&) throw() +{ + if (sSPBasic && p != NULL) + sSPBasic->FreeBlock(p); +// else +// DebugStr("\p delete() called without sSPBlocks"); +} + +void operator delete [] (void * p, const std::nothrow_t&) throw() +{ + if (sSPBasic && p != NULL) + sSPBasic->FreeBlock(p); +// else +// DebugStr("\p delete() called without sSPBlocks"); +} diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASPragma.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASPragma.h index fa173c6..832b3c8 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASPragma.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASPragma.h @@ -1,33 +1,33 @@ -/***********************************************************************/ -/* */ -/* ASPragma.h */ -/* Makes #defines for #pragmas to eliminate compiler dependencies */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1996-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/* Started by Dave Lazarony, 01/26/1996 */ -/* */ -/***********************************************************************/ - -#ifndef __ASPragma__ -#define __ASPragma__ - -#ifndef __ASConfig__ -#include "ASConfig.h" -#endif - -#error Don't want this file! - - -#endif +/***********************************************************************/ +/* */ +/* ASPragma.h */ +/* Makes #defines for #pragmas to eliminate compiler dependencies */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1996-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/* Started by Dave Lazarony, 01/26/1996 */ +/* */ +/***********************************************************************/ + +#ifndef __ASPragma__ +#define __ASPragma__ + +#ifndef __ASConfig__ +#include "ASConfig.h" +#endif + +#error Don't want this file! + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASTypes.h index 02843d3..4451623 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASTypes.h @@ -1,351 +1,351 @@ -/***********************************************************************/ -/* */ -/* ASTypes.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1996-2015 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/* Started by Dave Lazarony, 01/26/1996 */ -/* */ -/***********************************************************************/ - -#ifndef __ASTypes__ -#define __ASTypes__ - -/* - * Includes - */ - -#ifndef __ASConfig__ -#include "ASConfig.h" -#endif -#include "AIBasicTypes.h" - -#ifdef WIN_ENV - #include "AIWinDef.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - -//We need everything to be properly aligned on Windows -#ifdef WIN_ENV -#pragma pack(push, 8) -#endif - -/* - * Constants - */ - -// true and false - -#ifndef __cplusplus -#ifndef true -#define true 1 -#endif - -#ifndef false -#define false 0 -#endif -#endif // __cplusplus - -#ifdef TRUE -#undef TRUE -#endif -#define TRUE true - -#ifdef FALSE -#undef FALSE -#endif -#define FALSE false - -// error codes -/** @ingroup Errors */ -#define kNoErr 0 -/** @ingroup Errors */ -#define kOutOfMemoryErr '!MEM' -/** @ingroup Errors */ -#define kBadParameterErr 'PARM' -/** @ingroup Errors */ -#define kNotImplementedErr '!IMP' -/** @ingroup Errors (debugging) */ -#define kCantHappenErr 'CANT' - - -// NULL and nil - -#ifndef NULL - -#ifdef MAC_ENV -#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C)) -#define NULL ((void *) 0) -#else -#define NULL 0 -#endif -#endif - -#ifdef WIN_ENV -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#endif - -// dhearst 8/11/99 - we now specifically prefer NULL, so nil -// is obsolete. We no longer provide it, but can't enforce this -// policy because platform headers often provide nil. -#ifndef nil -#define nil NULL -#endif - - -// AMPAPI Adobe Standard Plugin API calling convention. - -#ifndef AMPAPI -#ifdef MAC_ENV -#define ASAPI -#endif -#ifdef WIN_ENV -#define ASAPI -#endif -#endif - -// C calling convention for those places that need it. -// This doesn't really do anything, but is more for -// an explicitly declaration when it matters. -#define ASCAPI - - - -/* - * Types - */ - -// Integer Types - -#ifndef _H_CoreExpT -/** 8-bit integer */ -typedef signed char ASInt8; -/** 16-bit integer */ -typedef signed short ASInt16; - -// ASNumTypes is causing redefination error. -// TODO Replace occurances with ai::int32 before -// moving to 64 bit. -#ifndef __TREAT_ASINT32_AS_INT__ -/** 32-bit integer */ -typedef ai::int32 ASInt32; -#else -typedef signed int ASInt32; -#endif - -#endif -/** 8-bit integer */ -typedef unsigned char ASUInt8; -/** 16-bit integer */ -typedef unsigned short ASUInt16; -/** 32-bit integer */ -typedef ai::uint32 ASUInt32; - -/** Error code */ -typedef ai::int32 ASErr; - -// Storage Types - -typedef unsigned char ASByte; -typedef ASByte* ASBytePtr; - -// Unicode Types -/** Unicode double-byte character */ -typedef ASUInt16 ASUnicode; - -// Pointer Types -/** Void pointer */ -typedef void* ASPtr; -/** Opaque reference */ -typedef void** ASHandle; - -// Fixed Types -/** Numeric value (long) used for fixed-math fractional values, as \c #AIFract. Obsolete. */ -typedef ASInt32 ASFract; -/** Numeric value (floating-point) */ -typedef float ASReal; - -#ifndef _AS_FIXED_TYPE_ -#define _AS_FIXED_TYPE_ 1 - -/** Fixed numeric value - obsolete, use \c #ASReal */ -typedef ASInt32 ASFixed; -/** Point specified with \c #ASFixed coordinates - obsolete, use \c #ASRealPoint */ -typedef struct _t_ASFixedPoint { - ASFixed h, v; -} ASFixedPoint, *ASFixedPointP; - -/** Rectangle specified with \c #ASFixed coordinates - obsolete, use \c #ASRealRect */ -typedef struct _t_ASFixedRect { - ASFixed left, top, right, bottom; -} ASFixedRect, *ASFixedRectP; - -/** Transformation matrix specified with \c #ASFixed values - obsolete, use \c #ASRealMatrix */ -typedef struct _t_ASFixedMatrix { - ASFixed a, b, c, d, tx, ty; -} ASFixedMatrix, *ASFixedMatrixP; - -#endif/* _AS_FIXED_TYPE_ */ - -/** Point specified with \c #ASReal coordinates */ -typedef struct _t_ASRealPoint { - ASReal h, v; -} ASRealPoint; - -/** Rectangle specified with \c #ASReal coordinates */ -typedef struct _t_ASRealRect { - ASReal left, top, right, bottom; -} ASRealRect; - -/** Transformation matrix specified with \c #ASReal values */ -typedef struct _t_ASRealMatrix { - ASReal a, b, c, d, tx, ty; - void Init() - { - a = 0.0; b = 1.0; - c = 1.0; d = 0.0; - tx = 0.0; ty = 0.0; - } -} ASRealMatrix; - -/** Generic reference to a resource (plug-in) file. - Generally equivalent to an \c #SPPluginRef */ -typedef struct ASAccess* ASAccessRef; - - -// -// -// Platform dependant natively aligned structures -// -// - -#ifdef MAC_ENV -/** Mac OS only. Size type for Mac OS \c Rect and \c Point.*/ -typedef short ASSize; - -/** Mac OS only. the same as Mac OS \c Boolean. */ -typedef unsigned char ASBoolean; -#endif - -#ifdef WIN_ENV -/** Windows only. the same as Windows \c BOOL. */ -typedef int ASBoolean; - -/** Windows only. Size type for Windows \c Rect and \c Point.*/ -typedef ai::int32 ASSize; -#endif - - -// -// -// Platform dependant fixed alignment (68K on Mac, 4 Byte on Windows) structures -// -// -#if defined(MAC_ENV) && !__LP64__ -#pragma options align=mac68k -#endif -// Platform Structures - -#ifdef MAC_ENV - -/** Port reference, Mac OS only, same as Mac OS \c CGrafPtr. */ -typedef struct MacPort_t* AIPortRef; - -/** Window reference, Mac OS only, same as Mac OS \c WindowPtr. */ -typedef struct MacWindow_t* AIWindowRef; - -/** Dialog reference, Mac OS only, same as Mac OS \c DialogPtr. */ -typedef struct MacDialog_t* AIDialogRef; - -// ASRect is the same size and layout as a Macintosh Rect. -/*typedef struct _t_ASRect { - ASSize top, left, bottom, right; -} ASRect;*/ - -// ASPoint is the same size and layout as a Macintosh Point. -/*typedef struct _t_ASPoint { - ASSize v, h; -} ASPoint;*/ - -#endif - - -#ifdef WIN_ENV - -/** Port reference, Windows only, same as Windows \c HDC. */ -typedef HDC ASPortRef; - -/** Window reference, Windows only, same as Windows \c HWND. */ -typedef HWND ASWindowRef; - -/** Dialog reference, Windows only, same as Windows \c HWND. */ -typedef HWND ASDialogRef; - -// ASRect is the same size and layout as a Windows RECT. -/*typedef struct _t_ASRect { - ASSize left, top, right, bottom; -} ASRect;*/ - -// ASPoint is the same size and layout as a Windows POINT. -/*typedef struct _t_ASPoint { - ASSize h, v; -} ASPoint;*/ - -#endif - -// ASRGBColor is the same as a Macintosh RGBColor on Macintosh and Windows. -/*typedef struct _t_ASRGBColor { - unsigned short red, green, blue; -} ASRGBColor;*/ - - -// AIEvent is the same as a Macintosh EventRecord on Macintosh and Windows. -/*typedef struct _t_ASEvent { - unsigned short what; - unsigned long message; - unsigned long when; - ASPoint where; - unsigned short modifiers; - -} ASEvent;*/ - -#if defined(MAC_ENV) && !__LP64__ -#pragma options align=reset -#endif -#ifdef WIN_ENV -#pragma pack(pop) -#endif - -// -// -// End of Aligned Structures -// -// - -#ifdef __cplusplus -} -#endif - - -#endif +/***********************************************************************/ +/* */ +/* ASTypes.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1996-2015 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/* Started by Dave Lazarony, 01/26/1996 */ +/* */ +/***********************************************************************/ + +#ifndef __ASTypes__ +#define __ASTypes__ + +/* + * Includes + */ + +#ifndef __ASConfig__ +#include "ASConfig.h" +#endif +#include "AIBasicTypes.h" + +#ifdef WIN_ENV + #include "AIWinDef.h" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + +//We need everything to be properly aligned on Windows +#ifdef WIN_ENV +#pragma pack(push, 8) +#endif + +/* + * Constants + */ + +// true and false + +#ifndef __cplusplus +#ifndef true +#define true 1 +#endif + +#ifndef false +#define false 0 +#endif +#endif // __cplusplus + +#ifdef TRUE +#undef TRUE +#endif +#define TRUE true + +#ifdef FALSE +#undef FALSE +#endif +#define FALSE false + +// error codes +/** @ingroup Errors */ +#define kNoErr 0 +/** @ingroup Errors */ +#define kOutOfMemoryErr '!MEM' +/** @ingroup Errors */ +#define kBadParameterErr 'PARM' +/** @ingroup Errors */ +#define kNotImplementedErr '!IMP' +/** @ingroup Errors (debugging) */ +#define kCantHappenErr 'CANT' + + +#ifndef NULL + +#ifdef MAC_ENV +#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C)) +#define NULL ((void *) 0) +#else +#define NULL 0 +#endif +#endif + +#ifdef WIN_ENV +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +#endif + +// AMPAPI Adobe Standard Plugin API calling convention. + +#ifndef AMPAPI +#ifdef MAC_ENV +#define ASAPI +#endif +#ifdef WIN_ENV +#define ASAPI +#endif +#ifdef LINUX_ENV +#define ASAPI +#endif +#endif + +// C calling convention for those places that need it. +// This doesn't really do anything, but is more for +// an explicitly declaration when it matters. +#define ASCAPI + + + +/* + * Types + */ + +// Integer Types + +#ifndef _H_CoreExpT +/** 8-bit integer */ +typedef signed char ASInt8; +/** 16-bit integer */ +typedef signed short ASInt16; + +// ASNumTypes is causing redefination error. +// TODO Replace occurances with ai::int32 before +// moving to 64 bit. +#ifndef __TREAT_ASINT32_AS_INT__ +/** 32-bit integer */ +typedef ai::int32 ASInt32; +#else +typedef signed int ASInt32; +#endif + +#endif +/** 8-bit integer */ +typedef unsigned char ASUInt8; +/** 16-bit integer */ +typedef unsigned short ASUInt16; +/** 32-bit integer */ +typedef ai::uint32 ASUInt32; + +/** Error code */ +typedef ai::int32 ASErr; + +// Storage Types + +typedef unsigned char ASByte; +typedef ASByte* ASBytePtr; + +// Unicode Types +/** Unicode double-byte character */ +typedef ASUInt16 ASUnicode; + +// Pointer Types +/** Void pointer */ +typedef void* ASPtr; +/** Opaque reference */ +typedef void** ASHandle; + +// Fixed Types +/** Numeric value (long) used for fixed-math fractional values, as \c #AIFract. Obsolete. */ +typedef ASInt32 ASFract; +/** Numeric value (floating-point) */ +typedef float ASReal; + +#ifndef _AS_FIXED_TYPE_ +#define _AS_FIXED_TYPE_ 1 + +/** Fixed numeric value - obsolete, use \c #ASReal */ +typedef ASInt32 ASFixed; +/** Point specified with \c #ASFixed coordinates - obsolete, use \c #ASRealPoint */ +typedef struct _t_ASFixedPoint { + ASFixed h, v; +} ASFixedPoint, *ASFixedPointP; + +/** Rectangle specified with \c #ASFixed coordinates - obsolete, use \c #ASRealRect */ +typedef struct _t_ASFixedRect { + ASFixed left, top, right, bottom; +} ASFixedRect, *ASFixedRectP; + +/** Transformation matrix specified with \c #ASFixed values - obsolete, use \c #ASRealMatrix */ +typedef struct _t_ASFixedMatrix { + ASFixed a, b, c, d, tx, ty; +} ASFixedMatrix, *ASFixedMatrixP; + +#endif/* _AS_FIXED_TYPE_ */ + +/** Point specified with \c #ASReal coordinates */ +typedef struct _t_ASRealPoint { + ASReal h, v; +} ASRealPoint; + +/** Rectangle specified with \c #ASReal coordinates */ +typedef struct _t_ASRealRect { + ASReal left, top, right, bottom; +} ASRealRect; + +/** Transformation matrix specified with \c #ASReal values */ +typedef struct _t_ASRealMatrix { + ASReal a, b, c, d, tx, ty; + void Init() + { + a = 0.0; b = 1.0; + c = 1.0; d = 0.0; + tx = 0.0; ty = 0.0; + } +} ASRealMatrix; + +/** Generic reference to a resource (plug-in) file. + Generally equivalent to an \c #SPPluginRef */ +typedef struct ASAccess* ASAccessRef; + + +// +// +// Platform dependant natively aligned structures +// +// + +#ifdef MAC_ENV +/** Mac OS only. Size type for Mac OS \c Rect and \c Point.*/ +typedef short ASSize; + +/** Mac OS only. the same as Mac OS \c Boolean. */ +typedef unsigned char ASBoolean; +#endif + +#ifdef LINUX_ENV +typedef short ASSize; + +typedef unsigned char ASBoolean; +#endif + + +#ifdef WIN_ENV +/** Windows only. the same as Windows \c BOOL. */ +typedef int ASBoolean; + +/** Windows only. Size type for Windows \c Rect and \c Point.*/ +typedef ai::int32 ASSize; +#endif + + +// +// +// Platform dependant fixed alignment (68K on Mac, 4 Byte on Windows) structures +// +// +#if defined(MAC_ENV) && !__LP64__ +#pragma options align=mac68k +#endif +// Platform Structures + +#ifdef MAC_ENV + +/** Port reference, Mac OS only, same as Mac OS \c CGrafPtr. */ +typedef struct MacPort_t* AIPortRef; + +/** Window reference, Mac OS only, same as Mac OS \c WindowPtr. */ +typedef struct MacWindow_t* AIWindowRef; + +/** Dialog reference, Mac OS only, same as Mac OS \c DialogPtr. */ +typedef struct MacDialog_t* AIDialogRef; + +// ASRect is the same size and layout as a Macintosh Rect. +/*typedef struct _t_ASRect { + ASSize top, left, bottom, right; +} ASRect;*/ + +// ASPoint is the same size and layout as a Macintosh Point. +/*typedef struct _t_ASPoint { + ASSize v, h; +} ASPoint;*/ + +#endif + + +#ifdef WIN_ENV + +/** Port reference, Windows only, same as Windows \c HDC. */ +typedef HDC ASPortRef; + +/** Window reference, Windows only, same as Windows \c HWND. */ +typedef HWND ASWindowRef; + +/** Dialog reference, Windows only, same as Windows \c HWND. */ +typedef HWND ASDialogRef; + +// ASRect is the same size and layout as a Windows RECT. +/*typedef struct _t_ASRect { + ASSize left, top, right, bottom; +} ASRect;*/ + +// ASPoint is the same size and layout as a Windows POINT. +/*typedef struct _t_ASPoint { + ASSize h, v; +} ASPoint;*/ + +#endif + +// ASRGBColor is the same as a Macintosh RGBColor on Macintosh and Windows. +/*typedef struct _t_ASRGBColor { + unsigned short red, green, blue; +} ASRGBColor;*/ + + +// AIEvent is the same as a Macintosh EventRecord on Macintosh and Windows. +/*typedef struct _t_ASEvent { + unsigned short what; + unsigned long message; + unsigned long when; + ASPoint where; + unsigned short modifiers; + +} ASEvent;*/ + +#if defined(MAC_ENV) && !__LP64__ +#pragma options align=reset +#endif +#ifdef WIN_ENV +#pragma pack(pop) +#endif + +// +// +// End of Aligned Structures +// +// + +#ifdef __cplusplus +} +#endif + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASUserInteraction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASUserInteraction.h index 8ed2479..fe1acc1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASUserInteraction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/ASUserInteraction.h @@ -1,256 +1,306 @@ -#ifndef __ASUserInteraction__ -#define __ASUserInteraction__ - -/* - * Name: ASUserInteraction.h - * $Revision: 1 $ - * Author: Andy Bachorski - * Date: - * Purpose: Adobe Standard User Interaction Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - - -#include "SPBasic.h" - -#ifndef __UserInteractionCheckerDefined__ -#include "IAIUnicodeString.h" -#endif - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** User interaction suite name. */ -#define kASUserInteractionSuite "AS User Interaction Suite" -/** User interaction suite version. */ -#define kASUserInteractionSuiteVersion4 4 -/** User interaction suite version. */ -#define kASUserInteractionSuiteVersion kASUserInteractionSuiteVersion4 -/** User interaction suite name. */ -#define kASUserInteractionVersion kASUserInteractionSuiteVersion - -/******************************************************************************* - ** - ** Error codes - ** - **/ - -/** @ingroup Errors - See \c #ASUserInteractionSuite. */ -#define kErrUnknowInteractionLevel 'UILv' - - -/******************************************************************************* - ** - ** Types - ** - **/ -/** User-interaction constants. This is an application preference for whether the - application responds to messages with a modal dialog or alert, or by - writing to a log file. */ -typedef enum _t_ASInteractionAllowed { - /** The application cannot display any modal dialogs or alerts. - A message is written to a log file instead. */ - kASInteractWithNone = -1, // Don't interact - /** In Mac OS, display alerts for self-sent messages. - In Windows, this is the same as \c #kASInteractWithAll. */ - kASInteractWithSelf = 0, // Interact for self-send messages - /** In Mac OS, display alerts for local and self-sent messages, but not remote messages. - In Windows, this is the same as \c #kASInteractWithAll.*/ - kASInteractWithLocal = 1, // Interact for local & self-send messages (not remote messages) - /** The application can display any modal dialog or alerts. */ - kASInteractWithAll = 2 // Interact for all messages -} ASInteractionAllowed; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides access to the application preference for how the - application responds to messages. When user interaction is on, the - application displays alerts in response to informational, warning, and - error messages. When it is off, the application writes to a log file. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kASUserInteractionSuite and \c #kASUserInteractionVersion. - */ -typedef struct { - - /** Reports the level of interaction that is allowed between - the application and the user, according to the application preference. - (Note that this function returns a constant value, not an error code.) - @return The interaction level constant. - */ - ASAPI ASInteractionAllowed (*GetInteractionAllowed) ( void ); - /** Sets the level of interaction that is allowed between - the application and the user. The default value is \c #kASInteractWithAll. - @param allowed The interaction level constant. - */ - ASAPI ASErr (*SetInteractionAllowed) ( ASInteractionAllowed allowed ); - - /** Reports whether interaction is allowed between the application and the user - in the current application context. - (Note that this function returns a boolean value, not an error code.) - @return True if the interaction level is anything other than - \c #kASInteractWithNone. - */ - ASAPI ASBoolean (*InteractWithUser) ( void ); - - /** Sets the log message using a C string. This message is - written to the log file when an alert condition occurs, - if user interactivity is turned off. - @param msg The message text, a null-terminated UTF-8 string. - */ - ASAPI ASErr (*LogInteraction) ( const char *msg ); - - /** Sets the log message using a Unicode string. This message is - written to the log file when an alert condition occurs, - if user interactivity is turned off. - @param msg The message text, a null-terminated UTF-16 string. - */ - ASAPI ASErr (*LogInteractionW) ( const ASUnicode *msg ); - - -} ASUserInteractionSuite; - -#ifndef __UserInteractionCheckerDefined__ -// -// A stack based class for checking the user interaction level. -// -class ASUserInteractionChecker -{ -public: - /** Constructor. Creates a user-interaction checker object. - @param spBasic The SPBasic suite object. - @return The new object. - */ - ASUserInteractionChecker(SPBasicSuite *spBasic) - { - m_SPBasic = spBasic; - m_SuitePtr = NULL; - if (m_SPBasic) - { - ASErr error = m_SPBasic->AcquireSuite(kASUserInteractionSuite, - kASUserInteractionVersion, - (const void **)&m_SuitePtr); - if(error != kNoErr) - { - m_SuitePtr = NULL; - } - } - } - /** Reports whether interaction is allowed between the application and the user - in the current application context. - (Note that this method returns a boolean value, not an error code.) - @return True if the interaction level is anything other than - \c #kASInteractWithNone. - */ - ASBoolean InteractWithUser(void) - { - if (m_SuitePtr) - return m_SuitePtr->InteractWithUser(); - else - return true; - } - - /** Sets the message to write to the user-interaction log - when an Info alert occurs, if user interactivity is turned off. - @param msg1 The message string. - @param msg2 Optional. Another message string. - */ - ASErr logInfo(const ai::UnicodeString& msg1, const ai::UnicodeString *msg2=NULL) - { - ASErr err = kNoErr; - - if (m_SuitePtr && !InteractWithUser()) - { - if (msg2) - { - ai::UnicodeString::UTF32TextChar c = ' '; - ai::UnicodeString msg = msg1; - msg += ai::UnicodeString(1,c); - msg.append(*msg2); - err = m_SuitePtr->LogInteraction(msg.as_UTF8().c_str()); - } - else - { - err = m_SuitePtr->LogInteraction(msg1.as_UTF8().c_str()); - } - } - - return err; - } - /** Sets the message to write to the user-interaction log - when an Error alert occurs, if user interactivity is turned off. - @param msg1 The message string. - @param msg2 Optional. Another message string. - */ - void logError(const ai::UnicodeString& msg1, const ai::UnicodeString *msg2=NULL) - { - ai::UnicodeString msg("Error: "); - msg += msg1; - logInfo(msg, msg2); - } - /** Sets the message to write to the user-interaction log - when a Warning alert occurs, if user interactivity is turned off. - @param msg1 The message string. - @param msg2 Optional. Another message string. - */ - void logWarning(const ai::UnicodeString& msg1, const ai::UnicodeString *msg2=NULL) - { - ai::UnicodeString msg("Warning: "); - msg += msg1; - logInfo(msg, msg2); - } - /** Destructor */ - ~ASUserInteractionChecker() - { - if (m_SuitePtr && m_SPBasic) - { - m_SPBasic->ReleaseSuite(kASUserInteractionSuite, kASUserInteractionVersion); - m_SuitePtr = NULL; - } - } - -private: - SPBasicSuite *m_SPBasic; - ASUserInteractionSuite *m_SuitePtr; -}; - -#endif // __UserInteractionCheckerDefined__ - -#include "AIHeaderEnd.h" - -#endif // __ASUserInteraction__ - +#ifndef __ASUserInteraction__ +#define __ASUserInteraction__ + +/* + * Name: ASUserInteraction.h + * $Revision: 1 $ + * Author: Andy Bachorski + * Date: + * Purpose: Adobe Standard User Interaction Suite + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2001-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPBasic.h" + +#ifndef __UserInteractionCheckerDefined__ +#include "IAIUnicodeString.h" +#include "AIErrorHandler.h" +#endif + + +#include "AIHeaderBegin.h" + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** User interaction suite name. */ +#define kASUserInteractionSuite "AS User Interaction Suite" +/** User interaction suite version. */ +#define kASUserInteractionSuiteVersion4 4 +/** User interaction suite version. */ +#define kASUserInteractionSuiteVersion kASUserInteractionSuiteVersion4 +/** User interaction suite name. */ +#define kASUserInteractionVersion kASUserInteractionSuiteVersion + +/******************************************************************************* + ** + ** Error codes + ** + **/ + +/** @ingroup Errors + See \c #ASUserInteractionSuite. */ +#define kErrUnknowInteractionLevel 'UILv' + + +/******************************************************************************* + ** + ** Types + ** + **/ +/** User-interaction constants. This is an application preference for whether the + application responds to messages with a modal dialog or alert, or by + writing to a log file. */ +typedef enum _t_ASInteractionAllowed { + /** The application cannot display any modal dialogs or alerts. + A message is written to a log file instead. */ + kASInteractWithNone = -1, // Don't interact + /** In Mac OS, display alerts for self-sent messages. + In Windows, this is the same as \c #kASInteractWithAll. */ + kASInteractWithSelf = 0, // Interact for self-send messages + /** In Mac OS, display alerts for local and self-sent messages, but not remote messages. + In Windows, this is the same as \c #kASInteractWithAll.*/ + kASInteractWithLocal = 1, // Interact for local & self-send messages (not remote messages) + /** The application can display any modal dialog or alerts. */ + kASInteractWithAll = 2 // Interact for all messages +} ASInteractionAllowed; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides access to the application preference for how the + application responds to messages. When user interaction is on, the + application displays alerts in response to informational, warning, and + error messages. When it is off, the application writes to a log file. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kASUserInteractionSuite and \c #kASUserInteractionVersion. + */ +typedef struct { + + /** Reports the level of interaction that is allowed between + the application and the user, according to the application preference. + (Note that this function returns a constant value, not an error code.) + @return The interaction level constant. + */ + ASAPI ASInteractionAllowed (*GetInteractionAllowed) ( void ); + /** Sets the level of interaction that is allowed between + the application and the user. The default value is \c #kASInteractWithAll. + @param allowed The interaction level constant. + */ + ASAPI ASErr (*SetInteractionAllowed) ( ASInteractionAllowed allowed ); + + /** Reports whether interaction is allowed between the application and the user + in the current application context. + (Note that this function returns a boolean value, not an error code.) + @return True if the interaction level is anything other than + \c #kASInteractWithNone. + */ + ASAPI ASBoolean (*InteractWithUser) ( void ); + + /** Sets the log message using a C string. This message is + written to the log file when an alert condition occurs, + if user interactivity is turned off. + @param msg The message text, a null-terminated UTF-8 string. + */ + ASAPI ASErr (*LogInteraction) ( const char *msg ); + + /** Sets the log message using a Unicode string. This message is + written to the log file when an alert condition occurs, + if user interactivity is turned off. + @param msg The message text, a null-terminated UTF-16 string. + */ + ASAPI ASErr (*LogInteractionW) ( const ASUnicode *msg ); + + +} ASUserInteractionSuite; + +#ifndef __UserInteractionCheckerDefined__ +// +// A stack based class for checking the user interaction level. +// +class ASUserInteractionChecker +{ +public: + /** Constructor. Creates a user-interaction checker object. + @param spBasic The SPBasic suite object. + @return The new object. + */ + ASUserInteractionChecker(SPBasicSuite *spBasic) + { + m_SPBasic = spBasic; + m_SuitePtr = NULL; + if (m_SPBasic) + { + ASErr error = m_SPBasic->AcquireSuite(kASUserInteractionSuite, + kASUserInteractionVersion, + (const void **)&m_SuitePtr); + if(error != kNoErr) + { + m_SuitePtr = NULL; + } + } + } + /** Reports whether interaction is allowed between the application and the user + in the current application context. + (Note that this method returns a boolean value, not an error code.) + @return True if the interaction level is anything other than + \c #kASInteractWithNone. + */ + ASBoolean InteractWithUser(void) + { + if (m_SuitePtr) + return m_SuitePtr->InteractWithUser(); + else + return true; + } + + /** Sets the message to write to the user-interaction log + when an Info alert occurs, if user interactivity is turned off. + @param msg1 The message string. + @param msg2 Optional. Another message string. + */ + ASErr logInfo(const ai::UnicodeString& msg1, const ai::UnicodeString *msg2=NULL) + { + ASErr err = kNoErr; + + try + { + if (m_SuitePtr && !InteractWithUser()) + { + if (msg2) + { + ai::UnicodeString::UTF32TextChar c = ' '; + ai::UnicodeString msg = msg1; + msg += ai::UnicodeString(1,c); + msg.append(*msg2); + err = m_SuitePtr->LogInteraction(msg.as_UTF8().c_str()); + } + else + { + err = m_SuitePtr->LogInteraction(msg1.as_UTF8().c_str()); + } + } + } + AI_CATCH_RETURN; + + return err; + } + /** Sets the message to write to the user-interaction log + when an Error alert occurs, if user interactivity is turned off. + @param msg1 The message string. + @param msg2 Optional. Another message string. + */ + void logError(const ai::UnicodeString& msg1, const ai::UnicodeString *msg2=NULL) + { + try + { + ai::UnicodeString msg("Error: "); + msg += msg1; + logInfo(msg, msg2); + } + AI_CATCH_NO_RETURN; + } + /** Sets the message to write to the user-interaction log + when a Warning alert occurs, if user interactivity is turned off. + @param msg1 The message string. + @param msg2 Optional. Another message string. + */ + void logWarning(const ai::UnicodeString& msg1, const ai::UnicodeString *msg2 = NULL) + { + try + { + ai::UnicodeString msg("Warning: "); + msg += msg1; + logInfo(msg, msg2); + } + AI_CATCH_NO_RETURN; + } + /** Destructor */ + ~ASUserInteractionChecker() + { + if (m_SuitePtr && m_SPBasic) + { + m_SPBasic->ReleaseSuite(kASUserInteractionSuite, kASUserInteractionVersion); + m_SuitePtr = NULL; + } + } + +private: + SPBasicSuite *m_SPBasic; + ASUserInteractionSuite *m_SuitePtr; +}; + + +class AutoInteractionLevel +{ +public: + AutoInteractionLevel(SPBasicSuite *spBasic,ASInteractionAllowed interactionLevel) + { + m_SPBasic = spBasic; + if (m_SPBasic) + { + mError = m_SPBasic->AcquireSuite(kASUserInteractionSuite, + kASUserInteractionVersion, + (const void **)&m_SuitePtr); + if(mError != kNoErr) + { + m_SuitePtr = nullptr; + } + } + if(m_SuitePtr && mError == kNoErr) + { + mInteractionAllowed = m_SuitePtr->GetInteractionAllowed(); + mError = m_SuitePtr->SetInteractionAllowed(interactionLevel); + } + } + ~AutoInteractionLevel() + { + if(m_SuitePtr && mError == kNoErr) + mError = m_SuitePtr->SetInteractionAllowed(mInteractionAllowed); + + if (m_SuitePtr && m_SPBasic) + { + m_SPBasic->ReleaseSuite(kASUserInteractionSuite, kASUserInteractionVersion); + m_SuitePtr = nullptr; + } + } +private: + ASInteractionAllowed mInteractionAllowed{}; + SPBasicSuite *m_SPBasic = nullptr; + ASUserInteractionSuite *m_SuitePtr = nullptr; + ASErr mError = kBadParameterErr; +}; + +#endif // __UserInteractionCheckerDefined__ + +#include "AIHeaderEnd.h" + +#endif // __ASUserInteraction__ + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AutoSuite.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AutoSuite.h index f92c181..1cc8789 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/AutoSuite.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/AutoSuite.h @@ -1,238 +1,437 @@ -#ifndef _AUTOSUITE_H_ -#define _AUTOSUITE_H_ - -/* - * Name: AutoSuite.h - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "SPBasic.h" -#include "AITypes.h" - - -namespace ai { -// start of namespace ai - -//-------------------------------------------------------------------------------- -// The AutoSuite class together with the template SuitePtr class provides -// automatic acquisition and releasing of suite pointers. To use these classes -// a plugin must do the following: -// -// 1. declare the following globals somewhere, they provide the head of the -// list of suites acquired and a pointer to the SPBasicSuite needed to -// acquire suites. -// ai::AutoSuite* ai::AutoSuite::sHead; -// SPBasicSuite* ai::AutoSuite::sSPBasic; -// -// 2. call ai::AutoSuite::Load(message->d.basic) on Startup and Reload. This -// supplies the SPBasicSuite which is needed to acquire additional suites. -// -// 3. call ai::AutoSuite::Unload() on Unload and Shutdown. This releases all -// suites the plugin has acquired. -// -// To declare and use an auto suite pointer in a particular source file write -// code such as that which follows. If a suite cannot be acquired an exception -// will be thrown. -// -// #include "AutoSuite.h" -// #include "AIArt.h" -// -// use_suite(AIArt) -// -// int myPathMaker (AIArtHandle* path) -// { -// sAIArt->NewArt(kPathArt, kPlaceAboveAll, 0, path); -// } -// -// The following code fragment illustrates the use of a SuiteContext. The -// constructor of the context remembers which suites were acquired at that -// time. Its destructor releases all suites acquired since it was constructed. -// The overhead for doing this is trivial. -// -// int myFunction () -// { -// ai::SuiteContext mycontext; -// ... lots of code ... -// } -//-------------------------------------------------------------------------------- - -class AutoSuite { - friend class SuiteContext; -public: - // initialize AutoSuite mechanism on startup or reload specifying the - // address of the SPBasicSuite - static void Load (SPBasicSuite* basic) - { - sSPBasic = basic; - sHead = 0; - } - // on unload or shutdown releases all suites - static void Unload (AutoSuite* contextHead = 0) - { - while (sHead != contextHead) - { - sHead->Release(); - sHead = sHead->fNext; - } - } - - // the constructor initializes the pointer to the next suite in - // the list of suites allocated and the pointer to the suite itself. - AutoSuite () : fNext(0), fSuite(0) - {} - - // acquire the suite pointer - const void* Acquire () - { - if (!fSuite) - { - SPErr error = sSPBasic->AcquireSuite(Name(), Version(), &fSuite); - if (error) - throw ai::Error(error); - Push(this); - } - return fSuite; - } - - // release the suite pointer - void Release () - { - if (fSuite) - sSPBasic->ReleaseSuite(Name(), Version()); - fSuite = 0; - } - - // does the suite exist? - AIBoolean SuiteExists () - { - try - { - Acquire(); - } - catch (ai::Error&) - { - } - return fSuite != 0; - } - -protected: - // globals needed by the mechanism - static SPBasicSuite* sSPBasic; - static AutoSuite* sHead; - - // adds the suite to the list of those acquired - static void Push (AutoSuite* suite) - {suite->fNext = sHead; sHead = suite;} - - // subclass must define the suite name and version - virtual const char* Name () = 0; - virtual ai::int32 Version () = 0; - - virtual ~AutoSuite() {} ; - AutoSuite(const AutoSuite&); - AutoSuite & operator =(const AutoSuite&); - - AutoSuite* fNext; // pointer to next suite in chain - const void* fSuite; // the suite pointer itself -}; - - -// a SuiteContext can be used to ensure that all suites acquired within the -// context are released on exit -class SuiteContext { -public: - SuiteContext () : fHead(AutoSuite::sHead) - {} - ~SuiteContext () - { - AutoSuite::Unload(fHead); - } - -private: - SuiteContext(const SuiteContext&); - SuiteContext& operator =(const SuiteContext&); - AutoSuite* fHead; -}; - - -template class SuitePtr : public AutoSuite { -protected: - const char* Name () {return suite::name();} - ai::int32 Version () {return suite::version;} -}; - -// an actual smart suite pointer -template class Suite { -public: - bool operator !() - { - return !Exists(); - } - - AIBoolean Exists () - {return Ptr().SuiteExists();} - - const typename suite::methods* operator-> () - {return static_cast(Ptr().Acquire());} - -private: - SuitePtr& Ptr () - {static SuitePtr sSuitePtr; return sSuitePtr;} -}; - - -// end of namespace ai -} - - -//-------------------------------------------------------------------------------- -// the following macros are used to declare a non-ADM suite pointer. -//-------------------------------------------------------------------------------- - -#define declare_suite(suite) \ - namespace ai { \ - class S##suite { \ - public: \ - typedef suite##Suite methods; \ - enum {version = k##suite##SuiteVersion}; \ - static const char* name () {return k##suite##Suite;}; \ - }; \ - } -#define define_suite(suite) static ai::Suite s##suite; -#define use_suite(suite) declare_suite(suite) define_suite(suite) - -#define extern_declare_suite(suite) declare_suite(suite) extern ai::Suite s##suite; -#define extern_define_suite(suite) ai::Suite s##suite; - -//-------------------------------------------------------------------------------- -// the following macros are used to declare an ADM suite pointer. the suite -// version is needed in addition to its name. -//-------------------------------------------------------------------------------- - -#define declare_adm_suite(suite, vers) \ - namespace ai { \ - class S##suite##vers { \ - public: \ - typedef suite##Suite##vers methods; \ - enum {version = k##suite##SuiteVersion##vers}; \ - static const char* name () {return k##suite##Suite;}; \ - }; \ - } -#define define_adm_suite(suite, vers) static ai::Suite s##suite; -#define use_adm_suite(suite, vers) declare_adm_suite(suite, vers) define_adm_suite(suite, vers) -#define extern_declare_adm_suite(suite, vers) declare_adm_suite(suite, vers) extern ai::Suite s##suite; -#define extern_define_adm_suite(suite, vers) ai::Suite s##suite; - - -#endif +/************************************************************************* + * ADOBE CONFIDENTIAL + * ___________________ + * + * Copyright 2005 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + **************************************************************************/ + +#pragma once +#include "SPBasic.h" +#include "AITypes.h" + +#ifdef STATIC_LINKED_PLUGIN +#include +#include +#endif + +#ifndef NDEBUG +#define AUTO_SUITE_LOG_DEBUG(...) \ +{ \ +fprintf(__VA_ARGS__); \ +} +#else +#define AUTO_SUITE_LOG_DEBUG(...) +#endif + +namespace ai { +// start of namespace ai + +//-------------------------------------------------------------------------------- +// The AutoSuite class together with the template SuitePtr class provides +// automatic acquisition and releasing of suite pointers. To use these classes +// a plugin must do the following: +// +// 1. declare the following globals somewhere, they provide the head of the +// list of suites acquired and a pointer to the SPBasicSuite needed to +// acquire suites. +// SPBasicSuite* ai::AutoSuite::sSPBasic; +// +// ai::AutoSuite* & ai::AutoSuite::GetHead() +// { +// static ai::AutoSuite* headPtr = nullptr; +// return headPtr; +// } +// +// 2. call ai::AutoSuite::Load(message->d.basic) on Startup and Reload. This +// supplies the SPBasicSuite which is needed to acquire additional suites. +// +// 3. call ai::AutoSuite::LoadRequired(message->d.basic) on Startup and Reload. +// This supplies the SPBasicSuite which is needed to acquire additional suites. +// It will return kNoErr if all required suites are acquired or it will return +// kSPSuiteNotFoundError if any of the required suite is not acquired. +// +// 4. call ai::AutoSuite::Unload() on Unload and Shutdown. This releases all +// suites the plugin has acquired. +// +// To declare and use an optional auto suite pointer in a particular source file +// write code such as that which follows. This suite will be acquired only when +// its being used in the code flow. If a suite cannot be acquired an exception +// will be thrown. +// +// #include "AutoSuite.h" +// #include "AIArt.h" +// +// use_suite_optional(AIArt) +// +// int myPathMaker (AIArtHandle* path) +// { +// if(sAIArt) // "if check" for checking that suite can be acquired +// { +// sAIArt->NewArt(kPathArt, kPlaceAboveAll, 0, path); // if it used wihout "if check", it will throw an exeption if the suite cannot be acquired +// } +// } +// +// +// To declare and use a required auto suite pointer in a particular source file +// write code such as that which follows. All the required suites are acquired +// when LoadRequired() is called (at plugin start). If a suite cannot be +// acquired then plugin will fail to start. +// +// +// #include "AutoSuite.h" +// #include "AIArt.h" +// +// use_suite_required(AIArt) +// +// int myPathMaker (AIArtHandle* path) +// { +// sAIArt->NewArt(kPathArt, kPlaceAboveAll, 0, path); +// } +// +// The following code fragment illustrates the use of a SuiteContext. The +// constructor of the context remembers which suites were acquired at that +// time. Its destructor releases all suites acquired since it was constructed. +// The overhead for doing this is trivial. +// +// int myFunction () +// { +// ai::SuiteContext mycontext; +// ... lots of code ... +// } +//-------------------------------------------------------------------------------- + +class AutoSuite { + friend class SuiteContext; +public: + + AutoSuite(const char* name, ai::int32 version, AIBool8 required) : + fName(name), fVersion(version), fRequired(required) + { + if (fRequired) + Push(this); + } + + // initialize AutoSuite mechanism on startup or reload specifying the + // address of the SPBasicSuite + static void Load(SPBasicSuite* basic) + { + sSPBasic = basic; + } + + // initialize AutoSuite mechanism on startup or reload specifying the + // address of the SPBasicSuite and acquire the required suites + static AIErr LoadRequired(SPBasicSuite* basic) + { +#ifndef STATIC_LINKED_PLUGIN + Load(basic); + AutoSuite* node = GetHead(); + while (node) + { + if (node->fRequired) + { + if (!node->SuiteExists()) + { + ReleaseRequired(node); + return kSPSuiteNotFoundError; + } + } + node = node->fNext; + } +#endif + return kNoErr; + } + +#ifdef STATIC_LINKED_PLUGIN + static AIErr LoadRequiredStatic(SPBasicSuite* basic, const std::set& allowlist={}) + { + Load(basic); + AutoSuite* node = GetHead(); + while (node) + { + if (node->fRequired) + { + if (!node->SuiteExists()) + { + if (auto it = allowlist.find(node->fName) == allowlist.end()) + { + AUTO_SUITE_LOG_DEBUG(stderr, "\t Suite %s is required, but absent from allowlist.\n", node->fName); + ReleaseRequired(node); + return kSPSuiteNotFoundError; + } + else + { + AUTO_SUITE_LOG_DEBUG(stderr, "\t Suite %s is required and in allowlist.\n", node->fName); + } + } + } + node = node->fNext; + } + return kNoErr; + } +#endif + + // on unload or shutdown releases all suites + static void Unload(AutoSuite* contextHead = nullptr) + { + AutoSuite* &headPtr = GetHead(); + while (headPtr != contextHead) + { + headPtr->Release(); + headPtr = headPtr->fNext; + } + } + + // acquire the suite pointer + const void* Acquire() + { + if (!fSuite && sSPBasic) + { + SPErr error = sSPBasic->AcquireSuite(Name(), Version(), &fSuite); + if (error) + throw ai::Error(error); + if (!fRequired) + Push(this); + } + return fSuite; + } + + // acquire the suite pointer // no throw + const void* AcquireNoExept() AINOEXCEPT + { + if (!fSuite && sSPBasic) + { + SPErr error = sSPBasic->AcquireSuite(Name(), Version(), &fSuite); + if (error) + fSuite = nullptr; + else if (!fRequired) + Push(this); + } + return fSuite; + } + + // release the suite pointer + void Release() + { + if (fSuite && sSPBasic) + { + sSPBasic->ReleaseSuite(Name(), Version()); + fSuite = nullptr; + } + } + + // does the suite exist? + AIBool8 SuiteExists() + { + AcquireNoExept(); + return fSuite != nullptr; + } + +private: + // globals needed by the mechanism + static SPBasicSuite* sSPBasic; + + // returns the Head pointer to suite list + static AutoSuite* &GetHead(); + + // adds the suite to the list of those acquired + static void Push(AutoSuite* suite) + { + AutoSuite* &headPtr = GetHead(); + suite->fNext = headPtr; + headPtr = suite; + } + + // Used to release acquired suites if the Load Fails + // its similar to Unload but does no modify the orignal Head Pointer + static void ReleaseRequired(AutoSuite* contextHead = nullptr) + { + AutoSuite* headPtr = GetHead(); + while (headPtr != contextHead) + { + if(headPtr->fRequired) + headPtr->Release(); + + headPtr = headPtr->fNext; + } + } + + // subclass must define the suite name and version + const char* Name() const { return fName; } + ai::int32 Version() const { return fVersion; } + + AutoSuite(const AutoSuite&); + AutoSuite & operator =(const AutoSuite&); + + AutoSuite* fNext = nullptr; // pointer to next suite in chain + const void* fSuite = nullptr; // the suite pointer itself + const char* fName = nullptr; + const ai::int32 fVersion = 0; + AIBool8 fRequired = false; +}; + + + +// a SuiteContext can be used to ensure that all suites acquired within the +// context are released on exit +class SuiteContext { +public: + SuiteContext() : fHead(AutoSuite::GetHead()) {} + ~SuiteContext() { AutoSuite::Unload(fHead); } + +private: + SuiteContext(const SuiteContext&); + SuiteContext& operator =(const SuiteContext&); + AutoSuite* fHead; +}; + + +// an actual smart suite pointer +template class Suite { +public: + Suite() + { + Ptr(); + } + + bool operator !() { return !Exists(); } + + operator bool() { return (Exists() != false); } + + AIBoolean Exists() AINOEXCEPT + { + return Ptr().SuiteExists(); + } + + const typename suite::methods* operator-> () + { + return static_cast(Ptr().Acquire()); + } + +private: + AutoSuite& Ptr() + { + static AutoSuite sSuitePtr(suite::name(), suite::version, required); + return sSuitePtr; + } +}; + +#ifdef AI_HAS_NULLPTR +template +inline bool operator==(Suite suitePtr, std::nullptr_t) +{ + return !suitePtr; +} + +template +inline bool operator==(std::nullptr_t, Suite suitePtr) +{ + return (suitePtr == nullptr); +} + +template +inline bool operator!=(Suite suitePtr, std::nullptr_t) +{ + return !(suitePtr == nullptr); +} + +template +inline bool operator!=(std::nullptr_t, Suite suitePtr) +{ + return (suitePtr != nullptr); +} +#endif // AI_HAS_NULLPTR + +// end of namespace ai +} + + +//-------------------------------------------------------------------------------- +// the following macros are used to declare a non-ADM suite pointer. +//-------------------------------------------------------------------------------- + +#ifdef STATIC_LINKED_PLUGIN + #define suite_namespace_name PLUGIN_PROJECT_NAME + #define plugin_namespace_begin namespace PLUGIN_PROJECT_NAME { + #define plugin_namespace_end } + #define plugin_namespace_use(x) using PLUGIN_PROJECT_NAME::x +#else + #define suite_namespace_name ai + #define plugin_namespace_begin + #define plugin_namespace_end + #define plugin_namespace_use(x) +#endif + +#define declare_suite(suite) \ + namespace suite_namespace_name { \ + class S##suite { \ + public: \ + typedef suite##Suite methods; \ + enum {version = k##suite##SuiteVersion}; \ + static const char* name () {return k##suite##Suite;}; \ + }; \ + } +#define define_suite(suite) static ai::Suite s##suite; +#define use_suite(suite) declare_suite(suite) define_suite(suite) + +#define use_suite_optional(suite) use_suite(suite) + +#define define_suite_required(suite) static ai::Suite s##suite; +#define use_suite_required(suite) declare_suite(suite) define_suite_required(suite) + +#define extern_declare_suite(suite) declare_suite(suite) \ + plugin_namespace_begin \ + extern ai::Suite s##suite; \ + plugin_namespace_end \ + plugin_namespace_use(s##suite); + +#define extern_define_suite(suite) \ + plugin_namespace_begin \ + ai::Suite s##suite; \ + plugin_namespace_end \ + plugin_namespace_use(s##suite); + +#define extern_declare_suite_optional(suite) extern_declare_suite(suite) +#define extern_define_suite_optional(suite) extern_define_suite(suite) + +#define extern_declare_suite_required(suite) declare_suite(suite) \ + plugin_namespace_begin \ + extern ai::Suite s##suite; \ + plugin_namespace_end \ + plugin_namespace_use(s##suite); + +#define extern_define_suite_required(suite) \ + plugin_namespace_begin \ + ai::Suite s##suite; \ + plugin_namespace_end \ + plugin_namespace_use(s##suite); + + +//-------------------------------------------------------------------------------- +// the following macros are used to declare an ADM suite pointer. the suite +// version is needed in addition to its name. +//-------------------------------------------------------------------------------- + +#define declare_adm_suite(suite, vers) \ + namespace ai { \ + class S##suite##vers { \ + public: \ + typedef suite##Suite##vers methods; \ + enum {version = k##suite##SuiteVersion##vers}; \ + static const char* name () {return k##suite##Suite;}; \ + }; \ + } +#define define_adm_suite(suite, vers) static ai::Suite s##suite; +#define use_adm_suite(suite, vers) declare_adm_suite(suite, vers) define_adm_suite(suite, vers) +#define extern_declare_adm_suite(suite, vers) declare_adm_suite(suite, vers) extern ai::Suite s##suite; +#define extern_define_adm_suite(suite, vers) ai::Suite s##suite; + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtMatcher.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtMatcher.cpp new file mode 100644 index 0000000..4df5ced --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtMatcher.cpp @@ -0,0 +1,271 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#include "IAIArtMatcher.hpp" +#include "AIMdMemory.h" + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIMatchingArt) + use_suite_required(AIMdMemory) +#elif defined (_ARTMATCHER_SUITE_INCLUDE_H) + #include _ARTMATCHER_SUITE_INCLUDE_H +#else +// these need to be declared by client + extern "C" AIMatchingArtSuite *sAIMatchingArt; + extern "C" AIMdMemorySuite *sAIMdMemory; +#endif + +namespace ai +{ + +ArtMatcher::~ArtMatcher() +{ + m_pSpecs.clear(); + clear(); +} + +AIErr ArtMatcher::SetSpec(size_t iX, ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr) +{ + AIErr result = kNoErr; + + if (m_MatchArtInDictionaries) + lWhichAttr |= kMatchDictionaryArt; + + if (iX >= m_pSpecs.size()) + m_pSpecs.resize(iX + 1); + + m_pSpecs[iX] = { shType, lWhichAttr, lAttr }; + + return result; +} + +AIErr ArtMatcher::PushSpec(ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr) +{ + try + { + if (m_MatchArtInDictionaries) + lWhichAttr |= kMatchDictionaryArt; + + m_pSpecs.emplace_back( shType, lWhichAttr, lAttr ); + } + catch (...) + { + return kOutOfMemoryErr; + } + + return kNoErr; +} + +AIErr ArtMatcher::GetMatchingArt(void) +{ + return LoadMatchingArt(); +} + +AIErr ArtMatcher::GetSelectedArt() +{ + return LoadMatchingArt(ArtMatcher::kQuerySelection); +} + +AIErr ArtMatcher::GetMatchingArtFromLayerList(AILayerList layerList) +{ + return LoadMatchingArt(ArtMatcher::kQueryFromLayerList, layerList); +} + +AIErr ArtMatcher::GetMatchingArtFromArt(AIArtHandle art) +{ + return LoadMatchingArt(ArtMatcher::kQueryFromArt, art); +} + +AIErr ArtMatcher::GetArtForCurrentPathStyle() +{ + return LoadMatchingArt(ArtMatcher::kQueryFromCurrentPathStyle); +} + +AIErr ArtMatcher::GetSelectedArtFromLayerList(AILayerList layerList) +{ + return LoadMatchingArt(ArtMatcher::kQuerySelectedArtFromLayerList, layerList); +} + +ai::int32 ArtMatcher::GetNumMatches() const +{ + return m_lNumMatches; +} + +AIArtHandle ArtMatcher::GetMatchedArt(size_t iX) const +{ + AIArtHandle matchedArt = nullptr; + + if (iX < static_cast(m_lNumMatches)) + { + matchedArt = (*m_hMatches)[iX]; + } + + return matchedArt; +} + +AIArtHandle ArtMatcher::operator[](size_t iX) const +{ + return GetMatchedArt(iX); +} +ai::ArtSet ArtMatcher::GetArtSet() const +{ + if (*this) + { + return ai::ArtSet(*m_hMatches, static_cast(m_lNumMatches)); + } + + return ai::ArtSet(); +} + +void ArtMatcher::ClearMatchedArt(size_t iX) +{ + if (iX < static_cast(m_lNumMatches)) + { + (*m_hMatches)[iX] = nullptr; + } +} + +void ArtMatcher::clear() AINOEXCEPT +{ + if (m_hMatches && sAIMdMemory) + { + sAIMdMemory->MdMemoryDisposeHandle((AIMdMemoryHandle)(m_hMatches)); + m_lNumMatches = 0; + m_hMatches = nullptr; + } +} + +AIArtHandle** ArtMatcher::release() AINOEXCEPT +{ + auto toReturn = m_hMatches; + m_hMatches = nullptr; + m_lNumMatches = 0; + return toReturn; +} + +ArtMatcher::ArtMatcher(ArtMatcher&& other) AINOEXCEPT +{ + this->swap(other); +} + +ArtMatcher& ArtMatcher::operator=(ArtMatcher&& other) AINOEXCEPT +{ + this->swap(other); + return (*this); +} + +void ArtMatcher::swap(ArtMatcher& other) AINOEXCEPT +{ + std::swap(m_pSpecs, other.m_pSpecs); + std::swap(m_MatchArtInDictionaries, other.m_MatchArtInDictionaries); + std::swap(m_hMatches, other.m_hMatches); + std::swap(m_lNumMatches, other.m_lNumMatches); +} + +AIErr ArtMatcher::LoadMatchingArt(ArtMatcher::QueryType qryType /*= kQueryMatchingArt*/, void* cookie /*= nullptr*/) +{ + m_LastError = kNoErr; + + if (!sAIMatchingArt) + { + return AM_InvalidSuite; + } + + //Clear the store result if any + clear(); + + try + { + switch (qryType) + { + case kQueryMatchingArt: + { + //Check for if the spec is equivalent to GetSelectedArt, so that we can benefit from the selection caching, + //Fall back to selection query + if (!((m_pSpecs.size() == 1 && !m_MatchArtInDictionaries && + m_pSpecs[0].type == kAnyArt && m_pSpecs[0].whichAttr == kArtSelected && m_pSpecs[0].attr == kArtSelected))) + { + m_LastError = + sAIMatchingArt->GetMatchingArt + ( + &m_pSpecs[0], + (ai::int16) m_pSpecs.size(), + &m_hMatches, + &m_lNumMatches + ); + break; + } + } + case kQuerySelection: + { + m_LastError = sAIMatchingArt->GetSelectedArt(&m_hMatches, &m_lNumMatches); + break; + } + case kQueryFromLayerList: + { + m_LastError = + sAIMatchingArt->GetMatchingArtFromLayerList + ( + (AILayerList)cookie, + &m_pSpecs[0], + (ai::int16) m_pSpecs.size(), + &m_hMatches, + &m_lNumMatches + ); + break; + } + case kQueryFromArt: + { + m_LastError = + sAIMatchingArt->GetMatchingArtFromArt + ( + (AIArtHandle)cookie, + &m_pSpecs[0], + (ai::int16) m_pSpecs.size(), + &m_hMatches, + &m_lNumMatches + ); + break; + } + case kQueryFromCurrentPathStyle: + { + m_LastError = sAIMatchingArt->GetArtForCurrentPathStyle(&m_hMatches, &m_lNumMatches); + break; + } + case kQuerySelectedArtFromLayerList: + { + m_LastError = sAIMatchingArt->GetSelectedArtFromLayerList((AILayerList)cookie, &m_hMatches, &m_lNumMatches); + break; + } + } + } + catch (...) + { + m_LastError = AM_UnknownException; + } + + //make sure handles and numMatches are sane in case of an error + if (m_LastError != kNoErr) + { + m_lNumMatches = 0; + m_hMatches = nullptr; + } + return m_LastError; +} + + +} //ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtMatcher.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtMatcher.hpp new file mode 100644 index 0000000..19ac09f --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtMatcher.hpp @@ -0,0 +1,313 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AIArt.h" +#include "AIMatchingArt.h" +#include "IAIArtSet.hpp" + +#include +#include + + +/** @file IAIArtMatcher.hpp */ + +namespace ai +{ + +/** + A stack based wrapper class for inquiring about the selection and matched art over AIMatchingArtSuite. + Always prefer this class over directly calling APIs in AIMatchingArtSuite. + + Enhanced to support C++11 semantics. + For example, range-based loops, move constructor and assignment, and + added support for dynamic spec specification as well as automatic size computation. + + // Example 1.1: Statically allocate spec, let ArtMatcher figure out the size, recommended approach + AIMatchingArtSpec spec[] = { + { kRasterArt, kArtSelected, kArtSelected}, + { kPlacedArt, kArtSelected, kArtSelected} + }; + + ArtMatcher matcher(spec); + matcher.GetMatchingArt(); + + for(auto art: matcher) // This loop is safe even if the earlier call didn't return any art, the loop won't enter + { + // work with art + } + + // WARNING NOTE!!! Don't create a spec array with single braces even for one element + // e.g, never do this, AIMatchingArtSpec now has a default constructor and it creates an array with size 3 + // AIMatchingArtSpec spec[] = { kRasterArt, kArtSelected, kArtSelected}; + + + + // Example 1.2 Special constructor for one spec + ArtMatcher matcher(AIMatchingArtSpec{ kAnyArt, kArtFullySelected, kArtFullySelected }); + matcher.GetMatchingArt(); + + for(auto art: matcher) // This loop is safe even if the earlier call didn't return any art, the loop won't enter + { + // work with art + } + + // Example 2: Push specs at runtime, without worrying about upfront allocation + ArtMatcher matcher; + matcher.PushSpec(kRasterArt, kArtSelected, kArtSelected); + matcher.PushSpec(kPlacedArt, kArtSelected, kArtSelected); + + AIErr err = matcher.GetMatchingArt(); + if(!err) + { + auto count = matcher.GetNumMatches(); + for(decltype(count) i = 0; i < count; ++i) + { + auto art = matcher.GetMatchedArt(i); + } + } + + // Example 3: Reserve space and set index based specs. The old way is still supported. + // It will work even if you don't reserve space upfront + ArtMatcher matcher(1); + matcher.SetSpec(0, kArtSelected, kArtSelected); + AIErr err = matcher.GetMatchingArt(); + ... + // use range based or direct access loop + + // Example 4: Bool operator + ArtMatcher matcher(spec); + matcher.GetMatchingArt(); + if(matcher) // Has at least one element; this check is not required for range-based loops + { + auto firstObject = *(matcher.begin()); + } + + // Example 5: Reverse iterator (last to first) + ArtMatcher matcher(spec); + matcher.GetMatchingArt(); + for (auto iter = matcher.rbegin(); iter != matcher.rend(); ++iter) + { + auto art = *iter; + } + + // Example 6: Fetch all selected objects + ArtMatcher matcher; + matcher.GetSelectedArt(); + + for(auto art: matcher) // This loop is safe even if the earlier call didn't return any art, the loop won't enter + { + // process selected objects + } + +*/ + +class ArtMatcher +{ +public: + using iterator = AIArtHandle*; + using reverse_iterator = std::reverse_iterator; + + /** Default constructor + */ + explicit ArtMatcher(size_t iNumSpecs = 0, AIBoolean matchArtInDictionaries = false) : + m_pSpecs(iNumSpecs), m_MatchArtInDictionaries{matchArtInDictionaries} + { + } + + /** Constructor with one spec + */ + ArtMatcher(const AIMatchingArtSpec& spec, AIBoolean matchArtInDictionaries = false) : + m_pSpecs{spec}, m_MatchArtInDictionaries{matchArtInDictionaries} + { + if (m_MatchArtInDictionaries) + { + m_pSpecs[0].whichAttr |= kMatchDictionaryArt; + } + } + + /** Construct with spec array + */ + template + ArtMatcher(const AIMatchingArtSpec(&specs)[N], AIBoolean matchArtInDictionaries = false): + m_pSpecs{ specs, specs + N }, m_MatchArtInDictionaries{matchArtInDictionaries} + { + if (m_MatchArtInDictionaries) + { + for (auto& spec : m_pSpecs) + { + spec.whichAttr |= kMatchDictionaryArt; + } + } + } + + /** Destructor + */ + ~ArtMatcher(); + + /** Copy is not allowed. + */ + ArtMatcher(const ArtMatcher&) = delete; + + /** Assignment is not allowed. + */ + ArtMatcher& operator=(const ArtMatcher&) = delete; + + /** Move Constructor + */ + ArtMatcher(ArtMatcher&& other) AINOEXCEPT; + + /** Move Assignment + */ + ArtMatcher& operator= (ArtMatcher&& other) AINOEXCEPT; + + /** Set spec if size is already allocated. + */ + AIErr SetSpec(size_t iX, ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr); + + /** Add spec to the end + */ + AIErr PushSpec(ai::int16 shType, ai::int32 lWhichAttr, ai::int32 lAttr); + + /** #AIMatchingArtSuite::GetMatchingArt() + */ + AIErr GetMatchingArt(); + + /** #AIMatchingArtSuite::GetSelectedArt() + */ + AIErr GetSelectedArt(); + + /** #AIMatchingArtSuite::GetMatchingArtFromLayerList() + */ + AIErr GetMatchingArtFromLayerList(AILayerList layerList); + + /** #AIMatchingArtSuite::GetMatchingArtFromArt() + */ + AIErr GetMatchingArtFromArt(AIArtHandle art); + + /** #AIMatchingArtSuite::GetArtForCurrentPathStyle() + */ + AIErr GetArtForCurrentPathStyle(); + + /** #AIMatchingArtSuite::GetSelectedArtFromLayerList() + */ + AIErr GetSelectedArtFromLayerList(AILayerList layerList); + + /** Returns the number of art objects matched by last GetMatchingArt() or GetSelectedArt() call. + */ + ai::int32 GetNumMatches() const; + + /** Returns nth AIArtHandle if the last GetMatchingArt() or GetSelectedArt() call succeeded. + */ + AIArtHandle GetMatchedArt(size_t iX) const; + + //Operator version of GetMatchedArt() + + AIArtHandle operator[](size_t iX) const; + + /** Returns a stack based AIArtSet Object which can be used in APIs which needs an AIArtSet + */ + ai::ArtSet GetArtSet() const; + + /** Get AIErr for the last query, though it is usually not required. + */ + AIErr GetLastError() const AINOEXCEPT { return m_LastError; } + + // The ClearMatchedArt method is for legacy usage, you can directly change the content in your loop with auto& + /* + for (auto& art : matcher) + { + // if you want to change the content based on some condition + if(myCond(art)) + art = nullptr; // it will set the value of the content to nullptr + } + */ + void ClearMatchedArt(size_t iX); // to enable multi-pass algorithms to filter out some of the matches + + /** Errors returned by ai::ArtMatcher */ + enum eArtMatcherErrors + { + AM_OK = kNoErr, + AM_InvalidIndex, + AM_InvalidSuite, + AM_UnknownException, + AM_NumErrs, + AM_NoResult + }; + + /** Check if the last query has some interesting data */ + explicit operator bool() const AINOEXCEPT + { + return (m_hMatches != nullptr && m_lNumMatches > 0); + } + + /** iterators for range based for loops */ + iterator begin () const AINOEXCEPT + { + if (m_hMatches) + return *m_hMatches; + return nullptr; + } + + /** iterators for range based for loops */ + iterator end() const AINOEXCEPT + { + if (m_hMatches) + return (*m_hMatches) + m_lNumMatches; + return nullptr; + } + + reverse_iterator rbegin() const AINOEXCEPT + { + return reverse_iterator(end()); + } + + reverse_iterator rend() const AINOEXCEPT + { + return reverse_iterator(begin()); + } + + /** Clear the stored handles only, the spec is intact and will be used in next query */ + void clear() AINOEXCEPT; + + /** Transfer the ownership of stored art handles, call it only if you know what you are doing. */ + AIArtHandle** release() AINOEXCEPT; + +private: + // swaps with other ArtMatcher + void swap(ArtMatcher& other) AINOEXCEPT; + + enum QueryType + { + kQueryMatchingArt, + kQuerySelection, + kQueryFromLayerList, + kQuerySelectedArtFromLayerList, + kQueryFromArt, + kQueryFromCurrentPathStyle, + }; + + AIErr LoadMatchingArt(QueryType qryType = kQueryMatchingArt, void* cookie = nullptr); + + std::vector m_pSpecs; + AIBoolean m_MatchArtInDictionaries = false; + ai::int32 m_lNumMatches = 0; + AIArtHandle **m_hMatches = nullptr; + AIErr m_LastError = kNoErr; +}; + +} \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtSet.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtSet.cpp new file mode 100644 index 0000000..7b425a8 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtSet.cpp @@ -0,0 +1,391 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#include "IAIArtSet.hpp" +#include "AIArtSetGenerator.h" +#include "AIContract.hpp" + +#include + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIArtSet) + use_suite_required(AIArtSetGenerator) +#elif defined (_IAIARTSET_SUITE_INCLUDE_H) + #include _IAIARTSET_SUITE_INCLUDE_H +#else + // these need to be declared by client + extern "C" AIArtSetSuite* sAIArtSet; + extern "C" AIArtSetGeneratorSuite* sAIArtSetGenerator; +#endif + +namespace ai +{ + class ArtSet::Impl + { + public: + using value_type = ArtSet::value_type; + Impl(); + ~Impl(); + + explicit Impl(bool fillWithSelectedArtObjects); + explicit Impl(AIArtHandle *artArray, size_t count); + explicit Impl(AILayerHandle layer); + explicit Impl(const AIArtSpec* spec, size_t count); + + //Query APIs + AIErr GenerateForAllLayers(); + AIErr GenerateForNthLayer(ai::int32 inLayerIndex); + AIErr GenerateForNamedLayer(const ai::UnicodeString& inLayerName); + AIErr GenerateForNthArtboard(ai::ArtboardID inArtboardIndex, bool skipHiddenArts); + AIErr GenerateForNamedArtboard(const ai::UnicodeString& inArtboardName, bool skipHiddenArts); + AIErr GenerateForTopLevelLayers(bool skipHiddenLayers); + AIErr GenerateSelectedAtTopLevel(); + AIErr GenerateNSelectedAtTopLevel(size_t inMaxSelectedArtsToReturn, bool *outHasMoreSelectedArts); + AIErr GenerateForArt (AIArtHandle inArt); + + size_t size() const AINOEXCEPT; + value_type at(size_t index) const; + value_type operator[](size_t index) const AINOEXCEPT; + + void insert(value_type art); + void erase(value_type art); + void replace(value_type oldArt, value_type newArt); + void clear(); + + AIArtSet get() const AINOEXCEPT { return mArtSet; } + AIErr GetLastError() const AINOEXCEPT { return mLastError; } + + explicit operator bool() const AINOEXCEPT + { + return (mLastError == kNoErr && mArtSet != nullptr); + } + private: + AIArtSet mArtSet = nullptr; + mutable AIErr mLastError = kNoErr; + }; + + ArtSet::Impl::Impl(bool fillWithSelectedArtObjects):Impl() + { + if (fillWithSelectedArtObjects) + { + mLastError = sAIArtSet->SelectedArtSet(mArtSet); + check_ai_error(mLastError); + } + } + + ArtSet::Impl::Impl(AIArtHandle *artArray, size_t count):Impl() + { + mLastError = sAIArtSet->ArrayArtSet(mArtSet, artArray, count); + check_ai_error(mLastError); + } + + ArtSet::Impl::Impl(AILayerHandle layer):Impl() + { + mLastError = sAIArtSet->LayerArtSet(layer, mArtSet); + check_ai_error(mLastError); + } + + ArtSet::Impl::Impl(const AIArtSpec* specs, size_t count):Impl() + { + mLastError = sAIArtSet->MatchingArtSet(const_cast(specs), static_cast(count), mArtSet); + check_ai_error(mLastError); + } + + ArtSet::Impl::Impl() + { + AIErr err = sAIArtSet->NewArtSet(&mArtSet); + check_ai_error(err); + ai::Ensures(mArtSet != nullptr); + } + + ArtSet::Impl::~Impl() + { + sAIArtSet->DisposeArtSet(&mArtSet); + } + + size_t ArtSet::Impl::size() const AINOEXCEPT + { + size_t count(0); + mLastError = sAIArtSet->CountArtSet(mArtSet, &count); + if (!mLastError) + return count; + + return 0; + } + + ArtSet::Impl::value_type ArtSet::Impl::at(size_t index) const + { + const auto count = size(); + ai::Expects(index < count); + + AIArtHandle artHandle(nullptr); + mLastError = sAIArtSet->IndexArtSet(mArtSet, index, &artHandle); + check_ai_error(mLastError); + return artHandle; + } + + ArtSet::Impl::value_type ArtSet::Impl::operator[](size_t index) const AINOEXCEPT + { + AIArtHandle artHandle(nullptr); + mLastError = sAIArtSet->IndexArtSet(mArtSet, index, &artHandle); + if (!mLastError) + return artHandle; + + //TODO: Assert + return nullptr; + } + + void ArtSet::Impl::insert(ArtSet::Impl::value_type art) + { + mLastError = sAIArtSet->AddArtToArtSet(mArtSet, art); + check_ai_error(mLastError); + } + + void ArtSet::Impl::erase(value_type art) + { + mLastError = sAIArtSet->RemoveArtFromArtSet(mArtSet, art); + check_ai_error(mLastError); + } + + void ArtSet::Impl::replace(ArtSet::Impl::value_type oldArt, ArtSet::Impl::value_type newArt) + { + mLastError = sAIArtSet->ReplaceArtInArtSet(mArtSet, oldArt, newArt); + check_ai_error(mLastError); + } + + void ArtSet::Impl::clear() + { + mLastError = sAIArtSet->ClearArtSet(mArtSet); + check_ai_error(mLastError); + } + + AIErr ArtSet::Impl::GenerateForAllLayers() + { + mLastError = sAIArtSetGenerator->GenerateForAllLayers(mArtSet); + return mLastError; + } + + AIErr ArtSet::Impl::GenerateForNthLayer(ai::int32 inLayerIndex) + { + mLastError = sAIArtSetGenerator->GenerateForNthLayer(inLayerIndex, mArtSet); + return mLastError; + } + + AIErr ArtSet::Impl::GenerateForNamedLayer(const ai::UnicodeString& inLayerName) + { + mLastError = sAIArtSetGenerator->GenerateForNamedLayer(inLayerName, mArtSet); + return mLastError; + } + + AIErr ArtSet::Impl::GenerateForNthArtboard(ai::ArtboardID inArtboardIndex, bool skipHiddenArts) + { + mLastError = sAIArtSetGenerator->GenerateForNthArtboard(inArtboardIndex, mArtSet, skipHiddenArts); + return mLastError; + } + + AIErr ArtSet::Impl::GenerateForNamedArtboard(const ai::UnicodeString& inArtboardName, bool skipHiddenArts) + { + mLastError = sAIArtSetGenerator->GenerateForNamedArtboard(inArtboardName, mArtSet, skipHiddenArts); + return mLastError; + } + + AIErr ArtSet::Impl::GenerateForTopLevelLayers(bool skipHiddenLayers) + { + mLastError = sAIArtSetGenerator->GenerateForTopLevelLayers(mArtSet, skipHiddenLayers); + return mLastError; + } + + AIErr ArtSet::Impl::GenerateSelectedAtTopLevel() + { + mLastError = sAIArtSetGenerator->GenerateSelectedAtTopLevel(mArtSet); + return mLastError; + } + + AIErr ArtSet::Impl::GenerateNSelectedAtTopLevel(size_t inMaxSelectedArtsToReturn, + bool *outHasMoreSelectedArts) + { + AIBoolean hasMoreSelectedArts{ false }; + mLastError = sAIArtSetGenerator->GenerateNSelectedAtTopLevel(inMaxSelectedArtsToReturn, mArtSet, (outHasMoreSelectedArts ? &hasMoreSelectedArts : nullptr)); + if (mLastError == kNoErr && outHasMoreSelectedArts) + { + *outHasMoreSelectedArts = !!hasMoreSelectedArts; + } + return mLastError; + } + + AIErr ArtSet::Impl::GenerateForArt (AIArtHandle inArt) + { + mLastError = sAIArtSetGenerator->GenerateForArt(inArt, mArtSet); + return mLastError; + } + + ArtSet::ArtSet(bool fillWithSelectedArtObjects /*= false*/) + : pImpl{std::make_unique(fillWithSelectedArtObjects)} + { + } + + ArtSet::ArtSet(AIArtHandle *artArray, size_t count) + : pImpl{std::make_unique(artArray, count)} + { + } + + ArtSet::ArtSet(AILayerHandle layer) + : pImpl{std::make_unique(layer)} + { + } + + ArtSet::ArtSet(const AIArtSpec* specs, size_t count) + : pImpl{std::make_unique(specs, count)} + { + } + + ArtSet::ArtSet(ArtSet&& other) AINOEXCEPT + { + swap(other); + } + + ai::ArtSet& ArtSet::operator=(ArtSet&& other) AINOEXCEPT + { + swap(other); + return (*this); + } + + ArtSet::~ArtSet() = default; + + AIErr ArtSet::GenerateForAllLayers() + { + return pImpl->GenerateForAllLayers(); + } + + AIErr ArtSet::GenerateForNthLayer(ai::int32 inLayerIndex) + { + return pImpl->GenerateForNthLayer(inLayerIndex); + } + + AIErr ArtSet::GenerateForNamedLayer(const ai::UnicodeString& inLayerName) + { + return pImpl->GenerateForNamedLayer(inLayerName); + } + + AIErr ArtSet::GenerateForNthArtboard(ai::ArtboardID inArtboardIndex, bool skipHiddenArts) + { + return pImpl->GenerateForNthArtboard(inArtboardIndex, skipHiddenArts); + } + + AIErr ArtSet::GenerateForNamedArtboard(const ai::UnicodeString& inArtboardName, bool skipHiddenArts) + { + return pImpl->GenerateForNamedArtboard(inArtboardName, skipHiddenArts); + } + + AIErr ArtSet::GenerateForTopLevelLayers(bool skipHiddenLayers) + { + return pImpl->GenerateForTopLevelLayers(skipHiddenLayers); + } + + AIErr ArtSet::GenerateSelectedAtTopLevel() + { + return pImpl->GenerateSelectedAtTopLevel(); + } + + AIErr ArtSet::GenerateNSelectedAtTopLevel(size_t inMaxSelectedArtsToReturn, bool *outHasMoreSelectedArts) + { + return pImpl->GenerateNSelectedAtTopLevel(inMaxSelectedArtsToReturn, outHasMoreSelectedArts); + } + + AIErr ArtSet::GenerateForArt (AIArtHandle inArt) + { + return pImpl->GenerateForArt(inArt); + } + + size_t ArtSet::size() const AINOEXCEPT + { + return pImpl->size(); + } + + ai::ArtSet::value_type ArtSet::at(size_t index) const + { + return pImpl->at(index); + } + + ai::ArtSet::value_type ArtSet::operator[](size_t index) const AINOEXCEPT + { + return pImpl->operator[](index); + } + + void ArtSet::insert(value_type art) + { + pImpl->insert(art); + } + + void ArtSet::erase(value_type art) + { + pImpl->erase(art); + } + + void ArtSet::replace(value_type oldArt, value_type newArt) + { + pImpl->replace(oldArt, newArt); + } + + void ArtSet::clear() + { + pImpl->clear(); + } + + ArtSet::iterator ArtSet::begin() const AINOEXCEPT + { + return iterator(*this, 0); + } + + ai::ArtSet::iterator ArtSet::end() const AINOEXCEPT + { + const auto count = size(); + return iterator(*this, count); + } + + ai::ArtSet::iterator ArtSet::rbegin() const AINOEXCEPT + { + const auto count = size(); + return iterator(*this, count-1, true); + } + + ai::ArtSet::iterator ArtSet::rend() const AINOEXCEPT + { + return iterator(*this, -1, true); + } + + void ArtSet::swap(ArtSet& other) AINOEXCEPT + { + std::swap(pImpl, other.pImpl); + } + + ArtSet::operator bool() const AINOEXCEPT + { + return pImpl->operator bool(); + } + + AIErr ArtSet::GetLastError() const AINOEXCEPT + { + return pImpl->GetLastError(); + } + + AIArtSet ArtSet::get() const AINOEXCEPT + { + return pImpl->get(); + } + +} // namespace ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtSet.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtSet.hpp new file mode 100644 index 0000000..e53931e --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtSet.hpp @@ -0,0 +1,356 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AIArtSet.h" +#include "IAIArtboards.hpp" +#include "IAIUnicodeString.h" + +#include + +/** @file IAIArtSet.hpp */ + +namespace ai +{ + /** + A stack based wrapper class over AIArtSetSuite and AIArtSetGeneratorSuite + + Prefer this class over directly accessing the AIArtSetSuite/AIArtSetGeneratorSuite APIs. + + Usage Examples: + + Construction: + + CAUTION: Constructor would throw if artSet was not constructed properly + + 1. Default Construct, creates an ai::ArtSet object, ready for actions such as insert, remove, and replace + + ai::ArtSet artSet; + + 2. Construct an ai::ArtSet object, filled with all the selected art objects + + ai::ArtSet artSet(true); + + 3. Construct an ai::ArtSet object, filled with all the objects on a layer + + ai::ArtSet artSet(layerHandle); + + 4. Construct an ai::ArtSet object, filled with an existing array of AIArtHandle(s) + + ai::ArtSet artSet(artHandles, count); + + 5. Construct an ai::ArtSet object, filled with all the art objects, matched to AIArtSpec + + AIArtSpec spec = { kAnyArt, kArtFullySelected, kArtFullySelected }; + ai::ArtSet artSet(spec); + + 6. Construct an ai::ArtSet object, filled with all the art objects matching an array of AIArtSpec + + AIArtSpec specs = { + {kRasterArt, kArtSelected, kArtSelected}, + {kPlacedArt, kArtSelected, kArtSelected}, + }; + + ai::ArtSet artSet(specs); + + Query: Wraps all the query APIs from AIArtSetGeneratorSuite, few examples, + 1. To create an ArtSet filled with all non-hidden objects on artboard 1 + + ai::ArtSet artSet + auto err = artSet.GenerateForNthArtboard(1, true); + for(auto art :artSet) + { + //art + } + + 2. To create an ArtSet filled with all objects on the 0th layer + + ai::ArtSet artSet + auto err = artSet.GenerateForNthLayer(0); + for(auto art :artSet) + { + //art + } + + Accessors: + 1. C++ 11 range based loop + + for(auto art : artSet) + { + //access art + } + + 2. reverse iterate + + for (auto iter = artSet.rbegin(); iter != artSet.rend(); ++iter) + { + auto art = *iter; + } + + 3. Get AIArtSet to be passed to APIs which need an AIArtSet + + AIArtSet aiArtSet = artSet.get(); + + 4. See if the last operation was successful, or the object was successfully constructed + + if(artSet) + { + //artSet was constructed successfully, proceed with other operations + } + + 5. Need to pass the AIErr + + AIErr err = artSet.GetLastError(); + + Mutators: + + 1. Insert an AIArtHandle + + artSet.insert(art); + + 2. Remove an AIArtHandle + + artSet.erase(art); + + 3. Replace an AIArtHandle with another + + artSet.replace(oldArt, newArt); + + 4. Clear + + artSet.clear(); + +*/ + class ArtSet + { + public: + class iterator; + + using value_type = AIArtHandle; + + /** Default constructor, fill with selected art objects when true is passed + */ + explicit ArtSet(bool fillWithSelectedArtObjects = false); + + /** Create ArtSet from art handle array + */ + explicit ArtSet(AIArtHandle *artArray, size_t count); + + /** Fill all objects from layer + */ + explicit ArtSet(AILayerHandle layer); + + /** Construct with spec array + */ + template + ArtSet(const AIArtSpec(&specs)[N]) : ArtSet(&specs[0], N) + { + + } + + /** Construct with one Spec + */ + ArtSet(const AIArtSpec& spec) :ArtSet(&spec, 1) {} + + //Needed for unique_ptr + ~ArtSet(); + + /** + #AIArtSetGeneratorSuite::GenerateForAllLayers() + */ + AIErr GenerateForAllLayers(); + + /** + #AIArtSetGeneratorSuite::GenerateForNthLayer() + */ + AIErr GenerateForNthLayer(ai::int32 inLayerIndex); + + /** + #AIArtSetGeneratorSuite::GenerateForNamedLayer() + */ + AIErr GenerateForNamedLayer(const ai::UnicodeString& inLayerName); + + /** + #AIArtSetGeneratorSuite::GenerateForNthArtboard() + */ + AIErr GenerateForNthArtboard(ai::ArtboardID inArtboardIndex, bool skipHiddenArts); + + /** + #AIArtSetGeneratorSuite::GenerateForNamedArtboard() + */ + AIErr GenerateForNamedArtboard(const ai::UnicodeString& inArtboardName, bool skipHiddenArts); + + /** + #AIArtSetGeneratorSuite::GenerateForTopLevelLayers() + */ + AIErr GenerateForTopLevelLayers(bool skipHiddenLayers); + + /** + #AIArtSetGeneratorSuite::GenerateSelectedAtTopLevel() + */ + AIErr GenerateSelectedAtTopLevel(); + + /** + #AIArtSetGeneratorSuite::GenerateNSelectedAtTopLevel() + */ + AIErr GenerateNSelectedAtTopLevel(size_t inMaxSelectedArtsToReturn, bool *outHasMoreSelectedArts); + + /** Generates the ArtSet with the art provided. Traverses the art handle provided + and fills the ArtSet with all the nested children of the group art. + #AIArtSetGeneratorSuite::GenerateForArt() + */ + AIErr GenerateForArt (AIArtHandle inArt); + + /** Returns number of AIArtHandle in the ArtSet + */ + size_t size() const AINOEXCEPT; + + /** Returns true if ArtSet is empty + */ + bool empty() const AINOEXCEPT { return size() == 0; } + + /** Returns AIArtHandle stored in index. Throws exception if out of bounds. + */ + value_type at(size_t index) const; + + /** Returns AIArtHandle stored in index. Returns nullptr if out of bounds. + */ + value_type operator[](size_t index) const AINOEXCEPT; + + /** Inserts into ArtSet if not already present. + */ + void insert(value_type art); + + /** Removes an AIArtHandle from ArtSet if present. + */ + void erase(value_type art); + + /** Replaces an AIArtHandle with another in the ArtSet. + */ + void replace(value_type oldArt, value_type newArt); + + /** Removes all elements from an ArtSet. + */ + void clear(); + + /** Range iterator support + */ + iterator begin() const AINOEXCEPT; + + /** Range iterator support + */ + iterator end() const AINOEXCEPT; + + /** Reverse iterator support + */ + iterator rbegin() const AINOEXCEPT; + + /** Reverse iterator support + */ + iterator rend() const AINOEXCEPT; + + /** Swaps the content with another ArtSet + */ + void swap(ArtSet& other) AINOEXCEPT; + + /** Returns true if the ArtSet has some elements and last call to fill ArtSet was successful. + */ + explicit operator bool() const AINOEXCEPT; + + /** Returns the AIErr given back in the in last call to fill the ArtSet. + */ + AIErr GetLastError() const AINOEXCEPT; + + /** Returns AIArtSet for APIs that need access to AIArtSet + */ + AIArtSet get() const AINOEXCEPT; + + /** Move constructor + */ + ArtSet(ArtSet&& other) AINOEXCEPT; + + /** Move assignment + */ + ArtSet& operator = (ArtSet&& other) AINOEXCEPT; + + private: + ArtSet(const AIArtSpec* specs, size_t count); + ArtSet(const ArtSet&) = delete; + ArtSet& operator = (const ArtSet&) = delete; + + class Impl; + std::unique_ptr pImpl; + }; + + class ArtSet::iterator + { + public: + using value_type = AIArtHandle; + + iterator(const ArtSet& artSet, ptrdiff_t index, bool reverse = false) : + mArtSet(artSet), mIndex(index),mReverse(reverse) + { + mCount = mArtSet.size(); + } + value_type operator*() const + { + if (mIndex >= 0 && mIndex < mCount) + { + if(mValue == nullptr) + mValue = mArtSet[mIndex]; + return mValue; + } + return nullptr; + } + + void operator++() + { + if (mReverse) + --mIndex; + else + ++mIndex; + mValue = nullptr; + } + + void operator--() + { + if (mReverse) + ++mIndex; + else + --mIndex; + mValue = nullptr; + } + + bool operator!= (const iterator& other) const + { + return (mIndex != other.mIndex || mArtSet.pImpl.get() != other.mArtSet.pImpl.get()); + } + + iterator(const iterator&) = default; + iterator(iterator&&) = default; +#if !defined(ILLUSTRATOR_MINIMAL) + iterator& operator = (const iterator&) = delete; + iterator& operator = (iterator&&) = delete; +#endif + private: + ptrdiff_t mIndex = 0; + ptrdiff_t mCount = 0; + mutable value_type mValue = nullptr; + const ArtSet& mArtSet; + bool mReverse = false; + }; +} diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.cpp index a38dd71..c3c38df 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.cpp @@ -1,232 +1,390 @@ -/* -* Name: IAIArtboards.hpp -* Author: Started by Pushp -* Date: November, 2008 -* Purpose: Adobe Illustrator Artboard Suite Wraper implementation -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2008 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#include "AIArtboard.h" -#include - - -#ifdef _IAIARTBOARD_SUITE_INCLUDE_H_ -#include _IAIARTBOARD_SUITE_INCLUDE_H_ -#else -#ifndef _IAIARTBOARD_SUITE_USE_C_LINKAGE_ -#define _IAIARTBOARD_SUITE_USE_C_LINKAGE_ 1 -#endif -#if _IAIARTBOARD_SUITE_USE_C_LINKAGE_ -extern "C" -{ -#endif - /** The plug-in using the ai::ArtboardProperties class is required to provide - these global suite pointers. These pointers must be valid prior - to any call to ai::ArtboardProperties methods. - */ - extern AIArtboardSuite* sAIArtboard; - -#if _IAIARTBOARD_SUITE_USE_C_LINKAGE_ -} -#endif // _IAIARTBOARD_SUITE_USE_C_LINKAGE_ - -#endif - -namespace ai -{ - ArtboardProperties::~ArtboardProperties() - { - sAIArtboard->Dispose(*this); - } - ArtboardProperties::ArtboardProperties():fImpl(0) - { - sAIArtboard->Init(*this); - } - ArtboardProperties::ArtboardProperties(ArtboardRef /*ref*/):fImpl(0) - { - } - ArtboardProperties::ArtboardProperties(const ArtboardProperties& artboard):fImpl(0) - { - sAIArtboard->CloneArtboard(*this,artboard); - } - ArtboardProperties& ArtboardProperties::operator=(const ArtboardProperties& object) - { - ArtboardProperties temp(object); - std::swap(this->fImpl,temp.fImpl); - return *this; - } - AIErr ArtboardProperties::GetPosition(AIRealRect& rect) const - { - return sAIArtboard->GetPosition(*this,rect); - } - AIErr ArtboardProperties::SetPosition(AIRealRect rect) - { - return sAIArtboard->SetPosition(*this,rect); - } - AIErr ArtboardProperties::GetName(ai::UnicodeString& name) const - { - return sAIArtboard->GetName(*this,name); - } - AIErr ArtboardProperties::SetName(const ai::UnicodeString& name) - { - return sAIArtboard->SetName(*this,name); - } - AIErr ArtboardProperties::IsDefaultName(AIBoolean& isDefault) const - { - return sAIArtboard->IsDefaultName(*this, isDefault); - } - AIErr ArtboardProperties::SetIsDefaultName(const AIBoolean& isDefault) - { - return sAIArtboard->SetIsDefaultName(*this,isDefault); - } - AIErr ArtboardProperties::GetPAR(AIReal& par) const - { - return sAIArtboard->GetPAR(*this,par); - } - AIErr ArtboardProperties::SetPAR(AIReal par) - { - return sAIArtboard->SetPAR(*this,par); - } - AIErr ArtboardProperties::GetRulerOrigin(AIRealPoint& rulerOrigin) const - { - return sAIArtboard->GetRulerOrigin(*this,rulerOrigin); - } - AIErr ArtboardProperties::SetRulerOrigin(const AIRealPoint& rulerOrigin) - { - return sAIArtboard->SetRulerOrigin(*this,rulerOrigin); - } - AIErr ArtboardProperties::GetShowDisplayMark(DisplayMarkType type,bool& show) const - { - AIBoolean temp = show; - AIErr error = sAIArtboard->GetShowDisplayMark(*this,type,temp); - if(kNoErr != error) return error; - show = !!temp; - return error; - } - AIErr ArtboardProperties::SetShowDisplayMark(DisplayMarkType type,bool show) - { - return sAIArtboard->SetShowDisplayMark(*this,type,show); - } - ArtboardList::ArtboardList():fImpl(0) - { - sAIArtboard->GetArtboardList(*this); - } - - - ArtboardList::~ArtboardList() - { - if(fImpl) - sAIArtboard->ReleaseArtboardList(*this); - } - - AIErr ArtboardList::AddNew(ArtboardProperties& newArtboard, ArtboardID& index) - { - return sAIArtboard->AddNew(*this,newArtboard,index); - } - - AIErr ArtboardList::Insert(ArtboardProperties& artboard, ArtboardID& index) - { - return sAIArtboard->Insert(*this,artboard,index); - } - - AIErr ArtboardList::Delete(ArtboardID index) - { - return sAIArtboard->Delete(*this,index); - } - AIErr ArtboardList::GetCount(ArtboardID&index) const - { - return sAIArtboard->GetCount(*this,index); - } - ArtboardProperties ArtboardList::GetArtboardProperties(ArtboardID index) - { - ArtboardProperties object(NULL); - sAIArtboard->GetArtboardProperties(*this,index,object); - return object; - } - AIErr ArtboardList::GetActive(ArtboardID& index) const - { - return sAIArtboard->GetActive(*this,index); - } - AIErr ArtboardList::SetActive(ArtboardID index) - { - return sAIArtboard->SetActive(*this,index); - } - AIErr ArtboardList::Update(ArtboardID index, const ArtboardProperties& artboard) - { - return sAIArtboard->Update(*this,index,artboard); - } - - namespace ArtboardUtils - { - /** Retrieves the name of the specified artboard. if the index is -1 it gets the name of the active artboard - @param name [out] A buffer in which to return the name. - @param isDefault [out] A bool which indicates if the name is default or not. - @param index [in] The artboard index (-1 if active artboard). - */ - AIErr GetArtboardName(ai::UnicodeString& name,bool& isDefault, ArtboardID index ) - { - AIErr error = kNoErr; - isDefault = false; - ArtboardList list; - if(index == kActiveArtboard) - error = list.GetActive(index); - ArtboardProperties artboardProps(list.GetArtboardProperties(index)); - artboardProps.GetName(name); - AIBoolean isDefaultName = FALSE; - artboardProps.IsDefaultName(isDefaultName); - if(name.empty()) - { - isDefaultName=TRUE; - const char* abString = "$$$/Artboards/Name/Str=Artboard"; - name = ai::UnicodeString(ZREF(abString)); - char artboardnum[4]; - ::sprintf(artboardnum,"%d",index+1); - name.append(ai::UnicodeString(" ")); - name.append(ai::UnicodeString(artboardnum)); - artboardProps.SetName(name); - artboardProps.SetIsDefaultName(TRUE); - } - isDefault = (isDefaultName == 1); - - return error; - } - - /** Retrieves the index of the artboard with specified name - @param name [in] The name of the Artboard. - @param index [out] The artboard index . - */ - AIErr GetArtboardIndexByName(const ai::UnicodeString& name, ai::ArtboardID& index) - { - AIErr error = kNoErr; - ArtboardList abList; - ai::int32 abCount=0; - error = abList.GetCount(abCount); - if(error != kNoErr) - return error; - ai::UnicodeString abName(""); - ai::ArtboardProperties artboardProps; - for(index=0;index + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIArtboard) +#elif defined(_IAIARTBOARD_SUITE_INCLUDE_H_) + #include _IAIARTBOARD_SUITE_INCLUDE_H_ +#else +#ifndef _IAIARTBOARD_SUITE_USE_C_LINKAGE_ +#define _IAIARTBOARD_SUITE_USE_C_LINKAGE_ 1 +#endif +#if _IAIARTBOARD_SUITE_USE_C_LINKAGE_ +extern "C" +{ +#endif + /** The plug-in using the ai::ArtboardProperties class is required to provide + these global suite pointers. These pointers must be valid prior + to any call to ai::ArtboardProperties methods. + */ + extern AIArtboardSuite* sAIArtboard; + +#if _IAIARTBOARD_SUITE_USE_C_LINKAGE_ +} +#endif // _IAIARTBOARD_SUITE_USE_C_LINKAGE_ + +#endif + +#include "AIErrorHandler.h" +#include "AIAssert.hpp" +#include "IAIStringUtils.h" + +namespace ai +{ + ArtboardProperties::~ArtboardProperties() + { + try{ + sAIArtboard->Dispose(*this); + } + catch(ai::Error&){} + } + ArtboardProperties::ArtboardProperties():fImpl(0) + { + sAIArtboard->Init(*this); + } + ArtboardProperties::ArtboardProperties(ArtboardRef /*ref*/):fImpl(0) + { + } + ArtboardProperties::ArtboardProperties(const ArtboardProperties& artboard):fImpl(0) + { + sAIArtboard->CloneArtboard(*this,artboard); + } + ArtboardProperties& ArtboardProperties::operator=(const ArtboardProperties& object) + { + ArtboardProperties temp(object); + std::swap(this->fImpl,temp.fImpl); + return *this; + } + AIErr ArtboardProperties::GetPosition(AIRealRect& rect) const + { + return sAIArtboard->GetPosition(*this,rect); + } + AIErr ArtboardProperties::SetPosition(AIRealRect rect) + { + return sAIArtboard->SetPosition(*this,rect); + } + AIErr ArtboardProperties::GetName(ai::UnicodeString& name) const + { + return sAIArtboard->GetName(*this,name); + } + AIErr ArtboardProperties::SetName(const ai::UnicodeString& name) + { + return sAIArtboard->SetName(*this,name); + } + AIErr ArtboardProperties::IsDefaultName(AIBoolean& isDefault) const + { + return sAIArtboard->IsDefaultName(*this, isDefault); + } + AIErr ArtboardProperties::SetIsDefaultName(const AIBoolean& isDefault) + { + return sAIArtboard->SetIsDefaultName(*this,isDefault); + } + AIErr ArtboardProperties::GetPAR(AIReal& par) const + { + return sAIArtboard->GetPAR(*this,par); + } + AIErr ArtboardProperties::SetPAR(AIReal par) + { + return sAIArtboard->SetPAR(*this,par); + } + AIErr ArtboardProperties::GetRulerOrigin(AIRealPoint& rulerOrigin) const + { + return sAIArtboard->GetRulerOrigin(*this,rulerOrigin); + } + AIErr ArtboardProperties::SetRulerOrigin(const AIRealPoint& rulerOrigin) + { + return sAIArtboard->SetRulerOrigin(*this,rulerOrigin); + } + AIErr ArtboardProperties::GetShowDisplayMark(DisplayMarkType type,bool& show) const + { + AIBoolean temp = show; + AIErr error = sAIArtboard->GetShowDisplayMark(*this,type,temp); + if(kNoErr != error) return error; + show = !!temp; + return error; + } + AIErr ArtboardProperties::SetShowDisplayMark(DisplayMarkType type,bool show) + { + return sAIArtboard->SetShowDisplayMark(*this,type,show); + } + + AIErr ArtboardProperties::IsSelected(AIBoolean& isSelected) const + { + return sAIArtboard->IsSelected(*this, isSelected); + } + + AIErr ArtboardProperties::GetUUIDAsString(ai::UnicodeString& uuid) const + { + return sAIArtboard->GetUUIDAsString(*this, uuid); + } + +#ifdef ILLUSTRATOR_MINIMAL + AIErr ArtboardProperties::CloneWithUniqueUUID(const ArtboardProperties &source) + { + return sAIArtboard->CloneWithUniqueUUID(*this, source); + } +#endif + + ArtboardList::ArtboardList():fImpl(0) + { + sAIArtboard->GetArtboardList(*this); + } + +#ifdef AI_HAS_RVALUE_REFERENCES + ai::ArtboardList::iterator ArtboardList::begin() + { + return iterator(0, this); + } + + ai::ArtboardList::iterator ArtboardList::end() + { + return iterator(size(), this); + } + + ai::ArtboardList::value_type ArtboardList::at(ArtboardID artboardID) + { + return ai::ArtboardList::value_type(artboardID, this); + } + + ArtboardID ArtboardList::size() const AINOEXCEPT + { + ArtboardID count = 0; + try{ + GetCount(count); + } + catch(ai::Error&){} + return count; + } +#endif //AI_HAS_RVALUE_REFERENCES + + ArtboardList::~ArtboardList() + { + try{ + if(fImpl) + sAIArtboard->ReleaseArtboardList(*this); + } + catch(ai::Error&){} + } + + AIErr ArtboardList::AddNew(ArtboardProperties& newArtboard, ArtboardID& index) + { + return sAIArtboard->AddNew(*this,newArtboard,index); + } + + AIErr ArtboardList::Insert(ArtboardProperties& artboard, ArtboardID& index) + { + return sAIArtboard->Insert(*this,artboard,index); + } + + AIErr ArtboardList::Delete(ArtboardID index) + { + return sAIArtboard->Delete(*this,index); + } + + AIErr ArtboardList::Delete(const std::vector& artboardIDs) + { + ai::AutoBuffer artboardIDBuffer(artboardIDs.size()); + + std::copy(artboardIDs.begin(), artboardIDs.end(), artboardIDBuffer.begin()); + + return sAIArtboard->DeleteArtboards(*this, artboardIDBuffer); + } + + AIErr ArtboardList::GetCount(ArtboardID&index) const + { + return sAIArtboard->GetCount(*this,index); + } + + ArtboardProperties ArtboardList::GetArtboardProperties(ArtboardID index) + { + ArtboardProperties object(NULL); + sAIArtboard->GetArtboardProperties(*this,index,object); + return object; + } + AIErr ArtboardList::GetActive(ArtboardID& index) const + { + return sAIArtboard->GetActive(*this,index); + } + AIErr ArtboardList::SetActive(ArtboardID index) + { + return sAIArtboard->SetActive(*this,index); + } + AIErr ArtboardList::Update(ArtboardID index, const ArtboardProperties& artboard) + { + return sAIArtboard->Update(*this,index,artboard); + } + + AIErr ArtboardList::Select(ai::ArtboardID artboardID, bool exclusively) + { + return sAIArtboard->SelectArtboard(*this, artboardID, exclusively); + } + + AIErr ArtboardList::Select(const std::vector& artboardIDs, bool exclusively) + { + ai::AutoBuffer artboardIDBuffer(artboardIDs.size()); + + std::copy(artboardIDs.begin(), artboardIDs.end(), artboardIDBuffer.begin()); + + return sAIArtboard->SelectArtboards(*this, artboardIDBuffer, exclusively); + } + + AIErr ArtboardList::SelectAll() + { + return sAIArtboard->SelectAllArtboards(*this); + } + + AIErr ArtboardList::Deselect(ai::ArtboardID artboardID) + { + return sAIArtboard->DeselectArtboard(*this, artboardID); + } + + AIErr ArtboardList::DeselectAll() + { + return sAIArtboard->DeselectAllArtboards(*this); + } + + AIErr ArtboardList::InsertUsingArtboardPropertiesUUID(ArtboardProperties& artboard, ArtboardID& index) + { + return sAIArtboard->InsertUsingArtboardPropertiesUUID(*this, artboard, index); + } + +#ifdef AI_HAS_RVALUE_REFERENCES + ArtboardList::Artboard::Artboard(ArtboardID artboardID, container_type artboardListPtr) : + mArtboardID(artboardID), + mArtboardListPtr(artboardListPtr) + { + if (mArtboardID < mArtboardListPtr->size()) + { + mProps = mArtboardListPtr->GetArtboardProperties(mArtboardID); + } + } + + AIErr ArtboardList::Artboard::Update() + { + AIMsgAssert(mArtboardID < mArtboardListPtr->size(), "Invalid artboard ID !!!"); + return mArtboardListPtr->Update(mArtboardID, mProps); + } + + ArtboardList::iterator::iterator(size_type index, container_type artboardListPtr) : + mValue(index, artboardListPtr), + mArtboardListPtr(artboardListPtr), + mArtboardCount(artboardListPtr->size()) + { + } + + ArtboardList::iterator& ArtboardList::iterator::operator++() + { + AIMsgAssert(mArtboardCount == mArtboardListPtr->size(), "Iterator is no longer valid!"); + auto curID = mValue.GetID(); + if (curID < mArtboardCount) + { + ++curID; + ArtboardList::iterator::value_type newVal(curID, mArtboardListPtr); + mValue.swap(newVal); + } + return *this; + } + + bool ArtboardList::iterator::operator==(const iterator& rhs) const + { + AIMsgAssert(compatible(rhs), "Incompatible iterator"); + return (mArtboardListPtr == rhs.mArtboardListPtr) && + (mValue.GetID() == rhs.mValue.GetID()) && + (mArtboardCount == rhs.mArtboardCount); + } + + bool ArtboardList::iterator::compatible(const iterator& rhs) const + { + return (mArtboardListPtr->fImpl == rhs.mArtboardListPtr->fImpl); + } + +#endif //AI_HAS_RVALUE_REFERENCES + namespace ArtboardUtils + { + /** Retrieves the name of the specified artboard. if the index is -1 it gets the name of the active artboard + @param name [out] A buffer in which to return the name. + @param isDefault [out] A bool which indicates if the name is default or not. + @param index [in] The artboard index (-1 if active artboard). + */ + AIErr GetArtboardName(ai::UnicodeString& name,bool& isDefault, ArtboardID index ) + { + AIErr error = kNoErr; + isDefault = false; + ArtboardList list; + if(index == kActiveArtboard) + error = list.GetActive(index); + ArtboardProperties artboardProps(list.GetArtboardProperties(index)); + if (!artboardProps.IsValid()) return kBadParameterErr; + + artboardProps.GetName(name); + AIBoolean isDefaultName = FALSE; + artboardProps.IsDefaultName(isDefaultName); + if(name.empty()) + { + isDefaultName=TRUE; + const char* abString = "$$$/Artboards/Name/Str=Artboard"; + name = ai::UnicodeString(ZREF(abString)); + name.append(ai::UnicodeString::FromRoman(" ")); + name.append(ai::UnicodeString::FromRoman(ai::to_string(index+1))); + artboardProps.SetName(name); + artboardProps.SetIsDefaultName(TRUE); + list.Update(index, artboardProps); + } + isDefault = (isDefaultName == 1); + + return error; + } + + /** Retrieves the index of the artboard with specified name + @param name [in] The name of the Artboard. + @param index [out] The artboard index . + */ + AIErr GetArtboardIndexByName(const ai::UnicodeString& name, ai::ArtboardID& index) + { + AIErr error = kNoErr; + ArtboardList abList; + ai::int32 abCount=0; + error = abList.GetCount(abCount); + if(error != kNoErr) + return error; + ai::UnicodeString abName(""); + ai::ArtboardProperties artboardProps; + for(index=0;indexAreAnyArtboardsOverlapping(artboardList, isOverlapping); + } + + } // namespace ArtboardUtils + +} // namespace ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.hpp index 0612dfa..18b118a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.hpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIArtboards.hpp @@ -1,297 +1,579 @@ -#pragma once -#ifndef _IAI_ARTBOARDS_ -#define _IAI_ARTBOARDS_ - -/* -* Name: IAIArtboards.hpp -* Author: Started by Pushp -* Date: November, 2008 -* Purpose: Adobe Illustrator Artboard Interfaces -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ -#include "AITypes.h" -#include "IAIUnicodeString.h" -class CAIArtboardProperties; -class CAIArtboardList; - -/** Constant for maximum number of artboard that can be defined. */ -#define kAIMAX_ARTBOARD_LIMIT 100 -/** @ingroup Errors - @see ArtboardProperties */ -#define kAICantDeleteLastArtboardErr 'CDLC' -/** @ingroup Errors - @see ArtboardProperties */ -#define kAIExceededMaxArtboardLimitErr 'EMxL' -/** @ingroup Errors - @see ArtboardProperties */ -#define kNotFoundErr '!FND' - -#define kActiveArtboard -1 - -namespace ai -{ - /** Artboard identifier. */ - typedef ai::int32 ArtboardID; - /** Artboard object. */ - typedef CAIArtboardProperties* ArtboardRef; - /** Artboard list object. */ - typedef CAIArtboardList* ArtboardListRef; - - /** The \c ArtboardProperties object encapsulates all the attributes associated with - an artboard. These are not live objects but a snapshot at any given time. - To update an object, you must call \c ai::ArtboardList::Update. - */ - class ArtboardProperties - { - public: - /** Types of artboard display marks and annotations. */ - typedef enum - { - kNone = 0, - kCenter = 1, - kCrossHair = 1<<1, - kSafeAreas = 1<<2 - } DisplayMarkType; - - /** Default constructor */ - ArtboardProperties(); - - /** Copy Constructor */ - ArtboardProperties(const ArtboardProperties&); - - /** Destructor */ - ~ArtboardProperties(); - /** Assignment operator */ - ArtboardProperties& operator=(const ArtboardProperties&); - - /** Checks for a valid object, Invalid objects return an error on - every operation. - @return True if this object is valid. */ - bool IsValid() const - { - return fImpl != NULL; - } - - /** Retrieves the position and bounds of this artboard. - @param value [out] A buffer in which to return the value. - */ - AIErr GetPosition(AIRealRect& value) const; - - /** Modifies the position and bounds of this artboard. Call \c ai::ArtboardList::Update() - with this object to make the change. - @param value The new position and bounds value. - */ - AIErr SetPosition(AIRealRect value); - - /** Retrieves the pixel aspect ratio of the artboard ruler. - @param value [out] A buffer in which to return the value. - */ - AIErr GetPAR(AIReal& value) const; - - /** Modifies the pixel aspect ratio of the artboard ruler. Call \c ai::ArtboardList::Update() - with this object to make the change in the artboard - @param value The new value. - */ - AIErr SetPAR(AIReal value); - - /** Reports whether a particular type of annotation is shown or hidden. - @param mark The type of annotation. - @param show [out] A buffer in which to return true if the mark is shown, false if hidden. - */ - AIErr GetShowDisplayMark(DisplayMarkType mark, bool& show) const; - - /** Shows or hides a particular type of annotation. - @param mark The type of annotation. - @param show True to show, false to hide. - */ - AIErr SetShowDisplayMark(DisplayMarkType mark,bool show); - - /** Retrieves the name associated with this artboard. - @param name [out] A buffer in which to return the name. - */ - AIErr GetName(ai::UnicodeString& name) const; - - /** Sets the name associated with this artboard. - @param name The new name. - */ - AIErr SetName(const ai::UnicodeString& name); - - /** Retrieves the ruler origin of the artboard. Ruler origin is relative to left-bottom corner of the artboard - @param rulerOrigin [out] A buffer in which to return the ruler origin. - */ - AIErr GetRulerOrigin(AIRealPoint& rulerOrigin) const; - - /** Sets the ruler origin of the artboard. Ruler origin is relative to left-bottom corner of the artboard - @param rulerOrigin The new ruler origin. - */ - AIErr SetRulerOrigin(const AIRealPoint& rulerOrigin); - - /** Reports whether this artboard has an application-generated name. This affects the file name of the artboard if it is saved - as part of an export-to-JPEG operation. - @param isDefault [out] A buffer in which to return true if the name is generated, false if it has been explicitly set. - */ - AIErr IsDefaultName(AIBoolean& isDefault) const; - - /** Internal. Do not use. */ - AIErr SetIsDefaultName(const AIBoolean& isDefault); - - public: // internal use public interface - ArtboardProperties(const ArtboardRef ref); - void deleteImpl(); - private: - friend class ArtboardList; - ArtboardRef fImpl; - }; - - /** The \c ArtboardList object is the interface to the set of artboards associated - with a document. It encapsulate all artboard operations. - */ - class ArtboardList - { - public: - /* Constructs an ArtboardList object for the current document*/ - ArtboardList(); - - /** Destructor */ - ~ArtboardList(); - /** Checks for a valid object, Invalid objects return an error on - every operation. - @return True if this object is valid. - */ - bool IsValid() const - { - return fImpl != NULL; - } - - /** Adds a new artboard to the document and reports its index position in this artboard list. - @param newArtboard The new artboard's properties. - @param index [out] A buffer in which to return the 0-based index position of the new artboard. - @return The error \c #kAIExceededMaxArtboardLimitErr if the number of artboards exceeds \c #kAIMAX_ARTBOARD_LIMIT. - */ - - AIErr AddNew(ArtboardProperties& newArtboard, ArtboardID& index); - - /** Inserts a new artboard to the document at the specified location. - @param artboard The new artboard's properties. - @param index 0-based index position of the new artboard. - @return The error \c #kAIExceededMaxArtboardLimitErr if the number of artboards exceeds \c #kAIMAX_ARTBOARD_LIMIT. - */ - - AIErr Insert(ArtboardProperties& artboard, ArtboardID& index); - - /** Deletes an artboard from the document list, makes the next one in the list active. - @param index The 0-based index position of the artboard to delete. - @return The error \c #kAICantDeleteLastArtboardErr if this is the last artboard in the list. - */ - AIErr Delete(ArtboardID index); - /** Retrieves the number of artboards defined in the artboard list. - @param count [out] A buffer in which to return the number of artboards. - */ - AIErr GetCount(ArtboardID& count) const; - - /** Retrieves the properties of an artboard. Use with \c #GetCount() and \c #Update() - to modify an artboard without changing which artboard is active in the document. - @param index The 0-based index position of the artboard in the artboard list.. - @return The artboard properties object. On error returns an invalid object. - */ - ArtboardProperties GetArtboardProperties(ArtboardID index); - - /** Updates the properties of an artboard. Use with \c #GetCount() and \c #GetArtboardProperties() - to modify an artboard without changing which artboard is active in the document. - @param index The 0-based index position of the artboard in the document list. - @param artboard The object containing the new artboard properties. - */ - AIErr Update(ArtboardID index, const ArtboardProperties& artboard); - - /** Retrieves the index position of the active artboard in the document's list. - @param index [out] A buffer in which to return the 0-based index, or -1 if there are - no artboards in the current document. - */ - AIErr GetActive(ArtboardID& index) const; - - /** Makes a specific artboard active, and makes it current in the iteration order. - @param index The 0-based index position of the artboard in the document list. - */ - AIErr SetActive(ArtboardID index); - - public: // internal use public interface - ArtboardList(const ArtboardList&); - ArtboardList& operator=(const ArtboardList&); - ArtboardList(ArtboardListRef); - void deleteImpl(); - - private: - ArtboardListRef fImpl; - }; - - /** The \c ArtboardUtils object is a collection of utility functions for common operations. - */ - namespace ArtboardUtils - { - /** Retrieves the number of artboards defined in the artboard list of the current document. - @param count [out] A buffer in which to return the number of artboards. - */ - inline AIErr GetCount(ArtboardID& count) - { - ArtboardList list; - return list.GetCount(count); - } - /** Retrieves the position and bounds of an artboard. - @param index The 0-based index position of the artboard in the document list. - @param rect [out] A buffer in which to return the value. - */ - inline AIErr GetPosition(ArtboardID index,AIRealRect& rect) - { - ArtboardList list; - ArtboardProperties artboard(list.GetArtboardProperties(index)); - if(!artboard.IsValid()) return kBadParameterErr; - return artboard.GetPosition(rect); - } - /** Retrieves the position and bounds of the currently active artboard. - @param rect [out] A buffer in which to return the value. - */ - inline AIErr GetActiveArtboardPosition(AIRealRect& rect) - { - AIErr error = kNoErr; - ArtboardList list; - ArtboardID index; - error = list.GetActive(index); - GetPosition(index,rect); - return error; - } - /** Retrieves the index of the currently active artboard. - @param index [out] A buffer in which to return the value. - */ - inline AIErr GetActiveArtboardIndex(ArtboardID& index) - { - AIErr error = kNoErr; - ArtboardList list; - error = list.GetActive(index); - return error; - } - /** Retrieves the name of the specified artboard. - @param name [out] A buffer in which to return the name. - @param isDefault [out] True if the name is the default name. - @param index [in] The 0-based position index of the artboard, or -1 to get the active artboard. - */ - AIErr GetArtboardName(ai::UnicodeString& name,bool& isDefault, ArtboardID index = kActiveArtboard); - - /** Retrieves the index of the artboard with specified name - @param name [in] The name of the Artboard. - @param index [out] The artboard index . - */ - AIErr GetArtboardIndexByName(const ai::UnicodeString& name, ai::ArtboardID& index); - } -} - -#endif //_IAI_ARTBOARDS_ \ No newline at end of file +#pragma once +#ifndef _IAI_ARTBOARDS_ +#define _IAI_ARTBOARDS_ + +/* +* Name: IAIArtboards.hpp +* Author: Started by Pushp +* Date: November, 2008 +* Purpose: Adobe Illustrator Artboard Interfaces +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2009 Adobe Systems Incorporated. +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ +#include "AITypes.h" +#include "IAIUnicodeString.h" +#if defined(ILLUSTRATOR_MINIMAL) + #include "IAIUUID.h" +#endif + +#include +#ifdef AI_HAS_RVALUE_REFERENCES +#include +#endif //AI_HAS_RVALUE_REFERENCES + +class CAIArtboardProperties; +class CAIArtboardList; + +/** @ingroup Errors + @see ArtboardProperties */ +#define kAICantDeleteLastArtboardErr 'CDLC' +/** @ingroup Errors + @see ArtboardProperties */ +#define kAIExceededMaxArtboardLimitErr 'EMxL' +/** @ingroup Errors + @see ArtboardProperties */ + +/** @ingroup Notifiers + Sent when the document ruler origin has been changed or reset. See \c #AIArtboardSuite. */ +#define kAIArtboardRulerOriginChangedNotifier "AI Artboard Ruler Origin Changed Notifier" + +#define kNotFoundErr '!FND' + +#define kAIArtboardOutOfCanvasErr 'AOoC' + +#define kActiveArtboard -1 + +namespace ai +{ + /** Artboard identifier. */ + typedef ai::int32 ArtboardID; + /** Artboard object. */ + typedef CAIArtboardProperties* ArtboardRef; + /** Artboard list object. */ + typedef CAIArtboardList* ArtboardListRef; +#if defined(ILLUSTRATOR_MINIMAL) + typedef ai::uuid ArtboardUUID; +#endif + + /** The \c ArtboardProperties object encapsulates all the attributes associated with + an artboard. These are not live objects but a snapshot at any given time. + To update an object, you must call \c ai::ArtboardList::Update. + */ + class ArtboardProperties + { + public: + /** Types of artboard display marks and annotations. */ + typedef enum + { + kNone = 0, + kCenter = 1, + kCrossHair = 1<<1, + kSafeAreas = 1<<2 + } DisplayMarkType; + + /** Default constructor */ + ArtboardProperties(); + + /** Copy Constructor */ + ArtboardProperties(const ArtboardProperties&); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move Constructor */ + ArtboardProperties(ArtboardProperties&& rhs) AINOEXCEPT : fImpl{rhs.fImpl} + { + rhs.fImpl = nullptr; + } +#endif + + /** Destructor */ + ~ArtboardProperties(); + + void swap(ArtboardProperties& rhs) AINOEXCEPT + { + std::swap(fImpl, rhs.fImpl); + } + + /** Copy assignment operator */ + ArtboardProperties& operator=(const ArtboardProperties&); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move assignment operator */ + ArtboardProperties& operator=(ArtboardProperties&& rhs) AINOEXCEPT + { + swap(rhs); + return *this; + } +#endif + + /** Checks for a valid object, Invalid objects return an error on + every operation. + @return True if this object is valid. */ + bool IsValid() const + { + return fImpl != NULL; + } + + /** Retrieves the position and bounds of this artboard. + @param value [out] A buffer in which to return the value. + */ + AIErr GetPosition(AIRealRect& value) const; + + /** Modifies the position and bounds of this artboard. Call \c ai::ArtboardList::Update() + with this object to make the change. + @param value The new position and bounds value. + */ + AIErr SetPosition(AIRealRect value); + + /** Retrieves the pixel aspect ratio of the artboard ruler. + @param value [out] A buffer in which to return the value. + */ + AIErr GetPAR(AIReal& value) const; + + /** Modifies the pixel aspect ratio of the artboard ruler. Call \c ai::ArtboardList::Update() + with this object to make the change in the artboard + @param value The new value. + */ + AIErr SetPAR(AIReal value); + + /** Reports whether a particular type of annotation is shown or hidden. + @param mark The type of annotation. + @param show [out] A buffer in which to return true if the mark is shown, false if hidden. + */ + AIErr GetShowDisplayMark(DisplayMarkType mark, bool& show) const; + + /** Shows or hides a particular type of annotation. + @param mark The type of annotation. + @param show True to show, false to hide. + */ + AIErr SetShowDisplayMark(DisplayMarkType mark,bool show); + + /** Retrieves the name associated with this artboard. + @param name [out] A buffer in which to return the name. + */ + AIErr GetName(ai::UnicodeString& name) const; + + /** Sets the name associated with this artboard. + @param name The new name. + */ + AIErr SetName(const ai::UnicodeString& name); + + /** Retrieves the ruler origin of the artboard. Ruler origin is relative to left-bottom corner of the artboard + @param rulerOrigin [out] A buffer in which to return the ruler origin. + */ + AIErr GetRulerOrigin(AIRealPoint& rulerOrigin) const; + + /** Sets the ruler origin of the artboard. Ruler origin is relative to left-bottom corner of the artboard + @param rulerOrigin The new ruler origin. + */ + AIErr SetRulerOrigin(const AIRealPoint& rulerOrigin); + + /** Reports whether this artboard has an application-generated name. This affects the file name of the artboard if it is saved + as part of an export-to-JPEG operation. + @param isDefault [out] A buffer in which to return true if the name is generated, false if it has been explicitly set. + */ + AIErr IsDefaultName(AIBoolean& isDefault) const; + + /** Internal. Do not use. */ + AIErr SetIsDefaultName(const AIBoolean& isDefault); + + AIErr IsSelected(AIBoolean& isSelected) const; + +#if defined(ILLUSTRATOR_MINIMAL) + /** Gets the UUID associated with the artboard. + @param uuid [out] A buffer in which to return the UUID. + */ + AIErr GetUUID(ArtboardUUID& uuid) const; + + /** Gets the UUID associated with the artboard. + @param source [out] A buffer in which to return the UUID. + */ + + /** Clones the artboard properties along with assigning unique uuid to the properties. + @param source The properties which is to be cloned. + */ + AIErr CloneWithUniqueUUID(const ArtboardProperties& source); +#endif + + AIErr GetUUIDAsString(ai::UnicodeString& uuid) const; + + public: // internal use public interface + ArtboardProperties(const ArtboardRef ref); + void deleteImpl(); + private: +#if defined(ILLUSTRATOR_MINIMAL) + AIErr SetUUID(const ArtboardUUID& uuid); +#endif + friend class ArtboardList; + ArtboardRef fImpl; + }; + + /** The \c ArtboardList object is the interface to the set of artboards associated + with a document. It encapsulate all artboard operations. + */ + class ArtboardList + { + public: +#ifdef AI_HAS_RVALUE_REFERENCES + class Artboard; + class iterator; + friend class iterator; + using value_type = Artboard; +#endif + /* Constructs an ArtboardList object for the current document*/ + ArtboardList(); + + /** Destructor */ + ~ArtboardList(); + /** Checks for a valid object, Invalid objects return an error on + every operation. + @return True if this object is valid. + */ + bool IsValid() const + { + return fImpl != NULL; + } + + /** Adds a new artboard to the document and reports its index position in this artboard list. + @param newArtboard The new artboard's properties. + @param index [out] A buffer in which to return the 0-based index position of the new artboard. + @return The error \c #kAIExceededMaxArtboardLimitErr if the number of artboards exceeds \c #kAIMAX_ARTBOARD_LIMIT. + */ + + AIErr AddNew(ArtboardProperties& newArtboard, ArtboardID& index); + + /** Inserts a new artboard to the document at the specified location. + @param artboard The new artboard's properties. + @param index 0-based index position of the new artboard. + @return The error \c #kAIExceededMaxArtboardLimitErr if the number of artboards exceeds \c #kAIMAX_ARTBOARD_LIMIT. + Note : It will override the UUID in artboardProperties. In case you want to preserve the UUID in artboard properties use \c #InsertUsingArtboardPropertiesUUID() + */ + + AIErr Insert(ArtboardProperties& artboard, ArtboardID& index); + + /** Inserts a new artboard to the document at the specified location using the UUID in artboard properties. + @param artboard The new artboard's properties. + @param index 0-based index position of the new artboard. + @return The error \c #kAIExceededMaxArtboardLimitErr if the number of artboards exceeds \c #kAIMAX_ARTBOARD_LIMIT. + */ + + AIErr InsertUsingArtboardPropertiesUUID(ArtboardProperties& artboard, ArtboardID& index); + + /** Deletes an artboard from the document list, makes the next one in the list active. + @param index The 0-based index position of the artboard to delete. + @return The error \c #kAICantDeleteLastArtboardErr if this is the last artboard in the list. + */ + AIErr Delete(ArtboardID index); + + // Delete multiple artboards + // It's more efficient to use this method, if multiple artboards are to be deleted simultaneously, + // than looping for each artboard and calling Delete for that one + AIErr Delete(const std::vector& artboardIDs); + + /** Retrieves the number of artboards defined in the artboard list. + @param count [out] A buffer in which to return the number of artboards. + */ + AIErr GetCount(ArtboardID& count) const; + + /** Retrieves the properties of an artboard. Use with \c #GetCount() and \c #Update() + to modify an artboard without changing which artboard is active in the document. + @param index The 0-based index position of the artboard in the artboard list.. + @return The artboard properties object. On error returns an invalid object. + */ + ArtboardProperties GetArtboardProperties(ArtboardID index); + + /** Updates the properties of an artboard. Use with \c #GetCount() and \c #GetArtboardProperties() + to modify an artboard without changing which artboard is active in the document. + @param index The 0-based index position of the artboard in the document list. + @param artboard The object containing the new artboard properties. + */ + AIErr Update(ArtboardID index, const ArtboardProperties& artboard); + + /** Retrieves the index position of the active artboard in the document's list. + @param index [out] A buffer in which to return the 0-based index, or -1 if there are + no artboards in the current document. + */ + AIErr GetActive(ArtboardID& index) const; + + /** Makes a specific artboard active, and makes it current in the iteration order. + @param index The 0-based index position of the artboard in the document list. + */ + AIErr SetActive(ArtboardID index); + + // TODO: documentation [dkhandel] + AIErr Select(ai::ArtboardID artboardID, bool exclusively); + + // Set selection for multiple artboards + // It's more efficient to use this method, if multiple artboards are to be selected, + // than looping for each artboard and calling SetSelection for that one + AIErr Select(const std::vector& artboardIDs, bool exclusively); + + // Select all artboards + AIErr SelectAll(); + + AIErr Deselect(ai::ArtboardID artboardID); + AIErr DeselectAll(); + + public: // internal use public interface + ArtboardList(const ArtboardList&); + ArtboardList& operator=(const ArtboardList&); + ArtboardList(ArtboardListRef); + void deleteImpl(); + + void swap(ArtboardList& rhs) AINOEXCEPT + { + std::swap(fImpl, rhs.fImpl); + } + +#ifdef AI_HAS_RVALUE_REFERENCES + ArtboardList(ArtboardList&& rhs) AINOEXCEPT : fImpl{rhs.fImpl} + { + rhs.fImpl = nullptr; + } + + ArtboardList& operator=(ArtboardList&& rhs) AINOEXCEPT + { + swap(rhs); + return *this; + } + + /** + //Range loop support + ai::ArtboardList artboardList; + for (const auto& artboard: artboardList) + { + auto artboardID = artboard.GetID(); + auto& props = artboard.GetProps(); + } + */ + iterator begin(); + iterator end(); + + /** + Index-based accessor method. + + Usage Example: + ai::ArtboardList artboardList; + auto artboard = artboardList.at(0); + + AIRealRect artboardPos{}; + artboard.GetProps().GetPosition(artboardPos); + + artboardPos.left += 100.0; + artboardPos.right += 100.0; + artboard.GetProps().SetPosition(artboardPos); + + artboard.Update(): + */ + value_type at(ArtboardID artboardID); + + ArtboardID size() const AINOEXCEPT; +#endif + private: + ArtboardListRef fImpl; + }; + +#ifdef AI_HAS_RVALUE_REFERENCES + class ArtboardList::Artboard + { + public: + using container_type = ArtboardList*; + + /** + Create an artboard object + */ + Artboard(ArtboardID artboardID, container_type artboardListPtr); + + /** + Movable but not copyable + */ + Artboard(Artboard&& other) AINOEXCEPT : + mArtboardID(other.mArtboardID), + mProps(std::move(other.mProps)), + mArtboardListPtr(other.mArtboardListPtr) + { + other.mArtboardListPtr = nullptr; + } + + Artboard& operator=(Artboard&& other) AINOEXCEPT + { + swap(other); + return (*this); + } + + Artboard(const Artboard&) = delete; + Artboard& operator=(const Artboard&) = delete; + + void swap(Artboard& other) AINOEXCEPT + { + std::swap(mArtboardID, other.mArtboardID); + mProps.swap(other.mProps); + std::swap(mArtboardListPtr, other.mArtboardListPtr); + } + + /** Update the current value of the properties for an artboard in document + #ArtboardList::Update + */ + AIErr Update(); + + /** + Returns the ArtbardID of the artboard object + */ + ArtboardID GetID() const AINOEXCEPT { return mArtboardID; } + + /** + Returns the properties of this artboard object, which can be changed and updated later with #Update + */ + ArtboardProperties& GetProps() { return mProps; } + + /** + Returns the read-only properties of the artboard object. + */ + const ArtboardProperties& GetProps() const { return mProps; } + + private: + ArtboardID mArtboardID = 0; + ArtboardProperties mProps; + container_type mArtboardListPtr; + }; + + class ArtboardList::iterator + { + public: + using value_type = ArtboardList::Artboard; + using container_type = ArtboardList*; + using size_type = ArtboardID; + + iterator(size_type index, container_type artboardListPtr); + + iterator(iterator&& other) AINOEXCEPT : + mValue(std::move(other.mValue)), + mArtboardListPtr(other.mArtboardListPtr), + mArtboardCount(other.mArtboardCount) + { + other.mArtboardListPtr = nullptr; + } + + iterator& operator=(iterator&& other) AINOEXCEPT + { + swap(other); + return (*this); + } + + iterator(const iterator&) = delete; + iterator& operator=(const iterator&) = delete; + + void swap(iterator& other) AINOEXCEPT + { + mValue.swap(other.mValue); + std::swap(mArtboardCount, other.mArtboardCount); + std::swap(mArtboardListPtr, other.mArtboardListPtr); + } + + iterator& operator++(); + + value_type& operator*() { return mValue; } + const value_type& operator*() const { return mValue; } + + bool operator==(const iterator& rhs) const; + bool operator!=(const iterator& rhs) const { return !(*this == rhs); } + + private: + bool compatible(const iterator& rhs) const; + + private: + value_type mValue; + container_type mArtboardListPtr; + size_type mArtboardCount = 1; + }; +#endif //AI_HAS_RVALUE_REFERENCES + + /** The \c ArtboardUtils object is a collection of utility functions for common operations. + */ + namespace ArtboardUtils + { + /** Retrieves the number of artboards defined in the artboard list of the current document. + @param count [out] A buffer in which to return the number of artboards. + */ + inline AIErr GetCount(ArtboardID& count) + { + ArtboardList list; + return list.GetCount(count); + } + + /** Retrieves the position and bounds of an artboard. + @param index The 0-based index position of the artboard in the document list. + @param rect [out] A buffer in which to return the value. + */ + inline AIErr GetPosition(ArtboardID index,AIRealRect& rect) + { + ArtboardList list; + ArtboardProperties artboard(list.GetArtboardProperties(index)); + if(!artboard.IsValid()) return kBadParameterErr; + return artboard.GetPosition(rect); + } + /** Retrieves the position and bounds of the currently active artboard. + @param rect [out] A buffer in which to return the value. + */ + inline AIErr GetActiveArtboardPosition(AIRealRect& rect) + { + AIErr error = kNoErr; + ArtboardList list; + ArtboardID index; + error = list.GetActive(index); + GetPosition(index,rect); + return error; + } + + /** Retrieves the index of the currently active artboard. + @param index [out] A buffer in which to return the value. + */ + inline AIErr GetActiveArtboardIndex(ArtboardID& index) + { + ArtboardList list; + return list.GetActive(index); + } + + /* Selects all artboards.. + */ + inline AIErr SelectAllArtboards() + { + ArtboardList list; + return list.SelectAll(); + } + + inline AIErr IsSelected(ai::ArtboardID id, AIBoolean& isSelected) + { + ArtboardList list; + const auto properties = list.GetArtboardProperties(id); + return properties.IsSelected(isSelected); + } + + /** Retrieves the name of the specified artboard. + @param name [out] A buffer in which to return the name. + @param isDefault [out] True if the name is the default name. + @param index [in] The 0-based position index of the artboard, or -1 to get the active artboard. + */ + AIErr GetArtboardName(ai::UnicodeString& name,bool& isDefault, ArtboardID index = kActiveArtboard); + + /** Retrieves the index of the artboard with specified name + @param name [in] The name of the Artboard. + @param index [out] The artboard index . + */ + AIErr GetArtboardIndexByName(const ai::UnicodeString& name, ai::ArtboardID& index); + + /** Tells if there is any overlap between the artboards in the artboard list + */ + AIErr AreAnyArtboardsOverlapping(ai::ArtboardList &artboardList, AIBoolean &isOverlapping); + } +} + +#endif //_IAI_ARTBOARDS_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.cpp index f268055..755bdb5 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.cpp @@ -1,71 +1,74 @@ -/* - * Name: IAIAutoBuffer.cpp - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Plug-in side implementation of the - * ai::AutoBuffer object interface. - * This file should NOT be included in the - * core application. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "IAIAutoBuffer.h" -#include "SPBlocks.h" - -#include "AITypes.h" // For ai::Error & inclusion of ASTypes.h - -#ifdef _IAIAUTOBUFFER_SUITE_INCLUDE_H_ - #include _IAIAUTOBUFFER_SUITE_INCLUDE_H_ -#else - #ifndef _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ - #define _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ 1 - #endif - #if _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ - extern "C" - { - #endif - /** The plug-in using the ai::AutoBuffer class is required to provide - the SPBlocksSuite pointer. Alternatively, a plug-in may provide - its own implementation for the AllocateBlock and DeleteBlock. - */ - extern SPBlocksSuite *sSPBlocks; - - #if _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ - } - #endif // _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ - -#endif - - -///////////////////////////////////////////////////////////////////////////////////////////////////////////// -// ai::SPAlloc methods - -void* ai::SPAlloc::AllocateBlock (size_t byteCount) -{ - void* block = 0; - SPErr spError = sSPBlocks->AllocateBlock( byteCount, "ai::SPAlloc::AllocateBlock", &block ); - if ( spError != 0 ) - { - throw ai::Error(kOutOfMemoryErr); - } - return block; -} - -void ai::SPAlloc::DeleteBlock (void* block) -{ - if ( block ) - { - /*SPErr spError =*/ sSPBlocks->FreeBlock (block); - } -} +/* + * Name: IAIAutoBuffer.cpp + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Plug-in side implementation of the + * ai::AutoBuffer object interface. + * This file should NOT be included in the + * core application. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "IAIAutoBuffer.h" +#include "SPBlocks.h" + +#include "AITypes.h" // For ai::Error & inclusion of ASTypes.h + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite(SPBlocks) +#elif defined(_IAIAUTOBUFFER_SUITE_INCLUDE_H_) + #include _IAIAUTOBUFFER_SUITE_INCLUDE_H_ +#else + #ifndef _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ + #define _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ 1 + #endif + #if _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ + extern "C" + { + #endif + /** The plug-in using the ai::AutoBuffer class is required to provide + the SPBlocksSuite pointer. Alternatively, a plug-in may provide + its own implementation for the AllocateBlock and DeleteBlock. + */ + extern SPBlocksSuite *sSPBlocks; + + #if _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ + } + #endif // _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ + +#endif + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// ai::SPAlloc methods + +void* ai::SPAlloc::AllocateBlock (size_t byteCount) +{ + void* block = 0; + SPErr spError = sSPBlocks->AllocateBlock( byteCount, "ai::SPAlloc::AllocateBlock", &block ); + if ( spError != 0 ) + { + throw ai::Error(kOutOfMemoryErr); + } + return block; +} + +void ai::SPAlloc::DeleteBlock (void* block) +{ + if ( block ) + { + /*SPErr spError =*/ sSPBlocks->FreeBlock (block); + } +} diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.h index 67a542b..57fea10 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIAutoBuffer.h @@ -1,226 +1,305 @@ -/* - * Name: IAIAutoBuffer.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -#ifndef _IAIAUTOBUFFER_H_ -#define _IAIAUTOBUFFER_H_ - - -#include - -/** @file IAIAutoBuffer.h */ - -namespace ai { - -/** Allocator object class for the AutoBuffer template. -*/ -class SPAlloc { -public: - /** Allocates a block of memory. - @param byteCount The number of bytes, an unsigned integer. - @return A pointer to the allocated block. - */ - static void* AllocateBlock(size_t byteCount); - /** Frees a block of memory allocated by \c #AllocateBlock(). - @param block A pointer to the block. - */ - static void DeleteBlock(void* block); -}; - -/** An \c AutoBuffer class object allows you to retrieve string contents - into a buffer, or to pass or retrieve any array of data types, - without having to manage the buffer's memory. -*/ -/* Notes: elem's type must be limited to POD (plain old data) types for AutoBuffer objects - * that are to be passed across the Illustrator SuitePea suite boundary. This is required as the - * ctor and dtor for non-POD types are not available on both sides of this boundary. For single-side - * of the API boundary usage, clients are free to construct AutoBuffers of any type. - * - * In order for AutoBuffer to function properly across the Illustrator plug-in API boundary, - * the provided SPAlloc class definition must be used. Allocations MUST be done using the - * SPBlocks suite. - * - * std::vector is not used because AI has no control over the default allocator for the vector and - * the implementations of std::vector could be different on each side of the API boundary causing problems. - */ -template class AutoBuffer { -public: - /** Constructor. - @param count Initial number of elements that the buffer should be able to hold - */ - explicit AutoBuffer (size_type count = 0) - : fCapacity(count), - fBuffer(0) - { - if ( fCapacity > 0 ) - { - fBuffer = reinterpret_cast(A::AllocateBlock(ByteCount(fCapacity))); - Init(); - } - } - /** Copy constructor. - @param b buffer to be copied. - */ - AutoBuffer (const AutoBuffer& b) - : fCapacity(b.fCapacity), - fBuffer(0) - { - if ( fCapacity > 0 ) - { - fBuffer = reinterpret_cast(A::AllocateBlock(ByteCount(fCapacity))); - Copy(b.fBuffer); - } - } - /** Destructor. - */ - ~AutoBuffer () - { - if ( fBuffer ) - { - Destroy(fBuffer); - A::DeleteBlock(fBuffer); - } - } - - /** Reports whether the buffer object has a handle to a valid buffer. - @return True if the buffer pointer is valid. - */ - bool IsValid () const - { - return fBuffer != 0; - } - - /** Retrieves the buffer. - @return A writeable pointer to the buffer. - @note The returned pointer can be invalidated by calls to \c #Resize(). - */ - elem* GetBuffer () const - { - return fBuffer; - } - operator elem* () const - { - return GetBuffer(); - } - - /** Retrieves an element at a given index position in the buffer. Use - with \c #GetCount() to iterate through elements. - @param n The 0-based position index. - @return A writeable reference to the object. - @note There is no protection for indexing off the end of the array. - */ - elem& operator[] (size_type n) - { - return fBuffer[n]; - } - /** Retrieves the current capacity of the buffer. - @return The number of elements that can be contained. - */ - size_type GetCount () const - { - return fCapacity; - } - /** Resizes the buffer. If the given size is less than the current - capacity, the buffer is shortened and truncated elements are destroyed. - If it is greater, the buffer is grown and the new elements - are initialized. - @param newSize The new number of elements. - */ - void Resize (size_type newSize) - { - if ( newSize != fCapacity ) - { - elem *newBuffer = reinterpret_cast(A::AllocateBlock(ByteCount(newSize))); - if ( fBuffer ) - { - elem* oldBuffer = fBuffer; - fBuffer = newBuffer; - Copy(oldBuffer, 0, fCapacity < newSize ? fCapacity : newSize ); - - // initialize any new elements - Init(fCapacity, newSize); - - Destroy(oldBuffer, 0, fCapacity); - A::DeleteBlock(oldBuffer); - } - else - { - fBuffer = newBuffer; - Init(); - } - fCapacity = newSize; - } - } - - AutoBuffer& operator= (const AutoBuffer& rhs) - { - if ( this != &rhs ) - { - if ( fCapacity != rhs.fCapacity ) - { - Destroy(fBuffer); - A::DeleteBlock(fBuffer); - fBuffer = reinterpret_cast(A::AllocateBlock(ByteCount(rhs.fCapacity))); - fCapacity = rhs.fCapacity; - } - Copy(rhs.fBuffer); - } - return *this; - } - - static size_type lastIndex () - { return size_type(-1); } -private: - void Init (size_type start = 0, size_type end = lastIndex()) - { - size_type elemCount = (end == lastIndex() ? GetCount() : end); - for (size_type i = start; i < elemCount; ++i) - { - // invoke the constructor on each element - new (&fBuffer[i])elem; - } - } - void Destroy (elem* e, size_type start = 0, size_type end = lastIndex()) - { - size_type elemCount = (end == lastIndex() ? GetCount() : end); - for (size_type i = start; i < elemCount; ++i) - { - e[i].~elem(); - } - } - void Copy (const elem* e, size_type start = 0, size_type end = lastIndex()) - { - size_type elemCount = (end == lastIndex() ? GetCount() : end); - for (size_type i = start; i < elemCount; ++i) - { - fBuffer[i] = e[i]; - } - } - size_type ByteCount (size_type elemCount) - { - return elemCount * sizeof(elem); - } -private: - size_type fCapacity; - elem* fBuffer; -}; - -} // end of namespace ai - -#endif // _IAIAUTOBUFFER_H_ +/* + * Name: IAIAutoBuffer.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +#ifndef _IAIAUTOBUFFER_H_ +#define _IAIAUTOBUFFER_H_ + +#include "AITypes.h" + +#include + +/** @file IAIAutoBuffer.h */ + +namespace ai { + +/** Allocator object class for the AutoBuffer template. +*/ +class SPAlloc { +public: + /** Allocates a block of memory. + @param byteCount The number of bytes, an unsigned integer. + @return A pointer to the allocated block. + */ + static void* AllocateBlock(size_t byteCount); + /** Frees a block of memory allocated by \c #AllocateBlock(). + @param block A pointer to the block. + */ + static void DeleteBlock(void* block); +}; + +/** An \c AutoBuffer class object allows you to retrieve string contents + into a buffer, or to pass or retrieve any array of data types, + without having to manage the buffer's memory. +*/ +/* Notes: elem's type must be limited to POD (plain old data) types for AutoBuffer objects + * that are to be passed across the Illustrator SuitePea suite boundary. This is required as the + * ctor and dtor for non-POD types are not available on both sides of this boundary. For single-side + * of the API boundary usage, clients are free to construct AutoBuffers of any type. + * + * In order for AutoBuffer to function properly across the Illustrator plug-in API boundary, + * the provided SPAlloc class definition must be used. Allocations MUST be done using the + * SPBlocks suite. + * + * std::vector is not used because AI has no control over the default allocator for the vector and + * the implementations of std::vector could be different on each side of the API boundary causing problems. + */ +template class AutoBuffer { +public: + typedef elem* iterator; + typedef const elem* const_iterator; + + /** Constructor. + @param count Initial number of elements that the buffer should be able to hold + */ + explicit AutoBuffer (size_type count = 0) + : fCapacity(count), + fBuffer(0) + { + if ( fCapacity > 0 ) + { + fBuffer = reinterpret_cast(A::AllocateBlock(ByteCount(fCapacity))); + Init(); + } + } + /** Copy constructor. + @param b buffer to be copied. + */ + AutoBuffer (const AutoBuffer& b) + : fCapacity(b.fCapacity), + fBuffer(0) + { + if ( fCapacity > 0 ) + { + fBuffer = reinterpret_cast(A::AllocateBlock(ByteCount(fCapacity))); + Copy(b.fBuffer); + } + } + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move constructor. + @param b buffer to be moved from. + */ + AutoBuffer (AutoBuffer&& b) AINOEXCEPT : fCapacity{b.fCapacity}, fBuffer{b.fBuffer} + { + b.fBuffer = nullptr; + } +#endif + + /** Destructor. + */ + ~AutoBuffer () + { + try + { + if ( fBuffer ) + { + Destroy(fBuffer); + A::DeleteBlock(fBuffer); + } + } + catch(...) + {} + } + + /** Reports whether the buffer object has a handle to a valid buffer. + @return True if the buffer pointer is valid. + */ + bool IsValid () const + { + return fBuffer != 0; + } + + /** Retrieves the buffer. + @return A writeable pointer to the buffer. + @note The returned pointer can be invalidated by calls to \c #Resize(). + */ + elem* GetBuffer () const + { + return fBuffer; + } + + explicit operator elem* () const + { + return GetBuffer(); + } + + /** Retrieves an element at a given index position in the buffer. Use + with \c #GetCount() to iterate through elements. + @param n The 0-based position index. + @return A writeable reference to the object. + @note There is no protection for indexing off the end of the array. + */ + elem& operator[] (size_type n) + { + return fBuffer[n]; + } + + const elem& operator[] (size_type n) const + { + return fBuffer[n]; + } + + /** Retrieves the first element in the buffer. + @note There is no protection for indexing off the begin or end of the array. + */ + elem& front() + { + return fBuffer[0]; + } + + const elem& front() const + { + return fBuffer[0]; + } + + /** Retrieves the last element in the buffer. + @note There is no protection for indexing off the begin or end of the array. + */ + elem& back() + { + return fBuffer[fCapacity - 1]; + } + + const elem& back() const + { + return fBuffer[fCapacity - 1]; + } + + /** Retrieves the current capacity of the buffer. + @return The number of elements that can be contained. + */ + size_type GetCount () const AINOEXCEPT + { + return size(); + } + + size_type size() const AINOEXCEPT + { + return fCapacity; + } + + bool empty() const AINOEXCEPT + { + return fCapacity == 0; + } + + + /** Resizes the buffer. If the given size is less than the current + capacity, the buffer is shortened and truncated elements are destroyed. + If it is greater, the buffer is grown and the new elements + are initialized. + @param newSize The new number of elements. + */ + void Resize (size_type newSize) + { + if ( newSize != fCapacity ) + { + elem *newBuffer = reinterpret_cast(A::AllocateBlock(ByteCount(newSize))); + if ( fBuffer ) + { + elem* oldBuffer = fBuffer; + fBuffer = newBuffer; + Copy(oldBuffer, 0, fCapacity < newSize ? fCapacity : newSize ); + + // initialize any new elements + Init(fCapacity, newSize); + + Destroy(oldBuffer, 0, fCapacity); + A::DeleteBlock(oldBuffer); + } + else + { + fBuffer = newBuffer; + Init(); + } + fCapacity = newSize; + } + } + + AutoBuffer& operator= (const AutoBuffer& rhs) + { + if ( this != &rhs ) + { + if ( fCapacity != rhs.fCapacity ) + { + Destroy(fBuffer); + A::DeleteBlock(fBuffer); + fBuffer = reinterpret_cast(A::AllocateBlock(ByteCount(rhs.fCapacity))); + fCapacity = rhs.fCapacity; + } + Copy(rhs.fBuffer); + } + return *this; + } + +#ifdef AI_HAS_RVALUE_REFERENCES + AutoBuffer& operator= (AutoBuffer&& rhs) AINOEXCEPT + { + fCapacity = rhs.fCapacity; + std::swap(fBuffer, rhs.fBuffer); + return *this; + } +#endif + + iterator begin() AINOEXCEPT { return fBuffer; } + iterator end() AINOEXCEPT { return fBuffer + fCapacity; } + const_iterator begin() const AINOEXCEPT { return fBuffer; } + const_iterator end() const AINOEXCEPT { return fBuffer + fCapacity; } + + static size_type lastIndex () + { return size_type(-1); } +private: + void Init (size_type start = 0, size_type end = lastIndex()) + { + size_type elemCount = (end == lastIndex() ? GetCount() : end); + for (size_type i = start; i < elemCount; ++i) + { + // invoke the constructor on each element + new (&fBuffer[i])elem; + } + } + void Destroy (elem* e, size_type start = 0, size_type end = lastIndex()) + { + size_type elemCount = (end == lastIndex() ? GetCount() : end); + for (size_type i = start; i < elemCount; ++i) + { + e[i].~elem(); + } + } + void Copy (const elem* e, size_type start = 0, size_type end = lastIndex()) + { + size_type elemCount = (end == lastIndex() ? GetCount() : end); + for (size_type i = start; i < elemCount; ++i) + { + fBuffer[i] = e[i]; + } + } + size_type ByteCount (size_type elemCount) + { + return elemCount * sizeof(elem); + } +private: + size_type fCapacity; + elem* fBuffer; +}; + +} // end of namespace ai + +#endif // _IAIAUTOBUFFER_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAICharacterEncoding.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAICharacterEncoding.h index 3a282c1..590e6cc 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAICharacterEncoding.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAICharacterEncoding.h @@ -1,228 +1,228 @@ -#ifndef _IAICHARACTERENCODING_H_ -#define _IAICHARACTERENCODING_H_ - -/* - * Name: IAICharacterEncoding.h - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include -#include -#include "AICharacterEncoding.h" - -//needed for one of the templates below. -extern "C" AICharacterEncodingSuite *sAICharacterEncoding; - -namespace ai { - -/** Encoding characteristics and functions for platform encoding. */ -struct PlatformTraits { - /** The basic type used to represent the data. */ - typedef char unit_type; - /** Retrieves the Illustrator character-encoding type. - @return The encoding type constant. */ - static AICharacterEncoding encoding () - {return kAIPlatformCharacterEncoding;} - /** Reports the maximum number of elements of the - basic type needed to represent a sequence of a - given number of character codes. - @param codes The number of character codes. - @return The number of elements needed. */ - static size_t codes_2_units (size_t codes) - {return codes * 2;} - /** Reports the maximum number of characters codes - that could be encoded by a given number of elements of - the basic type. - @param units The number of elements. - @return The number of character codes. */ - static size_t units_2_codes (size_t units) - {return units;} -}; - -/** Encoding characteristics and functions for UTF-8 encoding. */ -struct UTF8Traits { - /** The basic type used to represent the data. */ - typedef char unit_type; - /** Retrieves the Illustrator character-encoding type. - @return The encoding type constant. */ - static AICharacterEncoding encoding () - {return kAIUTF8CharacterEncoding;} - /** Reports the maximum number of elements of the - basic type needed to represent a sequence of a - given number of character codes. - @param codes The number of character codes. - @return The number of elements needed. */ - static size_t codes_2_units (size_t codes) - {return codes * 4;} - /** Reports the maximum number of characters codes - that could be encoded by a given number of elements of - the basic type. - @param units The number of elements. - @return The number of character codes. */ - static size_t units_2_codes (size_t units) - {return units;} -}; - -/** Encoding characteristics and functions for UTF-16 encoding. */ -struct UTF16Traits { - /** The basic type used to represent the data. */ - typedef ASUnicode unit_type; - /** Retrieves the Illustrator character-encoding type. - @return The encoding type constant. */ - static AICharacterEncoding encoding () - {return kAIUTF16CharacterEncoding;} - /** Reports the maximum number of elements of the - basic type needed to represent a sequence of a - given number of character codes. - @param codes The number of character codes. - @return The number of elements needed. */ - static size_t codes_2_units (size_t codes) - {return codes * 2;} - /** Reports the maximum number of characters codes - that could be encoded by a given number of elements of - the basic type. - @param units The number of elements. - @return The number of character codes. */ - static size_t units_2_codes (size_t units) - {return units;} -}; - -// Template class for encoded strings - -/** This class represents an encoded string. */ -template -class EncodedString { -public: - /** Default constructor. Creates an empty encoded-string object. - @return The new object. - */ - EncodedString () - {} - - /** Copy constructor. Creates a copy of an encoded-string object. - @param s The encoded-string object to copy. - @return The new object. - */ - EncodedString (const EncodedString& s) : - string(s.string) - {} - - /** Creates an encoded-string object with an initial string value. - @param s The initial string, with the desired encoding. - @return The new object. - */ - explicit EncodedString (const std::basic_string& s) : - string(s) - {} - - /** Creates an encoded-string object with an initial string value. - @param s The initial string, a \c NULL terminated sequence - of elements with the desired encoding. - @return The new object. - */ - explicit EncodedString (const typename Traits::unit_type* s) : - string(s) - {} - // construct an encoded string from a buffer containing elements - // of the same encoding - /** Creates an encoded-string object with an initial string value. - @param s The initial string, a buffer containing a sequence - of elements with the desired encoding. - @param length The number of elements in the string buffer. - @return The new object. - */ - EncodedString (const typename Traits::unit_type* s, size_t length) : - string(s, length) - {} - - /** Assignment operator */ - EncodedString& operator= (const EncodedString& s) - { - string = s.string; - return *this; - } - -#if 1 - - // for some reason Windows can't handle a templated conversion operator, - // so we define an explicit cast operator instead. - template - static EncodedString cast (const EncodedString& src) - { - EncodedString dst; - - size_t maxsize = Traits::codes_2_units(SrcTraits::units_2_codes(src.string.size())); - size_t maxbytes = maxsize * sizeof(typename Traits::unit_type); - std::vector b(maxsize); - - size_t bytes; - size_t size; - AIErr result = sAICharacterEncoding->ConvertBuffer( - src.string.data(), - src.string.size() * sizeof(typename SrcTraits::unit_type), - SrcTraits::encoding(), - &b[0], maxbytes, Traits::encoding(), - &bytes, FALSE); - if (result) - throw ai::Error(result); - size = bytes / sizeof(typename Traits::unit_type); - - dst = EncodedString(&b[0], size); - - return dst; - } -#else - // implicit conversion to another encoding - template - operator EncodedString () const - { - EncodedString dst; - - size_t maxsize = DstTraits::codes_2_units(Traits::units_2_codes(string.size())); - size_t maxbytes = maxsize * sizeof(DstTraits::unit_type); - std::vector b(maxsize); - - size_t bytes; - size_t size; - AIErr result = sAICharacterEncoding->ConvertBuffer( - string.data(), string.size(), Traits::encoding(), - b, maxbytes, DstTraits::encoding(), - &bytes, FALSE); - if (result) - throw ai::Error(result); - size = bytes / sizeof(DstTraits::unit_type); - - dst = EncodedString(b, size); - - return dst; - } -#endif - - // the encoded data. direct access is allowed. - std::basic_string string; -}; - - -// types for strings -/** Encoded string type: platform encoding. */ -typedef EncodedString PlatformString; -/** Encoded string type: UTF-8 encoding. */ -typedef EncodedString UTF8String; -/** Encoded string type: UTF-16 encoding. */ -typedef EncodedString UTF16String; - - -} - -#endif +#ifndef _IAICHARACTERENCODING_H_ +#define _IAICHARACTERENCODING_H_ + +/* + * Name: IAICharacterEncoding.h + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2005-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include +#include +#include "AICharacterEncoding.h" + +//needed for one of the templates below. +extern "C" AICharacterEncodingSuite *sAICharacterEncoding; + +namespace ai { + +/** Encoding characteristics and functions for platform encoding. */ +struct PlatformTraits { + /** The basic type used to represent the data. */ + typedef char unit_type; + /** Retrieves the Illustrator character-encoding type. + @return The encoding type constant. */ + static AICharacterEncoding encoding () + {return kAIPlatformCharacterEncoding;} + /** Reports the maximum number of elements of the + basic type needed to represent a sequence of a + given number of character codes. + @param codes The number of character codes. + @return The number of elements needed. */ + static size_t codes_2_units (size_t codes) + {return codes * 2;} + /** Reports the maximum number of characters codes + that could be encoded by a given number of elements of + the basic type. + @param units The number of elements. + @return The number of character codes. */ + static size_t units_2_codes (size_t units) + {return units;} +}; + +/** Encoding characteristics and functions for UTF-8 encoding. */ +struct UTF8Traits { + /** The basic type used to represent the data. */ + typedef char unit_type; + /** Retrieves the Illustrator character-encoding type. + @return The encoding type constant. */ + static AICharacterEncoding encoding () + {return kAIUTF8CharacterEncoding;} + /** Reports the maximum number of elements of the + basic type needed to represent a sequence of a + given number of character codes. + @param codes The number of character codes. + @return The number of elements needed. */ + static size_t codes_2_units (size_t codes) + {return codes * 4;} + /** Reports the maximum number of characters codes + that could be encoded by a given number of elements of + the basic type. + @param units The number of elements. + @return The number of character codes. */ + static size_t units_2_codes (size_t units) + {return units;} +}; + +/** Encoding characteristics and functions for UTF-16 encoding. */ +struct UTF16Traits { + /** The basic type used to represent the data. */ + typedef ASUnicode unit_type; + /** Retrieves the Illustrator character-encoding type. + @return The encoding type constant. */ + static AICharacterEncoding encoding () + {return kAIUTF16CharacterEncoding;} + /** Reports the maximum number of elements of the + basic type needed to represent a sequence of a + given number of character codes. + @param codes The number of character codes. + @return The number of elements needed. */ + static size_t codes_2_units (size_t codes) + {return codes * 2;} + /** Reports the maximum number of characters codes + that could be encoded by a given number of elements of + the basic type. + @param units The number of elements. + @return The number of character codes. */ + static size_t units_2_codes (size_t units) + {return units;} +}; + +// Template class for encoded strings + +/** This class represents an encoded string. */ +template +class EncodedString { +public: + /** Default constructor. Creates an empty encoded-string object. + @return The new object. + */ + EncodedString () + {} + + /** Copy constructor. Creates a copy of an encoded-string object. + @param s The encoded-string object to copy. + @return The new object. + */ + EncodedString (const EncodedString& s) : + string(s.string) + {} + + /** Creates an encoded-string object with an initial string value. + @param s The initial string, with the desired encoding. + @return The new object. + */ + explicit EncodedString (const std::basic_string& s) : + string(s) + {} + + /** Creates an encoded-string object with an initial string value. + @param s The initial string, a \c NULL terminated sequence + of elements with the desired encoding. + @return The new object. + */ + explicit EncodedString (const typename Traits::unit_type* s) : + string(s) + {} + // construct an encoded string from a buffer containing elements + // of the same encoding + /** Creates an encoded-string object with an initial string value. + @param s The initial string, a buffer containing a sequence + of elements with the desired encoding. + @param length The number of elements in the string buffer. + @return The new object. + */ + EncodedString (const typename Traits::unit_type* s, size_t length) : + string(s, length) + {} + + /** Assignment operator */ + EncodedString& operator= (const EncodedString& s) + { + string = s.string; + return *this; + } + +#if 1 + + // for some reason Windows can't handle a templated conversion operator, + // so we define an explicit cast operator instead. + template + static EncodedString cast (const EncodedString& src) + { + EncodedString dst; + + size_t maxsize = Traits::codes_2_units(SrcTraits::units_2_codes(src.string.size())); + size_t maxbytes = maxsize * sizeof(typename Traits::unit_type); + std::vector b(maxsize); + + size_t bytes; + size_t size; + AIErr result = sAICharacterEncoding->ConvertBuffer( + src.string.data(), + src.string.size() * sizeof(typename SrcTraits::unit_type), + SrcTraits::encoding(), + &b[0], maxbytes, Traits::encoding(), + &bytes, FALSE); + if (result) + throw ai::Error(result); + size = bytes / sizeof(typename Traits::unit_type); + + dst = EncodedString(&b[0], size); + + return dst; + } +#else + // implicit conversion to another encoding + template + operator EncodedString () const + { + EncodedString dst; + + size_t maxsize = DstTraits::codes_2_units(Traits::units_2_codes(string.size())); + size_t maxbytes = maxsize * sizeof(DstTraits::unit_type); + std::vector b(maxsize); + + size_t bytes; + size_t size; + AIErr result = sAICharacterEncoding->ConvertBuffer( + string.data(), string.size(), Traits::encoding(), + b, maxbytes, DstTraits::encoding(), + &bytes, FALSE); + if (result) + throw ai::Error(result); + size = bytes / sizeof(DstTraits::unit_type); + + dst = EncodedString(b, size); + + return dst; + } +#endif + + // the encoded data. direct access is allowed. + std::basic_string string; +}; + + +// types for strings +/** Encoded string type: platform encoding. */ +typedef EncodedString PlatformString; +/** Encoded string type: UTF-8 encoding. */ +typedef EncodedString UTF8String; +/** Encoded string type: UTF-16 encoding. */ +typedef EncodedString UTF16String; + + +} + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.cpp index c1ee2d9..c734a19 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.cpp @@ -1,300 +1,303 @@ -/* - * Name: IAIColorSpace.cpp - * $Revision: 1 $ - * Author: Simon Chen - * Date: - * Purpose: Plug-in side implementation of the ai::ColorSpace and ai::ColorSpaceList interfaces. - * This file should NOT be included in the core application. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "IAIColorSpace.hpp" -#include "AIColorSpace.h" - -#include "IAIColorSpace.inl" - -#ifdef _IAICOLORSPACE_SUITE_INCLUDE_H_ - #include _IAICOLORSPACE_SUITE_INCLUDE_H_ -#else - #ifndef _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ - #define _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ 1 - #endif - #if _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ - extern "C" - { - #endif - /** The plug-in using the ai::ColorSpace class is required to provide - these global suite pointers. These pointers must be valid prior - to any call to ai::ColorSpace methods. - */ - extern AIColorSpaceSuite* sAIColorSpace; - - #if _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ - } - #endif // _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ -#endif - -/* Throw result as an ai::Error if it indicates an error. */ -static void check_result(AIErr result) -{ - if ( result != kNoErr ) - { - throw ai::Error(result); - } -} - -/////////////////////////////////////////////////////////////////////////////// -// ai::ColorSpace class implementation -// -ai::ColorSpace::ColorSpace(void) AINOTHROW -: fImpl(0) -{ -} - -ai::ColorSpace::ColorSpace(ai::ColorSpace::Family family, bool hasAlpha) -: fImpl(0) -{ - AIErr result = sAIColorSpace->NewSimpleColorSpace(*this, family, hasAlpha); - check_result(result); -} - -ai::ColorSpace::ColorSpace(int separationNum, bool hasAlpha) -: fImpl(0) -{ - AIErr result = sAIColorSpace->NewProcessSeparationColorSpace(*this, separationNum, hasAlpha); - check_result(result); -} - -ai::ColorSpace::ColorSpace(const AICustomColorHandle customColor, bool hasAlpha) -: fImpl(0) -{ - AIErr result = sAIColorSpace->NewGlobalColorSpace(*this, customColor, hasAlpha); - check_result(result); -} - -ai::ColorSpace::ColorSpace(const ai::ColorSpaceList &csList, bool hasAlpha, bool promoteToProcess) -: fImpl(0) -{ - AIErr result = sAIColorSpace->NewNChannelColorSpace(*this, csList, hasAlpha, promoteToProcess); - check_result(result); -} - -ai::ColorSpace::ColorSpace(const ai::ColorSpace &baseCs, int numComponents, int numEntries, const ASUInt8 *lookup) -: fImpl(0) -{ - AIErr result = sAIColorSpace->NewIndexedColorSpace(*this, baseCs, numComponents, numEntries, lookup); - check_result(result); -} - -ai::ColorSpace::ColorSpace(const ai::ColorSpace& cs, bool hasAlpha) -: fImpl(0) -{ - AIErr result = sAIColorSpace->NewColorSpace(*this, cs, hasAlpha); - check_result(result); -} - -ai::ColorSpace::ColorSpace(const ai::ColorSpace& cs) -: fImpl(0) -{ - AIErr result = sAIColorSpace->CopyColorSpace(*this, cs); - check_result(result); -} - -ai::ColorSpace::~ColorSpace() -{ - if ( fImpl ) - { - sAIColorSpace->DeleteColorSpace(*this); - } -} - -ai::ColorSpace& ai::ColorSpace::operator= (const ai::ColorSpace& rhs) -{ - AIErr result = sAIColorSpace->CopyColorSpace(*this, rhs); - check_result(result); - return (*this); -} - -bool ai::ColorSpace::IsValid(void) const -{ - return (fImpl != 0); -} - -ai::ColorSpace::Family ai::ColorSpace::GetFamily(void) const -{ - ai::ColorSpace::Family family; - family = sAIColorSpace->GetFamily(*this); - return family; -} - -bool ai::ColorSpace::HasAlpha(void) const -{ - AIBoolean hasAlhpa; - hasAlhpa = sAIColorSpace->HasAlpha(*this); - return (hasAlhpa != 0); -} - -int ai::ColorSpace::NumComponents(void) const -{ - int count; - count = sAIColorSpace->GetNumComponents(*this); - return count; -} - -int ai::ColorSpace::NumColorComponents(void) const -{ - int count; - count = sAIColorSpace->GetNumColorComponents(*this); - return count; -} - -int ai::ColorSpace::NumSpotComponents(void) const -{ - int count; - count = sAIColorSpace->GetNumSpotComponents(*this); - return count; -} - -ai::ColorSpace ai::ColorSpace::BaseColorSpace(void) const -{ - ai::ColorSpace baseCs; - AIErr result = sAIColorSpace->GetBaseColorSpace(*this, baseCs); - check_result(result); - return baseCs; -} - -int ai::ColorSpace::IndexedNumComponents(void) const -{ - int count; - count = sAIColorSpace->GetIndexedNumComponents(*this); - return count; -} - -int ai::ColorSpace::IndexedNumEntries(void) const -{ - int count; - count = sAIColorSpace->GetIndexedNumEntries(*this); - return count; -} - -const ASUInt8* ai::ColorSpace::IndexedTable(void) const -{ - const ASUInt8* lookup = sAIColorSpace->GetIndexedTable(*this); - return lookup; -} - -const AIFloat* ai::ColorSpace::SeparationAltColors(void) const -{ - const AIFloat* altColors = sAIColorSpace->GetSeparationAltColors(*this); - return altColors; -} - -ai::ColorSpaceList ai::ColorSpace::GetColorSpaceList(void) const -{ - ai::ColorSpaceList csList; - AIErr result = sAIColorSpace->GetColorSpaceList(*this, csList); - check_result(result); - return csList; -} - -ai::UnicodeString ai::ColorSpace::NthColorant(ai::int32 n) const -{ - ai::UnicodeString colorant; - AIErr result = sAIColorSpace->GetNthColorant(*this, n, colorant); - check_result(result); - return colorant; -} - -bool ai::ColorSpace::HasFullSetOfProcessComponents(void) const -{ - AIBoolean fullProcessComps; - fullProcessComps = sAIColorSpace->HasFullSetOfProcessComponents(*this); - return (fullProcessComps != 0); -} - -bool ai::ColorSpace::operator==(const ai::ColorSpace &rhs) const -{ - AIBoolean identical; - identical = sAIColorSpace->Equal(*this, rhs); - return (identical != 0); -} - -/////////////////////////////////////////////////////////////////////////////// -// ai::ColorSpaceList class implementation -// -ai::ColorSpaceList::ColorSpaceList(void) AINOTHROW -: fImpl(0) -{ -} - -ai::ColorSpaceList::ColorSpaceList(const ai::ColorSpace &cs) -: fImpl(0) -{ - AIErr result = sAIColorSpace->NewColorSpaceList(*this, cs); - check_result(result); -} - -ai::ColorSpaceList::ColorSpaceList(const ai::ColorSpaceList& csList) -: fImpl(0) -{ - AIErr result = sAIColorSpace->CopyColorSpaceList(*this, csList); - check_result(result); -} - -ai::ColorSpaceList::~ColorSpaceList() -{ - if ( fImpl ) - { - sAIColorSpace->DeleteColorSpaceList(*this); - } -} - -ai::ColorSpaceList& ai::ColorSpaceList::operator= (const ai::ColorSpaceList& rhs) -{ - AIErr result = sAIColorSpace->CopyColorSpaceList(*this, rhs); - check_result(result); - return (*this); -} - -bool ai::ColorSpaceList::IsValid(void) const -{ - return (fImpl != 0); -} - -void ai::ColorSpaceList::AddColorSpace(const ai::ColorSpace &cs) -{ - AIErr result = sAIColorSpace->AddColorSpace(*this, cs); - check_result(result); -} - -int ai::ColorSpaceList::NumColorSpaces(void) const -{ - int count; - count = sAIColorSpace->GetNumColorSpaces(*this); - return count; -} - -ai::ColorSpace ai::ColorSpaceList::NthColorSpace(int n) const -{ - ai::ColorSpace cs; - AIErr result = sAIColorSpace->GetNthColorSpace(*this, n, cs); - check_result(result); - return cs; -} - -void ai::ColorSpaceList::Normalize(short docColorModel, bool convertGrayToFullProcess) -{ - AIErr result = sAIColorSpace->Normalize(*this, docColorModel, convertGrayToFullProcess); - check_result(result); -} - +/* + * Name: IAIColorSpace.cpp + * $Revision: 1 $ + * Author: Simon Chen + * Date: + * Purpose: Plug-in side implementation of the ai::ColorSpace and ai::ColorSpaceList interfaces. + * This file should NOT be included in the core application. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2005-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "IAIColorSpace.hpp" +#include "AIColorSpace.h" + +#include "IAIColorSpace.inl" + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIColorSpace) +#elif defined(_IAICOLORSPACE_SUITE_INCLUDE_H_) + #include _IAICOLORSPACE_SUITE_INCLUDE_H_ +#else + #ifndef _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ + #define _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ 1 + #endif + #if _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ + extern "C" + { + #endif + /** The plug-in using the ai::ColorSpace class is required to provide + these global suite pointers. These pointers must be valid prior + to any call to ai::ColorSpace methods. + */ + extern AIColorSpaceSuite* sAIColorSpace; + + #if _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ + } + #endif // _IAICOLORSPACE_SUITE_USE_C_LINKAGE_ +#endif + +/* Throw result as an ai::Error if it indicates an error. */ +static void check_result(AIErr result) +{ + if ( result != kNoErr ) + { + throw ai::Error(result); + } +} + +/////////////////////////////////////////////////////////////////////////////// +// ai::ColorSpace class implementation +// +ai::ColorSpace::ColorSpace(void) AINOTHROW +: fImpl(0) +{ +} + +ai::ColorSpace::ColorSpace(ai::ColorSpace::Family family, bool hasAlpha) +: fImpl(0) +{ + AIErr result = sAIColorSpace->NewSimpleColorSpace(*this, family, hasAlpha); + check_result(result); +} + +ai::ColorSpace::ColorSpace(int separationNum, bool hasAlpha) +: fImpl(0) +{ + AIErr result = sAIColorSpace->NewProcessSeparationColorSpace(*this, separationNum, hasAlpha); + check_result(result); +} + +ai::ColorSpace::ColorSpace(const AICustomColorHandle customColor, bool hasAlpha) +: fImpl(0) +{ + AIErr result = sAIColorSpace->NewGlobalColorSpace(*this, customColor, hasAlpha); + check_result(result); +} + +ai::ColorSpace::ColorSpace(const ai::ColorSpaceList &csList, bool hasAlpha, bool promoteToProcess) +: fImpl(0) +{ + AIErr result = sAIColorSpace->NewNChannelColorSpace(*this, csList, hasAlpha, promoteToProcess); + check_result(result); +} + +ai::ColorSpace::ColorSpace(const ai::ColorSpace &baseCs, int numComponents, int numEntries, const ASUInt8 *lookup) +: fImpl(0) +{ + AIErr result = sAIColorSpace->NewIndexedColorSpace(*this, baseCs, numComponents, numEntries, lookup); + check_result(result); +} + +ai::ColorSpace::ColorSpace(const ai::ColorSpace& cs, bool hasAlpha) +: fImpl(0) +{ + AIErr result = sAIColorSpace->NewColorSpace(*this, cs, hasAlpha); + check_result(result); +} + +ai::ColorSpace::ColorSpace(const ai::ColorSpace& cs) +: fImpl(0) +{ + AIErr result = sAIColorSpace->CopyColorSpace(*this, cs); + check_result(result); +} + +ai::ColorSpace::~ColorSpace() +{ + if ( fImpl ) + { + sAIColorSpace->DeleteColorSpace(*this); + } +} + +ai::ColorSpace& ai::ColorSpace::operator= (const ai::ColorSpace& rhs) +{ + AIErr result = sAIColorSpace->CopyColorSpace(*this, rhs); + check_result(result); + return (*this); +} + +bool ai::ColorSpace::IsValid(void) const +{ + return (fImpl != 0); +} + +ai::ColorSpace::Family ai::ColorSpace::GetFamily(void) const +{ + ai::ColorSpace::Family family; + family = sAIColorSpace->GetFamily(*this); + return family; +} + +bool ai::ColorSpace::HasAlpha(void) const +{ + AIBoolean hasAlhpa; + hasAlhpa = sAIColorSpace->HasAlpha(*this); + return (hasAlhpa != 0); +} + +int ai::ColorSpace::NumComponents(void) const +{ + int count; + count = sAIColorSpace->GetNumComponents(*this); + return count; +} + +int ai::ColorSpace::NumColorComponents(void) const +{ + int count; + count = sAIColorSpace->GetNumColorComponents(*this); + return count; +} + +int ai::ColorSpace::NumSpotComponents(void) const +{ + int count; + count = sAIColorSpace->GetNumSpotComponents(*this); + return count; +} + +ai::ColorSpace ai::ColorSpace::BaseColorSpace(void) const +{ + ai::ColorSpace baseCs; + AIErr result = sAIColorSpace->GetBaseColorSpace(*this, baseCs); + check_result(result); + return baseCs; +} + +int ai::ColorSpace::IndexedNumComponents(void) const +{ + int count; + count = sAIColorSpace->GetIndexedNumComponents(*this); + return count; +} + +int ai::ColorSpace::IndexedNumEntries(void) const +{ + int count; + count = sAIColorSpace->GetIndexedNumEntries(*this); + return count; +} + +const ASUInt8* ai::ColorSpace::IndexedTable(void) const +{ + const ASUInt8* lookup = sAIColorSpace->GetIndexedTable(*this); + return lookup; +} + +const AIFloat* ai::ColorSpace::SeparationAltColors(void) const +{ + const AIFloat* altColors = sAIColorSpace->GetSeparationAltColors(*this); + return altColors; +} + +ai::ColorSpaceList ai::ColorSpace::GetColorSpaceList(void) const +{ + ai::ColorSpaceList csList; + AIErr result = sAIColorSpace->GetColorSpaceList(*this, csList); + check_result(result); + return csList; +} + +ai::UnicodeString ai::ColorSpace::NthColorant(ai::int32 n) const +{ + ai::UnicodeString colorant; + AIErr result = sAIColorSpace->GetNthColorant(*this, n, colorant); + check_result(result); + return colorant; +} + +bool ai::ColorSpace::HasFullSetOfProcessComponents(void) const +{ + AIBoolean fullProcessComps; + fullProcessComps = sAIColorSpace->HasFullSetOfProcessComponents(*this); + return (fullProcessComps != 0); +} + +bool ai::ColorSpace::operator==(const ai::ColorSpace &rhs) const +{ + AIBoolean identical; + identical = sAIColorSpace->Equal(*this, rhs); + return (identical != 0); +} + +/////////////////////////////////////////////////////////////////////////////// +// ai::ColorSpaceList class implementation +// +ai::ColorSpaceList::ColorSpaceList(void) AINOTHROW +: fImpl(0) +{ +} + +ai::ColorSpaceList::ColorSpaceList(const ai::ColorSpace &cs) +: fImpl(0) +{ + AIErr result = sAIColorSpace->NewColorSpaceList(*this, cs); + check_result(result); +} + +ai::ColorSpaceList::ColorSpaceList(const ai::ColorSpaceList& csList) +: fImpl(0) +{ + AIErr result = sAIColorSpace->CopyColorSpaceList(*this, csList); + check_result(result); +} + +ai::ColorSpaceList::~ColorSpaceList() +{ + if ( fImpl ) + { + sAIColorSpace->DeleteColorSpaceList(*this); + } +} + +ai::ColorSpaceList& ai::ColorSpaceList::operator= (const ai::ColorSpaceList& rhs) +{ + AIErr result = sAIColorSpace->CopyColorSpaceList(*this, rhs); + check_result(result); + return (*this); +} + +bool ai::ColorSpaceList::IsValid(void) const +{ + return (fImpl != 0); +} + +void ai::ColorSpaceList::AddColorSpace(const ai::ColorSpace &cs) +{ + AIErr result = sAIColorSpace->AddColorSpace(*this, cs); + check_result(result); +} + +int ai::ColorSpaceList::NumColorSpaces(void) const +{ + int count; + count = sAIColorSpace->GetNumColorSpaces(*this); + return count; +} + +ai::ColorSpace ai::ColorSpaceList::NthColorSpace(int n) const +{ + ai::ColorSpace cs; + AIErr result = sAIColorSpace->GetNthColorSpace(*this, n, cs); + check_result(result); + return cs; +} + +void ai::ColorSpaceList::Normalize(short docColorModel, bool convertGrayToFullProcess) +{ + AIErr result = sAIColorSpace->Normalize(*this, docColorModel, convertGrayToFullProcess); + check_result(result); +} + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.hpp index a4d75bc..b092ff3 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.hpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.hpp @@ -1,323 +1,417 @@ -/* - * Name: IAIColorSpace.hpp - * $Revision: 1 $ - * Author: Simon Chen - * Date: - * Purpose: C++ interface class for the ai::ColorSpace and ai::ColorSpaceList objects. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -#ifndef _IAICOLORSPACE_H_ -#define _IAICOLORSPACE_H_ - -#include "AITypes.h" -#include "AIColor.h" -#include "IAIUnicodeString.h" - -/** @file IAIColorSpace.hpp */ - -/** @ingroup Errors - An out-of-range index for a color space was used. - See \c #ai::ColorSpace.*/ -#define kColorSpaceBadIndex 'CS!I' - -/** @ingroup Errors - See \c #ai::ColorSpace. */ -#define kColorSpaceInvalid '!VAL' - -class CAIColorSpaceImpl; -class CAIColorSpaceListImpl; - -namespace ai { - -class ColorSpace; -class ColorSpaceList; - -/** This class represents an Illustrator color space. */ -class ColorSpace { - friend class ColorSpaceList; - -public: - enum Family { - kAIColorSpaceFamilyUnknown, - kAIColorSpaceFamilyGray, - kAIColorSpaceFamilyRGB, - kAIColorSpaceFamilyLab, - kAIColorSpaceFamilyCMYK, - kAIColorSpaceFamilySeparation, - kAIColorSpaceFamilyNChannel, - kAIColorSpaceFamilyIndexed - }; - -public: - //---------------------------------------------------------------------- - /** @name Constructors & Destructors */ - //---------------------------------------------------------------------- - //@{ - /** Constructs an empty, invalid color space object. Throws no exceptions. */ - explicit ColorSpace (void) AINOTHROW; - /** Constructs a standard color space object. - @param family The color space family (Gray, RGB, CMYK, or LAB). - @param hasAlpha True if alpha channel is present. - @return The new color space object. - */ - explicit ColorSpace (ai::ColorSpace::Family family, bool hasAlpha = false); - /** Constructs a process separation color space. - @param separationNum Process-separation plate number of the base CMYK color space. -
0: Cyan -
1: Magenta -
2: Yellow -
3: Black - @param hasAlpha True if alpha channel is present. - @return The new color space object. - */ - explicit ColorSpace (int separationNum, bool hasAlpha = false); - /** Constructs a color space based on the global custom color. - @param customColor The global custom color object. - @param hasAlpha True if alpha channel is present. - @return The new global process color space object, or, if the custom color is a spot color, - a spot separation color space object. - */ - explicit ColorSpace (const AICustomColorHandle customColor, bool hasAlpha = false); - /** Constructs an n-channel color space using a fully specified color space list. - @param csList The list of component color spaces, which must conform to all - requirements of an n-channel color space, including at most one process - color space and no duplicate channels, with all RGB or Lab channels present - and in order. - @param hasAlpha True if alpha channel is present. - @param promoteToProcess True to construct an equivalent process color space instead - of a NChannel color space if it is possible. For example, if the input color - space list contains the full process components and has no spot components, - an equivalent process color space representation exists and is returned. - @return The new color space object. - */ - explicit ColorSpace (const ai::ColorSpaceList &csList, bool hasAlpha = false, bool promoteToProcess = false); - /** Constructs an indexed color space. - @param baseCs The base color space of the indexed color space. - @param numComponents The number of components in the color lookup table. - For an RGB indexed table, can be 3 or 4. - @param numEntries number of entries in the color lookup table. - @param lookup The color lookup table, \c numComponents rows by - \c numEntries columns. A 4-component RGB table must - be in 0RGB byte order. - @return The new color space object. - */ - explicit ColorSpace (const ai::ColorSpace &baseCs, int numComponents, int numEntries, const ASUInt8 *lookup); - /** Constructs a color space based on another color space. The alpha channel, if present, - is ignored in constructing the new color space. - @param baseCs The input color space. - @param hasAlpha True if alpha channel is to be present in the new color space. - @return The new color space object. - */ - explicit ColorSpace (const ai::ColorSpace &baseCs, bool hasAlpha); - /** Copy constructor. - @param cs the color space to copy. - @return The new color space object. - */ - ColorSpace (const ai::ColorSpace &cs); - /** Destructor */ - ~ColorSpace (); - //@} - - /** Assignment operator */ - ai::ColorSpace& operator= (const ai::ColorSpace& rhs); - - /** Equality operator */ - bool operator== (const ai::ColorSpace& rhs) const; - - /** Inequality operator */ - bool operator!= (const ai::ColorSpace& rhs) const; - - /* Color Space Methods */ - - /** Reports whether this color space is valid. - @return True if the color space is valid, false otherwise. - */ - bool IsValid(void) const; - /** Retrieves the family of this color space. - @return The color space family constant. - */ - ai::ColorSpace::Family GetFamily(void) const; - /** Reports whether this color space has an alpha channel. - An indexed color space has an alpha channel if and only if - its base color space has an alpha channel. - @return True if the color space has an alpha channel, false otherwise. - */ - bool HasAlpha(void) const; - /** Retrieves the number of components in this color space, including the alpha channel - if present. An indexed color space has only one component in addition to the - possible alpha component (not the number of color components in the base color space). - @return The number of components. - */ - int NumComponents(void) const; - /** Retrieves the number of color components in this color space, excluding the alpha channel - if present. For an indexed color space, this is the number of color components - in its base color space. - @return The number of color components. - */ - int NumColorComponents(void) const; - /** Retrieves the number of spot components in this color space. Ignores - the alpha channel, if present. - @return 0 for CMYK, RGB, Gray, Lab, and process separations. -
1 for spot separations -
For an Indexed color space, the number of spot color components in its base color space. - */ - int NumSpotComponents(void) const; - /** Retrieves the number of process components in this color space, - which is the number of color components, minus the number of spot components. - @return The number of process components. - */ - int NumProcessComponents(void) const; - /** Retrieves the base color space for this indexed color space, or - the alternate color space for this separation or n-channel color space. - @return The base or alternate color space, or, for a standard - color space, this color space itself. - */ - ai::ColorSpace BaseColorSpace(void) const; - /** Retrieves the number of components in the index color table of this - indexed color space. - Throws bad-parameter error for non-indexed color spaces. - @return The number of color table components. - */ - int IndexedNumComponents(void) const; - /** Retrieves the number of entries in the index color table of this - indexed color space. - Throws bad-parameter error for non-indexed color spaces. - @return The number of color table entries. - */ - int IndexedNumEntries(void) const; - /** Retrieves the color table of this indexed color space. - Throws bad-parameter error for non-indexed color spaces. - @return A pointer to the color table. - */ - const ASUInt8* IndexedTable(void) const; - /** Retrieves an entry from the color table of this indexed color space. - @param index The 0-based index position of the entry. - @return A pointer to the entry, or \c NULL if the index is out of range. - */ - const ASUInt8* IndexedColors(ASUInt8 index) const; - /** Retrieves the alternate color values in the alternate color space - for this separation color space. - Throws bad-parameter error for non-separation color spaces. - @return A pointer to the array of color values. - */ - const AIFloat* SeparationAltColors(void) const; - /** Retrieves the fully-specified color space list for this color space. - Throws bad-parameter error if this is an indexed color space. - @return The color space list object. - */ - ai::ColorSpaceList GetColorSpaceList(void) const; - /** Retrieves the name of a colorant for this color space. - Throws bad-parameter error if index is out of range. - @param n The 0-based index of the colorant, less than \c NumColorComponents(). - @return "Gray" for Gray color spaces. -
"Red","Green", or "Blue" for RGB color spaces. -
"Cyan","Magenta","Yellow", or "Black" for CMYK color spaces. -
Empty strings for LAB color spaces. - */ - ai::UnicodeString NthColorant(ai::int32 n) const; - /** Reports whether this color space has all process components. - @return True if the color space has all process components -
False if the color space has no process components, or - for spot, separation, or process separation color spaces. - */ - bool HasFullSetOfProcessComponents(void) const; - -public: // internal core use only - void deleteImpl(void); - const CAIColorSpaceImpl *getImpl(void) const; - explicit ColorSpace (CAIColorSpaceImpl *impl); - -private: - CAIColorSpaceImpl *fImpl; -}; - -/** This class represents a list of color spaces for Illustrator. -*/ -class ColorSpaceList { - friend class ColorSpace; - -public: - //---------------------------------------------------------------------- - /** @name Constructors & Destructors */ - //---------------------------------------------------------------------- - //@{ - /** Default color space list constructor. - Creates an invalid color space list. - Throws no exceptions. - @return The new list object. - */ - explicit ColorSpaceList (void) AINOTHROW; - /** Creates a color space list containing an initial color space entry. - @param cs The initial color space object. - @return The new list object. - */ - explicit ColorSpaceList (const ai::ColorSpace& cs); - /** Copy constructor. - @param csList The color-space list object to copy. - @return The new list object. - */ - ColorSpaceList (const ai::ColorSpaceList &csList); - /** Destructor */ - ~ColorSpaceList (); - //@} - - /** Assignment operator */ - ai::ColorSpaceList& operator= (const ai::ColorSpaceList& rhs); - - /* Color Space List Methods */ - - /** Reports whether this color-space list is valid. - @return True if the list is valid. - */ - bool IsValid(void) const; - /** Adds a color-space entry to this color-space list. - @param cs The color-space list object to add. - @return Nothing. - */ - void AddColorSpace(const ai::ColorSpace &cs); - /** Reports the number of color-space entries in this list. - @return The number of entries. - */ - int NumColorSpaces(void) const; - /** Retrieves a color space from this list. - Throws bad-parameter error if index is out of range. - @param n The 0-based index of the color-space entry. - @return The color-space object. - */ - ai::ColorSpace NthColorSpace(int n) const; - /** Normalizes this color-space list by flattening any n-channel color-spaces, - removing duplicates, compacting 4-process separation color spaces - into a single CMYK process color space, and sorting the color spaces. - The order of the spot-separation color spaces is preserved. - @param docColorModel The document color model, an \c #AIDocumentColorModelValue. - @param convertGrayToFullProcess Optional. When false (the default), if the document - color model is CMYK, a gray color space is converted to separation Black. - Otherwise, a gray color space is converted to the full process color in the - document color space. - @return Nothing. - */ - void Normalize(short docColorModel, bool convertGrayToFullProcess = false); - -public: - /** Internal */ - void deleteImpl(void); - -private: - CAIColorSpaceListImpl *fImpl; -}; - -} // end of namespace ai - -#endif // _IAICOLORSPACE_H_ +/* + * Name: IAIColorSpace.hpp + * $Revision: 1 $ + * Author: Simon Chen + * Date: + * Purpose: C++ interface class for the ai::ColorSpace and ai::ColorSpaceList objects. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2005-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +#ifndef _IAICOLORSPACE_H_ +#define _IAICOLORSPACE_H_ + +#include "AITypes.h" +#include "AIColor.h" +#include "IAIUnicodeString.h" + +/** @file IAIColorSpace.hpp */ + +/** @ingroup Errors + An out-of-range index for a color space was used. + See \c #ai::ColorSpace.*/ +#define kColorSpaceBadIndex 'CS!I' + +/** @ingroup Errors + See \c #ai::ColorSpace. */ +#define kColorSpaceInvalid '!VAL' + +class CAIColorSpaceImpl; +class CAIColorSpaceListImpl; + +namespace ai { + +class ColorSpace; +class ColorSpaceList; + +/** This class represents an Illustrator color space. */ +class ColorSpace { + friend class ColorSpaceList; + +public: + enum Family { + kAIColorSpaceFamilyUnknown, + kAIColorSpaceFamilyGray, + kAIColorSpaceFamilyRGB, + kAIColorSpaceFamilyLab, + kAIColorSpaceFamilyCMYK, + kAIColorSpaceFamilySeparation, + kAIColorSpaceFamilyNChannel, + kAIColorSpaceFamilyIndexed + }; + +public: + //---------------------------------------------------------------------- + /** @name Constructors & Destructors */ + //---------------------------------------------------------------------- + //@{ + /** Constructs an empty, invalid color space object. Throws no exceptions. */ + explicit ColorSpace (void) AINOTHROW; + /** Constructs a standard color space object. + @param family The color space family (Gray, RGB, CMYK, or LAB). + @param hasAlpha True if alpha channel is present. + @return The new color space object. + */ + explicit ColorSpace (ai::ColorSpace::Family family, bool hasAlpha = false); + /** Constructs a process separation color space. + @param separationNum Process-separation plate number of the base CMYK color space. +
0: Cyan +
1: Magenta +
2: Yellow +
3: Black + @param hasAlpha True if alpha channel is present. + @return The new color space object. + */ + explicit ColorSpace (int separationNum, bool hasAlpha = false); + /** Constructs a color space based on the global custom color. + @param customColor The global custom color object. + @param hasAlpha True if alpha channel is present. + @return The new global process color space object, or, if the custom color is a spot color, + a spot separation color space object. + */ + explicit ColorSpace (const AICustomColorHandle customColor, bool hasAlpha = false); + /** Constructs an n-channel color space using a fully specified color space list. + @param csList The list of component color spaces, which must conform to all + requirements of an n-channel color space, including at most one process + color space and no duplicate channels, with all RGB or Lab channels present + and in order. + @param hasAlpha True if alpha channel is present. + @param promoteToProcess True to construct an equivalent process color space instead + of a NChannel color space if it is possible. For example, if the input color + space list contains the full process components and has no spot components, + an equivalent process color space representation exists and is returned. + @return The new color space object. + */ + explicit ColorSpace (const ai::ColorSpaceList &csList, bool hasAlpha = false, bool promoteToProcess = false); + /** Constructs an indexed color space. + @param baseCs The base color space of the indexed color space. + @param numComponents The number of components in the color lookup table. + For an RGB indexed table, can be 3 or 4. + @param numEntries number of entries in the color lookup table. + @param lookup The color lookup table, \c numComponents rows by + \c numEntries columns. A 4-component RGB table must + be in 0RGB byte order. + @return The new color space object. + */ + explicit ColorSpace (const ai::ColorSpace &baseCs, int numComponents, int numEntries, const ASUInt8 *lookup); + /** Constructs a color space based on another color space. The alpha channel, if present, + is ignored in constructing the new color space. + @param baseCs The input color space. + @param hasAlpha True if alpha channel is to be present in the new color space. + @return The new color space object. + */ + explicit ColorSpace (const ai::ColorSpace &baseCs, bool hasAlpha); + /** Copy constructor. + @param cs the color space to copy. + @return The new color space object. + */ + ColorSpace (const ai::ColorSpace &cs); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move constructor. + @param rhs the color space to move from. + @return The new color space object. + */ + ColorSpace (ColorSpace&& rhs) AINOEXCEPT; +#endif + + /** Destructor */ + ~ColorSpace (); + //@} + + /** Swaps the contents of this ColorSpace with another ColorSpace. + @param rhs The ColorSpace to swap. + @return Nothing. + */ + void swap(ColorSpace& rhs) AINOEXCEPT; + + /** Copy assignment operator */ + ai::ColorSpace& operator= (const ai::ColorSpace& rhs); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move assignment operator */ + ai::ColorSpace& operator= (ColorSpace&& rhs) AINOEXCEPT; +#endif + + /** Equality operator */ + bool operator== (const ai::ColorSpace& rhs) const; + + /** Inequality operator */ + bool operator!= (const ai::ColorSpace& rhs) const; + + /* Color Space Methods */ + + /** Reports whether this color space is valid. + @return True if the color space is valid, false otherwise. + */ + bool IsValid(void) const; + /** Retrieves the family of this color space. + @return The color space family constant. + */ + ai::ColorSpace::Family GetFamily(void) const; + /** Reports whether this color space has an alpha channel. + An indexed color space has an alpha channel if and only if + its base color space has an alpha channel. + @return True if the color space has an alpha channel, false otherwise. + */ + bool HasAlpha(void) const; + /** Retrieves the number of components in this color space, including the alpha channel + if present. An indexed color space has only one component in addition to the + possible alpha component (not the number of color components in the base color space). + @return The number of components. + */ + int NumComponents(void) const; + /** Retrieves the number of color components in this color space, excluding the alpha channel + if present. For an indexed color space, this is the number of color components + in its base color space. + @return The number of color components. + */ + int NumColorComponents(void) const; + /** Retrieves the number of spot components in this color space. Ignores + the alpha channel, if present. + @return 0 for CMYK, RGB, Gray, Lab, and process separations. +
1 for spot separations +
For an Indexed color space, the number of spot color components in its base color space. + */ + int NumSpotComponents(void) const; + /** Retrieves the number of process components in this color space, + which is the number of color components, minus the number of spot components. + @return The number of process components. + */ + int NumProcessComponents(void) const; + /** Retrieves the base color space for this indexed color space, or + the alternate color space for this separation or n-channel color space. + @return The base or alternate color space, or, for a standard + color space, this color space itself. + */ + ai::ColorSpace BaseColorSpace(void) const; + /** Retrieves the number of components in the index color table of this + indexed color space. + Throws bad-parameter error for non-indexed color spaces. + @return The number of color table components. + */ + int IndexedNumComponents(void) const; + /** Retrieves the number of entries in the index color table of this + indexed color space. + Throws bad-parameter error for non-indexed color spaces. + @return The number of color table entries. + */ + int IndexedNumEntries(void) const; + /** Retrieves the color table of this indexed color space. + Throws bad-parameter error for non-indexed color spaces. + @return A pointer to the color table. + */ + const ASUInt8* IndexedTable(void) const; + /** Retrieves an entry from the color table of this indexed color space. + @param index The 0-based index position of the entry. + @return A pointer to the entry, or \c NULL if the index is out of range. + */ + const ASUInt8* IndexedColors(ASUInt8 index) const; + /** Retrieves the alternate color values in the alternate color space + for this separation color space. + Throws bad-parameter error for non-separation color spaces. + @return A pointer to the array of color values. + */ + const AIFloat* SeparationAltColors(void) const; + /** Retrieves the fully-specified color space list for this color space. + Throws bad-parameter error if this is an indexed color space. + @return The color space list object. + */ + ai::ColorSpaceList GetColorSpaceList(void) const; + /** Retrieves the name of a colorant for this color space. + Throws bad-parameter error if index is out of range. + @param n The 0-based index of the colorant, less than \c NumColorComponents(). + @return "Gray" for Gray color spaces. +
"Red","Green", or "Blue" for RGB color spaces. +
"Cyan","Magenta","Yellow", or "Black" for CMYK color spaces. +
Empty strings for LAB color spaces. + */ + ai::UnicodeString NthColorant(ai::int32 n) const; + /** Reports whether this color space has all process components. + @return True if the color space has all process components +
False if the color space has no process components, or + for spot, separation, or process separation color spaces. + */ + bool HasFullSetOfProcessComponents(void) const; + +public: // internal core use only + void deleteImpl(void); + const CAIColorSpaceImpl *getImpl(void) const; + explicit ColorSpace (CAIColorSpaceImpl *impl); + +private: + CAIColorSpaceImpl *fImpl; +}; + +/** +Inline implementations +*/ + +/** swap function */ +inline void ColorSpace::swap(ColorSpace& rhs) AINOEXCEPT +{ + std::swap(fImpl, rhs.fImpl); +} + +#ifdef AI_HAS_RVALUE_REFERENCES + +/** Move constructor */ +inline ColorSpace::ColorSpace(ColorSpace&& rhs) AINOEXCEPT : fImpl{rhs.fImpl} +{ + rhs.fImpl = nullptr; +} + +/** Move assignment operator */ +inline ColorSpace& ColorSpace::operator=(ColorSpace&& rhs) AINOEXCEPT +{ + swap(rhs); + return *this; +} + +#endif // AI_HAS_RVALUE_REFERENCES + +/** This class represents a list of color spaces for Illustrator. +*/ +class ColorSpaceList { + friend class ColorSpace; + +public: + //---------------------------------------------------------------------- + /** @name Constructors & Destructor */ + //---------------------------------------------------------------------- + //@{ + /** Default color space list constructor. + Creates an invalid color space list. + Throws no exceptions. + @return The new list object. + */ + explicit ColorSpaceList (void) AINOTHROW; + /** Creates a color space list containing an initial color space entry. + @param cs The initial color space object. + @return The new list object. + */ + explicit ColorSpaceList (const ai::ColorSpace& cs); + /** Copy constructor. + @param csList The color-space list object to copy. + @return The new list object. + */ + ColorSpaceList (const ai::ColorSpaceList &csList); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move constructor. + @param rhs The color-space list object to move from. + @return The new list object. + */ + ColorSpaceList (ColorSpaceList&& rhs) AINOEXCEPT; +#endif + + /** Destructor */ + ~ColorSpaceList (); + //@} + + /** Swaps the contents of this ColorSpaceList with another ColorSpaceList. + @param rhs The ColorSpaceList to swap. + @return Nothing. + */ + void swap(ColorSpaceList& rhs) AINOEXCEPT; + + /** Copy assignment operator */ + ai::ColorSpaceList& operator= (const ai::ColorSpaceList& rhs); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move assignment operator */ + ColorSpaceList& operator= (ColorSpaceList&& rhs) AINOEXCEPT; +#endif + + /* Color Space List Methods */ + + /** Reports whether this color-space list is valid. + @return True if the list is valid. + */ + bool IsValid(void) const; + /** Adds a color-space entry to this color-space list. + @param cs The color-space list object to add. + @return Nothing. + */ + void AddColorSpace(const ai::ColorSpace &cs); + /** Reports the number of color-space entries in this list. + @return The number of entries. + */ + int NumColorSpaces(void) const; + /** Retrieves a color space from this list. + Throws bad-parameter error if index is out of range. + @param n The 0-based index of the color-space entry. + @return The color-space object. + */ + ai::ColorSpace NthColorSpace(int n) const; + /** Normalizes this color-space list by flattening any n-channel color-spaces, + removing duplicates, compacting 4-process separation color spaces + into a single CMYK process color space, and sorting the color spaces. + The order of the spot-separation color spaces is preserved. + @param docColorModel The document color model, an \c #AIDocumentColorModelValue. + @param convertGrayToFullProcess Optional. When false (the default), if the document + color model is CMYK, a gray color space is converted to separation Black. + Otherwise, a gray color space is converted to the full process color in the + document color space. + @return Nothing. + */ + void Normalize(short docColorModel, bool convertGrayToFullProcess = false); + +public: + /** Internal */ + void deleteImpl(void); + +private: + CAIColorSpaceListImpl *fImpl; +}; + +/** +Inline implementations +*/ + +/** swap function */ +inline void ColorSpaceList::swap(ColorSpaceList& rhs) AINOEXCEPT +{ + std::swap(fImpl, rhs.fImpl); +} + +#ifdef AI_HAS_RVALUE_REFERENCES + +/** Move constructor */ +inline ColorSpaceList::ColorSpaceList(ColorSpaceList&& rhs) AINOEXCEPT : fImpl{rhs.fImpl} +{ + rhs.fImpl = nullptr; +} + +/** Move assignment operator */ +inline ColorSpaceList& ColorSpaceList::operator=(ColorSpaceList&& rhs) AINOEXCEPT +{ + swap(rhs); + return *this; +} + +#endif // AI_HAS_RVALUE_REFERENCES + +} // end of namespace ai + +#endif // _IAICOLORSPACE_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.inl b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.inl index 5a68792..fd72630 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.inl +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIColorSpace.inl @@ -1,55 +1,55 @@ -/* - * Name: IAIColorSpace.inl - * $Revision: 1 $ - * Author: Simon Chen - * Date: - * Purpose: Common impl file for the core and plug-ins. - * This file is included by IAIColorSpace.cpp & IAIColorSpaceCore.cpp - * Code added here MUST be shareable between the core and plug-ins. - * * You may not throw specific errors from these methods (ai::Error vs. CAIFault). But this - * does not mean that the methods won't throw. In fact, the methods that they call might - * throw. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef _IAICOLORSPACE_INL_ -#define _IAICOLORSPACE_INL_ - -bool ai::ColorSpace::operator!=(const ai::ColorSpace &rhs) const -{ - return !(*this == rhs); -} - -int ai::ColorSpace::NumProcessComponents(void) const -{ - return NumColorComponents() - NumSpotComponents(); -} - -const ai::uint8* ai::ColorSpace::IndexedColors(ai::uint8 index) const -{ - const ai::uint8 *comps = NULL; - if (IndexedNumEntries() > 0 && index < IndexedNumEntries()) - { - comps = IndexedTable() + index*IndexedNumComponents(); - - if (BaseColorSpace().GetFamily() == ai::ColorSpace::kAIColorSpaceFamilyRGB && - IndexedNumComponents() == 4) - { - comps ++; // skip the zero channel in 0RGB color table - } - } - - return comps; -} - +/* + * Name: IAIColorSpace.inl + * $Revision: 1 $ + * Author: Simon Chen + * Date: + * Purpose: Common impl file for the core and plug-ins. + * This file is included by IAIColorSpace.cpp & IAIColorSpaceCore.cpp + * Code added here MUST be shareable between the core and plug-ins. + * * You may not throw specific errors from these methods (ai::Error vs. CAIFault). But this + * does not mean that the methods won't throw. In fact, the methods that they call might + * throw. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2005-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef _IAICOLORSPACE_INL_ +#define _IAICOLORSPACE_INL_ + +bool ai::ColorSpace::operator!=(const ai::ColorSpace &rhs) const +{ + return !(*this == rhs); +} + +int ai::ColorSpace::NumProcessComponents(void) const +{ + return NumColorComponents() - NumSpotComponents(); +} + +const ai::uint8* ai::ColorSpace::IndexedColors(ai::uint8 index) const +{ + const ai::uint8 *comps = NULL; + if (IndexedNumEntries() > 0 && index < IndexedNumEntries()) + { + comps = IndexedTable() + index*IndexedNumComponents(); + + if (BaseColorSpace().GetFamily() == ai::ColorSpace::kAIColorSpaceFamilyRGB && + IndexedNumComponents() == 4) + { + comps ++; // skip the zero channel in 0RGB color table + } + } + + return comps; +} + #endif //_IAICOLORSPACE_INL_ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAICopyScope.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAICopyScope.h index 030efc1..fb2e78c 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAICopyScope.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAICopyScope.h @@ -1,161 +1,161 @@ -#ifndef _IAICOPYSCOPE_H_ -#define _IAICOPYSCOPE_H_ - -/* - * Name: IAICopyScope.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Wrapper class for AIArt copy scope objects. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2003-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "AIArt.h" -#include - -namespace ai { - -/** @ingroup Errors - See \c CopyScope::Initialize() in \c IAICopyScope.h. */ -#define kAICopyScopeAlreadyInitialized 'CSAI' - -/** A wrapper class for the \c #AICopyScopeHandle object. - - Copy scopes allow you to group a collection of art object duplication - operations as parts a single logical copy operation, in order to - maintain some cross-object information through the set of individual operations. - An example is linked text object information. When you duplicate the individual - text frame objects, the need to maintain their linked attributes. - You can either copy all of the linked objects in a single call to - \c #AIArtSuite::DuplicateArt(), or you can create a wrapping - copy scope and making multiple individual calls to \c #AIArtSuite::DuplicateArt(). - - You cannot assign or copy the \c CopyScope objects themselves. -*/ -class CopyScope { - -public: - /** Default constructor. Creates an empty copy scope object. - @return The new copy-scope object. - */ - CopyScope() AINOTHROW - : fScope(0) - {} - - /** Creates a copy scope object of a given type. - @param kind The type. - @return The new copy-scope object. - */ - explicit CopyScope(AICopyScopeKind kind) - : fScope(0) - { - Initialize(kind); - } - - /** Destructor. Destroys the owned scope if it has not already been - properly terminated. Does not throw exceptions or return an error code. - To determine if there was an error terminating the scope. use \c Terminate() instead - */ - ~CopyScope() - { - if (IsValid()) - { - (void) Terminate(std::nothrow); - } - } - - /** Reports whether a copy scope has been initialized. - @return True if this scope has been initialized. - */ - bool IsValid() const AINOTHROW - { - return fScope != 0; - } - - /** Initializes the type of an uninitialized copy scope. Does not throw exceptions. - @param kind The scope type. - @return \c #kAICopyScopeAlreadyInitialized error if the - scope has already been initialized. - */ - AIErr Initialize(AICopyScopeKind kind, const std::nothrow_t&) AINOTHROW - { - AIErr result = kNoErr; - - if (!IsValid()) - { - result = sAIArt->CreateCopyScope(kind, &fScope); - } - else - { - result = kAICopyScopeAlreadyInitialized; - } - - return result; - } - - /** Initializes the type of an uninitialized copy scope. Throws exceptions. - @param kind The scope type. - @return Nothing. - */ - void Initialize(AICopyScopeKind kind) - { - AIErr result = Initialize(kind, std::nothrow); - if ( result ) - throw ai::Error(result); - } - - /** Terminates the copy scope owned by this scope object, - regardless of whether it has been initialized. - Does not throw exceptions, but returns an error code. - @return An error code, \c #kNoErr on success. - */ - AIErr Terminate(const std::nothrow_t&) AINOTHROW - { - AIErr result = kNoErr; - - if (IsValid()) - { - result = sAIArt->DestroyCopyScope(fScope); - fScope = 0; - } - - return result; - } - - /** Terminates the copy scope owned by this scope object, - regardless of whether it has been initialized. - Throws exceptions. - @return Nothing. - */ - void Terminate() - { - AIErr result = Terminate(std::nothrow); - if ( result ) - throw ai::Error(result); - } - -private: - /** Copying and assignment of scope objects is not allowed. */ - CopyScope(const CopyScope& scope); - /** Copying and assignment of scope objects is not allowed. */ - CopyScope& operator= (const CopyScope& scope); - -private: - AICopyScopeHandle fScope; -}; - - -} // end of namespace ai - - -#endif // _IAICOPYSCOPE_H_ +#ifndef _IAICOPYSCOPE_H_ +#define _IAICOPYSCOPE_H_ + +/* + * Name: IAICopyScope.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Wrapper class for AIArt copy scope objects. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2003-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "AIArt.h" +#include + +namespace ai { + +/** @ingroup Errors + See \c CopyScope::Initialize() in \c IAICopyScope.h. */ +#define kAICopyScopeAlreadyInitialized 'CSAI' + +/** A wrapper class for the \c #AICopyScopeHandle object. + + Copy scopes allow you to group a collection of art object duplication + operations as parts a single logical copy operation, in order to + maintain some cross-object information through the set of individual operations. + An example is linked text object information. When you duplicate the individual + text frame objects, the need to maintain their linked attributes. + You can either copy all of the linked objects in a single call to + \c #AIArtSuite::DuplicateArt(), or you can create a wrapping + copy scope and making multiple individual calls to \c #AIArtSuite::DuplicateArt(). + + You cannot assign or copy the \c CopyScope objects themselves. +*/ +class CopyScope { + +public: + /** Default constructor. Creates an empty copy scope object. + @return The new copy-scope object. + */ + CopyScope() AINOTHROW + : fScope(0) + {} + + /** Creates a copy scope object of a given type. + @param kind The type. + @return The new copy-scope object. + */ + explicit CopyScope(AICopyScopeKind kind) + : fScope(0) + { + Initialize(kind); + } + + /** Destructor. Destroys the owned scope if it has not already been + properly terminated. Does not throw exceptions or return an error code. + To determine if there was an error terminating the scope. use \c Terminate() instead + */ + ~CopyScope() + { + if (IsValid()) + { + (void) Terminate(std::nothrow); + } + } + + /** Reports whether a copy scope has been initialized. + @return True if this scope has been initialized. + */ + bool IsValid() const AINOTHROW + { + return fScope != 0; + } + + /** Initializes the type of an uninitialized copy scope. Does not throw exceptions. + @param kind The scope type. + @return \c #kAICopyScopeAlreadyInitialized error if the + scope has already been initialized. + */ + AIErr Initialize(AICopyScopeKind kind, const std::nothrow_t&) AINOTHROW + { + AIErr result = kNoErr; + + if (!IsValid()) + { + result = sAIArt->CreateCopyScope(kind, &fScope); + } + else + { + result = kAICopyScopeAlreadyInitialized; + } + + return result; + } + + /** Initializes the type of an uninitialized copy scope. Throws exceptions. + @param kind The scope type. + @return Nothing. + */ + void Initialize(AICopyScopeKind kind) + { + AIErr result = Initialize(kind, std::nothrow); + if ( result ) + throw ai::Error(result); + } + + /** Terminates the copy scope owned by this scope object, + regardless of whether it has been initialized. + Does not throw exceptions, but returns an error code. + @return An error code, \c #kNoErr on success. + */ + AIErr Terminate(const std::nothrow_t&) AINOTHROW + { + AIErr result = kNoErr; + + if (IsValid()) + { + result = sAIArt->DestroyCopyScope(fScope); + fScope = 0; + } + + return result; + } + + /** Terminates the copy scope owned by this scope object, + regardless of whether it has been initialized. + Throws exceptions. + @return Nothing. + */ + void Terminate() + { + AIErr result = Terminate(std::nothrow); + if ( result ) + throw ai::Error(result); + } + +private: + /** Copying and assignment of scope objects is not allowed. */ + CopyScope(const CopyScope& scope); + /** Copying and assignment of scope objects is not allowed. */ + CopyScope& operator= (const CopyScope& scope); + +private: + AICopyScopeHandle fScope; +}; + + +} // end of namespace ai + + +#endif // _IAICOPYSCOPE_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDataFilter.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDataFilter.cpp new file mode 100644 index 0000000..c62fd95 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDataFilter.cpp @@ -0,0 +1,519 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#include "IAIDataFilter.hpp" +#include "AIAssert.hpp" +#include "AIErrorHandler.h" +#include "AIContract.hpp" + +#include +#include +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIDataFilter) +#elif defined (_IAIDATAFILTER_SUITE_INCLUDE_H) + #include _IAIDATAFILTER_SUITE_INCLUDE_H +#else + // these need to be defined by client + extern "C" AIDataFilterSuite* sAIDataFilter; +#endif //AI_AUTO_SUITE_AVAILABLE + +namespace +{ + constexpr ai::LiteralString kModeWriteStr { "write" }; + constexpr ai::LiteralString kModeReadStr { "read" }; + constexpr ai::LiteralString kModeAppendStr { "append" }; +} + +namespace ai +{ + //Base Data Filter class + class BaseDataFilter : public IDataFilter + { + public: + explicit BaseDataFilter(Mode mode = IDataFilter::Mode::kRead) : mMode(mode) {} + + AIDataFilter* GetFirstFilter() const AINOEXCEPT override + { + return mFilter; + } + + AIDataFilter* GetFilter() const AINOEXCEPT override + { + //return the last filter in chain + if (mNextFilter) + return mNextFilter->GetFilter(); + return mFilter; + } + + AIDataFilter* ReleaseFilter() AINOEXCEPT override + { + auto filter = mFilter; + mFilter = nullptr; + return filter; + } + + ai::LiteralString GetAIMode() const AINOEXCEPT override; + Mode GetMode() const AINOEXCEPT override { return mMode; } + + void Read(char* store, size_t& count) override; + void Write(const char* store, size_t count) override; + void Seek(sizediff_t newPos) override; + sizediff_t Mark() const override; + + void Link(std::unique_ptr nextFilter) override; + + ContentType ReadFilterContent() override; + size_t ContentSize() override; + + virtual ~BaseDataFilter() = 0; + + BaseDataFilter(BaseDataFilter&& other) AINOEXCEPT + { + swap(other); + } + + BaseDataFilter& operator = (BaseDataFilter&& other) AINOEXCEPT + { + swap(other); + return (*this); + } + + void swap(BaseDataFilter& other) AINOEXCEPT; + BaseDataFilter(BaseDataFilter& other) = delete; + BaseDataFilter& operator = (const BaseDataFilter& other) = delete; + + protected: + AIDataFilter* mFilter = nullptr; + mutable AIErrorThrower mError = kNoErr; + Mode mMode = Mode::kRead; + std::unique_ptr mNextFilter; + }; + + class FileDataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + FileDataFilter(const ai::FilePath& filePath, IDataFilter::Mode filterMode, size_t creator = 0, ai::int32 type = 0) + :inherited(filterMode) + { + const auto aiMode = GetAIMode(); + mError = sAIDataFilter->NewFileDataFilter(filePath, aiMode, creator, type, &mFilter); + mError = sAIDataFilter->LinkDataFilter(nullptr, mFilter); + } + }; + + class ZDataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + explicit ZDataFilter(IDataFilter::Mode filterMode) + :inherited(filterMode) + { + const auto aiMode = GetAIMode(); + mError = sAIDataFilter->NewZDataFilter(aiMode, &mFilter); + } + }; + + class ZStdDataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + explicit ZStdDataFilter(IDataFilter::Mode filterMode) + :inherited(filterMode) + { + const auto aiMode = GetAIMode(); + mError = sAIDataFilter->NewZStdDataFilter(aiMode, &mFilter); + } + }; + + class AsyncDataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + explicit AsyncDataFilter(IDataFilter::Mode filterMode, + std::unique_ptr&& asyncFilter, + const ai::uint32 prefetchSize, + const ai::uint32 outputSize) + : inherited(filterMode) + { + const auto aiMode = GetAIMode(); + mError = sAIDataFilter->NewAsyncDataFilter(aiMode, asyncFilter->ReleaseFilter(), prefetchSize, outputSize, &mFilter); + } + AsyncDataFilter(AsyncDataFilter&& infilter) = delete; + }; + + class A85DataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + explicit A85DataFilter(IDataFilter::Mode filterMode, const char* prefix) + :inherited(filterMode) + { + const auto aiMode = GetAIMode(); + mError = sAIDataFilter->NewA85DataFilter(aiMode, prefix, &mFilter); + } + }; + + + class BufferDataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + BufferDataFilter(size_t buffSize) + { + mError = sAIDataFilter->NewBufferDataFilter(buffSize, &mFilter); + } + }; + + class ResourceDataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + ResourceDataFilter(SPPluginRef plugin, ai::int32 type, ai::int32 id, const char *name) + { + mError = sAIDataFilter->NewResourceDataFilter(plugin, type, id, name, &mFilter); + mError = sAIDataFilter->LinkDataFilter(nullptr, mFilter); + } + }; + + class VMDataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + explicit VMDataFilter(size_t initialSize) + { + mError = sAIDataFilter->NewVMDataFilter(initialSize, &mFilter); + mError = sAIDataFilter->LinkDataFilter(nullptr, mFilter); + } + }; + + class BlockDataFilter :public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + BlockDataFilter(void *address, size_t size) + { + mError = sAIDataFilter->NewBlockDataFilter(address, size, &mFilter); + mError = sAIDataFilter->LinkDataFilter(nullptr, mFilter); + } + }; + + class ScopedDataFilter : public BaseDataFilter + { + public: + using inherited = BaseDataFilter; + ScopedDataFilter(AIDataFilter* filter, IDataFilter::Mode filterMode) + : inherited(filterMode) + { + mFilter = filter; + mError = sAIDataFilter->LinkDataFilter(nullptr, mFilter); + } + }; + + ai::LiteralString BaseDataFilter::GetAIMode() const AINOEXCEPT + { + switch (mMode) + { + case Mode::kRead: return kModeReadStr; + case Mode::kWrite: return kModeWriteStr; + case Mode::kAppend: return kModeAppendStr; + default: + AIMsgAssert(false, "Invalid Data filter Mode!"); + } + return kModeReadStr; + } + + void BaseDataFilter::Read(char* store, size_t& count) + { + if (mMode != Mode::kRead) + throw ai::Error(kInvalidFilterModeError); + + mError = sAIDataFilter->ReadDataFilter(GetFilter(), store, &count); + } + + void BaseDataFilter::Write(const char* store, size_t count) + { + if (mMode != Mode::kWrite && mMode != Mode::kAppend) + throw ai::Error(kInvalidFilterModeError); + + mError = sAIDataFilter->WriteDataFilter(GetFilter(), store, &count); + } + + void BaseDataFilter::Seek(sizediff_t newPos) + { + mError = sAIDataFilter->SeekDataFilter(GetFilter(), &newPos); + } + + ai::sizediff_t BaseDataFilter::Mark() const + { + ai::sizediff_t curPos(0); + mError = sAIDataFilter->MarkDataFilter(GetFilter(), &curPos); + return curPos; + } + + void BaseDataFilter::Link(std::unique_ptr nextFilter) + { + if (mNextFilter) + mNextFilter->Link(std::move(nextFilter)); + else + { + auto currentLastFilter = GetFilter(); //Call before moving the nextFilter into member + mNextFilter = std::move(nextFilter); + //Link the next filter chain at the end of current filter chain + mError = sAIDataFilter->LinkDataFilter(currentLastFilter, mNextFilter->GetFirstFilter()); + } + + } + + ai::IDataFilter::ContentType BaseDataFilter::ReadFilterContent() + { + size_t localBufferSize = 0; + IDataFilter::ContentType buffer; + + constexpr size_t kLocalBufferSize = 4 * 1024; //4K + IDataFilter::ContentType bufferLocal(kLocalBufferSize); + + Seek(0); //Move read pointer to beginning of filter + do + { + localBufferSize = kLocalBufferSize; //init local buffer size + Read((char*)bufferLocal.data(), localBufferSize); + if (localBufferSize) + { + buffer.insert(buffer.end(), bufferLocal.begin(), bufferLocal.begin() + localBufferSize); + } + } while (localBufferSize > 0); + + return buffer; + } + + size_t BaseDataFilter::ContentSize() + { + // Store the current pos. + auto curPos = Mark(); + + // Seek to end + ai::sizediff_t eofPos= -1; + Seek(eofPos); + + // Get the end of file pos. + auto contentSize = Mark(); + + // Restore the original pos. + Seek(curPos); + + // Return the content size. + return contentSize + 1; + } + + BaseDataFilter::~BaseDataFilter() + { + if (mNextFilter) + { + mNextFilter.reset(); //unlink the chain first + } + + //unlink self + if (!mError && mFilter) + { + //Don't throw + AIErr error = sAIDataFilter->UnlinkDataFilter(mFilter, &mFilter); + if (error) + { + AIMsgAssert(false, "Error closing the data filter!"); + } + } + } + + void BaseDataFilter::swap(BaseDataFilter& other) AINOEXCEPT + { + std::swap(mFilter, other.mFilter); + std::swap(mMode, other.mMode); + std::swap(mNextFilter, other.mNextFilter); + } + + std::unique_ptr CreateFileDataFilter( + const FilePath& filePath, + IDataFilter::Mode filterMode, + size_t creator /*= 0*/, + int32 type /*= 0*/, + std::unique_ptr nextFilter /*= nullptr */) + { + std::unique_ptr filter (std::make_unique(filePath, filterMode, creator, type)); + if (nextFilter && filter) + { + filter->Link(std::move(nextFilter)); + } + return filter; + } + + std::unique_ptr CreateResourceDataFilter( + SPPluginRef plugin, + int32 type, + int32 id, + const char *name, + std::unique_ptr nextFilter /*= nullptr */) + { + std::unique_ptr filter(std::make_unique(plugin, type, id, name)); + if (nextFilter && filter) + { + filter->Link(std::move(nextFilter)); + } + return filter; + } + + std::unique_ptr CreateZDataFilter( + IDataFilter::Mode filterMode, + std::unique_ptr nextFilter) + { + std::unique_ptr filter(std::make_unique(filterMode)); + if (filter && nextFilter) + { + filter->Link(std::move(nextFilter)); + } + return filter; + } + + std::unique_ptr CreateZStdDataFilter( + IDataFilter::Mode filterMode, + std::unique_ptr nextFilter) + { + std::unique_ptr filter(std::make_unique(filterMode)); + if (filter && nextFilter) + { + filter->Link(std::move(nextFilter)); + } + return filter; + } + + std::unique_ptr CreateAsyncDataFilter( + IDataFilter::Mode filterMode, + std::unique_ptr&& asyncFilter, + const ai::uint32 prefetchSize, + const ai::uint32 outputSize, + std::unique_ptr nextFilter + ) + { + std::unique_ptr filter(std::make_unique(filterMode, std::move(asyncFilter), prefetchSize, outputSize)); + + if(filter && nextFilter) + { + filter->Link(std::move(nextFilter)); + } + + return filter; + } + + std::unique_ptr CreateA85DataFilter( + IDataFilter::Mode filterMode, + const char* prefix /*= ""*/, + std::unique_ptr nextFilter /*= nullptr */) + { + std::unique_ptr filter(std::make_unique(filterMode, prefix)); + if (filter && nextFilter) + { + filter->Link(std::move(nextFilter)); + } + return filter; + } + + std::unique_ptr CreateBufferDataFilter( + size_t size, + std::unique_ptr nextFilter /*= nullptr */) + { + std::unique_ptr filter(std::make_unique(size)); + if (filter && nextFilter) + { + filter->Link(std::move(nextFilter)); + } + return filter; + } + + std::unique_ptr CreateVMDataFilter( + size_t initialsize, + std::unique_ptr nextFilter /*= nullptr*/) + { + std::unique_ptr filter(std::make_unique(initialsize)); + if (filter && nextFilter) + { + filter->Link(std::move(nextFilter)); + } + return filter; + } + + std::unique_ptr CreateBlockDataFilter( + void *address, + size_t size, + std::unique_ptr nextFilter /*= nullptr */) + { + std::unique_ptr filter(std::make_unique(address, size)); + if (filter && nextFilter) + { + filter->Link(std::move(nextFilter)); + } + return filter; + } + + std::unique_ptr CreateScopedDataFilter( + AIDataFilter* filter, + IDataFilter::Mode filterMode, + std::unique_ptr nextFilter /*= nullptr */) + { + ai::Expects(filter != nullptr); + std::unique_ptr scopedFilter = std::make_unique(filter, filterMode); + if (scopedFilter && nextFilter) + { + scopedFilter->Link(std::move(nextFilter)); + } + + return scopedFilter; + } + + AIErr CopyDataFilter(IDataFilter& srcFilter, + IDataFilter& dstFilter, + size_t bufferSize /*= 4096*/, + bool seekToBegin /*= true*/) + { + try + { + ai::Expects(bufferSize > 0); + + IDataFilter::ContentType buffer(bufferSize); + if(seekToBegin) + srcFilter.Seek(0); //Move read pointer to the beginning of the filter + + auto readBytesCount = bufferSize; + + auto readFromFilter = [&] { + srcFilter.Read((char*)buffer.data(), readBytesCount); + return (readBytesCount > 0); + }; + + while ( readFromFilter() ) + { + dstFilter.Write(buffer.data(), readBytesCount); + } + } + catch (const ai::Error& error) + { + return error; + } + return kNoErr; + + } + +} // namespace ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDataFilter.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDataFilter.hpp new file mode 100644 index 0000000..bcb7303 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDataFilter.hpp @@ -0,0 +1,371 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AIDataFilter.h" +#include "IAILiteralString.h" + +#include +#include + +/** @file IAIDataFilter.hpp */ + +namespace ai +{ +/** + A stack-based wrapper class over AIDataFilterSuite + + Prefer this class over directly accessing the AIDataFilterSuite APIs. + Create various convenient, stack-based various data filters and link them together for different needs + + Most of the methods throw ai::Error if any error is encountered. + Check for AINOEXCEPT in method signature which doesn't throw any error. + + Usage Examples: + + Create a File Data filter + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kRead, 0, 0); + + Create a linked Zlib Compression filter for compressed write and uncompressed read + Option 1: Link while Creation + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kRead, 0, 0, + ai::CreateZDataFilter(IDataFilter::Mode::kRead) + ); + + Option 2: Link After Creation + dataFilter->Link(ai::CreateZDataFilter(IDataFilter::Mode::kRead)); + + Read from filter + char buff[1024] = {}; + size_t buffSize(sizeof(buff)); + dataFilter->Read(buff, buffSize); + + Write to filter + dataFilter->Write(buff, buffSize); + + +*/ + class IDataFilter + { + public: + /** Data Filter Modes */ + enum class Mode { + /** Read Mode */ + kRead, + + /** Write Mode */ + kWrite, + + /** Append Mode*/ + kAppend + }; + + enum Error : AIErr + { + /** If read calls are made on write/append filter or write calls are made on read filters. */ + kInvalidFilterModeError = 'IFME', + }; + + /** + Returns the effective AIDataFilter, use it to pass to various SDK APIs + which requires AIDataFilter + */ + virtual AIDataFilter* GetFilter() const AINOEXCEPT = 0; + + /** + Releases and returns the effective AIDataFilter without unlinking the filter. + This should only be used when the AIDataFilter is owned by another IDataFilter. + */ + virtual AIDataFilter* ReleaseFilter() AINOEXCEPT = 0; + + /** + Returns the first filter in this chain, don't use it in a normal case. + It is used to chain two filter chains together + */ + virtual AIDataFilter* GetFirstFilter() const AINOEXCEPT = 0; + + /** + Returns filter mode to be passed on to AIDataFilter APIs + */ + virtual ai::LiteralString GetAIMode() const AINOEXCEPT = 0; + + /** + Returns the filter mode enum value + */ + virtual Mode GetMode() const AINOEXCEPT = 0; + + /** + #AIDataFilterSuite::ReadDataFilter + */ + virtual void Read(char* store, size_t& count) = 0; + + /** + #AIDataFilterSuite::WriteDataFilter + */ + virtual void Write(const char* store, size_t count) = 0; + + /** + #AIDataFilterSuite::SeekDataFilter + */ + virtual void Seek(sizediff_t newPos) = 0; + + /** + #AIDataFilterSuite::MarkDataFilter + */ + virtual sizediff_t Mark() const = 0; + + using ContentType = std::vector; + /** + Returns the entire content of the filter. Use it only for small files. + When the entire content of the filter can be read in a continuous dynamic memory. + */ + virtual ContentType ReadFilterContent() = 0; + + /** + Returns the size of the content in bytes. + The size gets computed with forward and backward seeking. Not all DataFilter support seeking. + */ + virtual size_t ContentSize() = 0; + + /** + Link a new data filter to the current chain. + No need to specifically unlink. Unlink is called in the destructor + #AIDataFilterSuite::LinkDataFilter + */ + virtual void Link(std::unique_ptr nextFilter) = 0; + + virtual ~IDataFilter() = default; + }; + + /** Create a stack-based File Data Filter. + #AIDataFitlerSuite::NewFileDataFilter() + auto fileFilter = CreateFileDataFilter(filePath, IDataFilter::Mode::kWrite); + fileFilter->Write(buff, buffsize); + + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + std::unique_ptr CreateFileDataFilter( + const ai::FilePath& filePath, + IDataFilter::Mode filterMode, + size_t creator = 0, + ai::int32 type = 0, + std::unique_ptr nextFilter = nullptr + ); + + /** Create a stack-based Resource Data Filter. + #AIDataFitlerSuite::NewResourceDataFilter() + + auto filter = CreateResourceDataFilter(plugin, 'TEXT', id, resName, IDataFilter::Mode::kRead); + + char buff[1024] = {}; + size_t buffSize(sizeof(buff)); + filter->Read(buff, buffSize); + + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + std::unique_ptr CreateResourceDataFilter( + SPPluginRef plugin, + ai::int32 type, + ai::int32 id, + const char *name, + std::unique_ptr nextFilter = nullptr + ); + + /** Create a stack-based Zlib Data Filter. Normally linked to other filters in the chain + to provide zlib compression/decompression + #AIDataFitlerSuite::NewZDataFilter() + + //Write compressed content to a file + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kWrite, 0, 0, + ai::CreateZDataFilter(IDataFilter::Mode::kWrite) + ); + + dataFilter->Write(buff, buffsize); + + //Read uncompressed content from a file + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kRead, 0, 0, + ai::CreateZDataFilter(IDataFilter::Mode::kRead) + ); + + char buff[1024] = {}; + size_t buffSize(sizeof(buff)); + dataFilter->Read(buff, buffSize); + + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + std::unique_ptr CreateZDataFilter( + IDataFilter::Mode filterMode, + std::unique_ptr nextFilter = nullptr + ); + + /** Create a stack-based Zstandard Data Filter. Normally linked to other filters in the chain + to provide zstd compression/decompression + #AIDataFitlerSuite::NewZStdDataFilter() + + //Write compressed content to a file + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kWrite, 0, 0, + ai::CreateZStdDataFilter(IDataFilter::Mode::kWrite) + ); + + dataFilter->Write(buff, buffsize); + + //Read uncompressed content from a file + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kRead, 0, 0, + ai::CreateZStdDataFilter(IDataFilter::Mode::kRead) + ); + + char buff[1024] = {}; + size_t buffSize(sizeof(buff)); + dataFilter->Read(buff, buffSize); + + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + std::unique_ptr CreateZStdDataFilter( + IDataFilter::Mode filterMode, + std::unique_ptr nextFilter = nullptr + ); + + /** Create a stack-based Async Data Filter.Takes a asyncFilter and makes it run on a background thread. + async filter can be normally linked to other filters in the chain. This filter takes the data from the next item in the chain + and passes it to asyncFilter on background thread. + #AIDataFitlerSuite::NewAsyncDataFilter() + + Currently only supports Read Mode. + asyncFilter [in] the filters that will be running on a background thread. this filter should not be linked to any other filter + prefetchSize [in] size of a buffer typically fetched from the next filter(next of the filter returned by this API). + outputSize [in] size of a buffer typically asked from this filter. + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. +*/ + std::unique_ptr CreateAsyncDataFilter( + IDataFilter::Mode filterMode, + std::unique_ptr&& asyncFilter, + const ai::uint32 prefetchSize, + const ai::uint32 outputSize, + std::unique_ptr nextFilter = nullptr + ); + + /** Create a stack-based A85 Data Filter. Normally linked to other filters in the chain + to provide ASCII85 compression/decompression + #AIDataFitlerSuite::NewA85DataFilter() + + //Write compressed content to a file + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kWrite, 0, 0, + ai::CreateA85DataFilter(IDataFilter::Mode::kWrite) + ); + + dataFilter->Write(buff, buffsize); + + //Read uncompressed content from a file + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kRead, 0, 0, + ai::CreateA85DataFilter(IDataFilter::Mode::kRead) + ); + + char buff[1024] = {}; + size_t buffSize(sizeof(buff)); + dataFilter->Read(buff, buffSize); + + prefix [in] The string to insert at the start of each line. + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + std::unique_ptr CreateA85DataFilter( + IDataFilter::Mode filterMode, + const char* prefix = nullptr, + std::unique_ptr nextFilter = nullptr + ); + + /** Create a stack-based buffered Data Filter. Normally linked to other filters in the chain + to provide buffered read/write for better performance + #AIDataFitlerSuite::NewBufferDataFilter() + + //Bufferred file data filter + auto dataFilter = ai::CreateFileDataFilter(filePath, IDataFilter::Mode::kWrite, 0, 0, + CreateBufferDataFilter(4096) + ); + + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + std::unique_ptr CreateBufferDataFilter( + size_t size, + std::unique_ptr nextFilter = nullptr + ); + + /** Create a stack-based VM Data Filter. + #AIDataFitlerSuite::NewVMDataFilter() + + auto filter = CreateVMDataFilter(4096); + + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + std::unique_ptr CreateVMDataFilter( + size_t initialSize, + std::unique_ptr nextFilter = nullptr + ); + + /** Create a stack-based Block Data Filter. + #AIDataFitlerSuite::NewBlockDataFilter() + + char* srcBuffer; //received from somewhere + size_t sizeOfBuffer; //received from somewhere + + auto filter = CreateBlockDataFilter(srcBuffer, sizeOfBuffer); + + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + std::unique_ptr CreateBlockDataFilter( + void *address, + size_t size, + std::unique_ptr nextFilter = nullptr + ); + + /** + Create a stack-based data filter from an existing AIDataFilter*. + It will automatically be unlinked when the scope end. + + @param filter - Filter to be wrapped in the stacked object + nextFilter [in] Next filter in the chain. Equivalent to calling Link() after filter creation. + */ + + std::unique_ptr CreateScopedDataFilter( + AIDataFilter* filter, + IDataFilter::Mode filterMode, + std::unique_ptr nextFilter = nullptr + ); + + /** + Copies contents from the source data filter to the destination data filter. + + @param srcFilter - Filter to copy the data from + @param dstFilter - Filter to copy the data to + @param bufferSize - Buffer size to be used for copying the data + @param seekToBegin - Whether the source filter's read location should be reset to the beginning before creating a copy + + example: + ai::FilePath filePath(ai::UnicodeString::FromRoman("MyZCompressedFile.txt")); + + auto dataFilter = ai::CreateFileDataFilter(filePath, ai::IDataFilter::Mode::kRead, 0, 0, + ai::CreateZDataFilter(ai::IDataFilter::Mode::kRead) + ); + + ai::FilePath filePathOut(ai::UnicodeString::FromRoman("MyUncompressedFile.txt")); + auto dataFilterOut = ai::CreateFileDataFilter(filePathOut, ai::IDataFilter::Mode::kWrite); + + ai::CopyDataFilter(*dataFilter, *dataFilterOut); + */ + AIErr CopyDataFilter(IDataFilter& srcFilter, IDataFilter& dstFilter, size_t bufferSize = 4096, bool seekToBegin = true); + + +} //namespace ai \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDictionary.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDictionary.cpp new file mode 100644 index 0000000..e6facb8 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDictionary.cpp @@ -0,0 +1,1734 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#include "IAIDictionary.hpp" + +#include "AIArt.h" +#include "AIDocument.h" +#include "AIErrorHandler.h" +#include "IAIRef.h" +#include "AIAssert.hpp" +#include "AIPathStyle.h" + +#include +#include +#include + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIDictionary) + use_suite_required(AIArt) + use_suite_required(AIDocument) + use_suite_required(AIArray) + use_suite_required(AIEntry) + use_suite_required(AIDictionaryIterator) +#elif defined (_IAIDICTIONARY_SUITE_INCLUDE_H) + #include _IAIDICTIONARY_SUITE_INCLUDE_H +#else + // these need to be declared by client + extern "C" AIDictionarySuite* sAIDictionary; + extern "C" AIArtSuite* sAIArt; + extern "C" AIDocumentSuite* sAIDocument; + extern "C" AIArraySuite* sAIArray; + extern "C" AIEntrySuite* sAIEntry; + extern "C" AIDictionaryIteratorSuite* sAIDictionaryIterator; +#endif + +#define TEST_AI_DICTIONARY 0 + +#if TEST_AI_DICTIONARY +#include "AIDictionaryKeyHelper.hpp" +#if AI_AUTO_SUITE_AVAILABLE + use_suite_required(AIPathStyle) +#elif defined(_IAIDICTIONARY_SUITE_INCLUDE_H) + //don't include it again +#else + extern "C" AIPathStyleSuite* sAIPathStyle; +#endif + +namespace +{ + DictionaryKeyDeclareAndDefine(kDictTypeEntry, "Dict type entry"); + DictionaryKeyDeclareAndDefine(kBoolkey, "Dict Test Int Bool"); + DictionaryKeyDeclareAndDefine(kIntKey, "Dict Test int Key" ); + DictionaryKeyDeclareAndDefine(kStringKey, "Dict test string key" ); + DictionaryKeyDeclareAndDefine(kUnicodeStringKey, "Dict test unicode string key"); + DictionaryKeyDeclareAndDefine(kRealKey, "Dict test real key" ); + DictionaryKeyDeclareAndDefine(kPointerKey, "-Dict test pointer key" ); + DictionaryKeyDeclareAndDefine(kBinaryKey, "Dict test binary key" ); + DictionaryKeyDeclareAndDefine(kMyRealValkey2, "My real val key2"); + DictionaryKeyDeclareAndDefine(kDictKey, "Dict test Dict key"); + DictionaryKeyDeclareAndDefine(kArrayKey, "Dict test array key" ); + DictionaryKeyDeclareAndDefine(kTestNotFoundKey, "Dict test not found key"); + + DictionaryKeyDeclareAndDefine(kFillStyleKey, "Dict test fill style key"); + DictionaryKeyDeclareAndDefine(kStrokeStyleKey, "Dict test stroke style key"); +} +#endif + +namespace +{ + template + T AddRef(T ref) + { + ai::GetAICountedObjectSuitePtr()->AddRef(ref); + return ref; + } + + template + T Release(T ref) + { + ai::GetAICountedObjectSuitePtr()->Release(ref); + return ref; + } +} + +namespace ai +{ + class Entry::Impl + { + public: + explicit Impl(AIEntryRef entryRef):mEntry(entryRef) + { + } + + explicit Impl(const Impl& other):mEntry(other.mEntry) + { + } + + explicit Impl(bool boolVal) + { + *(mEntry << ai::Replace) = sAIEntry->FromBoolean(boolVal); + } + explicit Impl(ai::int32 intVal) + { + *(mEntry << ai::Replace) = sAIEntry->FromInteger(intVal); + } + explicit Impl(AIReal realVal) + { + *(mEntry << ai::Replace) = sAIEntry->FromReal(realVal); + } + Impl(const AIRealPoint& point) + { + *(mEntry << ai::Replace) = sAIEntry->FromRealPoint(&point); + } + Impl(const AIRealMatrix& matrix) + { + *(mEntry << ai::Replace) = sAIEntry->FromRealMatrix(&matrix); + } + Impl(const std::string& strVal) + { + *(mEntry << ai::Replace) = sAIEntry->FromString(strVal.c_str()); + } + + Impl(const ai::UnicodeString& value) + { + *(mEntry << ai::Replace) = sAIEntry->FromUnicodeString(value); + } + Impl(const BinaryType& value) + { + *(mEntry << ai::Replace) = sAIEntry->FromBinary((void*)value.data(), value.size()); + } + + Impl(const Array& value) + { + *(mEntry << ai::Replace) = sAIEntry->FromArray(value.get()); + } + + Impl(const Dictionary& value) + { + *(mEntry << ai::Replace) = sAIEntry->FromDict(value.get()); + } + + Impl(const AIFillStyle& value) + { + *(mEntry << ai::Replace) = sAIEntry->FromFillStyle(&value); + } + + Impl(const AIStrokeStyle& value) + { + *(mEntry << ai::Replace) = sAIEntry->FromStrokeStyle(&value); + } + + bool BoolVal() const + { + AIBoolean boolval(false); + mError = sAIEntry->ToBoolean(AddRef(mEntry), &boolval); + return (boolval != false); + } + + ai::int32 IntVal() const + { + ai::int32 value(0); + mError = sAIEntry->ToInteger(AddRef(mEntry), &value); + return value; + } + + AIReal RealVal() const + { + AIReal value{}; + mError = sAIEntry->ToReal(AddRef(mEntry), &value); + return value; + } + + AIRealMatrix MatrixVal() const + { + AIRealMatrix value{}; + mError = sAIEntry->ToRealMatrix(AddRef(mEntry), &value); + return value; + } + + AIRealPoint PointVal() const + { + AIRealPoint value{}; + mError = sAIEntry->ToRealPoint(AddRef(mEntry), &value); + return value; + } + + BinaryType BinaryVal() const + { + size_t size(0); + mError = sAIEntry->ToBinary(AddRef(mEntry), nullptr, &size); + + BinaryType value(size); + mError = sAIEntry->ToBinary(AddRef(mEntry), reinterpret_cast(value.data()), &size); + return value; + } + + std::string StringVal() const + { + const char* valuePtr(nullptr); + mError = sAIEntry->ToString(AddRef(mEntry), &valuePtr); + return std::string(valuePtr); + } + + ai::UnicodeString UnicodeStringVal() const + { + ai::UnicodeString value; + mError = sAIEntry->ToUnicodeString(AddRef(mEntry), value); + return value; + } + + Array ArrayVal() const + { + ai::Ref arrayRef; + mError = sAIEntry->ToArray(AddRef(mEntry), arrayRef << ai::Replace); + return Array(arrayRef); + } + + Dictionary DictionaryVal() const + { + ai::Ref dictRef; + mError = sAIEntry->ToDict(AddRef(mEntry), dictRef << ai::Replace); + + return Dictionary(dictRef); + } + + AIEntryType GetType() const + { + return sAIEntry->GetType(mEntry); + } + + AIEntryRef get() const + { + return mEntry.operator AIEntryRef(); + } + + ai::UnicodeString GetAsUnicodeString() const + { + ai::UnicodeString value; + mError = sAIEntry->AsUnicodeString(AddRef(mEntry), value); + return value; + } + + bool equal(const Impl& other) const + { + return (sAIEntry->Equiv(mEntry, other.mEntry) != false); + } + + AIArtHandle ArtHandleVal() const + { + AIArtHandle artHandle(nullptr); + mError = sAIEntry->ToArt(AddRef(mEntry), &artHandle); + return artHandle; + } + + AIPatternHandle PatternVal() const + { + AIPatternHandle pattern(nullptr); + mError = sAIEntry->ToPattern(AddRef(mEntry), &pattern); + return pattern; + } + + AIPatternHandle BrushPatternVal() const + { + AIPatternHandle pattern(nullptr); + mError = sAIEntry->ToBrushPattern(AddRef(mEntry), &pattern); + return pattern; + } + + AIGradientHandle GradientVal() const + { + AIGradientHandle gradient(nullptr); + mError = sAIEntry->ToGradient(AddRef(mEntry), &gradient); + return gradient; + } + + AICustomColorHandle CustomColorVal() const + { + AICustomColorHandle customColor(nullptr); + mError = sAIEntry->ToCustomColor(AddRef(mEntry), &customColor); + return customColor; + } + static std::unique_ptr CreateImplConsumeRef(AIEntryRef entry) + { + auto entryImpl = std::make_unique(entry); + Release(entry); //consume ref + return entryImpl; + } + + static std::unique_ptr FromPattern(AIPatternHandle pattern) + { + return CreateImplConsumeRef(sAIEntry->FromPattern(pattern)); + } + + static std::unique_ptr FromGradient(AIGradientHandle gradient) + { + return CreateImplConsumeRef(sAIEntry->FromGradient(gradient)); + } + + static std::unique_ptr FromCustomColor(AICustomColorHandle customColor) + { + return CreateImplConsumeRef(sAIEntry->FromCustomColor(customColor)); + } + + static std::unique_ptr FromPluginObject(AIObjectHandle obj) + { + return CreateImplConsumeRef(sAIEntry->FromPluginObject(obj)); + } + + AIObjectHandle PluginObjectVal() const + { + AIObjectHandle pluginObj(nullptr); + mError = sAIEntry->ToPluginObject(AddRef(mEntry), &pluginObj); + return pluginObj; + } + + std::unique_ptr AIFillStyleVal() const + { + auto fillStyle = std::make_unique(); + mError = sAIEntry->ToFillStyle(AddRef(mEntry), fillStyle.get()); + return fillStyle; + } + + std::unique_ptr AIStrokeStyleVal() const + { + auto strokeStyle = std::make_unique(); + mError = sAIEntry->ToStrokeStyle(AddRef(mEntry), strokeStyle.get()); + return strokeStyle; + } + + static std::unique_ptr FromSymbolPattern(AIPatternHandle obj) + { + return CreateImplConsumeRef(sAIEntry->FromSymbolPattern(obj)); + } + + static std::unique_ptr FromBrushPattern(AIPatternHandle pattern) + { + return CreateImplConsumeRef(sAIEntry->FromBrushPattern(pattern)); + } + + AIPatternHandle SymbolPatternVal() const + { + AIPatternHandle symbolPattern(nullptr); + mError = sAIEntry->ToSymbolPattern(AddRef(mEntry), &symbolPattern); + return symbolPattern; + } + + static std::unique_ptr FromArtStyle(AIArtStyleHandle artStyle) + { + return CreateImplConsumeRef(sAIEntry->FromArtStyle(artStyle)); + } + + AIArtStyleHandle ArtStyleVal() const + { + AIArtStyleHandle artStyle(nullptr); + mError = sAIEntry->ToArtStyle(AddRef(mEntry), &artStyle); + return artStyle; + } + + static std::unique_ptr FromBinary(void* data, size_t size) + { + return CreateImplConsumeRef(sAIEntry->FromBinary(data, size)); + } + + void BinaryVal(void *value, size_t& size) const + { + mError = sAIEntry->ToBinary(AddRef(mEntry), value, &size); + } + + + private: + ai::Ref mEntry; + mutable AIErrorThrower mError; + }; + + + AIEntryRef Entry::get() const + { + return pImpl->get(); + } + + bool Entry::operator==(const Entry& other) const + { + return pImpl->equal(*other.pImpl); + } + + ai::UnicodeString Entry::GetAsUnicodeString() const + { + return pImpl->GetAsUnicodeString(); + } + + void Entry::swap(Entry& other) AINOEXCEPT + { + std::swap(pImpl, other.pImpl); + } + + Entry::Entry(AIEntryRef entryRef) :pImpl(std::make_unique(entryRef)) + { + + } + + Entry::Entry(bool boolVal) : pImpl(std::make_unique(boolVal)) + { + + } + + Entry::Entry(ai::int32 intVal) : pImpl(std::make_unique(intVal)) + { + + } + + Entry::Entry(AIReal realVal) : pImpl(std::make_unique(realVal)) + { + + } + + Entry::Entry(const AIRealPoint& point) : pImpl(std::make_unique(point)) + { + + } + + Entry::Entry(const AIRealMatrix& matrix) : pImpl(std::make_unique(matrix)) + { + + } + + Entry::Entry(const std::string& strVal) : pImpl(std::make_unique(strVal)) + { + + } + + Entry::Entry(const ai::UnicodeString& value) : pImpl(std::make_unique(value)) + { + + } + + Entry::Entry(const BinaryType& value) : pImpl(std::make_unique(value)) + { + + } + + Entry::Entry(const Array& value) : pImpl(std::make_unique(value)) + { + + } + + Entry::Entry(const Dictionary& value) : pImpl(std::make_unique(value)) + { + + } + + Entry::Entry(Entry&& other) AINOEXCEPT + { + swap(other); + } + + Entry::Entry(const Entry& other) :pImpl(std::make_unique(*(other.pImpl))) + { + + } + + + Entry::Entry(std::unique_ptr&& impl) + { + std::swap(pImpl, impl); + } + + Entry::Entry(const AIFillStyle& value):pImpl(std::make_unique(value)) + { + + } + + Entry::Entry(const AIStrokeStyle& value):pImpl(std::make_unique(value)) + { + + } + + Entry Entry::FromPattern(AIPatternHandle pattern) + { + return Entry(Impl::FromPattern(pattern)); + } + + Entry Entry::FromBrushPattern(AIPatternHandle pattern) + { + return Entry(Impl::FromBrushPattern(pattern)); + } + + Entry Entry::FromGradient(AIGradientHandle gradient) + { + return Entry(Impl::FromGradient(gradient)); + } + + Entry Entry::FromCustomColor(AICustomColorHandle customColor) + { + return Entry(Impl::FromCustomColor(customColor)); + } + + Entry Entry::FromPluginObject(AIObjectHandle obj) + { + return Entry(Impl::FromPluginObject(obj)); + } + + Entry Entry::FromSymbolPattern(AIPatternHandle symbolPattern) + { + return Entry(Impl::FromSymbolPattern(symbolPattern)); + } + + Entry Entry::FromArtStyle(AIArtStyleHandle artStyle) + { + return Entry(Impl::FromArtStyle(artStyle)); + } + + Entry Entry::FromBinary(void* data, size_t size) + { + return Entry(Impl::FromBinary(data, size)); + } + + Entry& Entry::operator = (Entry other) AINOEXCEPT + { + swap(other); + return *this; + } + + bool Entry::BoolVal() const + { + return pImpl->BoolVal(); + } + + ai::int32 Entry::IntVal() const + { + return pImpl->IntVal(); + } + + AIReal Entry::RealVal() const + { + return pImpl->RealVal(); + } + + AIRealMatrix Entry::MatrixVal() const + { + return pImpl->MatrixVal(); + } + + AIRealPoint Entry::PointVal() const + { + return pImpl->PointVal(); + } + + Entry::BinaryType Entry::BinaryVal() const + { + return pImpl->BinaryVal(); + } + + std::string Entry::StringVal() const + { + return pImpl->StringVal(); + } + + ai::UnicodeString Entry::UnicodeStringVal() const + { + return pImpl->UnicodeStringVal(); + } + + AIArtHandle Entry::ArtHandleVal() const + { + return pImpl->ArtHandleVal(); + } + + AIPatternHandle Entry::PatternVal() const + { + return pImpl->PatternVal(); + } + + AIPatternHandle Entry::BrushPatternVal() const + { + return pImpl->BrushPatternVal(); + } + + AIGradientHandle Entry::GradientVal() const + { + return pImpl->GradientVal(); + } + + AICustomColorHandle Entry::CustomColorVal() const + { + return pImpl->CustomColorVal(); + } + + AIObjectHandle Entry::PluginObjectVal() const + { + return pImpl->PluginObjectVal(); + } + + AIPatternHandle Entry::SymbolPatternVal() const + { + return pImpl->SymbolPatternVal(); + } + + std::unique_ptr Entry::FillStyleVal() const + { + return pImpl->AIFillStyleVal(); + } + + std::unique_ptr Entry::StrokeStyleVal() const + { + return pImpl->AIStrokeStyleVal(); + } + + AIArtStyleHandle Entry::ArtStyleVal() const + { + return pImpl->ArtStyleVal(); + } + + Array Entry::ArrayVal() const + { + return pImpl->ArrayVal(); + } + + Entry::operator Array() const + { + return ArrayVal(); + } + + Dictionary Entry::DictionaryVal() const + { + return pImpl->DictionaryVal(); + } + + Entry::operator Dictionary() const + { + return DictionaryVal(); + } + + AIEntryType Entry::GetType() const + { + return pImpl->GetType(); + } + + void Entry::BinaryVal(void *value, size_t& size) const + { + return pImpl->BinaryVal(value, size); + } + + Entry::~Entry() + { + + } + + class Array::Impl + { + public: + Impl() + { + mError = sAIArray->CreateArray(mArray << ai::Replace); + } + + Impl(AIArrayRef arrayRef) + { + mArray = arrayRef; + } + + Impl(const Impl& other) + { + mArray = other.mArray; + } + + ai::int32 size() const + { + return sAIArray->Size(mArray); + } + + AIArrayRef get() const + { + return mArray; + } + + Entry at(ai::int32 index) const + { + Entry toReturn(sAIArray->Get(mArray, index)); + Release(toReturn.get()); + return toReturn; + } + + //edit + void set(ai::int32 index, const Entry& entry) + { + mError = sAIArray->Set(mArray, index, AddRef(entry.get())); + } + + void erase(ai::int32 index) + { + mError = sAIArray->DeleteEntry(mArray, index); + } + + void push_back(const Entry& entry) + { + mError = sAIArray->AppendEntry(mArray, AddRef(entry.get())); + } + + void reserve(ai::int32 size) + { + mError = sAIArray->Reserve(mArray, size); + } + + void insert(ai::int32 index, const Entry& entry) + { + mError = sAIArray->InsertEntry(mArray, index); + set(index, entry); + } + + void copy(const Impl& other) + { + mError = sAIArray->Copy(mArray, other.get()); + } + + Array clone() const + { + ai::Ref clonedArray; + mError = sAIArray->Clone(mArray, clonedArray << ai::Replace); + return Array(clonedArray); + } + + private: + ai::Ref mArray; + mutable AIErrorThrower mError; + }; + + Array::Array() :pImpl(std::make_unique()) + { + + } + + Array::Array(AIArrayRef arrrayRef) : pImpl(std::make_unique(arrrayRef)) + { + + } + + Array::Array(const Array& other) : pImpl(std::make_unique(*other.pImpl)) + { + + } + + Array Array::clone() const + { + return pImpl->clone(); + } + + void Array::copy(const Array& other) + { + pImpl->copy(*other.pImpl); + } + + Array& Array::operator = (Array other) AINOEXCEPT + { + swap(other); + return *this; + } + + Array::Array(Array&& other) AINOEXCEPT + { + swap(other); + } + + void Array::Test() + { +#if TEST_AI_DICTIONARY + //Test Array + Array myArray; + + ai::int32 intVal(20); + bool boolVal(true); + std::string strVal("My Simple String"); + ASUnicode unicodePoints[] = { 2423,354,3434,343,344,0 }; + ai::UnicodeString ustrval(unicodePoints); + + myArray.reserve(4); + + myArray.insert(0, Entry(intVal)); + myArray.insert(1, Entry(boolVal)); + + //replace Entry at index value + boolVal = false; + myArray[1] = Entry(boolVal); + + myArray.insert(2, Entry(strVal)); + myArray.insert(3, Entry(ustrval)); + myArray.insert(4, ai::UnicodeString("New Unicode String",kAIRomanCharacterEncoding)); + + auto size = myArray.size(); + if (size != 5) + { + AIMsgAssert(false, "Size returned wrong value!"); + } + + //Get Unicode string at 3rd index + ai::UnicodeString getUstrVal = ai::Entry(myArray[3]); + if (ustrval != getUstrVal) + { + AIMsgAssert(false, "Wrong Unicode String Value!"); + } + + //Get string at 2nd index + std::string getStrVal = ai::Entry(myArray[2]); + + if (strVal != getStrVal) + { + AIMsgAssert(false, "Wrong String value!"); + } + + if (boolVal != myArray.at(1).BoolVal()) + { + AIMsgAssert(false, "Wrong Bool value!"); + } + + //Get value by explicit By Function Value calls + auto getIntVal = ai::Entry(myArray[0]).IntVal(); + if (intVal != getIntVal) + { + AIMsgAssert(false, "Wrong Integer value!"); + } + + myArray.erase(0); + if (myArray.size() != 4) + { + AIMsgAssert(false, "Didn't erase array properly!"); + } + + ai::int32 reserveSize(10); + myArray.reserve(reserveSize); + + myArray.push_back(Entry(AIRealPoint{ 20., 30. })); + + Dictionary dict; + dict.SetBoolean(kDictTypeEntry, true); + myArray.push_back(Entry(dict)); + + //test range loop + std::ostringstream ostr; + for (auto entry : myArray) + { + auto type = entry.GetType(); + ostr << entry.GetType() << "-"; + switch (type) + { + case IntegerType: + case BooleanType: + case RealType: + case StringType: + case UnicodeStringType: + ostr << entry.GetAsUnicodeString().as_UTF8() ; + break; + default: + ostr << " Missing"; + } + ostr << ", "; + + } + + auto types = ostr.str(); + if (types.empty()) + { + AIMsgAssert(false, "Can't get types from array entries!"); + } +#endif //TEST_AI_DICTIONARY + } + + ai::int32 Array::size() const AINOEXCEPT + { + return pImpl->size(); + } + + Entry Array::at(ai::int32 index) const + { + return pImpl->at(index); + } + + void Array::insert(ai::int32 index, const Entry& entry) + { + pImpl->insert(index, entry); + } + + void Array::set(ai::int32 index, const Entry& entry) + { + pImpl->set(index, entry); + } + + void Array::erase(ai::int32 index) + { + pImpl->erase(index); + } + + void Array::push_back(const Entry& entry) + { + pImpl->push_back(entry); + } + + void Array::reserve(ai::int32 size) + { + pImpl->reserve(size); + } + + AIArrayRef Array::get() const + { + return pImpl->get(); + } + + Array::iterator Array::begin() const + { + auto arraySize = size(); + auto beginIndex = (arraySize > 0 ? 0 : arraySize); + return iterator(beginIndex, *this); + } + + Array::iterator Array::end() const + { + return iterator(size(), *this); + } + + void Array::swap(Array& other) AINOEXCEPT + { + std::swap(pImpl, other.pImpl); + } + + Array::~Array() + { + + } + + class Dictionary::Impl + { + private: + mutable AIErrorThrower mError; + ai::Ref mDict; + + public: + Impl(Dictionary::Type type); + explicit Impl(AIDictionaryRef dictRef); + Impl(const Impl& other); + + explicit Impl(AIArtHandle art); + + ai::UnicodeString GetUnicodeString(Dictionary::KeyType key) const + { + ai::UnicodeString value; + mError = GetUnicodeString(key, value); + return value; + } + + AIErr GetUnicodeString(Dictionary::KeyType key, ai::UnicodeString& value) const AINOEXCEPT + { + //don't throw, return error + return sAIDictionary->GetUnicodeStringEntry(mDict, key, value); + } + + void SetUnicodeString(Dictionary::KeyType key, const ai::UnicodeString& value) + { + mError = sAIDictionary->SetUnicodeStringEntry(mDict, key, value); + } + + std::string GetString(Dictionary::KeyType key) const + { + std::string value; + mError = GetString(key, value); + return value; + } + + AIErr GetString(Dictionary::KeyType key, std::string& strValue) const AINOEXCEPT + { + const char* value{ nullptr }; + AIErr err = sAIDictionary->GetStringEntry(mDict, key, &value); + if (!err) + { + strValue = std::string(value); + } + return err; + } + + void SetString(Dictionary::KeyType key, const std::string& value) + { + mError = sAIDictionary->SetStringEntry(mDict, key, value.c_str()); + } + + AIReal GetReal(Dictionary::KeyType key) const + { + AIReal value(kAIRealZero); + mError = GetReal(key, value); + return value; + } + + AIErr GetReal(Dictionary::KeyType key, AIReal& value) const AINOEXCEPT + { + return sAIDictionary->GetRealEntry(mDict, key, &value); + } + + void SetReal(Dictionary::KeyType key, AIReal value) + { + mError = sAIDictionary->SetRealEntry(mDict, key, value); + } + + AIBoolean GetBoolean(Dictionary::KeyType key) const + { + AIBoolean value(false); + mError = GetBoolean(key, value); + return value; + } + + AIErr GetBoolean(Dictionary::KeyType key, AIBoolean& value) const AINOEXCEPT + { + return sAIDictionary->GetBooleanEntry(mDict, key, &value); + } + + void SetBoolean(Dictionary::KeyType key, AIBoolean value) const + { + mError = sAIDictionary->SetBooleanEntry(mDict, key, value); + } + + ai::int32 GetInteger(Dictionary::KeyType key) const + { + ai::int32 value(false); + mError = GetInteger(key, value); + return value; + } + + AIErr GetInteger(Dictionary::KeyType key, ai::int32& value) const AINOEXCEPT + { + return sAIDictionary->GetIntegerEntry(mDict, key, &value); + } + + void SetInteger(Dictionary::KeyType key, ai::int32 value) const + { + mError = sAIDictionary->SetIntegerEntry(mDict, key, value); + } + + ai::intptr GetPointer(Dictionary::KeyType key) const + { + ai::intptr value(false); + mError = GetPointer(key, value); + return value; + } + + AIErr GetPointer(Dictionary::KeyType key, ai::intptr& value) const AINOEXCEPT + { + return sAIDictionary->GetPointerEntry(mDict, key, &value); + } + + void SetPointer(Dictionary::KeyType key, ai::intptr value) const + { + mError = sAIDictionary->SetPointerEntry(mDict, key, value); + } + + Dictionary::BinaryType GetBinary(Dictionary::KeyType key) const + { + Dictionary::BinaryType value; + mError = GetBinary(key, value); + return value; + } + + AIErr GetBinary(Dictionary::KeyType key, Dictionary::BinaryType& value) const AINOEXCEPT + { + //Get size first + size_t size(0); + AIErr err = sAIDictionary->GetBinaryEntry(mDict, key, nullptr, &size); + if (err) + return err; + + value.resize(size); + err = sAIDictionary->GetBinaryEntry(mDict, key, value.data(), &size); + return err; + } + + void SetBinary(Dictionary::KeyType key, const Dictionary::BinaryType& value) const + { + mError = sAIDictionary->SetBinaryEntry(mDict, key, + (void*)(value.data()), value.size()); + } + + Dictionary GetDictionary(Dictionary::KeyType key) const + { + Dictionary dict(Dictionary::Type::kCreateEmpty); + mError = GetDictionary(key, dict); + return dict; + } + + AIErr GetDictionary(Dictionary::KeyType key, Dictionary& value) const AINOEXCEPT + { + ai::Ref dictRef; + AIErr err = sAIDictionary->GetDictEntry(mDict, key, dictRef << ai::Replace); + if (!err) + { + value = Dictionary(dictRef); + } + return err; + } + + void SetDictionary(Dictionary::KeyType key, const Dictionary& value) + { + mError = sAIDictionary->SetDictEntry(mDict, key, value.get()); + } + + AIDictionaryRef get() const AINOEXCEPT + { + return mDict; + } + + bool IsKnown(Dictionary::KeyType key) const + { + return (sAIDictionary->IsKnown(mDict, key) != false); + } + + void DeleteEntry(Dictionary::KeyType key) + { + mError = sAIDictionary->DeleteEntry(mDict, key); + } + + AIEntryType GetEntryType(Dictionary::KeyType key) const + { + AIEntryType entryType(UnknownType); + mError = sAIDictionary->GetEntryType(mDict, key, &entryType); + return entryType; + } + + Array GetArray(KeyType key) const + { + Array arr; + mError = GetArray(key, arr); + return arr; + } + + AIErr GetArray(KeyType key, Array& value) const AINOEXCEPT + { + ai::Ref arrayRef; + AIErr err = sAIDictionary->GetArrayEntry(mDict, key, arrayRef << ai::Replace); + if (!err) + { + value = Array(arrayRef); + } + return err; + } + + void SetArray(KeyType key, const Array& value) const + { + mError = sAIDictionary->SetArrayEntry(mDict, key, value.get()); + } + + Entry Get(KeyType dictKey) const + { + Entry entry(sAIDictionary->Get(mDict, dictKey)); + Release(entry.get()); + return entry; + } + + void Set(KeyType dictKey, const Entry& entry) + { + mError = sAIDictionary->Set(mDict, dictKey, AddRef(entry.get())); + } + + void copy(const Impl& other) const + { + //Copy into self + mError = sAIDictionary->Copy(mDict, other.mDict); + } + + Dictionary clone() const + { + ai::Ref clonedRef; + mError = sAIDictionary->Clone(mDict, clonedRef << ai::Replace); + return Dictionary(clonedRef); + } + + void TouchArt() + { + mError = sAIDictionary->TouchArt(mDict); + } + + const char* GetKeyString(AIDictKey dictKey) const + { + return sAIDictionary->GetKeyString(dictKey); + } + + KeyType GetKey(const char* keyString) const + { + return sAIDictionary->Key(keyString); + } + + }; + + Dictionary::Impl::Impl(Dictionary::Type type) + { + switch (type) + { + case Dictionary::Type::kCreateEmpty: + mError = sAIDictionary->CreateDictionary(mDict << ai::Replace); + break; + case Dictionary::Type::kCurrentDocument: + mError = sAIDocument->GetDictionary(mDict << ai::Replace); + break; + case Dictionary::Type::kCurrentDocumentNonRecorded: + mError = sAIDocument->GetNonRecordedDictionary(mDict << ai::Replace); + break; + } + } + + Dictionary::Impl::Impl(AIArtHandle art) + { + mError = sAIArt->GetDictionary(art, mDict << ai::Replace); + } + + Dictionary::Impl::Impl(AIDictionaryRef dictRef) + { + mDict = dictRef; + } + + Dictionary::Impl::Impl(const Impl& other) + { + mDict = other.mDict; + } + + Dictionary::iterator& Dictionary::iterator::operator++() + { + if (mDictIterator) + { + sAIDictionaryIterator->Next(mDictIterator); + if (sAIDictionaryIterator->AtEnd(mDictIterator)) + { + mDictIterator = ai::Ref(); + } + } + return *this; + } + + bool Dictionary::iterator::operator==(Dictionary::iterator other) const + { + if (mDictIterator && other.mDictIterator) + { + return (sAIDictionaryIterator->IsEqual(mDictIterator, other.mDictIterator)) != false; + } + + if (!mDictIterator && !other.mDictIterator) + { + return true; + } + + return false; + } + + Dictionary::iterator::value_type Dictionary::iterator::operator*() const + { + auto key = sAIDictionaryIterator->GetKey(mDictIterator); + Entry entry (sAIDictionaryIterator->GetEntry(mDictIterator)); + Release(entry.get());//consume the reference + return std::make_pair(key, entry); + } + + void Dictionary::swap(Dictionary& other) AINOEXCEPT + { + std::swap(pImpl, other.pImpl); + } + + Dictionary::Dictionary(Type type) :pImpl(std::make_unique(type)) + { + + } + + Dictionary::Dictionary(AIArtHandle art):pImpl(std::make_unique(art)) + { + + } + + Dictionary::Dictionary(AIDictionaryRef dictRef):pImpl(std::make_unique(dictRef)) + { + + } + + Dictionary::Dictionary(Dictionary&& other) AINOEXCEPT + { + swap(other); + } + + Dictionary::Dictionary(const Dictionary& other):pImpl(std::make_unique(*other.pImpl)) + { + + } + + Dictionary Dictionary::clone() const + { + return pImpl->clone(); + } + + void Dictionary::copy(const Dictionary& other) + { + pImpl->copy(*other.pImpl); + } + + Dictionary& Dictionary::operator=(Dictionary other) AINOEXCEPT + { + swap(other); + return *this; + } + + Dictionary::~Dictionary() + { + + } + + ai::UnicodeString Dictionary::GetUnicodeString(Dictionary::KeyType key) const + { + return pImpl->GetUnicodeString(key); + } + + AIErr Dictionary::GetUnicodeString(Dictionary::KeyType key, ai::UnicodeString& value) const AINOEXCEPT + { + return pImpl->GetUnicodeString(key, value); + } + + void Dictionary::SetUnicodeString(Dictionary::KeyType key, const ai::UnicodeString& value) + { + pImpl->SetUnicodeString(key, value); + } + + std::string Dictionary::GetString(Dictionary::KeyType key) const + { + return pImpl->GetString(key); + } + + AIErr Dictionary::GetString(Dictionary::KeyType key, std::string& value) const AINOEXCEPT + { + return pImpl->GetString(key, value); + } + + void Dictionary::SetString(Dictionary::KeyType key, const std::string& value) + { + pImpl->SetString(key, value); + } + + AIReal Dictionary::GetReal(Dictionary::KeyType key) const + { + return pImpl->GetReal(key); + } + + AIErr Dictionary::GetReal(Dictionary::KeyType key, AIReal& value) const AINOEXCEPT + { + return pImpl->GetReal(key, value); + } + + void Dictionary::SetReal(Dictionary::KeyType key, AIReal value) + { + pImpl->SetReal(key, value); + } + + AIBoolean Dictionary::GetBoolean(Dictionary::KeyType key) const + { + return pImpl->GetBoolean(key); + } + + AIErr Dictionary::GetBoolean(Dictionary::KeyType key, AIBoolean& value) const AINOEXCEPT + { + return pImpl->GetBoolean(key, value); + } + + void Dictionary::SetBoolean(Dictionary::KeyType key, AIBoolean value) + { + pImpl->SetBoolean(key, value); + } + + ai::int32 Dictionary::GetInteger(Dictionary::KeyType key) const + { + return pImpl->GetInteger(key); + } + + AIErr Dictionary::GetInteger(Dictionary::KeyType key, ai::int32& value) const AINOEXCEPT + { + return pImpl->GetInteger(key, value); + } + + void Dictionary::SetInteger(Dictionary::KeyType key, ai::int32 value) + { + pImpl->SetInteger(key, value); + } + + ai::intptr Dictionary::GetPointer(Dictionary::KeyType key) const + { + return pImpl->GetPointer(key); + } + + AIErr Dictionary::GetPointer(Dictionary::KeyType key, ai::intptr& value) const AINOEXCEPT + { + return pImpl->GetPointer(key, value); + } + + void Dictionary::SetPointer(Dictionary::KeyType key, ai::intptr value) + { + pImpl->SetPointer(key, value); + } + + Dictionary::BinaryType Dictionary::GetBinary(Dictionary::KeyType key) const + { + return pImpl->GetBinary(key); + } + + AIErr Dictionary::GetBinary(Dictionary::KeyType key, BinaryType& value) const AINOEXCEPT + { + return pImpl->GetBinary(key, value); + } + + void Dictionary::SetBinary(Dictionary::KeyType key, const BinaryType& value) + { + pImpl->SetBinary(key, value); + } + + Dictionary Dictionary::GetDictionary(Dictionary::KeyType key) const + { + return pImpl->GetDictionary(key); + } + + AIErr Dictionary::GetDictionary(Dictionary::KeyType key, Dictionary& value) const AINOEXCEPT + { + return pImpl->GetDictionary(key, value); + } + + void Dictionary::SetDictionary(Dictionary::KeyType key, const Dictionary& value) + { + pImpl->SetDictionary(key, value); + } + + Array Dictionary::GetArray(KeyType key) const + { + return pImpl->GetArray(key); + } + + AIErr Dictionary::GetArray(KeyType key, Array& value) const AINOEXCEPT + { + return pImpl->GetArray(key, value); + } + + void Dictionary::SetArray(KeyType key, const Array& value) + { + pImpl->SetArray(key, value); + } + + Entry Dictionary::Get(KeyType key) const + { + return pImpl->Get(key); + } + + void Dictionary::Set(KeyType key, const Entry& entry) + { + pImpl->Set(key, entry); + } + + const char* Dictionary::GetKeyString(KeyType dictKey) const + { + return pImpl->GetKeyString(dictKey); + } + + Dictionary::KeyType Dictionary::GetKey(const char* keyString) const + { + return pImpl->GetKey(keyString); + } + + bool Dictionary::IsKnown(Dictionary::KeyType key) const + { + return pImpl->IsKnown(key); + } + + AIEntryType Dictionary::GetEntryType(Dictionary::KeyType key) const + { + return pImpl->GetEntryType(key); + } + + ai::Dictionary::iterator Dictionary::find(KeyType key) const + { + ai::Ref iterRef; + AIErr err = sAIDictionary->Find(get(), key, iterRef << ai::Replace); + if (err || !iterRef) + { + //return end iterator + return end(); + } + return iterator(std::move(iterRef)); + } + + void Dictionary::erase(Dictionary::KeyType key) + { + pImpl->DeleteEntry(key); + } + + void Dictionary::TouchArt() + { + pImpl->TouchArt(); + } + + AIDictionaryRef Dictionary::get() const AINOEXCEPT + { + return pImpl->get(); + } + + Dictionary::iterator Dictionary::begin() const + { + ai::Ref iterRef; + AIErr err = sAIDictionary->Begin(get(), iterRef << ai::Replace); + if (err || !iterRef || sAIDictionaryIterator->AtEnd(iterRef) ) + { + return end(); + } + return iterator(std::move(iterRef)); + } + + Dictionary::iterator Dictionary::end() const + { + ai::Ref iterRef; + return iterator(std::move(iterRef)); + } + + void Dictionary::Test() + { +#if TEST_AI_DICTIONARY + try + { + //Test array first + Array::Test(); + + Dictionary dict(Dictionary::Type::kCurrentDocumentNonRecorded); + + //test bool + AIBoolean boolVal(true); + dict.SetBoolean(kBoolkey, boolVal); + if (dict.GetBoolean(kBoolkey) != boolVal) + { + //Failure + AIMsgAssert(false, "Dictionary Bool test failed"); + } + + //test int + ai::int32 intval(2567); + dict.SetInteger(kIntKey, intval); + if (intval != dict.GetInteger(kIntKey)) + { + //Failure + AIMsgAssert(false, "Dictionary Int test failed"); + } + + //test string + std::string strval("Automatic string type detected."); + dict.Set(kStringKey, strval); + if (strval.compare(dict.Get(kStringKey)) != 0) + { + //Failure + AIMsgAssert(false, "Dictionary String test failed"); + } + + //test Unicode String + ASUnicode unicodeArray[] = { 3453, 2353, 232, 114, 0 }; + ai::UnicodeString ustrval(unicodeArray); + dict.SetUnicodeString(kUnicodeStringKey, ustrval); + if (ustrval.compare(dict.GetUnicodeString(kUnicodeStringKey)) != 0) + { + //Failure + AIMsgAssert(false, "Dictionary Unicode String test failed"); + } + + //test real + AIReal realval = 4556.3434; + constexpr AIReal kEpsilon = 1e-10; + dict.SetReal(kRealKey, realval); + if (std::fabs(realval - dict.GetReal(kRealKey)) > kEpsilon) + { + //Failure + AIMsgAssert(false, "Dictionary Real test failed"); + } + + //test pointer +#if AS_ARCH_64BIT + ai::intptr ptrval = 0x1234567812345678; +#else + ai::intptr ptrval = 0x12345678; +#endif + dict.SetPointer(kPointerKey, ptrval); + if (ptrval != dict.GetPointer(kPointerKey)) + { + //Failure + AIMsgAssert(false, "Dictionary Pointer test failed"); + } + + //test binary + Dictionary::BinaryType value{ 3,5,67,2,4,4,6,3 }; + dict.SetBinary(kBinaryKey, value); + if (value != dict.GetBinary(kBinaryKey)) + { + //Failure + AIMsgAssert(false, "Dictionary Binary test failed"); + } + + //test [] operator + AIReal realval2 = 20.456; + dict[kMyRealValkey2] = ai::Entry(realval2); + AIReal realVal2received = ai::Entry(dict[kMyRealValkey2]); + if (std::fabs(realval2 - realVal2received) > kEpsilon) + { + AIMsgAssert(false, "Operator [] didn't return correct value!"); + } + + //test dictionary + Dictionary child_dict(Dictionary::Type::kEmpty); + ai::int32 childIntVal(25); + child_dict.SetInteger(kIntKey, childIntVal); + + dict.SetDictionary(kDictKey, child_dict); + Dictionary new_child_dict = dict.GetDictionary(kDictKey); + if (new_child_dict.GetInteger(kIntKey) != childIntVal) + { + //Failure + AIMsgAssert(false, "Failure in child dictionary!"); + } + + //test array key + Array arr; + arr.push_back(Entry(intval)); + + dict.SetArray(kArrayKey, arr); + Array getArr = dict.Get(kArrayKey); + + ai::int32 getIntVal = ai::Entry(getArr[0]); + if (getIntVal != intval) + { + AIMsgAssert(false, "Failure in child array!"); + } + + //test find + auto it = dict.find(kMyRealValkey2); + if (it != dict.end()) + { + AIReal realValFound = (*it).second; + if (std::fabs(realval2 - realValFound) > kEpsilon) + { + AIMsgAssert(false, "Value found by find() is not correct!"); + } + } + else + { + AIMsgAssert(false, "Couldn't find the expected key!"); + } + + auto it2 = dict.find(kTestNotFoundKey);//try to find an invalid key + if (it2 != dict.end()) + { + AIMsgAssert(false, "Shouldn't have found this key!"); + } + + //test fill style + AIPathStyle pathStyle; + AIPathStyleMap pathStyleMap; + AIErr err = sAIPathStyle->GetCurrentPathStyle(&pathStyle, &pathStyleMap, nullptr, nullptr); + if (!err) + { + dict[kFillStyleKey] = pathStyle.fill; + dict[kStrokeStyleKey] = pathStyle.stroke; + + //get fill and stroke style + auto fillStyle = ai::Entry(dict[kFillStyleKey]).FillStyleVal(); + if (fillStyle->color.kind != pathStyle.fill.color.kind) + { + AIMsgAssert(false, "Coundn't set/get fill style properly!"); + } + + auto strokeStyle = ai::Entry(dict[kStrokeStyleKey]).StrokeStyleVal(); + if(strokeStyle->color.kind != pathStyle.stroke.color.kind) + { + AIMsgAssert(false, "Coundn't set/get stroke style properly!"); + } + } + + //range loop + std::ostringstream ostr; + for (auto entry : dict) + { + ostr << dict.GetKeyString(entry.first) << "-"; + auto type = entry.second.GetType(); + ostr << type << "-"; + + switch (type) + { + case IntegerType: + case BooleanType: + case RealType: + case StringType: + case UnicodeStringType: + ostr << entry.second.GetAsUnicodeString().as_UTF8(); + break; + default: + ostr << " Missing"; + } + } + auto strVal = ostr.str(); + if (strval.empty()) + { + AIMsgAssert(false, "Error in getting values via range loop!"); + } + } + catch (const ai::Error& /*error*/) + { + AIMsgAssert(false, "An Error in Dictionary Test!"); + } + catch (...) + { + AIMsgAssert(false, "Unknown Exception in Dictionary Test!"); + } +#endif //TEST_AI_DICTIONARY + } + + bool HasDictionary(AIArtHandle art) AINOEXCEPT + { + return !!sAIArt->HasDictionary(art); + } + + bool IsDictionaryEmpty(AIArtHandle art) AINOEXCEPT + { + return !!sAIArt->IsDictionaryEmpty(art); + } + +} //ai namespace + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDictionary.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDictionary.hpp new file mode 100644 index 0000000..ddf6f60 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDictionary.hpp @@ -0,0 +1,678 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AIEntry.h" +#include "AIArray.h" +#include "AIDictionary.h" +#include "IAILiteralString.h" +#include "IAIRef.h" + +#include +#include +#include + + +/** @file IAIDictionary.hpp */ + +namespace ai +{ + /** + A C++ based wrapper over AIDictionary, AIArray, and AIEntry Suite. + Forget about missing AddRef/Release. + + ai::Dictionary, ai::Array and ai::Entry classes provide C++ syntactic sugar over these APIs + with iterators to support range loops and move semantics + + Just add following line in your .mp and start using it. + MP.call_once(include_ai_dictionary_wrapper) + + +Usage Examples +ai::Entry + Construction + + ai::int32 intVal(10); + ai::Entry e(intVal); + + //inline construction + ai::Array arr; + arr.push_back(ai::Entry(ai::UnicodeString::FromRoman("Test unicode string")); + arr.push_back(std::string("Test std string")); + + Query + //Get the type of entry + auto entryType = e.GetType(); + + //Get values by automatic types + ai::int32 intval = e; + AIReal realval = e; + ai::UnicodeString strval = e; + + //Get values of specific type + auto i = e.IntegerVal(); + auto s = e.StringVal(); + auto us = e.UnicodeStringVal(); + + Compare + if(e == e1) + { + + } + +ai::Array + + Construction: + 1. Default empty array + ai::Array arr; + + 2. Create with existing AIArrayRef. It increments the refcount in c'tor and decrements in d'tor. + //Don't work with this c'tor if you're uncomfortable with the ref count logic + ai::Array arr(arrayRef); + + Query + //Get the size of array + auto arraySize = arr.size(); + + //Convenient [] operator + arr[0] = ai::Entry(20.456); + AIReal realVal = ai::Entry(arr[0]); + + //Get entry at index, via entry and value methods + auto entry = arr.at(0); + auto intVal = entry.IntegerVal(); + + //Range loop access + for(auto entry : arr) + { + ai::int32 intVal = entry; + auto floatval = entry.RealVal(); + } + + Clone/Copy + //Create a deep copy of self + Array duplicateArr = arr.clone(); + + //Deep copy into self from other Array + arr.copy(otherArray); + + Edit + //Insert an entry at location, automatic entry creation + arr.insert(0, std::string("test")); + + //Insert an entry at a location with explicit entry creation + arr.insert(1, ai::Entry(true)); + + //Insert at end of an array + arr.push_back(ai::Entry(10.34)); + + //Reserve space upfront. This doesn't create default entries or increases the size() + arr.reserve(10); + +ai::Dictionary + + Construction: + 1. Work with ArtHandle's dictionary + ai::Dictionary dict(art); + + 2. Document's dictionary + ai::Dictionary dict(ai::Dictionary::Type::kCurrentDocument); + + 3. Document's non-recorded dictionary + ai::Dictionary dict(ai::Dictionary::Type::kCurrentDocumentNonRecorded); + + 4. Create a new dictionary, which can be used temporarily, or set a dict entry in another + dictionary + + ai::Dictionary dict; + + Creating AIDictKey + //Create dictionary keys via AIDictionaryKeyHelper.hpp, which caches the AIDictKey for reuse + //Creating AIDictKey on every call is costly + #include "AIDictionaryKeyHelper.hpp" + + DictionaryKeyDeclareAndDefine(kMyKey, "My Dict Key"); + DictionaryKeyDeclareAndDefine(kMyChildDictKey, "My child dict key"); + DictionaryKeyDeclareAndDefine(kMyRealValkey2, "My real val key2"); + DictionaryKeyDeclareAndDefine(kIntKey, "My Int Key"); + + Accessors + + //Get values with automatic type detection. Throws exception if there's a type mismatch. + ai::int32 intVal = dict.Get(kMyKey); + ai::UnicodeString strVal = dict.Get(kMyKey); + + //Exception based getter methods. Throws exception if a key is not found or there's a type mismatch. + 1. auto value = dict.GetString(kMyKey); + 2. auto value = dict.GetUnicodeString(kMyKey); + + //No exception getters, check error yourself + ai::UnicodeString value; + if(dict.GetUnicodeString(kMykey, value) == kNoErr) + { + //value is valid + } + + //Setters + dict.Set(kMyKey, floatVal); //automatic entry of AIReal type creation + dict.Set(kMyKey, ai::UnicodeString("Automatic type detection")); + + //Set with specific type methods + dict.SetUnicodeString(kMKey, value); + dict.SetReal(kMyKey, floatVal); + + //Convenient [] operator + dict[kMyRealValkey2] = ai::Entry(20.456); + AIReal realVal = ai::Entry(dict[kMyRealValkey2]); + + //Touch art + dict.TouchArt(); + + //Nested Dictionary + + //Set + ai::Dictionary child_dict; + child_dict.SetReal(kMyKey, realval); + + dict.SetDictionary(kMyChildDictKey, child_dict); + + //Get value from child dict + auto child_dict = dict.GetDictionary(kMyChildDictKey); + auto value = child_dict.GetReal(kMykey); + + Query + //find, it is more efficient than first calling IsKnown() and then Get() + auto found = dict.find(kMyRealValkey2); + if(found != dict.end()) + { + //entry exists, work with it + auto key = found.first; + AIReal realVal = found.second; + } + + //Check if a key exists + auto exist = dict.IsKnown(kMyKey); + + //Get the entry type + auto entryType = dict.GetEntryType(kMyKey); + + //Get IntegerValue + auto intVal = dict.GetInteger(kIntKey); + + //Get value via entry + auto intVal2 = dict.Get(kIntKey).IntegerVal(); + + //Iterate through range loop + for (auto entry : dict) + { + auto dictKeyString = dict.GetKeyString(entry.first); + auto entryType = entry.second.GetType(); + auto intVal = entry.second.IntegerVal(); + ai::int32 val = entry.second; + } + + Clone/Copy + Create a deep copy of self + auto duplicateDict = dict.clone(); + + Deep copy entries from other dict, erasing your own entries + dict.copy(otherDict); + + Delete/erase an Entry + dict.erase(kMyKey); + + Unit Test + ai::Dictionary::Test(); //will test Dictionary functionality + +*/ + class Dictionary; + class Array; + + class Entry + { + public: + using BinaryType = std::vector; + + explicit Entry(AIEntryRef entryRef); + Entry(bool boolVal); + Entry(ai::int32 intVal); + Entry(AIReal realVal); + Entry(const AIRealPoint& point); + Entry(const AIRealMatrix& matrix); + Entry(const std::string& strVal); + Entry(const ai::UnicodeString& value); + Entry(const BinaryType& value); + Entry(const Array& value); + Entry(const Dictionary& value); + Entry(const AIFillStyle& value); + Entry(const AIStrokeStyle& value); + + //Static Entry Creators as the types are not overloadable in c'tor + static Entry FromPattern(AIPatternHandle pattern); + static Entry FromBrushPattern(AIPatternHandle pattern); + static Entry FromGradient(AIGradientHandle gradient); + static Entry FromCustomColor(AICustomColorHandle customColor); + static Entry FromPluginObject(AIObjectHandle obj); + static Entry FromSymbolPattern(AIPatternHandle symbolPattern); + static Entry FromArtStyle(AIArtStyleHandle artStyle); + static Entry FromBinary(void* data, size_t size); + + Entry(const Entry& other); + ~Entry(); + + bool BoolVal() const; + operator bool() const + { + return BoolVal(); + } + + ai::int32 IntVal() const; + operator ai::int32() const + { + return IntVal(); + } + + AIReal RealVal() const; + operator AIReal() const + { + return RealVal(); + } + + AIRealMatrix MatrixVal() const; + operator AIRealMatrix() const + { + return MatrixVal(); + } + + AIRealPoint PointVal() const; + operator AIRealPoint () const + { + return PointVal(); + } + + BinaryType BinaryVal() const; + operator BinaryType() const + { + return BinaryVal(); + } + + std::string StringVal() const; + operator std::string() const + { + return StringVal(); + } + + ai::UnicodeString UnicodeStringVal() const; + operator ai::UnicodeString() const + { + return UnicodeStringVal(); + } + + AIArtHandle ArtHandleVal() const; + AIPatternHandle PatternVal() const; + AIPatternHandle BrushPatternVal() const; + AIGradientHandle GradientVal() const; + AICustomColorHandle CustomColorVal() const; + AIObjectHandle PluginObjectVal() const; + AIPatternHandle SymbolPatternVal() const; + std::unique_ptr FillStyleVal() const; + std::unique_ptr StrokeStyleVal() const; + AIArtStyleHandle ArtStyleVal() const; + void BinaryVal(void *value, size_t &size) const; + + Array ArrayVal() const; + operator Array() const; + + Dictionary DictionaryVal() const; + operator Dictionary () const; + + AIEntryType GetType() const; + AIEntryRef get() const; + + //Compare + bool operator == (const Entry& other) const; + + /** + Try to get the entry value as a string if possible, throw if it can't + */ + ai::UnicodeString GetAsUnicodeString() const; + + //swap + void swap(Entry& other) AINOEXCEPT; + + //Move constructor and assignment + Entry(Entry&& other) AINOEXCEPT; + Entry& operator = (Entry other) AINOEXCEPT; + + private: + class Impl; + std::unique_ptr pImpl; + Entry(std::unique_ptr&& impl); + }; + + + class Array + { + public: + //iterator + class iterator + { + public: + using value_type = Entry; + explicit iterator(ai::int32 index, const Array& arr) : + mIndex(index), + mArray(arr) + { + } + + iterator& operator++() + { + if (mIndex < mArray.size()) + { + ++mIndex; + } + return *this; + } + + iterator operator++(int) { iterator retval = *this; ++(*this); return retval; } + bool operator==(iterator other) const { return mIndex == other.mIndex; } + bool operator!=(iterator other) const { return !(*this == other); } + value_type operator*() const + { + return mArray.at(mIndex); + } + + private: + ai::int32 mIndex = -1; + const Array& mArray; + }; + + Array(); + explicit Array(AIArrayRef arrayRef); + + ~Array(); //required for unique_ptr + + //Copy and assignment + Array(const Array& other); + Array& operator = (Array other) AINOEXCEPT;//defines both move and non-move version + + //Clone self + Array clone() const; + + //Copy into self from other + void copy(const Array& other); + + //query + ai::int32 size() const AINOEXCEPT; + Entry at(ai::int32 index) const; + + //Helper class for operator[] + class ArrayEntryGetSet + { + public: + ArrayEntryGetSet(ai::int32 index, Array& arr) :mIndex(index), mArray(arr) {} + + void operator = (Entry entry) + { + //replace or insert + if (mArray.size() > mIndex) + mArray.set(mIndex, entry); + else + { + //Index out of range + throw ai::Error(kBadParameterErr); + } + } + + operator Entry() const + { + return mArray.at(mIndex); + } + + private: + ai::int32 mIndex; + Array& mArray; + }; + + ArrayEntryGetSet operator[](ai::int32 index) + { + return ArrayEntryGetSet(index, *this); + } + + //edit + void insert(ai::int32 index, const Entry& entry); + + //replace the entry at location + void set(ai::int32 index, const Entry& entry); + + //remove entry at location + void erase(ai::int32 index); + + //add an entry at the end + void push_back(const Entry& entry); + + //Reserves space upfront, + void reserve(ai::int32 size); + + //get ArrayRef, not recommended to use it directly + AIArrayRef get() const; + + //iterators + iterator begin() const; + iterator end() const; + + //swap + void swap(Array& other) AINOEXCEPT; + + //Move constructor and assignment + Array(Array&& other) AINOEXCEPT; + + //Unit Test + static void Test(); + private: + class Impl; + std::unique_ptr pImpl; + }; + + + class Dictionary + { + public: + //iterator + class iterator + { + public: + using value_type = std::pair; + + explicit iterator(ai::Ref dict_iter) + : mDictIterator(std::move(dict_iter)) + { + } + + iterator& operator++(); + iterator operator++(int) { iterator retval = *this; ++(*this); return retval; } + + bool operator==(iterator other) const; + bool operator!=(iterator other) const { return !(*this == other); } + + value_type operator*() const; + + void swap(iterator& other) AINOEXCEPT + { + mDictIterator.swap(other.mDictIterator); + } + + iterator(const iterator&) = default; + iterator(iterator&&) = default; + iterator& operator = (iterator other) + { + swap(other); + return *this; + } + + private: + ai::Ref mDictIterator; + }; + + using KeyType = AIDictKey; + + enum Type + { + kCreateEmpty, + kCurrentDocument, + kCurrentDocumentNonRecorded, + }; + + explicit Dictionary(Type type = Type::kCreateEmpty); //construct an Dictionary of specific type + + //Get ArtObject's dictionary + explicit Dictionary(AIArtHandle art); + + //Create a dictionary from AIDictionaryRef, + //increments ref count in c'tor, and decrements in d'tor + explicit Dictionary(AIDictionaryRef dictRef); + + //required for unique_ptr + ~Dictionary(); + + //Ref counted Copy and assignment + Dictionary(const Dictionary& other); + Dictionary& operator = (Dictionary other) AINOEXCEPT; + + //Deep Copy/Clone + Dictionary clone() const; + void copy(const Dictionary& other); + + //get/set Unicode + ai::UnicodeString GetUnicodeString(KeyType key) const; //throws error if not found + AIErr GetUnicodeString(KeyType key, ai::UnicodeString& value) const AINOEXCEPT; + void SetUnicodeString(KeyType key, const ai::UnicodeString& value); + + //get/set c string + std::string GetString(KeyType key) const; //throws error if not found + AIErr GetString(KeyType key, std::string& value) const AINOEXCEPT; + void SetString(KeyType key, const std::string& value); + + //get/set real + AIReal GetReal(KeyType key) const; + AIErr GetReal(KeyType key, AIReal& value) const AINOEXCEPT; + void SetReal(KeyType key, AIReal value); + + //get/set bool + AIBoolean GetBoolean(KeyType key) const; + AIErr GetBoolean(KeyType key, AIBoolean& value) const AINOEXCEPT; + void SetBoolean(KeyType key, AIBoolean value); + + //get set integer + ai::int32 GetInteger(KeyType key) const; + AIErr GetInteger(KeyType key, ai::int32& value) const AINOEXCEPT; + void SetInteger(KeyType key, ai::int32 value); + + //get/set pointer + ai::intptr GetPointer(KeyType key) const; + AIErr GetPointer(KeyType key, ai::intptr& value) const AINOEXCEPT; + void SetPointer(KeyType key, ai::intptr value); + + //get/set binary + using BinaryType = Entry::BinaryType; + BinaryType GetBinary(KeyType key) const; + AIErr GetBinary(KeyType key, BinaryType& value) const AINOEXCEPT; + void SetBinary(KeyType key, const BinaryType& value); + + //get/set Dictionary + Dictionary GetDictionary(KeyType key) const; + AIErr GetDictionary(KeyType key, Dictionary& value) const AINOEXCEPT; + void SetDictionary(KeyType key, const Dictionary& value); + + //get/set array + Array GetArray(KeyType key) const; + AIErr GetArray(KeyType key, Array& value) const AINOEXCEPT; + void SetArray(KeyType key, const Array& value); + + //get/set entry + Entry Get(KeyType key) const; + void Set(KeyType key, const Entry& entry); + + //Helper class for operator[] + class DictEntryGetSet + { + public: + DictEntryGetSet(KeyType key, Dictionary& dict):mKey(key), mDict(dict){} + void operator = (Entry entry) + { + mDict.Set(mKey, entry); + } + + operator Entry() const + { + return mDict.Get(mKey); + } + + private: + KeyType mKey; + Dictionary& mDict; + }; + + DictEntryGetSet operator[](KeyType key) + { + return DictEntryGetSet(key, *this); + } + + const char* GetKeyString(KeyType key) const; + + KeyType GetKey(const char* string) const; + + //Query + bool IsKnown(KeyType key) const; + AIEntryType GetEntryType(KeyType key) const; + + iterator find(KeyType key) const; + + //Deletes/erases an entry + void erase(KeyType key); + + //Mark art as changed + void TouchArt(); + + //get DictionaryRef, recommended not to use it + AIDictionaryRef get() const AINOEXCEPT; + + iterator begin() const; + iterator end() const; + + //swap + void swap(Dictionary& other) AINOEXCEPT; + + //Move constructor and assignment + Dictionary(Dictionary&& other) AINOEXCEPT; + + //Unit Test + static void Test(); + private: + class Impl; + std::unique_ptr pImpl; + }; + + // Utility functions + + // True if a dictionary is associated with the art object, false otherwise. + bool HasDictionary(AIArtHandle art) AINOEXCEPT; + + // True if a dictionary exists and is empty or if no dictionary exists. + // False if a dictionary associated with the art object contains any entries. + bool IsDictionaryEmpty(AIArtHandle art) AINOEXCEPT; +} diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDocumentUtils.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDocumentUtils.cpp new file mode 100644 index 0000000..2154d5a --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDocumentUtils.cpp @@ -0,0 +1,148 @@ +/************************************************************************* + * + * ADOBE CONFIDENTIAL + * + * Copyright 2019 Adobe + * + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. If you have received this file from a source other than Adobe, + * then your use, modification, or distribution of it requires the prior + * written permission of Adobe. + * + **************************************************************************/ + +#include "AIDocument.h" +#include "IAIDocumentUtils.hpp" +#include "AIAssert.hpp" +#include "AIRealMath.h" +#include "AILimits.h" +#include "AIHardSoft.h" + +#if AI_AUTO_SUITE_AVAILABLE +#include "AutoSuite.h" +use_suite_required(AIDocument) +use_suite_required(AIRealMath) +use_suite_required(AILimits) +use_suite_required(AIHardSoft) +use_suite_required(AITransformArt) +use_suite_required(AIArt) + +#elif defined(_IAIDOCUMENTUTILS_SUITE_INCLUDE_H_) +#include _IAIDOCUMENTUTILS_SUITE_INCLUDE_H_ +#else +extern "C" AIDocumentSuite* sAIDocument; +extern "C" AIRealMathSuite* sAIRealMath; +extern "C" AILimitsSuite* sAILimits; +extern "C" AIHardSoftSuite* sAIHardSoft; +extern "C" AITransformArtSuite* sAITransformArt; +#endif + + + +namespace ai +{ + namespace DocumentUtils + { + AIReal GetDocumentScale() + { + AIReal docScale {kAIRealOne}; + if(sAIDocument) + { + AIErr error = sAIDocument->GetDocumentScale(docScale); + AIMsgAssert(error==kNoErr, "Error in fetching document scale"); + ai::NOTUSED(error); + } + return docScale; + } + + AIRealMatrix GetTransformMatrixForScaleFactorFromReference(const AIReal& scaleFactor, const AIRealPoint& referencePoint) + { + AIRealMatrix matrix; + matrix.Init(); + sAIRealMath->AIRealMatrixConcatTranslate(&matrix, -referencePoint.h, -referencePoint.v); + sAIRealMath->AIRealMatrixConcatScale(&matrix, scaleFactor, scaleFactor); + sAIRealMath->AIRealMatrixConcatTranslate(&matrix, referencePoint.h, referencePoint.v); + return matrix; + } + + AIRealMatrix GetTransFormMatrixForScaleFactor(const AIReal& scaleFactor ) + { + + /* + In sAILimits->GetCanvasSize() / 2 + we have purposefully divided by int 2 and not 2.0 so that the result remains a int So as to get the exact pixel value + */ + AIReal canvasSizeHalved = static_cast(sAILimits->GetCanvasSize() / 2 ); + AIRealPoint canvasCenter{ canvasSizeHalved, canvasSizeHalved }; + sAIHardSoft->AIRealPointSoften(&canvasCenter, &canvasCenter); + return GetTransformMatrixForScaleFactorFromReference(scaleFactor, canvasCenter); + } + + AIRealMatrix GetTransformMatrixForDocumentScaleFromReference( const AIRealPoint& referencePoint) + { + auto scaleFactor = GetDocumentScale(); + return GetTransformMatrixForScaleFactorFromReference(scaleFactor, referencePoint); + } + + AIRealMatrix GetTransFormMatrixForDocumentScale() + { + return GetTransFormMatrixForScaleFactor(GetDocumentScale()); + } + + void ApplyDocumentScaleToAIReal(const AIReal& inReal, AIReal& outReal) + { + AIReal docScale = GetDocumentScale(); + outReal = inReal * docScale; + } + + void DropDocumentScaleFromAIReal(const AIReal& inReal, AIReal& outReal) + { + AIReal docScale = GetDocumentScale(); + outReal = inReal / docScale; + } + + AIRealMatrix ArtScaler::GetScaledXformMatrix(AIArtHandle art, AIReal scale) + { + AIRealRect bounds{ 0.0, 0.0, 0.0, 0.0 }; + sAIArt->GetArtBounds(art, &bounds); + AIRealPoint centre; + + centre.h = (bounds.right + bounds.left)/2; + centre.v = (bounds.top + bounds.bottom)/2; + return GetTransformMatrixForScaleFactorFromReference(scale, centre); + } + + AIErr ArtScaler::ScaleArt(AIArtHandle art) + { + if (mScaleFactor == kAIRealOne) + return kNoErr; + + if (art) + { + AIRealMatrix artTransform = GetScaledXformMatrix(art, mScaleFactor); + + return sAITransformArt->TransformArt(art, &artTransform, mScaleFactor, mTransformOptions); + } + return kBadParameterErr; + } + + AIErr ArtScaler::DownScaleArt(AIArtHandle art) + { + if (mScaleFactor == kAIRealOne) + return kNoErr; + + if (art) + { + auto scale = kAIRealOne / mScaleFactor; + + AIRealMatrix artTransform = GetScaledXformMatrix(art, scale); + return sAITransformArt->TransformArt(art, &artTransform, scale, mTransformOptions); + } + return kBadParameterErr; + } + + } // DocumentUtils +} // namespace ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDocumentUtils.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDocumentUtils.hpp new file mode 100644 index 0000000..590c3fe --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIDocumentUtils.hpp @@ -0,0 +1,163 @@ +/************************************************************************* + * + * ADOBE CONFIDENTIAL + * + * Copyright 2019 Adobe + * + * All Rights Reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file in + * accordance with the terms of the Adobe license agreement accompanying + * it. If you have received this file from a source other than Adobe, + * then your use, modification, or distribution of it requires the prior + * written permission of Adobe. + * + **************************************************************************/ + +/* Utility functions for operations on AIDocumentSuite. +*/ +#pragma once +#include "AIBasicTypes.h" +#include "AITypes.h" +#include "AIRealMath.h" +#include "AITransformArt.h" + +namespace ai +{ + namespace DocumentUtils + { + /** For each document with document scale factor X, each object's dimension have to multiplied by X to get the + correct dimensions of the object in UI + For example, if document scale factor is X, then a 10x10 rectangle will actually will be displayed as + (10*X)x(10*X) rectangle in UI + Geting the scale associated with the current document + @param docScale [out] A buffer in which to return the scale factor corresponding to the current document. + it is a wrapper over AIDocumentSuite::GetDocumentScale() and asserts if no document is present. + */ + AIReal GetDocumentScale(); + + /** Getting the transform matrix for converting the user defind artworks to tranform to documents with scale factor greater than 1 + @param [out] returns tranformation matrix for scale factor of the current document about the Canvas center point + */ + AIRealMatrix GetTransFormMatrixForDocumentScale(); + + /** Getting the transform matrix for converting the user defind artworks to tranform to documents with scale factor greater than 1 from a given reference point + @param [in] reference point from which transformation is required + @param [out] returns tranformation matrix for scale factor of the current document about the given reference point + */ + + AIRealMatrix GetTransformMatrixForDocumentScaleFromReference( const AIRealPoint& referencePoint); + + /** Getting the transform matrix for converting the user defind artworks to tranform to documents with specified scale factor + @param [out] returns tranformation matrix for scale factor of the current document about the Canvas center point + */ + AIRealMatrix GetTransFormMatrixForScaleFactor(const AIReal& scaleFactor ); + + /** Getting the transform matrix for converting the user defind artworks to tranform to documents with specified scale factor from a given reference point + @param [in] reference point from which transformation is required + @param [out] returns tranformation matrix for scale factor of the current document about the given reference point + */ + + AIRealMatrix GetTransformMatrixForScaleFactorFromReference(const AIReal& scaleFactor, const AIRealPoint& referencePoint); + + /** Multiply the coordinates of the AIRealRect with given scale value. + @param inRect Rectangle with coordinates in unscaled coordinate system. + @param outRect [out] A buffer in which to return the corresponding coordinates in scaled coordinate system + @param scale Input scale value that will be applied to coordinates of Rect + */ + template + void ApplyScaleToRect(const Rect& inRect, Rect& outRect, const AIReal scale) + { + outRect.left = inRect.left * static_cast(scale); + outRect.top = inRect.top * static_cast(scale); + outRect.right = inRect.right * static_cast(scale); + outRect.bottom = inRect.bottom * static_cast(scale); + } + + /**Converting the coordinates of the AIRealRect to scaled coordinate System + @param inRect Rectangle with coordinates in unscaled coordinate system. + @param outRect [out] A buffer in which to return the corresponding coordinates in scaled coordinate system + */ + + template + void ApplyDocumentScaleToRect( const Rect& inRect, Rect& outRect) + { + AIReal docScale = GetDocumentScale(); + ApplyScaleToRect(inRect, outRect, docScale); + } + + /**Converting the coordinates of the AIPoint to scaled coordinate System + @param inPoint point with coordinates in unscaled corrdinate system. + @param outPoint [out] A buffer in which to return the cooresponding coordinates in scaled coordinate system + */ + template + void ApplyDocumentScaleToPoint(const Point& inPoint, Point& outPoint) + { + AIReal docScale = GetDocumentScale(); + outPoint.h = inPoint.h * static_cast(docScale); + outPoint.v = inPoint.v * static_cast(docScale); + + } + + /**Converting the value of AIReal to scaled coordinate System + @param inReal AIReal in unscaled corrdinate system. + @param outReal [out] A buffer in which to return the cooresponding value in scaled coordinate system + */ + void ApplyDocumentScaleToAIReal( const AIReal& inReal, AIReal& outReal); + + /**Converting the coordinates of the scaled Rect to unscaled coordinate System + @param inRect Rectangle with coordinates in scaled corrdinate system. + @param outRect [out] A buffer in which to return the cooresponding coordinates in unscaled coordinate system + */ + template + void DropDocumentScaleFromRect( const Rect& inRect, Rect& outRect) + { + AIReal docScale = GetDocumentScale(); + outRect.left = inRect.left / static_cast(docScale); + outRect.top = inRect.top / static_cast(docScale); + outRect.right = inRect.right / static_cast(docScale); + outRect.bottom = inRect.bottom / static_cast(docScale); + } + + /**Converting the coordinates of the AIPoint to scaled coordinate System + @param inPoint point with coordinates in scaled corrdinate system. + @param outPoint [out] A buffer in which to return the cooresponding coordinates in unscaled coordinate system + */ + template + void DropDocumentScaleFromPoint(const Point& inPoint, Point& outPoint) + { + AIReal docScale = GetDocumentScale(); + outPoint.h = inPoint.h / static_cast(docScale); + outPoint.v = inPoint.v / static_cast(docScale); + } + + /**Converting the value of AIReal to scaled coordinate System + @param inReal AIReal in scaled corrdinate system. + @param outReal [out] A buffer in which to return the cooresponding value in unscaled coordinate system + */ + void DropDocumentScaleFromAIReal( const AIReal& inReal, AIReal& outReal); + + class ArtScaler + { + public: + ArtScaler(AIReal scale, ai::int32 transformOptions) + : mScaleFactor{ scale }, + mTransformOptions{ transformOptions } + {} + + AIErr ScaleArt(AIArtHandle art); + + AIErr DownScaleArt(AIArtHandle art); + + bool IsScaleFactorOne() + { + return mScaleFactor == kAIRealOne; + } + + private: + AIReal mScaleFactor{ kAIRealOne }; + ai::int32 mTransformOptions{ 0 }; + AIRealMatrix GetScaledXformMatrix(AIArtHandle art, AIReal scale); + }; + } // Document Utils +} // ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIFilePath.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIFilePath.cpp index 22389b3..cc79660 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIFilePath.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIFilePath.cpp @@ -1,442 +1,423 @@ -/* - * Name: AIFilePath.cpp - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "AIFilePath.h" - -using ai::FilePath; -using ai::UnicodeString; - -#ifdef _IAIFilePathSuite_INCLUDE_H_ - #include _IAIFilePathSuite_INCLUDE_H_ -#else - extern "C" AIFilePathSuite *sAIFilePath; -#endif - -/* Throw result as an ai::Error */ -static void check_result(AIErr result) -{ - if ( result != kNoErr ) - { - throw ai::Error(result); - } -} - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::ResetVolumeCache() AINOTHROW -{ - sAIFilePath->ResetVolumeCache(); -} - -//////////////////////////////////////////////////////////////////////////////// -// Constructors/destructors -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -FilePath::FilePath(): - impl(0) -{ -} - -//////////////////////////////////////////////////////////////////////////////// -FilePath::FilePath(const FilePath &src): - impl(0) -{ - AIErr result = sAIFilePath->Copy(src, *this); - check_result(result); -} - -//////////////////////////////////////////////////////////////////////////////// -FilePath::FilePath(const ai::UnicodeString &in, bool expandName): - impl(0) -{ - AIErr result = sAIFilePath->Set(in, expandName, *this); - check_result(result); -} -//////////////////////////////////////////////////////////////////////////////// -FilePath::FilePath(const SPPlatformFileReference &ref): - impl(0) -{ - sAIFilePath->SetFromSPFileRef(ref, *this); -} -//////////////////////////////////////////////////////////////////////////////// -#ifdef MAC_ENV -FilePath::FilePath(const CFStringRef string): - impl(0) -{ - sAIFilePath->SetFromCFString(string, *this); -} - -//////////////////////////////////////////////////////////////////////////////// -#if DEPRICATED_IN_10_8 -FilePath::FilePath(const FSRef &ref): - impl(0) -{ - OSStatus result = sAIFilePath->SetFromFSRef(ref, *this); - check_result(result); -} -#endif // DEPRICATED_IN_10_8 - -//////////////////////////////////////////////////////////////////////////////// -FilePath::FilePath(const CFURLRef url): - impl(0) -{ - sAIFilePath->SetFromCFURL(url, *this); -} - -#endif // MAC_ENV - -//////////////////////////////////////////////////////////////////////////////// -FilePath::~FilePath() -{ - if(impl) - (void)sAIFilePath->DeleteFilePath(*this); -} - -//////////////////////////////////////////////////////////////////////////////// -FilePath &FilePath::operator=(const FilePath &in) -{ - AIErr result = sAIFilePath->Copy(in, *this); - check_result(result); - return *this; -} - -//////////////////////////////////////////////////////////////////////////////// -// Other members -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -// The Copy function is not explicitly implemented here-- use the copy constructor - -//////////////////////////////////////////////////////////////////////////////// -bool FilePath::IsEmpty() const -{ - return sAIFilePath->IsEmpty(*this) != false; -} - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::MakeEmpty() -{ - sAIFilePath->MakeEmpty(*this); -} - -//////////////////////////////////////////////////////////////////////////////// -bool FilePath::Equal(const FilePath &other, const bool resolveLinks) const -{ - return sAIFilePath->Equal(*this, other, resolveLinks) != false; -} - -//////////////////////////////////////////////////////////////////////////////// -bool FilePath::operator==(const FilePath &path) const -{ - return sAIFilePath->Equal(*this, path, false) != false; -} - -//////////////////////////////////////////////////////////////////////////////// -bool FilePath::operator!=(const FilePath &path) const -{ - return !sAIFilePath->Equal(*this, path, false); -} - -//////////////////////////////////////////////////////////////////////////////// -bool FilePath::operator<(const FilePath &path) const -{ - return sAIFilePath->LessThan(*this, path) != false; -} - -//////////////////////////////////////////////////////////////////////////////// -bool FilePath::StartsWithDelimiter() const -{ - return sAIFilePath->StartsWithDelimiter(*this) != false; -} - -//////////////////////////////////////////////////////////////////////////////// -bool FilePath::EndsWithDelimiter() const -{ - return sAIFilePath->EndsWithDelimiter(*this) != false; -} - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::AddComponent(const ai::UnicodeString &addend) -{ - AIErr result = sAIFilePath->AddComponent(addend, *this); - check_result(result); -} - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::RemoveComponent() -{ - sAIFilePath->RemoveComponent(*this); -} - - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::AddExtension(const ai::UnicodeString &ext) -{ - sAIFilePath->AddExtension(ext, *this); -} - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::RemoveExtension() -{ - sAIFilePath->RemoveExtension(*this); -} - -//////////////////////////////////////////////////////////////////////////////// -bool FilePath::Exists( - const bool resolveLinks, - ai::UnicodeString *longPath, - bool *isFile) const -{ - AIBool8 isFileRet; - bool ret = sAIFilePath->Exists(*this, resolveLinks, longPath, &isFileRet) != false; - if (isFile) *isFile = (isFileRet != false); - return ret; -} - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::Resolve() -{ - AIErr result = sAIFilePath->Resolve(*this); - check_result(result); -} - -//////////////////////////////////////////////////////////////////////////////// -// Set methods -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::Set(const ai::UnicodeString &string, bool expandName) -{ - AIErr result = sAIFilePath->Set(string, expandName, *this); - check_result(result); -} - -//////////////////////////////////////////////////////////////////////////////// - -void FilePath::SetFromSPFileRef(const SPPlatformFileReference &spec) -{ - sAIFilePath->SetFromSPFileRef(spec, *this); -} - -#ifdef MAC_ENV - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::SetFromCFString(const CFStringRef string) -{ - sAIFilePath->SetFromCFString(string, *this); -} - -//////////////////////////////////////////////////////////////////////////////// -#if DEPRICATED_IN_10_8 -OSStatus FilePath::SetFromFSRef(const FSRef &ref) -{ - OSStatus result = sAIFilePath->SetFromFSRef(ref, *this); - return result; -} -#endif //DEPRICATED_IN_10_8 - -//////////////////////////////////////////////////////////////////////////////// -void FilePath::SetFromCFURL(const CFURLRef url) -{ - sAIFilePath->SetFromCFURL(url, *this); -} -#endif // MAC_ENV - -//////////////////////////////////////////////////////////////////////////////// -// Get methods -//////////////////////////////////////////////////////////////////////////////// - -//////////////////////////////////////////////////////////////////////////////// -ai::UnicodeString FilePath::GetFileName(const bool displayName) const -{ - ai::UnicodeString fileName; - AIErr result = sAIFilePath->GetFileName(*this, displayName, fileName); - - check_result(result); - return fileName; -} - -//////////////////////////////////////////////////////////////////////////////// -ai::UnicodeString FilePath::GetFileNameNoExt() const -{ - ai::UnicodeString fileName; - AIErr result = sAIFilePath->GetFileNameNoExt(*this, fileName); - - check_result(result); - return fileName; -} - -//////////////////////////////////////////////////////////////////////////////// -ai::UnicodeString FilePath::GetFileExtension() const -{ - ai::UnicodeString fileExt; - AIErr result = sAIFilePath->GetFileExtension(*this, fileExt); - - check_result(result); - return fileExt; -} - -//////////////////////////////////////////////////////////////////////////////// -ai::UnicodeString FilePath::GetFullPath(const bool displayName) const -{ - ai::UnicodeString fullPath; - AIErr result = sAIFilePath->GetFullPath(*this, displayName, fullPath); - - check_result(result); - return fullPath; -} - -//////////////////////////////////////////////////////////////////////////////// -ai::UnicodeString FilePath::GetDirectory(const bool displayName) const -{ - ai::UnicodeString dir; - AIErr result = sAIFilePath->GetDirectory(*this, displayName, dir); - - check_result(result); - return dir; -} - -//////////////////////////////////////////////////////////////////////////////// -#ifdef MAC_ENV -#if DEPRICATED_IN_10_8 -void FilePath::GetVolumeAndParent(FSVolumeRefNum *vol, UInt32 *parent) const -{ - sAIFilePath->GetVolumeAndParent(*this, vol, (ai::uint32*)parent); -} -#endif // DEPRICATED_IN_10_8 -#endif //MAC_ENV - -//////////////////////////////////////////////////////////////////////////////// -const char FilePath::GetDelimiter() -{ - return sAIFilePath->GetDelimiter(); -} - -//////////////////////////////////////////////////////////////////////////////// -ai::UnicodeString FilePath::GetShortPath() const -{ - ai::UnicodeString path; - AIErr result = sAIFilePath->GetShortPath(*this, path); - - check_result(result); - return path; -} - -//////////////////////////////////////////////////////////////////////////////// -AIErr FilePath::GetCreatorAndType(ai::uint32 *creator, ai::uint32 *type) const -{ - AIErr result = sAIFilePath->GetCreatorAndType(*this, creator, type); - return result; -} - -//////////////////////////////////////////////////////////////////////////////// -ai::UnicodeString FilePath::GetAsURL(const bool displayName) const -{ - ai::UnicodeString url; - AIErr result = sAIFilePath->GetAsURL(*this, displayName, url); - - check_result(result); - return url; -} - -//////////////////////////////////////////////////////////////////////////////// -FilePath FilePath::GetParent() const -{ - FilePath parent; - AIErr result = sAIFilePath->GetParent(*this, parent); - - check_result(result); - return parent; -} - -//////////////////////////////////////////////////////////////////////////////// - -void FilePath::GetAsSPPlatformFileRef(SPPlatformFileReference &ref) const -{ - AIErr result = sAIFilePath->GetAsSPPlatformFileRef(*this, ref); - check_result(result); -} - -#ifdef MAC_ENV -//////////////////////////////////////////////////////////////////////////////// -CFStringRef FilePath::GetAsCFString() const -{ - CFStringRef string = sAIFilePath->GetAsCFString(*this); - return string; -} - -//////////////////////////////////////////////////////////////////////////////// -#if DEPRICATED_IN_10_8 -OSStatus FilePath::GetAsFSRef(FSRef &ref) const -{ - OSStatus result = sAIFilePath->GetAsFSRef(*this, ref); - return result; -} -#endif //DEPRICATED_IN_10_8 - -//////////////////////////////////////////////////////////////////////////////// -CFURLRef FilePath::GetAsCFURL() const -{ - return sAIFilePath->GetAsCFURL(*this); -} - -#ifdef __OBJC__ -NSString* FilePath::GetAsNSString() const -{ - return sAIFilePath->GetAsNSString( *this ); -} - -NSURL* FilePath::GetAsNSURL() const -{ - return sAIFilePath->GetAsNSURL( *this ); -} - -NSData* FilePath::GetAsBookmarkData( const FilePath& inRelativeToPath, NSError** outError ) const -{ - return sAIFilePath->GetAsBookmarkData( *this, inRelativeToPath, outError ); -} - -NSData* FilePath::GetAsMinimalBookmarkData( const FilePath& inRelativeToPath, NSError** outError ) const -{ - return sAIFilePath->GetAsMinimalBookmarkData( *this, inRelativeToPath, outError ); -} - -void FilePath::GetVolumeAndParent( NSURL **outVolume, NSURL **outParent ) const -{ - sAIFilePath->GetVolumeAndParentFromFilePath(*this, outVolume, outParent ); -} - -BOOL FilePath::SetFromBookmarkData( NSData* inBookmarkData, const FilePath& inRelativeToPath /*= FilePath()*/, NSError** outError /*= NULL*/ ) -{ - return sAIFilePath->SetFromBookmarkData( *this, inBookmarkData, inRelativeToPath, outError ); -} - -BOOL FilePath::IsAlias ()const -{ - return sAIFilePath->IsAlias(*this); -} - -BOOL FilePath::IsOnNetwork ()const -{ - return sAIFilePath->IsOnNetwork(*this); -} -BOOL FilePath::IsEjectable ()const -{ - return sAIFilePath->IsEjectable(*this); -} -#endif //__OBJC__ - -#endif // MAC_ENV +/* + * Name: AIFilePath.cpp + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2005-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "AIFilePath.h" + +using ai::FilePath; +using ai::UnicodeString; + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIFilePath) +#elif defined(_IAIFilePathSuite_INCLUDE_H_) + #include _IAIFilePathSuite_INCLUDE_H_ +#else + extern "C" AIFilePathSuite *sAIFilePath; +#endif + +/* Throw result as an ai::Error */ +static void check_result(AIErr result) +{ + if ( result != kNoErr ) + { + throw ai::Error(result); + } +} + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::ResetVolumeCache() AINOTHROW +{ + sAIFilePath->ResetVolumeCache(); +} + +//////////////////////////////////////////////////////////////////////////////// +// Constructors/destructors +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +FilePath::FilePath(): + impl(0) +{ +} + +//////////////////////////////////////////////////////////////////////////////// +FilePath::FilePath(const FilePath &src): + impl(0) +{ + AIErr result = sAIFilePath->Copy(src, *this); + check_result(result); +} + +//////////////////////////////////////////////////////////////////////////////// +FilePath::FilePath(const ai::UnicodeString &in, bool expandName, bool dontStripTrailingSpace): + impl(0) +{ + AIErr result = sAIFilePath->Set(in, expandName, dontStripTrailingSpace, *this); + check_result(result); +} +//////////////////////////////////////////////////////////////////////////////// +FilePath::FilePath(const SPPlatformFileReference &ref): + impl(0) +{ + sAIFilePath->SetFromSPFileRef(ref, *this); +} +//////////////////////////////////////////////////////////////////////////////// +#ifdef MAC_ENV +FilePath::FilePath(const CFStringRef string): + impl(0) +{ + sAIFilePath->SetFromCFString(string, *this); +} + + +//////////////////////////////////////////////////////////////////////////////// +FilePath::FilePath(const CFURLRef url): + impl(0) +{ + sAIFilePath->SetFromCFURL(url, *this); +} + +#endif // MAC_ENV + +//////////////////////////////////////////////////////////////////////////////// +FilePath::~FilePath() +{ + try + { + if (impl) + { + (void)sAIFilePath->DeleteFilePath(*this); + } + } + catch (...) + { + } +} + +//////////////////////////////////////////////////////////////////////////////// +FilePath &FilePath::operator=(const FilePath &in) +{ + //if null is being assigned to null + if(in.impl == nullptr && impl == nullptr) + return *this; + + AIErr result = sAIFilePath->Copy(in, *this); + check_result(result); + return *this; +} + +//////////////////////////////////////////////////////////////////////////////// +// Other members +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +// The Copy function is not explicitly implemented here-- use the copy constructor + +//////////////////////////////////////////////////////////////////////////////// +bool FilePath::IsEmpty() const +{ + return sAIFilePath->IsEmpty(*this) != false; +} + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::MakeEmpty() +{ + sAIFilePath->MakeEmpty(*this); +} + +//////////////////////////////////////////////////////////////////////////////// +bool FilePath::Equal(const FilePath &other, const bool resolveLinks) const +{ + return sAIFilePath->Equal(*this, other, resolveLinks) != false; +} + +//////////////////////////////////////////////////////////////////////////////// +bool FilePath::operator==(const FilePath &path) const +{ + return sAIFilePath->Equal(*this, path, false) != false; +} + +//////////////////////////////////////////////////////////////////////////////// +bool FilePath::operator!=(const FilePath &path) const +{ + return !sAIFilePath->Equal(*this, path, false); +} + +//////////////////////////////////////////////////////////////////////////////// +bool FilePath::operator<(const FilePath &path) const +{ + return sAIFilePath->LessThan(*this, path) != false; +} + +//////////////////////////////////////////////////////////////////////////////// +bool FilePath::StartsWithDelimiter() const +{ + return sAIFilePath->StartsWithDelimiter(*this) != false; +} + +//////////////////////////////////////////////////////////////////////////////// +bool FilePath::EndsWithDelimiter() const +{ + return sAIFilePath->EndsWithDelimiter(*this) != false; +} + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::AddComponent(const ai::UnicodeString &addend) +{ + AIErr result = sAIFilePath->AddComponent(addend, *this); + check_result(result); +} + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::RemoveComponent() +{ + sAIFilePath->RemoveComponent(*this); +} + + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::AddExtension(const ai::UnicodeString &ext) +{ + sAIFilePath->AddExtension(ext, *this); +} + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::RemoveExtension() +{ + sAIFilePath->RemoveExtension(*this); +} + +//////////////////////////////////////////////////////////////////////////////// +bool FilePath::Exists( + const bool resolveLinks, + ai::UnicodeString *longPath, + bool *isFile) const +{ + AIBool8 isFileRet; + bool ret = sAIFilePath->Exists(*this, resolveLinks, longPath, &isFileRet) != false; + if (isFile) *isFile = (isFileRet != false); + return ret; +} + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::Resolve() +{ + AIErr result = sAIFilePath->Resolve(*this); + check_result(result); +} + +//////////////////////////////////////////////////////////////////////////////// +// Set methods +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::Set(const ai::UnicodeString &string, bool expandName, bool dontStripTrailingSpace) +{ + AIErr result = sAIFilePath->Set(string, expandName, dontStripTrailingSpace, *this); + check_result(result); +} + +//////////////////////////////////////////////////////////////////////////////// + +void FilePath::SetFromSPFileRef(const SPPlatformFileReference &spec) +{ + sAIFilePath->SetFromSPFileRef(spec, *this); +} + +#ifdef MAC_ENV + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::SetFromCFString(const CFStringRef string) +{ + sAIFilePath->SetFromCFString(string, *this); +} + + +//////////////////////////////////////////////////////////////////////////////// +void FilePath::SetFromCFURL(const CFURLRef url) +{ + sAIFilePath->SetFromCFURL(url, *this); +} +#endif // MAC_ENV + +//////////////////////////////////////////////////////////////////////////////// +// Get methods +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +ai::UnicodeString FilePath::GetFileName(const bool displayName) const +{ + ai::UnicodeString fileName; + AIErr result = sAIFilePath->GetFileName(*this, displayName, fileName); + + check_result(result); + return fileName; +} + +//////////////////////////////////////////////////////////////////////////////// +ai::UnicodeString FilePath::GetFileNameNoExt() const +{ + ai::UnicodeString fileName; + AIErr result = sAIFilePath->GetFileNameNoExt(*this, fileName); + + check_result(result); + return fileName; +} + +//////////////////////////////////////////////////////////////////////////////// +ai::UnicodeString FilePath::GetFileExtension() const +{ + ai::UnicodeString fileExt; + AIErr result = sAIFilePath->GetFileExtension(*this, fileExt); + + check_result(result); + return fileExt; +} + +//////////////////////////////////////////////////////////////////////////////// +ai::UnicodeString FilePath::GetFullPath(const bool displayName) const +{ + ai::UnicodeString fullPath; + AIErr result = sAIFilePath->GetFullPath(*this, displayName, fullPath); + + check_result(result); + return fullPath; +} + +//////////////////////////////////////////////////////////////////////////////// +ai::UnicodeString FilePath::GetDirectory(const bool displayName) const +{ + ai::UnicodeString dir; + AIErr result = sAIFilePath->GetDirectory(*this, displayName, dir); + + check_result(result); + return dir; +} + + +//////////////////////////////////////////////////////////////////////////////// +char FilePath::GetDelimiter() +{ + return sAIFilePath->GetDelimiter(); +} + +//////////////////////////////////////////////////////////////////////////////// +ai::UnicodeString FilePath::GetShortPath() const +{ + ai::UnicodeString path; + AIErr result = sAIFilePath->GetShortPath(*this, path); + + check_result(result); + return path; +} + +//////////////////////////////////////////////////////////////////////////////// +AIErr FilePath::GetCreatorAndType(ai::uint32 *creator, ai::uint32 *type) const +{ + AIErr result = sAIFilePath->GetCreatorAndType(*this, creator, type); + return result; +} + +//////////////////////////////////////////////////////////////////////////////// +ai::UnicodeString FilePath::GetAsURL(const bool displayName) const +{ + ai::UnicodeString url; + AIErr result = sAIFilePath->GetAsURL(*this, displayName, url); + + check_result(result); + return url; +} + +//////////////////////////////////////////////////////////////////////////////// +FilePath FilePath::GetParent() const +{ + FilePath parent; + AIErr result = sAIFilePath->GetParent(*this, parent); + + check_result(result); + return parent; +} + +//////////////////////////////////////////////////////////////////////////////// + +void FilePath::GetAsSPPlatformFileRef(SPPlatformFileReference &ref) const +{ + AIErr result = sAIFilePath->GetAsSPPlatformFileRef(*this, ref); + check_result(result); +} + +#ifdef MAC_ENV +//////////////////////////////////////////////////////////////////////////////// +CFStringRef FilePath::GetAsCFString() const +{ + CFStringRef string = sAIFilePath->GetAsCFString(*this); + return string; +} + + +//////////////////////////////////////////////////////////////////////////////// +CFURLRef FilePath::GetAsCFURL() const +{ + return sAIFilePath->GetAsCFURL(*this); +} + +#ifdef __OBJC__ +NSString* FilePath::GetAsNSString() const +{ + return sAIFilePath->GetAsNSString( *this ); +} + +NSURL* FilePath::GetAsNSURL() const +{ + return sAIFilePath->GetAsNSURL( *this ); +} + +NSData* FilePath::GetAsBookmarkData( const FilePath& inRelativeToPath, NSError** outError ) const +{ + return sAIFilePath->GetAsBookmarkData( *this, inRelativeToPath, outError ); +} + +NSData* FilePath::GetAsMinimalBookmarkData( const FilePath& inRelativeToPath, NSError** outError ) const +{ + return sAIFilePath->GetAsMinimalBookmarkData( *this, inRelativeToPath, outError ); +} + +void FilePath::GetVolumeAndParent( NSURL **outVolume, NSURL **outParent ) const +{ + sAIFilePath->GetVolumeAndParentFromFilePath(*this, outVolume, outParent ); +} + +BOOL FilePath::SetFromBookmarkData( NSData* inBookmarkData, const FilePath& inRelativeToPath /*= FilePath()*/, NSError** outError /*= NULL*/ ) +{ + return sAIFilePath->SetFromBookmarkData( *this, inBookmarkData, inRelativeToPath, outError ); +} + +BOOL FilePath::IsAlias ()const +{ + return sAIFilePath->IsAlias(*this); +} + +AIBoolean FilePath::IsOnNetwork ()const +{ + return static_cast(sAIFilePath->IsOnNetwork(*this)); +} +BOOL FilePath::IsEjectable ()const +{ + return sAIFilePath->IsEjectable(*this); +} +#endif //__OBJC__ + +#endif // MAC_ENV diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIFilePath.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIFilePath.hpp index 0464f26..11660c1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIFilePath.hpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIFilePath.hpp @@ -1,473 +1,488 @@ -/* - * Name: IAIFilePath.hpp - * Purpose: C++ access class for File Path suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __IAIFilePath__ -#define __IAIFilePath__ - -#include "IAIUnicodeString.h" - -/*HACK for int32_t and uint32_t redefinition error in VS2012: In case of VS2012 compiler, "memory" file includes stdint.h which, - for some reason, points to dvacore/sys/win/stdint.h. As a result, datatypes defined in stdint.h throw redefinition errors. */ -#if defined(_MSC_VER) && _MSC_VER >= 1700 -#define _ADOBE_STDINT_H_ -#endif - -#include - -#if defined(_MSC_VER) && _MSC_VER >= 1700 -#undef _ADOBE_STDINT_H_ -#endif - - -#ifdef MAC_ENV - #ifdef __OBJC__ - #import - #import - #endif - #ifndef __COREFOUNDATION_CFURL__ - #include - #endif - #if defined(IOS_ENV) - typedef short FSVolumeRefNum; - #else - #ifndef __FILES__ - #include - #endif - #endif // !defined(IOS_ENV) -#else - -typedef signed long OSStatus; -#endif - -struct FSSpec; -struct MiFile; - -namespace ai { - -#ifdef WIN_ENV -const ai::uint32 MaxPath = 259; -#endif -#ifdef MAC_ENV -const ai::uint32 MaxPath = 1023; -#endif -const ai::uint32 MaxFile = 255; - -class FilePath -{ - public: - - /* Some file system operations can be very slow. For example, on Windows, - UNC path names are used to access files on remote volumes. Determining - the availability of those remote volumes can require significant time - especially in the presence of the Windows client for NFS. For this - reason volume availability information is cached. */ - - /** Resets cached information about volumes, used to increase - the efficiency of filesystem operations. - @return Nothing. - */ - static void ResetVolumeCache() AINOTHROW; - - /** Default constructor. Creates an empty file-path object. */ - FilePath() AINOTHROW; - /** Copies a file-path object. */ - FilePath(const FilePath&); - - /** Creates an initialized file-path object from a Unicode string - containing a path native to Windows, Unix, or Mac OS, or a URL. - @param path The new path. - @param expandName When true, the function attempts to expand the - provided path string into a full name (for example, for a short, - truncated name in Windows). - @return The new object. - */ - explicit FilePath(const ai::UnicodeString &path, bool expandName = true); - - /** Creates as intialized file-path object from a file reference. - - */ - - - - /** Internal. Creates an initialized file-path object from - a \c MiFile (Illustrator core only). */ - explicit FilePath(const MiFile&); - - - - explicit FilePath(const SPPlatformFileReference&); - - #ifdef MAC_ENV - /** Creates an initialized file-path object from a \c CFString - file specification in Mac OS. - @return The new object. - */ - explicit FilePath(const CFStringRef); - - /** Creates an initialized file-path object from a \c FSRef - file specification in Mac OS. - @return The new object. - */ -#if DEPRICATED_IN_10_8 - explicit FilePath(const FSRef&); -#endif - - /** Creates an initialized file-path object from a \c CFURLRef - URL specification in Mac OS. - @return The new object. - */ - explicit FilePath(const CFURLRef); - - #ifdef __OBJC__ - /** Creates an initialized faile-path object from a \c BookmarkData - @return The new object. - */ - explicit FilePath( NSData* inBookmarkData, const FilePath& inRelativeToPath = FilePath() ); - #endif //__OBJC__ - - #endif // MAC_ENV - - /** Destructor */ - ~FilePath(); - - /** Assignment operator. Same as \c #AIFilePathSuite::Copy(). */ - FilePath &operator=(const FilePath&); - - /** Reports whether a file-path object is empty. - @return True if the object is empty. - */ - bool IsEmpty() const; - - /** Sets the referenced path of this object to a \c NULL path. - @return Nothing. - */ - void MakeEmpty(); - - /** Compares this file path to another for equality. - @param filePath The path object to compare to this one - @param resolveLinks Optional. True to resolve links, aliases, and/or shortcuts - if the paths are not identical. Default is false. - @return True if the paths are identical, whether or not the file exists, - or if links are resolved and the two paths refer to the same file. -
False if the paths are not identical and \c resolveLinks is false. - */ - bool Equal(const FilePath& filePath, const bool resolveLinks = false) const; - /** Equality operator */ - bool operator==(const FilePath&) const; - /** Inequality operator */ - bool operator!=(const FilePath&) const; - - /** Less-than operator, compares file path strings. */ - bool operator<(const FilePath&) const; - - /** Reports whether this path starts with a delimiter, and - is therefore an absolute, not relative, path. - @return True if the path starts with a delimiter - */ - bool StartsWithDelimiter() const; - - /** Reports whether this path ends with a delimiter, and - therefore references a folder or directory, rather than a file. - @return True if the path ends with a delimiter - */ - bool EndsWithDelimiter() const; - - /** Adds a component to this path. Adds or ignores appropriate delimiters - as needed. Does not add delimiters to the end of a path unless explicitly - requested by sending an empty addend. - @param addend [in/out] A Unicode string containing the component to - add, in which to return the lengthened path string. - @return Nothing. - */ - void AddComponent(const ai::UnicodeString &addend = ai::UnicodeString()); - /** Adds a component to this path. Adds or ignores appropriate delimiters - as needed. Does not add delimiters to the end of a path unless explicitly - requested by sending an empty addend. - @param addend A file-path object containing the component to - add to the path of this object. - @return Nothing. - */ - void AddComponent(const FilePath &addend); - - /** Removes the end component from this path. - @return Nothing. - */ - void RemoveComponent(); - - /** Adds a file extension to this path. Adds or ignores dots as needed so - that only one dot appears before the extension. - @param ext The extension text in a Unicode string. - @return Nothing - */ - void AddExtension(const ai::UnicodeString &ext); - /** Adds a file extension to this path. Adds or ignores dots as needed so - that only one dot appears before the extension. - @param ext The extension text in a C string. - @return Nothing - */ - void AddExtension(const std::string &ext); - /** Removes the file extension, if any, from this path. - @return Nothing - */ - void RemoveExtension(); - - /** Reports whether this file or directory exists after querying the file system. - @param resolveLinks True to resolve links, aliases, and shortcuts for the - full path returned in \c longPath. - @param longPath [out] Optional. A buffer in which to return a full long, - Unicode version of the path, if the file or directory is found. - Return value undefined if function returns false. Can be \c NULL. - @param isFile [out] Optional. A buffer in which to return true if a - file is found, false if a directory is found. Return value undefined - if function returns false.Can be \c NULL. - @return True if the file or directory exists, false otherwise. - */ - bool Exists(const bool resolveLinks, - ai::UnicodeString *longPath = 0, bool *isFile = 0) const; - - /** Resolves any alias or shortcut for this path by querying file system, - and alters the object to point directly to the target file. - The target file or directory must exist. <> - @return Nothing - */ - void Resolve(); - - /*****************************************************************************/ - /* Set operations */ - - /** Sets this file path from a Unicode string containing a path native to - Windows, Unix, or Mac OS, or a URL. - @param path Path of file. - @param expandName When true, the function attempts to expand the - provided path string into a full name (for example, for a short, - truncated name in Windows). - @return Nothing. - */ - void Set(const ai::UnicodeString &path, bool expandName = true); - - /** Internal. Sets this file path from an \c MiFile. (Illustrator core only.) - @return Nothing. - */ - void SetFromMiFile(const MiFile&); - - void SetFromSPFileRef(const SPPlatformFileReference&); - - #ifdef MAC_ENV - - /** Sets this file path from an \c CFStringRef file specification in Mac OS. - @return Nothing. - */ - void SetFromCFString(const CFStringRef); - - /** Sets this file path from an \c FSRef file specification in Mac OS. - @return The operating-system status code. - */ -#if DEPRICATED_IN_10_8 - OSStatus SetFromFSRef(const FSRef&); -#endif - - /** Sets this file path from an \c CFURLRef URL specification in Mac OS. - @return Nothing. - */ - void SetFromCFURL(const CFURLRef); - - #ifdef __OBJC__ - /** Sets this file path from bookmark data. - @return A boolean value specifying whether this data is stale. - */ - BOOL SetFromBookmarkData( NSData* inBookmarkData, const FilePath& inRelativeToPath = FilePath(), NSError** inError = NULL ); - #endif //__OBJC__ - - #endif // MAC_ENV - - - /*****************************************************************************/ - /* Get operations */ - - /** Retrieves the file name including an extension, if applicable, but without the path. - @param displayName True to get the display name. - @return The file name string. - */ - ai::UnicodeString GetFileName(const bool displayName = false) const; - - /** Retrieves the file name without the extension and path. - @return The file name string. - */ - ai::UnicodeString GetFileNameNoExt() const; - - /** Retrieves the file extension, without the dot, or \c NULL if the - file name ends with a dot. - @return The extension string. - */ - ai::UnicodeString GetFileExtension() const; - - /** Retrieves the full path in notation native to the current platform. - @param displayName True to get the display name. - @return The path string. - */ - ai::UnicodeString GetFullPath(const bool displayName = false) const; - - /** Retrieves the directory name, ending with a delimiter, without the filename, - in notation native to the current platform. - If path represents a directory, the result is the same as \c GetFullPath(). - @param displayName True to get the display name. - @return The directory path string. - */ - ai::UnicodeString GetDirectory(const bool displayName = false) const; - - /** Retrieves an operating-system-specific short version of the path. - The file or folder must exist. Accesses the file system. - \li In Windows, conforms to 8.3 format. - \li In Mac OS X, the name may be truncated and a file ID appended. - If the file ID is required, the path is not valid across processes. - @return The path string. - */ - ai::UnicodeString GetShortPath() const; - - /** Retrieves the parent of the object represented by this path. - \li If this path is a directory, gets the parent directory. - \li If this path is a top-level volume, gets an empty path. - - Does not access the file system, and does not guarantee that - the referenced file or directory exists. - @return The file-path object for the parent. - */ - FilePath GetParent() const; - - /// Return the relative path of 'path' to 'base'. - //On hold due to lack of demand - //FilePath GetRelativePath(const FilePath &base) const; - - /// Return the absolute path for 'relative' from 'base'. - //On hold due to lack of demand - //FilePath GetAbsolutePath(const FilePath &base) const; - - /** Retrieves the path component delimiter for the current platform. - @return The delimiter character. - */ - static const char GetDelimiter() AINOTHROW; - - #ifdef MAC_ENV - - #if DEPRICATED_IN_10_8 - /** Retrieves the volume and/or parent of this file or directory - in Mac OS. One of the parameters - can be \c NULL. - @param vol [out] A buffer in which to return the volume. - @param parent [out] A buffer in which to return the parent. - @return Nothing. - */ - void GetVolumeAndParent(FSVolumeRefNum *vol, UInt32 *parent) const; - #endif - - #ifdef __OBJC__ - /** Retrieves the volume and/or parent of this file or directory - in Mac OS. One of the parameters - can be \c NULL. - @param vol [out] A buffer in which to return the volume. - @param parent [out] A buffer in which to return the parent. - @return Nothing. - */ - void GetVolumeAndParent(NSURL **volume, NSURL **parent) const; - #endif - #endif - - /** Retrieves the creator and type of this file or directory (4-character codes) - in Mac OS. - @param creator [out] A buffer in which to return the creator, a 4-character code. - @param type [out] A buffer in which to return the type, a 4-character code. - @return An error code, \c #kNoErr on success. - */ - AIErr GetCreatorAndType(ai::uint32 *creator, ai::uint32 *type) const; - - /** Retrieves this path as a Uniform Resource Locator (URL), which - contains only ASCII characters; any special characters are - escaped with URL percent (\%) encoding. - @param displayName True to get the display name. - @return The URL string. - */ - ai::UnicodeString GetAsURL(const bool displayName) const; - - void GetAsSPPlatformFileRef(SPPlatformFileReference&) const; - - /** Internal. Fills in the existing \c MiFile from this path (Illustrator core only). */ - AIErr GetAsMiFile(MiFile&) const; - - /** Internal. Creates an \c MiFile based on this path (Illustrator core only). */ - AIErr GetAsMiFile(MiFile*&) const; - - #ifdef MAC_ENV - - /** Creates a \c CFString from this file path in Mac OS. - @return The file specification object. - */ - CFStringRef GetAsCFString() const; - - /** Creates an \c FSRef from this file path in Mac OS. - @param result [out] A buffer in which to return the file specification. - @return An operating-system status code. - */ -#if DEPRICATED_IN_10_8 - OSStatus GetAsFSRef(FSRef& result) const; -#endif - - /** Creates a \c CFURL from this file path in Mac OS. - @return The URL specification object. - */ - CFURLRef GetAsCFURL() const; - - #ifdef __OBJC__ - NSString* GetAsNSString () const; - - NSURL* GetAsNSURL () const; - - NSData* GetAsBookmarkData ( const FilePath& inRelativeToPath = FilePath(), NSError** inError = NULL ) const; - - NSData* GetAsMinimalBookmarkData( const FilePath& inRelativeToPath = FilePath(), NSError** inError = NULL ) const; - - BOOL IsAlias () const; - - BOOL IsOnNetwork () const; - - BOOL IsEjectable () const; - #endif - -#endif // MAC_ENV - - private: - class FilePathImpl *impl; -}; - -} // namespace ai - -//////////////////////////////////////////////////////////////////////////////// -// Inline members -// - -//////////////////////////////////////////////////////////////////////////////// -inline void ai::FilePath::AddComponent(const FilePath &addend) -{ - AddComponent(addend.GetFullPath()); -} - -//////////////////////////////////////////////////////////////////////////////// -inline void ai::FilePath::AddExtension(const std::string &ext) -{ - AddExtension(ai::UnicodeString(ext)); -} - - -#endif // __IAIFilePath__ +/* + * Name: IAIFilePath.hpp + * Purpose: C++ access class for File Path suite + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __IAIFilePath__ +#define __IAIFilePath__ + +#include "IAIUnicodeString.h" + +/*HACK for int32_t and uint32_t redefinition error in VS2012: In case of VS2012 compiler, "memory" file includes stdint.h which, + for some reason, points to dvacore/sys/win/stdint.h. As a result, datatypes defined in stdint.h throw redefinition errors. */ +#if defined(_MSC_VER) && _MSC_VER >= 1700 +#define _ADOBE_STDINT_H_ +#endif + +#include + +#if defined(_MSC_VER) && _MSC_VER >= 1700 +#undef _ADOBE_STDINT_H_ +#endif + + +#ifdef MAC_ENV + #ifdef __OBJC__ + #import + #import + #endif + #ifndef __COREFOUNDATION_CFURL__ + #include + #endif + #if defined(IOS_ENV) + typedef short FSVolumeRefNum; + #else + #ifndef __FILES__ + #include + #endif + #endif // !defined(IOS_ENV) +#else + +typedef signed long OSStatus; +#endif + +#ifdef LINUX_ENV +#ifdef LINUX_WEB_ENV +#include +#else +#include +#endif +#endif + +struct FSSpec; +struct MiFile; + +namespace ai { + +#ifdef WIN_ENV +const ai::uint32 MaxPath = 259; +#endif +#ifdef MAC_ENV +const ai::uint32 MaxPath = 1023; +#endif +#ifdef LINUX_ENV +const ai::uint32 MaxPath = PATH_MAX; +#endif + +const ai::uint32 MaxFile = 255; + +class FilePath +{ + public: + + /* Some file system operations can be very slow. For example, on Windows, + UNC path names are used to access files on remote volumes. Determining + the availability of those remote volumes can require significant time + especially in the presence of the Windows client for NFS. For this + reason volume availability information is cached. */ + + /** Resets cached information about volumes, used to increase + the efficiency of filesystem operations. + @return Nothing. + */ + static void ResetVolumeCache() AINOTHROW; + + /** Default constructor. Creates an empty file-path object. */ + FilePath() AINOTHROW; + /** Copies a file-path object. */ + FilePath(const FilePath&); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move Constructor */ + FilePath(FilePath&& rhs) AINOEXCEPT; +#endif + + /** Creates an initialized file-path object from a Unicode string + containing a path native to Windows, Unix, or Mac OS, or a URL. + @param path The new path. + @param expandName When true, the function attempts to expand the + provided path string into a full name (for example, for a short, + truncated name in Windows). + @param dontStripTrailingSpace When true, the function will not strip any + trailing whitespace in the provided path unicode string. + @return The new object. + */ + explicit FilePath(const ai::UnicodeString &path, bool expandName = true, + bool dontStripTrailingSpace = false); + + /** Creates as intialized file-path object from a file reference. + + */ + + + + /** Internal. Creates an initialized file-path object from + a \c MiFile (Illustrator core only). */ + explicit FilePath(const MiFile&); + + + + explicit FilePath(const SPPlatformFileReference&); + + #ifdef MAC_ENV + /** Creates an initialized file-path object from a \c CFString + file specification in Mac OS. + @return The new object. + */ + explicit FilePath(const CFStringRef); + + + /** Creates an initialized file-path object from a \c CFURLRef + URL specification in Mac OS. + @return The new object. + */ + explicit FilePath(const CFURLRef); + + #ifdef __OBJC__ + /** Creates an initialized faile-path object from a \c BookmarkData + @return The new object. + */ + explicit FilePath( NSData* inBookmarkData, const FilePath& inRelativeToPath = FilePath() ); + #endif //__OBJC__ + + #endif // MAC_ENV + + /** Destructor */ + ~FilePath(); + + /** Swaps the content with rhs */ + void swap(FilePath& rhs) AINOEXCEPT; + + /** Copy assignment operator. Same as \c #AIFilePathSuite::Copy(). */ + FilePath& operator=(const FilePath&); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move assignment operator. */ + FilePath& operator=(FilePath&&) AINOEXCEPT; +#endif + + /** Reports whether a file-path object is empty. + @return True if the object is empty. + */ + bool IsEmpty() const; + + /** Sets the referenced path of this object to a \c NULL path. + @return Nothing. + */ + void MakeEmpty(); + + /** Compares this file path to another for equality. + @param filePath The path object to compare to this one + @param resolveLinks Optional. True to resolve links, aliases, and/or shortcuts + if the paths are not identical. Default is false. + @return True if the paths are identical, whether or not the file exists, + or if links are resolved and the two paths refer to the same file. +
False if the paths are not identical and \c resolveLinks is false. + */ + bool Equal(const FilePath& filePath, const bool resolveLinks = false) const; + /** Equality operator */ + bool operator==(const FilePath&) const; + /** Inequality operator */ + bool operator!=(const FilePath&) const; + + /** Less-than operator, compares file path strings. */ + bool operator<(const FilePath&) const; + + /** Reports whether this path starts with a delimiter, and + is therefore an absolute, not relative, path. + @return True if the path starts with a delimiter + */ + bool StartsWithDelimiter() const; + + /** Reports whether this path ends with a delimiter, and + therefore references a folder or directory, rather than a file. + @return True if the path ends with a delimiter + */ + bool EndsWithDelimiter() const; + + /** Adds a component to this path. Adds or ignores appropriate delimiters + as needed. Does not add delimiters to the end of a path unless explicitly + requested by sending an empty addend. + @param addend [in/out] A Unicode string containing the component to + add, in which to return the lengthened path string. + @return Nothing. + */ + void AddComponent(const ai::UnicodeString &addend = ai::UnicodeString()); + /** Adds a component to this path. Adds or ignores appropriate delimiters + as needed. Does not add delimiters to the end of a path unless explicitly + requested by sending an empty addend. + @param addend A file-path object containing the component to + add to the path of this object. + @return Nothing. + */ + void AddComponent(const FilePath &addend); + + /** Removes the end component from this path. + @return Nothing. + */ + void RemoveComponent(); + + /** Adds a file extension to this path. Adds or ignores dots as needed so + that only one dot appears before the extension. + @param ext The extension text in a Unicode string. + @return Nothing + */ + void AddExtension(const ai::UnicodeString &ext); + /** Adds a file extension to this path. Adds or ignores dots as needed so + that only one dot appears before the extension. + @param ext The extension text in a C string. + @return Nothing + */ + void AddExtension(const std::string &ext); + /** Removes the file extension, if any, from this path. + @return Nothing + */ + void RemoveExtension(); + + /** Reports whether this file or directory exists after querying the file system. + @param resolveLinks True to resolve links, aliases, and shortcuts for the + full path returned in \c longPath. + @param longPath [out] Optional. A buffer in which to return a full long, + Unicode version of the path, if the file or directory is found. + Return value undefined if function returns false. Can be \c NULL. + @param isFile [out] Optional. A buffer in which to return true if a + file is found, false if a directory is found. Return value undefined + if function returns false.Can be \c NULL. + @return True if the file or directory exists, false otherwise. + */ + bool Exists(const bool resolveLinks, + ai::UnicodeString *longPath = 0, bool *isFile = 0) const; + + /** Resolves any alias or shortcut for this path by querying file system, + and alters the object to point directly to the target file. + The target file or directory must exist. <> + @return Nothing + */ + void Resolve(); + + /*****************************************************************************/ + /* Set operations */ + + /** Sets this file path from a Unicode string containing a path native to + Windows, Unix, or Mac OS, or a URL. + @param path Path of file. + @param expandName When true, the function attempts to expand the + provided path string into a full name (for example, for a short, + truncated name in Windows). + @return Nothing. + */ + void Set(const ai::UnicodeString &path, bool expandName = true, bool dontStripTrailingSpace = false); + + /** Internal. Sets this file path from an \c MiFile. (Illustrator core only.) + @return Nothing. + */ + void SetFromMiFile(const MiFile&); + + void SetFromSPFileRef(const SPPlatformFileReference&); + + #ifdef MAC_ENV + + /** Sets this file path from an \c CFStringRef file specification in Mac OS. + @return Nothing. + */ + void SetFromCFString(const CFStringRef); + + /** Sets this file path from an \c CFURLRef URL specification in Mac OS. + @return Nothing. + */ + void SetFromCFURL(const CFURLRef); + + #ifdef __OBJC__ + /** Sets this file path from bookmark data. + @return A boolean value specifying whether this data is stale. + */ + BOOL SetFromBookmarkData( NSData* inBookmarkData, const FilePath& inRelativeToPath = FilePath(), NSError** inError = NULL ); + #endif //__OBJC__ + + #endif // MAC_ENV + + + /*****************************************************************************/ + /* Get operations */ + + /** Retrieves the file name including an extension, if applicable, but without the path. + @param displayName True to get the display name. + @return The file name string. + */ + ai::UnicodeString GetFileName(const bool displayName = false) const; + + /** Retrieves the file name without the extension and path. + @return The file name string. + */ + ai::UnicodeString GetFileNameNoExt() const; + + /** Retrieves the file extension, without the dot, or \c NULL if the + file name ends with a dot. + @return The extension string. + */ + ai::UnicodeString GetFileExtension() const; + + /** Retrieves the full path in notation native to the current platform. + @param displayName True to get the display name. + @return The path string. + */ + ai::UnicodeString GetFullPath(const bool displayName = false) const; + + /** Retrieves the directory name, ending with a delimiter, without the filename, + in notation native to the current platform. + If path represents a directory, the result is the same as \c GetFullPath(). + @param displayName True to get the display name. + @return The directory path string. + */ + ai::UnicodeString GetDirectory(const bool displayName = false) const; + + /** Retrieves an operating-system-specific short version of the path. + The file or folder must exist. Accesses the file system. + \li In Windows, conforms to 8.3 format. + \li In Mac OS X, the name may be truncated and a file ID appended. + If the file ID is required, the path is not valid across processes. + @return The path string. + */ + ai::UnicodeString GetShortPath() const; + + /** Retrieves the parent of the object represented by this path. + \li If this path is a directory, gets the parent directory. + \li If this path is a top-level volume, gets an empty path. + + Does not access the file system, and does not guarantee that + the referenced file or directory exists. + @return The file-path object for the parent. + */ + FilePath GetParent() const; + + /// Return the relative path of 'path' to 'base'. + //On hold due to lack of demand + //FilePath GetRelativePath(const FilePath &base) const; + + /// Return the absolute path for 'relative' from 'base'. + //On hold due to lack of demand + //FilePath GetAbsolutePath(const FilePath &base) const; + + /** Retrieves the path component delimiter for the current platform. + @return The delimiter character. + */ + static char GetDelimiter() AINOTHROW; + + #ifdef MAC_ENV + + + #ifdef __OBJC__ + /** Retrieves the volume and/or parent of this file or directory + in Mac OS. One of the parameters + can be \c NULL. + @param vol [out] A buffer in which to return the volume. + @param parent [out] A buffer in which to return the parent. + @return Nothing. + */ + void GetVolumeAndParent(NSURL **volume, NSURL **parent) const; + #endif + #endif + + /** Retrieves the creator and type of this file or directory (4-character codes) + in Mac OS. + @param creator [out] A buffer in which to return the creator, a 4-character code. + @param type [out] A buffer in which to return the type, a 4-character code. + @return An error code, \c #kNoErr on success. + */ + AIErr GetCreatorAndType(ai::uint32 *creator, ai::uint32 *type) const; + + /** Retrieves this path as a Uniform Resource Locator (URL), which + contains only ASCII characters; any special characters are + escaped with URL percent (\%) encoding. + @param displayName True to get the display name. + @return The URL string. + */ + ai::UnicodeString GetAsURL(const bool displayName) const; + + void GetAsSPPlatformFileRef(SPPlatformFileReference&) const; + + /** Internal. Fills in the existing \c MiFile from this path (Illustrator core only). */ + AIErr GetAsMiFile(MiFile&) const; + + /** Internal. Creates an \c MiFile based on this path (Illustrator core only). */ + AIErr GetAsMiFile(MiFile*&) const; + + AIBoolean IsOnNetwork() const; + + #ifdef MAC_ENV + + /** Creates a \c CFString from this file path in Mac OS. + @return The file specification object. + */ + CFStringRef GetAsCFString() const; + /** Creates a \c CFURL from this file path in Mac OS. + @return The URL specification object. + */ + CFURLRef GetAsCFURL() const; + + #ifdef __OBJC__ + NSString* GetAsNSString () const; + + NSURL* GetAsNSURL () const; + + NSData* GetAsBookmarkData ( const FilePath& inRelativeToPath = FilePath(), NSError** inError = NULL ) const; + + NSData* GetAsMinimalBookmarkData( const FilePath& inRelativeToPath = FilePath(), NSError** inError = NULL ) const; + + BOOL IsAlias () const; + + BOOL IsEjectable () const; + #endif + +#endif // MAC_ENV + + private: + class FilePathImpl *impl; +}; + +//////////////////////////////////////////////////////////////////////////////// +// Inline members +// + +// Swap +inline void FilePath::swap(FilePath& rhs) AINOEXCEPT +{ + std::swap(impl, rhs.impl); +} + +#ifdef AI_HAS_RVALUE_REFERENCES + +// Move constructor +inline FilePath::FilePath(FilePath&& rhs) AINOEXCEPT : impl{rhs.impl} +{ + rhs.impl = nullptr; +} + +// Move assignment operator +inline FilePath& FilePath::operator=(FilePath&& rhs) AINOEXCEPT +{ + swap(rhs); + return *this; +} + +#endif // AI_HAS_RVALUE_REFERENCES + +inline void FilePath::AddComponent(const FilePath &addend) +{ + AddComponent(addend.GetFullPath()); +} + +inline void FilePath::AddExtension(const std::string &ext) +{ + AddExtension(ai::UnicodeString(ext)); +} + +} // namespace ai + +#endif // __IAIFilePath__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.cpp new file mode 100644 index 0000000..fbab76b --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.cpp @@ -0,0 +1,72 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#include "IAIGlobalUnicodeString.hpp" +#include "AIGlobalUnicodeString.h" +#include "AIErrorHandler.h" +#include "AIContract.hpp" + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIGlobalUnicodeString) +#elif defined (_IAIGlobalUnicodeString_SUITE_INCLUDE_H) + #include _IAIGlobalUnicodeString_SUITE_INCLUDE_H +#else + // These need to be declared by client. + extern "C" AIGlobalUnicodeStringSuite* sAIGlobalUnicodeString; +#endif + +namespace ai +{ + const ai::UnicodeString& GlobalUnicodeString::Get() const + { + AIErrorThrower error; + if (mStringPtr) + { + return *mStringPtr; + } + + if (mIsZRef) + error = sAIGlobalUnicodeString->AddString(ai::UnicodeString(ZREF(mStr)), &mStringPtr); + else + error = sAIGlobalUnicodeString->AddString(ai::UnicodeString(mStr, mSize, mEncoding), &mStringPtr); + + ai::Ensures(mStringPtr != nullptr); + return *mStringPtr; + } + + GlobalUnicodeString::GlobalUnicodeString(ai::UnicodeString str) + { + AIErrorThrower error; + error = sAIGlobalUnicodeString->AddString(std::move(str), &mStringPtr); + ai::Ensures(mStringPtr != nullptr); + } + + void GlobalUnicodeString::Set(ai::UnicodeString newStr) + { + AIErrorThrower error; + if (!mStringPtr) + { + error = sAIGlobalUnicodeString->AddString(std::move(newStr), &mStringPtr); + ai::Ensures(mStringPtr != nullptr); + return; + } + + mStringPtr->swap(newStr); + } + +} + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.hpp new file mode 100644 index 0000000..f67fe7e --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIGlobalUnicodeString.hpp @@ -0,0 +1,114 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "IAIUnicodeString.h" +#include "IAILiteralString.h" + +/** + As ai::UnicodeString objects are not safe to be created at global and static scope, + ai::GlobalUnicodeString helps in this requirement and wraps a lazy created ai::UnicodeString. + The associated ai::UnicodeString is created on first call and is cached. + Its lifetime is guaranteed till plugin shutdown. + + @note: Client does not need to do anything for freeing the associated ai::UnicodeString object. + + Usage: + + 1. Create with a literal string + static ai::GlobalUnicodeString gStr ("my global string", kAIRomanCharacterEncoding); + ai::GlobalUnicodeString gStr2 ("My UTF8 string", kAIUTF8CharacterEncoding); + + 2. Create with a ZRef + static ai::GlobalUnicodeString gStr3 (ZREF("$$$/MyZstringKey=String Value")); + + 3. Create with an ai::LiteralString + constexpr ai::LiteralString str ("a literal string"); + static const ai::GlobalUnicodeString gStr4(str, kAIRomanCharacterEncoding); + + This class has const ai::UnicodeString& operator overloaded. This object can be passed directly + at most places where const ai::UnicodeString& is needed, . + + Get() method can be called at places where operator is not resolved. + + Set(newStr) to change the value of the global string with a new string. The old pointer remains valid, + only the value changes. + Passing a temporary/Rvalue reference string to this method moves the string to the pool instead of creating a copy. +*/ + +namespace ai +{ + class GlobalUnicodeString + { + public: + /** + Constructor : Create with a literal string + ai::GlobalUnicodeString gStr ("my global string", kAIRomanCharacterEncoding); + ai::GlobalUnicodeString gStr2 ("My UTF8 string", kAIUTF8CharacterEncoding); + */ + template + constexpr GlobalUnicodeString(const char(&str)[N], + AICharacterEncoding encoding) AINOEXCEPT : + mStr{ str }, mSize{ N - 1 }, mEncoding(encoding) + {} + + /** Constructor: Create with an ai::LiteralString + constexpr ai::LiteralString str ("a literal string"); + ai::GlobalUnicodeString gStr4(str, kAIRomanCharacterEncoding); + */ + constexpr GlobalUnicodeString(const ai::LiteralString& str, + AICharacterEncoding encoding) AINOEXCEPT: + mStr(str.c_str()), mSize(str.size()), mEncoding(encoding) + {} + + /** Constructor: Create with a ZRef + ai::GlobalUnicodeString gStr3 (ZREF("$$$/MyZstringKey=String Value")); + */ + GlobalUnicodeString(const ZRef key) :mStr((const char*)key), mIsZRef(true) {} + + /** Constructor: Create with an ai::UnicodeString + @note: Use this constructor only in function which gets called after Startup Plugin as function static object. + Do not Create ai::GlobalUnicodeString object with this constructor at global scope. + */ + GlobalUnicodeString(ai::UnicodeString str); + + /** + Returns the reference to global ai::UnicodeString stored for this GlobalUnicodeString. + */ + const ai::UnicodeString& Get() const; + + /** + Changes the value of the associated global string. + */ + void Set(ai::UnicodeString newStr); + + /** + Returns the reference to global ai::UnicodeString stored for this GlobalUnicodeString. + */ + operator const ai::UnicodeString&() const + { + return Get(); + } + private: + const char* mStr = nullptr; + size_t mSize = 0; + bool mIsZRef = false; + mutable ai::UnicodeString* mStringPtr = nullptr; + AICharacterEncoding mEncoding = kAIRomanCharacterEncoding; + }; +} + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiteralString.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiteralString.h new file mode 100644 index 0000000..e2d419e --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiteralString.h @@ -0,0 +1,164 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AITypes.h" + +#include +#include +#include +#include + +namespace ai +{ + /** + * String Literal Class + * -------------------- + * Replacement for: + * const char* const kWidgetId = "SomeMagicString"; + * + * How to create: + * constexpr ai::LiteralString kWidgetId {"WidgetName"}; + * constexpr ai::LiteralString kWidgetId = "WidgetName"; + * + * When to use: + * To specify placeholders for magic strings for which we generally use const char* const ... + * + * Why to use: + * - When a constexpr object is created with a string literal which is a constant expression (e.g. magic strings), there is: + * - No runtime overhead for creation + * - Size is known at compile time + * - Implicit conversion to const char* when you need to call a function that expects const char* + * + * NOTE: + * - You can compare two constexpr ai::LiteralString at compile time. + * - However, you can compare LiteralString with const char* with std::strcmp only at runtime. + ***/ + + namespace details + { + constexpr bool compare_less(const char* str1, std::size_t len1, const char* str2, std::size_t len2) AINOEXCEPT + { + return (len2 == 0) ? false : + (len1 == 0) ? true : + (*str1 != *str2) ? (*str1 < *str2) : + compare_less(str1 + 1, len1 - 1, str2 + 1, len2 - 1); + } + + constexpr bool compare_equal(const char* str1, std::size_t len1, const char* str2, std::size_t len2) AINOEXCEPT + { + return (len1 == 0 && len2 == 0) ? true : + (len1 == 0 || len2 == 0) ? false : + (*str1 != *str2) ? false : + compare_equal(str1 + 1, len1 - 1, str2 + 1, len2 - 1); + } + + } // namespace details + + + class LiteralString + { + public: + using const_iterator = const char*; + + template + constexpr LiteralString(const char(&arr)[N]) AINOEXCEPT : str{arr}, len{N - 1} + { + AI_STATIC_CHECK(N >= 1, "not a string literal"); + } + + constexpr char operator[](std::size_t i) const + { + return i < len ? str[i] : throw std::out_of_range{""}; + } + + constexpr std::size_t size() const AINOEXCEPT { return len; } + + /** Implicit conversion to const char* + */ + constexpr operator const char*() const AINOEXCEPT { return str; } + + /** Use c_str() when implicit conversion is not applicable. For example, you can use this string in cases such as + template argument deduction + */ + constexpr const char* c_str() const AINOEXCEPT { return str; } + + /** Support for range based loops + */ + constexpr const_iterator begin() const AINOEXCEPT { return str; } + + /** Support for range based loops + */ + constexpr const_iterator end() const AINOEXCEPT { return str + len; } + + private: + const char* const str; + const std::size_t len; + }; + + /** Lexicographical comparison + */ + inline constexpr bool operator<(const ai::LiteralString& lhs, const ai::LiteralString& rhs) AINOEXCEPT + { + return details::compare_less(lhs, lhs.size(), rhs, rhs.size()); + } + + /** Lexicographical comparison + */ + inline constexpr bool operator>(const ai::LiteralString& lhs, const ai::LiteralString& rhs) AINOEXCEPT + { + return (rhs < lhs); + } + + inline constexpr bool operator==(const ai::LiteralString& lhs, const ai::LiteralString& rhs) AINOEXCEPT + { + return details::compare_equal(lhs, lhs.size(), rhs, rhs.size()); + } + + inline constexpr bool operator!=(const ai::LiteralString& lhs, const ai::LiteralString& rhs) AINOEXCEPT + { + return !(lhs == rhs); + } + + inline bool operator==(const ai::LiteralString& lhs, const char* rhs) + { + return (std::strcmp(lhs.c_str(), rhs) == 0); + } + + inline bool operator!=(const ai::LiteralString& lhs, const char* rhs) + { + return !(lhs == rhs); + } + + inline bool operator==(const char* lhs, const ai::LiteralString& rhs) + { + return (rhs == lhs); + } + + inline bool operator!=(const char* lhs, const ai::LiteralString& rhs) + { + return (rhs != lhs); + } + + inline std::string to_std_string(LiteralString str) + { + return std::string(str.c_str(), str.size()); + } + + constexpr ai::LiteralString kEmptyLiteralString { "" }; + +} // namespace ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiveEdit.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiveEdit.h new file mode 100644 index 0000000..d2a8c17 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILiveEdit.h @@ -0,0 +1,146 @@ +/******************************************************************************* +* ADOBE CONFIDENTIAL +* +* Copyright 2018 Adobe +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +*******************************************************************************/ + +#pragma once + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "AILiveEdit.h" +#include "AILiveEditConstants.h" +#include "AutoSuite.h" + + +/******************************************************************************* +** +** Variables +** +**/ + +extern_declare_suite_optional(AILiveEdit) // Clients need to define separately + // with extern_define_suite_optional + + +/******************************************************************************* +** +** Utility Classes +** +**/ + +namespace ai +{ + + // A class to wrap ChangeContinueStartNotify() and ChangeContinueEndNotify() + // in a scope. + class StLiveEditContinueChangeNotifyHelper final + { + public: + StLiveEditContinueChangeNotifyHelper() + { + try + { + if (sAILiveEdit) + { + sAILiveEdit->ChangeContinueStartNotify(); + } + } + catch (...) + { + } + } + ~StLiveEditContinueChangeNotifyHelper() + { + try + { + if (sAILiveEdit) + { + sAILiveEdit->ChangeContinueEndNotify(); + } + } + catch (...) + { + } + } + }; + + // A class to wrap ChangeBeginNotify() and ChangeFinishNotify() in a scope. + class StLiveEditBeginFinishChangeNotifyHelper final + { + public: + StLiveEditBeginFinishChangeNotifyHelper( + const LiteralString& inFeatureName, + AIReal inEPFOverrideValue = LiveEdit::EPF::kUseGlobaLimitValue) + { + try + { + if (sAILiveEdit) + { + sAILiveEdit->ChangeBeginNotify(inFeatureName, + inEPFOverrideValue); + } + } + catch (...) + { + } + } + ~StLiveEditBeginFinishChangeNotifyHelper() + { + try + { + if (sAILiveEdit) + { + sAILiveEdit->ChangeFinishNotify(); + } + } + catch (...) + { + } + } + }; + + // A class to wrap SuspendLiveEditing() and ResumeLiveEditing() in a scope. + class StLiveEditSuspender final + { + public: + StLiveEditSuspender() + { + try + { + if (sAILiveEdit) + { + sAILiveEdit->SuspendLiveEditing(); + } + } + catch (...) + { + } + } + ~StLiveEditSuspender() + { + try + { + if (sAILiveEdit) + { + sAILiveEdit->ResumeLiveEditing(); + } + } + catch (...) + { + } + } + }; + +} // namespace ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILocale.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILocale.h index db112d1..a5f41f8 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILocale.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAILocale.h @@ -1,163 +1,173 @@ -/* - * Name: IAILocale.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Interface to the wrapper class for AIStringFormatUtilsSuite & the - * primary interface for the AI core to the ai::Locale object. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -#ifndef _IAILOCALE_H_ -#define _IAILOCALE_H_ - - -namespace ai { - -/**This class represents a predefined set of locales - used in Illustrator, with a unique identifying code - and associated descriptive string for the language and region. - The methods allow you to access the current locale setting - of the operating system or of the application.*/ - -class Locale { -public: - - /** Locale type constants, mapped to a descriptive string - that contains the language name and region code. */ - enum ID - { - /** Invalid locale */ - kUndefined = -1, - /** Implies the default language behavior for a particular context. - For example, in the \c ai::NumberFormat class, implies the system - setting for number formats */ - kDefault = 0, - /** The operating-system locale */ - kSystem, - /** The application locale */ - kApplication, - /** US English (en_US) */ - kUS, - /** English (en_GB) */ - kBritain, - /** German (de_DE) */ - kGermany, - /** French (fr_FR) */ - kFrance, - /** Italian (it_IT) */ - kItaly, - /** Japanese (ja_JP) */ - kJapan, - /** Chinese (Simplified - zh_CN) */ - kChina, - /** Chinese (Traditional - zh_TW) */ - kTaiwan, - /** Korean (Korea - ko_KR) */ - kKorea, - /** Arabic (ar_AE) */ - kArabia, - /** English (en_CA) */ - kCanadaComma, - /** French (fr_CA) */ - kFrCanada, - /** Spanish (es_ES) */ - kSpain, - /** Swedish (sv_SE) */ - kSweden, - /** Portuguese (pt_PT) */ - kPortugal, - /** Portuguese (pt_BR) */ - kBrazil, - /** Polish (pl_PL) */ - kPoland, - /** Dutch (nl_NL) */ - kNetherlands, - /** Danish (da_DK) */ - kDenmark, - /** German (de_CH) */ - kGrSwiss, - /** Norwegian (nb_NO) */ - kNorway, - /** Nynorsk (nn_NO) */ - kNynorskNorway, - /** Finnish (fi_FI) */ - kFinland, - /** Czech (cs_CZ) */ - kCzech, - /** Hungarian (hu_HU) */ - kHungary, - /** Greek (el_GR) */ - kGreece, - /** Russian (ru_RU) */ - kRussia, - /** Romanian (ro_RO) */ - kRomania, - /** Turkish (tr_TR) */ - kTurkey, - /** Thai (th_TH) */ - kThailand, - /** Vietnamese (vi_VN) */ - kVietnam, - /** Bulgarian (bg_BG) */ - kBulgaria, - /** Hebrew (he_IL) */ - kIsrael, - /** Ukrainian (uk_UA) */ - kUkraine, - /** Mexican Spanish (es_MX) */ - kSpMexican, - /** Iranian Farsi (fa_IR) */ - kFarsi, - /** Arabic with English UI (en_AE) */ - kEnArabia, - /** Hebrew with English UI (en_IL)*/ - kEnHebrew, - /** North African French (fr_MA) */ - kFrNorthAfrica, - /** */ - kAIDummyLocale = 0xFFFFFFFF - }; - - /** Retrieves the language and region code string for a locale. - @param id The locale identifier constant. - @return The language and region code string . - */ - static std::string getLocale(const Locale::ID id); - - /** Retrieves the current system locale as a locale identifier. - @return The locale ID constant. - */ - static Locale::ID getSystemLocaleID(); - - /** Retrieves the current application locale as a locale identifier. - @return The locale ID constant. - */ - static Locale::ID getApplicationLocaleID(); - - /** Retrieves the locale identifier for a language and region code string. - @param locale language and region code string - @return The locale ID constant or \c ai::Locale::kUndefined if the string - does not map to a valid type. - */ - static Locale::ID getID(const std::string& locale); - -}; - -/** Locale unique identifying code. */ -typedef Locale::ID LocaleID; - -} // end of namespace ai - -#endif //_IAILOCALE_H_ +/* + * Name: IAILocale.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Interface to the wrapper class for AIStringFormatUtilsSuite & the + * primary interface for the AI core to the ai::Locale object. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +#ifndef _IAILOCALE_H_ +#define _IAILOCALE_H_ + + +namespace ai { + +/**This class represents a predefined set of locales + used in Illustrator, with a unique identifying code + and associated descriptive string for the language and region. + The methods allow you to access the current locale setting + of the operating system or of the application.*/ + +class Locale { +public: + + /** Locale type constants, mapped to a descriptive string + that contains the language name and region code. */ + enum ID + { + /** Invalid locale */ + kUndefined = -1, + /** Implies the default language behavior for a particular context. + For example, in the \c ai::NumberFormat class, implies the system + setting for number formats */ + kDefault = 0, + /** The operating-system locale */ + kSystem, + /** The application locale */ + kApplication, + /** US English (en_US) */ + kUS, + /** English (en_GB) */ + kBritain, + /** German (de_DE) */ + kGermany, + /** French (fr_FR) */ + kFrance, + /** Italian (it_IT) */ + kItaly, + /** Japanese (ja_JP) */ + kJapan, + /** Chinese (Simplified - zh_CN) */ + kChina, + /** Chinese (Traditional - zh_TW) */ + kTaiwan, + /** Korean (Korea - ko_KR) */ + kKorea, + /** Arabic (ar_AE) */ + kArabia, + /** English (en_CA) */ + kCanadaComma, + /** French (fr_CA) */ + kFrCanada, + /** Spanish (es_ES) */ + kSpain, + /** Swedish (sv_SE) */ + kSweden, + /** Portuguese (pt_PT) */ + kPortugal, + /** Portuguese (pt_BR) */ + kBrazil, + /** Polish (pl_PL) */ + kPoland, + /** Dutch (nl_NL) */ + kNetherlands, + /** Danish (da_DK) */ + kDenmark, + /** German (de_CH) */ + kGrSwiss, + /** Norwegian (nb_NO) */ + kNorway, + /** Nynorsk (nn_NO) */ + kNynorskNorway, + /** Finnish (fi_FI) */ + kFinland, + /** Czech (cs_CZ) */ + kCzech, + /** Hungarian (hu_HU) */ + kHungary, + /** Greek (el_GR) */ + kGreece, + /** Russian (ru_RU) */ + kRussia, + /** Romanian (ro_RO) */ + kRomania, + /** Turkish (tr_TR) */ + kTurkey, + /** Thai (th_TH) */ + kThailand, + /** Vietnamese (vi_VN) */ + kVietnam, + /** Bulgarian (bg_BG) */ + kBulgaria, + /** Hebrew (he_IL) */ + kIsrael, + /** Ukrainian (uk_UA) */ + kUkraine, + /** Mexican Spanish (es_MX) */ + kSpMexican, + /** Iranian Farsi (fa_IR) */ + kFarsi, + /** Arabic with English UI (en_AE) */ + kEnArabia, + /** Hebrew with English UI (en_IL)*/ + kEnHebrew, + /** North African French (fr_MA) */ + kFrNorthAfrica, + /** */ + kAIDummyLocale = 0xFFFFFFFF + }; + + /** Retrieves the language and region code string for a locale. + @param id The locale identifier constant. + @return The language and region code string . + */ + static std::string getLocale(const Locale::ID id); + + /** Retrieves the current system locale as a locale identifier. + @return The locale ID constant. + */ + static Locale::ID getSystemLocaleID(); + + /** Retrieves the current application locale as a locale identifier. + @return The locale ID constant. + */ + static Locale::ID getApplicationLocaleID(); + + /** Retrieves the locale identifier for a language and region code string. + @param locale language and region code string + @return The locale ID constant or \c ai::Locale::kUndefined if the string + does not map to a valid type. + */ + static Locale::ID getID(const std::string& locale); + +#if defined(ILLUSTRATOR_MINIMAL) + /** Retrieves the locale identifier from a Language Code + @param locale language Code String + @return The locale ID constant or \c ai::Locale::kUS if the string + does not map to "ja", "en", "de" and "us". + Example: param = "ja", return = ja_JP. + */ + static Locale::ID GetLocaleFromLangCode(const std::string& langCode); +#endif + +}; + +/** Locale unique identifying code. */ +typedef Locale::ID LocaleID; + +} // end of namespace ai + +#endif //_IAILOCALE_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIPaint.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIPaint.h index 5636880..c7b3847 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIPaint.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIPaint.h @@ -1,260 +1,258 @@ -#ifndef _IAIPAINT_H_ -#define _IAIPAINT_H_ - -/* - * Name: IAIPaint.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: C++ wrapper class for AIColor. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "AIColor.h" -#include "AIRealMath.h" - -namespace ai { - -/** This class describes how an art object is painted using - a fully-defined paint. Use the \c PartialPaint class for - partially-defined paints. */ -class Paint : public AIColor { -public: - /** Casts a color object to a \c Paint object. */ - static Paint& cast (AIColor& c); - /** Casts a constant color object to a constant \c Paint object. */ - static const Paint& constcast (const AIColor& c); - - /** Constructor. Creates an empty paint object. */ - Paint (); - - /** Equality operator. */ - bool operator == (const AIColor& b) const; -}; - - -//-------------------------------------------------------------------------------- -// A partial paint describes a paint that may have some unknown values. -//-------------------------------------------------------------------------------- - -/** This class describes how an art object is painted using - a partially-defined paint. Use the \c Paint class for - fully-defined paints. */ -class PartialPaint { -public: - /** Constructor. Creates an empty partial-paint object. */ - PartialPaint (); - /** Constructor. Creates an initialized partial-paint object. - @param color The partially-defined color object. - @param colormap The color map object that describes which - fields in the color object are valid. - */ - PartialPaint (const AIColor& color, const AIColorMap& colormap); - - /** Reports whether this partial-paint object is fully determined - @return True if all color fields are defined, false otherwise. - */ - bool IsFullyDefined () const; - -protected: - Paint fPaint; - AIColorMap fMap; -}; - - -//-------------------------------------------------------------------------------- -// Paint implementation -//-------------------------------------------------------------------------------- - -inline Paint& Paint::cast (AIColor& c) -{ - return static_cast(c); -} - -inline const Paint& Paint::constcast (const AIColor& c) -{ - return static_cast(c); -} - -inline Paint::Paint () -{ - kind = kNoneColor; -} - -inline bool Paint::operator == (const AIColor& b) const -{ - - bool result = false; - - if (kind == b.kind) - { - switch (kind) - { - case kGrayColor: - { - if (c.g.gray == b.c.g.gray) - { - result = true; - } - break; - } - case kFourColor: - { - if (c.f.cyan == b.c.f.cyan && - c.f.magenta == b.c.f.magenta && - c.f.yellow == b.c.f.yellow && - c.f.black == b.c.f.black) - { - result = true; - } - break; - } - case kPattern: - { - if (c.p.pattern == b.c.p.pattern && - c.p.shiftDist == b.c.p.shiftDist && - c.p.shiftAngle == b.c.p.shiftAngle && - c.p.scale.h == b.c.p.scale.h && - c.p.scale.v == b.c.p.scale.v && - c.p.rotate == b.c.p.rotate && - c.p.reflect == b.c.p.reflect && - c.p.reflectAngle == b.c.p.reflectAngle && - c.p.shearAngle == b.c.p.shearAngle && - c.p.shearAxis == b.c.p.shearAxis && - sAIRealMath->AIRealMatrixEqual((AIRealMatrix *)&c.p.transform, (AIRealMatrix *)&b.c.p.transform)) - { - result = true; - } - break; - } - case kCustomColor: - { - if (c.c.color == b.c.c.color && - c.c.tint == b.c.c.tint) - { - result = true; - } - break; - } - case kGradient: - { - if (c.b.gradient == b.c.b.gradient && - c.b.gradientOrigin.h == b.c.b.gradientOrigin.h && - c.b.gradientOrigin.v == b.c.b.gradientOrigin.v && - c.b.gradientAngle == b.c.b.gradientAngle && - c.b.gradientLength == b.c.b.gradientLength && - sAIRealMath->AIRealMatrixEqual((AIRealMatrix *)&c.b.matrix, (AIRealMatrix *)&b.c.b.matrix) && - c.b.hiliteAngle == b.c.b.hiliteAngle && - c.b.hiliteLength == b.c.b.hiliteLength) - { - result = true; - } - break; - } - case kThreeColor: - { - if (c.rgb.red == b.c.rgb.red && - c.rgb.green == b.c.rgb.green && - c.rgb.blue == b.c.rgb.blue) - { - result = true; - } - break; - } - } - } - - return result; -} - - -//-------------------------------------------------------------------------------- -// PartialPaint implementation -//-------------------------------------------------------------------------------- - -inline PartialPaint::PartialPaint () : - fPaint() -{ - fMap.kind = false; -} - -inline PartialPaint::PartialPaint (const AIColor& color, const AIColorMap& colormap) : - fPaint(static_cast(color)), fMap(colormap) -{ -} - -inline bool PartialPaint::IsFullyDefined () const -{ - bool result = false; - - if (fMap.kind) - { - switch (fPaint.kind) - { - case kGrayColor: - result = fMap.c.g.gray != 0; - break; - - case kThreeColor: - result = fMap.c.rgb.red && - fMap.c.rgb.green && - fMap.c.rgb.blue; - break; - - case kFourColor: - result = fMap.c.f.cyan && - fMap.c.f.magenta && - fMap.c.f.yellow && - fMap.c.f.black; - break; - - case kCustomColor: - result = fMap.c.c.color && - fMap.c.c.tint; - break; - - case kPattern: - result = fMap.c.p.pattern && - fMap.c.p.pattern && - fMap.c.p.shiftDist && - fMap.c.p.shiftAngle && - fMap.c.p.scale && - fMap.c.p.rotate && - fMap.c.p.reflect && - fMap.c.p.reflectAngle && - fMap.c.p.shearAngle && - fMap.c.p.shearAxis && - fMap.c.p.transform; - break; - - case kGradient: - result = fMap.c.b.gradient && - fMap.c.b.gradient && - fMap.c.b.gradientOrigin && - fMap.c.b.gradientAngle && - fMap.c.b.gradientLength && - fMap.c.b.matrix && - fMap.c.b.hiliteAngle && - fMap.c.b.hiliteLength; - break; - } - } - - return result; -} - -// end of namespace ai -} - - -#endif +#ifndef _IAIPAINT_H_ +#define _IAIPAINT_H_ + +/* + * Name: IAIPaint.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: C++ wrapper class for AIColor. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "AIColor.h" +#include "AIRealMath.h" + +namespace ai { + +/** This class describes how an art object is painted using + a fully-defined paint. Use the \c PartialPaint class for + partially-defined paints. */ +class Paint : public AIColor { +public: + /** Casts a color object to a \c Paint object. */ + static Paint& cast (AIColor& c); + /** Casts a constant color object to a constant \c Paint object. */ + static const Paint& constcast (const AIColor& c); + + /** Constructor. Creates an empty paint object. */ + Paint (); + + /** Equality operator. */ + bool operator == (const AIColor& b) const; +}; + + +//-------------------------------------------------------------------------------- +// A partial paint describes a paint that may have some unknown values. +//-------------------------------------------------------------------------------- + +/** This class describes how an art object is painted using + a partially-defined paint. Use the \c Paint class for + fully-defined paints. */ +class PartialPaint { +public: + /** Constructor. Creates an empty partial-paint object. */ + PartialPaint (); + /** Constructor. Creates an initialized partial-paint object. + @param color The partially-defined color object. + @param colormap The color map object that describes which + fields in the color object are valid. + */ + PartialPaint (const AIColor& color, const AIColorMap& colormap); + + /** Reports whether this partial-paint object is fully determined + @return True if all color fields are defined, false otherwise. + */ + bool IsFullyDefined () const; + +protected: + Paint fPaint; + AIColorMap fMap; +}; + + +//-------------------------------------------------------------------------------- +// Paint implementation +//-------------------------------------------------------------------------------- + +inline Paint& Paint::cast (AIColor& c) +{ + return static_cast(c); +} + +inline const Paint& Paint::constcast (const AIColor& c) +{ + return static_cast(c); +} + +inline Paint::Paint () +{ + kind = kNoneColor; +} + +inline bool Paint::operator == (const AIColor& b) const +{ + + bool result = false; + + if (kind == b.kind) + { + switch (kind) + { + case kGrayColor: + { + if (c.g.gray == b.c.g.gray) + { + result = true; + } + break; + } + case kFourColor: + { + if (c.f.cyan == b.c.f.cyan && + c.f.magenta == b.c.f.magenta && + c.f.yellow == b.c.f.yellow && + c.f.black == b.c.f.black) + { + result = true; + } + break; + } + case kPattern: + { + if (c.p.pattern == b.c.p.pattern && + c.p.shiftDist == b.c.p.shiftDist && + c.p.shiftAngle == b.c.p.shiftAngle && + c.p.scale.h == b.c.p.scale.h && + c.p.scale.v == b.c.p.scale.v && + c.p.rotate == b.c.p.rotate && + c.p.reflect == b.c.p.reflect && + c.p.reflectAngle == b.c.p.reflectAngle && + c.p.shearAngle == b.c.p.shearAngle && + c.p.shearAxis == b.c.p.shearAxis && + sAIRealMath->AIRealMatrixEqual((AIRealMatrix *)&c.p.transform, (AIRealMatrix *)&b.c.p.transform)) + { + result = true; + } + break; + } + case kCustomColor: + { + if (c.c.color == b.c.c.color && + c.c.tint == b.c.c.tint) + { + result = true; + } + break; + } + case kGradient: + { + if (c.b.gradient == b.c.b.gradient && + c.b.gradientOrigin.h == b.c.b.gradientOrigin.h && + c.b.gradientOrigin.v == b.c.b.gradientOrigin.v && + c.b.gradientAngle == b.c.b.gradientAngle && + c.b.gradientLength == b.c.b.gradientLength && + sAIRealMath->AIRealMatrixEqual((AIRealMatrix *)&c.b.matrix, (AIRealMatrix *)&b.c.b.matrix) && + c.b.hiliteAngle == b.c.b.hiliteAngle && + c.b.hiliteLength == b.c.b.hiliteLength) + { + result = true; + } + break; + } + case kThreeColor: + { + if (c.rgb.red == b.c.rgb.red && + c.rgb.green == b.c.rgb.green && + c.rgb.blue == b.c.rgb.blue) + { + result = true; + } + break; + } + } + } + + return result; +} + + +//-------------------------------------------------------------------------------- +// PartialPaint implementation +//-------------------------------------------------------------------------------- + +inline PartialPaint::PartialPaint () : + fPaint() +{ + fMap.kind = false; +} + +inline PartialPaint::PartialPaint (const AIColor& color, const AIColorMap& colormap) : + fPaint(static_cast(color)), fMap(colormap) +{ +} + +inline bool PartialPaint::IsFullyDefined () const +{ + bool result = false; + + if (fMap.kind) + { + switch (fPaint.kind) + { + case kGrayColor: + result = fMap.c.g.gray != 0; + break; + + case kThreeColor: + result = fMap.c.rgb.red && + fMap.c.rgb.green && + fMap.c.rgb.blue; + break; + + case kFourColor: + result = fMap.c.f.cyan && + fMap.c.f.magenta && + fMap.c.f.yellow && + fMap.c.f.black; + break; + + case kCustomColor: + result = fMap.c.c.color && + fMap.c.c.tint; + break; + + case kPattern: + result = fMap.c.p.pattern && + fMap.c.p.shiftDist && + fMap.c.p.shiftAngle && + fMap.c.p.scale && + fMap.c.p.rotate && + fMap.c.p.reflect && + fMap.c.p.reflectAngle && + fMap.c.p.shearAngle && + fMap.c.p.shearAxis && + fMap.c.p.transform; + break; + + case kGradient: + result = fMap.c.b.gradient && + fMap.c.b.gradientOrigin && + fMap.c.b.gradientAngle && + fMap.c.b.gradientLength && + fMap.c.b.matrix && + fMap.c.b.hiliteAngle && + fMap.c.b.hiliteLength; + break; + } + } + + return result; +} + +// end of namespace ai +} + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIPoint.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIPoint.h index 9ba5914..00815ab 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIPoint.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIPoint.h @@ -1,127 +1,130 @@ -/* -* Name: IAIPoint.h -* $Revision: 1 $ -* Author: -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2008 Adobe Systems Incorporated -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#ifndef __IAIPoint__ -#define __IAIPoint__ - -/* -* Includes -*/ - -#include "AITypes.h" -#include -#include - -namespace ai -{ - namespace PointTraits - { - template - struct PointStruct_Traits - { - - }; - template<> - struct PointStruct_Traits - { - //current implementation is compatible with ADMPoint, - //but we plan to make is same for win and mac. - #ifdef WIN_ENV - typedef ai::int32 Coordinates_t; - #endif - #ifdef MAC_ENV - typedef short Coordinates_t; - #endif - }; - template<> - struct PointStruct_Traits - { - typedef AIReal Coordinates_t; - }; - } -} -/* -* Wrapper Class -*/ -//Class used to working with point -template -class IAIPointImpl : public S -{ -private: - typedef typename ai::PointTraits::PointStruct_Traits::Coordinates_t CoordinateType; -public: - IAIPointImpl() - { - this->h = 0; - this->v = 0; - } - IAIPointImpl(const S& p) - { - this->h = p.h; - this->v = p.v; - } - IAIPointImpl(CoordinateType h, CoordinateType v) - { - this->h = h; - this->v = v; - } - IAIPointImpl &operator = (const S& p) - {this->h = p.h; this->v =p.v; return *this;} - IAIPointImpl &operator ++() - { this->operator += (1); return *this;} - IAIPointImpl &operator --() - { this->operator += (-1); return *this;} - - S operator + (const S& a) const - { return IAIPointImpl(this->h+a.h,this->v+a.v);} - S operator - (const S& a) const - { return IAIPointImpl(this->h-a.h,this->v-a.v);} - S operator + (const CoordinateType& a) const - { return IAIPointImpl(this->h+a,this->v+a);} - S operator - (const CoordinateType& a) const - { return IAIPointImpl(this->h-a,this->v-a);} - - AIBoolean operator == (const S& a) const - { return (a.h == this->h && a.v == this->v);} - AIBoolean operator != (const S& a) const - { return !(*this == a);} - S operator * (CoordinateType s) const - { return IAIPointImpl(this->h * s, this->v * s);} - S operator / (CoordinateType s) const - { return IAIPointImpl(this->h / s, this->v / s);} - void operator -() - { this->h = -this->h; this->v = -this->v; return;} - - IAIPointImpl &operator += (const S& p) - { this->h+=p.h; this->v+=p.v; return *this;} - IAIPointImpl &operator -= (const S& p) - { this->h -= p.h; this->v -= p.v; return *this;} - - IAIPointImpl &operator *= (CoordinateType s) - { this->h*=s; this->v*=s; return *this;} - IAIPointImpl &operator /= (CoordinateType s) - { - if(s){this->h/=s; this->v/=s;} - else {this->h = 0; this->v = 0;} - return *this; - } -}; - -typedef IAIPointImpl IAIRealPoint; -typedef IAIPointImpl IAIPoint; - -#endif //__IAIPoint__ \ No newline at end of file +/* +* Name: IAIPoint.h +* $Revision: 1 $ +* Author: +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2008 Adobe Systems Incorporated +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +#ifndef __IAIPoint__ +#define __IAIPoint__ + +/* +* Includes +*/ + +#include "AIBasicTypes.h" +#include +#include + +namespace ai +{ + namespace PointTraits + { + template + struct PointStruct_Traits + { + + }; + template<> + struct PointStruct_Traits + { + //current implementation is compatible with ADMPoint, + //but we plan to make is same for win and mac. + #ifdef WIN_ENV + typedef ai::int32 Coordinates_t; + #endif + #ifdef MAC_ENV + typedef short Coordinates_t; + #endif + #ifdef LINUX_ENV + typedef short Coordinates_t; + #endif + }; + template<> + struct PointStruct_Traits + { + typedef AIReal Coordinates_t; + }; + } +} +/* +* Wrapper Class +*/ +//Class used to working with point +template +class IAIPointImpl : public S +{ +private: + typedef typename ai::PointTraits::PointStruct_Traits::Coordinates_t CoordinateType; +public: + IAIPointImpl() + { + this->h = 0; + this->v = 0; + } + IAIPointImpl(const S& p) + { + this->h = p.h; + this->v = p.v; + } + IAIPointImpl(CoordinateType h, CoordinateType v) + { + this->h = h; + this->v = v; + } + IAIPointImpl &operator = (const S& p) + {this->h = p.h; this->v =p.v; return *this;} + IAIPointImpl &operator ++() + { this->operator += (1); return *this;} + IAIPointImpl &operator --() + { this->operator += (-1); return *this;} + + S operator + (const S& a) const + { return IAIPointImpl(this->h+a.h,this->v+a.v);} + S operator - (const S& a) const + { return IAIPointImpl(this->h-a.h,this->v-a.v);} + S operator + (const CoordinateType& a) const + { return IAIPointImpl(this->h+a,this->v+a);} + S operator - (const CoordinateType& a) const + { return IAIPointImpl(this->h-a,this->v-a);} + + AIBoolean operator == (const S& a) const + { return (a.h == this->h && a.v == this->v);} + AIBoolean operator != (const S& a) const + { return !(*this == a);} + S operator * (CoordinateType s) const + { return IAIPointImpl(this->h * s, this->v * s);} + S operator / (CoordinateType s) const + { return IAIPointImpl(this->h / s, this->v / s);} + void operator -() + { this->h = -this->h; this->v = -this->v; return;} + + IAIPointImpl &operator += (const S& p) + { this->h+=p.h; this->v+=p.v; return *this;} + IAIPointImpl &operator -= (const S& p) + { this->h -= p.h; this->v -= p.v; return *this;} + + IAIPointImpl &operator *= (CoordinateType s) + { this->h*=s; this->v*=s; return *this;} + IAIPointImpl &operator /= (CoordinateType s) + { + if(s){this->h/=s; this->v/=s;} + else {this->h = 0; this->v = 0;} + return *this; + } +}; + +typedef IAIPointImpl IAIRealPoint; +typedef IAIPointImpl IAIPoint; + +#endif //__IAIPoint__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRect.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRect.h index c0b44c8..99a32ea 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRect.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRect.h @@ -1,243 +1,247 @@ -/* -* Name: IAIRect.h -* $Revision: 1 $ -* Author: -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2008 Adobe Systems Incorporated -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#ifndef __IAIRect__ -#define __IAIRect__ - -/* -* Includes -*/ - -#include "AITypes.h" -#include -#include -#include "AIBasicUtilities.h" - -namespace ai -{ - template - struct Absolute - { - static T Absolute_Val(T a){ - return ::abs(a); - } - }; - - template<> - struct Absolute - { - static AIReal Absolute_Val(AIReal a){ - return ::fabs(a); - } - }; - - namespace RectTraits - { - template - struct RectStruct_Traits - { - - }; - template<> - struct RectStruct_Traits - { - typedef AIPoint Point_t; - //current implementation is compatible with ADMRect, - //but we plan to make is same for win and mac. - #ifdef WIN_ENV - typedef ai::int32 Coordinates_t; - #endif - #ifdef MAC_ENV - typedef short Coordinates_t; - #endif - typedef Absolute ABS_t; - }; - template<> - struct RectStruct_Traits - { - typedef AIRealPoint Point_t; - typedef AIReal Coordinates_t; - typedef Absolute ABS_t; - }; - } -} -/* -* Wrapper Class -*/ -//Class used to working with Rectangles -template -class IAIRectImpl : public T -{ -private: - typedef typename ai::RectTraits::RectStruct_Traits::ABS_t AbsoluteFunction; - typedef typename ai::RectTraits::RectStruct_Traits::Point_t PointType; - typedef typename ai::RectTraits::RectStruct_Traits::Coordinates_t CoordinateType; -public: - IAIRectImpl(){} - IAIRectImpl(const T& rect) - { - this->left = rect.left; - this->top = rect.top; - this->right = rect.right; - this->bottom = rect.bottom; - } - - IAIRectImpl(const PointType& a) - { - this->left = a.h; - this->right = a.h; - this->top = a.v; - this->bottom = a.v; - } - - IAIRectImpl(const PointType& a, const PointType& b) - { - this->left = ai::Min(a.h, b.h); - this->right = ai::Max(a.h, b.h); - this->top = ai::Min(a.v, b.v); - this->bottom = ai::Max(a.v, b.v); - } - - IAIRectImpl(CoordinateType l, CoordinateType t, CoordinateType r, CoordinateType b) - { - this->left = l; - this->top = t; - this->right = r; - this->bottom = b; - } - - CoordinateType Width() const - { return AbsoluteFunction::Absolute_Val(this->right - this->left);} - CoordinateType Height() const - { return AbsoluteFunction::Absolute_Val(this->top - this->bottom);} - - AIBoolean IsEmpty() const - { return (this->top == this->bottom && this->right == this->left); } - void SetEmpty() - {this->left = this->top = this->right = this->bottom = 0; } - - AIBoolean IsNormalized() const - {return this->left <= this->right && this->top <= this->bottom; } - void Normalize() { - if (this->left > this->right) - { - CoordinateType saveLeft = this->left; this->left = this->right; this->right = saveLeft; - } - if (this->top > this->bottom) - { - CoordinateType saveTop = this->top; this->top = this->bottom; this->bottom = saveTop; - } - } - - AIBoolean Contains(const PointType& p) const{ - return this->left <= p.h && this->right >= p.h && this->top <= p.v && this->bottom >= p.v; } - AIBoolean Contains(const T& r) const{ - return this->left <= r.left && this->right >= r.left && this->top <= r.top && this->bottom >= r.top && - this->left <= r.right && this->right >= r.right && this->top <= r.bottom && this->bottom >= r.bottom; } - - CoordinateType Area() const - {return Width() * Height(); } - PointType Center() const{ - PointType center; - center.h = (this->left + this->right) / 2; - center.v = (this->top + this->bottom) / 2; - return center; - } - AIBoolean Overlaps(const T& r) const{ - return this->right >= r.left && this->left <= r.right && - this->bottom >= r.top && this->top <= r.bottom;} - - IAIRectImpl& operator ++ () { - this->operator += (1); return *this; } - IAIRectImpl& operator -- () { - this->operator -= (1); return *this; } - IAIRectImpl& operator += (CoordinateType n) { - this->left -= n; this->top -= n; this->right += n; this->bottom += n; return *this; } - IAIRectImpl& operator -= (CoordinateType n) { - this->operator += (-n); return *this; } - IAIRectImpl& operator += (const PointType& p) { - this->left += p.h; this->top += p.v; this->right += p.h; this->bottom += p.v; return *this; } - IAIRectImpl& operator -= (PointType& p) { - this->left -= p.h; this->top -= p.v; this->right -= p.h; this->bottom -= p.v; return *this; } - - IAIRectImpl& operator = (const PointType& p) { - this->left = this->right = p.h; this->top = this->bottom = p.v; - return *this; } - void Inset(CoordinateType h, CoordinateType v){ - this->left += h; this->top += v; - this->right -= h; this->bottom -= v; } - void Inflate(CoordinateType h, CoordinateType v) { - this->left -= h; this->top -= v; - this->right += h; this->bottom += v; } - void Offset(CoordinateType h, CoordinateType v){ - this->left += h; this->top += v; - this->right += h; this->bottom += v; } - void Union(const PointType& a) { - this->left = ai::Min(this->left, a.h); - this->top = ai::Min(this->top, a.v); - this->right = ai::Max(this->right, a.h); - this->bottom = ai::Max(this->bottom, a.v); - } - void Union(const T& a){ - this->left = ai::Min(a.left, this->left); - this->top = ai::Min(a.top, this->top); - this->right = ai:: Max(a.right, this->right); - this->bottom = ai::Max( a.bottom, this->bottom);} - void Union(const T& a, const T& b) { - this->left = ai::Min(a.left, b.left); - this->top = ai::Min(a.top, b.top); - this->right = ai::Max(a.right, b.right); - this->bottom = ai::Max(a.bottom, b.bottom); } - void Intersect(const T& a) { - this->left = ai::Max(this->left, a.left); - this->top = ai::Max(this->top, a.top); - this->right = ai::Min(this->right, a.right); - this->bottom = ai::Min(this->bottom, a.bottom); - - if (!Overlaps(a)) - SetEmpty(); - } - void Intersect(const T& a, const T& b) { - this->left = ai::Max(a.left, b.left); - this->top = ai::Max(a.top, b.top); - this->right = ai::Min(a.right, b.right); - this->bottom = ai::Min(a.bottom, b.bottom); - - if (!Overlaps(a)) - SetEmpty(); - } - - void Center(const T& centerRect) { - Offset(centerRect.left + ((centerRect.right - centerRect.left) - Width()) / 2, - centerRect.top + ((centerRect.bottom - centerRect.top) - Height()) / 2); - } - - AIBoolean operator == (const T& a) const - { - return a.left == this->left && - a.top == this->top && - a.right == this->right && - a.bottom == this->bottom; - } - AIBoolean operator != (const T& a) const - {return !(*this == a);} -}; - -typedef IAIRectImpl IAIRealRect; -typedef IAIRectImpl IAIRect; - -#endif // __IAIRect__ +/* +* Name: IAIRect.h +* $Revision: 1 $ +* Author: +* +* ADOBE SYSTEMS INCORPORATED +* Copyright 2008 Adobe Systems Incorporated +* All rights reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file +* in accordance with the terms of the Adobe license agreement +* accompanying it. If you have received this file from a source other +* than Adobe, then your use, modification, or distribution of it +* requires the prior written permission of Adobe. +* +*/ + +#ifndef __IAIRect__ +#define __IAIRect__ + +/* +* Includes +*/ + +#include "AIBasicTypes.h" +#include +#include +#include +#include "AIBasicUtilities.h" + +namespace ai +{ + template + struct Absolute + { + static T Absolute_Val(T a){ + return ::abs(a); + } + }; + + template<> + struct Absolute + { + static AIReal Absolute_Val(AIReal a){ + return ::fabs(a); + } + }; + + namespace RectTraits + { + template + struct RectStruct_Traits + { + + }; + template<> + struct RectStruct_Traits + { + typedef AIPoint Point_t; + //current implementation is compatible with ADMRect, + //but we plan to make is same for win and mac. + #ifdef WIN_ENV + typedef ai::int32 Coordinates_t; + #endif + #ifdef MAC_ENV + typedef short Coordinates_t; + #endif + #ifdef LINUX_ENV + typedef short Coordinates_t; + #endif + typedef Absolute ABS_t; + }; + template<> + struct RectStruct_Traits + { + typedef AIRealPoint Point_t; + typedef AIReal Coordinates_t; + typedef Absolute ABS_t; + }; + } +} +/* +* Wrapper Class +*/ +//Class used to working with Rectangles +template +class IAIRectImpl : public T +{ +private: + typedef typename ai::RectTraits::RectStruct_Traits::ABS_t AbsoluteFunction; + typedef typename ai::RectTraits::RectStruct_Traits::Point_t PointType; + typedef typename ai::RectTraits::RectStruct_Traits::Coordinates_t CoordinateType; +public: + IAIRectImpl(){} + IAIRectImpl(const T& rect) + { + this->left = rect.left; + this->top = rect.top; + this->right = rect.right; + this->bottom = rect.bottom; + } + + IAIRectImpl(const PointType& a) + { + this->left = a.h; + this->right = a.h; + this->top = a.v; + this->bottom = a.v; + } + + IAIRectImpl(const PointType& a, const PointType& b) + { + this->left = ai::Min(a.h, b.h); + this->right = ai::Max(a.h, b.h); + this->top = ai::Min(a.v, b.v); + this->bottom = ai::Max(a.v, b.v); + } + + IAIRectImpl(CoordinateType l, CoordinateType t, CoordinateType r, CoordinateType b) + { + this->left = l; + this->top = t; + this->right = r; + this->bottom = b; + } + + CoordinateType Width() const + { return AbsoluteFunction::Absolute_Val(this->right - this->left);} + CoordinateType Height() const + { return AbsoluteFunction::Absolute_Val(this->top - this->bottom);} + + AIBoolean IsEmpty() const + { return (this->top == this->bottom && this->right == this->left); } + void SetEmpty() + {this->left = this->top = this->right = this->bottom = 0; } + + AIBoolean IsNormalized() const + {return this->left <= this->right && this->top <= this->bottom; } + void Normalize() { + if (this->left > this->right) + { + CoordinateType saveLeft = this->left; this->left = this->right; this->right = saveLeft; + } + if (this->top > this->bottom) + { + CoordinateType saveTop = this->top; this->top = this->bottom; this->bottom = saveTop; + } + } + + AIBoolean Contains(const PointType& p) const{ + return this->left <= p.h && this->right >= p.h && this->top <= p.v && this->bottom >= p.v; } + AIBoolean Contains(const T& r) const{ + return this->left <= r.left && this->right >= r.left && this->top <= r.top && this->bottom >= r.top && + this->left <= r.right && this->right >= r.right && this->top <= r.bottom && this->bottom >= r.bottom; } + + CoordinateType Area() const + {return Width() * Height(); } + PointType Center() const{ + PointType center; + center.h = (this->left + this->right) / 2; + center.v = (this->top + this->bottom) / 2; + return center; + } + AIBoolean Overlaps(const T& r) const{ + return this->right >= r.left && this->left <= r.right && + this->bottom >= r.top && this->top <= r.bottom;} + + IAIRectImpl& operator ++ () { + this->operator += (1); return *this; } + IAIRectImpl& operator -- () { + this->operator -= (1); return *this; } + IAIRectImpl& operator += (CoordinateType n) { + this->left -= n; this->top -= n; this->right += n; this->bottom += n; return *this; } + IAIRectImpl& operator -= (CoordinateType n) { + this->operator += (-n); return *this; } + IAIRectImpl& operator += (const PointType& p) { + this->left += p.h; this->top += p.v; this->right += p.h; this->bottom += p.v; return *this; } + IAIRectImpl& operator -= (PointType& p) { + this->left -= p.h; this->top -= p.v; this->right -= p.h; this->bottom -= p.v; return *this; } + + IAIRectImpl& operator = (const PointType& p) { + this->left = this->right = p.h; this->top = this->bottom = p.v; + return *this; } + void Inset(CoordinateType h, CoordinateType v){ + this->left += h; this->top += v; + this->right -= h; this->bottom -= v; } + void Inflate(CoordinateType h, CoordinateType v) { + this->left -= h; this->top -= v; + this->right += h; this->bottom += v; } + void Offset(CoordinateType h, CoordinateType v){ + this->left += h; this->top += v; + this->right += h; this->bottom += v; } + void Union(const PointType& a) { + this->left = ai::Min(this->left, a.h); + this->top = ai::Min(this->top, a.v); + this->right = ai::Max(this->right, a.h); + this->bottom = ai::Max(this->bottom, a.v); + } + void Union(const T& a){ + this->left = ai::Min(a.left, this->left); + this->top = ai::Min(a.top, this->top); + this->right = ai:: Max(a.right, this->right); + this->bottom = ai::Max( a.bottom, this->bottom);} + void Union(const T& a, const T& b) { + this->left = ai::Min(a.left, b.left); + this->top = ai::Min(a.top, b.top); + this->right = ai::Max(a.right, b.right); + this->bottom = ai::Max(a.bottom, b.bottom); } + void Intersect(const T& a) { + this->left = ai::Max(this->left, a.left); + this->top = ai::Max(this->top, a.top); + this->right = ai::Min(this->right, a.right); + this->bottom = ai::Min(this->bottom, a.bottom); + + if (!Overlaps(a)) + SetEmpty(); + } + void Intersect(const T& a, const T& b) { + this->left = ai::Max(a.left, b.left); + this->top = ai::Max(a.top, b.top); + this->right = ai::Min(a.right, b.right); + this->bottom = ai::Min(a.bottom, b.bottom); + + if (!Overlaps(a)) + SetEmpty(); + } + + void Center(const T& centerRect) { + Offset(centerRect.left + ((centerRect.right - centerRect.left) - Width()) / 2, + centerRect.top + ((centerRect.bottom - centerRect.top) - Height()) / 2); + } + + AIBoolean operator == (const T& a) const + { + return a.left == this->left && + a.top == this->top && + a.right == this->right && + a.bottom == this->bottom; + } + AIBoolean operator != (const T& a) const + {return !(*this == a);} +}; + +typedef IAIRectImpl IAIRealRect; +typedef IAIRectImpl IAIRect; + +#endif // __IAIRect__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRef.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRef.h index 4663b28..eabba53 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRef.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRef.h @@ -1,244 +1,310 @@ -#ifndef _IAIREF_H_ -#define _IAIREF_H_ - -/* - * Name: IAIRef.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Reference counted objects. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - /** @file IAIRef.h */ - -#include "AICountedObject.h" - -namespace ai { -// start of namespace ai - - -/** Not instantiated. Used only to limit the potential - for namespace collisions for the declaration of Replace */ -class RefReplaceParam; - -enum IncrementPolicy -{ - DoIncrement, /// Cause the reference count of newly assigned objects to be incremented - DoNotIncrement /// Prevent the reference count of newly assigned objects from being incremented -}; - -/** Returns a valid reference to the counted-object suite, which can be passed - to \c ai::IAIRef functions. - - This function must be defined by each plug-in that uses this header. - This header defines a default implementation for the function, which assumes that - the global variable \c sAICountedObject contains a pointer to the suite, and - returns the value of that pointer. - - If your plug-in needs a different definition, you must first disable - the default definition in this file by setting the constant -
#define AICOUNTEDOBJECTSUITE_DEFINED
to 1. - You can then add your own definition of the function to the plug-in. - For example, the file \c IAIRefAutoSuite.cpp supplies a definition - of the function that assumes the counted object suite is supplied - using the facilities of \c AutoSuite.h. -*/ - -extern AICountedObjectSuite *GetAICountedObjectSuitePtr(); - -/** Many object types are reference counted, such as dictionaries - (\c #AIDictionaryRef) and arrays (\c #AIArrayRef). When a plug-in acquires - such an object, the reference count is automatically incremented. - The plug-in is responsible for releasing the object when it is no - longer needed, to avoid memory leaks. - - You can avoid the responsibility for memory management by using the - Ref template class. This is a "smart pointer" class which automatically - takes care of incrementing and decrementing the count of the referenced object. - For example the following code manipulates a hypothetical art object's - dictionary without reference counting. - - @code -Ref dict1, dict2; -sAIArt->GetDictionary(art, dict1 << Replace); -sAIDictionary->CreateDictionary(dict2 << Replace); -sAIDictionary->SetBooleanEntry(dict2, "my boolean", true); -sAIDictionary->SetDictEntry(dict1, "first dictionary", dict2); -sAIDictionary->CreateDictionary(dict2 << Replace); -sAIDictionary->SetBooleanEntry(dict2, "my boolean", false); -sAIDictionary->SetDictEntry(dict1, "second dictionary", dict2); - @endcode - - AIEntryRefs retrieved via AIDictionarySuite::Get and passed into functions - like AIDictionarySuite::Set or AIEntrySuite::To* functions (ex. ToInteger, - also AsUnicodeString) end up with no net change to their reference count - since the former increments the count and the latter decrement the count. - However functions like AIEntrySuite::GetType and AIEntrySuite::Equiv do not - decrement the reference count so if no other functions are called the count - must be decremented, which can be done as follows: - - @code -Ref entry(sAIDictionary->Get(dict, key1), ai::DontIncrement); -gEntryType = sAIEntry->GetType(entry); -return; - @endcode - - @see \c #AICountedObjectSuite - */ - -template class Ref { -public: - /** Constructs a null reference. */ - Ref () : x(0) {} - - /** Constructs a reference to an object and conditionally increments - the reference count based on 'policy'. */ - Ref (const X& x, IncrementPolicy policy = DoIncrement); - - /** Copy-constructs a reference from another reference, and - increments the reference count. */ - Ref (const Ref& ref); - - /** Destructor. Decrements the reference count. */ - ~Ref (); - - /** Implicit conversion to an X allows a Ref to be used wherever an X - can appear. */ - operator X () const - {return x;} - - /** Assignment function, decrements the reference count of the current - object and conditionally increments the count of the newly assigned - object based on 'policy'. */ - void Assign(const X& x, IncrementPolicy policy = DoIncrement); - - /** Assignment operator, decrements the reference count of the current - object and increments the count of the newly assigned object. */ - Ref& operator= (const Ref& ref); - - /** Comparison operator, tests whether the same objects are identified - by both references. */ - bool operator== (const Ref& ref) const - {return x == ref.x;} - - /** Comparison operator, tests whether the same objects are identified - by both references. */ - bool operator!= (const Ref& ref) const - {return x != ref.x;} - - /** Allows a Ref to be passed to a function that takes an - X*. Releases the current referenced object and expects the - function to assign a new object to the pointer and increment its - reference count. Use the function \c #Replace() for the - dummy parameter \c p. - */ - X* operator<< (void (*f)(const RefReplaceParam& p)); - - /** Allows a Ref to be passed to the \c #AIEntrySuite \c ToXXX - functions. Increments the reference count to offset the - decremented count on the API side, keeping the count correct and - allowing the destructor on the plug-in side to dispose of the object. - */ - Ref& to(); - -protected: - X x; -}; - - -inline void Replace (const RefReplaceParam&) -{ -} - -template Ref::Ref (const X& _x, IncrementPolicy policy) : x(_x) -{ - AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); - if (policy == DoIncrement) - theSuite->AddRef(x); -} - -template Ref::Ref (const Ref& ref) : x(ref.x) -{ - AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); - theSuite->AddRef(x); -} - -template Ref::~Ref () -{ - AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); - theSuite->Release(x); -} - -template void Ref::Assign(const X& _x, IncrementPolicy policy) -{ - if (x != _x) - { - AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); - theSuite->Release(x); - x = _x; - if (policy == DoIncrement) - theSuite->AddRef(x); - } -} - -template Ref& Ref::operator= (const Ref& ref) -{ - if (x != ref.x) - { - AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); - theSuite->Release(x); - x = ref.x; - theSuite->AddRef(x); - } - return *this; -} - -template X* Ref::operator<< (void (*)(const RefReplaceParam &p)) -{ - AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); - theSuite->Release(x); - x = 0; - return &x; -} - -template Ref& Ref::to() -{ - AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); - theSuite->AddRef(x); - - return *this; -} - -// end of namespace ai -} - -#if !AICOUNTEDOBJECTSUITE_DEFINED - -extern "C" -{ - extern AICountedObjectSuite *sAICountedObject; -} - -/** Implements \c #GetAICountedObjectSuitePtr for standard - naked suite pointers. (The pointer to the suite is stored in a global - variable of type \c AICountedObjectSuite*.) */ - -inline AICountedObjectSuite *ai::GetAICountedObjectSuitePtr() -{ - return sAICountedObject; -} - -#endif //AICOUNTEDOBJECTSUITE_DEFINED - -#endif +#ifndef _IAIREF_H_ +#define _IAIREF_H_ + +/* + * Name: IAIRef.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Reference counted objects. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + /** @file IAIRef.h */ + +#include "AICountedObject.h" +#include + +#if AI_AUTO_SUITE_AVAILABLE + #ifndef AICOUNTEDOBJECTSUITE_DEFINED + #define AICOUNTEDOBJECTSUITE_DEFINED 1 + #endif +#endif + + +namespace ai { +// start of namespace ai + + +/** Not instantiated. Used only to limit the potential + for namespace collisions for the declaration of Replace */ +class RefReplaceParam; + +enum IncrementPolicy +{ + DoIncrement, /// Cause the reference count of newly assigned objects to be incremented + DoNotIncrement /// Prevent the reference count of newly assigned objects from being incremented +}; + +/** Returns a valid reference to the counted-object suite, which can be passed + to \c ai::IAIRef functions. + + This function must be defined by each plug-in that uses this header. + This header defines a default implementation for the function, which assumes that + the global variable \c sAICountedObject contains a pointer to the suite, and + returns the value of that pointer. + + If your plug-in needs a different definition, you must first disable + the default definition in this file by setting the constant +
#define AICOUNTEDOBJECTSUITE_DEFINED
to 1. + You can then add your own definition of the function to the plug-in. + For example, the file \c IAIRefAutoSuite.cpp supplies a definition + of the function that assumes the counted object suite is supplied + using the facilities of \c AutoSuite.h. +*/ + +extern AICountedObjectSuite *GetAICountedObjectSuitePtr(); + +/** Many object types are reference counted, such as dictionaries + (\c #AIDictionaryRef) and arrays (\c #AIArrayRef). When a plug-in acquires + such an object, the reference count is automatically incremented. + The plug-in is responsible for releasing the object when it is no + longer needed, to avoid memory leaks. + + You can avoid the responsibility for memory management by using the + Ref template class. This is a "smart pointer" class which automatically + takes care of incrementing and decrementing the count of the referenced object. + For example the following code manipulates a hypothetical art object's + dictionary without reference counting. + + @code +Ref dict1, dict2; +sAIArt->GetDictionary(art, dict1 << Replace); +sAIDictionary->CreateDictionary(dict2 << Replace); +sAIDictionary->SetBooleanEntry(dict2, "my boolean", true); +sAIDictionary->SetDictEntry(dict1, "first dictionary", dict2); +sAIDictionary->CreateDictionary(dict2 << Replace); +sAIDictionary->SetBooleanEntry(dict2, "my boolean", false); +sAIDictionary->SetDictEntry(dict1, "second dictionary", dict2); + @endcode + + AIEntryRefs retrieved via AIDictionarySuite::Get and passed into functions + like AIDictionarySuite::Set or AIEntrySuite::To* functions (ex. ToInteger, + also AsUnicodeString) end up with no net change to their reference count + since the former increments the count and the latter decrement the count. + However functions like AIEntrySuite::GetType and AIEntrySuite::Equiv do not + decrement the reference count so if no other functions are called the count + must be decremented, which can be done as follows: + + @code +Ref entry(sAIDictionary->Get(dict, key1), ai::DontIncrement); +gEntryType = sAIEntry->GetType(entry); +return; + @endcode + + @see \c #AICountedObjectSuite + */ + +template class Ref { +public: + /** Constructs a null reference. */ + Ref () AINOEXCEPT : x(nullptr) {} + + /** Constructs a reference to an object and conditionally increments + the reference count based on 'policy'. */ + Ref (const X& x, IncrementPolicy policy = DoIncrement); + + /** Copy-constructs a reference from another reference, and + increments the reference count. */ + Ref (const Ref& ref); + + /** + Swaps internal reference with other + */ + void swap(Ref& other) AINOEXCEPT + { + std::swap(other.x, x); + } + +#ifdef AI_HAS_RVALUE_REFERENCES + /** + Move Constructor + */ + Ref(Ref&& other) AINOEXCEPT + { + swap(other); + } +#endif + + /** Destructor. Decrements the reference count. */ + ~Ref (); + + /** Implicit conversion to an X allows a Ref to be used wherever an X + can appear. */ + operator X () const AINOEXCEPT + {return x;} + + /** Assignment function, decrements the reference count of the current + object and conditionally increments the count of the newly assigned + object based on 'policy'. */ + void Assign(const X& x, IncrementPolicy policy = DoIncrement); + + /** Assignment operator, decrements the reference count of the current + object and increments the count of the newly assigned object. + Copy and Move Assignment operator. + */ + Ref& operator= (Ref ref) AINOEXCEPT + { + swap(ref); + return *this; + } + + /** Comparison operator, tests whether the same objects are identified + by both references. */ + bool operator== (const Ref& ref) const AINOEXCEPT + {return x == ref.x;} + + /** Comparison operator, tests whether the same objects are identified + by both references. */ + bool operator!= (const Ref& ref) const AINOEXCEPT + {return x != ref.x;} + + /** Allows a Ref to be passed to a function that takes an + X*. Releases the current referenced object and expects the + function to assign a new object to the pointer and increment its + reference count. Use the function \c #Replace() for the + dummy parameter \c p. + */ + X* operator<< (void (*f)(const RefReplaceParam& p)); + + /** Allows a Ref to be passed to the \c #AIEntrySuite \c ToXXX + functions. Increments the reference count to offset the + decremented count on the API side, keeping the count correct and + allowing the destructor on the plug-in side to dispose of the object. + */ + Ref& to(); + +protected: + X x = nullptr; +}; + + +inline void Replace (const RefReplaceParam&) +{ +} + +template Ref::Ref (const X& _x, IncrementPolicy policy) : x(_x) +{ + if (x) + { + AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); + if (policy == DoIncrement) + theSuite->AddRef(x); + } +} + +template Ref::Ref (const Ref& ref) : x(ref.x) +{ + if (x) + { + AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); + theSuite->AddRef(x); + } +} + +template Ref::~Ref () +{ + if (x) + { + AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); + theSuite->Release(x); + } +} + +template void Ref::Assign(const X& _x, IncrementPolicy policy) +{ + if (x != _x) + { + AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); + if (x) + { + theSuite->Release(x); + } + + x = _x; + + if (x) + { + if (policy == DoIncrement) + theSuite->AddRef(x); + } + } +} + +template X* Ref::operator<< (void (*)(const RefReplaceParam &p)) +{ + if (x) + { + AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); + theSuite->Release(x); + } + + x = nullptr; + return &x; +} + +template Ref& Ref::to() +{ + AICountedObjectSuite* theSuite = GetAICountedObjectSuitePtr(); + theSuite->AddRef(x); + + return *this; +} + +template +inline bool operator==(const Ref& ref, std::nullptr_t) AINOEXCEPT +{ + return (ref.operator X() == nullptr); +} + +template +inline bool operator==(std::nullptr_t, const Ref& ref) AINOEXCEPT +{ + return (ref == nullptr); +} + +template +inline bool operator!=(const Ref& ref, std::nullptr_t) AINOEXCEPT +{ + return !(ref == nullptr); + +} + +template +inline bool operator!=(std::nullptr_t, const Ref& ref) AINOEXCEPT +{ + return (ref != nullptr); +} + +// end of namespace ai +} + +#if !AICOUNTEDOBJECTSUITE_DEFINED + +extern "C" +{ + extern AICountedObjectSuite *sAICountedObject; +} + +/** Implements \c #GetAICountedObjectSuitePtr for standard + naked suite pointers. (The pointer to the suite is stored in a global + variable of type \c AICountedObjectSuite*.) */ + +inline AICountedObjectSuite *ai::GetAICountedObjectSuitePtr() +{ + return sAICountedObject; +} + +#endif //AICOUNTEDOBJECTSUITE_DEFINED + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRefAutoSuite.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRefAutoSuite.cpp index 85f7292..e24a443 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRefAutoSuite.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRefAutoSuite.cpp @@ -1,34 +1,34 @@ -/* - * Name: IAIRefAutoSuite.cpp - * $Revision: 1 $ - * Author: dmaclach - * Date: Thursday, March 25, 2004 11:26:12 - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/** @file IAIRefAutoSuite.cpp*/ -#define AICOUNTEDOBJECTSUITE_DEFINED 1 -#include "IAIRef.h" -#include "AutoSuite.h" - -use_suite(AICountedObject) - -/** - This implements the GetAICountedObjectSuitePtr for autosuited AICountedObjectSuites. -*/ - -AICountedObjectSuite *ai::GetAICountedObjectSuitePtr() -{ - return const_cast(sAICountedObject.operator->()); -} +/* + * Name: IAIRefAutoSuite.cpp + * $Revision: 1 $ + * Author: dmaclach + * Date: Thursday, March 25, 2004 11:26:12 + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +/** @file IAIRefAutoSuite.cpp*/ +#define AICOUNTEDOBJECTSUITE_DEFINED 1 +#include "IAIRef.h" +#include "AutoSuite.h" + +use_suite_required(AICountedObject) + +/** + This implements the GetAICountedObjectSuitePtr for autosuited AICountedObjectSuites. +*/ + +AICountedObjectSuite *ai::GetAICountedObjectSuitePtr() +{ + return const_cast(sAICountedObject.operator->()); +} diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.cpp new file mode 100644 index 0000000..d11bb0b --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.cpp @@ -0,0 +1,33 @@ +/************************************************************************* + * ADOBE CONFIDENTIAL + * ___________________ + * + * Copyright 2020 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + **************************************************************************/ + +#include "IAIRepeat.hpp" +#include "AIArt.h" + +namespace ai +{ + namespace RepeatArtUtils + { + bool IsRepeatArt(short type) + { + return (type == kRadialRepeatArt + || type == kGridRepeatArt + || type == kSymmetryArt + || type == kConcentricRepeatArt); + } + } +} diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.hpp new file mode 100644 index 0000000..c6cb0d0 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIRepeat.hpp @@ -0,0 +1,26 @@ +/************************************************************************* + * ADOBE CONFIDENTIAL + * ___________________ + * + * Copyright 2020 Adobe + * All Rights Reserved. + * + * NOTICE: All information contained herein is, and remains + * the property of Adobe and its suppliers, if any. The intellectual + * and technical concepts contained herein are proprietary to Adobe + * and its suppliers and are protected by all applicable intellectual + * property laws, including trade secret and copyright laws. + * Dissemination of this information or reproduction of this material + * is strictly forbidden unless prior written permission is obtained + * from Adobe. + **************************************************************************/ + +#pragma once + +namespace ai +{ + namespace RepeatArtUtils + { + bool IsRepeatArt(short type); + } +} diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIScopedCache.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIScopedCache.hpp new file mode 100644 index 0000000..3a1d0a8 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIScopedCache.hpp @@ -0,0 +1,251 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AIErrorHandler.h" +#include + +/** @file IAIScopedCache.hpp */ + +namespace ai +{ + + /** + BooleanAttributeCache: A class to store boolean attributes. + Attributes are generally specified via some + enumeration. Storage of each attribute value + inside the cache is in a single bit. Additional + storage contains another bit per attribute to + indicate initialization status. + + Sample usage: + + enum class DocumentState : ai::uint8 + { kUnsaved = 0, kInIsolationMode = 1, ... kUsingSpotColor = 30 }; + + using BitStorage = ai::uint32; // Large enough to hold 1 bit for each + // value in enumeration above. + + using DocAttrCache = BooleanAttributeCache ; + + using DocAttrCacheScopeManager = ai::CacheScopeManager ; + DocAttrCacheScopeManager cacheScope; + + ... + + bool docIsUnsaved{ false }, docIsInIsolationMode{ false }; + + if (DocAttrCacheScopeManager::IsCacheValid()) + { + if (DocAttrCacheScopeManager::GetCache()->GetValue(DocumentState::kUnsaved, docIsUnsaved) == false) + { + // Compute and cache value + docIsUnsaved = ComputeDocIsUnsaved(); + MyCacheScopeManager::GetCache()->SetValue(DocumentState::kUnsaved, docIsUnsaved); + } + + if (DocAttrCacheScopeManager::GetCache()->GetValue(DocumentState::kInIsolationMode, docIsInIsolationMode) == false) + { + // Compute and cache value + docIsInIsolationMode = ComputeDocIsInIsolationMode(); + MyCacheScopeManager::GetCache()->SetValue(DocumentState::kInIsolationMode, docIsInIsolationMode); + } + } + else + { + // Compute + docIsUnsaved = ComputeDocIsUnsaved(); + docIsInIsolationMode = ComputeDocIsInIsolationMode(); + + // Do not store as cache is invalid + } + + // Use values + Print(docIsUnsaved); + Print(docIsInIsolationMode); + */ + template + class BooleanAttributeCache + { + public: + // If cached value is found, retrieves it and returns true. + // Otherwise returns false. + bool GetValue(Attribute_t inAttr, bool& outValue) const AINOEXCEPT + { + const auto initialized = IsInitialized(inAttr); + if (initialized) + { + outValue = ((fAttrBits & AttributeToBits(inAttr)) ? true : false); + } + return initialized; + } + void SetValue(Attribute_t inAttr, const bool inValue) AINOEXCEPT + { + const auto flagBit = AttributeToBits(inAttr); + if (inValue) + { + fAttrBits |= flagBit; + } + else + { + fAttrBits &= ~flagBit; + } + fInitBits |= flagBit; + } + void Clear() AINOEXCEPT + { + fInitBits = fAttrBits = 0; + } + + private: + bool IsInitialized(Attribute_t inAttr) const AINOEXCEPT + { + return ((fInitBits & AttributeToBits(inAttr)) ? true : false); + } + Bit_t AttributeToBits(Attribute_t inAttr) const AINOEXCEPT + { + return (1 << static_cast(inAttr)); + } + + private: + Bit_t fAttrBits{ 0 }, fInitBits{ 0 }; + }; + + + /** + CacheScopeManager: Instantiate this class to ensure a valid Cache. + CacheScopeManager instances can be safely nested as + only one Cache object is created even if multiple + CacheScopeManager objects exist. The Cache object is + deleted when the last CacheScopeManager destructs. + The Cache template parameter can be either one or + a combination of the above cache classes or any + other class which can be created and destroyed by + this class. + + Sample usage: + + using MyAttribCache = BooleanAttributeCache ; + using MyCacheScopeManager = CacheScopeManager ; + */ + template + class CacheScopeManager + { + public: + CacheScopeManager() : CacheScopeManager{ false } {} + virtual ~CacheScopeManager() + { + try + { + if (fSuppressor) + { + if (CacheSuppressCount() == 1 && CacheRefCount() != 0) + { + Cache() = std::make_unique(); + --CacheSuppressCount(); + } + } + else + { + if (CacheSuppressCount() == 0 && CacheRefCount() == 1) + { + Cache().reset(); + --CacheRefCount(); + } + } + } + AI_CATCH_ASSERT_NO_RETURN + } + + static bool IsCacheValid() AINOEXCEPT + { + return GetCache() != nullptr; + } + + static Cache_t* GetCache() AINOEXCEPT + { + return Cache().get(); + } + + protected: + CacheScopeManager(bool suppressor) : fSuppressor{ suppressor } + { + if (fSuppressor) + { + if (CacheSuppressCount() == 0 && CacheRefCount() != 0) + { + Cache().reset(); + ++CacheSuppressCount(); + } + } + else + { + if (CacheSuppressCount() == 0 && CacheRefCount() == 0) + { + Cache() = std::make_unique(); + ++CacheRefCount(); + } + } + } + + private: + static std::unique_ptr & Cache() + { + static std::unique_ptr sCache; + return sCache; + } + + static size_t& CacheRefCount() AINOEXCEPT + { + static size_t sCacheRefCount{ 0 }; + return sCacheRefCount; + } + + static size_t& CacheSuppressCount() AINOEXCEPT + { + static size_t sCacheSuppressCount{ 0 }; + return sCacheSuppressCount; + } + + private: + const bool fSuppressor; + }; + + /** + CacheScopeSuppressor: Prevents caching in a scope. + This invalidates cache which may have been + created by CacheScopeManager of the same type + and prevents further caching of that type even + if new instances of CacheScopeManager are + created. + CacheScopeSuppressor instances can be safely + nested. + When the last CacheScopeSuppressor goes out of + scope and we have at least one CacheScopeManager + still in scope, caching is resumed but the cache + is empty and is not restored to the old value + before the first CacheScopeSuppressor came in + scope. + */ + template + class CacheScopeSuppressor : public CacheScopeManager + { + public: + CacheScopeSuppressor() : CacheScopeManager { true } {} + }; + +} // namespace ai diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringFormatUtils.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringFormatUtils.cpp index f710bd9..3e206a4 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringFormatUtils.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringFormatUtils.cpp @@ -1,225 +1,235 @@ -/* - * Name: IAIStringFormatUtils.cpp - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Plug-in side implementation of the - * ai::Locale and ai::NumberFormat object interface. - * This file should NOT be included in the - * core application. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "IAIStringFormatUtils.h" -#include "AIStringFormatUtils.h" -#include "SPBlocks.h" - -#ifdef _IAISTRINGFORMATUTILS_SUITE_INCLUDE_H_ - #include _IAISTRINGFORMATUTILS_SUITE_INCLUDE_H_ -#else - #ifndef _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ - #define _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ 1 - #endif - #if _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ - extern "C" - { - #endif - /** The plug-in using the ai::Locale or the ai::NumberFormat class is required to provide - these global suite pointers. These pointers must be valid prior - to any call to ai::Locale and ai::NumberFormat methods. - */ - extern AIStringFormatUtilsSuite* sAIStringFormatUtils; - extern SPBlocksSuite *sSPBlocks; - - #if _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ - } - #endif // _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ -#endif - -/** Checks the result. If @a result indicates an error, it is - thrown as an ai::Error exception. If result does not indicate - an error, this function simply returns. - @param result result code to check. */ -static void check_result(AIErr result) -{ - if ( result != kNoErr ) - { - throw ai::Error(result); - } -} - -/* ai::Locale methods */ - -std::string ai::Locale::getLocale(const ai::LocaleID id) -{ - ai::AutoBuffer locale; - - sAIStringFormatUtils->GetLocaleString(id, locale); - - if ( locale.GetCount() > 0 ) - { - return std::string(locale.GetBuffer(), locale.GetCount()); - } - else - { - return std::string(); - } -} - -ai::LocaleID ai::Locale::getID(const std::string& locale) -{ - ai::LocaleID id; - sAIStringFormatUtils->GetLocaleID(locale.c_str(), id ); - - return id; -} - -ai::LocaleID ai::Locale::getSystemLocaleID() -{ - ai::LocaleID localeID; - localeID = getID(ai::Locale::getLocale(kSystem)); - - return localeID; -} - -ai::LocaleID ai::Locale::getApplicationLocaleID() -{ - ai::LocaleID localeID; - localeID = getID(ai::Locale::getLocale(kApplication)); - - return localeID; -} - -/* ai::NumberFormat methods */ - -ai::NumberFormat::NumberFormat(void) AINOTHROW -:fImpl(0) -{ -} - -ai::NumberFormat::NumberFormat(const ai::LocaleID locale) -:fImpl(0) -{ - AIErr result = sAIStringFormatUtils->Initialize(*this, locale); - check_result(result); -} - -ai::NumberFormat::NumberFormat(bool /*dummyUseStaticFormatter*/) -:fImpl(0) -{ - AIErr result = sAIStringFormatUtils->InitializeDefaultInstance(*this); - check_result(result); -} - -ai::NumberFormat::NumberFormat (const NumberFormat& s) -: fImpl(0) -{ - AIErr result = sAIStringFormatUtils->Copy(*this, s); - check_result(result); -} - -ai::NumberFormat::~NumberFormat() -{ - if (fImpl) - sAIStringFormatUtils->Destroy(*this); -} - -ai::NumberFormat ai::NumberFormat::getFormat(const ai::LocaleID locale) -{ - if (locale == ai::Locale::kDefault) - return NumberFormat(true); - else - return NumberFormat(locale); -} - -ai::NumberFormat& ai::NumberFormat::operator= (const NumberFormat& rhs) -{ - AIErr result = sAIStringFormatUtils->Copy(*this, rhs); - check_result(result); - return *this; -} - -ai::UnicodeString& ai::NumberFormat::toString(const float value, const ai::int32 precision, ai::UnicodeString& str, - bool padToPrecision) -{ - AIErr result = sAIStringFormatUtils->RealToString(*this, value, precision, padToPrecision, str); - check_result(result); - return str; -} - -ai::UnicodeString& ai::NumberFormat::toString(const ai::int32 value, ai::UnicodeString& str) -{ - AIErr result = sAIStringFormatUtils->IntegerToString(*this, value, str); - check_result(result); - return str; -} - -ai::UnicodeString& ai::NumberFormat::toString(const double value, const ai::int32 precision, ai::UnicodeString& str, - bool padToPrecision) -{ - AIErr result = sAIStringFormatUtils->DoubleToString(*this, value, precision, padToPrecision, str); - check_result(result); - return str; -} - -bool ai::NumberFormat::parseString(const ai::UnicodeString& str, float& value) -{ - AIErr result = sAIStringFormatUtils->StringToReal(*this, str, value); - - if (result == kCannotParseStringError) - return false; - - check_result(result); - - return true; -} - -bool ai::NumberFormat::parseString(const ai::UnicodeString& str, ai::int32& value) -{ - AIErr result = sAIStringFormatUtils->StringToInteger(*this, str, value); - - if (result == kCannotParseStringError) - return false; - - check_result(result); - - return true; -} - -bool ai::NumberFormat::parseString(const ai::UnicodeString& str, double& value) -{ - AIErr result = sAIStringFormatUtils->StringToDouble(*this, str, value); - - if (result == kCannotParseStringError) - return false; - - check_result(result); - - return true; -} - -ai::UnicodeString ai::NumberFormat::getDecimalSeparator() -{ - ai::UnicodeString str; - AIErr result = sAIStringFormatUtils->GetDecimalSeparator(*this, str); - check_result(result); - return str; -} - -ai::UnicodeString ai::NumberFormat::getThousandsSeparator() -{ - ai::UnicodeString str; - AIErr result = sAIStringFormatUtils->GetThousandsSeparator(*this, str); - check_result(result); - return str; -} +/* + * Name: IAIStringFormatUtils.cpp + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Plug-in side implementation of the + * ai::Locale and ai::NumberFormat object interface. + * This file should NOT be included in the + * core application. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "IAIStringFormatUtils.h" +#include "AIStringFormatUtils.h" +#include "SPBlocks.h" + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIStringFormatUtils) +#elif defined(_IAISTRINGFORMATUTILS_SUITE_INCLUDE_H_) + #include _IAISTRINGFORMATUTILS_SUITE_INCLUDE_H_ +#else + #ifndef _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ + #define _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ 1 + #endif + #if _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ + extern "C" + { + #endif + /** The plug-in using the ai::Locale or the ai::NumberFormat class is required to provide + these global suite pointers. These pointers must be valid prior + to any call to ai::Locale and ai::NumberFormat methods. + */ + extern AIStringFormatUtilsSuite* sAIStringFormatUtils; + extern SPBlocksSuite *sSPBlocks; + + #if _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ + } + #endif // _IAISTRINGFORMATUTILS_SUITE_USE_C_LINKAGE_ +#endif + +/** Checks the result. If @a result indicates an error, it is + thrown as an ai::Error exception. If result does not indicate + an error, this function simply returns. + @param result result code to check. */ +static void check_result(AIErr result) +{ + if ( result != kNoErr ) + { + throw ai::Error(result); + } +} + +/* ai::Locale methods */ + +std::string ai::Locale::getLocale(const ai::LocaleID id) +{ + ai::AutoBuffer locale; + + sAIStringFormatUtils->GetLocaleString(id, locale); + + if ( locale.GetCount() > 0 ) + { + auto size = locale.GetCount(); + if (locale[size - 1] == 0) //avoid trailing zero in the std::string + --size; + return std::string(locale.GetBuffer(), size); + } + else + { + return std::string(); + } +} + +ai::LocaleID ai::Locale::getID(const std::string& locale) +{ + ai::LocaleID id; + sAIStringFormatUtils->GetLocaleID(locale.c_str(), id ); + + return id; +} + +ai::LocaleID ai::Locale::getSystemLocaleID() +{ + ai::LocaleID localeID; + localeID = getID(ai::Locale::getLocale(kSystem)); + + return localeID; +} + +ai::LocaleID ai::Locale::getApplicationLocaleID() +{ + ai::LocaleID localeID; + localeID = getID(ai::Locale::getLocale(kApplication)); + + return localeID; +} + +/* ai::NumberFormat methods */ + +ai::NumberFormat::NumberFormat(void) AINOTHROW +:fImpl(0) +{ +} + +ai::NumberFormat::NumberFormat(const ai::LocaleID locale) +:fImpl(0) +{ + AIErr result = sAIStringFormatUtils->Initialize(*this, locale); + check_result(result); +} + +ai::NumberFormat::NumberFormat(bool /*dummyUseStaticFormatter*/) +:fImpl(0) +{ + AIErr result = sAIStringFormatUtils->InitializeDefaultInstance(*this); + check_result(result); +} + +ai::NumberFormat::NumberFormat (const NumberFormat& s) +: fImpl(0) +{ + AIErr result = sAIStringFormatUtils->Copy(*this, s); + check_result(result); +} + +ai::NumberFormat::~NumberFormat() +{ + try + { + if (fImpl) + sAIStringFormatUtils->Destroy(*this); + } + catch (...) {} //avoiding any exception leak in destructor +} + +ai::NumberFormat ai::NumberFormat::getFormat(const ai::LocaleID locale) +{ + if (locale == ai::Locale::kDefault) + return NumberFormat(true); + else + return NumberFormat(locale); +} + +ai::NumberFormat& ai::NumberFormat::operator= (const NumberFormat& rhs) +{ + AIErr result = sAIStringFormatUtils->Copy(*this, rhs); + check_result(result); + return *this; +} + +ai::UnicodeString& ai::NumberFormat::toString(const float value, const ai::int32 precision, ai::UnicodeString& str, + bool padToPrecision) +{ + AIErr result = sAIStringFormatUtils->RealToString(*this, value, precision, padToPrecision, str); + check_result(result); + return str; +} + +ai::UnicodeString& ai::NumberFormat::toString(const ai::int32 value, ai::UnicodeString& str) +{ + AIErr result = sAIStringFormatUtils->IntegerToString(*this, value, str); + check_result(result); + return str; +} + +ai::UnicodeString& ai::NumberFormat::toString(const double value, const ai::int32 precision, ai::UnicodeString& str, + bool padToPrecision) +{ + AIErr result = sAIStringFormatUtils->DoubleToString(*this, value, precision, padToPrecision, str); + check_result(result); + return str; +} + +bool ai::NumberFormat::parseString(const ai::UnicodeString& str, float& value) +{ + AIErr result = sAIStringFormatUtils->StringToReal(*this, str, value); + + if (result == kCannotParseStringError) + return false; + + check_result(result); + + return true; +} + +bool ai::NumberFormat::parseString(const ai::UnicodeString& str, ai::int32& value) +{ + AIErr result = sAIStringFormatUtils->StringToInteger(*this, str, value); + + if (result == kCannotParseStringError) + return false; + + check_result(result); + + return true; +} + +bool ai::NumberFormat::parseString(const ai::UnicodeString& str, double& value) +{ + AIErr result = sAIStringFormatUtils->StringToDouble(*this, str, value); + + if (result == kCannotParseStringError) + return false; + + check_result(result); + + return true; +} + +ai::UnicodeString ai::NumberFormat::getDecimalSeparator() +{ + ai::UnicodeString str; + AIErr result = sAIStringFormatUtils->GetDecimalSeparator(*this, str); + check_result(result); + return str; +} + +ai::UnicodeString ai::NumberFormat::getThousandsSeparator() +{ + ai::UnicodeString str; + AIErr result = sAIStringFormatUtils->GetThousandsSeparator(*this, str); + check_result(result); + return str; +} diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringFormatUtils.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringFormatUtils.h index 6fbe7bb..bb8bbc0 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringFormatUtils.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringFormatUtils.h @@ -1,168 +1,187 @@ -/* - * Name: IAIStringFormatUtils.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Interface to the wrapper class for AIStringFormatUtilsSuite & the - * primary interface for the AI core to the ai::NumberFormat object. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -#ifndef _IAISTRINGFORMATUTILS_H_ -#define _IAISTRINGFORMATUTILS_H_ - - -#include "IAIUnicodeString.h" -#include "IAILocale.h" - - -class CAINumberFormatImpl; - -namespace ai { - -/** Class used for locale-dependent number formatting. Based on the input locale, this class - internally handles the conversion between numbers and strings using the appropriate - decimal and thousands separator characters. */ -class NumberFormat -{ -public: - - /** Empty object constructor. Creates a valid, empty \c NumberFormat instance - that represents the default system setting for number formatting. This method is guaranteed - to not throw any exceptions. - @return The new instance. - */ - explicit NumberFormat (void) AINOTHROW; - - /** Creates an instance for a given locale. - @param locale The locale to be used for formatting. Use \c kDefault for the - current system locale setting. - @return The new instance. - */ - explicit NumberFormat(const ai::LocaleID locale); - - /** Copy constructor. - @return The new instance. - */ - NumberFormat(const NumberFormat& format); - - /** Default destructor */ - ~NumberFormat(); - -private: - /** Constructor that initializes with the static default instance of \c AGL_NumberFormat - @param dummyUseDefaultFormatter Not used. - @return The new instance. - */ - NumberFormat(bool dummyUseDefaultFormatter); - -public: - - /** Creates or retrieves a \c NumberFormat instance for a given locale. - @param locale The locale. Use \c kDefault for the current system locale setting. - @return The new instance for the locale, or the static instance that the application - maintains for the current system locale setting. - @note If you require a new instance for the system locale setting, use the constructor instead. - */ - static NumberFormat getFormat(const ai::LocaleID locale = ai::Locale::kDefault); - - /** Formats a numeric value to a string, using the locale with which this - instance was created. - @param value The numeric value. - @param precision The maximum number of digits allowed after the decimal point. If the input - value has greater precision, the value is rounded down. - @param str [out] A buffer in which to return the formatted string. - @param padToPrecision When true, if the precision of the input value is - less than the maximum, pads the result string with zeros after the - decimal place. When false, does not pad the string. - @return The result string (the same string returned in \c str). - */ - ai::UnicodeString& toString(const float value, const ai::int32 precision, ai::UnicodeString& str, bool padToPrecision = false); - - /** Formats a numeric value to a string, using the locale with which this - instance was created. - @param value The numeric value. - @param str [out] A buffer in which to return the formatted string. - @return The result string (the same string returned in \c str). - */ - ai::UnicodeString& toString(const ai::int32 value, ai::UnicodeString& str); - - /** Formats a numeric value to a string, using the locale with which this - instance was created. - @param value The numeric value. - @param precision The maximum number of digits allowed after the decimal point. If the input - value has greater precision, the value is rounded down. - @param str [out] A buffer in which to return the formatted string. - @param padToPrecision When true, if the precision of the input value is - less than the maximum, pads the result string with zeros after the - decimal place. When false, does not pad the string. - @return The result string (the same string returned in \c str). - */ - ai::UnicodeString& toString(const double value, const ai::int32 precision, ai::UnicodeString& str, bool padToPrecision = false); - - /** Converts a string to a numeric floating-point value, if the string contains a - number formatted according to the locale with which this instance was created. - @param str The string. - @param value [out] A buffer in which to return the numeric value. - @return True if the string could be parsed to a valid numeric value, false otherwise. - */ - bool parseString(const ai::UnicodeString& str, float& value); - - /** Converts a string to a numeric integer value, if the string contains a - number formatted according to the locale with which this instance was created. - @param str The string. - @param value [out] A buffer in which to return the numeric value. - @return True if the string could be parsed to a valid numeric value, false otherwise. - */ - bool parseString(const ai::UnicodeString& str, ai::int32& value); - - /** Converts a string to a numeric floating-point value, if the string contains a - number formatted according to the locale with which this instance was created. - @param str The string. - @param value [out] A buffer in which to return the numeric value. - @return True if the string could be parsed to a valid numeric value, false otherwise. - */ - bool parseString(const ai::UnicodeString& str, double& value); - - /** Equality operator. */ - ai::NumberFormat& operator= (const NumberFormat& rhs); - - /** Retrieves the decimal separator symbol used for the locale with which - this instance was created. - @return The decimal separator character - */ - ai::UnicodeString getDecimalSeparator(); - - /** Retrieves the thousands separator symbol used for the locale with which - this instance was created. - @return The thousands separator character - */ - ai::UnicodeString getThousandsSeparator(); - -public: // internal use public interface - /** Internal */ - void deleteImpl(); - - /** Internal */ - NumberFormat& assign (const NumberFormat& format); - -private: - - CAINumberFormatImpl* fImpl; - -}; - -} // end of namespace ai - -#endif //_IAISTRINGFORMATUTILS_H_ +/* + * Name: IAIStringFormatUtils.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Interface to the wrapper class for AIStringFormatUtilsSuite & the + * primary interface for the AI core to the ai::NumberFormat object. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +#ifndef _IAISTRINGFORMATUTILS_H_ +#define _IAISTRINGFORMATUTILS_H_ + + +#include "IAIUnicodeString.h" +#include "IAILocale.h" + +class CAINumberFormatImpl; + +namespace ai { + + +/** Class used for locale-dependent number formatting. Based on the input locale, this class + internally handles the conversion between numbers and strings using the appropriate + decimal and thousands separator characters. */ +class NumberFormat +{ +public: + + /** Empty object constructor. Creates a valid, empty \c NumberFormat instance + that represents the default system setting for number formatting. This method is guaranteed + to not throw any exceptions. + @return The new instance. + */ + explicit NumberFormat (void) AINOTHROW; + + /** Creates an instance for a given locale. + @param locale The locale to be used for formatting. Use \c kDefault for the + current system locale setting. + @return The new instance. + */ + explicit NumberFormat(const ai::LocaleID locale); + + /** Copy constructor. + @return The new instance. + */ + NumberFormat(const NumberFormat& format); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move constructor. + @return The new instance. + */ + NumberFormat(NumberFormat&& format) AINOEXCEPT : fImpl{format.fImpl} + { + format.fImpl = nullptr; + } +#endif + + /** Default destructor */ + ~NumberFormat(); + +private: + /** Constructor that initializes with the static default instance of \c AGL_NumberFormat + @param dummyUseDefaultFormatter Not used. + @return The new instance. + */ + NumberFormat(bool dummyUseDefaultFormatter); + +public: + + /** Creates or retrieves a \c NumberFormat instance for a given locale. + @param locale The locale. Use \c kDefault for the current system locale setting. + @return The new instance for the locale, or the static instance that the application + maintains for the current system locale setting. + @note If you require a new instance for the system locale setting, use the constructor instead. + */ + static NumberFormat getFormat(const ai::LocaleID locale = ai::Locale::kDefault); + + /** Formats a numeric value to a string, using the locale with which this + instance was created. + @param value The numeric value. + @param precision The maximum number of digits allowed after the decimal point. If the input + value has greater precision, the value is rounded down. + @param str [out] A buffer in which to return the formatted string. + @param padToPrecision When true, if the precision of the input value is + less than the maximum, pads the result string with zeros after the + decimal place. When false, does not pad the string. + @return The result string (the same string returned in \c str). + */ + ai::UnicodeString& toString(const float value, const ai::int32 precision, ai::UnicodeString& str, bool padToPrecision = false); + + /** Formats a numeric value to a string, using the locale with which this + instance was created. + @param value The numeric value. + @param str [out] A buffer in which to return the formatted string. + @return The result string (the same string returned in \c str). + */ + ai::UnicodeString& toString(const ai::int32 value, ai::UnicodeString& str); + + /** Formats a numeric value to a string, using the locale with which this + instance was created. + @param value The numeric value. + @param precision The maximum number of digits allowed after the decimal point. If the input + value has greater precision, the value is rounded down. + @param str [out] A buffer in which to return the formatted string. + @param padToPrecision When true, if the precision of the input value is + less than the maximum, pads the result string with zeros after the + decimal place. When false, does not pad the string. + @return The result string (the same string returned in \c str). + */ + ai::UnicodeString& toString(const double value, const ai::int32 precision, ai::UnicodeString& str, bool padToPrecision = false); + + /** Converts a string to a numeric floating-point value, if the string contains a + number formatted according to the locale with which this instance was created. + @param str The string. + @param value [out] A buffer in which to return the numeric value. + @return True if the string could be parsed to a valid numeric value, false otherwise. + */ + bool parseString(const ai::UnicodeString& str, float& value); + + /** Converts a string to a numeric integer value, if the string contains a + number formatted according to the locale with which this instance was created. + @param str The string. + @param value [out] A buffer in which to return the numeric value. + @return True if the string could be parsed to a valid numeric value, false otherwise. + */ + bool parseString(const ai::UnicodeString& str, ai::int32& value); + + /** Converts a string to a numeric floating-point value, if the string contains a + number formatted according to the locale with which this instance was created. + @param str The string. + @param value [out] A buffer in which to return the numeric value. + @return True if the string could be parsed to a valid numeric value, false otherwise. + */ + bool parseString(const ai::UnicodeString& str, double& value); + + /** Copy assignment operator. */ + ai::NumberFormat& operator= (const NumberFormat& rhs); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move assignment operator. */ + ai::NumberFormat& operator= (NumberFormat&& rhs) AINOEXCEPT + { + std::swap(fImpl, rhs.fImpl); + return *this; + } +#endif + + /** Retrieves the decimal separator symbol used for the locale with which + this instance was created. + @return The decimal separator character + */ + ai::UnicodeString getDecimalSeparator(); + + /** Retrieves the thousands separator symbol used for the locale with which + this instance was created. + @return The thousands separator character + */ + ai::UnicodeString getThousandsSeparator(); + +public: // internal use public interface + /** Internal */ + void deleteImpl(); + + /** Internal */ + NumberFormat& assign (const NumberFormat& format); + +private: + + CAINumberFormatImpl* fImpl; + +}; + +} // end of namespace ai + +#endif //_IAISTRINGFORMATUTILS_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringUtils.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringUtils.h new file mode 100644 index 0000000..89c49d4 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIStringUtils.h @@ -0,0 +1,63 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2018 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include +#include + +namespace ai +{ + namespace detail + { + // Base case: No args to stream + void StreamArgs(std::ostringstream& ss) + { + } + + // Recursively stream each arg in the parameter pack + template + void StreamArgs(std::ostringstream& ss, const T& t, const Ts&... ts) + { + ss << t; + StreamArgs(ss, ts...); + } + + } // namespace detail + + /* + * Stream arbitrary number of arguments to std::string + */ + template + inline std::string StreamArgs(const Args&... args) + { + std::ostringstream ss; + // TODO: In C++17, fold expression can be used to expand the pack + // (ss << ... << args); + detail::StreamArgs(ss, args...); + return ss.str(); + } + + /* + * Utility to create std::string using ostringstream. + */ + template + inline std::string to_string(const T& value) + { + return StreamArgs(value); + } + +} // namespace ai \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUUID.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUUID.h new file mode 100644 index 0000000..34bab1c --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUUID.h @@ -0,0 +1,73 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "AIBasicTypes.h" +#include + +#include "AIHeaderBegin.h" + +namespace ai +{ + constexpr size_t kUUID_SIZE = 16; + + /** Class to keep the data of UUID associated with an art object. + Each art object keeps a unique id which remain same through out + the life of the object in single session. + Utility functions to interact with UUID are provided in suite #AIUUIDSuite + @see \c #AIUUIDSuite */ + class uuid + { + public: + uuid() + {} + + uuid(const ai::uint8 data[kUUID_SIZE]) + { + Set(data); + } + + void Set(const ai::uint8 data[kUUID_SIZE]) + { + memcpy(mData, data, kUUID_SIZE); + } + + bool operator==(const uuid &rhs) const + { + return (0 == memcmp(mData, rhs.mData, kUUID_SIZE)); + } + + bool operator!=(const uuid &rhs) const + { + return (0 != memcmp(mData, rhs.mData, kUUID_SIZE)); + } + + bool operator<(const uuid &rhs) const + { + return (0 > memcmp(mData, rhs.mData, kUUID_SIZE)); + } + + void Clear() + { + memset(mData, 0, kUUID_SIZE); + } + + ai::uint8 mData[kUUID_SIZE] = { 0 }; + }; +} + +#include "AIHeaderEnd.h" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.cpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.cpp index dc3bb9b..656386a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.cpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.cpp @@ -1,505 +1,485 @@ -/* - * Name: IAIUnicodeString.cpp - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Plug-in side implementation of the - * ai::UnicodeString object interface. - * This file should NOT be included in the - * core application. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "IAIUnicodeString.h" -#include "AIUnicodeString.h" - -#include "IAIUnicodeString.inl" - -#ifdef _IAIUNICODESTRING_SUITE_INCLUDE_H_ - #include _IAIUNICODESTRING_SUITE_INCLUDE_H_ -#else - #ifndef _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ - #define _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ 1 - #endif - #if _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ - extern "C" - { - #endif - /** The plug-in using the ai::UnicodeString class is required to provide - these global suite pointers. These pointers must be valid prior - to any call to ai::UnicodeString methods. - */ - extern AIUnicodeStringSuite* sAIUnicodeString; - - #if _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ - } - #endif // _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ - -#endif - -/** Checks the result. If @a result indicates an error, it is - thrown as an ai::Error exception. If result does not indicate - an error, this function simply returns. - @param result result code to check. */ -static void check_result(AIErr result) -{ - if ( result != kNoErr ) - { - throw ai::Error(result); - } -} - - -/////////////////////////////////////////////////////////////////////////////// -// Constant declaration/definition -// -const ai::UnicodeString::size_type ai::UnicodeString::npos = ai::UnicodeString::size_type(-1); - -/////////////////////////////////////////////////////////////////////////////// -// Constructors/Destructor -// -ai::UnicodeString::UnicodeString (void) AINOTHROW -: fImpl(0) -{ -} - -ai::UnicodeString::UnicodeString (ai::UnicodeString::size_type count, ai::UnicodeString::UTF32TextChar ch) -: fImpl(0) -{ - if ( count > 0 ) - { - AIErr result = sAIUnicodeString->InitializeUTF32Char(*this, count, ch); - check_result(result); - } -} - -ai::UnicodeString::UnicodeString (const char* string, ai::UnicodeString::offset_type srcByteLen, - AICharacterEncoding encoding) -: fImpl(0) -{ - if ( string ) - { - AIErr result = sAIUnicodeString->Initialize(*this, string, srcByteLen, encoding); - check_result(result); - } -} - -ai::UnicodeString::UnicodeString (const char* string, AICharacterEncoding encoding) -:fImpl(0) -{ - if ( string ) - { - AIErr result = sAIUnicodeString->Initialize(*this, string, strlen(string), encoding); - check_result(result); - } -} - -ai::UnicodeString::UnicodeString (const ASUnicode* string) -: fImpl(0) -{ - if ( string ) - { - AIErr result = sAIUnicodeString->InitializeUTF16(*this, string, npos); - check_result(result); - } -} - -ai::UnicodeString::UnicodeString (const ASUnicode* string, size_type srcUTF16Count) -: fImpl(0) -{ - if ( string ) - { - AIErr result = sAIUnicodeString->InitializeUTF16(*this, string, srcUTF16Count); - check_result(result); - } -} -ai::UnicodeString::UnicodeString (const std::string& string, AICharacterEncoding encoding) -: fImpl(0) -{ - AIErr result = sAIUnicodeString->Initialize(*this, string.c_str(), string.length(), encoding); - check_result(result); -} - -ai::UnicodeString::UnicodeString (const ZRef zStringKey) -: fImpl(0) -{ - AIErr result = sAIUnicodeString->InitializeZString(*this, zStringKey); - check_result(result); -} - -ai::UnicodeString::UnicodeString (const std::basic_string& string) -: fImpl(0) -{ - AIErr result = sAIUnicodeString->InitializeUTF16(*this, string.data(), string.length()); - check_result(result); -} - -ai::UnicodeString::UnicodeString (const UnicodeString& s) -: fImpl(0) -{ - AIErr result = sAIUnicodeString->Copy(*this, s); - check_result(result); -} - -ai::UnicodeString::~UnicodeString (void) -{ - if ( fImpl ) - { - sAIUnicodeString->Destroy(*this); - } -} - - -/////////////////////////////////////////////////////////////////////////////// -// append ops -// - -ai::UnicodeString& ai::UnicodeString::append (const UnicodeString& str) -{ - AIErr result = sAIUnicodeString->Append(*this, str); - check_result(result); - return *this; -} - -ai::UnicodeString& ai::UnicodeString::append (const UnicodeString& str, ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count) -{ - AIErr result = sAIUnicodeString->AppendSubString(*this, str, startOffset, count); - check_result(result); - return *this; -} - - -ai::UnicodeString& ai::UnicodeString::assign (const UnicodeString& str) -{ - AIErr result = sAIUnicodeString->Assign(*this, str); - check_result(result); - return *this; -} - -ai::UnicodeString::UTF32TextChar ai::UnicodeString::at (ai::UnicodeString::size_type offset) const -{ - ai::UnicodeString::UTF32TextChar ch; - AIErr result = sAIUnicodeString->GetChar(*this, offset, ch); - check_result(result); - return ch; -} - -void ai::UnicodeString::clear () -{ - sAIUnicodeString->Clear(*this); -} - -/////////////////////////////////////////////////////////////////////////////// -// compare ops -// - -ai::int32 ai::UnicodeString::compare (const UnicodeString& str) const -{ - ai::int32 result = sAIUnicodeString->Compare(*this, 0, this->length(), str, 0, str.length()); - return result; -} - -ai::int32 ai::UnicodeString::compare (ai::UnicodeString::size_type pos, - ai::UnicodeString::size_type num, const UnicodeString& str) const -{ - ai::int32 result = sAIUnicodeString->Compare(*this, pos, num, str, 0, str.length()); - return result; -} - -ai::int32 ai::UnicodeString::compare (ai::UnicodeString::size_type pos, - ai::UnicodeString::size_type num, const UnicodeString& str, - ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count) const -{ - ai::int32 result = sAIUnicodeString->Compare(*this, pos, num, str, startOffset, count); - return result; -} - - -ai::UnicodeString& ai::UnicodeString::toLower() { - AIErr result = sAIUnicodeString->toLower(*this); - check_result(result); - return *this; -} - -ai::UnicodeString& ai::UnicodeString::toUpper() { - AIErr result = sAIUnicodeString->toUpper(*this); - check_result(result); - return *this; -} - -ai::int32 ai::UnicodeString::caseCompare (ai::UnicodeString::size_type pos, - ai::UnicodeString::size_type num, const UnicodeString& str, - ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count) const -{ - ai::int32 result = sAIUnicodeString->CaseCompare(*this, pos, num, str, startOffset, count); - return result; -} - -ai::int32 ai::UnicodeString::canonicalCompare (const UnicodeString& str) const -{ - ai::int32 compareResult = 0; - AIErr result = sAIUnicodeString->CanonicalCompare(*this, str, compareResult); - check_result(result); - - return compareResult; -} - -ai::int32 ai::UnicodeString::canonicalCaseCompare (const UnicodeString& str) const -{ - ai::int32 compareResult = 0; - AIErr result = sAIUnicodeString->CanonicalCaseCompare(*this, str, compareResult); - check_result(result); - - return compareResult; -} - -ai::UnicodeString& ai::UnicodeString::normalize (ai::UnicodeString::NormalizedForm form) -{ - AIErr result = sAIUnicodeString->Normalize(*this, form); - check_result(result); - - return *this; -} - -ai::UnicodeString::size_type ai::UnicodeString::length () const -{ - ai::UnicodeString::size_type len = sAIUnicodeString->Length(*this); - return len; -} - -bool ai::UnicodeString::empty () const -{ - bool result = (sAIUnicodeString->Empty(*this) != false); - return result; -} - -ai::UnicodeString& ai::UnicodeString::erase (ai::UnicodeString::size_type pos, - ai::UnicodeString::size_type count) -{ - AIErr result = sAIUnicodeString->Erase( *this, pos, count ); - check_result(result); - return *this; -} - -/////////////////////////////////////////////////////////////////////////////// -// search ops -// - -ai::UnicodeString::size_type ai::UnicodeString::find (ai::UnicodeString::UTF32TextChar ch, - ai::UnicodeString::size_type startOffset) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->FindChar(*this, ch, startOffset); - return pos; -} - -ai::UnicodeString::size_type ai::UnicodeString::find (const UnicodeString& target, - ai::UnicodeString::size_type startOffset) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->FindString( *this, target, startOffset ); - return pos; -} - -ai::UnicodeString::size_type ai::UnicodeString::find (const UnicodeString& target, - ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->FindSubString( *this, - target, startOffset, count ); - return pos; -} - -ai::UnicodeString::size_type ai::UnicodeString::caseFind (const UnicodeString& target, - ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->CaseFindSubString( *this, target, - startOffset, count); - return pos; -} - - -ai::UnicodeString::size_type ai::UnicodeString::rfind (ai::UnicodeString::UTF32TextChar ch, - ai::UnicodeString::size_type startOffset) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->RFindChar( *this, ch, startOffset ); - return pos; -} - -ai::UnicodeString::size_type ai::UnicodeString::rfind (const UnicodeString& target, - ai::UnicodeString::size_type startOffset) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->RFindString( *this, target, startOffset ); - return pos; -} - -ai::UnicodeString::size_type ai::UnicodeString::rfind (const UnicodeString& target, - ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->RFindSubString( *this, - target, startOffset, count); - return pos; -} - -ai::UnicodeString::size_type ai::UnicodeString::find_first_of (const UnicodeString& target, - ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->FindFirstOf( *this, - target, startOffset, count); - return pos; -} -ai::UnicodeString::size_type ai::UnicodeString::find_first_not_of (const UnicodeString& target, - ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->FindFirstNotOf( *this, - target, startOffset, count); - return pos; -} -ai::UnicodeString::size_type ai::UnicodeString::find_last_of (const UnicodeString& target, - ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->FindLastOf( *this, - target, startOffset, count); - return pos; -} - -ai::UnicodeString::size_type ai::UnicodeString::find_last_not_of (const UnicodeString& target, - ai::UnicodeString::size_type startOffset, - ai::UnicodeString::size_type count) const -{ - ai::UnicodeString::size_type pos = sAIUnicodeString->FindLastNotOf( *this, - target, startOffset, count); - return pos; -} - -void ai::UnicodeString::resize (ai::UnicodeString::size_type count, ai::UnicodeString::UTF32TextChar ch) -{ - AIErr result = sAIUnicodeString->Resize(*this, count, ch); - check_result(result); -} - -ai::UnicodeString ai::UnicodeString::substr (ai::UnicodeString::size_type offset, - ai::UnicodeString::size_type count) const -{ - ai::UnicodeString subString; - AIErr result = sAIUnicodeString->SubStr(subString, *this, offset, count); - check_result(result); - return subString; -} - - -void ai::UnicodeString::swap (UnicodeString& str) -{ - AIErr result = sAIUnicodeString->SwapStr(*this, str); - check_result(result); -} - - -ai::UnicodeString& ai::UnicodeString::operator= (const UnicodeString& rhs) -{ - AIErr result = sAIUnicodeString->Assign(*this, rhs); - check_result(result); - return *this; -} - -ai::UnicodeString::UTF32TextChar ai::UnicodeString::operator[] (ai::UnicodeString::size_type offset) const -{ - ai::UnicodeString::UTF32TextChar ch; - AIErr result = sAIUnicodeString->GetChar(*this, offset, ch); - if ( result != kNoErr ) - { - ch = 0x0ffff; - } - - return ch; -} - -//void ai::UnicodeString::foldCase() -//{ -// AIErr result = sAIUnicodeString->FoldCase(*this); -// check_result(result); -//} - -bool ai::UnicodeString::hasSurrogates () const -{ - bool result = (sAIUnicodeString->HasSurrogates(*this) != false); - return result; -} - -/////////////////////////////////////////////////////////////////////////////// -// extraction ops -// - -ai::UnicodeString::size_type ai::UnicodeString::utf_16 (const UTF16Char*& buffer) const -{ - ai::UnicodeString::size_type len = sAIUnicodeString->UTF_16(*this, buffer); - return len; -} - -ai::UnicodeString::size_type ai::UnicodeString::getAs (AICharacterEncoding encoding, ai::AutoBuffer& b) const -{ - ai::UnicodeString::size_type bufferByteCount = 0; - AIErr result = sAIUnicodeString->GetAs(*this, encoding, b, - bufferByteCount); - - check_result(result); - - return bufferByteCount; -} - -std::string ai::UnicodeString::getInStdString (AICharacterEncoding encoding) const -{ - ai::AutoBuffer contents; - ai::UnicodeString::size_type byteCount = getAs(encoding, contents); - - if ( byteCount ) - { - return std::string(contents.GetBuffer(), byteCount); - } - else - { - return std::string(); - } - -} - -std::basic_string ai::UnicodeString::as_ASUnicode ( ) const -{ - std::basic_string returnVal; - const UTF16Char* buffer = 0; - ai::UnicodeString::size_type codeUnitLen = utf_16(buffer); - - if ( buffer && codeUnitLen ) - { - returnVal = std::basic_string(buffer, codeUnitLen); - } - - return returnVal; -} - -///////////////////////////// -// To maintain the previous semantic that using the UnicodeString class got -// you the AutoBuffer functionality "for free": include the implementation -// of the auto buffer class here. -//////////////////////////// -#if defined(_IAIUNICODESTRING_SUITE_INCLUDE_H_) && !defined(_IAIAUTOBUFFER_SUITE_INCLUDE_H_) - #define _IAIAUTOBUFFER_SUITE_INCLUDE_H_ _IAIUNICODESTRING_SUITE_INCLUDE_H_ -#endif -#if !defined(_IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_) - #define _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ -#endif -#include "IAIAutoBuffer.cpp" \ No newline at end of file +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2004 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#include "IAIUnicodeString.h" +#include "AIUnicodeString.h" + +#include "IAIUnicodeString.inl" + +#if AI_AUTO_SUITE_AVAILABLE + #include "AutoSuite.h" + use_suite_required(AIUnicodeString) +#elif defined (_IAIUNICODESTRING_SUITE_INCLUDE_H_) + #include _IAIUNICODESTRING_SUITE_INCLUDE_H_ +#else + #ifndef _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ + #define _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ 1 + #endif + #if _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ + extern "C" + { + #endif + /** The plug-in using the ai::UnicodeString class is required to provide + these global suite pointers. These pointers must be valid prior + to any call to ai::UnicodeString methods. + */ + extern AIUnicodeStringSuite* sAIUnicodeString; + + #if _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ + } + #endif // _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ + +#endif + +/////////////////////////////////////////////////////////////////////////////// +// Constant declaration/definition +// +const ai::UnicodeString::size_type ai::UnicodeString::npos = ai::UnicodeString::size_type(-1); + +/////////////////////////////////////////////////////////////////////////////// +// Constructors/Destructor +// +ai::UnicodeString::UnicodeString () AINOTHROW +: fImpl(nullptr) +{ +} + +ai::UnicodeString::UnicodeString (const char* string, ai::UnicodeString::offset_type srcByteLen, + AICharacterEncoding encoding) +: fImpl(nullptr) +{ + if (string) + { + AIErr result = sAIUnicodeString->Initialize(*this, string, srcByteLen, encoding); + check_ai_error(result); + } +} + +ai::UnicodeString::UnicodeString (ai::UnicodeString::size_type count, ai::UnicodeString::UTF32TextChar ch) +: fImpl(nullptr) +{ + if ( count > 0 ) + { + AIErr result = sAIUnicodeString->InitializeUTF32Char(*this, count, ch); + check_ai_error(result); + } +} + +ai::UnicodeString::UnicodeString (const char* string, AICharacterEncoding encoding) +: fImpl(nullptr) +{ + if ( string ) + { + AIErr result = sAIUnicodeString->Initialize(*this, string, strlen(string), encoding); + check_ai_error(result); + } +} + +ai::UnicodeString::UnicodeString (const std::string& string, AICharacterEncoding encoding) +: fImpl(nullptr) +{ + AIErr result = sAIUnicodeString->Initialize(*this, string.c_str(), string.length(), encoding); + check_ai_error(result); +} + +ai::UnicodeString::UnicodeString (const ASUnicode* string) +: fImpl(nullptr) +{ + if ( string ) + { + AIErr result = sAIUnicodeString->InitializeUTF16(*this, string, npos); + check_ai_error(result); + } +} + +ai::UnicodeString::UnicodeString (const ZRef zStringKey) +: fImpl(nullptr) +{ + AIErr result = sAIUnicodeString->InitializeZString(*this, zStringKey); + check_ai_error(result); +} + +ai::UnicodeString::UnicodeString (const ASUnicode* string, size_type srcUTF16Count) +: fImpl(nullptr) +{ + if ( string ) + { + AIErr result = sAIUnicodeString->InitializeUTF16(*this, string, srcUTF16Count); + check_ai_error(result); + } +} + +ai::UnicodeString::UnicodeString (const std::basic_string& string) +: fImpl(nullptr) +{ + AIErr result = sAIUnicodeString->InitializeUTF16(*this, string.data(), string.length()); + check_ai_error(result); +} + +ai::UnicodeString::UnicodeString (const UnicodeString& s) +: fImpl(nullptr) +{ + AIErr result = sAIUnicodeString->Copy(*this, s); + check_ai_error(result); +} + +ai::UnicodeString::~UnicodeString () +{ + if ( fImpl && sAIUnicodeString) + { + sAIUnicodeString->Destroy(*this); + } +} + +/////////////////////////////////////////////////////////////////////////////// +// append ops +// + +ai::UnicodeString& ai::UnicodeString::append (const UnicodeString& str) +{ + AIErr result = sAIUnicodeString->Append(*this, str); + check_ai_error(result); + return *this; +} + +ai::UnicodeString& ai::UnicodeString::append (const UnicodeString& str, ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count) +{ + AIErr result = sAIUnicodeString->AppendSubString(*this, str, startOffset, count); + check_ai_error(result); + return *this; +} + + +ai::UnicodeString& ai::UnicodeString::assign (const UnicodeString& str) +{ + AIErr result = sAIUnicodeString->Assign(*this, str); + check_ai_error(result); + return *this; +} + +ai::UnicodeString::UTF32TextChar ai::UnicodeString::at (ai::UnicodeString::size_type offset) const +{ + ai::UnicodeString::UTF32TextChar ch; + AIErr result = sAIUnicodeString->GetChar(*this, offset, ch); + check_ai_error(result); + return ch; +} + +void ai::UnicodeString::clear () +{ + sAIUnicodeString->Clear(*this); +} + +/////////////////////////////////////////////////////////////////////////////// +// compare ops +// + +ai::int32 ai::UnicodeString::compare (const UnicodeString& str) const +{ + ai::int32 result = sAIUnicodeString->Compare(*this, 0, this->length(), str, 0, str.length()); + return result; +} + +ai::int32 ai::UnicodeString::compare (ai::UnicodeString::size_type pos, + ai::UnicodeString::size_type num, const UnicodeString& str) const +{ + ai::int32 result = sAIUnicodeString->Compare(*this, pos, num, str, 0, str.length()); + return result; +} + +ai::int32 ai::UnicodeString::compare (ai::UnicodeString::size_type pos, + ai::UnicodeString::size_type num, const UnicodeString& str, + ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count) const +{ + ai::int32 result = sAIUnicodeString->Compare(*this, pos, num, str, startOffset, count); + return result; +} + + +ai::UnicodeString& ai::UnicodeString::toLower() { + AIErr result = sAIUnicodeString->toLower(*this); + check_ai_error(result); + return *this; +} + +ai::UnicodeString& ai::UnicodeString::toUpper() { + AIErr result = sAIUnicodeString->toUpper(*this); + check_ai_error(result); + return *this; +} + +ai::int32 ai::UnicodeString::caseCompare (ai::UnicodeString::size_type pos, + ai::UnicodeString::size_type num, const UnicodeString& str, + ai::UnicodeString::size_type startOffset, ai::UnicodeString::size_type count) const +{ + ai::int32 result = sAIUnicodeString->CaseCompare(*this, pos, num, str, startOffset, count); + return result; +} + +ai::int32 ai::UnicodeString::canonicalCompare (const UnicodeString& str) const +{ + ai::int32 compareResult = 0; + AIErr result = sAIUnicodeString->CanonicalCompare(*this, str, compareResult); + check_ai_error(result); + + return compareResult; +} + +ai::int32 ai::UnicodeString::canonicalCaseCompare (const UnicodeString& str) const +{ + ai::int32 compareResult = 0; + AIErr result = sAIUnicodeString->CanonicalCaseCompare(*this, str, compareResult); + check_ai_error(result); + + return compareResult; +} + +ai::UnicodeString& ai::UnicodeString::normalize (ai::UnicodeString::NormalizedForm form) +{ + AIErr result = sAIUnicodeString->Normalize(*this, form); + check_ai_error(result); + + return *this; +} + +ai::UnicodeString::size_type ai::UnicodeString::length () const +{ + ai::UnicodeString::size_type len = sAIUnicodeString->Length(*this); + return len; +} + +bool ai::UnicodeString::empty () const +{ + bool result = (sAIUnicodeString->Empty(*this) != false); + return result; +} + +ai::UnicodeString& ai::UnicodeString::erase (ai::UnicodeString::size_type pos, + ai::UnicodeString::size_type count) +{ + AIErr result = sAIUnicodeString->Erase( *this, pos, count ); + check_ai_error(result); + return *this; +} + +/////////////////////////////////////////////////////////////////////////////// +// search ops +// + +ai::UnicodeString::size_type ai::UnicodeString::find (ai::UnicodeString::UTF32TextChar ch, + ai::UnicodeString::size_type startOffset) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->FindChar(*this, ch, startOffset); + return pos; +} + +ai::UnicodeString::size_type ai::UnicodeString::find (const UnicodeString& target, + ai::UnicodeString::size_type startOffset) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->FindString( *this, target, startOffset ); + return pos; +} + +ai::UnicodeString::size_type ai::UnicodeString::find (const UnicodeString& target, + ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->FindSubString( *this, + target, startOffset, count ); + return pos; +} + +ai::UnicodeString::size_type ai::UnicodeString::caseFind (const UnicodeString& target, + ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->CaseFindSubString( *this, target, + startOffset, count); + return pos; +} + + +ai::UnicodeString::size_type ai::UnicodeString::rfind (ai::UnicodeString::UTF32TextChar ch, + ai::UnicodeString::size_type startOffset) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->RFindChar( *this, ch, startOffset ); + return pos; +} + +ai::UnicodeString::size_type ai::UnicodeString::rfind (const UnicodeString& target, + ai::UnicodeString::size_type startOffset) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->RFindString( *this, target, startOffset ); + return pos; +} + +ai::UnicodeString::size_type ai::UnicodeString::rfind (const UnicodeString& target, + ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->RFindSubString( *this, + target, startOffset, count); + return pos; +} + +ai::UnicodeString::size_type ai::UnicodeString::find_first_of (const UnicodeString& target, + ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->FindFirstOf( *this, + target, startOffset, count); + return pos; +} +ai::UnicodeString::size_type ai::UnicodeString::find_first_not_of (const UnicodeString& target, + ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->FindFirstNotOf( *this, + target, startOffset, count); + return pos; +} +ai::UnicodeString::size_type ai::UnicodeString::find_last_of (const UnicodeString& target, + ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->FindLastOf( *this, + target, startOffset, count); + return pos; +} + +ai::UnicodeString::size_type ai::UnicodeString::find_last_not_of (const UnicodeString& target, + ai::UnicodeString::size_type startOffset, + ai::UnicodeString::size_type count) const +{ + ai::UnicodeString::size_type pos = sAIUnicodeString->FindLastNotOf( *this, + target, startOffset, count); + return pos; +} + +void ai::UnicodeString::resize (ai::UnicodeString::size_type count, ai::UnicodeString::UTF32TextChar ch) +{ + AIErr result = sAIUnicodeString->Resize(*this, count, ch); + check_ai_error(result); +} + +ai::UnicodeString::size_type ai::UnicodeString::capacity () const +{ + return sAIUnicodeString->Capacity(*this); +} + +void ai::UnicodeString::reserve (ai::UnicodeString::size_type count) +{ + sAIUnicodeString->Reserve(*this, count); +} + +ai::UnicodeString ai::UnicodeString::substr (ai::UnicodeString::size_type offset, + ai::UnicodeString::size_type count) const +{ + ai::UnicodeString subString; + AIErr result = sAIUnicodeString->SubStr(subString, *this, offset, count); + check_ai_error(result); + return subString; +} + +ai::UnicodeString& ai::UnicodeString::operator= (const UnicodeString& rhs) +{ + AIErr result = sAIUnicodeString->Assign(*this, rhs); + check_ai_error(result); + return *this; +} + +ai::UnicodeString::UTF32TextChar ai::UnicodeString::operator[] (ai::UnicodeString::size_type offset) const +{ + ai::UnicodeString::UTF32TextChar ch; + AIErr result = sAIUnicodeString->GetChar(*this, offset, ch); + if ( result != kNoErr ) + { + ch = 0x0ffff; + } + + return ch; +} + +bool ai::UnicodeString::hasSurrogates () const +{ + bool result = (sAIUnicodeString->HasSurrogates(*this) != false); + return result; +} + +/////////////////////////////////////////////////////////////////////////////// +// extraction ops +// + +ai::UnicodeString::size_type ai::UnicodeString::utf_16 (const UTF16Char*& buffer) const +{ + ai::UnicodeString::size_type len = sAIUnicodeString->UTF_16(*this, buffer); + return len; +} + +ai::UnicodeString::size_type ai::UnicodeString::getAs (AICharacterEncoding encoding, ai::AutoBuffer& b) const +{ + ai::UnicodeString::size_type bufferByteCount = 0; + AIErr result = sAIUnicodeString->GetAs(*this, encoding, b, + bufferByteCount); + + check_ai_error(result); + + return bufferByteCount; +} + +std::string ai::UnicodeString::getInStdString (AICharacterEncoding encoding) const +{ + ai::AutoBuffer contents; + ai::UnicodeString::size_type byteCount = getAs(encoding, contents); + + if ( byteCount ) + { + return std::string(contents.GetBuffer(), byteCount); + } + else + { + return std::string(); + } + +} + +std::basic_string ai::UnicodeString::as_ASUnicode ( ) const +{ + std::basic_string returnVal; + const UTF16Char* buffer = 0; + ai::UnicodeString::size_type codeUnitLen = utf_16(buffer); + + if ( buffer && codeUnitLen ) + { + returnVal = std::basic_string(buffer, codeUnitLen); + } + + return returnVal; +} + +///////////////////////////// +// To maintain the previous semantic that using the UnicodeString class got +// you the AutoBuffer functionality "for free": include the implementation +// of the auto buffer class here. +//////////////////////////// +#if defined(_IAIUNICODESTRING_SUITE_INCLUDE_H_) && !defined(_IAIAUTOBUFFER_SUITE_INCLUDE_H_) + #define _IAIAUTOBUFFER_SUITE_INCLUDE_H_ _IAIUNICODESTRING_SUITE_INCLUDE_H_ +#endif +#if !defined(_IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_) + #define _IAIAUTOBUFFER_SUITE_USE_C_LINKAGE_ _IAIUNICODESTRING_SUITE_USE_C_LINKAGE_ +#endif +#include "IAIAutoBuffer.cpp" diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.h index 863efa9..394ca0a 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.h @@ -1,1273 +1,1527 @@ -/* - * Name: IAIUnicodeString.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Interface to the wrapper class for AIUnicodeStringSuite & the - * primary interface for the AI core to - * the ai::UnicodeString objects. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2015 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -#ifndef _IAIUNICODESTRING_H_ -#define _IAIUNICODESTRING_H_ - -#include "AITypes.h" -#include "AICharacterEncoding.h" -#include "IAIAutoBuffer.h" - -#include - -#if defined(MAC_ENV) - #import - #if defined _UTF16_BASIC_STRING_EXPORT_H_ - #include _UTF16_BASIC_STRING_EXPORT_H_ - #endif -#endif // defined(MAC_ENV) - - -/** @file IAIUnicodeString.h */ - -class CAIUnicodeStringImpl; - -/** @ingroup Errors - An out-of-range index was used. - See \c #ai::UnicodeString */ -#define kUnicodeStringBadIndex 'US!I' -/** @ingroup Errors - An attempt to create string longer than maximum allowed length. - See \c #ai::UnicodeString */ -#define kUnicodeStringLengthError 'US#L' -/** @ingroup Errors - A string is malformed. - See \c #ai::UnicodeString */ -#define kUnicodeStringMalformedError 'US!F' - - -namespace ai { - -/** Constant Pascal string adapter object. */ -class const_PStr -{ -public: - /** Constructor. Creates a constant Pascal string object from a Pascal string. - @param pascalString The Pascal string. - @return The new object. */ - explicit const_PStr(const unsigned char* pascalString) : fConstStr(pascalString) {}; - /** Destructor */ - virtual ~const_PStr() {} - /** Constructor. Creates a constant Pascal string from a string pointer. - @param p The string pointer. - @return The new object. */ - const_PStr(const const_PStr& p) : fConstStr(p.fConstStr) {}; - /** Retrieves a reference to this object. - @return The object reference. */ - const unsigned char* get() const - { return fConstStr; } - /** Retrieves a character from this string. - @return The character. */ - const unsigned char& operator[] (size_t i) const - { return fConstStr[i]; } -protected: - const unsigned char* fConstStr; - const_PStr& operator=(const const_PStr&); - -}; - -/** Mutable Pascal string adapter object. */ -class PStr : public const_PStr -{ -public: - /** Constructor. Creates a mutable Pascal string object from a Pascal string. - @param pascalString The C string. - @return The new object. */ - explicit PStr(unsigned char* pascalString) : const_PStr(pascalString) {}; - /** (fConstStr); } - /** Retrieves a character from this string. - @return The character. */ - unsigned char& operator[] (size_t i) const - { return get()[i]; } - ///** Convenience operator */ - //operator const const_PStr& () - //{ return *this; } -}; - - -#if defined(WIN_ENV) - -class UnicodeString; - -/** In Windows only. An adapter object that helps move data back and forth - between Windows functions and the UnicodeString class when the VisualStudio - compiler's options are set to treat \c wchar_t as an intrinsic type. - - This class requires that \c UTF16 and \c wchar_t be the same size. - - This class provides a very thin object veneer on the Windows string - pointer types. The object takes a copy of the data with which it is constructed. -*/ -class WCHARStr -{ -public: - /** Type equivalent to Windows \c WCHAR type. */ - typedef wchar_t WCHAR; - /** Type equivalent to Windows \c LPCWSTR type. */ - typedef const WCHAR* LPCWSTR; - /** Type equivalent to Windows \c LPWSTR type. */ - typedef WCHAR* LPWSTR; - -public: - /** Constructs an empty \c WCHARStr object. - @return The \c WCHARStr object. - */ - WCHARStr () : fConstStr() {} - /** Constructs a \c WCHARStr object from the contents of a UnicodeString. - @param string The source Unicode string. - @return The \c WCHARStr object. - */ - WCHARStr (const ai::UnicodeString& string); - -#if defined(_NATIVE_WCHAR_T_DEFINED) - // This ctor is redundant if wchar_t is not an intrinsic. It cannot be distinguished from the const ASUnicode* ctor. - - /** Constructs a \c WCHARStr object from the contents pointed at by a 0-terminated - \c LPCWSTR. It is assumed that the contents of the source are UTF-16 code units in - platform byte order. - @param wcharString The source string data, UTF-16 code units in platform byte order. - */ - WCHARStr (LPCWSTR wcharString); -#endif // defined(_NATIVE_WCHAR_T_DEFINED) - - /** Constructs a \c WCHARStr object from the contents pointed at by a 0-terminated array of - \c #ASUnicode. It is assumed that the contents of the source are UTF-16 code units in - platform byte order. - @param string The source string data, UTF-16 code units in platform byte order. - */ - WCHARStr (const ASUnicode* string); - - /** Copy constructor, creates a copy of a \c WCHARStr object. - @param p The object to copy. - */ - WCHARStr (const WCHARStr& p) : fConstStr(p.fConstStr) {} - - /** Destructor */ - virtual ~WCHARStr() {} - - - /** Assignment operator */ - WCHARStr& operator= (const WCHARStr& rhs) - { - fConstStr = rhs.fConstStr; - return *this; - } - - /** Converts the contents of this object to \c LPCWSTR. - The returned value is only valid for the lifetime of this object. - @return The \c LPCWSTR value. - */ - LPCWSTR as_LPCWSTR () const - { - return fConstStr.c_str(); - } - - /** Converts the contents of this object to \c #ASUnicode. - The returned value is only valid for the lifetime of this object. - @return A pointer to the \c #ASUnicode value. - */ - const ASUnicode* as_ASUnicode () const; - - /** Computes the length of the string contents of this object. - @return The number of \c WCHAR characters. - */ - size_t length() const; - - /* Convenience operators */ -#if defined(_NATIVE_WCHAR_T_DEFINED) - // This operator is redundant if wchar_t is not an intrinsic. It cannot be distinguished from the const ASUnicode* operator. - operator LPCWSTR () const - { - return as_LPCWSTR(); - } -#endif //defined(_NATIVE_WCHAR_T_DEFINED) - - operator const ASUnicode* () const - { - return as_ASUnicode(); - } - -protected: - std::basic_string fConstStr; -}; - -#endif /* WIN_ENV */ - -/** \c UnicodeString objects provide basic string functionality for - Unicode-based strings, similar to that provided by the standard C string library. - - The contents of the string are treated as if all characters are represented - as full 32-bit Unicode characters, which means you do not need to know the - internal representation of the string, or deal with surrogate pairs during - editing or searching operations. - -*/ -class UnicodeString { -public: - /** A numeric relative offset type (signed integer). */ - typedef ai::sizediff_t offset_type; - /** A numeric value type (unsigned integer). */ - typedef size_t size_type; - /** The maximum number of characters possible in a string. This also indicates a failure if used as return value. */ - static const size_type npos; - /** Value type for a UTF-32 character code. */ - typedef ASUInt32 UTF32TextChar; - /** Value type for a UTF-16 character code. */ - typedef ASUnicode UTF16Char; - - /** Normalization forms for use with the \c #normalize() method. - See http://www.unicode.org/reports/tr15/ for more information. */ - enum NormalizedForm { - /** Canonical Decomposition */ - kForm_NFD = 0, - /** Canonical Decomposition, followed by Canonical Composition */ - kForm_NFC, - /** Compatibility Decomposition */ - kForm_NFKD, - /** Comparability Decomposition, followed by Canonical Composition. */ - kForm_NFKC, - - /** Do not use this */ - kForm_DummyValue = 0xFFFFFFFF - }; - - /** TBD */ - class Collator; - -public: - //---------------------------------------------------------------------- - /** @name Constructors & Destructors */ - //---------------------------------------------------------------------- - //@{ - /** Empty string constructor. Creates a valid, empty string. This method is guaranteed - to not throw any exceptions. */ - explicit UnicodeString (void) AINOTHROW; - /** Constructs a UnicodeString from an encoded byte array. - @param string Array of bytes to construct from. - @param srcByteLen Length of the array. - @param encoding Encoding of the contents of the byte array. Default - is the current platform encoding - */ - explicit UnicodeString (const char* string, offset_type srcByteLen, - AICharacterEncoding encoding = kAIPlatformCharacterEncoding); - - /** Constructs a UnicodeString using a copies of a single character. - @param count Number of characters to insert in this string. - @param ch The UTF32 code point (character) with which to initialize the string. - */ - explicit UnicodeString (size_type count, UTF32TextChar ch); - - /** Convenience constructor from a \c char buffer that is known to be 0 terminated. - @param string Initial contents. - @param encoding Encoding of the contents of the byte array. - */ - explicit UnicodeString (const char* string, AICharacterEncoding encoding = kAIPlatformCharacterEncoding); - - /** Convenience constructor from a \c std::string. - @param string Initial contents. - @param encoding Encoding of the contents of the byte array. - */ - explicit UnicodeString (const std::string& string, AICharacterEncoding encoding = kAIPlatformCharacterEncoding); - - /** Constructor from 0-terminated, platform-byte-ordered, UTF-16 array. - Surrogate pairs are okay. Exception raised if string is malformed. - @param string Pointer to a valid 0-terminated array of UTF-16 \c ASUnicode. - */ - explicit UnicodeString (const ASUnicode* string); - - /** Constructor from the ZString referred to by a ZString key. - @param zStringKey The ZString key. - */ - explicit UnicodeString (const ZRef zStringKey); - - /** Constructor from a non-0-terminated platform-byte-ordered, UTF-16 array. - Surrogate pairs are okay. Exception raised if string is malformed. - @param string Pointer to an array of UTF-16 \c ASUnicode. - @param srcUTF16Count The number of UTF-16 code units to be read from string. - */ - explicit UnicodeString (const ASUnicode* string, size_type srcUTF16Count); - - /** Constructor from a \c std::basic_string of platform-byte-ordered \c ASUnicode characters. - Surrogate pairs are okay. Exception raised if string is malformed. - @param string A \c std::basic_string. - */ - explicit UnicodeString (const std::basic_string& string); - - /** Copy Constructor, creates a copy of a string. - @param s The string to copy. - */ - UnicodeString (const UnicodeString& s); - - /** Destructor */ - ~UnicodeString (void); - //@} - - //---------------------------------------------------------------------- - /** @name Factory methods */ - //---------------------------------------------------------------------- - //@{ - /** Constructs a UnicodeString from a - non-zero-terminated \c char array whose encoding is ISO Roman/Latin. - @param string The \c char array. - @param count the number of bytes (chars) in the string. - @return The Unicode string object. - */ - static UnicodeString FromRoman (const char* string, size_type count); - - /** Constructs a UnicodeString from a - zero-terminated \c char array whose encoding is ISO Roman/Latin. - @param string The \c char array. - @return The Unicode string object. - */ - static UnicodeString FromRoman (const char* string); - - /** Constructs a UnicodeString from a - \c std::string whose encoding is ISO Roman/Latin. - @param string The string. - @return The Unicode string object. - */ - static UnicodeString FromRoman (const std::string& string); - - /** Constructs a UnicodeString from a - Pascal string whose encoding is ISO Roman/Latin. - @param pascalString The Pascal string. - @return The Unicode string object. - */ - static UnicodeString FromRoman (const const_PStr& pascalString); - - /** Constructs a UnicodeString from a - non-zero-terminated \c char array whose encoding is the current platform encoding. - @param string The \c char array. - @param count The number of bytes (chars) in the string. - @return The Unicode string object. - */ - static UnicodeString FromPlatform (const char* string, size_type count); - - /** Constructs a UnicodeString from a - zero-terminated \c char array whose encoding is the current platform encoding. - @param string The \c char array. - @return The Unicode string object. - */ - static UnicodeString FromPlatform (const char* string); - - /** Constructs a UnicodeString from a - \c std::string whose encoding is the current platform encoding. - @param string The string. - @return The Unicode string object. - */ - static UnicodeString FromPlatform (const std::string& string); - - /** Constructs a UnicodeString from a - Pascal string whose encoding is the current platform encoding. - @param pascalString The Pascal string. - @return The Unicode string object. - */ - static UnicodeString FromPlatform (const const_PStr& pascalString); - - /** Constructs a UnicodeString from a - zero-terminated \c char array whose encoding is UTF8. - @param string The \c char array. - @return The Unicode string object. - */ - static UnicodeString FromUTF8 (const char* string); - - /** Constructs a UnicodeString from a - \c std::string whose encoding is UTF8. - @param string The string. - @return The Unicode string object. - */ - static UnicodeString FromUTF8 (const std::string& string); - - /** Constructs a UnicodeString from a - Pascal string whose encoding is UTF8. - @param pascalString The Pascal string. - @return The Unicode string object. - */ - static UnicodeString FromUTF8 (const const_PStr& pascalString); - - //@} - - /* Basic operations (as in std::basic_string) */ - - /** Appends a string to this string. - @param str The string to append. - @return A reference to this Unicode string object. - */ - UnicodeString& append (const UnicodeString& str); - - /** Appends a substring of a given string to this string. - @param str The source string of the substring. - @param startOffset The 0-based index of the first character in the substring. - @param count The maximum number of characters in the substring. - @return A reference to this Unicode string object. - */ - UnicodeString& append (const UnicodeString& str, size_type startOffset, - size_type count); - - /** Appends a given number of copies of a given character to this string. - @param count The number of characters to append. - @param ch The character to append. - @return A reference to this Unicode string object. - */ - UnicodeString& append (size_type count, UTF32TextChar ch) - { return append(UnicodeString(count, ch)); } - - /** Replaces the contents of this string with another string. - @param str The new contents. - @return A reference to this Unicode string object. - */ - UnicodeString& assign (const UnicodeString& str); - - /** Replaces the contents of this string with a substring of another string. - @param str The source of the substring. - @param offset The 0-based index of the first character in the substring. - @param count The maximum number of characters in the substring. - @return A reference to this Unicode string object. - */ - UnicodeString& assign (const UnicodeString& str, size_type offset, - size_type count) - { return assign(str.substr(offset, count)); } - - /** Retrieves the UTF32 code point (character) from a string by position index. - Raises \c #kUnicodeStringBadIndex exception if offset is out of range. - @param offset The 0-based index of the character. - @return The UTF32 value of the character. - */ - UTF32TextChar at (size_type offset) const; - - /** Erases all characters in this string. Same as erase(0, npos). - Uninitialized strings remain unchanged. - @return Nothing. - @see \c #erase() - */ - void clear (); - - /** Compares this string and another string for equality. - Uninitialized strings are equal to other uninitialized strings and - to empty strings.Uninitialized and empty strings are less than initialized, - non-empty strings. - @param str The string to compare against (right side of compare).. - @return Zero if the two strings are equal. -
Negative if this string is less than \c str. -
Positive if this string is greater than \c str. - */ - ai::int32 compare (const UnicodeString& str) const; - - /** Compares this string and a substring of another string for equality. - Uninitialized strings are equal to other uninitialized strings and - to empty strings.Uninitialized and empty strings are less than initialized, - non-empty strings. - @param pos The 0-based index of the first character of the substring. - @param num The number of characters to compare. - @param str The source of the substring to compare against (right side of compare).. - @return Zero if this string and the substring are equal. -
Negative if this string is less than the substring of \c str. -
Positive if this string is greater than the substring of \c str. - */ - ai::int32 compare (size_type pos, size_type num, const UnicodeString& str) const; - - /** Compares a substring of this string and a substring of another string for equality. - Uninitialized strings are equal to other uninitialized strings and - to empty strings.Uninitialized and empty strings are less than initialized, - non-empty strings. - @param pos The 0-based index of the first character of the substring in this string. - @param num The number of characters to compare in this string. - @param str The source of the substring to compare against (right side of compare).. - @param startOffset The 0-based index of the first character of the substring of \c str. - @param count The number of characters from \c str to compare. - @return Zero if the two substrings are equal. -
Negative if the substring of this string is less than the substring of \c str. -
Positive if the substring of this string is greater than the substring of \c str. - */ - ai::int32 compare (size_type pos, size_type num, const UnicodeString& str, - size_type startOffset, size_type count) const; - - /** Retrieves the number of characters (UTF code points) in this string. - @return The number of UTF code points in this string. - */ - size_type length () const; - - /** Reports whether this string is an empty string. - @return True if the string is empty. - */ - bool empty () const; - - /** Removes characters (UTF code points) from this string. - @param pos The 0-based position index of the first character to remove. - @param count The number of characters to remove. - @return A reference to this Unicode string object. - */ - UnicodeString& erase (size_type pos=0, size_type count = npos); - - /** Searches for a character in this string. - @param ch The character to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the found character, or - the number of characters in this string (\c #npos) - if the character is not found. - */ - size_type find (UTF32TextChar ch, size_type startOffset = 0 ) const; - - /** Searches for a string within a subset of this string. - @param target The string to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the first character of the target - string within this string, if found, or the number of - characters in this string (\c #npos) - if the target string is not found. - */ - size_type find (const UnicodeString& target, size_type startOffset = 0) const; - - /** Searches for a substring within a subset of this string. - @param target The string to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @param count The number of characters in the target string to search for. - @return The 0-based position index of the first character of the target - substring within this string, if found, or (\c #npos) - if the target substring is not found. - */ - size_type find (const UnicodeString& target, size_type startOffset, size_type count) const; - - /** Searches for a character in this string, performing a caseless compare. - @param ch The character to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the found character, or (\c #npos) - if the character is not found. - */ - size_type caseFind (UTF32TextChar ch, size_type startOffset = 0 ) const - { return caseFind(ai::UnicodeString(1, ch), startOffset, 1); } - - /** Searches for a string within a subset of this string, performing a caseless compare. - @param target The string to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the first character of the target - string within this string, if found, or (\c #npos) - if the target string is not found. - */ - size_type caseFind (const UnicodeString& target, size_type startOffset = 0) const - { return caseFind(target, startOffset, target.length()); } - - /** Searches for a substring within a subset of this string, performing a caseless compare. - @param target The string to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @param count The number of characters in the target string to search for. - @return The 0-based position index of the first character of the target - substring within this string, if found, or (\c #npos) - if the target substring is not found. - */ - size_type caseFind (const UnicodeString& target, size_type startOffset, size_type count) const; - - /** Searches for a character in this string, - moving backward from a point in this string. - @param ch The character to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the found character, or (\c #npos) - if the character is not found. - */ - size_type rfind (UTF32TextChar ch, size_type startOffset = npos ) const; - - /** Searches for a string within a subset of this string, - moving backward from a point in this string. - @param target The string to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the first character of the target - string within this string, if found, or (\c #npos) - if the target string is not found. - */ - size_type rfind (const UnicodeString& target, size_type startOffset = npos) const; - - /** Searches for a substring within a subset of this string, - moving backward from a point in this string. - @param target The string to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @param count The number of characters in the target string to search for. - @return The 0-based position index of the first character of the target - substring within this string, if found, or (\c #npos) - if the target substring is not found. - */ - size_type rfind (const UnicodeString& target, size_type startOffset, size_type count) const; - - /** Searches for the first character of a string within a subset of this string. - @param target The string to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the first character of the target - string within this string, if found, or (\c #npos) - if the first character of the target string is not found. - */ - size_type find_first_of (const UnicodeString& target, size_type startOffset = 0) const - { return find_first_of(target, startOffset, npos); } - - /** Searches for the first character of a string within a subset of this string. - @param target The string to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @param count The number of characters in the substring to search. - @return The 0-based position index of the first character of the target - string within this string, if found, or (\c #npos) - if the character is not found. - */ - size_type find_first_of (const UnicodeString& target, size_type startOffset, size_type count) const; - - /** Searches for the last character of a string within a subset of this string. - @param target The string containing the character to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the last character of the target - string within this string, if found, or (\c #npos) - if the character is not found. - */ - size_type find_last_of (const UnicodeString& target, size_type startOffset = npos) const - { return find_last_of(target, startOffset, npos); } - - /** Searches for the last character of a string within a subset of this string. - @param target The string containing the character to search for. - @param startOffset The 0-based position index in this string at which to start the search. - @param count The number of characters in this string in which to search. - @return The 0-based position index of the last character of the target - string within this string, if found, or (\c #npos) - if the character is not found. - */ - size_type find_last_of (const UnicodeString& target, size_type startOffset, size_type count) const; - - /** Searches for the first occurrence in this string of a character - that is not in a target string. - @param target The target string. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the character within this string, - if found, or (\c #npos) if the character is not found. - */ - size_type find_first_not_of (const UnicodeString& target, size_type startOffset = 0) const - { return find_first_not_of(target, startOffset, npos); } - - /** Searches for the first occurrence in a subset of this string of a character - that is not in a target string. - @param target The target string. - @param startOffset The 0-based position index in this string at which to start the search. - @param count The number of characters in this string to search. - @return The 0-based position index of the character within this string, - if found, or (\c #npos) if the character is not found. - */ - size_type find_first_not_of (const UnicodeString& target, size_type startOffset, size_type count) const; - - /** Searches for the last occurrence in this string of a character - that is not in a target string. - @param target The target string. - @param startOffset The 0-based position index in this string at which to start the search. - @return The 0-based position index of the character within this string, - if found, or (\c #npos) if the character is not found. - */ - size_type find_last_not_of (const UnicodeString& target, size_type startOffset = npos) const - { return find_last_not_of (target, startOffset, npos); } - - /** Searches for the last occurrence in a subset of this string of a character - that is not in a target string. - @param target The target string. - @param startOffset The 0-based position index in this string at which to start the search. - @param count The number of characters in this string to search. - @return The 0-based position index of the character within this string, - if found, or (\c #npos) if the character is not found. - */ - size_type find_last_not_of (const UnicodeString& target, size_type startOffset, size_type count) const; - - /** Replaces a substring in this string with another string. - @param pos The 0-based position index in this string at which to start the replacement. - @param num The number of characters in this string to replace. - @param str The replacement string. - @return This string object. - */ - UnicodeString& replace (size_type pos, size_type num, const UnicodeString& str) - { return replace(pos, num, str, 0, npos); } - - /** Replaces a substring in this string with a substring of another string. - @param pos The 0-based position index in this string at which to start the replacement. - @param num The number of characters in this string to replace. - @param str The replacement string. - @param count The number of characters in the replacement substring, starting at the first character. - @return This string object. - */ - UnicodeString& replace (size_type pos, size_type num, const UnicodeString& str, size_type count) - { return replace(pos, num, str, 0, count); } - - /** Replaces a substring in this string with a substring of another string. - @param pos The 0-based position index in this string at which to start the replacement. - @param num The number of characters in this string to replace. - @param str The replacement string. - @param startOffset The 0-based position index of the first character of the replacement substring. - @param count The number of characters in the replacement substring, starting at the offset. - @return This string object. - */ - UnicodeString& replace (size_type pos, size_type num, const UnicodeString& str, - size_type startOffset, size_type count); - - /** Inserts a string into this string, inserting as many characters as will fit. - @param insertOffset The 0-based position index in this string - after which to start the insertion. - @param str The string to be partially or wholly inserted. - @return This string object. - */ - UnicodeString& insert (size_type insertOffset, const UnicodeString& str) - { return insert(insertOffset, str, 0, npos); } - - /** Inserts a substring into this string. - @param insertOffset The 0-based position index in this string - after which to start the insertion. - @param str The source string of the substring to insert. - @param offset he 0-based position index of the first character - of the substring to insert. - @param count The number of characters to insert. - @return This string object. - */ - UnicodeString& insert (size_type insertOffset, const UnicodeString& str, - size_type offset, size_type count); - - /** Inserts repeated characters into this string. - @param insertOffset The 0-based position index in this string - after which to start the insertion. - @param count The number of copies of the character to insert. - @param ch The character to insert. - @return This string object. - */ - UnicodeString& insert (size_type insertOffset, size_type count, - UTF32TextChar ch) - { return insert(insertOffset, UnicodeString(count, ch), 0, count); } - - /** Appends a character to the end of this string. - @param ch The character to append. - @return Nothing. - */ - void push_back(UTF32TextChar ch) - { (void) append(1, ch); } - - /** Resizes this string, truncating it or adding characters as needed. - @param count The new number of characters. - @param ch The UTF code point value with which to initialize new elements, - if the size of the string is increased. - @return Nothing. - */ - void resize (size_type count, UTF32TextChar ch = UTF32TextChar()); - - /** Retrieves the number of characters (UTF code points) in this string. - This is the same as \c #length(). - @return The number of UTF code points in this string. - */ - ai::UnicodeString::size_type size (void) const - { return length(); } - - /** Creates a copy of a substring of this string. - @param offset The 0-based position index of the first character - to be copied to the substring. - @param count The maximum number of characters to copy to the new substring. - @return A \c UnicodeString object containing the requested substring. - */ - UnicodeString substr (size_type offset = 0, size_type count = npos) const; - - /** Swaps the contents of this string with another string. - @param str The string to swap. - @return Nothing. - */ - void swap (UnicodeString& str); - - /* Operators */ - - /** Assignment operator. - @param rhs The Unicode string object to assign into this one. - @return A reference to this string. - */ - UnicodeString& operator= (const UnicodeString& rhs); - - /** Append operator. - @param ch The character to append to this string. - @return A reference to this string. - */ - UnicodeString& operator+= (UTF32TextChar ch) - { return append(1, ch); } - - /** Append operator. - @param rhs The Unicode string object to append to this one. - @return A reference to this string. - */ - UnicodeString& operator+= (const UnicodeString& rhs) - { return append(rhs); } - - /** Retrieves a character from this string. - @param offset The 0-based position index of the character. - @return The character. - - @note This behavior differs from \c std::basic_string operator[]. - This method returns the character at the given offset. - \c std::basic_string::operator[] returns a writeable reference - to the elopement at the given offset. - */ - UTF32TextChar operator[] (size_type offset) const; - - /** Equality operator. Does a simple, direct, code-point-based - comparison. - @param rhs The string with which to compare this string. - @return True if the strings are equal. - */ - bool operator== (const UnicodeString& rhs) const - { return compare(rhs) == 0; } - - /** Non-equality operator. Does a simple, direct, code-point-based - comparison. - @param rhs The string with which to compare this string. - @return True if the strings are not equal. - */ - bool operator!= (const UnicodeString& rhs) const - { return !(operator==(rhs)); } - - /** Less-than operator. Does a simple, direct, code-point-based - comparison. - @param rhs The string with which to compare this string. - @return True if this string is less than the comparison string. - */ - bool operator< (const UnicodeString& rhs) const - { return compare(rhs) < 0; } - - /* non-std::basic_string based functionality */ - - /** Convert the characters in this to lower case following the conventions of - the default locale. - @return A reference to this. - */ - UnicodeString& toLower(); - - /** - Convert the characters in this to UPPER CASE following the conventions of - the default locale. - @return A reference to this. - */ - UnicodeString& toUpper(); - - /** Compares this string with another string, doing a caseless - code-point-based comparison. - Uninitialized strings are equal to other uninitialized strings and - empty strings. Uninitialized and empty strings are less than initialized, - non-empty strings. - @param str The comparison string (right side of compare). - @return 0 if the strings are equal. -
Positive if this string is greater than the comparison string. -
Negative if this string is less than the comparison string. - */ - ai::int32 caseCompare (const UnicodeString& str) const - { return caseCompare(0, npos, str, 0, npos); } - - /** Compares this string with a substring of another string, doing a caseless - code-point-based comparison. - Uninitialized strings are equal to other uninitialized strings and - empty strings. Uninitialized and empty strings are less than initialized, - non-empty strings. - @param pos The 0-based position index of the first character of the substring. - @param num The number of characters to compare. - @param str The comparison string (right side of compare). - @return 0 if this string and the substring are equal. -
Positive if this string is greater than the substring. -
Negative if this string is less than the substring. - */ - ai::int32 caseCompare (size_type pos, size_type num, const UnicodeString& str) const - { return caseCompare(pos, num, str, 0, npos); } - - /** Compares a substring of this string with a substring of another string, doing a caseless - code-point-based comparison. - Uninitialized strings are equal to other uninitialized strings and - empty strings. Uninitialized and empty strings are less than initialized, - non-empty strings. - @param pos The 0-based position index of the first character of - the substring of this string. - @param num The number of characters in the substring of this string. - @param str The comparison string (right side of compare). - @param startOffset The 0-based position index of the first character of - the substring of the comparison string. - @param count The number of characters in the substring of the comparison string. - @return 0 if this substring and the comparison substring are equal. -
Positive if this substring is greater than the comparison substring. -
Negative if this substring is less than the comparison substring. - */ - ai::int32 caseCompare (size_type pos, size_type num, const UnicodeString& str, - size_type startOffset, size_type count) const; - - /** Compares this string with another string for canonical equivalence - of their normalized forms (NFD or NFC). This requires temporary - allocation of memory, and can throw out-of-memory errors. - - Uninitialized strings are equal to other uninitialized strings and - empty strings. Uninitialized and empty strings are less than initialized, - non-empty strings. - @param str The comparison string (right side of compare). - @return 0 if the strings are equal. -
Positive if this string is greater than the comparison string. -
Negative if this string is less than the comparison string. - - @note Substring comparison of non-normalized strings is not directly available. - You can create substrings and pass them to this method. - */ - ai::int32 canonicalCompare (const UnicodeString& str) const; - - /** Compares this string with another string for canonical equivalence - of their normalized forms (NFD or NFC), performing a caseless compare. - This requires temporary allocation of memory, and can throw out-of-memory errors. - - Uninitialized strings are equal to other uninitialized strings and - empty strings. Uninitialized and empty strings are less than initialized, - non-empty strings. - @param str The comparison string (right side of compare). - @return 0 if the strings are equal. -
Positive if this string is greater than the comparison string. -
Negative if this string is less than the comparison string. - - @note Substring comparison of non-normalized strings is not directly available. - You can create substrings and pass them to this method. - */ - ai::int32 canonicalCaseCompare (const UnicodeString& str) const; - - /** Normalizes this string in place into the specified form. - Normalization may require re-allocation of the string. If this happens, - the method can throw out-of-memory errors. On failure, this - string remains unmodified. - @param form The form with which to normalize the string. - @return A reference to this string. - */ - UnicodeString& normalize (NormalizedForm form); - - /** Reports whether this string contains surrogate pairs. - @return True if there are surrogate pairs in this string. - */ - bool hasSurrogates () const; - - /** Creates a UTF-16 string from the contents of this string, in platform byte order. - This method does not allocate any memory, and returns in constant time. - @param buffer A reference to a const pointer to \c UTF16Char in which - to return the contents of this string as UTF-16 code units. Can be - 0 if this string is empty. - This buffer pointer is only valid at most for the lifetime of this string. - The buffer is not guaranteed to be 0 terminated. - Use \c #as_ASUnicode() to guarantee a 0-terminated buffer. - @return The number of UTF-16 characters in the returned buffer. - */ - size_type utf_16 (const UTF16Char*& buffer) const; - - /** Creates a 0-terminated UTF-16 string from the contents of this string, - in platform byte order. - @return The contents of this string as UTF-16 code units. - */ - std::basic_string as_ASUnicode ( ) const; - - /** Creates a UTF-8 string from the contents of this string. - @return The contents of this string as a UTF-8 encoded \c std::string. - */ - std::string as_UTF8 ( ) const; - - /** Creates a platform-encoded version of this string. - @return The contents of this string as a UTF-8 encoded \c std::string. */ - std::string as_Platform () const; - - /** Creates an ISO Latin/Roman-encoded version of this string. - @return The contents of this string as a UTF-8 encoded \c std::string. */ - std::string as_Roman () const; - - /** Copies the contents of this string to a provided buffer. This method - follows the \c strlcpy paradigm. - @param buffer A pointer to a byte array in which to return the 0-terminated copy. - @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, - or \c NULL to return the required size. - @param encoding The encoding for the result. - @return The size needed to write the entire string contents to a buffer, - including a 0 terminator. - */ - size_type getToBuffer ( char* buffer, size_type bufferMax, AICharacterEncoding encoding ) const; - - /** Copies the contents of this string to a Pascal string in a provided buffer. - @param pascalString A pointer to a Pascal string in which to return the 0-terminated copy. - @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, - or \c NULL to return the required size. - @param encoding The encoding for the result. - @return The size needed to write the entire string contents to a buffer, - including a 0 terminator. - */ - size_type getToBuffer ( const PStr& pascalString, size_type bufferMax, AICharacterEncoding encoding ) const; - - /** Copies the contents of this string to a Unicode string in a provided buffer. - @param buffer A pointer to a Unicode string in which to return the 0-terminated copy. - @param bufferMax The maximum count of UTF-16 code units (\c ASUnicode) to write to the - buffer including a 0 terminator. Or, pass 0 to request - the required buffer size. - @return The size needed to write the entire string contents to a buffer, - including a 0 terminator. - */ - size_type as_ASUnicode (ASUnicode* buffer, size_type bufferMax ) const; - - /** Copies the contents of this string to a platform-encoded Pascal string in a provided buffer. - @param pascalString A pointer to a Pascal string in which to return the 0-terminated copy. - @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, - or \c NULL to return the required size. - @return The size needed to write the entire string contents to a buffer, - including a 0 terminator. - */ - size_type as_Platform ( const PStr& pascalString, size_type bufferMax ) const; - - /** Copies the contents of this string to a C string in a provided buffer. - @param buffer A pointer to a C string in which to return the 0-terminated copy. - @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, - or \c NULL to return the required size. - @return The size needed to write the entire string contents to a buffer, - including a 0 terminator. - */ - size_type as_Platform ( char* buffer, size_type bufferMax ) const; - - /** Copies the contents of this string to an ISO Latin/Roman-encoded C string in a provided buffer. - @param buffer A pointer to a C string in which to return the 0-terminated copy. - @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, - or \c NULL to return the required size. - @return The size needed to write the entire string contents to a buffer, - including a 0 terminator. - */ - size_type as_Roman ( char* buffer, size_type bufferMax ) const; - - /** Copies the contents of this string to an ISO Latin/Roman-encoded Pascal string in a provided buffer. - @param pascalString A pointer to a Pascal string in which to return the 0-terminated copy. - @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, - or \c NULL to return the required size. - @return The size needed to write the entire string contents to a buffer, - including a 0 terminator. - */ - size_type as_Roman ( const PStr& pascalString, size_type bufferMax ) const; - - /** Creates a \c std::string from the contents of this string. Can throw - an out-of-memory error. - @param encoding The encoding for the result. - @return The string result. - */ - std::string getInStdString (AICharacterEncoding encoding) const; - - /** Copies the contents of this string to an \c ai::AutoBuffer. - @param encoding The encoding for the result. - @param b The buffer in which to return the result. The resulting - contents might not be 0 terminated. - @return The number of characters (bytes) returned in the buffer. - */ - size_type getAs (AICharacterEncoding encoding, ai::AutoBuffer& b) const; - -#if defined(MAC_ENV) - - //---------------------------------------------------------------------- - /** @name Mac OS-specific Methods */ - //---------------------------------------------------------------------- - //@{ - /** Constructs a Unicode string object from a Mac OS \c CFString. - @param cfString The source \c CFString. - */ - explicit UnicodeString (const CFStringRef& cfString); - - /** Converts the contents of this string to a Mac OS \c CFString. - @param alloc A valid \c CFAllocatorRef for allocating the \c CFString. - @return An immutable \c CFString object containing chars, or \c NULL if there was a problem - creating the object. You must dispose of this object when it is no longer needed. - */ - CFStringRef as_CFString (CFAllocatorRef alloc) const; - //@} -#endif // defined(MAC_ENV) - -#if defined(WIN_ENV) - - //---------------------------------------------------------------------- - /** @name Windows-specific Methods */ - //---------------------------------------------------------------------- - //@{ - /** Constructs a Unicode string object from a Windows \c WCHARStr wrapper object. - @param string The source \c WCHARStr. - */ - explicit UnicodeString (const WCHARStr& string); - - /** Converts the contents of this string to a \c WCHARStr wrapper object. - @return The \c WCHARStr object. Contents are UTF-16 encoded. - */ - WCHARStr as_WCHARStr () const; - - /** Copies the contents of this string to a provided buffer. - @param buffer A pointer to a buffer of \c WCHARStr::LPWSTR in which to return the - 0-terminated copy. - @param bufferMax The maximum count of \c WCHARStr::LPWSTR to write to the buffer. - @return The size needed to write the entire string contents to a buffer, - including a 0 terminator. Returned size is the count of \c WCHARStr::LPWSTR - needed. - */ - size_type as_WCHARStr (WCHARStr::LPWSTR buffer, size_type bufferMax ) const; - - //@} -#endif // defined(WIN_ENV) - - -public: // internal use public interface - void deleteImpl(); - -protected: - explicit UnicodeString(class CAIUnicodeStringImpl* impl); - -private: - CAIUnicodeStringImpl* fImpl; -}; - -/////////////////////////////////////////////////////////// -// Inline implementations - Yes, some of these could cause code bloat. -// These could be moved to the IAIUnicodeString.inl file. -// - -/////////////////////////////////////////////////////////// -// UnicodeString inlines -/////////////////////////////////////////////////////////// - -inline UnicodeString& UnicodeString::insert (size_type insertOffset, const UnicodeString& str, - size_type offset, size_type count) -{ - if ( insertOffset > length() || offset > str.length() ) - throw ai::Error(kUnicodeStringBadIndex); - UnicodeString result = substr(0, insertOffset); - result.append(str, offset, count); - result.append(substr(insertOffset)); - - *this = result; - return *this; -} - -inline UnicodeString& UnicodeString::replace (size_type pos, size_type num, const UnicodeString& str, - size_type startOffset, size_type count) -{ - if ( pos > length() || startOffset > str.length() ) - throw ai::Error(kUnicodeStringBadIndex); - erase(pos, num); - insert(pos, str, startOffset, count); - - return *this; -} - -inline std::string UnicodeString::as_UTF8 ( ) const -{ - return getInStdString(kAIUTF8CharacterEncoding); -} - -inline std::string UnicodeString::as_Platform () const -{ - return getInStdString(kAIPlatformCharacterEncoding); -} - -inline std::string UnicodeString::as_Roman () const -{ - return getInStdString(kAIRomanCharacterEncoding); -} - -inline UnicodeString::size_type UnicodeString::as_ASUnicode ( ASUnicode* buffer, size_type bufferMax ) const -{ - const UTF16Char* bufPtr = 0; - const size_type kThisUTF16Len = utf_16(bufPtr) + 1; - const size_type kCopyMax = (bufferMax < kThisUTF16Len ? bufferMax : kThisUTF16Len) - 1; - memcpy(buffer, bufPtr, kCopyMax*sizeof(UTF16Char)); - buffer[kCopyMax] = 0; - - return kThisUTF16Len; -} - -#if defined(WIN_ENV) - -inline UnicodeString::size_type UnicodeString::as_WCHARStr ( WCHARStr::LPWSTR buffer, size_type bufferMax ) const -{ - AI_STATIC_CHECK(sizeof(WCHARStr::WCHAR) == sizeof(ai::UnicodeString::UTF16Char), WCHAR_size_does_not_match_unsigned_short_size); //-V503 - return as_ASUnicode( reinterpret_cast(buffer), bufferMax ); -} - -#endif // defined(WIN_ENV) - -inline UnicodeString::size_type UnicodeString::as_Platform ( char* buffer, size_type bufferMax ) const -{ - return getToBuffer( buffer, bufferMax, kAIPlatformCharacterEncoding); -} - -inline UnicodeString::size_type UnicodeString::as_Roman ( char* buffer, size_type bufferMax ) const -{ - return getToBuffer( buffer, bufferMax, kAIRomanCharacterEncoding); -} - -inline UnicodeString::size_type UnicodeString::as_Platform ( const ai::PStr& pascalString, size_type bufferMax ) const -{ - return getToBuffer( pascalString, bufferMax, kAIPlatformCharacterEncoding ); -} - -inline UnicodeString::size_type UnicodeString::as_Roman ( const ai::PStr& pascalString, size_type bufferMax ) const -{ - return getToBuffer( pascalString, bufferMax, kAIRomanCharacterEncoding ); -} - - - -#if defined(WIN_ENV) - -/////////////////////////////////////////////////////////// -// WCHARStr inlines -/////////////////////////////////////////////////////////// - -inline WCHARStr::WCHARStr (const UnicodeString& string) : fConstStr() -{ - AI_STATIC_CHECK(sizeof(WCHAR) == sizeof(ai::UnicodeString::UTF16Char), WCHAR_size_does_not_match_unsigned_short_size); //-V503 - - const std::basic_string& cInput = string.as_ASUnicode(); - const size_t cLen = cInput.length(); - - if ( cLen > 0 ) - fConstStr = std::basic_string(reinterpret_cast(cInput.data()), cLen); -}; - -#if defined(_NATIVE_WCHAR_T_DEFINED) - // This ctor is redundant if wchar_t is not an intrinsic. This is the same as the const ASUnicode* ctor. -inline WCHARStr::WCHARStr (WCHARStr::LPCWSTR wcharString) : fConstStr( wcharString ) -{ -} -#endif // defined(_NATIVE_WCHAR_T_DEFINED) - -inline WCHARStr::WCHARStr (const ASUnicode* string) -{ - if ( string && *string ) - { - AI_STATIC_CHECK(sizeof(WCHARStr::WCHAR) == sizeof(ai::UnicodeString::UTF16Char), WCHAR_size_does_not_match_unsigned_short_size); //-V503 - fConstStr.assign(reinterpret_cast(string)); - } -} - -inline const ASUnicode* WCHARStr::as_ASUnicode () const -{ - AI_STATIC_CHECK(sizeof(WCHARStr::WCHAR) == sizeof(ai::UnicodeString::UTF16Char), WCHAR_size_does_not_match_unsigned_short_size); //-V503 - return reinterpret_cast(this->as_LPCWSTR()); -} - -inline size_t WCHARStr::length() const -{ - return fConstStr.length(); -} - -#endif // defined(WIN_ENV) - -} // end of namespace ai - -#endif // _IAIUNICODESTRING_H_ +/* + * Name: IAIUnicodeString.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Interface to the wrapper class for AIUnicodeStringSuite & the + * primary interface for the AI core to + * the ai::UnicodeString objects. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2015 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +#ifndef _IAIUNICODESTRING_H_ +#define _IAIUNICODESTRING_H_ + +#include "AITypes.h" +#include "AICharacterEncoding.h" +#include "IAIAutoBuffer.h" + +#include +#include +#include + +#if defined(MAC_ENV) + #import + #if defined _UTF16_BASIC_STRING_EXPORT_H_ + #include _UTF16_BASIC_STRING_EXPORT_H_ + #endif +#endif // defined(MAC_ENV) + + +/** @file IAIUnicodeString.h */ + +class CAIUnicodeStringImpl; + +/** @ingroup Errors + An out-of-range index was used. + See \c #ai::UnicodeString */ +#define kUnicodeStringBadIndex 'US!I' +/** @ingroup Errors + An attempt to create string longer than maximum allowed length. + See \c #ai::UnicodeString */ +#define kUnicodeStringLengthError 'US#L' +/** @ingroup Errors + A string is malformed. + See \c #ai::UnicodeString */ +#define kUnicodeStringMalformedError 'US!F' + + +namespace ai { + +/** Constant Pascal string adapter object. */ +class const_PStr +{ +public: + /** Constructor. Creates a constant Pascal string object from a Pascal string. + @param pascalString The Pascal string. + @return The new object. */ + explicit const_PStr(const unsigned char* pascalString) : fConstStr(pascalString) {}; + /** Destructor */ + virtual ~const_PStr() {} + /** Constructor. Creates a constant Pascal string from a string pointer. + @param p The string pointer. + @return The new object. */ + const_PStr(const const_PStr& p) : fConstStr(p.fConstStr) {}; + /** Retrieves a reference to this object. + @return The object reference. */ + const unsigned char* get() const + { return fConstStr; } + /** Retrieves a character from this string. + @return The character. */ + const unsigned char& operator[] (size_t i) const + { return fConstStr[i]; } +protected: + const unsigned char* fConstStr; + const_PStr& operator=(const const_PStr&); + +}; + +/** Mutable Pascal string adapter object. */ +class PStr : public const_PStr +{ +public: + /** Constructor. Creates a mutable Pascal string object from a Pascal string. + @param pascalString The C string. + @return The new object. */ + explicit PStr(unsigned char* pascalString) : const_PStr(pascalString) {}; + /** (fConstStr); } + /** Retrieves a character from this string. + @return The character. */ + unsigned char& operator[] (size_t i) const + { return get()[i]; } + ///** Convenience operator */ + //operator const const_PStr& () + //{ return *this; } +}; + + +#if defined(WIN_ENV) + +class UnicodeString; + +/** In Windows only. An adapter object that helps move data back and forth + between Windows functions and the UnicodeString class when the VisualStudio + compiler's options are set to treat \c wchar_t as an intrinsic type. + + This class requires that \c UTF16 and \c wchar_t be the same size. + + This class provides a very thin object veneer on the Windows string + pointer types. The object takes a copy of the data with which it is constructed. +*/ +class WCHARStr +{ +public: + /** Type equivalent to Windows \c WCHAR type. */ + typedef wchar_t WCHAR; + /** Type equivalent to Windows \c LPCWSTR type. */ + typedef const WCHAR* LPCWSTR; + /** Type equivalent to Windows \c LPWSTR type. */ + typedef WCHAR* LPWSTR; + +public: + /** Constructs an empty \c WCHARStr object. + @return The \c WCHARStr object. + */ + WCHARStr () : fConstStr() {} + /** Constructs a \c WCHARStr object from the contents of a UnicodeString. + @param string The source Unicode string. + @return The \c WCHARStr object. + */ + WCHARStr (const ai::UnicodeString& string); + +#if defined(_NATIVE_WCHAR_T_DEFINED) + // This ctor is redundant if wchar_t is not an intrinsic. It cannot be distinguished from the const ASUnicode* ctor. + + /** Constructs a \c WCHARStr object from the contents pointed at by a 0-terminated + \c LPCWSTR. It is assumed that the contents of the source are UTF-16 code units in + platform byte order. + @param wcharString The source string data, UTF-16 code units in platform byte order. + */ + WCHARStr (LPCWSTR wcharString); +#endif // defined(_NATIVE_WCHAR_T_DEFINED) + + /** Constructs a \c WCHARStr object from the contents pointed at by a 0-terminated array of + \c #ASUnicode. It is assumed that the contents of the source are UTF-16 code units in + platform byte order. + @param string The source string data, UTF-16 code units in platform byte order. + */ + WCHARStr (const ASUnicode* string); + + /** Copy constructor, creates a copy of a \c WCHARStr object. + @param p The object to copy. + */ + WCHARStr (const WCHARStr& p) : fConstStr(p.fConstStr) {} + +#if defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) + /** Move constructor */ + WCHARStr (WCHARStr&&) = default; +#endif + + /** Destructor */ + virtual ~WCHARStr() {} + + + /** Assignment operator */ + WCHARStr& operator= (const WCHARStr& rhs) + { + fConstStr = rhs.fConstStr; + return *this; + } + +#if defined(AI_HAS_RVALUE_REFERENCES) && defined(AI_HAS_DEFAULTED_FUNCTIONS) + /** Assignment operator */ + WCHARStr& operator= (WCHARStr&&) = default; +#endif + + /** Converts the contents of this object to \c LPCWSTR. + The returned value is only valid for the lifetime of this object. + @return The \c LPCWSTR value. + */ + LPCWSTR as_LPCWSTR () const + { + return fConstStr.c_str(); + } + + /** Converts the contents of this object to \c #ASUnicode. + The returned value is only valid for the lifetime of this object. + @return A pointer to the \c #ASUnicode value. + */ + const ASUnicode* as_ASUnicode () const; + + /** Computes the length of the string contents of this object. + @return The number of \c WCHAR characters. + */ + size_t length() const; + + /* Convenience operators */ +#if defined(_NATIVE_WCHAR_T_DEFINED) + // This operator is redundant if wchar_t is not an intrinsic. It cannot be distinguished from the const ASUnicode* operator. + operator LPCWSTR () const + { + return as_LPCWSTR(); + } +#endif //defined(_NATIVE_WCHAR_T_DEFINED) + + operator const ASUnicode* () const + { + return as_ASUnicode(); + } + +protected: + std::basic_string fConstStr; +}; + +#endif /* WIN_ENV */ + +/** \c UnicodeString objects provide basic string functionality for + Unicode-based strings, similar to that provided by the standard C string library. + + The contents of the string are treated as if all characters are represented + as full 32-bit Unicode characters, which means you do not need to know the + internal representation of the string, or deal with surrogate pairs during + editing or searching operations. + +*/ +class UnicodeString { +public: + /** A numeric relative offset type (signed integer). */ + typedef ai::sizediff_t offset_type; + /** A numeric value type (unsigned integer). */ + typedef size_t size_type; + /** Value type for a UTF-32 character code. */ + typedef ASUInt32 UTF32TextChar; + /** Value type for a UTF-16 character code. */ + typedef ASUnicode UTF16Char; + + typedef UTF32TextChar value_type; + + + /** The maximum number of characters possible in a string. This also indicates a failure if used as return value. */ + static const size_type npos; + + /** Normalization forms for use with the \c #normalize() method. + See http://www.unicode.org/reports/tr15/ for more information. */ + enum NormalizedForm { + /** Canonical Decomposition */ + kForm_NFD = 0, + /** Canonical Decomposition, followed by Canonical Composition */ + kForm_NFC, + /** Compatibility Decomposition */ + kForm_NFKD, + /** Comparability Decomposition, followed by Canonical Composition. */ + kForm_NFKC, + + /** Do not use this */ + kForm_DummyValue = 0xFFFFFFFF + }; + + /** TBD */ + class Collator; + + // ai::UnicodeString doesn't support non-const iterators because + // its operator[] or at() doesn't return a reference to value_type + // and for the same reason const_iterator doesn't overload operator->() + class const_iterator; + friend class const_iterator; + +public: + class const_iterator + : public std::iterator + { + public: + typedef const_iterator self_type; + typedef UnicodeString::size_type size_type; + typedef const UnicodeString* container_type; + + // default construct NULL iterator + // can't be dereferenced, incremented or decremented + const_iterator() : fIndex(0), fStringContainer(nullptr) + { + } + + // construct iterator corresponding to a given index in the container + const_iterator(size_type index, container_type container) + : fIndex(index), fStringContainer(container) + { + } + + const_iterator(const self_type& rhs) = default; // copy constructor + self_type& operator=(const self_type& rhs) = default; // copy assignment + + value_type operator*() const + { + if (!fStringContainer || fIndex >= fStringContainer->size()) + { + throw std::out_of_range{"string iterator not dereferencable"}; + } + + return (*fStringContainer)[fIndex]; + } + + self_type& operator++() // preincrement + { + ++fIndex; + return (*this); + } + + self_type operator++(int) // postincrement + { + auto temp = *this; + ++(*this); + return temp; + } + + self_type& operator--() // predecrement + { + --fIndex; + return (*this); + } + + self_type operator--(int) // postdecrement + { + auto temp = *this; + --(*this); + return temp; + } + + self_type& operator+=(difference_type offset) // increment by integer + { + fIndex += offset; + return (*this); + } + + self_type operator+(difference_type offset) const // return this + integer + { + self_type temp = *this; + return (temp += offset); + } + + self_type& operator-=(difference_type offset) // decrement by integer + { + fIndex -= offset; + return (*this); + } + + self_type operator-(difference_type offset) const // return this - integer + { + self_type temp = *this; + return (temp -= offset); + } + + difference_type operator-(const self_type& rhs) const // return difference of iterators + { + return (fIndex - rhs.fIndex); + } + + bool operator==(const self_type& rhs) const // test for iterator equality + { + return (fIndex == rhs.fIndex); + } + + bool operator!=(const self_type& rhs) const // test for iterator inequality + { + return !(*this == rhs); + } + + bool operator<(const self_type& rhs) const // test if this < rhs + { + return (fIndex < rhs.fIndex); + } + + bool operator>(const self_type& rhs) const // test if this > rhs + { + return (rhs < *this); + } + + bool operator<=(const self_type& rhs) const // test if this <= rhs + { + return (!(rhs < *this)); + } + + bool operator>=(const self_type& rhs) const // test if this >= rhs + { + return (!(*this < rhs)); + } + + private: + bool compatible(const self_type& rhs) const + { + return (fStringContainer->fImpl == rhs.fStringContainer->fImpl); + } + + private: + size_type fIndex = 0; + container_type fStringContainer; + }; + + //---------------------------------------------------------------------- + /** @name Constructors & Destructor */ + //---------------------------------------------------------------------- + //@{ + /** Empty string constructor. Creates a valid, empty string. This method is guaranteed + to not throw any exceptions. */ + explicit UnicodeString () AINOTHROW; + /** Constructs a UnicodeString from an encoded byte array. + @param string Array of bytes to construct from. + @param srcByteLen Length of the array. + @param encoding Encoding of the contents of the byte array. Default + is the current platform encoding + */ + explicit UnicodeString (const char* string, offset_type srcByteLen, + AICharacterEncoding encoding = kAIPlatformCharacterEncoding); + + /** Constructs a UnicodeString using a copies of a single character. + @param count Number of characters to insert in this string. + @param ch The UTF32 code point (character) with which to initialize the string. + */ + explicit UnicodeString (size_type count, UTF32TextChar ch); + + /** Convenience constructor from a \c char buffer that is known to be 0 terminated. + @param string Initial contents. + @param encoding Encoding of the contents of the byte array. + */ + explicit UnicodeString (const char* string, AICharacterEncoding encoding = kAIPlatformCharacterEncoding); + + /** Convenience constructor from a \c std::string. + @param string Initial contents. + @param encoding Encoding of the contents of the byte array. + */ + explicit UnicodeString (const std::string& string, AICharacterEncoding encoding = kAIPlatformCharacterEncoding); + + /** Constructor from 0-terminated, platform-byte-ordered, UTF-16 array. + Surrogate pairs are okay. Exception raised if string is malformed. + @param string Pointer to a valid 0-terminated array of UTF-16 \c ASUnicode. + */ + explicit UnicodeString (const ASUnicode* string); + + /** Constructor from the ZString referred to by a ZString key. + @param zStringKey The ZString key. + */ + explicit UnicodeString (const ZRef zStringKey); + + /** Constructor from a non-0-terminated platform-byte-ordered, UTF-16 array. + Surrogate pairs are okay. Exception raised if string is malformed. + @param string Pointer to an array of UTF-16 \c ASUnicode. + @param srcUTF16Count The number of UTF-16 code units to be read from string. + */ + explicit UnicodeString (const ASUnicode* string, size_type srcUTF16Count); + + /** Constructor from a \c std::basic_string of platform-byte-ordered \c ASUnicode characters. + Surrogate pairs are okay. Exception raised if string is malformed. + @param string A \c std::basic_string. + */ + explicit UnicodeString (const std::basic_string& string); + + /** Copy Constructor, creates a copy of a string. + @param s The string to copy. + */ + UnicodeString (const UnicodeString& s); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move Constructor + @param other The string to move from. + */ + UnicodeString(UnicodeString&& other) AINOEXCEPT; +#endif // AI_HAS_RVALUE_REFERENCES + + /** Destructor */ + ~UnicodeString (); + //@} + + //---------------------------------------------------------------------- + /** @name Factory methods */ + //---------------------------------------------------------------------- + //@{ + /** Constructs a UnicodeString from a + non-zero-terminated \c char array whose encoding is ISO Roman/Latin. + @param string The \c char array. + @param count the number of bytes (chars) in the string. + @return The Unicode string object. + */ + static UnicodeString FromRoman (const char* string, size_type count); + + /** Constructs a UnicodeString from a + zero-terminated \c char array whose encoding is ISO Roman/Latin. + @param string The \c char array. + @return The Unicode string object. + */ + static UnicodeString FromRoman (const char* string); + + /** Constructs a UnicodeString from a + \c std::string whose encoding is ISO Roman/Latin. + @param string The string. + @return The Unicode string object. + */ + static UnicodeString FromRoman (const std::string& string); + + /** Constructs a UnicodeString from a + Pascal string whose encoding is ISO Roman/Latin. + @param pascalString The Pascal string. + @return The Unicode string object. + */ + static UnicodeString FromRoman (const const_PStr& pascalString); + + /** Constructs a UnicodeString from a + non-zero-terminated \c char array whose encoding is the current platform encoding. + @param string The \c char array. + @param count The number of bytes (chars) in the string. + @return The Unicode string object. + */ + static UnicodeString FromPlatform (const char* string, size_type count); + + /** Constructs a UnicodeString from a + zero-terminated \c char array whose encoding is the current platform encoding. + @param string The \c char array. + @return The Unicode string object. + */ + static UnicodeString FromPlatform (const char* string); + + /** Constructs a UnicodeString from a + \c std::string whose encoding is the current platform encoding. + @param string The string. + @return The Unicode string object. + */ + static UnicodeString FromPlatform (const std::string& string); + + /** Constructs a UnicodeString from a + Pascal string whose encoding is the current platform encoding. + @param pascalString The Pascal string. + @return The Unicode string object. + */ + static UnicodeString FromPlatform (const const_PStr& pascalString); + + /** Constructs a UnicodeString from a + zero-terminated \c char array whose encoding is UTF8. + @param string The \c char array. + @return The Unicode string object. + */ + static UnicodeString FromUTF8 (const char* string); + + /** Constructs a UnicodeString from a + \c std::string whose encoding is UTF8. + @param string The string. + @return The Unicode string object. + */ + static UnicodeString FromUTF8 (const std::string& string); + + /** Constructs a UnicodeString from a + Pascal string whose encoding is UTF8. + @param pascalString The Pascal string. + @return The Unicode string object. + */ + static UnicodeString FromUTF8 (const const_PStr& pascalString); + + //@} + + /* Basic operations (as in std::basic_string) */ + + /** Appends a string to this string. + @param str The string to append. + @return A reference to this Unicode string object. + */ + UnicodeString& append (const UnicodeString& str); + + /** Appends a substring of a given string to this string. + @param str The source string of the substring. + @param startOffset The 0-based index of the first character in the substring. + @param count The maximum number of characters in the substring. + @return A reference to this Unicode string object. + */ + UnicodeString& append (const UnicodeString& str, size_type startOffset, + size_type count); + + /** Appends a given number of copies of a given character to this string. + @param count The number of characters to append. + @param ch The character to append. + @return A reference to this Unicode string object. + */ + UnicodeString& append (size_type count, UTF32TextChar ch) + { return append(UnicodeString(count, ch)); } + + /** Replaces the contents of this string with another string. + @param str The new contents. + @return A reference to this Unicode string object. + */ + UnicodeString& assign (const UnicodeString& str); + + /** Replaces the contents of this string with a substring of another string. + @param str The source of the substring. + @param offset The 0-based index of the first character in the substring. + @param count The maximum number of characters in the substring. + @return A reference to this Unicode string object. + */ + UnicodeString& assign (const UnicodeString& str, size_type offset, + size_type count) + { return assign(str.substr(offset, count)); } + + /** Retrieves the UTF32 code point (character) from a string by position index. + Raises \c #kUnicodeStringBadIndex exception if offset is out of range. + @param offset The 0-based index of the character. + @return The UTF32 value of the character. + */ + UTF32TextChar at (size_type offset) const; + + /** Erases all characters in this string. Same as erase(0, npos). + Uninitialized strings remain unchanged. + @return Nothing. + @see \c #erase() + */ + void clear (); + + /** Compares this string and another string for equality. + Uninitialized strings are equal to other uninitialized strings and + to empty strings.Uninitialized and empty strings are less than initialized, + non-empty strings. + @param str The string to compare against (right side of compare).. + @return Zero if the two strings are equal. +
Negative if this string is less than \c str. +
Positive if this string is greater than \c str. + */ + ai::int32 compare (const UnicodeString& str) const; + + /** Compares this string and a substring of another string for equality. + Uninitialized strings are equal to other uninitialized strings and + to empty strings.Uninitialized and empty strings are less than initialized, + non-empty strings. + @param pos The 0-based index of the first character of the substring. + @param num The number of characters to compare. + @param str The source of the substring to compare against (right side of compare).. + @return Zero if this string and the substring are equal. +
Negative if this string is less than the substring of \c str. +
Positive if this string is greater than the substring of \c str. + */ + ai::int32 compare (size_type pos, size_type num, const UnicodeString& str) const; + + /** Compares a substring of this string and a substring of another string for equality. + Uninitialized strings are equal to other uninitialized strings and + to empty strings.Uninitialized and empty strings are less than initialized, + non-empty strings. + @param pos The 0-based index of the first character of the substring in this string. + @param num The number of characters to compare in this string. + @param str The source of the substring to compare against (right side of compare).. + @param startOffset The 0-based index of the first character of the substring of \c str. + @param count The number of characters from \c str to compare. + @return Zero if the two substrings are equal. +
Negative if the substring of this string is less than the substring of \c str. +
Positive if the substring of this string is greater than the substring of \c str. + */ + ai::int32 compare (size_type pos, size_type num, const UnicodeString& str, + size_type startOffset, size_type count) const; + + /** Retrieves the number of characters (UTF code points) in this string. + @return The number of UTF code points in this string. + */ + size_type length () const; + + /** Reports whether this string is an empty string. + @return True if the string is empty. + */ + bool empty () const; + + /** Removes characters (UTF code points) from this string. + @param pos The 0-based position index of the first character to remove. + @param count The number of characters to remove. + @return A reference to this Unicode string object. + */ + UnicodeString& erase (size_type pos=0, size_type count = npos); + + /** Erase character from this string + @param position iterator to the character to remove + @return iterator pointing to the character immediately following the character erased, + or end() if no such character exists + */ + const_iterator erase (const_iterator position) + { + size_type index = position - begin(); + erase(index, 1); + return (begin() + index); + } + + /** Erase substring [first, last) from this string + @param first, last Range of the characters to remove + @return iterator pointing to the character last pointed to before the erase, + or end() if no such character exists + */ + const_iterator erase (const_iterator first, const_iterator last) + { + size_type index = first - begin(); + erase(index, last - first); + return (begin() + index); + } + + /** Searches for a character in this string. + @param ch The character to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the found character, or + the number of characters in this string (\c #npos) + if the character is not found. + */ + size_type find (UTF32TextChar ch, size_type startOffset = 0 ) const; + + /** Searches for a string within a subset of this string. + @param target The string to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the first character of the target + string within this string, if found, or the number of + characters in this string (\c #npos) + if the target string is not found. + */ + size_type find (const UnicodeString& target, size_type startOffset = 0) const; + + /** Searches for a substring within a subset of this string. + @param target The string to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @param count The number of characters in the target string to search for. + @return The 0-based position index of the first character of the target + substring within this string, if found, or (\c #npos) + if the target substring is not found. + */ + size_type find (const UnicodeString& target, size_type startOffset, size_type count) const; + + /** Searches for a character in this string, performing a caseless compare. + @param ch The character to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the found character, or (\c #npos) + if the character is not found. + */ + size_type caseFind (UTF32TextChar ch, size_type startOffset = 0 ) const + { return caseFind(ai::UnicodeString(1, ch), startOffset, 1); } + + /** Searches for a string within a subset of this string, performing a caseless compare. + @param target The string to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the first character of the target + string within this string, if found, or (\c #npos) + if the target string is not found. + */ + size_type caseFind (const UnicodeString& target, size_type startOffset = 0) const + { return caseFind(target, startOffset, target.length()); } + + /** Searches for a substring within a subset of this string, performing a caseless compare. + @param target The string to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @param count The number of characters in the target string to search for. + @return The 0-based position index of the first character of the target + substring within this string, if found, or (\c #npos) + if the target substring is not found. + */ + size_type caseFind (const UnicodeString& target, size_type startOffset, size_type count) const; + + /** Searches for a character in this string, + moving backward from a point in this string. + @param ch The character to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the found character, or (\c #npos) + if the character is not found. + */ + size_type rfind (UTF32TextChar ch, size_type startOffset = npos ) const; + + /** Searches for a string within a subset of this string, + moving backward from a point in this string. + @param target The string to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the first character of the target + string within this string, if found, or (\c #npos) + if the target string is not found. + */ + size_type rfind (const UnicodeString& target, size_type startOffset = npos) const; + + /** Searches for a substring within a subset of this string, + moving backward from a point in this string. + @param target The string to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @param count The number of characters in the target string to search for. + @return The 0-based position index of the first character of the target + substring within this string, if found, or (\c #npos) + if the target substring is not found. + */ + size_type rfind (const UnicodeString& target, size_type startOffset, size_type count) const; + + /** Searches for the first character of a string within a subset of this string. + @param target The string to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the first character of the target + string within this string, if found, or (\c #npos) + if the first character of the target string is not found. + */ + size_type find_first_of (const UnicodeString& target, size_type startOffset = 0) const + { return find_first_of(target, startOffset, npos); } + + /** Searches for the first character of a string within a subset of this string. + @param target The string to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @param count The number of characters in the substring to search. + @return The 0-based position index of the first character of the target + string within this string, if found, or (\c #npos) + if the character is not found. + */ + size_type find_first_of (const UnicodeString& target, size_type startOffset, size_type count) const; + + /** Searches for the last character of a string within a subset of this string. + @param target The string containing the character to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the last character of the target + string within this string, if found, or (\c #npos) + if the character is not found. + */ + size_type find_last_of (const UnicodeString& target, size_type startOffset = npos) const + { return find_last_of(target, startOffset, npos); } + + /** Searches for the last character of a string within a subset of this string. + @param target The string containing the character to search for. + @param startOffset The 0-based position index in this string at which to start the search. + @param count The number of characters in this string in which to search. + @return The 0-based position index of the last character of the target + string within this string, if found, or (\c #npos) + if the character is not found. + */ + size_type find_last_of (const UnicodeString& target, size_type startOffset, size_type count) const; + + /** Searches for the first occurrence in this string of a character + that is not in a target string. + @param target The target string. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the character within this string, + if found, or (\c #npos) if the character is not found. + */ + size_type find_first_not_of (const UnicodeString& target, size_type startOffset = 0) const + { return find_first_not_of(target, startOffset, npos); } + + /** Searches for the first occurrence in a subset of this string of a character + that is not in a target string. + @param target The target string. + @param startOffset The 0-based position index in this string at which to start the search. + @param count The number of characters in this string to search. + @return The 0-based position index of the character within this string, + if found, or (\c #npos) if the character is not found. + */ + size_type find_first_not_of (const UnicodeString& target, size_type startOffset, size_type count) const; + + /** Searches for the last occurrence in this string of a character + that is not in a target string. + @param target The target string. + @param startOffset The 0-based position index in this string at which to start the search. + @return The 0-based position index of the character within this string, + if found, or (\c #npos) if the character is not found. + */ + size_type find_last_not_of (const UnicodeString& target, size_type startOffset = npos) const + { return find_last_not_of (target, startOffset, npos); } + + /** Searches for the last occurrence in a subset of this string of a character + that is not in a target string. + @param target The target string. + @param startOffset The 0-based position index in this string at which to start the search. + @param count The number of characters in this string to search. + @return The 0-based position index of the character within this string, + if found, or (\c #npos) if the character is not found. + */ + size_type find_last_not_of (const UnicodeString& target, size_type startOffset, size_type count) const; + + /** Replaces a substring in this string with another string. + @param pos The 0-based position index in this string at which to start the replacement. + @param num The number of characters in this string to replace. + @param str The replacement string. + @return This string object. + */ + UnicodeString& replace (size_type pos, size_type num, const UnicodeString& str) + { return replace(pos, num, str, 0, npos); } + + /** Replaces a substring in this string with a substring of another string. + @param pos The 0-based position index in this string at which to start the replacement. + @param num The number of characters in this string to replace. + @param str The replacement string. + @param count The number of characters in the replacement substring, starting at the first character. + @return This string object. + */ + UnicodeString& replace (size_type pos, size_type num, const UnicodeString& str, size_type count) + { return replace(pos, num, str, 0, count); } + + /** Replaces a substring in this string with a substring of another string. + @param pos The 0-based position index in this string at which to start the replacement. + @param num The number of characters in this string to replace. + @param str The replacement string. + @param startOffset The 0-based position index of the first character of the replacement substring. + @param count The number of characters in the replacement substring, starting at the offset. + @return This string object. + */ + UnicodeString& replace (size_type pos, size_type num, const UnicodeString& str, + size_type startOffset, size_type count); + + /** Inserts a string into this string, inserting as many characters as will fit. + @param insertOffset The 0-based position index in this string + after which to start the insertion. + @param str The string to be partially or wholly inserted. + @return This string object. + */ + UnicodeString& insert (size_type insertOffset, const UnicodeString& str) + { return insert(insertOffset, str, 0, npos); } + + /** Inserts a substring into this string. + @param insertOffset The 0-based position index in this string + after which to start the insertion. + @param str The source string of the substring to insert. + @param offset he 0-based position index of the first character + of the substring to insert. + @param count The number of characters to insert. + @return This string object. + */ + UnicodeString& insert (size_type insertOffset, const UnicodeString& str, + size_type offset, size_type count); + + /** Inserts repeated characters into this string. + @param insertOffset The 0-based position index in this string + after which to start the insertion. + @param count The number of copies of the character to insert. + @param ch The character to insert. + @return This string object. + */ + UnicodeString& insert (size_type insertOffset, size_type count, + UTF32TextChar ch) + { return insert(insertOffset, UnicodeString(count, ch), 0, count); } + + /** Appends a character to the end of this string. + @param ch The character to append. + @return Nothing. + */ + void push_back(UTF32TextChar ch) + { (void) append(1, ch); } + + /** Resizes this string, truncating it or adding characters as needed. + @param count The new number of characters. + @param ch The UTF code point value with which to initialize new elements, + if the size of the string is increased. + @return Nothing. + */ + void resize (size_type count, UTF32TextChar ch = UTF32TextChar()); + + /** Retrieves number of characters (UTF code points) that this string can hold without reallocation. + This may be the same as or more than \c #length(). + @return The number of characters that can be held in this string without reallocation. + */ + ai::UnicodeString::size_type capacity () const; + + /** Request to change the capacity of this string to accommodate at least the specified number of characters. + If new capacity is greater than the current \c #capacity(), new storage is allocated, and \c #capacity() + is made equal or greater than new capacity. + If new capacity is less than or equal to the current \c #capacity(), there is no effect. + @param count The new desired capacity of this string in number of characters. + @return Nothing. + */ + void reserve (size_type count); + + /** Retrieves the number of characters (UTF code points) in this string. + This is the same as \c #length(). + @return The number of UTF code points in this string. + */ + ai::UnicodeString::size_type size () const + { return length(); } + + /** Creates a copy of a substring of this string. + @param offset The 0-based position index of the first character + to be copied to the substring. + @param count The maximum number of characters to copy to the new substring. + @return A \c UnicodeString object containing the requested substring. + */ + UnicodeString substr (size_type offset = 0, size_type count = npos) const; + + /** Swaps the contents of this string with another string. + @param str The string to swap. + @return Nothing. + */ + void swap (UnicodeString& str) AINOEXCEPT; + + /* Operators */ + + /** Assignment operator. + @param rhs The Unicode string object to assign into this one. + @return A reference to this string. + */ + UnicodeString& operator= (const UnicodeString& rhs); + +#ifdef AI_HAS_RVALUE_REFERENCES + /** Move Assignment operator. + @param rhs The Unicode string object to be moved from. + @return A reference to this string. + */ + UnicodeString& operator= (UnicodeString&& rhs) AINOEXCEPT; +#endif // AI_HAS_RVALUE_REFERENCES + + /** Append operator. + @param ch The character to append to this string. + @return A reference to this string. + */ + UnicodeString& operator+= (UTF32TextChar ch) + { return append(1, ch); } + + /** Append operator. + @param rhs The Unicode string object to append to this one. + @return A reference to this string. + */ + UnicodeString& operator+= (const UnicodeString& rhs) + { return append(rhs); } + + /** Retrieves a character from this string. + @param offset The 0-based position index of the character. + @return The character. + + @note This behavior differs from \c std::basic_string operator[]. + This method returns the character at the given offset. + \c std::basic_string::operator[] returns a writeable reference + to the elopement at the given offset. + */ + UTF32TextChar operator[] (size_type offset) const; + + /** Equality operator. Does a simple, direct, code-point-based + comparison. + @param rhs The string with which to compare this string. + @return True if the strings are equal. + */ + bool operator== (const UnicodeString& rhs) const + { return compare(rhs) == 0; } + + /** Non-equality operator. Does a simple, direct, code-point-based + comparison. + @param rhs The string with which to compare this string. + @return True if the strings are not equal. + */ + bool operator!= (const UnicodeString& rhs) const + { return !(operator==(rhs)); } + + /** Less-than operator. Does a simple, direct, code-point-based + comparison. + @param rhs The string with which to compare this string. + @return True if this string is less than the comparison string. + */ + bool operator< (const UnicodeString& rhs) const + { return compare(rhs) < 0; } + + /** iterator support + @return iterator to the first character + */ + const_iterator begin() const + { + return const_iterator(0, this); + } + + /** iterator support + @return iterator to the character following the last character + */ + const_iterator end() const + { + return const_iterator(this->size(), this); + } + + /* non-std::basic_string based functionality */ + + /** Convert the characters in this to lower case following the conventions of + the default locale. + @return A reference to this. + */ + UnicodeString& toLower(); + + /** + Convert the characters in this to UPPER CASE following the conventions of + the default locale. + @return A reference to this. + */ + UnicodeString& toUpper(); + + /** Compares this string with another string, doing a caseless + code-point-based comparison. + Uninitialized strings are equal to other uninitialized strings and + empty strings. Uninitialized and empty strings are less than initialized, + non-empty strings. + @param str The comparison string (right side of compare). + @return 0 if the strings are equal. +
Positive if this string is greater than the comparison string. +
Negative if this string is less than the comparison string. + */ + ai::int32 caseCompare (const UnicodeString& str) const + { return caseCompare(0, npos, str, 0, npos); } + + /** Compares this string with a substring of another string, doing a caseless + code-point-based comparison. + Uninitialized strings are equal to other uninitialized strings and + empty strings. Uninitialized and empty strings are less than initialized, + non-empty strings. + @param pos The 0-based position index of the first character of the substring. + @param num The number of characters to compare. + @param str The comparison string (right side of compare). + @return 0 if this string and the substring are equal. +
Positive if this string is greater than the substring. +
Negative if this string is less than the substring. + */ + ai::int32 caseCompare (size_type pos, size_type num, const UnicodeString& str) const + { return caseCompare(pos, num, str, 0, npos); } + + /** Compares a substring of this string with a substring of another string, doing a caseless + code-point-based comparison. + Uninitialized strings are equal to other uninitialized strings and + empty strings. Uninitialized and empty strings are less than initialized, + non-empty strings. + @param pos The 0-based position index of the first character of + the substring of this string. + @param num The number of characters in the substring of this string. + @param str The comparison string (right side of compare). + @param startOffset The 0-based position index of the first character of + the substring of the comparison string. + @param count The number of characters in the substring of the comparison string. + @return 0 if this substring and the comparison substring are equal. +
Positive if this substring is greater than the comparison substring. +
Negative if this substring is less than the comparison substring. + */ + ai::int32 caseCompare (size_type pos, size_type num, const UnicodeString& str, + size_type startOffset, size_type count) const; + + /** Compares this string with another string for canonical equivalence + of their normalized forms (NFD or NFC). This requires temporary + allocation of memory, and can throw out-of-memory errors. + + Uninitialized strings are equal to other uninitialized strings and + empty strings. Uninitialized and empty strings are less than initialized, + non-empty strings. + @param str The comparison string (right side of compare). + @return 0 if the strings are equal. +
Positive if this string is greater than the comparison string. +
Negative if this string is less than the comparison string. + + @note Substring comparison of non-normalized strings is not directly available. + You can create substrings and pass them to this method. + */ + ai::int32 canonicalCompare (const UnicodeString& str) const; + + /** Compares this string with another string for canonical equivalence + of their normalized forms (NFD or NFC), performing a caseless compare. + This requires temporary allocation of memory, and can throw out-of-memory errors. + + Uninitialized strings are equal to other uninitialized strings and + empty strings. Uninitialized and empty strings are less than initialized, + non-empty strings. + @param str The comparison string (right side of compare). + @return 0 if the strings are equal. +
Positive if this string is greater than the comparison string. +
Negative if this string is less than the comparison string. + + @note Substring comparison of non-normalized strings is not directly available. + You can create substrings and pass them to this method. + */ + ai::int32 canonicalCaseCompare (const UnicodeString& str) const; + + /** Normalizes this string in place into the specified form. + Normalization may require re-allocation of the string. If this happens, + the method can throw out-of-memory errors. On failure, this + string remains unmodified. + @param form The form with which to normalize the string. + @return A reference to this string. + */ + UnicodeString& normalize (NormalizedForm form); + + /** Reports whether this string contains surrogate pairs. + @return True if there are surrogate pairs in this string. + */ + bool hasSurrogates () const; + + /** Creates a UTF-16 string from the contents of this string, in platform byte order. + This method does not allocate any memory, and returns in constant time. + @param buffer A reference to a const pointer to \c UTF16Char in which + to return the contents of this string as UTF-16 code units. Can be + 0 if this string is empty. + This buffer pointer is only valid at most for the lifetime of this string. + The buffer is not guaranteed to be 0 terminated. + Use \c #as_ASUnicode() to guarantee a 0-terminated buffer. + @return The number of UTF-16 characters in the returned buffer. + */ + size_type utf_16 (const UTF16Char*& buffer) const; + + /** Creates a 0-terminated UTF-16 string from the contents of this string, + in platform byte order. + @return The contents of this string as UTF-16 code units. + */ + std::basic_string as_ASUnicode ( ) const; + + /** Creates a UTF-8 string from the contents of this string. + @return The contents of this string as a UTF-8 encoded \c std::string. + */ + std::string as_UTF8 ( ) const; + + /** Creates a platform-encoded version of this string. + @return The contents of this string as a UTF-8 encoded \c std::string. */ + std::string as_Platform () const; + + /** Creates an ISO Latin/Roman-encoded version of this string. + @return The contents of this string as a UTF-8 encoded \c std::string. */ + std::string as_Roman () const; + + /** Copies the contents of this string to a provided buffer. This method + follows the \c strlcpy paradigm. + @param buffer A pointer to a byte array in which to return the 0-terminated copy. + @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, + or \c NULL to return the required size. + @param encoding The encoding for the result. + @return The size needed to write the entire string contents to a buffer, + including a 0 terminator. + */ + size_type getToBuffer ( char* buffer, size_type bufferMax, AICharacterEncoding encoding ) const; + + /** Copies the contents of this string to a Pascal string in a provided buffer. + @param pascalString A pointer to a Pascal string in which to return the 0-terminated copy. + @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, + or \c NULL to return the required size. + @param encoding The encoding for the result. + @return The size needed to write the entire string contents to a buffer, + including a 0 terminator. + */ + size_type getToBuffer ( const PStr& pascalString, size_type bufferMax, AICharacterEncoding encoding ) const; + + /** Copies the contents of this string to a Unicode string in a provided buffer. + @param buffer A pointer to a Unicode string in which to return the 0-terminated copy. + @param bufferMax The maximum count of UTF-16 code units (\c ASUnicode) to write to the + buffer including a 0 terminator. Or, pass 0 to request + the required buffer size. + @return The size needed to write the entire string contents to a buffer, + including a 0 terminator. + */ + size_type as_ASUnicode (ASUnicode* buffer, size_type bufferMax ) const; + + /** Copies the contents of this string to a platform-encoded Pascal string in a provided buffer. + @param pascalString A pointer to a Pascal string in which to return the 0-terminated copy. + @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, + or \c NULL to return the required size. + @return The size needed to write the entire string contents to a buffer, + including a 0 terminator. + */ + size_type as_Platform ( const PStr& pascalString, size_type bufferMax ) const; + + /** Copies the contents of this string to a C string in a provided buffer. + @param buffer A pointer to a C string in which to return the 0-terminated copy. + @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, + or \c NULL to return the required size. + @return The size needed to write the entire string contents to a buffer, + including a 0 terminator. + */ + size_type as_Platform ( char* buffer, size_type bufferMax ) const; + + /** Copies the contents of this string to an ISO Latin/Roman-encoded C string in a provided buffer. + @param buffer A pointer to a C string in which to return the 0-terminated copy. + @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, + or \c NULL to return the required size. + @return The size needed to write the entire string contents to a buffer, + including a 0 terminator. + */ + size_type as_Roman ( char* buffer, size_type bufferMax ) const; + + /** Copies the contents of this string to an ISO Latin/Roman-encoded Pascal string in a provided buffer. + @param pascalString A pointer to a Pascal string in which to return the 0-terminated copy. + @param bufferMax The maximum byte count to write to the buffer, including the 0 terminator, + or \c NULL to return the required size. + @return The size needed to write the entire string contents to a buffer, + including a 0 terminator. + */ + size_type as_Roman ( const PStr& pascalString, size_type bufferMax ) const; + + /** Creates a \c std::string from the contents of this string. Can throw + an out-of-memory error. + @param encoding The encoding for the result. + @return The string result. + */ + std::string getInStdString (AICharacterEncoding encoding) const; + + /** Copies the contents of this string to an \c ai::AutoBuffer. + @param encoding The encoding for the result. + @param b The buffer in which to return the result. The resulting + contents might not be 0 terminated. + @return The number of characters (bytes) returned in the buffer. + */ + size_type getAs (AICharacterEncoding encoding, ai::AutoBuffer& b) const; + +#if defined(MAC_ENV) + + //---------------------------------------------------------------------- + /** @name Mac OS-specific Methods */ + //---------------------------------------------------------------------- + //@{ + /** Constructs a Unicode string object from a Mac OS \c CFString. + @param cfString The source \c CFString. + */ + explicit UnicodeString (const CFStringRef& cfString); + + /** Converts the contents of this string to a Mac OS \c CFString. + @param alloc A valid \c CFAllocatorRef for allocating the \c CFString. + @return An immutable \c CFString object containing chars, or \c NULL if there was a problem + creating the object. You must dispose of this object when it is no longer needed. + */ + CFStringRef as_CFString (CFAllocatorRef alloc) const; + //@} +#endif // defined(MAC_ENV) + +#if defined(WIN_ENV) + + //---------------------------------------------------------------------- + /** @name Windows-specific Methods */ + //---------------------------------------------------------------------- + //@{ + /** Constructs a Unicode string object from a Windows \c WCHARStr wrapper object. + @param string The source \c WCHARStr. + */ + explicit UnicodeString (const WCHARStr& string); + + /** Converts the contents of this string to a \c WCHARStr wrapper object. + @return The \c WCHARStr object. Contents are UTF-16 encoded. + */ + WCHARStr as_WCHARStr () const; + + /** Copies the contents of this string to a provided buffer. + @param buffer A pointer to a buffer of \c WCHARStr::LPWSTR in which to return the + 0-terminated copy. + @param bufferMax The maximum count of \c WCHARStr::LPWSTR to write to the buffer. + @return The size needed to write the entire string contents to a buffer, + including a 0 terminator. Returned size is the count of \c WCHARStr::LPWSTR + needed. + */ + size_type as_WCHARStr (WCHARStr::LPWSTR buffer, size_type bufferMax ) const; + + //@} +#endif // defined(WIN_ENV) + + +public: // internal use public interface + void deleteImpl(); + +protected: + explicit UnicodeString(class CAIUnicodeStringImpl* impl); + +private: + mutable CAIUnicodeStringImpl* fImpl; +}; + +/** Append operator. +@param lhs The Unicode string object to append to. +@param rhs The Unicode string object which is to be appended. +@return A new Unicode string object. +*/ +inline UnicodeString operator+(UnicodeString lhs, const UnicodeString& rhs) +{ + return lhs.append(rhs); +} + +/////////////////////////////////////////////////////////// +// Inline implementations - Yes, some of these could cause code bloat. +// These could be moved to the IAIUnicodeString.inl file. +// + +/////////////////////////////////////////////////////////// +// UnicodeString inlines +/////////////////////////////////////////////////////////// + +inline void UnicodeString::swap(UnicodeString& str) AINOEXCEPT +{ + std::swap(fImpl, str.fImpl); +} + +#ifdef AI_HAS_RVALUE_REFERENCES + +// Move Constructor +inline UnicodeString::UnicodeString(UnicodeString&& other) AINOEXCEPT + : fImpl{other.fImpl} +{ + other.fImpl = nullptr; +} + +// Move Assignment operator +inline UnicodeString& UnicodeString::operator=(UnicodeString&& rhs) AINOEXCEPT +{ + swap(rhs); + return *this; +} + +#endif // AI_HAS_RVALUE_REFERENCES + +inline UnicodeString& UnicodeString::insert (size_type insertOffset, const UnicodeString& str, + size_type offset, size_type count) +{ + if ( insertOffset > length() || offset > str.length() ) + throw ai::Error(kUnicodeStringBadIndex); + UnicodeString result = substr(0, insertOffset); + result.append(str, offset, count); + result.append(substr(insertOffset)); + + *this = result; + return *this; +} + +inline UnicodeString& UnicodeString::replace (size_type pos, size_type num, const UnicodeString& str, + size_type startOffset, size_type count) +{ + if ( pos > length() || startOffset > str.length() ) + throw ai::Error(kUnicodeStringBadIndex); + erase(pos, num); + insert(pos, str, startOffset, count); + + return *this; +} + +inline std::string UnicodeString::as_UTF8 ( ) const +{ + return getInStdString(kAIUTF8CharacterEncoding); +} + +inline std::string UnicodeString::as_Platform () const +{ + return getInStdString(kAIPlatformCharacterEncoding); +} + +inline std::string UnicodeString::as_Roman () const +{ + return getInStdString(kAIRomanCharacterEncoding); +} + +inline UnicodeString::size_type UnicodeString::as_ASUnicode ( ASUnicode* buffer, size_type bufferMax ) const +{ + const UTF16Char* bufPtr = 0; + const size_type kThisUTF16Len = utf_16(bufPtr) + 1; + const size_type kCopyMax = (bufferMax < kThisUTF16Len ? bufferMax : kThisUTF16Len) - 1; + memcpy(buffer, bufPtr, kCopyMax*sizeof(UTF16Char)); + buffer[kCopyMax] = 0; + + return kThisUTF16Len; +} + +#if defined(WIN_ENV) + +inline UnicodeString::size_type UnicodeString::as_WCHARStr ( WCHARStr::LPWSTR buffer, size_type bufferMax ) const +{ + AI_STATIC_CHECK(sizeof(WCHARStr::WCHAR) == sizeof(ai::UnicodeString::UTF16Char), WCHAR_size_does_not_match_unsigned_short_size); //-V503 + return as_ASUnicode( reinterpret_cast(buffer), bufferMax ); +} + +#endif // defined(WIN_ENV) + +inline UnicodeString::size_type UnicodeString::as_Platform ( char* buffer, size_type bufferMax ) const +{ + return getToBuffer( buffer, bufferMax, kAIPlatformCharacterEncoding); +} + +inline UnicodeString::size_type UnicodeString::as_Roman ( char* buffer, size_type bufferMax ) const +{ + return getToBuffer( buffer, bufferMax, kAIRomanCharacterEncoding); +} + +inline UnicodeString::size_type UnicodeString::as_Platform ( const ai::PStr& pascalString, size_type bufferMax ) const +{ + return getToBuffer( pascalString, bufferMax, kAIPlatformCharacterEncoding ); +} + +inline UnicodeString::size_type UnicodeString::as_Roman ( const ai::PStr& pascalString, size_type bufferMax ) const +{ + return getToBuffer( pascalString, bufferMax, kAIRomanCharacterEncoding ); +} + + + +#if defined(WIN_ENV) + +/////////////////////////////////////////////////////////// +// WCHARStr inlines +/////////////////////////////////////////////////////////// + +inline WCHARStr::WCHARStr (const UnicodeString& string) : fConstStr() +{ + AI_STATIC_CHECK(sizeof(WCHAR) == sizeof(ai::UnicodeString::UTF16Char), WCHAR_size_does_not_match_unsigned_short_size); //-V503 + + const std::basic_string& cInput = string.as_ASUnicode(); + const size_t cLen = cInput.length(); + + if ( cLen > 0 ) + fConstStr = std::basic_string(reinterpret_cast(cInput.data()), cLen); +}; + +#if defined(_NATIVE_WCHAR_T_DEFINED) + // This ctor is redundant if wchar_t is not an intrinsic. This is the same as the const ASUnicode* ctor. +inline WCHARStr::WCHARStr (WCHARStr::LPCWSTR wcharString) : fConstStr( wcharString ) +{ +} +#endif // defined(_NATIVE_WCHAR_T_DEFINED) + +inline WCHARStr::WCHARStr (const ASUnicode* string) +{ + if ( string && *string ) + { + AI_STATIC_CHECK(sizeof(WCHARStr::WCHAR) == sizeof(ai::UnicodeString::UTF16Char), WCHAR_size_does_not_match_unsigned_short_size); //-V503 + fConstStr.assign(reinterpret_cast(string)); + } +} + +inline const ASUnicode* WCHARStr::as_ASUnicode () const +{ + AI_STATIC_CHECK(sizeof(WCHARStr::WCHAR) == sizeof(ai::UnicodeString::UTF16Char), WCHAR_size_does_not_match_unsigned_short_size); //-V503 + return reinterpret_cast(this->as_LPCWSTR()); +} + +inline size_t WCHARStr::length() const +{ + return fConstStr.length(); +} + +#endif // defined(WIN_ENV) + +} // end of namespace ai + +#endif // _IAIUNICODESTRING_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.inl b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.inl index 83e0881..b09dc01 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.inl +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IAIUnicodeString.inl @@ -1,208 +1,211 @@ -/* - * Name: IAIUnicodeString.inl - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Common impl file for the core and plug-ins. - * This file is included by IAIUnicodeString.cpp & IAIUnicodeStringCore.cpp - * Code added here MUST be shareable between the core and plug-ins. - * * You may not throw specific errors from these methods. (ai::Error vs. CAIFault) - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2004-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef _IAIUNICODESTRING_INL_ -#define _IAIUNICODESTRING_INL_ - -#include - - -///////////////////////////////////////////////////////////////////////////////////////////////////////////// -// Factory methods -// - -ai::UnicodeString ai::UnicodeString::FromRoman (const char* string, size_type count) -{ - return UnicodeString(string, count, kAIRomanCharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromRoman (const char* string) -{ - return UnicodeString(string, kAIRomanCharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromRoman (const std::string& string) -{ - return UnicodeString(string, kAIRomanCharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromRoman (const const_PStr& pascalString) -{ - return UnicodeString((const char*) &(pascalString.get()[1]), pascalString.get()[0], kAIRomanCharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromPlatform (const char* string, size_type count) -{ - return UnicodeString(string, count, kAIPlatformCharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromPlatform (const char* string) -{ - return UnicodeString(string, kAIPlatformCharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromPlatform (const std::string& string) -{ - return UnicodeString(string, kAIPlatformCharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromPlatform (const const_PStr& pascalString) -{ - return UnicodeString((const char*) &(pascalString.get()[1]), pascalString.get()[0], kAIPlatformCharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromUTF8 (const char* string) -{ - return UnicodeString(string, kAIUTF8CharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromUTF8 (const std::string& string) -{ - return UnicodeString(string, kAIUTF8CharacterEncoding); -} - -ai::UnicodeString ai::UnicodeString::FromUTF8 (const const_PStr& pascalString) -{ - return UnicodeString((const char*) &(pascalString.get()[1]), pascalString.get()[0], kAIUTF8CharacterEncoding); -} - -///////////////////////////////////////////////////////////////////////////////////////////////////////////// -// get to buffer methods -// - -ai::UnicodeString::size_type ai::UnicodeString::getToBuffer ( char* buffer, size_type bufferMax, - AICharacterEncoding encoding ) const -{ - // This is a sub-optimal implementation of hacking down the output text to fit in the buffer. - // We're trying to ensure that the buffer contains whole characters in the target encoding. - std::string s = getInStdString(encoding); - const size_type kMaxByteLen = bufferMax - 2; - const ai::UnicodeString::size_type kRequiredLength = s.length() + 2; - - if ( kRequiredLength > bufferMax ) - { - ai::UnicodeString tmp = *this; - ai::UnicodeString::size_type hackLen = this->length(); - while (kMaxByteLen < s.length()) - { - --hackLen; - tmp.erase(hackLen); - s = tmp.getInStdString(encoding); - } - } - - size_type count = 0; - for ( count = 0; count < s.length(); ++count ) - { - buffer[count] = s[count]; - } - buffer[count] = 0; - buffer[count+1] = 0; - - return kRequiredLength; -} - -ai::UnicodeString::size_type ai::UnicodeString::getToBuffer ( const PStr& pascalString, size_type bufferMax, - AICharacterEncoding encoding ) const -{ - // This is a sub-optimal implementation of hacking down the output text to fit in the buffer. - // We're trying to ensure that the buffer contains whole characters in the target encoding. - std::string s = getInStdString(encoding); - const size_type kMaxByteLen = bufferMax; - const ai::UnicodeString::size_type kRequiredLength = s.length(); - - if ( kRequiredLength > bufferMax ) - { - ai::UnicodeString tmp = *this; - ai::UnicodeString::size_type hackLen = this->length(); - while (kMaxByteLen < s.length()) - { - --hackLen; - tmp.erase(hackLen); - s = tmp.getInStdString(encoding); - } - } - - size_type count = 0; - for ( count = 0; count < s.length(); ++count ) - { - pascalString[count+1] = static_cast(s[count]); - } - pascalString[0] = static_cast(count); - - return kRequiredLength; -} - - -#if defined( MAC_ENV ) -ai::UnicodeString::UnicodeString (const CFStringRef& cfString) -: fImpl(0) -{ - const UniChar* uc = CFStringGetCharactersPtr(cfString); - CFIndex cfLength = CFStringGetLength(cfString); - - if(cfLength > 0) - { - if ( uc != 0 ) - { - *this = UnicodeString(uc, cfLength); - } - else - { - CFRange cfRange; - cfRange.location = 0; - cfRange.length = cfLength; - std::vector buf(cfLength); - CFStringGetCharacters(cfString, cfRange, &buf[0]); - *this = UnicodeString(&buf[0], cfLength); - } - } -} - -CFStringRef ai::UnicodeString::as_CFString ( CFAllocatorRef alloc ) const -{ - size_type count = 0; - const UTF16Char* stringContents = 0; - - count = utf_16( stringContents ); - - return CFStringCreateWithCharacters( alloc, stringContents, count ); -} - -#elif defined( WIN_ENV ) - -ai::UnicodeString::UnicodeString (const WCHARStr& string) -: fImpl(0) -{ - AI_STATIC_CHECK(sizeof(WCHARStr::WCHAR) == sizeof(UTF16Char), WCHAR_size_does_not_match_unsigned_short); //-V503 - *this = UnicodeString( string.as_ASUnicode() ); -} - -ai::WCHARStr ai::UnicodeString::as_WCHARStr () const -{ - return WCHARStr(*this); -} - - -#endif // MAC_ENV - -#endif //_IAIUNICODESTRING_INL_ +/* + * Name: IAIUnicodeString.inl + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Common impl file for the core and plug-ins. + * This file is included by IAIUnicodeString.cpp & IAIUnicodeStringCore.cpp + * Code added here MUST be shareable between the core and plug-ins. + * * You may not throw specific errors from these methods. (ai::Error vs. CAIFault) + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2004-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef _IAIUNICODESTRING_INL_ +#define _IAIUNICODESTRING_INL_ + +#include + + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// Factory methods +// + +ai::UnicodeString ai::UnicodeString::FromRoman (const char* string, size_type count) +{ + return UnicodeString(string, count, kAIRomanCharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromRoman (const char* string) +{ + return UnicodeString(string, kAIRomanCharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromRoman (const std::string& string) +{ + return UnicodeString(string, kAIRomanCharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromRoman (const const_PStr& pascalString) +{ + return UnicodeString((const char*) &(pascalString.get()[1]), pascalString.get()[0], kAIRomanCharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromPlatform (const char* string, size_type count) +{ + return UnicodeString(string, count, kAIPlatformCharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromPlatform (const char* string) +{ + return UnicodeString(string, kAIPlatformCharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromPlatform (const std::string& string) +{ + return UnicodeString(string, kAIPlatformCharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromPlatform (const const_PStr& pascalString) +{ + return UnicodeString((const char*) &(pascalString.get()[1]), pascalString.get()[0], kAIPlatformCharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromUTF8 (const char* string) +{ + return UnicodeString(string, kAIUTF8CharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromUTF8 (const std::string& string) +{ + return UnicodeString(string, kAIUTF8CharacterEncoding); +} + +ai::UnicodeString ai::UnicodeString::FromUTF8 (const const_PStr& pascalString) +{ + return UnicodeString((const char*) &(pascalString.get()[1]), pascalString.get()[0], kAIUTF8CharacterEncoding); +} + +///////////////////////////////////////////////////////////////////////////////////////////////////////////// +// get to buffer methods +// + +ai::UnicodeString::size_type ai::UnicodeString::getToBuffer ( char* buffer, size_type bufferMax, + AICharacterEncoding encoding ) const +{ + // This is a sub-optimal implementation of hacking down the output text to fit in the buffer. + // We're trying to ensure that the buffer contains whole characters in the target encoding. + std::string s = getInStdString(encoding); + const size_type kMaxByteLen = bufferMax - 2; + const ai::UnicodeString::size_type kRequiredLength = s.length() + 2; + + if ( kRequiredLength > bufferMax ) + { + ai::UnicodeString tmp = *this; + ai::UnicodeString::size_type hackLen = this->length(); + while (kMaxByteLen < s.length()) + { + --hackLen; + tmp.erase(hackLen); + s = tmp.getInStdString(encoding); + } + } + + size_type count = 0; + for ( count = 0; count < s.length(); ++count ) + { + buffer[count] = s[count]; + } + buffer[count] = 0; + buffer[count+1] = 0; + + return kRequiredLength; +} + +ai::UnicodeString::size_type ai::UnicodeString::getToBuffer ( const PStr& pascalString, size_type bufferMax, + AICharacterEncoding encoding ) const +{ + // This is a sub-optimal implementation of hacking down the output text to fit in the buffer. + // We're trying to ensure that the buffer contains whole characters in the target encoding. + std::string s = getInStdString(encoding); + const size_type kMaxByteLen = bufferMax; + const ai::UnicodeString::size_type kRequiredLength = s.length(); + + if ( kRequiredLength > bufferMax ) + { + ai::UnicodeString tmp = *this; + ai::UnicodeString::size_type hackLen = this->length(); + while (kMaxByteLen < s.length()) + { + --hackLen; + tmp.erase(hackLen); + s = tmp.getInStdString(encoding); + } + } + + size_type count = 0; + for ( count = 0; count < s.length(); ++count ) + { + pascalString[count+1] = static_cast(s[count]); + } + pascalString[0] = static_cast(count); + + return kRequiredLength; +} + + +#if defined( MAC_ENV ) +ai::UnicodeString::UnicodeString (const CFStringRef& cfString) +: fImpl(0) +{ + if (cfString != nullptr) + { + const UniChar* uc = CFStringGetCharactersPtr(cfString); + CFIndex cfLength = CFStringGetLength(cfString); + + if (cfLength > 0) + { + if (uc != nullptr) + { + *this = UnicodeString(uc, cfLength); + } + else + { + CFRange cfRange; + cfRange.location = 0; + cfRange.length = cfLength; + std::vector buf(cfLength); + CFStringGetCharacters(cfString, cfRange, &buf[0]); + *this = UnicodeString(&buf[0], cfLength); + } + } + } +} + +CFStringRef ai::UnicodeString::as_CFString ( CFAllocatorRef alloc ) const +{ + size_type count = 0; + const UTF16Char* stringContents = 0; + + count = utf_16( stringContents ); + + return CFStringCreateWithCharacters( alloc, stringContents, count ); +} + +#elif defined( WIN_ENV ) + +ai::UnicodeString::UnicodeString (const WCHARStr& string) +: fImpl(0) +{ + AI_STATIC_CHECK(sizeof(WCHARStr::WCHAR) == sizeof(UTF16Char), WCHAR_size_does_not_match_unsigned_short); //-V503 + *this = UnicodeString( string.as_ASUnicode() ); +} + +ai::WCHARStr ai::UnicodeString::as_WCHARStr () const +{ + return WCHARStr(*this); +} + + +#endif // MAC_ENV + +#endif //_IAIUNICODESTRING_INL_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASFixed.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASFixed.hpp index 7bee8aa..339e5aa 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASFixed.hpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASFixed.hpp @@ -1,637 +1,637 @@ -/***********************************************************************/ -/* */ -/* IASFixed.hpp */ -/* ASFixed object wrapper class */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1996-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/* Started by Dave Lazarony, 03/10/1996 */ -/* */ -/***********************************************************************/ - -#ifndef __IASFixed_hpp__ -#define __IASFixed_hpp__ - -/* - * Includes - */ - -#include "ASTypes.h" - -/* - * Types and Defines - */ - -// Mac headers define GetItem. DRL 7/29/96 -#ifdef GetItem -#undef GetItem -#endif - -#define kASFixedZero ((ASFixed) 0x00000000) -#define kASFixedHalf ((ASFixed) 0x00008000) -#define kASFixedOne ((ASFixed) 0x00010000) -#define kASFixedMin ((ASFixed) 0x80000000) -#define kASFixedMax ((ASFixed) 0x7FFFFFFF) -#define kASFixedUnknown ((ASFixed) 0x80000000) - -typedef long double asdouble_t; - -#define _ShortToASFixed(a) ((ASFixed)(a) << 16) - -/* - * Global Suite Pointer - */ - -class IASFixed; -inline int operator != (const IASFixed& a, const IASFixed& b); -inline int operator > (const IASFixed& a, const IASFixed& b); -inline int operator >= (const IASFixed& a, const IASFixed& b); -inline int operator <= (const IASFixed& a, const IASFixed& b); - -class IASFixed -{ - -public: - IASFixed(); - IASFixed(const ASFixed a); - IASFixed(const short a); -//#ifndef __TREAT_ASINT32_AS_INT__ -// IASFixed(const int a); -//#endif - IASFixed(const float a); - IASFixed(const double a); - - // conversion operators - - operator ASFixed() const; - operator short() const; -/*#ifndef __TREAT_ASINT32_AS_INT__ - operator int() const; -#endif -*/ - operator float() const; - operator double() const; - - // comparison operators - - friend inline int operator == (const IASFixed& a, const IASFixed& b); - //friend inline int operator == (short a, const IASFixed& b); - //friend inline int operator == (const IASFixed& a, short b); - friend inline int operator == (int a, const IASFixed& b); - friend inline int operator == (const IASFixed& a, int b); - friend inline int operator == (const float& a, const IASFixed& b); - friend inline int operator == (const IASFixed& a, const float& b); - friend inline int operator == (const double& a, const IASFixed& b); - friend inline int operator == (const IASFixed& a, const double& b); - - friend inline int operator != (const IASFixed& a, const IASFixed& b); - //friend inline int operator != (short a, const IASFixed& b); - //friend inline int operator != (const IASFixed& a, short b); - friend inline int operator != (int a, const IASFixed& b); - friend inline int operator != (const IASFixed& a, int b); - friend inline int operator != (const float& a, const IASFixed& b); - friend inline int operator != (const IASFixed& a, const float& b); - friend inline int operator != (const double& a, const IASFixed& b); - friend inline int operator != (const IASFixed& a, const double& b); - - friend inline int operator > (const IASFixed& a, const IASFixed& b); - //friend inline int operator > (short a, const IASFixed& b); - //friend inline int operator > (const IASFixed& a, short b); - friend inline int operator > (int a, const IASFixed& b); - friend inline int operator > (const IASFixed& a, int b); - friend inline int operator > (const float& a, const IASFixed& b); - friend inline int operator > (const IASFixed& a, const float& b); - friend inline int operator > (const double& a, const IASFixed& b); - friend inline int operator > (const IASFixed& a, const double& b); - - friend inline int operator < (const IASFixed& a, const IASFixed& b); - //friend inline int operator < (short a, const IASFixed& b); - //friend inline int operator < (const IASFixed& a, short b); - friend inline int operator < (int a, const IASFixed& b); - friend inline int operator < (const IASFixed& a, int b); - friend inline int operator < (const float& a, const IASFixed& b); - friend inline int operator < (const IASFixed& a, const float& b); - friend inline int operator < (const double& a, const IASFixed& b); - friend inline int operator < (const IASFixed& a, const double& b); - - friend inline int operator >= (const IASFixed& a, const IASFixed& b); - //friend inline int operator >= (short a, const IASFixed& b); - //friend inline int operator >= (const IASFixed& a, short b); - friend inline int operator >= (int a, const IASFixed& b); - friend inline int operator >= (const IASFixed& a, int b); - friend inline int operator >= (const float& a, const IASFixed& b); - friend inline int operator >= (const IASFixed& a, const float& b); - friend inline int operator >= (const double& a, const IASFixed& b); - friend inline int operator >= (const IASFixed& a, const double& b); - - friend inline int operator <= (const IASFixed& a, const IASFixed& b); - //friend inline int operator <= (short a, const IASFixed& b); - //friend inline int operator <= (const IASFixed& a, short b); - friend inline int operator <= (int a, const IASFixed& b); - friend inline int operator <= (const IASFixed& a, int b); - friend inline int operator <= (const float& a, const IASFixed& b); - friend inline int operator <= (const IASFixed& a, const float& b); - friend inline int operator <= (const double& a, const IASFixed& b); - friend inline int operator <= (const IASFixed& a, const double& b); - - // unary minus - - friend inline IASFixed operator - (const IASFixed& a); - - // binary arithmetic operators - - friend inline IASFixed operator + (const IASFixed& a, const IASFixed& b); - friend inline IASFixed operator - (const IASFixed& a, const IASFixed& b); - friend inline IASFixed operator * (const IASFixed& a, const IASFixed& b); - friend inline IASFixed operator / (const IASFixed& a, const IASFixed& b); - - // unary arithmetic opererators - - void operator += (const IASFixed& a); - void operator -= (const IASFixed& a); - void operator *= (const IASFixed& a); - void operator /= (const IASFixed& a); - - friend inline IASFixed operator >> (const IASFixed& a, int amount); - friend inline IASFixed operator << (const IASFixed& a, int amount); - - friend inline IASFixed abs(const IASFixed& a); - -protected: - ASFixed f; - - static inline asdouble_t FixToX(ASFixed x); - static inline ASFixed XToFix(asdouble_t x); - static inline ASFixed FixedMul(ASFixed a, ASFixed b); - static inline ASFixed FixedDiv(ASFixed x, ASFixed y); - static inline ASFixed FixedSumChk(ASFixed a, ASFixed b); - -}; - -inline asdouble_t IASFixed::FixToX(ASFixed x) -{ - return ((asdouble_t)x) / 65536.0; -} - -inline ASFixed IASFixed::XToFix(asdouble_t x) -{ - ASFixed fx; - - if (x - 1.0 >= (asdouble_t)0x00007fff) - fx = 0x7fffffff; - else if (x + 1.0 <= -(asdouble_t)0x00008000) - fx = 0x80000000; - else - fx = (ASFixed)(x * (asdouble_t)0x00010000 + (x > 0.0 ? 0.5 : -0.5)); - - return fx; -} - -inline ASFixed IASFixed::FixedMul(ASFixed a, ASFixed b) -{ - asdouble_t da, db; - ASFixed fx; - - da = FixToX(a); - db = FixToX(b); - - fx = XToFix(da * db); - - return fx; -} - -inline ASFixed IASFixed::FixedDiv(ASFixed x, ASFixed y) -{ - if (!y) - { - if (x < 0) - return 0x80000000; - else - return 0x7fffffff; - } - - return XToFix((asdouble_t)x / (asdouble_t)y); -} - -inline ASFixed IASFixed::FixedSumChk(ASFixed a, ASFixed b) -{ - if (a == kASFixedMax || b == kASFixedMax) - return kASFixedMax; - else if (a == kASFixedMin || b == kASFixedMin) - return kASFixedMin; - else - { - ASFixed c; - bool aNeg, bNeg; - - aNeg = a < kASFixedZero; - bNeg = b < kASFixedZero; - c = a + b; - if (aNeg == bNeg && aNeg != (c < kASFixedZero)) - c = aNeg ? kASFixedMin : kASFixedMax; - return c; - } -} - -inline IASFixed::IASFixed() -{ -} - -inline IASFixed::IASFixed(const ASFixed a) -{ - f = a; -} - -inline IASFixed::IASFixed(const short a) -{ - f = ASFixed(a) << 16; -} -//#ifndef __TREAT_ASINT32_AS_INT__ -//inline IASFixed::IASFixed(const int a) -//{ -// f = ASFixed(a) << 16; -//} -//#endif -inline IASFixed::IASFixed(const float a) -{ - f = long(a * 65536.0); -} - -inline IASFixed::IASFixed(const double a) -{ - f = long(a * 65536.0); -} - -inline IASFixed::operator ASFixed() const -{ - return f; -} - -inline IASFixed::operator short() const -{ - return short(f >> 16); -} -#if 0 -#ifndef __TREAT_ASINT32_AS_INT__ -inline IASFixed::operator int() const -{ - return int(f >> 16); -} -#endif -#endif - -inline IASFixed::operator float() const -{ - return float(f / 65536.0); -} - -inline IASFixed::operator double() const -{ - return double(f / 65536.0); -} - -inline int operator == (const IASFixed& a, const IASFixed& b) -{ - return a.f == b.f; -} - -//inline int operator == (short a, const IASFixed& b) -//{ -// return IASFixed(a).f != b.f; -//} - -//inline int operator == (const IASFixed& a, short b) -//{ -// return a.f == IASFixed(b).f; -//} - -inline int operator == (int a, const IASFixed& b) -{ - return IASFixed(a).f == b.f; -} - -inline int operator == (const IASFixed& a, int b) -{ - return a.f == IASFixed(b).f; -} - -inline int operator == (const float& a, const IASFixed& b) -{ - return a == float(b); -} - -inline int operator == (const IASFixed& a, const float& b) -{ - return float(a) == b; -} - -inline int operator == (const double& a, const IASFixed& b) -{ - return a == double(b); -} - -inline int operator == (const IASFixed& a, const double& b) -{ - return double(a) == b; -} - -inline int operator != (const IASFixed& a, const IASFixed& b) -{ - return a.f != b.f; -} - -//inline int operator != (short a, const IASFixed& b) -//{ -// return IASFixed(a).f != b.f; -//} - -//inline int operator != (const IASFixed& a, short b) -//{ -// return a.f != IASFixed(b).f; -//} - -inline int operator != (int a, const IASFixed& b) -{ - return IASFixed(a).f != b.f; -} - -inline int operator != (const IASFixed& a, int b) -{ - return a.f != IASFixed(b).f; -} - -inline int operator != (const float& a, const IASFixed& b) -{ - return a != float(b); -} - -inline int operator != (const IASFixed& a, const float& b) -{ - return float(a) != b; -} - -inline int operator != (const double& a, const IASFixed& b) -{ - return a != double(b); -} - -inline int operator != (const IASFixed& a, const double& b) -{ - return double(a) != b; -} - -inline int operator > (const IASFixed& a, const IASFixed& b) -{ - return a.f > b.f; -} - -//inline int operator > (short a, const IASFixed& b) -//{ -// return IASFixed(a).f > b.f; -//} - -//inline int operator > (const IASFixed& a, short b) -//{ -// return a.f > IASFixed(b).f; -//} - -inline int operator > (int a, const IASFixed& b) -{ - return IASFixed(a).f > b.f; -} - -inline int operator > (const IASFixed& a, int b) -{ - return a.f > IASFixed(b).f; -} - -inline int operator > (const float& a, const IASFixed& b) -{ - return a > float(b); -} - -inline int operator > (const IASFixed& a, const float& b) -{ - return float(a) > b; -} - -inline int operator > (const double& a, const IASFixed& b) -{ - return a > double(b); -} - -inline int operator > (const IASFixed& a, const double& b) -{ - return double(a) > b; -} - -inline int operator < (const IASFixed& a, const IASFixed& b) -{ - return a.f < b.f; -} - -//inline int operator < (short a, const IASFixed& b) -//{ -// return IASFixed(a).f < b.f; -//} - -//inline int operator < (const IASFixed& a, short b) -//{ -// return a.f < IASFixed(b).f; -//} - -inline int operator < (int a, const IASFixed& b) -{ - return IASFixed(a).f < b.f; -} - -inline int operator < (const IASFixed& a, int b) -{ - return a.f < IASFixed(b).f; -} - -inline int operator < (const float& a, const IASFixed& b) -{ - return a < float(b); -} - -inline int operator < (const IASFixed& a, const float& b) -{ - return float(a) < b; -} - -inline int operator < (const double& a, const IASFixed& b) -{ - return a < double(b); -} - -inline int operator < (const IASFixed& a, const double& b) -{ - return double(a) < b; -} - -inline int operator >= (const IASFixed& a, const IASFixed& b) -{ - return a.f >= b.f; -} - -//inline int operator >= (short a, const IASFixed& b) -//{ -// return IASFixed(a).f >= b.f; -//} - -//inline int operator >= (const IASFixed& a, short b) -//{ -// return a.f >= IASFixed(b).f; -//} - -inline int operator >= (int a, const IASFixed& b) -{ - return IASFixed(a).f >= b.f; -} - -inline int operator >= (const IASFixed& a, int b) -{ - return a.f >= IASFixed(b).f; -} - -inline int operator >= (const float& a, const IASFixed& b) -{ - return a >= float(b); -} - -inline int operator >= (const IASFixed& a, const float& b) -{ - return float(a) >= b; -} - -inline int operator >= (const double& a, const IASFixed& b) -{ - return a >= double(b); -} - -inline int operator >= (const IASFixed& a, const double& b) -{ - return double(a) >= b; -} - -inline int operator <= (const IASFixed& a, const IASFixed& b) -{ - return a.f <= b.f; -} - -//inline int operator <= (short a, const IASFixed& b) -//{ -// return IASFixed(a).f <= b.f; -//} - -//inline int operator <= (const IASFixed& a, short b) -//{ -// return a.f <= IASFixed(b).f; -//} - -inline int operator <= (int a, const IASFixed& b) -{ - return IASFixed(a).f <= b.f; -} - -inline int operator <= (const IASFixed& a, int b) -{ - return a.f <= IASFixed(b).f; -} - -inline int operator <= (const float& a, const IASFixed& b) -{ - return a <= float(b); -} - -inline int operator <= (const IASFixed& a, const float& b) -{ - return float(a) <= b; -} - -inline int operator <= (const double& a, const IASFixed& b) -{ - return a <= double(b); -} - -inline int operator <= (const IASFixed& a, const double& b) -{ - return double(a) <= b; -} - -inline IASFixed operator - (const IASFixed& a) -{ - return -a.f; -} - -inline IASFixed operator + (const IASFixed& a, const IASFixed& b) -{ - return a.f + b.f; -} - -inline IASFixed operator - (const IASFixed& a, const IASFixed& b) -{ - return a.f - b.f; -} - -inline IASFixed operator * (const IASFixed& a, const IASFixed& b) -{ - return IASFixed::FixedMul(a, b); -} - -inline IASFixed operator / (const IASFixed& a, const IASFixed& b) -{ - return IASFixed::FixedDiv(a, b); -} - -inline void IASFixed::operator += (const IASFixed& a) -{ - *this = *this + a; -} - -inline void IASFixed::operator -= (const IASFixed& a) -{ - *this = *this - a; -} - -inline void IASFixed::operator *= (const IASFixed& a) -{ - *this = *this * a; -} - -inline void IASFixed::operator /= (const IASFixed& a) -{ - *this = *this / a; -} - -inline IASFixed operator >> (const IASFixed& a, int amount) -{ - return a.f >> amount; -} - -inline IASFixed operator << (const IASFixed& a, int amount) -{ - return a.f << amount; -} - -inline IASFixed abs(const IASFixed& a) -{ - if (a.f >= 0) - return a.f; - else - return -a.f; -} - -#endif +/***********************************************************************/ +/* */ +/* IASFixed.hpp */ +/* ASFixed object wrapper class */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1996-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/* Started by Dave Lazarony, 03/10/1996 */ +/* */ +/***********************************************************************/ + +#ifndef __IASFixed_hpp__ +#define __IASFixed_hpp__ + +/* + * Includes + */ + +#include "ASTypes.h" + +/* + * Types and Defines + */ + +// Mac headers define GetItem. DRL 7/29/96 +#ifdef GetItem +#undef GetItem +#endif + +#define kASFixedZero ((ASFixed) 0x00000000) +#define kASFixedHalf ((ASFixed) 0x00008000) +#define kASFixedOne ((ASFixed) 0x00010000) +#define kASFixedMin ((ASFixed) 0x80000000) +#define kASFixedMax ((ASFixed) 0x7FFFFFFF) +#define kASFixedUnknown ((ASFixed) 0x80000000) + +typedef long double asdouble_t; + +#define _ShortToASFixed(a) ((ASFixed)(a) << 16) + +/* + * Global Suite Pointer + */ + +class IASFixed; +inline int operator != (const IASFixed& a, const IASFixed& b); +inline int operator > (const IASFixed& a, const IASFixed& b); +inline int operator >= (const IASFixed& a, const IASFixed& b); +inline int operator <= (const IASFixed& a, const IASFixed& b); + +class IASFixed +{ + +public: + IASFixed(); + IASFixed(const ASFixed a); + IASFixed(const short a); +//#ifndef __TREAT_ASINT32_AS_INT__ +// IASFixed(const int a); +//#endif + IASFixed(const float a); + IASFixed(const double a); + + // conversion operators + + operator ASFixed() const; + operator short() const; +/*#ifndef __TREAT_ASINT32_AS_INT__ + operator int() const; +#endif +*/ + operator float() const; + operator double() const; + + // comparison operators + + friend inline int operator == (const IASFixed& a, const IASFixed& b); + //friend inline int operator == (short a, const IASFixed& b); + //friend inline int operator == (const IASFixed& a, short b); + friend inline int operator == (int a, const IASFixed& b); + friend inline int operator == (const IASFixed& a, int b); + friend inline int operator == (const float& a, const IASFixed& b); + friend inline int operator == (const IASFixed& a, const float& b); + friend inline int operator == (const double& a, const IASFixed& b); + friend inline int operator == (const IASFixed& a, const double& b); + + friend inline int operator != (const IASFixed& a, const IASFixed& b); + //friend inline int operator != (short a, const IASFixed& b); + //friend inline int operator != (const IASFixed& a, short b); + friend inline int operator != (int a, const IASFixed& b); + friend inline int operator != (const IASFixed& a, int b); + friend inline int operator != (const float& a, const IASFixed& b); + friend inline int operator != (const IASFixed& a, const float& b); + friend inline int operator != (const double& a, const IASFixed& b); + friend inline int operator != (const IASFixed& a, const double& b); + + friend inline int operator > (const IASFixed& a, const IASFixed& b); + //friend inline int operator > (short a, const IASFixed& b); + //friend inline int operator > (const IASFixed& a, short b); + friend inline int operator > (int a, const IASFixed& b); + friend inline int operator > (const IASFixed& a, int b); + friend inline int operator > (const float& a, const IASFixed& b); + friend inline int operator > (const IASFixed& a, const float& b); + friend inline int operator > (const double& a, const IASFixed& b); + friend inline int operator > (const IASFixed& a, const double& b); + + friend inline int operator < (const IASFixed& a, const IASFixed& b); + //friend inline int operator < (short a, const IASFixed& b); + //friend inline int operator < (const IASFixed& a, short b); + friend inline int operator < (int a, const IASFixed& b); + friend inline int operator < (const IASFixed& a, int b); + friend inline int operator < (const float& a, const IASFixed& b); + friend inline int operator < (const IASFixed& a, const float& b); + friend inline int operator < (const double& a, const IASFixed& b); + friend inline int operator < (const IASFixed& a, const double& b); + + friend inline int operator >= (const IASFixed& a, const IASFixed& b); + //friend inline int operator >= (short a, const IASFixed& b); + //friend inline int operator >= (const IASFixed& a, short b); + friend inline int operator >= (int a, const IASFixed& b); + friend inline int operator >= (const IASFixed& a, int b); + friend inline int operator >= (const float& a, const IASFixed& b); + friend inline int operator >= (const IASFixed& a, const float& b); + friend inline int operator >= (const double& a, const IASFixed& b); + friend inline int operator >= (const IASFixed& a, const double& b); + + friend inline int operator <= (const IASFixed& a, const IASFixed& b); + //friend inline int operator <= (short a, const IASFixed& b); + //friend inline int operator <= (const IASFixed& a, short b); + friend inline int operator <= (int a, const IASFixed& b); + friend inline int operator <= (const IASFixed& a, int b); + friend inline int operator <= (const float& a, const IASFixed& b); + friend inline int operator <= (const IASFixed& a, const float& b); + friend inline int operator <= (const double& a, const IASFixed& b); + friend inline int operator <= (const IASFixed& a, const double& b); + + // unary minus + + friend inline IASFixed operator - (const IASFixed& a); + + // binary arithmetic operators + + friend inline IASFixed operator + (const IASFixed& a, const IASFixed& b); + friend inline IASFixed operator - (const IASFixed& a, const IASFixed& b); + friend inline IASFixed operator * (const IASFixed& a, const IASFixed& b); + friend inline IASFixed operator / (const IASFixed& a, const IASFixed& b); + + // unary arithmetic opererators + + void operator += (const IASFixed& a); + void operator -= (const IASFixed& a); + void operator *= (const IASFixed& a); + void operator /= (const IASFixed& a); + + friend inline IASFixed operator >> (const IASFixed& a, int amount); + friend inline IASFixed operator << (const IASFixed& a, int amount); + + friend inline IASFixed abs(const IASFixed& a); + +protected: + ASFixed f; + + static inline asdouble_t FixToX(ASFixed x); + static inline ASFixed XToFix(asdouble_t x); + static inline ASFixed FixedMul(ASFixed a, ASFixed b); + static inline ASFixed FixedDiv(ASFixed x, ASFixed y); + static inline ASFixed FixedSumChk(ASFixed a, ASFixed b); + +}; + +inline asdouble_t IASFixed::FixToX(ASFixed x) +{ + return ((asdouble_t)x) / 65536.0; +} + +inline ASFixed IASFixed::XToFix(asdouble_t x) +{ + ASFixed fx; + + if (x - 1.0 >= (asdouble_t)0x00007fff) + fx = 0x7fffffff; + else if (x + 1.0 <= -(asdouble_t)0x00008000) + fx = 0x80000000; + else + fx = (ASFixed)(x * (asdouble_t)0x00010000 + (x > 0.0 ? 0.5 : -0.5)); + + return fx; +} + +inline ASFixed IASFixed::FixedMul(ASFixed a, ASFixed b) +{ + asdouble_t da, db; + ASFixed fx; + + da = FixToX(a); + db = FixToX(b); + + fx = XToFix(da * db); + + return fx; +} + +inline ASFixed IASFixed::FixedDiv(ASFixed x, ASFixed y) +{ + if (!y) + { + if (x < 0) + return 0x80000000; + else + return 0x7fffffff; + } + + return XToFix((asdouble_t)x / (asdouble_t)y); +} + +inline ASFixed IASFixed::FixedSumChk(ASFixed a, ASFixed b) +{ + if (a == kASFixedMax || b == kASFixedMax) + return kASFixedMax; + else if (a == kASFixedMin || b == kASFixedMin) + return kASFixedMin; + else + { + ASFixed c; + bool aNeg, bNeg; + + aNeg = a < kASFixedZero; + bNeg = b < kASFixedZero; + c = a + b; + if (aNeg == bNeg && aNeg != (c < kASFixedZero)) + c = aNeg ? kASFixedMin : kASFixedMax; + return c; + } +} + +inline IASFixed::IASFixed() +{ +} + +inline IASFixed::IASFixed(const ASFixed a) +{ + f = a; +} + +inline IASFixed::IASFixed(const short a) +{ + f = ASFixed(a) << 16; +} +//#ifndef __TREAT_ASINT32_AS_INT__ +//inline IASFixed::IASFixed(const int a) +//{ +// f = ASFixed(a) << 16; +//} +//#endif +inline IASFixed::IASFixed(const float a) +{ + f = long(a * 65536.0); +} + +inline IASFixed::IASFixed(const double a) +{ + f = long(a * 65536.0); +} + +inline IASFixed::operator ASFixed() const +{ + return f; +} + +inline IASFixed::operator short() const +{ + return short(f >> 16); +} +#if 0 +#ifndef __TREAT_ASINT32_AS_INT__ +inline IASFixed::operator int() const +{ + return int(f >> 16); +} +#endif +#endif + +inline IASFixed::operator float() const +{ + return float(f / 65536.0); +} + +inline IASFixed::operator double() const +{ + return double(f / 65536.0); +} + +inline int operator == (const IASFixed& a, const IASFixed& b) +{ + return a.f == b.f; +} + +//inline int operator == (short a, const IASFixed& b) +//{ +// return IASFixed(a).f != b.f; +//} + +//inline int operator == (const IASFixed& a, short b) +//{ +// return a.f == IASFixed(b).f; +//} + +inline int operator == (int a, const IASFixed& b) +{ + return IASFixed(a).f == b.f; +} + +inline int operator == (const IASFixed& a, int b) +{ + return a.f == IASFixed(b).f; +} + +inline int operator == (const float& a, const IASFixed& b) +{ + return a == float(b); +} + +inline int operator == (const IASFixed& a, const float& b) +{ + return float(a) == b; +} + +inline int operator == (const double& a, const IASFixed& b) +{ + return a == double(b); +} + +inline int operator == (const IASFixed& a, const double& b) +{ + return double(a) == b; +} + +inline int operator != (const IASFixed& a, const IASFixed& b) +{ + return a.f != b.f; +} + +//inline int operator != (short a, const IASFixed& b) +//{ +// return IASFixed(a).f != b.f; +//} + +//inline int operator != (const IASFixed& a, short b) +//{ +// return a.f != IASFixed(b).f; +//} + +inline int operator != (int a, const IASFixed& b) +{ + return IASFixed(a).f != b.f; +} + +inline int operator != (const IASFixed& a, int b) +{ + return a.f != IASFixed(b).f; +} + +inline int operator != (const float& a, const IASFixed& b) +{ + return a != float(b); +} + +inline int operator != (const IASFixed& a, const float& b) +{ + return float(a) != b; +} + +inline int operator != (const double& a, const IASFixed& b) +{ + return a != double(b); +} + +inline int operator != (const IASFixed& a, const double& b) +{ + return double(a) != b; +} + +inline int operator > (const IASFixed& a, const IASFixed& b) +{ + return a.f > b.f; +} + +//inline int operator > (short a, const IASFixed& b) +//{ +// return IASFixed(a).f > b.f; +//} + +//inline int operator > (const IASFixed& a, short b) +//{ +// return a.f > IASFixed(b).f; +//} + +inline int operator > (int a, const IASFixed& b) +{ + return IASFixed(a).f > b.f; +} + +inline int operator > (const IASFixed& a, int b) +{ + return a.f > IASFixed(b).f; +} + +inline int operator > (const float& a, const IASFixed& b) +{ + return a > float(b); +} + +inline int operator > (const IASFixed& a, const float& b) +{ + return float(a) > b; +} + +inline int operator > (const double& a, const IASFixed& b) +{ + return a > double(b); +} + +inline int operator > (const IASFixed& a, const double& b) +{ + return double(a) > b; +} + +inline int operator < (const IASFixed& a, const IASFixed& b) +{ + return a.f < b.f; +} + +//inline int operator < (short a, const IASFixed& b) +//{ +// return IASFixed(a).f < b.f; +//} + +//inline int operator < (const IASFixed& a, short b) +//{ +// return a.f < IASFixed(b).f; +//} + +inline int operator < (int a, const IASFixed& b) +{ + return IASFixed(a).f < b.f; +} + +inline int operator < (const IASFixed& a, int b) +{ + return a.f < IASFixed(b).f; +} + +inline int operator < (const float& a, const IASFixed& b) +{ + return a < float(b); +} + +inline int operator < (const IASFixed& a, const float& b) +{ + return float(a) < b; +} + +inline int operator < (const double& a, const IASFixed& b) +{ + return a < double(b); +} + +inline int operator < (const IASFixed& a, const double& b) +{ + return double(a) < b; +} + +inline int operator >= (const IASFixed& a, const IASFixed& b) +{ + return a.f >= b.f; +} + +//inline int operator >= (short a, const IASFixed& b) +//{ +// return IASFixed(a).f >= b.f; +//} + +//inline int operator >= (const IASFixed& a, short b) +//{ +// return a.f >= IASFixed(b).f; +//} + +inline int operator >= (int a, const IASFixed& b) +{ + return IASFixed(a).f >= b.f; +} + +inline int operator >= (const IASFixed& a, int b) +{ + return a.f >= IASFixed(b).f; +} + +inline int operator >= (const float& a, const IASFixed& b) +{ + return a >= float(b); +} + +inline int operator >= (const IASFixed& a, const float& b) +{ + return float(a) >= b; +} + +inline int operator >= (const double& a, const IASFixed& b) +{ + return a >= double(b); +} + +inline int operator >= (const IASFixed& a, const double& b) +{ + return double(a) >= b; +} + +inline int operator <= (const IASFixed& a, const IASFixed& b) +{ + return a.f <= b.f; +} + +//inline int operator <= (short a, const IASFixed& b) +//{ +// return IASFixed(a).f <= b.f; +//} + +//inline int operator <= (const IASFixed& a, short b) +//{ +// return a.f <= IASFixed(b).f; +//} + +inline int operator <= (int a, const IASFixed& b) +{ + return IASFixed(a).f <= b.f; +} + +inline int operator <= (const IASFixed& a, int b) +{ + return a.f <= IASFixed(b).f; +} + +inline int operator <= (const float& a, const IASFixed& b) +{ + return a <= float(b); +} + +inline int operator <= (const IASFixed& a, const float& b) +{ + return float(a) <= b; +} + +inline int operator <= (const double& a, const IASFixed& b) +{ + return a <= double(b); +} + +inline int operator <= (const IASFixed& a, const double& b) +{ + return double(a) <= b; +} + +inline IASFixed operator - (const IASFixed& a) +{ + return -a.f; +} + +inline IASFixed operator + (const IASFixed& a, const IASFixed& b) +{ + return a.f + b.f; +} + +inline IASFixed operator - (const IASFixed& a, const IASFixed& b) +{ + return a.f - b.f; +} + +inline IASFixed operator * (const IASFixed& a, const IASFixed& b) +{ + return IASFixed::FixedMul(a, b); +} + +inline IASFixed operator / (const IASFixed& a, const IASFixed& b) +{ + return IASFixed::FixedDiv(a, b); +} + +inline void IASFixed::operator += (const IASFixed& a) +{ + *this = *this + a; +} + +inline void IASFixed::operator -= (const IASFixed& a) +{ + *this = *this - a; +} + +inline void IASFixed::operator *= (const IASFixed& a) +{ + *this = *this * a; +} + +inline void IASFixed::operator /= (const IASFixed& a) +{ + *this = *this / a; +} + +inline IASFixed operator >> (const IASFixed& a, int amount) +{ + return a.f >> amount; +} + +inline IASFixed operator << (const IASFixed& a, int amount) +{ + return a.f << amount; +} + +inline IASFixed abs(const IASFixed& a) +{ + if (a.f >= 0) + return a.f; + else + return -a.f; +} + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASRealPoint.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASRealPoint.hpp index 7fb79a2..f19f29d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASRealPoint.hpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASRealPoint.hpp @@ -1,185 +1,185 @@ -#ifndef __IASPoint_hpp__ -#define __IASPoint_hpp__ - -/* - * Name: IASRealPoint.hpp - * $Revision: $ - * Author: David Holloway - * Date: - * Purpose: IASRealPoint Wrapper Class. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/* - * Includes - */ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -/* - * Wrapper Class - */ - -struct IASRealPoint : public AIRealPoint -{ -public: - IASRealPoint(); - IASRealPoint(const AIRealPoint &p); - IASRealPoint(int h, int v); - IASRealPoint(float h, float v); - IASRealPoint(AIReal h, AIReal v); - friend inline ASBoolean operator == (const AIRealPoint &a, const AIRealPoint &b); - friend inline ASBoolean operator != (const AIRealPoint &a, const AIRealPoint &b); - - friend inline AIRealPoint operator + (const AIRealPoint &a, const AIRealPoint& b); - friend inline AIRealPoint operator - (const AIRealPoint &a, const AIRealPoint& b); - - friend inline AIRealPoint operator * (const AIRealPoint &p, int s); - friend inline AIRealPoint operator * (int s, const AIRealPoint& p); - - friend inline AIRealPoint operator / (const AIRealPoint &p, int s); - - friend inline AIRealPoint operator - (const AIRealPoint &p); - - void operator = (const AIRealPoint &p); - void operator += (const AIRealPoint &p); - void operator -= (const AIRealPoint &p); - - void operator *= (int s); - void operator /= (int s); -}; - - -inline IASRealPoint::IASRealPoint() -{ -} - - -inline IASRealPoint::IASRealPoint(const AIRealPoint &p) -{ - h = p.h; - v = p.v; -} - - -inline IASRealPoint::IASRealPoint(int h, int v) -{ - this->h = static_cast(h); - this->v = static_cast(v); -} - -inline IASRealPoint::IASRealPoint(float h, float v) -{ - this->h = h; this->v = v; -} - -inline IASRealPoint::IASRealPoint(AIReal h, AIReal v) -{ - this->h = h; this->v = v; -} - -inline ASBoolean operator == (const AIRealPoint &a, const AIRealPoint &b) -{ - return a.h == b.h && a.v == b.v; -} - - -inline ASBoolean operator != (const AIRealPoint &a, const AIRealPoint &b) -{ - return a.h != b.h || a.v != b.v; -} - - -inline AIRealPoint operator + (const AIRealPoint &a, const AIRealPoint &b) -{ - return IASRealPoint(a.h + b.h, a.v + b.v); -} - - -inline AIRealPoint operator - (const AIRealPoint &a, const AIRealPoint &b) -{ - return IASRealPoint(a.h - b.h, a.v - b.v); -} - - -inline AIRealPoint operator * (const AIRealPoint &p, int s) -{ - return IASRealPoint(p.h * s, p.v * s); -} - - -inline AIRealPoint operator * (int s, const AIRealPoint &p) -{ - return IASRealPoint(p.h * s, p.v * s); -} - - -inline AIRealPoint operator / (const AIRealPoint &p, int s) -{ - return IASRealPoint(p.h / s, p.v / s); -} - - -inline AIRealPoint operator - (const AIRealPoint &p) -{ - return IASRealPoint(-p.h, -p.v); -} - - -inline void IASRealPoint::operator = (const AIRealPoint& p) -{ - h = p.h; - v = p.v; -} - - -inline void IASRealPoint::operator += (const AIRealPoint& p) -{ - h += p.h; - v += p.v; -} - - -inline void IASRealPoint::operator -= (const AIRealPoint& p) -{ - h -= p.h; - v -= p.v; -} - - -inline void IASRealPoint::operator *= (int s) -{ - h *= s; - v *= s; -} - - -inline void IASRealPoint::operator /= (int s) -{ - h /= s; - v /= s; -} - - -#endif - - - - - - - - +#ifndef __IASPoint_hpp__ +#define __IASPoint_hpp__ + +/* + * Name: IASRealPoint.hpp + * $Revision: $ + * Author: David Holloway + * Date: + * Purpose: IASRealPoint Wrapper Class. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/* + * Includes + */ + +#ifndef __ASTypes__ +#include "ASTypes.h" +#endif + +/* + * Wrapper Class + */ + +struct IASRealPoint : public AIRealPoint +{ +public: + IASRealPoint(); + IASRealPoint(const AIRealPoint &p); + IASRealPoint(int h, int v); + IASRealPoint(float h, float v); + IASRealPoint(AIReal h, AIReal v); + friend inline ASBoolean operator == (const AIRealPoint &a, const AIRealPoint &b); + friend inline ASBoolean operator != (const AIRealPoint &a, const AIRealPoint &b); + + friend inline AIRealPoint operator + (const AIRealPoint &a, const AIRealPoint& b); + friend inline AIRealPoint operator - (const AIRealPoint &a, const AIRealPoint& b); + + friend inline AIRealPoint operator * (const AIRealPoint &p, int s); + friend inline AIRealPoint operator * (int s, const AIRealPoint& p); + + friend inline AIRealPoint operator / (const AIRealPoint &p, int s); + + friend inline AIRealPoint operator - (const AIRealPoint &p); + + void operator = (const AIRealPoint &p); + void operator += (const AIRealPoint &p); + void operator -= (const AIRealPoint &p); + + void operator *= (int s); + void operator /= (int s); +}; + + +inline IASRealPoint::IASRealPoint() +{ +} + + +inline IASRealPoint::IASRealPoint(const AIRealPoint &p) +{ + h = p.h; + v = p.v; +} + + +inline IASRealPoint::IASRealPoint(int h, int v) +{ + this->h = static_cast(h); + this->v = static_cast(v); +} + +inline IASRealPoint::IASRealPoint(float h, float v) +{ + this->h = h; this->v = v; +} + +inline IASRealPoint::IASRealPoint(AIReal h, AIReal v) +{ + this->h = h; this->v = v; +} + +inline ASBoolean operator == (const AIRealPoint &a, const AIRealPoint &b) +{ + return a.h == b.h && a.v == b.v; +} + + +inline ASBoolean operator != (const AIRealPoint &a, const AIRealPoint &b) +{ + return a.h != b.h || a.v != b.v; +} + + +inline AIRealPoint operator + (const AIRealPoint &a, const AIRealPoint &b) +{ + return IASRealPoint(a.h + b.h, a.v + b.v); +} + + +inline AIRealPoint operator - (const AIRealPoint &a, const AIRealPoint &b) +{ + return IASRealPoint(a.h - b.h, a.v - b.v); +} + + +inline AIRealPoint operator * (const AIRealPoint &p, int s) +{ + return IASRealPoint(p.h * s, p.v * s); +} + + +inline AIRealPoint operator * (int s, const AIRealPoint &p) +{ + return IASRealPoint(p.h * s, p.v * s); +} + + +inline AIRealPoint operator / (const AIRealPoint &p, int s) +{ + return IASRealPoint(p.h / s, p.v / s); +} + + +inline AIRealPoint operator - (const AIRealPoint &p) +{ + return IASRealPoint(-p.h, -p.v); +} + + +inline void IASRealPoint::operator = (const AIRealPoint& p) +{ + h = p.h; + v = p.v; +} + + +inline void IASRealPoint::operator += (const AIRealPoint& p) +{ + h += p.h; + v += p.v; +} + + +inline void IASRealPoint::operator -= (const AIRealPoint& p) +{ + h -= p.h; + v -= p.v; +} + + +inline void IASRealPoint::operator *= (int s) +{ + h *= s; + v *= s; +} + + +inline void IASRealPoint::operator /= (int s) +{ + h /= s; + v /= s; +} + + +#endif + + + + + + + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASRealRect.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASRealRect.hpp index 3ac3a84..574a06b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASRealRect.hpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASRealRect.hpp @@ -1,1012 +1,1012 @@ -#ifndef __IASRealRect_hpp__ -#define __IASRealRect_hpp__ - -/* - * Name: IASRealRect.hpp - * $Revision: $ - * Author: Darin Tomack - * Date: 2/2/2001 - * Purpose: IASRealRect Wrapper Class. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/* - * Includes - */ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#ifndef __AITypes__ -#include "AITypes.h" -#endif -/* - * Wrapper Class - */ - -/* - This file contains 2 wrapper classes for the C struct AIRealRect: - - IASRealRect and IASRealRectCartesian - - The 2 wrappers are nearly identical in terms of their interface and - functionality, EXCEPT they assume different coordinate systems: - - - IASRealRect IASRealRectCartesian - - 0---------- +x +y - | | - | | - | | - | | - +y 0---------- +x - -*/ - -struct IASRealRect : public AIRealRect -{ -public: - IASRealRect(); - IASRealRect(const AIRealRect &rect); - IASRealRect(const AIRect &rect); - IASRealRect(const AIRealPoint &a); - IASRealRect(const AIRealPoint &a, const AIRealPoint &b); - IASRealRect(ai::int32 left, ai::int32 top, ai::int32 right, ai::int32 bottom); - IASRealRect(AIReal left, AIReal top, AIReal right, AIReal bottom); - - AIReal Width() const; - AIReal Height() const; - - ASBoolean IsEmpty() const; - void SetEmpty(); - - ASBoolean IsNormalized() const; - void Normalize(); - - AIReal Area() const; - - AIRealPoint Center() const; - - ASBoolean Contains(const AIRealPoint &p) const; - ASBoolean Contains(const AIRealRect &r) const; - - ASBoolean Overlaps(const AIRealRect &r) const; - - IASRealRect &operator ++ (); - IASRealRect &operator -- (); - IASRealRect operator ++ (int); - IASRealRect operator -- (int); - IASRealRect &operator += (AIReal n); - IASRealRect &operator -= (AIReal n); - - IASRealRect &operator += (AIRealPoint &p); - IASRealRect &operator -= (AIRealPoint &p); - - IASRealRect &operator = (AIRealPoint &p); - - void Inset(AIReal h, AIReal v); - void Inflate(AIReal h, AIReal v); - void Offset(AIReal h, AIReal v); - - void Union(const AIRealPoint &a); - void Union(const AIRealRect &a); - void Union(const AIRealRect &a, const AIRealRect &b); - - void Intersect(const AIRealRect &a); - void Intersect(const AIRealRect &a, const AIRealRect &b); - - void Center(const AIRealRect ¢erRect); - - friend inline ASBoolean operator == (const AIRealRect &a, const AIRealRect &b); - friend inline ASBoolean operator != (const AIRealRect &a, const AIRealRect &b); - -// Doesn't work in CodeWarrior 1.4. Anyone know why? DRL 4/22/96 -// friend inline AIRealRect operator + (const IASRealRect &a, const IASRealPoint &b); -// friend inline AIRealRect operator + (const IASRealPoint &a, const IASRealRect &b); -// friend inline AIRealRect operator - (const IASRealRect &a, const IASRealPoint &b); -// friend inline AIRealRect operator - (const IASRealPoint &a, const IASRealRect &b); -}; - - -inline IASRealRect::IASRealRect() -{ -} - - -inline IASRealRect::IASRealRect(const AIRealRect &rect) -{ - left = rect.left; - top = rect.top; - right = rect.right; - bottom = rect.bottom; -} - - -inline IASRealRect::IASRealRect(const AIRect &rect) -{ - left = static_cast(rect.left); - top = static_cast(rect.top); - right = static_cast(rect.right); - bottom = static_cast(rect.bottom); -} - - -inline IASRealRect::IASRealRect(const AIRealPoint &a) -{ - left = right = a.h; - top = bottom = a.v; -} - - -inline IASRealRect::IASRealRect(const AIRealPoint &a, const AIRealPoint &b) -{ - if (a.h < b.h) - { - left = a.h; - right = b.h; - } - else - { - left = b.h; - right = a.h; - } - - if (a.v < b.v) - { - top = a.v; - bottom = b.v; - } - else - { - top = b.v; - bottom = a.v; - } -} - - -inline IASRealRect::IASRealRect(ai::int32 left, ai::int32 top, ai::int32 right, ai::int32 bottom) -{ - this->left = static_cast(left); - this->top = static_cast(top); - this->right = static_cast(right); - this->bottom = static_cast(bottom); -} - -inline IASRealRect::IASRealRect(AIReal left, AIReal top, AIReal right, AIReal bottom) -{ - this->left = left; - this->top = top; - this->right = right; - this->bottom = bottom; -} - - -inline AIReal IASRealRect::Width() const -{ - return right - left; -} - - -inline AIReal IASRealRect::Height() const -{ - return bottom - top; -} - - -inline ASBoolean IASRealRect::IsEmpty() const -{ - return top == bottom && right == left; -} - - -inline void IASRealRect::SetEmpty() -{ - left = top = right = bottom = 0; -} - - -inline ASBoolean IASRealRect::IsNormalized() const -{ - return left <= right && top <= bottom; -} - - -inline void IASRealRect::Normalize() -{ - if (left > right) - { - AIReal saveLeft = left; left = right; right = saveLeft; - } - if (top > bottom) - { - AIReal saveTop = top; top = bottom; bottom = saveTop; - } -} - - -inline AIReal IASRealRect::Area() const -{ - return Width() * Height(); -} - -inline AIRealPoint IASRealRect::Center() const -{ - AIRealPoint center; - - center.h = left + Width() / 2; - center.v = top + Height() / 2; - - return center; -} - -inline ASBoolean IASRealRect::Contains(const AIRealPoint &p) const -{ - return left <= p.h && right >= p.h && top <= p.v && bottom >= p.v; -} - - -inline ASBoolean IASRealRect::Contains(const AIRealRect &r) const -{ - return left <= r.left && right >= r.left && top <= r.top && bottom >= r.top && - left <= r.right && right >= r.right && top <= r.bottom && bottom >= r.bottom; -} - - -inline ASBoolean IASRealRect::Overlaps(const AIRealRect &r) const -{ - return right >= r.left && left <= r.right && - bottom >= r.top && top <= r.bottom; -} - - -inline IASRealRect &IASRealRect::operator ++ () -{ - left--; - top--; - right++; - bottom++; - - return *this; -} - -inline IASRealRect &IASRealRect::operator -- () -{ - left++; - top++; - right--; - bottom--; - - return *this; -} - - -inline IASRealRect IASRealRect::operator ++ (int) -{ - left--; - top--; - right++; - bottom++; - - return *this; -} - -inline IASRealRect IASRealRect::operator -- (int) -{ - left++; - top++; - right--; - bottom--; - - return *this; -} - - -inline IASRealRect &IASRealRect::operator += (AIReal n) -{ - left -= n; - top -= n; - right += n; - bottom += n; - - return *this; -} - - -inline IASRealRect &IASRealRect::operator -= (AIReal n) -{ - left += n; - top += n; - right -= n; - bottom -= n; - - return *this; -} - -inline IASRealRect &IASRealRect::operator += (AIRealPoint &p) -{ - left += p.h; - top += p.v; - right += p.h; - bottom += p.v; - - return *this; -} - - -inline IASRealRect &IASRealRect::operator -= (AIRealPoint &p) -{ - left -= p.h; - top -= p.v; - right -= p.h; - bottom -= p.v; - - return *this; -} - - -inline IASRealRect &IASRealRect::operator = (AIRealPoint &p) -{ - left = right = p.h; - top = bottom = p.v; - - return *this; -} - - -inline ASBoolean operator == (const AIRealRect &a, const AIRealRect &b) -{ - return a.left == b.left && - a.top == b.top && - a.right == b.right && - a.bottom == b.bottom; -} - - -inline ASBoolean operator != (const AIRealRect &a, const AIRealRect &b) -{ - return a.left != b.left || - a.top != b.top || - a.right != b.right || - a.bottom != b.bottom; -} - - -inline void IASRealRect::Inset(AIReal h, AIReal v) -{ - left += h; - top += v; - right -= h; - bottom -= v; -} - - -inline void IASRealRect::Inflate(AIReal h, AIReal v) -{ - left -= h; - top -= v; - right += h; - bottom += v; -} - - -inline void IASRealRect::Offset(AIReal h, AIReal v) -{ - left += h; - top += v; - right += h; - bottom += v; -} - - -inline void IASRealRect::Union(const AIRealPoint &a) -{ - if (left > a.h) - left = a.h; - if (top > a.v) - top = a.v; - if (right < a.h) - right = a.h; - if (bottom < a.v) - bottom = a.v; -} - - -inline void IASRealRect::Union(const AIRealRect &a) -{ - if (left > a.left) - left = a.left; - if (top > a.top) - top = a.top; - if (right < a.right) - right = a.right; - if (bottom < a.bottom) - bottom = a.bottom; -} - - -inline void IASRealRect::Union(const AIRealRect &a, const AIRealRect &b) -{ - if (b.left > a.left) - left = a.left; - else - left = b.left; - if (b.top > a.top) - top = a.top; - else - top = b.top; - if (b.right < a.right) - right = a.right; - else - right = b.right; - if (b.bottom < a.bottom) - bottom = a.bottom; - else - bottom = b.bottom; -} - - -inline void IASRealRect::Intersect(const AIRealRect &a) -{ - if (left < a.left) - left = a.left; - if (top < a.top) - top = a.top; - if (right > a.right) - right = a.right; - if (bottom > a.bottom) - bottom = a.bottom; - - if (!Overlaps(a)) - SetEmpty(); -} - - -inline void IASRealRect::Intersect(const AIRealRect &a, const AIRealRect &b) -{ - if (b.left < a.left) - left = a.left; - else - left = b.left; - if (b.top < a.top) - top = a.top; - else - top = b.top; - if (b.right > a.right) - top = a.right; - else - top = b.right; - if (b.bottom > a.bottom) - bottom = a.bottom; - else - bottom = b.bottom; - if (!Overlaps(a)) - SetEmpty(); -} - - -inline void IASRealRect::Center(const AIRealRect ¢erRect) -{ - Offset(centerRect.left + ((centerRect.right - centerRect.left) - Width()) / 2, - centerRect.top + ((centerRect.bottom - centerRect.top) - Height()) / 2); -} - - -/* - * Doesn't work in CodeWarrior 1.4. Anyone know why? DRL 4/22/96. -inline AIRealRect operator + (const IASRealRect &a, const IASRealPoint &b) -{ - return IASRealRect(a.left + b.h, a.top + b.v, a.right + b.h, a.bottom + b.v); -} - -inline AIRealRect operator + (const IASRealPoint &a, const IASRealRect &b) -{ - IASRealRect r; - - r.left = b.left + a.h; - r.top = b.top + a.v; - r.right = b.right + a.h; - r.bottom = b.bottom + a.v; - - return r; -} - -inline AIRealRect operator - (const IASRealRect &a, const IASRealPoint &b) -{ - IASRealRect r; - - r.left = a.left - b.h; - r.top = a.top - b.v; - r.right = a.right - b.h; - r.bottom = a.bottom - b.v; - - return r; -} - -inline AIRealRect operator - (const IASRealPoint &a, const IASRealRect &b) -{ - IASRealRect r; - - r.left = b.left - a.h; - r.top = b.top - a.v; - r.right = b.right - a.h; - r.bottom = b.bottom - a.v; - - return r; -} -*/ - - -struct IASRealRectCartesian : public AIRealRect -{ -public: - IASRealRectCartesian(); - IASRealRectCartesian(const AIRealRect &rect); - IASRealRectCartesian(const AIRect &rect); - IASRealRectCartesian(const AIRealPoint &a); - IASRealRectCartesian(const AIRealPoint &a, const AIRealPoint &b); - IASRealRectCartesian(ai::int32 left, ai::int32 top, ai::int32 right, ai::int32 bottom); - IASRealRectCartesian(AIReal left, AIReal top, AIReal right, AIReal bottom); - - AIReal Width() const; - AIReal Height() const; - - ASBoolean IsEmpty() const; - void SetEmpty(); - - ASBoolean IsNormalized() const; - void Normalize(); - - AIReal Area() const; - - AIRealPoint Center() const; - - ASBoolean Contains(const AIRealPoint &p) const; - ASBoolean Contains(const AIRealRect &r) const; - - ASBoolean Overlaps(const AIRealRect &r) const; - - IASRealRectCartesian &operator ++ (); - IASRealRectCartesian &operator -- (); - IASRealRectCartesian operator ++ (int); - IASRealRectCartesian operator -- (int); - IASRealRectCartesian &operator += (AIReal n); - IASRealRectCartesian &operator -= (AIReal n); - - IASRealRectCartesian &operator += (AIRealPoint &p); - IASRealRectCartesian &operator -= (AIRealPoint &p); - - IASRealRectCartesian &operator = (AIRealPoint &p); - - void Inset(AIReal h, AIReal v); - void Inflate(AIReal h, AIReal v); - void Offset(AIReal h, AIReal v); - - void Union(const AIRealPoint &a); - void Union(const AIRealRect &a); - void Union(const AIRealRect &a, const AIRealRect &b); - - void Intersect(const AIRealRect &a); - void Intersect(const AIRealRect &a, const AIRealRect &b); - - void Center(const AIRealRect ¢erRect); - - AIRealPoint LeftBottom() const; - AIRealPoint LeftTop() const; - AIRealPoint RightTop() const; - AIRealPoint RightBottom() const; -}; - - -inline IASRealRectCartesian::IASRealRectCartesian() -{ -} - - -inline IASRealRectCartesian::IASRealRectCartesian(const AIRealRect &rect) -{ - left = rect.left; - top = rect.top; - right = rect.right; - bottom = rect.bottom; -} - - -inline IASRealRectCartesian::IASRealRectCartesian(const AIRect &rect) -{ - left = static_cast(rect.left); - top = static_cast(rect.top); - right = static_cast(rect.right); - bottom = static_cast(rect.bottom); -} - - -inline IASRealRectCartesian::IASRealRectCartesian(const AIRealPoint &a) -{ - left = right = a.h; - top = bottom = a.v; -} - - -inline IASRealRectCartesian::IASRealRectCartesian(const AIRealPoint &a, const AIRealPoint &b) -{ - if (a.h < b.h) - { - left = a.h; - right = b.h; - } - else - { - left = b.h; - right = a.h; - } - - if (a.v < b.v) - { - top = b.v; - bottom = a.v; - } - else - { - top = a.v; - bottom = b.v; - } -} - - -inline IASRealRectCartesian::IASRealRectCartesian(ai::int32 left, ai::int32 top, ai::int32 right, ai::int32 bottom) -{ - this->left = static_cast(left); - this->top = static_cast(top); - this->right = static_cast(right); - this->bottom = static_cast(bottom); -} - -inline IASRealRectCartesian::IASRealRectCartesian(AIReal left, AIReal top, AIReal right, AIReal bottom) -{ - this->left = left; - this->top = top; - this->right = right; - this->bottom = bottom; -} - - -inline AIReal IASRealRectCartesian::Width() const -{ - return right - left; -} - - -inline AIReal IASRealRectCartesian::Height() const -{ - return top - bottom; -} - - -inline ASBoolean IASRealRectCartesian::IsEmpty() const -{ - return top == bottom && right == left; -} - - -inline void IASRealRectCartesian::SetEmpty() -{ - left = top = right = bottom = 0; -} - - -inline ASBoolean IASRealRectCartesian::IsNormalized() const -{ - return left <= right && top >= bottom; -} - - -inline void IASRealRectCartesian::Normalize() -{ - if (left > right) - { - AIReal saveLeft = left; left = right; right = saveLeft; - } - if (top < bottom) - { - AIReal saveTop = top; top = bottom; bottom = saveTop; - } -} - - -inline AIReal IASRealRectCartesian::Area() const -{ - return Width() * Height(); -} - -inline AIRealPoint IASRealRectCartesian::Center() const -{ - AIRealPoint center; - - center.h = left + Width() / 2.0f; - center.v = bottom + Height() / 2.0f; - - return center; -} - -inline ASBoolean IASRealRectCartesian::Contains(const AIRealPoint &p) const -{ - return left <= p.h && right >= p.h && top >= p.v && bottom <= p.v; -} - - -inline ASBoolean IASRealRectCartesian::Contains(const AIRealRect &r) const -{ - return left <= r.left && right >= r.left && top >= r.top && bottom <= r.top && - left <= r.right && right >= r.right && top >= r.bottom && bottom <= r.bottom; -} - - -inline ASBoolean IASRealRectCartesian::Overlaps(const AIRealRect &r) const -{ - return right >= r.left && left <= r.right && - bottom <= r.top && top >= r.bottom; -} - - -inline IASRealRectCartesian &IASRealRectCartesian::operator ++ () -{ - left--; - top++; - right++; - bottom--; - - return *this; -} - -inline IASRealRectCartesian &IASRealRectCartesian::operator -- () -{ - left++; - top--; - right--; - bottom++; - - return *this; -} - - -inline IASRealRectCartesian IASRealRectCartesian::operator ++ (int) -{ - left--; - top++; - right++; - bottom--; - - return *this; -} - -inline IASRealRectCartesian IASRealRectCartesian::operator -- (int) -{ - left++; - top--; - right--; - bottom++; - - return *this; -} - - -inline IASRealRectCartesian &IASRealRectCartesian::operator += (AIReal n) -{ - left -= n; - top += n; - right += n; - bottom -= n; - - return *this; -} - - -inline IASRealRectCartesian &IASRealRectCartesian::operator -= (AIReal n) -{ - left += n; - top -= n; - right -= n; - bottom += n; - - return *this; -} - -inline IASRealRectCartesian &IASRealRectCartesian::operator += (AIRealPoint &p) -{ - left += p.h; - top += p.v; - right += p.h; - bottom += p.v; - - return *this; -} - - -inline IASRealRectCartesian &IASRealRectCartesian::operator -= (AIRealPoint &p) -{ - left -= p.h; - top -= p.v; - right -= p.h; - bottom -= p.v; - - return *this; -} - - -inline IASRealRectCartesian &IASRealRectCartesian::operator = (AIRealPoint &p) -{ - left = right = p.h; - top = bottom = p.v; - - return *this; -} - -inline void IASRealRectCartesian::Inset(AIReal h, AIReal v) -{ - left += h; - top -= v; - right -= h; - bottom += v; -} - - -inline void IASRealRectCartesian::Inflate(AIReal h, AIReal v) -{ - left -= h; - top += v; - right += h; - bottom -= v; -} - - -inline void IASRealRectCartesian::Offset(AIReal h, AIReal v) -{ - left += h; - top += v; - right += h; - bottom += v; -} - - -inline void IASRealRectCartesian::Union(const AIRealPoint &a) -{ - if (left > a.h) - left = a.h; - if (top < a.v) - top = a.v; - if (right < a.h) - right = a.h; - if (bottom > a.v) - bottom = a.v; -} - - -inline void IASRealRectCartesian::Union(const AIRealRect &a) -{ - if (left > a.left) - left = a.left; - if (top < a.top) - top = a.top; - if (right < a.right) - right = a.right; - if (bottom > a.bottom) - bottom = a.bottom; -} - - -inline void IASRealRectCartesian::Union(const AIRealRect &a, const AIRealRect &b) -{ - if (b.left > a.left) - left = a.left; - else - left = b.left; - if (b.top < a.top) - top = a.top; - else - top = b.top; - if (b.right < a.right) - right = a.right; - else - right = b.right; - if (b.bottom > a.bottom) - bottom = a.bottom; - else - bottom = b.bottom; -} - - -inline void IASRealRectCartesian::Intersect(const AIRealRect &a) -{ - if (left < a.left) - left = a.left; - if (top > a.top) - top = a.top; - if (right > a.right) - right = a.right; - if (bottom < a.bottom) - bottom = a.bottom; - - if (!Overlaps(a)) - SetEmpty(); -} - - -inline void IASRealRectCartesian::Intersect(const AIRealRect &a, const AIRealRect &b) -{ - if (b.left < a.left) - left = a.left; - else - left = b.left; - if (b.top > a.top) - top = a.top; - else - top = b.top; - if (b.right > a.right) - top = a.right; - else - top = b.right; - if (b.bottom < a.bottom) - bottom = a.bottom; - else - bottom = b.bottom; - if (!Overlaps(a)) - SetEmpty(); -} - - -inline void IASRealRectCartesian::Center(const AIRealRect ¢erRect) -{ - Offset(centerRect.left + ((centerRect.right - centerRect.left) - Width()) / 2.0f, - centerRect.bottom + ((centerRect.top - centerRect.bottom) - Height()) / 2.0f); -} - - -inline AIRealPoint IASRealRectCartesian::LeftBottom() const -{ - AIRealPoint returnPt = {left, bottom}; - return returnPt; -} - -inline AIRealPoint IASRealRectCartesian::LeftTop() const -{ - AIRealPoint returnPt = {left, top}; - return returnPt; -} - -inline AIRealPoint IASRealRectCartesian::RightTop() const -{ - AIRealPoint returnPt = {right, top}; - return returnPt; -} - -inline AIRealPoint IASRealRectCartesian::RightBottom() const -{ - AIRealPoint returnPt = {right, bottom}; - return returnPt; -} - - - - -#endif - - - - - - - - +#ifndef __IASRealRect_hpp__ +#define __IASRealRect_hpp__ + +/* + * Name: IASRealRect.hpp + * $Revision: $ + * Author: Darin Tomack + * Date: 2/2/2001 + * Purpose: IASRealRect Wrapper Class. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + + +/* + * Includes + */ + +#ifndef __ASTypes__ +#include "ASTypes.h" +#endif + +#ifndef __AITypes__ +#include "AITypes.h" +#endif +/* + * Wrapper Class + */ + +/* + This file contains 2 wrapper classes for the C struct AIRealRect: + + IASRealRect and IASRealRectCartesian + + The 2 wrappers are nearly identical in terms of their interface and + functionality, EXCEPT they assume different coordinate systems: + + + IASRealRect IASRealRectCartesian + + 0---------- +x +y + | | + | | + | | + | | + +y 0---------- +x + +*/ + +struct IASRealRect : public AIRealRect +{ +public: + IASRealRect(); + IASRealRect(const AIRealRect &rect); + IASRealRect(const AIRect &rect); + IASRealRect(const AIRealPoint &a); + IASRealRect(const AIRealPoint &a, const AIRealPoint &b); + IASRealRect(ai::int32 left, ai::int32 top, ai::int32 right, ai::int32 bottom); + IASRealRect(AIReal left, AIReal top, AIReal right, AIReal bottom); + + AIReal Width() const; + AIReal Height() const; + + ASBoolean IsEmpty() const; + void SetEmpty(); + + ASBoolean IsNormalized() const; + void Normalize(); + + AIReal Area() const; + + AIRealPoint Center() const; + + ASBoolean Contains(const AIRealPoint &p) const; + ASBoolean Contains(const AIRealRect &r) const; + + ASBoolean Overlaps(const AIRealRect &r) const; + + IASRealRect &operator ++ (); + IASRealRect &operator -- (); + IASRealRect operator ++ (int); + IASRealRect operator -- (int); + IASRealRect &operator += (AIReal n); + IASRealRect &operator -= (AIReal n); + + IASRealRect &operator += (AIRealPoint &p); + IASRealRect &operator -= (AIRealPoint &p); + + IASRealRect &operator = (AIRealPoint &p); + + void Inset(AIReal h, AIReal v); + void Inflate(AIReal h, AIReal v); + void Offset(AIReal h, AIReal v); + + void Union(const AIRealPoint &a); + void Union(const AIRealRect &a); + void Union(const AIRealRect &a, const AIRealRect &b); + + void Intersect(const AIRealRect &a); + void Intersect(const AIRealRect &a, const AIRealRect &b); + + void Center(const AIRealRect ¢erRect); + + friend inline ASBoolean operator == (const AIRealRect &a, const AIRealRect &b); + friend inline ASBoolean operator != (const AIRealRect &a, const AIRealRect &b); + +// Doesn't work in CodeWarrior 1.4. Anyone know why? DRL 4/22/96 +// friend inline AIRealRect operator + (const IASRealRect &a, const IASRealPoint &b); +// friend inline AIRealRect operator + (const IASRealPoint &a, const IASRealRect &b); +// friend inline AIRealRect operator - (const IASRealRect &a, const IASRealPoint &b); +// friend inline AIRealRect operator - (const IASRealPoint &a, const IASRealRect &b); +}; + + +inline IASRealRect::IASRealRect() +{ +} + + +inline IASRealRect::IASRealRect(const AIRealRect &rect) +{ + left = rect.left; + top = rect.top; + right = rect.right; + bottom = rect.bottom; +} + + +inline IASRealRect::IASRealRect(const AIRect &rect) +{ + left = static_cast(rect.left); + top = static_cast(rect.top); + right = static_cast(rect.right); + bottom = static_cast(rect.bottom); +} + + +inline IASRealRect::IASRealRect(const AIRealPoint &a) +{ + left = right = a.h; + top = bottom = a.v; +} + + +inline IASRealRect::IASRealRect(const AIRealPoint &a, const AIRealPoint &b) +{ + if (a.h < b.h) + { + left = a.h; + right = b.h; + } + else + { + left = b.h; + right = a.h; + } + + if (a.v < b.v) + { + top = a.v; + bottom = b.v; + } + else + { + top = b.v; + bottom = a.v; + } +} + + +inline IASRealRect::IASRealRect(ai::int32 left, ai::int32 top, ai::int32 right, ai::int32 bottom) +{ + this->left = static_cast(left); + this->top = static_cast(top); + this->right = static_cast(right); + this->bottom = static_cast(bottom); +} + +inline IASRealRect::IASRealRect(AIReal left, AIReal top, AIReal right, AIReal bottom) +{ + this->left = left; + this->top = top; + this->right = right; + this->bottom = bottom; +} + + +inline AIReal IASRealRect::Width() const +{ + return right - left; +} + + +inline AIReal IASRealRect::Height() const +{ + return bottom - top; +} + + +inline ASBoolean IASRealRect::IsEmpty() const +{ + return top == bottom && right == left; +} + + +inline void IASRealRect::SetEmpty() +{ + left = top = right = bottom = 0; +} + + +inline ASBoolean IASRealRect::IsNormalized() const +{ + return left <= right && top <= bottom; +} + + +inline void IASRealRect::Normalize() +{ + if (left > right) + { + AIReal saveLeft = left; left = right; right = saveLeft; + } + if (top > bottom) + { + AIReal saveTop = top; top = bottom; bottom = saveTop; + } +} + + +inline AIReal IASRealRect::Area() const +{ + return Width() * Height(); +} + +inline AIRealPoint IASRealRect::Center() const +{ + AIRealPoint center; + + center.h = left + Width() / 2; + center.v = top + Height() / 2; + + return center; +} + +inline ASBoolean IASRealRect::Contains(const AIRealPoint &p) const +{ + return left <= p.h && right >= p.h && top <= p.v && bottom >= p.v; +} + + +inline ASBoolean IASRealRect::Contains(const AIRealRect &r) const +{ + return left <= r.left && right >= r.left && top <= r.top && bottom >= r.top && + left <= r.right && right >= r.right && top <= r.bottom && bottom >= r.bottom; +} + + +inline ASBoolean IASRealRect::Overlaps(const AIRealRect &r) const +{ + return right >= r.left && left <= r.right && + bottom >= r.top && top <= r.bottom; +} + + +inline IASRealRect &IASRealRect::operator ++ () +{ + left--; + top--; + right++; + bottom++; + + return *this; +} + +inline IASRealRect &IASRealRect::operator -- () +{ + left++; + top++; + right--; + bottom--; + + return *this; +} + + +inline IASRealRect IASRealRect::operator ++ (int) +{ + left--; + top--; + right++; + bottom++; + + return *this; +} + +inline IASRealRect IASRealRect::operator -- (int) +{ + left++; + top++; + right--; + bottom--; + + return *this; +} + + +inline IASRealRect &IASRealRect::operator += (AIReal n) +{ + left -= n; + top -= n; + right += n; + bottom += n; + + return *this; +} + + +inline IASRealRect &IASRealRect::operator -= (AIReal n) +{ + left += n; + top += n; + right -= n; + bottom -= n; + + return *this; +} + +inline IASRealRect &IASRealRect::operator += (AIRealPoint &p) +{ + left += p.h; + top += p.v; + right += p.h; + bottom += p.v; + + return *this; +} + + +inline IASRealRect &IASRealRect::operator -= (AIRealPoint &p) +{ + left -= p.h; + top -= p.v; + right -= p.h; + bottom -= p.v; + + return *this; +} + + +inline IASRealRect &IASRealRect::operator = (AIRealPoint &p) +{ + left = right = p.h; + top = bottom = p.v; + + return *this; +} + + +inline ASBoolean operator == (const AIRealRect &a, const AIRealRect &b) +{ + return a.left == b.left && + a.top == b.top && + a.right == b.right && + a.bottom == b.bottom; +} + + +inline ASBoolean operator != (const AIRealRect &a, const AIRealRect &b) +{ + return a.left != b.left || + a.top != b.top || + a.right != b.right || + a.bottom != b.bottom; +} + + +inline void IASRealRect::Inset(AIReal h, AIReal v) +{ + left += h; + top += v; + right -= h; + bottom -= v; +} + + +inline void IASRealRect::Inflate(AIReal h, AIReal v) +{ + left -= h; + top -= v; + right += h; + bottom += v; +} + + +inline void IASRealRect::Offset(AIReal h, AIReal v) +{ + left += h; + top += v; + right += h; + bottom += v; +} + + +inline void IASRealRect::Union(const AIRealPoint &a) +{ + if (left > a.h) + left = a.h; + if (top > a.v) + top = a.v; + if (right < a.h) + right = a.h; + if (bottom < a.v) + bottom = a.v; +} + + +inline void IASRealRect::Union(const AIRealRect &a) +{ + if (left > a.left) + left = a.left; + if (top > a.top) + top = a.top; + if (right < a.right) + right = a.right; + if (bottom < a.bottom) + bottom = a.bottom; +} + + +inline void IASRealRect::Union(const AIRealRect &a, const AIRealRect &b) +{ + if (b.left > a.left) + left = a.left; + else + left = b.left; + if (b.top > a.top) + top = a.top; + else + top = b.top; + if (b.right < a.right) + right = a.right; + else + right = b.right; + if (b.bottom < a.bottom) + bottom = a.bottom; + else + bottom = b.bottom; +} + + +inline void IASRealRect::Intersect(const AIRealRect &a) +{ + if (left < a.left) + left = a.left; + if (top < a.top) + top = a.top; + if (right > a.right) + right = a.right; + if (bottom > a.bottom) + bottom = a.bottom; + + if (!Overlaps(a)) + SetEmpty(); +} + + +inline void IASRealRect::Intersect(const AIRealRect &a, const AIRealRect &b) +{ + if (b.left < a.left) + left = a.left; + else + left = b.left; + if (b.top < a.top) + top = a.top; + else + top = b.top; + if (b.right > a.right) + top = a.right; + else + top = b.right; + if (b.bottom > a.bottom) + bottom = a.bottom; + else + bottom = b.bottom; + if (!Overlaps(a)) + SetEmpty(); +} + + +inline void IASRealRect::Center(const AIRealRect ¢erRect) +{ + Offset(centerRect.left + ((centerRect.right - centerRect.left) - Width()) / 2, + centerRect.top + ((centerRect.bottom - centerRect.top) - Height()) / 2); +} + + +/* + * Doesn't work in CodeWarrior 1.4. Anyone know why? DRL 4/22/96. +inline AIRealRect operator + (const IASRealRect &a, const IASRealPoint &b) +{ + return IASRealRect(a.left + b.h, a.top + b.v, a.right + b.h, a.bottom + b.v); +} + +inline AIRealRect operator + (const IASRealPoint &a, const IASRealRect &b) +{ + IASRealRect r; + + r.left = b.left + a.h; + r.top = b.top + a.v; + r.right = b.right + a.h; + r.bottom = b.bottom + a.v; + + return r; +} + +inline AIRealRect operator - (const IASRealRect &a, const IASRealPoint &b) +{ + IASRealRect r; + + r.left = a.left - b.h; + r.top = a.top - b.v; + r.right = a.right - b.h; + r.bottom = a.bottom - b.v; + + return r; +} + +inline AIRealRect operator - (const IASRealPoint &a, const IASRealRect &b) +{ + IASRealRect r; + + r.left = b.left - a.h; + r.top = b.top - a.v; + r.right = b.right - a.h; + r.bottom = b.bottom - a.v; + + return r; +} +*/ + + +struct IASRealRectCartesian : public AIRealRect +{ +public: + IASRealRectCartesian(); + IASRealRectCartesian(const AIRealRect &rect); + IASRealRectCartesian(const AIRect &rect); + IASRealRectCartesian(const AIRealPoint &a); + IASRealRectCartesian(const AIRealPoint &a, const AIRealPoint &b); + IASRealRectCartesian(ai::int32 left, ai::int32 top, ai::int32 right, ai::int32 bottom); + IASRealRectCartesian(AIReal left, AIReal top, AIReal right, AIReal bottom); + + AIReal Width() const; + AIReal Height() const; + + ASBoolean IsEmpty() const; + void SetEmpty(); + + ASBoolean IsNormalized() const; + void Normalize(); + + AIReal Area() const; + + AIRealPoint Center() const; + + ASBoolean Contains(const AIRealPoint &p) const; + ASBoolean Contains(const AIRealRect &r) const; + + ASBoolean Overlaps(const AIRealRect &r) const; + + IASRealRectCartesian &operator ++ (); + IASRealRectCartesian &operator -- (); + IASRealRectCartesian operator ++ (int); + IASRealRectCartesian operator -- (int); + IASRealRectCartesian &operator += (AIReal n); + IASRealRectCartesian &operator -= (AIReal n); + + IASRealRectCartesian &operator += (AIRealPoint &p); + IASRealRectCartesian &operator -= (AIRealPoint &p); + + IASRealRectCartesian &operator = (AIRealPoint &p); + + void Inset(AIReal h, AIReal v); + void Inflate(AIReal h, AIReal v); + void Offset(AIReal h, AIReal v); + + void Union(const AIRealPoint &a); + void Union(const AIRealRect &a); + void Union(const AIRealRect &a, const AIRealRect &b); + + void Intersect(const AIRealRect &a); + void Intersect(const AIRealRect &a, const AIRealRect &b); + + void Center(const AIRealRect ¢erRect); + + AIRealPoint LeftBottom() const; + AIRealPoint LeftTop() const; + AIRealPoint RightTop() const; + AIRealPoint RightBottom() const; +}; + + +inline IASRealRectCartesian::IASRealRectCartesian() +{ +} + + +inline IASRealRectCartesian::IASRealRectCartesian(const AIRealRect &rect) +{ + left = rect.left; + top = rect.top; + right = rect.right; + bottom = rect.bottom; +} + + +inline IASRealRectCartesian::IASRealRectCartesian(const AIRect &rect) +{ + left = static_cast(rect.left); + top = static_cast(rect.top); + right = static_cast(rect.right); + bottom = static_cast(rect.bottom); +} + + +inline IASRealRectCartesian::IASRealRectCartesian(const AIRealPoint &a) +{ + left = right = a.h; + top = bottom = a.v; +} + + +inline IASRealRectCartesian::IASRealRectCartesian(const AIRealPoint &a, const AIRealPoint &b) +{ + if (a.h < b.h) + { + left = a.h; + right = b.h; + } + else + { + left = b.h; + right = a.h; + } + + if (a.v < b.v) + { + top = b.v; + bottom = a.v; + } + else + { + top = a.v; + bottom = b.v; + } +} + + +inline IASRealRectCartesian::IASRealRectCartesian(ai::int32 left, ai::int32 top, ai::int32 right, ai::int32 bottom) +{ + this->left = static_cast(left); + this->top = static_cast(top); + this->right = static_cast(right); + this->bottom = static_cast(bottom); +} + +inline IASRealRectCartesian::IASRealRectCartesian(AIReal left, AIReal top, AIReal right, AIReal bottom) +{ + this->left = left; + this->top = top; + this->right = right; + this->bottom = bottom; +} + + +inline AIReal IASRealRectCartesian::Width() const +{ + return right - left; +} + + +inline AIReal IASRealRectCartesian::Height() const +{ + return top - bottom; +} + + +inline ASBoolean IASRealRectCartesian::IsEmpty() const +{ + return top == bottom && right == left; +} + + +inline void IASRealRectCartesian::SetEmpty() +{ + left = top = right = bottom = 0; +} + + +inline ASBoolean IASRealRectCartesian::IsNormalized() const +{ + return left <= right && top >= bottom; +} + + +inline void IASRealRectCartesian::Normalize() +{ + if (left > right) + { + AIReal saveLeft = left; left = right; right = saveLeft; + } + if (top < bottom) + { + AIReal saveTop = top; top = bottom; bottom = saveTop; + } +} + + +inline AIReal IASRealRectCartesian::Area() const +{ + return Width() * Height(); +} + +inline AIRealPoint IASRealRectCartesian::Center() const +{ + AIRealPoint center; + + center.h = left + Width() / 2.0f; + center.v = bottom + Height() / 2.0f; + + return center; +} + +inline ASBoolean IASRealRectCartesian::Contains(const AIRealPoint &p) const +{ + return left <= p.h && right >= p.h && top >= p.v && bottom <= p.v; +} + + +inline ASBoolean IASRealRectCartesian::Contains(const AIRealRect &r) const +{ + return left <= r.left && right >= r.left && top >= r.top && bottom <= r.top && + left <= r.right && right >= r.right && top >= r.bottom && bottom <= r.bottom; +} + + +inline ASBoolean IASRealRectCartesian::Overlaps(const AIRealRect &r) const +{ + return right >= r.left && left <= r.right && + bottom <= r.top && top >= r.bottom; +} + + +inline IASRealRectCartesian &IASRealRectCartesian::operator ++ () +{ + left--; + top++; + right++; + bottom--; + + return *this; +} + +inline IASRealRectCartesian &IASRealRectCartesian::operator -- () +{ + left++; + top--; + right--; + bottom++; + + return *this; +} + + +inline IASRealRectCartesian IASRealRectCartesian::operator ++ (int) +{ + left--; + top++; + right++; + bottom--; + + return *this; +} + +inline IASRealRectCartesian IASRealRectCartesian::operator -- (int) +{ + left++; + top--; + right--; + bottom++; + + return *this; +} + + +inline IASRealRectCartesian &IASRealRectCartesian::operator += (AIReal n) +{ + left -= n; + top += n; + right += n; + bottom -= n; + + return *this; +} + + +inline IASRealRectCartesian &IASRealRectCartesian::operator -= (AIReal n) +{ + left += n; + top -= n; + right -= n; + bottom += n; + + return *this; +} + +inline IASRealRectCartesian &IASRealRectCartesian::operator += (AIRealPoint &p) +{ + left += p.h; + top += p.v; + right += p.h; + bottom += p.v; + + return *this; +} + + +inline IASRealRectCartesian &IASRealRectCartesian::operator -= (AIRealPoint &p) +{ + left -= p.h; + top -= p.v; + right -= p.h; + bottom -= p.v; + + return *this; +} + + +inline IASRealRectCartesian &IASRealRectCartesian::operator = (AIRealPoint &p) +{ + left = right = p.h; + top = bottom = p.v; + + return *this; +} + +inline void IASRealRectCartesian::Inset(AIReal h, AIReal v) +{ + left += h; + top -= v; + right -= h; + bottom += v; +} + + +inline void IASRealRectCartesian::Inflate(AIReal h, AIReal v) +{ + left -= h; + top += v; + right += h; + bottom -= v; +} + + +inline void IASRealRectCartesian::Offset(AIReal h, AIReal v) +{ + left += h; + top += v; + right += h; + bottom += v; +} + + +inline void IASRealRectCartesian::Union(const AIRealPoint &a) +{ + if (left > a.h) + left = a.h; + if (top < a.v) + top = a.v; + if (right < a.h) + right = a.h; + if (bottom > a.v) + bottom = a.v; +} + + +inline void IASRealRectCartesian::Union(const AIRealRect &a) +{ + if (left > a.left) + left = a.left; + if (top < a.top) + top = a.top; + if (right < a.right) + right = a.right; + if (bottom > a.bottom) + bottom = a.bottom; +} + + +inline void IASRealRectCartesian::Union(const AIRealRect &a, const AIRealRect &b) +{ + if (b.left > a.left) + left = a.left; + else + left = b.left; + if (b.top < a.top) + top = a.top; + else + top = b.top; + if (b.right < a.right) + right = a.right; + else + right = b.right; + if (b.bottom > a.bottom) + bottom = a.bottom; + else + bottom = b.bottom; +} + + +inline void IASRealRectCartesian::Intersect(const AIRealRect &a) +{ + if (left < a.left) + left = a.left; + if (top > a.top) + top = a.top; + if (right > a.right) + right = a.right; + if (bottom < a.bottom) + bottom = a.bottom; + + if (!Overlaps(a)) + SetEmpty(); +} + + +inline void IASRealRectCartesian::Intersect(const AIRealRect &a, const AIRealRect &b) +{ + if (b.left < a.left) + left = a.left; + else + left = b.left; + if (b.top > a.top) + top = a.top; + else + top = b.top; + if (b.right > a.right) + top = a.right; + else + top = b.right; + if (b.bottom < a.bottom) + bottom = a.bottom; + else + bottom = b.bottom; + if (!Overlaps(a)) + SetEmpty(); +} + + +inline void IASRealRectCartesian::Center(const AIRealRect ¢erRect) +{ + Offset(centerRect.left + ((centerRect.right - centerRect.left) - Width()) / 2.0f, + centerRect.bottom + ((centerRect.top - centerRect.bottom) - Height()) / 2.0f); +} + + +inline AIRealPoint IASRealRectCartesian::LeftBottom() const +{ + AIRealPoint returnPt = {left, bottom}; + return returnPt; +} + +inline AIRealPoint IASRealRectCartesian::LeftTop() const +{ + AIRealPoint returnPt = {left, top}; + return returnPt; +} + +inline AIRealPoint IASRealRectCartesian::RightTop() const +{ + AIRealPoint returnPt = {right, top}; + return returnPt; +} + +inline AIRealPoint IASRealRectCartesian::RightBottom() const +{ + AIRealPoint returnPt = {right, bottom}; + return returnPt; +} + + + + +#endif + + + + + + + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASTypes.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASTypes.hpp index c66e9a8..9677343 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASTypes.hpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/IASTypes.hpp @@ -1,44 +1,44 @@ -/***********************************************************************/ -/* */ -/* IASTypes.hpp */ -/* ASTypes object wrapper classes */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1996-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/* Started by Dave Lazarony, 03/26/1996 */ -/* */ -/***********************************************************************/ - -#ifndef __IASTypes_hpp__ -#define __IASTypes_hpp__ - -/* - * Includes - */ - -#ifndef __IASFixed_hpp__ -#include "IASFixed.hpp" -#endif - -// The following files have been obsoleted. Use IADMPoint or IADMRect instead. - /* -#ifndef __IASPoint_hpp__ -#include "IASPoint.hpp" -#endif - -#ifndef __IASRect_hpp__ -#include "IASRect.hpp" -#endif -*/ -#endif +/***********************************************************************/ +/* */ +/* IASTypes.hpp */ +/* ASTypes object wrapper classes */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1996-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/* Started by Dave Lazarony, 03/26/1996 */ +/* */ +/***********************************************************************/ + +#ifndef __IASTypes_hpp__ +#define __IASTypes_hpp__ + +/* + * Includes + */ + +#ifndef __IASFixed_hpp__ +#include "IASFixed.hpp" +#endif + +// The following files have been obsoleted. Use IADMPoint or IADMRect instead. + /* +#ifndef __IASPoint_hpp__ +#include "IASPoint.hpp" +#endif + +#ifndef __IASRect_hpp__ +#include "IASRect.hpp" +#endif +*/ +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/SloTextdomTypes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/SloTextdomTypes.h index e49c3d6..e232f79 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/SloTextdomTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/SloTextdomTypes.h @@ -1,19 +1,19 @@ -#ifndef __SloTextdomTypes___ -#define __SloTextdomTypes___ - -#include "AITypes.h" - -namespace ATETextDOM -{ - typedef ai::int32 Int32; - typedef ASUnicode Unicode; - typedef ai::int32 ATETextDomErr; - typedef AIFloat Float; - typedef AIReal Real; - typedef AIFloatMatrix FloatMatrix; - typedef AIRealMatrix RealMatrix; - typedef AIFloatPoint FloatPoint; - typedef AIRealPoint RealPoint; - -} +#ifndef __SloTextdomTypes___ +#define __SloTextdomTypes___ + +#include "AITypes.h" + +namespace ATETextDOM +{ + typedef ai::int32 Int32; + typedef ASUnicode Unicode; + typedef ai::int32 ATETextDomErr; + typedef AIFloat Float; + typedef AIReal Real; + typedef AIFloatMatrix FloatMatrix; + typedef AIRealMatrix RealMatrix; + typedef AIFloatPoint FloatPoint; + typedef AIRealPoint RealPoint; + +} #endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/VTableSupport.hpp b/BloksAIPlugin/Vendor/illustratorapi/illustrator/VTableSupport.hpp index a16fb49..5812ae6 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/VTableSupport.hpp +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/VTableSupport.hpp @@ -1,114 +1,114 @@ - -#ifndef _VTABLESUPPORT_HPP_ -#define _VTABLESUPPORT_HPP_ - -/* - * Name: VTableSupport.hpp - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "AIHeaderBegin.h" - -/////////////////////////////////////////////////////////////////////// -// -// If your plugin has a C++ object attached to it's globals, and if -// the class of that object has virtual functions, those functions -// will not work after the plugin is unloaded and then reloaded. -// -// The following macro (FIXUP_VTABLE) can be used to provide a means -// of restoring the virtual function table of a globally-persistent -// C++ object by calling FixupVTable() prior to the use of any of -// the object's virtual functions after a reload. -// -// Here is how you might use the macro: -// -// class MyGlobals -// { -// public: -// // -// [some class definition code skipped]; -// // -// // pass class name to macro -// FIXUP_VTABLE(MyGlobals); -// // -// // Note: private access at this point -// // -// protected: -// // -// [more class definition code skipped]; -// }; -// -// // -// // Then, later in the translation: -// // -// -// ASErr -// OnReloadPlugin(SPInterfaceMessage *pMsg) -// { -// MyGlobals *pGlobals = (MyGlobals *) pMsg->d.globals; -// -// // don't use any of MyGlobals' virtual functions here -// [some code skipped]; -// -// // should probably do this early on. -// MyGlobals::FixupVTable(pGlobals); -// -// // o.k. to use virtual functions now -// [more code skipped]; -// } -// -/////////////////////////////////////////////////////////////////////// - -#define FIXUP_VTABLE(CLASSNAME) \ -public: \ - static void FixupVTable(CLASSNAME *pThis) {pThis = new(pThis) CLASSNAME((FixupVTableSignature) 0);} \ -private: \ - typedef ai::int32 FixupVTableSignature; \ - CLASSNAME(FixupVTableSignature) {} \ - static void *operator new(size_t /*uiSize*/, CLASSNAME * pThis) {return pThis;} \ - static void operator delete(void * /*pMem*/, CLASSNAME * /*pThis*/) {} \ - // - -/////////////////////////////////////////////////////////////////////// -// -// If you are using operator new from a base class, you can use the -// following macro so that the compiler can resolve the overloading -// in the scope of your derived class. -// -/////////////////////////////////////////////////////////////////////// - -#define FIXUP_VTABLE_EX(CLASSNAME, BASECLASS) \ -public: \ - void *operator new(size_t uiSize) {return BASECLASS::operator new(uiSize);} \ - void operator delete(void *pMem) {BASECLASS::operator delete(pMem);} \ - FIXUP_VTABLE(CLASSNAME) - -/////////////////////////////////////////////////////////////////////// -// -// If you are using a global operator new, you can use the -// following macro so that the compiler can resolve the overloading -// in the scope of your derived class. -// -/////////////////////////////////////////////////////////////////////// - -#define FIXUP_VTABLE_EX1(CLASSNAME) \ -public: \ - void *operator new(size_t uiSize) {return ::operator new(uiSize);} \ - void operator delete(void *pMem) {::operator delete(pMem); } \ - FIXUP_VTABLE(CLASSNAME) - -#include "AIHeaderEnd.h" - -#endif // _VTABLESUPPORT_HPP_ - + +#ifndef _VTABLESUPPORT_HPP_ +#define _VTABLESUPPORT_HPP_ + +/* + * Name: VTableSupport.hpp + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2005-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "AIHeaderBegin.h" + +/////////////////////////////////////////////////////////////////////// +// +// If your plugin has a C++ object attached to it's globals, and if +// the class of that object has virtual functions, those functions +// will not work after the plugin is unloaded and then reloaded. +// +// The following macro (FIXUP_VTABLE) can be used to provide a means +// of restoring the virtual function table of a globally-persistent +// C++ object by calling FixupVTable() prior to the use of any of +// the object's virtual functions after a reload. +// +// Here is how you might use the macro: +// +// class MyGlobals +// { +// public: +// // +// [some class definition code skipped]; +// // +// // pass class name to macro +// FIXUP_VTABLE(MyGlobals); +// // +// // Note: private access at this point +// // +// protected: +// // +// [more class definition code skipped]; +// }; +// +// // +// // Then, later in the translation: +// // +// +// ASErr +// OnReloadPlugin(SPInterfaceMessage *pMsg) +// { +// MyGlobals *pGlobals = (MyGlobals *) pMsg->d.globals; +// +// // don't use any of MyGlobals' virtual functions here +// [some code skipped]; +// +// // should probably do this early on. +// MyGlobals::FixupVTable(pGlobals); +// +// // o.k. to use virtual functions now +// [more code skipped]; +// } +// +/////////////////////////////////////////////////////////////////////// + +#define FIXUP_VTABLE(CLASSNAME) \ +public: \ + static void FixupVTable(CLASSNAME *pThis) {pThis = new(pThis) CLASSNAME((FixupVTableSignature) 0);} \ +private: \ + typedef ai::int32 FixupVTableSignature; \ + CLASSNAME(FixupVTableSignature) {} \ + static void *operator new(size_t /*uiSize*/, CLASSNAME * pThis) {return pThis;} \ + static void operator delete(void * /*pMem*/, CLASSNAME * /*pThis*/) {} \ + // + +/////////////////////////////////////////////////////////////////////// +// +// If you are using operator new from a base class, you can use the +// following macro so that the compiler can resolve the overloading +// in the scope of your derived class. +// +/////////////////////////////////////////////////////////////////////// + +#define FIXUP_VTABLE_EX(CLASSNAME, BASECLASS) \ +public: \ + void *operator new(size_t uiSize) {return BASECLASS::operator new(uiSize);} \ + void operator delete(void *pMem) {BASECLASS::operator delete(pMem);} \ + FIXUP_VTABLE(CLASSNAME) + +/////////////////////////////////////////////////////////////////////// +// +// If you are using a global operator new, you can use the +// following macro so that the compiler can resolve the overloading +// in the scope of your derived class. +// +/////////////////////////////////////////////////////////////////////// + +#define FIXUP_VTABLE_EX1(CLASSNAME) \ +public: \ + void *operator new(size_t uiSize) {return ::operator new(uiSize);} \ + void operator delete(void *pMem) {::operator delete(pMem); } \ + FIXUP_VTABLE(CLASSNAME) + +#include "AIHeaderEnd.h" + +#endif // _VTABLESUPPORT_HPP_ + diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIDocumentAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIDocumentAction.h index 963436c..548d82d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIDocumentAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIDocumentAction.h @@ -1,241 +1,241 @@ -#ifndef _AICOREDOCUMENTACTION_H_ -#define _AICOREDOCUMENTACTION_H_ - -/* - * Name: AICoreDocumentAction.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Actions defined in the core. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - -/** @ingroup Actions - Makes a new document. - @param #kAINewDocumentNameKey The document title string. - Optional, default is "untitled-n" (with a unique number). - @param #kAINewDocumentColorModelKey The color model to use. - Allowed values are \c #kDocRGBColor and \c #kDocCMYKColor. - @param #kAINewDocumentSettingsFileKey Path to the profile used to - create the new document (Unicode string) - @param #kAINewDocumentWidthKey The page width in points (real). - @param #kAINewDocumentHeightKey The page height in points (real). - @param #kAINewDocumentRulerUnitsKey The ruler units, - an \c #AIDocumentRulerUnitValue. - @param #kAINewDocumentRasterResolutionKey The document raster resolution. (integer) - @param #kAINewDocumentPreviewModeKey The preview mode for the document. (integer) - @param #kAINewDocumentTransparencyGridKey True to show the transparency grid for - the document. - */ -#define kAINewDocumentAction "adobe_newDocument" - -/** Parameter to \c #kAINewDocumentAction. The document title string. - Optional, default is "untitled-n" (with a unique number).*/ -const ActionParamKeyID kAINewDocumentNameKey = 'name'; // string - -/** Parameter to \c #kAINewDocumentAction. The color model to use. - Allowed values are \c #kDocRGBColor and \c #kDocCMYKColor. */ -const ActionParamKeyID kAINewDocumentColorModelKey = 'colr'; // integer - -/** Parameter to \c #kAINewDocumentAction. Unicode string containing the path - to the new document profile file to use. These files are found in folders - \c #kAIUserWritableStartupFileFolderType and - \c #kAIRequiredStartupProfilesFolderType. -*/ -const ActionParamKeyID kAINewDocumentSettingsFileKey = 'setf'; // string - -/** The page width in points (real). */ -const ActionParamKeyID kAINewDocumentWidthKey = 'wdth'; // real - -/** Parameter to \c #kAINewDocumentAction. The page height in points (real). */ -const ActionParamKeyID kAINewDocumentHeightKey = 'heit'; // real - -/** Parameter to \c #kAINewDocumentAction. The ruler units, - an \c #AIDocumentRulerUnitValue. */ -const ActionParamKeyID kAINewDocumentRulerUnitsKey = 'rulr'; // integer - -/** Parameter to \c #kAINewDocumentAction. The document raster resolution, - an integer for the PPI value: Screen(72), Medium(150), or High(300). */ -const ActionParamKeyID kAINewDocumentRasterResolutionKey= 'rast'; // integer - -/** Parameter to \c #kAINewDocumentAction. The preview style for the new document, - an \c #AIPreviewMode constant. */ -const ActionParamKeyID kAINewDocumentPreviewModeKey = 'pxpr'; // integer - -/** Parameter to \c #kAINewDocumentAction. True to show the transparency grid for - the document, false to hide it. */ -const ActionParamKeyID kAINewDocumentTransparencyGridKey = 'tran'; // bool - - -/** Parameter to \c #kAINewDocumentAction. If \c #kAINewDocumentTransparencyGridKey is true, the RGB values for the colors of the Transparency Grid - */ -const ActionParamKeyID kAINewDocumentTransparencyGridColor1RedKey = 'gr1r'; -const ActionParamKeyID kAINewDocumentTransparencyGridColor1GreenKey = 'gr1g'; -const ActionParamKeyID kAINewDocumentTransparencyGridColor1BlueKey = 'gr1b'; -const ActionParamKeyID kAINewDocumentTransparencyGridColor2RedKey = 'gr2r'; -const ActionParamKeyID kAINewDocumentTransparencyGridColor2GreenKey = 'gr2g'; -const ActionParamKeyID kAINewDocumentTransparencyGridColor2BlueKey = 'gr2b'; - -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Opens a document - @param #kAIOpenDocumentNameKey The name string of the file to open. - @param #kAIOpenDocumentColorModelKey The color model to use. - Allowed values are \c #kDocRGBColor and \c #kDocCMYKColor. - */ -#define kAIOpenDocumentAction "adobe_openDocument" -/** Parameter to \c #kAIOpenDocumentAction. The name string of the file to open. */ -const ActionParamKeyID kAIOpenDocumentNameKey = 'name'; // string -/** Parameter to \c #kAIOpenDocumentAction. The color model to use. -Allowed values are \c #kDocRGBColor and \c #kDocCMYKColor. */ -const ActionParamKeyID kAIOpenDocumentColorModelKey = 'colr'; // integer - -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Saves the current document under its current name, according to its - current format. Takes no parameters. */ -#define kAISaveDocumentAction "adobe_saveDocument" - -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Saves the current document. The parameters allows you to specify the - name and format. There can be additional parameters, depending on the - file format; see \c AINativeAction.h and\c AISVGAction.h. - @param #kAISaveDocumentAsNameKey The name string of the file - to save to. Optional. If not specified, shows a dialog to - query user for the name. - @param #kAISaveDocumentAsFormatKey The format string of the - format to save to. Optional. If not specified, uses - the current format of the document. Use - \c #kAINativeFileFormat to save as a native file, - \c #kAIEPSFileFormat to save as an EPS file. - @param #kAISaveDocumentAsGetParamsKey When true, shows a dialog - to query user for additional parameters required - by the format. Optional. Default is false. - */ -#define kAISaveDocumentAsAction "adobe_saveDocumentAs" -/** Parameter to \c #kAISaveDocumentAsAction. The name string of the file to -save to. Optional. If not specified, shows - a dialog to query user for the name. */ -const ActionParamKeyID kAISaveDocumentAsNameKey = 'name'; // string -/** Parameter to \c #kAISaveDocumentAsAction. The format string of the format -to save to. Optional. If not specified, uses - the current format of the document. See \c AINativeAction.h */ -const ActionParamKeyID kAISaveDocumentAsFormatKey = 'frmt'; // string -/** Parameter to \c #kAISaveDocumentAsAction. When true, shows a dialog to -query user for additional parameters required - by the format. Optional. Default is false. */ -const ActionParamKeyID kAISaveDocumentAsGetParamsKey = 'gprm'; // bool - - -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Reverts the current document to its state when last saved. - Takes no parameters. */ -#define kAIRevertDocumentAction "adobe_revertDocument" - -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Closes the current document or all open documents. - @param #kAICloseAllDocumentsKey When true, close all open document. - When false, close only the current document. - @param #kAICloseAndSaveDocumentKey When true, saves the document - or documents before closing. - */ -#define kAICloseDocumentAction "adobe_closeDocument" -/** Parameter to \c #kAICloseDocumentAction. When true, close all open document. -When false, close only the current document. */ -const ActionParamKeyID kAICloseAllDocumentsKey = 'all.'; // bool -/** Parameter to \c #kAICloseDocumentAction. When true, saves the document -or documents before closing. */ -const ActionParamKeyID kAICloseAndSaveDocumentKey = 'save'; // bool - -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Exports the current document to the file format specified by the - format and extension parameters. There may be additional parameters, - depending on the file format; see the action information for the - individual formats for the definitions. - @param #kAIExportDocumentNameKey The name string for the file - to export as. - @param #kAIExportDocumentFormatKey The format string. Optional. - If not specified, shows the Export dialog. See the action - information for individual formats for definitions of - the format strings. - @param #kAIExportDocumentExtensionKey The file extension string. - Optional. If not specified, shows the Export dialog. - */ -#define kAIExportDocumentAction "adobe_exportDocument" -/** Parameter to \c #kAIExportDocumentAction. The name string for the file to export as. */ -const ActionParamKeyID kAIExportDocumentNameKey = 'name'; // string -/** Parameter to \c #kAIExportDocumentAction. The format string. Optional. -If not specified, shows the Export dialog. - See the action information for individual formats for definitions of - the format strings.*/ -const ActionParamKeyID kAIExportDocumentFormatKey = 'frmt'; // string -/** Parameter to \c #kAIExportDocumentAction. The file extension string. Optional. -If not specified, shows the Export dialog. */ -const ActionParamKeyID kAIExportDocumentExtensionKey = 'extn'; // string -/** Parameter to \c #kAIExportDocumentAction. When true, export multiple artboards specified in -\c # kAIExportDocumentSaveAllKey or \c #kAIExportDocumentSaveRangeKey. -when false,export the complete artwork */ -const ActionParamKeyID kAIExportDocumentSaveMultipleArtboardsKey = 'smab'; // boolean -/** Parameter to \c #kAIExportDocumentAction. When true, export all artboards. -when false,export the artbaords in \c #kAIExportDocumentSaveRangeKey specified */ -const ActionParamKeyID kAIExportDocumentSaveAllKey = 'sall'; // boolean -/** Parameter to \c #kAIExportDocumentAction. The artboards range string. Optional when -\c # kAIExportDocumentSaveAllKey is true or \c #kAIExportDocumentSaveMultipleArtboardsKey is false*/ -const ActionParamKeyID kAIExportDocumentSaveRangeKey = 'sran'; // string - -const ActionParamKeyID kAIEnableBatchExport = 'ebep'; // string - -const ActionParamKeyID kAIExportDocumentPreventFileNameUniquifyKey = 'pfnu'; // string -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Prints the current document. Takes no parameters. */ -#define kAIPrintDocumentAction "adobe_printDocument" - -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Places a file into a document. Additional parameters can be specified - for the action depending on the target file format. See the action - information for individual formats for definitions of the additional - parameters. - @param #kAIPlaceDocumentActionNameKey The name string of the file - to place. - @param #kAIPlaceDocumentActionLinkKey When true, the file is linked. - When false, the file is embedded. - @param #kAIPlaceDocumentActionReplaceKey When true, the file replaces - the current selection in the document. - @param #kAIPlaceDocumentActionTemplateKey When true. creates a template - layer and places the file in that layer. - */ -#define kAIPlaceDocumentAction "adobe_placeDocument" -/** Parameter to \c #kAIPlaceDocumentAction. The name string of the file to place. */ -const ActionParamKeyID kAIPlaceDocumentActionNameKey = 'name'; // string -/** Parameter to \c #kAIPlaceDocumentAction. When true, the file is linked. -When false, the file is embedded. */ -const ActionParamKeyID kAIPlaceDocumentActionLinkKey = 'link'; // bool -/** Parameter to \c #kAIPlaceDocumentAction. When true, the file replaces the -current selection in the document. */ -const ActionParamKeyID kAIPlaceDocumentActionReplaceKey = 'rplc'; // bool -/** Parameter to \c #kAIPlaceDocumentAction. When true. creates a template layer -and places the file in that layer. */ -const ActionParamKeyID kAIPlaceDocumentActionTemplateKey = 'tmpl'; // bool - - -#endif +#ifndef _AICOREDOCUMENTACTION_H_ +#define _AICOREDOCUMENTACTION_H_ + +/* + * Name: AICoreDocumentAction.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Actions defined in the core. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + +/** @ingroup Actions + Makes a new document. + @param #kAINewDocumentNameKey The document title string. + Optional, default is "untitled-n" (with a unique number). + @param #kAINewDocumentColorModelKey The color model to use. + Allowed values are \c #kDocRGBColor and \c #kDocCMYKColor. + @param #kAINewDocumentSettingsFileKey Path to the profile used to + create the new document (Unicode string) + @param #kAINewDocumentWidthKey The page width in points (real). + @param #kAINewDocumentHeightKey The page height in points (real). + @param #kAINewDocumentRulerUnitsKey The ruler units, + an \c #AIDocumentRulerUnitValue. + @param #kAINewDocumentRasterResolutionKey The document raster resolution. (integer) + @param #kAINewDocumentPreviewModeKey The preview mode for the document. (integer) + @param #kAINewDocumentTransparencyGridKey True to show the transparency grid for + the document. + */ +#define kAINewDocumentAction "adobe_newDocument" + +/** Parameter to \c #kAINewDocumentAction. The document title string. + Optional, default is "untitled-n" (with a unique number).*/ +const ActionParamKeyID kAINewDocumentNameKey = 'name'; // string + +/** Parameter to \c #kAINewDocumentAction. The color model to use. + Allowed values are \c #kDocRGBColor and \c #kDocCMYKColor. */ +const ActionParamKeyID kAINewDocumentColorModelKey = 'colr'; // integer + +/** Parameter to \c #kAINewDocumentAction. Unicode string containing the path + to the new document profile file to use. These files are found in folders + \c #kAIUserWritableStartupFileFolderType and + \c #kAIRequiredStartupProfilesFolderType. +*/ +const ActionParamKeyID kAINewDocumentSettingsFileKey = 'setf'; // string + +/** The page width in points (real). */ +const ActionParamKeyID kAINewDocumentWidthKey = 'wdth'; // real + +/** Parameter to \c #kAINewDocumentAction. The page height in points (real). */ +const ActionParamKeyID kAINewDocumentHeightKey = 'heit'; // real + +/** Parameter to \c #kAINewDocumentAction. The ruler units, + an \c #AIDocumentRulerUnitValue. */ +const ActionParamKeyID kAINewDocumentRulerUnitsKey = 'rulr'; // integer + +/** Parameter to \c #kAINewDocumentAction. The document raster resolution, + an integer for the PPI value: Screen(72), Medium(150), or High(300). */ +const ActionParamKeyID kAINewDocumentRasterResolutionKey= 'rast'; // integer + +/** Parameter to \c #kAINewDocumentAction. The preview style for the new document, + an \c #AIPreviewMode constant. */ +const ActionParamKeyID kAINewDocumentPreviewModeKey = 'pxpr'; // integer + +/** Parameter to \c #kAINewDocumentAction. True to show the transparency grid for + the document, false to hide it. */ +const ActionParamKeyID kAINewDocumentTransparencyGridKey = 'tran'; // bool + + +/** Parameter to \c #kAINewDocumentAction. If \c #kAINewDocumentTransparencyGridKey is true, the RGB values for the colors of the Transparency Grid + */ +const ActionParamKeyID kAINewDocumentTransparencyGridColor1RedKey = 'gr1r'; +const ActionParamKeyID kAINewDocumentTransparencyGridColor1GreenKey = 'gr1g'; +const ActionParamKeyID kAINewDocumentTransparencyGridColor1BlueKey = 'gr1b'; +const ActionParamKeyID kAINewDocumentTransparencyGridColor2RedKey = 'gr2r'; +const ActionParamKeyID kAINewDocumentTransparencyGridColor2GreenKey = 'gr2g'; +const ActionParamKeyID kAINewDocumentTransparencyGridColor2BlueKey = 'gr2b'; + +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Opens a document + @param #kAIOpenDocumentNameKey The name string of the file to open. + @param #kAIOpenDocumentColorModelKey The color model to use. + Allowed values are \c #kDocRGBColor and \c #kDocCMYKColor. + */ +#define kAIOpenDocumentAction "adobe_openDocument" +/** Parameter to \c #kAIOpenDocumentAction. The name string of the file to open. */ +const ActionParamKeyID kAIOpenDocumentNameKey = 'name'; // string +/** Parameter to \c #kAIOpenDocumentAction. The color model to use. +Allowed values are \c #kDocRGBColor and \c #kDocCMYKColor. */ +const ActionParamKeyID kAIOpenDocumentColorModelKey = 'colr'; // integer + +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Saves the current document under its current name, according to its + current format. Takes no parameters. */ +#define kAISaveDocumentAction "adobe_saveDocument" + +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Saves the current document. The parameters allows you to specify the + name and format. There can be additional parameters, depending on the + file format; see \c AINativeAction.h and\c AISVGAction.h. + @param #kAISaveDocumentAsNameKey The name string of the file + to save to. Optional. If not specified, shows a dialog to + query user for the name. + @param #kAISaveDocumentAsFormatKey The format string of the + format to save to. Optional. If not specified, uses + the current format of the document. Use + \c #kAINativeFileFormat to save as a native file, + \c #kAIEPSFileFormat to save as an EPS file. + @param #kAISaveDocumentAsGetParamsKey When true, shows a dialog + to query user for additional parameters required + by the format. Optional. Default is false. + */ +#define kAISaveDocumentAsAction "adobe_saveDocumentAs" +/** Parameter to \c #kAISaveDocumentAsAction. The name string of the file to +save to. Optional. If not specified, shows + a dialog to query user for the name. */ +const ActionParamKeyID kAISaveDocumentAsNameKey = 'name'; // string +/** Parameter to \c #kAISaveDocumentAsAction. The format string of the format +to save to. Optional. If not specified, uses + the current format of the document. See \c AINativeAction.h */ +const ActionParamKeyID kAISaveDocumentAsFormatKey = 'frmt'; // string +/** Parameter to \c #kAISaveDocumentAsAction. When true, shows a dialog to +query user for additional parameters required + by the format. Optional. Default is false. */ +const ActionParamKeyID kAISaveDocumentAsGetParamsKey = 'gprm'; // bool + + +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Reverts the current document to its state when last saved. + Takes no parameters. */ +#define kAIRevertDocumentAction "adobe_revertDocument" + +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Closes the current document or all open documents. + @param #kAICloseAllDocumentsKey When true, close all open document. + When false, close only the current document. + @param #kAICloseAndSaveDocumentKey When true, saves the document + or documents before closing. + */ +#define kAICloseDocumentAction "adobe_closeDocument" +/** Parameter to \c #kAICloseDocumentAction. When true, close all open document. +When false, close only the current document. */ +const ActionParamKeyID kAICloseAllDocumentsKey = 'all.'; // bool +/** Parameter to \c #kAICloseDocumentAction. When true, saves the document +or documents before closing. */ +const ActionParamKeyID kAICloseAndSaveDocumentKey = 'save'; // bool + +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Exports the current document to the file format specified by the + format and extension parameters. There may be additional parameters, + depending on the file format; see the action information for the + individual formats for the definitions. + @param #kAIExportDocumentNameKey The name string for the file + to export as. + @param #kAIExportDocumentFormatKey The format string. Optional. + If not specified, shows the Export dialog. See the action + information for individual formats for definitions of + the format strings. + @param #kAIExportDocumentExtensionKey The file extension string. + Optional. If not specified, shows the Export dialog. + */ +#define kAIExportDocumentAction "adobe_exportDocument" +/** Parameter to \c #kAIExportDocumentAction. The name string for the file to export as. */ +const ActionParamKeyID kAIExportDocumentNameKey = 'name'; // string +/** Parameter to \c #kAIExportDocumentAction. The format string. Optional. +If not specified, shows the Export dialog. + See the action information for individual formats for definitions of + the format strings.*/ +const ActionParamKeyID kAIExportDocumentFormatKey = 'frmt'; // string +/** Parameter to \c #kAIExportDocumentAction. The file extension string. Optional. +If not specified, shows the Export dialog. */ +const ActionParamKeyID kAIExportDocumentExtensionKey = 'extn'; // string +/** Parameter to \c #kAIExportDocumentAction. When true, export multiple artboards specified in +\c # kAIExportDocumentSaveAllKey or \c #kAIExportDocumentSaveRangeKey. +when false,export the complete artwork */ +const ActionParamKeyID kAIExportDocumentSaveMultipleArtboardsKey = 'smab'; // boolean +/** Parameter to \c #kAIExportDocumentAction. When true, export all artboards. +when false,export the artbaords in \c #kAIExportDocumentSaveRangeKey specified */ +const ActionParamKeyID kAIExportDocumentSaveAllKey = 'sall'; // boolean +/** Parameter to \c #kAIExportDocumentAction. The artboards range string. Optional when +\c # kAIExportDocumentSaveAllKey is true or \c #kAIExportDocumentSaveMultipleArtboardsKey is false*/ +const ActionParamKeyID kAIExportDocumentSaveRangeKey = 'sran'; // string + +const ActionParamKeyID kAIEnableBatchExport = 'ebep'; // string + +const ActionParamKeyID kAIExportDocumentPreventFileNameUniquifyKey = 'pfnu'; // string +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Prints the current document. Takes no parameters. */ +#define kAIPrintDocumentAction "adobe_printDocument" + +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Places a file into a document. Additional parameters can be specified + for the action depending on the target file format. See the action + information for individual formats for definitions of the additional + parameters. + @param #kAIPlaceDocumentActionNameKey The name string of the file + to place. + @param #kAIPlaceDocumentActionLinkKey When true, the file is linked. + When false, the file is embedded. + @param #kAIPlaceDocumentActionReplaceKey When true, the file replaces + the current selection in the document. + @param #kAIPlaceDocumentActionTemplateKey When true. creates a template + layer and places the file in that layer. + */ +#define kAIPlaceDocumentAction "adobe_placeDocument" +/** Parameter to \c #kAIPlaceDocumentAction. The name string of the file to place. */ +const ActionParamKeyID kAIPlaceDocumentActionNameKey = 'name'; // string +/** Parameter to \c #kAIPlaceDocumentAction. When true, the file is linked. +When false, the file is embedded. */ +const ActionParamKeyID kAIPlaceDocumentActionLinkKey = 'link'; // bool +/** Parameter to \c #kAIPlaceDocumentAction. When true, the file replaces the +current selection in the document. */ +const ActionParamKeyID kAIPlaceDocumentActionReplaceKey = 'rplc'; // bool +/** Parameter to \c #kAIPlaceDocumentAction. When true. creates a template layer +and places the file in that layer. */ +const ActionParamKeyID kAIPlaceDocumentActionTemplateKey = 'tmpl'; // bool + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIEnvelopeAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIEnvelopeAction.h index a64d24c..bf47e4f 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIEnvelopeAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIEnvelopeAction.h @@ -1,196 +1,196 @@ -#ifndef _AIENVELOPEACTION_H_ -#define _AIENVELOPEACTION_H_ - -/* - * Name: AIEnvelopeAction.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Actions for envelopes. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - -// Action menu identifiers; stored as \c #actionTypeEnum values when recorded -/** Release menu item */ -#define kAIEnvelopeActionMenuRelease 0 -/** Options menu item */ -#define kAIEnvelopeActionMenuOptions 1 -/** Expand menu item */ -#define kAIEnvelopeActionMenuExpand 2 -/** Toggle menu item */ -#define kAIEnvelopeActionMenuToggle 3 - -// Action 'type' identifiers; stored as \c #actionTypeEnum values when recorded -/** Warp operation */ -#define kAIEnvelopeActionTypeWarp 0 -/** Mesh operation */ -#define kAIEnvelopeActionTypeMesh 1 -/** Top-object operation */ -#define kAIEnvelopeActionTypeTopObject 2 - -//------------------------------------------------------------------------------ - -/** @ingroup Actions - Runs operations in the Envelope submenu of the Action menu - @param #kAIEnvelopeMenuItem The menu item to run. - \li Release: \c kAIEnvelopeActionMenuRelease, replace the envelope with - art objects for the contents (in their original state) and the mesh. - \li Options: \c kAIEnvelopeActionMenuOptions, select distortion parameters. - \li Expand: \c kAIEnvelopeActionMenuExpand, replace the envelope with the - art objects for the contents, in their distorted state. - \li Edit Contents/Envelope: \c kAIEnvelopeActionMenuToggle, toggle between - editing the contained art and editing the shape of a warp or mesh. - - @param #kAIEnvelopeAntiAliasRaster Options parameter. When true, - anti-alias is used to smooth rasters that are distorted in envelopes. - @param #kAIEnvelopePreserveRasterShape Options parameter. How to - preserve raster shapes when they are distorted by non-rectangular - envelopes. - \li When true, apply an alpha channel (transparency) to the raster - \li When false, use a clipping mask on the raster. - - @param #kAIEnvelopeFidelity Options parameter. The fidelity value controls - how closely the deformed object fits into the envelope region. - Higher values add more points to the distorted paths, and take - longerto calculate. - An integer in the range [0..100] - @param #kAIEnvelopeDistortAppearance Options parameter. When true, - distort the appearance of an object (such as applied effects - or styles) and not just the object's underlying geometry. The - appearance properties are expanded separately. - When false, the appearance is applied after the envelope - distorts the underlying geometry. - @param #kAIEnvelopeDistortPatterns Options parameter. When true, - distort pattern fill, which is expanded separately. - @param #kAIEnvelopeDistortGradients Options parameter. When true, - distort gradient fill, which is expanded separately. - */ -#define kAIEnvelopeMenuAction "ai_plugin_envelope" -/** Parameter to \c #kAIEnvelopeMenuAction. The menu item to run. - \li Release: \c kAIEnvelopeActionMenuRelease, replace the envelope with - art objects for the contents (in their original state) and the mesh. - \li Options: \c kAIEnvelopeActionMenuOptions, select distortion parameters. - \li Expand: \c kAIEnvelopeActionMenuExpand, replace the envelope with the - art objects for the contents, in their distorted state. - \li Edit Contents/Envelope: \c kAIEnvelopeActionMenuToggle, toggle between - editing the contained art and editing the shape of a warp or mesh. - */ -const ActionParamKeyID kAIEnvelopeMenuItem = 'menu'; // enum -/** Options parameter to \c #kAIEnvelopeMenuAction. When true, anti-alias is used to smooth - rasters that are distorted in envelopes. */ -const ActionParamKeyID kAIEnvelopeAntiAliasRaster = 'aars'; // bool -/** Options parameter. How to preserve raster shapes when they are - distorted by non-rectangular envelopes. Can be 0 or 1. - \li When 0, use a clipping mask on the raster. - \li When 1, apply an alpha channel (transparency) to the raster. - */ -const ActionParamKeyID kAIEnvelopePreserveRasterShape = 'alph'; // enum -/** Options parameter to \c #kAIEnvelopeMenuAction. The fidelity value controls how closely the - deformed object fits into the envelope region. - Higher values add more points to the distorted paths, and take - longerto calculate. An integer in the range [0..100] */ -const ActionParamKeyID kAIEnvelopeFidelity = 'fidt'; // integer -/** Options parameter to \c #kAIEnvelopeMenuAction. When true, expand and distort the appearance of an object - (such as applied effects or styles) and not just the object's - underlying geometry. - When false, the appearance is applied after the envelope - distorts the underlying geometry.*/ -const ActionParamKeyID kAIEnvelopeDistortAppearance = 'app.'; // bool -/** Options parameter to \c #kAIEnvelopeMenuAction. When true,expand and distort pattern fill. */ -const ActionParamKeyID kAIEnvelopeDistortPatterns = 'patt'; // bool -/** Options parameter to \c #kAIEnvelopeMenuAction. When true, expand and distort gradient fill. */ -const ActionParamKeyID kAIEnvelopeDistortGradients = 'grad'; // bool - -//------------------------------------------------------------------------------ - -/** @ingroup Actions - Makes an envelope from the selected objects on the artboard. - @param #kAIEnvelopeMakeType How to make an envelope from selected - objects on the artboard. - \li Make with Warp: \c kAIEnvelopeActionTypeWarp - \li Make with Mesh: \c kAIEnvelopeActionTypeMesh - \li Make with Top Object: \c kAIEnvelopeActionTypeTopObject - - @param #kAIEnvelopeNumRows For mesh type: Number of rows in mesh. - @param #kAIEnvelopeNumCols For mesh type: Number of columns in mesh. - @param #kAIEnvelopeWarpStyle For warp type: The predefined warp style, - an \c #AIWarpStyle value. - @param #kAIEnvelopeBend For warp type: Bend amount, a percentage - value in the range [-100..100] - @param #kAIEnvelopeHorizDistort For warp type: Horizontal distortion - amount, a percentage value in the range [-100..100] - @param #kAIEnvelopeVertDistort For warp type: Vertical distortion - amount, a percentage value in the range [-100..100] - @param #kAIEnvelopeRotate90 For warp type: 0 to apply horizontally, - 1 to apply bend vertically. - */ -#define kAIEnvelopeMakeAction "ai_plugin_envelope_make" -/** Parameter to \c #kAIEnvelopeMakeAction. How to make an envelope from selected objects on the artboard. - \li Make with Warp: \c kAIEnvelopeActionTypeWarp - \li Make with Mesh: \c kAIEnvelopeActionTypeMesh - \li Make with Top Object: \c kAIEnvelopeActionTypeTopObject - */ -const ActionParamKeyID kAIEnvelopeMakeType = 'type'; // enum -/** Parameter to \c #kAIEnvelopeMakeAction, for mesh type: Number of rows in mesh. */ -const ActionParamKeyID kAIEnvelopeNumRows = 'rows'; // integer -/** Parameter to \c #kAIEnvelopeMakeAction, for mesh type: Number of columns in mesh. */ -const ActionParamKeyID kAIEnvelopeNumCols = 'cols'; // integer -/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: Warp style, see \c #AIWarpStyle in \c AIEnvelope.h */ -const ActionParamKeyID kAIEnvelopeWarpStyle = 'warp'; // enum -/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: Bend amount, a percentage value in the range - [-100..100]. */ -const ActionParamKeyID kAIEnvelopeBend = 'bend'; // unit real -/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: Horizontal distortion amount, a percentage value - in the range [-100..100]. */ -const ActionParamKeyID kAIEnvelopeHorizDistort = 'horz'; // unit real -/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: Vertical distortion amount, a percentage value - in the range [-100..100]. */ -const ActionParamKeyID kAIEnvelopeVertDistort = 'vert'; // unit real -/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: 0 to apply horizontally, 1 to apply bend vertically. */ -const ActionParamKeyID kAIEnvelopeRotate90 = 'rot.'; // enum - -//------------------------------------------------------------------------------ - -/** @ingroup Actions - Resets the selected envelopes on the artboard. - @param #kAIEnvelopeResetType How to reset the envelope: - \li Reset with Warp: \c #kAIEnvelopeActionTypeWarp - \li Reset with Mesh: \c #kAIEnvelopeActionTypeMesh - - @param #kAIEnvelopeMaintainShape For mesh type: When true, maintain - the envelope shape. - @note Additional parameters are the same as for \c #kAIEnvelopeMakeAction - */ -#define kAIEnvelopeResetAction "ai_plugin_envelope_reset" -/** Parameter to \c #kAIEnvelopeResetAction. How to reset the envelope: - \li Reset with Warp: \c #kAIEnvelopeActionTypeWarp - \li Reset with Mesh: \c #kAIEnvelopeActionTypeMesh - */ -const ActionParamKeyID kAIEnvelopeResetType = 'type'; // enum -/** Parameter to \c #kAIEnvelopeResetAction, for mesh type: When true, maintain the envelope shape. */ -const ActionParamKeyID kAIEnvelopeMaintainShape = 'shap'; // bool -// The following keys are reused from the kAIEnvelopeMakeAction action and are already defined -//const ActionParamKeyID kAIEnvelopeNumRows = 'rows'; // integer -//const ActionParamKeyID kAIEnvelopeNumCols = 'cols'; // integer -//const ActionParamKeyID kAIEnvelopeWarpStyle = 'warp'; // enum -//const ActionParamKeyID kAIEnvelopeBend = 'bend'; // unit real -//const ActionParamKeyID kAIEnvelopeHorizDistort = 'horz'; // unit real -//const ActionParamKeyID kAIEnvelopeVertDistort = 'vert'; // unit real -//const ActionParamKeyID kAIEnvelopeRotate90 = 'rot.'; // enum - - -#endif // _AIENVELOPEACTION_H_ +#ifndef _AIENVELOPEACTION_H_ +#define _AIENVELOPEACTION_H_ + +/* + * Name: AIEnvelopeAction.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Actions for envelopes. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2001-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + +// Action menu identifiers; stored as \c #actionTypeEnum values when recorded +/** Release menu item */ +#define kAIEnvelopeActionMenuRelease 0 +/** Options menu item */ +#define kAIEnvelopeActionMenuOptions 1 +/** Expand menu item */ +#define kAIEnvelopeActionMenuExpand 2 +/** Toggle menu item */ +#define kAIEnvelopeActionMenuToggle 3 + +// Action 'type' identifiers; stored as \c #actionTypeEnum values when recorded +/** Warp operation */ +#define kAIEnvelopeActionTypeWarp 0 +/** Mesh operation */ +#define kAIEnvelopeActionTypeMesh 1 +/** Top-object operation */ +#define kAIEnvelopeActionTypeTopObject 2 + +//------------------------------------------------------------------------------ + +/** @ingroup Actions + Runs operations in the Envelope submenu of the Action menu + @param #kAIEnvelopeMenuItem The menu item to run. + \li Release: \c kAIEnvelopeActionMenuRelease, replace the envelope with + art objects for the contents (in their original state) and the mesh. + \li Options: \c kAIEnvelopeActionMenuOptions, select distortion parameters. + \li Expand: \c kAIEnvelopeActionMenuExpand, replace the envelope with the + art objects for the contents, in their distorted state. + \li Edit Contents/Envelope: \c kAIEnvelopeActionMenuToggle, toggle between + editing the contained art and editing the shape of a warp or mesh. + + @param #kAIEnvelopeAntiAliasRaster Options parameter. When true, + anti-alias is used to smooth rasters that are distorted in envelopes. + @param #kAIEnvelopePreserveRasterShape Options parameter. How to + preserve raster shapes when they are distorted by non-rectangular + envelopes. + \li When true, apply an alpha channel (transparency) to the raster + \li When false, use a clipping mask on the raster. + + @param #kAIEnvelopeFidelity Options parameter. The fidelity value controls + how closely the deformed object fits into the envelope region. + Higher values add more points to the distorted paths, and take + longerto calculate. + An integer in the range [0..100] + @param #kAIEnvelopeDistortAppearance Options parameter. When true, + distort the appearance of an object (such as applied effects + or styles) and not just the object's underlying geometry. The + appearance properties are expanded separately. + When false, the appearance is applied after the envelope + distorts the underlying geometry. + @param #kAIEnvelopeDistortPatterns Options parameter. When true, + distort pattern fill, which is expanded separately. + @param #kAIEnvelopeDistortGradients Options parameter. When true, + distort gradient fill, which is expanded separately. + */ +#define kAIEnvelopeMenuAction "ai_plugin_envelope" +/** Parameter to \c #kAIEnvelopeMenuAction. The menu item to run. + \li Release: \c kAIEnvelopeActionMenuRelease, replace the envelope with + art objects for the contents (in their original state) and the mesh. + \li Options: \c kAIEnvelopeActionMenuOptions, select distortion parameters. + \li Expand: \c kAIEnvelopeActionMenuExpand, replace the envelope with the + art objects for the contents, in their distorted state. + \li Edit Contents/Envelope: \c kAIEnvelopeActionMenuToggle, toggle between + editing the contained art and editing the shape of a warp or mesh. + */ +const ActionParamKeyID kAIEnvelopeMenuItem = 'menu'; // enum +/** Options parameter to \c #kAIEnvelopeMenuAction. When true, anti-alias is used to smooth + rasters that are distorted in envelopes. */ +const ActionParamKeyID kAIEnvelopeAntiAliasRaster = 'aars'; // bool +/** Options parameter. How to preserve raster shapes when they are + distorted by non-rectangular envelopes. Can be 0 or 1. + \li When 0, use a clipping mask on the raster. + \li When 1, apply an alpha channel (transparency) to the raster. + */ +const ActionParamKeyID kAIEnvelopePreserveRasterShape = 'alph'; // enum +/** Options parameter to \c #kAIEnvelopeMenuAction. The fidelity value controls how closely the + deformed object fits into the envelope region. + Higher values add more points to the distorted paths, and take + longerto calculate. An integer in the range [0..100] */ +const ActionParamKeyID kAIEnvelopeFidelity = 'fidt'; // integer +/** Options parameter to \c #kAIEnvelopeMenuAction. When true, expand and distort the appearance of an object + (such as applied effects or styles) and not just the object's + underlying geometry. + When false, the appearance is applied after the envelope + distorts the underlying geometry.*/ +const ActionParamKeyID kAIEnvelopeDistortAppearance = 'app.'; // bool +/** Options parameter to \c #kAIEnvelopeMenuAction. When true,expand and distort pattern fill. */ +const ActionParamKeyID kAIEnvelopeDistortPatterns = 'patt'; // bool +/** Options parameter to \c #kAIEnvelopeMenuAction. When true, expand and distort gradient fill. */ +const ActionParamKeyID kAIEnvelopeDistortGradients = 'grad'; // bool + +//------------------------------------------------------------------------------ + +/** @ingroup Actions + Makes an envelope from the selected objects on the artboard. + @param #kAIEnvelopeMakeType How to make an envelope from selected + objects on the artboard. + \li Make with Warp: \c kAIEnvelopeActionTypeWarp + \li Make with Mesh: \c kAIEnvelopeActionTypeMesh + \li Make with Top Object: \c kAIEnvelopeActionTypeTopObject + + @param #kAIEnvelopeNumRows For mesh type: Number of rows in mesh. + @param #kAIEnvelopeNumCols For mesh type: Number of columns in mesh. + @param #kAIEnvelopeWarpStyle For warp type: The predefined warp style, + an \c #AIWarpStyle value. + @param #kAIEnvelopeBend For warp type: Bend amount, a percentage + value in the range [-100..100] + @param #kAIEnvelopeHorizDistort For warp type: Horizontal distortion + amount, a percentage value in the range [-100..100] + @param #kAIEnvelopeVertDistort For warp type: Vertical distortion + amount, a percentage value in the range [-100..100] + @param #kAIEnvelopeRotate90 For warp type: 0 to apply horizontally, + 1 to apply bend vertically. + */ +#define kAIEnvelopeMakeAction "ai_plugin_envelope_make" +/** Parameter to \c #kAIEnvelopeMakeAction. How to make an envelope from selected objects on the artboard. + \li Make with Warp: \c kAIEnvelopeActionTypeWarp + \li Make with Mesh: \c kAIEnvelopeActionTypeMesh + \li Make with Top Object: \c kAIEnvelopeActionTypeTopObject + */ +const ActionParamKeyID kAIEnvelopeMakeType = 'type'; // enum +/** Parameter to \c #kAIEnvelopeMakeAction, for mesh type: Number of rows in mesh. */ +const ActionParamKeyID kAIEnvelopeNumRows = 'rows'; // integer +/** Parameter to \c #kAIEnvelopeMakeAction, for mesh type: Number of columns in mesh. */ +const ActionParamKeyID kAIEnvelopeNumCols = 'cols'; // integer +/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: Warp style, see \c #AIWarpStyle in \c AIEnvelope.h */ +const ActionParamKeyID kAIEnvelopeWarpStyle = 'warp'; // enum +/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: Bend amount, a percentage value in the range + [-100..100]. */ +const ActionParamKeyID kAIEnvelopeBend = 'bend'; // unit real +/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: Horizontal distortion amount, a percentage value + in the range [-100..100]. */ +const ActionParamKeyID kAIEnvelopeHorizDistort = 'horz'; // unit real +/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: Vertical distortion amount, a percentage value + in the range [-100..100]. */ +const ActionParamKeyID kAIEnvelopeVertDistort = 'vert'; // unit real +/** Parameter to \c #kAIEnvelopeMakeAction, for warp type: 0 to apply horizontally, 1 to apply bend vertically. */ +const ActionParamKeyID kAIEnvelopeRotate90 = 'rot.'; // enum + +//------------------------------------------------------------------------------ + +/** @ingroup Actions + Resets the selected envelopes on the artboard. + @param #kAIEnvelopeResetType How to reset the envelope: + \li Reset with Warp: \c #kAIEnvelopeActionTypeWarp + \li Reset with Mesh: \c #kAIEnvelopeActionTypeMesh + + @param #kAIEnvelopeMaintainShape For mesh type: When true, maintain + the envelope shape. + @note Additional parameters are the same as for \c #kAIEnvelopeMakeAction + */ +#define kAIEnvelopeResetAction "ai_plugin_envelope_reset" +/** Parameter to \c #kAIEnvelopeResetAction. How to reset the envelope: + \li Reset with Warp: \c #kAIEnvelopeActionTypeWarp + \li Reset with Mesh: \c #kAIEnvelopeActionTypeMesh + */ +const ActionParamKeyID kAIEnvelopeResetType = 'type'; // enum +/** Parameter to \c #kAIEnvelopeResetAction, for mesh type: When true, maintain the envelope shape. */ +const ActionParamKeyID kAIEnvelopeMaintainShape = 'shap'; // bool +// The following keys are reused from the kAIEnvelopeMakeAction action and are already defined +//const ActionParamKeyID kAIEnvelopeNumRows = 'rows'; // integer +//const ActionParamKeyID kAIEnvelopeNumCols = 'cols'; // integer +//const ActionParamKeyID kAIEnvelopeWarpStyle = 'warp'; // enum +//const ActionParamKeyID kAIEnvelopeBend = 'bend'; // unit real +//const ActionParamKeyID kAIEnvelopeHorizDistort = 'horz'; // unit real +//const ActionParamKeyID kAIEnvelopeVertDistort = 'vert'; // unit real +//const ActionParamKeyID kAIEnvelopeRotate90 = 'rot.'; // enum + + +#endif // _AIENVELOPEACTION_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AILivePaintAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AILivePaintAction.h index b955b4d..761ad7b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AILivePaintAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AILivePaintAction.h @@ -1,59 +1,59 @@ -#ifndef _AILIVEPAINTACTION_H_ -#define _AILIVEPAINTACTION_H_ - -/* - * Name: AILivePaintAction.h - * Purpose: Adobe Illustrator 12.0 Actions for Live Paint objects. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2005-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - -/** Action > LivePaint command identifier, "Make" */ -#define kPlanarActionMake 1 -/** Action > LivePaint command identifier, "Expand" */ -#define kPlanarActionRelease 2 -/** Action > LivePaint command identifier, "Release" */ -#define kPlanarActionExpand 3 -/** Action > LivePaint command identifier, "Gap Options" */ -#define kPlanarActionOptions 4 - - -/** @ingroup Actions - Runs an operation from a Live Paint submenu - @param #kAILivePaintMenuItem The menu item to run, one of: -
\c #kPlanarActionMake "Make" -
\c #kPlanarActionRelease "Release" -
\c #kPlanarActionExpand "Expand" -
\c #kPlanarActionOptions "Gap Options" - @param #kAILivePaintGapDetect When item is "Gap Options", whether to - turn on gap detection. - @param #kAILivePaintGapSize When item is "Gap Options", the point size of - gaps to tolerate. - @param #kAILivePaintCloseGaps When item is "Gap Options", whether to - close gaps with real paths. - */ -#define kAILivePaintMenuAction "ai_plugin_planetx" - -/** Parameter to \c #kAILivePaintMenuAction. The menu item to run. */ -const ActionParamKeyID kAILivePaintMenuItem = 'menu'; // enum -/** Parameter to \c #kAILivePaintMenuAction. Whether to turn on gap detection.*/ -const ActionParamKeyID kAILivePaintGapDetect = 'gdct'; // bool -/** Parameter to \c #kAILivePaintMenuAction. The point size of gaps to tolerate.*/ -const ActionParamKeyID kAILivePaintGapSize = 'gsiz'; // unit real -/** Parameter to \c #kAILivePaintMenuAction. Whether to close gaps with real paths. */ -const ActionParamKeyID kAILivePaintCloseGaps = 'gexp'; // bool - -#endif // _AILIVEPAINTACTION_H_ +#ifndef _AILIVEPAINTACTION_H_ +#define _AILIVEPAINTACTION_H_ + +/* + * Name: AILivePaintAction.h + * Purpose: Adobe Illustrator 12.0 Actions for Live Paint objects. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2005-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + +/** Action > LivePaint command identifier, "Make" */ +#define kPlanarActionMake 1 +/** Action > LivePaint command identifier, "Expand" */ +#define kPlanarActionRelease 2 +/** Action > LivePaint command identifier, "Release" */ +#define kPlanarActionExpand 3 +/** Action > LivePaint command identifier, "Gap Options" */ +#define kPlanarActionOptions 4 + + +/** @ingroup Actions + Runs an operation from a Live Paint submenu + @param #kAILivePaintMenuItem The menu item to run, one of: +
\c #kPlanarActionMake "Make" +
\c #kPlanarActionRelease "Release" +
\c #kPlanarActionExpand "Expand" +
\c #kPlanarActionOptions "Gap Options" + @param #kAILivePaintGapDetect When item is "Gap Options", whether to + turn on gap detection. + @param #kAILivePaintGapSize When item is "Gap Options", the point size of + gaps to tolerate. + @param #kAILivePaintCloseGaps When item is "Gap Options", whether to + close gaps with real paths. + */ +#define kAILivePaintMenuAction "ai_plugin_planetx" + +/** Parameter to \c #kAILivePaintMenuAction. The menu item to run. */ +const ActionParamKeyID kAILivePaintMenuItem = 'menu'; // enum +/** Parameter to \c #kAILivePaintMenuAction. Whether to turn on gap detection.*/ +const ActionParamKeyID kAILivePaintGapDetect = 'gdct'; // bool +/** Parameter to \c #kAILivePaintMenuAction. The point size of gaps to tolerate.*/ +const ActionParamKeyID kAILivePaintGapSize = 'gsiz'; // unit real +/** Parameter to \c #kAILivePaintMenuAction. Whether to close gaps with real paths. */ +const ActionParamKeyID kAILivePaintCloseGaps = 'gexp'; // bool + +#endif // _AILIVEPAINTACTION_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AINativeAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AINativeAction.h index b75ea58..ae011ee 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AINativeAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AINativeAction.h @@ -1,181 +1,175 @@ -#ifndef _AINATIVEACTION_H_ -#define _AINATIVEACTION_H_ - -/* - * Name: AINativeAction.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Native File Format Action Parameters. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -// ----------------------------------------------------------------------------- -// Types. -// ----------------------------------------------------------------------------- - -/** Dictionary key values for \c #kAINativeScriptKey and - \c #kAIEPSScriptKey. */ -typedef enum _AIFileFormatScriptCompatibility { - kAIFileFormatScriptCompatibleEnglish = 0, - kAIFileFormatScriptCompatibleCJK -} AIFileFormatScriptCompatibility; - -/** Dictionary key values for \c #kAINativeFlatteningOptionKey - and \c #kAIEPSFlatteningOptionKey. */ -typedef enum _AIFileFormatFlattening { - kAIFileFormatFlatteningPreservePaths = 0, - kAIFileFormatFlatteningPreserveAppearance = 1, - kAIFileFormatFlatteningPreserveAppearanceAndOverprints = 2 -} AIFileFormatFlattening; - -/** Dictionary key values for \c #kAIEPSFormatKey. */ -typedef enum _AIEPSFilePreview { - kAIEPSFilePreviewNone = 1, - kAIEPSFilePreviewBWPICT, - kAIEPSFilePreviewColorPICT, - kAIEPSFilePreviewBWTIFF, - kAIEPSFilePreviewColorTIFF, - kAIEPSFilePreviewSimpleColor -} AIEPSFilePreview; - -/** Dictionary key values for \c #kAIEPSOverprintsKey. */ -typedef enum _AIEPSOverprints { - kAIEPSFileOverprints_Preserve = 1, - kAIEPSFileOverprints_Discard, - kAIEPSFileOverprints_Simulate -} AIEPSOverprints; - - -/** File format for saving as a native file in \c #kAISaveDocumentAsAction. */ -#define kAINativeFileFormat "Adobe Illustrator Any Format Writer" -/** File extension for saving as a native file in \c #kAISaveDocumentAsAction. */ -#define kAINativeFileFormatExtension "ai" - -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Integer: the file format version to use when saving. an \c #AIVersion value. */ -const ActionParamKeyID kAINativeVersionKey = 'crtr'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Integer, language script compatibility of the saved file, an - \c #AIFileFormatScriptCompatibility value. */ -const ActionParamKeyID kAINativeScriptKey = 'ext.'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Integer, whether to embed any linked images when saving. Non-zero causes - images to be embedded. zero does not change the embedded/linked status of images. */ -const ActionParamKeyID kAINativeIncludeImagesKey = 'incl'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Integer: whether to embed all fonts. Non-zero causes all fonts to be embedded.*/ -const ActionParamKeyID kAINativeEmbedAllFontsKey = 'embd'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Boolean: when true, fonts using less than the percentage of characters - specified by \c #kAINativeSubsetFontsRatioKey are subsetted.*/ -const ActionParamKeyID kAINativeSubsetFontsBelowKey = 'sbst'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Integer, [0..100]: Threshold percentage of character usage for font subsetting. - See \c #kAINativeSubsetFontsBelowKey. */ -const ActionParamKeyID kAINativeSubsetFontsRatioKey = 'rato'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Integer: non-zero value causes the document color profile to be embedded in the file.*/ -const ActionParamKeyID kAINativeEmbedProfileKey = 'prfl'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Integer: whether to flatten layers when saving a document with transparency - to a version that does not support transparency. An \c #AIFileFormatFlattening value. */ -const ActionParamKeyID kAINativeFlatteningOptionKey = 'flat'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Boolean: when true, the file contents are compressed, when false they are not. */ -const ActionParamKeyID kAINativeCompressionKey = 'cmpr'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - Boolean: when true, a PDF rendition of the document is saved together with - native roundtrip information. When false, only roundtrip information is saved. */ -const ActionParamKeyID kAINativePDFCompatibilityKey = 'pdf '; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - When true, export multiple artboards specified in \c # kAINativeSaveAllKey or - \c #kAINativeSaveRangeKey. When false,export all the artboards.*/ - const ActionParamKeyID kAINativeSaveMultipleArtboardsKey = 'smab'; // boolean -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - When true, export all artboards. when false,export the artbaords in \c #kAINativeSaveRangeKey specified */ - const ActionParamKeyID kAINativeSaveAllKey = 'sall'; // boolean -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. - The artboards range string. Optional when \c # kAINativeSaveAllKey is true or - \c #kAINativeSaveMultipleArtboardsKey is false*/ - const ActionParamKeyID kAINativeSaveRangeKey = 'sran'; // string - - - - -//** File format for saving as an EPS file in \c #kAISaveDocumentAsAction. */ -#define kAIEPSFileFormat "Adobe Illustrator EPSF" -/** File extension for saving as an EPS file in \c #kAISaveDocumentAsAction. */ -#define kAIEPSFileFormatExtension "eps" - -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - The file format for EPS is \c #kAIEPSFileFormat. */ -const ActionParamKeyID kAIEPSFormatKey = 'wfmt'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Integer: the file format version to use when saving. an \c #AIVersion value. */ -const ActionParamKeyID kAIEPSVersionKey = 'crtr'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Integer, language script compatibility of the saved file, an - \c #AIFileFormatScriptCompatibility value. */ -const ActionParamKeyID kAIEPSScriptKey = 'ext.'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Boolean: when true, embed linked images and EPS files when saving. - When false, do not change the embedded/linked status of images. */ -const ActionParamKeyID kAIEPSIncludePlacedKey = 'iplc'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Boolean: when true, include a thumbnail image of the artwork that - is displayed in the File Open dialog in Windows. When false, do not include - the thumbnail image. */ -const ActionParamKeyID kAIEPSIncludeThumbnailKey = 'ithm'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Boolean: when true, rasterize gradients in the document or convert them to the type - of gradients supported by the target device. It is equivalent to selecting the - "Compatible Gradient and Gradient Mesh Printing" check box in the EPS Save Options - or Print dialog. */ -const ActionParamKeyID kAIEPSCompatibleGradientPrintKey = 'cgpt'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Integer: the format for writing raster image data in the EPS. - When 0, use ASCII hex, when 1, use binary. Applies only when the - version is AI8 or earlier.*/ -const ActionParamKeyID kAIEPSImageFormatKey = 'ifmt'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Boolean: when true, convert RGB values to CMYK in the EPS, - using the current color settings. When false, send RGB values - to the printer unconverted. */ -const ActionParamKeyID kAIEPSCMYKPostScriptKey = 'cmyk'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Boolean: when true, include CJK fonts in the PostScript stream. - When false, do not include CJK fonts (they must be present on - the printer to avoid substitution). */ -const ActionParamKeyID kAIEPSIncludeCJKFontsKey = 'icjk'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Integer: The PostScript level with which the EPS must be compatible. 1, 2 or 3. */ -const ActionParamKeyID kAIEPSPostScriptLevelKey = 'pslv'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Integer: whether to flatten layers when saving a document with transparency - to a version that does not support transparency. An \c #AIFileFormatFlattening value. */ -const ActionParamKeyID kAIEPSFlatteningOptionKey = 'flat'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Boolean: when true, Illustrator includes its own halftone screens in the - generated EPS. Applies only to AI8 and earlier. */ -const ActionParamKeyID kAIEPSUseDefaultScreensKey = 'dfsc'; -/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. - Integer: how to handle overprints in the EPS file. An \c #AIEPSOverprints value. */ -const ActionParamKeyID kAIEPSOverprintsKey = 'eopt'; - - -#endif +#pragma once + +/* + * Name: AINativeAction.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Native File Format Action Parameters. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "AIActionManager.h" + +// ----------------------------------------------------------------------------- +// Types. +// ----------------------------------------------------------------------------- + +/** Dictionary key values for \c #kAINativeScriptKey and + \c #kAIEPSScriptKey. */ +typedef enum _AIFileFormatScriptCompatibility { + kAIFileFormatScriptCompatibleEnglish = 0, + kAIFileFormatScriptCompatibleCJK +} AIFileFormatScriptCompatibility; + +/** Dictionary key values for \c #kAINativeFlatteningOptionKey + and \c #kAIEPSFlatteningOptionKey. */ +typedef enum _AIFileFormatFlattening { + kAIFileFormatFlatteningPreservePaths = 0, + kAIFileFormatFlatteningPreserveAppearance = 1, + kAIFileFormatFlatteningPreserveAppearanceAndOverprints = 2 +} AIFileFormatFlattening; + +/** Dictionary key values for \c #kAIEPSFormatKey. */ +typedef enum _AIEPSFilePreview { + kAIEPSFilePreviewNone = 1, + kAIEPSFilePreviewBWPICT, + kAIEPSFilePreviewColorPICT, + kAIEPSFilePreviewBWTIFF, + kAIEPSFilePreviewColorTIFF, + kAIEPSFilePreviewSimpleColor +} AIEPSFilePreview; + +/** Dictionary key values for \c #kAIEPSOverprintsKey. */ +typedef enum _AIEPSOverprints { + kAIEPSFileOverprints_Preserve = 1, + kAIEPSFileOverprints_Discard, + kAIEPSFileOverprints_Simulate +} AIEPSOverprints; + + +/** File format for saving as a native file in \c #kAISaveDocumentAsAction. */ +#define kAINativeFileFormat "Adobe Illustrator Any Format Writer" +/** File extension for saving as a native file in \c #kAISaveDocumentAsAction. */ +#define kAINativeFileFormatExtension "ai" + +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Integer: the file format version to use when saving. an \c #AIVersion value. */ +const ActionParamKeyID kAINativeVersionKey = 'crtr'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Integer, language script compatibility of the saved file, an + \c #AIFileFormatScriptCompatibility value. */ +const ActionParamKeyID kAINativeScriptKey = 'ext.'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Integer, whether to embed any linked images when saving. Non-zero causes + images to be embedded. zero does not change the embedded/linked status of images. */ +const ActionParamKeyID kAINativeIncludeImagesKey = 'incl'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Integer: whether to embed all fonts. Non-zero causes all fonts to be embedded.*/ +const ActionParamKeyID kAINativeEmbedAllFontsKey = 'embd'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Boolean: when true, fonts using less than the percentage of characters + specified by \c #kAINativeSubsetFontsRatioKey are subsetted.*/ +const ActionParamKeyID kAINativeSubsetFontsBelowKey = 'sbst'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Integer, [0..100]: Threshold percentage of character usage for font subsetting. + See \c #kAINativeSubsetFontsBelowKey. */ +const ActionParamKeyID kAINativeSubsetFontsRatioKey = 'rato'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Integer: non-zero value causes the document color profile to be embedded in the file.*/ +const ActionParamKeyID kAINativeEmbedProfileKey = 'prfl'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Integer: whether to flatten layers when saving a document with transparency + to a version that does not support transparency. An \c #AIFileFormatFlattening value. */ +const ActionParamKeyID kAINativeFlatteningOptionKey = 'flat'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Boolean: when true, the file contents are compressed, when false they are not. */ +const ActionParamKeyID kAINativeCompressionKey = 'cmpr'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + Boolean: when true, a PDF rendition of the document is saved together with + native roundtrip information. When false, only roundtrip information is saved. */ +const ActionParamKeyID kAINativePDFCompatibilityKey = 'pdf '; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + When true, export multiple artboards specified in \c # kAINativeSaveAllKey or + \c #kAINativeSaveRangeKey. When false,export all the artboards.*/ + const ActionParamKeyID kAINativeSaveMultipleArtboardsKey = 'smab'; // boolean +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + When true, export all artboards. when false,export the artbaords in \c #kAINativeSaveRangeKey specified */ + const ActionParamKeyID kAINativeSaveAllKey = 'sall'; // boolean +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as a native file. + The artboards range string. Optional when \c # kAINativeSaveAllKey is true or + \c #kAINativeSaveMultipleArtboardsKey is false*/ + const ActionParamKeyID kAINativeSaveRangeKey = 'sran'; // string + + + + +//** File format for saving as an EPS file in \c #kAISaveDocumentAsAction. */ +#define kAIEPSFileFormat "Adobe Illustrator EPSF" +/** File extension for saving as an EPS file in \c #kAISaveDocumentAsAction. */ +#define kAIEPSFileFormatExtension "eps" + +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + The file format for EPS is \c #kAIEPSFileFormat. */ +const ActionParamKeyID kAIEPSFormatKey = 'wfmt'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Integer: the file format version to use when saving. an \c #AIVersion value. */ +const ActionParamKeyID kAIEPSVersionKey = 'crtr'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Integer, language script compatibility of the saved file, an + \c #AIFileFormatScriptCompatibility value. */ +const ActionParamKeyID kAIEPSScriptKey = 'ext.'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Boolean: when true, embed linked images and EPS files when saving. + When false, do not change the embedded/linked status of images. */ +const ActionParamKeyID kAIEPSIncludePlacedKey = 'iplc'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Boolean: when true, include a thumbnail image of the artwork that + is displayed in the File Open dialog in Windows. When false, do not include + the thumbnail image. */ +const ActionParamKeyID kAIEPSIncludeThumbnailKey = 'ithm'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Boolean: when true, rasterize gradients in the document or convert them to the type + of gradients supported by the target device. It is equivalent to selecting the + "Compatible Gradient and Gradient Mesh Printing" check box in the EPS Save Options + or Print dialog. */ +const ActionParamKeyID kAIEPSCompatibleGradientPrintKey = 'cgpt'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Integer: the format for writing raster image data in the EPS. + When 0, use ASCII hex, when 1, use binary. Applies only when the + version is AI8 or earlier.*/ +const ActionParamKeyID kAIEPSImageFormatKey = 'ifmt'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Boolean: when true, convert RGB values to CMYK in the EPS, + using the current color settings. When false, send RGB values + to the printer unconverted. */ +const ActionParamKeyID kAIEPSCMYKPostScriptKey = 'cmyk'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Boolean: when true, include CJK fonts in the PostScript stream. + When false, do not include CJK fonts (they must be present on + the printer to avoid substitution). */ +const ActionParamKeyID kAIEPSIncludeCJKFontsKey = 'icjk'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Integer: The PostScript level with which the EPS must be compatible. 1, 2 or 3. */ +const ActionParamKeyID kAIEPSPostScriptLevelKey = 'pslv'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Integer: whether to flatten layers when saving a document with transparency + to a version that does not support transparency. An \c #AIFileFormatFlattening value. */ +const ActionParamKeyID kAIEPSFlatteningOptionKey = 'flat'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Boolean: when true, Illustrator includes its own halftone screens in the + generated EPS. Applies only to AI8 and earlier. */ +const ActionParamKeyID kAIEPSUseDefaultScreensKey = 'dfsc'; +/** Additional parameter for \c #kAISaveDocumentAsAction when saving as an EPS file. + Integer: how to handle overprints in the EPS file. An \c #AIEPSOverprints value. */ +const ActionParamKeyID kAIEPSOverprintsKey = 'eopt'; diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIObjectAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIObjectAction.h index 1000940..4ed6cc1 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIObjectAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIObjectAction.h @@ -1,351 +1,351 @@ -#ifndef _AICOREOBJECTACTION_H_ -#define _AICOREOBJECTACTION_H_ - -/* - * Name: AICoreObjectAction.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Actions defined in the core. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - -/** @ingroup Actions - Invokes a menu command - @param #kAIDoMenuCommandIdKey The command identifier. - */ -#define kAIDoMenuCommandAction "adobe_commandManager" -/** Parameter to \c #kAIDoMenuCommandAction. The command identifier of the menu item to run. */ -const ActionParamKeyID kAIDoMenuCommandIdKey = 'cmid'; // integer - -/** @ingroup Actions - Translates the position of the selected objects. - @param #kAITranslateSelectionHorizontalKey The horizontal offset in points. - @param #kAITranslateSelectionVerticalKey The vertical offset in points. - @param #kAITranslateSelectionCopyKey When true, translate a copy of the objects. - @param #kAITranslateSelectionObjectsKey When true, translate the object geometry. - @param #kAITranslateSelectionPatternsKey When true, translate patterns. - */ -#define kAITranslateSelectionAction "adobe_move" -/** Parameter to \c #kAITranslateSelectionAction. The horizontal offset in points. */ -const ActionParamKeyID kAITranslateSelectionHorizontalKey = 'hozn'; // real -/** Parameter to \c #kAITranslateSelectionAction. The vertical offset in points. */ -const ActionParamKeyID kAITranslateSelectionVerticalKey = 'vtcl'; // real -/** Parameter to \c #kAITranslateSelectionAction. When true, translate a copy of the objects. */ -const ActionParamKeyID kAITranslateSelectionCopyKey = 'copy'; // bool -/** Parameter to \c #kAITranslateSelectionAction. When true, translate the object geometry. */ -const ActionParamKeyID kAITranslateSelectionObjectsKey = 'objt'; // bool -/** Parameter to \c #kAITranslateSelectionAction. When true, translate patterns. */ -const ActionParamKeyID kAITranslateSelectionPatternsKey = 'patn'; // bool - -/** @ingroup Actions - Rotates the selected objects. - @param #kAIRotateSelectionAngleKey The angle of rotation in degrees. - @param #kAIRotateSelectionAboutDXKey The horizontal offset of the origin with - respect to the center of the selection. - @param #kAIRotateSelectionAboutDYKey The vertical offset of the origin with - respect to the center of the selection. - @param #kAIRotateSelectionCopyKey When true, rotate a copy of the objects. - @param #kAIRotateSelectionObjectsKey When true, rotate the object geometry. - @param #kAIRotateSelectionPatternsKey When true, rotate patterns. - */ -#define kAIRotateSelectionAction "adobe_rotate" -/** Parameter to \c #kAIRotateSelectionAction. The angle of rotation in degrees. */ -const ActionParamKeyID kAIRotateSelectionAngleKey = 'angl'; // real -/** Parameter to \c #kAIRotateSelectionAction. The horizontal offset of the origin with - respect to the center of the selection. */ -const ActionParamKeyID kAIRotateSelectionAboutDXKey = 'detX'; // real -/** Parameter to \c #kAIRotateSelectionAction. The vertical offset of the origin with - respect to the center of the selection. */ -const ActionParamKeyID kAIRotateSelectionAboutDYKey = 'detY'; // real -/** Parameter to \c #kAIRotateSelectionAction. When true, rotate a copy of the objects. */ -const ActionParamKeyID kAIRotateSelectionCopyKey = 'copy'; // bool -/** Parameter to \c #kAIRotateSelectionAction. When true, rotate the object geometry. */ -const ActionParamKeyID kAIRotateSelectionObjectsKey = 'objt'; // bool -/** Parameter to \c #kAIRotateSelectionAction. When true, rotate patterns. */ -const ActionParamKeyID kAIRotateSelectionPatternsKey = 'patn'; // bool - - -/** @ingroup Actions - Scales the selected objects. - @param #kAIScaleSelectionUniformKey When true, scale is uniform. - @param #kAIScaleSelectionLinesKey When true, scale stroke weights. - @param #kAIScaleSelectionUniformScaleKey The scale factor for uniform scaling. - @param #kAIScaleSelectionHorizontalKey The horizontal scale factor for non-uniform scaling. - @param #kAIScaleSelectionVerticalKey The vertical scale factor for non-uniform scaling. - @param #kAIScaleSelectionAboutDXKey The horizontal offset of the origin with - respect to the center of the selection. - @param #kAIScaleSelectionAboutDYKey The vertical offset of the origin with - respect to the center of the selection. - @param #kAIScaleSelectionCopyKey When true, scale a copy of the objects. - @param #kAIScaleSelectionObjectsKey When true, scale the object geometry. - @param #kAIScaleSelectionPatternsKey When true, scale patterns. - */ -#define kAIScaleSelectionAction "adobe_scale" -/** Parameter to \c #kAIScaleSelectionAction. When true, scale is uniform. */ -const ActionParamKeyID kAIScaleSelectionUniformKey = 'unfm'; // bool -/** Parameter to \c #kAIScaleSelectionAction. When true, scale stroke weights. */ -const ActionParamKeyID kAIScaleSelectionLinesKey = 'line'; // bool -/** Parameter to \c #kAIScaleSelectionAction. The scale factor for uniform scaling. */ -const ActionParamKeyID kAIScaleSelectionUniformScaleKey = 'scle'; // real -/** Parameter to \c #kAIScaleSelectionAction. The horizontal scale factor for non-uniform scaling.*/ -const ActionParamKeyID kAIScaleSelectionHorizontalKey = 'hozn'; // real -/** Parameter to \c #kAIScaleSelectionAction. The vertical scale factor for non-uniform scaling. */ -const ActionParamKeyID kAIScaleSelectionVerticalKey = 'vtcl'; // real -/** Parameter to \c #kAIScaleSelectionAction. The horizontal offset of the origin with - respect to the center of the selection.*/ -const ActionParamKeyID kAIScaleSelectionAboutDXKey = 'detX'; // real -/** Parameter to \c #kAIScaleSelectionAction. The vertical offset of the origin with - respect to the center of the selection. */ -const ActionParamKeyID kAIScaleSelectionAboutDYKey = 'detY'; // real -/** Parameter to \c #kAIScaleSelectionAction. When true, scale a copy of the objects. */ -const ActionParamKeyID kAIScaleSelectionCopyKey = 'copy'; // bool -/** Parameter to \c #kAIScaleSelectionAction. When true, scale the object geometry. */ -const ActionParamKeyID kAIScaleSelectionObjectsKey = 'objt'; // bool -/** Parameter to \c #kAIScaleSelectionAction. When true, scale patterns. */ -const ActionParamKeyID kAIScaleSelectionPatternsKey = 'patn'; // bool - - -/** @ingroup Actions - Reflects the selected objects. - @param #kAIReflectSelectionAngleKey The angle of the axis of reflection in degrees. - @param #kAIReflectSelectionAboutDXKey The horizontal offset of the origin with - respect to the center of the selection. - @param #kAIReflectSelectionAboutDYKey The vertical offset of the origin with - respect to the center of the selection. - @param #kAIReflectSelectionCopyKey When true, reflect a copy of the objects. - @param #kAIReflectSelectionObjectsKey When true, reflect the object geometry. - @param #kAIReflectSelectionPatternsKey When true, reflect patterns. - */ -#define kAIReflectSelectionAction "adobe_reflect" -/** Parameter to \c #kAIReflectSelectionAction. The angle of the axis of reflection in degrees. */ -const ActionParamKeyID kAIReflectSelectionAngleKey = 'angl'; // real -/** Parameter to \c #kAIReflectSelectionAction. The horizontal offset of the origin with - respect to the center of the selection. */ -const ActionParamKeyID kAIReflectSelectionAboutDXKey = 'detX'; // real -/** Parameter to \c #kAIReflectSelectionAction. The vertical offset of the origin with - respect to the center of the selection. */ -const ActionParamKeyID kAIReflectSelectionAboutDYKey = 'detY'; // real -/** Parameter to \c #kAIReflectSelectionAction. When true, reflect a copy of the objects. */ -const ActionParamKeyID kAIReflectSelectionCopyKey = 'copy'; // bool -/** Parameter to \c #kAIReflectSelectionAction. When true, reflect the object geometry. */ -const ActionParamKeyID kAIReflectSelectionObjectsKey = 'objt'; // bool -/** Parameter to \c #kAIReflectSelectionAction. When true, reflect patterns. */ -const ActionParamKeyID kAIReflectSelectionPatternsKey = 'patn'; // bool - -/** @ingroup Actions - Reflects the selected objects. - @param #kAIShearSelectionShearAngleKey The amount of shearing in degrees. - @param #kAIShearSelectionAngleKey The angle along which to shear in degrees. - @param #kAIShearSelectionAboutDXKey The horizontal offset of the origin with - respect to the center of the selection. - @param #kAIShearSelectionAboutDYKey The vertical offset of the origin with - respect to the center of the selection. - @param #kAIShearSelectionCopyKey When true, shear a copy of the objects. - @param #kAIShearSelectionObjectsKey When true, shear the object geometry. - @param #kAIShearSelectionPatternsKey When true, shear patterns. - */ -#define kAIShearSelectionAction "adobe_shear" -/** Parameter to \c #kAIShearSelectionAction. The amount of shearing in degrees. */ -const ActionParamKeyID kAIShearSelectionShearAngleKey = 'shag'; // real -/** Parameter to \c #kAIShearSelectionAction. The angle along which to shear in degrees. */ -const ActionParamKeyID kAIShearSelectionAngleKey = 'angl'; // real -/** Parameter to \c #kAIShearSelectionAction. The horizontal offset of the origin with - respect to the center of the selection. */ -const ActionParamKeyID kAIShearSelectionAboutDXKey = 'detX'; // real -/** Parameter to \c #kAIShearSelectionAction. The vertical offset of the origin with - respect to the center of the selection. */ -const ActionParamKeyID kAIShearSelectionAboutDYKey = 'detY'; // real -/** Parameter to \c #kAIShearSelectionAction. When true, shear a copy of the objects. */ -const ActionParamKeyID kAIShearSelectionCopyKey = 'copy'; // bool -/** Parameter to \c #kAIShearSelectionAction. When true, shear the object geometry. */ -const ActionParamKeyID kAIShearSelectionObjectsKey = 'objt'; // bool -/** Parameter to \c #kAIShearSelectionAction. When true, shear patterns.. */ -const ActionParamKeyID kAIShearSelectionPatternsKey = 'patn'; // bool - -/** @ingroup Actions - Repeats the most recent transformation on the selected objects. */ -#define kAITransformSelectionAgainAction "adobe_transformAgain" - - -/** @ingroup Actions - Brings the selected objects to the front of the paint order. */ -#define kAISendSelectionToFrontAction "adobe_sendToFront" -/** @ingroup Actions - Sends the selected objects to the back of the paint order. */ -#define kAISendSelectionToBackAction "adobe_sendToBack" -/** @ingroup Actions - Brings the selected objects forward in the paint order. */ -#define kAISendSelectionForwardAction "adobe_sendForward" -/** @ingroup Actions - Sends the selected objects backward in the paint order. */ -#define kAISendSelectionBackwardAction "adobe_sendBackward" - - -/** @ingroup Actions - Cuts the selected objects. */ -#define kAICutSelectionAction "adobe_cut" -/** @ingroup Actions - Copies the selected objects to the clipboard. */ -#define kAICopySelectionAction "adobe_copy" -/** @ingroup Actions - Clears the selection. */ -#define kAIClearSelectionAction "adobe_clear" - - -/** @ingroup Actions - Pastes objects from the clipboard into the current document. */ -#define kAIPasteClipboardAction "adobe_paste" -/** @ingroup Actions - Pastes objects from the clipboard into the current document at the - front of the paint order. */ -#define kAIPasteClipboardInFrontAction "adobe_pasteInFront" -/** @ingroup Actions - Pastes objects from the clipboard into the current document at the - back of the paint order. */ -#define kAIPasteClipboardInBackAction "adobe_pasteInBack" - - -/** @ingroup Actions - Selects all objects in the current document. */ -#define kAISelectAllAction "adobe_selectAll" -/** @ingroup Actions - Deselects all objects in the current document. */ -#define kAIDeselectAllAction "adobe_deselectAll" - - -/** @ingroup Actions - Groups selected objects. */ -#define kAIGroupSelectionAction "adobe_group" -/** @ingroup Actions - Ungroups selected objects. */ -#define kAIUngroupSelectionAction "adobe_ungroup" - - -/** @ingroup Actions - Locks selected objects. */ -#define kAILockSelectionAction "adobe_lock" -/** @ingroup Actions - Unlocks all objects. */ -#define kAIUnlockAllAction "adobe_unlockAll" - - -/** @ingroup Actions - Hides selected objects. */ -#define kAIHideSelectionAction "adobe_hideSelection" -/** @ingroup Actions - Shows all objects. */ -#define kAIShowAllAction "adobe_showAll" - -/** @ingroup Actions - Removes the currently selected anchor points. */ -#define kAIRemoveAnchorPointsAction "adobe_removeAnchorPoints" - -/** @ingroup Actions - Makes a mask from currently selected objects. */ -#define kAIMakeMaskFromSelectionAction "adobe_makeMask" -/** @ingroup Actions - Releases selected masks. */ -#define kAIReleaseSelectedMasksAction "adobe_releaseMask" -/** @ingroup Actions - Edits selected masks. */ -#define kAIEditSelectedMasksAction "adobe_editMask" - - - -/** @ingroup Actions - Makes a compound object from selected objects. */ -#define kAIMakeCompoundFromSelectionAction "adobe_makeCompound" -/** @ingroup Actions - Releases selected compound objects. */ -#define kAIReleaseSelectedCompoundAction "adobe_releaseMask" - - -/** @ingroup Actions - Makes crop marks from selected objects. */ -#define kAIMakeCropMarksFromSelectionAction "adobe_makeCropMark" -/** @ingroup Actions - Releases crop marks for selected objects. */ -#define kAIReleaseCropMarksAction "adobe_releaseCropMark" - - -/** @ingroup Actions - Shows or hides guides. - @param #kAIShowHideGuidesKey When true, show guides; when false, hide guides. - */ -#define kAIShowHideGuidesAction "adobe_showGuide" -/** Parameter to \c #kAIShowHideGuidesAction. When true, show guides; when false, hide guides. */ -const ActionParamKeyID kAIShowHideGuidesKey = 'show'; // bool - -/** @ingroup Actions - Locks or unlocks guides. - @param #kAIShowHideGuidesKey When true, lock guides; when false, unlock guides. - */ -#define kAILockOrUnlockGuidesAction "adobe_lockGuide" -/** Parameter to \c #kAILockOrUnlockGuidesAction. When true, lock guides; when false, unlock guides. */ -const ActionParamKeyID kAIAILockOrUnlockGuidesKey = 'lock'; // bool - - -/** @ingroup Actions - Makes guides from the currently selected objects. */ -#define kAIMakeGuidesFromSelectionAction "adobe_makeGuide" -/** @ingroup Actions - Releases all guides. */ -#define kAIReleaseAllGuidesAction "adobe_releaseGuide" -/** @ingroup Actions - Deletes all guides. */ -#define kAIDeleteAllGuidesAction "adobe_clearGuide" - - -/** @ingroup Actions - Sets object attributes as defined in Attributes palette. - @param #kAISetObjectAttributesShowCenterKey Sets the show-center state (true/false). - @param #kAISetObjectAttributesReverseDirectionKey Sets the reverse-direction state (true/false). - @param #kAISetObjectAttributesFillRuleKey Sets the fill-rule usage - (0 for non-zero rule, 1 for even-odd rule). - @param #kAISetObjectAttributesResolutionKey Sets the resolution in dots-per-inch (dpi) - @param #kAISetObjectAttributesOverprintFillKey Sets the overprint state for fill (true/false). - @param #kAISetObjectAttributesOverprintStrokeKey Sets the overprint state for strokes (true/false). - @param #kAISetObjectAttributesNoteKey Sets an associated comment string. - @param #kAISetObjectAttributesURLKey Sets an associated URL string. - @param #kAISetObjectAttributesImageMapKey Sets an associated image map type - (0 for none, 1 for rectangle map, 2 for polygonal map). - */ -#define kAISetObjectAttributesAction "adobe_attributePalette" -/** Parameter to \c #kAISetObjectAttributesAction. Sets the show-center state (true/false). */ -const ActionParamKeyID kAISetObjectAttributesShowCenterKey = 'cntr'; // bool -/** Parameter to \c #kAISetObjectAttributesAction. Sets the reverse-direction state (true/false). */ -const ActionParamKeyID kAISetObjectAttributesReverseDirectionKey = 'rvpt'; // bool -/** Parameter to \c #kAISetObjectAttributesAction. Sets the fill-rule usage - (0 for non-zero rule, 1 for even-odd rule). */ -const ActionParamKeyID kAISetObjectAttributesFillRuleKey = 'rule'; // enum -/** Parameter to \c #kAISetObjectAttributesAction. Sets the resolution in dots-per-inch (dpi) */ -const ActionParamKeyID kAISetObjectAttributesResolutionKey = 'rslt'; // real -/** Parameter to \c #kAISetObjectAttributesAction. Sets the overprint state for fill (true/false). */ -const ActionParamKeyID kAISetObjectAttributesOverprintFillKey = 'fill'; // bool -/** Parameter to \c #kAISetObjectAttributesAction. Sets the overprint state for strokes (true/false). */ -const ActionParamKeyID kAISetObjectAttributesOverprintStrokeKey = 'strk'; // bool -/** Parameter to \c #kAISetObjectAttributesAction. Sets an associated comment string. */ -const ActionParamKeyID kAISetObjectAttributesNoteKey = 'note'; // string -/** Parameter to \c #kAISetObjectAttributesAction. Sets an associated URL string. */ -const ActionParamKeyID kAISetObjectAttributesURLKey = 'url.'; // string -/** Parameter to \c #kAISetObjectAttributesAction. Sets an associated image map type - (0 for none, 1 for rectangle map, 2 for polygonal map). */ -const ActionParamKeyID kAISetObjectAttributesImageMapKey = 'imap'; // enum - - -#endif +#ifndef _AICOREOBJECTACTION_H_ +#define _AICOREOBJECTACTION_H_ + +/* + * Name: AICoreObjectAction.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Actions defined in the core. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + +/** @ingroup Actions + Invokes a menu command + @param #kAIDoMenuCommandIdKey The command identifier. + */ +#define kAIDoMenuCommandAction "adobe_commandManager" +/** Parameter to \c #kAIDoMenuCommandAction. The command identifier of the menu item to run. */ +const ActionParamKeyID kAIDoMenuCommandIdKey = 'cmid'; // integer + +/** @ingroup Actions + Translates the position of the selected objects. + @param #kAITranslateSelectionHorizontalKey The horizontal offset in points. + @param #kAITranslateSelectionVerticalKey The vertical offset in points. + @param #kAITranslateSelectionCopyKey When true, translate a copy of the objects. + @param #kAITranslateSelectionObjectsKey When true, translate the object geometry. + @param #kAITranslateSelectionPatternsKey When true, translate patterns. + */ +#define kAITranslateSelectionAction "adobe_move" +/** Parameter to \c #kAITranslateSelectionAction. The horizontal offset in points. */ +const ActionParamKeyID kAITranslateSelectionHorizontalKey = 'hozn'; // real +/** Parameter to \c #kAITranslateSelectionAction. The vertical offset in points. */ +const ActionParamKeyID kAITranslateSelectionVerticalKey = 'vtcl'; // real +/** Parameter to \c #kAITranslateSelectionAction. When true, translate a copy of the objects. */ +const ActionParamKeyID kAITranslateSelectionCopyKey = 'copy'; // bool +/** Parameter to \c #kAITranslateSelectionAction. When true, translate the object geometry. */ +const ActionParamKeyID kAITranslateSelectionObjectsKey = 'objt'; // bool +/** Parameter to \c #kAITranslateSelectionAction. When true, translate patterns. */ +const ActionParamKeyID kAITranslateSelectionPatternsKey = 'patn'; // bool + +/** @ingroup Actions + Rotates the selected objects. + @param #kAIRotateSelectionAngleKey The angle of rotation in degrees. + @param #kAIRotateSelectionAboutDXKey The horizontal offset of the origin with + respect to the center of the selection. + @param #kAIRotateSelectionAboutDYKey The vertical offset of the origin with + respect to the center of the selection. + @param #kAIRotateSelectionCopyKey When true, rotate a copy of the objects. + @param #kAIRotateSelectionObjectsKey When true, rotate the object geometry. + @param #kAIRotateSelectionPatternsKey When true, rotate patterns. + */ +#define kAIRotateSelectionAction "adobe_rotate" +/** Parameter to \c #kAIRotateSelectionAction. The angle of rotation in degrees. */ +const ActionParamKeyID kAIRotateSelectionAngleKey = 'angl'; // real +/** Parameter to \c #kAIRotateSelectionAction. The horizontal offset of the origin with + respect to the center of the selection. */ +const ActionParamKeyID kAIRotateSelectionAboutDXKey = 'detX'; // real +/** Parameter to \c #kAIRotateSelectionAction. The vertical offset of the origin with + respect to the center of the selection. */ +const ActionParamKeyID kAIRotateSelectionAboutDYKey = 'detY'; // real +/** Parameter to \c #kAIRotateSelectionAction. When true, rotate a copy of the objects. */ +const ActionParamKeyID kAIRotateSelectionCopyKey = 'copy'; // bool +/** Parameter to \c #kAIRotateSelectionAction. When true, rotate the object geometry. */ +const ActionParamKeyID kAIRotateSelectionObjectsKey = 'objt'; // bool +/** Parameter to \c #kAIRotateSelectionAction. When true, rotate patterns. */ +const ActionParamKeyID kAIRotateSelectionPatternsKey = 'patn'; // bool + + +/** @ingroup Actions + Scales the selected objects. + @param #kAIScaleSelectionUniformKey When true, scale is uniform. + @param #kAIScaleSelectionLinesKey When true, scale stroke weights. + @param #kAIScaleSelectionUniformScaleKey The scale factor for uniform scaling. + @param #kAIScaleSelectionHorizontalKey The horizontal scale factor for non-uniform scaling. + @param #kAIScaleSelectionVerticalKey The vertical scale factor for non-uniform scaling. + @param #kAIScaleSelectionAboutDXKey The horizontal offset of the origin with + respect to the center of the selection. + @param #kAIScaleSelectionAboutDYKey The vertical offset of the origin with + respect to the center of the selection. + @param #kAIScaleSelectionCopyKey When true, scale a copy of the objects. + @param #kAIScaleSelectionObjectsKey When true, scale the object geometry. + @param #kAIScaleSelectionPatternsKey When true, scale patterns. + */ +#define kAIScaleSelectionAction "adobe_scale" +/** Parameter to \c #kAIScaleSelectionAction. When true, scale is uniform. */ +const ActionParamKeyID kAIScaleSelectionUniformKey = 'unfm'; // bool +/** Parameter to \c #kAIScaleSelectionAction. When true, scale stroke weights. */ +const ActionParamKeyID kAIScaleSelectionLinesKey = 'line'; // bool +/** Parameter to \c #kAIScaleSelectionAction. The scale factor for uniform scaling. */ +const ActionParamKeyID kAIScaleSelectionUniformScaleKey = 'scle'; // real +/** Parameter to \c #kAIScaleSelectionAction. The horizontal scale factor for non-uniform scaling.*/ +const ActionParamKeyID kAIScaleSelectionHorizontalKey = 'hozn'; // real +/** Parameter to \c #kAIScaleSelectionAction. The vertical scale factor for non-uniform scaling. */ +const ActionParamKeyID kAIScaleSelectionVerticalKey = 'vtcl'; // real +/** Parameter to \c #kAIScaleSelectionAction. The horizontal offset of the origin with + respect to the center of the selection.*/ +const ActionParamKeyID kAIScaleSelectionAboutDXKey = 'detX'; // real +/** Parameter to \c #kAIScaleSelectionAction. The vertical offset of the origin with + respect to the center of the selection. */ +const ActionParamKeyID kAIScaleSelectionAboutDYKey = 'detY'; // real +/** Parameter to \c #kAIScaleSelectionAction. When true, scale a copy of the objects. */ +const ActionParamKeyID kAIScaleSelectionCopyKey = 'copy'; // bool +/** Parameter to \c #kAIScaleSelectionAction. When true, scale the object geometry. */ +const ActionParamKeyID kAIScaleSelectionObjectsKey = 'objt'; // bool +/** Parameter to \c #kAIScaleSelectionAction. When true, scale patterns. */ +const ActionParamKeyID kAIScaleSelectionPatternsKey = 'patn'; // bool + + +/** @ingroup Actions + Reflects the selected objects. + @param #kAIReflectSelectionAngleKey The angle of the axis of reflection in degrees. + @param #kAIReflectSelectionAboutDXKey The horizontal offset of the origin with + respect to the center of the selection. + @param #kAIReflectSelectionAboutDYKey The vertical offset of the origin with + respect to the center of the selection. + @param #kAIReflectSelectionCopyKey When true, reflect a copy of the objects. + @param #kAIReflectSelectionObjectsKey When true, reflect the object geometry. + @param #kAIReflectSelectionPatternsKey When true, reflect patterns. + */ +#define kAIReflectSelectionAction "adobe_reflect" +/** Parameter to \c #kAIReflectSelectionAction. The angle of the axis of reflection in degrees. */ +const ActionParamKeyID kAIReflectSelectionAngleKey = 'angl'; // real +/** Parameter to \c #kAIReflectSelectionAction. The horizontal offset of the origin with + respect to the center of the selection. */ +const ActionParamKeyID kAIReflectSelectionAboutDXKey = 'detX'; // real +/** Parameter to \c #kAIReflectSelectionAction. The vertical offset of the origin with + respect to the center of the selection. */ +const ActionParamKeyID kAIReflectSelectionAboutDYKey = 'detY'; // real +/** Parameter to \c #kAIReflectSelectionAction. When true, reflect a copy of the objects. */ +const ActionParamKeyID kAIReflectSelectionCopyKey = 'copy'; // bool +/** Parameter to \c #kAIReflectSelectionAction. When true, reflect the object geometry. */ +const ActionParamKeyID kAIReflectSelectionObjectsKey = 'objt'; // bool +/** Parameter to \c #kAIReflectSelectionAction. When true, reflect patterns. */ +const ActionParamKeyID kAIReflectSelectionPatternsKey = 'patn'; // bool + +/** @ingroup Actions + Reflects the selected objects. + @param #kAIShearSelectionShearAngleKey The amount of shearing in degrees. + @param #kAIShearSelectionAngleKey The angle along which to shear in degrees. + @param #kAIShearSelectionAboutDXKey The horizontal offset of the origin with + respect to the center of the selection. + @param #kAIShearSelectionAboutDYKey The vertical offset of the origin with + respect to the center of the selection. + @param #kAIShearSelectionCopyKey When true, shear a copy of the objects. + @param #kAIShearSelectionObjectsKey When true, shear the object geometry. + @param #kAIShearSelectionPatternsKey When true, shear patterns. + */ +#define kAIShearSelectionAction "adobe_shear" +/** Parameter to \c #kAIShearSelectionAction. The amount of shearing in degrees. */ +const ActionParamKeyID kAIShearSelectionShearAngleKey = 'shag'; // real +/** Parameter to \c #kAIShearSelectionAction. The angle along which to shear in degrees. */ +const ActionParamKeyID kAIShearSelectionAngleKey = 'angl'; // real +/** Parameter to \c #kAIShearSelectionAction. The horizontal offset of the origin with + respect to the center of the selection. */ +const ActionParamKeyID kAIShearSelectionAboutDXKey = 'detX'; // real +/** Parameter to \c #kAIShearSelectionAction. The vertical offset of the origin with + respect to the center of the selection. */ +const ActionParamKeyID kAIShearSelectionAboutDYKey = 'detY'; // real +/** Parameter to \c #kAIShearSelectionAction. When true, shear a copy of the objects. */ +const ActionParamKeyID kAIShearSelectionCopyKey = 'copy'; // bool +/** Parameter to \c #kAIShearSelectionAction. When true, shear the object geometry. */ +const ActionParamKeyID kAIShearSelectionObjectsKey = 'objt'; // bool +/** Parameter to \c #kAIShearSelectionAction. When true, shear patterns.. */ +const ActionParamKeyID kAIShearSelectionPatternsKey = 'patn'; // bool + +/** @ingroup Actions + Repeats the most recent transformation on the selected objects. */ +#define kAITransformSelectionAgainAction "adobe_transformAgain" + + +/** @ingroup Actions + Brings the selected objects to the front of the paint order. */ +#define kAISendSelectionToFrontAction "adobe_sendToFront" +/** @ingroup Actions + Sends the selected objects to the back of the paint order. */ +#define kAISendSelectionToBackAction "adobe_sendToBack" +/** @ingroup Actions + Brings the selected objects forward in the paint order. */ +#define kAISendSelectionForwardAction "adobe_sendForward" +/** @ingroup Actions + Sends the selected objects backward in the paint order. */ +#define kAISendSelectionBackwardAction "adobe_sendBackward" + + +/** @ingroup Actions + Cuts the selected objects. */ +#define kAICutSelectionAction "adobe_cut" +/** @ingroup Actions + Copies the selected objects to the clipboard. */ +#define kAICopySelectionAction "adobe_copy" +/** @ingroup Actions + Clears the selection. */ +#define kAIClearSelectionAction "adobe_clear" + + +/** @ingroup Actions + Pastes objects from the clipboard into the current document. */ +#define kAIPasteClipboardAction "adobe_paste" +/** @ingroup Actions + Pastes objects from the clipboard into the current document at the + front of the paint order. */ +#define kAIPasteClipboardInFrontAction "adobe_pasteInFront" +/** @ingroup Actions + Pastes objects from the clipboard into the current document at the + back of the paint order. */ +#define kAIPasteClipboardInBackAction "adobe_pasteInBack" + + +/** @ingroup Actions + Selects all objects in the current document. */ +#define kAISelectAllAction "adobe_selectAll" +/** @ingroup Actions + Deselects all objects in the current document. */ +#define kAIDeselectAllAction "adobe_deselectAll" + + +/** @ingroup Actions + Groups selected objects. */ +#define kAIGroupSelectionAction "adobe_group" +/** @ingroup Actions + Ungroups selected objects. */ +#define kAIUngroupSelectionAction "adobe_ungroup" + + +/** @ingroup Actions + Locks selected objects. */ +#define kAILockSelectionAction "adobe_lock" +/** @ingroup Actions + Unlocks all objects. */ +#define kAIUnlockAllAction "adobe_unlockAll" + + +/** @ingroup Actions + Hides selected objects. */ +#define kAIHideSelectionAction "adobe_hideSelection" +/** @ingroup Actions + Shows all objects. */ +#define kAIShowAllAction "adobe_showAll" + +/** @ingroup Actions + Removes the currently selected anchor points. */ +#define kAIRemoveAnchorPointsAction "adobe_removeAnchorPoints" + +/** @ingroup Actions + Makes a mask from currently selected objects. */ +#define kAIMakeMaskFromSelectionAction "adobe_makeMask" +/** @ingroup Actions + Releases selected masks. */ +#define kAIReleaseSelectedMasksAction "adobe_releaseMask" +/** @ingroup Actions + Edits selected masks. */ +#define kAIEditSelectedMasksAction "adobe_editMask" + + + +/** @ingroup Actions + Makes a compound object from selected objects. */ +#define kAIMakeCompoundFromSelectionAction "adobe_makeCompound" +/** @ingroup Actions + Releases selected compound objects. */ +#define kAIReleaseSelectedCompoundAction "adobe_releaseMask" + + +/** @ingroup Actions + Makes crop marks from selected objects. */ +#define kAIMakeCropMarksFromSelectionAction "adobe_makeCropMark" +/** @ingroup Actions + Releases crop marks for selected objects. */ +#define kAIReleaseCropMarksAction "adobe_releaseCropMark" + + +/** @ingroup Actions + Shows or hides guides. + @param #kAIShowHideGuidesKey When true, show guides; when false, hide guides. + */ +#define kAIShowHideGuidesAction "adobe_showGuide" +/** Parameter to \c #kAIShowHideGuidesAction. When true, show guides; when false, hide guides. */ +const ActionParamKeyID kAIShowHideGuidesKey = 'show'; // bool + +/** @ingroup Actions + Locks or unlocks guides. + @param #kAIShowHideGuidesKey When true, lock guides; when false, unlock guides. + */ +#define kAILockOrUnlockGuidesAction "adobe_lockGuide" +/** Parameter to \c #kAILockOrUnlockGuidesAction. When true, lock guides; when false, unlock guides. */ +const ActionParamKeyID kAIAILockOrUnlockGuidesKey = 'lock'; // bool + + +/** @ingroup Actions + Makes guides from the currently selected objects. */ +#define kAIMakeGuidesFromSelectionAction "adobe_makeGuide" +/** @ingroup Actions + Releases all guides. */ +#define kAIReleaseAllGuidesAction "adobe_releaseGuide" +/** @ingroup Actions + Deletes all guides. */ +#define kAIDeleteAllGuidesAction "adobe_clearGuide" + + +/** @ingroup Actions + Sets object attributes as defined in Attributes palette. + @param #kAISetObjectAttributesShowCenterKey Sets the show-center state (true/false). + @param #kAISetObjectAttributesReverseDirectionKey Sets the reverse-direction state (true/false). + @param #kAISetObjectAttributesFillRuleKey Sets the fill-rule usage + (0 for non-zero rule, 1 for even-odd rule). + @param #kAISetObjectAttributesResolutionKey Sets the resolution in dots-per-inch (dpi) + @param #kAISetObjectAttributesOverprintFillKey Sets the overprint state for fill (true/false). + @param #kAISetObjectAttributesOverprintStrokeKey Sets the overprint state for strokes (true/false). + @param #kAISetObjectAttributesNoteKey Sets an associated comment string. + @param #kAISetObjectAttributesURLKey Sets an associated URL string. + @param #kAISetObjectAttributesImageMapKey Sets an associated image map type + (0 for none, 1 for rectangle map, 2 for polygonal map). + */ +#define kAISetObjectAttributesAction "adobe_attributePalette" +/** Parameter to \c #kAISetObjectAttributesAction. Sets the show-center state (true/false). */ +const ActionParamKeyID kAISetObjectAttributesShowCenterKey = 'cntr'; // bool +/** Parameter to \c #kAISetObjectAttributesAction. Sets the reverse-direction state (true/false). */ +const ActionParamKeyID kAISetObjectAttributesReverseDirectionKey = 'rvpt'; // bool +/** Parameter to \c #kAISetObjectAttributesAction. Sets the fill-rule usage + (0 for non-zero rule, 1 for even-odd rule). */ +const ActionParamKeyID kAISetObjectAttributesFillRuleKey = 'rule'; // enum +/** Parameter to \c #kAISetObjectAttributesAction. Sets the resolution in dots-per-inch (dpi) */ +const ActionParamKeyID kAISetObjectAttributesResolutionKey = 'rslt'; // real +/** Parameter to \c #kAISetObjectAttributesAction. Sets the overprint state for fill (true/false). */ +const ActionParamKeyID kAISetObjectAttributesOverprintFillKey = 'fill'; // bool +/** Parameter to \c #kAISetObjectAttributesAction. Sets the overprint state for strokes (true/false). */ +const ActionParamKeyID kAISetObjectAttributesOverprintStrokeKey = 'strk'; // bool +/** Parameter to \c #kAISetObjectAttributesAction. Sets an associated comment string. */ +const ActionParamKeyID kAISetObjectAttributesNoteKey = 'note'; // string +/** Parameter to \c #kAISetObjectAttributesAction. Sets an associated URL string. */ +const ActionParamKeyID kAISetObjectAttributesURLKey = 'url.'; // string +/** Parameter to \c #kAISetObjectAttributesAction. Sets an associated image map type + (0 for none, 1 for rectangle map, 2 for polygonal map). */ +const ActionParamKeyID kAISetObjectAttributesImageMapKey = 'imap'; // enum + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIPDFFormatAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIPDFFormatAction.h index cee0ea1..d92311d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIPDFFormatAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AIPDFFormatAction.h @@ -1,342 +1,342 @@ -#ifndef _AIPDFFORMATACTION_H_ -#define _AIPDFFORMATACTION_H_ - -/* - * Name: AIPDFFormatAction.h - * $Revision: 1 $ - * Author: Hiromi M. Watanabe - * Date: 7/24/2002 - * Purpose: Adobe Illustrator PDF Action Parameters. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - -// ----------------------------------------------------------------------------- -// Types. -// ----------------------------------------------------------------------------- - -/** Export to PDF action: option set */ -typedef enum _AIPDFOptionSet -{ - kAIPDFOptionSetCustom = 0 - -} AIPDFOptionSet; - -/** Export to PDF action: flattening style */ -typedef enum _AIPDFFlattenStyle -{ - kAIPDFFlattenStyleCustom = 0 - -} AIPDFFlattenStyle; - - - -/** Export to PDF action: version compatibility */ -typedef enum _AIPDFCompatibility -{ - kAIPDFCompatibility13 = 0x0013, // Acrobat 4, PDF 1.3 - kAIPDFCompatibility14 = 0x0014, // Acrobat 5, PDF 1.4 - kAIPDFCompatibility15 = 0x0015, // Acrobat 6, PDF 1.5 - kAIPDFCompatibility16 = 0x0016, // Acrobat 7, PDF 1.6 - kAIPDFCompatibility17 = 0x0017 // Acrobat 8, PDF 1.7 -} AIPDFCompatibility; - - -/** Export to PDF action: color image compression */ -typedef enum _AIPDFImageCompression -{ - kAIPDFImageNoCompression = 0, - kAIPDFImageCompressionAutomaticJPEGMinimum, - kAIPDFImageCompressionAutomaticJPEGLow, - kAIPDFImageCompressionAutomaticJPEGMedium, - kAIPDFImageCompressionAutomaticJPEGHigh, - kAIPDFImageCompressionAutomaticJPEGMaximum, - kAIPDFImageCompressionJPEGMinimum, - kAIPDFImageCompressionJPEGLow, - kAIPDFImageCompressionJPEGMedium, - kAIPDFImageCompressionJPEGHigh, - kAIPDFImageCompressionJPEGMaximum, - kAIPDFImageCompressionAutomaticJPEG2000Minimum, - kAIPDFImageCompressionAutomaticJPEG2000Low, - kAIPDFImageCompressionAutomaticJPEG2000Medium, - kAIPDFImageCompressionAutomaticJPEG2000High, - kAIPDFImageCompressionAutomaticJPEG2000Maximum, - kAIPDFImageCompressionAutomaticJPEG2000Lossless, - kAIPDFImageCompressionJPEG2000Minimum, - kAIPDFImageCompressionJPEG2000Low, - kAIPDFImageCompressionJPEG2000Medium, - kAIPDFImageCompressionJPEG2000High, - kAIPDFImageCompressionJPEG2000Maximum, - kAIPDFImageCompressionJPEG2000Lossless, - kAIPDFImageCompressionZIP8bit, - kAIPDFImageCompressionZIP4bit - -} AIPDFImageCompression; - - - -/** Export to PDF action: monochrome image compression */ -typedef enum _AIPDFMonochromeImageCompression -{ - kAIPDFMonochromeImageNoCompression = 0, - kAIPDFMonochromeImageCompressionCCITTG3, - kAIPDFMonochromeImageCompressionCCITTG4, - kAIPDFMonochromeImageCompressionZIP, - kAIPDFMonochromeImageCompressionRunLength - -} AIPDFMonochromeImageCompression; - - - -/** Export to PDF action: downsampling technique */ -typedef enum _AIPDFDownsampling -{ - kAIPDFNoDownsampling = 1, - kAIPDFAverageDownsampling, - kAIPDFSubsampling, - kAIPDFBicubicsampling - -} AIPDFDownsampling; - -/** Export to PDF action: encryption level */ -typedef enum _AIPDFEncryptionLevel -{ - kAIPDF40bitEncryption = 1, - kAIPDF128bitEncryption - -} AIPDFEncryptionLevel; - -/** Export to PDF action: overprint options */ -typedef enum _AIPDFOverprintOptions -{ - kAIPDFOPPreserve = 1, - kAIPDFOPDiscard - -} AIPDFOverprintOptions; - -/** Export to PDF action: printer mark type */ -typedef enum _AIPDFPrinterType -{ - kAIPDFPrintMarksStandard = 1, - kAIPDFPrintMarksJapanese - -} AIPDFPrinterType; - -/** Export to PDF action: printer mark weight */ -typedef enum _AIPDFPrinterMarkWeight -{ - kAIPDFPrintMarksWeight0125 = 1, - kAIPDFPrintMarksWeight025, - kAIPDFPrintMarksWeight05 - -} AIPDFPrinterMarkWeight; - -/** Export to PDF action: print resolution allowed for document */ -typedef enum _AIPDFPrintingPermit -{ - kAIPDFPrint128NoneIndex = 1, - kAIPDFPrint128LowResIndex, - kAIPDFPrint128HighResIndex, - kAIPDFPrint40NoneIndex, - kAIPDFPrint40HighResIndex - -} AIPDFPrintingPermit; - -/** Export to PDF action: allowed changes to document */ -typedef enum _AIPDFChangesPermit -{ - kAIPDFChanges128NoneIndex = 1, - kAIPDFChanges128EditPageIndex, - kAIPDFChanges128FillFormIndex, - kAIPDFChanges128CommentIndex, - kAIPDFChanges128AnyIndex, - kAIPDFChanges40NoneIndex, - kAIPDFChanges40CommentIndex, - kAIPDFChanges40PageLayoutIndex, - kAIPDFChanges40AnyIndex - -} AIPDFChangesPermit; - -/** Export to PDF action: various settings for cropping. */ -typedef ai::int32 AIPDFBoxType; -enum { - kAIPDFArtBox, - kAIPDFCropBox, - kAIPDFTrimBox, - kAIPDFBleedBox, - kAIPDFMediaBox, - kAIPDFBoundingBox -}; - - -/** PDF-format parameter value for \c #kAIExportDocumentAction. - @param #kAIExportDocumentFormatKey The format to write, \c #kAIPDFFileFormat - to export PDF. */ -#define kAIPDFFileFormat "PDF File Format" -/** PDF-format parameter value for \c #kAIExportDocumentAction. - @param #kAIExportDocumentExtensionKey The file extension, - \c #kAIPDFFileFormatExtension for PDF. */ -#define kAIPDFFileFormatExtension "pdf" - -/** Parameter to \c #kAIExportDocumentAction for PDF. The page index. */ -const ActionParamKeyID kAIPDFPageIndexKey = 'page'; // integer, page index -/** Parameter to \c #kAIExportDocumentAction for PDF. The form of cropping to be used, an \c #AIPDFBoxType value. */ -const ActionParamKeyID kAIPDFCropToKey = 'crop'; // enum, AIPDFBoxType - -/** Parameter to \c #kAIExportDocumentAction for PDF. The page count. */ -const ActionParamKeyID kAIPDFPageCountKey = 'pgct'; // integer, page count - -/** Parameter to \c #kAIExportDocumentAction for PDF. The option set index. */ -const ActionParamKeyID kAIPDFOptionSetKey = 'optn'; // integer, option set index. -/** Parameter to \c #kAIExportDocumentAction for PDF. The option set entry name. */ -const ActionParamKeyID kAIPDFOptionSetNameKey = 'opnm'; // string, option set entry name - -/** Parameter to \c #kAIExportDocumentAction for PDF. The PDF version compatibility, an \c #AIPDFCompatibility value. */ -const ActionParamKeyID kAIPDFCompatibilityKey = 'comp'; // enum AIPDFCompatibility, compatibility -/** Parameter to \c #kAIExportDocumentAction for PDF. True to round-trip information (also called PGF). */ -const ActionParamKeyID kAIPDFRoundTripKey = 'rdtr'; // bool, include round trip information, aka PGF -/** Parameter to \c #kAIExportDocumentAction for PDF. True to generate thumbnails. */ -const ActionParamKeyID kAIPDFGenerateThumbnailsKey = 'thum'; // bool, generate thumbnails -/** Parameter to \c #kAIExportDocumentAction for PDF. True to view the PDF file after save. */ -const ActionParamKeyID kAIPDFViewPDFFileKey = 'vpdf'; // bool, view PDF file after saving -/** Parameter to \c #kAIExportDocumentAction for PDF. True to optimize for fast Web viewing. */ -const ActionParamKeyID kAIPDFFastWebViewKey = 'fwev'; // bool, optimize for fast web view - -/** Parameter to \c #kAIExportDocumentAction for PDF. The type of color compression to use, an \c #AIPDFImageCompression value. */ -const ActionParamKeyID kAIPDFColorImageCompressionKindKey = 'cknd'; // enum AIPDFImageCompression, color image compression kind -/** Parameter to \c #kAIExportDocumentAction for PDF. The color image tile size. */ -const ActionParamKeyID kAIPDFColorImageTileKey = 'ctil'; // int, color image tile size -/** Parameter to \c #kAIExportDocumentAction for PDF. The color image resampling method, an \c #AIPDFDownsampling value. */ -const ActionParamKeyID kAIPDFColorImageResampleKindKey = 'crsl'; // enum, color image resample kind -/** Parameter to \c #kAIExportDocumentAction for PDF. The color image resolution (DPI). */ -const ActionParamKeyID kAIPDFColorImageResolutionKey = 'cres'; // int, color image resolution (dpi) -/** Parameter to \c #kAIExportDocumentAction for PDF. The color image resolution above which to resample (DPI). */ -const ActionParamKeyID kAIPDFColorImageResampleAboveKey = 'crab'; // int, resample color image above resolution (dpi) - -/** Parameter to \c #kAIExportDocumentAction for PDF. The type of grayscale compression to use, an \c #AIPDFImageCompression value. */ -const ActionParamKeyID kAIPDFGrayscaleImageCompressionKindKey = 'gknd'; // enum AIPDFImageCompression, gray scale image compression kind -/** Parameter to \c #kAIExportDocumentAction for PDF. The grayscale image tile size. */ -const ActionParamKeyID kAIPDFGrayscaleImageTileKey = 'gtil'; // int, grayscale image tile size -/** Parameter to \c #kAIExportDocumentAction for PDF. The grayscale image resampling method, an \c #AIPDFDownsampling value. */ -const ActionParamKeyID kAIPDFGrayscaleImageResampleKindKey = 'grsl'; // enum, grayscale image resample -/** Parameter to \c #kAIExportDocumentAction for PDF. The grayscale image resolution (DPI). */ -const ActionParamKeyID kAIPDFGrayscaleImageResolutionKey = 'gres'; // int, grayscale image resolution -/** Parameter to \c #kAIExportDocumentAction for PDF. The grayscale image resolution above which to resample (DPI). */ -const ActionParamKeyID kAIPDFGrayImageResampleAboveKey = 'grab'; // int, resample grayscale image above resolution (dpi) - -/** Parameter to \c #kAIExportDocumentAction for PDF. The monochrome image type, an \c #AIPDFMonochromeImageCompression value. */ -const ActionParamKeyID kAIPDFMonochromeImageCompressionKindKey = 'mknd'; // enum AIPDFMonochromeImageCompression, monochrome image kind -/** Parameter to \c #kAIExportDocumentAction for PDF. The monochrome image resampling method, an \c #AIPDFDownsampling value. */ -const ActionParamKeyID kAIPDFMonochromeImageResampleKindKey = 'mrsl'; // enum, monochrome image resample -/** Parameter to \c #kAIExportDocumentAction for PDF. The monochrome image resolution (DPI). */ -const ActionParamKeyID kAIPDFMonochromeImageResolutionKey = 'mres'; // int, monochrome image resolution -/** Parameter to \c #kAIExportDocumentAction for PDF. The monochrome image resolution above which to resample (DPI). */ -const ActionParamKeyID kAIPDFMonochromeImageResampleAboveKey= 'mrab'; // int, resample monochrome image above resolution (dpi) - -/** Parameter to \c #kAIExportDocumentAction for PDF. True to compress art. */ -const ActionParamKeyID kAIPDFCompressArtKey = 'cart'; // bool, compress art - -/** Parameter to \c #kAIExportDocumentAction for PDF. True to print trim marks. */ -const ActionParamKeyID kAIPDFTrimMarksKey = 'ptrm'; // bool, Trim Marks -/** Parameter to \c #kAIExportDocumentAction for PDF. True to print registration marks. */ -const ActionParamKeyID kAIPDFRegMarksKey = 'preg'; // bool, Registration Marks -/** Parameter to \c #kAIExportDocumentAction for PDF. True to print color bars. */ -const ActionParamKeyID kAIPDFColorBarsKey = 'pclb'; // bool, Color Bars -/** Parameter to \c #kAIExportDocumentAction for PDF. True to print page information. */ -const ActionParamKeyID kAIPDFPageInfoKey = 'ppgi'; // bool, Page Info -/** Parameter to \c #kAIExportDocumentAction for PDF. The printer mark type, an \c #AIPDFPrinterType value. */ -const ActionParamKeyID kAIPDFPrinterMarkTypeKey = 'pmtp'; // enum, printer mark type -/** Parameter to \c #kAIExportDocumentAction for PDF. The trim mark weight, an \c #AIPDFPrinterMarkWeight value. */ -const ActionParamKeyID kAIPDFTrimMarkWeightKey = 'ptmw'; // enum, Trim Marks weight -/** Parameter to \c #kAIExportDocumentAction for PDF. The page offset from artwork, in document points. */ -const ActionParamKeyID kAIPDFOffsetFromArtworkKey = 'post'; // int, offset from artwork -/** Parameter to \c #kAIExportDocumentAction for PDF. The bleed top, in document points. */ -const ActionParamKeyID kAIPDFBleedTopKey = 'btop'; // int, bleed top -/** Parameter to \c #kAIExportDocumentAction for PDF. The bleed bottom, in document points. */ -const ActionParamKeyID kAIPDFBleedBottomKey = 'bbtm'; // int, bleed bottom -/** Parameter to \c #kAIExportDocumentAction for PDF. The bleed left, in document points. */ -const ActionParamKeyID kAIPDFBleedLeftKey = 'blft'; // int, bleed left -/** Parameter to \c #kAIExportDocumentAction for PDF. The bleed right, in document points. */ -const ActionParamKeyID kAIPDFBleedRightKey = 'brht'; // int, bleed right -/** Parameter to \c #kAIExportDocumentAction for PDF. True when bleed top, bottom, left and right are linked together. - Corresponds to the link icon button in the Bleeds subsection of the Mark and Bleeds section of the PDF Export dialog. */ -const ActionParamKeyID kAIPDFBleedLinkKey = 'blnk'; // bool, bleed link -/** Parameter to \c #kAIExportDocumentAction for PDF. True when document bleeds are used. */ -const ActionParamKeyID kAIPDFDocBleedKey = 'bdoc'; // bool, doc bleed - -/** Parameter to \c #kAIExportDocumentAction for PDF. True to embed ICC color profiles. */ -const ActionParamKeyID kAIPDFEmbedICCProfilesKey = 'emic'; // bool, embed ICC profiles -/** Parameter to \c #kAIExportDocumentAction for PDF. True to embed fonts. */ -const ActionParamKeyID kAIPDFEmbedFontsKey = 'embd'; // bool, embed fonts **TO BE REMOVED** -/** Parameter to \c #kAIExportDocumentAction for PDF. True to subset fonts. */ -const ActionParamKeyID kAIPDFSubsetFontsKey = 'sbst'; // bool, subset fonts **TO BE REMOVED** -/** Parameter to \c #kAIExportDocumentAction for PDF. The ratio for font subsets. */ -const ActionParamKeyID kAIPDFSubsetFontsRatioKey = 'rato'; // real, subset fonts ratio - -/** Parameter to \c #kAIExportDocumentAction for PDF. True to generate Acrobat layers. */ -const ActionParamKeyID kAIPDFGenerateAcrobatLayersKey = 'aclr'; // bool, generate Acrobat layers -/** Parameter to \c #kAIExportDocumentAction for PDF. The overprint style, an \c #AIPDFOverprintOptions value. */ -const ActionParamKeyID kAIPDFOverprintKey = 'pvop'; // enum, overprint -/** Parameter to \c #kAIExportDocumentAction for PDF. The flattening style, an \c #AIPDFFlattenStyle value. */ -const ActionParamKeyID kAIPDFFlatteningStyleKey = 'flsy'; // enum, AIPDFFlatteningStyle -/** Parameter to \c #kAIExportDocumentAction for PDF. The flattening style name, a descriptive string.*/ -const ActionParamKeyID kAIPDFFlatteningStyleNameKey = 'flsn'; // string, descriptive - -/** Parameter to \c #kAIExportDocumentAction for PDF. The maximum resolution for flattening (DPI). */ -const ActionParamKeyID kAIPDFFlattenMaxResolutionKey = 'fmax'; // real, flattening style max resolution -/** Parameter to \c #kAIExportDocumentAction for PDF. The minimum resolution for flattening (DPI). */ -const ActionParamKeyID kAIPDFFlattenMinResolutionKey = 'fmin'; // real, flattening style min resolution -/** Parameter to \c #kAIExportDocumentAction for PDF. The vector balance for flattening. */ -const ActionParamKeyID kAIPDFFlattenVectorBalanceKey = 'fvba'; // int, flattening style vector balance -/** Parameter to \c #kAIExportDocumentAction for PDF. True to clip complex regions when flattening. */ -const ActionParamKeyID kAIPDFFlattenClipComplexRegionsKey = 'fccr'; // bool, flattening style clip complex regions -/** Parameter to \c #kAIExportDocumentAction for PDF. True to anti alias rasters when flattening. */ -const ActionParamKeyID kAIPDFFlattenAntiAliasKey = 'fcaa'; // bool, flattening style anti alias option -/** Parameter to \c #kAIExportDocumentAction for PDF. True to outline strokes when flattening. */ -const ActionParamKeyID kAIPDFFlattenOutlineStrokesKey = 'fosk'; // bool, flattening style outline strokes -/** Parameter to \c #kAIExportDocumentAction for PDF. True to outline text when flattening. */ -const ActionParamKeyID kAIPDFFlattenOutlineTextKey = 'fotx'; // bool, flattening style outline text -/** Parameter to \c #kAIExportDocumentAction for PDF. The printer resolution for flattening (DPI). */ -const ActionParamKeyID kAIPDFFlattenPrinterResolutionKey = 'fprs'; // real, flattening style printer resolution - -/** Parameter to \c #kAIExportDocumentAction for PDF. True to include user password protection. */ -const ActionParamKeyID kAIPDFUserPasswordRequiredKey = 'usrq'; // bool, user password -/** Parameter to \c #kAIExportDocumentAction for PDF. The user password string. */ -const ActionParamKeyID kAIPDFUserPasswordKey = 'usps'; // string, user password -/** Parameter to \c #kAIExportDocumentAction for PDF. The to include master password protection. */ -const ActionParamKeyID kAIPDFMasterPasswordRequiredKey = 'msrq'; // bool, master password -/** Parameter to \c #kAIExportDocumentAction for PDF. The master password string. */ -const ActionParamKeyID kAIPDFMasterPasswordKey = 'msps'; // string, master password - -/** Parameter to \c #kAIExportDocumentAction for PDF. The type of printing allowed, an \c #AIPDFPrintingPermit value. */ -const ActionParamKeyID kAIPDFPrintingPermKey = 'pmpr'; // enum, Printing Allowed -/** Parameter to \c #kAIExportDocumentAction for PDF. The type of editing allowed, an \c #AIPDFChangesPermit value. */ -const ActionParamKeyID kAIPDFChangesPermKey = 'pmch'; // enum, Changes Allowed - -/** Parameter to \c #kAIExportDocumentAction for PDF. True to allow copying (with 128-bit encryption). */ -const ActionParamKeyID kAIPDFEnableCopyKey = 'ebcp'; // bool, Enable copying (128-bit) -/** Parameter to \c #kAIExportDocumentAction for PDF. True to allow access (with 128-bit encryption). */ -const ActionParamKeyID kAIPDFEnableAccessKey = 'ebac'; // bool, Enable access (128-bit) -/** Parameter to \c #kAIExportDocumentAction for PDF. True to allow copying and access (with 40-bit encryption). */ -const ActionParamKeyID kAIPDFEnableCopyAccessKey = 'ebca'; // bool, Enable copying and access (40-bit) -/** Parameter to \c #kAIExportDocumentAction for PDF. True to allow plaintext metadata for an encrypted document. */ -const ActionParamKeyID kAIPDFEnablePlaintextMetaKey = 'ebpt'; // bool, Enable Plaintext Metadata - -/** Parameter to \c #kAIExportDocumentAction for PDF. True to include linked files. */ -const ActionParamKeyID kAIPDFIncludeLinkedFilesKey = 'link'; // bool, include linked files - - -#endif //_AIPDFFORMATACTION_H_ +#ifndef _AIPDFFORMATACTION_H_ +#define _AIPDFFORMATACTION_H_ + +/* + * Name: AIPDFFormatAction.h + * $Revision: 1 $ + * Author: Hiromi M. Watanabe + * Date: 7/24/2002 + * Purpose: Adobe Illustrator PDF Action Parameters. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + +// ----------------------------------------------------------------------------- +// Types. +// ----------------------------------------------------------------------------- + +/** Export to PDF action: option set */ +typedef enum _AIPDFOptionSet +{ + kAIPDFOptionSetCustom = 0 + +} AIPDFOptionSet; + +/** Export to PDF action: flattening style */ +typedef enum _AIPDFFlattenStyle +{ + kAIPDFFlattenStyleCustom = 0 + +} AIPDFFlattenStyle; + + + +/** Export to PDF action: version compatibility */ +typedef enum _AIPDFCompatibility +{ + kAIPDFCompatibility13 = 0x0013, // Acrobat 4, PDF 1.3 + kAIPDFCompatibility14 = 0x0014, // Acrobat 5, PDF 1.4 + kAIPDFCompatibility15 = 0x0015, // Acrobat 6, PDF 1.5 + kAIPDFCompatibility16 = 0x0016, // Acrobat 7, PDF 1.6 + kAIPDFCompatibility17 = 0x0017 // Acrobat 8, PDF 1.7 +} AIPDFCompatibility; + + +/** Export to PDF action: color image compression */ +typedef enum _AIPDFImageCompression +{ + kAIPDFImageNoCompression = 0, + kAIPDFImageCompressionAutomaticJPEGMinimum, + kAIPDFImageCompressionAutomaticJPEGLow, + kAIPDFImageCompressionAutomaticJPEGMedium, + kAIPDFImageCompressionAutomaticJPEGHigh, + kAIPDFImageCompressionAutomaticJPEGMaximum, + kAIPDFImageCompressionJPEGMinimum, + kAIPDFImageCompressionJPEGLow, + kAIPDFImageCompressionJPEGMedium, + kAIPDFImageCompressionJPEGHigh, + kAIPDFImageCompressionJPEGMaximum, + kAIPDFImageCompressionAutomaticJPEG2000Minimum, + kAIPDFImageCompressionAutomaticJPEG2000Low, + kAIPDFImageCompressionAutomaticJPEG2000Medium, + kAIPDFImageCompressionAutomaticJPEG2000High, + kAIPDFImageCompressionAutomaticJPEG2000Maximum, + kAIPDFImageCompressionAutomaticJPEG2000Lossless, + kAIPDFImageCompressionJPEG2000Minimum, + kAIPDFImageCompressionJPEG2000Low, + kAIPDFImageCompressionJPEG2000Medium, + kAIPDFImageCompressionJPEG2000High, + kAIPDFImageCompressionJPEG2000Maximum, + kAIPDFImageCompressionJPEG2000Lossless, + kAIPDFImageCompressionZIP8bit, + kAIPDFImageCompressionZIP4bit + +} AIPDFImageCompression; + + + +/** Export to PDF action: monochrome image compression */ +typedef enum _AIPDFMonochromeImageCompression +{ + kAIPDFMonochromeImageNoCompression = 0, + kAIPDFMonochromeImageCompressionCCITTG3, + kAIPDFMonochromeImageCompressionCCITTG4, + kAIPDFMonochromeImageCompressionZIP, + kAIPDFMonochromeImageCompressionRunLength + +} AIPDFMonochromeImageCompression; + + + +/** Export to PDF action: downsampling technique */ +typedef enum _AIPDFDownsampling +{ + kAIPDFNoDownsampling = 1, + kAIPDFAverageDownsampling, + kAIPDFSubsampling, + kAIPDFBicubicsampling + +} AIPDFDownsampling; + +/** Export to PDF action: encryption level */ +typedef enum _AIPDFEncryptionLevel +{ + kAIPDF40bitEncryption = 1, + kAIPDF128bitEncryption + +} AIPDFEncryptionLevel; + +/** Export to PDF action: overprint options */ +typedef enum _AIPDFOverprintOptions +{ + kAIPDFOPPreserve = 1, + kAIPDFOPDiscard + +} AIPDFOverprintOptions; + +/** Export to PDF action: printer mark type */ +typedef enum _AIPDFPrinterType +{ + kAIPDFPrintMarksStandard = 1, + kAIPDFPrintMarksJapanese + +} AIPDFPrinterType; + +/** Export to PDF action: printer mark weight */ +typedef enum _AIPDFPrinterMarkWeight +{ + kAIPDFPrintMarksWeight0125 = 1, + kAIPDFPrintMarksWeight025, + kAIPDFPrintMarksWeight05 + +} AIPDFPrinterMarkWeight; + +/** Export to PDF action: print resolution allowed for document */ +typedef enum _AIPDFPrintingPermit +{ + kAIPDFPrint128NoneIndex = 1, + kAIPDFPrint128LowResIndex, + kAIPDFPrint128HighResIndex, + kAIPDFPrint40NoneIndex, + kAIPDFPrint40HighResIndex + +} AIPDFPrintingPermit; + +/** Export to PDF action: allowed changes to document */ +typedef enum _AIPDFChangesPermit +{ + kAIPDFChanges128NoneIndex = 1, + kAIPDFChanges128EditPageIndex, + kAIPDFChanges128FillFormIndex, + kAIPDFChanges128CommentIndex, + kAIPDFChanges128AnyIndex, + kAIPDFChanges40NoneIndex, + kAIPDFChanges40CommentIndex, + kAIPDFChanges40PageLayoutIndex, + kAIPDFChanges40AnyIndex + +} AIPDFChangesPermit; + +/** Export to PDF action: various settings for cropping. */ +typedef ai::int32 AIPDFBoxType; +enum { + kAIPDFArtBox, + kAIPDFCropBox, + kAIPDFTrimBox, + kAIPDFBleedBox, + kAIPDFMediaBox, + kAIPDFBoundingBox +}; + + +/** PDF-format parameter value for \c #kAIExportDocumentAction. + @param #kAIExportDocumentFormatKey The format to write, \c #kAIPDFFileFormat + to export PDF. */ +#define kAIPDFFileFormat "PDF File Format" +/** PDF-format parameter value for \c #kAIExportDocumentAction. + @param #kAIExportDocumentExtensionKey The file extension, + \c #kAIPDFFileFormatExtension for PDF. */ +#define kAIPDFFileFormatExtension "pdf" + +/** Parameter to \c #kAIExportDocumentAction for PDF. The page index. */ +const ActionParamKeyID kAIPDFPageIndexKey = 'page'; // integer, page index +/** Parameter to \c #kAIExportDocumentAction for PDF. The form of cropping to be used, an \c #AIPDFBoxType value. */ +const ActionParamKeyID kAIPDFCropToKey = 'crop'; // enum, AIPDFBoxType + +/** Parameter to \c #kAIExportDocumentAction for PDF. The page count. */ +const ActionParamKeyID kAIPDFPageCountKey = 'pgct'; // integer, page count + +/** Parameter to \c #kAIExportDocumentAction for PDF. The option set index. */ +const ActionParamKeyID kAIPDFOptionSetKey = 'optn'; // integer, option set index. +/** Parameter to \c #kAIExportDocumentAction for PDF. The option set entry name. */ +const ActionParamKeyID kAIPDFOptionSetNameKey = 'opnm'; // string, option set entry name + +/** Parameter to \c #kAIExportDocumentAction for PDF. The PDF version compatibility, an \c #AIPDFCompatibility value. */ +const ActionParamKeyID kAIPDFCompatibilityKey = 'comp'; // enum AIPDFCompatibility, compatibility +/** Parameter to \c #kAIExportDocumentAction for PDF. True to round-trip information (also called PGF). */ +const ActionParamKeyID kAIPDFRoundTripKey = 'rdtr'; // bool, include round trip information, aka PGF +/** Parameter to \c #kAIExportDocumentAction for PDF. True to generate thumbnails. */ +const ActionParamKeyID kAIPDFGenerateThumbnailsKey = 'thum'; // bool, generate thumbnails +/** Parameter to \c #kAIExportDocumentAction for PDF. True to view the PDF file after save. */ +const ActionParamKeyID kAIPDFViewPDFFileKey = 'vpdf'; // bool, view PDF file after saving +/** Parameter to \c #kAIExportDocumentAction for PDF. True to optimize for fast Web viewing. */ +const ActionParamKeyID kAIPDFFastWebViewKey = 'fwev'; // bool, optimize for fast web view + +/** Parameter to \c #kAIExportDocumentAction for PDF. The type of color compression to use, an \c #AIPDFImageCompression value. */ +const ActionParamKeyID kAIPDFColorImageCompressionKindKey = 'cknd'; // enum AIPDFImageCompression, color image compression kind +/** Parameter to \c #kAIExportDocumentAction for PDF. The color image tile size. */ +const ActionParamKeyID kAIPDFColorImageTileKey = 'ctil'; // int, color image tile size +/** Parameter to \c #kAIExportDocumentAction for PDF. The color image resampling method, an \c #AIPDFDownsampling value. */ +const ActionParamKeyID kAIPDFColorImageResampleKindKey = 'crsl'; // enum, color image resample kind +/** Parameter to \c #kAIExportDocumentAction for PDF. The color image resolution (DPI). */ +const ActionParamKeyID kAIPDFColorImageResolutionKey = 'cres'; // int, color image resolution (dpi) +/** Parameter to \c #kAIExportDocumentAction for PDF. The color image resolution above which to resample (DPI). */ +const ActionParamKeyID kAIPDFColorImageResampleAboveKey = 'crab'; // int, resample color image above resolution (dpi) + +/** Parameter to \c #kAIExportDocumentAction for PDF. The type of grayscale compression to use, an \c #AIPDFImageCompression value. */ +const ActionParamKeyID kAIPDFGrayscaleImageCompressionKindKey = 'gknd'; // enum AIPDFImageCompression, gray scale image compression kind +/** Parameter to \c #kAIExportDocumentAction for PDF. The grayscale image tile size. */ +const ActionParamKeyID kAIPDFGrayscaleImageTileKey = 'gtil'; // int, grayscale image tile size +/** Parameter to \c #kAIExportDocumentAction for PDF. The grayscale image resampling method, an \c #AIPDFDownsampling value. */ +const ActionParamKeyID kAIPDFGrayscaleImageResampleKindKey = 'grsl'; // enum, grayscale image resample +/** Parameter to \c #kAIExportDocumentAction for PDF. The grayscale image resolution (DPI). */ +const ActionParamKeyID kAIPDFGrayscaleImageResolutionKey = 'gres'; // int, grayscale image resolution +/** Parameter to \c #kAIExportDocumentAction for PDF. The grayscale image resolution above which to resample (DPI). */ +const ActionParamKeyID kAIPDFGrayImageResampleAboveKey = 'grab'; // int, resample grayscale image above resolution (dpi) + +/** Parameter to \c #kAIExportDocumentAction for PDF. The monochrome image type, an \c #AIPDFMonochromeImageCompression value. */ +const ActionParamKeyID kAIPDFMonochromeImageCompressionKindKey = 'mknd'; // enum AIPDFMonochromeImageCompression, monochrome image kind +/** Parameter to \c #kAIExportDocumentAction for PDF. The monochrome image resampling method, an \c #AIPDFDownsampling value. */ +const ActionParamKeyID kAIPDFMonochromeImageResampleKindKey = 'mrsl'; // enum, monochrome image resample +/** Parameter to \c #kAIExportDocumentAction for PDF. The monochrome image resolution (DPI). */ +const ActionParamKeyID kAIPDFMonochromeImageResolutionKey = 'mres'; // int, monochrome image resolution +/** Parameter to \c #kAIExportDocumentAction for PDF. The monochrome image resolution above which to resample (DPI). */ +const ActionParamKeyID kAIPDFMonochromeImageResampleAboveKey= 'mrab'; // int, resample monochrome image above resolution (dpi) + +/** Parameter to \c #kAIExportDocumentAction for PDF. True to compress art. */ +const ActionParamKeyID kAIPDFCompressArtKey = 'cart'; // bool, compress art + +/** Parameter to \c #kAIExportDocumentAction for PDF. True to print trim marks. */ +const ActionParamKeyID kAIPDFTrimMarksKey = 'ptrm'; // bool, Trim Marks +/** Parameter to \c #kAIExportDocumentAction for PDF. True to print registration marks. */ +const ActionParamKeyID kAIPDFRegMarksKey = 'preg'; // bool, Registration Marks +/** Parameter to \c #kAIExportDocumentAction for PDF. True to print color bars. */ +const ActionParamKeyID kAIPDFColorBarsKey = 'pclb'; // bool, Color Bars +/** Parameter to \c #kAIExportDocumentAction for PDF. True to print page information. */ +const ActionParamKeyID kAIPDFPageInfoKey = 'ppgi'; // bool, Page Info +/** Parameter to \c #kAIExportDocumentAction for PDF. The printer mark type, an \c #AIPDFPrinterType value. */ +const ActionParamKeyID kAIPDFPrinterMarkTypeKey = 'pmtp'; // enum, printer mark type +/** Parameter to \c #kAIExportDocumentAction for PDF. The trim mark weight, an \c #AIPDFPrinterMarkWeight value. */ +const ActionParamKeyID kAIPDFTrimMarkWeightKey = 'ptmw'; // enum, Trim Marks weight +/** Parameter to \c #kAIExportDocumentAction for PDF. The page offset from artwork, in document points. */ +const ActionParamKeyID kAIPDFOffsetFromArtworkKey = 'post'; // int, offset from artwork +/** Parameter to \c #kAIExportDocumentAction for PDF. The bleed top, in document points. */ +const ActionParamKeyID kAIPDFBleedTopKey = 'btop'; // int, bleed top +/** Parameter to \c #kAIExportDocumentAction for PDF. The bleed bottom, in document points. */ +const ActionParamKeyID kAIPDFBleedBottomKey = 'bbtm'; // int, bleed bottom +/** Parameter to \c #kAIExportDocumentAction for PDF. The bleed left, in document points. */ +const ActionParamKeyID kAIPDFBleedLeftKey = 'blft'; // int, bleed left +/** Parameter to \c #kAIExportDocumentAction for PDF. The bleed right, in document points. */ +const ActionParamKeyID kAIPDFBleedRightKey = 'brht'; // int, bleed right +/** Parameter to \c #kAIExportDocumentAction for PDF. True when bleed top, bottom, left and right are linked together. + Corresponds to the link icon button in the Bleeds subsection of the Mark and Bleeds section of the PDF Export dialog. */ +const ActionParamKeyID kAIPDFBleedLinkKey = 'blnk'; // bool, bleed link +/** Parameter to \c #kAIExportDocumentAction for PDF. True when document bleeds are used. */ +const ActionParamKeyID kAIPDFDocBleedKey = 'bdoc'; // bool, doc bleed + +/** Parameter to \c #kAIExportDocumentAction for PDF. True to embed ICC color profiles. */ +const ActionParamKeyID kAIPDFEmbedICCProfilesKey = 'emic'; // bool, embed ICC profiles +/** Parameter to \c #kAIExportDocumentAction for PDF. True to embed fonts. */ +const ActionParamKeyID kAIPDFEmbedFontsKey = 'embd'; // bool, embed fonts **TO BE REMOVED** +/** Parameter to \c #kAIExportDocumentAction for PDF. True to subset fonts. */ +const ActionParamKeyID kAIPDFSubsetFontsKey = 'sbst'; // bool, subset fonts **TO BE REMOVED** +/** Parameter to \c #kAIExportDocumentAction for PDF. The ratio for font subsets. */ +const ActionParamKeyID kAIPDFSubsetFontsRatioKey = 'rato'; // real, subset fonts ratio + +/** Parameter to \c #kAIExportDocumentAction for PDF. True to generate Acrobat layers. */ +const ActionParamKeyID kAIPDFGenerateAcrobatLayersKey = 'aclr'; // bool, generate Acrobat layers +/** Parameter to \c #kAIExportDocumentAction for PDF. The overprint style, an \c #AIPDFOverprintOptions value. */ +const ActionParamKeyID kAIPDFOverprintKey = 'pvop'; // enum, overprint +/** Parameter to \c #kAIExportDocumentAction for PDF. The flattening style, an \c #AIPDFFlattenStyle value. */ +const ActionParamKeyID kAIPDFFlatteningStyleKey = 'flsy'; // enum, AIPDFFlatteningStyle +/** Parameter to \c #kAIExportDocumentAction for PDF. The flattening style name, a descriptive string.*/ +const ActionParamKeyID kAIPDFFlatteningStyleNameKey = 'flsn'; // string, descriptive + +/** Parameter to \c #kAIExportDocumentAction for PDF. The maximum resolution for flattening (DPI). */ +const ActionParamKeyID kAIPDFFlattenMaxResolutionKey = 'fmax'; // real, flattening style max resolution +/** Parameter to \c #kAIExportDocumentAction for PDF. The minimum resolution for flattening (DPI). */ +const ActionParamKeyID kAIPDFFlattenMinResolutionKey = 'fmin'; // real, flattening style min resolution +/** Parameter to \c #kAIExportDocumentAction for PDF. The vector balance for flattening. */ +const ActionParamKeyID kAIPDFFlattenVectorBalanceKey = 'fvba'; // int, flattening style vector balance +/** Parameter to \c #kAIExportDocumentAction for PDF. True to clip complex regions when flattening. */ +const ActionParamKeyID kAIPDFFlattenClipComplexRegionsKey = 'fccr'; // bool, flattening style clip complex regions +/** Parameter to \c #kAIExportDocumentAction for PDF. True to anti alias rasters when flattening. */ +const ActionParamKeyID kAIPDFFlattenAntiAliasKey = 'fcaa'; // bool, flattening style anti alias option +/** Parameter to \c #kAIExportDocumentAction for PDF. True to outline strokes when flattening. */ +const ActionParamKeyID kAIPDFFlattenOutlineStrokesKey = 'fosk'; // bool, flattening style outline strokes +/** Parameter to \c #kAIExportDocumentAction for PDF. True to outline text when flattening. */ +const ActionParamKeyID kAIPDFFlattenOutlineTextKey = 'fotx'; // bool, flattening style outline text +/** Parameter to \c #kAIExportDocumentAction for PDF. The printer resolution for flattening (DPI). */ +const ActionParamKeyID kAIPDFFlattenPrinterResolutionKey = 'fprs'; // real, flattening style printer resolution + +/** Parameter to \c #kAIExportDocumentAction for PDF. True to include user password protection. */ +const ActionParamKeyID kAIPDFUserPasswordRequiredKey = 'usrq'; // bool, user password +/** Parameter to \c #kAIExportDocumentAction for PDF. The user password string. */ +const ActionParamKeyID kAIPDFUserPasswordKey = 'usps'; // string, user password +/** Parameter to \c #kAIExportDocumentAction for PDF. The to include Permissions Password protection. */ +const ActionParamKeyID kAIPDFPermissionsPasswordRequiredKey = 'msrq'; // bool, Permissions Password +/** Parameter to \c #kAIExportDocumentAction for PDF. The Permissions Password string. */ +const ActionParamKeyID kAIPDFPermissionsPasswordKey = 'msps'; // string, Permissions Password + +/** Parameter to \c #kAIExportDocumentAction for PDF. The type of printing allowed, an \c #AIPDFPrintingPermit value. */ +const ActionParamKeyID kAIPDFPrintingPermKey = 'pmpr'; // enum, Printing Allowed +/** Parameter to \c #kAIExportDocumentAction for PDF. The type of editing allowed, an \c #AIPDFChangesPermit value. */ +const ActionParamKeyID kAIPDFChangesPermKey = 'pmch'; // enum, Changes Allowed + +/** Parameter to \c #kAIExportDocumentAction for PDF. True to allow copying (with 128-bit encryption). */ +const ActionParamKeyID kAIPDFEnableCopyKey = 'ebcp'; // bool, Enable copying (128-bit) +/** Parameter to \c #kAIExportDocumentAction for PDF. True to allow access (with 128-bit encryption). */ +const ActionParamKeyID kAIPDFEnableAccessKey = 'ebac'; // bool, Enable access (128-bit) +/** Parameter to \c #kAIExportDocumentAction for PDF. True to allow copying and access (with 40-bit encryption). */ +const ActionParamKeyID kAIPDFEnableCopyAccessKey = 'ebca'; // bool, Enable copying and access (40-bit) +/** Parameter to \c #kAIExportDocumentAction for PDF. True to allow plaintext metadata for an encrypted document. */ +const ActionParamKeyID kAIPDFEnablePlaintextMetaKey = 'ebpt'; // bool, Enable Plaintext Metadata + +/** Parameter to \c #kAIExportDocumentAction for PDF. True to include linked files. */ +const ActionParamKeyID kAIPDFIncludeLinkedFilesKey = 'link'; // bool, include linked files + + +#endif //_AIPDFFORMATACTION_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AISVGAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AISVGAction.h index 8a02190..9314de6 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AISVGAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AISVGAction.h @@ -1,173 +1,173 @@ -#ifndef _AISVGACTION_H_ -#define _AISVGACTION_H_ - -/* - * Name: AISVGAction.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator SVG Action Parameters. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#include "AIDocumentAction.h" -#include "AISVGTypes.h" - - -// ----------------------------------------------------------------------------- -// The following parameters can be specified when saving to SVG. To save a file -// as SVG issue an export action (kAISaveDocumentAsAction). Specify one of the -// formats and extensions below for the format key. -// ----------------------------------------------------------------------------- - -/** SVG-format parameter value for \c #kAIExportDocumentAction. - @param #kAIExportDocumentFormatKey The format to write, \c #kAISVGFileFormat - to export an uncompressed SVG file. */ -#define kAISVGFileFormat "svg file format" -/** SVG-format parameter value for \c #kAIExportDocumentAction. - @param #kAIExportDocumentExtensionKey The file extension, - \c #kAISVGFileFormatExtension for uncompressed SVG. */ -#define kAISVGFileFormatExtension "svg" - -/** SVG-format parameter value for \c #kAIExportDocumentAction. - @param #kAIExportDocumentFormatKey The format to write, \c #kAISVGCompressedFileFormat - to export a compressed SVG file. */ -#define kAISVGCompressedFileFormat "svg compressed file format" -/** SVG-format parameter value for \c #kAIExportDocumentAction. - @param #kAIExportDocumentExtensionKey The file extension, - \c #kAISVGCompressedFileFormatExtension for compressed SVG. */ -#define kAISVGCompressedFileFormatExtension "svgz" - -// Standard SVG Options -/** Parameter to \c #kAIExportDocumentAction for SVG. - The format for images in the SVG, an \c #AISVGImageFormats value */ -const ActionParamKeyID kAISVGImageFormatKey = 'iFmt'; // enum AIImageFormats -/** Parameter to \c #kAIExportDocumentAction for SVG. - The precision for number rounding, an \c #AISVGCoordinatePrecision value */ -const ActionParamKeyID kAISVGPrecisionKey = 'Prcs'; // enum AISVGCoordinatePrecision -/** Parameter to \c #kAIExportDocumentAction for SVG. - The type of SVG rendering, an \c #AISVGRendering value */ -const ActionParamKeyID kAISVGRenderingKey = 'Rndr'; // enum AISVGRendering -/** Parameter to \c #kAIExportDocumentAction for SVG. True to zoom. */ -const ActionParamKeyID kAISVGZoomKey = 'ZooM'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. True to use the system font. */ -const ActionParamKeyID kAISVGSystemFontKey = 'SYFt'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - Whether to subset fonts, an \c #AISVGFontSubsetting value */ -const ActionParamKeyID kAISVGFontSubsettingKey = 'FSbs'; // enum AISVGFontSubsetting -/** Parameter to \c #kAIExportDocumentAction for SVG. - Whether to embed fonts or create separate, linked files, an \c #AISVGFileLocation value */ -const ActionParamKeyID kAISVGFontLocationKey = 'FLct'; // enum AISVGFileLocation -/** Parameter to \c #kAIExportDocumentAction for SVG. - The character encoding, an \c #AISVGDocumentEncoding value */ -const ActionParamKeyID kAISVGEncodingKey = 'Encd'; // enum AISVGDocumentEncoding -/** Parameter to \c #kAIExportDocumentAction for SVG. - The file compression, an \c #AISVGFileCompression value */ -const ActionParamKeyID kAISVGCompressionKey = 'Cmzn'; // enum AISVGFileCompression -/** Parameter to \c #kAIExportDocumentAction for SVG. - How style information should be exported, an \c #AISVGStyle value */ -const ActionParamKeyID kAISVGStyleTypeKey = 'StTp'; // enum AISVGStyle -/** Parameter to \c #kAIExportDocumentAction for SVG. - What type of fonts to use, an \c #AISVGFontType value */ -const ActionParamKeyID kAISVGFontFormatKey = 'fFmt'; // enum AISVGFontType - - - -// Illustrator-specific SVG Options - -/** Parameter to \c #kAIExportDocumentAction for SVG. - Width unit, an \c #AISVGUnits value */ -const ActionParamKeyID kAISVGWidthUnitKey = 'WunT'; // enum AISVGUnits -/** Parameter to \c #kAIExportDocumentAction for SVG. - Height unit, an \c #AISVGUnits value */ -const ActionParamKeyID kAISVGHeightUnitKey = 'HunT'; // enum AISVGUnits -/** Parameter to \c #kAIExportDocumentAction for SVG. - Resolution unit, an \c #AISVGResolution value */ -const ActionParamKeyID kAISVGResolutionUnitKey = 'RzUt'; // enum AISVGResolution -/** Parameter to \c #kAIExportDocumentAction for SVG. - What types of fonts to embed, an \c #AISVGEmbedFontFormats value */ -const ActionParamKeyID kAISVGEmbedFontFormatsKey = 'EFFt'; // enum AISVGEmbedFontFormats -/** Parameter to \c #kAIExportDocumentAction for SVG. - Whether to embed or link images, an \c #AISVGRasterLocation value */ -const ActionParamKeyID kAISVGEmbedRasterLocationKey = 'RLoc'; // enum AISVGRasterLocation -/** Parameter to \c #kAIExportDocumentAction for SVG. - Resolution for images (in the unit specified by \c #kAISVGResolutionUnitKey) */ -const ActionParamKeyID kAISVGRasterResolutionKey = 'RsRl'; // integer -/** Parameter to \c #kAIExportDocumentAction for SVG. - Gradient tolerance. */ -const ActionParamKeyID kAISVGGradientTolerenceKey = 'GrTl'; // real -/** Parameter to \c #kAIExportDocumentAction for SVG. - How to treat text in paths, an \c #AISVGTextOnPath value */ -const ActionParamKeyID kAISVGTextOnPathKey = 'ToPt'; // enum AISVGTextOnPath -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to constrain proportions. */ -const ActionParamKeyID kAISVGExportConstrainProportionsKey = 'Cstp'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to clip to the artboard. */ -const ActionParamKeyID kAISVGExportClipToArtboardKey = 'CTab'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to round-trip. */ -const ActionParamKeyID kAISVGExportRoundTripKey = 'Rrtr'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to include the Adobe namespace. */ -const ActionParamKeyID kAISVGIncludeAdobeNameSpaceKey = 'Anxp'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to include a template. */ -const ActionParamKeyID kAISVGIncludeTemplateKey = 'Temt'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - The rectangle to use as the viewing box, an \c #AISVGRect. */ -const ActionParamKeyID kAISVGViewBoxKey = 'VieW'; // data AISVGRect -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to include round-trip data. */ -const ActionParamKeyID kAISVGIncludePGFKey = 'Ipgf'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to include XMP metadata. */ -const ActionParamKeyID kAISVGIncludeXAPKey = 'IXAP'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to include slicing information. */ -const ActionParamKeyID kAISVGIncludeSlicesKey = 'ISlc'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - The SVG DTD to use, an \c #AISVGDTD value */ -const ActionParamKeyID kAISVGDTDKey = 'DTDt'; // enum AISVGDTD -/** Parameter to \c #kAIExportDocumentAction for SVG. - The font type to use, an \c #AISVGFontType value. */ -const ActionParamKeyID kAISVGFontTypeKey = 'FTKt'; // enum AISVGFontType -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to include automatic kerning data. */ -const ActionParamKeyID kAISVGDisbleAutoKerningKey = 'IDAK'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to SVG Text On Path, false to write each character separately. */ -const ActionParamKeyID kAISVGUseSVGTextOnPathKey = 'ITOP'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True when a component is being copied onto the clipboard, false when complete design being exported. */ -const ActionParamKeyID kCopyingSVG = 'Copy'; //bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to include unused styles also. */ -const ActionParamKeyID kAISVGIncludeUnusedStylesKey = 'IUSt'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - True to generate responsive SVG. */ -const ActionParamKeyID kAISVGGenerateResponsiveSVGKey = 'GRSv'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. - Object names (IDs) to use, an \c #AISVGIdType value. */ -const ActionParamKeyID kAISVGIdTypeKey = 'IdTK'; // enum AISVGIdType -/** Parameter to \c #kAIExportDocumentAction for SVG. -True to create minified SVG */ -const ActionParamKeyID kAISVGMinifyKey = 'mnfy'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. -True to create responsive SVG */ -const ActionParamKeyID kAISVGResponsiveKey = 'rpsv'; // bool -/** Parameter to \c #kAIExportDocumentAction for SVG. -True to identify the action as export */ -const ActionParamKeyID kAISVGExportActionKey = 'SiEK'; //bool - -#endif // _AISVGACTION_H_ +#ifndef _AISVGACTION_H_ +#define _AISVGACTION_H_ + +/* + * Name: AISVGAction.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator SVG Action Parameters. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2014 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#include "AIDocumentAction.h" +#include "AISVGTypes.h" + + +// ----------------------------------------------------------------------------- +// The following parameters can be specified when saving to SVG. To save a file +// as SVG issue an export action (kAISaveDocumentAsAction). Specify one of the +// formats and extensions below for the format key. +// ----------------------------------------------------------------------------- + +/** SVG-format parameter value for \c #kAIExportDocumentAction. + @param #kAIExportDocumentFormatKey The format to write, \c #kAISVGFileFormat + to export an uncompressed SVG file. */ +#define kAISVGFileFormat "svg file format" +/** SVG-format parameter value for \c #kAIExportDocumentAction. + @param #kAIExportDocumentExtensionKey The file extension, + \c #kAISVGFileFormatExtension for uncompressed SVG. */ +#define kAISVGFileFormatExtension "svg" + +/** SVG-format parameter value for \c #kAIExportDocumentAction. + @param #kAIExportDocumentFormatKey The format to write, \c #kAISVGCompressedFileFormat + to export a compressed SVG file. */ +#define kAISVGCompressedFileFormat "svg compressed file format" +/** SVG-format parameter value for \c #kAIExportDocumentAction. + @param #kAIExportDocumentExtensionKey The file extension, + \c #kAISVGCompressedFileFormatExtension for compressed SVG. */ +#define kAISVGCompressedFileFormatExtension "svgz" + +// Standard SVG Options +/** Parameter to \c #kAIExportDocumentAction for SVG. + The format for images in the SVG, an \c #AISVGImageFormats value */ +const ActionParamKeyID kAISVGImageFormatKey = 'iFmt'; // enum AIImageFormats +/** Parameter to \c #kAIExportDocumentAction for SVG. + The precision for number rounding, an \c #AISVGCoordinatePrecision value */ +const ActionParamKeyID kAISVGPrecisionKey = 'Prcs'; // enum AISVGCoordinatePrecision +/** Parameter to \c #kAIExportDocumentAction for SVG. + The type of SVG rendering, an \c #AISVGRendering value */ +const ActionParamKeyID kAISVGRenderingKey = 'Rndr'; // enum AISVGRendering +/** Parameter to \c #kAIExportDocumentAction for SVG. True to zoom. */ +const ActionParamKeyID kAISVGZoomKey = 'ZooM'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. True to use the system font. */ +const ActionParamKeyID kAISVGSystemFontKey = 'SYFt'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + Whether to subset fonts, an \c #AISVGFontSubsetting value */ +const ActionParamKeyID kAISVGFontSubsettingKey = 'FSbs'; // enum AISVGFontSubsetting +/** Parameter to \c #kAIExportDocumentAction for SVG. + Whether to embed fonts or create separate, linked files, an \c #AISVGFileLocation value */ +const ActionParamKeyID kAISVGFontLocationKey = 'FLct'; // enum AISVGFileLocation +/** Parameter to \c #kAIExportDocumentAction for SVG. + The character encoding, an \c #AISVGDocumentEncoding value */ +const ActionParamKeyID kAISVGEncodingKey = 'Encd'; // enum AISVGDocumentEncoding +/** Parameter to \c #kAIExportDocumentAction for SVG. + The file compression, an \c #AISVGFileCompression value */ +const ActionParamKeyID kAISVGCompressionKey = 'Cmzn'; // enum AISVGFileCompression +/** Parameter to \c #kAIExportDocumentAction for SVG. + How style information should be exported, an \c #AISVGStyle value */ +const ActionParamKeyID kAISVGStyleTypeKey = 'StTp'; // enum AISVGStyle +/** Parameter to \c #kAIExportDocumentAction for SVG. + What type of fonts to use, an \c #AISVGFontType value */ +const ActionParamKeyID kAISVGFontFormatKey = 'fFmt'; // enum AISVGFontType + + + +// Illustrator-specific SVG Options + +/** Parameter to \c #kAIExportDocumentAction for SVG. + Width unit, an \c #AISVGUnits value */ +const ActionParamKeyID kAISVGWidthUnitKey = 'WunT'; // enum AISVGUnits +/** Parameter to \c #kAIExportDocumentAction for SVG. + Height unit, an \c #AISVGUnits value */ +const ActionParamKeyID kAISVGHeightUnitKey = 'HunT'; // enum AISVGUnits +/** Parameter to \c #kAIExportDocumentAction for SVG. + Resolution unit, an \c #AISVGResolution value */ +const ActionParamKeyID kAISVGResolutionUnitKey = 'RzUt'; // enum AISVGResolution +/** Parameter to \c #kAIExportDocumentAction for SVG. + What types of fonts to embed, an \c #AISVGEmbedFontFormats value */ +const ActionParamKeyID kAISVGEmbedFontFormatsKey = 'EFFt'; // enum AISVGEmbedFontFormats +/** Parameter to \c #kAIExportDocumentAction for SVG. + Whether to embed or link images, an \c #AISVGRasterLocation value */ +const ActionParamKeyID kAISVGEmbedRasterLocationKey = 'RLoc'; // enum AISVGRasterLocation +/** Parameter to \c #kAIExportDocumentAction for SVG. + Resolution for images (in the unit specified by \c #kAISVGResolutionUnitKey) */ +const ActionParamKeyID kAISVGRasterResolutionKey = 'RsRl'; // integer +/** Parameter to \c #kAIExportDocumentAction for SVG. + Gradient tolerance. */ +const ActionParamKeyID kAISVGGradientTolerenceKey = 'GrTl'; // real +/** Parameter to \c #kAIExportDocumentAction for SVG. + How to treat text in paths, an \c #AISVGTextOnPath value */ +const ActionParamKeyID kAISVGTextOnPathKey = 'ToPt'; // enum AISVGTextOnPath +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to constrain proportions. */ +const ActionParamKeyID kAISVGExportConstrainProportionsKey = 'Cstp'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to clip to the artboard. */ +const ActionParamKeyID kAISVGExportClipToArtboardKey = 'CTab'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to round-trip. */ +const ActionParamKeyID kAISVGExportRoundTripKey = 'Rrtr'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to include the Adobe namespace. */ +const ActionParamKeyID kAISVGIncludeAdobeNameSpaceKey = 'Anxp'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to include a template. */ +const ActionParamKeyID kAISVGIncludeTemplateKey = 'Temt'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + The rectangle to use as the viewing box, an \c #AISVGRect. */ +const ActionParamKeyID kAISVGViewBoxKey = 'VieW'; // data AISVGRect +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to include round-trip data. */ +const ActionParamKeyID kAISVGIncludePGFKey = 'Ipgf'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to include XMP metadata. */ +const ActionParamKeyID kAISVGIncludeXAPKey = 'IXAP'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to include slicing information. */ +const ActionParamKeyID kAISVGIncludeSlicesKey = 'ISlc'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + The SVG DTD to use, an \c #AISVGDTD value */ +const ActionParamKeyID kAISVGDTDKey = 'DTDt'; // enum AISVGDTD +/** Parameter to \c #kAIExportDocumentAction for SVG. + The font type to use, an \c #AISVGFontType value. */ +const ActionParamKeyID kAISVGFontTypeKey = 'FTKt'; // enum AISVGFontType +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to include automatic kerning data. */ +const ActionParamKeyID kAISVGDisbleAutoKerningKey = 'IDAK'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to SVG Text On Path, false to write each character separately. */ +const ActionParamKeyID kAISVGUseSVGTextOnPathKey = 'ITOP'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True when a component is being copied onto the clipboard, false when complete design being exported. */ +const ActionParamKeyID kCopyingSVG = 'Copy'; //bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to include unused styles also. */ +const ActionParamKeyID kAISVGIncludeUnusedStylesKey = 'IUSt'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + True to generate responsive SVG. */ +const ActionParamKeyID kAISVGGenerateResponsiveSVGKey = 'GRSv'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. + Object names (IDs) to use, an \c #AISVGIdType value. */ +const ActionParamKeyID kAISVGIdTypeKey = 'IdTK'; // enum AISVGIdType +/** Parameter to \c #kAIExportDocumentAction for SVG. +True to create minified SVG */ +const ActionParamKeyID kAISVGMinifyKey = 'mnfy'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. +True to create responsive SVG */ +const ActionParamKeyID kAISVGResponsiveKey = 'rpsv'; // bool +/** Parameter to \c #kAIExportDocumentAction for SVG. +True to identify the action as export */ +const ActionParamKeyID kAISVGExportActionKey = 'SiEK'; //bool + +#endif // _AISVGACTION_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AISliceAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AISliceAction.h index cc03802..8a229cf 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AISliceAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AISliceAction.h @@ -1,116 +1,116 @@ -#ifndef _AISLICEACTION_H_ -#define _AISLICEACTION_H_ - -/* - * Name: AISliceAction.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Actions for slicing. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - -/** Types of slice actions, an integer, the type of action to take. - See \c #AIActionManagerSuite::AIActionGetType(). - Implemented types are: -
\c #kAICreateSliceActionType, -
\c #kAIDeleteAllSliceActionType, -
\c #kAIClipToArtboardSliceActionType - */ -const ActionParamKeyID kAISliceActionType = 'ATYP'; // integer - -// for the type parameter -enum -{ - /** \c #kAISliceActionType value, type parameter for slice actions: No action */ - kAINoActionType = 0, - /** Not implemented */ - kAIMakeSliceActionType = 1, // unimplemented - /** Not implemented */ - kAIReleaseSliceActionType, // unimplemented - /** Not implemented */ - kAICreateSliceFromGuidesActionType, // unimplemented - /** Not implemented */ - kAICreateSliceFromSelectionActionType, // unimplemented - /** Not implemented */ - kAICreateSliceFromTextActionType, // unimplemented - /** \c #kAISliceActionType value, type parameter for slice actions: Create slice */ - kAICreateSliceActionType, - /** Not implemented */ - kAISelectSliceActionType, // unimplemented - /** Not implemented */ - kAIDuplicateSliceActionType, // unimplemented - /** Not implemented */ - kAICombineSliceActionType, // unimplemented - /** \c #kAISliceActionType value, type parameter for slice actions: Delete all slices */ - kAIDeleteAllSliceActionType, - /** Not implemented */ - kAIDivideSliceActionType, // unimplemented - /** Not implemented */ - kAIOptionsSliceActionType, // unimplemented - /** \c #kAISliceActionType value, type parameter for slice actions: Clip slice to artboard */ - kAIClipToArtboardSliceActionType, - /** Not implemented */ - kAILockSliceActionType // unimplemented -}; - -/** @ingroup Actions - Creates a slice. - @param #kAISliceActionBoundsLeftKey Integer, the left boundary - of the slice in page coordinates. - @param #kAISliceActionBoundsBottomKey Integer, the bottom boundary - of the slice in page coordinates. - @param #kAISliceActionBoundsRightKey Integer, the right boundary - of the slice in page coordinates. - @param #kAISliceActionBoundsTopKey Integer, the top boundary - of the slice in page coordinates. - */ -#define kAICreateSliceAction "AISlice Create Action" - -/** Parameter for \c #kAICreateSliceAction. Integer, the left boundary - of the slice in page coordinates. */ -const ActionParamKeyID kAISliceActionBoundsLeftKey = 'left'; // integer -/** Parameter for \c #kAICreateSliceAction. Integer, the bottom boundary - of the slice in page coordinates. */ -const ActionParamKeyID kAISliceActionBoundsBottomKey = 'bttm'; // integer -/** Parameter for \c #kAICreateSliceAction. Integer, the right boundary - of the slice in page coordinates. */ -const ActionParamKeyID kAISliceActionBoundsRightKey = 'rght'; // integer -/** Parameter for \c #kAICreateSliceAction. Integer, the top boundary - of the slice in page coordinates. */ -const ActionParamKeyID kAISliceActionBoundsTopKey = 'top '; // integer - -/** @ingroup Actions - Deletes all slices in the current document. No parameters. */ - -#define kAIDeleteAllSliceAction "AISlice Delete All Action" - -/** @ingroup Actions - Sets clipping for the sliced region. - @param #kAIClipOn When true, sets the sliced region to the artboard. - When false, sets the sliced region to the object bounds. - */ -#define kAIClipToArtboardSliceAction "AISlice Clip To Artboard Action" - -/** Parameter for \c #kAIClipToArtboardSliceAction. - When true, sets the sliced region to the artboard. - When false, sets the sliced region to the object bounds. */ -const ActionParamKeyID kAIClipOn = 'clip'; // bool - - - +#ifndef _AISLICEACTION_H_ +#define _AISLICEACTION_H_ + +/* + * Name: AISliceAction.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator 10.0 Actions for slicing. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2001-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + +/** Types of slice actions, an integer, the type of action to take. + See \c #AIActionManagerSuite::AIActionGetType(). + Implemented types are: +
\c #kAICreateSliceActionType, +
\c #kAIDeleteAllSliceActionType, +
\c #kAIClipToArtboardSliceActionType + */ +const ActionParamKeyID kAISliceActionType = 'ATYP'; // integer + +// for the type parameter +enum +{ + /** \c #kAISliceActionType value, type parameter for slice actions: No action */ + kAINoActionType = 0, + /** Not implemented */ + kAIMakeSliceActionType = 1, // unimplemented + /** Not implemented */ + kAIReleaseSliceActionType, // unimplemented + /** Not implemented */ + kAICreateSliceFromGuidesActionType, // unimplemented + /** Not implemented */ + kAICreateSliceFromSelectionActionType, // unimplemented + /** Not implemented */ + kAICreateSliceFromTextActionType, // unimplemented + /** \c #kAISliceActionType value, type parameter for slice actions: Create slice */ + kAICreateSliceActionType, + /** Not implemented */ + kAISelectSliceActionType, // unimplemented + /** Not implemented */ + kAIDuplicateSliceActionType, // unimplemented + /** Not implemented */ + kAICombineSliceActionType, // unimplemented + /** \c #kAISliceActionType value, type parameter for slice actions: Delete all slices */ + kAIDeleteAllSliceActionType, + /** Not implemented */ + kAIDivideSliceActionType, // unimplemented + /** Not implemented */ + kAIOptionsSliceActionType, // unimplemented + /** \c #kAISliceActionType value, type parameter for slice actions: Clip slice to artboard */ + kAIClipToArtboardSliceActionType, + /** Not implemented */ + kAILockSliceActionType // unimplemented +}; + +/** @ingroup Actions + Creates a slice. + @param #kAISliceActionBoundsLeftKey Integer, the left boundary + of the slice in page coordinates. + @param #kAISliceActionBoundsBottomKey Integer, the bottom boundary + of the slice in page coordinates. + @param #kAISliceActionBoundsRightKey Integer, the right boundary + of the slice in page coordinates. + @param #kAISliceActionBoundsTopKey Integer, the top boundary + of the slice in page coordinates. + */ +#define kAICreateSliceAction "AISlice Create Action" + +/** Parameter for \c #kAICreateSliceAction. Integer, the left boundary + of the slice in page coordinates. */ +const ActionParamKeyID kAISliceActionBoundsLeftKey = 'left'; // integer +/** Parameter for \c #kAICreateSliceAction. Integer, the bottom boundary + of the slice in page coordinates. */ +const ActionParamKeyID kAISliceActionBoundsBottomKey = 'bttm'; // integer +/** Parameter for \c #kAICreateSliceAction. Integer, the right boundary + of the slice in page coordinates. */ +const ActionParamKeyID kAISliceActionBoundsRightKey = 'rght'; // integer +/** Parameter for \c #kAICreateSliceAction. Integer, the top boundary + of the slice in page coordinates. */ +const ActionParamKeyID kAISliceActionBoundsTopKey = 'top '; // integer + +/** @ingroup Actions + Deletes all slices in the current document. No parameters. */ + +#define kAIDeleteAllSliceAction "AISlice Delete All Action" + +/** @ingroup Actions + Sets clipping for the sliced region. + @param #kAIClipOn When true, sets the sliced region to the artboard. + When false, sets the sliced region to the object bounds. + */ +#define kAIClipToArtboardSliceAction "AISlice Clip To Artboard Action" + +/** Parameter for \c #kAIClipToArtboardSliceAction. + When true, sets the sliced region to the artboard. + When false, sets the sliced region to the object bounds. */ +const ActionParamKeyID kAIClipOn = 'clip'; // bool + + + #endif // _AISLICEACTION_H_ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITextAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITextAction.h index 7df593a..4ff1d51 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITextAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITextAction.h @@ -1,301 +1,301 @@ -#ifndef _AICORETEXTACTION_H_ -#define _AICORETEXTACTION_H_ - -/* - * Name: AICoreTextAction.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Actions defined in the core. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - - -/** @ingroup Actions - Sets the font for subsequently created text, or for selected text. - @param #kAISetTextFontKey The font name string. - @param #kAISetTextFontFamilyKey (Not used) The font family string. - @param #kAISetTextFontStyleKey (Not used) The font style string. - */ -#define kAISetTextFontAction "adobe_font" - -/** Parameter for \c #kAISetTextFontAction: The font name string. */ -const ActionParamKeyID kAISetTextFontKey = 'font'; // string -/** Parameter for \c #kAISetTextFontAction: (Not used) The font family string. */ -const ActionParamKeyID kAISetTextFontFamilyKey = 'fmly'; // string -/** Parameter for \c #kAISetTextFontAction: (Not used) The font style string. */ -const ActionParamKeyID kAISetTextFontStyleKey = 'styl'; // string - -/** @ingroup Actions - Sets the text size for subsequently created text, or for selected text. - @param #kAISetTextSizeKey The font size. - */ -#define kAISetTextSizeAction "adobe_fontsize" - -/** Parameter for \c #kAISetTextSizeAction: The font size, a real number. */ -const ActionParamKeyID kAISetTextSizeKey = 'size'; // real - - -/** @ingroup Actions - Toggles whether hidden characters are displayed in the current document. */ -#define kAIShowHiddenCharactersAction "adobe_showHiddenChar" - - -/** @ingroup Actions - Sets the text orientation for the current document. - @param #kAISetTextOrientationKey The orientation, 0 for horizontal, - 1 for vertical. - */ -#define kAISetTextOrientationAction "adobe_textOrientation" - -/** Parameter for \c #kAISetTextOrientationAction: The orientation, 0 for horizontal, - 1 for vertical. */ -const ActionParamKeyID kAISetTextOrientationKey = 'horz'; // enum - -/** @ingroup Actions - Creates outlines from the selected text. */ -#define kAICreateOutlinesFromTextAction "adobe_createOutline" - -/** @ingroup Actions - Fits headline text in the current document. */ -#define kAIFitHeadlineAction "adobe_fitHeadline" - -/** @ingroup Actions - Links text blocks. */ -#define kAILinkTextBlocksAction "adobe_linkText" -/** @ingroup Actions - Unlinks text blocks. */ -#define kAIUnlinkTextBlocksAction "adobe_unlinkText" - -/** @ingroup Actions - Turns on text wrapping in the current document. */ -#define kAIMakeTextWrapAction "adobe_makeWrap" -/** @ingroup Actions - Turns off text wrapping in the current document. */ -#define kAIReleaseTextWrapAction "adobe_releaseWrap" - -#define kAITypeConversionAction "adobe_typeConversion" - -/** @ingroup Actions - Sets the current paragraph style for the current document. - @param #kAISetParagraphStyleAlignmentKey Alignment, an alignment value. - @param #kAISetParagraphStyleJustifyLastLineKey True to justify the last line. - - @param #kAISetParagraphStyleHangingPunctuationKey True to allow hanging punctuation. - @param #kAISetParagraphStyleAutoHyphenationKey True to do automatic hyphenation. - - @param #kAISetParagraphStyleLeftIndentKey Left indent in document points. - @param #kAISetParagraphStyleRightIndentKey Right indent in document points. - @param #kAISetParagraphStyleIndentFirstKey First-line indent in document points. - - @param #kAISetParagraphStyleSpaceBeforeKey Line space before paragraph in document points. - - @param #kAISetParagraphStyleMinimumWordSpacingKey Minimum word spacing in document points. - @param #kAISetParagraphStyleMaximumWordSpacingKey Maximum word spacing in document points. - @param #kAISetParagraphStyleOptimalWordSpacingKey Optimal word spacing in document points. - - @param #kAISetParagraphStyleMinimumLetterSpacingKey Minimum letter spacing in document points. - @param #kAISetParagraphStyleMaximumLetterSpacingKey Maximum letter spacing in document points. - @param #kAISetParagraphStyleOptimalLetterSpacingKey Optimal letter spacing in document points. - - @param #kAISetParagraphStyleMinimumCharsBeforeHyphenKey Minimum number of characters before a hyphen. - @param #kAISetParagraphStyleMinimumCharsAfterHyphenKey Maximum number of characters before a hyphen. - @param #kAISetParagraphStyleMaximumConsecutiveHyphensKey Maximum number of consecutive hyphens. - - @param #kAISetParagraphStyleProcessRepeatCharactersKey True to process repeat characters. - @param #kAISetParagraphStyleBindingPunctuationKey True to use binding punctuation. - @param #kAISetParagraphStyleCJKBindingPunctuationTypeKey The binding punctuation type - to use with Asian character sets. - @param #kAISetParagraphStyleCJKDontSqueezePeriodKey True to not squeeze periods - with Asian character sets. - @param #kAISetParagraphStyleCJKBindContinuousCharsKey True to bind continuous characters - with Asian character sets. - @param #kAISetParagraphStyleCJKDontAdjustContinuousCharsKey True to not adjust continuous - characters with Asian character sets. - @param #kAISetParagraphStyleCJKHangCharsAlwaysHangKey True to let hanging characters - hang with Asian character sets. - */ -#define kAISetParagraphStyleAction "adobe_paragraphPalette" - -/** Parameter for \c #kAISetParagraphStyleAction: Alignment, an alignment value. */ -const ActionParamKeyID kAISetParagraphStyleAlignmentKey = 'alin'; // enum -/** Parameter for \c #kAISetParagraphStyleAction: True to justify the last line. */ -const ActionParamKeyID kAISetParagraphStyleJustifyLastLineKey = 'last'; // bool - -/** Parameter for \c #kAISetParagraphStyleAction: True to allow hanging punctuation. */ -const ActionParamKeyID kAISetParagraphStyleHangingPunctuationKey = 'hang'; // bool -/** Parameter for \c #kAISetParagraphStyleAction: True to do automatic hyphenation. */ -const ActionParamKeyID kAISetParagraphStyleAutoHyphenationKey = 'auto'; // bool - -/** Parameter for \c #kAISetParagraphStyleAction: Left indent in document points. */ -const ActionParamKeyID kAISetParagraphStyleLeftIndentKey = 'left'; // real -/** Parameter for \c #kAISetParagraphStyleAction: Right indent in document points. */ -const ActionParamKeyID kAISetParagraphStyleRightIndentKey = 'rit.'; // real -/** Parameter for \c #kAISetParagraphStyleAction: First-line indent in document points. */ -const ActionParamKeyID kAISetParagraphStyleIndentFirstKey = 'flft'; // real - -/** Parameter for \c #kAISetParagraphStyleAction: Line space before paragraph in document points. */ -const ActionParamKeyID kAISetParagraphStyleSpaceBeforeKey = 'pspc'; // real - -/** Parameter for \c #kAISetParagraphStyleAction: Minimum word spacing in document points. */ -const ActionParamKeyID kAISetParagraphStyleMinimumWordSpacingKey = 'miws'; // real -/** Parameter for \c #kAISetParagraphStyleAction: Maximum word spacing in document points. */ -const ActionParamKeyID kAISetParagraphStyleMaximumWordSpacingKey = 'maws'; // real -/** Parameter for \c #kAISetParagraphStyleAction: Optimal word spacing in document points. */ -const ActionParamKeyID kAISetParagraphStyleOptimalWordSpacingKey = 'dsws'; // real - -/** Parameter for \c #kAISetParagraphStyleAction: Minimum letter spacing in document points. */ -const ActionParamKeyID kAISetParagraphStyleMinimumLetterSpacingKey = 'mils'; // real -/** Parameter for \c #kAISetParagraphStyleAction: Maximum letter spacing in document points. */ -const ActionParamKeyID kAISetParagraphStyleMaximumLetterSpacingKey = 'mals'; // real -/** Parameter for \c #kAISetParagraphStyleAction: Optimal letter spacing in document points. */ -const ActionParamKeyID kAISetParagraphStyleOptimalLetterSpacingKey = 'dsls'; // real - -/** Parameter for \c #kAISetParagraphStyleAction: Minimum number of characters before a hyphen. */ -const ActionParamKeyID kAISetParagraphStyleMinimumCharsBeforeHyphenKey = 'lhyp'; // integer -/** Parameter for \c #kAISetParagraphStyleAction: Maximum number of characters before a hyphen. */ -const ActionParamKeyID kAISetParagraphStyleMinimumCharsAfterHyphenKey = 'thyp'; // integer -/** Parameter for \c #kAISetParagraphStyleAction: Maximum number of consecutive hyphens. */ -const ActionParamKeyID kAISetParagraphStyleMaximumConsecutiveHyphensKey = 'hlns'; // integer - -/** Parameter for \c #kAISetParagraphStyleAction: True to process repeat characters. */ -const ActionParamKeyID kAISetParagraphStyleProcessRepeatCharactersKey = 'rpet'; // bool -/** Parameter for \c #kAISetParagraphStyleAction: True to use binding punctuation. */ -const ActionParamKeyID kAISetParagraphStyleBindingPunctuationKey = 'punc'; // bool -/** Parameter for \c #kAISetParagraphStyleAction: The binding punctuation type - to use with Asian character sets. */ -const ActionParamKeyID kAISetParagraphStyleCJKBindingPunctuationTypeKey = 'punc'; // enum -/** Parameter for \c #kAISetParagraphStyleAction: True to not squeeze periods with Asian character sets. */ -const ActionParamKeyID kAISetParagraphStyleCJKDontSqueezePeriodKey = 'squz'; // bool -/** Parameter for \c #kAISetParagraphStyleAction: True to bind continuous characters with Asian character sets. */ -const ActionParamKeyID kAISetParagraphStyleCJKBindContinuousCharsKey = 'bind'; // bool -/** Parameter for \c #kAISetParagraphStyleAction: True to not adjust continuous characters with Asian character sets. */ -const ActionParamKeyID kAISetParagraphStyleCJKDontAdjustContinuousCharsKey = 'adjs'; // bool -/** Parameter for \c #kAISetParagraphStyleAction: True to let hanging characters hang with Asian character sets. */ -const ActionParamKeyID kAISetParagraphStyleCJKHangCharsAlwaysHangKey = 'adjs'; // bool - -/** @ingroup Actions - Sets the current character style for the current document. - @param #kAISetCharacterStyleFontKey The font name string. - @param #kAISetCharacterStyleSizeKey The font size in document points. - @param #kAISetCharacterStyleTrackingKey Tracking. - @param #kAISetCharacterStyleAutoKerningKey Existence enables automatic kerning. - @param #kAISetCharacterStyleKerningKey Kerning value in document points. - @param #kAISetCharacterStyleAutoLeadingKey Existence enables automatic leading. - @param #kAISetCharacterStyleLeadingKey Leading value in document points. - @param #kAISetCharacterStyleHorizontalScaleKey Horizontal scaling factor in range [0..1] - @param #kAISetCharacterStyleVerticalScaleKey Vertical scaling factor in range [0..1] - @param #kAISetCharacterStyleBaselineShiftKey Baseline shift in document points. - @param #kAISetCharacterStyleLanguageKey The language, a language-code value. - @param #kAISetCharacterStyleDirectionKey The direction, a direction-code value. - @param #kAISetCharacterStyleMojiZumeKey True to use MojiZume. - @param #kAISetCharacterStyleWariChuKey True to use WariChu. - @param #kAISetCharacterStyleWariChuScaleKey The WariChu scaling factor in range [0..1] - @param #kAISetCharacterStyleKumiHanKey True to use KumiHan. - @param #kAISetCharacterStyleKumiWaJiKanKey The KumiWaJiKan value. - @param #kAISetCharacterStyleKumiWaOuKanKey The KumiWaOuKan value - */ - -#define kAISetCharacterStyleAction "adobe_characterPalette" - -/** Parameter for \c #kAISetCharacterStyleAction: The font name string. */ -const ActionParamKeyID kAISetCharacterStyleFontKey = 'font'; // string -/** Parameter for \c #kAISetCharacterStyleAction: The font size in document points. */ -const ActionParamKeyID kAISetCharacterStyleSizeKey = 'size'; // real -/** Parameter for \c #kAISetCharacterStyleAction: Tracking */ -const ActionParamKeyID kAISetCharacterStyleTrackingKey = 'trck'; // integer -/** Parameter for \c #kAISetCharacterStyleAction: Existence enables automatic kerning. */ -const ActionParamKeyID kAISetCharacterStyleAutoKerningKey = 'atke'; // existence enables autokern -/** Parameter for \c #kAISetCharacterStyleAction: Kerning value in document points. */ -const ActionParamKeyID kAISetCharacterStyleKerningKey = 'kern'; // integer -/** Parameter for \c #kAISetCharacterStyleAction: Existence enables automatic leading. */ -const ActionParamKeyID kAISetCharacterStyleAutoLeadingKey = 'atld'; // existence enables autolead -/** Parameter for \c #kAISetCharacterStyleAction: Leading value in document points. */ -const ActionParamKeyID kAISetCharacterStyleLeadingKey = 'lead'; // real -/** Parameter for \c #kAISetCharacterStyleAction: Horizontal scaling factor, where 1 is 100% */ -const ActionParamKeyID kAISetCharacterStyleHorizontalScaleKey = 'hori'; // real -/** Parameter for \c #kAISetCharacterStyleAction: Vertical scaling factor, where 1 is 100% */ -const ActionParamKeyID kAISetCharacterStyleVerticalScaleKey = 'vert'; // real -/** Parameter for \c #kAISetCharacterStyleAction: Baseline shift in document points. */ -const ActionParamKeyID kAISetCharacterStyleBaselineShiftKey = 'base'; // real -/** Parameter for \c #kAISetCharacterStyleAction: The language, a language-code value. */ -const ActionParamKeyID kAISetCharacterStyleLanguageKey = 'lang'; // enum -/** Parameter for \c #kAISetCharacterStyleAction: The direction, a direction-code value. */ -const ActionParamKeyID kAISetCharacterStyleDirectionKey = 'dirc'; // enum -/** Parameter for \c #kAISetCharacterStyleAction: True to use MojiZume. */ -const ActionParamKeyID kAISetCharacterStyleMojiZumeKey = 'mono'; // bool -/** Parameter for \c #kAISetCharacterStyleAction: True to use WariChu. */ -const ActionParamKeyID kAISetCharacterStyleWariChuKey = 'wari'; // bool -/** Parameter for \c #kAISetCharacterStyleAction: The WariChu scaling factor, where 1 is 100% */ -const ActionParamKeyID kAISetCharacterStyleWariChuScaleKey = 'scal'; // real -/** Parameter for \c #kAISetCharacterStyleAction: True to use KumiHan. */ -const ActionParamKeyID kAISetCharacterStyleKumiHanKey = 'lyot'; // bool -/** Parameter for \c #kAISetCharacterStyleAction: */ -const ActionParamKeyID kAISetCharacterStyleKumiWaJiKanKey = 'cjk.'; // real -/** Parameter for \c #kAISetCharacterStyleAction: */ -const ActionParamKeyID kAISetCharacterStyleKumiWaOuKanKey = 'cjk.'; // real - -// ----------------------------------------------------------------------------- -// Action: kAISetTabStopsAction -// Purpose: Set tab stops -// Parameters: -// - kAISetTabStopsPaletteOrientationKey, bool: -// - kAISetTabStopsNumberOfStopsKey, integer: -// - kAISetTabStopsAutoStopDeltaKey, real: -// Comments: -// -// ----------------------------------------------------------------------------- -/** @ingroup Actions - Sets tab stops for the current document. Each tab stop is - specified by two key entries constructed from a pair - of characters and the tab stop number 'n' as follows: - - makeLong('a', 'l', n) specifies the alignment - makeLong('p', 's', n) specifies the position - - where \c makeLong() is defined to be: -@code -unsigned long makeLong(char a, char b, int number){ - unsigned long rVal; - - if (number > 100 || number < 0) - return 0; - - rVal = a << 24; - rVal += b << 16; - rVal += (char)((number / 10 + 48)) << 8; - rVal += (number % 10 + 48); - - return rVal; -} - @endcode - @param #kAISetTabStopsPaletteOrientationKey True to set the tab-stop palette - orientation to horizontal, false for vertical. - @param #kAISetTabStopsNumberOfStopsKey The number of tab stops. - @param #kAISetTabStopsAutoStopDeltaKey An interval in document points for automatic tabs. - */ -#define kAISetTabStopsAction "adobe_tabruler" - -/** Parameter for \c #kAISetTabStopsAction: True to set the tab-stop palette orientation - to horizontal, false for vertical. */ -const ActionParamKeyID kAISetTabStopsPaletteOrientationKey = 'horz'; // bool -/** Parameter for \c #kAISetTabStopsAction: The number of tab stops. */ -const ActionParamKeyID kAISetTabStopsNumberOfStopsKey = 'num.'; // integer -/** Parameter for \c #kAISetTabStopsAction: An interval in document points for automatic tabs. */ -const ActionParamKeyID kAISetTabStopsAutoStopDeltaKey = 'dlta'; // real - -#endif +#ifndef _AICORETEXTACTION_H_ +#define _AICORETEXTACTION_H_ + +/* + * Name: AICoreTextAction.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator Actions defined in the core. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + + +/** @ingroup Actions + Sets the font for subsequently created text, or for selected text. + @param #kAISetTextFontKey The font name string. + @param #kAISetTextFontFamilyKey (Not used) The font family string. + @param #kAISetTextFontStyleKey (Not used) The font style string. + */ +#define kAISetTextFontAction "adobe_font" + +/** Parameter for \c #kAISetTextFontAction: The font name string. */ +const ActionParamKeyID kAISetTextFontKey = 'font'; // string +/** Parameter for \c #kAISetTextFontAction: (Not used) The font family string. */ +const ActionParamKeyID kAISetTextFontFamilyKey = 'fmly'; // string +/** Parameter for \c #kAISetTextFontAction: (Not used) The font style string. */ +const ActionParamKeyID kAISetTextFontStyleKey = 'styl'; // string + +/** @ingroup Actions + Sets the text size for subsequently created text, or for selected text. + @param #kAISetTextSizeKey The font size. + */ +#define kAISetTextSizeAction "adobe_fontsize" + +/** Parameter for \c #kAISetTextSizeAction: The font size, a real number. */ +const ActionParamKeyID kAISetTextSizeKey = 'size'; // real + + +/** @ingroup Actions + Toggles whether hidden characters are displayed in the current document. */ +#define kAIShowHiddenCharactersAction "adobe_showHiddenChar" + + +/** @ingroup Actions + Sets the text orientation for the current document. + @param #kAISetTextOrientationKey The orientation, 0 for horizontal, + 1 for vertical. + */ +#define kAISetTextOrientationAction "adobe_textOrientation" + +/** Parameter for \c #kAISetTextOrientationAction: The orientation, 0 for horizontal, + 1 for vertical. */ +const ActionParamKeyID kAISetTextOrientationKey = 'horz'; // enum + +/** @ingroup Actions + Creates outlines from the selected text. */ +#define kAICreateOutlinesFromTextAction "adobe_createOutline" + +/** @ingroup Actions + Fits headline text in the current document. */ +#define kAIFitHeadlineAction "adobe_fitHeadline" + +/** @ingroup Actions + Links text blocks. */ +#define kAILinkTextBlocksAction "adobe_linkText" +/** @ingroup Actions + Unlinks text blocks. */ +#define kAIUnlinkTextBlocksAction "adobe_unlinkText" + +/** @ingroup Actions + Turns on text wrapping in the current document. */ +#define kAIMakeTextWrapAction "adobe_makeWrap" +/** @ingroup Actions + Turns off text wrapping in the current document. */ +#define kAIReleaseTextWrapAction "adobe_releaseWrap" + +#define kAITypeConversionAction "adobe_typeConversion" + +/** @ingroup Actions + Sets the current paragraph style for the current document. + @param #kAISetParagraphStyleAlignmentKey Alignment, an alignment value. + @param #kAISetParagraphStyleJustifyLastLineKey True to justify the last line. + + @param #kAISetParagraphStyleHangingPunctuationKey True to allow hanging punctuation. + @param #kAISetParagraphStyleAutoHyphenationKey True to do automatic hyphenation. + + @param #kAISetParagraphStyleLeftIndentKey Left indent in document points. + @param #kAISetParagraphStyleRightIndentKey Right indent in document points. + @param #kAISetParagraphStyleIndentFirstKey First-line indent in document points. + + @param #kAISetParagraphStyleSpaceBeforeKey Line space before paragraph in document points. + + @param #kAISetParagraphStyleMinimumWordSpacingKey Minimum word spacing in document points. + @param #kAISetParagraphStyleMaximumWordSpacingKey Maximum word spacing in document points. + @param #kAISetParagraphStyleOptimalWordSpacingKey Optimal word spacing in document points. + + @param #kAISetParagraphStyleMinimumLetterSpacingKey Minimum letter spacing in document points. + @param #kAISetParagraphStyleMaximumLetterSpacingKey Maximum letter spacing in document points. + @param #kAISetParagraphStyleOptimalLetterSpacingKey Optimal letter spacing in document points. + + @param #kAISetParagraphStyleMinimumCharsBeforeHyphenKey Minimum number of characters before a hyphen. + @param #kAISetParagraphStyleMinimumCharsAfterHyphenKey Maximum number of characters before a hyphen. + @param #kAISetParagraphStyleMaximumConsecutiveHyphensKey Maximum number of consecutive hyphens. + + @param #kAISetParagraphStyleProcessRepeatCharactersKey True to process repeat characters. + @param #kAISetParagraphStyleBindingPunctuationKey True to use binding punctuation. + @param #kAISetParagraphStyleCJKBindingPunctuationTypeKey The binding punctuation type + to use with Asian character sets. + @param #kAISetParagraphStyleCJKDontSqueezePeriodKey True to not squeeze periods + with Asian character sets. + @param #kAISetParagraphStyleCJKBindContinuousCharsKey True to bind continuous characters + with Asian character sets. + @param #kAISetParagraphStyleCJKDontAdjustContinuousCharsKey True to not adjust continuous + characters with Asian character sets. + @param #kAISetParagraphStyleCJKHangCharsAlwaysHangKey True to let hanging characters + hang with Asian character sets. + */ +#define kAISetParagraphStyleAction "adobe_paragraphPalette" + +/** Parameter for \c #kAISetParagraphStyleAction: Alignment, an alignment value. */ +const ActionParamKeyID kAISetParagraphStyleAlignmentKey = 'alin'; // enum +/** Parameter for \c #kAISetParagraphStyleAction: True to justify the last line. */ +const ActionParamKeyID kAISetParagraphStyleJustifyLastLineKey = 'last'; // bool + +/** Parameter for \c #kAISetParagraphStyleAction: True to allow hanging punctuation. */ +const ActionParamKeyID kAISetParagraphStyleHangingPunctuationKey = 'hang'; // bool +/** Parameter for \c #kAISetParagraphStyleAction: True to do automatic hyphenation. */ +const ActionParamKeyID kAISetParagraphStyleAutoHyphenationKey = 'auto'; // bool + +/** Parameter for \c #kAISetParagraphStyleAction: Left indent in document points. */ +const ActionParamKeyID kAISetParagraphStyleLeftIndentKey = 'left'; // real +/** Parameter for \c #kAISetParagraphStyleAction: Right indent in document points. */ +const ActionParamKeyID kAISetParagraphStyleRightIndentKey = 'rit.'; // real +/** Parameter for \c #kAISetParagraphStyleAction: First-line indent in document points. */ +const ActionParamKeyID kAISetParagraphStyleIndentFirstKey = 'flft'; // real + +/** Parameter for \c #kAISetParagraphStyleAction: Line space before paragraph in document points. */ +const ActionParamKeyID kAISetParagraphStyleSpaceBeforeKey = 'pspc'; // real + +/** Parameter for \c #kAISetParagraphStyleAction: Minimum word spacing in document points. */ +const ActionParamKeyID kAISetParagraphStyleMinimumWordSpacingKey = 'miws'; // real +/** Parameter for \c #kAISetParagraphStyleAction: Maximum word spacing in document points. */ +const ActionParamKeyID kAISetParagraphStyleMaximumWordSpacingKey = 'maws'; // real +/** Parameter for \c #kAISetParagraphStyleAction: Optimal word spacing in document points. */ +const ActionParamKeyID kAISetParagraphStyleOptimalWordSpacingKey = 'dsws'; // real + +/** Parameter for \c #kAISetParagraphStyleAction: Minimum letter spacing in document points. */ +const ActionParamKeyID kAISetParagraphStyleMinimumLetterSpacingKey = 'mils'; // real +/** Parameter for \c #kAISetParagraphStyleAction: Maximum letter spacing in document points. */ +const ActionParamKeyID kAISetParagraphStyleMaximumLetterSpacingKey = 'mals'; // real +/** Parameter for \c #kAISetParagraphStyleAction: Optimal letter spacing in document points. */ +const ActionParamKeyID kAISetParagraphStyleOptimalLetterSpacingKey = 'dsls'; // real + +/** Parameter for \c #kAISetParagraphStyleAction: Minimum number of characters before a hyphen. */ +const ActionParamKeyID kAISetParagraphStyleMinimumCharsBeforeHyphenKey = 'lhyp'; // integer +/** Parameter for \c #kAISetParagraphStyleAction: Maximum number of characters before a hyphen. */ +const ActionParamKeyID kAISetParagraphStyleMinimumCharsAfterHyphenKey = 'thyp'; // integer +/** Parameter for \c #kAISetParagraphStyleAction: Maximum number of consecutive hyphens. */ +const ActionParamKeyID kAISetParagraphStyleMaximumConsecutiveHyphensKey = 'hlns'; // integer + +/** Parameter for \c #kAISetParagraphStyleAction: True to process repeat characters. */ +const ActionParamKeyID kAISetParagraphStyleProcessRepeatCharactersKey = 'rpet'; // bool +/** Parameter for \c #kAISetParagraphStyleAction: True to use binding punctuation. */ +const ActionParamKeyID kAISetParagraphStyleBindingPunctuationKey = 'punc'; // bool +/** Parameter for \c #kAISetParagraphStyleAction: The binding punctuation type + to use with Asian character sets. */ +const ActionParamKeyID kAISetParagraphStyleCJKBindingPunctuationTypeKey = 'punc'; // enum +/** Parameter for \c #kAISetParagraphStyleAction: True to not squeeze periods with Asian character sets. */ +const ActionParamKeyID kAISetParagraphStyleCJKDontSqueezePeriodKey = 'squz'; // bool +/** Parameter for \c #kAISetParagraphStyleAction: True to bind continuous characters with Asian character sets. */ +const ActionParamKeyID kAISetParagraphStyleCJKBindContinuousCharsKey = 'bind'; // bool +/** Parameter for \c #kAISetParagraphStyleAction: True to not adjust continuous characters with Asian character sets. */ +const ActionParamKeyID kAISetParagraphStyleCJKDontAdjustContinuousCharsKey = 'adjs'; // bool +/** Parameter for \c #kAISetParagraphStyleAction: True to let hanging characters hang with Asian character sets. */ +const ActionParamKeyID kAISetParagraphStyleCJKHangCharsAlwaysHangKey = 'adjs'; // bool + +/** @ingroup Actions + Sets the current character style for the current document. + @param #kAISetCharacterStyleFontKey The font name string. + @param #kAISetCharacterStyleSizeKey The font size in document points. + @param #kAISetCharacterStyleTrackingKey Tracking. + @param #kAISetCharacterStyleAutoKerningKey Existence enables automatic kerning. + @param #kAISetCharacterStyleKerningKey Kerning value in document points. + @param #kAISetCharacterStyleAutoLeadingKey Existence enables automatic leading. + @param #kAISetCharacterStyleLeadingKey Leading value in document points. + @param #kAISetCharacterStyleHorizontalScaleKey Horizontal scaling factor in range [0..1] + @param #kAISetCharacterStyleVerticalScaleKey Vertical scaling factor in range [0..1] + @param #kAISetCharacterStyleBaselineShiftKey Baseline shift in document points. + @param #kAISetCharacterStyleLanguageKey The language, a language-code value. + @param #kAISetCharacterStyleDirectionKey The direction, a direction-code value. + @param #kAISetCharacterStyleMojiZumeKey True to use MojiZume. + @param #kAISetCharacterStyleWariChuKey True to use WariChu. + @param #kAISetCharacterStyleWariChuScaleKey The WariChu scaling factor in range [0..1] + @param #kAISetCharacterStyleKumiHanKey True to use KumiHan. + @param #kAISetCharacterStyleKumiWaJiKanKey The KumiWaJiKan value. + @param #kAISetCharacterStyleKumiWaOuKanKey The KumiWaOuKan value + */ + +#define kAISetCharacterStyleAction "adobe_characterPalette" + +/** Parameter for \c #kAISetCharacterStyleAction: The font name string. */ +const ActionParamKeyID kAISetCharacterStyleFontKey = 'font'; // string +/** Parameter for \c #kAISetCharacterStyleAction: The font size in document points. */ +const ActionParamKeyID kAISetCharacterStyleSizeKey = 'size'; // real +/** Parameter for \c #kAISetCharacterStyleAction: Tracking */ +const ActionParamKeyID kAISetCharacterStyleTrackingKey = 'trck'; // integer +/** Parameter for \c #kAISetCharacterStyleAction: Existence enables automatic kerning. */ +const ActionParamKeyID kAISetCharacterStyleAutoKerningKey = 'atke'; // existence enables autokern +/** Parameter for \c #kAISetCharacterStyleAction: Kerning value in document points. */ +const ActionParamKeyID kAISetCharacterStyleKerningKey = 'kern'; // integer +/** Parameter for \c #kAISetCharacterStyleAction: Existence enables automatic leading. */ +const ActionParamKeyID kAISetCharacterStyleAutoLeadingKey = 'atld'; // existence enables autolead +/** Parameter for \c #kAISetCharacterStyleAction: Leading value in document points. */ +const ActionParamKeyID kAISetCharacterStyleLeadingKey = 'lead'; // real +/** Parameter for \c #kAISetCharacterStyleAction: Horizontal scaling factor, where 1 is 100% */ +const ActionParamKeyID kAISetCharacterStyleHorizontalScaleKey = 'hori'; // real +/** Parameter for \c #kAISetCharacterStyleAction: Vertical scaling factor, where 1 is 100% */ +const ActionParamKeyID kAISetCharacterStyleVerticalScaleKey = 'vert'; // real +/** Parameter for \c #kAISetCharacterStyleAction: Baseline shift in document points. */ +const ActionParamKeyID kAISetCharacterStyleBaselineShiftKey = 'base'; // real +/** Parameter for \c #kAISetCharacterStyleAction: The language, a language-code value. */ +const ActionParamKeyID kAISetCharacterStyleLanguageKey = 'lang'; // enum +/** Parameter for \c #kAISetCharacterStyleAction: The direction, a direction-code value. */ +const ActionParamKeyID kAISetCharacterStyleDirectionKey = 'dirc'; // enum +/** Parameter for \c #kAISetCharacterStyleAction: True to use MojiZume. */ +const ActionParamKeyID kAISetCharacterStyleMojiZumeKey = 'mono'; // bool +/** Parameter for \c #kAISetCharacterStyleAction: True to use WariChu. */ +const ActionParamKeyID kAISetCharacterStyleWariChuKey = 'wari'; // bool +/** Parameter for \c #kAISetCharacterStyleAction: The WariChu scaling factor, where 1 is 100% */ +const ActionParamKeyID kAISetCharacterStyleWariChuScaleKey = 'scal'; // real +/** Parameter for \c #kAISetCharacterStyleAction: True to use KumiHan. */ +const ActionParamKeyID kAISetCharacterStyleKumiHanKey = 'lyot'; // bool +/** Parameter for \c #kAISetCharacterStyleAction: */ +const ActionParamKeyID kAISetCharacterStyleKumiWaJiKanKey = 'cjk.'; // real +/** Parameter for \c #kAISetCharacterStyleAction: */ +const ActionParamKeyID kAISetCharacterStyleKumiWaOuKanKey = 'cjk.'; // real + +// ----------------------------------------------------------------------------- +// Action: kAISetTabStopsAction +// Purpose: Set tab stops +// Parameters: +// - kAISetTabStopsPaletteOrientationKey, bool: +// - kAISetTabStopsNumberOfStopsKey, integer: +// - kAISetTabStopsAutoStopDeltaKey, real: +// Comments: +// +// ----------------------------------------------------------------------------- +/** @ingroup Actions + Sets tab stops for the current document. Each tab stop is + specified by two key entries constructed from a pair + of characters and the tab stop number 'n' as follows: + + makeLong('a', 'l', n) specifies the alignment + makeLong('p', 's', n) specifies the position + + where \c makeLong() is defined to be: +@code +unsigned long makeLong(char a, char b, int number){ + unsigned long rVal; + + if (number > 100 || number < 0) + return 0; + + rVal = a << 24; + rVal += b << 16; + rVal += (char)((number / 10 + 48)) << 8; + rVal += (number % 10 + 48); + + return rVal; +} + @endcode + @param #kAISetTabStopsPaletteOrientationKey True to set the tab-stop palette + orientation to horizontal, false for vertical. + @param #kAISetTabStopsNumberOfStopsKey The number of tab stops. + @param #kAISetTabStopsAutoStopDeltaKey An interval in document points for automatic tabs. + */ +#define kAISetTabStopsAction "adobe_tabruler" + +/** Parameter for \c #kAISetTabStopsAction: True to set the tab-stop palette orientation + to horizontal, false for vertical. */ +const ActionParamKeyID kAISetTabStopsPaletteOrientationKey = 'horz'; // bool +/** Parameter for \c #kAISetTabStopsAction: The number of tab stops. */ +const ActionParamKeyID kAISetTabStopsNumberOfStopsKey = 'num.'; // integer +/** Parameter for \c #kAISetTabStopsAction: An interval in document points for automatic tabs. */ +const ActionParamKeyID kAISetTabStopsAutoStopDeltaKey = 'dlta'; // real + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITracingAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITracingAction.h index 1019aad..f12af90 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITracingAction.h +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/actions/AITracingAction.h @@ -1,58 +1,58 @@ -#ifndef _AITRACINGACTION_H_ -#define _AITRACINGACTION_H_ - -/* - * Name: AITracingAction.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Actions for envelopes. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AIActionManager_h__ -#include "AIActionManager.h" -#endif - - - -// ----------------------------------------------------------------------------- -// Action: kAITracingMenuAction -// Purpose: runs some functionality accessible through the Tracing submenus -// -// Parameters: -// - kAITracingMenuItem, enum: the menu item to run -// ----------------------------------------------------------------------------- - -/** @ingroup Actions - Executes items in the Tracing submenus. - @param #kAITracingMenuItem The menu item to run, - a \c kTracingAction* constant.See \c AITracingAction.h. - */ -#define kTracingPluginActionName "ai_plugin_tracing" - -/** Parameter to \c #kTracingPluginActionName. - The menu item to run, a \c kTracingAction* constant. */ -const ActionParamKeyID kAITracingMenuItem = 'menu'; // enum - -/** Menu item identifier for \c #kAITracingMenuItem: Make */ -#define kTracingActionMake 1 -/** Menu item identifier for \c #kAITracingMenuItem: Make and Expand */ -#define kTracingActionMakeAndExpand 2 -/** Menu item identifier for \c #kAITracingMenuItem: Release */ -#define kTracingActionRelease 4 -/** Menu item identifier for \c #kAITracingMenuItem: Expand */ -#define kTracingActionExpand 6 - - +#ifndef _AITRACINGACTION_H_ +#define _AITRACINGACTION_H_ + +/* + * Name: AITracingAction.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: Adobe Illustrator 10.0 Actions for envelopes. + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 2001-2007 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#ifndef __AIActionManager_h__ +#include "AIActionManager.h" +#endif + + + +// ----------------------------------------------------------------------------- +// Action: kAITracingMenuAction +// Purpose: runs some functionality accessible through the Tracing submenus +// +// Parameters: +// - kAITracingMenuItem, enum: the menu item to run +// ----------------------------------------------------------------------------- + +/** @ingroup Actions + Executes items in the Tracing submenus. + @param #kAITracingMenuItem The menu item to run, + a \c kTracingAction* constant.See \c AITracingAction.h. + */ +#define kTracingPluginActionName "ai_plugin_tracing" + +/** Parameter to \c #kTracingPluginActionName. + The menu item to run, a \c kTracingAction* constant. */ +const ActionParamKeyID kAITracingMenuItem = 'menu'; // enum + +/** Menu item identifier for \c #kAITracingMenuItem: Make */ +#define kTracingActionMake 1 +/** Menu item identifier for \c #kAITracingMenuItem: Make and Expand */ +#define kTracingActionMakeAndExpand 2 +/** Menu item identifier for \c #kAITracingMenuItem: Release */ +#define kTracingActionRelease 4 +/** Menu item identifier for \c #kAITracingMenuItem: Expand */ +#define kTracingActionExpand 6 + + #endif // _AITRACINGACTION_H_ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIAssertConfig.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIAssertConfig.h new file mode 100644 index 0000000..d28d505 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIAssertConfig.h @@ -0,0 +1,51 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +// Asserts should be force enabled (i.e. for release build as well) until RC. + +// Custom configuration +#ifdef ILLUSTRATOR_MINIMAL +#define AI_ASSERTS_ENABLED 0 +#else +#ifdef AI_BETA +#define AI_ASSERTS_ENABLED 0 //disable asserts for Beta build +#else +#define AI_ASSERTS_ENABLED 1 // <--Should be turned to 0 after RC +#endif +// Automatic configuration +#ifdef NDEBUG +#define AI_ASSERT_CONTROL_DEBUG 0 // Release mode + +#else //NDEBUG + +//Make sure Asserts are always enabled in debug builds +#if defined(AI_ASSERTS_ENABLED) && !AI_ASSERTS_ENABLED +#undef AI_ASSERTS_ENABLED //It will be turned on below +#endif //defined(AI_ASSERTS_ENABLED) && !AI_ASSERTS_ENABLED +#ifdef AI_BETA +#define AI_ASSERT_CONTROL_DEBUG 0 // disable asserts for Beta build +#else +#define AI_ASSERT_CONTROL_DEBUG 1 // Debug mode +#endif +#endif // NDEBUG + +#ifndef AI_ASSERTS_ENABLED +#define AI_ASSERTS_ENABLED AI_ASSERT_CONTROL_DEBUG +#endif // AI_ASSERT_FORCE_ENABLE + +#endif //ILLUSTRATOR_MINIMAL diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIConfig.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIConfig.h new file mode 100644 index 0000000..4be59eb --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/AIConfig.h @@ -0,0 +1,33 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#include "../ASConfig.h" + +#if defined(MAC_ENV) +#include "./compiler/AIConfigClang.h" + +#elif defined(WIN_ENV) +#include "./compiler/AIConfigMSVC.h" + +#elif defined(LINUX_ENV) +#include "./compiler/AIConfigClang.h" + +#else +#error "Platform not supported or configured" + +#endif // MAC_ENV diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigClang.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigClang.h new file mode 100644 index 0000000..a1cd666 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigClang.h @@ -0,0 +1,73 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#ifdef __cplusplus + +#ifdef __clang__ + +// Identify libc++ vs libstdc++ +#if __has_include() +#include +#if defined(_LIBCPP_VERSION) +#define AI_LIBCPP 1 // libc++ +#endif +#endif + +#if !AI_LIBCPP +#define AI_LIBSTDCXX 1 // libstdc++ +#endif + +#if AI_LIBCPP && __has_feature(cxx_nullptr) +#define AI_HAS_NULLPTR +#endif + +#if __has_feature(cxx_static_assert) +#define AI_HAS_STATIC_ASSERT +#endif + +#if AI_LIBCPP && __has_feature(cxx_rvalue_references) +#define AI_HAS_RVALUE_REFERENCES +#endif + +#if __has_feature(cxx_lambdas) +#define AI_HAS_LAMBDAS +#endif + +#if __has_feature(cxx_defaulted_functions) +#define AI_HAS_DEFAULTED_FUNCTIONS +#endif + +#if __has_feature(cxx_deleted_functions) +#define AI_HAS_DELETED_FUNCTIONS +#endif + +#if __has_feature(cxx_explicit_conversions) +#define AI_HAS_EXPLICIT_CONVERSION_OPERATORS +#endif + +#if __has_feature(cxx_noexcept) +#define AI_HAS_NOEXCEPT +#endif + +#if __has_feature(cxx_return_type_deduction) +#define AI_HAS_RETURN_TYPE_DEDUCTION +#endif + +#endif // __clang__ + +#endif // __cplusplus \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigMSVC.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigMSVC.h new file mode 100644 index 0000000..e472d17 --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/illustrator/config/compiler/AIConfigMSVC.h @@ -0,0 +1,45 @@ +/************************************************************************* +* +* ADOBE CONFIDENTIAL +* +* Copyright 2017 Adobe +* +* All Rights Reserved. +* +* NOTICE: Adobe permits you to use, modify, and distribute this file in +* accordance with the terms of the Adobe license agreement accompanying +* it. If you have received this file from a source other than Adobe, +* then your use, modification, or distribution of it requires the prior +* written permission of Adobe. +* +**************************************************************************/ + +#pragma once + +#ifdef __cplusplus + +#ifdef _MSC_VER + +#if (_MSC_VER >= 1600) // VC++ 10 (aka 2010) +#define AI_HAS_NULLPTR +#define AI_HAS_STATIC_ASSERT +#define AI_HAS_RVALUE_REFERENCES +#define AI_HAS_LAMBDAS +#endif + +#if (_MSC_FULL_VER >= 180020827) // VC++ 12 (aka 2013) +#define AI_HAS_DELETED_FUNCTIONS +#define AI_HAS_EXPLICIT_CONVERSION_OPERATORS +#endif + +#if (_MSC_FULL_VER >= 190023026) // VC++ 14 (aka 2015) +// NOTE: Even though defaulted functions are supported with VC++ 12, but the use of = default to request +// member-wise move constructors and move assignment operators is not supported. +#define AI_HAS_DEFAULTED_FUNCTIONS +#define AI_HAS_NOEXCEPT +#define AI_HAS_RETURN_TYPE_DEDUCTION +#endif + +#endif // _MSC_VER + +#endif // __cplusplus \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Art.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Art.h deleted file mode 100644 index 717c015..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Art.h +++ /dev/null @@ -1,141 +0,0 @@ -#ifndef __AI100Art__ -#define __AI100Art__ - -/* - * Name: AI100Art.h - * Purpose: Adobe Illustrator 10.0 Artwork Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIArt.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100ArtSuite kAIArtSuite -#define kAIArtSuiteVersion9 AIAPI_VERSION(9) -#define kAI100ArtSuiteVersion kAIArtSuiteVersion9 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/* Illustrator 10.0 Art suite */ -typedef struct _AI100ArtSuite { - - AIAPI AIErr (*NewArt) ( short type, short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - AIAPI AIErr (*DisposeArt) ( AIArtHandle art ); - AIAPI AIErr (*ReorderArt) ( AIArtHandle thisArt, short paintOrder, AIArtHandle prep ); - AIAPI AIErr (*DuplicateArt) ( AIArtHandle thisArt, short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - AIAPI AIErr (*GetFirstArtOfLayer) ( AILayerHandle layer, AIArtHandle *art ); - AIAPI AIErr (*GetLayerOfArt) ( AIArtHandle art, AILayerHandle *layer ); - AIAPI AIErr (*GetArtType) ( AIArtHandle art, short *type ); - AIAPI AIErr (*GetArtUserAttr) ( AIArtHandle art, long whichAttr, long *attr ); - AIAPI AIErr (*SetArtUserAttr) ( AIArtHandle art, long whichAttr, long attr ); - AIAPI AIErr (*GetArtParent) ( AIArtHandle art, AIArtHandle *parent ); - AIAPI AIErr (*GetArtFirstChild) ( AIArtHandle art, AIArtHandle *child ); - AIAPI AIErr (*GetArtSibling) ( AIArtHandle art, AIArtHandle *sibling ); - AIAPI AIErr (*GetArtPriorSibling) ( AIArtHandle art, AIArtHandle *sibling ); - - AIAPI AIErr (*GetArtBounds) ( AIArtHandle art, AIRealRect *bounds ); - AIAPI AIErr (*SetArtBounds) ( AIArtHandle art ); - - AIAPI AIErr (*GetArtCenterPointVisible) ( AIArtHandle art, AIBoolean *visible ); - AIAPI AIErr (*SetArtCenterPointVisible) ( AIArtHandle art, AIBoolean visible ); - - /* New with Illustrator 7.0 */ - AIAPI AIErr (*GetArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, long flags, AIRealRect *bounds ); - AIAPI AIErr (*UpdateArtworkLink) ( AIArtHandle art, AIBoolean *updated ); - - /* New in Illustrator 8.0 */ - AIAPI AIBoolean (*ValidArt) ( AIArtHandle art ); - AIAPI AIErr (*GetArtOrder) ( AIArtHandle art1, AIArtHandle art2, short *order ); - AIAPI AIErr (*SelectNamedArtOfLayer) ( AILayerHandle layer, char *name, AIBoolean matchWholeWord, AIBoolean caseSensitive ); - AIAPI AIErr (*GetArtRotatedBounds) ( AIArtHandle art, AIReal angle, long flags, AIRealRect *bounds ); - - AIAPI AIBoolean (*ArtHasFill) ( AIArtHandle art ); - AIAPI AIBoolean (*ArtHasStroke) ( AIArtHandle art ); - AIAPI AIBoolean (*ArtsHaveEqualPaths) ( AIArtHandle art1, AIArtHandle art2 ); - AIAPI AIErr (*ArtCopyFillStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt ); - AIAPI AIErr (*ArtCopyStrokeStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt ); - - /* New in Illustrator 9.0 */ - - /* Any of these parameters may be NULL if not needed. */ - AIAPI AIErr (*GetInsertionPoint) ( AIArtHandle *art, short *paintorder, ASBoolean *editable ); - AIAPI AIErr (*SetInsertionPoint) ( AIArtHandle art ); - - AIAPI AIErr (*GetKeyArt) ( AIArtHandle *art ); - AIAPI AIErr (*CancelKeyArt) (void); - - /* Returns the dictionary associated with the art object. The same dictionary - is accessed by the AITag suite but that suite is only capable of - setting and getting string values. Note that dictionaries are reference - counted. You must call sAIDictionary->Release() when you're done with - it. */ - AIAPI AIErr (*GetDictionary) ( AIArtHandle art, struct _AIDictionary** dictionary ); - AIAPI AIErr (*SetArtName) (AIArtHandle art, char const *name); - - /* If there is no user assigned name, a default descriptive name will be - returned. *isDefaultName will be set to reflect this. isDefaultName - may be null. */ - AIAPI AIErr (*GetArtName) (AIArtHandle art, char name[], int bufferSize, ASBoolean *isDefaultName); - - /* True if art is a group and it corresponds to a layer. */ - AIAPI AIErr (*IsArtLayerGroup) (AIArtHandle art, ASBoolean *isLayerGroup); - AIAPI AIErr (*ReleaseToLayers) (const AIArtHandle art, ASBoolean build); - - /* More efficient than doing one art at a time */ - AIAPI AIErr (*ModifyTargetedArtSet) (AIArtHandle *list, long count, long action); - - /* Return true if art is part of the styled art of another object */ - AIAPI AIBoolean (*IsArtStyledArt) (AIArtHandle art); - - /* Return true if 'art' adds to clipping. Should only be called on - descendents of a clipGroup or a maskObject. A return of TRUE indicates - 'art' is either an appropriate art object with the isClip flag on or a - non-clip group with a clipping descendent that isn't bounded by another - clipGroup. */ - AIAPI AIBoolean (*IsArtClipping) (AIArtHandle art); - - - /* New in Illustrator 10.0 */ - - /* Transfers attributes from the source art to the destination. This is intended - to be used when the destination art is to replace the source art in the art - tree. For example when an art object is converted from one type to another. */ - AIAPI AIErr (*TransferAttributes) (AIArtHandle srcart, AIArtHandle dstart, unsigned long which); - -} AI100ArtSuite; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100CharacterEncoding.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100CharacterEncoding.h deleted file mode 100644 index 9d1c8e1..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100CharacterEncoding.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef __AI100CharacterEncoding__ -#define __AI100CharacterEncoding__ - -/* - * Name: AI100CharacterEncoding.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Character Encoding Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AICharacterEncoding.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100CharacterEncodingSuite kAICharacterEncodingSuite -#define kAICharacterEncodingSuiteVersion1 AIAPI_VERSION(1) -#define kAI100CharacterEncodingSuiteVersion kAICharacterEncodingSuiteVersion1 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -typedef struct _AI100CharacterEncodingSuite { - - // Converts the contents of the source buffer from the source encoding to - // the destination encoding. srcBuffer is assumed to contain srcLength bytes - // of data. dstBuffer is assumed to be large enough to contain dstSize bytes - // and dstLength returns the actual number of bytes of converted data. - AIAPI AIErr (*ConvertBuffer) ( - const void* srcBuffer, long srcLength, AICharacterEncoding srcEncoding, - void* dstBuffer, long dstSize, AICharacterEncoding dstEncoding, - long* dstLength); - -} AI100CharacterEncodingSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Document.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Document.h deleted file mode 100644 index 07e01dc..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Document.h +++ /dev/null @@ -1,144 +0,0 @@ -#ifndef __AI100Document__ -#define __AI100Document__ - -/* - * Name: AI100Document.h - * Purpose: Adobe Illustrator 10.0 Document Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AI120Document.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100DocumentSuite kAIDocumentSuite -#define kAIDocumentSuiteVersion7 AIAPI_VERSION(7) -#define kAI100DocumentSuiteVersion kAIDocumentSuiteVersion7 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -// Illustrator 10.0 Document suite -typedef struct { - - AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin ); - AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin ); - AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin ); - AIAPI AIErr (*GetDocumentRulerUnits) ( short *units ); - AIAPI AIErr (*SetDocumentRulerUnits) ( short units ); - AIAPI AIErr (*GetDocumentCropBoxGroupHandle) ( AIArtHandle *cropHandle ); - AIAPI AIErr (*GetDocumentCropBox) ( AIRealRect *cropBox ); - AIAPI AIErr (*SetDocumentCropBox) ( AIRealRect *cropBox ); - AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle ); - AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle ); - AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print ); - AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print ); - AIAPI AIErr (*GetDocumentSetup) ( AI120DocumentSetup *setup ); - AIAPI AIErr (*SetDocumentSetup) ( AI120DocumentSetup *setup ); - AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified ); - AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified ); - AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat ); - AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat ); - AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters ); - AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters ); - - AIAPI AIErr (*RedrawDocument) ( void ); - - AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document ); - - - AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - - AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin ); - - AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething ); - - AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max ); - AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds ); - AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists ); - - /* Returns the recorded dictionary associated with the document. Note that dictionaries - are reference counted. You must call sAIDictionary->Release() when you're - done with it. */ - AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary ); - AIAPI AIErr (*GetDocumentColorModel) ( short *colorModel); - AIAPI AIErr (*SetDocumentColorModel) ( short colorModel); - AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile *rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile ); - AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile ); - AIAPI AIErr (*Copy) (); - AIAPI AIErr (*Cut) (); - AIAPI AIErr (*Paste) (); - - AIAPI AIErr (*SyncDocument) ( void ); - - // The following two calls have been deprecated in AI10. The first will always return kDocTargetExplicit - // for all three targets, while the second call is a no-op. - AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget ); - AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget ); - - /* Returns the dictionary associated with the document for which changes to the - dictionary and its contents will not be recorded for undo/redo purposes. You - must call sAIDictionary->Release() when you're done with it.*/ - AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary ); - - // Returns AI version of the current document. If unknown, or not an AI file, returns 0. - // Version 2 is Illustrator 88. - AIAPI int (*GetAIVersion) (); - - AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint ); - AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt ); - - // New for AI 10 - - // Asset Management info - // Any unwanted parameter can be set to null to not "get" or "set" its state. - // managed => file has associated server URL - // checkedOut => if managed, file is checked out and can be edited - // URL => if managed, URL of server version of file - // canEdit => if managed, can edit the file even if not checked out - // fileType => name of plugin used to open document, or last "save as" of document - AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType); - AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit); - AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL); - // returns a ptr to the xml packet associated with the document XAP data. The format is UTF-8 unicode - AIAPI AIErr (*GetDocumentXAP)(const char **xap); - // remove any existing XAP data and assign this xml xap packet to the document. Format must be UTF-8 unicode. - AIAPI AIErr (*SetDocumentXAP)(const char *xap); - -} AI100DocumentSuite; - - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100DrawArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100DrawArt.h deleted file mode 100644 index fc95628..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100DrawArt.h +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef __AI100DrawArt__ -#define __AI100DrawArt__ - -/* - * Name: AI100DrawArt.h - * Purpose: Adobe Illustrator 10.0 Draw Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIDrawArt.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100DrawArtSuite kAIDrawArtSuite -#define kAIDrawArtSuiteVersion5 AIAPI_VERSION(5) -#define kAI100DrawArtSuiteVersion kAIDrawArtSuiteVersion5 - - -/******************************************************************************* - ** - ** Types - ** - **/ - -typedef struct AI100DrawArtData { - short version; - - AIDrawArtFlags flags; - AIDrawArtOutputType type; - AIRealPoint origin; - AIRealMatrix matrix; - AIArtHandle art; - AIRealRect destClipRect; - AIBoolean eraseDestClipRect; // erase destClipRect before arts are drawn. - AIArtHandle interruptedArt; - - AIReal greekThreshold; - AIExtendedRGBColorRec selectionColor; - - union { - AIDrawArtGWorld gWorld; - AIDrawArtAGMPort port; - } output; -} AI100DrawArtData; - - -typedef struct AI100DrawColorData { - AIDrawArtOutputType type; - - AIDrawColorStyle style; - AIDrawColorOptions options; - AIColor color; - AIRealRect rect; - AIReal width; // when style is frame - - union { - AIDrawArtGWorld gWorld; - AIDrawArtAGMPort port; - } output; -} AI100DrawColorData; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*DrawArt)( AI100DrawArtData *data ); - AIAPI AIErr (*DrawColorSwatch)( AI100DrawColorData *data ); - AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color ); - AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect ); - -} AI100DrawArtSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Folders.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Folders.h deleted file mode 100644 index 118cc19..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Folders.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef __AI100Folders__ -#define __AI100Folders__ - -/* - * Name: AI100Folders.h - * Purpose: Adobe Illustrator 10.0 Folders Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIFolders.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAI100FoldersSuite kAIFoldersSuite -#define kAIFoldersSuiteVersion1 AIAPI_VERSION(1) -#define kAI100FoldersSuiteVersion kAIFoldersSuiteVersion1 - - - /******************************************************************************* - ** - ** Suite - ** - **/ - - -typedef struct { - - // - version 1 api - - AIAPI AIErr (*GetFolderName)(AIFolderType type, char *name); // kMaxPathLength size buffer assumed, folder name only (not path). - -} AI100FoldersSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Group.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Group.h deleted file mode 100644 index 9104a8b..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Group.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __AI100Group__ -#define __AI100Group__ - -/* - * Name: AIGroup.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Group Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - - -#ifndef __AIGroup__ -#include "AIGroup.h" -#endif - - -#include "AIHeaderBegin.h" - - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100GroupSuite "AI Group Suite" -#define kAIGroupSuiteVersion2 AIAPI_VERSION(2) -#define kAI100GroupSuiteVersion kAIGroupSuiteVersion2 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*GetGroupClipped) ( AIArtHandle group, AIBoolean *clipped ); - AIAPI AIErr (*SetGroupClipped) ( AIArtHandle group, AIBoolean clipped ); - - AIAPI AIErr (*GetGroupMaskLock) ( AIArtHandle group, AIBoolean *maskLocked ); - AIAPI AIErr (*SetGroupMaskLock) ( AIArtHandle group, AIBoolean maskLocked ); - -} AI100GroupSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Mask.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Mask.h deleted file mode 100644 index d4219a3..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Mask.h +++ /dev/null @@ -1,126 +0,0 @@ -#ifndef __AI100Mask__ -#define __AI100Mask__ - -/* - * Name: AI100Mask.h - * $Revision: 2 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Mask Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIMask__ -#include "AIMask.h" -#endif - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAI100BlendStyleSuite "AI Blend Style Suite" -#define kAIBlendStyleSuiteVersion2 AIAPI_VERSION(2) -#define kAI100BlendStyleVersion kAIBlendStyleSuiteVersion2 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/* The blend style suite allows manipulation of the compositing attributes - of object styles. */ -typedef struct { - - /* The following methods are a short hand for getting the object's style - and then modifying the opacity applied by the style to the object as - a whole. */ - AIAPI AIBlendingMode (*GetBlendingMode) (AIArtHandle art); - AIAPI AIErr (*SetBlendingMode) (AIArtHandle art, AIBlendingMode mode); - - AIAPI AIReal (*GetOpacity) (AIArtHandle art); - AIAPI AIErr (*SetOpacity) (AIArtHandle art, AIReal opacity); - - AIAPI AIBoolean (*GetIsolated) (AIArtHandle art); - AIAPI AIErr (*SetIsolated) (AIArtHandle art, AIBoolean isolated); - - AIAPI AIKnockout (*GetKnockout) (AIArtHandle art); - AIAPI AIKnockout (*GetInheritedKnockout) (AIArtHandle art); // always explicitly on or off. - AIAPI AIErr (*SetKnockout) (AIArtHandle art, AIKnockout knockout); - - AIAPI AIBoolean (*GetAlphaIsShape) (AIArtHandle art); - AIAPI AIErr (*SetAlphaIsShape) (AIArtHandle art, AIBoolean alphaIsShape); - - /* Copy the compositing attributes applied globally by the style applied - to the source object to the destination object.*/ - AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination); - - /* Manipulate the attributes applied to the object via a dictionary. See - the definitions above for the names of the appropriate keys. These - methods are a short hand for first getting the object's style and - then using the Get/SetStyleAttrs methods. */ - AIAPI AIErr (*GetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs); - AIAPI AIErr (*SetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs); - - /* Manipulate the attributes applied by the style via a dictionary. See - the definitions above for the names of the appropriate keys. */ - AIAPI AIErr (*GetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs); - AIAPI AIErr (*SetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle); - - /* Manipulate the attributes applied by a specific filter element of an - active style via a dictionary. See the definitions above for the names - of the appropriate keys. * / - AIAPI AIErr (*GetFilterAttrs) (AIStyleFilterExecHandle filter, AIDictionaryRef style); - AIAPI AIErr (*SetFilterAttrs) (AIStyleFilterExecHandle filter, AIDictionaryRef attrs);*/ - - /* Get and set the transparency attributes for the current selection in the document */ - AIAPI AIErr (*GetCurrentTransparency) (AIDictionaryRef styleAttrs, - AIDictionaryRef fillAttrs, - AIDictionaryRef strokeAttrs); - AIAPI AIErr (*SetCurrentTransparency) (AIDictionaryRef styleAttrs, - AIDictionaryRef fillAttrs, - AIDictionaryRef strokeAttrs); - - AIAPI AIErr (*GetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs); - AIAPI AIErr (*GetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs); - AIAPI AIErr (*SetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle); - AIAPI AIErr (*SetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle ); - - /* Return whether the object (or group, or layer) - contains any artwork with non-Normal blending - that is not isolated at the level of the object. */ - AIAPI AIBoolean (*ContainsNonIsolatedBlending) (AIArtHandle object); -} AI100BlendStyleSuite; - - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MaskFlattener.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MaskFlattener.h deleted file mode 100644 index ec07fa8..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MaskFlattener.h +++ /dev/null @@ -1,138 +0,0 @@ -#ifndef __AI100MaskFlattener__ -#define __AI100MaskFlattener__ - -/* - * Name: AI100MaskFlattener.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Mask Flattener Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIMaskFlattener__ -#include "AIMaskFlattener.h" -#endif - -#include "AIHeaderBegin.h" - -/** - @defgroup AI100MaskFlattenerAPI Transparency Flattening APIs - - The transparency flattening APIs provide facilities for flattening - transparent artwork into an equivalent collection of opaque artwork. - - @{ - */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAI100MaskFlattenerSuite kAIMaskFlattenerSuite -#define kAIMaskFlattenerSuiteVersion1 AIAPI_VERSION(1) -#define kAI100MaskFlattenerSuiteVersion kAIMaskFlattenerSuiteVersion1 - -/******************************************************************************* - ** - ** Constants - ** - **/ - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Linked EPS object -- indicates that a linked EPS was drawn as a part of - the artwork to be flattened. Provides the handle to the linked EPS object and a - boolean indicating whether or not the linked EPS interracts with transparency. - A linked EPS which does not interract with transparency can be passed - through to a PostScript device for printing purposes. One which does - interract needs to be parsed into objects for correct printing. - - Since a linked EPS is a placed object a receiver will be sent both this - snippet and the AIFlatteningInfoPlacedArtObject snippet. The order in - which these will be sent is not guaranteed. In fact all linked EPS - snippets will usually be sent as a group at the end. */ -typedef struct -{ - AIArtHandle object; - AIBoolean interacts; -} AI100FlatteningInfoLinkedEPSObject; - -/** Placed object -- indicates that a placed object was drawn as a part of - the artwork to be flattened. */ -typedef struct -{ - AIArtHandle object; -} AI100FlatteningInfoPlacedArtObject; - -/** The information packet sent to an AIFlatteningInfoReceiver. */ -typedef struct -{ - /** Indicates the type of information being sent. */ - AIFlatteningInfoType what; - /** Contains the information. The valid member is determined based on - the type of information. */ - union - { - AI100FlatteningInfoLinkedEPSObject linkedEPSObject; - AI100FlatteningInfoPlacedArtObject placedArtObject; - } x; -} AI100FlatteningInfoSnippet; - -/** Prototype for a receiver of flattening information. */ -typedef AIErr (*AI100FlatteningInfoReceiver) (void* receiverdata, AI100FlatteningInfoSnippet* snippet); - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** AIMaskFlattenerSuite */ -typedef struct { - - AIAPI AIErr (*FlattenArt)(AIArtSet artSet, AIFlatteningOptions *options, short paintOrder, AIArtHandle prep); - AIAPI AIErr (*CreateTemporaryFlatteningLayer)(AILayerHandle *layer); - AIAPI AIErr (*FlattenDocumentToLayer)(AILayerHandle layer); - AIAPI AIErr (*RemoveTemporaryFlatteningLayer)(); - AIAPI AIErr (*IsTemporaryFlatteningLayer)(AILayerHandle layer, AIBoolean *flattening); - AIAPI AIErr (*ReportError)(AIErr error); - - AIAPI AIErr (*CollectDocumentFlatteningInfo)(AI100FlatteningInfoReceiver receiver, void* receiverdata); - -} AI100MaskFlattenerSuite; - -/** - @} - */ - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MatchingArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MatchingArt.h deleted file mode 100644 index a3f4abd..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100MatchingArt.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef __AI100MatchingArt__ -#define __AI100MatchingArt__ - -/* - * Name: AIMatchingArt.h - * $Revision: 4 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Matching Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIMatchingArt.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100MatchingArtSuite kAIMatchingArtSuite -#define kAIMatchingArtSuiteVersion4 AIAPI_VERSION(4) -#define kAI100MatchingArtVersion kAIMatchingArtSuiteVersion4 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct AI100MatchingArtSuite { - - /* Get the art matching the given criteria and on the current layer list. */ - AIAPI AIErr (*GetSelectedArt) ( AIArtHandle ***matches, long *numMatches ); - AIAPI AIErr (*GetMatchingArt) ( AIMatchingArtSpec *specs, short numSpecs, - AIArtHandle ***matches, long *numMatches ); - - // new to Illustrator 9.0 - /* Get the art matching the given criteria and on the given layer list. */ - AIAPI AIErr (*GetSelectedArtFromLayerList) ( AILayerList list, AIArtHandle ***matches, - long *numMatches ); - AIAPI AIErr (*GetMatchingArtFromLayerList) ( AILayerList list, AIMatchingArtSpec *specs, - short numSpecs, AIArtHandle ***matches, long *numMatches ); - - // new to Illustrator 10.0 - /* Get the art used to determine the current path style, displayed in the color - palette. This is a convenience function, since the current path style is now - determined not just by the targeted or selected objects, but rather by a combination - of both. The art returned may include text runs as well as objects inside of - graphs. */ - AIAPI AIErr (*GetArtForCurrentPathStyle) ( AIArtHandle ***matches, long *numMatches ); - - // This function can be used to avoid some setup if there is nothing selected - AIAPI AIBoolean (*IsSomeArtSelected) ( void ); - /* Returns simply whether or not there are some art objects selected, in art editing mode. - (If you want to know whether there is a text editing selection, call HasTextSelection - in the AIText suite. IsArtSelected will return false when there is a text editing - selection and when there is nothing selected at all. - */ - - // Test searchArt and its descendants if it is a group or other container against the specs. - // If the kMatchDictionaryArt flag is set, will also search the dictionaries of searchArt - // and any of its descendants. This is useful for when only certain parts of the artwork - // are of interest, or when the searchArt is not in the regular artwork, e.g., if it is the - // definition art of a pattern, brush, or symbol. - AIAPI AIErr (*GetMatchingArtFromArt) ( AIArtHandle searchArt, AIMatchingArtSpec *specs, - short numSpecs, AIArtHandle ***matches, long *numMatches ); - -} AI100MatchingArtSuite; - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100PathInterpolate.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100PathInterpolate.h deleted file mode 100644 index 68777d3..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100PathInterpolate.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef __AI100PathInterp__ -#define __AI100PathInterp__ - -/* - * Name: AIPathInterpolate.h - * Purpose: Adobe Illustrator 10.0 Path Interpolation Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPathInterpolate.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100PathInterpolateSuite kAIPathInterpolateSuite -#define kAIPathInterpolateSuiteVersion1 AIAPI_VERSION(1) -#define kAI100PathInterpolateVersion kAIPathInterpolateSuiteVersion1 - - - -/******************************************************************************* - ** - ** Types - ** - **/ - -// See the most recent version of AIPathInterpolate.h for the following typedefs: - -// struct AIKnot -// struct AIFlattenedPath; -// struct AIAnchorIdentifier; -// struct AIPathInstallData; -// struct _t_AIStyleInterpolator* AIStyleInterpolator; -// ASErr (*PostInstallCB)( AIArtHandle art, AIPathInstallData *installData ); - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -// Illustrator 9.0 and 10.0 Path Interpolation Suite -// (AI 8.0 version was same through MeasurePathSegments. The suite version was not bumped for AI 9.0) - -// For comments on suite functions, see most recent version of AIPathInterpolate.h -typedef struct { - - AIAPI AIErr (*SmoothColorBlendSteps) ( AIArtHandle startPath, AIArtHandle endPath, - AIReal densityLimit, short *steps ); - - AIAPI AIErr (*GetPathSelectedSegmentCount) ( AIArtHandle path, short *count ); - AIAPI AIErr (*PathSelectionToAnchorIDs) ( AIArtHandle path, short count, AIAnchorIdentifier *anchorIDs ); - AIAPI AIErr (*PathSelectionToSegNumbers) ( AIArtHandle path, short count, short *selectedPoints ); - - AIAPI AIErr (*SelectAnchorPoints) ( AIArtHandle path, short count, short *selectPoints ); - - AIAPI AIErr (*InsertInterpolants) ( AIArtHandle startPath, - AIArtHandle endPath, - AIRealPoint *substituteCenter, - AIArtHandle useStyleFromPath, - short steps, - short numMatchPairs, short *matches1, short *matches2, - AIPathInstallData *installData, - PostInstallCB clientCallback); - - AIAPI AIErr (*MeasurePathSegments) ( AIArtHandle path, - short ixStart, short count, - AIReal *segLengths, - AIReal flatness ); - - // New for AI 9: - AIAPI AIErr (*NewStyleInterpolator) ( AIStyleInterpolator* interpolator, AIArtHandle styleSource0, AIArtHandle styleSource1 ); - // Free memory for a style interpolator. - AIAPI AIErr (*DisposeStyleInterpolator) ( AIStyleInterpolator interpolator ); - - AIAPI AIErr (*ApplyInterpolatedStyle) ( AIStyleInterpolator interpolator, AIArtHandle targetArt, AIReal fraction ); - - AIAPI AIErr (*NewArtStyleInterpolator) ( AIStyleInterpolator* interpolator, AIArtStyleHandle style0, AIArtStyleHandle style1 ); - AIAPI AIErr (*GetInterpolatedArtStyle) ( AIStyleInterpolator interpolator, AIReal fraction, AIArtStyleHandle* result ); - -} AI100PathInterpolateSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Slicing.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Slicing.h deleted file mode 100644 index 8fd0e69..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Slicing.h +++ /dev/null @@ -1,414 +0,0 @@ -#ifndef __AISLICING__ -#define __AISLICING__ - -/* - * Name: AISlicing.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10 Slicing Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __SLICETYPES__ -#include "AISliceTypes.h" -#endif - -#ifndef __AIDataFilter__ -#include "AIDataFilter.h" -#endif - -#ifndef __AIEntry__ -#include "AIEntry.h" -#endif - -#ifndef __AIPlatformMemory__ -#include "AIPlatformMemory.h" -#endif - -#ifndef __AIHTMLCONVERSION__ -#include "AIHTMLConversion.h" -#endif - -#ifndef AIFLASHPREFS_H -#include "AIFlashPrefs.h" -#endif - -#ifndef _AISVGACTION_H_ -#include "AISVGAction.h" -#endif - -#ifndef __AIDict__ -#include "AIDictionary.h" -#endif - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAISlicingSuite "AI Slicing Suite" -#define kAISlicingSuiteVersion1 AIAPI_VERSION(1) -#define kAISlicingSuiteVersion kAISlicingSuiteVersion1 - -#define kAIOptimizationSettingsSuite "AI Optimization Settings Suite" -#define kAIOptimizationSettingsSuiteVersion1 AIAPI_VERSION(1) -#define kAIOptimizationSettingsSuiteVersion kAIOptimizationSettingsSuiteVersion1 - - -#define kAISlicingChangedNotifier "AI Slicing Changed" -#define kAISliceCommandsMenuGroup "AI Slice Commands Menu Group" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -enum ASOptimizedFileFormat -{ - asffGIF89a, // "GIF" - asffJPEG, // "JPEG" - asffPNG8, // "PNG8" - asffPNG24, // "PNG24" - asffAuto, // "auto - asffInvalidFormat, // "" - asffMixedFormat, // "mixed" - asffSWF, // "SWF" - asffSVG // "SVG" -}; - -enum ASDitherAlgorithm -{ - asdaNone, // "none" - asdaDiffusion, // "diffusion" - asdaPattern, // "pattern" - asdaWhiteNoise, // "whiteNoise - asdaBlueNoise // "noise" -}; - -enum ASReductionAlgorithm -{ - asraAdaptive, // "adaptive" - asraSelective, // "selective" - asraPerceptual, // "perceptual" - asraMacintoshSystem, // "macintoshSystem" - asraWindowsSystem, // "windowsSystem" - asraWeb, // "web" - asraImageReadyCustom, // "custom" - asraFileBased, // "fileBased" - asraNeuralNet, // "neuralNet" - asraFauxPerceptual // "fauxPerceptual" -}; - - - -typedef struct -{ - ADMRGBColor rangeStart; - ADMRGBColor rangeEnd; - ADMRGBColor remapColor; -} -ASColorShiftEntry; - - -typedef struct -{ - ASBoolean transparency; - ASBoolean includeCaption; - ASBoolean interlaced; - - ASBoolean noMatteColor; - ADMRGBColor matteColor; - - ASBoolean autoReduced; - ASBoolean rolloverMasterPalette; - - ASInt32 webShiftedPercentage; - - ASInt32 numberOfColors; - - ASInt32 qualitySetting; - ASDitherAlgorithm ditherAlgorithm; - ASInt32 ditherPercentage; - ASReductionAlgorithm reductionAlgorithm; - - ASHandle reductionAlgorithmFilename; // see allocation comments in ASSliceSettings definition -} ASGIFSettings; - - -typedef struct -{ - ASBoolean transparency; // obsolete and ignored - ASBoolean noMatteColor; - ADMRGBColor matteColor; - ASBoolean optimized; - ASInt32 qualitySetting; - ASBoolean multiplePasses; // progressive - AIReal blurAmount; - ASBoolean embedICCProfile; -} ASJPEGSettings; - - -typedef struct -{ - ASBoolean transparency; - ASBoolean includeCaption; // unused - ASBoolean interlaced; - ASBoolean noMatteColor; - ADMRGBColor matteColor; - - ASBoolean autoReduced; - ASBoolean rolloverMasterPalette; - ASInt32 webShiftedPercentage; - ASInt32 numberOfColors; - - ASDitherAlgorithm ditherAlgorithm; - ASInt32 ditherPercentage; - ASReductionAlgorithm reductionAlgorithm; - - ASHandle reductionAlgorithmFilename; // see allocation comments in ASSliceSettings definition -} ASPNG8Settings; - - -typedef struct -{ - ASBoolean transparency; - ASBoolean includeCaption; // unused - ASBoolean interlaced; - ASBoolean noMatteColor; - ADMRGBColor matteColor; - ASBoolean filtered; -} ASPNG24Settings; - - -typedef struct -{ - AISVGFontSubsetting fontSubsetting; - AISVGFileLocation fontLocation; - AISVGRasterLocation imageLocation; - ASBoolean obsolete; - AISVGFileCompression compression; - AISVGCoordinatePrecision precision; - AISVGDocumentEncoding encoding; - AISVGStyle style; -} ASSVGSettings; - - -typedef struct -{ - FlashExportOption exportOption; - AIReal frameRate; - ASBoolean loop; - ASBoolean readOnly; - ASInt32 curveQuality; - ASBoolean preserveAppearance; -} ASSWFSettings; - - -typedef union -{ - ASGIFSettings gif; - ASJPEGSettings jpeg; - ASPNG8Settings png8; - ASPNG24Settings png24; - ASSVGSettings svg; - ASSWFSettings swf; -} ASOptimizationSettingsUnion; - -typedef struct ASOptimizationSettings -{ - ASOptimizedFileFormat fileFormat; - ASOptimizationSettingsUnion s; -} ASOptimizationSettings; - - -typedef struct -{ - ASInt32 groupID; - ai::ESliceType type; - ASBoolean cellTextIsHTML; - ai::ESliceHorzAlign horzAlign; - ai::ESliceVertAlign vertAlign; - ai::ESliceBGColorType bgColorType; - ADMRGBColor bgColor; - - // For Set calls, the handle must be allocated by the caller. - // For Get calls, if a handle is non-NULL it will be used as provided; - // if a handle is NULL, it will be allocated by the slicing suite. - // In either case, handles must be released when no longer needed **by the caller**. - ASHandle hName; - ASHandle hURL; - ASHandle hTarget; - ASHandle hMessage; - ASHandle hAltTag; - ASHandle hCellText; -} ASSliceSettings; - - -typedef void* AISavedSliceListRef; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - // if an ID is passed in it will be used if possible, the ID actually used is returned - // fromPlace should be true if the function is used from a file format to create slices - // if used from a menu, tool, etc., fromPlace should be false - AIAPI AIErr (*MakeSlice)(AIArtHandle art, ASInt32 *sliceID, ASBoolean fromPlace); - - // creates a no fill/no stroke rect designated as a slice and selects if desired - // if an ID is passed in it will be used if possible, the ID actually used is returned - // fromPlace should be true if the function is used from a file format to create slices - // if used from a menu, tool, etc., fromPlace should be false - AIAPI AIErr (*CreateSlice)(AIArtHandle placeAboveArt, ASInt32 *sliceID, AIBoolean selected, ASBoolean fromPlace); - - // deletes the slice art and its slicing information - AIAPI AIErr (*DeleteSlice)(ASInt32 sliceID); - - // removes the slicing designation from the art, but does not delete the art - AIAPI AIErr (*Unslice)(AIArtHandle art); - - // get the slice ID of an art object, returns kInvalidSliceID if not a slice - AIAPI ASInt32 (*GetArtSliceID)(AIArtHandle art); - - // get the art of a slice ID, returns NULL if not a slice - AIAPI AIArtHandle (*GetSliceArt)(ASInt32 sliceID); - - AIAPI ASInt32 (*GetUniqueSliceID)(void); - AIAPI AIBoolean (*SliceExists)(ASInt32 sliceID); - - // Get the number of slices in the slice list - AIAPI ASInt32 (*GetSliceCount)(void); - - // Get the slice ID of the nth slice - AIAPI ASInt32 (*GetIndexedSliceID)(ASInt32 index); - - // Set works on no fill/no stroke slices objects but will not transform art otherwise - // Get returns the bounds to be used for the slice including the border - AIAPI AIErr (*SetSliceBounds)(ASInt32 sliceID, AIRealRect *boundsRect); - AIAPI AIErr (*GetSliceBounds)(ASInt32 sliceID, AIRealRect *boundsRect); - - // The slice border is the appended to the art visual bounds to generate the slice bounds - AIAPI AIErr (*SetSliceBorder)(ASInt32 sliceID, AIRealRect *borderRect); - AIAPI AIErr (*GetSliceBorder)(ASInt32 sliceID, AIRealRect *borderRect); - - // Get/set the standard slice information - AIAPI AIErr (*SetSliceSettings)(ASInt32 sliceID, ASSliceSettings *settings); - AIAPI AIErr (*GetSliceSettings)(ASInt32 sliceID, ASSliceSettings *settings); - - // Get/set a single slice attribute - AIAPI AIErr (*SetSliceSetting)(ASInt32 sliceID, const AIDictKey &key, AIEntryRef valueEntry); - AIAPI AIErr (*GetSliceSetting)(ASInt32 sliceID, const AIDictKey &key, AIEntryRef *valueEntry); - - // Is the slice somehow convertible to text - AIAPI AIBoolean (*SliceIsText)(ASInt32 sliceID); - - // Mark that it should be converted on output - AIAPI AIErr (*SetSliceIsHTMLText)(ASInt32 sliceID, long HTMLTextOptions); - - // Is the slice to be converted on output - AIAPI AIBoolean (*GetSliceIsHTMLText)(ASInt32 sliceID, long *HTMLTextOptions); - - // Convert the slice to text. The call allocates and frees the handle, though - // it may be resized using the AIPlatformMemorySuite. - // Options are defined in the "AIHTMLConversion.h" file (and elsewhere?) - AIAPI AIErr (*GetSliceAsHTMLText)(ASInt32 sliceID, long options, ASHandle *text); - - // See if the slice is on a given layer - AIAPI AIBoolean (*SliceIsOnLayer)(ASInt32 sliceID, AILayerHandle layer); - - // Temporarily replaces the slice list with an empty slice list and the optimizations - // list with just the settins of the given slice group ID. - // Returns an opaque references to the current full lists, which must be restored. - AIAPI AIErr (*ReplaceSliceList)(ASInt32 groupID, AISavedSliceListRef *oldSliceList); - AIAPI AIErr (*RestoreSliceList)(AISavedSliceListRef oldSliceList); - - AIAPI AIBoolean (*SliceIsSelected)(ASInt32 sliceID); - AIAPI AIErr (*GetSelectedSliceList)(ASInt32 **sliceIDList, ASInt32 *count); - AIAPI AIErr (*ReleaseSelectedSliceList)(ASInt32 *sliceIDList); - -} AI100SlicingSuite; - - -typedef struct -{ - AIAPI ASInt32 (*GetOptimizationSettingsCount)(void); - - AIAPI ASInt32 (*GetIndexedOptimizationSettingsID)(ASInt32 index); - - AIAPI void (*DeleteOptimizationSettings)(ASInt32 optimizationID); - - AIAPI ASInt32 (*GetUniqueOptimizationSettingsID)(void); - AIAPI AIBoolean (*OptimizationSettingsExists)(ASInt32 optimizationID); - - // Get/set the optimization settings for a settings group - AIAPI AIErr (*SetOptimizationSettings)(ASInt32 optimizationID, ASOptimizationSettings *settings); - AIAPI AIErr (*GetOptimizationSettings)(ASInt32 optimizationID, ASOptimizationSettings *settings); - - AIAPI AIErr (*SetOptimizationSetting)(ASInt32 optimizationID, const AIDictKey&key, AIEntryRef valueEntry); - AIAPI AIErr (*GetOptimizationSetting)(ASInt32 optimizationID, const AIDictKey&key, AIEntryRef *valueEntry); - - // These functions must be used by a file format plug-in to attach settings directly to a sliced art - // object during a file place operation when the main optimization settings database is unavailable. - // After the place command, optimization settings attached to an object will be inserted into - // the main database. - AIAPI AIErr (*SetSliceOptimizationID)(ASInt32 sliceID, ASInt32 optimizationID); - AIAPI AIErr (*SetSliceOptimizationSettings)(ASInt32 sliceID, ASOptimizationSettings *settings); - // You can use theis last function to suplement optimization information once it has been created - // with the above function. - AIAPI AIErr (*SetSliceOptimizationSetting)(ASInt32 sliceID, const AIDictKey&key, AIEntryRef valueEntry); - - - //*** Important, for the GetColorTable-like functions, make a first call with the numColors/Entries initialized - // but pass NULL for the ADMRGBColor/ASColorShiftEntry array. This will return the number of entries in the - // array. Initialize it accordingly and call the funciton again with a point to the allocated memory. - - // the color table must ALWAYS be intialized to 256 ADMRGBColors - AIAPI AIErr (*GetColorTable)(ASInt32 optimizationID, ASInt32* numColors, ADMRGBColor* colors, ASBoolean* exact); - AIAPI AIErr (*SetColorTable)(ASInt32 optimizationID, ASInt32 numColors, ADMRGBColor* colors, ASBoolean exact); - - // the color table must ALWAYS be intialized to 256 ADMRGBColors - AIAPI AIErr (*GetLockedColors)(ASInt32 optimizationID, ASInt32* numColors, ADMRGBColor* colors); - AIAPI AIErr (*SetLockedColors)(ASInt32 optimizationID, ASInt32 numColors, ADMRGBColor* colors); - AIAPI AIErr (*GetColorShiftEntries)(ASInt32 optimizationID, ASInt32* numEntries, ASColorShiftEntry *entries); - AIAPI AIErr (*SetColorShiftEntries)(ASInt32 optimizationID, ASInt32 numEntries, ASColorShiftEntry *entries); - -} AIOptimizationSettingsSuite; - - -#include "AIHeaderEnd.h" - - -#endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Symbol.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Symbol.h deleted file mode 100644 index c064329..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100Symbol.h +++ /dev/null @@ -1,304 +0,0 @@ -#ifndef __AI100Symbol__ -#define __AI100Symbol__ - -/* - * Name: AI100Symbol.h - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Symbol Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1990-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AISymbol.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100SymbolSuite kAISymbolSuite -#define kAISymbolSuiteVersion1 AIAPI_VERSION(1) -#define kAI100SymbolSuiteVersion kAISymbolSuiteVersion1 - - -/******************************************************************************* - ** - ** AISymbol Suite (legacy AI 10 version) - ** - **/ - -// This suite is exported by the core, so it should always be available. -typedef struct { - - // Functions for examining and managing the set of symbols - AIAPI AIErr (*CountSymbolPatterns) ( long *count, ASBoolean includeUnlisted ); - AIAPI AIErr (*GetNthSymbolPattern) ( long n, AIPatternHandle *symbolPattern, ASBoolean includeUnlisted ); - // This is a zero-based index. - // (See note at bottom for a discussion of listed vs unlisted.) - AIAPI AIErr (*GetSymbolPatternByName) ( char *name, AIPatternHandle *symbolPattern ); - - AIAPI AIErr (*GetSymbolByNameFromDocument) ( char* name, AIPatternHandle *symbolPattern, - AIDocumentHandle document ); - AIAPI AIErr (*CountSymbolPatternsFromDocument) ( long* count, AIDocumentHandle document ); - AIAPI AIErr (*GetNthSymbolPatternFromDocument) ( long n, AIPatternHandle *symbolPattern, - AIDocumentHandle document ); - - AIAPI AIErr (*NewSymbolPattern) ( AIPatternHandle *newSymbolPattern, AIArtHandle definitionArt, ASBoolean unlisted ); - // If definitionArt is not null, it will be copied as the - // defining art. If it is null, then the definition will - // be an empty group. (We do not bother making a - // checkerboard pattern like NewPattern does.) - // (See note at bottom for a discussion of listed vs unlisted.) - AIAPI AIErr (*NewSymbolPatternFromSel) ( AIPatternHandle *symbolPattern ); - // If something is selected, it will be copied as the - // defining art. If nothing is selected, then the definition - // will be an empty group. (You don't get a choice of unlisted - // on this one - symbols defined from the selected art are assumed - // to be permanent.) - AIAPI AIErr (*NewSymbolPatternFromSelGetBounds) ( AIPatternHandle *symbolPattern, AIRealRect *selectionBounds ); - // Like NewSymbolPatternFromSel except that it returns the bounds - // of the selected art used to define the symbol (which cannot be - // obtained by calling GetArtBounds on the symbol pattern art after - // defining it, because like patterns and brush patterns the copied - // definition art gets moved to a standardized location.) It could - // be obtained by getting all the selected objects and unioning up - // their bounds, but since NewSymbolPatternFromSel knows the bounds - // anyway it is easy to hand it back. This is mainly intended for - // clients who want to insert an instance of the symbol in place - // of the selection after it is created. - - AIAPI AIErr (*DeleteSymbolPattern) ( AIPatternHandle symbolPattern ); - AIAPI AIBoolean (*ValidateSymbolPattern) ( AIPatternHandle symbolPattern ); - // Is this symbol still known to the system? - // (It should never be necessary to use this if you don't - // hang onto the AIPatternHandle between messages, or if - // you process the kAIArtSymbolSetChangedNotifier.) - - // Functions for examining and modifying a symbol definition - AIAPI AIErr (*GetSymbolPatternArt) ( AIPatternHandle pattern, AIArtHandle *art ); - // This 'peeks' at the actual symbol definition. - // The art returned cannot be edited, just examined or duplicated!! - AIAPI AIErr (*PasteSymbolPatternArt) ( AIPatternHandle symbolPattern ); - // analogous to GetBrushPattern & GetPattern - // (I just don't think 'Get' is a very intuitive - // name for inserting a copy of the defining art - // into the current layer or insertion group.) - // Especially since we use GetPatternArt to mean - // peek at the real definition. - AIAPI AIErr (*CopySymbolPatternArt) ( AIPatternHandle symbolPattern, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - // paintOrder, prep and newArt have the same meaning as DuplicateArt - // in the AIArt suite. - // The recommended way to get an editable copy of a symbol definition - // is not to use PasteSymbolPatternArt, but rather to use NewArtEntry - // from the AIDictionary suite to create a group that isn't in the - // artwork, insert the definition copy into that, and then delete - // the dictionary entry. That way you don't modify the art tree - // and trigger irrelevant synchronization, change notifications, etc. - // (This is often used by export filters that need to make systematic - // adjustments to Illustrator art before getting it in an easy-to-export - // form.) - - AIAPI AIErr (*SetSymbolPatternArt) ( AIPatternHandle symbolPattern, AIArtHandle definitionArt ); - // Copy the definitionArt as the new symbol definition. - // Any existing instances of the symbol will be updated. - AIAPI AIErr (*SetSymbolPatternFromSel) ( AIPatternHandle symbolPattern ); - // Analogous to SetBrushPattern and SetPattern. - // Again, I just think that 'Set' isn't very intuitive for something - // that copies the selected art. - - // The functions below use C strings. If you have or want Pascal strings, you can - // also get and set the name of a symbol using GetPatternName and SetPatternName - // from AIPattern.h. - AIAPI AIErr (*GetSymbolPatternName) ( AIPatternHandle symbolPattern, char *name, int bufferSize ); - // If the actual symbol name is too long to fit in the buffer, it will be filled - // with a truncated form of the name and kNameTooLongErr will be returned. - AIAPI AIErr (*SetSymbolPatternName) ( AIPatternHandle symbolPattern, char *name ); - // If the name length exceeds kMaxSymbolNameLength then kNameTooLongErr will be returned - // If the name contains illegal characters, is of zero length, or consists entirely of spaces, - // then kInvalidNameErr will be returned. In either case, the symbol will retain the original name. - // If the name is already used for another symbol, then kNameInUseErr will be returned - AIAPI AIErr (*GetSymbolPatternDisplayName) ( char *name ); - // strips any hidden characters from the end of a name. The name is modified in place. - AIAPI AIErr (*SetSymbolPatternBaseName) ( AIPatternHandle symbolPattern, char *name ); - // Like SetSymbolPatternName, except if the given name is already used, the name will be changed - // by appending numbers until a unique name is generated. (If the name is very long and already - // in use, then the prefix may be truncated before appending numbers, but this is unlikely to - // happen since kSymbolMaxNameLength is so large.) - - // Functions for creating, examining and modifying symbol instances (art objects of type kSymbolArt) - AIAPI AIErr (*NewInstanceCenteredInView) ( AIPatternHandle symbolPattern, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - AIAPI AIErr (*NewInstanceAtLocation) ( AIPatternHandle symbolPattern, AIRealPoint center, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - AIAPI AIErr (*NewInstanceWithTransform) ( AIPatternHandle symbolPattern, AIRealMatrix *transform, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - // You can also use NewArt from the AIArt suite, which is like NewInstanceCenteredInView where - // the symbolPattern is the first one in the set. (It will return kBadParameterErr if there are - // no symbols defined in the current document.) - - AIAPI AIErr (*GetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle *symbolPattern ); - AIAPI AIErr (*SetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle symbolPattern ); - - // Return the matrix used internally by Illustrator to transform the SymbolPatternArt into an instance - AIAPI AIErr (*GetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - AIAPI AIErr (*SetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - // Return the matrix that can be used by a plugin to transform the SymbolPatternArt into an instance - // (If you are going to be using the TransformArt suite, this is the matrix you want.) - AIAPI AIErr (*GetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - AIAPI AIErr (*SetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - // You can also translate between the two forms of the matrix using AIRealMatrixRealSoft - // and AIRealMatrixRealHard from the AIHardSoft suite. (Do not use AIRealMatrixHarden and - // AIRealMatrixSoften, which harden/soften only the tx ty components.) - - AIAPI AIErr (*InsertExpandedSymbolArt) ( AIArtHandle symbolArt, - short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); - // paintOrder, prep and newArt have the same meaning as DuplicateArt - // in the AIArt suite. - // If the instance matrix is a simple placement matrix, then this - // function is equivalent to BreakLinkToSymbol, see below. If the - // instance matrix includes a scale, rotation, shear or reflection - // then it expands any appearances or plugin groups inside the symbol - // definition, followed by a transformation by the instance matrix. - // Also if the instance matrix includes a shear or a non-uniform - // scale, it expands strokes before applying the instance matrix. - // This routine thus preserves appearance of the instance at the - // cost of preserving the original editability of the symbol definition. - // Does not delete symbolArt. - - // Functions for listing, unlisting and sorting listed symbols - AIAPI AIBoolean (*IsSymbolPatternListed) ( AIPatternHandle symbolPattern ); - AIAPI AIErr (*MakeSymbolPatternListed) ( AIPatternHandle symbolPattern ); - AIAPI AIErr (*UnlistSymbolPattern) ( AIPatternHandle symbolPattern ); - - AIAPI AIErr (*SortListedSymbolPatterns) ( void ); - AIAPI AIErr (*MoveSymbolPatternInList) ( AIPatternHandle symbolPattern, int index ); - // Make the listed symbolPattern have the given index - // Use -1 to move to end of list - - // Function for examining symbol usage - AIAPI AIBoolean (*ArtUsesSymbolPattern) ( AIArtHandle art, short searchScope, AIPatternHandle targetSymbol, - AIPatternHandle *oneFoundSymbol, - AIPatternHandle ***allFoundSymbols, int *foundCount, - int *globalObjectUsage); - /* Check to see whether the given art object uses the targetSymbol. - searchScope is a bit vector; see the flags defined above - - If the art object is null, then the entire artwork is searched. In this case, - the kSearchDescendants flag is assumed even if it is not on in the searchScope, - because it is meaningless to search the whole artwork unless you look inside layer groups. - - The targetSymbol can be null; if so the art is searched for any symbol usage - If the targetSymbol is not null, then the remaining three parameters are all ignored! - - The oneFoundSymbol pointer can also be null. It is ignored if targetSymbol is not null. - If targetSymbol is null, and oneFoundSymbol is not null, and the art object uses exactly - one symbol within the scope searched, then *oneFoundSymbol will be returned as that symbol. - If it uses multiple symbols, the function returns true but *oneFoundSymbol is returned null. - If it uses multiple symbols and allFoundSymbols is non-null, then *allFoundSymbols is returned - as a handle to an array of all those symbols and *foundCount. Like the AIMatchingArt - suite, the memory is allocated by ArtUsesSymbolPattern, and must be freed by the - calling plugin using MdMemoryDisposeHandle. - *oneFoundSymbol is mostly intended for the Symbols palette to decide which symbol to select, - and if an object uses multiple symbols then nothing is selected. The searchScope in this - type of usage should not include kSearchNestedSymbolPatterns, because if symbol A's - definition includes symbol B, and the user selects an instance of symbol A, we want - to consider symbol A to be selected. But if they select a particle set containing - instances of both symbol A and symbol B, we want to select neither symbol in the palette. - *allFoundSymbols with a null art object is mostly intended for implementing the - "Select All Unused" command in the Symbols palette. - *allFoundSymbols with a non-null art object is mostly intended for examining which symbol - patterns are referenced by a plugin group that puts multiple symbols in its dictionary, - such as a particle set. - - If globalObjectUsage is not null, we additionally report whether the symbol was found inside - graph designs or inside other symbols. (This does not affect the searchScope, so if there - was a non-null input art object, any non-zero return value will mean that it was found - inside a graph design or symbol that was used in that object.) - */ - - AIAPI AIErr (*BreakLinkToSymbol) ( AIArtHandle symbolArt, - short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); - // paintOrder, prep and newArt have the same meaning as DuplicateArt - // in the AIArt suite. - // Like CopySymbolPatternArt for the symbolArt's symbolPattern - // followed by a transformation by the instance matrix, but - // more efficient than using the TransformArt suite since - // it is all done internally. Also transfers attributes from - // the symbol instance to the transformed defintion. - // If the instance matrix is a simple placement matrix, then this - // function is equivalent to InsertExpandedSymbolArt, see above, - // since neither function does any deep expansion when the matrix - // is simple. But this function does not do any internal expansion - // of strokes, active styles or plugin groups inside the symbol - // definition even when a rotational or shear transform is applied - // to the instance. Since transforming an object containing such - // active elements is not always visually identical to transforming - // what it "looks like", this routine preserves the full structure - // and editability of the symbol definition, at the cost of sometimes - // not preserving the appearance of the instance. - // Does not delete symbolArt. - - AIAPI AIErr (*RetargetForCurrentDocument) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern ); - /* Analogous to functions by the same name in AIArtStyle, AIObjectSet and AIPathStyle. - Intended primarily for drag-and-drop between library palettes and the main document - palette. - - This function can be safely used with fill patterns and brush patterns as well as - with symbol patterns (see the AIPattern and AIBrushPattern suites.) Therefore the - description below refers to "patterns". This should be taken to mean a symbol pattern - if passed a symbol pattern, a fill pattern if passed a fill pattern, etc. - - The function was not needed for fill patterns because they are usually retargetted - indirectly using the AIPathStyle suite, and it was not needed for brush patterns - because they are usually retargetted indirectly using the AIObjectSet suite. But - there is no corresponding data structure that wraps around a symbol pattern in - a palette. - - If the srcPattern is in the current document, just returns it back. - If the srcPattern is not in the current document, but there is already a pattern - in the current document with the same name and the same definition, returns the - handle to that pattern. - If the srcPattern is not in the current document and there is no pattern with the - same name and definition, then it creates a new pattern in the current document - with the same definition art, and a name based on the srcPattern's name (possibly - appending numbers if the srcPattern's name is assigned to a pattern in the current - document with a different definition.) All other global objects (colors, patterns, - brushes, styles, etc.) used indirectly in the definition are similarly retargetted, - using an existing object if one matches and creating a new one otherwise. - - For purposes of determining sameness, a listed symbol never matches an unlisted one, - even if they otherwise have the same name and definition. - */ - -} AI100SymbolSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100UID.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100UID.h deleted file mode 100644 index 5146259..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100UID.h +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef __AI100UID__ -#define __AI100UID__ - -/* - * Name: AI100UID.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Unique ID Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIUID.h" - - -#include "AIHeaderBegin.h" - -/** @file AI100UID.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100UIDUtilsSuite kAIUIDUtilsSuite -#define kAIUIDUtilsSuiteVersion1 AIAPI_VERSION(3) -#define kAI100UIDUtilsSuiteVersion kAIUIDUtilsSuiteVersion1 - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** - convenience APIs for working with art object UIDs. -*/ -typedef struct AI100UIDUtilsSuite { - - /** Get the unique id of the art object. If the object has no UID and create - is TRUE then a machine generated UID will be assigned to the object. */ - AIAPI AIErr (*GetArtUID) ( AIArtHandle art, AIBoolean create, AIUIDRef* uid ); - /** Set the unique id of the art object replacing its current id if any. */ - AIAPI AIErr (*SetArtUID) ( AIArtHandle art, AIUIDRef uid ); - /** Transfer the id from the source to the destination object */ - AIAPI AIErr (*TransferArtUID) ( AIArtHandle srcart, AIArtHandle dstart ); - - /** Get a new UIDREF for the art object. The object will be assigned a uid if - it does not already have one. */ - AIAPI AIErr (*NewArtUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref ); - /** Get the art object referenced by the UIDREF. */ - AIAPI AIErr (*GetReferencedArt) ( AIUIDREFRef uidref, AIArtHandle* art ); - - /** Get the UID name of the art object. An empty string indicates no id - is assigned. */ - AIAPI AIErr (*GetArtUIDName) ( AIArtHandle art, char* buffer, ASInt32 bufsize ); - /** Set the UID name of the art object. If makeUnique is true then a - unique id will be manufactured from the name if necessary. */ - AIAPI AIErr (*SetArtUIDName) ( AIArtHandle art, const char* buffer ); - - /** Get the name or XML ID of the art object depending on the setting of - the user preference. isDefaultName may be nil, if not then it is set - to true if the art object has no name or id and consequently the default - name for the art was returned. */ - AIAPI AIErr (*GetArtNameOrUID) ( AIArtHandle art, char* buffer, ASInt32 bufsize, ASBoolean* isDefaultName ); - /** Set the name or XML ID of the art object depending on the setting of - the user preference. Note that names are converted to valid XML IDs - and then used to specify the XML ID of the object. */ - AIAPI AIErr (*SetArtNameOrUID) ( AIArtHandle art, const char* buffer ); - - /** Manufacture a UID based on an existing UID */ - AIAPI AIErr (*MakeUIDFromBase) ( AIUIDRef base, AIUIDRef* uid ); - /** Manufacture a unique name from a base name */ - AIAPI AIErr (*MakeUniqueNameFromBase) ( const char* base, char* buffer, ASInt32 bufsize ); - -} AI100UIDUtilsSuite; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100User.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100User.h deleted file mode 100644 index ca248c9..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI100User.h +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef __AI100User__ -#define __AI100User__ - -/* - * Name: AI100User.h - * Purpose: Adobe Illustrator 10.0 User Utilities Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIUser.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI100UserSuite kAIUserSuite -#define kAIUserSuiteVersion5 AIAPI_VERSION(5) -#define kAI100UserSuiteVersion kAIUserSuiteVersion5 - -#define kAIUserSuiteVersion4 AIAPI_VERSION(4) - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -typedef struct { - - AIAPI AIBoolean (*Cancel) ( void ); - AIAPI void (*UpdateProgress) ( long current, long max ); - AIAPI void (*SetProgressText) ( const char *text ); - AIAPI void (*CloseProgress) ( void ); - AIAPI void (*AIRealToString) ( AIReal value, short precision, unsigned char *string ); - AIAPI void (*StringToAIReal) ( unsigned char *string, AIReal *value ); - AIAPI void (*IUAIRealToString) ( AIReal value, short precision, unsigned char *string ); - AIAPI void (*IUStringToAIReal) ( unsigned char *string, AIReal *value ); - AIAPI void (*IUAIRealToStringUnits) ( AIReal value, unsigned char *string ); - AIAPI void (*IUStringUnitsToAIReal) ( unsigned char *string, AIReal *value ); - AIAPI AIErr (*GetUnitsString) ( short format, unsigned char *string ); - - AIAPI AIErr (*AIUnitsToADMUnits) ( short aiUnits, ADMUnits *admUnits); - AIAPI AIErr (*ADMUnitsToAIUnits) ( ADMUnits admUnits, short *aiUnits); - AIAPI AIErr (*GetGlobalObjectDisplayName) ( char *name ); //name is modified in place - - /*Open the appropriate app to edit the object. This is only meaningful for - Placed and Raster objects, and is equivalent to the user option-double-clicking - on the object with the selection tool. See errors above.*/ - AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art ); - - AIAPI AIErr (*AppIdle) ( void ); - - AIAPI void (*DisableProgressCancel) ( void ); - -} AIUserSuite4; - - -typedef struct { - - AIAPI AIBoolean (*Cancel) ( void ); - AIAPI void (*UpdateProgress) ( long current, long max ); - AIAPI void (*SetProgressText) ( const char *text ); - AIAPI void (*CloseProgress) ( void ); - AIAPI void (*AIRealToString) ( AIReal value, short precision, unsigned char *string ); - AIAPI void (*StringToAIReal) ( unsigned char *string, AIReal *value ); - AIAPI void (*IUAIRealToString) ( AIReal value, short precision, unsigned char *string ); - AIAPI void (*IUStringToAIReal) ( unsigned char *string, AIReal *value ); - AIAPI void (*IUAIRealToStringUnits) ( AIReal value, unsigned char *string ); - AIAPI void (*IUStringUnitsToAIReal) ( unsigned char *string, AIReal *value ); - AIAPI AIErr (*GetUnitsString) ( short format, unsigned char *string ); - - AIAPI AIErr (*AIUnitsToADMUnits) ( short aiUnits, ADMUnits *admUnits); - AIAPI AIErr (*ADMUnitsToAIUnits) ( ADMUnits admUnits, short *aiUnits); - AIAPI AIErr (*GetGlobalObjectDisplayName) ( char *name ); //name is modified in place - - /*Open the appropriate app to edit the object. This is only meaningful for - Placed and Raster objects, and is equivalent to the user option-double-clicking - on the object with the selection tool. See errors above.*/ - AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art ); - - AIAPI AIErr (*AppIdle) ( void ); - - AIAPI void (*DisableProgressCancel) ( void ); - - // This method should be called by plugins when a timer or other asynchronous event - // like updating triggers some action that may allocate memory. If it returns false, - // the plugin should reschedule the action and try again later. It is not necessary to - // call this when handling notifications or user events; the plugin should never receive - // these when it's not ok to allocate memory. - AIAPI AIBoolean (*OKToAllocateMemory) ( void ); - -} AI100UserSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Array.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Array.h deleted file mode 100644 index 5e99726..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Array.h +++ /dev/null @@ -1,283 +0,0 @@ -#ifndef __AI110Array__ -#define __AI110Array__ - -/* - * Name: AI110Array.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator 11.0 Array Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1999-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIArray.h" - -#include "AIHeaderBegin.h" - -/** @file AI110Array.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - - -#define kAI110ArraySuite kAIArraySuite -#define kAIArraySuiteVersion3 AIAPI_VERSION(3) -#define kAI110ArraySuiteVersion kAIArraySuiteVersion3 -#define kAI110ArrayVersion kAI110ArraySuiteVersion - - -// Array errors. - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** - An array is a heterogeneous container whose elements are accessed by - sequential integer indices. Elements can be inserted into and removed - from the array. - - The elements of an array are called entries and their type is an AIEntryRef. - Entries can be of various types. There are simple types such as booleans, - integers, floats, and strings and complex types such as other arrays, - dictionaries and references to document objects including art objects, - brushes and styles. This flexibility makes arrays a very flexible and - poweful container. The AIEntry suite provides methods to construct and - query entries of different types. - - Arrays can themselves be stored in other containers such as other arrays - or dictionaries. In particular they can be stored in the dictionaries - attached to art objects and to the document. When an array is stored in - one of these places (directly or indirectly) it is read and written as - a part of the document. - - @see AI110EntrySuite - */ -typedef struct { - - /** - Create a brand new array. initial reference count is 1. - */ - AIAPI AIErr (*CreateArray) ( AIArrayRef* array ); - - - /** - Arrays are reference counted. Call Release once you are done with - an array to free its memory. - */ - AIAPI ASInt32 (*AddRef) ( AIArrayRef array ); - /** - Arrays are reference counted. Call Release once you are done with - an array to free its memory. - */ - AIAPI ASInt32 (*Release) ( AIArrayRef array ); - - - /** - Make an exact duplicate of the source array. a deep copy is performed. - */ - AIAPI AIErr (*Clone) ( AIArrayRef src, AIArrayRef* dst ); - /** - Make a copy of the source array replacing the current contents of the array - */ - AIAPI AIErr (*Copy) ( AIArrayRef array, AIArrayRef src ); - - - /** - Get the size of the array - */ - AIAPI ASInt32 (*Size) ( AIArrayRef array ); - /** - Remove the entry with the given index from the array - */ - AIAPI AIErr (*DeleteEntry) ( AIArrayRef array, ASInt32 i ); - /** - Insert an entry into the array at the given index. the new entry is assigned - an arbitrary initial value. - */ - AIAPI AIErr (*InsertEntry) ( AIArrayRef array, ASInt32 i ); - - - /** - Get the type of an array entry - */ - AIAPI AIErr (*GetEntryType) ( AIArrayRef array, ASInt32 i, AIEntryType* type ); - - - /** - Copy the entry at position1 of array1 to position2 of array2 inserting it - into the array. the arrays need not be distinct. - */ - AIAPI AIErr (*CopyEntry) ( AIArrayRef array1, AIArrayRef array2, ASInt32 position1, - ASInt32 position2 ); - /** - Move the entry at position1 of array1 to position2 of array2 removing it - from array1 and inserting it into array2. the arrays need not be distinct. - the optional parameter newposition returns the position of the element in - array2 after the move. - */ - AIAPI AIErr (*MoveEntry) ( AIArrayRef array1, AIArrayRef array2, ASInt32 position1, - ASInt32 position2, ASInt32* newposition ); - /** - Swap the entry at position1 of array1 with that at position2 in array2. the - arrays need not be distinct. - */ - AIAPI AIErr (*SwapEntries) ( AIArrayRef array1, AIArrayRef array2, ASInt32 position1, - ASInt32 position2 ); - - - /** - Get an art entry - */ - AIAPI AIErr (*GetArtEntry) ( AIArrayRef array, ASInt32 i, AIArtHandle* art ); - /** - Set the value of the entry to be a new art object of the specified type - */ - AIAPI AIErr (*NewArtEntry) ( AIArrayRef array, ASInt32 i, short type ); - - - /** - Move the art object from the art tree into the array. - */ - AIAPI AIErr (*MoveArtToEntry) ( AIArrayRef array, ASInt32 i, AIArtHandle art ); - /** - Move the art object from the art tree into the array. to remove the art object - from the array the entry is not deleted but instead is set to an arbitrary value. - */ - AIAPI AIErr (*MoveEntryToArt) ( AIArrayRef array, ASInt32 i, short paintOrder, - AIArtHandle prep, AIArtHandle* art ); - - - /** - Copy the art object from the art tree into the dictionary. - */ - AIAPI AIErr (*CopyArtToEntry) ( AIArrayRef array, ASInt32 i, AIArtHandle art ); - /** - Copy the art object from the dictionary into the art tree. - */ - AIAPI AIErr (*CopyEntryToArt) ( AIArrayRef array, ASInt32 i, short paintOrder, - AIArtHandle prep, AIArtHandle* art ); - - - /** - Set the entry of the dictionary to refer to the topmost group of the layer - */ - AIAPI AIErr (*SetEntryToLayer) ( AIArrayRef array, ASInt32 i, AILayerHandle layer ); - /** - insert a new layer whose group is the dictionary entry which must be a group - */ - AIAPI AIErr (*SetLayerToEntry) ( AIArrayRef array, ASInt32 i, short paintOrder, - AILayerHandle prep, AILayerHandle *layer ); - - - /** - Get the entry at the given index. returns a nil entry if it does not exist. - */ - AIAPI AIEntryRef (*Get) ( AIArrayRef array, ASInt32 i ); - /** - set the entry at the given index. - */ - AIAPI AIErr (*Set) ( AIArrayRef array, ASInt32 i, AIEntryRef entry ); - - - // the following are convenience APIs for getting and setting entries of the basic types - - /** - Get boolean - */ - AIAPI AIErr (*GetBooleanEntry) ( AIArrayRef array, ASInt32 i, ASBoolean* value ); - /** - Set boolean - */ - AIAPI AIErr (*SetBooleanEntry) ( AIArrayRef array, ASInt32 i, ASBoolean value ); - - /** - Get integer - */ - AIAPI AIErr (*GetIntegerEntry) ( AIArrayRef array, ASInt32 i, ASInt32* value ); - /** - Set integer - */ - AIAPI AIErr (*SetIntegerEntry) ( AIArrayRef array, ASInt32 i, ASInt32 value ); - - /** - Get real - */ - AIAPI AIErr (*GetRealEntry) ( AIArrayRef array, ASInt32 i, AIReal* value ); - /** - Set real - */ - AIAPI AIErr (*SetRealEntry) ( AIArrayRef array, ASInt32 i, AIReal value ); - - /** - Get string - */ - AIAPI AIErr (*GetStringEntry) ( AIArrayRef array, ASInt32 i, const char** value ); - /** - Set string - */ - AIAPI AIErr (*SetStringEntry) ( AIArrayRef array, ASInt32 i, const char* value ); - - /** - Get binary - */ - AIAPI AIErr (*GetBinaryEntry) ( AIArrayRef array, ASInt32 i, void* value, ASInt32* size ); - /** - Set binary - */ - AIAPI AIErr (*SetBinaryEntry) ( AIArrayRef array, ASInt32 i, void* value, ASInt32 size ); - - /** - Get dictionary - */ - AIAPI AIErr (*GetDictEntry) ( AIArrayRef array, ASInt32 i, AIDictionaryRef* value ); - /** - Set dictionary - */ - AIAPI AIErr (*SetDictEntry) ( AIArrayRef array, ASInt32 i, AIDictionaryRef value ); - - /** - Get array - */ - AIAPI AIErr (*GetArrayEntry) ( AIArrayRef array, ASInt32 i, AIArrayRef* value ); - /** - Set array - */ - AIAPI AIErr (*SetArrayEntry) ( AIArrayRef array, ASInt32 i, AIArrayRef value ); - -} AI110ArraySuite; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Color.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Color.h deleted file mode 100644 index b1526ba..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Color.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef __AI110Color__ -#define __AI110Color__ - -/* - * Name: AI110Color.h - * $Revision: 17 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 6.0 Color Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIColor.h" - -#include "AIHeaderBegin.h" - -/** @file AIColor.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** Custom colors define named colors. The appearance of the named color is - defined by a color of one of these types. */ -typedef enum { - /** Solid ink, expressed in four process colors */ - kAI110CustomFourColor = 0, - /** RGB colors */ - kAI110CustomThreeColor -} AI110CustomColorTag; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** The union of all possible process colors that can be associated with - a custom color. */ -typedef union { - AIFourColorStyle f; - AIThreeColorStyle rgb; - AIGrayColorStyle gray; -} AI110CustomColorUnion; - -/** Custom colors define named colors. These colors may be actual inks or simply - names for process colors depending on whether the custom color is a spot - or global process color. In either case the custom color has an associated - process color. The type of process color is identified by this enumeration. */ -typedef struct { - AI110CustomColorTag kind; - AI110CustomColorUnion c; - AICustomColorFlags flag; - unsigned char name[32]; -} AI110CustomColor; - - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110DrawArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110DrawArt.h deleted file mode 100644 index 2b06e20..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110DrawArt.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef __AI110DrawArt__ -#define __AI110DrawArt__ - -/* - * Name: AI110DrawArt.h - * $Revision: $ - * Author: - * Date: - * Purpose: Adobe Illustrator 11.0 Draw Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIDrawArt__ -#include "AIDrawArt.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AI110DrawArt.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI110DrawArtSuite "AI Draw Art Suite" -#define kAIDrawArtSuiteVersion6 AIAPI_VERSION(6) -#define kAI110DrawArtSuiteVersion kAIDrawArtSuiteVersion6 -#define kAI110DrawArtVersion kAIDrawArtSuiteVersion - -/******************************************************************************* - ** - ** Types - ** - **/ - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** - The draw art suite APIs can be used to draw Illustrator artwork to an - output port (drawing surface). The port can either be contained within - a window in the UI or it can be an offscreen drawing surface being used - to rasterize artwork. There are a considerable number of options for - controlling the drawing process. - */ -typedef struct { - - /** Draw artwork as specified by the AIDrawArtData parameter. */ - AIAPI AIErr (*DrawArt)( AIDrawArtData *data ); - /** Draw a color swatch as specified by the AIDrawColorData parameter. */ - AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data ); - /** This method can only be called from the code that responds to an annotator's draw - annotations message. It causes the highlighting annotations for the specified art - object to be drawn using the specified color. */ - AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color ); - /** A convenience API for drawing a thumbnail of the art object to the AGM port with - the specified bounds. */ - AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect ); - -} AI110DrawArtSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Folders.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Folders.h deleted file mode 100644 index 749d657..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Folders.h +++ /dev/null @@ -1,219 +0,0 @@ -#ifndef __AI110Folders__ -#define __AI110Folders__ - -/* - * Name: AI110Folders.h - * $Revision: 1 $ - * Author: dmaclach - * Date: - * Purpose: Adobe Illustrator 11.0 Folders Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIFolders.h" - -#include "AIHeaderBegin.h" - -/** @file AI110Folders.h */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAIFoldersSuiteVersion2 AIAPI_VERSION(2) -#define kAI110FoldersSuiteVersion kAIFoldersSuiteVersion2 -#define kAI110FoldersVersion kAI110FoldersSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** - The AIFoldersSuite provides APIs that return the locations of the standard - folders used by Illustrator. The diagram below shows the layout of these folders - and the corresponding identifiers. - -@verbatim - - Local Hierarchy: - - Adobe Illustrator X: <- kAIRootFolderType - Adobe Illustrator X: <- kAIPackageFolderType - Contents: <- kAIContentsFolderType - Windows/MacOSClassic: <- kAIApplicationFolderType - +The Executable - +Shared Libraries - Help: <- kAIHelpFolderType - +HTML Help Files - images: <- kAIHelpImagesFolderType - +Help Graphics - Helpers: <- kAIHelpersFolderType - Preview In: <- kAIPreviewInFolderType - Required: <- kAIRequiredPluginsFolderType - +Required Plugins - Fonts: <- kAIRequiredFontsFolderType - +Required Fonts - Legal: <- kAILegalFolderType - +EULA - Plug-ins: <- kAIPluginsFolderType - Can be changed By User kAIStartupFileFolderType/kAIRidersFileFolderType both point here as well currently. This may change in the future. - Extensions: - Illustrator Filters: - Illustrator Formats - Other: - Illustrator Formats - Standard: - Photoshop Effects: - Photoshop Filters: - Photoshop Formats: - Text Filters: <- kAIHyphenationDictFolderType - Dictionaries: <- kAIDictionariesFolderType/kAIHyphenationDictFolderType/kAISpellingDictFolderType (all three of these currently point at the same folder. This may change in the future. Please choose the one that is most appropriate for your usage.) - Tools: - Tsume: <- kAITsumeFolderType - Presets: <- kAIPresetsFolderType - Actions: <- kAIPresetActionsFolderType - Brushes: <- kAIPresetBrushesFolderType - Color Books: <- kAIPresetColorBooksFolderType - Gradients: <- kAIPresetGradientsFolderType - Keyboard Shortcuts: <- kAIPresetKeyboardShortcutsFolderType - Patterns: <- kAIPresetPatternsFolderType - Save for Web Settings: <- kAISettingsFolderType - Color Tables: <- kAIColorTableSettingsFolderType - +Color tables - Optimize: <- kAIOptimizeSettingsFolderType - +Optimize Settings - Scripts: <- kAIPresetScriptsFolderType - Styles: <- kAIPresetStylesFolderType - Swatches: <- kAIPresetSwatchesFolderType - Color Systems: <- kAIPresetColorSystemsFolderType - Symbols: <- kAIPresetSymbolsFolderType - Templates: <- kAIPresetTemplatesFolderType - Blank Documents: <- kAIPresetBlankDocumentsFolderType - Fonts: <- kAIFontsFolderType - Composite Fonts <- kAIFontsCFFolderType - Temp <- kAIFontsCFTempFolderType - CMaps: <- kAIFontsCMapsFolderType - Sample Files: <- kAISampleFilesFolderType - Graph Designs: <- kAISampleGraphDesignsFolderType - Sample Art: <- kAISampleArtFolderType - SVG: <- kAISampleSVGFolderType - Data-Driven Graphics: <- kAIDataDrivenGraphicsFolderType - Utilities: <- kAIUtilitiesFolderType - - - - System Hierarchies: - - The diagram below tries to describe the parts of the directory hierarchy of - Illustrator 10 that are located under system folders. The locations of such - directories are necessarily dependent on the OS. In the diagram a name - enclosed in square brackets [...] indicates a system dependent directory. - The values for these directories for each system are defined following the - diagram. - - [PrimaryScratch] <- kAIPrimaryScratchFolderType - + primary scratch file location - [SecondaryScratch] <- kAISecondaryScratchFolderType - + secondary scratch file location - [AIPreferences] <- kAIPreferencesFolderType - + preferences file location - + plugin cache file location - [UserSupport] <- kAIUserSupportFolderType - Adobe Illustrator X <- kAIUserSupportAIFolderType - plugins <- kAIUserSupportAIPluginsFolderType - + plugins that are usable by the user who is logged in - Fonts <- kAIUserSupportCommonFontsFolderType - [ApplicationSupportCommon] <- kAIApplicationSupportCommonFolderType - Color <- kAIApplicationSupportCommonColorFolderType - Profiles <- kAIApplicationSupportCommonColorProfilesFolderType - Settings <- kAIApplicationSupportCommonColorSettingsFolderType - typeSpt <- kAIApplicationSupportCommonTypeSupportFolderType - Kinsoku Sets <- kAIApplicationSupportCommonKinsokuSetFolderType - Mojikume Sets <- kAIApplicationSupportCommonMojikumeSetFolderType - Fonts <- kAIApplicationSupportCommonFontsFolderType - Reqrd <- kAIApplicationSupportCommonFontsReqrdFolderType - Base <- kAIApplicationSupportCommonFontsReqrdBaseFolderType - cmaps <- kAIApplicationSupportCommonFontsReqrdCMapsFolderType - PDFL <- kAIApplicationSupportCommonPDFLFolderType - PDFL5.0 <- kAIApplicationSupportCommonPDFL5FolderType - cmaps <- kAIApplicationSupportCommonPDFL5CMapsFolderType - fonts <- kAIApplicationSupportCommonPDFL5FontsFolderType - Printspt <- kAIApplicationSupportCommonPrintSupportFolderType - Workflow <- kAIApplicationSupportCommonWorkflowFolderType - [MyDocuments] <- kAIMyDocumentsFolderType - +default documents file location - [PPDs] <- kAIPrinterDescriptionsFolderType - + ppd location - [Logs] <- kAILogsFolderType - System Dependant Directories: - - W2k/W9x - ------- - PrimaryScratch = System definition of temporary but can be changed by user - SecondaryScratch = System definition of temporary but can be changed by user - AIPreferences = Documents and Settings\username\Application Data\Adobe\Adobe Illustrator X - UserSupport = Documents and Settings\username\Application Data\Adobe - ApplicationSupportCommon = Program Files\Common Files\Adobe - MyDocuments = Documents and Settings\username\My Documents - PPDs = unknown - Logs = Documents and Settings\username\Application Data\Adobe\Logs - - WNT - --- - PrimaryScratch = System definition of temporary but can be changed by user - SecondaryScratch = System definition of temporary but can be changed by user - AIPreferences = \system\profiles\username\Application Data\Adobe\Adobe Illustrator X - UserSupport = \system\profiles\username\Application Data\Adobe - ApplicationSupportCommon = Program Files\Common Files\Adobe - MyDocuments = \system\profiles\username\My Documents - PPDs = unknown - Logs = \system\profiles\username\Application Data\Adobe\Logs - - OSX - --- - PrimaryScratch = System definition of temporary but can be changed by user - SecondaryScratch = System definition of temporary but can be changed by user - AIPreferences = ~/Library/Preferences/Adobe Illustrator X - UserSupport = ~/Library/Application Support/Adobe - ApplicationSupportCommon = /Library/Application Support/Adobe - MyDocuments = ~/Documents - PPDs = Libraries/Printers/PPDs - Logs = ~/Library/Logs/Adobe Illustrator CS - -@endverbatim -*/ -typedef struct { - - // - version 1 api - - - /** Get the name of the folder. The name buffer must be of size #kMaxPathLength. Only - the name of the folder is returned not the full path.*/ - AIAPI AIErr (*GetFolderName)(AIFolderType type, char *name); - - -} AI110FoldersSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110ForeignObject.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110ForeignObject.h deleted file mode 100644 index 38ac76c..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110ForeignObject.h +++ /dev/null @@ -1,116 +0,0 @@ -#ifndef __AI110ForeignObject__ -#define __AI110ForeignObject__ - -/* - * Name: AI110ForeignObject.h - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2002-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/*******************************************************************************/ -// Imports - -#ifndef __AIForeignObject__ -#include "AIForeignObject.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AI110ForeignObject.h */ - -/*******************************************************************************/ -// Constants - -#define kAI110ForeignObjectSuite kAIForeignObjectSuite -#define kAIForeignObjectSuiteVersion1 AIAPI_VERSION(1) -#define kAI110ForeignObjectSuiteVersion kAIForeignObjectSuiteVersion1 - - -/*******************************************************************************/ -// Suite - - -/** - This suite exposes an API for the foreign object. The foreign object is a - wrapper around imaging constructs supported by PDF and the Adobe Imaging Model - but not natively in Illustrtor. - - Foreign objects behave like placed objects in that they can be positioned on - the page, saved, displayed on the screen, and printed. But they do not respond - to other Illustrator editing commands. A foreign object may use global resources - that are used by other artwork elements. For example it may use fonts or spot - colors. - - Illustrator requires that all spot colors used in a document be installed into - the swatch list. Each spot color must have a unique definition and spot colors - used by foreign objects are locked against having their definition edited. The - installation and locking of spot colors needs to be done once the foreign - object has been created and is known to be a permanent result of an operation - on the document as opposed to a temporary object created during an operation. - For this reason installation of spot colors is done when an editing operation - is committed. When spot colors are installed their definitions may conflict - with existing spot colors. If this is the case the user is prompted to resolve - the conflict. - - See also the AIFOConversionSuite for APIs that expand foreign objects - to native Illustrator artwork. -*/ -typedef struct AI110ForeignObjectSuite { - - /** Create a new Foreign object. See AIArtSuite::NewArt() for the meanings - of the paintOrder and prep parameters. */ - AIAPI AIErr (*New) (short paintOrder, AIArtHandle prep, AIArtHandle *newArt); - - /** Test whether a given object is a foreign object */ - AIAPI AIBoolean (*Is) (AIArtHandle art); - - /** Get the bounds of the foreign object (before application of the matrix) */ - AIAPI AIErr (*GetBounds) ( AIArtHandle art, AIRealRect *bounds ); - - /** Set the bounds of the foreign object (before application of the matrix) */ - AIAPI AIErr (*SetBounds) ( AIArtHandle art, AIRealRect *bounds ); - - /** Get the transformation matrix of the foreign object. */ - AIAPI AIErr (*GetMatrix) (AIArtHandle art, AIRealMatrix *matrix); - - /** Set the transformation matrix of the foreign object. */ - AIAPI AIErr (*SetMatrix) (AIArtHandle art, AIRealMatrix *matrix); - - /** Get the foreign object's display port. The display port is an AGM port. - After creating a foreign object a client will typically obtain the - display port and draw into it. The drawing commands are recorded by - the display port and are played back whenever the foreign object is - rendered. One way to draw into the display port is to set it as the - portV6 member of the AIDrawArtData structure and use the - AIDrawArtSuite::DrawArt() API. Clients who have access to the AGM - interface can also draw directly into the the display list or play it's - contents to another AGM port. */ - AIAPI AIErr (*GetDisplayPort)(AIArtHandle art, AIDisplayPortHandle *port); - - /** No-op. */ - AIAPI AIErr (*InstallResources)(AIArtHandle art); - - /** This API is intended for use by the AIFOConversionSuite implementation - of the #kAIFOConversionSuppressAttributes flag. It duplicates the input - object stripping off any attributes that affect the rendering of the - contents of the object other than the matrix. */ - AIAPI AIErr (*DuplicateForConversion)(AIArtHandle art, short paintOrder, AIArtHandle prep, AIArtHandle* newArt); - -} AI110ForeignObjectSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110MaskFlattener.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110MaskFlattener.h deleted file mode 100644 index 62c00ab..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110MaskFlattener.h +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef __AI110MaskFlattener__ -#define __AI110MaskFlattener__ - -/* - * Name: AI110MaskFlattener.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 11.0 Mask Flattener Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ -/******************************************************************************* - ** - ** Imports - ** - **/ -#ifndef __AIMaskFlattener__ -#include "AIMaskFlattener.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AI110MaskFlattener.h */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAIMaskFlattenerSuite "AI Mask Flattener Suite" -#define kAIMaskFlattenerSuiteVersion2 AIAPI_VERSION(2) -#define kAI110MaskFlattenerSuiteVersion kAIMaskFlattenerSuiteVersion2 - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** - The transparency flattening APIs provide facilities for flattening - transparent artwork into an equivalent collection of opaque artwork. - */ -typedef struct { - - AIAPI AIErr (*FlattenArt)(AIArtSet artSet, AIFlatteningOptions *options, short paintOrder, AIArtHandle prep); - AIAPI AIErr (*CreateTemporaryFlatteningLayer)(AILayerHandle *layer); - AIAPI AIErr (*FlattenDocumentToLayer)(AILayerHandle layer); - AIAPI AIErr (*RemoveTemporaryFlatteningLayer)(); - AIAPI AIErr (*IsTemporaryFlatteningLayer)(AILayerHandle layer, AIBoolean *flattening); - AIAPI AIErr (*ReportError)(AIErr error); - AIAPI AIErr (*CollectDocumentFlatteningInfo)(AIFlatteningInfoReceiver receiver, void* receiverdata); - -} AI110MaskFlattenerSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Path.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Path.h deleted file mode 100644 index 1c11185..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Path.h +++ /dev/null @@ -1,259 +0,0 @@ -#ifndef __AI110Path__ -#define __AI110Path__ - -/* - * Name: AI110Path.h - * $Revision: 13 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 11.0 Path Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPath.h" - -#include "AI70Color.h" - -#include "AIHeaderBegin.h" - -/** @file AI110Path.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI110PathSuite kAIPathSuite -#define kAIPathSuiteVersion5 AIAPI_VERSION(5) -#define kAI110PathSuiteVersion kAIPathSuiteVersion5 -#define kAI110PathVersion kAI110PathSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -// These typedefs are needed only for the AIPathStyleToAI70PathStyle and AI70PathStyleToAIPathStyle -// functions in this suite. -// They are AIFixed versions of the types defined in AIPathStyle.h, but since we no longer export the -// AI70PathStyle suite, the typedef has been moved here to be with its only reference. - -typedef struct { - AI70Color color; /* Fill color */ - AIBoolean overprint; /* Overprint */ -} AI70FillStyle; - -typedef struct { - short length; /* 0 if solid */ - AIFixed offset; /* Dash offset */ - AIFixed array[kMaxDashComponents]; /* Dash array */ -} AI70DashStyle; - -typedef struct { - AI70Color color; /* Stroke color */ - AIBoolean overprint; /* Overprint - not meaningful if ColorTag is pattern */ - AIFixed width; /* Line width */ - AI70DashStyle dash; /* Stroke dash */ - AILineCap cap; /* Line cap */ - AILineJoin join; /* Line join */ - AIFixed miterLimit; /* Line miter limit */ -} AI70StrokeStyle; - -typedef struct { - AIBoolean fillPaint; /* Whether or not to fill the path */ - AIBoolean strokePaint; /* Whether or not to stroke the path */ - AI70FillStyle fill; /* Fill style, if fillPaint is true */ - AI70StrokeStyle stroke; /* Stroke style, if strokePaint is true */ - AIBoolean clip; /* Whether or not to use this as a clipping path */ - AIBoolean evenodd; /* Whether or not to use the even-odd rule to determine path insideness */ - AIFixed resolution; /* Path's resolution */ - unsigned char note[256]; -} AI70PathStyle; - -typedef struct AI110PathStyle { - AIBoolean fillPaint; /** Whether or not to fill the path. */ - AIBoolean strokePaint; /** Whether or not to stroke the path */ - struct AIFillStyle fill; /** Fill style, if fillPaint is true */ - struct AIStrokeStyle stroke; /** Stroke style, if strokePaint is true */ - AIBoolean clip; /** Whether or not to use this as a clipping path */ - AIBoolean lockClip; /** Whether or not to lock the clipping path */ - AIBoolean evenodd; /** Whether or not to use the even-odd rule to determine path insideness */ - AIReal resolution; /** Path's resolution */ - unsigned char note[256]; -} AI110PathStyle; - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** - The shape of art of type kPathArt is defined by one or more path segments. It - has two other attributes, whether the path is closed and whether it is a guide. - In addition, it has paint attibutes associated with it in a path style (see the - AIPathStyleSuite). - - Every segment of a path corresponds to an anchor point (anchor points are - the path handles that are visible when the path is selected). The segment - count is the number of anchor points on the path, including the two at each - end. A segment is defined by the AIPathSegment structure. - - The in and out points of a segment define the tangent of the curve at a point - Note that the in point for initial and final segments of an open path are not - used. - - A segment can be a corner point or a smooth point. If the segment is a - corner (corner == true), the in and out points can be anywhere. To make a - straight line, place the in and out points of each end on their p points. - - Segment numbers begin at zero. Illustrator limits the number of segments in - a path to 8191. A path may consist of a single anchor point. - - A path can be open or closed. If a path is open, it is defined only by its - segments. If it is closed, a 'phantom' segment is added by Illustrator - between the first and last anchor points. It uses the out tangent of the last - segment and the in segment of the first. - - Some paths double as guides. In all other respects they are paths, having - segments, corner points and close attributes. - */ -struct AI110PathSuite { - - /** Every anchor point on a path corresponds to a path segment (anchor points - are the path handles that are visible when the path is selected). The segment - count is the number of anchor points on the path, including the two at each - end. A path may consist of a single anchor point. */ - AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, short *count ); - /** Sets the number of segments for the path. This may be used to either increase - or decrease the count of segments. If the count is increased any new segments - are initialized to default values. Callers should not depend on these default - values. - - Note: SetPathSegmentCount() and SetPathSegments() will return #kTooManySegmentsErr - when you try to exceed the maximum number of path segments, - - Note: When AIArtSuite::NewArt() creates a path, it initially allocates space - for 32 segments. When creating many small paths, this can get waste quite - a bit of memory. SetPathSegmentCount() will free the memory of unused path - segments immediately. - */ - AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, short count ); - /** Use this to 'read' a range of segments out of a path. - - The segNumber and count arguments specify the range of segments to get - (the first segment and the number of segments). Segment numbers begin at - zero. - - The segment argument points to an array of AIPathSegment structures - allocated by the plug-in to receive these segments. It must be at least as big - as count. - */ - AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment segments[] ); - /** Use this to 'write' a range of segments into a path. */ - AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, short segNumber, short count, const AIPathSegment segments[] ); - /** This function inserts count segments after segNumber. */ - AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, short segNumber, short count, const AIPathSegment segments[] ); - /** This function deletes count segments starting at segNumber. If you delete - segments from a closed path, the path remains closed. */ - AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, short segNumber, short count ); - - /** Returns whether the path is closed. */ - AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed ); - /** Sets whether the path is closed. */ - AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed ); - /** Returns whether the path is a guide */ - AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide ); - /** Sets whether the path is a guide */ - AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide ); - - /** Returns an indication of the selection state for the indicated segment. The - possible values are given by #AIPathSegementSelectionState. */ - AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, short segNumber, short *selected ); - /** Sets the selection state for the indicated segment. The possible values are - given by #AIPathSegementSelectionState. Note that modifying the selection - state of one segment may affect adjacent segments. For example, if the out - direction of one segment is selected then the in direction of the following - segment will be selected. */ - AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, short segNumber, short selected ); - - /** Reverses the order of segments in the path. Use this as a quick way to change - the winding order of a path. The winding order is only significant if the path - is a subpath of a compound path. It controls the insideness of the compound path.*/ - AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path ); - /** The area is returned as area and is in square points. The paths winding - order is determined by the sign of area. If the area is negative, the path is - wound counter-clockwise. Self-intersecting paths may contain sub-areas that - cancel each other out. It’s possible for a path to return zero for its area, - even though it’s got lots of area. */ - AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area ); - - // New for AI8.0: - - /** Get the length of the perimeter of the path measured in points. The flatness - parameter controls the degree of accuracy to the true mathematical length. */ - AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness ); - /** Returns the bezier from "segNumber" anchor to the next. - - If segNumber is the last anchor point of an open path, it will wrap around to - the beginning. If it is the last anchor point of a closed path, then all four - points will be equal (i.e., the outgoing control point will be ignored), so - that visible bounding rect, length, and other functions will treat it properly. - */ - AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, short segNumber, AIRealBezier *bezier ); - /** Determines if GetPathLength() != 0 but much more efficient. */ - AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength ); - - /** Determines whether the path is a clipping path. The input object may be a - path or a compound path. To be a clipping object a path must have at least - two segments. To make a path into a clipping path use AIArtSuite::SetArtUserAttr() */ - AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip ); - - /** A utility to convert an Illustrator 8 and later path style to an Illustrator - 7.0 path style. The former uses floating point while the latter uses fixed - point for numbers. - Since the AI70PathStyle suite is not exported, this conversion is no longer useful. */ - AIAPI AIErr (*AIPathStyleToAI70PathStyle)( AI110PathStyle *from, AI70PathStyle *to ); - /** A utility to convert an Illustrator 7.0 path style to an Illustrator 8 and - later path style. The latter uses floating point while the former uses fixed - point for numbers. - Since the AI70PathStyle suite is not exported, this conversion is no longer useful. */ - AIAPI AIErr (*AI70PathStyleToAIPathStyle)( AI70PathStyle *from, AI110PathStyle *to ); - - // New for AI 11 - - /** Determines whether all segments of the path are selected. In this case the - path is considered to be fully selected. */ - AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected ); - -}; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110PluginGroup.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110PluginGroup.h deleted file mode 100644 index 364f0d5..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110PluginGroup.h +++ /dev/null @@ -1,103 +0,0 @@ -#ifndef __AI110PluginGroup__ -#define __AI110PluginGroup__ - -/* - * Name: AI110PluginGroup.h - * Purpose: Adobe Illustrator 11.0 Plugin Group Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1995-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/** @file AI110PluginGroup.h */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPluginGroup.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI110PluginGroupSuite kAIPluginGroupSuite -#define kAI110PluginGroupSuiteVersion AIAPI_VERSION(3) -#define kAI110PluginGroupVersion kAI110PluginGroupSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -// Illustrator 11.0 PluginGroup suite -typedef struct _AI110PluginGroupSuite { - - AIAPI AIErr (*AddAIPluginGroup) ( SPPluginRef self, char *name, AIAddPluginGroupData *data, ai::int32 options, - AIPluginGroupHandle *entry ); - AIAPI AIErr (*UseAIPluginGroup) ( AIArtHandle art, AIPluginGroupHandle entry ); - - AIAPI AIErr (*GetAIPluginGroupName) ( AIPluginGroupHandle entry, char **name ); - AIAPI AIErr (*GetAIPluginGroupVersion) ( AIPluginGroupHandle entry, ai::int32 *major, ai::int32 *minor ); - AIAPI AIErr (*GetAIPluginGroupDescription) ( AIPluginGroupHandle entry, char **desc ); - AIAPI AIErr (*GetAIPluginGroupOptions) ( AIPluginGroupHandle entry, ai::int32 *options ); - AIAPI AIErr (*GetAIPluginGroupPlugin) ( AIPluginGroupHandle entry, SPPluginRef *plugin ); - - AIAPI AIErr (*CountAIPluginGroups) ( ai::int32 *count ); - AIAPI AIErr (*GetNthAIPluginGroup) ( ai::int32 index, AIPluginGroupHandle *entry ); - - AIAPI AIErr (*GetPluginArtName) ( AIArtHandle art, char **name ); - AIAPI AIErr (*SetPluginArtName) ( AIArtHandle art, char *name ); - AIAPI AIErr (*GetPluginArtVersion) ( AIArtHandle art, ai::int32 *major, ai::int32 *minor ); - AIAPI AIErr (*SetPluginArtVersion) ( AIArtHandle art, ai::int32 major, ai::int32 minor ); - AIAPI AIErr (*GetPluginArtPluginGroup) ( AIArtHandle art, AIPluginGroupHandle *entry ); - AIAPI AIErr (*SetPluginArtPluginGroup) ( AIArtHandle art ); - AIAPI AIErr (*GetPluginArtEditArt) ( AIArtHandle art, AIArtHandle *editArt ); - AIAPI AIErr (*SetPluginArtEditArt) ( AIArtHandle art, AIArtHandle editArt ); - AIAPI AIErr (*GetPluginArtResultArt) ( AIArtHandle art, AIArtHandle *resultArt ); - AIAPI AIErr (*SetPluginArtResultArt) ( AIArtHandle art, AIArtHandle resultArt ); - - AIAPI AIErr (*GetPluginArtDataCount) ( AIArtHandle art, size_t *count ); - AIAPI AIErr (*SetPluginArtDataCount) ( AIArtHandle art, size_t count ); - AIAPI AIErr (*GetPluginArtDataRange) ( AIArtHandle art, void *data, size_t index, size_t count ); - AIAPI AIErr (*SetPluginArtDataRange) ( AIArtHandle art, void *data, size_t index, size_t count ); - - AIAPI AIErr (*MarkPluginArtDirty) ( AIArtHandle art ); - AIAPI AIErr (*MarkPluginArtClean) ( AIArtHandle art ); - - // New for AI10 - - AIAPI AIErr (*GetPluginArtClipping) ( AIArtHandle art, AIBoolean *clipping ); - AIAPI AIErr (*SetPluginArtClipping) ( AIArtHandle art, AIBoolean clipping ); - - AIAPI AIErr (*GetAIPluginGroupDefaultName) ( AIPluginGroupHandle entry, char** name ); - AIAPI AIErr (*SetAIPluginGroupDefaultName) ( AIPluginGroupHandle entry, const char* name ); - - AIAPI AIErr (*GetAIPluginGroupAppVersion) ( AIPluginGroupHandle entry, AIVersion* appVersion ); - AIAPI AIErr (*SetAIPluginGroupAppVersion) ( AIPluginGroupHandle entry, AIVersion appVersion ); - - -} AI110PluginGroupSuite; - - -#include "AIHeaderEnd.h" - -#endif - diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110RealBezier.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110RealBezier.h deleted file mode 100644 index 23af868..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110RealBezier.h +++ /dev/null @@ -1,88 +0,0 @@ -#ifndef __AI110RealBezier__ -#define __AI110RealBezier__ - -/* - * Name: AIRealBezier.h - * Purpose: Adobe Illustrator bezier suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIRealBezier.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI110RealBezierSuite kAIRealBezierSuite -#define kAIRealBezierSuiteVersion1 AIAPI_VERSION(1) -#define kAI110RealBezierVersion kAIRealBezierSuiteVersion1 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** Utilities for working with cubic beziers */ -typedef struct { - - /** Set a bezier from its four control points. */ - AIAPI void (*Set) (AIRealBezier* b, AIRealPoint* p0, AIRealPoint* p1, - AIRealPoint* p2, AIRealPoint* p3); - /** Translate the bezier by the vector. */ - AIAPI void (*Offset) (AIRealBezier* b, AIReal dh, AIReal dv); - /** Apply the transformation matrix to the bezier. */ - AIAPI void (*Transform) (AIRealBezier* b, AIRealMatrix* m); - /** Determine the point on the bezier corresponding to the parameter t. */ - AIAPI void (*Evaluate) (AIRealBezier* b, AIReal t, AIRealPoint* p); - /** Determine the tangent to the bezier corresponding to the parameter t. */ - AIAPI void (*Tangent) (AIRealBezier* b, AIReal t, AIRealPoint* v); - /** Determine the normal to the bezier corresponding to the parameter t. */ - AIAPI void (*Normal) (AIRealBezier* b, AIReal t, AIRealPoint* v); - /** Split b at the parameter t returning the two halves as b1 and b2. */ - AIAPI void (*Divide) (AIRealBezier* b, AIReal t, AIRealBezier* b1, - AIRealBezier* b2); - /** Test whether the bezier intersects the supplied rectangle. */ - AIAPI AIBoolean (*IntersectsRect)(AIRealBezier* b, AIRealRect* r, AIReal scale); - - // New for AI8.0. - - /** Calculate the length of the bezier. The flatness parameter controls the accuracy - with which the curve is approximated. */ - AIAPI AIReal (*Length) (AIRealBezier* b, AIReal flatness); - /** Equivalent to calling Evaluate() and Tangent() with half the work. */ - AIAPI void (*PointAndTangent) (AIRealBezier* b, AIReal t, AIRealPoint* p, AIRealPoint *v); - - /** Adjust the bezier such that it passes through the point p at the parameter value - t. See #AIAdjustThroughPointResult for return values. */ - AIAPI unsigned short (*AdjustThroughPoint) (AIRealBezier* b, AIRealPoint* p, AIReal t); - -} AI110RealBezierSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Runtime.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Runtime.h deleted file mode 100644 index 4905050..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110Runtime.h +++ /dev/null @@ -1,184 +0,0 @@ -#ifndef __AI110Runtime__ -#define __AI110Runtime__ - -/* - * Name: AIRuntime.h - * $Revision: 11 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 10.0 Runtime Environment. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIRuntime.h" - -#include "AIHeaderBegin.h" - -/** @file AI11.0Runtime.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI110RuntimeSuite "AI Runtime Suite" -#define kAIRuntimeSuiteVersion4 AIAPI_VERSION(4) -#define kAIRuntimeSuiteVersion5 AIAPI_VERSION(5) -#define kAIRuntimeSuiteVersion6 AIAPI_VERSION(6) -#define kAIRuntimeSuiteVersion7 AIAPI_VERSION(7) -#define kAI110RuntimeSuiteVersion kAIRuntimeSuiteVersion7 -#define kAI110RuntimeVersion kAI110RuntimeSuiteVersion - -/******************************************************************************* - ** - ** Types - ** - **/ - -typedef char *AI110AppName; -typedef char *AI110AppVersion; -typedef char *AI110UserName; -typedef char *AI110UserOrganization; -typedef char *AI110UserSerialNumber; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*GetAppName) ( AI110AppName *name ); - AIAPI AIErr (*GetAppVersion) ( AI110AppVersion *version ); - - AIAPI AIErr (*GetUserName) ( AI110UserName *name ); - AIAPI AIErr (*GetUserOrganization) ( AI110UserOrganization *organization ); - AIAPI AIErr (*GetUserSerialNumber) ( AI110UserSerialNumber *serialNumber ); - - AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space ); - AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool ); - -} AIRuntimeSuite4; - -typedef struct { - - AIAPI AIErr (*GetAppName) ( AI110AppName *name ); - AIAPI AIErr (*GetAppVersion) ( AI110AppVersion *version ); - - AIAPI AIErr (*GetUserName) ( AI110UserName *name ); - AIAPI AIErr (*GetUserOrganization) ( AI110UserOrganization *organization ); - AIAPI AIErr (*GetUserSerialNumber) ( AI110UserSerialNumber *serialNumber ); - - AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space ); - AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool ); - - AIAPI long (*GetAppFreeMem) ( void ); - -} AIRuntimeSuite5; - -typedef struct { - - AIAPI AIErr (*GetAppName) ( AI110AppName *name ); - AIAPI AIErr (*GetAppVersion) ( AI110AppVersion *version ); - - AIAPI AIErr (*GetUserName) ( AI110UserName *name ); - AIAPI AIErr (*GetUserOrganization) ( AI110UserOrganization *organization ); - AIAPI AIErr (*GetUserSerialNumber) ( AI110UserSerialNumber *serialNumber ); - - AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space ); - AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool ); - - /** - GetAppFreeMem will always return the amount of physical RAM on the machine. - If really doesn't make a lot of sense on virtual memory systems. - Most clients calling this are trying to get an upper bound on how much - memory they can use. The amount of physical RAM is as good a value as any. - */ - AIAPI long (*GetAppFreeMem) ( void ); - - AIAPI AIErr (*ShowAppAboutBox) ( void ); - -} AIRuntimeSuite6; - -struct AI110RuntimeSuite { - - /** You can use the application name to verify that your plug–in is running in a - supported host application. You may also use the name and serial number to - key your plug–in to an installed application. You should not modify the - string returned by GetAppName. */ - AIAPI AIErr (*GetAppName) ( AI110AppName *name ); - /** Get the version number string of the host application running the plug–in. - (AIAppVersion is a char *). While ideally all versions of the same host - application supporting a suite would have identical behavior, it is possible - that subtle differences will occur. A plug–in needing to special case its - behavior should be able to rely on the argument returned by this call. - This call has been removed in AI12 and replaced with GetAppMajorVersion, - GetAppMinorVersion and GetAppRevisionVersion */ - AIAPI AIErr (*GetAppVersion) ( AI110AppVersion *version ); - - /** When Illustrator is first installed it asks for a user name, organization, and - serial number. This function returns a pointer to the registered user's name - (a C string). You should not modify the string returned by GetUserName() */ - AIAPI AIErr (*GetUserName) ( AI110UserName *name ); - /** When Illustrator is first installed it asks for a user name, organization, and - serial number. This function returns a pointer to the registered user's organization - (a C string). You should not modify the string returned by GetUserOrganization(). */ - AIAPI AIErr (*GetUserOrganization) ( AI110UserOrganization *organization ); - /** When Illustrator is first installed it asks for a user name, organization, and - serial number. This function returns a pointer to the registered user's application - serial number (as a C string). You should not modify the string - returned by GetUserSerialNumber(). */ - AIAPI AIErr (*GetUserSerialNumber) ( AI110UserSerialNumber *serialNumber ); - - /** While a plug–in can create it's own name space in which it can store arbitrary - data, it can also access the application's name space. Among other - things, the application keeps its preferences here. Your plug–in should probably - not modify the application's existing name space data directly, but it - can create new data within it for some reason. */ - AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space ); - /** While a plug–in can create it's own string pool in which it can store and - compare strings, it can also access the application's pool. The runtime data - for a host is actually stored in this string pool and string pointers returned - by the runtime suite functions are from the string pool. */ - AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool ); - - /** GetAppFreeMem will always return the amount of physical RAM on the machine. - If really doesn't make a lot of sense on virtual memory systems. - Most clients calling this are trying to get an upper bound on how much - memory they can use. The amount of physical RAM is as good a value as any. */ - AIAPI long (*GetAppFreeMem) ( void ); - - /** Show the about box. */ - AIAPI AIErr (*ShowAppAboutBox) ( void ); - - /** Get the version of the OS the application is running on. See #AISystemOSVersion. */ - AIAPI long (*GetSystemVersion) ( void ); - /** True if the OS is Mac OS X. */ - AIAPI AIBoolean (*GetIsSystemMacOSX) ( void ); -}; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110UID.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110UID.h deleted file mode 100644 index bdbd34d..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI110UID.h +++ /dev/null @@ -1,270 +0,0 @@ -#ifndef __AI110UID__ -#define __AI110UID__ - -/* - * Name: AI110UID.h - * $Id $ - * Author: - * Date: - * Purpose: Adobe Illustrator 11.0 Unique ID Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2003-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIUID.h" - -#include "AIHeaderBegin.h" - -/** @file AI110UID.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI110UIDPoolSuite kAIUIDPoolSuite -#define kAIUIDPoolSuiteVersion1 AIAPI_VERSION(2) -#define kAI110UIDPoolSuiteVersion kAIUIDPoolSuiteVersion1 -#define kAI110UIDPoolVersion kAI110UIDPoolSuiteVersion - -#define kAI110UIDSuite kAIUIDSuite -#define kAIUIDSuiteVersion2 AIAPI_VERSION(3) -#define kAI110UIDSuiteVersion kAIUIDSuiteVersion2 -#define kAI110UIDVersion kAI110UIDSuiteVersion - -#define kAI110UIDREFSuite kAIUIDREFSuite -#define kAIUIDREFSuiteVersion2 AIAPI_VERSION(3) -#define kAI110UIDREFSuiteVersion kAIUIDREFSuiteVersion2 -#define kAI110UIDREFVersion kAI110UIDREFSuiteVersion - -#define kAI110UIDUtilsSuite kAIUIDUtilsSuite -#define kAIUIDUtilsSuiteVersion4 AIAPI_VERSION(4) -#define kAI110UIDUtilsSuiteVersion kAIUIDUtilsSuiteVersion4 -#define kAI110UIDUtilsVersion kAI110UIDUtilsSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** - The unique id suites provide facilities for creating, querying and - managing unique ids and references to those ids. - - A unique id is an object that can be stored in a container such as - a dictionary or an array. Given a unique id it is possible to find - its container. One particularly useful place to store a unique id is - in the dictionary of an art object. Given such an id it is possible - to find the associated art object. In fact art object names are - ultimately stored as specially encoded unique ids in their associated - art object dictionaries. - - Unique ids have three important properties. 1) Each id is unique within - a given pool of ids. 2) Each id has a name which is also unique within - that pool. 3) Each id can be stored in at most one container. - - AIUIDRef: - - Unique ids are subclasses of container entries. This allows - them to be stored within dictionaries and arrays. The AIEntry suite - provides methods to convert between AIEntryRef and AIUIDRef. A unique id - may not be put into more than one container or more than once in a single - container. Any attempt to do so will result in the error kUIDNotUnique. - - AIUIDREFRef: - - A reference to a unique id. Unique id references are subclasses of container - entries. This allows them to be stored within dictionaries and arrays. The - AIEntry suite provides methods to convert between AIEntryRef and AIUID. - */ - -typedef struct AI110UIDPoolSuite { - - // reference count maintenance. - AIAPI ASInt32 (*AddRef) ( void* pool ); - AIAPI ASInt32 (*Release) ( void* pool ); - - /** Get a name pool by its name. At present there is a single pool for - XML unique id names. This pool is returned regardless of the name - supplied. */ - AIAPI AIErr (*GetPool) ( const char* name, AINamePoolRef* pool ); - - /** Make a new unique id with the given name from the pool. If no name is - specified then the pool will manufacture a name which is guaranteed - not to be in use. If the name is specified then it must conform to the - syntax imposed by the pool and must not be in use. UIDs are reference - counted. */ - AIAPI AIErr (*NewUID) ( AINamePoolRef pool, const char* name, AIUIDRef* uid ); - - /** Make a new reference to the unique id in the pool with the given name. - If no name is specified then the pool will manufacture a name which is - guaranteed not to be in use. If the name is specified then it must conform to - the syntax imposed by the pool and must either not be in use of must be - in use as a name for a UID or UIDREF. UIDREFs are reference counted. */ - AIAPI AIErr (*NewUIDREF) ( AINamePoolRef pool, const char* name, AIUIDREFRef* uidref ); - - /** Make a new unique id based on the given name from the pool. A name that is - guaranteed to be unique is automatically generated from the base name. If - the base name is specified then it must conform to the syntax imposed by the - pool. UIDs are reference counted. */ - AIAPI AIErr (*NewUIDFromBase) ( AINamePoolRef pool, const char* base, AIUIDRef* uid ); - -} AI110UIDPoolSuite; - -/** - APIs for working with unique ids. -*/ -typedef struct AI110UIDSuite { - - // reference count maintenance. - AIAPI ASInt32 (*AddRef) ( void* uid ); - AIAPI ASInt32 (*Release) ( void* uid ); - - /** Returns true if the UID is currently stored within some container */ - AIAPI AIBoolean (*IsInUse) ( AIUIDRef uid ); - - /** Returns the pool to which the uid's name belongs. The result is NULL if the - uid is not valid. */ - AIAPI void (*GetPool) ( AIUIDRef uid, AINamePoolRef* pool ); - - /** Returns the name of the uid. The result is NULL if the uid is not valid. */ - AIAPI const char* (*GetName) ( AIUIDRef uid ); - - /** Get an entry for the container in which the uid is currently - stored. A NULL reference is returned if the uid is not stored - in a container. */ - AIAPI AIEntryRef (*GetContainer) ( AIUIDRef uid ); - - /** Make a new reference to the unique id. UIDREFs are reference counted. */ - AIAPI AIErr (*NewUIDREF) ( AIUIDRef uid, AIUIDREFRef* ruidref ); - -} AI110UIDSuite; - - -/** - APIs for working with references to unique ids. -*/ -typedef struct AI110UIDREFSuite { - - // reference count maintenance. - AIAPI ASInt32 (*AddRef) ( void* uidref ); - AIAPI ASInt32 (*Release) ( void* uidref ); - - /** Returns true if the UIDREF is currently stored within some container */ - AIAPI AIBoolean (*IsInUse) ( AIUIDREFRef uidref ); - - /** Returns the pool to which the UIDREF's name belongs. The result is NULL if the - UIDREF is not valid. */ - AIAPI void (*GetPool) ( AIUIDREFRef uidref, AINamePoolRef* pool ); - - /** Returns the name of the UIDREF. The result is NULL if the UIDREF is not valid. */ - AIAPI const char* (*GetName) ( AIUIDREFRef uidref ); - - /** Get an entry for the container in which the UIDREF is currently - stored. A NULL reference is returned if the UIDREF is not stored - in a container. */ - AIAPI AIEntryRef (*GetContainer) ( AIUIDREFRef uidref ); - - /** Get the unique id referred to. NULL if there is none. */ - AIAPI void (*GetUID) ( AIUIDREFRef uidref, AIUIDRef* uid ); - -} AI110UIDREFSuite; - - -/** - convenience APIs for working with art object UIDs. -*/ -typedef struct AI110UIDUtilsSuite { - - /** Get the unique id of the art object. If the object has no UID and create - is TRUE then a machine generated UID will be assigned to the object. */ - AIAPI AIErr (*GetArtUID) ( AIArtHandle art, AIBoolean create, AIUIDRef* uid ); - /** Set the unique id of the art object replacing its current id if any. */ - AIAPI AIErr (*SetArtUID) ( AIArtHandle art, AIUIDRef uid ); - /** Transfer the id from the source to the destination object. The id - of the source art is set to NULL. */ - AIAPI AIErr (*TransferArtUID) ( AIArtHandle srcart, AIArtHandle dstart ); - - /** Get a new UIDREF for the art object. The object will be assigned a uid if - it does not already have one. */ - AIAPI AIErr (*NewArtUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref ); - /** Get the art object referenced by the UIDREF. If the UIDREF is associated - with a text story (sequence of linked text frames) then the first frame - of the story is returned. */ - AIAPI AIErr (*GetReferencedArt) ( AIUIDREFRef uidref, AIArtHandle* art ); - - /** Get the UID name of the art object. An empty string indicates no id - is assigned. */ - AIAPI AIErr (*GetArtUIDName) ( AIArtHandle art, char* buffer, ASInt32 bufsize ); - /** Set the UID name of the art object. Returns an error if the id is - already in use. */ - AIAPI AIErr (*SetArtUIDName) ( AIArtHandle art, const char* buffer ); - - /** Get the name or XML ID of the art object depending on the setting of - the user preference. isDefaultName may be nil, if not then it is set - to true if the art object has no name or id and consequently the default - name for the art was returned. */ - AIAPI AIErr (*GetArtNameOrUID) ( AIArtHandle art, char* buffer, ASInt32 bufsize, ASBoolean* isDefaultName ); - /** Set the name or XML ID of the art object depending on the setting of - the user preference. Note that names are converted to valid XML IDs - and then used to specify the XML ID of the object. */ - AIAPI AIErr (*SetArtNameOrUID) ( AIArtHandle art, const char* buffer ); - - /** Manufacture a UID based on an existing UID */ - AIAPI AIErr (*MakeUIDFromBase) ( AIUIDRef base, AIUIDRef* uid ); - /** Manufacture a unique name from a base name */ - AIAPI AIErr (*MakeUniqueNameFromBase) ( const char* base, char* buffer, ASInt32 bufsize ); - - /** Get the unique id of the story associated with the art object. The - object must be of type AIArtType::kTextFrameArt. If the story has no - UID and create is TRUE then a machine generated UID will be assigned - to the story. */ - AIAPI AIErr (*GetStoryUID) (AIArtHandle art, AIBoolean create, AIUIDRef* ruid); - /** Set the unique id of the story associated with the art object. The - object must be of type AIArtType::kTextFrameArt. */ - AIAPI AIErr (*SetStoryUID) ( AIArtHandle art, AIUIDRef uid ); - /** Transfer the id from the story of the source object to the story of - the destination object. The id of the source story is set to null. */ - AIAPI AIErr (*TransferStoryUID) ( AIArtHandle srcart, AIArtHandle dstart ); - /** Get a new UIDREF for the story associated with the art object. The - art object must be of type AIArtType::kTextFrameArt. When the UID - reference is passed to GetReferencedArt() it will return the first - frame of the story no matter which frame was used to create the - reference. */ - AIAPI AIErr (*NewStoryUIDREF) ( AIArtHandle art, AIUIDREFRef* uidref ); - - /** Transfer the unique id of the story associated with the text frame - to the art object. Any type of art object may be supplied including - a text frame. After the transfer the story will no longer have an id. */ - AIAPI AIErr (*TransferStoryUIDToArt) ( AIArtHandle frame, AIArtHandle art ); - /** Transfer the unique id of the art object to the story associated with - the text frame. Any type of art object can be supplied including a - text fame. After the transfer the story will no longer have an id. */ - AIAPI AIErr (*TransferArtUIDToStory) ( AIArtHandle art, AIArtHandle frame ); - -} AI110UIDUtilsSuite; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ArtStyleParser.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ArtStyleParser.h deleted file mode 100644 index d6af49f..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ArtStyleParser.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef __AI120ArtStyleParser__ -#define __AI120ArtStyleParser__ - -/* - * Name: AI120ArtStyleParser.h - * Purpose: Adobe Illustrator Art Style Parser Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIArtStyleParser.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI120ArtStyleParserSuite kAIArtStyleParserSuite -#define kAIArtStyleParserSuiteVersion3 AIAPI_VERSION(3) -#define kAI120ArtStyleParserSuiteVersion kAIArtStyleParserSuiteVersion3 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/* Illustrator 12.0 Art Style Parser Suite */ -typedef struct { - - AIAPI AIErr (*NewParser) ( AIStyleParser* parser ); - AIAPI AIErr (*DisposeParser) ( AIStyleParser parser ); - - AIAPI AIErr (*ParseStyle) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - - AIAPI AIErr (*MergeStyleIntoParser) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - - AIAPI AIBoolean (*IsStyleParseable) ( AIStyleParser parser ); - - AIAPI ASInt32 (*CountPreEffects) ( AIStyleParser parser ); - AIAPI ASInt32 (*CountPostEffects) ( AIStyleParser parser ); - AIAPI ASInt32 (*CountPaintFields) ( AIStyleParser parser ); - AIAPI ASInt32 (*CountEffectsOfPaintField) ( AIParserPaintField paintField ); - - AIAPI AIErr (*GetNthPreEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect* effect ); - AIAPI AIErr (*GetNthPostEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect* effect ); - AIAPI AIErr (*GetNthPaintField) ( AIStyleParser parser, ASInt32 n, AIParserPaintField* paintField ); - AIAPI AIErr (*GetNthEffectOfPaintField) ( AIParserPaintField paintField, ASInt32 n, - AIParserLiveEffect* effect ); - - AIAPI AIErr (*GetStyleBlendField) ( AIStyleParser parser, AIParserBlendField* blendField ); - - AIAPI AIErr (*InsertNthPreEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect effect ); - AIAPI AIErr (*InsertNthPostEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect effect ); - AIAPI AIErr (*InsertNthPaintField) ( AIStyleParser parser, ASInt32 n, AIParserPaintField paintField ); - AIAPI AIErr (*InsertNthEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ASInt32 n, - AIParserLiveEffect effect ); - - AIAPI AIErr (*RemovePreEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); - AIAPI AIErr (*RemovePostEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); - AIAPI AIErr (*RemovePaintField) ( AIStyleParser parser, AIParserPaintField paintField, AIBoolean doDelete ); - AIAPI AIErr (*RemoveEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, - AIParserLiveEffect effect, AIBoolean doDelete ); - - AIAPI AIErr (*RemoveAllEffects) ( AIStyleParser parser ); - AIAPI AIErr (*Simplify) ( AIStyleParser parser ); - - AIAPI AIErr (*GetFocusFill) ( AIStyleParser parser, AIParserPaintField* paintField ); - AIAPI AIErr (*GetFocusStroke) ( AIStyleParser parser, AIParserPaintField* paintField ); - - AIAPI AIErr (*SetParserFocus) ( AIStyleParser parser, AIParserPaintField paintField ); - AIAPI AIErr (*SetFocus) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserPaintField paintField ); - - AIAPI ASInt32 (*GetGroupContentsPosition) ( AIStyleParser parser ); - AIAPI AIErr (*MoveGroupContentsPosition) ( AIStyleParser parser, ASInt32 position ); - - AIAPI AIErr (*CreateNewStyle) ( AIStyleParser parser, AIArtStyleHandle* artStyle ); - - AIAPI AIBoolean (*IsStyleVisible) ( AIStyleParser parser ); - - AIAPI AIBoolean (*ContainsPaint) ( AIStyleParser parser ); - AIAPI AIBoolean (*ContainsEffects) ( AIStyleParser parser ); - AIAPI AIBoolean (*ContainsTransparency) ( AIStyleParser parser ); - - AIAPI AIErr (*GetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle* liveEffectHandle ); - AIAPI AIErr (*GetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters* params ); - AIAPI AIErr (*SetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle liveEffectHandle ); - AIAPI AIErr (*SetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters params ); - AIAPI AIErr (*CloneLiveEffect) ( AIParserLiveEffect effect, AIParserLiveEffect* clonedEffect ); - - AIAPI AIErr (*EditEffectParameters) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect ); - - AIAPI AIBoolean (*IsFill) ( AIParserPaintField paintField ); - AIAPI AIBoolean (*IsStroke) ( AIParserPaintField paintField ); - AIAPI AIErr (*GetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); - AIAPI AIErr (*GetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); - AIAPI AIErr (*SetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); - AIAPI AIErr (*SetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); - AIAPI AIErr (*GetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); - AIAPI AIErr (*SetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); - AIAPI ASInt32 (*GetColorPosn) ( AIParserPaintField paintField ); - AIAPI AIErr (*SetColorPosn) ( AIParserPaintField paintField, ASInt32 colorPosn ); - AIAPI AIErr (*ClonePaintField) ( AIParserPaintField paintField, AIParserPaintField* clonedPaintField ); - AIAPI AIErr (*GetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle* liveEffectHandle, - AILiveEffectParameters* params ); - AIAPI AIErr (*SetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle liveEffectHandle, - AILiveEffectParameters params ); - - AIAPI AIErr (*GetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); - AIAPI AIErr (*SetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); - - // NEW FOR AI10 - - AIAPI AIErr (*GetEvenOdd) ( AIParserPaintField paintField, AIBoolean* evenodd ); - AIAPI AIErr (*SetEvenOdd) ( AIParserPaintField paintField, AIBoolean evenodd ); - - AIAPI AIErr (*NewPaintFieldFill) ( const AIFillStyle* fill, AIBoolean evenOdd, const AIArtStylePaintData* paintData, - AIParserPaintField* paintField ); - AIAPI AIErr (*NewPaintFieldStroke) ( const AIStrokeStyle* stroke, const AIArtStylePaintData* paintData, - AIParserPaintField* paintField ); - AIAPI AIErr (*DisposePaintField) ( AIParserPaintField paintField ); - - AIAPI AIErr (*NewParserLiveEffect) ( AILiveEffectHandle liveEffectHandle, AILiveEffectParameters params, - AIParserLiveEffect* effect ); - AIAPI AIErr (*DisposeParserLiveEffect) ( AIParserLiveEffect effect ); - - - AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* style ); - -} AI120ArtStyleParserSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Context.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Context.h deleted file mode 100644 index 27e2d7d..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Context.h +++ /dev/null @@ -1,106 +0,0 @@ -#ifndef __AI120Context__ -#define __AI120Context__ - -/* - * Name: AI120Context.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 12.0 Runtime Context Environment. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIContext.h" - -#include "AIHeaderBegin.h" - -/** @file AIContext.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI120AppContextSuite "AI Context Suite" -#define kAIAppContextSuiteVersion3 AIAPI_VERSION(3) -#define kAI120AppContextVersion kAIAppContextSuiteVersion3 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** Use the Context Suite to save and restore the application context. An application - context consists of an Artwork context, and an Undo context. - - Product independent plug-ins don’t always know about the application - context. For example, ADM is host application independent; it knows - nothing about the application environment in which it is operating in. - - Pushing the application context within an ADM plug-in tells ADM about the - state of the application at any given time. Your plug-in will want to do this - in init, drawer, notifier, and tracker procs. For example, if your plug-in has - an ADM non-modal dialog which only makes changes to itself, you wouldn’t - need to push the application context. However, if your plug-in makes - changes to the artwork you will need to push the app context. */ -typedef struct { - - /** This function returns the parent application window if called from Windows. - It does nothing on the Macintosh. */ - AIAPI AIErr (*GetPlatformAppWindow) ( AIWindowRef *appWindow ); - - /** Pushes an application context for the calling plug-in if needed. You - should pass your plug-in's reference in plugin. The value returned in - appContext must be passed to PopAppContext upon exit. - - Note: PushAppContext and PopAppContext should always be used in pairs - to bracket code that relies on the application context. */ - AIAPI AIErr (*PushAppContext) ( SPPluginRef plugin, AIAppContextHandle *appContext ); - /** This function restores the previous application context. Pass the AIAppContextHandle - which was returned by PushAppContext(). - - Note: PushAppContext and PopAppContext should always be used in pairs - to bracket code that relies on the application context. */ - AIAPI AIErr (*PopAppContext) ( AIAppContextHandle appContext ); - - /** No longer needed. */ - AIAPI AIErr (*MacGetAppQDGlobal) ( void **appQD ); - - /** Suspends the current API context stack. This is equivalent to popping - all current open API contexts except that they can later be restored - by ResumeAppContext(). This API should only be needed prior to some - operation that may change the current document. */ - AIAPI AIErr (*SuspendAppContext) ( AISuspendedAppContext* appContext ); - /** Resumes the API context stack. The stack is resumed for the document of - the frontmost window. This might be a different document from the one - at the time the context stack was suspended. */ - AIAPI AIErr (*ResumeAppContext) ( AISuspendedAppContext appContext, AIDocumentHandle document ); - -} AI120AppContextSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ImageOptimization.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ImageOptimization.h deleted file mode 100644 index ed5b5c8..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120ImageOptimization.h +++ /dev/null @@ -1,95 +0,0 @@ -#ifndef __AI120ImageOptimization__ -#define __AI120ImageOptimization__ - -/* - * Name: AI120ImageOptimization.h - * Purpose: Adobe Illustrator 12.0 Image Optimization Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - - -/******************************************************************************* -** -** Imports -** -**/ -#include "AIImageOptimization.h" - -#include "AIHeaderBegin.h" - -/** @file AI120ImageOptimization.h */ - -/******************************************************************************* -** -** Constants -** -**/ -#define kAIImageOptSuiteVersion1 AIAPI_VERSION(1) -#define kAIImageOptSuiteVersion2 AIAPI_VERSION(2) -#define kAIImageOptSuiteVersion3 AIAPI_VERSION(3) - -/******************************************************************************* -** -** Suite -** -**/ - - -// version 3 -typedef struct { - - AIAPI AIErr (*AsGIF)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptGIFParams& params); - - AIAPI AIErr (*AsJPEG)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptJPEGParams& params); - - AIAPI AIErr (*AsPNG)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptPNGParams& params); - - AIAPI AIErr (*AsZLIB)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptZLIBParams& params); - - AIAPI AIErr (*MakePNG24)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AI140ImageOptPNGParams& params, - AIRasterizeProgressProc progressProc); - - AIAPI AIErr (*CreatePalette) (AIArtHandle raster, const AIPaletteOptions *options, AIColorPaletteHandle *palette); - AIAPI AIErr (*DisposePalette) (AIColorPaletteHandle palette); - - AIAPI AIErr (*GetPaletteColor) (AIColorPaletteHandle palette, long index, AIPaletteColor *color); - AIAPI AIErr (*SetPaletteColor) (AIColorPaletteHandle palette, long index, AIPaletteColor *color); - - AIAPI AIErr (*CreateInversePalette) (AIColorPaletteHandle palette, AIInverseColorPaletteHandle *inverse); - AIAPI AIErr (*DisposeInversePalette) (AIInverseColorPaletteHandle inverse); - - AIAPI AIErr (*GetPaletteIndex) (AIInverseColorPaletteHandle inverse, const AIPaletteColor *color, long *index); - -} -AI120ImageOptSuite; - - -#include "AIHeaderEnd.h" - -#endif // __AI120ImageOptimization__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Path.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Path.h deleted file mode 100644 index c0cbc96..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Path.h +++ /dev/null @@ -1,190 +0,0 @@ -#ifndef __AI120Path__ -#define __AI120Path__ - -/* - * Name: AIPath.h - * $Revision: 13 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 12.0 Path Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPath.h" - -#include "AIHeaderBegin.h" - -/** @file AI120Path.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI120PathSuite kAIPathSuite -#define kAIPathSuiteVersion6 AIAPI_VERSION(6) -#define kAI120PathSuiteVersion kAIPathSuiteVersion6 -#define kAI120PathVersion kAI120PathSuiteVersion - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** - The shape of art of type kPathArt is defined by one or more path segments. It - has two other attributes, whether the path is closed and whether it is a guide. - In addition, it has paint attibutes associated with it in a path style (see the - AIPathStyleSuite). - - Every segment of a path corresponds to an anchor point (anchor points are - the path handles that are visible when the path is selected). The segment - count is the number of anchor points on the path, including the two at each - end. A segment is defined by the AIPathSegment structure. - - The in and out points of a segment define the tangent of the curve at a point - Note that the in point for initial and final segments of an open path are not - used. - - A segment can be a corner point or a smooth point. If the segment is a - corner (corner == true), the in and out points can be anywhere. To make a - straight line, place the in and out points of each end on their p points. - - Segment numbers begin at zero. Illustrator limits the number of segments in - a path to 8191. A path may consist of a single anchor point. - - A path can be open or closed. If a path is open, it is defined only by its - segments. If it is closed, a 'phantom' segment is added by Illustrator - between the first and last anchor points. It uses the out tangent of the last - segment and the in segment of the first. - - Some paths double as guides. In all other respects they are paths, having - segments, corner points and close attributes. - */ -struct AI120PathSuite { - - /** Every anchor point on a path corresponds to a path segment (anchor points - are the path handles that are visible when the path is selected). The segment - count is the number of anchor points on the path, including the two at each - end. A path may consist of a single anchor point. */ - AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, short *count ); - /** Sets the number of segments for the path. This may be used to either increase - or decrease the count of segments. If the count is increased any new segments - are initialized to default values. Callers should not depend on these default - values. - - Note: SetPathSegmentCount() and SetPathSegments() will return #kTooManySegmentsErr - when you try to exceed the maximum number of path segments, - - Note: When AIArtSuite::NewArt() creates a path, it initially allocates space - for 32 segments. When creating many small paths, this can get waste quite - a bit of memory. SetPathSegmentCount() will free the memory of unused path - segments immediately. - */ - AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, short count ); - /** Use this to 'read' a range of segments out of a path. - - The segNumber and count arguments specify the range of segments to get - (the first segment and the number of segments). Segment numbers begin at - zero. - - The segment argument points to an array of AIPathSegment structures - allocated by the plug-in to receive these segments. It must be at least as big - as count. - */ - AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment segments[] ); - /** Use this to 'write' a range of segments into a path. */ - AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, short segNumber, short count, const AIPathSegment segments[] ); - /** This function inserts count segments after segNumber. */ - AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, short segNumber, short count, const AIPathSegment segments[] ); - /** This function deletes count segments starting at segNumber. If you delete - segments from a closed path, the path remains closed. */ - AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, short segNumber, short count ); - - /** Returns whether the path is closed. */ - AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed ); - /** Sets whether the path is closed. */ - AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed ); - /** Returns whether the path is a guide */ - AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide ); - /** Sets whether the path is a guide */ - AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide ); - - /** Returns an indication of the selection state for the indicated segment. The - possible values are given by #AIPathSegementSelectionState. */ - AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, short segNumber, short *selected ); - /** Sets the selection state for the indicated segment. The possible values are - given by #AIPathSegementSelectionState. Note that modifying the selection - state of one segment may affect adjacent segments. For example, if the out - direction of one segment is selected then the in direction of the following - segment will be selected. */ - AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, short segNumber, short selected ); - - /** Reverses the order of segments in the path. Use this as a quick way to change - the winding order of a path. The winding order is only significant if the path - is a subpath of a compound path. It controls the insideness of the compound path.*/ - AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path ); - /** The area is returned as area and is in square points. The paths winding - order is determined by the sign of area. If the area is negative, the path is - wound counter-clockwise. Self-intersecting paths may contain sub-areas that - cancel each other out. It’s possible for a path to return zero for its area, - even though it’s got lots of area. */ - AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area ); - - // New for AI8.0: - - /** Get the length of the perimeter of the path measured in points. The flatness - parameter controls the degree of accuracy to the true mathematical length. */ - AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness ); - /** Returns the bezier from "segNumber" anchor to the next. - - If segNumber is the last anchor point of an open path, it will wrap around to - the beginning. If it is the last anchor point of a closed path, then all four - points will be equal (i.e., the outgoing control point will be ignored), so - that visible bounding rect, length, and other functions will treat it properly. - */ - AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, short segNumber, AIRealBezier *bezier ); - /** Determines if GetPathLength() != 0 but much more efficient. */ - AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength ); - - /** Determines whether the path is a clipping path. The input object may be a - path or a compound path. To be a clipping object a path must have at least - two segments. To make a path into a clipping path use AIArtSuite::SetArtUserAttr() */ - AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip ); - - // New for AI 11 - - /** Determines whether all segments of the path are selected. In this case the - path is considered to be fully selected. */ - AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected ); - -}; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PathStyle.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PathStyle.h deleted file mode 100644 index 0055bb8..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PathStyle.h +++ /dev/null @@ -1,307 +0,0 @@ -#ifndef __AI120PathStyle__ -#define __AI120PathStyle__ - -/* - * Name: AI120PathStyle.h - * Author: - * Date: - * Purpose: Adobe Illustrator Path Style Suite for AI 12 - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPathStyle.h" - -#ifndef __AI70Color__ -#include "AI70Color.h" -#endif - -#include "AIHeaderBegin.h" - - - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAI120PathStyleSuite kAIPathStyleSuite -#define kAIPathStyleSuiteVersion8 AIAPI_VERSION(8) -#define kAI120PathStyleSuiteVersion kAIPathStyleSuiteVersion8 -#define kAI120PathStyleVersion kAI120PathStyleSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** A path style describes the paint information for an object, including stroke - and fill. Use the Path Style Suite to access or set path style information for - paths. -*/ -typedef struct { - - /** Retrieves the path style used to fill and/or stroke the object. The object - must be of type kPathArt, kMeshArt, or kRasterArt. All other types return - kBadParameterErr. */ - AIAPI AIErr (*GetPathStyle) ( AIArtHandle path, AIPathStyle *style ); - /** Sets the path style used to fill and/or stroke the object. The object - must be of type kPathArt, kMeshArt, or kRasterArt. All other types return - kBadParameterErr. */ - AIAPI AIErr (*SetPathStyle) ( AIArtHandle path, AIPathStyle *style ); - - - /** Get the common attributes of the current selected objects. Note that this - API returns a partial style. */ - AIAPI AIErr (*GetCurrentPathStyle) ( AIPathStyle *style, AIPathStyleMap* stylemap ); - - /** Apply the path style to any currently selected and paint-targetted objects. - If a targetted object has an active style, the path style will be merged - in to the focal fill and stroke filters. Any effects and non-focal fills - and strokes will be unmodified. Use SetCurrentPathStyleForceSimple instead - if you want to blow away any active styles. (The reason we didn't just add - another parameter was so as not to have to bump the suite version number.) */ - AIAPI AIErr (*SetCurrentPathStyle) ( AIPathStyle *style, AIPathStyleMap* stylemap ); - - /** Use this function to import the styles contained in the specified file. The - styles are imported into a new document whose handle is returned. The styles - can then be accessed through their respective APIs. For example the art - style can be obtained through the AIArtStyleSuite and the swatches can be - obtained through the AISwatchListSuite. */ - AIAPI AIErr (*ImportStyles) ( const ai::FilePath &source, AIDocumentHandle *newdoc ); - - /** Do not use this function unless you desperately need to import mixed color space - styles. AI artwork does not allow mixed color space as of version 12, so using - this function may cause serious damage on your artwork. The intention of function - is allowing mixed color space in Swatch Libraries. AIPathStyleSuite::ImportStyles() - does not work for this purpose because it always forces converting mixed color styles - to a single color space. */ - AIAPI AIErr (*ImportStylesMixedColorSpace) ( const ai::FilePath &source, AIDocumentHandle *newdoc ); - - /** Apply the AIColor to the object. This does what is generally wanted when you've - got an AIColor and you've got an object, and you want the object painted with the - color. It handles setting the gradient vector to the default, enumerates groups, - does the right thing on compound paths, etc. (If, for example, you have an object - that's stroked with a dashed line and you pass in a new color with the onStroke - parameter true, the old dash pattern will be retained. If the object didn't have - a stroke before, the current paint style is looked at. If the current paint style - also doesn't have a stroke, a sensible default is used.) - - The art object can be any type except kUnknownArt, kPlacedArt, or kMysteryPathArt. - - Since the routine enumerates container objects, for efficiency care should be taken - that you do not call SetObjectAIColor on both a container and its children. - */ - AIAPI AIErr (*SetObjectAIColor) ( AIArtHandle art, AIColor *color, AIBoolean onStroke ); - - /** Simple routine to convert from AIColor to AI70Color. */ - AIAPI AIErr (*AIColorToAI70Color) ( AIColor *from, AI70Color *to); - /** Simple routine to convert from AI70Color to AIColor. */ - AIAPI AIErr (*AI70ColorToAIColor) ( AI70Color *from, AIColor *to); - - /** Determines whether the path style makes use of the supplied color in its fill - or stroke and returns an indicator of how it is used. A style map may optionally - be supplied for a partial style. If matchTint is false the tint percentage for - spot and global process colors is not considered. If lookForIndirectUsage is - true and the path style is a pattern then its definition is searched for a - match. */ - AIAPI AIErr (*PathStyleUsesAIColor) ( AIPathStyle *pathStyle, - AIPathStyleMap *psMap, - AIColor *color, - AIBoolean matchTint, - AIBoolean lookForIndirectUsage, - AIColorUsedHow *usage ); - - /** A routine which takes an AIColor and applies it to an AIPathStyle, doing what - is generally wanted when people ask "why is it such a pain to simply set the - color of an object?" - - The path style map parameter is optional. - - If the newColor is a gradient or pattern, only the global object handle is - relevant - the vector and transform fields are ignored. When the old pathStyle - is already of the same kind, the existing vector and transform are used; if - it is not, then default values are used. If newColor is a spot color, though, - the tint is used. This is because this API is mainly intended for the use of - the Swatches palette. Swatches contain tint info for spot colors, but they - do not record gradient vector (even relative vector) or pattern transform data. - - If matchColor is non-null, then the onStroke parameter is ignored, and the - newColor is applied to the fill and/or the stroke, whichever of them has the - same color as matchColor. The matching is exact, including color space. This - will never assign paint to an unpainted stroke or fill unless the matchColor - is kNoneColor. - - If matchColor is null, then the newColor is applied to the stroke if onStroke - is true, or to the fill if onStroke is false. (To apply to both, you must - call this twice.) - - When it can't gather things from the pathStyle (which is assumed to be the "old" - color of the object in question), it first looks at the current paint style and - if that's not helpful, uses some reasonable (to me) defaults. Search for the - text "DEFAULT" below to find those if you want to muck with them. Defaults - are only necessary when changing from one kind of color to another (e.g., - from a solid to a pattern or gradient) or when assigning color to a fill - or stroke that was previously unpainted. - - The destination arthandle is used for the case where it needs to figure out the - gradient vector based on the object's bounds. In the case where the object is - part of a compound path, the bounds are calculated from the entire compound - group. - - If whatChanged is non-null, returns in *whatChanged an AIColorUsedHow value - indicating what part of the pathStyle (fill and/or stroke) was changed. (It is - not necessary to do a SetPathStyle on the object if the old path style is the - same as the new one.) - */ - AIAPI AIErr (*ApplyAIColorToPathStyle) ( AIPathStyle *pathStyle, - AIPathStyleMap *psMap, // can be null - AIColor *newColor, - AIColor *matchColor, - AIBoolean onStroke, - AIBoolean useOldTint, - AIArtHandle destination, - AIColorUsedHow *whatChanged ); - - /** Examine the art object, which can be any type, for usage of the targetColor, - and return a vector of AIColorUsedHow values in *usage. - - If lookForIndirectUsage is true, it returns whether the art object would - cause the color to be considered "in use" on the swatch palette. This - includes usage inside patterns, gradients, and graph designs. - - If lookForIndirectUsage is false, the scan will not look inside of patterns, - gradients, or graph designs. It will still look inside the graph style change - records of graph objects. - */ - AIAPI AIErr (*ObjectUsesAIColor) ( AIArtHandle art, - AIColor *targetColor, - AIBoolean matchTint, - AIBoolean lookForIndirectUsage, - AIColorUsedHow *usage ); - - /** For any direct usage of the oldColor in the art object, do a SetObjectAIColor to the - newColor. "Direct" usage means the color of a stroke or fill, including inside graph - path style change records. It does not cover colors used *inside* gradients, patterns, - or graph designs that are attached to the object. (Indirect usages inside patterns - and gradients are to be replaced by defining a new pattern or gradient, then calling - ReplaceObjectAIColor with the oldColor and newColor being the pattern or gradient - that was redefined. Indirect usage inside graph designs are similar, except that - one doesn't call ReplaceObjectAIColor because a graph design isn't a color.) - - New for AI9: if art is nil, replaces all usages in the current document - - If useOldTint is true, and both oldColor and newColor are custom colors, then - the tint from the oldColor is used, otherwise the tint from the newColor is used. - - Sets *madeReplacement to true if it found oldColor and made a replacement, and - to false if it didn't. - - The art object can any type except kPlacedArt, including those which are reported - as kMysteryPathArt (paths inside text paths and graphs), and those which are - reported as kUnknownArt, such as graphs and layer masks. (Since kPlacedArt is a - reference to an external file, colors cannot be replaced inside of it.) - */ - AIAPI AIErr (*ReplaceObjectAIColor) ( AIArtHandle art, - AIColor *oldColor, AIColor *newColor, - AIBoolean useOldTint, - AIBoolean *madeReplacement /* can be NULL */ ); - - /** Get the default path style that tools should use when creating new objects other - than text objects. */ - AIAPI AIErr (*GetInitialPathStyle) ( AIPathStyle *style ); - /** Set the default path style that tools should use when creating new objects other - than text objects. */ - AIAPI AIErr (*SetInitialPathStyle) ( AIPathStyle *style ); - /** Get the default path style that tools should use when creating text objects. */ - AIAPI AIErr (*GetInitialTextStyle) ( AIPathStyle *style ); - /** Set the default path style that tools should use when creating text objects. */ - AIAPI AIErr (*SetInitialTextStyle) ( AIPathStyle *style ); - - /** Take an AIColor structure and make sure that everything in it is appropriate for the - current artwork, creating replacements if necessary. For example, if you get a - pattern from drag&drop, the pattern may not be in the current artwork. (Usually it - will be in the clipboard artwork). This would replace it with an equivalent pattern - that is in the current artwork. */ - AIAPI AIErr (*RetargetForCurrentDoc) ( AIColor *color) ; - - /** Like SetCurrentPathStyle, except that when a selected object has an active style, - it will merge the input style values only with the paint attributes, and give - the object that simple style. Both of the input pointers can be nil to replace - all selected active styles with the simple style corresponding to their focal - fill and/or stroke filters. - */ - AIAPI AIErr (*SetCurrentPathStyleForceSimple) ( AIPathStyle *style, AIPathStyleMap* stylemap ); - - /** Like SetPathStyle, except that when a selected object has an active style, - it will merge the input style values only with the paint attributes, and give - the object that simple style. The input style can be nil to replace an active - style with the simple style corresponding to its focal fill and/or stroke filters. - */ - AIAPI AIErr (*SetPathStyleForceSimple) ( AIArtHandle path, AIPathStyle *style ); - - /** Interpolate the path style. If percent is 0, styleOut is style0; if percent - is 1, styleOut is style1. (Despite the misleading param name, percent is - not a percentage but a value from 0 to 1.) See also the AIPathInterpolateSuite. */ - AIAPI AIErr (*InterpolatePathStyle) ( AIPathStyle *style0, AIPathStyle *style1, - AIPathStyle *styleOut, AIReal percent); - - /** Interpolate just the AIColor. If color kinds are incompatible (e.g., two patterns), - colorOut is always returned as color0. See also the AIPathInterpolateSuite. */ - AIAPI AIErr (*InterpolateAIColor) ( AIColor *color0, AIColor *color1, AIColor *colorOut, - AIReal fraction ); - - // New for AI12: - - /** Sets the syncInitialPathStyle state - - When syncInitialPathStyle is TRUE, the initial path style is - synchronized with the current path style, and the UI in the swatches palette, - color palette, and toolbox report the current path style. This synchronization - happens when the selection changes and when GetCurrentPathStyle/SetCurrentPathStyle - or GetInitialPathStyle/SetInitialPathStyle are called. syncInitialPathStyle is - true the majority of the time. - - When syncInitialPathStyle is FALSE, the initial path style and the current path style - become independant. In this mode GetCurrentPathStyle/SetCurrentPathStyle does not - affect the initial path style and GetInitialPathStyle/SetInitialPathStyle does not affect - the current path style and the current selection. The UI in the swatches palette, - color palette, and toolbox also report the initial path style rather than the current - path style. - - Why this is useful: - Sometimes a tool may want to maintain a "tool path style" that is not modified when - the selection changes. This allows the user to have a selection, choose - a specific tool and color, and not have the color apply to the current - selection. Such behavior is useful for the paintbucket tool, for example. To get - this behavior the tool should set the syncState to true - and use GetInitialPathStyle/SetInitialPathStyle in place of - GetCurrentPathStyle/SetCurrentPathStyle while the tool is selected. */ - AIAPI AIErr (*SetSyncInitialPathStyle) ( AIBoolean syncInitialPathStyle ); - /** Gets the syncInitialPathStyle state */ - AIAPI AIBoolean (*GetSyncInitialPathStyle)(); - -} AI120PathStyleSuite; - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PlanarObject.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PlanarObject.h deleted file mode 100644 index d67b233..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120PlanarObject.h +++ /dev/null @@ -1,80 +0,0 @@ -#ifndef __AI120PlanarObject__ -#define __AI120PlanarObject__ - -/* - * Name: AI120PlanarObject.h - * Purpose: Adobe Illustrator 12.0 Planar Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPlanarObject.h" - -#include "AIHeaderBegin.h" - -/** @file AI120PlanarObject.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI120PlanarObjectSuite kAIPlanarObjectSuite -#define kAIPlanarObjectSuiteVersion1 AIAPI_VERSION(1) -#define kAI120PlanarObjectSuiteVersion kAIPlanarObjectSuiteVersion1 - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** APIs for creating, populating and querying attributes of a Planar Object plugin group. */ -typedef struct { - - AIAPI AIPlanarObjectHandle (*NewPlanarObject) ( const AIRealMatrix* matrix, const AIGapOptions* gapOptions ); - - AIAPI AIErr (*AddPath) ( - AIPlanarObjectHandle object, int segmentCount, AIPathSegment *segments, - AIArtStyleHandle *leftFill, AIArtStyleHandle *rightFill, AIArtStyleHandle *stroke, - AIBoolean closed ); - - AIAPI AIErr (*AddPathUniform) ( - AIPlanarObjectHandle object, int segmentCount, AIPathSegment *segments, - AIArtStyleHandle leftFill, AIArtStyleHandle rightFill, AIArtStyleHandle stroke, - AIBoolean closed ); - - AIAPI AIErr (*Abandon) ( AIPlanarObjectHandle object ); - - AIAPI AIErr (*CreateArt) ( AIPlanarObjectHandle object, short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - AIAPI AIBoolean (*IsPlanarArtObject) ( AIArtHandle art ); - - AIAPI AIErr (*ComplexConversionCanceled) ( AIBoolean fromPlanarMap, ASInt32 pathOrEdgeCount, - const AIGapOptions* gapOptions, AIBoolean *warningDisplayed /*output*/ ); - -} AI120PlanarObjectSuite; - - -#include "AIHeaderEnd.h" - - -#endif // __AI120PlanarObject__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Runtime.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Runtime.h deleted file mode 100644 index b04a374..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Runtime.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef __AI120Runtime__ -#define __AI120Runtime__ - -/* - * Name: AI120Runtime.h - * Purpose: Adobe Illustrator Runtime Environment. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIRuntime.h" - -#include "AIHeaderBegin.h" - -/** @file AI120Runtime.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI120RuntimeSuite kAIRuntimeSuite -#define kAIRuntimeSuiteVersion8 AIAPI_VERSION(8) -#define kAI120RuntimeSuiteVersion kAIRuntimeSuiteVersion8 - -/******************************************************************************* - ** - ** Suite - ** - **/ - -struct AI120RuntimeSuite { - - AIAPI AIErr (*GetAppName) ( AIAppName *name ); - AIAPI AIErr (*GetAppFileSpecification) ( ai::FilePath &file ); - AIAPI AIErr (*GetUserName) ( AIUserName *name ); - AIAPI AIErr (*GetUserOrganization) ( AIUserOrganization *organization ); - AIAPI AIErr (*GetUserSerialNumber) ( AIUserSerialNumber *serialNumber ); - AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space ); - AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool ); - AIAPI ASInt32 (*GetAppFreeMem) ( void ); - AIAPI AIErr (*ShowAppAboutBox) ( void ); - AIAPI ASInt32 (*GetSystemVersion) ( void ); - AIAPI AIBoolean (*GetIsSystemMacOSX) ( void ); - AIAPI ASInt32 (*GetAppMajorVersion) ( void ); - AIAPI ASInt32 (*GetAppMinorVersion) ( void ); - AIAPI ASInt32 (*GetAppRevisionVersion) ( void ); - AIAPI AIErr (*GetAppNameUS) ( ai::UnicodeString& name ); - AIAPI AIErr (*GetUserNameUS) ( ai::UnicodeString& name ); - AIAPI AIErr (*GetUserOrganizationUS) ( ai::UnicodeString& organization ); - AIAPI AIErr (*GetDefaultScript) ( AIFaceScript *script); - AIAPI AIBoolean (*GetIsHonestyBuild) ( void ); - AIAPI AIBoolean (*GetIsProductTryAndDie) ( void ); -}; - - -#include "AIHeaderEnd.h" - -#endif // __AI120Runtime__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Symbol.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Symbol.h deleted file mode 100644 index f9cfdfe..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI120Symbol.h +++ /dev/null @@ -1,358 +0,0 @@ -#ifndef __AI120Symbol__ -#define __AI120Symbol__ - -/* - * Name: AI120Symbol.h - * Author: - * Date: - * Purpose: Adobe Illustrator 12.0 Symbol Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1990-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AISymbol.h" - -#include "AIHeaderBegin.h" - -/** @file AI120Symbol.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI120SymbolSuite kAISymbolSuite -#define kAISymbolSuiteVersion3 AIAPI_VERSION(3) -#define kAI120SymbolSuiteVersion kAISymbolSuiteVersion3 -#define kAI120SymbolVersion kAI120SymbolSuiteVersion - -/******************************************************************************* - ** - ** AI120Symbol Suite - ** - **/ - -/* This suite differs from the AI 11 version in that symbol names are ai::UnicodeString instead of char *. - It differs from the AI 13 version only in that it does not have the SetSymbolPatternFromSelGetBounds - API at the end. -*/ - -typedef struct { - - /** Get a count of the number of symbol definitions in the global list. See the suite - overview for the meaning of the includeUnlisted parameter.*/ - AIAPI AIErr (*CountSymbolPatterns) ( long *count, ASBoolean includeUnlisted ); - /** Get the nth (0 based) symbol pattern in the list. See the suite overview for the - meaning of the includeUnlisted parameter. */ - AIAPI AIErr (*GetNthSymbolPattern) ( long n, AIPatternHandle *symbolPattern, ASBoolean includeUnlisted ); - /** Get the symbol definition with the specified name if any. */ - AIAPI AIErr (*GetSymbolPatternByName) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern ); - - /** Get the symbol definition with the specified name in the specified document. The - document may be obtained with the AIDocumentListSuite or by importing a collection - of symbols with AIPathStyleSuite::ImportStyles(). */ - AIAPI AIErr (*GetSymbolByNameFromDocument) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern, - AIDocumentHandle document ); - /** Get a count of the number of symbol definitions in the the global list of the - specified document. The document may be obtained with the AIDocumentListSuite or - by importing a collection of symbols with AIPathStyleSuite::ImportStyles().*/ - AIAPI AIErr (*CountSymbolPatternsFromDocument) ( long* count, AIDocumentHandle document ); - /** Get the nth (0 based) symbol definition in the the global list of the specified - document. The document may be obtained with the AIDocumentListSuite or by - importing a collection of symbols with AIPathStyleSuite::ImportStyles().*/ - AIAPI AIErr (*GetNthSymbolPatternFromDocument) ( long n, AIPatternHandle *symbolPattern, - AIDocumentHandle document ); - - /** Make a new symbol definition from the definition art. If definitionArt is not null, - it will be copied as the defining art. If it is null, then the definition will be an - empty group. (We do not bother making a checkerboard pattern like NewPattern does.) - (See suite overview for a discussion of listed vs unlisted.) */ - AIAPI AIErr (*NewSymbolPattern) ( AIPatternHandle *newSymbolPattern, AIArtHandle definitionArt, ASBoolean unlisted ); - /** If something is selected, it will be copied as the defining art. If nothing is selected, - then the definition will be an empty group. (You don't get a choice of unlisted on - this one - symbols defined from the selected art are assumed to be permanent.) */ - AIAPI AIErr (*NewSymbolPatternFromSel) ( AIPatternHandle *symbolPattern ); - /** Like NewSymbolPatternFromSel except that it returns the bounds of the selected art - used to define the symbol (which cannot be obtained by calling GetArtBounds on the - symbol pattern art after defining it, because like patterns and brush patterns the - copied definition art gets moved to a standardized location.) It could be obtained - by getting all the selected objects and unioning up their bounds, but since - NewSymbolPatternFromSel() knows the bounds anyway it is easy to hand it back. This - is mainly intended for clients who want to insert an instance of the symbol in place - of the selection after it is created. */ - AIAPI AIErr (*NewSymbolPatternFromSelGetBounds) ( AIPatternHandle *symbolPattern, AIRealRect *selectionBounds ); - - /** Delete the symbol definition. */ - AIAPI AIErr (*DeleteSymbolPattern) ( AIPatternHandle symbolPattern ); - /** Is this symbol still known to the system? (It should never be necessary to use this - if you don't hang onto the AIPatternHandle between messages, or if you process the - #kAIArtSymbolSetChangedNotifier.) */ - AIAPI AIBoolean (*ValidateSymbolPattern) ( AIPatternHandle symbolPattern ); - - - // Functions for examining and modifying a symbol definition - - /** This 'peeks' at the actual symbol definition. The art returned cannot be edited, just - examined or duplicated!! */ - AIAPI AIErr (*GetSymbolPatternArt) ( AIPatternHandle pattern, AIArtHandle *art ); - /** Analogous to AIPatternSuite::GetPattern() (I just don't think 'Get' is a very - intuitive name for inserting a copy of the defining art into the current layer or - insertion group.) Especially since we use GetPatternArt to mean peek at the real - definition. */ - AIAPI AIErr (*PasteSymbolPatternArt) ( AIPatternHandle symbolPattern ); - /** paintOrder (see #AIPaintOrder), prep and newArt have the same meaning as - AIArtSuite::DuplicateArt(). The recommended way to get an editable copy of a symbol - definition is not to use PasteSymbolPatternArt(), but rather to use AIDictionarySuite::NewArtEntry() - to create a group that isn't in the artwork, insert the definition copy into that, - and then delete the dictionary entry. That way you don't modify the art tree - and trigger irrelevant synchronization, change notifications, etc. (This is often - used by export filters that need to make systematic adjustments to Illustrator - art before getting it in an easy-to-export form.) */ - AIAPI AIErr (*CopySymbolPatternArt) ( AIPatternHandle symbolPattern, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Copy the definitionArt as the new symbol definition. Any existing instances of the - symbol will be updated. */ - AIAPI AIErr (*SetSymbolPatternArt) ( AIPatternHandle symbolPattern, AIArtHandle definitionArt ); - /** Analogous to AIPatternSuite::SetPattern(). Again, I just think that 'Set' - isn't very intuitive for something that copies the selected art. */ - AIAPI AIErr (*SetSymbolPatternFromSel) ( AIPatternHandle symbolPattern ); - - - // The functions below use C strings. If you have or want Pascal strings, you can - // also get and set the name of a symbol using GetPatternName and SetPatternName - // from AIPattern.h. - - /** If the actual symbol name is too long to fit in the buffer, it will be filled with - a truncated form of the name and #kNameTooLongErr will be returned. */ - AIAPI AIErr (*GetSymbolPatternName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name ); - /** If the name length exceeds #kMaxSymbolNameLength then #kNameTooLongErr will be returned - If the name contains illegal characters, is of zero length, or consists entirely of spaces, - then #kInvalidNameErr will be returned. In either case, the symbol will retain the - original name. If the name is already used for another symbol, then #kNameInUseErr - will be returned */ - AIAPI AIErr (*SetSymbolPatternName) ( AIPatternHandle symbolPattern, const ai::UnicodeString& name ); - /** Strips any hidden characters from the end of a name. The name is modified in place. */ - AIAPI AIErr (*GetSymbolPatternDisplayName) ( ai::UnicodeString& name ); - /** Like SetSymbolPatternName(), except if the given name is already used, the name - will be changed by appending numbers until a unique name is generated. (If the - name is very long and already in use, then the prefix may be truncated before - appending numbers, but this is unlikely to happen since #kSymbolMaxNameLength is - so large.) */ - AIAPI AIErr (*SetSymbolPatternBaseName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name ); - - /** Create a new symbol instance (art object of type #kSymbolArt) in the center of the - document view. The paintOrder (see #AIPaintOrder) and prep parameters have the same - meaning as AIArtSuite::NewArt(). - - You can also use AIArtSuite::NewArt(), which is like NewInstanceCenteredInView() where - the symbolPattern is the first one in the set. (It will return #kBadParameterErr if - there are no symbols defined in the current document.) - */ - AIAPI AIErr (*NewInstanceCenteredInView) ( AIPatternHandle symbolPattern, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - /** Create a new symbol instance (art object of type #kSymbolArt) at the specified center - location. The paintOrder (see #AIPaintOrder) and prep parameters have the same - meaning as AIArtSuite::NewArt(). */ - AIAPI AIErr (*NewInstanceAtLocation) ( AIPatternHandle symbolPattern, AIRealPoint center, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - /** Create a new symbol instance (art object of type #kSymbolArt) with specified transform - matrix. The paintOrder (see #AIPaintOrder) and prep parameters have the same - meaning as AIArtSuite::NewArt(). */ - AIAPI AIErr (*NewInstanceWithTransform) ( AIPatternHandle symbolPattern, AIRealMatrix *transform, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - - /** Given a symbol instance (art object of type #kSymbolArt) returns its corresponding - symbol definition. */ - AIAPI AIErr (*GetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle *symbolPattern ); - /** Given a symbol instance (art object of type #kSymbolArt) sets its corresponding - symbol definition. */ - AIAPI AIErr (*SetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle symbolPattern ); - - /** Return the matrix used internally by Illustrator to transform the SymbolPatternArt into - an instance. See AIHardSoftSuite for a discussion of coordinate systems. - - You can translate between the hard and soft forms of the matrix using AIRealMatrixRealSoft - and AIRealMatrixRealHard from the AIHardSoftSuite. (Do not use AIRealMatrixHarden and - AIRealMatrixSoften, which harden/soften only the tx ty components.) */ - AIAPI AIErr (*GetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - /** Set the matrix used internally by Illustrator to transform the SymbolPatternArt into - an instance. See AIHardSoftSuite for a discussion of coordinate systems. */ - AIAPI AIErr (*SetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Return the matrix that can be used by a plugin to transform the SymbolPatternArt into - an instance. (If you are going to be using the TransformArt suite, this is the matrix - you want.) See AIHardSoftSuite for a discussion of coordinate systems. */ - AIAPI AIErr (*GetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - /** Set the matrix that can be used by a plugin to transform the SymbolPatternArt into - an instance. (If you are going to be using the TransformArt suite, this is the matrix - you want.) See AIHardSoftSuite for a discussion of coordinate systems. */ - AIAPI AIErr (*SetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - - /** paintOrder (see #AIPaintOrder), prep and newArt have the same meaning as AIArtSuite::DuplicateArt() - If the instance matrix is a simple placement matrix, then this function is equivalent to - BreakLinkToSymbol(), see below. If the instance matrix includes a scale, rotation, shear - or reflection then it expands any appearances or plugin groups inside the symbol definition, - followed by a transformation by the instance matrix. Also if the instance matrix includes - a shear or a non-uniform scale, it expands strokes before applying the instance matrix. - This routine thus preserves appearance of the instance at the cost of preserving the - original editability of the symbol definition. Does not delete symbolArt. */ - AIAPI AIErr (*InsertExpandedSymbolArt) ( AIArtHandle symbolArt, - short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); - - /** Returns true if the symbol definition is listed. See the suite overview for a discussion. */ - AIAPI AIBoolean (*IsSymbolPatternListed) ( AIPatternHandle symbolPattern ); - /** Makes the symbol definition listed. See the suite overview for a discussion. */ - AIAPI AIErr (*MakeSymbolPatternListed) ( AIPatternHandle symbolPattern ); - /** Makes the symbol definition unlisted. See the suite overview for a discussion. */ - AIAPI AIErr (*UnlistSymbolPattern) ( AIPatternHandle symbolPattern ); - - AIAPI AIErr (*SortListedSymbolPatterns) ( void ); - /** Make the listed symbolPattern have the given index. Use -1 to move to end of list. */ - AIAPI AIErr (*MoveSymbolPatternInList) ( AIPatternHandle symbolPattern, int index ); - - /** Check to see whether the given art object uses the targetSymbol. searchScope is a bit vector; - see #AISymbolSearchScope - - If the art object is null, then the entire artwork is searched. In this case, - the #kSearchDescendants flag is assumed even if it is not on in the searchScope, - because it is meaningless to search the whole artwork unless you look inside layer groups. - - The targetSymbol can be null; if so the art is searched for any symbol usage - If the targetSymbol is not null, then the remaining three parameters are all ignored! - - The oneFoundSymbol pointer can also be null. It is ignored if targetSymbol is not null. - - If targetSymbol is null, and oneFoundSymbol is not null, and the art object uses exactly - one symbol definition within the scope searched, then *oneFoundSymbol will be returned as - that symbol. If it uses multiple symbols, the function returns true but *oneFoundSymbol - is returned null. - - If it uses multiple symbols and allFoundSymbols is non-null, then *allFoundSymbols is - returned as a handle to an array of all those symbols and *foundCount. Like the - AIMatchingArtSuite, the memory is allocated by ArtUsesSymbolPattern, and must be freed - by the calling plugin using AIMdMemorySuite::MdMemoryDisposeHandle(). - - *oneFoundSymbol is mostly intended for the Symbols palette to decide which symbol to select, - and if an object uses multiple symbols then nothing is selected. The searchScope in this - type of usage should not include #kSearchNestedSymbolPatterns, because if symbol A's - definition includes symbol B, and the user selects an instance of symbol A, we want - to consider symbol A to be selected. But if they select a particle set containing - instances of both symbol A and symbol B, we want to select neither symbol in the palette. - - *allFoundSymbols with a null art object is mostly intended for implementing the - "Select All Unused" command in the Symbols palette. - - *allFoundSymbols with a non-null art object is mostly intended for examining which symbol - patterns are referenced by a plugin group that puts multiple symbols in its dictionary, - such as a particle set. - - Currently unimplemented: If globalObjectUsage is not null, we additionally report whether - the symbol was found inside graph designs or inside other symbols. See #AISymbolGlobalObjectUsage. - (This does not affect the searchScope, so if there was a non-null input art object, any - non-zero return value will mean that it was found inside a graph design or symbol that - was used in that object.) - */ - AIAPI AIBoolean (*ArtUsesSymbolPattern) ( AIArtHandle art, short searchScope, AIPatternHandle targetSymbol, - AIPatternHandle *oneFoundSymbol, - AIPatternHandle ***allFoundSymbols, int *foundCount, - int *globalObjectUsage); - - /** paintOrder (see #AIPaintOrder), prep and newArt have the same meaning as AIArtSuite::DuplicateArt() - Like CopySymbolPatternArt() for the symbolArt's symbolPattern followed by a transformation - by the instance matrix, but more efficient than using the AITransformArtSuite since - it is all done internally. Also transfers attributes from the symbol instance to the - transformed defintion. If the instance matrix is a simple placement matrix, then this - function is equivalent to InsertExpandedSymbolArt(), see above, since neither function - does any deep expansion when the matrix is simple. But this function does not do any - internal expansion of strokes, active styles or plugin groups inside the symbol definition - even when a rotational or shear transform is applied to the instance. Since transforming - an object containing such active elements is not always visually identical to transforming - what it "looks like", this routine preserves the full structure and editability of the - symbol definition, at the cost of sometimes not preserving the appearance of the instance. - Does not delete symbolArt. */ - AIAPI AIErr (*BreakLinkToSymbol) ( AIArtHandle symbolArt, - short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); - - /** Analogous to AIObjectSetSuite::RetargetForCurrentDocument() and AIPathStyleSuite::RetargetForCurrentDoc(). - Intended primarily for drag-and-drop between library palettes and the main document - palette. - - This function can be safely used with fill patterns and brush patterns as well as - with symbol patterns (see the AIPatternSuite and AIBrushPatternSuite.) Therefore the - description below refers to "patterns". This should be taken to mean a symbol pattern - if passed a symbol pattern, a fill pattern if passed a fill pattern, etc. - - The function was not needed for fill patterns because they are usually retargetted - indirectly using the AIPathStyleSuite, and it was not needed for brush patterns - because they are usually retargetted indirectly using the AIObjectSetSuite. But - there is no corresponding data structure that wraps around a symbol pattern in - a palette. - - If the srcPattern is in the current document, just returns it back. - - If the srcPattern is not in the current document, but there is already a pattern - in the current document with the same name and the same definition, returns the - handle to that pattern. - - If the srcPattern is not in the current document and there is no pattern with the - same name and definition, then it creates a new pattern in the current document - with the same definition art, and a name based on the srcPattern's name (possibly - appending numbers if the srcPattern's name is assigned to a pattern in the current - document with a different definition.) All other global objects (colors, patterns, - brushes, styles, etc.) used indirectly in the definition are similarly retargetted, - using an existing object if one matches and creating a new one otherwise. - - For purposes of determining sameness, a listed symbol never matches an unlisted one, - even if they otherwise have the same name and definition. - */ - AIAPI AIErr (*RetargetForCurrentDocument) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern ); - - // New for Illustrator 11: - - /** Like CopySymbolPatternArt(), but it inserts a copy of the prototype as passed through the - AIArtConverterSuite::ArtConvertToOutline() with the given options. Calling this is - usually more efficient than calling CopySymbolPatternArt() followed by ArtConvertToOutline(), - because it caches the outline in a dictionary the first time it is generated, and if - asked a second time with the same options, returns the cached outline. - - Note: If the given options cause nothing to be generated, e.g., if #kOutlineEliminateUnpainted - is on and all the objects in the symbol are unpainted, then *newArt will be returned as null - and kNoErr will be returned. So always check for a null return art, and do not assume that - it is equivalent to an error condition. */ - AIAPI AIErr (*CopySymbolPatternOutline) ( AIPatternHandle symbolPattern, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt, long convertToOutlineOptions ); - /** Analogous to InsertExpandedSymbolArt(), except that it transforms the outline proxy. */ - AIAPI AIErr (*InsertSymbolArtOutline) ( AIArtHandle symbolArt, - short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt, long convertToOutlineOptions ); - /** This 'peeks' at the actual cached outline, returning null if none has been generated yet - for the given options. The art returned cannot be edited, just examined or duplicated!! */ - AIAPI AIErr (*PeekCachedPatternOutline) ( AIPatternHandle symbolPattern, AIArtHandle *outlineArt, long convertToOutlineOptions ); - -} AI120SymbolSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Color.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Color.h deleted file mode 100644 index 40d7fa7..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Color.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef __AI130Color__ -#define __AI130Color__ - -/* - * Name: AI130Color.h - * Author: - * Date: - * Purpose: Adobe Illustrator 13.0 Color type definitions (not a suite) - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#include "AIHeaderBegin.h" -#include "AIColor.h" - -/** @file AI130Color.h */ - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Defines a gradient stop. Each stop is place where the color changes in a blend. - A set of stops defines the gradient \e ramp. - See \c #AIGradientStyle and \c #AIGradientSuite. - */ -typedef struct { - /** The location between two ramp points where there is an equal mix of this - color and the color of the next stop. This value is a percentage of the - distance between the two ramp points, between 13 and 87. The midpoint - for the previous color stop is not considered. */ - AIReal midPoint; - /** The position on the blend ramp where this color begins, in the range - [0..100]. The first point does not have to be at 0, but the first - color begins at 0. Similarly, the last does not have to be at 100. */ - AIReal rampPoint; - /** The type and specification of the color for the gradient stop; - a gray color, a process color, an RGB color, or a custom color. */ - AIColor color; -} AI130GradientStop; - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130CropArea.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130CropArea.h deleted file mode 100644 index 0a57d9a..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130CropArea.h +++ /dev/null @@ -1,173 +0,0 @@ -#ifndef _AI130_CROP_AREA_H_ -#define _AI130_CROP_AREA_H_ - -/* - * Name: AICropArea.h - * $Revision: 1 $ - * Author: Dimcho Balev - * Date: June, 2006 - * Purpose: Adobe Illustrator Crop Area Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2006-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* -** -** Imports -** -**/ - -#include "ASTypes.h" -#include "AIPlugin.h" - -#include "AIHeaderBegin.h" - -#define kAICropAreaSuite "AI Crop Area Suite" -#define kAICropAreaSuiteVersion1 AIAPI_VERSION(1) - -/** @file AICropArea.h */ - -/******************************************************************************* -** -** Constants -** -**/ -#define kAIMAX_CROPAREA_LIMIT 100 -#define kAIExceededMaxCropAreaLimitErr 'EMxL' -#define kAICantDeleteLastCropAreaErr 'CDLC' - -/** Properties of a crop area. See \c #kAICropAreaSuite */ -struct AI130CropArea -{ - /** The size of the crop area in points in document coordinate system */ - AIRealRect m_CropAreaRect; - /** Pixel aspect ratio, used in ruler visualization if the units are pixels */ - AIReal m_fPAR; - /** Show crop area rulers */ - AIBoolean m_bShowRulers; - /** Show center mark */ - AIBoolean m_bShowCenter; - /** Show cross hairs */ - AIBoolean m_bShowCrossHairs; - /** Show title and action safe areas (for video) */ - AIBoolean m_bShowSafeAreas; - /** Show screen edge */ - AIBoolean m_bShowScreenEdge; - - AI130CropArea() - { - m_fPAR = 1.0f; - m_bShowRulers = false; - m_bShowCenter = false; - m_bShowCrossHairs = false; - m_bShowSafeAreas = false; - m_bShowScreenEdge = false; - } -}; -/** This structure defines a crop area in a document. See \c #kAICropAreaSuite */ -typedef AI130CropArea *AI130CropAreaPtr; - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite allows you to activate, access, and modify crop areas in Illustrator documents. - Illustrator maintains a list of crop areas in a document, and these functions allow - you to iterate through the list. The active crop area is the one returned by - \c #AIDocumentSuite::GetDocumentCropBox(), which is displayed with crop marks, - and which is used when saving or exporting to a file. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICropAreaSuite and \c #kAICropAreaSuiteVersion. -*/ - -typedef struct -{ - - /** Retrieves the index position of the active crop area in the document's list. - @note In some cases this function can mark the document as changed and in need of saving. - @param index [out] A buffer in which to return the 0-based index, or - -1 if there are no crop areas in the current document. - */ - AIAPI AIErr (* GetActive ) (ASInt32 *index); - - /** Makes a specific crop area active, and makes it current in the iteration order. - See \c #Next(), and \c #Previous(). - @param index The 0-based index position of the crop area in the document list. - */ - AIAPI AIErr (* SetActive ) (ASInt32 index); - - /** Retrieves the properties of a crop area Use with \c #GetCount() and \c #Update() - to modify crop areas without changing which crop area is active in the document. - @param index The 0-based index position of the crop area in the document list. - @param properties [out] A buffer in which to return the crop-area properties. - */ - AIAPI AIErr (* Get ) (ASInt32 index, AI130CropAreaPtr *properties); - - /** Finds the next crop area in the list after the currently active area, makes it - active, and retrieves its properties. - The list is circular; that is, the next one after the last crop area - is the first one in the list. - @param properties [out] A buffer in which to return the crop-area properties, or - \c NULL if there are no crop areas in the current document. - */ - AIAPI AIErr (* Next ) (AI130CropAreaPtr *properties); - - /** Finds the previous crop area in the list before the currently active area, makes it - active, and retrieves its properties. - The list is circular; that is, the previous one before the first crop area - is the last one in the list. - @param properties [out] A buffer in which to return the crop-area properties, or - \c NULL if there are no crop areas in the current document. - */ - AIAPI AIErr (* Previous ) (AI130CropAreaPtr *properties); - - /** Retrieves the number of crop areas defined in the current document. - @param count [out] A buffer in which to return the number of crop areas. - */ - AIAPI AIErr (* GetCount ) (ASInt32 *count); - - /** Deletes a crop area from the document list, makes the next one in the list active, - and retrieves the properties of the newly active area. - Last crop area can not be deleted, throws error kAICantDeleteLastCropAreaErr in such case. - @param index The 0-based index position of the crop area to delete. - @param properties [out] A buffer in which to return the crop-area properties of the - newly active area, or \c NULL if there are no remaining crop areas in the current document. - */ - AIAPI AIErr (* Delete ) (int index, AI130CropAreaPtr *properties); - - /** Not Implemented returns kNotImplementedErr*/ - AIAPI AIErr (* DeleteAll ) (); - - /** Adds new crop area to the document and returns its index position in the crop-area list. - Maximum limit MAX_CROPAREA_LIMIT,throws error kAIExceededMaxCropAreaLimitErr after this limit. - @param properties The new crop area. - @param index [out] A buffer in which to return the 0-based index position of the new crop area. - */ - AIAPI AIErr (* AddNew ) (AI130CropAreaPtr properties, ASInt32 *index); - - /** Updates the properties of a crop area. Use with \c #GetCount() and \c #Get() - to modify crop areas without changing which crop area is active in the document. - @param index The 0-based index position of the crop area in the document list. - @param properties The new crop-area definition. - */ - AIAPI AIErr (* Update ) (ASInt32 index, AI130CropAreaPtr properties); - -} AI130CropAreaSuite; - -#include "AIHeaderEnd.h" - -#endif // _AI_CROP_AREA_H_ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130DrawArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130DrawArt.h deleted file mode 100644 index e37c3d9..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130DrawArt.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef __AI130DrawArt__ -#define __AI130DrawArt__ - -/* - * Name: AI1300DrawArt.h - * $Revision: $ - * Author: - * Date: - * Purpose: Adobe Illustrator Draw Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AI140DrawArt__ -#include "AI140DrawArt.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AI30DrawArt.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI130DrawArtSuite kAIDrawArtSuite -#define kAIDrawArtSuiteVersion7 AIAPI_VERSION(7) -#define kAI130DrawArtSuiteVersion kAIDrawArtSuiteVersion7 -#define kAI130DrawArtVersion kAI130DrawArtSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ -/* Illustrator 13.0 DrawArt suite */ -typedef struct { - - AIAPI AIErr (*DrawArt)( AI140DrawArtData *data, const AIColorConvertOptions& options ); - - AIAPI AIErr (*BeginDrawArt)( AI140DrawArtData * data, const AIColorConvertOptions& options, AIDrawArtFlags flags ); - - AIAPI AIErr (*EndDrawArt)( AI140DrawArtData *data, const AIColorConvertOptions& options ); - - AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data ); - - AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color); - - AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect ); - -} AI130DrawArtSuite; - - -#include "AIHeaderEnd.h" - - -#endif //__AI130DrawArt__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Path.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Path.h deleted file mode 100644 index 543fce5..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Path.h +++ /dev/null @@ -1,140 +0,0 @@ -#ifndef __AI130Path__ -#define __AI130Path__ - -/* - * Name: AIPath.h - * $Revision: 14 $ - * Date: - * Purpose: Adobe Illustrator Path Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - /******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPath.h" - -#include "AIHeaderBegin.h" - -/** @file AI130Path.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI130PathSuite kAIPathSuite -#define kAIPathSuiteVersion7 AIAPI_VERSION(7) -#define kAI130PathSuiteVersion kAIPathSuiteVersion7 -#define kAI130PathVersion kAI130PathSuiteVersion - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions that allow you to examine and manipulate - \e paths, which are art objects of type \c #kPathArt. - - The shape of a path is defined by one or more path \e segments. - Every segment of a path corresponds to an \e anchor \e point, which is - the handle shown when the path is selected. The number of anchor points - on a path, or \e segment \e count, includes the two at each end. - A segment is defined by the \c #AIPathSegment structure. Segment - index numbers begin at zero. A path can have a single anchor point. - - The \e in and \e out points of a segment define the tangent of the curve - at a point \e p. The in point is not used for the initial and final segments - of an open path. A segment can be a \e corner point or a \e smooth point. - For a corner, the in and out points can be anywhere. To make a straight line, - place the in and out points of each end on their p points. - - A path can be can be \e closed or \e open. - If a path is open, it is defined only by its segments. If it is closed, - Illustrator draws a segment between the first and last anchor points, - which uses the out tangent of the last segment and the in tangent of the first. - - Some paths are also used as \e guides. In all other respects they are paths, - with the same contents and attributes. Paint attributes are associated with - a path through a \e path \e style. See the \c #AIPathStyleSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPathSuite and \c #kAIPathVersion. -*/ -typedef struct { - - AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, short *count ); - - AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, short count ); - - AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment ); - - AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment ); - - AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment ); - - AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, short segNumber, short count ); - - AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed ); - - AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed ); - - AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide ); - - AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide ); - - AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, short segNumber, short *selected ); - - AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, short segNumber, short selected ); - - AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path ); - - AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area ); - - // New for AI8.0: - - AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness ); - - AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, short segNumber, AIRealBezier *bezier ); - - AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength ); - - AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip ); - - // New for AI 11 - - AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected ); - - // New for AI 13 - - AIAPI AIErr (*GetKeySegment) (AIArtHandle* path, short* segmentNumber); - - AIAPI AIErr (*CancelKeySegment) (void); - - AIAPI AIBoolean (*IsPath9SliceSplitter)(AIArtHandle path); - -} AI130PathSuite; - -#include "AIHeaderEnd.h" - -#endif //__AI130Path__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Runtime.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Runtime.h deleted file mode 100644 index 6e40f85..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI130Runtime.h +++ /dev/null @@ -1,222 +0,0 @@ -#ifndef __AI130Runtime__ -#define __AI130Runtime__ - -/* - * Name: AI130Runtime.h - * Purpose: Adobe Illustrator Runtime Environment. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIRuntime.h" - -#include "AIHeaderBegin.h" - -/** @file AI130Runtime.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI130RuntimeSuite kAIRuntimeSuite -#define kAIRuntimeSuiteVersion9 AIAPI_VERSION(9) -#define kAI130RuntimeSuiteVersion kAIRuntimeSuiteVersion9 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provide functions that allow you to obtain information - about the name and version number of the plug-in host application. - You can access application instances of the name space and string - pool data structures, and the user name, organization, and serial - number registered for the application. - - The following notifiers are associated with the runtime suite: -
\c #kAIApplicationStartedNotifier -
\c #kAIApplicationShutdownNotifier - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIRuntimeSuite and \c #kAIRuntimeVersion. -*/ -struct AI130RuntimeSuite { - - /** Retrieves the name of the host application running the plug-in. - You can use the name to verify that your plug-in is running in - a supported host application. You can also use the name and - serial number to key your plug-in to an installed application. - @param name [out] A buffer in which to return the name, - as a C-string from the application string pool. - Do not modify the returned string. - */ - AIAPI AIErr (*GetAppName) ( AIAppName *name ); - - /** Retrieves the file specification of the host application running the plug-in. - @param name [out] A buffer in which to return the file specification. - */ - AIAPI AIErr (*GetAppFileSpecification) ( ai::FilePath &file ); - - /** Retrieves the user name, as registered with the application when - it was installed. - @param name [out] A buffer in which to return the name, - as a C-string from the application string pool. - Do not modify the returned string. - */ - AIAPI AIErr (*GetUserName) ( AIUserName *name ); - - /** Retrieves the user organization, as registered with the application when - it was installed. - @param organization [out] A buffer in which to return the organization, - as a C-string from the application string pool. - Do not modify the returned string. - */ - AIAPI AIErr (*GetUserOrganization) ( AIUserOrganization *organization ); - - /** Retrieves the user serial number, as registered with the application when - it was installed. - @param serialNumber [out] A buffer in which to return the serial number, - as a C-string from the application string pool. - Do not modify the returned string. - */ - AIAPI AIErr (*GetUserSerialNumber) ( AIUserSerialNumber *serialNumber ); - - /** Retrieves a reference to the namespace of the host application - running the plug-in. - - A plug-in can create its own namespace in which to store arbitrary data, - but it can also use this function to access the application’s namespace. - The application preferences (among other things) are stored in the - application namespace. - - Your plug-in should not modify the application’s existing namespace data - directly, but it can create new data within the application namespace. - @param space [out] A buffer in which to return the namespace reference. - */ - AIAPI AIErr (*GetAppNameSpace) ( AINameSpace **space ); - - /** Retrieves a reference to the string pool of the host application - running the plug-in. - - Illustrator maintains a string pool which any plug-in can access. - Runtime data for a host is stored in this string pool, and the strings - returned by functions in this suite belong to the application string pool. - These references point to the C-string data in the pool, and should - not be modified. If you need to modify such a string, copy it to - local storage. See \c #AIStringPoolSuite. - @param pool [out] A buffer in which to return the string-pool reference. - */ - AIAPI AIErr (*GetAppStringPool) ( AIStringPool **pool ); - - /** Gets the amount of physical RAM on the computer, which you can use - as an estimate of free application memory available. - (Note that this function returns a numeric value, not an error code.) - @return The number of bytes of RAM. - */ - AIAPI ASInt32 (*GetAppFreeMem) ( void ); - - /** Shows the about box for the application. */ - AIAPI AIErr (*ShowAppAboutBox) ( void ); - - /** Retrieves the version of the operating system the application is running on. - (Note that this function returns a constant value, not an error code.) - @return An #AISystemOSVersion value. - */ - AIAPI ASInt32 (*GetSystemVersion) ( void ); - - /** Reports whether the operating system is Mac OS X. - @return True if the operating system is Mac OS X. - */ - AIAPI AIBoolean (*GetIsSystemMacOSX) ( void ); - - /** Retrieves the major version number of the application - (X where the version number is X.Y.Z). - (Note that this function returns a numeric value, not an error code.) - @return The major version number. - */ - AIAPI ASInt32 (*GetAppMajorVersion) ( void ); - - /** Retrieves the minor version number of the application - (Y where the version number is X.Y.Z). - (Note that this function returns a numeric value, not an error code.) - @return The minor version number. - */ - AIAPI ASInt32 (*GetAppMinorVersion) ( void ); - - /** Retrieves the revision number of the application - (Z where the version number is X.Y.Z). - (Note that this function returns a numeric value, not an error code.) - @return The revision number. - */ - AIAPI ASInt32 (*GetAppRevisionVersion) ( void ); - - /** Retrieves the Unicode name of the host application running the plug-in. - @param name [out] A buffer in which to return the name, - as a Unicode string. - */ - AIAPI AIErr (*GetAppNameUS) ( ai::UnicodeString& name ); - - /** Retrieves the Unicode user name, as registered with the application when - it was installed. - @param name [out] A buffer in which to return the name, - as a Unicode string. - */ - AIAPI AIErr (*GetUserNameUS) ( ai::UnicodeString& name ); - - /** Retrieves the Unicode organization name, as registered with the application when - it was installed. - @param organization [out] A buffer in which to return the name, - as a Unicode string. - */ - AIAPI AIErr (*GetUserOrganizationUS) ( ai::UnicodeString& organization ); - - /** Retrieves the default script for the application. - @param script [out] A buffer in which to return the script reference. - */ - AIAPI AIErr (*GetDefaultScript) ( AIFaceScript *script); - - /** Used internally. */ - AIAPI AIBoolean (*GetIsHonestyBuild) ( void ); - - /** Used internally. */ - AIAPI AIBoolean (*GetIsProductTryAndDie) ( void ); - - // New in Illustrator 13 - - /** Used internally. Reports whether this is an executable build. */ - AIAPI AIBoolean (*GetIsExeBuild) ( void ); - - /** Launches the Adobe Help Viewer and shows an Illustrator help page. - @param pageID A null terminated UTF-8 string for the help page ID, - or a NULL pointer to bring up the default help page. - */ - AIAPI AIErr (*ShowAdobeHelp) (const char *pageID); - -}; - - -#include "AIHeaderEnd.h" - - -#endif // __AI130Runtime__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140AnnotatorDrawer.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140AnnotatorDrawer.h deleted file mode 100644 index 5429898..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140AnnotatorDrawer.h +++ /dev/null @@ -1,198 +0,0 @@ -#ifndef __AI140AnnotatorDrawer__ -#define __AI140AnnotatorDrawer__ - -/* - * Name: AI140AnnotatorDrawer.h - * Author: Started by Chris Quartetti - * Date: 2007 - * Purpose: Adobe Illustrator Annotator Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2007-2008 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIAnnotatorDrawer.h" - -#include "AIHeaderBegin.h" - -// This Windows macro obscures an API -#undef DrawText - -/** @file AI140AnnotatorDrawer.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIAnnotatorDrawerSuiteVersion1 AIAPI_VERSION(1) -#define kAI140AnnotatorDrawerSuiteVersion kAIAnnotatorDrawerSuiteVersion1 -#define kAI140AnnotatorDrawerSuite kAIOldAnnotatorDrawerSuite -//This suite #defd as "AI Annotator Suite", in the latest version we have changed it to "AI Annotator Drawer -// suite", but cant change it here to maintain backward compatibility. -#define kAIOldAnnotatorDrawerSuite "AI Annotator Suite" - - - -/** @ingroup Suites - The annotator drawer suite allows plug-ins to draw annotations into the - document window that are not a part of the artwork. Coordinates are in - document view space. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI40AnnotatorDrawerSuite and \c #kAI140AnnotatorDrawerSuiteVersion. - */ - -struct AI140AnnotatorDrawerSuite -{ - /// @name Color - //@{ - /// Set drawing color - AIAPI void (*SetColor)(AIAnnotatorDrawer *drawer, const AIRGBColor &color); - - /// Get drawing color - AIAPI void (*GetColor)(AIAnnotatorDrawer *drawer, AIRGBColor &color); - //@} - - /// @name Lines and shapes - /// Note: Line width is one point by default. - //@{ - /** Set line width. */ - AIAPI void (*SetLineWidth)(AIAnnotatorDrawer *drawer, const AIReal newWidth); - /** Get line width. */ - AIAPI AIReal (*GetLineWidth)(AIAnnotatorDrawer *drawer); - - /** Set dashed line drawing on or off. If \a dashed is true, all lines will - be drawn dashed until set back to false. */ - AIAPI void (*SetLineDashed)(AIAnnotatorDrawer *drawer, AIBoolean dashed); - /** Get state of dashed line drawing. */ - AIAPI AIBoolean (*GetLineDashed)(AIAnnotatorDrawer *drawer); - - /** Draw a line between \a start and \a end points. */ - AIAPI AIErr (*DrawLine)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint &end); - /** Draw a rectangle, optionally filling it with the current color. */ - AIAPI AIErr (*DrawRect)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill); - - /** Draw a polygon by connecting the points. */ - AIAPI AIErr (*DrawPolygon)(AIAnnotatorDrawer *drawer, const AIPoint points[], ai::uint32 numPoints, AIBoolean fill); - - /** Draw an ellipse bounded by the rectangle. */ - AIAPI AIErr (*DrawEllipse)(AIAnnotatorDrawer *drawer, const AIRect &rect, AIBoolean fill); - - /** Draw cubic Bezier curves starting at \a start and threading through the points in the \a pointSets array. - @param start[in] The starting anchor point for the curve - @param pointSets[in] An array of sets of points describing the Bezier. The points in the - inner array, p0, p1, and p2, have the following meaning:
- p0 exit control point for the previous anchor
- p1 entry control point for anchor
- p2 anchor point
- These are in the same order as for the PostScript CurveTo command. - @param numPointSets[in] Number of sets of points in the \a pointSets array. - */ - AIAPI AIErr (*DrawBezier)(AIAnnotatorDrawer *drawer, const AIPoint &start, const AIPoint pointSets[][3], ai::uint32 numPointSets, AIBoolean fill); - //@} - - /// @name Text and Fonts - //@{ - /** Draw \a text putting the bottom left at \a bottomLeft. */ - AIAPI AIErr (*DrawText)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIPoint &bottomLeft); - - /** Draw text aligned in the rectangle \rect with the given vertical and - horizontal alignment. NB: Text will not wrap. */ - AIAPI AIErr (*DrawTextAligned)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, const AIHorizAlignment horizAlign, const AIVertAlignment vertAlign, const AIRect &rect); - - /** Find the bounds of text drawn in current font at current size. Specify \a location to - get the bounds document view coordinates, otherwise bounds will start at 0,0. - @param text[in] Text to be drawn - @param location[in] Optional parameter to simulate drawing text in document view coordinates. - @param bounds[out] Coordinates of text boundary. If \a location is not specified, top left will be 0,0. - */ - AIAPI AIErr (*GetTextBounds)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &text, AIPoint *location, AIRect &bounds); - - /** Set font size. */ - AIAPI void (*SetFontSize)(AIAnnotatorDrawer *drawer, const AIReal size); - - /** Get font size. */ - AIAPI AIReal (*GetFontSize)(AIAnnotatorDrawer *drawer); - - /** Set the typeface and size with a AIAnnotatorFont enumeration. */ - AIAPI AIErr (*SetFontPreset)(AIAnnotatorDrawer *drawer, AIAnnotatorFont font); - - /** Set the font using an \a AIFontKey. */ - AIAPI AIErr (*SetFontByFontKey)(AIAnnotatorDrawer *drawer, AIFontKey font); - - /** Set the font by name. The API first attempts to interpret \a name as a - PostScript name, then if not found, as a platform encoded name. */ - AIAPI AIErr (*SetFontByName)(AIAnnotatorDrawer *drawer, const ai::UnicodeString &name); - - /** Get the \a AIFontKey for the current font. */ - AIAPI AIFontKey (*GetFontKey)(AIAnnotatorDrawer *drawer); - - /** Get the name of the current font. */ - AIAPI void (*GetFontName)(AIAnnotatorDrawer *drawer, ai::UnicodeString &name); - //@} - - /// @name Clipping - //@{ - - /** Start sequence to define a clipping path. Anything drawn before calling \a DefineClipEnd - will be unioned into the clipping path, after which all drawing will be clipped - until calling \a ClearClip. Shapes drawn for clipping should generally be filled. - */ - AIAPI void (*DefineClipStart)(AIAnnotatorDrawer *drawer); - - /** End sequence defining clipping path. Subsequent drawing will be clipped to the paths - previously drawn until calling \a ClearClip. - */ - AIAPI void (*DefineClipEnd)(AIAnnotatorDrawer *drawer); - - /** Remove clipping path defined with \a DefineClipStart/DefineClipEnd. */ - AIAPI void (*ClearClip)(AIAnnotatorDrawer *drawer); - //@} - - /// @name Miscellaneous - //@{ - /** Set highlight blending mode (off by default). This provides extra visibility - like XOR drawing but it cannot be used to erase previous marks drawn in highlight mode. - */ - AIAPI AIErr (*SetHighlightMode)(AIAnnotatorDrawer *drawer, AIBoolean highlightOn); - - /** Get highlight blending mode setting. Return value of true indicates highlight mode is on. */ - AIAPI AIBoolean (*GetHighlightMode)(AIAnnotatorDrawer *drawer); - - /** Draw the icon putting the top left at the point \a topLeft. */ - AIAPI AIErr (*DrawIcon)(AIAnnotatorDrawer *drawer, ADMIconRef inIcon, const AIPoint &topLeft); - - /** Draw the icon centered in the given rectangle. */ - AIAPI AIErr (*DrawIconCentered)(AIAnnotatorDrawer *drawer, ADMIconRef inIcon, const AIRect &rect); - - /** Get an AGM port suitable for use with AGMSuite. */ - AIAPI AIAGMPort* (*GetAGMPort)(AIAnnotatorDrawer *drawer); - - /** Release AGM port and set pointer to NULL. */ - AIAPI void (*ReleaseAGMPort)(AIAGMPort *&admAGMPort); - //@} -}; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ArtStyleParser.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ArtStyleParser.h deleted file mode 100644 index a3f2ac7..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ArtStyleParser.h +++ /dev/null @@ -1,241 +0,0 @@ -#ifndef __AI140ArtStyleParser__ -#define __AI140ArtStyleParser__ - -/* - * Name: AI140ArtStyleParser.h - * Purpose: Adobe Illustrator Art Style Parser Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIArtStyleParser.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI140ArtStyleParserSuite kAIArtStyleParserSuite -#define kAIArtStyleParserSuiteVersion5 AIAPI_VERSION(5) -#define kAI140ArtStyleParserSuiteVersion kAIArtStyleParserSuiteVersion5 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/* Illustrator 14.0 Art Style Parser Suite */ -typedef struct { - AIAPI AIErr (*NewParser) ( AIStyleParser* parser ); - - AIAPI AIErr (*DisposeParser) ( AIStyleParser parser ); - - AIAPI AIErr (*ParseStyle) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - - AIAPI AIErr (*MergeStyleIntoParser) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - - AIAPI AIBoolean (*IsStyleParseable) ( AIStyleParser parser ); - - AIAPI ai::int32 (*CountPreEffects) ( AIStyleParser parser ); - - AIAPI ai::int32 (*CountPostEffects) ( AIStyleParser parser ); - - AIAPI ai::int32 (*CountPaintFields) ( AIStyleParser parser ); - - AIAPI ai::int32 (*CountEffectsOfPaintField) ( AIParserPaintField paintField ); - - AIAPI AIErr (*GetNthPreEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect* effect ); - - AIAPI AIErr (*GetNthPostEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect* effect ); - - AIAPI AIErr (*GetNthPaintField) ( AIStyleParser parser, ai::int32 n, AIParserPaintField* paintField ); - - AIAPI AIErr (*GetNthEffectOfPaintField) ( AIParserPaintField paintField, ai::int32 n, - AIParserLiveEffect* effect ); - - AIAPI AIErr (*GetStyleBlendField) ( AIStyleParser parser, AIParserBlendField* blendField ); - - AIAPI AIErr (*InsertNthPreEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect effect ); - - AIAPI AIErr (*InsertNthPostEffect) ( AIStyleParser parser, ai::int32 n, AIParserLiveEffect effect ); - - AIAPI AIErr (*InsertNthPaintField) ( AIStyleParser parser, ai::int32 n, AIParserPaintField paintField ); - - AIAPI AIErr (*InsertNthEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ai::int32 n, - AIParserLiveEffect effect ); - - AIAPI AIErr (*RemovePreEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); - - AIAPI AIErr (*RemovePostEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); - - AIAPI AIErr (*RemovePaintField) ( AIStyleParser parser, AIParserPaintField paintField, AIBoolean doDelete ); - - AIAPI AIErr (*RemoveEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, - AIParserLiveEffect effect, AIBoolean doDelete ); - - AIAPI AIErr (*RemoveAllEffects) ( AIStyleParser parser ); - - AIAPI AIErr (*Simplify) ( AIStyleParser parser ); - - AIAPI AIErr (*GetFocusFill) ( AIStyleParser parser, AIParserPaintField* paintField ); - - AIAPI AIErr (*GetFocusStroke) ( AIStyleParser parser, AIParserPaintField* paintField ); - - AIAPI AIErr (*SetParserFocus) ( AIStyleParser parser, AIParserPaintField paintField ); - - AIAPI AIErr (*SetFocus) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserPaintField paintField ); - - AIAPI ai::int32 (*GetGroupContentsPosition) ( AIStyleParser parser ); - - AIAPI AIErr (*MoveGroupContentsPosition) ( AIStyleParser parser, ai::int32 position ); - - AIAPI AIErr (*CreateNewStyle) ( AIStyleParser parser, AIArtStyleHandle* artStyle ); - - AIAPI AIBoolean (*IsStyleVisible) ( AIStyleParser parser ); - - AIAPI AIBoolean (*ContainsPaint) ( AIStyleParser parser ); - - AIAPI AIBoolean (*ContainsEffects) ( AIStyleParser parser ); - - AIAPI AIBoolean (*ContainsTransparency) ( AIStyleParser parser ); - - AIAPI AIErr (*GetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle* liveEffectHandle ); - - AIAPI AIErr (*GetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters* params ); - - AIAPI AIErr (*SetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle liveEffectHandle ); - - AIAPI AIErr (*SetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters params ); - - AIAPI AIErr (*CloneLiveEffect) ( AIParserLiveEffect effect, AIParserLiveEffect* clonedEffect ); - - AIAPI AIErr (*EditEffectParameters) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect ); - - AIAPI AIBoolean (*IsFill) ( AIParserPaintField paintField ); - - AIAPI AIBoolean (*IsStroke) ( AIParserPaintField paintField ); - - AIAPI AIErr (*GetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); - - AIAPI AIErr (*GetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); - - AIAPI AIErr (*SetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); - - AIAPI AIErr (*SetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); - - AIAPI AIErr (*GetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); - - AIAPI AIErr (*SetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); - - AIAPI ai::int32 (*GetColorPosn) ( AIParserPaintField paintField ); - - AIAPI AIErr (*SetColorPosn) ( AIParserPaintField paintField, ai::int32 colorPosn ); - - AIAPI AIErr (*ClonePaintField) ( AIParserPaintField paintField, AIParserPaintField* clonedPaintField ); - - AIAPI AIErr (*GetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle* liveEffectHandle, - AILiveEffectParameters* params ); - AIAPI AIErr (*SetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle liveEffectHandle, - AILiveEffectParameters params ); - AIAPI AIErr (*GetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); - - AIAPI AIErr (*SetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); - - AIAPI AIErr (*GetEvenOdd) ( AIParserPaintField paintField, AIBoolean* evenodd ); - AIAPI AIErr (*SetEvenOdd) ( AIParserPaintField paintField, AIBoolean evenodd ); - AIAPI AIErr (*NewPaintFieldFill) ( const AIFillStyle* fill, AIBoolean evenOdd, const AIArtStylePaintData* paintData, - AIParserPaintField* paintField ); - AIAPI AIErr (*NewPaintFieldStroke) ( const AIStrokeStyle* stroke, const AIArtStylePaintData* paintData, - AIParserPaintField* paintField ); - - AIAPI AIErr (*DisposePaintField) ( AIParserPaintField paintField ); - - AIAPI AIErr (*NewParserLiveEffect) ( AILiveEffectHandle liveEffectHandle, AILiveEffectParameters params, - AIParserLiveEffect* effect ); - - AIAPI AIErr (*DisposeParserLiveEffect) ( AIParserLiveEffect effect ); - - AIAPI AIErr (*GetCurrentArtStyle) ( AIArtStyleHandle* style ); - - AIAPI AIErr (*EditPaintEffectParameters) ( AIArtStyleHandle artStyle, AIParserPaintField paintField ); - - AIAPI AIBoolean (*IsNormalOpaquePaintBlend) ( AIParserPaintField paintField ); - - AIAPI AIBoolean (*IsNormalOpaqueBlend) ( AIParserBlendField blendField ); - - AIAPI AIBoolean (*IsDefaultPaintBlend) ( AIParserPaintField paintField ); - - AIAPI AIErr (*SetDefaultPaintBlend) ( AIParserPaintField paintField ); - - AIAPI AIBoolean (*IsDefaultBlend) ( AIParserBlendField blendField ); - - AIAPI AIErr (*SetDefaultBlend) ( AIParserBlendField blendField, AIBoolean knockoutOff ); - - AIAPI AIBoolean (*IsStyleSimple) ( AIStyleParser parser ); - - AIAPI AIErr (*GetLiveEffectNameAndVersion) ( AIParserLiveEffect effect, const char** name, ai::int32* major, ai::int32* minor ); - - AIAPI AIErr (*GetPaintLiveEffectNameAndVersion) ( AIParserPaintField paintField, const char** name, ai::int32* major, ai::int32* minor ); - - AIAPI AIBoolean (*CompareStyles) ( AIStyleParser parserStyle1, AIStyleParser parserStyle2); - - AIAPI AIErr (*GetEffectVisible) ( AIParserLiveEffect effect, AIBoolean *visible); - - AIAPI AIErr (*SetEffectVisible) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect, AIBoolean visible ); - - AIAPI AIErr (*GetPaintFieldVisible) ( AIParserPaintField paintField, AIBoolean *visible); - - AIAPI AIErr (*SetPaintFieldVisible) ( AIArtStyleHandle artStyle, AIParserPaintField paintField, AIBoolean visible ); - - AIAPI AIErr (*GetBlendFieldVisible) ( AIParserBlendField blendField, AIBoolean *visible); - - AIAPI AIErr (*SetBlendFieldVisible) ( AIArtStyleHandle artStyle, AIParserBlendField blendField, AIBoolean visible ); - - AIAPI AIErr (*GetPaintBlendVisible) ( AIParserPaintField paintField, AIBoolean *visible); - - AIAPI AIErr (*SetPaintBlendVisible) ( AIArtStyleHandle artStyle, AIParserPaintField paintField, AIBoolean visible ); - - AIAPI AIErr (*IntersectStyleWithParser) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - - AIAPI AIErr (*FindEquivalentPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ai::int32 startIndex, ai::int32* index ); - - AIAPI AIErr (*GetFocusEffect) ( AIStyleParser parser, AIParserLiveEffect* effectField ); - - AIAPI AIErr (*SetFocusEffect) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserLiveEffect effectField ); - - AIAPI AIErr (*SetParserFocusEffect) ( AIStyleParser parser, AIParserLiveEffect effectField ); - - AIAPI AIErr (*EditEffectParametersInSelection) ( AIParserLiveEffect effectField ); - - AIAPI AIErr (*FindEquivalentEffect) ( AIStyleParser parser, AIParserPaintField paintField, AIParserLiveEffect effectField, AIBoolean preEffect, ai::int32 startIndex, ai::int32* index ); - - AIAPI AIBoolean (*StyleContainsAttributes) ( AIArtStyleHandle artStyle, AIStyleParser attributes, AIBoolean includeTransparency ); - -} AI140ArtStyleParserSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Context.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Context.h deleted file mode 100644 index 7e2be6d..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Context.h +++ /dev/null @@ -1,152 +0,0 @@ -#ifndef __AI140Context__ -#define __AI140Context__ - -/* - * Name: AIContext.h - * $Revision: 2 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Runtime Context Environment. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIDocument__ -#include "AIDocument.h" -#endif - -#ifndef __SPPlugins__ -#include "SPPlugs.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIContext.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI140AppContextSuite "AI Context Suite" -#define kAIAppContextSuiteVersion4 AIAPI_VERSION(4) -#define kAI140AppContextVersion kAIAppContextSuiteVersion4 - - - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Use these functions to manage the application context. The application - context does two things: - - \li It establishes the current document and view. Most SDK - functions do not take a document or a view as a parameter, but - use the current document or view as defined by the application context. - - \li It establishes the scope of a single undoable operation. All the - changes that occur during a single application context are grouped - together into a single operation, which can then be undone and redone. - - Most plug-ins will not need to use these functions because Illustrator - manages the context. In rare situations, however, a plug-in may need - to make changes to the context. For example, if a plug-in can - be called directly by the operating system, Illustrator will not have - established the context. If the plug-in wants to make SDK calls - in response, it should use \c #PushAppContext() and \c #PopAppContext(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIAppContextSuite and \c #kAIAppContextVersion. - */ -typedef struct { - - /** Retrieves the parent application window in Windows. - Does nothing in Mac OS. - @param appWindow [out] A buffer in which to return the window reference. - */ - AIAPI AIErr (*GetPlatformAppWindow) ( AIWindowRef *appWindow ); - - /** Stores an application context for the calling plug-in. - @param plugin This plug-in. - @param appContext [out] A buffer in which to return the application - context reference. Pass this to \c #PopAppContext() upon completion - of the context-sensitive procedure. - - */ - AIAPI AIErr (*PushAppContext) ( SPPluginRef plugin, AIAppContextHandle *appContext ); - - /** Restores the previous application context. - @param appContext The application context reference, as returned by - \c #PushAppContext(). - */ - AIAPI AIErr (*PopAppContext) ( AIAppContextHandle appContext ); - - /** @deprecated No longer needed. */ - AIAPI AIErr (*MacGetAppQDGlobal) ( void **appQD ); - - /** Suspends the current application context stack. This is equivalent to popping - all current open contexts, except that they can later be restored all at once - by \c #ResumeAppContext(). Use before an operation that may change the current document. - @param appContext [out] A buffer in which to return the application - context stack reference. Pass this to \c #ResumeAppContext() upon completion - of the context-sensitive procedure. - */ - AIAPI AIErr (*SuspendAppContext) ( AISuspendedAppContext* appContext ); - - /** Resumes the application context stack for the document of - the frontmost window. This might be a different document from the one - at the time the context stack was suspended. - @param appContext The application context stack reference, as returned by - \c #SuspendAppContext(). - */ - AIAPI AIErr (*ResumeAppContext) ( AISuspendedAppContext appContext, AIDocumentHandle document ); - - /** Allows or disallows plug-ins to operate on artwork within locked and/or hidden - parent contexts. The call modifies the allow-changes state of the current context. The - state persists until you specifically reset it, or until the context is popped. - This allows you to make modifications without having to save, set, and restore - visibility and locked attributes on the whole parent chain. - @param allowAllChanges True to allow changes, false to disallow changes. - @param previousState [out] A buffer in which to return true if changes were previously allowed, - false if they were not. - */ - AIAPI AIErr (*AllowAllChanges) ( ASBoolean allowAllChanges, ASBoolean *previousState ); - - - -} AI140AppContextSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140DrawArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140DrawArt.h deleted file mode 100644 index fff7467..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140DrawArt.h +++ /dev/null @@ -1,216 +0,0 @@ -#ifndef __AI140DrawArt__ -#define __AI140DrawArt__ - -/* - * Name: AIDrawArt.h - * $Revision: $ - * Author: - * Date: - * Purpose: Adobe Illustrator Draw Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIColorConversion__ -#include "AIColorConversion.h" -#endif - -#ifndef __AIRaster__ -#include "AIRaster.h" -#endif - -#include "AIDrawArt.h" - -#include "ADMAGMTypes.h" - -#include "AIHeaderBegin.h" - -/** @file AIDrawArt.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIDrawArtSuite "AI Draw Art Suite" -#define kAIDrawArtSuiteVersion8 AIAPI_VERSION(8) -#define kAI140DrawArtSuiteVersion kAIDrawArtSuiteVersion8 -#define kAI140DrawArtVersion kAI140DrawArtSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Drawing data, defines an art object to be drawn, the object it is - to be drawn into and parameters affecting how it is to be - drawn. See \c #AIDrawArtSuite::DrawArt(), \c #AIDrawArtSuite::BeginDrawArt() */ -typedef struct AI140DrawArtData { - /** The version of \c #AIDrawArtSuite in use, a \c #kAIDrawArtVersion value. */ - short version; - /** Flags that modify drawing behavior, a logical OR of - \c #AIDrawArtFlagBitPos values. */ - AIDrawArtFlags flags; - /** The type of port that is the destination for the draw operation. */ - AIDrawArtOutputType type; - /** The point in the source artwork coordinates that is mapped to (0,0) in - the destination port.*/ - AIRealPoint origin; - /** The transformation matrix to be applied after placement - at the origin. */ - AIRealMatrix matrix; - /** The art object to be drawn. */ - AIArtHandle art; - /** The destination clipping bounds. */ - AIRealRect destClipRect; - /** When true, \c destClipRect is erased before the art is drawn. */ - AIBoolean eraseDestClipRect; - /** The art object that was being drawn when the operation was - interrupted. See \c #kAIDrawArtPreviewInterrupt and \c #kAIDrawArtPreviewContinue. */ - AIArtHandle interruptedArt; - /** The greeking threshold. If the point size of text, - after transformation to the coordinate system of the - destination port, is smaller than this value, the text - is greeked. Use -1 to indicate no greeking. */ - AIReal greekThreshold; - /** Not used */ - AIExtendedRGBColorRec selectionColor; - /** The port that is the destination for the draw operation.*/ - AIDrawArtOutputUnion output; -} AI140DrawArtData; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Legacy Version - These functions draw Illustrator artwork to an \e output \e port - (drawing surface). The port can be a screen window, or it can be - an offscreen drawing surface used to rasterize artwork. - - The many drawing options are controlled by values in an \c #AIDrawArtData - structure and related option structures \c #AIColorConvertOptions and - \c #AIDrawArtFlags. - - When drawing to a port whose color space does not match the - document color space, bracket a sequence of calls - to \c #DrawArt() with calls to.\c #BeginDrawArt() and \c #EndDrawArt(). - Examples are drawing a CMYK document to an RGB window, - or an RGB document to a window with a different profile. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDrawArtSuite and \c #kAIDrawArtSuiteVersion8. - */ -typedef struct { - - /** Draws artwork as specified - @param data A pointer to the structure that specifies an art object - to be drawn, the object it is to be drawn into, and - parameters affecting how it is to be drawn. - @param options An \c #AIColorConvertOptions object that sets - the appropriate black preservation value--that is, whether - a CMYK to RGB/Gray color transformation maps CMYK 0,0,0,1 - to the darkest black: - \li By default, the operation uses the standard conversion, - which never uses black preservation. - \li For export, the operation uses the black-preservation setting - that is currently configured in the print and export preferences. - \li For preview, the operation uses the black-preservation setting - that is currently configured in the screen-display preferences. - */ - AIAPI AIErr (*DrawArt)( AI140DrawArtData *data, const AIColorConvertOptions& options ); - - /** Establishes a temporary drawing surface whose color space matches the - document space. Must be paired with a call to \c #EndDrawArt() at the end - of a sequence of calls \c #DrawArt(). - @param data A pointer to the structure that specifies an art object - to be drawn, the object it is to be drawn into, and - parameters affecting how it is to be drawn. Can be \c NULL. - @param options An \c #AIColorConvertOptions object; see \c #DrawArt(). - @param flags A set of options that modify drawing behavior, a logical - OR of \c #AIDrawArtFlagBitPos values. - @note If you set the \c #kAIDrawArtOPP flag to draw to an OPP port, - the "begin" call temporarily changes the target port in the \c data - structure. The call to \c #EndDrawArt() restores the - original port. In this case, the set of spot colors needed for the - OPP port are determined from the art object specified in \c data, or - from the entire document if no art object is specified. - - */ - AIAPI AIErr (*BeginDrawArt)( AI140DrawArtData * data, const AIColorConvertOptions& options, AIDrawArtFlags flags ); - - /** Copies the contents of the temporary drawing surface to the final destination. - @param data A pointer to the drawing data structure that was passed to - the corresponding call to \c #BeginDrawArt(). - @param options The \c #AIColorConvertOptions object that was passed to - the corresponding call to \c #BeginDrawArt(). - */ - AIAPI AIErr (*EndDrawArt)( AI140DrawArtData *data, const AIColorConvertOptions& options ); - - /** Draws a color swatch. Color swatches are always assumed to be drawn for the - purpose of screen display. - @param data A pointer to the structure that specifies an art object - to be drawn, the object it is to be drawn into, and - parameters affecting how it is to be drawn. - */ - AIAPI AIErr (*DrawColorSwatch)( AIDrawColorData *data ); - - /** Draws the highlighting annotations for an art object. Call only in the response - to an annotator's Draw Annotations message. - @param art The art object. - @param color The highlight color. - @param lineWidth The stroke width. - */ - AIAPI AIErr (*DrawHilite)( AIArtHandle art, AIRGBColor* color, float lineWidth ); - - /** Draws a thumbnail of an art object to the AGM port. Thumbnails are always assumed - to be drawn for the purpose of screen display. No transformations are applied, and - the image is drawn to fit into the destination rectangle. - @param art The art object, of type \c #kRasterArt or \c #kPlacedArt. - @param port A pointer to the AGM port. - @param dstrect The destination rectangle, a bounding box for the thumbnail image. - */ - AIAPI AIErr (*DrawThumbnail) ( AIArtHandle art, void* port, AIRealRect* dstrect ); - -} AI140DrawArtSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140FXGFileFormat.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140FXGFileFormat.h deleted file mode 100644 index 2b6817c..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140FXGFileFormat.h +++ /dev/null @@ -1,407 +0,0 @@ -#ifndef __AI140FXGFileFormat__ -#define __AI140FXGFileFormat__ - -/* -* Name: AIFXGFileFormat.h -* Author: -* Date: -* Purpose: Adobe Illustrator FXG Suite. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2007-2008 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - - -/******************************************************************************* -** -** Imports -** -**/ -#include "AIFXGFileFormat.h" - -#include "AIHeaderBegin.h" - -/** @file AIFXGFileFormat.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAI140FXGFileFormatSuite kAIFXGFileFormatSuite -#define kAIFXGFileFormatSuiteVersion1 AIAPI_VERSION(1) -#define kAI140FXGFileFormatSuiteVersion kAIFXGFileFormatSuiteVersion1 -#define kAIFXGFileFormatVersion1 kAIFXGFileFormatSuiteVersion1 - - -/******************************************************************************* -** -** Types -** -**/ - -/** - Streaming interface to be supplied by the client, to be used when calling - \c #AIFXGFileFormatSuite::ExportFXGToStream() -*/ -struct AI140FXGWriteStreamInterface { - /** - Callback to client to open an asset. - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param assetType [in] Type of asset See \c AIFXGAssetTypeEnum - @param assetName [in/out] Name of asset. Client can change the input name, so that the export plug-in can use the changed name. - @param mimeType [in] Mime type of asset - @param createUnique [in] True if the client should create a new file instead of overwriting existing one. Client should - change the asset name accordingly with the new name. - @return \c #kCanceledErr if client does not want to receive further write and close calls for this particular open-asset call. - */ - AIAPI AIErr (*BeginAsset) (AI140FXGWriteStreamInterface* stream, ai::int16 assetType, ai::UnicodeString& assetName, const ai::UnicodeString& mimeType, AIBoolean createUnique); - - /** - Callback to client to close an opened asset. - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param assetType [in] The asset type to close. - @return \c #kNoErr on success - */ - AIAPI AIErr (*EndAsset) (AI140FXGWriteStreamInterface* stream, ai::int16 assetType); - - /** - Callback to client to set the write position in current stream. - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param pos [in] The 0-based position to set. - @return kNoErr on Success - */ - AIAPI AIErr (*SetPos) (AI140FXGWriteStreamInterface* stream, ai::uint32 pos); - - /** - Callback to client to write bytes to current stream. (Note that this function returns - a constant value, not an error code.) - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param buffer [in] A buffer to write to current stream - @param maxToWrite [in] The maximum number of bytes to write - @return actual bytes written - */ - AIAPI size_t (*WriteBytes) (AI140FXGWriteStreamInterface* stream, const ASUInt8* buffer, const size_t maxToWrite); - - /** - Callback for client to report whether it supports positionable stream interface. - (Note that this function returns a constant value, not an error code.) - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @return True if current stream is positionable, false otherwise. - */ - AIAPI AIBoolean (*IsPositionable) (AI140FXGWriteStreamInterface* stream); - - /** - Callback to report the current position of the current stream. (Note that this function returns - a constant value, not an error code.) - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @return The current position of current stream. - */ - AIAPI ai::uint32 (*GetCurPos) (AI140FXGWriteStreamInterface* stream); - - /** - Callback to determine the appropriate expand setting for an art object. - If client returns \c #kAIFXGExpandArtOptionExpand, it must fill \c expandFlags; see \c #AIExpandSuite::Expand() for flags, - (Note that this function returns a constant value, not an error code.) - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param art [in] The art for which an expand setting is needed. - @param expandFlag [out] The expand flags setting when \c #kAIFXGExpandArtOptionExpand is returned. - @return One of the values of \c #AIFXGExpandArtOptionEnum, \c #kAIFXGExpandArtOptionNone for default processing. - */ - AIAPI ai::int16 (*GetExpandOptionForArt) (AI140FXGWriteStreamInterface* stream, AIArtHandle art, ai::int32* expandFlags); - - /** - Callback to report whether client wants private data generation for an art object. - If not, application private data corresponding to the art is not written. - (Note that this function returns a constant value, not an error code.) - @param stream [in] The stream pointer which the client has passed to AIFXGFileFormatSuite::ExportFXGToStream - @param art [in] The art for which private data should be generated. - @return True if client wants private data generation for this particular art, false otherwise. - */ - AIAPI AIBoolean (*GeneratePrivateDataForArt)(AI140FXGWriteStreamInterface* stream, AIArtHandle art); - - /** - Callback to retrieve the filepath/name of the current stream - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param pulicID [out] The filepath/name of the current stream. This is used in open-asset calls. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*GetPublicID) (AI140FXGWriteStreamInterface* stream, ai::UnicodeString& publicID); - - /** - Callback to retrieve the relative Image folder path, so that the \c BitmapGraphic FXG tag can create the - proper relative path of the image source. For example, if client returns the path "MyFile.assets/images" and the image file name is MyImage.png, - the entry in the \c BitmapGrapic tag is source="\@Embed('MyFile.assets/images/MyImage.png')". - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param relImageFolderPath [out] The relative path to the image folder. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*GetRelativeImageFolderPath) (AI140FXGWriteStreamInterface* stream, ai::UnicodeString& relImageFolderPath); - - /** - Callback to move or copy images in an Artboard-specific folder when a particular artboard is exported. - @param stream [in] The stream pointer that the client has passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() - @param imageName [in] The name of the image to be moved or copied. - @param relImagePath [in] Relative path to image folder where the image should be moved or copied so that the FXG is valid. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*LinkImageIntoAssetFolder)(AI140FXGWriteStreamInterface* stream, const ai::UnicodeString& imageName, const ai::UnicodeString& relImagePath); - - /** Internal */ - AIAPI AIErr (*DeleteAutoGeneratedImage)(AI140FXGWriteStreamInterface* stream,const ai::UnicodeString& imageName); -} -/** -Stream interface to be passed to \c #AIFXGFileFormatSuite::ExportFXGToStream() -*/ -; - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides functions that allow you to export an AI document or art object to FXG. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIFXGFileFormatSuite and \c #kAIFXGFileFormatVersion. -*/ -struct AI140FXGFileFormatSuite{ - /** - Creates an FXG save-options object with default values. This should be freed when no longer needed, - using \c #DisposeFXGSaveParams() - @param fxgSaveParams [out] Save options with default values. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*CreateFXGSaveParams) ( AIFXGFileFormatSaveParams* fxgSaveParams ); - - /** - Destroys the FXG save-options object created with \c #CreateFXGSaveParams() - @param fxgSaveParams [in] The save-options object. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*DisposeFXGSaveParams) ( AIFXGFileFormatSaveParams fxgSaveParams ); - - /** - Retrieves the current FXG version value from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The FXG version, an \c #AIFXGVersion value. - */ - AIAPI ai::int16 (*GetFXGSaveVersion) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the FXG save version value in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgVersion [in] The FXG version, an \c #AIFXGVersion value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveVersion) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgVersion); - - /** - Retrieves the current "Preserve AI Editing capabilities" flag value from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if AI editing capabilities should be preserved using application private data. - */ - AIAPI AIBoolean (*GetFXGSavePreserveAIEditCapability) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Preserve AI Editing capabilities" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param aiEditCap [in] true if editing capabilities should be preserved, false other wise. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSavePreserveAIEditCapability) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiEditCap); - - /** - Retrieves the current preserve policy for Text from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The preserve policy for Text, an \c #AIFXGPreservePolicy value. - */ - AIAPI ai::int16 (*GetFXGSaveTextPolicy) (const AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the preserve policy for Text in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgTextPreservePolicy [in] The preserve policy for Text, an \c #AIFXGPreservePolicy value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveTextPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgTextPreservePolicy); - - /** - Retrieves the current preserve policy for FXG Filters from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The preserve policy for FXG Filters, an \c #AIFXGPreservePolicy value. - */ - AIAPI ai::int16 (*GetFXGSaveFilterPolicy) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the preserve policy for FXG Filters in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgFilterPreservePolicy [in] The preserve policy for FXG Filters, an \c #AIFXGPreservePolicy value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveFilterPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgFilterPreservePolicy); - - /** - Retrieves the current preserve policy for Gradients from an FXG save-options object. - (Note that this function returns - a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return The preserve policy for Gradients, an \c #AIFXGPreservePolicy value. - */ - AIAPI ai::int16 (*GetFXGSaveGradientPolicy) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the preserve policy for Gradients in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgFilterPreservePolicy [in] The preserve policy for Gradients, an \c #AIFXGPreservePolicy value. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveGradientPolicy) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int16 fxgGradientPreservePolicy); - - /** - Retrieves the "Include Symbols" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if All Symbols should be written in FXG, whether they are used or not. - */ - AIAPI AIBoolean (*GetFXGSaveIncludeSymbol) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Include Symbols" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param aiIncludeSymbol [in] True if all symbols should be exported, false if only used symbols should be exported - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveIncludeSymbol) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiIncludeSymbol); - - /** - Retrieves the "Include XMP" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if XMP should be written in FXG, - */ - AIAPI AIBoolean (*GetFXGSaveIncludeXMP) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Include Symbols" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param aiIncludeXMP [in] True if XMP should be exported. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveIncludeXMP) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiIncludeXMP); - - /** - Retrieves the rasterize resolution from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param outCustomResolution [out] A custom resolution value if the returned value is \c #kAIFXGResolutionCustom - @return The rasterize resolution, an \c #AIFXGRasterizeResolution value. - */ - AIAPI ai::int16 (*GetFXGSaveRasterizeResolution) (AIFXGFileFormatSaveParams fxgSaveParams, ai::int32* outCustomResolution); - - /** - Sets the rasterize resolution in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgRasterizeResolution [in] The rasterize resolution, an \c #AIFXGRasterizeResolution value. - @param customResolution [in] A custom resolution if the resolution value is \c #kAIFXGResolutionCustom - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveRasterizeResolution) (AIFXGFileFormatSaveParams fxgSaveParams, - ai::int16 fxgRasterizeResolution, ai::int32 customResolution); - - /** - Retrieves the "Downsample Linked Images" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if linked images should be downsampled to 72 ppi, false otherwise. - */ - AIAPI AIBoolean (*GetFXGSaveDownsampleLinkedImages) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Downsample Linked Images" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param aiDownSampleLinkedImages [in] True if Linked images should be downsampled to 72 ppi, false otherwise. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveDownsampleLinkedImages) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean aiDownSampleLinkedImages); - - /** - Retrieves the "Clip To Active Artboard" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if exported FXG file should be clipped to active artboard, false otherwise. - */ - AIAPI AIBoolean (*GetFXGSaveClipToActiveArtboard) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "Clip To Active Artboard" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param fxgClipToActiveArtboard [in] True if exported FXG file should be clipped to active artboard, false otherwise. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveClipToActiveArtboard) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean fxgClipToActiveArtboard); - - /** - Retrieves the "WriteImages" flag from an FXG save-options object. - (Note that this function returns a constant value, not an error code.) - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @return True if images should also be written while exporting FXG. If false, images are not written, which is useful - when user is interested in only the XML code. - */ - AIAPI AIBoolean (*GetFXGSaveWriteImages) (AIFXGFileFormatSaveParams fxgSaveParams); - - /** - Sets the "WriteImages" flag in an FXG save-options object. - @param fxgSaveParams [in] A save-options object as returned by \c #CreateFXGSaveParams(). - @param writeImages [in] True if images should be written while exporting FXG, false otherwise. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*SetFXGSaveWriteImages) (AIFXGFileFormatSaveParams fxgSaveParams, AIBoolean writeImages); - - /** - Generates FXG to a file. - @param art [in] Art which you want to export as FXG. Pass NULL to generate FXG for entire document. - @param filepath [in] The file path for the master document FXG - @param fxgSaveParams [in] The FXG save options parameters. See \c #AIFXGFileFormatSaveParams - @param fxgExportFlags [in] The export flags. See \c #AIFXGExportFlagEnum - @param artBoardRange [in] If the export flag \c #kAIFXGExportFlagArtboards is passed, the artboard range. - @param customProgressText [in] An optional message to display in the progress bar. If NULL, a default message is displayed. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*ExportFXGToFile) (AIArtHandle art, const ai::FilePath& filePath, AIFXGFileFormatSaveParams fxgSaveParams, ai::int32 fxgExportFlags, const ai::UnicodeString& artBoardRange, const ai::UnicodeString& customProgressText); - - /** - Generates FXG to a stream through callbacks. - @param art [in] The art which you want to export as FXG. Pass NULL to generate FXG for entire document. - @param streamInterface [in] The stream implemenation with callbacks, See \c #AIFXGWriteStreamInterface - @param fxgSaveParams [in] The FXG save options parameters. See \c #AIFXGFileFormatSaveParams - @param fxgExportFlags [in] The export flags. See \c #AIFXGExportFlagEnum - @param artBoardRange [in] If the export flag \c #kAIFXGExportFlagArtboards is passed, the artboard range. - @param customProgressText [in] An optional message to display in the progress bar. If NULL, a default message is displayed. - @return \c #kNoErr on success. - */ - AIAPI AIErr (*ExportFXGToStream) (AIArtHandle art, AI140FXGWriteStreamInterface* streamInterface, AIFXGFileFormatSaveParams fxgSaveParams, ai::int32 fxgExportFlags, const ai::UnicodeString& artBoardRange); - -} ; - - -#include "AIHeaderEnd.h" - - - -#endif //__AI140FXGFileFormat__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Font.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Font.h deleted file mode 100644 index 6033109..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Font.h +++ /dev/null @@ -1,688 +0,0 @@ -/* - * Name: AIFont.h - * $Revision: 1 $ - * Author: Adam Lane - * Date: 7/10/2002 - * Purpose: Adobe Illustrator Font Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AI140Font__ -#define __AI140Font__ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "ATETypesDef.h" -#include "IAIFilePath.hpp" - -#ifdef __cplusplus -using ATE::FontRef; -#endif - -#include "AIHeaderBegin.h" - -/** @file AIFont.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI140FontSuite "AI Font Suite" -#define kAIFontSuiteVersion3 AIAPI_VERSION(3) -#define kAI140FontSuiteVersion kAIFontSuiteVersion3 -#define kAI140FontVersion kAI140FontSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions to access the set of fonts that is - available to Illustrator documents, and provide information about - individual fonts. - - The set of available fonts includes those from the operating - system, those installed with Illustrator, and substitute fonts for - missing fonts in open documents. The set of fonts can change during - a session as fonts are activated or deleted, and as documents are - opened or closed. - - There are several different types of font names: - \li The PostScript name is a unique, ASCII name that can - be stored in files to identify a font. For multiple master - instances, it includes the specific design axis values. - \li The Illustrator PostScript name is the PostScript name with - a suffix identifying the encoding. It can also be stored in - a file to identify a font. - \li A user name is a display name, which can be in ASCII or - a localized encoding. There can be several such names; for - example a full name describing the font, and the font family name. - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIFontSuite and \c #kAIFontVersion. - -*/ -struct AI140FontSuite { - - /** Gets the total number of available fonts. Variations, such as - "Times Roman Regular" and "Times Roman Italic" are counted as - distinct fonts. Use with \c #IndexFontList() to iterate through - available fonts. - @param count [out] A buffer in which to return the number of fonts. - */ - AIAPI AIErr (*CountFonts)( long *count ); - - /** Retrieves a font by index position. Use with \c #CountFonts() to - iterate through available fonts. Font indices can change as - fonts are added and removed. - @param index The 0-based position index. - @param fontKey [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*IndexFontList)( long index, AIFontKey *fontKey ); - - /** Gets the total number of font families. Variants, such as italic - and bold, are counted as a single family. Use with \c #IndexTypefaceList() to - iterate through available font families. - @param count [out] A buffer in which to return the number of font families. - */ - AIAPI AIErr (*CountTypefaces)( long *count ); - - /** Retrieves a font family by index position. Use with \c #CountTypefaces() to - iterate through available font families. Indices can change as - fonts are added and removed. - @param index The 0-based position index. - @param typeFaceKey [out] A buffer in which to return the font family key. - */ - AIAPI AIErr (*IndexTypefaceList)( long index, AITypefaceKey *typeFaceKey ); - - /** Gets the total number of variants (such as bold and italic) of a font family. - Use with \c #IndexTypefaceStyleList() to iterate through variants. - @param typeface The font family, as returned by \c #IndexTypefaceList(). - @param count [out] A buffer in which to return the number of variants. - */ - AIAPI AIErr (*CountTypefaceStyles)( AITypefaceKey typeface, long *count ); - - /** Retrieves a variant of a font family by index position. Use with - \c #CountTypefaceStyles() to iterate through variants. - @param typeface The font family, as returned by \c #IndexTypefaceList(). - @param index The 0-based position index. - @param fontKey [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*IndexTypefaceStyleList)( AITypefaceKey typeface, long index, AIFontKey *fontKey ); - - /** Retrieves the family and variant of a font. - @param theKey The font key. - @param typefaceResult [out] A buffer in which to return the font family key. - @param styleResult [out] A buffer in which to return the index position - of the family variant (such as bold or italic). - */ - AIAPI AIErr (*TypefaceAndStyleFromFontKey)(AIFontKey theKey, AITypefaceKey *typefaceResult, short *styleResult); - - /** Finds a font matching specific criteria. - @param postscriptName The PostScript font name, such as "Times-Roman", - or Illustrator PostScript font name. - @param fontTechnology The font type, such as Adobe or TrueType, an \c #AIFontTechnology value. - @param script The language for which the font was designed; an \c #AIFaceScript value. - @param substituteFlag When true, returns a substitute if an exact match is not found. - @param result [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*FindFont)( char *postscriptName, enum AIFontTechnology fontTechnology, AIFaceScript script, - AIBoolean substituteFlag, AIFontKey *result); - - /** Finds an Illustrator font matching a Mac OS system font. - @param familyID The Mac OS font-family identifier. - @param styleCode The Mac OS variant identifier - @param result [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*FindMacFont)(short familyID, short styleCode, AIFontKey *result); - - /** Not implemented. */ - AIAPI AIErr (*FindWinFont)(AILOGFONTA *logFont, AIFontKey *result); - - /** Retrieves the Mac OS system font for an Illustrator font. If the given font does not - correspond to a system font, gets the default system font. - @param fontKey The font key. - @param familyResult [out] A buffer in which to return the Mac OS font-family identifier. - @param styleResult [out] A buffer in which to return the Mac OS variant identifier - */ - AIAPI AIErr (*GetMacFontFamilyAndStyle)(AIFontKey fontKey, short *familyResult, short *styleResult); - - /** Retrieves typeface name of a font, or the system name for a system font in Windows. - @param fontKey The font key. - @param result [out] A buffer in which to return the typeface name, or, - in Windows only, the face name of the WindowsLogFont if the font is a system font.. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetSystemFontName)(AIFontKey fontKey, char *result, short maxName); - - /** Sets the character widths for a fauxed, single-byte, horizontal font. - @param fontKey The font key. - @param charWidths A pointer to the new array of width values, in points. - This is an array of 256 values where each entry is the advance override - for the corresponding glyph. - */ - AIAPI AIErr (*SetCharWidths)(AIFontKey fontKey, AIReal *charWidths); - - // Accessing various attributes of a font...except the name...that's different - - /** Retrieves the font information for a font. - @param theKey The font key. - @param result [out] A buffer in which to return the font information structure. - */ - AIAPI AIErr (*GetFontInfo)( AIFontKey font, struct AIFontStyle *result); - - /** Retrieves the font metrics for a font. - @param theKey The font key. - @param result [out] A buffer in which to return the font metrics structure. - */ - AIAPI AIErr (*GetFontMetrics)( AIFontKey font, struct AIFontMetrics *result); - - /** Retrieves the default pen displacement for a glyph in a given orientation, - for a 1-point font. - @param font The font key. - @param glyphID The glyph identifier. - @param orientation The text orientation (horizontal or vertical). - @param hResult [out] A buffer in which to return the horizontal displacement, in points, - or \c NULL if the orientation is vertical. - @param vResult [out] A buffer in which to return the vertical displacement, in points, - or \c NULL if the orientation is horizontal. - */ - AIAPI AIErr (*GetGlyphDimensions)( AIFontKey font, AIGlyphID glyphID, enum AIMetricOrientation orientation, - AIReal *hResult, AIReal *vResult); - - /** Retrieves the default pen displacement for a UTF8-encoded character - in a given orientation, for a 1-point font. - @param font The font key. - @param charPtr A pointer to the platform-encoded character. - @param orientation The text orientation (horizontal or vertical). - @param hResult [out] A buffer in which to return the horizontal displacement, in points, - or 0 if the orientation is vertical. - @param vResult [out] A buffer in which to return the vertical displacement, in points, - or 0 if the orientation is horizontal. - */ - AIAPI AIErr (*GetCharDimensions)( AIFontKey font, char *charPtr, enum AIMetricOrientation orientation, - AIReal *hResult, AIReal *vResult); - - /** Retrieves the default font for a language script. - @param script The language script. - @param result [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*GetDefaultFont)( AIFaceScript script, AIFontKey *result); - - // Various ways to get the name of a font - - /** Retrieves the PostScript name of a font, with the encoding - information that Illustrator appends. This name is always encoded in ASCII. - @param font The font key. - @param fontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFullFontName)( AIFontKey font, char *fontName, short maxName ); - - /** Retrieves the Illustrator PostScript name of a font (with encoding information - appended). This uniquely identifies a font, for example, in a file. - This name is always encoded in ASCII. - @param font The font key. - @param postScriptFontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetPostScriptFontName)( AIFontKey fontKey, char* postScriptFontName, short maxName ); - - /** Retrieves the ASCII-encoded name for the variant of a font (for example, "Bold Italic") - @param font The font key. - @param styleName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontStyleName)( AIFontKey font, char *styleName, short maxName ); - - /** Retrieves the display name for the family of a font (for example, "Times Roman"). - The name is encoded either in ASCII or in the encoding of the font, - depending on the preference setting for using English font names. - @param font The font key. - @param familyName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontFamilyUIName)( AIFontKey font, char *familyName, short maxName ); - - /** Retrieves the display name for the variant of a font (for example, "Bold Italic"). - The name is encoded either in ASCII or in the encoding of the font, - depending on the preference setting for using English font names. - @param font The font key. - @param styleName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontStyleUIName)( AIFontKey font, char *styleName, short maxName ); - - /** Retrieves the ASCII-encoded name for a font family (for example, "Times Roman"). - @param typeface The font family key. - @param name [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetTypefaceName)( AITypefaceKey typeface, char *name, short maxName ); - - /** Retrieves the full ASCII-encoded name for a font (for example, "Times Roman Bold Italic"). - The name is always encoded in ASCII. - @param font The font key. - @param userfontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetUserFontName)( AIFontKey font, char *userfontName, short maxName ); - - /** Retrieves the full display name for a font (for example, "Times Roman Bold Italic") - The name is encoded either in ASCII or in the encoding of the font, - depending on the preference setting for using English font names. - @param font The font key. - @param userfontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetUserFontUIName)( AIFontKey font, char *userfontName, short maxName ); - - - /** Converts an Illustrator font key to an Adobe Text Engine (ATE) - font reference, for use with ATE functions. - @param font The font key. - @param result [out] A buffer in which to return the ATE font reference. - @see \c ATETypes.h - */ - AIAPI AIErr (*FontFromFontKey)(AIFontKey font, FontRef *result); - - /** Converts an Adobe Text Engine (ATE) font reference to an Illustrator font key. - @param font The ATE font reference. - @param result [out] A buffer in which to return the font key. - @see \c ATETypes.h - */ - AIAPI AIErr (*FontKeyFromFont)(FontRef font, AIFontKey *result); - - // The following methods deal with accessing alternate glyph information - - /** Retrieves a glyph set, which contains information about alternate - glyphs within an OpenType font. - @param theFont An OpenType font. - @param otFeature When zero, gets information about all glyphs. Otherwise, - specify the feature of interest, as a 4-byte character sequence (in a \c long) - for an OpenType feature tag. - @param result [out] A buffer in which to return the glyph set. You must release - this object using \c #ReleaseGlyphSet() when it is no longer needed. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI AIErr (*GetGlyphSet)(AIFontKey theFont, long otFeature, AIGlyphSet *result); - - /** Disposes of a glyph set object. - @param theSet The object, as returned by \c #GetGlyphSet(). */ - AIAPI AIErr (*ReleaseGlyphSet)(AIGlyphSet theSet); - - /** Gets the number of glyphs within a glyph set. Use with \c #GetGlyphInfo() to iterate - through glyphs. - @param theSet The glyph set object. - @param glyphCountResult [out] A buffer in which to return the number of glyphs. - */ - AIAPI AIErr (*CountGlyphs)(AIGlyphSet theSet, int *glyphCountResult); - - /** Retrieves information about a specific glyph. Use with \c #CountGlyphs() to iterate - through glyphs. - @param theSet The glyph set object. - @param glyphIndex The index position of the glyph, in the range [1..numGlyphs]. - @param glyphInfoResult [out] A buffer in which to return the glyph information. - */ - AIAPI AIErr (*GetGlyphInfo)(AIGlyphSet theSet, int glyphIndex, AIGlyphInfo *glyphInfoResult); - - /** Gets the ordinal position of a given glyph within a glyph set. - @param theSet The glyph set object. - @param glyphID The unique identifier of the glyph. - @param glyphIndex [out] A buffer in which to return the index position - of the glyph, in the range [1..numGlyphs]. - */ - AIAPI AIErr (*GlyphIDToIndex)(AIGlyphSet theSet, AIGlyphID glyphID, int *glyphIndexResult); - - /** Retrieves all OpenType features supported by a particular font. - @param theFont The font key. - @param featureList [in, out] An array of OpenType features of length \c featureCount. - Each value is a 4-byte character sequence (in a \c long) representing - an OpenType feature tag. - Caller must provide the array. Pass NULL to obtain the size of the array required. - @param featureCount [out] A buffer in which to return the size of array required for - \c featureList. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI AIErr (*GetOTFeatures)(AIFontKey theFont, long *featureList, long *featureCount); - - /** Reports whether there are any glyphs for a given Open Type feature in a given font, or retrieves - the glyph set containing the glyphs, if any. - (Note that this function returns a numeric value, not an error code.) - @param theFeature The feature, a 4-byte character sequence (in a \c long) representing - an OpenType feature tag. - @param fontKey The font key. - @param existFlag When true, the function reports on whether the font contains any glyphs - for the feature. A font can define an OpenType feature, but assign no - glyphs to that feature. Use this assure that at least one glyph is present. -
When false, the function retrieves the glyph set - containing the glyphs (if any). This is the same as using \c #GetGlyphSet(). - @param result [out] A buffer in which to return the glyph set. You must release - this object using \c #ReleaseGlyphSet() when it is no longer needed. - @return Non-zero (true) if the font contains at least one glyph for the given feature, - zero (false) otherwise. - @see For the set of registered features tags, - \c http://partners.adobe.com/public/developer/opentype/index_tag3.html - */ - AIAPI long (*GetGlyphsForFeatureAccessInfo)(long theFeature, AIFontKey fontKey, AIBoolean existFlag, - AIGlyphSet *glyphSet); - - /** Retrieves the font that contains a glyph set. - @param glyphSetOpaque The glyph set. - @param result [out] A buffer in which to return the font object. - */ - AIAPI AIErr (*GetFontInstance)(AIGlyphSet glyphSetOpaque, AIFontInst **result); - - /** Retrieves the unique identifier of a glyph. - @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param result [out] A buffer in which to return the glyph identifier. - */ - AIAPI AIErr (*GetGlyphID)(AIGlyphInfo glyphInfo, AIGlyphID *result); - - /** Retrieves the set of alternate glyphs for a given glyph. - @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param result [out] A buffer in which to return the alternative glyph set. - */ - AIAPI AIErr (*GetAlternateGlyphs)(AIGlyphInfo glyphInfo, AIGlyphSet *result); - - /** Retrieves the OpenType features associated with a given glyph. - @param glyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param otFeatures [out] A buffer in which to return the features. Do not modify the returned - character array (which is not a null-terminated string). The array contains - a set of 4-character feature codes; for example "vertswsh" for a glyph - to which 'vert' and 'swsh' features can be applied. - @param otFeatureCount [out] A buffer in which to return the number of features in \c otFeatures. - @param otFeatureIndex [out] A buffer in which to return an array of length - \c otFeatureCount containing the number of alternates available for each - feature listed in the \c otFeatures array. - */ - AIAPI AIErr (*GetGlyphOTFeatures)(AIGlyphInfo glyphInfo, char **otFeatures, long *otFeatureCount, - long **otFeatureIndex); - - /** Retrieves the Unicode character for a given glyph in a given font, with information about - what OpenType features were applied. - @param mGlyphID The glyph identifier. - @param fontKey The font key. - @param desiredOTFeature A string containing the OpenType features of interest. See - \c #GetGlyphOTFeatures(). The mapping of glyphs and feature sets to characters - is not 1:1, so the returned character can have a different set of features than those - requested. - @param theChar [out] A buffer in which to return the Unicode character. - @param resultLength [out] A buffer in which to return the number of features in \c theChar. - @param otFeatures [out] A buffer in which to return the OpenType features set that was - applied to \c theChar. See \c #GetGlyphOTFeatures(). You must release this memory with - \c #SPBasicSuite::FreeBlock() when it is no longer needed. - @param otFeatureCount [out] A buffer in which to return the number of features in \c otFeatures. - @param otFeatureIndex [out] A buffer in which to return an array of length - \c otFeatureCount containing the number of alternates available for each - feature listed in the \c otFeatures array. - You must release this memory with \c #SPBasicSuite::FreeBlock() when it is no longer needed. - */ - AIAPI AIErr (*GetGlyphUnicodeValue)(AIGlyphID mGlyphID, AIFontKey fontKey, char *desiredOTFeature, - ASUnicode *theChar, int *resultLength, char **otFeatures, long *otFeatureCount, long **otFeatureIndex); - - /** Retrieves the font for a glyph. - @param theGlyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param result [out] A buffer in which to return the font key. - */ - AIAPI AIErr (*GetGlyphFontKey)(AIGlyphInfo theGlyphInfo, AIFontKey *result); - - /** Retrieves the number of alternate glyphs for a given glyph. - @param theGlyphInfo The glyph information, as returned by \c #GetGlyphInfo(). - @param result [out] A buffer in which to return the number of alternative glyphs. - */ - AIAPI AIErr (*GetGlyphAlternateCount)(AIGlyphInfo theGlyphInfo, int *result); - - /** Retrieves the \e undefined glyph for a glyph set. Each font has one undefined glyph, but not every - glyph set contains one. Use \c #HasUndefinedGlyph() to check. - @param theSet The glyph set. - @param undefinedGlyphIDResult [out] A buffer in which to return the glyph identifier. - */ - AIAPI AIErr (*GetUndefinedGlyphID)(AIGlyphSet theSet, AIGlyphID *undefinedGlyphIDResult); - - /** Reports whether a glyph set contains an undefined glyph. Each font has one undefined glyph, - but not every glyph set contains one. Use \c #GetUndefinedGlyphID to retrieve it if there is one. - (Note that this function returns a boolean value, not an error code.) - @param theSet The glyph set. - @return True if the set contains an undefined glyph. - */ - AIAPI AIBoolean (*HasUndefinedGlyph)(AIGlyphSet theSet); - - /** Imports composite fonts from an AI or ATC file into the current document. - @param source The AI or ATC file path. - */ - AIAPI AIErr (*ImportCompositeFonts)(const ai::FilePath &source); - - /** Translates a character value to a single glyph in a given font. - @param fontKey The font key. - @param ch A string containing the character. Extracts at most - one glyph, using as many bytes as needed to form one glyph, - starting with the first byte pointed to by \c ch. - Derives the encoding from the font. - @param srcLen The number of bytes in \c ch. - @param orientation The text orientation, vertical or horizontal. - @param glyphID [out] A buffer in which to return the glyph identifier, or - undefined glyph for the font if a glyph is not defined for this character. - @return The error \c #kGlyphNotDefinedErr if a glyph is not defined for - this character. - */ - AIAPI AIErr (*ConvertCharacterToGlyphID) ( AIFontKey fontKey, const char* ch, long srcLen, - enum AIMetricOrientation orientation, AIGlyphID* glyphID ); - - /** Translates a Unicode character value to a single glyph in a given font. - @param fontKey The font key. - @param ch A UTF16-encoded string containing the character. Extracts at most - one glyph, using as many characters as needed to form one glyph, - starting with the first character pointed to by \c ch. - @param srcLen The number of \c ASUnicode characters (not bytes) in \c ch. - @param orientation The text orientation, vertical or horizontal. - @param glyphID [out] A buffer in which to return the glyph identifier, or - undefined glyph for the font if a glyph is not defined for this character. - @return The error \c #kGlyphNotDefinedErr if a glyph is not defined for - this character. - */ - AIAPI AIErr (*ConvertUnicodeToGlyphID) ( AIFontKey fontKey, const ASUnicode* ch, long srcLen, - enum AIMetricOrientation orientation, AIGlyphID* glyphID ); - - /** Retrieves the full display name for a font (for example, "Times Roman Bold Italic") - in Unicode (UTF16). - The name is either in English or the native language of the font depending on the - setting of the preference to use English font names. - @param fontKey The font key. - @param userfontName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetUserFontUINameUnicode)( AIFontKey fontKey, ASUnicode* userfontName, long maxName ); - - /** Retrieves the display name for the family of a font (for example, "Times Roman") - in Unicode (UTF16). - The name is either in English or the native language of the font depending on the - setting of the preference to use English font names. - @param fontKey The font key. - @param familyName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontFamilyUINameUnicode)( AIFontKey fontKey, ASUnicode* familyName, long maxName ); - - /** Retrieves the display name for the variant of a font (for example, "Bold Italic") - in Unicode (UTF16). - The name is either in English or the native language of the font depending on the - setting of the preference to use English font names. - @param fontKey The font key. - @param styleName [out] A buffer in which to return the name. - @param maxName The number of characters in the name string buffer. The name string, - including the \c NULL terminator, is truncated to this size if necessary. - */ - AIAPI AIErr (*GetFontStyleUINameUnicode)( AIFontKey fontKey, ASUnicode* styleName, long maxName ); - - // New for Illustrator 12.0 - - /** Retrieves the ideographic character face (IFC) bounds of a font. - The ICF-box is the maximum bounding box of the ideographic portion of a CJK font, - usually centered within the em-box. The value is also defined also for non-CJK fonts. - The coordinate values are relative to the font coordinate system's origin. - X values increase to the right and Y values increase downward. - @param fontKey The font key. - @param icfBox [out] A buffer in which to return the bounding box - @see Baseline tags \c icfb and \c icft in the OpenType tag registry. - */ - AIAPI AIErr (*GetICFBox) ( AIFontKey fontKey, AIRealRect& icfBox ); - - // New for Illustrator 13.0 - - /** Retrieves the version string for a font file. If the font object is fauxed, - gets version information for the underlying font. - You can check whether the font is fauxed using \c #GetFontInfo(). - @param fontKey The font key. - @param versionString [out] A buffer in which to return the version string. - */ - AIAPI AIErr (*GetVersionString) ( AIFontKey fontKey, ai::UnicodeString& versionString ); - - /** Reports how many files constitute a font. For example, a Windows Type 1 font has a PFB - and a PFM file, and a Mac Type 1 font has a suitcase and an outline file, but an OpenType - font has only a single file. Use with \c #GetNthFilePath() to access the files. - - If the font is fauxed, returns the information for the underlying font used to faux - the missing font. Check whether the font is fauxed using \c #GetFontInfo(). - @param fontKey The font key. - @param count [out] A buffer in which to return the number of files. - This can be 0 for some fonts; see \c #GetNthFilePath(). - @note This function does not distinguish between two identical font files - and two different files for the same font. - */ - AIAPI AIErr (*GetFontFilePathCount) ( AIFontKey fontKey, ASUInt32& count ); - - /** Retrieves a file path associated with a font. Use with \c #GetFontFilePathCount() - to access font files. - - This method does not work for fonts whose paths Illustrator does not know, - such as Windows bitmap fonts, and Mac OS bitmap-only fonts. For an ATC font, - gets the location of the top-level rearrangement file only. - To get the paths of component fonts, iterate over the component dictionaries. - - If the font is fauxed, returns the information for the underlying font used to faux - the missing font. Check whether the font is fauxed using \c #GetFontInfo(). - - @param fontKey The font key. - @param n The position index of the file path, the range [0..pathCount-1]. - @param filePath [out] A buffer in which to return the path. - */ - AIAPI AIErr (*GetNthFilePath) ( AIFontKey fontKey, ASUInt32 n, ai::FilePath& filePath ); - - /** Gets the number of ATC components for a font. If the font is fauxed, - returns the information for the underlying font used to faux - the missing font. Check whether the font is fauxed, and that it - is an ATC font, using \c #GetFontInfo(). - @param fontKey The font key. - @param count [out] A buffer in which to return the number of ATC components. - This is 0 for a non-ATC font. - */ - AIAPI AIErr (*GetNumATCComponents) ( AIFontKey fontKey, ASUInt32& count ); - - /** Retrieves a component for an ATC font, by position index. Use with - \c #GetNumATCComponents() to access font components. - - If the font is fauxed, returns the information for the underlying font used to faux - the missing font. Check whether the font is fauxed, and that it - is an ATC font, using \c #GetFontInfo(). - - @param fontKey The font key. - @param n The position index of the component, the range [0..numATCComponents-1]. - @param componentFontKey [out] A buffer in which to return the component font key. - */ - AIAPI AIErr (*GetNthATCComponent) ( AIFontKey fontKey, ASUInt32 n, AIFontKey& componentFontKey ); - - /** Retrieves the full user name for a font (for example, "Times Roman Bold Italic"). - This might not be the same as the display name; retrieve the display name with - \c #GetUserFontUINameUnicode(). - @param fontKey The font key. - @param name [out] A buffer in which to return the name string. - @param native True to get the name in the native language of the font, false - to get the name in English, regardless of the font's language. - */ - AIAPI AIErr (*GetUserFontNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, - AIBoolean native); - - /** Retrieves the user name for the family of a font (for example, "Times Roman"). - This might not be the same as the display name; retrieve the display name with - \c #GetFontFamilyUINameUnicode(). - @param fontKey The font key. - @param name [out] A buffer in which to return the name string. - @param native True to get the name in the native language of the font, false - to get the name in English, regardless of the font's language. - */ - AIAPI AIErr (*GetFontFamilyNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, - AIBoolean native); - - /** Retrieves the user name for the style of a font (for example, "Bold Italic"). - This might not be the same as the display name; retrieve the display name with - \c #GetFontStyleUINameUnicode(). - @param fontKey The font key. - @param name [out] A buffer in which to return the name string. - @param native True to get the name in the native language of the font, false - to get the name in English, regardless of the font's language. - */ - AIAPI AIErr (*GetFontStyleNameUnicode) (AIFontKey fontKey, ai::UnicodeString& name, - AIBoolean native); - - /** Retrieves the ideographic em-box of a font, also known as an ideographic font's design space. - This defines a standard monospaced escapement around the glyphs of the font, for both horizontal and - vertical writing modes. It is one em high and one em wide unless the vendor explicitly indicates - otherwise in the font. The OpenType specification strongly recommends against this being other than an - em wide, but there are legitimate reasons for it to be other than one em high: some fonts used in - Japanese newspaper layout, for example, have a vertically compressed ideographic em-box. - - The returned value, an array with the left, top, right, and bottom edges - (in horizontal writing mode) of the ideographic em-box of a 1-unit-em font, - is defined for every font (including non-CJK fonts, where it can be used to em-box-align - these fonts alongside CJK fonts). - - The coordinate values are relative to the font coordinate system's origin. - X values increase to the right and Y values increase downward. - @param fontKey The font key. - @param ideoEmBox [out] A buffer in which to return the bounding box, - @see Baseline tag \c ideo in the OpenType tag registry for more information. - */ - AIAPI AIErr (*GetIdeoEmBox) ( AIFontKey fontKey, AIRealRect& ideoEmBox ); - -}; - -#include "AIHeaderEnd.h" - -#endif // __AI140Font__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140HardSoft.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140HardSoft.h deleted file mode 100644 index e07f55c..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140HardSoft.h +++ /dev/null @@ -1,155 +0,0 @@ -#ifndef __AI140HardSoft__ -#define __AI140HardSoft__ - -/* - * Name: AIHardSoft.h - * $Revision: 3 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Hard/Soft Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AIHardSoft.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIHardSoftSuite "AI Hard Soft Suite" -#define kAIHardSoftSuiteVersion2 AIAPI_VERSION(2) - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions for converting between different coordinate - systems used at different levels of Illustrator. - - The geometry of an object is described by coordinates that are relative to - a pair of imaginary axes imposed on the artboard. Illustrator uses two ways of - placing these axes, one for storing coordinate information internally and - another for passing coordinate information across the SDK functions. - - \li In the internal coordinate system, the origin is the top left corner of the - artboard--that is, of the white area that can be seen when zoomed out as far as - possible. The X axis is horizontal, with the values increasing to the right. - The Y axis is vertical, with values increasing downward. Values in this - system are called \e hard, or \e artboard coordinates. - - \li In the public coordinate system, the origin is the \e ruler origin--that is, - the point that corresponds to the 0 marks on the ruler when it is visible. - By default, it is the bottom left corner of the page, but it can be changed by the - user. The X axis is horizontal, with the values increasing to the right. - The Y axis is vertical, with values increasing upward. Values in this system - are called \e soft, or \e page coordinates. - - Most functions in the SDK use the public system of page coordinates, but - some use the internal artboard coordinates. This suite provides functions - for mapping between the coordinate systems. For example, if you pass - the origin point, [0,0], to \c #AIRealPointHarden(), the function returns the - vector from the artboard origin (the top left of the canvas) to the page origin - (the bottom left of the visible page). - - @note These matrix conversion functions do not convert all - components of translation matrices. To do this, you must understand - the details of the two coordinate systems involved and use linear algebra. - You must analyzed each case. For example, the matrix stored - in an \c #AIPatternStyle maps coordinates from pattern space to internal - artboard space, whereas the matrix for an image maps from image space to - public page space. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIHardSoftSuite and \c #kAIHardSoftVersion. -*/ -typedef struct { // AI 8.0 - - /** Converts a point in public page coordinates to a point in internal - artboard coordinates. - @param srcpoint A pointer to the point in public page coordinates. - @param dstpoint [out] A buffer in which to return the point in internal - artboard coordinates. - */ - AIAPI AIErr (*AIRealPointHarden) ( AIRealPoint* srcpoint, AIRealPoint* dstpoint ); - - /** Converts a point in internal artboard coordinates to a point in public - page coordinates. - @param srcpoint A pointer to the point in internal artboard coordinates. - @param dstpoint [out] A buffer in which to return the point in public - page coordinates. - */ - AIAPI AIErr (*AIRealPointSoften) ( AIRealPoint* srcpoint, AIRealPoint* dstpoint ); - - /** Applies \c #AIRealPointHarden() to the translation - component of a matrix. This can be used to re-harden a returned - matrix that has been incorrectly softened. - @param matrix [in, out] The translation matrix, which is modified in place. - */ - AIAPI AIErr (*AIRealMatrixHarden) ( AIRealMatrix* matrix ); - - /** Applies \c #AIRealPointSoften() to the translation - component of a matrix. This can be used to pre-soften a matrix being passed - into a function that will apply incorrect hardening. - @param matrix [in, out] The translation matrix, which is - modified in place. - */ - AIAPI AIErr (*AIRealMatrixSoften) ( AIRealMatrix* matrix ); - - /** Applies \c #AIRealPointHarden() to the translation component - of a matrix, then negates the \c b and \c c components. - @param matrix [in, out] The translation matrix, which is - modified in place. - */ - AIAPI AIErr (*AIRealMatrixRealHard) ( AIRealMatrix* matrix ); - - /** Applies \c #AIRealPointSoften() to the translation component - of a matrix, then negates the \c b and \c c components. - @param matrix [in, out] The translation matrix, which is - modified in place. - */ - AIAPI AIErr (*AIRealMatrixRealSoft) ( AIRealMatrix* matrix ); - -} AI140HardSoftSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ImageOptimization.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ImageOptimization.h deleted file mode 100644 index 41aba24..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140ImageOptimization.h +++ /dev/null @@ -1,230 +0,0 @@ -#ifndef __AI140ImageOptimization__ -#define __AI140ImageOptimization__ - -/* - * Name: AI140ImageOptimization.h - * Purpose: Adobe Illustrator Image Optimization Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************** - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIDataFilter__ -#include "AIDataFilter.h" -#endif - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#include "AIRasterize.h" - -#include "AIHeaderBegin.h" - -/** @file AIImageOptimization.h */ - -/******************************************************************************** - ** - ** Constants - ** - **/ - -#define kAIImageOptSuiteVersion4 AIAPI_VERSION(4) -#define kAI140ImageOptSuiteVersion kAIImageOptSuiteVersion4 -#define kAI140ImageOptVersion kAI140ImageOptSuiteVersion - - -/******************************************************************************** -** -** Types -** -**/ - -struct AI140ImageOptPNGParams { - /** Version 1 parameters */ - AIImageOptPNGParams versionOneSuiteParams; - /** When true, antialias text when rasterizing. */ - AIBool8 antialias; - /** A cropping box for the art. If empty or degenerate, do not crop. */ - AIRealRect cropBox; - /** When true, rasterize against a transparent background, - applying no matte color. */ - AIBool8 backgroundIsTransparent; - /** When background is not transparent, rasterize against this - matte color. */ - AIRGBColor matteColor; - -#ifdef __cplusplus - /** Constructor for PNG parameters (version 2). */ - AI140ImageOptPNGParams() - : - versionOneSuiteParams(), - antialias(false), // no text antialiasing - cropBox(), - backgroundIsTransparent(true), // no matte color applied - matteColor() - { - cropBox.top = 0.0; cropBox.left = 0.0; cropBox.bottom = 0.0; cropBox.right = 0.0; - matteColor.red = 0; matteColor.green = 0; matteColor.blue = 0; - }; -#endif -}; - -/******************************************************************************** - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These functions allow you to rasterize an art object and - stream the resulting raster to a data filter in various image formats. - @see \c #AIDataFilterSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIImageOptSuite and \c #kAIImageOptVersion. - */ -typedef struct { - - // AIImageOptSuiteVersion1 functions - /** Rasterize art to GIF format. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - */ - AIAPI AIErr (*AsGIF)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptGIFParams& params); - - /** Rasterize art to JPEG format. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - */ - AIAPI AIErr (*AsJPEG)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptJPEGParams& params); - - /** Rasterize art to PNG24 format. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - */ - AIAPI AIErr (*AsPNG)( // as PNG24 - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptPNGParams& params); - - /** Rasterize art to ZLIB format. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - */ - AIAPI AIErr (*AsZLIB)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AIImageOptZLIBParams& params); - - // AIImageOptSuiteVersion2 functions - - /** Rasterize art to PNG24 format. This differs from \c #AsPNG() in that it - takes additional parameters and allows you to show a progress bar - for a lengthy operation. - @param aiArt The art object or art tree root. - @param aiDataFilter The data filter to which to send the resulting raster data. - @param params How to perform the rasterization. - @param progressProc The procedure to call periodically during a lengthy operation, - to provide the current progress status and allow the user to cancel. - */ - AIAPI AIErr (*MakePNG24)( - AIArtHandle aiArt, - AIDataFilter* aiDataFilter, - AI140ImageOptPNGParams& params, - AIRasterizeProgressProc progressProc); - - - // AIImageOptSuiteVersion3 functions - - /** Creates a color palette for art. - @param raster The art object. - @param options The type of palette to create, automatic or custom. - @param palette [out] A buffer in which to return the palette object. - */ - AIAPI AIErr (*CreatePalette) (AIArtHandle raster, const AIPaletteOptions *options, AIColorPaletteHandle *palette); - - /** Frees the memory associated with a palette object when it is no longer - needed. - @param palette The palette object. Upon return, this reference is - no longer valid. - */ - AIAPI AIErr (*DisposePalette) (AIColorPaletteHandle palette); - - /** Retrieves a color from a color palette. - @param palette The palette object. - @param index The position index of the color. - @param color [out] A buffer in which to return the color object. - */ - AIAPI AIErr (*GetPaletteColor) (AIColorPaletteHandle palette, ai::int32 index, AIPaletteColor *color); - - /** Sets a color in a color palette. - @param palette The palette object. - @param index The position index of the color. - @param color The color object. - */ - AIAPI AIErr (*SetPaletteColor) (AIColorPaletteHandle palette, ai::int32 index, AIPaletteColor *color); - - /** Creates an inverse color palette. - @param palette The palette object. - @param inverse [out] A buffer in which to return the inverse palette object. - */ - AIAPI AIErr (*CreateInversePalette) (AIColorPaletteHandle palette, AIInverseColorPaletteHandle *inverse); - - /** Frees the memory associated with an inverse palette object when it is - no longer needed. - @param inverse The inverse palette object. Upon return, this reference is - no longer valid. - */ - AIAPI AIErr (*DisposeInversePalette) (AIInverseColorPaletteHandle inverse); - - /** Retrieves the closest match to a color from an inverse color palette. - @param palette The inverse palette object. - @param color A pointer to the color object to match. - @param index [out] A buffer in which to return the 0-based position - index of the closest matching color. - */ - AIAPI AIErr (*GetPaletteIndex) (AIInverseColorPaletteHandle inverse, const AIPaletteColor *color, ai::int32 *index); - - /** Creates a color palette by posterizing the colors in a list. - @param colorList The list of colors to be posterized, an array of color objects. - @param colorListCount The number of color objects in the list. - @param reduceColorCount The maximum number of colors the resulting palette should contain. - @param palette [out] A buffer in which to return the palette object. - */ - AIAPI AIErr (*CreateReducedPalette) ( AIPaletteColor *colorList, int colorListCount, int reduceColorCount, AIColorPaletteHandle *palette ); -} -AI140ImageOptSuite; - - -#include "AIHeaderEnd.h" - -#endif // __AIImageOptimization__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Path.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Path.h deleted file mode 100644 index 067cc92..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Path.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef __AI140Path__ -#define __AI140Path__ - -/* - * Name: AI140Path.h - * Date: - * Purpose: backwards compatibility support for Path Object Suite from Adobe Illustrator 14.0 - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2009 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - /******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPath.h" - -#include "AIHeaderBegin.h" - -/** @file AI140Path.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI140PathSuite kAIPathSuite -#define kAIPathSuiteVersion8 AIAPI_VERSION(8) -#define kAI140PathSuiteVersion kAIPathSuiteVersion8 -#define kAI140PathVersion kAI140PathSuiteVersion - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions that allow you to examine and manipulate - \e paths, which are art objects of type \c #kPathArt. - - The shape of a path is defined by one or more path \e segments. - Every segment of a path corresponds to an \e anchor \e point, which is - the handle shown when the path is selected. The number of anchor points - on a path, or \e segment \e count, includes the two at each end. - A segment is defined by the \c #AIPathSegment structure. Segment - index numbers begin at zero. A path can have a single anchor point. - - The \e in and \e out points of a segment define the tangent of the curve - at a point \e p. The in point is not used for the initial and final segments - of an open path. A segment can be a \e corner point or a \e smooth point. - For a corner, the in and out points can be anywhere. To make a straight line, - place the in and out points of each end on their p points. - - A path can be can be \e closed or \e open. - If a path is open, it is defined only by its segments. If it is closed, - Illustrator draws a segment between the first and last anchor points, - which uses the out tangent of the last segment and the in tangent of the first. - - Some paths are also used as \e guides. In all other respects they are paths, - with the same contents and attributes. Paint attributes are associated with - a path through a \e path \e style. See the \c #AIPathStyleSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPathSuite and \c #kAIPathVersion. -*/ -typedef struct { - - AIAPI AIErr (*GetPathSegmentCount) ( AIArtHandle path, short *count ); - - AIAPI AIErr (*SetPathSegmentCount) ( AIArtHandle path, short count ); - - AIAPI AIErr (*GetPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment ); - - AIAPI AIErr (*SetPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment ); - - AIAPI AIErr (*InsertPathSegments) ( AIArtHandle path, short segNumber, short count, AIPathSegment *segment ); - - AIAPI AIErr (*DeletePathSegments) ( AIArtHandle path, short segNumber, short count ); - - AIAPI AIErr (*GetPathClosed) ( AIArtHandle path, AIBoolean *closed ); - - AIAPI AIErr (*SetPathClosed) ( AIArtHandle path, AIBoolean closed ); - - AIAPI AIErr (*GetPathGuide) ( AIArtHandle path, AIBoolean *isGuide ); - - AIAPI AIErr (*SetPathGuide) ( AIArtHandle path, AIBoolean isGuide ); - - AIAPI AIErr (*GetPathSegmentSelected)( AIArtHandle path, short segNumber, short *selected ); - - AIAPI AIErr (*SetPathSegmentSelected)( AIArtHandle path, short segNumber, short selected ); - - AIAPI AIErr (*ReversePathSegments) ( AIArtHandle path ); - - AIAPI AIErr (*GetPathArea) ( AIArtHandle path, AIReal *area ); - - // New for AI8.0: - - AIAPI AIErr (*GetPathLength) ( AIArtHandle path, AIReal *length, AIReal flatness ); - - AIAPI AIErr (*GetPathBezier) ( AIArtHandle path, short segNumber, AIRealBezier *bezier ); - - AIAPI AIErr (*PathHasLength) ( AIArtHandle path, AIBoolean *hasLength ); - - AIAPI AIErr (*GetPathIsClip) ( AIArtHandle path, AIBoolean *isClip ); - - // New for AI 11 - - AIAPI AIErr (*GetPathAllSegmentsSelected) ( AIArtHandle path, AIBoolean *selected ); - - // New for AI 13 - - AIAPI AIErr (*GetKeySegment) (AIArtHandle* path, short* segmentNumber); - - AIAPI AIErr (*CancelKeySegment) (void); - - AIAPI AIBoolean (*IsPath9SliceSplitter)(AIArtHandle path); - - // New for AI14 - - AIAPI AIErr (*SetKeySegment)(AIArtHandle path, short segmentNumber); - -} AI140PathSuite; - -#include "AIHeaderEnd.h" - -#endif //__AI140Path__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140SFWUtilities.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140SFWUtilities.h deleted file mode 100644 index 4ee3316..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140SFWUtilities.h +++ /dev/null @@ -1,84 +0,0 @@ -#ifndef __AI140SFWUTILITIES__ -#define __AI140SFWUTILITIES__ - -/* - * Name: AI140SFWUtilities.h - * Purpose: Adobe Illustrator 14.0 Save For Web Utilities Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AISFWUtilities.h" - -#include "AIHeaderBegin.h" - -/** @file AI140SFWUtilities.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAISFWUtilitiesSuiteVersion1 AIAPI_VERSION(1) - -/* AI14 version */ -//#define kAI140SFWUtilitiesSuiteVersion kAISFWUtilitiesSuiteVersion1 -//#define kAI140SFWUtilitiesVersion kAI140SFWUtilitiesSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides access to save-for-Web features. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAISFWUtilitiesSuite and \c #kAISFWUtilitiesSuiteVersion. - */ -typedef struct { - - /** Retrieves the location of the file in which application Save-For-Web - settings are saved. - @param outFileSpec [out] A buffer in which to return the file - specification. - */ - AIAPI AIErr (*GetSaveSettingsDirectory) (SPPlatformFileSpecification* outFileSpec); - - /** Displays the Slice Options dialog, which allows the user - to set the options for an image slice. This is the dialog shown - when you create a slice in the document (draw an object, choose Object>Slice>Make), - select it, and choose Object>Slice>Slice Options. Modifiable options - in this dialog include slice type, name, URL, target, message, alternate - text, and background color. - @param inSliceID The unique slice identifier. - */ - AIAPI AIErr (*ShowSliceOptions) (ASInt32 inSliceID); - -} AI140SFWUtilitiesSuite; - - -#include "AIHeaderEnd.h" - - -#endif - diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Symbol.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Symbol.h deleted file mode 100644 index f4f3433..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140Symbol.h +++ /dev/null @@ -1,692 +0,0 @@ -#ifndef __AI140Symbol__ -#define __AI140Symbol__ - -/* - * Name: AI140Symbol.h - * Author: - * Date: - * Purpose: Adobe Illustrator Symbol Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1990-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AISymbol.h" - -#include "AIHeaderBegin.h" - -/** @file AI140Symbol.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI140SymbolSuite kAISymbolSuite -#define kAI140SymbolSuiteVersion4 AIAPI_VERSION(4) -#define kAI140SymbolSuiteVersion kAI140SymbolSuiteVersion4 -#define kAI140SymbolVersion kAI140SymbolSuiteVersion - - -/******************************************************************************* - ** - ** AI140SymbolSuite Suite - ** - **/ - -typedef struct { - - /** Counts the number of symbol definitions in the global list for the current document. - Use with \c #GetNthSymbolPattern() to iterate through listed or through listed and - unlisted symbols. - @param count [out] A buffer in which to return the number of symbols. - @param includeUnlisted When true, include unlisted symbols in the count. - When false, count only listed symbols. See @ref ListedUnlistedSymbols. - */ - AIAPI AIErr (*CountSymbolPatterns) ( ai::int32 *count, ASBoolean includeUnlisted ); - - /** Retrieves a symbol pattern from the global list for the current document.Use - with \c #CountSymbolPatterns() to iterate through listed or through listed and - unlisted symbols. - @param n The 0-based position index. - @param symbolPattern [out] A buffer in which to return the symbol reference. - @param includeUnlisted When true, get both listed and unlisted symbols. - When false, get only listed symbols. See @ref ListedUnlistedSymbols. - */ - AIAPI AIErr (*GetNthSymbolPattern) ( ai::int32 n, AIPatternHandle *symbolPattern, ASBoolean includeUnlisted ); - - /** Retrieves a symbol pattern by name from the current document. - @param name The name string. - @param symbolPattern [out] A buffer in which to return the symbol reference, - or a \c NULL object if no such symbol is found. - */ - AIAPI AIErr (*GetSymbolPatternByName) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern ); - - /** Retrieves a symbol pattern by name from a specified document. - @param name The name string. - @param symbolPattern [out] A buffer in which to return the symbol reference, - or a \c NULL object if no such symbol is found. - @param document The document. Use the \c #AIDocumentListSuite - or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. - */ - AIAPI AIErr (*GetSymbolByNameFromDocument) ( const ai::UnicodeString& name, AIPatternHandle *symbolPattern, - AIDocumentHandle document ); - - /** Counts the number of symbol definitions in the global list of a specified document. - Use with \c #GetNthSymbolPatternFromDocument() to iterate through listed (public) symbols. - @param count [out] A buffer in which to return the number of symbols. - @param document The document. Use the \c #AIDocumentListSuite - or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. - */ - AIAPI AIErr (*CountSymbolPatternsFromDocument) ( ai::int32* count, AIDocumentHandle document ); - - /** Retrieves a symbol pattern from the global list for a specified document. - Use with \c #CountSymbolPatternsFromDocument() to iterate through listed (public) symbols. - @param n The 0-based position index. - @param symbolPattern [out] A buffer in which to return the symbol reference. - @param document The document. Use the \c #AIDocumentListSuite - or \c #AIPathStyleSuite::ImportStyles() to obtain a document handle. - */ - AIAPI AIErr (*GetNthSymbolPatternFromDocument) ( ai::int32 n, AIPatternHandle *symbolPattern, - AIDocumentHandle document ); - - /** Creates a new symbol definition from specified source art, which is copied as - the defining art for the new symbol. - @param newSymbolPattern [out] A buffer in which to return the new symbol reference. - @param definitionArt The source art, or \c NULL to create a symbol whose definition - is an empty group. - @param unlisted When true, make the new symbol unlisted. Use \c #SetSymbolPatternName() - to name unlisted symbols. See @ref ListedUnlistedSymbols. - */ - AIAPI AIErr (*NewSymbolPattern) ( AIPatternHandle *newSymbolPattern, AIArtHandle definitionArt, ASBoolean unlisted ); - - /** Creates a new listed symbol definition from selected art, which is copied as the - defining art for the new symbol. If no art is selected, creates a symbol - whose definition is an empty group. - @param symbolPattern [out] A buffer in which to return the new symbol reference. - */ - AIAPI AIErr (*NewSymbolPatternFromSel) ( AIPatternHandle *symbolPattern ); - - /** Creates a new listed symbol definition from selected art, which is copied as the - defining art for the new symbol, and reports the bounds of the selected art. - (You cannot call \c #AIArtSuite::GetArtBounds() for the symbol pattern art after - defining it, because the definition art is copied and moved.) Use to insert an - instance of the new symbol in place of the selection. - @param symbolPattern [out] A buffer in which to return the new symbol reference. - @param selectionBounds [out] A buffer in which to return the bounding box - of the selected art. - */ - AIAPI AIErr (*NewSymbolPatternFromSelGetBounds) ( AIPatternHandle *symbolPattern, AIRealRect *selectionBounds ); - - /** Deletes a symbol definition. - @param symbolPattern The symbol reference. - - @return The error \c #kCantDeleteSymbolUsedInLiveEffectsErr if the symbol pattern is used in a Live Effect. - The error \c #kBadParameterErr if NULL is passed. - */ - AIAPI AIErr (*DeleteSymbolPattern) ( AIPatternHandle symbolPattern ); - - /** Reports whether a symbol is still known to the system. A symbol reference can - change if you retain it between message. To ensure a valid reference, get - the reference from the \c #kAIArtSymbolSetChangedNotifier. - (Note that this function returns a boolean value, not an error code.) - @param symbolPatter The symbol reference. - @return True if the symbol is a valid reference. - */ - AIAPI AIBoolean (*ValidateSymbolPattern) ( AIPatternHandle symbolPattern ); - - - // Functions for examining and modifying a symbol definition - - /** Retrieves a copy of the definition art of a symbol. YOu can examine or - duplicate the returned art, but cannot edit it. - @param pattern The symbol pattern reference. - @param art [out] A buffer in which to return the definition art. - */ - AIAPI AIErr (*GetSymbolPatternArt) ( AIPatternHandle pattern, AIArtHandle *art ); - - /** Creates a copy of a symbol pattern's definition artwork and places it - into the current document at the center of the current view, at the current - layer and using the current insertion mode. It is the equivalent of using - a simple Paste command. - @param symbolPattern The symbol pattern reference. - @return The error \c #kUntouchableLayerErr if the current layer or - current insertion group is locked or hidden. - @see \c #AIPatternSuite::GetPattern() - @note To get an editable copy of a symbol, it is better to use - \c #AIDictionarySuite::NewArtEntry() to create a group that - is not in the artwork tree, insert the definition copy into that - using \c #CopySymbolPatternArt(), and then delete the dictionary entry. - This avoids modifying the art tree and triggering unneeded synchronization - and change notifications. This technique is often used by export filters - to make systematic adjustments to Illustrator art before converting - it to an easy-to-export form. - */ - AIAPI AIErr (*PasteSymbolPatternArt) ( AIPatternHandle symbolPattern ); - - /** Creates a copy of a symbol pattern's definition artwork and places it - into the current document at a specified place in the paint order. - @param symbolPattern The symbol pattern reference. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] Optional. A buffer in which to return the new art object. - */ - AIAPI AIErr (*CopySymbolPatternArt) ( AIPatternHandle symbolPattern, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Creates a copy of source art and makes it the defining art for a symbol. Updates - any existing instances of the symbol. - @param symbolPattern The symbol pattern reference. - @param definitionArt The source art. - */ - AIAPI AIErr (*SetSymbolPatternArt) ( AIPatternHandle symbolPattern, AIArtHandle definitionArt ); - - /** Copies selected art and makes it the defining art for a symbol. Updates - any existing instances of the symbol. - @param symbolPattern The symbol pattern reference. - @see \c #AIPatternSuite::SetPattern() - */ - AIAPI AIErr (*SetSymbolPatternFromSel) ( AIPatternHandle symbolPattern ); - - - // The functions below use C strings. If you have or want Pascal strings, you can - // also get and set the name of a symbol using GetPatternName and SetPatternName - // from AIPattern.h. - - /** Retrieves the name of a symbol. - @param symbolPattern The symbol pattern reference. - @param name [out] A buffer in which to return the name string. Truncates - a name that is too long to fit in the buffer. - @return \c #kNameTooLongErr error if the name was truncated. - */ - AIAPI AIErr (*GetSymbolPatternName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name ); - - /** Sets the name of a symbol. - @param name The new name string. - @return \c #kNameTooLongErr error if the name length exceeds \c #kMaxSymbolNameLength. -
\c #kInvalidNameErr error if the name contains illegal characters, - is of zero length, or consists entirely of spaces. -
\c #kNameInUseErr if the name is already used for another symbol. -
In any error case, the symbol name remains unchanged. - @see \c #SetSymbolPatternBaseName() - */ - AIAPI AIErr (*SetSymbolPatternName) ( AIPatternHandle symbolPattern, const ai::UnicodeString& name ); - - /** Strips any hidden characters from the end of a symbol name to create - a displayable string. - @param name [in, out] The symbol name string, which is modified in place. - */ - AIAPI AIErr (*GetSymbolPatternDisplayName) ( ai::UnicodeString& name ); - - /** Sets the name of a symbol, appending numbers to a name string that is - already in use to make it unique. If the name string is very long, - it can be truncated before the numbers are appended. - @param symbolPattern The symbol pattern reference. - @param name The new name string. - */ - AIAPI AIErr (*SetSymbolPatternBaseName) ( AIPatternHandle symbolPattern, ai::UnicodeString& name ); - - /** Creates a new symbol instance in the center of the current document view. - @param symbolPattern The symbol pattern reference. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new instance, - an art object of type \c #kSymbolArt. - @return \c #kBadParameterErr error if there are no symbols defined - in the current document. - */ - AIAPI AIErr (*NewInstanceCenteredInView) ( AIPatternHandle symbolPattern, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Creates a new symbol instance with its center at a specified location. - @param symbolPattern The symbol pattern reference. - @param center The location, in page coordinates. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new instance, - an art object of type \c #kSymbolArt. - @return \c #kBadParameterErr error if there are no symbols defined - in the current document. - */ - AIAPI AIErr (*NewInstanceAtLocation) ( AIPatternHandle symbolPattern, AIRealPoint center, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Creates a new symbol instance with a specified transformation matrix. - @param symbolPattern The symbol pattern reference. - @param transform The transformation matrix. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new instance, - an art object of type \c #kSymbolArt. - @return \c #kBadParameterErr error if there are no symbols defined - in the current document. - */ - AIAPI AIErr (*NewInstanceWithTransform) ( AIPatternHandle symbolPattern, AIRealMatrix *transform, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - /** Retrieves the symbol pattern definition of a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param symbolPattern [out] A buffer in which to return the symbol pattern reference. - */ - AIAPI AIErr (*GetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle *symbolPattern ); - - /** Sets the symbol pattern definition of a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param symbolPattern The symbol pattern reference. - */ - AIAPI AIErr (*SetSymbolPatternOfSymbolArt) ( AIArtHandle symbolArt, AIPatternHandle symbolPattern ); - - /** Retrieves the transformation matrix that Illustrator uses to transform specified symbol art - into a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param transform [out] A buffer in which to return the transformation matrix. - @see \c #AIHardSoftSuite for a discussion of coordinate systems. - @note Use \c #AIHardSoftSuite::AIRealMatrixRealSoft() and - \c #AIHardSoftSuite::AIRealMatrixRealHard() to translate between - the hard and soft forms of the matrix (\e not - \c #AIHardSoftSuite::AIRealMatrixHarden() and - \c #AIHardSoftSuite::AIRealMatrixSoften(), which affect - only the tx ty components). - */ - AIAPI AIErr (*GetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Sets the application transformation matrix for a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param transform The new transformation matrix. - @see \c #GetHardTransformOfSymbolArt() - */ - AIAPI AIErr (*SetHardTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Retrieves the transformation matrix that a plug-in can use to transform to transform - specified symbol art into a symbol instance (using the \c #AITransformArtSuite). - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param transform [out] A buffer in which to return the transformation matrix. - @see \c #AIHardSoftSuite for a discussion of coordinate systems. - */ - AIAPI AIErr (*GetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Sets the plug-in transformation matrix for a symbol instance. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - @param transform The new transformation matrix. - @see \c #GetSoftTransformOfSymbolArt() - */ - AIAPI AIErr (*SetSoftTransformOfSymbolArt) ( AIArtHandle symbolArt, AIRealMatrix *transform ); - - /** Expands a symbol instance and places the resulting art into the artwork tree. - The function preserves the appearance, not the editability, of the symbol - definition. - \li If the instance transformation matrix is a simple placement matrix, - this is equivalent to \c #BreakLinkToSymbol(). - \li If the matrix includes a scale, rotation, shear, or reflection, - the function expands any appearances or plug-in groups inside - the symbol definition, then applies the matrix. - \li If the matrix includes a shear or a non-uniform scale, the function - expands strokes before applying the matrix. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - This object is not deleted. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param expandedArt [out] Optional. A buffer in which to return the new art object. - */ - AIAPI AIErr (*InsertExpandedSymbolArt) ( AIArtHandle symbolArt, - short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); - - /** Reports whether a symbol definition is listed. See @ref ListedUnlistedSymbols. - (Note that this function returns a boolean value, not an error code.) - @param symbolPattern The symbol pattern reference. - @return True if the symbol pattern is listed. - */ - AIAPI AIBoolean (*IsSymbolPatternListed) ( AIPatternHandle symbolPattern ); - - /** Makes a symbol definition listed. See @ref ListedUnlistedSymbols. - @param symbolPattern The symbol pattern reference. - */ - AIAPI AIErr (*MakeSymbolPatternListed) ( AIPatternHandle symbolPattern ); - - /** Makes a symbol definition unlisted. See @ref ListedUnlistedSymbols. - @param symbolPattern The symbol pattern reference. - */ - AIAPI AIErr (*UnlistSymbolPattern) ( AIPatternHandle symbolPattern ); - - /** Sorts the listed symbols in the global list of symbols, alphabetically by name. - See @ref ListedUnlistedSymbols. - */ - AIAPI AIErr (*SortListedSymbolPatterns) ( void ); - - /** Moves a listed symbol to a specific index position in the global list of symbols. - Increments the position of the symbol previously at that index, and of all - subsequent listed symbols. See @ref ListedUnlistedSymbols. - @param symbolPattern The symbol pattern reference. - @param index The new 0-based index position, or -1 to move to the - end of the list. - */ - AIAPI AIErr (*MoveSymbolPatternInList) ( AIPatternHandle symbolPattern, int index ); - - /** Reports whether an art object uses a specified symbol in a specified way. - (Note that this function returns a boolean value, not an error code.) - @param art The art object, or \c NULL to search the entire artwork tree. - In this case, the search includes descendants regardless of the - value of the \c #kSearchDescendants flag. - @param searchScope The scope of the search, a logical OR of \c #AISymbolSearchScope - bit flags. - @param targetSymbol The symbol reference, or \c NULL to search for any symbol. - @param oneFoundSymbol [out] Optional. When \c targetSymbol is \c NULL, a buffer - in which to return a single matching symbol found within the search scope, - or \c NULL if more than one matching symbol is found. - - @note \c oneFoundSymbol is used by the Symbols palette to decide which symbol to select. - If an object uses multiple symbols, nothing is selected. The scope for this - type of usage should not include \c #kSearchNestedSymbolPatterns. For example, if - symbol A's definition includes symbol B, and the user selects an instance of - symbol A, symbol A should be selected in the palette. If the user selects - a particle set containing instances of both symbol A and symbol B, - neither symbol should be selected in the palette. - - @param allFoundSymbols [out] Optional. When \c targetSymbol is \c NULL, a buffer - in which to return the handle of an array of matching symbols, of size \c foundCount. - This memory is allocated by the function, and you must free it using - \c #AIMdMemorySuite::MdMemoryDisposeHandle(). - - If no art object is specified, you can still specify the output array. This is how - the "Select All Unused" command in the Symbols palette is implemented. - - If an art object is specified, use this array to examine patterns - that are referenced by a plug-in group that puts multiple symbols in its dictionary, - such as a particle set. - @param foundCount [out] When \c targetSymbol is \c NULL, a buffer in which to - return the size of the \c allFoundSymbols array. - @param globalObjectUsage Not implemented. - @return True if any matching symbols are found. - */ - AIAPI AIBoolean (*ArtUsesSymbolPattern) ( AIArtHandle art, short searchScope, AIPatternHandle targetSymbol, - AIPatternHandle *oneFoundSymbol, - AIPatternHandle ***allFoundSymbols, int *foundCount, - int *globalObjectUsage); - - /** Creates a copy of a symbol's definition artwork, transforms it - using the matrix of a symbol instance, and places it into the - current document at a specified place in the paint order. Transfers - attributes from the symbol instance to the transformed art. - - Does not do any internal expansion of strokes, active styles or plug-in groups - inside the symbol definition, even when a rotational or shear transform is applied. - Preserves the full structure and editability of the symbol definition, - at the cost of sometimes not preserving the appearance of the instance. - - This is the equivalent of calling \c #CopySymbolPatternArt() and then performing - the transformation using the \c #AITransformArtSuite, but is more efficient. - If the instance matrix is a simple placement matrix, this is equivalent to - \c #InsertExpandedSymbolArt(). - - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - This object is not deleted. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param expandedArt [out] Optional. A buffer in which to return the new art object. - */ - AIAPI AIErr (*BreakLinkToSymbol) ( AIArtHandle symbolArt, - short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt ); - - /** Retargets a symbol pattern, fill pattern, or brush pattern for the current document. - Creates a new pattern if needed, with the same definition art and a unique name based on - the source pattern's name. All other global objects (colors, patterns, brushes, styles, - and so on) used indirectly in the definition are similarly retargeted, using - an existing object if one matches and creating a new one otherwise. - - In this context, a listed symbol never matches an unlisted one, even if it has - the same name and definition. - - Use for drag-and-drop between library palettes and the main document palette. - @param srcPattern A symbol pattern, fill pattern, or brush pattern reference. - @param dstPattern [out] A buffer in which to return the new pattern, or - an existing pattern in the current document with the same name and definition, - or the source pattern if it was already in the current document. - - @note Fill patterns are usually retargeted indirectly using the - \c #AIPathStyleSuite, and brush patterns using the \c #AIObjectSetSuite. - @see \c #AIPatternSuite, \c #AIObjectSetSuite::RetargetForCurrentDocument(), - \c #AIPathStyleSuite::RetargetForCurrentDoc() - */ - AIAPI AIErr (*RetargetForCurrentDocument) ( AIPatternHandle srcPattern, AIPatternHandle *dstPattern ); - - // New for Illustrator 11: - - /** Creates a copy of a symbol pattern's definition artwork, converts it to outline - using specified options, and places the result into the current document - at a specified place in the paint order. - @param symbolPattern The symbol pattern reference. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param newArt [out] Optional. A buffer in which to return the new art object, or - a \c NULL object if no outline can be generated. - @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: -
\c #kOutlineExpandAppearance -
\c #kOutlineEliminateUnpainted -
\c #kOutlineAddStrokes -
\c #kOutlineSubtractStrokes -
\c #kOutlineAlwaysIncludeFillArea -
\c #kOutlineAlwaysStrokeStraightLines - */ - AIAPI AIErr (*CopySymbolPatternOutline) ( AIPatternHandle symbolPattern, - short paintOrder, AIArtHandle prep, AIArtHandle *newArt, ai::int32 convertToOutlineOptions ); - - /** Expands a symbol definition, outlines the symbol definition, applies the instance - transformation to the outlined definition art. and finally places the transformed - outline art into the artwork tree. - @param symbolArt The symbol instance, an art object of type \c #kSymbolArt. - This object is not deleted. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param expandedArt [out] Optional. A buffer in which to return result art. - @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: -
\c #kOutlineExpandAppearance -
\c #kOutlineEliminateUnpainted -
\c #kOutlineAddStrokes -
\c #kOutlineSubtractStrokes -
\c #kOutlineAlwaysIncludeFillArea -
\c #kOutlineAlwaysStrokeStraightLines - @see \c #InsertExpandedSymbolArt() - */ - AIAPI AIErr (*InsertSymbolArtOutline) ( AIArtHandle symbolArt, - short paintOrder, AIArtHandle prep, AIArtHandle *expandedArt, ai::int32 convertToOutlineOptions ); - - /** Retrieves a cached outline for a symbol pattern, if one has been generated for a given - set of conversion options. You can examine or duplicate the returned outline art, but cannot edit it. - @param symbolPattern The symbol pattern reference. - @param outlineArt [out] A buffer in which to return the cached outline art, or \c NULL - if no cached outline has been generated for the given options. - @param convertToOutlineOptions Option flags for conversion, a logical OR of these values: -
\c #kOutlineExpandAppearance -
\c #kOutlineEliminateUnpainted -
\c #kOutlineAddStrokes -
\c #kOutlineSubtractStrokes -
\c #kOutlineAlwaysIncludeFillArea -
\c #kOutlineAlwaysStrokeStraightLines - */ - AIAPI AIErr (*PeekCachedPatternOutline) ( AIPatternHandle symbolPattern, AIArtHandle *outlineArt, ai::int32 convertToOutlineOptions ); - - // New for Illustrator 13: - - /** Sets a symbol definition from selected art, and reports the bounds of the selected art. - @param symbolPattern The symbol pattern reference. - @param selectionBounds [out] Optional. A buffer in which to return the bounding box - of the selected art. - @see \c #NewSymbolPatternFromSelGetBounds. - */ - AIAPI AIErr (*SetSymbolPatternFromSelGetBounds) ( AIPatternHandle symbolPattern, AIRealRect *selectionBounds ); - - - /** Sets the symbol export type for a symbol pattern, to use when exporting the - symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param exportType The Flash export type. - */ - AIAPI AIErr (*SetSymbolExportType) ( AIPatternHandle symbolPattern, AISymbolFlashExportType exportType); - - /** Retrieves the symbol export type for a symbol pattern, used when exporting the symbol - to Flash. - @param symbolPattern The symbol pattern reference. - @param exportType [out] The Flash export type. - */ - AIAPI AIErr (*GetSymbolExportType) ( AIPatternHandle symbolPattern, AISymbolFlashExportType *exportType); - - - /** Sets the symbol registration point for a symbol pattern. to use when exporting the - symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param registrationPoint The Flash registration point. - */ - AIAPI AIErr (*SetSymbolRegistrationPoint) ( AIPatternHandle symbolPattern, AISymbolRegistrationPoint registrationPoint); - - /** Retrieves the symbol registration point for a symbol pattern, used when exporting the symbol - to Flash. - @param symbolPattern The symbol pattern reference. - @param registrationPoint [out] The Flash registration type. - */ - AIAPI AIErr (*GetSymbolRegistrationPoint) ( AIPatternHandle symbolPattern, AISymbolRegistrationPoint *registrationPoint); - - /** Sets the symbol "Enable guides for 9-slice scaling" option for a symbol pattern, - to use when exporting the symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param enableGuides True to turn 9-slice scaling on, false to turn it off. - */ - AIAPI AIErr (*SetSymbolEnableGuides) ( AIPatternHandle symbolPattern, AIBoolean enableGuides); - - /** Retrieves the symbol "Enable guides for 9-slice scaling" option for a symbol pattern, - used when exporting the symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param enableGuides [out] A buffer in which to return true if - 9-slice scaling is on, false if it is off. - */ - AIAPI AIErr (*GetSymbolEnableGuides) ( AIPatternHandle symbolPattern, AIBoolean *enableGuides); - - /** Sets the symbol scaling grid for 9-slice scaling for a symbol pattern, - to be used when exporting the symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param slice9Grid The rectangular area of the center slice. - */ - AIAPI AIErr (*SetSymbol9SliceGrid) ( AIPatternHandle symbolPattern, AIRealRect slice9Grid); - - /** Retrieves the symbol scaling grid for 9-slice scaling for a symbol pattern, - used when exporting the symbol to Flash. - @param symbolPattern The symbol pattern reference. - @param slice9Grid [out] A buffer in which to return the rectangular area of the center slice. - */ - AIAPI AIErr (*GetSymbol9SliceGrid) ( AIPatternHandle symbolPattern, AIRealRect *slice9Grid); - - // Symbol editing workflow (new in AI13/CS3) - - /** Starts an editing session for a symbol pattern. - - Invokes isolation mode on a copy of the prototype of the pattern, and places the - copy on the artboard. If a symbol art is specified, the copy is placed in the same - location as the symbol instance, hiding the original. Otherwise, the copy is placed in the - center of the artboard. - - You can start nested editing sessions for nested symbols. - - Editing changes are signaled with \c #AILayerList::kAIIsolationModeChangedNotifier - and \c #AILayerList::kAIBeforeIsolationModeChangedNotifier. Use \c #ValidateSymbolEditingArt() - to validate the art being edited. - - @post Use \c #EndEditingSymbolDefinition() to end the editing session, optionally updating - the symbol pattern's prototype with the changes in the copy before returning it to - the artboard. - - @post Use \c #ExitSymbolEditMode() to force all symbol editing sessions to end without - saving any changes. - - @param symbolPattern The symbol pattern reference. - @param symbolArt Optional. A symbol art object whose definition needs to be edited. - */ - AIAPI AIErr (*SetEditingSymbolDefinition) ( AIPatternHandle symbolPattern, AIArtHandle symbolArt); - - /** Ends an editing session for a symbol pattern, allowing you to apply or discard the changes - made during the session. The corresponding symbol instance that was hidden when - setting the symbol in edit mode is made visible. - @param symbolPattern The symbol pattern reference. - @param updateSymbol True to apply the edits to the pattern, false to discard the editing - changes and restore the original symbol pattern. - @pre \c #SetEditingSymbolDefinition() - */ - AIAPI AIErr (*EndEditingSymbolDefinition) ( AIPatternHandle symbolPattern, AIBoolean updateSymbol); - - /** Reports whether symbol edit mode is active. - (Note that this function returns a boolean value, not an error code.) - @return True if at least one symbol pattern is being edited, false otherwise. - */ - AIAPI AIBoolean (*GetSymbolEditMode) (); - - /** Ends all current symbol editing sessions, restoring the original symbol pattern - prototypes to the artboard and discarding all changes made while editing. - - To save any changes, and to restore the per-symbol editing state information, - use \c #EndEditingSymbolDefinition() for each symbol being edited. - @pre \c #SetEditingSymbolDefinition() - */ - AIAPI AIErr (*ExitSymbolEditMode) ( ); - - /** Reports whether a symbol pattern is currently being edited. - (Note that this function returns a boolean value, not an error code.) - @param symbolPattern The symbol pattern reference. - @return True if at the symbol pattern is being edited, false otherwise. - */ - AIAPI AIBoolean (*EditingSymbolPattern) (AIPatternHandle symbolPattern); - - /** Reports whether an art object represents the prototype of a symbol pattern that is - currently being edited, and if true, optionally returns the pattern being edited. - @param art The art object reference. - @param symbolPattern [out] Optional. A buffer in which to return the symbol pattern. - @return True if the art object does represent the prototype of a symbol pattern that is - currently being edited, false otherwise. - */ - AIAPI AIBoolean (*IsSymbolEditingArtType) ( AIArtHandle art, AIPatternHandle *symbolPattern); - - /** Validates the editing art object that represents the prototype of a - symbol pattern that is being edited. - The editing art could become invalid due to operations such as duplicate or delete. - If the symbol pattern's editing art is not a valid art object, looks under the parent - for an art object whose state represents the editing art of the given symbol pattern, - and sets it as the valid editing art. If there is no valid art object under the parent, - creates an empty group and sets it as the valid editing art. - - Use this in response to the \c #AILayerList::kAIBeforeIsolationModeChangedNotifier, - with the information received by calling \c #AIIsolationModeSuite::GetIsolatedArtAndParents(). - @param symbolPattern The symbol pattern reference. - @param editingArtParent Parent object that contains the editing art. - */ - AIAPI AIErr (*ValidateSymbolEditingArt) ( AIPatternHandle symbolPattern, AIArtHandle editingArtParent); - - -} AI140SymbolSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140TextFrame.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140TextFrame.h deleted file mode 100644 index 3d23b33..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140TextFrame.h +++ /dev/null @@ -1,327 +0,0 @@ -#ifndef __AI140TextFrame__ -#define __AI140TextFrame__ - -/* - * Name: AITextFrame.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Text Frame Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AITypes.h" -#include "AIArt.h" -#include "AIFont.h" -#include "AIHitTest.h" -#include "ATESuites.h" - -#ifdef __cplusplus -using ATE::TextRangesRef; -using ATE::TextRangeRef; -using ATE::TextFrameRef; -#endif - -#include "AIHeaderBegin.h" - -/** @file AITextFrame.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI140TextFrameSuite "AI Text Frame Suite" -#define kAITextFrameSuiteVersion1 AIAPI_VERSION(1) -#define kAI140TextFrameSuiteVersion kAITextFrameSuiteVersion1 -#define kAI140TextFrameVersion kAI140TextFrameSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that manage art objects of - type \c #kTextFrameArt. Introduced in Illustrator 11. - - There are three types of text frames; \e point - text, \e in-path text, and \e on-path text. - - \li Point text is defined by an anchor point for the position - of the first character. - \li In-path and on-path text have an associated path object - that defines the area the text flows into or along. respectively. - - In-path and on-path text frames can be linked together. Linked text frames - need not be the same type. They can be in different groups, and can be on - different layers. The text content linked frames is called a \e story. - Use the Adobe Text Engine (ATE) functions to access and manipulate - the story and its visual attributes. Related suites include: -
\c #AIATECurrentTextFeaturesSuite -
\c #AIATEPaintSuite -
\c #AIATETextUtilSuite -
\c #AITextFrameHitSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI140TextFrameSuite and \c #kAITextFrameVersion. - */ -typedef struct { - - /** Creates a new point text object at a given position in the paint order. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param anchor The start point of the baseline of the first character. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewPointText) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, - AIRealPoint anchor, AIArtHandle *newTextFrame ); - /** Creates a new in-path text object at a given position in the paint order. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewInPathText) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, - AIArtHandle path, AIArtHandle baseFrame, AIBool8 append, AIArtHandle *newTextFrame ); - - /** Creates a new on-path text object at a given position in the paint order, placing - the text with a starting and ending path segment. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param startT The 0-based index of the segment of the path at which the text starts. - @param endT The 0-based index of the segment of the path at which the text ends. If less - than the start value, defaults to the number of segments (the end of the path). - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewOnPathText) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, - AIArtHandle path, AIReal startT, AIReal endT, AIArtHandle baseFrame, - AIBool8 append, AIArtHandle *newTextFrame ); - - /** Creates a new on-path text object at a given position in the paint order, placing - the text with an anchor point. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param orient The text orientation value. - @param path The associated path object (an art object of type \c #kPathArt). - @param anchor The start point of the baseline of the first character. - @param baseFrame Optional. Another text frame with which to link the new text frame. - @param append When true, append the new frame to the base frame, when false, prepend it. - Ignored if \c baseFrame is \c NULL. - @param newTextFrame [out] A buffer in which to return the new art object. - */ - AIAPI AIErr (*NewOnPathText2) ( short paintOrder, AIArtHandle prep, AITextOrientation orient, - AIArtHandle path, AIRealPoint anchor, AIArtHandle baseFrame, - AIBool8 append, AIArtHandle *newTextFrame ); - - /** Retrieves the type of a text frame. - @param textFrame The text frame object. - @param type [out] A buffer in which to return the type. - */ - AIAPI AIErr (*GetType) ( AIArtHandle textFrame, AITextFrameType *type ); - - /** Retrieves the orientation of a text frame. - @param textFrame The text frame object. - @param orient [out] A buffer in which to return the orientation value. - */ - AIAPI AIErr (*GetOrientation) ( AIArtHandle textFrame, AITextOrientation *orient ); - - /** Sets the orientation of a text frame. - @param textFrame The text frame object. - @param orient The new orientation value. - */ - AIAPI AIErr (*SetOrientation) ( AIArtHandle textFrame, AITextOrientation orient ); - - /** Retrieves the anchor point of a point-text text frame. - Use the \c #AITransformArtSuite to change the anchor point. - @param textFrame The text frame object. - @param anchor [out] A buffer in which to return the anchor point. - @return #kBadParameter error if the text frame is not a point-text type. - */ - AIAPI AIErr (*GetPointTextAnchor)( AIArtHandle textFrame, AIRealPoint *anchor ); - - /** Retrieves the path associated with an in-path or on-path text range. - Use the \c #AIPathSuite to access and manipulate the path. - @param textFrame The text frame object. - @param pathObject [out] A buffer in which to return the path object, or - \c NULL if the text frame is a point-text type. - - @note You can use \c #AIArtSuite::DuplicateArt() copy the path object, - but you cannot specify the target location in terms of the returned path object. - For example, you cannot place the duplicate path above or below the source path. - */ - AIAPI AIErr (*GetPathObject) ( AIArtHandle textFrame, AIArtHandle *pathObject ); - - /** Retrieves the starting and ending path segments of an on-path text range. - @param textFrame The text frame object. - @param startT [out] A buffer in which to return the 0-based index of - the starting segment. - @param endT [out] A buffer in which to return the 0-based index of - the ending segment. It is always greater than or equal to the starting - segment's index. - */ - AIAPI AIErr (*GetOnPathTextTRange)( AIArtHandle textFrame, AIReal *startT, AIReal *endT ); - - /** Sets the starting and ending path segments of an on-path text range. - @param textFrame The text frame object. - @param startT The 0-based index of the starting segment. - @param endT The 0-based index of the ending segment. Must be - greater than or equal to the starting segment's index. - */ - AIAPI AIErr (*SetOnPathTextTRange)( AIArtHandle textFrame, AIReal startT, AIReal endT ); - - /** Retrieves the ATE text range object for the text contained in an Illustrator text frame. - @param textFrame The text frame object. - @param textRange [out] A buffer in which to return the text range object. - This object is reference counted. You must release it when it is no - longer needed, using the \c #ATE::ITextRange class - @note If this frame is the last one in the chain AND it has overflow text, - \c ITextRange(textRange).getEnd() includes the hidden text. - */ - AIAPI AIErr (*GetATETextRange) ( AIArtHandle textFrame, TextRangeRef* textRange ); - - /** Retrieves the ATE text frame object corresponding to an Illustrator text frame object. - @param textFrame The text frame object. - @param ATE_textFrame [out] A buffer in which to return the ATE text frame object. - This object is reference counted. You must release it when it is no - longer needed, using the \c #ATE::ITextFrame class - */ - AIAPI AIErr (*GetATETextFrame) ( AIArtHandle textFrame, TextFrameRef* ATE_textFrame ); - - /** Retrieves the Illustrator text frame object corresponding to an ATE text frame object. - @param ATE_textFrame The ATE text frame object. - @param textFrame [out] A buffer in which to return the Illustrator text frame object. - */ - AIAPI AIErr (*GetAITextFrame) ( TextFrameRef ATE_textFrame, AIArtHandle* textFrame ); - - /** Retrieves the ATE text range object for the selected text contained in an - Illustrator text frame. Selections can be discontiguous. - @param textFrame The text frame object. - @param textRange [out] A buffer in which to return the text range object. - This object is reference counted. You must release it when it is no - longer needed, using the \c #ATE::ITextRange class - */ - AIAPI AIErr (*GetATETextSelection)( AIArtHandle textFrame, TextRangesRef* Selection ); - - /** Retrieves the ATE text range object for the insertion point that corresponds - to a hit on a text frame object, as obtained with the \c #AIHitTestSuite. - @param hitRef The hit object. - @param textRange [out] A buffer in which to return the text range object. - This object is reference counted. You must release it when it is no - longer needed, using the \c #ATE::ITextRange class - */ - AIAPI AIErr (*DoTextFrameHit) ( const AIHitRef hitRef, TextRangeRef* textRange ); - - /** Converts the text in a text frame object to outlines in a new art object. - If the text frame has an active style, that style is applied to the outlines. - Other attributes, including the opacity mask. are not copied. If the text frame - is set to clip, a single clipping compound path is created to contain the outlines. - The style and opacity mask are not applied to this compound path. - @param textFrame The text frame object. This object is not deleted. - @param outline [out] A buffer in which to return the new outline text. - */ - AIAPI AIErr (*CreateOutline) ( AIArtHandle textFrame, AIArtHandle *outline ); - - /** Links two in-path text frame objects. Upon return, they share the same story. - @param baseFrame The first in-path text frame object. - @param nextFrame The second in-path text frame object. - */ - AIAPI AIErr (*Link) ( AIArtHandle baseFrame, AIArtHandle nextFrame ); - - /** Unlinks a text frame object from its current story, or breaks the story - into two parts before or after a given frame. - @param frame The text frame object. - @param before When true, if \c after is false, break the story into two - groups before this frame, so that the second part starts - with this frame. - @param after When true, if \c before is false, break the story into two - groups after this frame, so that the first part ends - with this frame. - - \li If both \c before and \c after are true, the frame is removed from the - story. - \li If both \c before and \c after are false, nothing happens. - */ - AIAPI AIErr (*Unlink) ( AIArtHandle frame, AIBool8 before, AIBool8 after ); - - /** Creates a new Illustrator text frame object based on ATE version 2 blob data. - @param paintOrder The paint order position, relative to the \c prep object, - an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - @param data A pointer to a binary blob. - @param size The number of bytes in the data block. - @param index The 0-based position index of the new text object - in the SLO TextObject list. - */ - AIAPI AIErr (*CreateATEV2Text) ( short paintOrder, AIArtHandle prep, void* data, - size_t size, ai::int32 index, AIArtHandle *newTextFrame ); - - /** Retrieves the ATE version 2 blob data for the current artwork. - @param data [out] A buffer in which to return the binary blob. You must - free this data using \c #SPBlocksSuite::SPFreeBlock(). - @param size [out]] A buffer in which to return the number of bytes in the data block. - */ - AIAPI AIErr (*GetATEV2Data) ( void** data, size_t* size ); - - /** Retrieves the story index of a text frame. - @param frame The text frame object. - @param index The 0-based index, or -1 if the frame does not belong - to the current artwork or is part of the result art of a - plug-in group or styled art. - */ - AIAPI AIErr (*GetStoryIndex) ( AIArtHandle frame, ai::int32* index ); - - /** Retrieves the frame index of a linked text frame in its story. - @param frame The text frame object. - @param index The 0-based index, or -1 if the frame does not belong - to the current artwork or is part of the result art of a - plug-in group or styled art. - */ - AIAPI AIErr (*GetFrameIndex) ( AIArtHandle frame, ai::int32* index ); - - /** Reports whether a text frame is part of a linked text story. - @param frame The text frame object. - @param linked [out] A buffer in which to return true if the text frame is linked. - */ - AIAPI AIErr (*PartOfLinkedText) ( AIArtHandle frame, AIBool8* linked ); - -} AI140TextFrameSuite; - -#include "AIHeaderEnd.h" - - -#endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140User.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140User.h deleted file mode 100644 index c836b3d..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI140User.h +++ /dev/null @@ -1,496 +0,0 @@ -#ifndef __AI140User__ -#define __AI140User__ - -/* -* Name: AI140User.h -* $Revision: 15 $ -* Author: -* Date: -* Purpose: Adobe Illustrator User Utilities Suite. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 1986-2007 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - - -/******************************************************************************* -** -** Imports -** -**/ - -#include "AIUser.h" - -#include "AIHeaderBegin.h" - -/** @file AI140User.h */ - - -/******************************************************************************* -** -** Constants -** -**/ - -// v.14.0 -#define kAIUserSuite "AI User Suite" -#define kAIUserSuiteVersion9 AIAPI_VERSION(9) -#define kAI140UserSuiteVersion kAIUserSuiteVersion9 -#define kAI140UserVersion kAI140UserSuiteVersion - -/******************************************************************************* -** -** Types -** -**/ - -/** Information about the kinds of names allowed for a named entity (such as -layers, swatches, and styles). Used to generate a legal name, using -\c #AIUserSuite::NextName() and AIUserSuite::CopyOfName(). - -The following pseudocode indicates how you can create your own AutoNameGenerator class by publicly inheriting AIAutoNameGenerator -and following the implementation guidelines. - -@code -class AutoNameGenerator : public AIAutoNameGenerator { -public: -// Constructor for a name generator. Its supplied with the pluginref in -// case the name generator needs to look in the plugin's resources e.g for -// the default name. The next new name index is supplied since the plugin -// probably needs to store this in its globals so that it can be preserved -// across unload and reload. -AutoNameGenerator (SPPluginRef pluginref, int nextNameIndex) -{ -// fill in fDefaultName -GetDefaultName(pluginref); - -// initialize the base members -// note kMaxCollectionStringLength accounts for null terminator and maximumLength does not -maximumLength = kMaxCollectionStringLength-1; -uniqueNames = true; -baseName = fDefaultName; -nextNewNameIndex = nextNameIndex; -HasName = sHasName; -} - -private: -void GetDefaultName (SPPluginRef pluginref) -{ -// Somehow initialize fDefaultName with the default name for the -// collection. The pluginref is probably needed in order to look -// up the name in the plugin resources. -} - -AIErr hasName (const ai::UnicodeString &name, AIBoolean &hasit) -{ -// Code to answer the question. When comparing 'name' against -// names of objects in the collection it's important to use the -// AIUserSuite::SameName() API. The name generation process does -// not use a simple string comparison. -} - -static AIAPI AIErr sHasName (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit) -{ -return static_cast(self).hasName(name, hasit); -} - -ai::UnicodeString fDefaultName; -}; -@endcode -*/ - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides utility functions for working with Illustrator, -including unit conversion utilities and a progress bar. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIUserSuite and \c #kAIUserSuiteVersion. -*/ -struct AI140UserSuite { - - /** Reports whether a user has canceled the current operation. - (Note that this function returns a boolean value, not an error code.) - @return True if the user has canceled an operation - by pressing Command-dot or clicking Cancel or Stop in the - progress bar. - */ - AIAPI AIBoolean (*Cancel) ( void ); - - /** Updates the progress bar. - (Note that this function does not return an error code.) - @param current A number between 0 and \c max that represents - how far the operation has progressed. - @param max The maximum value, representing 100% progress. - */ - AIAPI void (*UpdateProgress) ( long current, long max ); - - /** Sets the text message displayed in the progress bar. If not provided, - the text line is blank. - (Note that this function does not return an error code.) - @param text The text message. - */ - AIAPI void (*SetProgressText) ( const ai::UnicodeString& text ); - - /** Explicitly close the progress bar if one is currently shown. - (Note that this function does not return an error code.) - */ - AIAPI void (*CloseProgress) ( void ); - - /** Converts a number of document points to a Unicode string, using - the period as a decimal separator. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI void (*AIRealToString) ( AIReal value, short precision, ai::UnicodeString& string ); - - /** Converts a Unicode string containing a number to an \c #AIReal value, - using the period as a decimal separator. - (Note that this function does not return an error code.) - @param string The string to convert. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Converts a number of document points to a Unicode string, using the localized - international utilities (IU) decimal separator. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI void (*IUAIRealToString) ( AIReal value, short precision, ai::UnicodeString& string ); - - /** Converts a Unicode string containing a number to an \c #AIReal value, - using the localized international utilities (IU) decimal separator. - (Note that this function does not return an error code.) - @param string The string to convert. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Converts a number of document points to a formatted Unicode string containing - a number and ruler units, using the localized international utilities (IU) - decimal separator, and the passed preference for precision. If passed precision value is -1 - then user preference for precision is used. - Uses the currently set ruler units, which can be inches, points, or centimeters. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. Pass -1 if user preference for precision should be used. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, int precision, ai::UnicodeString& string ); - - /** Converts a formatted Unicode string containing a number expressed in ruler units - to an \c #AIReal value in points. The current ruler units for the artwork - are used as the original units to scale the result, and the user's - preferences for precision are applied. - (Note that this function does not return an error code.) - @param string The string to convert, which uses the localized international utilities (IU) - decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm". - If no unit specifier is included, uses the current ruler units. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Retrieves a string representing the current ruler units. - @param format The format for the result, one of: -
\c #kShortUnits -
\c #kLongSingularUnits -
\c #kLongPluralUnits -
If, for instance, the current unit is inches, the returned string - would be "in", "inch", or "inches". - @param string [out] A buffer in which to return the units string, at least 20 characters. - */ - AIAPI AIErr (*GetUnitsString) ( short format, ai::UnicodeString& string ); - - /** Converts an Illustrator units constant value to an \c #ADMUnits constant value. - For example, the equivalent of \c #kPointsUnits is \c #kADMPointUnits. - @param aiUnits The value to convert. - @param admUnits [out] A buffer in which to return the converted value. - */ - AIAPI AIErr (*AIUnitsToADMUnits) ( short aiUnits, ADMUnits *admUnits); - - /** Converts an \c #ADMUnits constant value to an Illustrator units constant value. - For example, the equivalent of \c #kADMPointUnits is \c #kPointsUnits. - @param admUnits The value to convert. - @param aiUnits [out] A buffer in which to return the converted value. - */ - AIAPI AIErr (*ADMUnitsToAIUnits) ( ADMUnits admUnits, short *aiUnits); - - /** Retrieves the base name of a global object, stripping off any additional - token that was added to make the name unique (by a function such as - \c #AICustomColorSuite::NewCustomColorName(), for example). - @param name [in, out] A string in which to pass a unique name and - return the base name. The string is modified in place. - */ - AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name ); - - /** Opens the appropriate application to edit a placed or raster object. - This is equivalent to an option-double-click on the object with the selection tool. - @param art The placed or raster art object. - @return \c #kApplicationNotFoundErr error if the application is not found. -
\c #kObjectNotLinkedErr error if the object is not a placed or raster object. - */ - AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art ); - - /** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state. Can be useful if - you have code that has its own message processing. */ - AIAPI AIErr (*AppIdle) ( void ); - - /** Builds a directory menu. Available only in Mac OS. Builds a menu consisting of the specified path as well as all parent directories of that path. - @param menu The platform-specific menu object. - @param fileSpec The file object for the directory. - */ - AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec); - - /** Retrieves a directory. Available only in Mac OS. Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu. - @param fileSpec The file object for the directory. - @param index The 0-based index of the directory. - */ - AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, int index); - - /** Reveals a file in the Finder. Available only in Mac OS. - @param fileSpec The file object for the file. - */ - AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec); - - /** Disables (dims) the cancel or stop button in the progress bar. - (Note that this function does not return an error code.) - */ - AIAPI void (*DisableProgressCancel) ( void ); - - /** Reports whether it is safe to allocate memory. Call when a timer - or other asynchronous event triggers an action that allocates memory. - Not needed when handling notifications or user events; the plug-in does not receive - these when it is not ok to allocate memory. - (Note that this function returns a boolean value, not an error code.) - @param True if it is safe to allocate memory. False if it is not safe; in this case, - reschedule the action and try again later. - */ - AIAPI AIBoolean (*OKToAllocateMemory) ( void ); - - // New for AI 11 - /** Retrieves the current date and time. - @param outValue [out] A buffer in which to return the current date-time value. - */ - AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue); - - /* Formats a date into a Unicode string. - @param inValue The date to format, or \c NULL to format the current date-time value. - @param formatFlag The format to use, one of: -
\c #kAIShortDateFormat -
\c #kAILongDateFormat -
\c #kAIAbbrevDateFormat - @param dateStringUS [out] A buffer in which to return the formatted date string. - */ - AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const int formatFlag, ai::UnicodeString& dateStringUS); - - /* Formats a time into a Unicode string. - @param inValue The time to format, or \c NULL to format the current date-time value. - @param formatFlag The format to use, one of: -
\c #kAIShortTimeFormat -
\c #kAILongTimeFormat - @param dateStringUS [out] A buffer in which to return the formatted time string. - */ - AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const int formatFlag, ai::UnicodeString& dateStringUS); - - /** Retrieves the year value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year); - - /** Retrieves the month value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month); - - /** Retrieves the day value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day); - - /** Retrieves the hour value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour); - - /** Retrieves the minute value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute); - - /** Retrieves the second value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second); - - /** Retrieves the day-of-week value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek); - - /** Launches an application, and optionally opens the current document in it. - @param spFileSpec The file specification for the application's executable. - @param openDoc True to open the current document in the new application. - */ - AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc); - - /** Generates an appropriate name for a named object, such as - a layer, swatch, or style, according to the naming rules for that - collection. - @param set The naming rules. - @param name [out] An ai::UnicodeString in which to return the generated name. - */ - AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name); - - /** Generates an appropriate name for a copy of a named object, such as - a layer, swatch, or style, according to the naming rules for that - collection. - @param set The naming rules. - @param original Original name to copy (may be an empty string). - @param copy [out] An ai::UnicodeString in which to return the generated name. - */ - AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString ©); - - /** Tests for equality of names within a collection of named objects. - Use in the \c #AIAutoNameGenerator::HasName() callback function - to test whether an automatically generated name matches a name - already in the collection. - @param name1 The first name. - @param name2 The second name. - @param same [out] An AIBoolean reference in which to return true if the names - are the same. - */ - AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same); - - /** Not implemented. (Installs a custom progress reporting mechanism.) - @return \c #kNotImplementedErr. - */ - AIAPI AIErr (*PushCustomProgress) (AICustomProgressSuite *suite); - - /** Not implemented. (Removes the most recently installed custom progress reporting mechanism.) - @return \c #kNotImplementedErr. - */ - AIAPI AIErr (*PopCustomProgress) (); - - /** Opens a platform-specific dialog for saving a file. - @param title Dialog title. - @param AIPlatformFileDlgOpts File types to save. Can be \c NULL. - @param defaultName Default file name to appear in dialog. Can be \c NULL. - @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and - return the full path of the file chosen by the user. - */ - AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath); - - /** Opens a platform-specific dialog for opening a file. - @param title Dialog title. - @param AIPlatformFileDlgOpts File types to open. Can be \c NULL. - @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and - return the full path of the file chosen by the user. - */ - AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath); - - /** Opens a platform-specific dialog for choosing a folder. - @param title Dialog title. - @param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and - return the full path of the folder chosen by the user. - */ - AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath); - - /** Displays an alert dialog with a warning icon and OK and Cancel buttons. - @param msg The message to display. - @param defaultOk True to make the OK button the default, false to make Cancel the default. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return True if the dialog was dismissed with the OK button, - false if it was canceled. - */ - AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey); - - /** Displays an alert dialog with a warning icon and an OK button. - @param msg The message to display. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return Nothing. - */ - AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey); -}; - - - -#if defined(MAC_ENV) || defined(WIN_ENV) -/** @ingroup Suites -This suite provides utilities specific to the Mac OS platform. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIMacUserSuite and \c #kAIMacUserSuiteVersion. -*/ -typedef struct { - - /** In Mac OS only, a callback procedure for a platform-specific - modal dialog, called in response to a user-interaction event. - Pass this function pointer in the \c filterproc parameter to the - Mac OS function \c ModalDialog(). - - This callback allows you to update the Illustrator document in - response to events in the modal dialog, which would otherwise prevent - any activity in the application while the dialog is shown. - - @param theDialog The window object for the dialog. - @param theEvent A pointer to the event object for the event that triggered the callback. - @param itemHit [out] Optional. A buffer in which to return the dialog result. - Could be 0 (no result, as the event was not consumed), 1 (the OK button was clicked) or 2 (the Cancel button was clicked). - @return True if the event was consumed, false if it was not. - */ - AIAPI AIBoolean (*ModalFilterProc) ( AIWindowRef theDialog, AIEvent *theEvent, short *itemHit ); - - /** Displays a color swatch preview in a platform window, similar to the one - shown in the Swatch palette. - @param window The window object. - @param swatchRect A pointer to the region in which to display the preview, - in coordinates relative to the window's origin. - @param colorSpec A pointer to the swatch color. - */ - AIAPI AIErr (*PreviewColorSwatch) ( AIWindowRef window, AIRect *swatchRect, AIColor *colorSpec ); - -} AI140MacUserSuite; -#endif - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150BeautifulStrokes.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150BeautifulStrokes.h deleted file mode 100644 index 5e378d2..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150BeautifulStrokes.h +++ /dev/null @@ -1,826 +0,0 @@ -#ifndef __AI150BeautifulStrokes__ -#define __AI150BeautifulStrokes__ - -/* -* Date: Started 2009 -* Purpose: Adobe Illustrator Beautiful Strokes suite. This suite lets -* clients control effects that can be applied to strokes such as -* art and pattern brushes, arrowheads, and dash adjustments. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#include "AIBeautifulStrokes.h" -#include "AIHeaderBegin.h" - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAIBeautifulStrokesSuiteVersion1 AIAPI_VERSION(1) -#define kAI150BeautifulStrokesSuiteVersion kAIBeautifulStrokesSuiteVersion1 - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites - This suite allows you to control advanced features for stroking paths. Setting are - kept in a BeautifulStrokes params dictionary, which is contained in an \c #AILiveEffectsParameters - dictionary, such as one returned by \c #AIPathStyle::GetCurrentPathStyle().
- One way to use this suite is to create a BeautifulStrokes params dictionary, - add the stroke settings to the dictionary, then use that dictionary to apply - the settings to source art. This generates new art in a destination group. - For example: - - @code - void Fn(AIArtHandle srcPath, AIArtHandle dstGroup) - { - AIDictionaryRef params = 0; - sAIBeautifulStrokes->CreateParamsDict(NULL, params); - sAIBeautifulStrokes->SetDashAdjustment(params, true); - sAIBeautifulStrokes->GenerateArt(params, srcPath, NULL, TRUE, dstGroup, NULL); - sAIDictionary->Release(params); - } - @endcode - - Counted object note: Suite functions that return counted object types such as - \c #AIDictionarySuite::AIDictionaryRef and \c #AIArraySuite::AIArrayRef increment - the reference count and the caller must release unneeded references to avoid memory - leaks, as shown in the examples. Documentation for individual parameters mentions those - that are reference counted and need to be released. See also \c #AICountedObjectSuite - and the \c ai::Ref C++ class. - - The example above uses the \c #AIDictionarySuite::Release() directly. - The following example uses the \c ai::Ref C++ class to manage the counted - object. (Note that \c #AICountedObjectSuite::Release() is equivalent to - \c #AIDictionarySuite::Release()): - - @code - void Fn_Ref(AILiveEffectParameters effectParams) - { - ai::Ref params; - sAIBeautifulStrokes->CreateParamsDict(NULL, *(params << ai::Replace)); - sAIBeautifulStrokes->SetDashAdjustment(params, true); - sAIBeautifulStrokes->GenerateArt(params, srcPath, NULL, TRUE, dstGroup, NULL); - } - @endcode - -*/ - -struct AI150BeautifulStrokesSuite -{ - - // General parameter management and stroke generation - - /** Applies settings in a BeautifulStrokes parameters dictionary to the focal stroke on source art - to generate new stroked art in the output group. - - @param effectParams An effect parameters dictionary that contains a BeautifulStrokes params - dictionary in which BeautifulStrokes settings are defined. This can also - be a BeautifulStrokes params dictionary. - @param inArt The art (path) to which the parameters are to be applied. - @param sourceArt [optional] The non-styled art (path) possibly containing width anchors that can be - used to adjust the width profile placement. (See \c #AIBeautifulStrokesSuite::GetPathAdjustedWidthDistances().) - This parameter is ignored if inArt is not styled art (see \c #AIArtSuite::IsArtStyledArt()), - since non-styled art will carry its own anchors. But art dictionaries are stripped - from the input art to live effects. Thus, if \c inArt is the input art to a live effect - execution for a stroke filter, and the art style being executed was attached to a path, - then passing \c sourceArt as the non-styled path art object to which that art style was - attached will allow access to the width anchors. (If there are no vector pre-effects - before the stroke filter, then \c inArt will generally be a duplicate of \c sourceArt, - but if there are vector pre-effects, then it may be substantially different.) - Passing this parameter as null when inArt is styled art will cause any width profile - in the effectParams to be applied without width anchor adjustment. - @param outputOnTop True to place the output art into the output group on top, false to place - it inside the output group on the bottom. - @param outGroup The destination group for the generated output art. - @param outArt [optional] A pointer to an AIArtHandle in which to return the AIArtHandle for the generated output art. - */ - AIAPI AIErr (*GenerateArt)(ConstAILiveEffectParameters effectParams, AIArtHandle inArt, AIArtHandle sourceArt, - AIBoolean outputOnTop, AIArtHandle outGroup, AIArtHandle *outArt); - - /** Creates a new BeautifulStrokes params dictionary. You must release the dictionary when no longer needed using - \c #AIDictionarySuite::Release(). - - @param effectParams [optional] A set of LiveEffect parameters. If supplied, the new BeautifulStrokes - params dictionary is added to this dictionary, or, if a BeautifulStrokes dictionary - already exists, \c params is set to this existing dictionary. - @param params A reference to a new or the existing BeautifulStrokes params dictionary. - The reference count on this dictionary is incremented on return and - must be released when no longer needed. - - */ - AIAPI AIErr (*CreateParamsDict)(AILiveEffectParameters effectParams, AIDictionaryRef ¶ms); - - /** Retrieves a BeautifulStrokes parameters dictionary from a set of LiveEffect parameters. - - @param effectParams A set of LiveEffect parameters for an art object. - @param params A reference to the BeautifulStrokes params dictionary or - NULL if one does not exist. The reference count on this - dictionary is incremented on return and must be released - when no longer needed. - - @return No error is returned if the dictionary does not exist. - */ - AIAPI AIErr (*GetParamsDict)(ConstAILiveEffectParameters effectParams, AIDictionaryRef ¶ms); - - /** Reports whether two parameters dictionaries are equivalent. - - @param params1 The first dictionary. - @param params2 The second dictionary. - @return True if equivalent. - */ - AIAPI AIBoolean (*Equiv)(ConstAIDictionaryRef params1, ConstAIDictionaryRef params2); - - /** Accumulates common parameters in a dictionary to be used later with \c #ApplyParams(). - Call repeatedly with different parameter sets to collect the combined BeautifulStrokes - attributes of multiple objects (or multiple art styles). You can use this to collect - common attributes of objects that are not necessarily selected, or to ignore some of - the selected objects, such as finding the combined BeautifulStrokes attributes of - all the objects on a layer, whether they are selected or not. - - @param effectParams A set of LiveEffect parameters containing a Beautiful Strokes params dictionary. - @param accumulator Common parameters being accumulated. - */ - AIAPI AIErr (*AccumulateParams)(ConstAILiveEffectParameters effectParams, AIDictionaryRef accumulator); - - /** Applies a set of parameters from one dictionary to another. For keys that exist in both dictionaries, - the value from the source overwrites the value in the destination. - - @param params The source dictionary containing a set of parameters to be applied. - Typically obtained from \c #AIPathStyle::GetCurrentPathStyle(), from an art object or art style. - If an accumulated dictionary is passed as the source, values that vary (were mixed in the selection) - do not change value in the target dictionary. This is consistent with the behavior of - \c #AIPathStyle::SetCurrentPathStyle(). See also \c #AccumulateParams(). - @param target The target dictionary. - */ - AIAPI AIErr (*ApplyParams)(ConstAIDictionaryRef params, AIDictionaryRef target); - - /** Reports whether a dictionary contains meaningful Beautiful Strokes parameters. - (Note that this function returns a Boolean value, not an error code.) - Call on an accumulator to check whether it contains any BeautifulStrokes parameters; - if not, it can be freed or ignored. See \c #AccumulateParams(). - Both a used accumulator and a new dictionary contain some bookkeeping entries, so you cannot just - check for the dictionary being empty of all keys. A new dictionary just created by - \c #CreateParamsDict() returns false to this call.
- - This does not recurse into sub-dictionaries. To test for nested dictionaries, - call \c #GetParamsDict(), and if it is non-null check the contained dictionary. - - @param paramsDict Dictionary to be examined. - @return True if the dictionary contains Beautiful Strokes parameters. - */ - AIAPI AIBoolean (*ContainsParams)(ConstAIDictionaryRef paramsDict); - - /** Retrieves the BeautifulStrokes params dictionary, if any, associated with the focal stroke of an art object. Optionally - retrieves the stroke style and other information about the stroke attributes. - - @param art The art object. - @param paramDict [out] A reference in which to return the BeautifulStrokes params dictionary, or null if none. - The reference count on this dictionary is incremented on return and must be released when - no longer needed. - @param strokeStyle [out][optional] A buffer in which to return the focal stroke style from the paint attributes. - @param hasBrush [out][optional] A buffer in which to return true if the focal stroke carries a brush effect. - @param scaleFactor [out][optional] A buffer in which to return the combined scale factor that incorporates: - the object scale factor reported by \c #AIArtStyleSuite::GetArtStyleScaleFactor(), - the width of the art design on art brushes or the side tile on pattern brushes, - and the scale factor from the brush options for brushes.
- Multiplying these widths by this factor gives the width that the stroke edges - preview at, assuming that any brush art fills the brush tile boundaries.
- (Does not include the stroke weight or the width returned by \c #GetWidthAtDistance(), and so on.) - @param canAccept [out][optional] A buffer in which to return true if the art object has a style that can accept - BeautifulStrokes parameters. - (For CS5, it has a stroke, and the focal stroke is not a Calligraphic or Scatter brush, and is - not inside/outside aligned.) - */ - AIAPI AIErr (*GetArtStrokeParams)(AIArtHandle art, AIDictionaryRef ¶mDict, - AIStrokeStyle *strokeStyle, AIBoolean *hasBrush, - AIReal *scaleFactor, AIBoolean *canAccept); - - /** Interpolates beautiful stroke parameters between two appearances. - - @param effectParams1 [optional] The effects parameters dictionary of a stroke filter, - which may (or may not) contain a Beautiful Strokes params dictionary. - @param effectParams2 [optional] The effects parameters dictionary of a stroke filter - which may (or may not) contain a Beautiful Strokes params dictionary. - @param effectParamsOut The effects parameters dictionary of a stroke filter that represents the results - of interpolating between effectParams1 and effectParams2. - @param dist A number in the range [0-1], where 0 is interpreted as matching effectParams1, - and 1 is interpreted as matching effectParams2. (Negative values are interpreted - as if they were 0, and values greater than 1 as if they were 1.) - - If either effectParams1 or effectParams2 contains a Beautiful Strokes parameter dictionary, then those parameters - will be interpolated, and the results placed in effectParamsOut (which should not be null if either input parameter - is null.) - */ - AIAPI AIErr (*InterpolateParams)(ConstAILiveEffectParameters effectParams1, ConstAILiveEffectParameters effectParams2, - AILiveEffectParameters effectParamsOut, AIReal dist); - - // General brush settings - - /** Sets the option in a Beautiful Strokes dictionary to flip art across path to reverse vertical orientation. - - @param params The dictionary. - @param flipAcross True to set the option, false to clear it. - */ - AIAPI AIErr (*SetFlipAcross)(AIDictionaryRef params, AIBoolean flipAcross); - - /** Retrieves the option from a Beautiful Strokes dictionary to flip art across path to reverse vertical orientation. - Note that this function returns a Boolean value, not an error code. - - @param params The dictionary. - @return True if the option is set, false if it is clear. - */ - AIAPI AIBoolean (*GetFlipAcross)(ConstAIDictionaryRef params); - - /** Sets the option in a Beautiful Strokes dictionary to flip art along path to reverse lateral orientation. - - @param params The dictionary. - @param flipAlong True to set the option, false to clear it. - */ - AIAPI AIErr (*SetFlipAlong)(AIDictionaryRef params, AIBoolean flipAlong); - - /** Retrieves the option from a Beautiful Strokes dictionary to flip art along path to reverse lateral orientation. - Note that this function returns a Boolean value, not an error code. - - @param params The dictionary. - @return True if the option is set, false if it is clear. - */ - AIAPI AIBoolean (*GetFlipAlong)(ConstAIDictionaryRef params); - - /** Sets the scale (width) of art applied to path in a Beautiful Strokes dictionary. - - @param params The dictionary. - @param scale Single scale for art not using tablet data. - @param mnScale [optional] Minimum scale for art using tablet data. - @param mxScale [optional] Maximum scale for art using tablet data. - */ - AIAPI AIErr (*SetScale)(AIDictionaryRef params, AIReal scale, const AIReal *mnScale, const AIReal *mxScale); - - /** Retrieves the scale (width) of art applied to path from a Beautiful Strokes dictionary. - - @param params The dictionary. - @param scale [out] A reference in which to return the single scale for art not using tablet data. - @param mnScale [optional] [out] A buffer in which to return the minimum scale for art using tablet data. - @param mxScale [optional] [out] A buffer in which to return the maximum scale for art using tablet data. - */ - AIAPI AIErr (*GetScale)(ConstAIDictionaryRef params, AIReal &scale, AIReal *mnScale, AIReal *mxScale); - - /** Set fold adjustment on or off. This adjusts the brush folding across corners or bends. - */ - AIAPI AIErr (*SetFoldAdjustment)(AIDictionaryRef params, AIBoolean adjust); - - /** Retrieves the fold adjustment status from a Beautiful Strokes dictionary. - This adjusts the folding across corners or bends. - Note that this function returns a Boolean value, not an error code. - - @param params The dictionary. - @param mixed [optional] [out] A buffer in which to return true if the dictionary represents an accumulation - returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed. - By convention, mixed values return false. - @return True if the option is set, false if it is clear. - */ - AIAPI AIBoolean (*GetFoldAdjustment)(ConstAIDictionaryRef params, AIBoolean *mixed); - - // Art Brushes - - /** Sets the pattern to be applied along path in a Beautiful Strokes dictionary. - - @param params The dictionary. - @param art The brush pattern. - */ - AIAPI AIErr (*SetArtPaint)(AIDictionaryRef params, AIPatternHandle art); - - /** Retrieves the pattern to be applied along path from a Beautiful Strokes dictionary. - Note that this function returns an object, not an error code. - - @param params The dictionary. - @return The brush pattern. - */ - AIAPI AIPatternHandle (*GetArtPaint)(ConstAIDictionaryRef params); - - /** Sets the stretching option in a Beautiful Strokes dictionary. - - @param params The dictionary. - @param stretch True to stretch tiles non-uniformly along the path, false to scale - up uniformly for the path length. - */ - AIAPI AIErr (*SetStretch)(AIDictionaryRef params, AIBoolean stretch); - - /** Retrieves the stretching option from a Beautiful Strokes dictionary. - Note that this function returns a Boolean value, not an error code. - - @param params The dictionary. - @return True if the option is set (stretch tiles non-uniformly along the path), - false if it is clear (scale up uniformly for the path length). - */ - AIAPI AIBoolean (*GetStretch)(ConstAIDictionaryRef params); - - /** Sets the lengths of non-stretching start and end segments for a segmented brush in a Beautiful Strokes dictionary. - Lengths are expressed as absolute values in document points. If both values are zero, the brush is a non-segmented brush. - - @param params The dictionary. - @param startSegmentLength Length of start segment. - @param endSegmentLength Length of end segment. - */ - AIAPI AIErr (*SetStartEndSegmentLength)(AIDictionaryRef params, AIReal startSegmentLength, AIReal endSegmentLength); - - /** Retrieves the lengths of non-stretching start and end segments for a segmented brush from a Beautiful Strokes dictionary. - Lengths are expressed as absolute values in document points. - - @param params The dictionary. - @param startSegmentLength [out] A reference in which to return the start-segment length. - @param endSegmentLength [out] A reference in which to return the end-segment length. - */ - AIAPI AIErr (*GetStartEndSegmentLength)(ConstAIDictionaryRef params, AIReal &startSegmentLength, AIReal &endSegmentLength); - - // Pattern Brushes - - /** Sets options for repeating pattern tiles along a path in a Beautiful Strokes dictionary. - - @param params The dictionary. - @param beginArt Brush pattern tile art to be applied to the beginning of the path. May be NULL. - @param endArt Brush pattern tile art to be applied to the end of the path. May be NULL. - @param sideArt Brush pattern tile art to be applied to the main part of the path. May be NULL. - @param insideCornerArt Brush pattern tile art to be applied to inside corners of the path. May be NULL. - @param outsideCornerArt Brush pattern tile art to be applied to outside corners of the path. May be NULL. - @param adjustment Method to use to apply art along path; see \c #RepeatedArtAdjustment(). - @param spacing Relative spacing between tiles; for example, 0.5 sets spacing to half - the width of the tile. Relevant only when adjustment method is \c #kAddSpace. - */ - AIAPI AIErr (*SetArtPatternPaint)(AIDictionaryRef params, AIPatternHandle beginArt, AIPatternHandle endArt, - AIPatternHandle sideArt, - AIPatternHandle insideCornerArt, AIPatternHandle outsideCornerArt, - RepeatedArtAdjustment adjustment, AIReal spacing); - - /** Retrieves options for repeating pattern tiles along a path from a Beautiful Strokes dictionary. - - @param params The dictionary. - @param beginArt [out] A reference in which to return the brush pattern tile art to be - applied to the beginning of the path. May be NULL. - @param endArt [out] A reference in which to return the brush pattern tile art to be - applied to the end of the path. May be NULL. - @param sideArt [out] A reference in which to return the brush pattern tile art to be - applied to the main part of the path. May be NULL. - @param insideCornerArt [out] A reference in which to return the brush pattern tile art - to be applied to inside corners of the path. May be NULL. - @param outsideCornerArt [out] A reference in which to return the brush pattern tile art - to be applied to outside corners of the path. May be NULL. - @param adjustment [out] A reference in which to return the method to use to apply art along path; - see \c #RepeatedArtAdjustment(). - @param spacing [out] A reference in which to return the relative spacing between tiles. - For example, 0.5 sets spacing to half the width of the tile. - Relevant only when adjustment method is \c #kAddSpace. - */ - AIAPI AIErr (*GetArtPatternPaint)(ConstAIDictionaryRef params, AIPatternHandle &beginArt, AIPatternHandle &endArt, - AIPatternHandle &sideArt, - AIPatternHandle &insideCornerArt, AIPatternHandle &outsideCornerArt, - RepeatedArtAdjustment &adjustment, AIReal &spacing); - - // Dashing - - /** Sets or clears the dash adjustment option in a Beautiful Strokes dictionary. - When on, adjusts dashes so a certain fraction of the dash length always appears - at the ends, corners, and intersections of dashed lines. - (Note that dash/gap intervals are obtained from the art.) - - @param params The dictionary. - @param adjust True to set the option, false to clear it. - */ - AIAPI AIErr (*SetDashAdjustment)(AIDictionaryRef params, AIBoolean adjust); - - /** Retrieves the dash adjustment status from a Beautiful Strokes dictionary. - See \c #SetDashAdjustment(). - (Note that this function returns a Boolean value, not an error code.) - - @param params The dictionary. - @param mixed [optional] [out] A buffer in which to return true if the dictionary represents an accumulation - returned from \c #AIPathStyleSuite::GetCurrentPathStyle(), and the selection is mixed. - By convention, mixed values return false. - @return True if the option is set, false if it is clear. - */ - AIAPI AIBoolean (*GetDashAdjustment)(ConstAIDictionaryRef params, AIBoolean *mixed); - - // Arrowheads - - /** Sets arrowhead-related stroke options in a Beautiful Strokes dictionary. - The arrowhead symbols can be in a library rather than the current document. If so, they are retargeted to the - document that the params dictionary is attached to, and placed in the "hidden symbols" of that document; - that is, they do not appear in the Symbols panel. The symbols are parsed to determine the alignment - parameters and the default scale. - - Any unpainted closed rectangle in the back of the symbol definition is ignored and stripped from - the art that is used to determine the "tip" of the arrow and placed on the path. These unpainted - rectangles are assumed to be only for the purpose of making the symbol thumbnails a uniform size. - - Arrowhead art inside the symbol is assumed to be positioned the way it would be when applied as an - end arrow to a horizontal open path that started at the left and ended at the right. - If applied as a start arrow, it is reflected horizontally before it is applied. - - If there is a stroked open straight line in the back of the symbol definition (either above or below - the bounding rectangle if there is one), then the right endpoint of that line is used to specify the - truncation point. If it additionally has an internal anchor point, the furthest right such anchor point - is used to specify the attachment point, otherwise the attachment point is the same as the truncation point. - - The tip is treated as the point along the right edge of the bounding box (after removing the bounding tile, - if any) which is at the same height as the positioning line. The stroke weight of the positioning line - is used to determine the default scale of the arrowhead. For example, if the positioning stroke is 2 pts, then - the arrowhead is scaled 50% when it is applied to a path with a 1 pt stroke, and scaled 150% when it - is applied to a path with a 3 pt stroke. The begin-scale or end-scale factors are applied additionally. - - If there is no positioning line, the default is to use a 100% default scale; that is, to treat the symbol - as if it were scaled appropriately for a 1 pt line, and to put both the attachment and truncation points - in the center of the symbol. - - @param params The dictionary. - @param beginSymbol A pointer to the symbol to apply as the arrowhead at the beginning of the path. - To not change the existing settings, pass null. To remove the arrowhead, - pass a pointer to null. - @param endSymbol The symbol to apply as the arrowhead at the end of the path, null if none - To not change the existing settings, pass null. To remove the arrowhead, - pass a pointer to null. - @param beginScale The factor by which to scale the begin arrow by, as a percentage relative - to the default scale. To not change the existing settings, pass \c #kAIRealUnknown. - @param endScale The factor by which to scale the end arrow by, as a percentage relative - to the default scale. To not change the existing settings, pass \c #kAIRealUnknown. - @param alignment The rule for positioning the arrows at the ends of the path. - To not change the existing settings, pass \c #kUnknownArrowAlignment. - */ - AIAPI AIErr (*SetArrowheadOptions)(AIDictionaryRef params, AIPatternHandle *beginSymbol, AIPatternHandle *endSymbol, - AIReal beginScale, AIReal endScale, ArrowTipAlignment alignment); - - /** Retrieves arrowhead-related stroke options from a Beautiful Strokes dictionary. - All pointer arguments are optional and may be null if those options are not being queried. - - @param params The dictionary to be searched. May be an accumulation of multiple paths, if - returned from \c #AIPathStyleSuite::GetCurrentPathStyle(). - @param beginSymbol [out] A buffer in which to return the symbol used as the arrowhead at the beginning of the path, null if none. - @param endSymbol [out] A buffer in which to return the symbol used as the arrowhead at the end of the path, null if none. - @param beginScale [out] A buffer in which to return the factor to uniformly scale the begin arrow by, as a percentage relative to the default scale. - Returns \c #kAIRealUnknown if the params dict represents an accumulation with mixed values. - @param endScale [out] A buffer in which to return the factor to scale the end arrow by, as a percentage relative to the default scale - Returns \c #kAIRealUnknown if the params dict represents an accumulation with mixed values. - @param alignment [out] A buffer in which to return the rule for positioning the arrows at the ends of the path. Must be the same for both ends. - Returns \c #kUnknownArrowAlignment if the params dict represents an accumulation - and the selection is mixed (including if some paths have no arrowheads). - @param mixedBeginArrows [out] A buffer in which to return true if there are different choices for the begin-symbol in a mixed selection - (including if some paths have no begin arrow and some do.) - @param mixedEndArrows [out] A buffer in which to return true if there are different choices for the end-symbol in a mixed selection - (including if some paths have no begin arrow and some do.) - */ - AIAPI AIErr (*GetArrowheadOptions)(ConstAIDictionaryRef params, AIPatternHandle *beginSymbol, AIPatternHandle *endSymbol, - AIReal *beginScale, AIReal *endScale, ArrowTipAlignment *alignment, - AIBoolean *mixedBeginArrows, AIBoolean *mixedEndArrows); - - // Variable Widths - - /** Sets the source of stroke width in a Beautiful Strokes dictionary. - - @param params The dictionary. - @param source Source of width information for stroke. If \c #kTabletData, set related values - with \c #SetWidthTabletDataSource() and \c and #SetScale(), particularly minimum and maximum.
- If \c #kUserProfile, call \c #SetCenteredWidthProfile() to set centered width values or - \c #SetUncenteredWidthProfile() to set independent left and right width values. - */ - AIAPI AIErr (*SetWidthSource)(AIDictionaryRef params, StrokeWidthSource source); - - /** Retrieves the source of stroke width from a Beautiful Strokes dictionary. - (Note that this function returns a constant value, not an error code.) - - @param params The dictionary. - @return The width source constant. - */ - AIAPI StrokeWidthSource (*GetWidthSource)(ConstAIDictionaryRef params); - - /** Sets the type of tablet data to use for stroke width in the art passed to \c #GenerateArt(), - in a Beautiful Strokes dictionary. - - @param params The dictionary. - @param dataType The type of tablet data. - @see \c #AITabletDataType - */ - AIAPI AIErr (*SetWidthTabletDataSource)(AIDictionaryRef params, AITabletDataType dataType); - - /** Retrieves the tablet-data type option from a Beautiful Strokes dictionary. - - @param params The dictionary. - @param dataType The type of tablet data to use for stroke width in the art passed to \c #GenerateArt(). - @see \c #AITabletDataType - */ - AIAPI AIErr (*GetWidthTabletDataSource)(ConstAIDictionaryRef params, AITabletDataType &dataType); - - /** Sets centered width profile for output art in a Beautiful Strokes dictionary. Pass NULL for both arrays to clear the profile. - A style cannot carry both an uncentered and centered width profile, so if there is an existing - centered width profile, this function removes it. - - Other than length, the array values are not examined for validity at the time they are set. - Instead, they are examined when used, and any invalid entries are ignored. - A width profile in which all the array entries are used to form the stroke contour - has the following properties: -
  • The first distance is 0
  • -
  • The last distance is 1
  • -
  • Every distance value should be no less than the previous distance, and no more than the next one
  • -
  • There should be no more than two consecutive distance values at the same distance
- When interpreting the width profile: -
  • If the first distance value is not zero, the function acts as if there was an additional value - at the beginning of both arrays, with the distance being zero and the width being whatever - the width is in the first entry in the widths array.
  • -
  • If any distance value is more than 1, or less than the preceding distance value, or equal - to both the preceding distance value and the following distance value, the function ignores - the array entries at that index
  • -
  • If the last distance value is not 1, the function acts as if there were an additional pair of - entries with the distance equal to 1, and the width equal to the width at the last valid - distance entry
  • -
  • Negative values are interpreted as if they were 0. Values greater than 1 are allowed, but cause - the stroke to be wider at those places than the width shown in the Stroke panel, so should be avoided. - - Note that this differs from the interpretation of widths in the functions such as \c #SetCenteredWidthAtDistance() - that take a path object and query or modify the width at specific offsets; these incorporate the stroke weight scaling. - This is because the functions that manage entire width arrays may be dealing with profiles that are shared across multiple - paths of different weights or belong to unattached preset dictionaries.
- - @param params The dictionary. - @param tVals An array of \c AIReal values ranging from [0-1] representing fractional distances - along the path. - @param widths An array of \c AIReal values the same size as \c tVals representing the fractional stroke width - at the corresponding offset in the \c tVals array. Values are fractions of the stroke weight - as shown in the Stroke panel, in the range [0-1]. - @return The error \c #kBadParameterErr if the arrays are of different lengths, or if one is null and the other is not. - */ - AIAPI AIErr (*SetCenteredWidthProfile)(AIDictionaryRef params, AIArrayRef tVals, AIArrayRef widths); - - /** Retrieves the centered width profile for output art from a Beautiful Strokes dictionary. - - @param params The dictionary. - @param distances A reference in which to return an array of \c AIReal values ranging from [0-1] representing fractional distances - along the path. - @param widths A reference in which to return an array of \c AIReal values the same size as \c tVals representing the fractional stroke width - at the corresponding offset in the \c tVals array. - */ - AIAPI AIErr (*GetCenteredWidthProfile)(ConstAIDictionaryRef params, AIArrayRef &distances, AIArrayRef &widths); - - /** Sets an uncentered width profile for output art in a Beautiful Strokes dictionary, with independent - left and right width values. Left and right are interpreted by following the path - from the start point to the end point. - A path cannot carry both an uncentered and centered width profile, so if there is an existing - centered width profile, this function removes it. - - @param params The dictionary. - @param tVals An array of \c AIReal values ranging from [0-1] representing fractional distances - along the path. - @param leftWidths An array of \c AIReal the same size as \c tVals representing the width of the left side - of the stroke at corresponding distances in \c tVals. - @param rightWidths An array of \c AIReal the same size as \c tVals representing the width of the right side - of the stroke at corresponding distances in \c tVals. - */ - AIAPI AIErr (*SetUncenteredWidthProfile)(AIDictionaryRef params, AIArrayRef tVals, AIArrayRef leftWidths, AIArrayRef rightWidths); - - /** Retrieves the uncentered width profile for output art from a Beautiful Strokes dictionary. - - @param params The dictionary. - @param tVals A reference in which to return an array of \c AIReal values ranging from [0-1] representing fractional distances - along the path. - The reference count on this array is incremented on return and must be released when no longer needed. - @param leftWidths A reference in which to return an array of \c AIReal the same size as \c tVals representing the width of the left side - of the stroke at corresponding distances in \c tVals. - The reference count on this array is incremented on return and must be released when no longer needed. - @param rightWidths A reference in which to return an array of \c AIReal the same size as \c tVals representing the width of the right side - of the stroke at corresponding distances in \c tVals. - The reference count on this array is incremented on return and must be released when no longer needed. - */ - AIAPI AIErr (*GetUncenteredWidthProfile)(ConstAIDictionaryRef params, AIArrayRef &tVals, AIArrayRef &leftWidths, AIArrayRef &rightWidths); - - /** INTENDED FOR FUTURE ENHANCEMENTS - All non-default options are currently ignored. - Can only be called after setting the width profile with \c #SetCenteredWidthProfile() or \c #SetUncenteredWidthProfile(). - If not present (the usual case), all width markers use default options, which are dependent upon the context. All arrays can be null. - The defaults are for markers that are concurrent with corner anchor points of the path to be treated as - tethered corner width markers, and for all other markers to be untethered smooth markers, with the - default smoothness values. - - To save space, there is a single array of marker options for both centered and uncentered width profiles, - with different flag values to distinguish when the options are different for the left and right sides - of the stroke (for example, if it is smooth on the left side but cornered on the right.) - If an incoming smoothness array exists but the outgoing smoothness array does not exist on that side - of the path, then the outgoing smoothness is inherited from the incoming smoothness. - Similarly, if the left smoothness array(s) exist but the right smoothness arrays do not, then - the right smoothness is inherited from the left smoothness. - - You must only call this function AFTER either \c #SetCenteredWidthProfile() or \c #SetUncenteredWidthProfile(); - it returns /c #kBadParameterErr if any of the arrays are non-null and either there is no width profile, - or the existing width profile has a different number of markers than the size of the detail arrays. - No validation is done on the contents of the arrays, other than their lengths. - - @param params The dictionary. - @param markerOptions An array of integers parallel to the t values, interpreted as a bit vector - of WidthMarkerFlagValues - @param incomingLeftSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, - ranging from minimally smooth at 0 to maximally smooth at 1. - @param outgoingLeftSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, - ranging from minimally smooth at 0 to maximally smooth at 1. - @param incomingRightSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, - ranging from minimally smooth at 0 to maximally smooth at 1. - @param outgoingRightSmoothness An array of \c AIReal numbers ranging from [0-1] parallel to the t values, - ranging from minimally smooth at 0 to maximally smooth at 1. - @return The error \c #kBadParameterErr if any of the arrays are non-null - and either there is no width profile, or the existing width profile - has a different number of markers than the size of the detail arrays. - */ - AIAPI AIErr (*SetWidthProfileDetails)(AIDictionaryRef params, AIArrayRef markerOptions, - AIArrayRef incomingLeftSmoothness, AIArrayRef outgoingLeftSmoothness, - AIArrayRef incomingRightSmoothness, AIArrayRef outgoingRightSmoothness); - - /** Retrieves the options for the width profile markers from a Beautiful Strokes dictionary. - - @param params The dictionary. - @param markerOptions A reference in which to return an array of integers parallel to the t values, interpreted as a bit vector of \c #WidthMarkerFlagValues. - The reference count on this array is incremented on return and must be released when no longer needed. - @param incomingLeftSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. - The reference count on this array is incremented on return and must be released when no longer needed. - @param outgoingLeftSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. - The reference count on this array is incremented on return and must be released when no longer needed. - @param incomingRightSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. - The reference count on this array is incremented on return and must be released when no longer needed. - @param outgoingRightSmoothness A reference in which to return an array of \c AIReal numbers parallel to the t values. - The reference count on this array is incremented on return and must be released when no longer needed. - */ - AIAPI AIErr (*GetWidthProfileDetails)(ConstAIDictionaryRef params, AIArrayRef &markerOptions, - AIArrayRef &incomingLeftSmoothness, AIArrayRef &outgoingLeftSmoothness, - AIArrayRef &incomingRightSmoothness, AIArrayRef &outgoingRightSmoothness); - - /** If a path has variable widths (either centered or uncentered), retrieves a vector of the values - from the distance array, after adjustment to shift any anchored width points to the relative - distance along that path of the path positions they are anchored to. -
  • If the path has no variable widths, the returned vector is empty.
  • -
  • If the path has variable widths but no width profile anchors, the returned vector contains - the same distance values that are in the distance array returned - by \c #GetCenteredWidthProfile() or \c #GetUncenteredWidthProfile().
- - @param path The path. - @param adjustedDistances A reference in which to return the result vector. The reference - count on this array is incremented on return and must be released - when no longer needed. - */ - AIAPI AIErr (*GetPathAdjustedWidthDistances)(AIArtHandle path, AIArrayRef &adjustedDistances); - - /** Retrieves the left, right, and combined widths of the focal stroke at a fraction of the distance along a path, - and reports the source of the widths. - The widths are analogous to the stroke weights as returned by the \c #AIArtStyle::GetPaintAttributes(). - As such, they include the stroke weight scaling, but do not include the impact of pattern or art brush - scale options or pattern or art brush tile sizes. - - @param path [in] The path to be examined for width data. - @param lengthFraction [in/out] Upon input, the fraction of the path length at which the width is being queried. - Upon output, if the width source is \c #kCenteredProfileMark or \c #kUncenteredProfileMark, the - possibly snapped position of that mark. To find whether snapping has occurred, - cache the original length fraction and compare it to the returned value. - @param tolerance [in] If positive and the path has a user-specified variable width profile, - and the input length fraction is within this tolerance of one of the t values in the - width array, then the length fraction is snapped to that t value. If zero - or negative, a tolerance of .001 is used. - @param totalWidth [out][optional] A buffer in which to return the total width at the given position, - as obtained from the width source. - @param leftWidth [out][optional] A buffer in which to return the stroke width on the left side of the path - at the given position, as obtained from the width source. - @param rightWidth [out][optional] A buffer in which to return the stroke width on the right side of the path - at the given position, as obtained from the width source. - @param widthSource [out][optional] A buffer in which to return the width-source constant. It will be one of kConstantWidth, kTabletData, - kCenteredProfileMark, kUncenteredProfileMark, kCenteredProfileInterpolation, kUncenteredProfileInterpolation. - @param markerIndex [out][optional] A buffer in which to return the marker index. If width source is from a centered - or uncentered profile, the index into the parallel t and width arrays of the marker. - For \c #kCenteredProfileMark and \c #kUncenteredProfileMark, - it is the index of the marker at that location; for \c #kCenteredProfileInterpolation and - \c #kUncenteredProfileInterpolation, it is the index of the preceding marker. - @param markerDetails [in/out][optional] On input, the only meaningful flag values are \c #kIncomingWidthMarker and - \c #kOutgoingWidthMarker. These specify which of the two markers should be returned in - the event that there are two markers at exactly the input length fraction. (If snapping - occurs, then the flags are ignored; the incoming marker is returned when - it snaps upward, and the outgoing when it snaps downward.) If null - or if neither or both of those flags are on, and there are two markers - at exactly the input length fraction, then the larger of the two is returned. - On output, if width source is \c #kCenteredProfileMark or \c #kUncenteredProfileMark, can - contain one of \c #kIncomingWidthMarker or \c #kOutgoingWidthMarker, and/or \c #kCornerWidthMarker. - */ - AIAPI AIErr (*GetWidthsAtDistance)(AIArtHandle path, AIReal &lengthFraction, AIReal tolerance, - AIReal *totalWidth, AIReal *leftWidth, AIReal *rightWidth, - StrokeWidthSource *widthSource, short *markerIndex, WidthMarkerFlags *markerDetails); - - /** Sets the total width of the focal stroke at a given fraction of the distance along the path. (If lengthFraction is within - 0.001 of an existing t value in the width profile, modifies the existing width at that t value rather than - inserting a new one.) -
  • If there is already a centered width profile, inserts the indicated value into it.
  • -
  • If there is already an uncentered profile, this is equivalent to setting the left and right widths to half the input width.
  • -
  • If there is not yet any user specified width profile, creates a centered width profile from the current stroke source - and then modifies it and sets the stroke-width source to \c #kUserProfile.
- - @param path The path. - @param lengthFraction A fraction of the distance along the path at which to set the width. If within 0.001 of an existing t value - in the width profile, modifies the existing width at that t value rather than inserting a new one. - @param width The new width. - @param options A logical OR of bit flags that determine how to perform the operation. - */ - AIAPI AIErr (*SetCenteredWidthAtDistance)(AIArtHandle path, AIReal lengthFraction, AIReal width, WidthMarkerFlags options); - - /** Sets the left and right widths of the focal stroke at a given fraction of the distance along the given path. (If lengthFraction - is within 0.001 of an existing t value in the width profile, modifies the existing width at that t value - rather than inserting a new one.) -
  • If there is already an uncentered width profile, it inserts the indicated values into it.
  • -
  • If left and right widths are equal and there is already a centered width profile, inserts their sum into it.
  • -
  • If left and right widths are unequal and there is not yet an uncentered width profile, or if they are equal - and there is not yet any width profile, it creates one from the current stroke source and then modifies it - and sets the stroke-width source to \c #kUserProfile.
- - @param path The path. - @param lengthFraction A fraction of the distance along the path at which to set the width. If within 0.001 of an existing t value - in the width profile, modifies the existing width at that t value rather than inserting a new one. - @param leftWidth The new left width. - @param rightWidth The new right width. - @param options A logical OR of bit flags that determine how to perform the operation. - */ - AIAPI AIErr (*SetUncenteredWidthsAtDistance)(AIArtHandle path, AIReal lengthFraction, - AIReal leftWidth, AIReal rightWidth, WidthMarkerFlags options); - - /** Moves the width marker at the given index to a new t value. If the given marker is incoming-only or - outgoing-only due to two markers being at the same t value, both are moved together. - Only the content of the tValue array changes, so this works for either centered or non-centered widths. - - @param path The path. - @param markerIndex The 0-based index position of the marker to move. - @param newTValue [in, out] Fraction of length along whole path to which the marker should be moved. - In the range [0-1]. - @param options A logical OR of bit flags that determine how to perform the operation: -
  • If \c #kCopyMarker is on, the marker is duplicated and the new copy moved, while the old - one remains at the prior location. There must always be a marker at 0 and one at 1, - so any movement of the first or last marker is implicitly a duplication even if this flag is off.
  • -
  • If \c #kSpreadWidthChanges is on, the other markers on the side that this marker is moving - away from are spread out proportionally to cover the larger distance, and the other markers - on the side that this marker is moving towards are compressed proportionally to fit in the - smaller distance. The scope of the spreading is limited by the selection state and corner - status of the adjacent anchor points.
  • -
  • If \c #kSpreadWidthChanges is off and \c #kLimitAtNeighbors is on, and there is another width marker - between the current t value at the given index and the new t value, then the marker stops - when it hits the adjacent marker. No error code is returned in this case, but \c newTValue - is updated to the actual destination. To determine whether it stopped, cache the original - value and compare with the returned value. - (Note that this causes the two markers at the same location to become an incoming-only - outgoing only pair where the width may jump discontinuously.)
  • -
  • If \c #kSpreadWidthChanges and \c #kLimitAtNeighbors are both off, then the moved marker is allowed - to jump past other markers as if they were not there.
  • -
- @return The error \c #kBadParameterErr if the path does not have a user width profile or - if the new t value is not in the range [0-1]. - */ - AIAPI AIErr (*SlideWidthMarkerToNewT)(AIArtHandle path, short markerIndex, AIReal &newTValue, WidthMarkerFlags options); - - /** Deletes the width point at the given index position from the given path. The first and last width points cannot be deleted. - - @param path The path. - @param markerIndex The index position of the point to delete. - */ - AIAPI AIErr (*DeleteWidthPoint)(AIArtHandle path, short markerIndex); - - /** Adds, removes, or reindexes width profile anchors as needed before editing a path. - An editing tool or command calls this before modifying the geometry of a path - or applying a different art style. - - Modifies anchors at a subset of the same places that cause \c #kSelectorAINotifyEdits - to be sent to plug-in groups ancestral to the edited path. It is not necessary to send this message - if the path is being transformed in its entirety in a way that does not change the relative lengths - of path segments. - - If width anchors already exist at the relevant anchor points, and the numbers of anchor points are - not changing, does nothing. - - @param path The path to be edited. - @param editDescription The type of edit to be done. - */ - AIAPI AIErr (*AdjustWidthAnchorsBeforePathEdit)(AIArtHandle path, const PathEditDescription &editDescription); - - /** Tests whether a cursor point on a path is within a given tolerance of the region covered by the stroke, and if - so, reports additional details about what part of the stroke was hit; see \c #StrokeHitResults. - For brush strokes, the entire region within the brush design's tile box is considered to be stroked. - - @param path The path. - @param cursor The cursor point. - @param tolerance The tolerance value. - @param hitResults A buffer in which to return the result. - */ - AIAPI AIErr (*StrokeHitTest)(AIArtHandle path, const AIRealPoint &cursor, AIReal tolerance, StrokeHitResults *hitResults); - -}; - -#include "AIHeaderEnd.h" -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150Block.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150Block.h deleted file mode 100644 index 383f319..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI150Block.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef __AI150Block__ -#define __AI150Block__ - -/* - * Name: AIBlock.h - * $Revision: 5 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Memory Management Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - -/** @file AI150Block.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIBlockSuiteVersion2 AIAPI_VERSION(2) -#define kAI150BlockVersion kAIBlockSuiteVersion2 - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides a cross-platform way to manage memory. - Use it to request, release, and resize blocks of memory. - The functions are analogous to the standard C library memory allocation - routines or the Mac OS pointer routines. - - In some situations, Illustrator expects memory to be allocated with this suite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIBlockSuite and \c #kAIBlockVersion. -*/ -typedef struct { - /** Allocates new block of memory. - This call is similar to the standard C library \c malloc routine and - the Macintosh Toolbox \c NewPtr. - @param size The number of bytes to allocate. - @param block [out] A buffer in which to return the pointer to - the newly allocated block. - @return The error \c kOutOfMemoryErr if the function fails - due to lack of memory. - */ - AIAPI AIErr (*AllocateBlock) ( long size, void **block ); - /** Releases a block of memory previously allocated with \c #AllocateBlock(). - This call is similar to the standard C library \c free function and - the Macintosh Toolbox \c DisposPtr. - @param block A pointer to the allocated block. - */ - AIAPI AIErr (*DisposeBlock) ( void *block ); - - /** Changes the size of a previously allocated memory block. - This function is similar to the standard C library \c realloc function - and the Macintosh Toolbox \c SetPtrSize. - The function tries to increase the size of the block without changing - its location. If there is not room on the heap, the block is moved and - the new location returned. - @param block A pointer to the previously allocated block. - @param size The number of bytes to allocate. - @param NewBlock [out] A buffer in which to return the pointer to - the newly allocated block. - @return The error \c kOutOfMemoryErr if the function fails - due to lack of memory. - */ - AIAPI AIErr (*ReallocateBlock) ( void *block, long newSize, void **newBlock ); - - /** Gets number of bytes in a memory block. - @param block A pointer to the previously allocated block. - @param size [out] A buffer in which to return the number of bytes. - */ - AIAPI AIErr (*SizeOfMemoryBlock) ( void *block, long *size ); - -} AI150BlockSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Envelope.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Envelope.h deleted file mode 100644 index a9c8f6b..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Envelope.h +++ /dev/null @@ -1,238 +0,0 @@ -#ifndef __AI170Envelope__ -#define __AI170Envelope__ - -/* - * Name: AI170Envelope.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Legacy Envelope Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIEnvelope.h" -#include "AIHeaderBegin.h" - -/** @file AI170Envelope.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI170EnvelopeSuite kAIEnvelopeSuite -#define kAIEnvelopeSuiteVersion3 AIAPI_VERSION(3) -#define kAI170EnvelopeSuiteVersion kAIEnvelopeSuiteVersion3 -#define kAI170EnvelopeVersion kAI170EnvelopeSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite provides functions to create and manage \e envelopes, which allow you to apply - a set of deformations to a set of source art objects. The name derives from the idea of - putting paper artworks into an envelope, then bending or distorting the envelope. - - The source art can be warped or deformed in various ways, as defined by an \c #AIWarpStyle, - with respect to a \e mesh, or grid. The envelope actions are available in the UI - through the Object > Envelope Distort menu. - - Deformations can only be applied directly to paths, compound paths, meshes, and images. - To apply a distortion to other types of art objects in the source art, those objects must - first be \e expanded; that is, converted to paths. Deformation options allow you - to specify which types of art to expand and deform along with the paths and - images. - - The envelope for an art group, which encapsulates the deformation options, - is represented as an art object of type \c #kMeshArt. See also the \c #AIMeshSuite. - - The function \c #DeformArt() allows you to apply the same kinds of deformations - directly to a source art group, without creating an envelope object. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIEnvelopeSuite and \c #kAIEnvelopeVersion. - -*/ -typedef struct { - - /** Creates an envelope for a given set of source art objects, or for the currently - selected art if \c art is \c nil or \c numArt is 0. By default, the new envelope - is fully selected, and placed above the enveloped art object or objects in the paint order. - @param art An array of art objects to be enveloped, or \c nil to create an envelope - for the current selection. Cannot be an art object stored in a dictionary, - but can be the child of art stored in a dictionary. - @param numArt The number of objects in \c art, or 0 to create an - envelope for the current selection. - @param envelopeObject The path art object to use as the new envelope, - or \c nil to use the bounding box of \c art (or of the current selection) - to create a new envelope object. (This would be the topmost selected - object if you create the envelope using Object > Envelope Distort > Make - with Top Object.) - @param options A pointer to the structure that specifies deformation options - for the new envelope. Pass \c nil to use the default options, as specified - by application preferences. - @param envelope [out] A buffer in which to return the new envelope object. - */ - AIAPI AIErr (*MakeEnvelope) ( AIArtHandle* art, ai::int32 numArt, AIArtHandle envelopeObject, - AIEnvelopeOptions* options, AIArtHandle* envelope ); - - /** Redefines an envelope to use a predefined warp style. - The envelope must be in process of mesh-editing; that is, - \c #EditingMesh() would return true for \c envelope. - Upon return the envelope is fully selected. - @param envelope The envelope object. - @param warpStyle The new warp style. - @param bend the new bend amount. - @param horizDistort The horizontal distortion amount. - @param vertDistort The vertical distortion amount. - @param rotate90 When true, apply bend horizontally, when false, apply bend vertically. - */ - AIAPI AIErr (*WarpEnvelope) ( AIArtHandle envelope, AIWarpStyle warpStyle, AIReal bend, - AIReal horizDistort, AIReal vertDistort, AIBoolean rotate90 ); - - /** Replaces an envelope in the document with its source contents (in the original, - undistorted state) and a mesh object. Moves both objects into the art tree, with the mesh object - placed above the content object in the paint order. The content object is selected. - - You cannot release envelopes stored directly in dictionaries, - but you can release the children of envelopes stored in dictionaries. - @param envelope The envelope object. Upon return, this reference is no longer valid. - */ - AIAPI AIErr (*ReleaseEnvelope) ( AIArtHandle envelope ); - - /** Retrieves the distortion options for an envelope. (Note that this function does not - return an error code.) - @param envelope The envelope object. - @param options [out] A buffer in which to return the options structure, - */ - AIAPI void (*GetEnvelopeOptions) ( AIArtHandle envelope, AIEnvelopeOptions* options ); - - /** Sets the distortion options for an envelope. (Note that this function does not - return an error code.) - @param envelope The envelope object. - @param options The new options structure, */ - AIAPI void (*SetEnvelopeOptions) ( AIArtHandle envelope, AIEnvelopeOptions* options ); - - /** Retrieves the default distortion options stored in application preferences. - @param options [out] A buffer in which to return the default options structure, - */ - AIAPI void (*GetCurrentEnvelopeOptions) ( AIEnvelopeOptions* options ); - - /** Reports whether an art object is an envelope. - (Note that this function returns a boolean value, not an error code.) - @param envelope The art object. - @return True if the art object is an envelope. - */ - AIAPI AIBoolean (*IsEnvelope) ( AIArtHandle envelope ); - - /** Reports whether the mesh defining the distortion of an envelope is being edited. - (Note that this function returns a boolean value, not an error code.) - @param envelope The envelope object. - @return True if the mesh is being edited. - @see \c #ToggleEditability(), \c #EditingContents() - */ - AIAPI AIBoolean (*EditingMesh) ( AIArtHandle envelope ); - - /** Reports whether the contents of an envelope are being edited. - (Note that this function returns a boolean value, not an error code.) - @param envelope The envelope object. - @return True if the contents of the envelope are being edited. - @see \c #ToggleEditability(), \c #EditingMesh() - */ - AIAPI AIBoolean (*EditingContents) ( AIArtHandle envelope ); - - /** Switches between editing the mesh and the contents of an envelope. - This is the same as choosing Object > Envelope Distort > Edit Contents - or Object > Envelope Distort > Edit Envelope in the UI. - @param envelope The envelope object. - @see \c #EditingMesh(), \c #EditingContents() - */ - AIAPI AIErr (*ToggleEditability) ( AIArtHandle envelope ); - - /** Retrieves the envelope object for an art group. - @param envelope The art group. - @param envelopeObject [out] A buffer in which to return the envelope object. - - */ - AIAPI AIErr (*GetEnvelopeObject) ( AIArtHandle envelope, AIArtHandle* envelopeObject ); - - /** Sets the envelope object for an art group. - @param envelope The art group. - @param envelopeObject The envelope object, which must be of type \c #kPathArt or - \c #kMeshArt and must not be directly stored in a dictionary. - */ - AIAPI AIErr (*SetEnvelopeObject) ( AIArtHandle envelope, AIArtHandle envelopeObject ); - - /** Retrieves the art objects being deformed by an envelope. - @param envelope The envelope object. - @param objects [out] A buffer in which to return the art group. This can be - the edit group of envelope's source art group if the contents are being - edited (that is, if \c #EditingContents() would return true for \c envelope). - */ - AIAPI AIErr (*GetObjectsInEnvelope) ( AIArtHandle envelope, AIArtHandle* objects ); - - /** Deforms an art object or group using the parameters in a dictionary. Does not - make an envelope object, but deforms the art in the same way an envelope would. - The resulting art object is inserted in the art tree above the original - art object in the paint order. - @param artToDeform The source art object or group, which must have a parent. - The function does not modify this object in any way. - @param deformParams A dictionary containing the deformation parameters. - Contains entries for these keys: \c #kAIDeformMeshKey, \c #kAIDeformFidelityKey, - \c #kAIDeformOptionsKey. - @param srcRect The bounding box of the source space (that is, the size the envelope - would be), or \c nil to use the bounds of the source art. - @param deformedArt [out] A buffer in which to return the resulting art object. - @param progressProc A callback procedure for displaying a progress bar during - computation (from which the user can cancel the operation) - or \c nil to show no progress bar. - @return The error \c #kCanceledErr if user cancels the operation from the - progress bar. - */ - AIAPI AIErr (*DeformArt) ( AIArtHandle artToDeform, - AIDictionaryRef deformParams, - AIRealRect* srcRect, - AIArtHandle* deformedArt, - AIDeformProgressProc progressProc ); - - /** not implemented */ - AIAPI AIErr (*GenerateDeformMeshFromPath)( AIArtHandle pathArt, - AIArtHandle *meshArt ); - - /** Retrieves the type of an envelope (warp, mesh, or object). - @param envelope The envelope object. - @param type [out] A buffer in which to return the envelope type constant. - @note Added in AI13. Previously, the type was not stored with the object. - For envelope objects created in earlier versions, returns - \c #kEnvelopeWarp for Envelope Warp and \c #kEnvelopeMesh for all - other types. - */ - AIAPI AIErr (*GetEnvelopeType) ( AIArtHandle envelope, AIEnvelopeType* type ); - -} AI170EnvelopeSuite; - -#include "AIHeaderEnd.h" - -#endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Tool.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Tool.h deleted file mode 100644 index a91a65a..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170Tool.h +++ /dev/null @@ -1,471 +0,0 @@ -#ifndef __AI170Tool__ -#define __AI170Tool__ - -/* - * Name: AI170Tool.h - * Author: - * Date: - * Purpose: Adobe Illustrator Tool Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2011 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIEvent__ -#include "AIEvent.h" -#endif - -#ifndef __AIFixedMath__ -#include "AIFixedMath.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIToolNames__ -#include "AIToolNames.h" -#endif - - -#ifndef __ASHelp__ -#include "ASHelp.h" -#endif - -#ifndef FLT_MAX -#include -#endif - -#include "AITool.h" -#include "AIHeaderBegin.h" -/** @file AI170Tool.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI170ToolSuite kAIToolSuite -#define kAIToolSuiteVersion13 AIAPI_VERSION(13) -#define kAI170ToolSuiteVersion kAIToolSuiteVersion13 -#define kAI170ToolVersion kAI170ToolSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to provide plug-in tools for Illustrator. - Plug-in tools can work on existing artwork or create new objects. - Tools that you add appear in the Illustrator Tool palette in their own set, - or as part of an existing tool set. Use the functions in this suite - to add tools, set options, and control the tool’s appearance in the palette. - - Typically, you set the options that control the behavior of a plug-in tool - when you install the tool with \c #AIToolSuite::AddTool(). You can modify - them later with \c #AIToolSuite::SetToolOptions(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIToolSuite and \c #kAIToolVersion. - - @section Toolsets Toolsets and Groups in the Tools Palette - - In the Tools palette, \e a toolset is a collection related tools. - When there is more than one tool in a toolset, only the frontmost tool's - icon is shown in the palette, with a triangle in the lower left corner - to indicate the presence of additional tools. The entire toolset - is shown when the user holds the mouse button down on the topmost tool. - - A \e group is a collection of toolsets. Groups are separated by vertical - space in the palette. - - To create a new group or toolset, pass \c #kNoTool for - \c #AIAddToolData::sameGroupAs or \c #AIAddToolData::sameToolsetAs. - For example, to create a new tool group: - @code -toolData.title = "MyTool1"; -toolData.tooltip = "MyTool1 Tooltip"; -toolData.sameGroupAs = kNoTool; -toolData.sameToolsetAs = kNoTool; - @endcode - - To add a new toolset to this group: - @code -toolData.title = "MyTool2"; -toolData.tooltip = "MyTool2 Tooltip"; -error = sTool->GetToolNumberFromName("MyTool1", &toolData.sameGroupAs); -toolData.sameToolsetAs = kNoTool; - @endcode - - To add tools to this toolset: - @code -toolData.title = "MyTool2a"; -toolData.tooltip = "Tool2a Tooltip"; -error = sTool->GetToolNumberFromName("MyTool1", &toolData.sameGroupAs); -error = sTool->GetToolNumberFromName("MyTool2", &toolData.sameToolsetAs); - @endcode - - @section ToolBehavior Tool Behavior - - Implement tool behavior by defining handlers for the caller/selector pairs - and messages that plug-in tools receive, particularly the mouse selectors. - Check for selectors in the plug-in's main function. - - Your mouse selector handlers can create or modify art objects directly. - A tool can select and work on several art objects at once. - The application updates the window between calls to the plug-in, so the - new or changed artwork appears as the mouse moves. - Use \c #AIUndoSuite::UndoChanges() before processing the tool drag, - in order to maintain a known artwork state from which to redraw changes. - - Because multiple plug-ins can be running at once, - the artwork state can change in the course of using your tool. - To verify that a specific artwork state exists, you can use a plug-in - notifier to indicate that the artwork selection or properties - have been changed. See the \c #AINotifierSuite. - - The caller for tool plug-ins is \c #kCallerAITool. - - These selectors are sent: -
\c #kSelectorAIEditToolOptions -
\c #kSelectorAITrackToolCursor -
\c #kSelectorAIToolMouseDown -
\c #kSelectorAIToolMouseDrag -
\c #kSelectorAIToolMouseUp -
\c #kSelectorAISelectTool -
\c #kSelectorAIDeselectTool -
\c #kSelectorAIReselectTool - - These notifiers are related to tools: -
\c #kAIUserToolChangedNotifier -
\c #kAIToolSelectedNotifier -
\c #kAIToolDeselectedNotifier -
\c #kAIToolClearStateNotifier -
\c #kAIToolTitleChangedNotifier -
\c #kAIToolTooltipChangedNotifier -
\c #kAIToolHelpIDChangedNotifier -
\c #kAIToolChangedNotifier -
\c #kAIToolWindowChangedNotifier -
\c #kAIToolSuspendNotifier -
\c #kAIToolResumeNotifier -
\c #kAIEyedropperDragNotifier - - */ -struct AI170ToolSuite { - - /** Installs a plug-in tool. Use at startup. - @param self This plug-in. - @param name The unique name of this tool. - @param data Information on how to display this tool in the Tool palette. - @param options Option flags that control the tool's behavior, a logical OR - of \c #AIToolOptions constants. - @param tool [out] A buffer in which to return the tool reference. If you - install multiple tools, save to compare to the tool reference in tool - message data. - */ - AIAPI AIErr (*AddTool) ( SPPluginRef self, const char *name, - AIAddToolData *data, ai::int32 options, - AIToolHandle *tool ); - - /** For internal use only */ - AIAPI AIErr (*AddToolPrivate) ( SPPluginRef self, const char *name, - AIAddToolDataPrivate *data, ai::int32 options, - AIToolHandle *tool ); - - /** Retrieves the unique identifying name of a tool. - To get the localizable title that appears in the UI, use \c #GetToolTitle(). - @param tool The tool reference. - @param name [out] A pointer to point to the name string. Do - not modify this string. - */ - AIAPI AIErr (*GetToolName) ( AIToolHandle tool, char **name ); - - /** Retrieves the option flags of a tool. To retain the existing flags when - setting options with \c #SetToolOptions(), obtain them with this function - and do a logical OR with the new flags. - @param tool The tool reference. - @param options [out] A buffer in which to return the options value, a logical - OR of \c #AIToolOptions constants. - */ - AIAPI AIErr (*GetToolOptions) ( AIToolHandle tool, ai::int32 *options ); - - /** Sets the option flags of a tool. To retain the existing flags when - setting options, obtain them with \c #GetToolOptions() - and do a logical OR with the new flags. - @param tool The tool reference. - @param options The new options value, a logical OR of \c #AIToolOptions constants. - */ - AIAPI AIErr (*SetToolOptions) ( AIToolHandle tool, ai::int32 options ); - - /** Retrieves the plug-in that installed a tool. - @param tool The tool reference. - @param plugin [out] A buffer in which to return the plug-in reference, - which can be used with \c #AIPluginSuite functions. - */ - AIAPI AIErr (*GetToolPlugin) ( AIToolHandle tool, SPPluginRef *plugin ); - - /** Retrieves the currently selected plug-in tool. If the current tool - is a built-in tool, returns NULL. - See \c #AIToolboxSuite::GetCurrentToolType() or \c #GetCurrentToolName() - for retrieving the current tool including built-in tools. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetSelectedTool) ( AIToolHandle *tool ); - - /** Selects a plug-in tool programmatically. This is the same as the user - selecting the tool in the Tool palette. - To select built-in tools, see \c #SetSelectedToolByName() - @param tool The tool reference. - */ - AIAPI AIErr (*SetSelectedTool) ( AIToolHandle tool ); - - /** Gets the number of installed plug-in tools. Use with \c #GetNthTool() - to iterate through plug-in tools. - @param count [out] A buffer in which to return the number of tools. - */ - AIAPI AIErr (*CountTools) ( ai::int32 *count ); - - /** Retrieves a tool by index position. Use with \c #CountTools() - to iterate through plug-in tools. - @param n The 0-based position index. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetNthTool) ( ai::int32 n, AIToolHandle *tool ); - - /** Retrieves a plug-in tool by its tool number, as assigned when it is created - with \c #AddTool(), and obtained by calling \c #GetToolNumberFromHandle. - See @ref Toolsets. - If the toolNum is the number of a built-in tool, returns NULL, since - built-in tools do not have an AIToolHandle. - @param toolNum The tool number. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetToolHandleFromNumber) ( AIToolType toolNum, AIToolHandle *tool ); - - /** Retrieves a tool number from a tool's unique name. Use to find the numbers of - built-in tools, in order to place your tool in an existing group or toolset. - See @ref Toolsets. - @param name The tool name. The names of Illustrator's built-in tools - can be found in \c AIToolNames.h. - @param toolNum [out] A buffer in which to return the tool number. - */ - AIAPI AIErr (*GetToolNumberFromName) ( const char *name, AIToolType *toolNum ); - - /** Retrieves a tool number for a tool. Use to find the numbers of - plug-in tools, in order to place your tool in an existing group or toolset. - See @ref Toolsets. - @param tool The tool reference. - @param toolNum [out] A buffer in which to return the tool number. */ - AIAPI AIErr (*GetToolNumberFromHandle) ( AIToolHandle tool, AIToolType *toolNum ); - - /** Retrieves the unique name of a tool from its number. To get the localizable - title that appears in the UI, use \c #GetToolTitle(). - @param toolNum The tool number. - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr (*GetToolNameFromNumber) ( AIToolType toolNum, char **name ); - - /** Retrieves the localizable title of a tool, which appears in the UI. - To get the unique, identifying name, use \c #GetToolName(). - @param tool The tool reference. - @param title [out] A pointer to point to the title string. Do not modify - this string. - */ - AIAPI AIErr (*GetToolTitle) ( AIToolHandle tool, char **title ); - - /** Sets the localizable title of a tool, which appears in the UI. - @param tool The tool reference. - @param title The new title string. - */ - AIAPI AIErr (*SetToolTitle) ( AIToolHandle tool, const char *title ); - - - /** Retrieves the tooltip string for a tool. - @param tool The tool reference. - @param tooltip [out] A pointer to point to the tooltip string. Do not modify - this string. - */ - AIAPI AIErr (*GetTooltip) ( AIToolHandle tool, char **tooltip ); - - /** Sets the tooltip string for a tool. - @param tool The tool reference. - @param tooltip The new tooltip string. - */ - AIAPI AIErr (*SetTooltip) ( AIToolHandle tool, const char *tooltip ); - - /** Retrieves the help-system identifier for a tool. - @param tool The tool reference. - @param helpID [out] A buffer in which to return the help ID, - which can be an integer or a pooled string. - */ - AIAPI AIErr (*GetToolHelpID) ( AIToolHandle tool, ASHelpID *helpID ); - - /** Sets the help-system identifier for a tool. - @param tool The tool reference. - @param helpID The new help ID, which can be an integer or a pooled string. - */ - AIAPI AIErr (*SetToolHelpID) ( AIToolHandle tool, ASHelpID helpID ); - - /** Determines which labeled fields are displayed in the Info palette for a tool. - Typically called once at startup to initialize the Info palette. - @param tool The tool reference. - @param infoVars A pointer to the first member of an array of - information variables, which correspond to labeled fields - in Illustrator’s Info palette, as defined in \c #AIToolInfoVariable. - Only the fields included in this array are shown for the tool. - To initialize or set the values in the fields, use \c #SetToolInfoVarValues(). - */ - AIAPI AIErr (*SetToolInfoVars) ( AIToolHandle tool, const ai::int32 infoVars[] ); - - /** Sets field values in the Info palette. Only those fields specified by - \c #SetToolInfoVars() are displayed in the palette. - @param infoVars A pointer to the first member of an array of - information variables, which correspond to labeled fields - in Illustrator’s Info palette. This is the same array specified - by \c #SetToolInfoVars(). - @param values A pointer to the first member of an array of values, - whose positions match those in the \c infoVars array. - - \b Example: -@code -AIErr UpdateInfoPalette( AIToolHandle tool, AIRealPoint origin, AIArtHandle art ) -{ - ASErr error = kNoErr; - if (art) { - static const long infoVars = { kInfoDocX, kInfoDocY, kInfoSizeX, kInfoSizeY, kInfoEndOfList }; - AIReal *infoValues[4]; - AIReal temp[2]; - AIRealRect artBounds; - error = sAIArt->GetArtTransformBounds( art,0, kStroke, &artBounds); - if ( error ) - return error; - temp[0] = artBounds.right - artBounds.left; - temp[1] = artBounds.bottom - artBounds.top; - infoValues[0] = &origin.h; - infoValues[1] = &origin.v; - infoValues[2] = temp; - infoValues[3] = temp +1; - error = sAITool->SetToolInfoVarValues( infoVars, (void**)infoValues); - if ( error ) - return error; - } -} -@endcode - */ - AIAPI AIErr (*SetToolInfoVarValues) ( const ai::int32 *infoVars, void **values ); - - /** Reports whether a pressure-sensitive device such as a graphics tablet - was available on application startup. - @param hasPressure [out] A buffer in which to return true if - a pressure-sensitive device is in use. - */ - AIAPI AIErr (*SystemHasPressure) ( AIBoolean *hasPressure ); - - // New for AI10 - - /** @deprecated Obsolete. Do not use. */ - AIAPI AIErr (*GetToolNullEventInterval) (AIToolHandle tool, AIToolTime *outTime); - - /** @deprecated Obsolete. Do not use. */ - AIAPI AIErr (*SetToolNullEventInterval) (AIToolHandle tool, AIToolTime inTime); - - // New for AI13 - - /** Selects a plug-in tool, but does not highlight - it in the palette or show its tool name in the status bar of the document - window. Indicates this \e soft selection by setting the \c isSoftMode flag. - \c #SetSelectedTool() turns this flag off. - @param tool The tool reference. - */ - AIAPI AIErr (*SetSoftSelectedTool) ( AIToolHandle tool ); - - /** Reports whether there is currently a \e soft tool selection. - Soft mode is entered when a tool, such as the rectangle tool, is - selected and the user implicitly overrides this by drawing with the eraser - end of a tablet stylus. - @param isSoftMode [out] A buffer in which to return true if there is a - soft tool selection. - */ - AIAPI AIErr (*IsSoftModeSelection) ( AIBoolean *isSoftMode ); - - /** Retrieves the name of the tool that will be temporarily selected by pressing Ctrl (in Windows) - or Cmd (in MacOS) key while using this tool. - Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. - @param tool This tool. - @param name A buffer in which to return the name of the alternate selection tool. - */ - AIAPI AIErr (*GetAlternateSelectionToolName) (AIToolHandle tool, char **name); - - /** Sets the tool that will be temporarily selected by pressing Ctrl (in Windows) - or Cmd (in MacOS) key while using this tool. - Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. - @param tool This tool. - @param name The name of the alternate selection tool. - */ - AIAPI AIErr (*SetAlternateSelectionToolName) (AIToolHandle tool, const char* alternateTool); - - // New for AI16: support for plug-in access to built-in tools - - /** Retrieves the unique name of the currently selected tool. This is the same - name you get from calling \c #AIToolboxSuite::GetCurrentToolType() - followed by \c #GetToolNameFromNumber(). - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr (*GetCurrentToolName) ( const char **name ); - - /** Returns the numerical identifier of the most recently used built-in selection tool, - and optionally retrieves the unique name of the tool, from \c AIToolNames.h. - (Note that this function returns an \c #AIToolType, not an error code.) - @param name [out][optional] A buffer in which to return the name string. - Do not modify this string. Copy it immediately to use it. - @return The numerical identifier. - */ - - AIAPI AIToolType (*GetLastUsedSelectionTool) ( const char **name ); - - /** Select a tool by its unique name identifier. May be either the name of a plug-in tool, - as obtained from an AIToolHandle by calling \c #GetToolName(), or one of the tool name - constants from AIToolNames.h. - @param name The name of the tool to be selected. - Returns kBadParameterErr if there is no tool with the input name. - */ - AIAPI AIErr (*SetSelectedToolByName) ( const char *name ); - - -}; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170User.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170User.h deleted file mode 100644 index 17438ef..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI170User.h +++ /dev/null @@ -1,698 +0,0 @@ -#ifndef __AI170User__ -#define __AI170User__ - -//======================================================================================== -// -// ADOBE CONFIDENTIAL -// -// $File: $ -// -// Owner: -// -// $Author: Gaurav Pant -// -// $DateTime: $ -// -// $Revision: $ -// -// $Change: $ -// -// Copyright 2012 Adobe Systems Incorporated -// All Rights Reserved. -// -// NOTICE: All information contained herein is, and remains -// the property of Adobe Systems Incorporated and its suppliers, -// if any. The intellectual and technical concepts contained -// herein are proprietary to Adobe Systems Incorporated and its -// suppliers and are protected by trade secret or copyright law. -// Dissemination of this information or reproduction of this material -// is strictly forbidden unless prior written permission is obtained -// from Adobe Systems Incorporated. -// -//======================================================================================== - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIMenu__ -#include "AIMenu.h" -#endif - -#ifndef __AIFileFormat__ -#include "AIFileFormat.h" -#endif - -#include "IAIFilePath.hpp" -#include "AIUser.h" -#include "AIHeaderBegin.h" - -/** @file AI170User.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -// v.14.0 -#define kAI170UserSuite kAIUserSuite -#define kAIUserSuiteVersion11 AIAPI_VERSION(11) -#define kAI170UserSuiteVersion kAIUserSuiteVersion11 -#define kAI170UserVersion kAI170UserSuiteVersion - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Information about the kinds of names allowed for a named entity (such as - layers, swatches, and styles). Used to generate a legal name, using - \c #AIUserSuite::NextName() and AIUserSuite::CopyOfName(). - - The following pseudocode indicates how you can create your own AutoNameGenerator class by publicly inheriting AIAutoNameGenerator - and following the implementation guidelines. - -@code - class AutoNameGenerator : public AIAutoNameGenerator { - public: - // Constructor for a name generator. Its supplied with the pluginref in - // case the name generator needs to look in the plugin's resources e.g for - // the default name. The next new name index is supplied since the plugin - // probably needs to store this in its globals so that it can be preserved - // across unload and reload. - AutoNameGenerator (SPPluginRef pluginref, int nextNameIndex) - { - // fill in fDefaultName - GetDefaultName(pluginref); - - // initialize the base members - // note kMaxCollectionStringLength accounts for null terminator and maximumLength does not - maximumLength = kMaxCollectionStringLength-1; - uniqueNames = true; - baseName = fDefaultName; - nextNewNameIndex = nextNameIndex; - HasName = sHasName; - } - - private: - void GetDefaultName (SPPluginRef pluginref) - { - // Somehow initialize fDefaultName with the default name for the - // collection. The pluginref is probably needed in order to look - // up the name in the plugin resources. - } - - AIErr hasName (const ai::UnicodeString &name, AIBoolean &hasit) - { - // Code to answer the question. When comparing 'name' against - // names of objects in the collection it's important to use the - // AIUserSuite::SameName() API. The name generation process does - // not use a simple string comparison. - } - - static AIAPI AIErr sHasName (AIAutoNameGenerator &self, const ai::UnicodeString &name, AIBoolean &hasit) - { - return static_cast(self).hasName(name, hasit); - } - - ai::UnicodeString fDefaultName; - }; -@endcode -*/ -/******************************************************************************* - ** - ** Suite - ** - **/ - - - // To be removed. These comments here in case it isn't. -/** Internal. */ -struct AICustomProgressSuite { - /** Internal. - Reports whether a user has canceled the current operation. - Call this function in your main loop as often as you can afford. - If it returns true your plug-in should stop, clean up as necessary, - and exit, returning the constant \c #kCanceledErr. You can use - \c #AIUndoSuite::UndoChanges() to remove any changes the operation - has made to the artwork. - (Note that this function returns a boolean value, not an error code.) - @param data A pointer to developer-defined data. - @return True if the user has canceled an operation - by pressing Command-dot or clicking Cancel or Stop in the - progress bar. - */ - AIAPI AIBoolean (*Cancel) ( void *data ); - - /** Internal. - Updates the progress bar. - (Note that this function does not return an error code.) - @param data A pointer to developer-defined data. - @param current A number between 0 and \c max that represents - how far the operation has progressed. For example, if the - operation will change fifty objects, call after each object - with the current object number for \c current and 50 for \c max. . - @param max The maximum value. This can be 100 to show a percentage, - or the total number of objects the operation will create or modify, - or, for example, a value such as the total number of points - on a figure the operation will draw. - */ - AIAPI void (*UpdateProgress) ( void *data, ai::int32 current, ai::int32 max ); - - /** Internal. - Sets the text message displayed in the progress bar. If not provided, - the text line is blank. - (Note that this function does not return an error code.) - @param data A pointer to developer-defined data. - @param text The text message. - */ - AIAPI void (*SetProgressText) ( void *data, const char *text ); - - /** Internal. - Explicitly close the progress bar if one is currently shown. - Illustrator automatically closes the progress bar when your - plug-in finishes. Use this function if you want to dismiss - it sooner; for example, if you terminate an operation early - because of some error condition. - (Note that this function does not return an error code.) - @param data A pointer to developer-defined data. - */ - AIAPI void (*CloseProgress) ( void *data ); - - /** Internal. - Disables (dims) the cancel or stop button in the progress bar. - (Note that this function does not return an error code.) - @param data A pointer to developer-defined data. - */ - AIAPI void (*DisableProgressCancel) ( void *data ); - - /** A pointer to developer-defined data for progress bars. */ - void *data; // user data. -}; - - - -/** @ingroup Suites - This suite provides utility functions for working with Illustrator, - including unit conversion utilities and a progress bar. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIUserSuite and \c #kAIUserSuiteVersion. - */ -struct AI170UserSuite { - - /** Reports whether a user has canceled the current operation. - (Note that this function returns a boolean value, not an error code.) - @return True if the user has canceled an operation - by pressing Command-dot or clicking Cancel or Stop in the - progress bar. - */ - AIAPI AIBoolean (*Cancel) ( void ); - - /** Updates the progress bar. - (Note that this function does not return an error code.) - @param current A number between 0 and \c max that represents - how far the operation has progressed. - @param max The maximum value, representing 100% progress. - */ - AIAPI void (*UpdateProgress) ( ai::int32 current, ai::int32 max ); - - /** Sets the text message displayed in the progress bar. If not provided, - the text line is blank. - (Note that this function does not return an error code.) - @param text The text message. - */ - AIAPI void (*SetProgressText) ( const ai::UnicodeString& text ); - - /** Explicitly close the progress bar if one is currently shown. - (Note that this function does not return an error code.) - */ - AIAPI void (*CloseProgress) ( void ); - - /** Converts a number of document points to a Unicode string, using - the period as a decimal separator. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI void (*AIRealToString) ( AIReal value, short precision, ai::UnicodeString& string ); - - /** Converts a Unicode string containing a number to an \c #AIReal value, - using the period as a decimal separator. - (Note that this function does not return an error code.) - @param string The string to convert. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - /** Converts a number of document points to a Unicode string, using the localized - international utilities (IU) decimal separator. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI void (*IUAIRealToString) ( AIReal value, short precision, ai::UnicodeString& string ); - - /** Converts a Unicode string containing a number to an \c #AIReal value, - using the localized international utilities (IU) decimal separator. - (Note that this function does not return an error code.) - @param string The string to convert. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Converts a number of document points to a formatted Unicode string containing - a number and ruler units, using the localized international utilities (IU) - decimal separator, and the passed preference for precision. If passed precision value is -1 - then user preference for precision is used. - Uses the currently set ruler units, which can be inches, points, or centimeters. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. Pass -1 if user preference for precision should be used. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, ai::int32 precision, ai::UnicodeString& string ); - - /** Converts a formatted Unicode string containing a number expressed in ruler units - to an \c #AIReal value in points. The current ruler units for the artwork - are used as the original units to scale the result, and the user's - preferences for precision are applied. - (Note that this function does not return an error code.) - @param string The string to convert, which uses the localized international utilities (IU) - decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm". - If no unit specifier is included, uses the current ruler units. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Retrieves a string representing the current ruler units. - @param format The format for the result, one of: -
\c #kShortUnits -
\c #kLongSingularUnits -
\c #kLongPluralUnits -
If, for instance, the current unit is inches, the returned string - would be "in", "inch", or "inches". - @param string [out] A buffer in which to return the units string, at least 20 characters. - */ - AIAPI AIErr (*GetUnitsString) ( short format, ai::UnicodeString& string ); - - /** Retrieves the base name of a global object, stripping off any additional - token that was added to make the name unique (by a function such as - \c #AICustomColorSuite::NewCustomColorName(), for example). - @param name [in, out] A string in which to pass a unique name and - return the base name. The string is modified in place. - */ - AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name ); - - /** Opens the appropriate application to edit a placed or raster object. - This is equivalent to an option-double-click on the object with the selection tool. - @param art The placed or raster art object. - @return \c #kApplicationNotFoundErr error if the application is not found. -
\c #kObjectNotLinkedErr error if the object is not a placed or raster object. - */ - AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art ); - - /** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state. Can be useful if - you have code that has its own message processing. */ - AIAPI AIErr (*AppIdle) ( void ); - - /** Builds a directory menu. Available only in Mac OS. Builds a menu consisting of the specified path as well as all parent directories of that path. - @param menu The platform-specific menu object. - @param fileSpec The file object for the directory. - */ - AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec); - - /** Retrieves a directory. Available only in Mac OS. Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu. - @param fileSpec The file object for the directory. - @param index The 0-based index of the directory. - */ - AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, ai::int32 index); - - /** Reveals a file in the Finder. Available only in Mac OS. - @param fileSpec The file object for the file. - */ - AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec); - - /** Disables (dims) the cancel or stop button in the progress bar. - (Note that this function does not return an error code.) - */ - AIAPI void (*DisableProgressCancel) ( void ); - - /** Reports whether it is safe to allocate memory. Call when a timer - or other asynchronous event triggers an action that allocates memory. - Not needed when handling notifications or user events; the plug-in does not receive - these when it is not ok to allocate memory. - (Note that this function returns a boolean value, not an error code.) - @param True if it is safe to allocate memory. False if it is not safe; in this case, - reschedule the action and try again later. - */ - AIAPI AIBoolean (*OKToAllocateMemory) ( void ); - - // New for AI 11 - /** Retrieves the current date and time. - @param outValue [out] A buffer in which to return the current date-time value. - */ - AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue); - - /* Formats a date into a Unicode string. - @param inValue The date to format, or \c NULL to format the current date-time value. - @param formatFlag The format to use, one of: -
\c #kAIShortDateFormat -
\c #kAILongDateFormat -
\c #kAIAbbrevDateFormat - @param dateStringUS [out] A buffer in which to return the formatted date string. - */ - AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS); - - /* Formats a time into a Unicode string. - @param inValue The time to format, or \c NULL to format the current date-time value. - @param formatFlag The format to use, one of: -
\c #kAIShortTimeFormat -
\c #kAILongTimeFormat - @param dateStringUS [out] A buffer in which to return the formatted time string. - */ - AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS); - - /** Retrieves the year value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year); - - /** Retrieves the month value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month); - - /** Retrieves the day value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day); - - /** Retrieves the hour value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour); - - /** Retrieves the minute value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute); - - /** Retrieves the second value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second); - - /** Retrieves the day-of-week value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek); - - /** Launches an application, and optionally opens the current document in it. - @param spFileSpec The file specification for the application's executable. - @param openDoc True to open the current document in the new application. - */ - AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc); - - /** Generates an appropriate name for a named object, such as - a layer, swatch, or style, according to the naming rules for that - collection. - @param set The naming rules. - @param name [out] An ai::UnicodeString in which to return the generated name. - */ - AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name); - - /** Generates an appropriate name for a copy of a named object, such as - a layer, swatch, or style, according to the naming rules for that - collection. - @param set The naming rules. - @param original Original name to copy (may be an empty string). - @param copy [out] An ai::UnicodeString in which to return the generated name. - */ - AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString ©); - - /** Tests for equality of names within a collection of named objects. - Use in the \c #AIAutoNameGenerator::HasName() callback function - to test whether an automatically generated name matches a name - already in the collection. - @param name1 The first name. - @param name2 The second name. - @param same [out] An AIBoolean reference in which to return true if the names - are the same. - */ - AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same); - - /** Not implemented. (Installs a custom progress reporting mechanism.) - @return \c #kNotImplementedErr. - */ - AIAPI AIErr (*PushCustomProgress) (AICustomProgressSuite *suite); - - /** Not implemented. (Removes the most recently installed custom progress reporting mechanism.) - @return \c #kNotImplementedErr. - */ - AIAPI AIErr (*PopCustomProgress) (); - - /** Opens a platform-specific dialog for saving a file. - @param title Dialog title. - @param AIFileDialogFilters File types to save. Can be \c NULL. - @param defaultName Default file name to appear in dialog. Can be \c NULL. - @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and - return the full path of the file chosen by the user. - */ - AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath); - - /** Opens a platform-specific dialog for opening a file. - @param title Dialog title. - @param AIFileDialogFilters File types to open. Can be \c NULL. - @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and - return the full path of the file chosen by the user. - */ - AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath); - - /** Opens a platform-specific dialog for choosing a folder. - @param title Dialog title. - @param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and - return the full path of the folder chosen by the user. - */ - AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath); - - /** Displays an alert dialog with a warning icon and OK and Cancel buttons. - @param msg The message to display. - @param defaultOk True to make the OK button the default, false to make Cancel the default. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return True if the dialog was dismissed with the OK button, - false if it was canceled. - */ - AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey); - - /** Displays an alert dialog with a warning icon and an OK button. - @param msg The message to display. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return Nothing. It does not return AIErr - */ - AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey); - - /** Displays an modal alert dialog with a warning icon and an OK button which doesnot get dismissed on ESC key. - @param msg The message to display. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return Nothing. It does not return AIErr - */ - AIAPI void (*MessageAlertEx) (const ai::UnicodeString& msg, const char* dontShowKey); - - /** Displays a predefined dialog with a yes/no question. - The dialog displays text specified with a unicodeString, and - buttons with default labels Yes, No, and Cancel. - @param msg The text string. - @return The \c #AIAnswer constant for the button pressed to dismiss the dialog, - or \c #kAIAnswer_Invalid in case of error. - @see \c #ErrorAlert(), \c #MessageAlert(), \c #YesNoAlert() - */ - AIAPI AIAnswer (*QuestionAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog with a yes/no question. - The dialog displays text specified with a unicodeString, and - buttons with default labels Yes and No. - @param msg The text string. - @return The \c #AIAnswer constant for the button pressed to dismiss the dialog, - or \c #kAIAnswer_Invalid in case of error. - @see \c #ErrorAlert(), \c #MessageAlert(), \c #QuestionAlert() - */ - AIAPI AIAnswer (*YesNoAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog that informs the user that an error occurred. - The dialog displays text specified with a unicodeString, with the platform-specific - error icon at the left, and an OK button. - @param msg The text string. - @return Nothing.It doesnot return an AIErr - @see \c #MessageAlert(), \c #QuestionAlert(), \c #YesNoAlert() - */ - AIAPI void (*ErrorAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog with an informational message. - The dialog displays text specified with a unicodeString, with the - platform-specific message icon at the left, and an OK button. - @param msg The text string. - @return Nothing.It doesnot return an AIErr - @see \c #ErrorAlert(), \c #QuestionAlert(), \c #YesNoAlert() - */ - AIAPI void (*MessageAlert)(const ai::UnicodeString &msg); - - /** Invokes the platform-specific color picker dialog. - @param inLocation[int] The position of the dialog. (-1, -1) centers the dialog on the screen. - @param inColor[in] The initially selected color value. - @param outColor [out] A buffer in which to return the selected color. - @return True if the user selected a color, false otherwise. - */ - AIAPI AIBoolean (*ChooseFromOSColorPicker) (const AIPoint &inLocation, - const AIRGBColor& inColor, AIRGBColor* outColor); - - /** Evaluates a numeric expression to create a formatted string suitable for display. - Call, for example, when a numeric edit control loses focus or the user presses "=". - If the result of evaluation is not a valid numeric value as per options specified, it is recommended that - the associated control display the last known-good value, or a blank string - accompanied by a beep or other error indicator. - - @param expr [in] The expression to be evaluated (typically entered by the user - in the control). - @param options [in] An \c #AIExpressionOptions structure that determines how - a numeric result is obtained. Specifies the units for the - result, a range to which the result is clipped, and the precision. - @param evaluatedExpr [out] A buffer in which to return the formatted display string. - @param isChanged [out] A buffer in which to return true if the result of evaluation - is different from result of user input. Example in case of non numeric input or out of bounds input. - @param numericValue [out] A buffer in which to return the numeric value, according to the specified options. - */ - AIAPI AIErr (*EvaluateExpression)(const ai::UnicodeString& expr, const AIExpressionOptions& options, ai::UnicodeString& evaluatedExpr, - AIBoolean & isChanged , AIDouble& numericValue); - - /** Invokes a modal dialog in which the user must input text. The dialog cannot be dismissed - until text is entered. If default text is provided, however, the user can dismiss the - dialog without changing that text. - - @param title The title for the dialog - @param messageText A text message to display above the input field, or NULL to display no message. - @param label The label for the text field. - @param ioName [in/out] On input, a default string for the text field. This is replaced by text that - the user enters, if any. - @param IsValidInputProc A function pointer to a validation callback that validates the input as typed by the user. - The first parameter to this call is a \c #AIValidationStage constant that reports whether the call is - made upon text entry, or upon dismissal of the dialog. - @param userdata Developer-defined user data to be passed to the validation callback. - @param maxInputChars The maximum number of characters that user can enter in the text field. - */ - AIAPI AIErr (*GetInputFromUser) ( const ai::UnicodeString &title, const ai::UnicodeString* messageText, const ai::UnicodeString &label, ai::UnicodeString& ioField, IsValidInputProc validator, void *userdata, ai::int32 maxInputChars); - - /** Creates a singleton resource manager instance to be used for cursors. - Call once for a plugin, after startup is completed. Destroy the instance on - application shutdown (not plug-in shutdown). - @param inRscMgr [out] A buffer in which to return the resource-manager handle. - @see DisposeCursorResourceMgr() - */ - AIAPI AIErr (*CreateCursorResourceMgr)(SPPluginRef, AIResourceManagerHandle* inRscMgr); - - /** Sets the image to be used for the plug-in's cursor. - @param cursorID The resource ID of the cursor, or a \c #AIPredefinedCursor - constant value to use one of the predefined cursors. Cursor images must be - in PNG format. - @param inRscMgr The resource manager, as returned by \c #CreateCursorResourceMgr(). - */ - AIAPI AIErr (*SetCursor)(ai::int32 cursorID, AIResourceManagerHandle inRscMgr); - - /** Disposes of the plug-in's singleton resource manager. Call once when - \c #kAIApplicationShutdownNotifier is received. Do not call as part of plug-in shutdown. - @param The resource manager handle, as returned on creation. - */ - AIAPI AIErr (*DisposeCursorResourceMgr)(AIResourceManagerHandle); - - /** Reports the current language in use. - @param lang [out] A buffer in which to return the language code. - */ - AIAPI AIErr (*GetAILanguageCode)(ai::UnicodeString& lang); - - /** Returns the maximum scale factor for all the screens on a system - Always returns 1.0 in case of windows machine. - */ - AIAPI AIReal (*GetMaximumScaleFactorOnSystem)(); - -}; - - - -#if defined(MAC_ENV) || defined(WIN_ENV) -/** @ingroup Suites - This suite provides utilities specific to the Mac OS platform. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIMacUserSuite and \c #kAIMacUserSuiteVersion. - */ -typedef struct { - - /** In Mac OS only, a callback procedure for a platform-specific - modal dialog, called in response to a user-interaction event. - Pass this function pointer in the \c filterproc parameter to the - Mac OS function \c ModalDialog(). - - This callback allows you to update the Illustrator document in - response to events in the modal dialog, which would otherwise prevent - any activity in the application while the dialog is shown. - - @param theDialog The window object for the dialog. - @param theEvent A pointer to the event object for the event that triggered the callback. - @param itemHit [out] Optional. A buffer in which to return the dialog result. - Could be 0 (no result, as the event was not consumed), 1 (the OK button was clicked) or 2 (the Cancel button was clicked). - @return True if the event was consumed, false if it was not. - */ - AIAPI AIBoolean (*ModalFilterProc) ( AIWindowRef theDialog, AIEvent *theEvent, short *itemHit ); - - /** Displays a color swatch preview in a platform window, similar to the one - shown in the Swatch palette. - @param window The window object. - @param swatchRect A pointer to the region in which to display the preview, - in coordinates relative to the window's origin. - @param colorSpec A pointer to the swatch color. - */ - AIAPI AIErr (*PreviewColorSwatch) ( AIWindowRef window, AIRect *swatchRect, AIColor *colorSpec ); - -} AIMacUserSuite; -#endif - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180CSXSExtension.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180CSXSExtension.h deleted file mode 100644 index d34d53d..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180CSXSExtension.h +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef _AI180CSXSExtension_H_ -#define _AI180CSXSExtension_H_ -/* -* Name: _AICSXSExtension_H_ -* Date: Started 2011 -* Purpose: Adobe Illustrator CSXS Extension Header. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AICSXSExtension.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAI180CSXSExtensionSuite "AI CSXS Extension Suite" -#define kAI180CSXSExtensionSuiteVersion AIAPI_VERSION(2) -#define kAI180CSXSExtensionVersion kAICSXSExtensionSuiteVersion - -#define kAI180CSXSExtensionUnloadNotifier "Extension Unloaded Notifier" - -/** - Constants for reporting the status of Creative Suite extensions. - See \c #AICSXSExtensionSuite::GetExtensionState(). -*/ -enum AI180CSXSExtensionState -{ - /** Extension is not registered in Illustrator. */ - kAI180CSXSExtensionNotRegisteredState, - /** Extension is registered in Illustrator and ready to load. */ - kAI180CSXSExtensionRegisteredState, - /** Extension is loaded. */ - kAI180CSXSExtensionLoadedState, - /** Extension is unloaded. */ - kAI180CSXSExtensionUnLoadedState, - /** Internal use */ - kAI180CSXSExtensionMaximumState = 0xffff - -}; - -typedef struct AI180CSXSExtensionNotifierMsg -{ - AI180CSXSExtensionState state; - const char* extensionId; -}AI180CSXSExtensionNotifierMsg; - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites - This suite provides access to information about the status of Creative Suite - extensions that might be loaded into Illustrator. - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICSXSExtensionSuite and \c #kAICSXSExtensionVersion. -*/ -typedef struct { - - /** Retrieves the current registration and load state of an extension. - @param extensionId [in] The unique identifier of the extension. - @param state [out] A buffer in which to return the current state, an \c #AICSXSExtensionState constant value. - */ - AIAPI AIErr (*GetExtensionState) (const char* extensionId, ai::int32& state); - - /** Reports whether an extension's main window is currently visible in the UI. - @param extensionId [in] The unique identifier of the extension. - @param isVisible [out] True if the extension's main window appears in the UI, false otherwise. - */ - AIAPI AIErr (*IsPrimaryStageVisible) (const char* extensionId, AIBoolean& isVisible); - - /** Launches extension of specified extension ID - @param extensionId [in] The unique identifier of the extension. - */ - AIAPI AIErr (*LaunchExtension) (const char* extensionId); - -} AI180CSXSExtensionSuite; - -#include "AIHeaderEnd.h" - -#endif //_AICSXSExtension_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Document.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Document.h deleted file mode 100644 index 45b85e2..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Document.h +++ /dev/null @@ -1,618 +0,0 @@ -#ifndef __AI180Document__ -#define __AI180Document__ - -/* - * Name: AI180Document.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Document Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIDocument.h" - -#include "AIHeaderBegin.h" - -/** @file AI180Document.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI180DocumentSuite kAIDocumentSuite -#define kAI180DocumentSuiteVersion14 AIAPI_VERSION(14) -#define kAI180DocumentSuiteVersion kAI180DocumentSuiteVersion14 -#define kAI180DocumentVersion kAI180DocumentSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Use these functions to get and set information about the current document. - - Some functions are only applicable while reading a file format. - Some are intended for use during a file format write, but can - be used at any time. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDocumentSuite and \c #kAIDocumentVersion. - */ -struct AI180DocumentSuite { - - /** Retrieves the file specification for the current document. - @param file [out] A buffer in which to return the file specification. - */ - AIAPI AIErr (*GetDocumentFileSpecification) ( ai::FilePath &file ); - - /** Retrieves the coordinates of the lower left corner of the imageable - page, specified relative to the ruler origin. - @param origin [out] A buffer in which to return the origin point. - */ - AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin ); - - /** Sets the coordinates of the lower left corner of the imageable - page. The origin for artwork - coordinates is not changed; affects only what is printed. - @param origin The new imageable page origin, specified relative - to the ruler origin. - */ - AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin ); - - /** Sets the ruler origin for the current document. Positive ruler values - go the right and above the origin. Negative values go the left and below the - origin, - @param origin The new ruler origin, specified relative to the lower left - of the artboard page, which is always (0,0). - */ - AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin ); - - /** Retrieves the current unit of measurement, shown in the ruler and - displayed in dialog boxes. - @param units The new ruler unit, an \c #AIDocumentRulerUnitValue. - */ - AIAPI AIErr (*GetDocumentRulerUnits) ( ai::int16 *units ); - - /** Sets the current unit of measurement, shown in the ruler and - displayed in dialog boxes. Can be used only when reading - a document. - @param units [out] A buffer in which to return the ruler unit, - an \c #AIDocumentRulerUnitValue. - */ - AIAPI AIErr (*SetDocumentRulerUnits) ( ai::int16 units ); - - /** Retrieves the style of crop marks that are created by the Create Crop Marks command - and filter. This is not a document setting; it is an application preference. - In AI11 and later this no longer affects separations printing. - @param cropStyle [out] A buffer in which to return the style. - */ - AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle ); - - /** Sets the style of crop marks that are created by the Create Crop Marks command - and filter. This is not a document setting. It is an application preference. - In AI11 and later this no longer affects separations printing. */ - AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle ); - - /** Not implemented. */ - AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print ); - - /** Not implemented. */ - AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print ); - - /** Retrieves information about the current document that is set through the - document Setup dialog. - @param setup [out] A buffer in which to return the setup information. - */ - AIAPI AIErr (*GetDocumentSetup) ( AIDocumentSetup *setup ); - - /** Sets the document setup information, as set through the document Setup dialog. - Can be used only when reading a document. - @param setup A pointer to a structure containing the new setup information. - */ - AIAPI AIErr (*SetDocumentSetup) ( AIDocumentSetup *setup ); - - /** Reports whether the document has been edited since it was last saved. - When it has, the user is prompted to save the document before closing it. - @param modified [out] A buffer in which to return true if the document has - been modified. - */ - AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified ); - - /** Sets the modification state of the current document. When a document is marked - as modified, the user is prompted to save before closing it. - @param modified True to mark the document as modified, false to mark it - as unmodified. - */ - AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified ); - - /** Retrieves the file format to be used when saving the current document. - By default, this is the format that opened the document - or the latest native file format for a new document. - If the user changes the file format from the Save As dialog, the new format - is assigned to the document. - @param fileFormat [out] A buffer in which to return the file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat ); - - /** Sets the file format to be used when saving the current document. - @param fileFormat The file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat ); - - /** Retrieves the block of user parameters associated with the current document's - associated file format. - @param parameters [out] A buffer in which to return the parameter block. - This is a \c void* pointer. The actual format of the parameter block - is determined by the file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters ); - - /** Sets the block of user parameters associated with the current document's - associated file format. - @param parameters [out] A buffer in which to return the parameter block. - This is a \c void* pointer. The actual format of the parameter block - is determined by the file format. Use the \c #AIBlockSuite functions - to allocate this memory, so that Illustrator can release it when - it is no longer needed. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters ); - - /** Forces the current document to be redrawn. Illustrator automatically redraws - the document when a plug-in returns, so this function is not usually needed. - */ - AIAPI AIErr (*RedrawDocument) ( void ); - - /** Retrieves an opaque reference for the current document, to use with functions - that can operate on documents other than the current one. - @param document [out] A buffer in which to return the document reference. - */ - AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document ); - - /** Writes the current document to a file without modifying the document - or changing its modification status. - @param file The file specification. - @param fileFormatName The file format name. - @param askForParms When true, show a dialog to query user for file-format parameters. - If no format parameters are available, the function queries the user even if this - value is false. - @see \c #WriteDocumentWithOptions() - */ - AIAPI AIErr (*WriteDocument) ( const ai::FilePath &file, const char *fileFormatName, AIBoolean askForParms); - - /** Retrieves the print record for the current document. - @param print [in, out] A print record with the \c version and \c recordSize - members initialized, in which to return the print information. - */ - AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - - /** Not implemented.*/ - AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - - /** Retrieves the ruler origin for the current document. Positive ruler values - go the right and above the origin. Negative values go the left and below the - origin. - @param origin [out] A buffer in which to return the ruler origin, - relative to the lower left of the artboard page, which is always (0,0). - */ - AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin ); - - /** Updates linked objects in the current document, if needed. - @param updatedSomething [out] Optional. A buffer in which to - return true if any links were found that needed update. - */ - AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething ); - - /** Retrieves the limits of zooming as scale factors. - @param min [out] A buffer in which to return the minimum zoom scale factor. - @param max [out] A buffer in which to return the maximum zoom scale factor. - */ - AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max ); - - /** Retrieves the maximum valid bounds of any artboard, expressed relative to - the ruler origin of the current document, regardless of the current - size of the document's artboard. - @param bounds [out] A buffer in which to return the rectangle, - */ - AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds ); - - /** Reports whether a document exists; that is, is an open document or a clipboard document. - @param document The document reference. - @param exists [out] A buffer in which to return true if the document - is open or in the clipboard. - */ - AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists ); - - /** Retrieves the recorded dictionary associated with the current document. - Changes in this dictionary and its contents are recorded in the undo history. - - Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() - when you no longer need the reference. - @param dictionary [out] A buffer in which to return a pointer to - the dictionary reference. - @see \c #GetNonRecordedDictionary() - */ - AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary ); - - /** Retrieves the document color model. - @param colorModel [out] A buffer in which to return the color model, - an \c #AIDocumentColorModelValue. - */ - AIAPI AIErr (*GetDocumentColorModel) ( ai::int16 *colorModel); - - /** Sets the intended color model for documents upon load. - Use when reading a file. This function does not convert artwork in - the current document to the new model. After Illustrator reads - a file, it processes artwork in the document to ensure it matches - the model. - @param colorModel The color model, an \c #AIDocumentColorModelValue. - */ - AIAPI AIErr (*SetDocumentColorModel) ( ai::int16 colorModel); - - /** Retrieves the color calibration profiles for the current document. - @param rgbProfile [out] A buffer in which to return the RGB profile or \c NULL. - @param cmykProfile [out] A buffer in which to return the CMYK profile or \c NULL. - @param grayProfile [out] A buffer in which to return the grayscale profile or \c NULL. - */ - AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile* rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile ); - - /** Sets the color calibration profiles for the current document. - @param rgbProfile The RGB profile. Can be \c NULL. - @param cmykProfile The CMYK profile. Can be \c NULL. - @param grayProfile The grayscale profile. Can be \c NULL. - */ - AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile ); - - /** Copies the currently selected objects to the clipboard. This is the same as - the Copy menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Copy) (); - - /** Cuts the currently selected objects to the clipboard. This is the same as - the Cut menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Cut) (); - - /** Pastes the contents of the clipboard into the document. This is the same as - the Paste menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Paste) (); - - /** Updates cached artwork properties. For example, the selection state - of a group is cached, and is determined from the states of its children. - You do not typically need to call this function. Illustrator recomputes - cached properties as needed. - */ - AIAPI AIErr (*SyncDocument) ( void ); - - /** Unimplemented. Always returns \c #kDocTargetExplicit */ - AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget ); - /** Unimplemented. A no-op. */ - AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget ); - - /** Retrieves the non-recorded dictionary associated with the current document. - Changes to this dictionary and its contents are not recorded in the undo - history. - - Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() - when you no longer need the reference. - @param dictionary [out] A buffer in which to return a pointer to - the dictionary reference. - @see \c #GetNonRecordedDictionary() - */ - AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary ); - - /** Retrieves the version of the Illustrator file format in which - the current document was last saved. (Note that this function returns - a constant value, not an error code.) - @return The version number, an \c #AIVersion value, or 0 if the - version is unknown or the file is not an AI file. - */ - AIAPI int (*GetAIVersion) (); - - /** Reports whether rendering the current document according to its current - view settings requires any non-opaque drawing operations. - @param hasTransparency [out] A buffer in which to return true if the - document has transparency. - @param detectOverprint When true, drawing an overprinted object - is considered a non-opaque operation. - */ - AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint ); - - /** Reports whether rendering the current document according to its current - view settings requires painting any spot colors. - @param hasSpotColorArt [out] A buffer in which to return true if the - document has art that uses spot colors. - */ - AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt ); - - // New for AI 10 - - /** Retrieves asset management information. Pass \c null for any parameter whose - state you do not want to retrieve. - @param managed [out] A buffer in which to return true if the file has an associated server URL. - @param pNAlternates [out] A buffer in which to return the number - of alternates for a document that is part of Version Cue project, - or 0 if it is not part of a Version Cue project. - @param checkedOut [out] A buffer in which to return true if the document is being - managed by a version-control system and is currently checked out (that is, - editable and locked by the current user). - @param URL [out] A buffer in which to return the server URL of a managed file. - @param canEdit Deprecated, pass \c null. - @param fileType [out] A buffer in which to return the name of the plug-in - used to open the current document, or to perform the last Save As operation. - */ - AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, ai::int32* pNAlternates, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType); - - /** Sets asset management information. Pass \c null for any parameter whose - state you do not want to set. - @param managed When true, the file has an associated server URL. - @param checkedOut Deprecated, pass \c null. - @param URL The server URL of a managed file. - @param canEdit Deprecated, pass \c null. - */ - AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit); - - /** Retrieves the URL associated with a document. - @param document The document reference. - @param URL [out] A buffer in which to return the URL. - */ - AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL); - - /** Retrieves the XMP metadata for the current the document. - @param xap [out] A buffer in which to return the XML packet - (in UTF-8 Unicode format). - */ - AIAPI AIErr (*GetDocumentXAP)(const char **xap); - - /** Sets the XMP metadata of the current document. Replaces any existing XMP metadata - @param xap The new XML packet (must be in UTF-8 Unicode format). This is - copied into the document, and can be deleted after the call. Pass \c null - to clear metadata. - */ - AIAPI AIErr (*SetDocumentXAP)(const char *xap); - - /** Halts any text reflow for all text objects in the current document. - Match this call with a call to \c #ResumeTextReflow(). - - If you manipulate \c #kTextFrameArt objects and do not need text reflow - after each access, this speeds up the manipulation process. - Some functions that causes text reflow are:
- \c #ATE::ITextRange::InsertAfter(), \c #ATE::ITextRange::InsertBefore()
- \c #ATE::ITextRange::SetLocalCharFeatures(), \c #ATE::ITextRange::SetLocalParaFeatures()
- \c #ATE::ITextRange::Remove() - - @return The error \c #kNoDocumentErr if no document is open. - */ - AIAPI AIErr (*SuspendTextReflow)(); - - /** Resumes text reflow. Reflows any text objects that modified after the - call to \c #SuspendTextReflow(). - @return The error \c #kNoDocumentErr if no document is open. - */ - AIAPI AIErr (*ResumeTextReflow)(); - - /** Retrieves the text selection object for the current document. - You must release the object when it is no longer needed. - It is recommended that you use \c ITextRanges to wrap this object, - which takes care of memory management. For example: - @code -ATE::TextRangesRef selectionRef = NULL; -sAIDocument->GetTextSelection(&selectionRef); -{ - ITextRanges mySelection(selectionRef); - ... -} - @endcode - At this point \c selectionRef is released.The reference is invalid, and you must - call \c #GetTextSelection() again to get a valid object. - - The text selection can describe multiple discontiguous ranges of text across multiple art objects. - \li If the document is in text editing mode, the result is a range representing the caret - or the user selection. - \li If the document is not in text editing mode, there are multiple ranges - for the selected text frame objects. - - @param pTextSelection [out] A buffer in which to return the text selection object. - */ - AIAPI AIErr (*GetTextSelection)( TextRangesRef* pTextSelection ); - - /** Reports whether the current document is in text editing mode. - @param focus [out] A buffer in which to return true if the document has the text focus. - */ - AIAPI AIErr (*HasTextFocus)( AIBoolean *focus); - - /** Reports whether the current document is in text editing mode and the caret - is blinking (as opposed to a range of text being selected). - @param caret [out] A buffer in which to return true if the document has - the text focus and the caret is blinking. - */ - AIAPI AIErr (*HasTextCaret)( AIBoolean *caret); - - /** Retrieves the current story that is in editing mode. - You must release the object when it is no longer needed. - It is recommended that you use \c IStory to wrap this object, - which takes care of memory management. - @param pStory [out] A buffer in which to return the story object, - or \c NULL if the current document is not in text editing mode. - */ - AIAPI AIErr (*GetTextFocus)( StoryRef* pStory); - - /** Sets a story to be in editing mode. The insertion point is positioned at the - start of the story. - @param story The story object. - */ - AIAPI AIErr (*SetTextFocus)( StoryRef story); - - /** Exits text editing mode. */ - AIAPI AIErr (*LoseTextFocus)(); - - /** Retrieves the text resource object for the current document. - You must release the object when it is no longer needed. - It is recommended that you use \c IDocumentTextResource to wrap this object, - which takes care of memory management. - - The document text resources object contains various document-wide - utilities and objects such as the character and paragraph styles. - - @param pDocResources [out] A buffer in which to return the text resources object. - @see \c ATE suites and \c IText.h. - */ - AIAPI AIErr (*GetDocumentTextResources)( DocumentTextResourcesRef* pDocResources); - - /** @deprecated Does nothing in AI13 (CS3) - - Attaches a thumbnail of the current document to the resources of the specified file. This - is the thumbnail displayed in the Finder in Mac OS. - @param file The file. - */ - AIAPI AIErr (*WriteDocumentMacInformationResource)( const ai::FilePath &file ); - - /** Writes the current document to a file with specified write options, - without modifying the document or changing its modification status. - @param file The file specification. - @param fileFormatName The file format name. - @param options The write options, a logical OR of \c #AIFileFormatOptions values. - @param askForParms When true, show a dialog to query user for file-format parameters. - If no format parameters are available, the function queries the user - even if this value is false. - @see \c #WriteDocument() - */ - AIAPI AIErr (*WriteDocumentWithOptions) (const ai::FilePath &file, const char *fileFormatName, ai::int32 options, AIBoolean askForParms); - - /** Reports whether rendering the current document according to its current - view settings requires painting any overprinted objects. - @param hasOverprint [out] A buffer in which to return true if the - document has overprint. - */ - AIAPI AIErr (*DocumentHasOverprint)(AIBoolean *hasOverprint); - - /** Reports whether a document contains any managed links. - A managed link is a URL to an Adobe Workgroup Server where - one can share and keep versions of the linked document. - @param document The document reference. - @param hasManagedLinks [out] A buffer in which to return true if the document - has managed links. - @see \c #GetDocumentAssetMgmtInfo(), \c #GetDocumentURL() - - @note In AI 10, only a managed document could have managed links. In later versions, - non-managed documents can also have managed links. - */ - AIAPI AIErr (*DocumentHasManagedLinks)(AIDocumentHandle document, AIBoolean *hasManagedLinks); - - /** Retrieves the spot color mode of a document, which controls the - appearance definitions of new spot colors that are added to the document. - @param document The document reference, or \c NULL for the current document. - @param mode [out] A buffer in which to return the mode, an \c #AISpotColorMode value. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no - current document. - */ - AIAPI AIErr (*GetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode *mode); - - /** Sets the spot color mode of a document, which controls the appearance - definitions of new spot colors that are added to the document. - @param document The document reference, or \c NULL for the current document. - @param mode The new mode, an \c #AISpotColorMode value. - @param convert When true, converts existing spot color definitions to the new mode. - @param converted [out] Optional. A buffer in which to return true if any colors - were actually modified. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no - current document. - */ - AIAPI AIErr (*SetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode mode, - AIBoolean convert, AIBoolean* converted); - - /** Undoes the most recent undoable transaction. This is the same as the Undo menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Undo) (); - - /** Redoes the most recent redoable transaction. This is the same as the Redo menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Redo) (); - /** Reports whether the current document contains any DeviceN or overprinting rasters. - @param hasDeviceNRasters [out] A buffer in which to return true if the - the document has DeviceN rasters. - @param hasOverprint [out] A buffer in which to return true if the - the document has overprinting rasters. - */ - AIAPI AIErr (*DocumentRasterAttributes) (AIBoolean *hasDeviceNRasters, AIBoolean *hasOverprint); - - /** Retrieves the document startup profile. - @param document The document reference, or \c NULL for the current document. - @param startupProfile [out] A buffer in which to return the document startup profile. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no current document. - */ - AIAPI AIErr (*GetDocumentStartupProfile) (AIDocumentHandle document, AIDocumentStartupProfile *startupProfile ); - - /** Retrieves the document's bleed values. - @param bleedOffset [out] A buffer in which to return the bleed values. - */ - - AIAPI AIErr (*GetDocumentBleeds) (AIRealRect *bleedOffset); - - /** Sets the document's bleed values. - @param bleedOffset A rectangle containing the new bleed values. - */ - - AIAPI AIErr (*SetDocumentBleeds) (const AIRealRect& bleedOffset); - - /** Turns Pixel Perfect mode on or off for the document. - @param isPixelPerfect True to turn Pixel Perfect mode on, false to turn it off. - */ - - AIAPI AIErr (*SetDocumentPixelPerfectStatus)(AIBoolean isPixelPerfect); - - /** Reports whether the document is currently in Pixel Perfect mode. - @return True if Pixel Perfect mode is on, false otherwise. - */ - - AIAPI AIBoolean (*GetDocumentPixelPerfectStatus)(); - -}; - - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentList.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentList.h deleted file mode 100644 index 195d14d..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentList.h +++ /dev/null @@ -1,186 +0,0 @@ -#ifndef __AI180DocumentList__ -#define __AI180DocumentList__ - -/* - * Name: AIDocumentList.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Document Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIDocumentList.h" -#include "AIHeaderBegin.h" - -/** @file AI180DocumentList.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI180DocumentListSuite kAIDocumentListSuite -#define kAI180DocumentListSuiteVersion8 AIAPI_VERSION(8) - -// latest version -#define kAI180DocumentListSuiteVersion kAI180DocumentListSuiteVersion8 -#define kAI180DocumentListVersion kAI180DocumentListSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These functions enumerate and operate on the list of open Illustrator documents. - - Many functions act on the current document and document view, which is - usually, but not always, the document and view of the active document window. - Use \c #Activate() to change the current document. Documents that you create - or open become current. - - Switching the current document or view commits any modifications that have been made. - This means that an undo entry is added to the list of undoable operations, any - deferred notifications are sent, and the document windows are updated. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDocumentListSuite and \c #kAIDocumentListVersion. -*/ -struct AI180DocumentListSuite { - - /** Counts the number of open document windows. Multiple windows can be - open for a single document, so this is not a count of the number of open - documents. Use with \c #GetNthDocument() to retrieve documents. - @param count [out] A buffer in which to return the number of windows. - */ - AIAPI AIErr (*Count)( ai::int32* count ); - - /** Retrieves a document by position index in the list of open document windows. - Use with \c #Count() to iterate through windows. - @param document [out] A buffer in which to return the document reference. - @param lIndex The 0-based position index, in the range [0..numWindows-1]. - */ - AIAPI AIErr (*GetNthDocument)( AIDocumentHandle* document, ai::int32 lIndex ); - - /** Creates a new document and makes it the current document, and opens a window - for the new document, which becomes the front most document window. - @param preset (New in AICS3) The name of a startup preset to - use when creating the new document. If empty or invalid, the function uses the - startup template for the color mode specified in the \c parameter overrides. - Preset names are those that appear in the New Document dialog. - such as "Mobile", "Print", and so on. - @param parameter (New in AICS3) The parameters for the new document. These values - override those in the preset. When a parameter has a \c NULL value here, - the function uses the value from the preset.In case it is not NULL,It is required to - initialize all parameters of structure. - @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New - dialog to query user for parameters. - @param document [out] A buffer in which to return the document reference. - @note The parameters for this function changed in Illustrator 13 (Creative Suite 3). - */ - AIAPI AIErr (*New)( ai::UnicodeString& preset, AINewDocumentPreset *parameter, ActionDialogStatus dialogStatus, AIDocumentHandle* document ); - - /** Opens a document from a file in a new window, and makes the new document and view current. - If the document is already open, opens a new view for the document, - and makes that document and view current. - @param fileSpec The file. - @param colorMode The color mode for the new document. - @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the New - dialog to query user for parameters. Otherwise, allows no user interaction. - @param forceCopy When true, duplicates the file and names the copy "Untitled", - regardless of whether it is marked as a template file. - @param document [out] A buffer in which to return the document reference. - */ - AIAPI AIErr (*Open)( const ai::FilePath &fileSpec, AIColorModel colorMode, - ActionDialogStatus dialogStatus, AIBoolean forceCopy, AIDocumentHandle* document ); - - /** Saves a document. If the document has not been saved before, prompts - the user for a location and save options. - @param document The document reference. - */ - AIAPI AIErr (*Save)( AIDocumentHandle document ); - - /** Closes a view for a document. If the document has only one open window, - this closes the document. If the document has been modified since last saved. - prompts the user to save. Switches the current document - to the active document window, regardless of whether it was the current view that - was closed. - @param document The document reference. - */ - AIAPI AIErr (*Close)( AIDocumentHandle document ); - - /** Closes all open document windows. This is equivalent to calling \c #Close() - for each open window. - */ - AIAPI AIErr (*CloseAll)(); - - /** Activates a window for a document, and makes that document and view current. - @param document The document reference. - @param bSetFocus Must be true. If false, the function does nothing. - */ - AIAPI AIErr (*Activate)( AIDocumentHandle document, ASBoolean bSetFocus ); - - /** Prints a document. - @param document The document reference. - @param dialogStatus An \c #ActionDialogStatus value. When \c #kDialogOn, shows the - Print dialog to query user for parameters. - */ - AIAPI AIErr (*Print)( AIDocumentHandle document, ActionDialogStatus dialogStatus ); - - // New in Illustrator 13.0 - - /** Retrieves the preset settings from one of the startup template documents. - @param preset The preset name. Preset names are those that appear in the - New Document dialog. such as "Mobile", "Basic RGB", and so on. - @param param [out] A buffer in which to return the settings. - */ - AIAPI AIErr (*GetPresetSettings)( ai::UnicodeString &preset, AINewDocumentPreset *param ); - - /** Reports the number of recent documents. Use with \c #GetNthRecentDocument() - to iterate through recent-documents list. - (Note that this function returns a numeric value, not an error code.) - @return The number of recent documents in the list. - */ - AIAPI ai::int32 (*CountRecentDocuments)(); - - /** Retrieves the location of a document from the recent-documents list. - Use with \c #CountRecentDocuments() to iterate through recent-document list. - @param index The 0-based position index of the document in the list. - @param document [out] The path of the document. - */ - AIAPI AIErr (*GetNthRecentDocument)( ai::int32 index, ai::FilePath& document ); - - /** Opens a document in the recent-documents list. - @param index The 0-based position index of the document in the list. - */ - AIAPI AIErr (*OpenNthRecentDocument)(ai::int32 index); - - /** Adds a file to the most-recently-used-files list - @param document The file to add. - */ - AIAPI AIErr (*AddToRecentFiles)(const ai::FilePath &document); -}; - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentView.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentView.h deleted file mode 100644 index fc16da2..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180DocumentView.h +++ /dev/null @@ -1,378 +0,0 @@ -#ifndef __AI180DocumentView__ -#define __AI180DocumentView__ - -/* - * Name: AI180DocumentView.h - * Purpose: Adobe Illustrator Document View Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2008 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIRealMath__ -#include "AIRealMath.h" -#endif - -#ifndef __AIDocument__ -#include "AIDocument.h" -#endif - -#include "AIDocumentView.h" - -#include "AIHeaderBegin.h" - -/** @file AI180DocumentView.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI180DocumentViewSuite kAIDocumentViewSuite -#define kAI180DocumentViewSuiteVersion12 AIAPI_VERSION(12) - -// latest version -#define kAI180DocumentViewSuiteVersion kAI180DocumentViewSuiteVersion12 -#define kAI180DocumentViewVersion kAI180DocumentViewSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - Use these functions to get and set properties of a document view, - including the bounds, center, zoom, and screen mode. - - To operate on the current view, you can usually pass \c NULL for - the \c view parameter. To get a view reference for the current - view, pass 0 to \c #AIDocumentViewSuite::GetNthDocumentView(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIDocumentViewSuite and \c #kAIDocumentViewVersion. -*/ -struct AI180DocumentViewSuite { - - /** Retrieves the bounds of a document view in artwork coordinates (that is, - the portion of the artboard that is visible in the window). - @param view The view reference, or \c NULL for the current view. - @param bounds [out] A buffer in which to return the bounding box. - */ - AIAPI AIErr (*GetDocumentViewBounds) ( AIDocumentViewHandle view, AIRealRect *bounds ); - - /** Retrieves the center of a document view in artwork coordinates (that is, the - point of the artboard that maps to the center of the window). - @param view The view reference, or \c NULL for the current view. - @param center [out] A buffer in which to return the center point. - */ - AIAPI AIErr (*GetDocumentViewCenter) ( AIDocumentViewHandle view, AIRealPoint *center ); - - /** Sets the point of the artboard that maps to the center of the window for a view. - @param view The view reference, or \c NULL for the current view. - @param center The new center point. - */ - AIAPI AIErr (*SetDocumentViewCenter) ( AIDocumentViewHandle view, const AIRealPoint *center ); - - /** Retrieves the zoom factor for a view. This is the scale factor from artwork - coordinates to window coordinates. - @param view The view reference, or \c NULL for the current view. - @param zoom [out] A buffer in which to return the zoom factor, a percentage - value where 1 is 100% (actual size), 0.5 is 50% and 2 is 200%. - */ - AIAPI AIErr (*GetDocumentViewZoom) ( AIDocumentViewHandle view, AIReal *zoom ); - - /** Sets the scale factor from artwork coordinates to window coordinates for a view. - The scale factor is silently clamped to lie between the minimum and maximum values - supported (currently between 1/32 and 64). After adjusting the zoom, the document view - center remains unchanged. - @param view The view reference, or \c NULL for the current view. - @param zoom The new zoom factor, a percentage value where - 1 is 100% (actual size), 0.5 is 50% and 2 is 200%. - */ - AIAPI AIErr (*SetDocumentViewZoom) ( AIDocumentViewHandle view, AIReal zoom ); - - /** Converts a point from artwork coordinates to view (window) coordinates. The resulting - view coordinate is rounded to the nearest pixel. - @param view The view reference, or \c NULL for the current view. - @param artworkPoint The point to convert, in artwork coordinates. - @param viewPoint [out] A buffer in which to return the converted point, in window coordinates. - @see \c #FixedArtworkPointToViewPoint() (does not round) - */ - AIAPI AIErr (*ArtworkPointToViewPoint) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIPoint *viewPoint ); - - /** Converts a point from view coordinates to artwork coordinates. - @param view The view reference, or \c NULL for the current view. - @param viewPoint The point to convert, in window pixel coordinates. - @param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates. - @see \c #FixedViewPointToArtworkPoint() (takes floating-point coordinate values) - */ - AIAPI AIErr (*ViewPointToArtworkPoint) ( AIDocumentViewHandle view, const AIPoint *viewPoint, AIRealPoint *artworkPoint ); - - /** Gets the number of open views for the current document. Use with - \c #GetNthDocumentView() to iterate through views. - @param count [out] A buffer in which to return the number of views. - */ - AIAPI AIErr (*CountDocumentViews)( ai::int32 *count ); - - /** Retrieves a document view for the current document by position index. Use with - \c #CountDocumentViews() to iterate through views. - @param n The index, in the range [1..numViews], or 0 to get the current view. - @param view [out] A buffer in which to return the view reference. - */ - AIAPI AIErr (*GetNthDocumentView)( ai::int32 n, AIDocumentViewHandle *view ); - - /** Converts a point from artwork coordinates to view (window) coordinates. Does \e not round - the result. - @param view The view reference, or \c NULL for the current view. - @param artworkPoint The point to convert, in artwork coordinates. - @param viewPoint [out] A buffer in which to return the converted point, in window coordinates. - @see \c #ArtworkPointToViewPoint() (rounds result to nearest pixel) - */ - AIAPI AIErr (*FixedArtworkPointToViewPoint) ( AIDocumentViewHandle view, const AIRealPoint *artworkPoint, AIRealPoint *viewPoint ); - - /** Converts a point from view coordinates to artwork coordinates. - @param view The view reference, or \c NULL for the current view. - @param viewPoint The point to convert, in window floating-point coordinates. - @param artworkPoint [out] A buffer in which to return the converted point, in artboard coordinates. - @see \c #ViewPointToArtworkPoint() (takes pixel coordinate values) - */ - AIAPI AIErr (*FixedViewPointToArtworkPoint) ( AIDocumentViewHandle view, const AIRealPoint *viewPoint, AIRealPoint *artworkPoint ); - - /** Sets the screen mode of a view. In the UI, the screen mode is - selected with icons at the bottom of the Tool palette. - @param view The view reference, or \c NULL for the current view. - @param mode The new screen mode. - */ - AIAPI AIErr (*SetScreenMode) ( AIDocumentViewHandle view, AIScreenMode mode ); - - /** Retrieves the screen mode of a view. In the UI, the screen mode is - shown by icons at the bottom of the Tool palette. - @param view The view reference, or \c NULL for the current view. - @param mode [out] A buffer in which to return the screen mode. - */ - AIAPI AIErr (*GetScreenMode) ( AIDocumentViewHandle view, AIScreenMode *mode ); - - /** Retrieves the page tiling information that describes how the artwork is printed - onto one or more pages. - @param pageTiling [out] A buffer in which to return the tiling information. - */ - AIAPI AIErr (*GetPageTiling) ( AIPageTiling *pageTiling ); - - /** Reports whether there is a visible template layer. - @param view The view reference, or \c NULL for the current view. - @param visible [out] A buffer in which to return true if the template layer is shown. - */ - AIAPI AIErr (*GetTemplateVisible) ( AIDocumentViewHandle view, AIBoolean *visible ); - - /** Scrolls a document window. - @param view The view reference, or \c NULL for the current view. - @param delta The vector by which to scroll, a horizontal and vertical - distance in points. - */ - AIAPI AIErr (*DocumentViewScrollDelta)( AIDocumentViewHandle view, AIRealPoint *delta); - - /** Retrieves a rectangle that encloses (at least) the portions of the viewed - document that have been changed and so need to be redrawn. This rectangle is reset to - be empty each time the \c #kAIDocumentViewInvalidRectChangedNotifier is sent. - @param view The view reference, or \c NULL for the current view. - @param invalidRect [out] A buffer in which to return the invalid area, in artwork coordinates. - */ - AIAPI AIErr (*GetDocumentViewInvalidRect)( AIDocumentViewHandle view, AIRealRect *invalidRect ); - - /** Sets the invalid rectangle for a view. This is the area that encloses - (at least) the portions of the viewed document that have been changed - and so need to be redrawn in the given view. - @param view The view reference, or \c NULL for the current view. - @param invalidRect The new area, in artwork coordinates. - @see \c #GetDocumentViewInvalidRect(), \c #SetDocumentViewInvalidDocumentRect() - */ - AIAPI AIErr (*SetDocumentViewInvalidRect)( AIDocumentViewHandle view, const AIRealRect *invalidRect ); - - /** Retrieves the display mode for a view. - @param view The view reference, or \c NULL for the current view. - @param style [out] A buffer in which to return the style, a logical OR of these bit flags:
- \c #kVsArtwork, \c #kVsPreview, \c #kVsRaster, \c #kVsOpaque, \c #kVsInk - */ - AIAPI AIErr (*GetDocumentViewStyle)( AIDocumentViewHandle view, ai::int16 *style ); - - /** Sets the invalid rectangle for all views of a viewed document. This is the area - that encloses (at least) the portions of the viewed document that have been - changed and so need to be redrawn in all views of that document. - @param view The view reference, or \c NULL for the current view. - @param invalidRect The new area, in artwork coordinates. - @see \c #SetDocumentViewInvalidRect() - */ - AIAPI AIErr (*SetDocumentViewInvalidDocumentRect)( AIDocumentViewHandle view, const AIRealRect *invalidRect ); - - /** Reports whether page tiling is shown for the current view. Each view has its own setting. - @param show [out] A buffer in which to return true if page tiling is shown. - */ - AIAPI AIErr (*GetShowPageTiling) ( AIBoolean *show ); - - /** Sets the page tiling mode for the current view. Each view has its own setting. - @param show True to turn page tiling on, false to turn it off. - */ - AIAPI AIErr (*SetShowPageTiling) ( AIBoolean show ); - - /** Retrieves grid options for a view. - @param view The view reference, or \c NULL for the current view. - @param show [out] A buffer in which to return true if the grid is visible. - @param snap [out] A buffer in which to return true if the snap-to-grid is on. - */ - AIAPI AIErr (*GetGridOptions) ( AIDocumentViewHandle view, AIBoolean* show, AIBoolean* snap ); - - /** Sets grid options for a view - @param view The view reference, or \c NULL for the current view. - @param show True to make the grid visible, false to hide it. - @param snap True to turn snap-to-grid on, false to turn it off. - */ - AIAPI AIErr (*SetGridOptions) ( AIDocumentViewHandle view, AIBoolean show, AIBoolean snap ); - - /** Reports whether the transparency grid is shown in a view. - @param view The view reference, or \c NULL for the current view. - @param show [out] A buffer in which to return true if the transparency grid is visible. - */ - AIAPI AIErr (*GetShowTransparencyGrid) ( AIDocumentViewHandle view, AIBoolean* show ); - - /** Sets whether the transparency grid is shown in the view. - @param view The view reference, or \c NULL for the current view. - @param show True to make the transparency grid visible, false to hide it. - */ - AIAPI AIErr (*SetShowTransparencyGrid) ( AIDocumentViewHandle view, AIBoolean show ); - - /** Retrieves the document displayed in a view. - @param view The view reference, or \c NULL for the current view. - @param document [out] A buffer in which to return the document reference. - */ - AIAPI AIErr (*GetDocumentViewDocument) ( AIDocumentViewHandle view, AIDocumentHandle *document ); - - /** Forces all document views to not be obscured by the Control palette. - */ - AIAPI AIErr (*ForceDocumentViewsOnScreen) ( void ); - - /** Retrieves the visibility state of the guides. - @param view The view reference, or \c NULL for the current view. - @param show [out] A buffer in which to return true if the guides are visible. - */ - AIAPI AIErr (*GetShowGuides) ( AIDocumentViewHandle view, AIBoolean* show ); - - /** Sets the visibility state of the guides. - @param view The view reference, or \c NULL for the current view. - @param show True to make the guides visible, false to hide them. - */ - AIAPI AIErr (*SetShowGuides) ( AIDocumentViewHandle view, AIBoolean show ); - - /** Retrieves the visibility state of the edges of the selection. - @param view The view reference, or \c NULL for the current view. - @param show True to make the edges visible, false to hide them. - */ - AIAPI AIErr (*GetShowEdges) ( AIDocumentViewHandle view, AIBoolean* show ); - - /** Sets the visibility state of the edges of the selection. - @param view The view reference, or \c NULL for the current view. - @param show True to make the edges visible, false to hide them. - */ - AIAPI AIErr (*SetShowEdges) ( AIDocumentViewHandle view, AIBoolean show ); - - /** Captures the contents of the view window (excluding scrollbars, etc.) to - a TIFF file. Artboards are centered in window before capture. - @param view The view reference, or \c NULL for the current view. - @param saveFilename Full path and name of TIFF file to create. - @param windowSize Size to set window before capture. Will restore - original window size before returning. - */ - AIAPI AIErr (*SaveImage) ( AIDocumentViewHandle view, const ai::UnicodeString &saveFilename, - const AIPoint &windowSize ); - - /** Determines the current state of video rulers if they are visible or not. - @param view The view reference, or \c NULL for the current view. - @param visible True if the artboard rulers are visible, false otherwise. - */ - AIAPI AIErr (*IsArtboardRulerVisible) ( const AIDocumentViewHandle view, AIBoolean *visible ); - - /** Sets the video rulers visibility on or off. - @param view The view reference, or \c NULL for the current view. - @param visible True if artboard ruler visibility is to be turned on, false otherwise. - */ - AIAPI AIErr (*SetArtboardRulerVisible) ( const AIDocumentViewHandle view, const AIBoolean visible ); - - /** Returns the number plates in the plate set for the view. The plate set is only relevant for OPP - view mode. - @param view The view reference, or \c NULL for the current view. - @param count [out] The number of plates. - */ - AIAPI AIErr (*CountOPPPlates) ( AIDocumentViewHandle view, ai::int32& count ); - - /** Get an identifier for the nth plate in the view's plate set. - @param view The view reference, or \c NULL for the current view. - @param plate [out] The plate identifier. - */ - AIAPI AIErr (*GetNthOPPPlate) ( AIDocumentViewHandle view, ai::int32 n, ai::ColorSpace& plate ); - - /** Get the visibility state for \c plate in the current view's plate state. Visibility is only - recognized for OPP view mode. - @param view The view reference, or \c NULL for the current view. - @param plate Identifier for the plate to get the state of. - @param isOn [out] The current visibility state of \c plate. - */ - AIAPI AIErr (*GetOPPPlateState) ( AIDocumentViewHandle view, const ai::ColorSpace& plate, AIBoolean& isOn ); - - /** Set the visibility state for \c plate in the current view's plate state. Visibility is only - recognized for OPP view mode. Invalid \c plate identifiers are ignored. - @param view The view reference, or \c NULL for the current view. - @param plate Identifier for the plate to get the state of. - @param isOn The new visibility state of \c plate. - */ - AIAPI AIErr (*SetOPPPlateState) ( AIDocumentViewHandle view, const ai::ColorSpace& plate, const AIBoolean isOn ); - - /** Sets the display mode for a view. Currently these flags are mostly mutually exclusive. \c #kVsInk - only makes sense combined with \c #kVsPreview. \c #kVsArtwork, \c #kVsPreview, and \c #kVsRaster are - mutually exclusive. - @param view The view reference, or \c NULL for the current view. - @param style A logical OR of these bit flags:
- \c #kVsArtwork, \c #kVsPreview, \c #kVsRaster, \c #kVsOpaque, \c #kVsInk - @param mask A logical OR of the same bit values as style indicating which - bits from style to change. - */ - AIAPI AIErr (*SetDocumentViewStyle)( AIDocumentViewHandle view, ai::int16 style, ai::int16 mask ); - - /** Determines whether the rulers are shown in Artboard co-ordinates. - @param view The view reference, or \c NULL for the current view. - @param isYes True if the rulers are shown in Artboard co-ordinates, false otherwise. - */ - AIAPI AIErr (*IsRulerInArtboardCoordinates)( const AIDocumentViewHandle view, ASBoolean *isYes ); - - /** Sets the rulers to use Artboard co-ordinates. - @param view The view reference, or \c NULL for the current view. - @param state True if the rulers are shown in Artboard co-ordinates, false otherwise. - */ - AIAPI AIErr (*UseArtboardCoordinatesInRuler) ( const AIDocumentViewHandle view, const ASBoolean state ); -}; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180ShapeConstruction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180ShapeConstruction.h deleted file mode 100644 index 0ffaafd..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180ShapeConstruction.h +++ /dev/null @@ -1,335 +0,0 @@ -#ifndef __AI180ShapeConstruction__ -#define __AI180ShapeConstruction__ - -/* - * Name: AI180ShapeConstruction.h - * Purpose: Adobe Illustrator utility routines for some basic shapes. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1996-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AITypes.h" -#include "AIArt.h" -#include "AIShapeConstruction.h" - - -#include "AIHeaderBegin.h" - -/** @file AIShapeConstruction.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI180ShapeConstructionSuite "AI Shape Construction Suite" -#define kAIShapeConstructionSuiteVersion6 AIAPI_VERSION(6) -#define kAI180ShapeConstructionSuiteVersion kAIShapeConstructionSuiteVersion6 -#define kAI180ShapeConstructionVersion kAI180ShapeConstructionSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides utilities for creating paths whose shapes - describe a particular geometric figure. All of the utilities take parameters - that describe the geometric figure and return a new art object. The art object - is created in the art tree at the current insertion point as returned by - \c #AIArtSuite::GetInsertionPoint(). - - @note The shape suite is supplied by a plug-in, which the user can remove. - Clients of the shape suite should fail gracefully if it is not available. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIShapeConstructionSuite and \c #kAIShapeConstructionVersion. - */ -typedef struct { - /** Creates a path for a rectangle. - @param fromPoint The upper left point. - @param toPoint The lower right point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointRect)( AIRealPoint fromPoint, AIRealPoint toPoint, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for a rectangle of a given size. - @param fromPoint The upper left point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeRect)( AIRealPoint fromPoint, AIRealPoint size, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for an oval from two focus points. - @param fromPoint The first focus point. - @param toPoint The second focus point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param isCircumscribed True to circumscribe the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointOval)( AIRealPoint fromPoint, AIRealPoint toPoint, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, AIBoolean isCircumscribed, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for an oval of a given size. - @param fromPoint The source point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeOval)( AIRealPoint fromPoint, AIRealPoint size, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for a rounded rectangle. - @param fromPoint The upper left point. - @param toPoint The lower right point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointRoundedRect)( AIRealPoint fromPoint, AIRealPoint toPoint, AIRealPoint radius, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for a rounded rectangle of a given size. - @param fromPoint The upper left point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeRoundedRect)( AIRealPoint fromPoint, AIRealPoint size, AIRealPoint radius, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for a rectangle from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRect)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt); - - /** Creates a path for a rectangle of a given size, centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCenteredRect)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a rounded rectangle from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRoundedRect)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIReal horizRadius, AIReal vertRadius, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a rounded rectangle of a given size, centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param horizRadius The horizontal radius of the rounded corners, in document points. - @param vertRadius The vertical radius of the rounded corners, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCenteredRoundedRect)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIReal horizRadius, AIReal vertRadius, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval inscribed within a rectangle, - from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewInscribedOval)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval circumscribed around a rectangle, - from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCircumscribedOval)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval inscribed within a rectangle of a given size, - centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewInscribedCenteredOval)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval circumscribed around a rectangle of a given size, - centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCircumscribedCenteredOval)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a regular polygon of a given radius, - centered around a point. - @param numSides The number of sides. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param radius The radius, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRegularPolygon)( ai::uint16 numSides, - AIReal centerX, AIReal centerY, AIReal radius, - AIBoolean reversed, AIArtHandle *newArt ); - /** Creates a path for a regular polygon with a given vertex point, - centered around a point. - @param numsides The number of sides. - @param center The center point. - @param vertex The vertex point. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRegularPolygonPoint)( ai::uint16 numsides, - AIRealPoint center, AIRealPoint vertex, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an n-pointed star with a given radius, - centered around a point. - @param numPoints The number of star points. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param radius1 The first radius, in document points. - @param radius2 The second radius, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewStar)( ai::uint16 numPoints, - AIReal centerX, AIReal centerY, - AIReal radius1, AIReal radius2, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an n-pointed star with a given vertex point and radius ratio, - centered around a point. - @param numPoints The number of star points. - @param center The center point. - @param vertex The vertex point. - @param radiusRation The radius ratio. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewStarPoint)( ai::uint16 numPoints, - AIRealPoint center, AIRealPoint vertex, - AIReal radiusRatio, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for spiral around a point. - @param firstArcCenter The center point for the first arc of the spiral. - @param start The starting point. - @param decayPercent The decay ration expressed as a percentage. - @param numQuarterTurns The number of quarter turns. - @param clockwiseFromOutside True to spiral clockwise. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewSpiral)( AIRealPoint firstArcCenter, AIRealPoint start, - AIReal decayPercent, ai::int16 numQuarterTurns, - AIBoolean clockwiseFromOutside, AIArtHandle *newArt ); - -} AI180ShapeConstructionSuite; - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Tool.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Tool.h deleted file mode 100644 index 4a759d7..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI180Tool.h +++ /dev/null @@ -1,473 +0,0 @@ -#ifndef __AI180Tool__ -#define __AI180Tool__ - -/* - * Name: AITool.h - * Author: - * Date: - * Purpose: Adobe Illustrator Tool Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2011 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIEvent__ -#include "AIEvent.h" -#endif - -#ifndef __AIFixedMath__ -#include "AIFixedMath.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIToolNames__ -#include "AIToolNames.h" -#endif - - -#ifndef __ASHelp__ -#include "ASHelp.h" -#endif - -#ifndef FLT_MAX -#include -#endif - -#include "AITool.h" -#include "AIHeaderBegin.h" -/** @file AI180Tool.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI180ToolSuite kAIToolSuite -#define kAIToolSuiteVersion14 AIAPI_VERSION(14) -#define kAI180ToolSuiteVersion kAIToolSuiteVersion14 -#define kAI180ToolVersion kAI180ToolSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to provide plug-in tools for Illustrator. - Plug-in tools can work on existing artwork or create new objects. - Tools that you add appear in the Illustrator Tool palette in their own set, - or as part of an existing tool set. Use the functions in this suite - to add tools, set options, and control the tool’s appearance in the palette. - - Typically, you set the options that control the behavior of a plug-in tool - when you install the tool with \c #AIToolSuite::AddTool(). You can modify - them later with \c #AIToolSuite::SetToolOptions(). - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIToolSuite and \c #kAIToolVersion. - - @section Toolsets Toolsets and Groups in the Tools Palette - - In the Tools palette, \e a toolset is a collection related tools. - When there is more than one tool in a toolset, only the frontmost tool's - icon is shown in the palette, with a triangle in the lower left corner - to indicate the presence of additional tools. The entire toolset - is shown when the user holds the mouse button down on the topmost tool. - - A \e group is a collection of toolsets. Groups are separated by vertical - space in the palette. - - To create a new group or toolset, pass \c #kNoTool for - \c #AIAddToolData::sameGroupAs or \c #AIAddToolData::sameToolsetAs. - For example, to create a new tool group: - @code -toolData.title = "MyTool1"; -toolData.tooltip = "MyTool1 Tooltip"; -toolData.sameGroupAs = kNoTool; -toolData.sameToolsetAs = kNoTool; - @endcode - - To add a new toolset to this group: - @code -toolData.title = "MyTool2"; -toolData.tooltip = "MyTool2 Tooltip"; -error = sTool->GetToolNumberFromName("MyTool1", &toolData.sameGroupAs); -toolData.sameToolsetAs = kNoTool; - @endcode - - To add tools to this toolset: - @code -toolData.title = "MyTool2a"; -toolData.tooltip = "Tool2a Tooltip"; -error = sTool->GetToolNumberFromName("MyTool1", &toolData.sameGroupAs); -error = sTool->GetToolNumberFromName("MyTool2", &toolData.sameToolsetAs); - @endcode - - @section ToolBehavior Tool Behavior - - Implement tool behavior by defining handlers for the caller/selector pairs - and messages that plug-in tools receive, particularly the mouse selectors. - Check for selectors in the plug-in's main function. - - Your mouse selector handlers can create or modify art objects directly. - A tool can select and work on several art objects at once. - The application updates the window between calls to the plug-in, so the - new or changed artwork appears as the mouse moves. - Use \c #AIUndoSuite::UndoChanges() before processing the tool drag, - in order to maintain a known artwork state from which to redraw changes. - - Because multiple plug-ins can be running at once, - the artwork state can change in the course of using your tool. - To verify that a specific artwork state exists, you can use a plug-in - notifier to indicate that the artwork selection or properties - have been changed. See the \c #AINotifierSuite. - - The caller for tool plug-ins is \c #kCallerAITool. - - These selectors are sent: -
\c #kSelectorAIEditToolOptions -
\c #kSelectorAITrackToolCursor -
\c #kSelectorAIToolMouseDown -
\c #kSelectorAIToolMouseDrag -
\c #kSelectorAIToolMouseUp -
\c #kSelectorAISelectTool -
\c #kSelectorAIDeselectTool -
\c #kSelectorAIReselectTool - - These notifiers are related to tools: -
\c #kAIUserToolChangedNotifier -
\c #kAIToolSelectedNotifier -
\c #kAIToolDeselectedNotifier -
\c #kAIToolClearStateNotifier -
\c #kAIToolTitleChangedNotifier -
\c #kAIToolTooltipChangedNotifier -
\c #kAIToolHelpIDChangedNotifier -
\c #kAIToolChangedNotifier -
\c #kAIToolWindowChangedNotifier -
\c #kAIToolSuspendNotifier -
\c #kAIToolResumeNotifier -
\c #kAIEyedropperDragNotifier - - */ -struct AI180ToolSuite { - - /** Installs a plug-in tool. Use at startup. - @param self This plug-in. - @param name The unique name of this tool. - @param data Information on how to display this tool in the Tool palette. - @param options Option flags that control the tool's behavior, a logical OR - of \c #AIToolOptions constants. - @param tool [out] A buffer in which to return the tool reference. If you - install multiple tools, save to compare to the tool reference in tool - message data. - */ - AIAPI AIErr (*AddTool) ( SPPluginRef self, const char *name, - AIAddToolData *data, ai::int32 options, - AIToolHandle *tool ); - - /** For internal use only */ - AIAPI AIErr (*AddToolPrivate) ( SPPluginRef self, const char *name, - AIAddToolDataPrivate *data, ai::int32 options, - AIToolHandle *tool ); - - /** Retrieves the unique identifying name of a tool. - To get the localizable title that appears in the UI, use \c #GetToolTitle(). - @param tool The tool reference. - @param name [out] A pointer to point to the name string. Do - not modify this string. - */ - AIAPI AIErr (*GetToolName) ( AIToolHandle tool, char **name ); - - /** Retrieves the option flags of a tool. To retain the existing flags when - setting options with \c #SetToolOptions(), obtain them with this function - and do a logical OR with the new flags. - @param tool The tool reference. - @param options [out] A buffer in which to return the options value, a logical - OR of \c #AIToolOptions constants. - */ - AIAPI AIErr (*GetToolOptions) ( AIToolHandle tool, ai::int32 *options ); - - /** Sets the option flags of a tool. To retain the existing flags when - setting options, obtain them with \c #GetToolOptions() - and do a logical OR with the new flags. - @param tool The tool reference. - @param options The new options value, a logical OR of \c #AIToolOptions constants. - */ - AIAPI AIErr (*SetToolOptions) ( AIToolHandle tool, ai::int32 options ); - - /** Retrieves the plug-in that installed a tool. - @param tool The tool reference. - @param plugin [out] A buffer in which to return the plug-in reference, - which can be used with \c #AIPluginSuite functions. - */ - AIAPI AIErr (*GetToolPlugin) ( AIToolHandle tool, SPPluginRef *plugin ); - - /** Retrieves the currently selected plug-in tool. If the current tool - is a built-in tool, returns NULL. - See \c #AIToolboxSuite::GetCurrentToolType() or \c #GetCurrentToolName() - for retrieving the current tool including built-in tools. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetSelectedTool) ( AIToolHandle *tool ); - - /** Selects a plug-in tool programmatically. This is the same as the user - selecting the tool in the Tool palette. - To select built-in tools, see \c #SetSelectedToolByName() - @param tool The tool reference. - */ - AIAPI AIErr (*SetSelectedTool) ( AIToolHandle tool ); - - /** Gets the number of installed plug-in tools. Use with \c #GetNthTool() - to iterate through plug-in tools. - @param count [out] A buffer in which to return the number of tools. - */ - AIAPI AIErr (*CountTools) ( ai::int32 *count ); - - /** Retrieves a tool by index position. Use with \c #CountTools() - to iterate through plug-in tools. - @param n The 0-based position index. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetNthTool) ( ai::int32 n, AIToolHandle *tool ); - - /** Retrieves a plug-in tool by its tool number, as assigned when it is created - with \c #AddTool(), and obtained by calling \c #GetToolNumberFromHandle. - See @ref Toolsets. - If the toolNum is the number of a built-in tool, returns NULL, since - built-in tools do not have an AIToolHandle. - @param toolNum The tool number. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr (*GetToolHandleFromNumber) ( AIToolType toolNum, AIToolHandle *tool ); - - /** Retrieves a tool number from a tool's unique name. Use to find the numbers of - built-in tools, in order to place your tool in an existing group or toolset. - See @ref Toolsets. - @param name The tool name. The names of Illustrator's built-in tools - can be found in \c AIToolNames.h. - @param toolNum [out] A buffer in which to return the tool number. - */ - AIAPI AIErr (*GetToolNumberFromName) ( const char *name, AIToolType *toolNum ); - - /** Retrieves a tool number for a tool. Use to find the numbers of - plug-in tools, in order to place your tool in an existing group or toolset. - See @ref Toolsets. - @param tool The tool reference. - @param toolNum [out] A buffer in which to return the tool number. */ - AIAPI AIErr (*GetToolNumberFromHandle) ( AIToolHandle tool, AIToolType *toolNum ); - - /** Retrieves the unique name of a tool from its number. To get the localizable - title that appears in the UI, use \c #GetToolTitle(). - @param toolNum The tool number. - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr (*GetToolNameFromNumber) ( AIToolType toolNum, char **name ); - - /** Retrieves the localizable title of a tool, which appears in the UI. - To get the unique, identifying name, use \c #GetToolName(). - @param tool The tool reference. - @param title [out] A pointer to point to the title string. Do not modify - this string. - */ - AIAPI AIErr (*GetToolTitle) ( AIToolHandle tool, char **title ); - - /** Sets the localizable title of a tool, which appears in the UI. - @param tool The tool reference. - @param title The new title string. - */ - AIAPI AIErr (*SetToolTitle) ( AIToolHandle tool, const char *title ); - - - /** Retrieves the tooltip string for a tool. - @param tool The tool reference. - @param tooltip [out] A pointer to point to the tooltip string. Do not modify - this string. - */ - AIAPI AIErr (*GetTooltip) ( AIToolHandle tool, char **tooltip ); - - /** Sets the tooltip string for a tool. - @param tool The tool reference. - @param tooltip The new tooltip string. - */ - AIAPI AIErr (*SetTooltip) ( AIToolHandle tool, const char *tooltip ); - - /** Retrieves the help-system identifier for a tool. - @param tool The tool reference. - @param helpID [out] A buffer in which to return the help ID, - which can be an integer or a pooled string. - */ - AIAPI AIErr (*GetToolHelpID) ( AIToolHandle tool, ASHelpID *helpID ); - - /** Sets the help-system identifier for a tool. - @param tool The tool reference. - @param helpID The new help ID, which can be an integer or a pooled string. - */ - AIAPI AIErr (*SetToolHelpID) ( AIToolHandle tool, ASHelpID helpID ); - - /** Determines which labeled fields are displayed in the Info palette for a tool. - Typically called once at startup to initialize the Info palette. - @param tool The tool reference. - @param infoVars A pointer to the first member of an array of - information variables, which correspond to labeled fields - in Illustrator’s Info palette, as defined in \c #AIToolInfoVariable. - Only the fields included in this array are shown for the tool. - To initialize or set the values in the fields, use \c #SetToolInfoVarValues(). - */ - AIAPI AIErr (*SetToolInfoVars) ( AIToolHandle tool, const ai::int32 infoVars[] ); - - /** Sets field values in the Info palette. Only those fields specified by - \c #SetToolInfoVars() are displayed in the palette. - @param infoVars A pointer to the first member of an array of - information variables, which correspond to labeled fields - in Illustrator’s Info palette. This is the same array specified - by \c #SetToolInfoVars(). - @param values A pointer to the first member of an array of values, - whose positions match those in the \c infoVars array. - - \b Example: -@code -AIErr UpdateInfoPalette( AIToolHandle tool, AIRealPoint origin, AIArtHandle art ) -{ - ASErr error = kNoErr; - if (art) { - static const long infoVars = { kInfoDocX, kInfoDocY, kInfoSizeX, kInfoSizeY, kInfoEndOfList }; - AIReal *infoValues[4]; - AIReal temp[2]; - AIRealRect artBounds; - error = sAIArt->GetArtTransformBounds( art,0, kStroke, &artBounds); - if ( error ) - return error; - temp[0] = artBounds.right - artBounds.left; - temp[1] = artBounds.bottom - artBounds.top; - infoValues[0] = &origin.h; - infoValues[1] = &origin.v; - infoValues[2] = temp; - infoValues[3] = temp +1; - error = sAITool->SetToolInfoVarValues( infoVars, (void**)infoValues); - if ( error ) - return error; - } -} -@endcode - */ - AIAPI AIErr (*SetToolInfoVarValues) ( const ai::int32 *infoVars, void **values ); - - /** Reports whether a pressure-sensitive device such as a graphics tablet - was available on application startup. - @param hasPressure [out] A buffer in which to return true if - a pressure-sensitive device is in use. - */ - AIAPI AIErr (*SystemHasPressure) ( AIBoolean *hasPressure ); - - // New for AI10 - - /** @deprecated Obsolete. Do not use. */ - AIAPI AIErr (*GetToolNullEventInterval) (AIToolHandle tool, AIToolTime *outTime); - - /** @deprecated Obsolete. Do not use. */ - AIAPI AIErr (*SetToolNullEventInterval) (AIToolHandle tool, AIToolTime inTime); - - // New for AI13 - - /** Selects a plug-in tool, but does not highlight - it in the palette or show its tool name in the status bar of the document - window. Indicates this \e soft selection by setting the \c isSoftMode flag. - \c #SetSelectedTool() turns this flag off. - @param tool The tool reference. - */ - AIAPI AIErr (*SetSoftSelectedTool) ( AIToolHandle tool ); - - /** Reports whether there is currently a \e soft tool selection. - Soft mode is entered when a tool, such as the rectangle tool, is - selected and the user implicitly overrides this by drawing with the eraser - end of a tablet stylus. - @param isSoftMode [out] A buffer in which to return true if there is a - soft tool selection. - */ - AIAPI AIErr (*IsSoftModeSelection) ( AIBoolean *isSoftMode ); - - /** Retrieves the name of the tool that will be temporarily selected by pressing Ctrl (in Windows) - or Cmd (in MacOS) key while using this tool. - Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. - @param tool This tool. - @param name A buffer in which to return the name of the alternate selection tool. - */ - AIAPI AIErr (*GetAlternateSelectionToolName) (AIToolHandle tool, char **name); - - /** Sets the tool that will be temporarily selected by pressing Ctrl (in Windows) - or Cmd (in Mac OS) key while using this tool. - Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. - @param tool This tool. - @param name The name of the alternate selection tool. - */ - AIAPI AIErr (*SetAlternateSelectionToolName) (AIToolHandle tool, const char* alternateTool); - - // New for AI16: support for plug-in access to built-in tools - - /** Retrieves the unique name of the currently selected tool. This is the same - name you get from calling \c #AIToolboxSuite::GetCurrentToolType() - followed by \c #GetToolNameFromNumber(). - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr (*GetCurrentToolName) ( const char **name ); - - /** Retrieves the numerical identifier of the most recently used built-in selection tool, - and optionally retrieves the unique name of the tool, from \c AIToolNames.h. - (Note that this function returns an \c #AIToolType, not an error code.) - @param name [out][optional] A buffer in which to return the name string. - Do not modify this string. Copy it immediately to use it. - @return The numerical identifier. - */ - - AIAPI AIToolType (*GetLastUsedSelectionTool) ( const char **name ); - - /** Select a tool by its unique name identifier. Can be either the name of a plug-in tool, - returned by \c #GetToolName(), or one of the tool name constants from \c AIToolNames.h. - @param name The name of the tool to be selected. - */ - AIAPI AIErr (*SetSelectedToolByName) ( const char *name ); - - /** Reports the hardware capabilities of a graphical tablet or integrated digitizer. - @param hardwareCapabilities [out] A buffer in which to return a - logical OR of \c #AITabletCapabilities contants. - - */ - AIAPI AIErr (*GetTabletHardwareCapabilities) ( ai::int32* hardwareCapabilities ); -}; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI181Document.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI181Document.h deleted file mode 100644 index 62e9e55..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI181Document.h +++ /dev/null @@ -1,622 +0,0 @@ -#ifndef __AI181Document__ -#define __AI181Document__ - -/* - * Name: AI181Document.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Document Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIDocument.h" - -#include "AIHeaderBegin.h" - -/** @file AIDocument.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI181DocumentSuite kAIDocumentSuite -#define kAI181DocumentSuiteVersion15 AIAPI_VERSION(15) -#define kAI181DocumentSuiteVersion kAI181DocumentSuiteVersion15 -#define kAI181DocumentVersion kAI181DocumentSuiteVersion - -/** @ingroup Suites - Use these functions to get and set information about the current document. - - Some functions are only applicable while reading a file format. - Some are intended for use during a file format write, but can - be used at any time. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI181DocumentSuite and \c #kAIDocumentVersion. - */ -struct AI181DocumentSuite { - - /** Retrieves the file specification for the current document. - @param file [out] A buffer in which to return the file specification. - */ - AIAPI AIErr (*GetDocumentFileSpecification) ( ai::FilePath &file ); - - /** Retrieves the coordinates of the lower left corner of the imageable - page, specified relative to the ruler origin. - @param origin [out] A buffer in which to return the origin point. - */ - AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin ); - - /** Sets the coordinates of the lower left corner of the imageable - page. The origin for artwork - coordinates is not changed; affects only what is printed. - @param origin The new imageable page origin, specified relative - to the ruler origin. - */ - AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin ); - - /** Sets the ruler origin for the current document. Positive ruler values - go the right and above the origin. Negative values go the left and below the - origin, - @param origin The new ruler origin, specified relative to the lower left - of the artboard page, which is always (0,0). - */ - AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin ); - - /** Retrieves the current unit of measurement, shown in the ruler and - displayed in dialog boxes. - @param units The new ruler unit, an \c #AIDocumentRulerUnitValue. - */ - AIAPI AIErr (*GetDocumentRulerUnits) ( ai::int16 *units ); - - /** Sets the current unit of measurement, shown in the ruler and - displayed in dialog boxes. Can be used only when reading - a document. - @param units [out] A buffer in which to return the ruler unit, - an \c #AIDocumentRulerUnitValue. - */ - AIAPI AIErr (*SetDocumentRulerUnits) ( ai::int16 units ); - - /** Retrieves the style of crop marks that are created by the Create Crop Marks command - and filter. This is not a document setting; it is an application preference. - In AI11 and later this no longer affects separations printing. - @param cropStyle [out] A buffer in which to return the style. - */ - AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle ); - - /** Sets the style of crop marks that are created by the Create Crop Marks command - and filter. This is not a document setting. It is an application preference. - In AI11 and later this no longer affects separations printing. */ - AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle ); - - /** Not implemented. */ - AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print ); - - /** Not implemented. */ - AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print ); - - /** Retrieves information about the current document that is set through the - document Setup dialog. - @param setup [out] A buffer in which to return the setup information. - */ - AIAPI AIErr (*GetDocumentSetup) ( AIDocumentSetup *setup ); - - /** Sets the document setup information, as set through the document Setup dialog. - Can be used only when reading a document. - @param setup A pointer to a structure containing the new setup information. - */ - AIAPI AIErr (*SetDocumentSetup) ( AIDocumentSetup *setup ); - - /** Reports whether the document has been edited since it was last saved. - When it has, the user is prompted to save the document before closing it. - @param modified [out] A buffer in which to return true if the document has - been modified. - */ - AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified ); - - /** Sets the modification state of the current document. When a document is marked - as modified, the user is prompted to save before closing it. - @param modified True to mark the document as modified, false to mark it - as unmodified. - */ - AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified ); - - /** Retrieves the file format to be used when saving the current document. - By default, this is the format that opened the document - or the latest native file format for a new document. - If the user changes the file format from the Save As dialog, the new format - is assigned to the document. - @param fileFormat [out] A buffer in which to return the file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat ); - - /** Sets the file format to be used when saving the current document. - @param fileFormat The file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat ); - - /** Retrieves the block of user parameters associated with the current document's - associated file format. - @param parameters [out] A buffer in which to return the parameter block. - This is a \c void* pointer. The actual format of the parameter block - is determined by the file format. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters ); - - /** Sets the block of user parameters associated with the current document's - associated file format. - @param parameters [out] A buffer in which to return the parameter block. - This is a \c void* pointer. The actual format of the parameter block - is determined by the file format. Use the \c #AIBlockSuite functions - to allocate this memory, so that Illustrator can release it when - it is no longer needed. - @see \c #AIFileFormatSuite - */ - AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters ); - - /** Forces the current document to be redrawn. Illustrator automatically redraws - the document when a plug-in returns, so this function is not usually needed. - */ - AIAPI AIErr (*RedrawDocument) ( void ); - - /** Retrieves an opaque reference for the current document, to use with functions - that can operate on documents other than the current one. - @param document [out] A buffer in which to return the document reference. - */ - AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document ); - - /** Writes the current document to a file without modifying the document - or changing its modification status. - @param file The file specification. - @param fileFormatName The file format name. - @param askForParms When true, show a dialog to query user for file-format parameters. - If no format parameters are available, the function queries the user even if this - value is false. - @see \c #WriteDocumentWithOptions() - */ - AIAPI AIErr (*WriteDocument) ( const ai::FilePath &file, const char *fileFormatName, AIBoolean askForParms); - - /** Retrieves the print record for the current document. - @param print [in, out] A print record with the \c version and \c recordSize - members initialized, in which to return the print information. - */ - AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - - /** Not implemented.*/ - AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - - /** Retrieves the ruler origin for the current document. Positive ruler values - go the right and above the origin. Negative values go the left and below the - origin. - @param origin [out] A buffer in which to return the ruler origin, - relative to the lower left of the artboard page, which is always (0,0). - */ - AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin ); - - /** Updates linked objects in the current document, if needed. - @param updatedSomething [out] Optional. A buffer in which to - return true if any links were found that needed update. - */ - AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething ); - - /** Retrieves the limits of zooming as scale factors. - @param min [out] A buffer in which to return the minimum zoom scale factor. - @param max [out] A buffer in which to return the maximum zoom scale factor. - */ - AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max ); - - /** Retrieves the maximum valid bounds of any artboard, expressed relative to - the ruler origin of the current document, regardless of the current - size of the document's artboard. - @param bounds [out] A buffer in which to return the rectangle, - */ - AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds ); - - /** Reports whether a document exists; that is, is an open document or a clipboard document. - @param document The document reference. - @param exists [out] A buffer in which to return true if the document - is open or in the clipboard. - */ - AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists ); - - /** Retrieves the recorded dictionary associated with the current document. - Changes in this dictionary and its contents are recorded in the undo history. - - Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() - when you no longer need the reference. - @param dictionary [out] A buffer in which to return a pointer to - the dictionary reference. - @see \c #GetNonRecordedDictionary() - */ - AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary ); - - /** Retrieves the document color model. - @param colorModel [out] A buffer in which to return the color model, - an \c #AIDocumentColorModelValue. - */ - AIAPI AIErr (*GetDocumentColorModel) ( ai::int16 *colorModel); - - /** Sets the intended color model for documents upon load. - Use when reading a file. This function does not convert artwork in - the current document to the new model. After Illustrator reads - a file, it processes artwork in the document to ensure it matches - the model. - @param colorModel The color model, an \c #AIDocumentColorModelValue. - */ - AIAPI AIErr (*SetDocumentColorModel) ( ai::int16 colorModel); - - /** Retrieves the color calibration profiles for the current document. - @param rgbProfile [out] A buffer in which to return the RGB profile or \c NULL. - @param cmykProfile [out] A buffer in which to return the CMYK profile or \c NULL. - @param grayProfile [out] A buffer in which to return the grayscale profile or \c NULL. - */ - AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile* rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile ); - - /** Sets the color calibration profiles for the current document. - @param rgbProfile The RGB profile. Can be \c NULL. - @param cmykProfile The CMYK profile. Can be \c NULL. - @param grayProfile The grayscale profile. Can be \c NULL. - */ - AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile ); - - /** Copies the currently selected objects to the clipboard. This is the same as - the Copy menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Copy) (); - - /** Cuts the currently selected objects to the clipboard. This is the same as - the Cut menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Cut) (); - - /** Pastes the contents of the clipboard into the document. This is the same as - the Paste menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Paste) (); - - /** Updates cached artwork properties. For example, the selection state - of a group is cached, and is determined from the states of its children. - You do not typically need to call this function. Illustrator recomputes - cached properties as needed. - */ - AIAPI AIErr (*SyncDocument) ( void ); - - /** Unimplemented. Always returns \c #kDocTargetExplicit */ - AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget ); - /** Unimplemented. A no-op. */ - AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget ); - - /** Retrieves the non-recorded dictionary associated with the current document. - Changes to this dictionary and its contents are not recorded in the undo - history. - - Dictionaries are reference counted. You must call \c #AIDictionarySuite::Release() - when you no longer need the reference. - @param dictionary [out] A buffer in which to return a pointer to - the dictionary reference. - @see \c #GetNonRecordedDictionary() - */ - AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary ); - - /** Retrieves the version of the Illustrator file format in which - the current document was last saved. (Note that this function returns - a constant value, not an error code.) - @return The version number, an \c #AIVersion value, or 0 if the - version is unknown or the file is not an AI file. - */ - AIAPI int (*GetAIVersion) (); - - /** Reports whether rendering the current document according to its current - view settings requires any non-opaque drawing operations. - @param hasTransparency [out] A buffer in which to return true if the - document has transparency. - @param detectOverprint When true, drawing an overprinted object - is considered a non-opaque operation. - */ - AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint ); - - /** Reports whether rendering the current document according to its current - view settings requires painting any spot colors. - @param hasSpotColorArt [out] A buffer in which to return true if the - document has art that uses spot colors. - */ - AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt ); - - // New for AI 10 - - /** Retrieves asset management information. Pass \c null for any parameter whose - state you do not want to retrieve. - @param managed [out] A buffer in which to return true if the file has an associated server URL. - @param pNAlternates [out] A buffer in which to return the number - of alternates for a document that is part of Version Cue project, - or 0 if it is not part of a Version Cue project. - @param checkedOut [out] A buffer in which to return true if the document is being - managed by a version-control system and is currently checked out (that is, - editable and locked by the current user). - @param URL [out] A buffer in which to return the server URL of a managed file. - @param canEdit Deprecated, pass \c null. - @param fileType [out] A buffer in which to return the name of the plug-in - used to open the current document, or to perform the last Save As operation. - */ - AIAPI AIErr (*GetDocumentAssetMgmtInfo) (AIBoolean *managed, ai::int32* pNAlternates, AIBoolean *checkedOut, const char **URL, AIBoolean *canEdit, char *fileType); - - /** Sets asset management information. Pass \c null for any parameter whose - state you do not want to set. - @param managed When true, the file has an associated server URL. - @param checkedOut Deprecated, pass \c null. - @param URL The server URL of a managed file. - @param canEdit Deprecated, pass \c null. - */ - AIAPI AIErr (*SetDocumentAssetMgmtInfo) (AIBoolean *managed, AIBoolean *checkedOut, const char *URL, AIBoolean *canEdit); - - /** Retrieves the URL associated with a document. - @param document The document reference. - @param URL [out] A buffer in which to return the URL. - */ - AIAPI AIErr (*GetDocumentURL)(AIDocumentHandle document, const char **URL); - - /** Retrieves the XMP metadata for the current the document. - @param xap [out] A buffer in which to return the XML packet - (in UTF-8 Unicode format). - */ - AIAPI AIErr (*GetDocumentXAP)(const char **xap); - - /** Sets the XMP metadata of the current document. Replaces any existing XMP metadata - @param xap The new XML packet (must be in UTF-8 Unicode format). This is - copied into the document, and can be deleted after the call. Pass \c null - to clear metadata. - */ - AIAPI AIErr (*SetDocumentXAP)(const char *xap); - - /** Halts any text reflow for all text objects in the current document. - Match this call with a call to \c #ResumeTextReflow(). - - If you manipulate \c #kTextFrameArt objects and do not need text reflow - after each access, this speeds up the manipulation process. - Some functions that causes text reflow are:
- \c #ATE::ITextRange::InsertAfter(), \c #ATE::ITextRange::InsertBefore()
- \c #ATE::ITextRange::SetLocalCharFeatures(), \c #ATE::ITextRange::SetLocalParaFeatures()
- \c #ATE::ITextRange::Remove() - - @return The error \c #kNoDocumentErr if no document is open. - */ - AIAPI AIErr (*SuspendTextReflow)(); - - /** Resumes text reflow. Reflows any text objects that modified after the - call to \c #SuspendTextReflow(). - @return The error \c #kNoDocumentErr if no document is open. - */ - AIAPI AIErr (*ResumeTextReflow)(); - - /** Retrieves the text selection object for the current document. - You must release the object when it is no longer needed. - It is recommended that you use \c ITextRanges to wrap this object, - which takes care of memory management. For example: - @code -ATE::TextRangesRef selectionRef = NULL; -sAIDocument->GetTextSelection(&selectionRef); -{ - ITextRanges mySelection(selectionRef); - ... -} - @endcode - At this point \c selectionRef is released.The reference is invalid, and you must - call \c #GetTextSelection() again to get a valid object. - - The text selection can describe multiple discontiguous ranges of text across multiple art objects. - \li If the document is in text editing mode, the result is a range representing the caret - or the user selection. - \li If the document is not in text editing mode, there are multiple ranges - for the selected text frame objects. - - @param pTextSelection [out] A buffer in which to return the text selection object. - */ - AIAPI AIErr (*GetTextSelection)( TextRangesRef* pTextSelection ); - - /** Reports whether the current document is in text editing mode. - @param focus [out] A buffer in which to return true if the document has the text focus. - */ - AIAPI AIErr (*HasTextFocus)( AIBoolean *focus); - - /** Reports whether the current document is in text editing mode and the caret - is blinking (as opposed to a range of text being selected). - @param caret [out] A buffer in which to return true if the document has - the text focus and the caret is blinking. - */ - AIAPI AIErr (*HasTextCaret)( AIBoolean *caret); - - /** Retrieves the current story that is in editing mode. - You must release the object when it is no longer needed. - It is recommended that you use \c IStory to wrap this object, - which takes care of memory management. - @param pStory [out] A buffer in which to return the story object, - or \c NULL if the current document is not in text editing mode. - */ - AIAPI AIErr (*GetTextFocus)( StoryRef* pStory); - - /** Sets a story to be in editing mode. The insertion point is positioned at the - start of the story. - @param story The story object. - */ - AIAPI AIErr (*SetTextFocus)( StoryRef story); - - /** Exits text editing mode. */ - AIAPI AIErr (*LoseTextFocus)(); - - /** Retrieves the text resource object for the current document. - You must release the object when it is no longer needed. - It is recommended that you use \c IDocumentTextResource to wrap this object, - which takes care of memory management. - - The document text resources object contains various document-wide - utilities and objects such as the character and paragraph styles. - - @param pDocResources [out] A buffer in which to return the text resources object. - @see \c ATE suites and \c IText.h. - */ - AIAPI AIErr (*GetDocumentTextResources)( DocumentTextResourcesRef* pDocResources); - - /** @deprecated Does nothing in AI13 (CS3) - - Attaches a thumbnail of the current document to the resources of the specified file. This - is the thumbnail displayed in the Finder in Mac OS. - @param file The file. - */ - AIAPI AIErr (*WriteDocumentMacInformationResource)( const ai::FilePath &file ); - - /** Writes the current document to a file with specified write options, - without modifying the document or changing its modification status. - @param file The file specification. - @param fileFormatName The file format name. - @param fileFormatOptions The write options, a logical OR of \c #AIFileFormatOptions values. - @param additionalOptionsDict Additional file format specific options to customize import/export. - @param askForParms When true, show a dialog to query user for file-format parameters. - If no format parameters are available, the function queries the user - even if this value is false. - @see \c #WriteDocument() - */ - AIAPI AIErr (*WriteDocumentWithOptions) (const ai::FilePath &file, const char *fileFormatName, - ai::int32 fileFormatOptions, AIDictionaryRef additionalOptionsDict, AIBoolean askForParms); - - /** Reports whether rendering the current document according to its current - view settings requires painting any overprinted objects. - @param hasOverprint [out] A buffer in which to return true if the - document has overprint. - */ - AIAPI AIErr (*DocumentHasOverprint)(AIBoolean *hasOverprint); - - /** Reports whether a document contains any managed links. - A managed link is a URL to an Adobe Workgroup Server where - one can share and keep versions of the linked document. - @param document The document reference. - @param hasManagedLinks [out] A buffer in which to return true if the document - has managed links. - @see \c #GetDocumentAssetMgmtInfo(), \c #GetDocumentURL() - - @note In AI 10, only a managed document could have managed links. In later versions, - non-managed documents can also have managed links. - */ - AIAPI AIErr (*DocumentHasManagedLinks)(AIDocumentHandle document, AIBoolean *hasManagedLinks); - - /** Retrieves the spot color mode of a document, which controls the - appearance definitions of new spot colors that are added to the document. - @param document The document reference, or \c NULL for the current document. - @param mode [out] A buffer in which to return the mode, an \c #AISpotColorMode value. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no - current document. - */ - AIAPI AIErr (*GetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode *mode); - - /** Sets the spot color mode of a document, which controls the appearance - definitions of new spot colors that are added to the document. - @param document The document reference, or \c NULL for the current document. - @param mode The new mode, an \c #AISpotColorMode value. - @param convert When true, converts existing spot color definitions to the new mode. - @param converted [out] Optional. A buffer in which to return true if any colors - were actually modified. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no - current document. - */ - AIAPI AIErr (*SetDocumentSpotColorMode)(AIDocumentHandle document, AISpotColorMode mode, - AIBoolean convert, AIBoolean* converted); - - /** Undoes the most recent undoable transaction. This is the same as the Undo menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Undo) (); - - /** Redoes the most recent redoable transaction. This is the same as the Redo menu command. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - AIAPI AIErr (*Redo) (); - /** Reports whether the current document contains any DeviceN or overprinting rasters. - @param hasDeviceNRasters [out] A buffer in which to return true if the - the document has DeviceN rasters. - @param hasOverprint [out] A buffer in which to return true if the - the document has overprinting rasters. - */ - AIAPI AIErr (*DocumentRasterAttributes) (AIBoolean *hasDeviceNRasters, AIBoolean *hasOverprint); - - /** Retrieves the document startup profile. - @param document The document reference, or \c NULL for the current document. - @param startupProfile [out] A buffer in which to return the document startup profile. - @return The error \c #kNoDocumentErr if \c document is \c NULL and there is no current document. - */ - AIAPI AIErr (*GetDocumentStartupProfile) (AIDocumentHandle document, AIDocumentStartupProfile *startupProfile ); - - /** Retrieves the document's bleed values. - @param bleedOffset [out] A buffer in which to return the bleed values. - */ - - AIAPI AIErr (*GetDocumentBleeds) (AIRealRect *bleedOffset); - - /** Sets the document's bleed values. - @param bleedOffset A rectangle containing the new bleed values. - */ - - AIAPI AIErr (*SetDocumentBleeds) (const AIRealRect& bleedOffset); - - /** Turns Pixel Perfect mode on or off for the document. - @param isPixelPerfect True to turn Pixel Perfect mode on, false to turn it off. - */ - - AIAPI AIErr (*SetDocumentPixelPerfectStatus)(AIBoolean isPixelPerfect); - - /** Reports whether the document is currently in Pixel Perfect mode. - @return True if Pixel Perfect mode is on, false otherwise. - */ - - AIAPI AIBoolean (*GetDocumentPixelPerfectStatus)(); - - /** Deletes the current Selection. This is the same as pressing delete key. - @note Use only when this plug-in is issuing a command and is entirely - in control of that command. Do not call when responding to messages - invoked by other commands, such as save, close, update, and so on. - */ - - AIAPI AIErr (*DeleteSelection)(); - -}; - - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190CSXSExtension.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190CSXSExtension.h deleted file mode 100644 index cdf9ec7..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190CSXSExtension.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef _AI190CSXSExtension_H_ -#define _AI190CSXSExtension_H_ -/* -* Name: _AICSXSExtension_H_ -* Date: Started 2011 -* Purpose: Adobe Illustrator CSXS Extension Header. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 2009 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AICSXSExtension.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAI190CSXSExtensionSuite "AI CSXS Extension Suite" -#define kAI190CSXSExtensionSuiteVersion AIAPI_VERSION(3) -#define kAI190CSXSExtensionVersion kAICSXSExtensionSuiteVersion - -#define kAICSXSExtensionUnloadNotifier "Extension Unloaded Notifier" - -/** -Constants for reporting the status of Creative Suite extensions. -See \c #AICSXSExtensionSuite::GetExtensionState(). -*/ -enum AI190CSXSExtensionState -{ - /** Extension is not registered in Illustrator. */ - kAI190CSXSExtensionNotRegisteredState, - /** Extension is registered in Illustrator and ready to load. */ - kAI190CSXSExtensionRegisteredState, - /** Extension is loaded. */ - kAI190CSXSExtensionLoadedState, - /** Extension is unloaded. */ - kAI190CSXSExtensionUnLoadedState, - /** Internal use */ - kAI190CSXSExtensionMaximumState = 0xffff - -}; - -typedef struct AI190CSXSExtensionNotifierMsg -{ - AI190CSXSExtensionState state; - const char* extensionId; -}AI190CSXSExtensionNotifierMsg; - -/******************************************************************************* -** -** Suite -** -**/ - -/** @ingroup Suites -This suite provides access to information about the status of Creative Suite -extensions that might be loaded into Illustrator. - -Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAICSXSExtensionSuite and \c #kAICSXSExtensionVersion. -*/ -typedef struct { - - /** Retrieves the current registration and load state of an extension. - @param extensionId [in] The unique identifier of the extension. - @param state [out] A buffer in which to return the current state, an \c #AICSXSExtensionState constant value. - */ - AIAPI AIErr(*GetExtensionState) (const char* extensionId, ai::int32& state); - - /** Reports whether an extension's main window is currently visible in the UI. - @param extensionId [in] The unique identifier of the extension. - @param isVisible [out] True if the extension's main window appears in the UI, false otherwise. - */ - AIAPI AIErr(*IsPrimaryStageVisible) (const char* extensionId, AIBoolean& isVisible); - - /** Launches extension of specified extension ID - @param extensionId [in] The unique identifier of the extension. - */ - AIAPI AIErr(*LaunchExtension) (const char* extensionId); - - /** Sends Provided Event To Extension with the provided data - @param extensionId [in] The unique identifier of the extension. - @param eventID [in] The unique identifier of the event. - @param appId [in] The unique identifier of Application. - @param data [in] data is optional. it can be used to send some data to extension along with the event - */ - AIAPI AIErr(*SendEventToExtension) (const char* extensionId, const char* eventID, const char* appId, const char* data); - -} AI190CSXSExtensionSuite; - -#include "AIHeaderEnd.h" - -#endif // _AI190CSXSExtension_H - diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190PaintStyle.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190PaintStyle.h deleted file mode 100644 index 5164f9c..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190PaintStyle.h +++ /dev/null @@ -1,223 +0,0 @@ -#ifndef __AI190PaintStyle__ -#define __AI190PaintStyle__ - -/* - * Name: AI190PaintStyle.h - * Author: Dave Lazarony - * Date: 6/17/96 - * Purpose: AI Paint Style Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* -** -** Imports -** -**/ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AIPathStyle__ -#include "AIPathStyle.h" -#endif - -#ifndef __AISwatchList__ -#include "AISwatchList.h" -#endif - -#include "AIPaintStyle.h" -#include "AIHeaderBegin.h" -/** @file AI190PaintStyle.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI190PaintStyleSuite kAIPaintStyleSuite -#define kAIPaintStyleSuiteVersion9 AIAPI_VERSION(9) - -/* Latest version */ -#define kAI190PaintStyleSuiteVersion kAIPaintStyleSuiteVersion9 -#define kAI190PaintStyleVersion kAI190PaintStyleSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions to examine and operate on the Color and Gradient - palettes, which display and modify the paint style of the current selection, - and the Color Editor, which allows a user to choose and edit colors. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPaintStyleSuite and \c #kAIPaintStyleSuiteVersion. - */ -typedef struct -{ - /** Causes the Color palette to show the stroke color (not fill). - (Note that this function does not return an error code.) - */ - void ASAPI (*SetStrokeActive)(); - - /** Reports whether the Color palette shows the stroke color (not fill). - (Note that this function returns a boolean value, not an error code.) - @return True if stroke is active. - */ - ASBoolean ASAPI (*IsStrokeActive)(); - - /** Causes the Color palette to show the fill color (not stroke). - (Note that this function does not return an error code.) - */ - void ASAPI (*SetFillActive)(); - - /** Reports whether the Color palette shows the fill color (not stroke). - (Note that this function returns a boolean value, not an error code.) - @return True if fill is active. - */ - ASBoolean ASAPI (*IsFillActive)(); - - /** Sets the fill and stroke states of the current selection to those - of the default style (usually white for fill and solid - 1-point black for stroke). - (Note that this function does not return an error code.) - */ - void ASAPI (*SetDefaultFillStroke)(); - - /** Retrieves the index position of the selected stop the current gradient. - (Note that this function returns a numeric value, not an error code.) - @return The 0-based position index, or -1 if a gradient stop is not - currently being edited. - */ - int ASAPI (*GetActiveGradientStopIndex)(); - - /** Retrieves the gradient currently shown in the Gradient palette. - @param color [out] A buffer in which to return the gradient. - */ - ASErr ASAPI (*GetCurrentGradient)(AIColor *color); - - /** Retrieves the fill, stroke, or currently active gradient stop - color currently shown in the Color palette. - @param color [out] A buffer in which to return the color. - */ - ASErr ASAPI (*GetCurrentColor)(AIColor *color); - - /** Invokes the Gradient palette. */ - ASErr ASAPI (*ShowGradientDialog)(); - - /** Invokes the Color palette. */ - ASErr ASAPI (*ShowColorDialog)(); - - /** If caching is not active, applies a color to the selection, or to the - active gradient stop. - - If caching is active--that is, between a call to \c #BeginActiveColor() - and a call to \c #EndActiveColor() --applies the color to proxies (such as the - color previews in the Tools palette) rather than to the selection or gradient stop. - (The eyedropper tool uses this during mouse-drag.) - @param color The new color. - @param useGradientStop True to replace the color in the - currently active gradient stop only, false to replace the color - in the entire selection. - */ - ASErr ASAPI (*SetActiveColor)(AIColor *color, ASBoolean useGradientStop); - - /** Starts caching for color application to proxies. - @see \c #SetActiveColor(), \c #SetAIColor() */ - ASErr ASAPI (*BeginActiveColor)(); - - /** Finishes caching for color application to proxies. - @see \c #SetActiveColor(), \c #SetAIColor() */ - ASErr ASAPI (*EndActiveColor)(); - - /** Reports whether the current color in the Color palette is for a stroke or fill. - (Note that this function returns a boolean value, not an error code.) - @return True if the color is for a stroke, false if it is for a fill. - */ - ASBoolean ASAPI (*IsCurrentColorStroke)(); - - /** If caching is not active, applies a stroke or fill color to the current selection, - using a partial color specification. - - If caching is active--that is, between a call to \c #BeginActiveColor() - and a call to \c #EndActiveColor() --applies the color to proxies (such as the - color previews in the Tools palette) rather than to the selection. - @param color The color structure containing new color component values. - @param colorMap A color map that specifies which members of the color structure - contain valid values. - @param isStroke True to set the current stroke color, false to set the fill color. - */ - ASErr ASAPI (*SetAIColor)(AIColor *color, AIColorMap *colorMap, ASBoolean isStroke); - - /** Shows a gradient in the Gradient palette. - @param color The gradient. - */ - ASErr ASAPI (*SetCurrentGradient)(AIColor *color); - - /** Shows a color in the Color palette. - @param color The color. - */ - ASErr ASAPI (*SetCurrentColor)(AIColor *color); - - /** Shows the Color palette if it is hidden, hides the Color palette if it is shown. - */ - ASErr ASAPI (*ToggleColorDialog)(); - - /** Exchanges the fill and stroke colors for the current selection. - (Note that this function does not return an error code.) - */ - void ASAPI (*SwapFillStroke)(); - - /** Invokes the color-chooser dialog and reports the chosen color. - (Note that this function returns a boolean value, not an error code.) - @param currentColor specifies the initial color the picker will display. - When the function returns currentColor will become the color the user picked. - @return True if the user clicked OK, false of the user clicked Cancel. */ - ASBoolean ASAPI (*DisplayColorPicker)(AIColor *currentColor); - - /** Invokes the Color Picker dialog with options and reports the chosen color. - (Note that this function returns a boolean value, not an error code.) - @param currentColor [in/out] On input, the initial color to display. - On output, the color the user selected. - @param options Options for initial display. The Color Picker opens in - the swatch-list view if the initial color exactly matches the color - in a swatch from the \c #AIColorPickerOptions::swatchList. - @return True if the user clicked OK in the Color Picker, false if the user clicked Cancel. - */ - ASBoolean ASAPI (*DisplayColorPickerWithOptions)(AIColor *currentColor, const AIColorPickerOptions &options ); - - /** Changes the stroke alignment on an art. - @param art [in] The art handle whose stroke alignment is to be changed.. - On output, the color the user selected. - @param strokeAlignment [in] The requirement alignment type. For possible values please see enum \c #AIStrokeAlignmentType. - @return kNoErr if successful, error code otherwise. - */ - AIErr ASAPI (*SetStrokeAlignment)(AIArtHandle art, ai::uint32 strokeAlignment); - -} AI190PaintStyleSuite; - - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190Placed.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190Placed.h deleted file mode 100644 index 5e15bd2..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190Placed.h +++ /dev/null @@ -1,343 +0,0 @@ -#ifndef __AI190Placed__ -#define __AI190Placed__ - -/* - * Name: AIPlaced.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Placed Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef _AIRaster_ -#include "AIRaster.h" -#endif - -#include "IAIFilePath.hpp" - -#include "AIHeaderBegin.h" - -/** @file AIPlaced.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAIPlacedSuite "AI Placed Suite" -#define kAIPlacedSuiteVersion8 AIAPI_VERSION(8) -#define kAI190PlacedSuiteVersion kAIPlacedSuiteVersion8 - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** Request data for \c #AIPlacedSuite::ExecPlaceRequest(). -Initialize all fields, even when not expecting to use them. -*/ -struct AI190PlaceRequestData -{ - AI190PlaceRequestData() : m_lPlaceMode(0), m_hOldArt(NULL), m_hNewArt(NULL), m_pFilePath(NULL), m_lParam(0), m_filemethod(0), m_disableTemplate(false), m_doShowParamDialog(false){} - - /** The type of placement request, a \c #PlaceRequestMode constant - which determines what operation is performed. */ - ai::int32 m_lPlaceMode; - - /** Art to be replaced. */ - AIArtHandle m_hOldArt; - - /** Returns the handle for new art that was placed or created. */ - AIArtHandle m_hNewArt; - - /** File path of the placed file. If \c NULL, shows a File Place dialog - to query the user for the path and any relevant placement options. */ - const ai::FilePath *m_pFilePath; - - /** The type of art to create for the \c #kCreateNewArt request, - an \c #AIArtType value. */ - ai::int32 m_lParam; - - /** 0 to place or import the file, 1 to link the file. */ - ai::int16 m_filemethod; - - /** True to disable the Template placement option. */ - ASBoolean m_disableTemplate; - - /** True to show the parameters dialog even when the file path is known. */ - AIBoolean m_doShowParamDialog; -}; - - -/** @ingroup Suites - This suite provides functions that allow you to access and manipulate - \e placed \e art. Illustrator uses placed art to link artwork contained - in external files into an Illustrator document. For a file to be linked, - there must be an installed file-format plug-in that supports linking the format. - - A placed object is defined by its file specification and a matrix positioning - the file content in the document. - - After creating an empty placed object, use \c #SetPlacedBoundingBox() to - set initial bounds, then call \c #AIArtSuite::UpdateArtworkLink() to read - the content of the referenced file. If the file is read successfully, - the initial bounds are replaced by the true bounds from the file. If the read fails, - the bounds are not changed, and, if this function were not used to - set them, the result would be a placed object without width or height. - - All file types except EPS also have a group of art objects that represents - the parsed contents of the file.When a file-format plug-in is requested to - link a file other than an EPS, it does the following: - - \li Creates a placed object for the linked file, setting its file specification - to reference the file. - \li Calls \c #SetPlacedObject() to create a group to contain the artwork - representing the content of the linked file. - \li Reads the content of the linked file, creating the artwork to represent - the content. - \li Sets the matrix of the placed object as needed to position the content - in the document. - - The transformation matrix of a placed image is the concatenation of all of the - transforms applied to the image after it has been placed. The matrix begins as - a simple translate which positions the image on the page. You can also rotate, - scale and shear the image. - - Placement options control how a linked image is positioned and scaled - relative to the bounds of the placed object. Placement is - adjusted whenever the image size changes; that is, when the file changes - on disk, or when it is explicitly relinked with \c #SetPlacedFileSpecification(). - The replacement image can be placed into the bounds of the original object, or - the bounds of the original object can be scaled, and the replacement placed - into the resulting bounds. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIPlacedSuite and \c #kAIPlacedVersion. - */ -typedef struct AI190PlacedSuite { - - /** Retrieves the file specification for the linked file of a placed object. - If the linked file does not exist, the returned file specification - supplies only the file name. - @param placed The placed object. - @param file [out] A buffer in which to return the file specification. - */ - AIAPI AIErr (*GetPlacedFileSpecification) ( AIArtHandle placed, ai::FilePath &file ); - - /** Associates a placed object with a linked file. If the file is an EPS, - immediately parses the contents and acquires the PICT preview. - Otherwise, defers parsing until you request it with - \c #AIArtSuite::UpdateArtworkLink() or \c #AIDocumentSuite::UpdateLinks(). - @param placed The placed object. - @param file The file specification. If this identifies an EPS, i - */ - AIAPI AIErr (*SetPlacedFileSpecification) ( AIArtHandle placed, const ai::FilePath &file ); - - /** Retrieves the transformation matrix that positions the content of a placed art object's - linked file in the document. Use with \c #SetPlacedMatrix() to modify the transformation. - @param placed The placed object. - @param matrix [out] A buffer in which to return the transformation matrix. - @see \c #ConcatPlacedMatrix() - */ - AIAPI AIErr (*GetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix ); - - /** Sets the transformation matrix of a placed art object. The matrix includes - the simple translate that places the image on the page, as well as any rotate, - scale, and shear values. Use with \c #GetPlacedMatrix() to modify the transformation. - @param placed The placed object. - @param matrix The new transformation matrix. - @see \c #ConcatPlacedMatrix() - */ - AIAPI AIErr (*SetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix ); - - /** Retrieves the boundary dimensions of placed art, regardless of the - transformations applied to it. - @param placed The placed object. - @param bbox [out] A buffer in which to return the bounding rectangle. - */ - AIAPI AIErr (*GetPlacedBoundingBox) ( AIArtHandle placed, AIRealRect *bbox ); - - /** Creates or clears and returns a group art object to hold the parsed content of - the linked file for a placed object. File-format plug-ins call this when reading - the content of a linked file. - @param placed The placed object. - @param group [out] A buffer in which to return the group art object. - */ - AIAPI AIErr (*SetPlacedObject) ( AIArtHandle placed, AIArtHandle *group ); - - /** Gets the number of custom colors used by a placed art object for an EPS file. Use with - \c #GetNthPlacedCustomColorName() to iterate through the colors and get their names. - @param art The placed object. - @param count [out] A buffer in which to return the number of spot colors. - @return The error \c #kBadParameterErr if the linked file is not an EPS. - @see \c #AICustomColorSuite. - */ - AIAPI AIErr (*CountPlacedCustomColors) ( AIArtHandle art, ai::int32 *count ); - - /** Retrieves the name of custom color used by a placed art object for an EPS file. - Use with \c #CountPlacedCustomColors to iterate through the custom colors. - @param art The placed art object. - @param num The 0-based position index of the color. - @param name [out] A buffer in which to return the color name. - @return The error \c #kBadParameterErr if the linked file is not an EPS. - */ - AIAPI AIErr (*GetNthPlacedCustomColorName) ( AIArtHandle art, ai::int32 num, ai::UnicodeString& name ); - - /** Changes a linked placed-art or raster-art object to an embedded art object. - @param placed The art object, of type \c #kPlacedArt or \c #kRasterArt. - @param native [out] A buffer in which to return the new embedded art object. - @param askForParam When true, show dialog for user input if needed. - */ - AIAPI AIErr (*MakePlacedObjectNative) ( AIArtHandle placed, AIArtHandle *native, AIBoolean askForParam ); - - /** Retrieves the type of a placed object (EPS or other file type). - @param placed The art object, of type \c #kPlacedArt or \c #kRasterArt. - @param pPlacedType [out] A buffer in which to return the type constant, - an \c #AIPlacedObjectType value. - */ - AIAPI AIErr (*GetPlacedType) ( AIArtHandle placed, ai::int16 *pPlacedType ); - - /** Retrieves the art group representing the parsed content of the - non-EPS linked file for a placed object. - @param placed The placed object. - @param group [out] A buffer in which to return the art group object. - @return The error \c #kBadParameterErr if the linked file is not an EPS. - */ - AIAPI AIErr (*GetPlacedChild) ( AIArtHandle placed, AIArtHandle *group ); - - /** Executes a request related to a placed object. - The request can place or replace the art, either explicitly - or in relation to the current selection. - @param placeRequestData An \c #AI190PlaceRequestData structure in which to - specify the request and return results. - */ - AIAPI AIErr(*ExecPlaceRequest)(AI190PlaceRequestData &placeRequestData); - - /** Retrieves the file information for a placed object's linked file (such - as the creation and modification dates), as stored from the most recent - file read operation. - @param placed The placed object. - @param spFileInfo [out] A buffer in which to return the file information. - @note Compare this file information (stored with the placed object) - to the current information for the file itself (\c #GetPlacedFileInfoFromFile()) - to determine if the file has changed. - */ - AIAPI AIErr (*GetPlacedFileInfoFromArt)( AIArtHandle placed, SPPlatformFileInfo *spFileInfo ); - - /** Retrieves the file information for a placed object's linked file (such - as the creation and modification dates), from the file itself (as opposed to - the file information stored with the object). - @param placed The placed object. - @param spFileInfo [out] A buffer in which to return the file information. - @see \c #GetPlacedFileInfoFromArt() - */ - AIAPI AIErr (*GetPlacedFileInfoFromFile)( AIArtHandle placed, SPPlatformFileInfo *spFileInfo ); - - /** Retrieves the path specification for the file associated with a placed-art object. - @param placed The placed object. - @param path [out] A buffer in which to return the platform-specific file path string. - */ - AIAPI AIErr (*GetPlacedFilePathFromArt)( AIArtHandle placed, ai::UnicodeString &path ); - - /** Concatenates a new transformation onto the existing transformation matrix - for a placed object. - @param placed The placed object. - @param concat The new transformation matrix. - */ - AIAPI AIErr (*ConcatPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *concat ); - - // New for Illustrator 10 - - /** Sets the placement options for a placed object, used to scale and place the - linked image relative to the bounds of the placed object. Placement is - adjusted whenever the image size changes; that is, when the file changes - on disk, or when it is explicitly relinked with \c #SetPlacedFileSpecification(). - @param placed The placed object. - @param method The way to position and size the linked object. - @param alignment The way to align the linked object - @param clip True to clip the linked object. - */ - AIAPI AIErr (*SetPlaceOptions) ( AIArtHandle placed, enum PlaceMethod method, enum PlaceAlignment alignment, AIBoolean clip ); - - /** Retrieves the placement options for a placed object. See \c #SetPlaceOptions(). - @param placed The placed object. - @param method [out] A buffer in which to return the method used to position and size the linked object. - @param alignment [out] A buffer in which to return the alignment of the linked object. - @param clip [out] A buffer in which to return true if the linked object is clipped. - */ - AIAPI AIErr (*GetPlaceOptions) ( AIArtHandle placed, enum PlaceMethod *method, enum PlaceAlignment *alignment, AIBoolean *clip ); - - /** Retrieves the size, placement, and transformation of a placed object itself, - and of its linked image.The matrices are those used to transform the object and - image from the original bounds to their current locations on the screen. - With the \c #kConform placement option, these are the same. - @param placed The placed object. - @param size [out] A buffer in which to return the size (the X and Y dimensions) - of the original image. - @param viewBounds [out] A buffer in which to return the bounding box of the placed object. - @param viewMatrix [out] A buffer in which to return the transformation matrix of the placed object. - @param imageBounds [out] A buffer in which to return the bounding box of the linked image. - @param imageMatrix [out] A buffer in which to return the transformation matrix of the linked image. - */ - AIAPI AIErr (*GetPlacedDimensions) ( AIArtHandle placed, AIRealPoint *size, AIRealRect *viewBounds, AIRealMatrix *viewMatrix, - AIRealRect *imageBounds, AIRealMatrix *imageMatrix ); - - // New for Illustrator 12 - - /** Sets the preliminary bounding box information for a placed object. - @param art The placed object. - @param bbox The bounding rectangle. - */ - AIAPI AIErr (*SetPlacedBoundingBox) ( AIArtHandle art, AIRealRect* bbox ); - - /** Retrieves the raster record describing the image for a placed object - that represents a placed, linked image. - @param art The placed object. - @param info [out] A buffer in which to return the information. - @param israster [out] A buffer in which to return if the placed object - does represent an image, false if it does not. - */ - AIAPI AIErr (*GetRasterInfo) ( AIArtHandle art, AIRasterRecord* info, AIBoolean* israster ); - /** Gets the process colors plates used by a placed art object for an EPS file or a placed, linked image. - @param art The placed object. - @param plateInfo [out] A buffer in which to return which plates are used by the placed object - */ - AIAPI AIErr (*GetProcessPlatesInfo) (AIArtHandle art, AIPlacedPlateInfo * plateInfo); - -} AI190PlacedSuite; - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190SwatchLibraries.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190SwatchLibraries.h deleted file mode 100644 index 781c19a..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190SwatchLibraries.h +++ /dev/null @@ -1,441 +0,0 @@ -#ifndef __AI190SwatchLibraries__ -#define __AI190SwatchLibraries__ - -/* - * Name: AISwatchLibraries.h - * Author: Neal Tucker - * Date: 3/11/97 - * Purpose: Adobe Illustrator Swatch Libraries Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __ASTypes__ -#include "ASTypes.h" -#endif - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AISwatchList__ -#include "AISwatchList.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AISwatchLibraries.h */ - -// AISwatchLibs Suite -#define kAI190SwatchLibrariesSuite "AI Swatch Libraries Suite" -#define kAI190SwatchLibrariesSuiteVersion AIAPI_VERSION(6) -#define kAI190SwatchLibrariesVersion kAI190SwatchLibrariesSuiteVersion - -/** @ingroup Callers - Caller ID for messages sent to plug-ins from the Swatch Libraries plug-in. -*/ -#define kAISwatchLibsCaller "Swatch Libraries" - -/******************************************************************************* - ** - ** Types - ** - **/ -typedef struct _t_OS_MenuPtr* AIMenuPtr; - -/** @ingroup Notifiers - Sent when the Swatch Library is opened and has been modified since the last load - or when it is reloaded because the user saved to it. - */ -#define kAI190SwatchLibraryChangedNotifier "AI Swatch Library Changed Notifier" - -/** Message data sent with #kAI190SwatchLibraryChangedNotifier. - Use with \c #AISwatchLibrariesSuite::GetActiveSwatchList(). - */ -typedef struct { - /** The updated swatch list. */ - AISwatchListRef swatchList; - /** The unique identifier of the swatch library that was modified. */ - ai::int32 swatchLibraryID; -} AI190SwatchLibraryChangedNotifierData; - - -/** Specifies a swatch position relative to the currently active swatch - in a document Swatch palette. The behavior depends on whether wrapping - is on or off. - See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ -typedef enum { - /** The active swatch itself. */ - kAI190CurDocSwatch, - /** The next swatch in the group or list. */ - kAI190NextDocSwatch, - /** The previous swatch in the group or list. */ - kAI190PrevDocSwatch, - /** The first swatch in the next group. */ - kAI190SwatchInNextDocSwatchGroup, - /** The last swatch in the previous group. */ - kAI190SwatchInPrevDocSwatchGroup -} AI190RelativeDocSwatchKind; - -/** Specifies which Swatches palette for the current document is the target of a swatch selection - query. See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() - */ -typedef enum { - /** The main swatches palette in the regular palette. */ - kAI190MainDocSwatches, - /** The Fill swatches palette in the Control palette. When the toolbox's - Fill/Stroke indicator is in Fill mode, this has the same selection - as the main document Swatches palette. */ - kAI190DocFillSwatches, - /** The Stroke swatches palette in the Control palette. When the toolbox's - Fill/Stroke indicator is in Stroke mode, this has the same selection - as the main document Swatches palette. */ - kAI190DocStrokeSwatches -} AI190WhichDocSwatchesPalette; - - -/** Specifies the library types that should be included when building a library list. - See \c #AISwatchLibrariesSuite::BuildLibrariesList(). For the various folder types - see \c #AIFoldersSuite */ -typedef ai::uint32 AISwatchLibraryType; - -/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Swatches folder. - This does not include the preset color books, gradients and patterns folders.*/ -#define kAI190PresetSwatches 1 -/** An \c #AISwatchLibraryType value. Include all libraries in the Preset ColorBooks folder.*/ -#define kAI190PresetColorBooks 2 -/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Gradients folder.*/ -#define kAI190PresetGradients 4 -/** An \c #AISwatchLibraryType value. Include all libraries in the Preset Patterns folder.*/ -#define kAI190PresetPatterns 8 -/** An \c #AISwatchLibraryType value. Include all libraries in the User Writable Swatch libraries folder.*/ -#define kAI190UserWritableSwatches 16 -/** An \c #AISwatchLibraryType value. Include other libraries opened from Illustrator. */ -#define kAI190OtherLibraries 32 -/** An \c #AISwatchLibraryType value. Include all libraries. */ -#define kAI190AllSwatchLibraries kAIPresetSwatches | kAIPresetColorBooks | kAIPresetGradients | kAIPresetPatterns | kAIUserWritableSwatches | kAIOtherLibraries - -/** @ingroup Errors -See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ -#define k190SwatchDoesNotExistErr '!SNE' - -/** @ingroup Errors -See \c #AISwatchLibrariesSuite::GetRelativeDocSwatch() */ -#define k190NoActiveSwatchError '!NAS' - - -/** Supplied by the Swatch Libraries plug-in, these functions - allow you to open, access, and manipulate libraries of color, - custom color, pattern, and gradient swatches, also called swatch lists. - - You can collect all swatches, or all patterns, gradients, or custom colors - from all open libraries into a single list sorted by name, and - iterate through the resulting swatch list. - - \e Color \e books contain collections of pre-defined colors, - such as the Pantone colors. Some color book definitions and names - have changed from previous versions. For example, in Illustrator 12 and later, - Pantone solids are LAB, but were formerly CMYK. - \li \c #FindStandardBookColor() finds named colors in the - current color books. - \li \c #FindLegacyBookColor() find the previous color definition. - \li \c #MapLegacyColorName() maps a legacy color name to a current one. - */ -typedef struct -{ - /** Gets the number of currently known swatch libraries, including the swatch list - of the current open document. Use with \c #GetNthLibrary() to iterate through - known libraries. - - A library is known if it is located in the Presets folder and appears - in the Swatch Libraries menu, or if it has been opened at some time - during the current session with the Other Libraries command. - You can get a swatch list from a known library regardless of whether it is - open or closed. - @note Closing a swatch palette does not remove its swatches from memory, - but closing a document does clear the corresponding swatch list. - @param num [out] A buffer in which to return the number of open libraries. - */ - AIErr ASAPI (*CountLibraries)(ai::int32 *num); - - /** Retrieves the swatch list for a known swatch library by position index. Use with - \c #CountLibraries() to iterate through libraries. Use the \c #AISwatchListSuite - to access and modify the returned list. - @param num The 0-based position index. Use 0 or a negative number to get the swatch - list for the current document. The first real library starts at index 1. - @param swatchlist [out] A buffer in which to return the swatch list, or \c NULL if - the swatch library has not been opened during this session. - @see \c #OpenNthLibrary() to open a library. - */ - AIErr ASAPI (*GetNthLibrary)(ai::int32 num, AISwatchListRef *swatchlist); - - /** Retrieves the name of any swatch library in the list, whether it has been opened - or not. - @param num The 0-based position index of the library. - @param name [out] A buffer in which to return the name. The name of the - swatch library for the current document (\c num <= 0) is the empty string. - */ - AIErr ASAPI (*GetNthLibraryName)(ai::int32 num, ai::UnicodeString& name); - - // Aggregate list access - - /** Counts the aggregate number of all swatches in all libraries that have swatch lists. - Use with \c #GetNthLibrarySwatch() to iterate through all swatches. - @param num [out] A buffer in which to return the number of swatches. - */ - AIErr ASAPI (*CountLibrarySwatches)(ai::int32 *num); - - /** Retrieves a swatch by position index from the list of all swatches. - Use with \c #CountLibrarySwatches() to iterate through all swatches. - @param num The 0-based position index. - @param swatch [out] A buffer in which to return the swatch. - */ - AIErr ASAPI (*GetNthLibrarySwatch)(ai::int32 num, AISwatchRef *swatch); - - /** Counts the aggregate number of all pattern swatches in all open libraries. - Use with \c #GetNthLibraryPattern() to iterate through all patterns. - @param num [out] A buffer in which to return the number of patterns. - */ - AIErr ASAPI (*CountLibraryPatterns)(ai::int32 *num); - - /** Retrieves a pattern swatch by position index from the list of all patterns. - Use with \c #CountLibraryPatterns() to iterate through all patterns. - @param num The 0-based position index. - @param pattern [out] A buffer in which to return the pattern. - */ - AIErr ASAPI (*GetNthLibraryPattern)(ai::int32 num, AIPatternHandle *pattern); - - /** Counts the aggregate number of all gradient swatches in all open libraries. - Use with \c #GetNthLibraryGradient() to iterate through all gradients. - @param num [out] A buffer in which to return the number of gradients. - */ - AIErr ASAPI (*CountLibraryGradients)(ai::int32 *num); - - /** Retrieves a gradient swatch by position index from the list of all gradients. - Use with \c #CountLibraryGradients() to iterate through all gradients. - @param num The 0-based position index. - @param gradient [out] A buffer in which to return the gradient. - */ - AIErr ASAPI (*GetNthLibraryGradient)(ai::int32 num, AIGradientHandle *gradient); - - /** Counts the aggregate number of all custom color swatches in all open libraries. - Use with \c #GetNthLibraryCustomColor() to iterate through all custom color swatches. - @param num [out] A buffer in which to return the number of custom color swatches. - */ - AIErr ASAPI (*CountLibraryCustomColors)(ai::int32 *num); - - /** Retrieves a custom color swatch by position index from the list of all custom color swatches. - Use with \c #CountLibraryCustomColors() to iterate through all custom color swatches. - @param num The 0-based position index. - @param ccolor [out] A buffer in which to return the custom color swatch. - */ - AIErr ASAPI (*GetNthLibraryCustomColor)(ai::int32 num, AICustomColorHandle *ccolor); - - // Color book access, new in AI12 (CS2) - - /** Searches the color books to find the definition of a specific named - color. Color books contain collections of predefined colors, such as - the Pantone colors. A color book need not have been opened to be included - in the search. - (Note that this function returns a boolean value, not an error code.) - @param name The name string of the desired color. - @param color [out] A buffer in which to return the custom color definition, if found. - @return True if the color is found in a color book, false otherwise. - */ - AIBoolean ASAPI (*FindStandardBookColor)(const ai::UnicodeString& name, AICustomColor* color); - - /** Searches the legacy color books to find the previous definition of a specific named - color. A legacy color book need not have been opened to be included in the search. - (Note that this function returns a boolean value, not an error code.) - @param name The name string of the desired color. - @param color [out] A buffer in which to return the custom color definition, if found. - @return True if the color is found in a legacy color book, false otherwise. - */ - AIBoolean ASAPI (*FindLegacyBookColor)(const ai::UnicodeString& name, AICustomColor* color); - - /** Maps a legacy color name to its corresponding name in the current color books. - @param src The legacy color-book name. - @param dst [out] A buffer in which to return the current color-book name, - or the empty string if no mapping is defined. - */ - AIErr ASAPI (*MapLegacyColorName)(const ai::UnicodeString& src, ai::UnicodeString& dst); - - // Palette and Selection control, new for AI13 (CS3) - - /** Retrieves a swatch list from a swatch library. Opens the library file and reads - swatches even if the library has not yet been opened during the session. - Use the \c #AISwatchListSuite to access and modify the returned list. - @param num The 0-based position index. Use 0 or a negative number to get the swatch - list for the current open document, if any. - @param showPalette True to create and show a palette for the library. - @param swatchlist [out] A buffer in which to return the swatch list. - */ - AIErr ASAPI (*OpenNthLibrary)(ai::int32 num, AIBoolean showPalette, AISwatchListRef *swatchList ); - - /** Reports whether a swatch library is currently displayed in an open palette. - (Note that this function returns a boolean value, not an error code.) - @param num The 0-based position index of the swatch library in the list of known libraries. - @param shouldBeVisible : Default value is true - If set true, it ensures that the library asked for, must be currently visible. - else it returns true for all libraries, which were ever opened. - */ - AIBoolean ASAPI (*NthLibraryIsOpen)( ai::int32 num , bool shouldBeVisible); - - - /** Selects a swatch in the main Swatches palette, if it is open and its color kind is shown. - (Note that this function returns a boolean value, not an error code.) - @param index The 0-based position index into the main document's list of the swatch. - @param deselectOthers True to also deselect any other selected swatches if the specified color is visible. - @return True if the swatch was successfully selected, false if it was not. This can - occur if the palette is closed or does not show the specified swatch, or if the index - is invalid. - */ - - AIBoolean ASAPI (*SelectNthDocumentSwatchIfVisible) ( ai::int32 index, AIBoolean deselectOthers ); - - /** Selects a color group and all of the group's swatches in the main Swatches palette, - if it is open and the group is shown. - (Note that this function returns a boolean value, not an error code.) - @param index The 0-based position index into the main document's list of color groups, - or -1 to select the last color group in the document, or -2 or less - to deselect all fully selected color groups. Selected swatches in partially - selected color groups are not deselected. - @param deselectOthers True to also deselect any other selected swatches or color groups - if the specified group is visible. - @return True if the group was successfully selected, false if it was not. This can - occur if the palette is closed or does not show the specified swatch, or if the index - is invalid. - @note This function is intended to used by other plug-ins that create color groups, - to select the groups they have just inserted into the list. - */ - AIBoolean ASAPI (*SelectNthDocColorGroupIfVisible) ( ai::int32 index, AIBoolean deselectOthers ); - - /** Rebuilds the libraries menu, populating it with the current list of libraries. - The list is refreshed if the supplied change stamp does not match the - supplied change stamp. The internal change stamp has an initial value of 1. - Pass a change stamp of 0 to build the list the first time, or to force an update, - or to uncheck all libraries in the list. - @param librariesList The ADM hierarchy list object for the libraries list. - @param startIndex The 0-based index at which the first library entry is created. - @param includeLibraryTypes The library types to include when building the list, - a logical OR of \c #AISwatchLibraryType values. - @param contentChangeStampRef [in/out] On input, a pointer to a change stamp number - to compare with the current internal latest-change stamp. If the input stamp is - less than the internal stamp, the list is updated, and this buffer filled with the - new internal stamp value. - @param checkLibraryID Optional. A pointer to a library's unique identifier. The - entry for that library is drawn with a check mark in the ADM list. - */ - AIErr ASAPI (*BuildLibrariesList) ( AIMenuPtr librariesList, AISwatchLibraryType includeLibraryTypes, ai::int32 startIndex, ai::int32 *contentChangeStampRef, int *checkLibraryID); - - /** Retrieves the swatch list for a swatch library by active list entry, opening the file - and reading the swatches from it if it has not yet been opened during the session. - Use the \c #AISwatchListSuite to access and modify the returned list. - @param librariesList The ADM hierarchy list object for the libraries - menu with the active entry. - @param swatchlist [out] A buffer in which to return the swatch list. - @param activeLibraryID [out] Optional, a buffer in which to return - the active library's unique indentifier. - */ - AIErr ASAPI (*GetActiveSwatchList) ( AISwatchListRef *swatchlist, ai::int32 activeLibraryID); - - /** Counts the total number of selected swatches in the main document Swatches palette. Use this function - to allocate an appropriately sized array of AIColors before calling \c #GetSelectedDocSwatchColors(). - (Note that this function returns an integer value, not an error code.) - @return The number of selected swatches. - */ - ai::int32 ASAPI (*CountSelectedDocSwatches) ( ); - - /** Retrieves an array of colors for the selected document swatches. The - members are ordered as they appear in the document Swatches palette, - left to right and top to bottom. - @param colors [out] A buffer in which to return the colors. - Use \c #CountSelectedDocSwatches() to determine how much memory to allocate. - @param bufferSize The number of elements in the colors array. If there are - more selected colors, only this many are returned. - */ - AIErr ASAPI (*GetSelectedDocSwatchColors) ( AIColor *colors, ai::int32 bufferSize ); - - /** Counts the total number of selected swatch groups in the document Swatch palette. Use - to allocate an array of \c #AISwatchGroupRef before calling - \c #GetSelectedDocSwatchGroups(). - @return The number of selected swatch groups, or - 0 if there is no document open or no Swatches palette. - */ - ai::int32 ASAPI (*CountSelectedDocSwatchGroups) ( ); - - /** Returns an array of the document's selected swatch groups. - The groups are ordered as they appear in the document Swatches palette, - left to right and top to bottom. - @param swatchGroups [out] A buffer in which to return the groups. - Use \c #CountSelectedDocSwatchGroups() to determine how much memory to allocate. - @param bufferSize The number of elements in the groups array. If there are - more selected groups, only this many are returned. - */ - AIErr ASAPI (*GetSelectedDocSwatchGroups) ( AISwatchGroupRef *swatchGroups, ai::int32 bufferSize ); - - /** Retrieves a document swatch in a specified position in the list, relative - to the currently \e active document swatch, as determined by \c IADMHierachyList::GetActiveLeafEntry(). - If one swatch is selected, it is the active swatch. If multiple swatches are selected, - the active one is the last swatch entry to be selected. - @param selectKind The position of the desired swatch, relative to the - active swatch. - @param selectIt When true, the relative swatch becomes selected and all other swatches - are deslected. When false, the swatch selection state remains unchanged. - @param wrap When true, the last swatch in a swatch group wraps to the first swatch - in the same group, and the last swatch group wraps to the first group. -
When wrapping is on, if a swatch group only contains one swatch, the next or previous - swatch is the same one. Similarly, if there is only one swatch group - the next or previous group is the same group. -
Ungrouped swatches in the document swatch list are treated as if they are in a group - that follows the last defined swatch group. - @param targetPalette The swatch palette to search in (main, fill, or stroke). - @param relativeSwatch [out] A buffer in which to return the swatch in the specified relation - to the active swatch, or \c NULL if there is no active swatch or if there is no swatch - at the relative location. The returned error reflects which condition occurred. - @return The error \c #kSwatchDoesNotExistErr if the next or previous swatch does not exist. - When wrapping is on, this error cannot occur. -
The error \c #kNoActiveSwatchError if no swatch is currently selected in the - specified Swatch palette. - */ - AIErr ASAPI (*GetRelativeDocSwatch) ( AIRelativeDocSwatchKind selectKind, AIBoolean selectIt, AIBoolean wrap, - AIWhichDocSwatchesPalette targetPalette, AISwatchRef *relativeSwatch ); - - /** Retrieves an array of references of the selected document swatches. The - members are ordered as they appear in the document Swatches palette, - left to right and top to bottom. - @param swatchRefs [out] A buffer in which to return the references of swatches. - Use \c #CountSelectedDocSwatches() to determine how much memory to allocate. - @param bufferSize The number of elements in the return array. If there are - more selected swatches, only this many are returned. - */ - AIErr ASAPI (*GetSelectedDocSwatchRefs) ( AISwatchRef *swatchRefs, ai::int32 bufferSize ); - - - /** Searches the color book with specified ID to find the definition of a specified named - color. Color books contain collections of predefined colors, such as the Pantone colors. - (Note that this function returns a boolean value, not an error code.) - @param name The name string of the desired color. - @param bookID The id for the book in which color should be searched. - @param color [out] A buffer in which to return the custom color definition, if found. - @return True if the color is found, false otherwise. - */ - AIBoolean ASAPI (*FindColorInBook)(const ai::UnicodeString& name, ai::int32 bookID, AICustomColor* color); - - -} AI190SwatchLibrariesSuite; - - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190Tool.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190Tool.h deleted file mode 100644 index 2c21a10..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI190Tool.h +++ /dev/null @@ -1,385 +0,0 @@ -#ifndef __AI190Tool__ -#define __AI190Tool__ - -/* - * Name: AITool.h - * Author: - * Date: - * Purpose: Adobe Illustrator Tool Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2011 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIArt__ -#include "AIArt.h" -#endif - -#ifndef __AIEvent__ -#include "AIEvent.h" -#endif - -#ifndef __AIFixedMath__ -#include "AIFixedMath.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __AIToolNames__ -#include "AIToolNames.h" -#endif - - -#ifndef __ASHelp__ -#include "ASHelp.h" -#endif - -#ifndef FLT_MAX -#include -#endif - -#include "AITool.h" -#include "AIHeaderBegin.h" -/** @file AITool.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI190ToolSuite "AI Tool Suite" -#define kAIToolSuiteVersion15 AIAPI_VERSION(15) -#define kAI190ToolSuiteVersion kAIToolSuiteVersion15 -#define kAI190ToolVersion kAI190ToolSuiteVersion - - - -struct AI190ToolSuite { - - /** Installs a plug-in tool. Use at startup. - @param self This plug-in. - @param name The unique name of this tool. - @param data Information on how to display this tool in the Tool palette. - @param options Option flags that control the tool's behavior, a logical OR - of \c #AIToolOptions constants. - @param tool [out] A buffer in which to return the tool reference. If you - install multiple tools, save to compare to the tool reference in tool - message data. - */ - AIAPI AIErr(*AddTool) (SPPluginRef self, const char *name, - AIAddToolData *data, ai::int32 options, - AIToolHandle *tool); - - /** For internal use only */ - AIAPI AIErr(*AddToolPrivate) (SPPluginRef self, const char *name, - AIAddToolDataPrivate *data, ai::int32 options, - AIToolHandle *tool); - - /** Retrieves the unique identifying name of a tool. - To get the localizable title that appears in the UI, use \c #GetToolTitle(). - @param tool The tool reference. - @param name [out] A pointer to point to the name string. Do - not modify this string. - */ - AIAPI AIErr(*GetToolName) (AIToolHandle tool, char **name); - - /** Retrieves the option flags of a tool. To retain the existing flags when - setting options with \c #SetToolOptions(), obtain them with this function - and do a logical OR with the new flags. - @param tool The tool reference. - @param options [out] A buffer in which to return the options value, a logical - OR of \c #AIToolOptions constants. - */ - AIAPI AIErr(*GetToolOptions) (AIToolHandle tool, ai::int32 *options); - - /** Sets the option flags of a tool. To retain the existing flags when - setting options, obtain them with \c #GetToolOptions() - and do a logical OR with the new flags. - @param tool The tool reference. - @param options The new options value, a logical OR of \c #AIToolOptions constants. - */ - AIAPI AIErr(*SetToolOptions) (AIToolHandle tool, ai::int32 options); - - /** Retrieves the plug-in that installed a tool. - @param tool The tool reference. - @param plugin [out] A buffer in which to return the plug-in reference, - which can be used with \c #AIPluginSuite functions. - */ - AIAPI AIErr(*GetToolPlugin) (AIToolHandle tool, SPPluginRef *plugin); - - /** Retrieves the currently selected plug-in tool. If the current tool - is a built-in tool, returns NULL. - See \c #AIToolboxSuite::GetCurrentToolType() or \c #GetCurrentToolName() - for retrieving the current tool including built-in tools. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr(*GetSelectedTool) (AIToolHandle *tool); - - /** Selects a plug-in tool programmatically. This is the same as the user - selecting the tool in the Tool palette. - To select built-in tools, see \c #SetSelectedToolByName() - @param tool The tool reference. - */ - AIAPI AIErr(*SetSelectedTool) (AIToolHandle tool); - - /** Gets the number of installed plug-in tools. Use with \c #GetNthTool() - to iterate through plug-in tools. - @param count [out] A buffer in which to return the number of tools. - */ - AIAPI AIErr(*CountTools) (ai::int32 *count); - - /** Retrieves a tool by index position. Use with \c #CountTools() - to iterate through plug-in tools. - @param n The 0-based position index. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr(*GetNthTool) (ai::int32 n, AIToolHandle *tool); - - /** Retrieves a plug-in tool by its tool number, as assigned when it is created - with \c #AddTool(), and obtained by calling \c #GetToolNumberFromHandle. - See @ref Toolsets. - If the toolNum is the number of a built-in tool, returns NULL, since - built-in tools do not have an AIToolHandle. - @param toolNum The tool number. - @param tool [out] A buffer in which to return the tool reference. - */ - AIAPI AIErr(*GetToolHandleFromNumber) (AIToolType toolNum, AIToolHandle *tool); - - /** Retrieves a tool number from a tool's unique name. Use to find the numbers of - built-in tools, in order to place your tool in an existing group or toolset. - See @ref Toolsets. - @param name The tool name. The names of Illustrator's built-in tools - can be found in \c AIToolNames.h. - @param toolNum [out] A buffer in which to return the tool number. - */ - AIAPI AIErr(*GetToolNumberFromName) (const char *name, AIToolType *toolNum); - - /** Retrieves a tool number for a tool. Use to find the numbers of - plug-in tools, in order to place your tool in an existing group or toolset. - See @ref Toolsets. - @param tool The tool reference. - @param toolNum [out] A buffer in which to return the tool number. */ - AIAPI AIErr(*GetToolNumberFromHandle) (AIToolHandle tool, AIToolType *toolNum); - - /** Retrieves the unique name of a tool from its number. To get the localizable - title that appears in the UI, use \c #GetToolTitle(). - @param toolNum The tool number. - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr(*GetToolNameFromNumber) (AIToolType toolNum, char **name); - - /** Retrieves the localizable title of a tool, which appears in the UI. - To get the unique, identifying name, use \c #GetToolName(). - @param tool The tool reference. - @param title [out] A pointer to point to the title string. Do not modify - this string. - */ - AIAPI AIErr(*GetToolTitle) (AIToolHandle tool, char **title); - - /** Sets the localizable title of a tool, which appears in the UI. - @param tool The tool reference. - @param title The new title string. - */ - AIAPI AIErr(*SetToolTitle) (AIToolHandle tool, const char *title); - - - /** Retrieves the tooltip string for a tool. - @param tool The tool reference. - @param tooltip [out] A pointer to point to the tooltip string. Do not modify - this string. - */ - AIAPI AIErr(*GetTooltip) (AIToolHandle tool, char **tooltip); - - /** Sets the tooltip string for a tool. - @param tool The tool reference. - @param tooltip The new tooltip string. - */ - AIAPI AIErr(*SetTooltip) (AIToolHandle tool, const char *tooltip); - - /** Retrieves the help-system identifier for a tool. - @param tool The tool reference. - @param helpID [out] A buffer in which to return the help ID, - which can be an integer or a pooled string. - */ - AIAPI AIErr(*GetToolHelpID) (AIToolHandle tool, ASHelpID *helpID); - - /** Sets the help-system identifier for a tool. - @param tool The tool reference. - @param helpID The new help ID, which can be an integer or a pooled string. - */ - AIAPI AIErr(*SetToolHelpID) (AIToolHandle tool, ASHelpID helpID); - - /** Determines which labeled fields are displayed in the Info palette for a tool. - Typically called once at startup to initialize the Info palette. - @param tool The tool reference. - @param infoVars A pointer to the first member of an array of - information variables, which correspond to labeled fields - in Illustrator’s Info palette, as defined in \c #AIToolInfoVariable. - Only the fields included in this array are shown for the tool. - To initialize or set the values in the fields, use \c #SetToolInfoVarValues(). - */ - AIAPI AIErr(*SetToolInfoVars) (AIToolHandle tool, const ai::int32 infoVars[]); - - /** Sets field values in the Info palette. Only those fields specified by - \c #SetToolInfoVars() are displayed in the palette. - @param infoVars A pointer to the first member of an array of - information variables, which correspond to labeled fields - in Illustrator’s Info palette. This is the same array specified - by \c #SetToolInfoVars(). - @param values A pointer to the first member of an array of values, - whose positions match those in the \c infoVars array. - - \b Example: - @code - AIErr UpdateInfoPalette( AIToolHandle tool, AIRealPoint origin, AIArtHandle art ) - { - ASErr error = kNoErr; - if (art) { - static const long infoVars = { kInfoDocX, kInfoDocY, kInfoSizeX, kInfoSizeY, kInfoEndOfList }; - AIReal *infoValues[4]; - AIReal temp[2]; - AIRealRect artBounds; - error = sAIArt->GetArtTransformBounds( art,0, kStroke, &artBounds); - if ( error ) - return error; - temp[0] = artBounds.right - artBounds.left; - temp[1] = artBounds.bottom - artBounds.top; - infoValues[0] = &origin.h; - infoValues[1] = &origin.v; - infoValues[2] = temp; - infoValues[3] = temp +1; - error = sAITool->SetToolInfoVarValues( infoVars, (void**)infoValues); - if ( error ) - return error; - } - } - @endcode - */ - AIAPI AIErr(*SetToolInfoVarValues) (const ai::int32 *infoVars, void **values); - - /** Reports whether a pressure-sensitive device such as a graphics tablet - was available on application startup. - @param hasPressure [out] A buffer in which to return true if - a pressure-sensitive device is in use. - */ - AIAPI AIErr(*SystemHasPressure) (AIBoolean *hasPressure); - - // New for AI10 - - /** @deprecated Obsolete. Do not use. */ - AIAPI AIErr(*GetToolNullEventInterval) (AIToolHandle tool, AIToolTime *outTime); - - /** @deprecated Obsolete. Do not use. */ - AIAPI AIErr(*SetToolNullEventInterval) (AIToolHandle tool, AIToolTime inTime); - - // New for AI13 - - /** Selects a plug-in tool, but does not highlight - it in the palette or show its tool name in the status bar of the document - window. Indicates this \e soft selection by setting the \c isSoftMode flag. - \c #SetSelectedTool() turns this flag off. - @param tool The tool reference. - */ - AIAPI AIErr(*SetSoftSelectedTool) (AIToolHandle tool); - - /** Reports whether there is currently a \e soft tool selection. - Soft mode is entered when a tool, such as the rectangle tool, is - selected and the user implicitly overrides this by drawing with the eraser - end of a tablet stylus. - @param isSoftMode [out] A buffer in which to return true if there is a - soft tool selection. - */ - AIAPI AIErr(*IsSoftModeSelection) (AIBoolean *isSoftMode); - - /** Retrieves the name of the tool that will be temporarily selected by pressing Ctrl (in Windows) - or Cmd (in MacOS) key while using this tool. - Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. - @param tool This tool. - @param name A buffer in which to return the name of the alternate selection tool. - */ - AIAPI AIErr(*GetAlternateSelectionToolName) (AIToolHandle tool, char **name); - - /** Sets the tool that will be temporarily selected by pressing Ctrl (in Windows) - or Cmd (in Mac OS) key while using this tool. - Effective only if the tool has set the option \c #kToolWantsAlternateSelectionTool. - @param tool This tool. - @param name The name of the alternate selection tool. - */ - AIAPI AIErr(*SetAlternateSelectionToolName) (AIToolHandle tool, const char* alternateTool); - - // New for AI16: support for plug-in access to built-in tools - - /** Retrieves the unique name of the currently selected tool. This is the same - name you get from calling \c #AIToolboxSuite::GetCurrentToolType() - followed by \c #GetToolNameFromNumber(). - @param name [out] A pointer to point to the name string. Do not modify - this string. Copy it immediately to use it. - */ - AIAPI AIErr(*GetCurrentToolName) (const char **name); - - /** Retrieves the numerical identifier of the most recently used built-in selection tool, - and optionally retrieves the unique name of the tool, from \c AIToolNames.h. - (Note that this function returns an \c #AIToolType, not an error code.) - @param name [out][optional] A buffer in which to return the name string. - Do not modify this string. Copy it immediately to use it. - @return The numerical identifier. - */ - - AIAPI AIToolType(*GetLastUsedSelectionTool) (const char **name); - - /** Select a tool by its unique name identifier. Can be either the name of a plug-in tool, - returned by \c #GetToolName(), or one of the tool name constants from \c AIToolNames.h. - @param name The name of the tool to be selected. - */ - AIAPI AIErr(*SetSelectedToolByName) (const char *name); - - /** Reports the hardware capabilities of a graphical tablet or integrated digitizer. - @param hardwareCapabilities [out] A buffer in which to return a - logical OR of \c #AITabletCapabilities contants. - - */ - AIAPI AIErr(*GetTabletHardwareCapabilities) (ai::int32* hardwareCapabilities); - - /** Sets tool icons to be used with light and dark UI themes. - @param tool[in] The tool reference. - @param normalIconResource[in] Base file name (without extension) of the PNG icon resource for the light UI theme. - @param darkNormalIconResource[in] Base file name (without extension) of the PNG icon resource for the dark UI theme. - */ - AIAPI AIErr(*SetToolIcons) (AIToolHandle tool, const char *normalIconResourceName, const char *darkNormalIconResourceName); - - /**Retrieves the base filenames (without extension) of the PNG icon resources associated with a tool. - @param tool[in] The tool reference. - @param normalIconResource[out] A buffer in which to return the resource name for light UI theme icon. - @param darkNormalIconResource[out] A buffer in which to return the resource name for dark UI theme icon. - */ - AIAPI AIErr(*GetToolIcons) (const AIToolHandle tool, char **normalIconResourceName, char **darkNormalIconResourceName); -}; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191CursorSnap.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191CursorSnap.h deleted file mode 100644 index 5a55473..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191CursorSnap.h +++ /dev/null @@ -1,321 +0,0 @@ -#ifndef __AI191CursorSnap__ -#define __AI191CursorSnap__ - -/* - * Name: AI191CursorSnap.h - * Author: - * Date: - * Purpose: Adobe Illustrator Cursor Snapping Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif -#ifndef __AIDocumentView__ -#include "AIDocumentView.h" -#endif -#ifndef __AITool__ -#include "AITool.h" -#endif - -#include "AIHeaderBegin.h" - -/** @file AICursorSnap.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI191CursorSnapSuite "AI Cursor Snap Suite" -#define kAI191CursorSnapSuiteVersion15 AIAPI_VERSION(15) -#define kAI191CursorSnapSuiteVersion kAI191CursorSnapSuiteVersion15 - - -/** - Kinds of custom constraints for \c #AI191CursorSnapSuite. - */ -enum { - /** Single point */ - kAI191PointConstraint = 1, - /** A line whose angle is relative to the page coordinates */ - kAI191LinearConstraintAbs, - /** A line whose angle is relative to the constraint angle */ - kAI191LinearConstraintRel -}; - - -/** Flags for custom constraints: snap to constraint when shift key is down. - See \c #AI191CursorSnapSuite. */ -#define kAI191ShiftConstraint (1<<0L) - - -/** Boundary editors for the transformation tools. -See \c #AI191CursorSnapSuite. */ -enum { - kAI191TranslateBoundaryEditor = 1 -}; - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** - Structure describing a custom constraint for \c #AI191CursorSnapSuite.. - */ -struct AI191CursorConstraint { - /** Type of constraint, one of: - \li \c kPointConstraint: A single point. - \li \c kLinearConstraintAbs: A line whose angle is relative to - the page coordinates. - \li \c kLinearConstraintRel: A line whose angle is relative - to the constraint \c angle. - */ - ai::int32 kind; - /** Flags for the constraint. The only flag is \c #kAI191ShiftConstraint, - which means snap to the constraint when the shift key is down.*/ - ai::int32 flags; - /** Origin point for the constraint. */ - AIRealPoint point; - /** When \c kind is \c kAI191LinearConstraintRel, the angle of the line. */ - AIFloat angle; - /** Label for the constraint presented to the user. */ - char* label; -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - Tools that use the Smart Guides snapping facility use these - functions in the cursor-tracking code. The suite provides functions - for snapping the cursor to various things, called \e constraints. - Constraints include art objects, page boundaries - and the automatically generated guide lines. You can also define your own - constraints, using \c #SetCustom(), although most tools do not do so. - - @note Turning on the grid turns smart guides off, so you never use - this facility to snap to the grid. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI191CursorSnapSuite and \c #kAI191CursorSnapVersion. - - Snap the cursor using the \c #Track() function, which - takes a current cursor location and returns the snapped location. - A control string contains a series of Smart Guide commands - that control how the snap is performed; that is, what kind of - object is snapped to, and what kind of location to look for in - each kind of object. - - You can find out what object is under the snapped location: -@code -AIHitRef hit; -long option = <> -result = sAIHitTest->HitTest(NULL, &p, option, &hit); -if (result) - throw ai::Error(result); -@endcode - - These are the control strings used by the various tools built - into Illustrator, as saved in the preferences file. - The first entry in each line is the key used in preferences. The second - is the control string for when the mouse is up and the third is the control - string for when the mouse is down. - - - "Blend", "A v", "A v" - - "Select", "A v o f", "ATFGP v i o f" - - "RangeSelect", "", "" - - "Zoom", "", "" - - "Page", "ATFGP v i o", "ATFGP v i o" - - "Ruler", "ATFGP v i o", "ATFGP v i o" - - "Guide", "ATFGP v i o", "ATFGP v i o" - - "Scissor", "ATFGP v i o", "ATFGP v i o" - - "SquareCircle", "ATFGP v i o", "ATFGP v i o" - - "Pen", "ATFGP v i o", "ATFGP v i o" - - "Translate", "ATFGP v i o", "ATFGPB v i o" - - "Scale", "ATFGP v i o", "ATFGPB v i o" - - "Rotate", "ATFGP v i o", "ATFGP v i o" - - "Reflect", "ATFGP v i o", "ATFGP v i o" - - "Shear", "ATFGP v i o", "ATFGP v i o" - - "Eyebucket", "A v o f", "A v o f" -*/ - -struct AI191CursorSnapSuite { - - /** Reports whether Smart Guides should be used to snap the - cursor in a given view. (Note that this function returns - a Boolean value, not an error code.) - @param view The document view. - @return True if Smart Guides should be used. - */ - AIAPI AIBoolean (*UseSmartGuides) (AIDocumentViewHandle view); - - /** Resets the Smart Guides snapping engine. This clears all custom constraints - and all automatically generated constraint lines. - */ - AIAPI AIErr (*Reset) (void); - - /** Clears all custom constraints without clearing automatically - generated constraint lines. - */ - AIAPI AIErr (*ClearCustom) (void); - - /** Replaces the current set of custom constraints with the specified set. - @param count The number of constraints being defined. - @param constraints An array of custom constraints. The function makes a - copy, so the caller can free this memory after making the call. - */ - AIAPI AIErr (*SetCustom) (ai::int32 count, const AI191CursorConstraint* constraints); - - /** Snaps the cursor to a specified constraint, using a specified technique, using - the "Snap To Point" application preference. - @param view The document view in which to snap the cursor. - @param srcpoint The actual cursor location in view coordinates. - Typically passed in the \c #AIToolMessage member \c cursor. - @param event The state of modifier keys. - @param control How snapping is performed, a string containing - a sequence of uppercase and lowercase characters, and spaces. - Each character in the string is a command to the snapping engine. - They are processed sequentially from left to right. - \li An uppercase character enables a constraint: - - A: Enable snapping to art objects (if the "Snap To Point" application - preference is set). Uses the Snapping tolerance preference - (rather than the Selection tolerance). - - T: Enable snapping to custom constraints defined by the current tool. - - F: Enable snapping to automatically generated guidelines. - - P: Enable snapping to the page boundaries. - - L: Enable snapping to automatically generated guidelines along the center and edges - of geometric box of all visible art objects in view. - - M: Enable snapping to automatically generated guidelines along the center and edges - of all artboards in the view. - - S: Enable snapping to automatically generated Perspective guidelines. - - U: Enable snapping to Perspective Grid visible in the current document. - - \li A lower case character is an instruction to look for the best snap location. - of a particular type among the currently enabled constraints. - - i: Look for intersections of two or more constraints. - - o: Try to snap onto a constraint line - - v: Try to snap to a point (vertex). - - f: Look for filled objects. - \li A space character is an instruction to return the best snap location found - so far. If no snap location has been found, the search continues. - - @param dstpoint [out] A buffer in which to return the snapped cursor position. - */ - AIAPI AIErr (*Track) (AIDocumentViewHandle view, const AIRealPoint& srcpoint, - const AIEvent* event, const char* control, - AIRealPoint* dstpoint); - - /** Snaps the cursor to a specified constraint, using a specified technique. Does not - consider the "Snap To Point" application preference, and uses the Selection - tolerance to identify hits on art objects. This function is used for direct - selection of anchor points. - @param view The document view in which to snap the cursor. - @param srcpoint The actual cursor location in view coordinates. - Typically passed in the \c #AIToolMessage member \c cursor. - @param event The state of modifier keys. - @param control How snapping is performed, a string containing - a sequence of uppercase and lowercase characters, and spaces. - Each character in the string is a command to the snapping engine. - They are processed sequentially from left to right. - \li An uppercase character enables a constraint: - - A: Enable snapping to art objects (without regard to the - "Snap To Point" application preference). Uses the Selection - tolerance preference (rather than the Snapping tolerance). - - T: Enable snapping to custom constraints defined by the current tool. - - F: Enable snapping to automatically generated guidelines. - - P: Enable snapping to the page boundaries. - \li A lower case character is an instruction to look for the best snap location - of a particular type among the currently enabled constraints. - - i: Look for intersections of two or more constraints. - - o: Try to snap onto a constraint line. - - v: Try to snap to a point (vertex). - - f: Look for filled objects. - \li A space character is an instruction to return the best snap location found - so far. If no snap location has been found, the search continues. - - @param dstpoint [out] A buffer in which to return the snapped cursor position. - @param magnifyAnchorPoint [in] True to magnify an anchor point whose hotspot is under the - mouse cursor, as the direct selection tool does. - */ - AIAPI AIErr (*HitTrack) (AIDocumentViewHandle view, const AIRealPoint &srcpoint, - const AIEvent* event, const char* control, - AIRealPoint* dstpoint, AIBoolean magnifyAnchorPoint); - - - /** Snaps the rectangle supplied to a specified constraint, using a specified technique and - the "Snap To Point" application preference. This method returns the new snapped rectangle and - new mouse location. If no snapping is done then returned point and rectangle would be same as - the passed values for source point and rectangle. - - @param view The document view in which to snap the cursor. - @param srcpoint The actual cursor location in view coordinates. - Typically passed in the \c #AIToolMessage member \c cursor. - @param event The state of modifier keys. - @param control How snapping is performed, a string containing - a sequence of uppercase and lowercase characters, and spaces. - Each character in the string is a command to the snapping engine. - They are processed sequentially from left to right. - \li An uppercase character enables a constraint: - - A: Enable snapping to art objects (if the "Snap To Point" application - preference is set). Uses the Snapping tolerance preference - (rather than the Selection tolerance). - - T: Enable snapping to custom constraints defined by the current tool. - - F: Enable snapping to automatically generated guidelines. - - P: Enable snapping to the page boundaries. - - L: Enable snapping to automatically generated guidelines along the center and edges - of geometric box of all visible art objects in view. - - M: Enable snapping to automatically generated guidelines along the center and edges - of all artboards in the view. - - S: Enable snapping to automatically generated Perspective guidelines. - - U: Enable snapping to Perspective Grid visible in the current document. - - \li A lower case character is an instruction to look for the best snap location. - of a particular type among the currently enabled constraints. - - i: Look for intersections of two or more constraints. - - o: Try to snap onto a constraint line - - v: Try to snap to a point (vertex). - - f: Look for filled objects. - \li A space character is an instruction to return the best snap location found - so far. If no snap location has been found, the search continues. - - @param dstpoint [out] A buffer in which to return the snapped cursor position. - @param srcRect The rectangle to be snapped. - @param dstRect [out] A buffer in which to return the new snapped rectangle bounds. - */ - AIAPI AIErr (*TrackInRect) (AIDocumentViewHandle view, const AIRealPoint& srcpoint, - const AIEvent* event, const char* control, - AIRealPoint* dstpoint, const AIRealRect* srcrect, - AIRealRect* dstrect); -}; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191HitTest.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191HitTest.h deleted file mode 100644 index cb572a7..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191HitTest.h +++ /dev/null @@ -1,285 +0,0 @@ -#ifndef __AI191HitTest__ -#define __AI191HitTest__ - -/* - * Name: AI191HitTest.h - * Author: - * Date: - * Purpose: Adobe Illustrator Hit Testing Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2009 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIHitTest.h" - -#include "AIHeaderBegin.h" - -/** @file AI191HitTest.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI191HitTestSuite "AI Hit Test Suite" -#define kAI191HitTestSuiteVersion13 AIAPI_VERSION(6) -#define kAI191HitTestSuiteVersion kAI191HitTestSuiteVersion13 -#define kAI191HitTestVersion kAI191HitTestSuiteVersion - -/** Returned by \c #AIHitTestSuite::GetHitData(), describes the results of a - hit test. The same information can be obtained by individual APIs in the - \c #AIHitTestSuite. */ -struct AI191ToolHitData { - /** True if the test found an object matching test criteria. - See \c #AIHitTestSuite::IsHit() */ - AIBoolean hit; - /** The \c #AIHitType value for the found object. - See \c #AIHitTestSuite::GetType() */ - ai::int16 type; - /** If the hit is on an anchor point or segment of a path, - the path segment number. - See \c #AIHitTestSuite::GetPathSegment() */ - ai::int16 segment; - /** The leaf art object that matched the test criteria. - See \c #AIHitTestSuite::GetArt() */ - AIArtHandle object; - /** The group containing the leaf art object. - See \c #AIHitTestSuite::GetGroup() */ - AIArtHandle group; - /** The exact point location of the hit, after snapping to anchor points, - bezier edges, etc. - See \c #AIHitTestSuite::GetPoint() */ - AIRealPoint point; - /** If the hit was on a segment of a path, the parametric value - of the nearest location on the segment to the hit. - See \c #AIHitTestSuite::GetPathParameter() */ - AIReal t; - AI191ToolHitData():hit(false), - type(0), - segment(0), - object(NULL), - group(NULL), - point(), - t(0.0) - { - } -}; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - These function allow you to query a document or art subtree for objects - based on positional information. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIHitTestSuite and \c #kAIHitTestVersion. - */ -struct AI191HitTestSuite { - /** Finds an object in a given art tree at a given point. - Searches from front to back in the paint order, within a small tolerance of the - given point. (The tolerance used is dependent upon global user preferences. - See \c #HitTestEx for a version which takes the tolerance as a parameter.) - Returns the closest object found that matches the criteria specified by \c option. - @param art The root object of an art tree, or \c NULL to search the - entire current document. - @param point A pointer to the location of interest, in artwork coordinates. - @param option The type of search to perform, an \c #AIHitRequest constant. - @param hit [out] A buffer in which to return the hit object.
This object - is reference counted. The initial count is 1. Use \c #Release() to decrement - the count and free the memory when the count is 0. - @see \c #GetHitData() and other access functions to examine the - contents of the hit object. - */ - AIAPI AIErr (*HitTest) ( AIArtHandle art, const AIRealPoint *point, ai::int32 option, AIHitRef *hit ); - - /** Finds an object in a given art tree at or near a given point. Differs from \c #HitTest() - in that it allows you to specify the size of the tolerance window around the point - of interest. - @param art The root object of an art tree, or \c NULL to search the - entire current document. - @param point A pointer to the location of interest, in artwork coordinates. - @param tolerance The size of the window around \c point in which to test. A - number of pixels at the current zoom factor. The default value is 2. - The algorithm is not guaranteed to produce correct results for large values. - @param option The type of search to perform, an \c #AIHitRequest constant. - @param hit [out] A buffer in which to return the hit object. Use \c #GetHitData() - and other access function in this suite to examine the contents. This object - is reference counted. The initial count is 1. Use \c #Release() to decrement - the count and free the memory when the count is 0. - */ - AIAPI AIErr (*HitTestEx) ( AIArtHandle art, const AIRealPoint *point, AIReal tolerance, ai::int32 option, AIHitRef *hit ); - - /** Increments the reference count of a hit object. Use this function if you intend to - hold onto the hit object for longer than a single event or notification, for example - if you want to compare the hit at mouse down to the hit during drag or at mouse up. - (Note that this function returns a numeric value, not an error code.) - @param hit The hit object. The function has no effect if this is \c NULL. - @return The current reference count, after the increment. - */ - AIAPI ai::int32 (*AddRef) ( AIHitRef hit ); - - /** Decrements the reference count of a hit object and frees the memory if the count has - reached 0. (It is not necessary to Release an AIHitRef returned from HitTest or HitTestEx - unless you have called AddRef on it.) - @param hit The hit object. The function has no effect if this is \c NULL. - @return The current reference count, after the decrement. - */ - AIAPI ai::int32 (*Release) ( AIHitRef hit ); - - /** Retrieves hit data from a hit object. Some object-type-specific information - must be retrieved separately, using the appropriate suite, such as \c #AIMeshHitSuite. - @param hit The hit object. - @param toolHit [out] A buffer in which to return the data structure. - */ - AIAPI AIErr (*GetHitData) ( AIHitRef hit, AI191ToolHitData *toolHit ); - - /** Reports whether a search found a matching object. - (Note that this function returns a boolean value, not an error code.) - @param hit The hit object. - @return True if the test found a matching object. - */ - AIAPI AIBoolean (*IsHit) ( AIHitRef hit ); - - /** Retrieves the type of object found by a successful hit test. - (Note that this function returns a constant value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit. - @return The \c #AIHitType value for the found object. - */ - AIAPI ai::int32 (*GetType) ( AIHitRef hit ); - - /** Retrieves the leaf object that was found by a successful hit test. - (Note that this function returns an object value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit. - @return The leaf art object that matched the test criteria. - */ - AIAPI AIArtHandle (*GetArt) ( AIHitRef hit ); - - /** Retrieves the group containing the leaf object that was found by a successful hit test. - (Note that this function returns an object value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit. - @return The group containing the leaf art object. - */ - AIAPI AIArtHandle (*GetGroup) ( AIHitRef hit ); - - /** Retrieves the exact location of the hit. - (Note that this function returns a point value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit. - @return The point location. If the hit was on a geometric entity such as a - point or segment of a path, this is the nearest point on that entity to - the input point. - */ - AIAPI AIRealPoint (*GetPoint) ( AIHitRef hit ); - - /** If the hit is on an anchor point or segment of a path, - retrieves the path segment containing the target point. - (Note that this function returns a numeric value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit, and hit type is \c #kPHitType, \c #kInHitType, - \c #kOutHitType, or \c #kSegmentHitType. - @return The path segment number. - */ - AIAPI ai::int16(*GetPathSegment) ( AIHitRef hit ); - - /** If the hit was on a segment of a path, retrieves the parametric value of the - nearest location on the segment to the hit. - (Note that this function returns a numeric value, not an error code.) - @param hit The hit object. Only valid if \c #IsHit() returns - true for this hit, and hit type is \c #kSegmentHitType. - @return The parametric value, a position along the curve where - 0 is the start and 1 is the end. - */ - AIAPI AIReal (*GetPathParameter) ( AIHitRef hit ); - - // New for AI12: - - /** Finds an object at a given point, performing custom hit testing for - plug-in objects, as defined by the plug-in group. - @param art The root object of an art tree, or \c NULL to search the - entire current document. - @param point A pointer to the location of interest, in artwork coordinates. - @param tolerance The size of the window around \c point in which to test. A - number of pixels at the current zoom factor. The default value is 2. - The algorithm is not guaranteed to produce correct results for large values. - @param option The type of search to perform, an \c #AIHitRequest constant. - @param pluginGroup The plug-in group whose members perform custom hit testing - in addition to the regular hit tests specified by \c options, using the - additional data passed in \c extData. - @param extData A pointer to a developer-defined data structure to pass to - the custom test. When there is a hit on a member of the plug-in group, - that object's custom hit test fills this structure and passes it back - in the hit object, in the \c #AIPluginGroupCustomHitTestData::inData field. - @param hit [out] A buffer in which to return the hit object, which includes information - passed in the \c #AIPluginGroupCustomHitTestData::outData field.
This object - is reference counted. The initial count is 1. Use \c #Release() to decrement - the count and free the memory when the count is 0. - @see \c #GetCustomHitData() to retrieve custom hit data returned by the plug-in group.
- \c #GetHitData() to retrieve other hit data. - */ - AIAPI AIErr (*CustomHitTest) ( AIArtHandle art, const AIRealPoint *point, AIReal tolerance, ai::int32 option, - AIPluginGroupHandle pluginGroup, void* extData, AIHitRef *hit ); - - /** Retrieves the result of custom hit testing performed by a plug-in group. - @param hit The hit object, as returned by \c #CustomHitTest(). - @param userData [out] A buffer in which to return a pointer to the - developer-defined data structure returned by the plug-in group's hit test, - as passed in the \c #AIPluginGroupCustomHitTestData::outData field.
- This memory is owned by the hit object, and remains valid while the hit object is valid. - Do not delete it explicitly; instead, provide an implementation - of \c #AICustomHitDataDeleteFunc, which is used to delete it when the hit object - is released. - @param pluginObject [out] A buffer in which to return the plug-in group member - object the custom hit testing was performed on. - @see \c #AIPluginGroupSuite - */ - AIAPI AIErr (*GetCustomHitData) ( AIHitRef hit, void** userdata, AIArtHandle *pluginObject ); - - // New for AI15: - - /** Finds the distance from the actual mouse-down point to the closest point on the path. - The result is a signed number; a negative value indicates that the mouse point was - on the left side of the path (in the path direction traveling from start to end), while - a positive value means that the mouse point was on the right side of the path. - - Use with \c #kStrokeHitRequest for help in setting the left or right stroke width. - Valid only if \c #IsHit() returns true for this hit, and the hit type is \c #kPHitType - or \c #kSegmentHitType. - - (Note that this function returns a numeric value, not an error code.) - - @param hit The hit object. - @return The signed distance value, or 0 if the validity conditions - are not met. - */ - AIAPI AIReal (*GetSignedHitDistance) ( AIHitRef hit ); -}; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191ShapeConstruction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191ShapeConstruction.h deleted file mode 100644 index 1dbeb67..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI191ShapeConstruction.h +++ /dev/null @@ -1,347 +0,0 @@ -#ifndef __AI191ShapeConstruction__ -#define __AI191ShapeConstruction__ - -/* - * Name: AI191ShapeConstruction.h - * Purpose: Adobe Illustrator utility routines for some basic shapes construction. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1996-2015 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AITypes.h" -#include "AIArt.h" -#include "AIShapeConstruction.h" - -#include "AIHeaderBegin.h" - -/** @file AI191ShapeConstructionSuite.h */ - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI191ShapeConstructionSuite "AI Shape Construction Suite" -#define kAIShapeConstructionSuiteVersion7 AIAPI_VERSION(7) -#define kAI191ShapeConstructionSuiteVersion kAIShapeConstructionSuiteVersion7 -#define kAI191ShapeConstructionVersion kAI191ShapeConstructionSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides utilities for creating paths whose shapes - describe a particular geometric figure. All of the utilities take parameters - that describe the geometric figure and return a new art object. The art object - is created in the art tree at the current insertion point as returned by - \c #AIArtSuite::GetInsertionPoint(). - - @note The shape suite is supplied by a plug-in, which the user can remove. - Clients of the shape suite should fail gracefully if it is not available. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAIShapeConstructionSuite and \c #kAIShapeConstructionVersion. - */ -typedef struct { - /** Creates a path for a rectangle. - @param fromPoint The upper left point. - @param toPoint The lower right point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointRect)( AIRealPoint fromPoint, AIRealPoint toPoint, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for a rectangle of a given size. - @param fromPoint The upper left point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeRect)( AIRealPoint fromPoint, AIRealPoint size, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for an oval from two focus points. - @param fromPoint The first focus point. - @param toPoint The second focus point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param isCircumscribed True to circumscribe the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointOval)( AIRealPoint fromPoint, AIRealPoint toPoint, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, AIBoolean isCircumscribed, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for an oval of a given size. - @param fromPoint The source point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeOval)( AIRealPoint fromPoint, AIRealPoint size, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for a rounded rectangle. - @param fromPoint The upper left point. - @param toPoint The lower right point. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - @param size [out] A buffer in which to return a point giving the - horizontal and vertical size of the figure, in document points. - */ - AIAPI AIErr (*NewPointPointRoundedRect)( AIRealPoint fromPoint, AIRealPoint toPoint, AIRealPoint radius, - AIBoolean isCentered, AIBoolean isReversed, AIBoolean isConstrained, - AIBoolean honorConstrainAngle, - AIArtHandle *art, AIRealPoint *size ); - - /** Creates a path for a rounded rectangle of a given size. - @param fromPoint The upper left point. - @param size A point whose components specify the horizontal and vertical - size of the figure, in document points. - @param isCentered True to center the figure. - @param isReversed True to reverse the figure. - @param isConstrained True to constrain the figure. - @param honorConstrainAngle True to constrain the angle. - @param art [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewPointSizeRoundedRect)( AIRealPoint fromPoint, AIRealPoint size, AIRealPoint radius, - AIBoolean isCentered, AIBoolean isReversed, - AIBoolean honorConstrainAngle, - AIArtHandle *art ); - - /** Creates a path for a rectangle from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRect)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt); - - /** Creates a path for a rectangle of a given size, centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCenteredRect)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a rounded rectangle from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRoundedRect)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIReal horizRadius, AIReal vertRadius, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a rounded rectangle of a given size, centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param horizRadius The horizontal radius of the rounded corners, in document points. - @param vertRadius The vertical radius of the rounded corners, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCenteredRoundedRect)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIReal horizRadius, AIReal vertRadius, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval inscribed within a rectangle, - from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewInscribedOval)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval circumscribed around a rectangle, - from page coordinates for the sides. - @param top The X coordinate of the top. - @param left The Y coordinate of the left edge. - @param bottom The X coordinate of the bottom. - @param right The Y coordinate of the right edge. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCircumscribedOval)( AIReal top, AIReal left, - AIReal bottom, AIReal right, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval inscribed within a rectangle of a given size, - centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewInscribedCenteredOval)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an oval circumscribed around a rectangle of a given size, - centered around a point. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param height The height in document points. - @param width The width in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewCircumscribedCenteredOval)( AIReal centerX, AIReal centerY, - AIReal height, AIReal width, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for a regular polygon of a given radius, - centered around a point. - @param numSides The number of sides. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param radius The radius, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRegularPolygon)( ai::uint16 numSides, - AIReal centerX, AIReal centerY, AIReal radius, - AIBoolean reversed, AIArtHandle *newArt ); - /** Creates a path for a regular polygon with a given vertex point, - centered around a point. - @param numsides The number of sides. - @param center The center point. - @param vertex The vertex point. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewRegularPolygonPoint)( ai::uint16 numsides, - AIRealPoint center, AIRealPoint vertex, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an n-pointed star with a given radius, - centered around a point. - @param numPoints The number of star points. - @param centerX The X coordinate of the center. - @param centerY The Y coordinate of the center. - @param radius1 The first radius, in document points. - @param radius2 The second radius, in document points. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewStar)( ai::uint16 numPoints, - AIReal centerX, AIReal centerY, - AIReal radius1, AIReal radius2, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for an n-pointed star with a given vertex point and radius ratio, - centered around a point. - @param numPoints The number of star points. - @param center The center point. - @param vertex The vertex point. - @param radiusRation The radius ratio. - @param reversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewStarPoint)( ai::uint16 numPoints, - AIRealPoint center, AIRealPoint vertex, - AIReal radiusRatio, - AIBoolean reversed, AIArtHandle *newArt ); - - /** Creates a path for spiral around a point. - @param firstArcCenter The center point for the first arc of the spiral. - @param start The starting point. - @param decayPercent The decay ration expressed as a percentage. - @param numQuarterTurns The number of quarter turns. - @param clockwiseFromOutside True to spiral clockwise. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewSpiral)( AIRealPoint firstArcCenter, AIRealPoint start, - AIReal decayPercent, ai::int16 numQuarterTurns, - AIBoolean clockwiseFromOutside, AIArtHandle *newArt ); - - /** Creates a path for elliptical pie around a point. - @param center The center point for the ellipse of which this pie is a part of. - @param width The width of the ellipse of which this pie is a part of. - @param height The height of the ellipse of which this pie is a part of. - @param rotationAngle The rotation angle of the ellipse of which this pie is a part of. - @param startAngle absolute start angle of the pie. - @param endAngle absolute end angle of the pie. - @param isReversed True to reverse the figure. - @param newArt [out] A buffer in which to return the new path object. - */ - AIAPI AIErr (*NewEllipticalPie)(AIRealPoint center, AIReal width, AIReal height, - AIReal rotationAngle, AIReal startAngle, AIReal endAngle, - AIBoolean isReversed, AIArtHandle *newArt); - -} AI191ShapeConstructionSuite; - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Art.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Art.h deleted file mode 100644 index 8cc2cf8..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Art.h +++ /dev/null @@ -1,838 +0,0 @@ -#ifndef __AI192Art__ -#define __AI192Art__ - -/* -* Name: AIArt.h -* $Revision: 25 $ -* Author: -* Date: -* Purpose: Adobe Illustrator Artwork Object Suite. -* -* ADOBE SYSTEMS INCORPORATED -* Copyright 1986-2016 Adobe Systems Incorporated. -* All rights reserved. -* -* NOTICE: Adobe permits you to use, modify, and distribute this file -* in accordance with the terms of the Adobe license agreement -* accompanying it. If you have received this file from a source other -* than Adobe, then your use, modification, or distribution of it -* requires the prior written permission of Adobe. -* -*/ - - -/******************************************************************************* -** -** Imports -** -**/ - -#include "AIArt.h" - -#include "AIHeaderBegin.h" - -/** @file AI192Art.h */ - -/******************************************************************************* -** -** Constants -** -**/ - -#define kAI192ArtSuite "AI Art Suite" -#define kAIArtSuiteVersion17 AIAPI_VERSION(17) -#define kAI192ArtSuiteVersion kAIArtSuiteVersion17 -#define kAI192ArtVersion kAI192ArtSuiteVersion - - -/******************************************************************************* -** -** Suite -** -**/ - - -/** @ingroup Suites -This suite allows you to access and modify the artwork in Illustrator documents. -It provides functions to create and delete objects, rearrange objects, and get -and set information about objects. You use these functions to navigate the tree -of art objects, and to retrieve or modify generic information about art objects, -such as their bounds or lock status. - -The Art suite is fundamental to implementing most plug-ins. An Illustrator document -consists of a collection of art objects referenced by an \c #AIArtHandle. This -is an opaque pointer to an art object in the document’s artwork database. Access -the fields through the Art suite's accessor functions. - -An art object can represent an individual entity, such as a path, block of text or -placed image, or a group of objects, such as a collection of paths. -The art type identifier (\c #AIArtType) indicates the type of an art object. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAIArtSuite and \c #kAIArtVersion. -*/ - -typedef struct AI192ArtSuite { - - /** Creates a new art object. - This can fail if the layer is locked or hidden. Otherwise, the object is inserted into the - paint order with respect another art object. For example, this creates \c new_art above \c old_art in the paint order. - @code - AIArtHandle new_art; - error = sArt->NewArt(kPathArt, kPlaceAbove, old_art, &new_art); - @endcode - This places \c new_art in the specified \c group above all other objects in the group. - @code - error = sArt->NewArt(kPathArt, kPlaceInsideOnTop, group, &new_art); - @endcode - This places \c new_art on top of all artwork in the document. - @code - error = sArt->NewArt(kPathArt, kPlaceAboveAll, nil, &new_art); - @endcode - - @param type The art type. See \c ::AIArtType. - If the new object type is a path then it is typically given the path style that would be assigned - to a path created by a tool (for example, the pen tool). Tool plug-ins can depend on this. - Plug-ins that are not tools should make no assumptions about the style assigned to paths. - @param paintOrder The paint order position, relative to the \c prep object, an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object. This can be an object whose boundaries might overlap this one, - or a compound path or group that might contain this path. - @param newArt [out] A buffer in which to return the new art object. - - @note Change in AI 11.0: If the art is being created during the execution of an effect, - and \c prep is styled art, the new art has a path style with a black fill and no stroke. - This prevents effect executions from accidentally using the current path style - */ - AIAPI AIErr(*NewArt) (ai::int16 type, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt); - - /** Removes an art object from the document. If it is a group or compound path, - also removes its children. - @param art The art object. After the call, this reference is no longer valid. - */ - AIAPI AIErr(*DisposeArt) (AIArtHandle art); - - /** Changes the paint order of an art object, or moves a path in or out of a compound path or group. - - @param art The art object. - @param paintOrder The paint order, relative to the \c prep object, an \c #AITypes::AIPaintOrder value. - @param prep The prepositional art object for the paint order. - */ - AIAPI AIErr(*ReorderArt) (AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep); - - /** Duplicates an art object with a deep copy (children of groups and compound paths are also duplicated). - The copied objects have the same coordinates as the original, so you must do a deep move on them. - @param art The art object. - @param paintOrder The paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object for the paint order. - @param newArt [out] A buffer in which to return the new art object. - */ - AIAPI AIErr(*DuplicateArt) (AIArtHandle thisArt, ai::int16 paintOrder, AIArtHandle prep, AIArtHandle *newArt); - - /** Retrieves the first art object in a layer, which is the group that contains all of the art in that layer. - You can use this to traverse the art objects contained in the layer. - @param layer The layer. Use \c nil for the current layer. See \c #AILayerSuite - @param art [out] A buffer in which to return the new art object. - @see \c #GetArtFirstChild(), \c #GetArtParent(), \c #GetArtSibling(), \c #GetArtPriorSibling() */ - AIAPI AIErr(*GetFirstArtOfLayer) (AILayerHandle layer, AIArtHandle *art); - - /** Retrieves an art object’s parent layer, if any. - This function is useful with \c #AIMatchingArtSuite::GetSelectedArt() and \c #AIMatchingArtSuite::GetMatchingArt(), - which give you a list of art objects. For example, if your filter gets all of the selected objects and - creates a path on top of each layer with objects on it, you would need to know the layer of the objects - in order to place the new path on top: - @code - AILayerHandle layer; - AIArtHandle group, new_path; - error = sArt->GetLayerOfArt(art, &layer); - error = sArt->GetFirstArtOfLayer(layer, &group); - error = sArt->NewArt(kPathArt, kPlaceInsideOnTop, group, &new_path); - @endcode - @param art The art object. - @param layer [out] A buffer in which to return the layer object. See \c #AILayerSuite - - @note Art that is stored in a dictionary or an array is not considered to be on a layer even though - the dictionary may belong to an art object that is on a layer. */ - - AIAPI AIErr(*GetLayerOfArt) (AIArtHandle art, AILayerHandle *layer); - - /** Retrieves the type of an art object. - Before you begin manipulating an object’s type-specific attributes you need to know - what kind of art object it is. For example, you can call path functions if the art - is a path, or text functions if it is text. - @code - short type; - error = sArt->GetArtType(art, &type); - if (error) - return error; - switch (type) { - case kGroupArt: - ... - } - @endcode - - @param art The art object. - @param type [out] A buffer in which to return the type, an \c #AIArtType constant. - */ - - AIAPI AIErr(*GetArtType) (AIArtHandle art, short *type); - - /** Retrieves user attributes of an art object; that is, flags that show whether it is selected, hidden, or locked. - The user attributes of an object do not directly affect the geometry or printing of the artwork. - They are temporary and primarily used while the user is editing the document. - An art object must be unlocked before making changes to it through the API. - Unlocking and locking should therefore be the first and last things done to an object. - An object cannot be selected if it is hidden or locked. - Because most filters operate on the current selection, it is not usually not necessary to unlock objects. - -
Example: - @code - long attr; - error = sArt->GetArtUserAttr(art, kArtLocked | kArtHidden, &attributes); - if (error) return error; - if (!(attributes & kArtLocked) || !(attributes & kArtHidden)) { - error = sArt->SetArtUserAttr(art, kArtSelected, kArtSelected); - if (error) return error; - } - @endcode - @param art The art object. - @param whichAttr A mask for the attributes of interest, a logical OR of \c #AIArtType constant values. - @param attr [out] A buffer in which to return the type, a logical OR of \c #AIArtType constant values, masked by \c whichAttr. - (Note that this is NOT boolean). - @see \c #GetArtTextWrapProperty(), \c #SetArtTextWrapProperty() - - */ - AIAPI AIErr(*GetArtUserAttr) (AIArtHandle art, ai::int32 whichAttr, ai::int32 *attr); - - /** Sets user attributes of an object; that is, flags that show whether it is selected, hidden, or locked. - Changing the selection state of an object is considered by the plug-in interface to be a - modification to the document; that is, the document is marked dirty and needs to be saved. -
Example: - @code - // unlocks the object - error = sArt->SetArtUserAttr(art, kArtLocked, 0); - // locks the object - error = sArt->SetArtUserAttr(art, kArtLocked, kArtLocked); - @endcode - @param art The art object. - @param whichAttr A mask for the attributes of interest, a logical OR of \c #AIArtType constant values. - @param attr The new attribute value, a logical OR of \c #AIArtType constant values, masked by \c whichAttr. - (Note that this is NOT boolean). - @see \c #GetArtTextWrapProperty(), \c #SetArtTextWrapProperty() - */ - AIAPI AIErr(*SetArtUserAttr) (AIArtHandle art, ai::int32 whichAttr, ai::int32 attr); - - /** Retrieves the parent group of an art object. This example shows a non-recursive tree walk: - @code - ... - // see if parent has sibling - error = sArt->GetArtParent(nextart, &nextart); - if (error) return error; - error = sArt->GetArtSibling(nextart, &nextart); - if (error) return error; - if (nextart) { // parent has sibling - ... - } - @endcode - @param art The art object. - @param parent [out] A buffer in which to return the parent object, or a null object if - the specified art object is the topmost group of its layer, - or the topmost object in a container such as a dictionary or array.\ - */ - AIAPI AIErr(*GetArtParent) (AIArtHandle art, AIArtHandle *parent); - - /** Retrieves the first child of a group object. For example: - @code - AIArtHandle child; - ... - error = sArt->GetArtType(art, &type); - if (error) return error; - switch (type) { - case kGroupArt: - error = sArt->GetArtFirstChild(art, &child); - if (error) return error; - error = doArtAndSiblings(message, child); - if (error) return error; - break; - ... - @endcode - @param art The art object. - @param child [out] A buffer in which to return the child object, or a null object if - the specified art object is not a container such as a group, graph, or text frame, - or is an empty container. - */ - AIAPI AIErr(*GetArtFirstChild) (AIArtHandle art, AIArtHandle *child); - - /** Retrieves the next object in the same group. This is the opposite of \c #GetArtPriorSibling(). - Use with \c #GetArtFirstChild() and \c #GetArtParent() to look at - all of the objects in a container. For example: - @code - ... - // see if parent has sibling - error = sArt->GetArtParent(nextart, &nextart); - if (error) return error; - error = sArt->GetArtSibling(nextart, &nextart); - if (error) return error; - if (nextart) { // parent has sibling - ... - } - @endcode - @param art The art object. - @param sibling [out] A buffer in which to return the sibling object, or a null object if - the specified art object is the last child in its container. - */ - AIAPI AIErr(*GetArtSibling) (AIArtHandle art, AIArtHandle *sibling); - - /** Retrieves the previous object in the same group. This is the opposite of \c #GetArtSibling(). -
Example: - @code - // get the previous art - error = sArt->GetArtPriorSibling(art, &art); - if (error) return error; - if (!art){ - // art was first in group - // see if parent has previous art - error = sArt->GetArtParent(art, &art); - if (error) return error; - ... - @endcode - @param art The art object. - @param sibling [out] A buffer in which to return the sibling objector a null object if - the specified art object is the first child in its container. - */ - AIAPI AIErr(*GetArtPriorSibling) (AIArtHandle art, AIArtHandle *sibling); - - - /** Retrieves the enclosing rectangle of an art object. - @param art The art object. - @param bounds [out] A buffer in which to return the value. - @note This function has the same behavior as \c #GetArtTransformBounds() with - a null transform and \c kVisibleBounds|kExcludeGuideBounds. - Call \c #GetArtTransformBounds() with a null transform to - specify non-default flags. - */ - AIAPI AIErr(*GetArtBounds) (AIArtHandle art, AIRealRect *bounds); - - /** Updates cached information for the enclosing rectangle (bounding box) - of an art object. - @param art The art object. - */ - AIAPI AIErr(*SetArtBounds) (AIArtHandle art); - - /** Checks whether the center point of an art object is visible. - This option can be set by the user using the Attributes dialog. -
Example: - @code - error = sArt->GetArtCenterPointVisible (art, &visible); - if (error) return error; - if (!visible) { - // it’s not visible so we do something based on that fact - ... - @endcode - @param art The art object. - @param visible [out] A buffer in which to return the value, true if the center point is visible. - */ - AIAPI AIErr(*GetArtCenterPointVisible) (AIArtHandle art, AIBoolean *visible); - - /** Makes the center point of an art object visible or invisible when the object is selected. - @param art The art object. - @param visible True to make the center point visible, false to make it invisible. - */ - AIAPI AIErr(*SetArtCenterPointVisible) (AIArtHandle art, AIBoolean visible); - - /** Retrieves the geometric bounds of an art object after applying a transformation matrix. - Returns single-precision coordinates. - @param art The art object. - @param transform A pointer to a transformation matrix to apply. - Can be \c NULL to indicate the identity matrix. You cannot use a non-null matrix - if the \c #kControlBounds option is set in \c flags. - @param flags Bit flags that specify which bounds to return. A logical OR of \c #AIArtBoundsOptions constants. - The flags must include either \c kVisibleBounds or \c kControlBounds, - and can include additional flags depending on which of these is included. - @param bounds [out] A buffer in which to return the bounds value containing single-precision coordinates. - @see \c #GetPreciseArtTransformBounds(), \c #GetArtRotatedBounds() - */ - AIAPI AIErr(*GetArtTransformBounds) (AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIRealRect *bounds); - - /* New in Illustrator 7.0 */ - - /** Checks whether any linked objects (linked images or placed objects) - contained in the subtree of a given container need updating, and updates them if needed. - A linked object needs updating if its file has been modified since the contents were - last read. - - @param art The art object. - @param force When true, objects are updated regardless of whether they have changed. - @param updated [out] Optional, a buffer in which to return true if any objects were updated. */ - AIAPI AIErr(*UpdateArtworkLink) (AIArtHandle art, AIBoolean force, AIBoolean *updated); - - /* New in Illustrator 8.0 */ - - /** Returns true if an art object reference is valid. - (Note that the function returns a boolean value, not an error code.) - A reference can test as invalid and still refer to an object that exists in the document, - if that object is not found in the searched layer. - @param art The art object. - @param searchAllLayerLists When true, searches through all layers in - all layer lists. Otherwise, searches only the current layer list. */ - AIAPI AIBoolean(*ValidArt) (AIArtHandle art, AIBoolean searchAllLayerLists); - - /** Get the paint order or containment relation of two art objects. - This function reflects the order in which the objects are encountered - in a \c #GetArtSibling() tree traversal. "Before" means above - or in front in the paint order, and "After" means behind or below in the paint order. - @param art1 The first art object. - @param art2 The second art object. - @param order [out] A buffer in which to return the result. - See \c #AIArtOrder for the possible ordering values. */ - AIAPI AIErr(*GetArtOrder) (AIArtHandle art1, AIArtHandle art2, short *order); - - /** Selects specified artwork of a layer by matching a string to the contents - of art object notes. You can select multiple art objects by specifying a partial - string and a matching style. - @param layer The layer object. See \c #AILayerSuite. - @param name A string to match to the note contents of art objects in the layer. - If the empty string, matches all leaf objects without notes. - @param matchWholeWord When true, an art object is selected if its note contents - exactly matches the \c name string. - When false, an art object is selected if any part of its note contents - matches the \c name string. - @param caseSensitive When true, perform case-sensitive matching. When false, ignore case. - */ - AIAPI AIErr(*SelectNamedArtOfLayer) (AILayerHandle layer, const ai::UnicodeString& name, - AIBoolean matchWholeWord, AIBoolean caseSensitive); - - /** Retrieves the enclosing rectangle of an art object after rotation. - This is the same as \c #GetArtTransformBounds(), except that the - transformation is specified by a rotation angle rather than a matrix. - @param art The art object. - @param angle The rotation angle in radians. - @param flags Option flags for which bounds to return. - A logical OR of \c #AIArtBoundsOptions constant values. - @param bounds [out] A buffer in which to return the value. - */ - AIAPI AIErr(*GetArtRotatedBounds) (AIArtHandle art, AIReal angle, ai::int32 flags, AIRealRect *bounds); - - /** Returns true if an art object or a descendent object draws something that - should be considered a fill. The distinguishing property of a fill is that - it is drawn behind all other objects when applied to an object that is part - of a clipping mask. (Note that the function returns a boolean value, not an error code.) - @param art The art object. - @return True if the object or a descendant has fill. - */ - AIAPI AIBoolean(*ArtHasFill) (AIArtHandle art); - - /** Returns true if an art object or a descendent object draws something that - should be considered a stroke. The distinguishing property of a stroke is that - it is drawn in front of all other objects when applied to an object that is part - of a clipping mask. - (Note that the function returns a boolean value, not an error code.) - @param art The art object. - @return True if the object or a descendant has stroke. - */ - AIAPI AIBoolean(*ArtHasStroke) (AIArtHandle art); - - /** Returns true if two art objects contain nothing other than groups, paths and - compound paths and they have identical geometry (control points). The path styles - and other appearance attributes may be different. - (Note that the function returns a boolean value, not an error code.) - @param art1 The first art object. - @param art2 The second art object. - @return True if the objects have equal paths. - @see also \c #ObjectsAreEquivalent - */ - AIAPI AIBoolean(*ArtsHaveEqualPaths) (AIArtHandle art1, AIArtHandle art2); - - /** Not implemented in AI11 and later; returns \c kNotImplementedErr. */ - AIAPI AIErr(*ArtCopyFillStyleIfEqualPaths) (AIArtHandle dstArt, AIArtHandle srcArt); - /** Not implemented in AI11 and later; returns \c kNotImplementedErr. */ - AIAPI AIErr(*ArtCopyStrokeStyleIfEqualPaths) (AIArtHandle dstArt, AIArtHandle srcArt); - - /* New in Illustrator 9.0 */ - - /** Retrieves the insertion point for a document. - This is the position in the art tree at which a drawing tool should create new art. - - @param art The art object. - @param paintorder The position in the paint order, relative to the specified art object. - See \c #AITypes::AIPaintOrder for the possible positions. - @param editable [out] A buffer in which to return true if it is possible to create art - at the returned position. For example, you cannot create art in a locked layer. - Pass null if not needed. - */ - AIAPI AIErr(*GetInsertionPoint) (AIArtHandle *art, short *paintorder, AIBoolean *editable); - - /** Sets the insertion point for a document. - This is the position in the art tree at which a drawing tool should create new art. - The new position is a paint-order position with respect to the given art object. - See \c #AITypes::AIPaintOrder for details. - If the object is a group, the new position is \c kPlaceInsideOnTop; - otherwise it is \c kPlaceAbove. If the art object is in a position where an - insertion point cannot be set (for example, inside a plug-in group) - the position is set relative to the nearest parent defining a valid insertion point. - If no valid insertion point can be determined, the function returns an error. - - @param art The art object. - */ - AIAPI AIErr(*SetInsertionPoint) (AIArtHandle art); - - /** Retrieves the key object for object alignment. The key object is the one to which - other objects are aligned. It is usually the object most recently clicked with the Select tool. - @param art [out] A buffer in which to return the art object, or a null object if there is no key object. - */ - AIAPI AIErr(*GetKeyArt) (AIArtHandle *art); - - - /** Clears the key object for object alignment. The key object is the one to which - other objects are aligned. It is usually the object most recently clicked with the - Select tool. - @deprecated */ - AIAPI AIErr(*CancelKeyArt) (void); - - /** Retrieves the dictionary associated with an art object. Arbitrary data can be - attached to an art object in its dictionary. See the \c #AIDictionarySuite.. - The same dictionary is accessed by the \c #AITagSuite for setting and getting - string values. - - Dictionaries are reference counted. You must call \c sAIDictionary->Release() - when you no longer need the reference. It is recommended that you use the C++ - \c #ai::Ref template class, which takes care memory management. - @param art The art object. - @param dictionary [out] A buffer in which to return a pointer to the dictionary reference. - */ - AIAPI AIErr(*GetDictionary) (AIArtHandle art, struct _AIDictionary** dictionary); - - /** Sets the name of an art object. This is the name that appears in the Layers - palette. - @param art The art object. - @param name The new name. Use the empty string to reset the name to - the default for the object type. */ - AIAPI AIErr(*SetArtName) (AIArtHandle art, const ai::UnicodeString& name); - - /** Retrieves the name of an art object. This is the name that appears in the Layers - palette. - @param art The art object. - @param name [out] A buffer in which to return the name. - @param isDefaultName [out] A buffer in which to return true if the returned name is a - default descriptive name, rather than a user-assigned name. May be null. - */ - AIAPI AIErr(*GetArtName) (AIArtHandle art, ai::UnicodeString& name, ASBoolean *isDefaultName); - - /** Reports whether an art object is a group that corresponds to a layer or a sublayer. - @param art The art object. - @param name [out] A buffer in which to return true if the art object is a layer group. - */ - AIAPI AIErr(*IsArtLayerGroup) (AIArtHandle art, ASBoolean *isLayerGroup); - - /** Releases elements of a layer, group, or plug-in group to separate layers. - Plug-in groups can be inside styled art. In this case: - \li If the art style consists of only the plug-in group, the plug-in group is - expanded and the original art deleted. - \li If there is more than one plug-in group or other element in the styled art, - the specified art is left in place and the remaining styled art is left intact. - - @param art The art object. - @param build When true, new layers are built upon one another such that - the topmost released layer contains everything in the original art and - the bottommost released layer contains only the highest object in the - stacking order. This order is used because the Flash exporter takes the - bottommost layer as the first animation frame and the topmost layer as the - last frame. */ - AIAPI AIErr(*ReleaseToLayers) (const AIArtHandle art, ASBoolean build); - - /** Modifies the set of targeted objects in the document using a specified action. - @param list A set of objects to be used as an additional parameter, for actions that need it. - @param count The number of objects in \c list. - @param action The action to take; see \c #AIArtTargettingAction for the possible actions. - */ - AIAPI AIErr(*ModifyTargetedArtSet) (AIArtHandle *list, ai::int32 count, ai::int32 action); - - /** Returns true if art is part of the styled art of another object. - (Note that the function returns a boolean value, not an error code.) - @param art The art object; - @return True if the object is part of the style art of another object. - */ - AIAPI AIBoolean(*IsArtStyledArt) (AIArtHandle art); - - /** Returns true if \c art adds to clipping. (Note that the function returns - a boolean value, not an error code.) Call this function only on descendents - of a clip group or a mask object. - @param art The art object. - @return True if the specified object is an appropriate art object with the - \c kArtIsClipMask flag set, or if it is a non-clip group with a clipping descendent - that is not bounded by another clip group. - */ - AIAPI AIBoolean(*IsArtClipping) (AIArtHandle art); - - - /* New in Illustrator 10.0 */ - - /** Transfers attributes from a source art object to a destination art object. - Use, for example, when converting an art object from one type to another. - @param srcart The art object from which to copy attributes. - @param dstart The art object to which to copy attributes. - @param which The attributes to transfer, a logical OR of - \c #AIArtTransferAttrsOptions values. */ - AIAPI AIErr(*TransferAttributes) (AIArtHandle srcart, AIArtHandle dstart, ai::uint32 which); - - /* New in Illustrator 11.0 */ - - /** Retrieves the last child of a container art object. Applies to container - objects such as groups, graphs and text frame objects. - @param art The art object. - @param child [out] A buffer in which to return the last child art object, or nil if - the specified art object is not a container or is an empty container. - */ - AIAPI AIErr(*GetArtLastChild) (AIArtHandle art, AIArtHandle *child); - - /** Sets the properties that affect how text wraps around a text wrap object; - that is, one in which the \c kArtIsTextWrap attribute is set. - Use \c #GetArtUserAttr() and \c #SetArtUserAttr() to inspect and set the \c kArtIsTextWrap attribute. - - @param art The art object. - @param offset The distance in points from the geometric outline of an object - that defines an offset for wrapping. - @param invert When true, text wraps inside the outline of the offset object. - When false, text wraps around the outside of the offset object. - @return \c kBadParameterErr if the object does not have the \c kArtIsTextWrap attribute set. - */ - AIAPI AIErr(*SetArtTextWrapProperty) (AIArtHandle art, AIReal offset, AIBoolean invert); - - /** Retrieves the properties that affect how text wraps around a text wrap object; - that is, one in which the \c kArtIsTextWrap attribute is set. - Use \c #GetArtUserAttr() and \c #SetArtUserAttr() to inspect and set the - \c kArtIsTextWrap attribute. - - @param art The art object. - @param offset [out] A buffer in which to return the distance in points from - the geometric outline of an object that defines an offset for wrapping. - @param invert [out] A buffer in which to return true if text wraps inside the outline - of the offset object, or false if text wraps around the outside of the offset object. - @return \c kBadParameterErr if the object does not have the \c kArtIsTextWrap attribute set. */ - AIAPI AIErr(*GetArtTextWrapProperty) (AIArtHandle art, AIReal *offset, AIBoolean *invert); - - /** Creates and instates a copy scope. Scopes are reference counted. You must - use \c #DestroyCopyScope to release the reference when it is no longer needed. - It is recommended that you use the C++ wrapper \c #ai::CopyScope, which takes - care of memory management. - - @param kind The type of scope to create, an \c ::AICopyScopeKind value. - @param scope [out] A buffer in which to return the new scope reference. */ - AIAPI AIErr(*CreateCopyScope) (enum AICopyScopeKind kind, AICopyScopeHandle* scope); - - /** Uninstates and destroys a copy scope. It is recommended that you use the - C++ wrapper \c #ai::CopyScope, which takes care of memory management. - @param scope The scope reference, as returned by \c #CreateCopyScope(). - */ - AIAPI AIErr(*DestroyCopyScope) (AICopyScopeHandle scope); - - /* New in Illustrator 12.0 */ - - /** Checks to see if it is OK to create or insert an art object of a given type at a given insertion point. - @param paintOrder The insertion point in the paint order, relative to the \c prep object. See \c AITypes::AIPaintOrder. - @param prep The prepositional art object for the paint order. - @param artType The type of art object, an \c #AIArtType value. - - @return \c kNoErr if it is OK, and \c #kInvalidArtTypeForDestErr if it is not. - */ - AIAPI AIErr(*InsertionPointBadForArtType) (ai::int16 paintOrder, AIArtHandle prep, ai::int16 artType); - - /** Check to see if it is OK to insert an art object or a duplicate copy of it at the indicated - insertion point, based on attributes of the insertion context and the candidate art, without actually - attempting the insertion. This is mainly intended for use during drag-drop mouseover, - to give proper cursor feedback, and so that an insertion is not attempted if it will fail. - @param candidateArt The art object to test. - @param paintOrder The position for the insertion point, with respect to \c prep, an \c AITypes::AIPaintOrder value. - @param prep The prepositional object for the \c paintOrder position. - @return \c kNoErr if it is OK. Possible non-OK returns are \c #kTooDeepNestingErr, - \c #kInvalidArtTypeForDestErr, and \c #kUntouchableArtObjectErr. - - - */ - AIAPI AIErr(*PreinsertionFlightCheck) (AIArtHandle candidateArt, ai::int16 paintOrder, AIArtHandle prep); - - /** Sets the note attribute for an art object, which typically contains text entered by the user. - To attach private data to an art object, plug-ins should use the art dictionary interface (see \c #GetDictionary()) - rather than using the note. - @param art The art object. - @param inNote The new text for the note. - */ - AIAPI AIErr(*SetNote) (AIArtHandle art, const ai::UnicodeString& inNote); - - /** Retrieves the note attribute text for an art object, which typically contains text entered by the user. - @param art The art object - @param outNote [out] A buffer in which to return the contents of the note. - Returns an empty string if the art object has no note. - @see \c #SetNote() - */ - AIAPI AIErr(*GetNote) (AIArtHandle art, ai::UnicodeString& outNote); - - /** Checks whether an art object has a note attached. (Note this function returns a boolean value, not an error code.) - @param art The art object. - @return True if there is a note attached. */ - AIAPI AIBoolean(*HasNote) (AIArtHandle art); - - /** Deletes the note attached to an art object, if there is one. No error code is returned. - @param art The art object. */ - AIAPI void(*DeleteNote) (AIArtHandle art); - - /** Gets the size of the XMP metadata associated with an art object. - @param art The art object. - @param size [out] A buffer in which to return the number of bytes, or 0 if there is no XMP metadata. - */ - AIAPI AIErr(*GetArtXMPSize)(AIArtHandle art, size_t* size); - - /** Retrieves the XML packet associated with an art object's XMP metadata. The format is UTF-8 - Unicode. - @param art The art object. - @param xmp [out] A buffer in which to return the XML packet. Allocate a buffer using \c #GetArtXMPSize(). - @param size The number of bytes in the \c xmp buffer. - */ - AIAPI AIErr(*GetArtXMP)(AIArtHandle art, char *xmp, size_t size); - - /** Sets XMP metadata for an art object, replacing any existing data. Format must be UTF-8 - Unicode. - @param art The art object. - @param xmp The new XML packet.Use a null XMP pointer or empty one to remove the existing metadata. - */ - AIAPI AIErr(*SetArtXMP)(AIArtHandle art, const char *xmp); - - /** Retrieves the geometric bounds of an art object after applying a transformation matrix. - Returns double-precision coordinates. - @param art The art object. - @param transform A pointer to a transformation matrix to apply. - @param flags Bit flags that specify which bounds to return. A logical OR of \c #AIArtBoundsOptions constants. - The flags must include either \c kVisibleBounds or \c kControlBounds, - and can include additional flags depending on which of these is included. - @param bounds [out] A buffer in which to return the bounds value, containing double-precision coordinates. - @see \c #GetArtTransformBounds() - */ - AIAPI AIErr(*GetPreciseArtTransformBounds) (AIArtHandle art, AIRealMatrix *transform, ai::int32 flags, AIDoubleRect *bounds); - - /** Removes an art object from the art tree, performing minimal checks for validity of the input - in order to maximize performance. Disposing of a group or compound path - also removes the children. - @param art The art object. Upon return, the reference is no longer valid. - */ - AIAPI AIErr(*UncheckedDisposeArt) (AIArtHandle art); - - /* New in Illustrator 13.0 */ - - /** Reports whether an art object is a graph object type. - Graphs (for historical reasons) have no specific art type in - \c #AIArtType enum, and get the type \c #kUnknownArt. - @param art The art object to query. - @param artisgraph [out] A buffer in which to return true if the object - is a graph. - */ - AIAPI AIErr(*ArtIsGraph)(AIArtHandle art, AIBoolean *artisgraph); - - /* New in Illustrator 14.0 */ - - /** Sets the art as KeyArt for object alignment.The key object is the one to which other objects are aligned. - If art is NULL, it cancels key art. Use this API to Cancel KeyArt instead of CancelKeyArt(). - @param art [in] The art object to be set as Key Art - The art needs to be currently selected. - @return an AIErr. In case of success returns kNoErr else give kBadParameterErr - @see \c #GetKeyArt() - */ - AIAPI AIErr(*SetKeyArt)(AIArtHandle art); - - /* New in Illustrator 15.0 */ - - /** Retrieves the drawing mode for current document. - @param mode [out] A buffer in which to return the drawing mode, an \c #AIDrawingMode constant. - */ - AIAPI AIErr(*GetDrawingMode)(ai::int32* mode); - - /** Sets the drawing mode for current document. - @param mode [in] The drawing mode to be set for a document, an \c #AIDrawingMode constant. - */ - AIAPI AIErr(*SetDrawingMode)(ai::int32 mode); - - /** Retrieves the insertion point for current document based on the drawing mode. - This is the position in the art tree at which a drawing tool should create new art. - @param mode [in] The drawing mode, an \c #AIDrawingMode constant. - @param art [out] The art object. - @param paintorder [out] The position in the paint order, relative to the specified art object. - See \c #AITypes::AIPaintOrder for the possible positions. - @param editable [out] A buffer in which to return true if it is possible to create art - at the returned position. For example, you cannot create art in a locked layer. - Pass null if not needed. - */ - AIAPI AIErr(*GetInsertionPointForDrawingMode) (ai::int32 mode, AIArtHandle *art, short *paintorder, AIBoolean *editable); - - /** Retrieves the insertion point for current document based on the current drawing mode. - This is the position in the art tree at which a drawing tool should create new art. - @param art [out] The art object. - @param paintorder [out] The position in the paint order, relative to the specified art object. - See \c #AITypes::AIPaintOrder for the possible positions. - @param editable [out] A buffer in which to return true if it is possible to create art - at the returned position. For example, you cannot create art in a locked layer. - Pass null if not needed. - */ - AIAPI AIErr(*GetInsertionPointForCurrentDrawingMode) (AIArtHandle *art, short *paintorder, AIBoolean *editable); - /** Retrieves the path polarity of an art object. - - @param art The art object. - @param polarity [out] A buffer in which to return the polarity value. - Value of polarity is set to \c #kAIPolarPath or \c #kAINonPolarPath. - */ - - AIAPI AIErr(*GetPathPolarity) (AIArtHandle art, ai::int32* polarity); - - /** Reports whether an art object is in pixel-perfect mode. - @param art [in]: The art object - Note that this API returns a boolean value and not an error. - @return True of the pixel-perfect property is on, false if it is off. - */ - AIAPI AIBoolean(*IsPixelPerfect) (AIArtHandle art); - - /** Turns the pixel-perfect mode on or off for an art object. - @param art [in] The art object - @param isPixelPerfect [in] True to turn pixel-perfect mode on, false to turn it off. - */ - AIAPI AIErr(*SetPixelPerfect) (AIArtHandle art, AIBoolean isPixelPerfect); - - /** Compare two art objects to determine if they are equivalient in geometry, appearance attributes, - and dictionary contents.Typically, one object is in the current document, and the other - is in another document. This function uses the same sense of equivalence in which two patterns - or symbol definitions are considered equivalent when retargeting an external symbol or pattern - to the current document. In particular, if one object is in a document with a different color - mode than the other, then non-global process colors are converted to the color mode of the - first object before comparison, and named global objects are considered equivalent if the - definitions match and the names are equal except for trailing numerical suffixes. - (Note that this function returns a Boolean value, not an error code.) - - @param art1 The first art object. - @param art2The second art object. - @return True if the objects are equivalent, false otherwise. - - @see \c #AISymbolSuite::RetargetForCurrentDocument() and \c #AIPathStyleSuite::RetargetForCurrentDoc() - */ - AIAPI AIBoolean(*ObjectsAreEquivalent) (AIArtHandle art1, AIArtHandle art2); - - /** Reports whether an art object acts as a layer within a symbol pattern. - This is a simulated layer that functions as a group, except when isolated or expanded. - It is not a layer object and cannot be manipulated with the \c #AILayerSuite. - @param art [in] The art object - @param isLayerInSymbol [out] A buffer in which to return true if - this is a simulated layer in a symbol pattern, false otherwise. - */ - AIAPI AIErr(*IsArtALayerInSymbol) (AIArtHandle art, AIBoolean* isLayerInSymbol); - - /** Retrieves the modification time stamp for an art object. - @param art [in] The art object - @param timeStamp [out] A buffer in which to return the modification time stamp. - */ - AIAPI AIErr(*GetArtTimeStamp) (AIArtHandle art, size_t* timeStamp); - - AIAPI AIErr(*ConvertPointTypeToAreaType) (AIArtHandle art, AIArtHandle* newArtHandle); - - AIAPI AIErr(*ConvertAreaTypeToPointType) (AIArtHandle art, AIArtHandle* newArtHandle); - -} AI192ArtSuite; - -#include "AIHeaderEnd.h" // __cplusplus - -#endif // __AI192Art__ - diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Clipboard.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Clipboard.h deleted file mode 100644 index ab9b440..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Clipboard.h +++ /dev/null @@ -1,143 +0,0 @@ -#ifndef __AI192Clipboard__ -#define __AI192Clipboard__ - -/* - * Name: AI192Clipboard.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Clipboard Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2016 Adobe Systems Incorporated - * All Rights Reserved. - - * NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the - * terms of the Adobe license agreement accompanying it. If you have received this file from a - * source other than Adobe, then your use, modification, or distribution of it requires the prior - * written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIClipboard.h" - -#include "AIHeaderBegin.h" - -/** @file AIClipboard.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI192ClipboardSuite "AI Clipboard Suite" -#define kAI192ClipboardSuiteVersion3 AIAPI_VERSION(3) - -#define kAI192ClipboardSuiteVersion kAI192ClipboardSuiteVersion3 -#define kAI192ClipboardVersion kAI192ClipboardSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - The clipboard suite enables plug-ins to register new clipboard format handlers. - The handler's main entry point will then receive messages requesting it to - copy data to and from the clipboard as needed. The messages have caller - \c #kCallerAIClipboard. The possible selectors are: - - \li \c #kSelectorAIGoClipboard - \li \c #kSelectorAICanCopyClipboard - \li \c #kSelectorAICloneClipboard - \li \c #kSelectorAIDisposeClipboard - - - Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI192ClipboardSuite and \c #kAI192ClipboardVersion. -*/ -typedef struct { - - /** Registers a new clipboard format handler. - @param self This plug-in. - @param data The types of clipboard data handled. - @param options The capabilities of the format handler. - A logical OR of \c #AIClipboardFormatOptions values. - @param Clipboard [out] A buffer in which to return the clipboard handler reference. - */ - AIAPI AIErr (*AddClipboard) ( SPPluginRef self, AIClipboardData *data, - ai::int32 options, AIClipboardHandle *Clipboard ); - /** Unregisters a clipboard format handler. - @param Clipboard The clipboard handler reference. - */ - AIAPI AIErr (*RemoveClipboard) (AIClipboardHandle Clipboard); - - /** Retrieves the registered name of a clipboard format handler. - @param Clipboard The clipboard handler reference. - @param name [out] A buffer in which to return the name. - */ - AIAPI AIErr (*GetClipboardName) (AIClipboardHandle Clipboard, const char* *name); - - /** Retrieves the Windows OLE type of the data handled by the format handler. - @param Clipboard The clipboard handler reference. - @param OleType [out] A buffer in which to return the OLE data type. - */ - AIAPI AIErr (*GetClipboardOleType) (AIClipboardHandle Clipboard, ai::int32* OleType); - - /** Retrieves the plug-in reference for the plug-in supplying the format handler. - @param Clipboard The clipboard handler reference. - @param plugin [out] A buffer in which to return the plug-in reference. - */ - AIAPI AIErr (*GetClipboardPlugin) (AIClipboardHandle Clipboard, SPPluginRef *plugin); - - /** Retrieves the Mac OS resource type of the data handled by the format handler. - @param Clipboard The clipboard handler reference. - @param uniqueType [out] A buffer in which to return the data resource type. - */ - AIAPI AIErr (*GetClipboardType) (AIClipboardHandle Clipboard, DDType *uniqueType); - - /** Retrieves the options describing the capabilities of the format handler. - @param Clipboard The clipboard handler reference. - @param options [out] A buffer in which to return the capabilities of the - format handler. A logical OR of \c #AIClipboardFormatOptions values. - */ - AIAPI AIErr (*GetClipboardOptions) (AIClipboardHandle Clipboard, ai::int32 *options); - - /** Sets the options describing the capabilities of the format handler. - @param Clipboard The clipboard handler reference. - @param options The capabilities of the format handler. - A logical OR of \c #AIClipboardFormatOptions values. - */ - AIAPI AIErr (*SetClipboardOptions) (AIClipboardHandle Clipboard, ai::int32 options); - - /** Counts the number of registered clipboard format handlers. Use with - \c #GetNthClipboard() to iterate through handlers. - @param count [out] A buffer in which to return the number of handlers. - */ - AIAPI AIErr (*CountClipboards) (ai::int32 *count); - - /** Retrieves a clipboard format handler by position index. Use with - \c #CountClipboards() to iterate through handlers. - @param n The index, in the range [0..numHandlers-1] . - @param Clipboard [out] A buffer in which to return the clipboard handler reference.*/ - AIAPI AIErr (*GetNthClipboard) (ai::int32 n, AIClipboardHandle *Clipboard); - -} AI192ClipboardSuite; - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192FileFormat.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192FileFormat.h deleted file mode 100644 index e72b53b..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192FileFormat.h +++ /dev/null @@ -1,385 +0,0 @@ -#ifndef __AI192FileFormat__ -#define __AI192FileFormat__ - -/* - * Name: AI192FileFormat.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator File Format Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2014 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ -#include "AIFileFormat.h" - -#include "AIHeaderBegin.h" - -/** @file AI192FileFormat.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ -#define kAI192FileFormatSuite "AI File Format Suite" -#define kAI192FileFormatSuiteVersion13 AIAPI_VERSION(13) -#define kAI192FileFormatSuiteVersion kAI192FileFormatSuiteVersion13 -#define kAI192FileFormatVersion kAI192FileFormatSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions for creating and managing file-format plug-ins, - which extend the number of file formats that Illustrator can read and write. - - Reading a format can be transparent to the user; when a file of the - defined type is selected in the Open dialog, your file format plug-in - creates artwork in the Illustrator document. If there is a plug-in that writes - a file format, that format appears in the Save As dialog as an option for the user - to select. If it is selected, the plug-in walks the artwork tree and writes out - information on the artwork in the appropriate manner. If your plug-in needs more - parameters for either reading or writing, it defines a modal dialog to interact - with the user. - - Plug-ins tell Illustrator about the file formats they - support by specifying platform file information: the type (such as \c 'ART3') - in Mac OS, or the extension (such as \c '.AI') in Windows. Plug-ins also indicate - what read/write capabilities they support. - - One plug-in can register multiple formats. Illustrator handles some parts of the - file I/O process, and the plug-in does the rest. - - A file-format plug-in receives message actions telling it to: - - \li Check if a file can be read, The Check selector is sent only to plug-ins - that can read files. It extends the simple type checking done by the Open dialog. - \li Ask for parameters. This selector can be ignored if the plug-in does not need - user input. - \li Go. In response, your plug-in executes the read or write operation. - - If a file format plug-in can read, files of its registered file type appear - in the file list of the Open dialog. In addition to screening by file type, - Illustrator sends a selector giving a plug-in a chance to check that the - file can be read. This is useful in the case of text files or files from a - different file system. If more than one format matches the type, Illustrator - determines which plug-in should actually open the file, asking the user if necessary. - - If a file format plug-in supports both reading and writing, when reading it should - store any information about the file needed to write the file back to disk. It can - store data (for example, the pixel depth of an EPS preview) in the plug-ins globals, - or in a parameter block. The reference to a block should be attached to the document - using \c #AIDocumentSuite::SetDocumentFileFormatParameters(). Illustrator keeps this - parameter-block reference with the document. The plug-in can retrieve it when the - document is being saved. - - When the user does a Save, by default Illustrator uses the same file format that was - used to read the file. If the file format does not support writing, the Save As - dialog appears to let the user choose the save format. All file format plug-ins - that support saving appear in the format menu of this dialog. - - If you need information from the user to open or save a file, you can present a - dialog when the ask-for-parameters message is received. When saving files, this - will be after the Save As dialog has appeared. Your plug-in should save the - information it collects, keeping it with the document to use for later saves. - - When the go message is received, file formats that read files typically parse - the input file and create Illustrator artwork using API calls. File formats for - saving Illustrator artwork traverse the artwork database and write out all - pertinent information. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI192FileFormatSuite and \c #kAI192FileFormatVersion. - -*/ -struct AI192FileFormatSuite { - - /** Adds a file format to the standard file dialog. - Call during startup to install a plug-in file format. - @param self A reference to this plug-in, which adds the format. - @param name The unique name of the new file format. You can use - your company name with a descriptor to make it unique. - Not displayed or localized. - @param data Information about the file format. - @param options File format operations that this plug-in supports. - A logical OR of these \c #AIFileFormatOptions values: - \verbatim -kFileFormatRead -kFileFormatImportArt -kFileFormatExport -kFileFormatExportSelection -kFileFormatPlaceArt -kFileFormatImportStyles -kFileFormatSuppliesPrintRecordOption -kFileFormatIsDefaultOption -kFileFormatConvertTemplate -kFileFormatLinkArt -kFileFormatWrite -kFileFormatNoAutoCheckFormat -kFileFormatSkipStartupObjectsOption -kFileFormatHasExtendedData -kFileFormatSuppressUI -kFileFormatCheckAlways -\endverbatim - @param fileFormat [out] A buffer in which to return the handle of - the new plug-in file format. If you install multiple file formats, - store this reference in the plug-ins \c globals record, so that your - plug-in can use it to determine which file format command is to be processed. - @param extendedOptions File format extended operations that this plug-in supports. A logical OR of these \c #AIFFExtendedOptions values: - \verbatim - kNoExtendedOptions - kSaveMultiArtboards - kFileFormatPlaceInTouch - \endverbatim - - - @see \c #AddFileFormatEx() - */ - AIAPI AIErr (*AddFileFormat) ( SPPluginRef self, const char *name, - PlatformAddFileFormatData *data, ai::int32 options, AIFileFormatHandle *fileFormat , ai::int32 extendedOptions); - - /** Retrieves the name of a file format. - @param fileFormat The file format. - @param name [out] A buffer in which to return the name string, as - passed to \c #AddFileFormat(). Do not modify this string. - */ - AIAPI AIErr (*GetFileFormatName) ( AIFileFormatHandle fileFormat, char **name ); - - /** Retrieves the option flags of a file format. - @param fileFormat The file format. - @param options [out] A buffer in which to return the options, a logical OR of - \c #AIFileFormatOptions values - */ - AIAPI AIErr (*GetFileFormatOptions) ( AIFileFormatHandle fileFormat, ai::int32 *options ); - - /** Sets the option flags of a file format, which specify what file operations can be handled. - @param fileFormat The file format. - @param options The options, a logical OR of \c #AIFileFormatOptions values - */ - AIAPI AIErr (*SetFileFormatOptions) ( AIFileFormatHandle fileFormat, ai::int32 options ); - - /** Retrieves a reference to the plug-in that installed a file format, - to be passed to \c #AIPluginSuite functions. - @param fileFormat The file format. - @param plugin [out] A buffer in which to return the plug-in reference. - */ - AIAPI AIErr (*GetFileFormatPlugin) ( AIFileFormatHandle fileFormat, - SPPluginRef *plugin ); - - /** Gets the number of installed plug-in file formats. - Use with \c #GetNthFileFormat() to iterate through all plug-in formats. - @param count [out] A buffer in which to return the number of formats. - */ - AIAPI AIErr (*CountFileFormats) ( ai::int32 *count ); - - /** Retrieves a plug-in file format reference by position index. - Use with \c #CountFileFormats() to iterate through all installed formats. - @param n The index, in the range [1..numFormats]. - @param fileFormat [out] A buffer in which to return the file format reference. - - */ - AIAPI AIErr (*GetNthFileFormat) ( ai::int32 n, AIFileFormatHandle *fileFormat ); - - /** Retrieves the file extension for a plug-in file format. - @param fileFormat The file format. - @param extension [out] A buffer in which to return the file extension string. - */ - AIAPI AIErr (*GetFileFormatExtension) ( AIFileFormatHandle fileFormat, char *extension ); - - /** Adds a plug-in file format. This extended version allows you to specify - a list of Mac OS file types. Call during startup to install a plug-in file format. - @param self A reference to this plug-in, which adds the format. - @param name The unique name of the new file format. You can use - your company name with a descriptor to make it unique. - Not displayed or localized. - @param dataEx Information about the file format. This extended version - uses a data structure with additional fields that allow you to - specify a list of Mac OS file types. Use \c #SetFileFormatFilter() - to specify a creator/type pair as the file filter. - @param options File format operations that this plug-in supports. - A logical OR of \c #AIFileFormatOptions values. - When the format is called with a Go selector, - one of these flags is set in the \c option field to indicate the - requested operation. - @param fileFormat [out] A buffer in which to return the handle of - the new plug-in file format. If you install multiple file formats, - store this reference in the plug-ins \c globals record, so that your - plug-in can use it to determine which file format command is to be processed. - @param extendedOptions File format extended operations that this plug-in supports. A logical OR of these \c #AIFFExtendedOptions values: - \verbatim - kNoExtendedOptions - kSaveMultiArtboards - kFileFormatPlaceInTouch - \endverbatim - - @see \c #AddFileFormat(), \c #SetFileFormatFilter() - */ - AIAPI AIErr (*AddFileFormatEx) ( SPPluginRef self, const char *name, - PlatformAddFileFormatExData *dataEx, ai::int32 options, AIFileFormatHandle *fileFormat, ai::int32 extendedOptions ); - - /** Retrieves the localizable display name of a plug-in file format. - @param fileFormat The file format. - @param szTitle [out] A buffer in which to return the display name. - */ - AIAPI AIErr (*GetFileFormatTitle) ( AIFileFormatHandle fileFormat, char *szTitle ); - - /** Retrieves the Mac OS file types for a plug-in file format. - @param fileFormat The file format. - @param maxNumTypes [in, out] A buffer in which to specify the maximum number - and return the actual number of values in \c typeList. - @param typeList [out] A buffer in which to return the 4-character Mac OS type codes. - @see \c #GetFileFormatCreatorType() to get the full Mac OS file information. - */ - AIAPI AIErr (*GetFileFormatType) ( AIFileFormatHandle fileFormat, ai::int32 *maxNumTypes, ai::int32 *typeList ); - - /** Associates a file format with a file type filter. File types are specified by (creator, type) - pairs in Mac OS, and by filename extensions in Windows. - @note This function extends the \c #AddFileFormat() and \c #AddFileFormatEx() functions - by allowing filters based on (creator, type) pairs in Mac OS, rather than simple type values. - @param fileFormat The file format. - @param numPairs In Mac OS, the number of (creator, type) pairs specified in \c pairList. - Ignored in Windows. - @param pairList In Mac OS, a pointer to an array of (creator, type) pairs. These can use - the Mac OS wild-card value '****' for creator or type. Ignored in Windows. - @param extensions In Windows, a comma-delimited list of DOS-style extensions that - are filtered in the Open dialog, or appended to the file name in the - Saves As dialog. For example, \c "ai,eps". - */ - AIAPI AIErr (*SetFileFormatFilter) ( AIFileFormatHandle fileFormat, ai::int32 numPairs, AICreatorTypePair *pairList, const char* extensions ); - - /** Retrieves the file type filter for a file format, as specified by (creator, type) - pairs for Mac OS. - @param fileFormat The file format. - @param maxNumTypes [in, out] A buffer in which to specify the maximum number - and return the actual number of (creator, type) pairs specified in \c pairList. - @param pairList [out] A buffer in which to return the array of (creator, type) pairs. - */ - AIAPI AIErr (*GetFileFormatCreatorType) ( AIFileFormatHandle fileFormat, ai::int32 *maxNumPairs, AICreatorTypePair *pairList ); - - /** Invokes the File > Save dialog, allowing you to filter the available file formats. - @param options Limits available file formats to those that support these - write operations. A logical OR of write operation constants:
- \c #kFileFormatExport<
- \c #kFileFormatWrite - @param dlgTitle The title for the Save dialog. - @param fileSpec [in, out] A buffer in which to pass the initial file specification - and return the user-chosen specification. - @param fileFormat [out] A buffer in which to return the user-chosen file format. - @param good [out] A buffer in which to return true if the user clicked Save, - or false if the user clicked Cancel. - */ - AIAPI AIErr (*PutFile) (ai::int32 options, const unsigned char *dlgTitle, ai::FilePath &fileSpec, AIFileFormatHandle *fileFormat, AIBoolean *good ); - - /** Sets the priority of a file format. which determines the order in which Illustrator - searches through formats in deciding which one to use to open a file. The first format - found that handles a file type is used to open the file. - @param fileFormat The file format. - @param priority The new priority, an \c #AIFileFormatPriority value, - */ - AIAPI AIErr (*SetFileFormatPriority) ( AIFileFormatHandle fileFormat, ai::int32 priority ); - - /** Finds all plug-in file formats that can perform a specified operation for a file. - @param options The operation, a \c #AIFileFormatOptions value. - @param file The file. - @param maxMatches The maximum number of formats to return. - @param matchingFormats [out] An array of size \c maxMatches in which to return the matching file formats. - @param numMatches [out] A buffer in which to return the number of matching file formats found. - */ - AIAPI AIErr (*FindMatchingFileFormats) ( ai::int32 options, const ai::FilePath &file, ai::int32 maxMatches, AIFileFormatHandle matchingFormats[], ai::int32* numMatches ); - - /** Obsolete */ - AIAPI AIErr (*ResolveImportConflicts) (); - - /** Reports the version of Illustrator in which a raster file - format, for example the JPEG file format plug-in, was converted from - using raster art to using placed art in order to perform a place link - operation. The information is needed so that Illustrator knows when it - should convert placed linked art back to raster art when saving to a - legacy file format. For example, if the JPEG file format used raster art - in version 10 and started using placed art in version 11 then - Illustrator must convert placed linked JPEG images back to raster art - when saving to a version 10 or earlier Illustrator file. - (Note that this function returns a version value, not an error code.) - @param fileFormat The file format. - @return The Illustrator version. The default version is 0, - meaning that placed objects are not converted on export. - @see \c #SetFirstVersionUsingPlacedArt() to set the version. - */ - AIAPI AIVersion (*GetFirstVersionUsingPlacedArt) (AIFileFormatHandle fileFormat); - - /** Sets the version of Illustrator in which a raster file - format was converted from using raster art to using placed art - in order to perform a place link operation. - @param fileFormat The file format. - @param The Illustrator version value. The default version is 0, - meaning that placed objects are not converted on export. - @see \c #GetFirstVersionUsingPlacedArt(). - */ - AIAPI AIErr (*SetFirstVersionUsingPlacedArt) (AIFileFormatHandle fileFormat, AIVersion version); - - /** Retrieves the Illustrator startup profile type from the XMP metadata embedded in a file. - @param file The file path. - @param docStartupProfile [out] A buffer in which to return the Illustrator - startup profile constant. If the information is not in the metadata, - or if the file does not contain XMP metadata, this is \c #kAIStartupProfileUnknown. - @return The error \c #kBadParameterErr if file is empty or does not exist. - */ - AIAPI AIErr (*GetFileStartupProfileType) (const ai::FilePath &file, AIDocumentStartupProfile *docStartupProfile); - - /** Retrieves the Illustrator default document profile from the startup-profile type. - @param docStartupProfile The startup profile type. - @param profile [out] A buffer in which to return the file-path object for the default document profile. - @return The error \c #kCantHappenErr if the file does not exists.
- The error \c #kBadParameterErr if the startup profile is invalid, - */ - AIAPI AIErr (*GetStartupFileOfType) (const AIDocumentStartupProfile docStartupProfile, ai::FilePath &profile); - - /** Retrieves the extended option flags of a file format. - @param fileFormat The file format. - @param extendedOptions [out] A buffer in which to return the extended options - \c #AIFFExtendedOptions values - \verbatim - kNoExtendedOptions - kSaveMultiArtboards - kFileFormatPlaceInTouch - \endverbatim - */ - AIAPI AIErr (*GetFileFormatExtendedOptions) ( AIFileFormatHandle fileFormat, ai::int32 *extendedOptions ); - - /** Sets the extended option flags of a file format, which specify what file operations can be handled. - @param fileFormat The file format. - @param extendedOptions File format operations that this plug-in supports. A logical OR of these - \c #AIFFExtendedOptions values: - \verbatim - kNoExtendedOptions - kSaveMultiArtboards - kFileFormatPlaceInTouch - \endverbatim - */ - AIAPI AIErr (*SetFileFormatExtendedOptions) ( AIFileFormatHandle fileFormat, ai::int32 extendedOptions); -} ; - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Geometry.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Geometry.h deleted file mode 100644 index 3101027..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Geometry.h +++ /dev/null @@ -1,64 +0,0 @@ -#ifndef __AI192Geometry__ -#define __AI192Geometry__ - -/* - * Name: AI192Geometry.h - * Purpose: Adobe Illustrator 19.2 Geometry Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIGeometry.h" - - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI192GeometrySuite kAIGeometrySuite -#define kAIGeometryVersion5 AIAPI_VERSION(5) -#define kAI192GeometrySuiteVersion kAIGeometryVersion5 - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - ASAPI AIErr(*GeometryIterate) (AIArtHandle art, - AIGeometryOrganizationProcs *organizationProcs, - AIGeometryConstructionProcs *constructionProcs, - AIGeometryPaintingProcs *paintingProcs, - AIGeometryStateProcs *stateProcs, - AIGeometryUserData userData); - -} AI192GeometrySuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192IsolationMode.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192IsolationMode.h deleted file mode 100644 index 8a1df6b..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192IsolationMode.h +++ /dev/null @@ -1,160 +0,0 @@ -#ifndef __AI192IsolationMode__ -#define __AI192IsolationMode__ - -/* - * Name: AI192IsolationMode.h - * Author: - * Date: - * Purpose: Adobe Illustrator 19.2 Isolation Mode Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2006-2016 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIIsolationMode.h" - -#include "AIHeaderBegin.h" - -/** @file AI192IsolationMode.h */ - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAI192IsolationModeSuite kAIIsolationModeSuite -#define kAIIsolationModeSuiteVersion4 AIAPI_VERSION(4) -#define kAI192IsolationModeSuiteVersion kAIIsolationModeSuiteVersion4 -#define kAI192IsolationModeVersion kAI192IsolationModeSuiteVersion - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides functions that handle isolation mode, in which an artwork selection - is moved onto a special isolation layer for editing, and that isolation layer (and any - contents) becomes the only layer displayed in the Layers panel or accessible to edits. - See \c #AILayerListSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI192IsolationModeSuite and \c #kAI192IsolationModeVersion. -*/ -typedef struct { - - /** Enters isolation mode for a specific group or plug-in group. This art becomes - the isolated art, replacing any art that was previously isolated. In this mode, - the user can edit only the isolated art. - - While the art is isolated, \c #AIArtSuite::GetArtParent() returns the layer group - of the temporary isolation layer; use \c #GetIsolatedArtAndParents() instead to - retrieve the pre-isolation parent. - @param art The group or plug-in group art object. Can be in the main art tree - or in an isolated art tree. Cannot be art inside a dictionary or plug-in group. - @param invisibleFlag When true, artwork that is not isolated is made invisible. - When false, non-isolated artwork is dimmed. - */ - AIAPI AIErr (*EnterIsolationMode)(AIArtHandle art, AIBoolean invisibleFlag); - - /** Exits isolation mode and returns to normal editing mode. Any art on the isolation - layer is reordered to where the art object passed to \c #EnterIsolationMode() was - originally located in the art tree. (It is therefore valid to delete the - isolated art or add additional objects before exiting isolation mode.) After - restoring the parent chain, a \c #kAIIsolationModeChangedNotifier is sent with - canceled as false. - See also \c #CancelIsolationMode(). - */ - AIAPI AIErr (*ExitIsolationMode)(void); - - /** Retrieves the original parent and ancestors of an isolated artwork tree; that is, - the pre-isolation parent of a group, plugin-group or other art that has been passed - to \c #EnterIsolationMode(). - (Note that this function does not return an error code.) - @param isolatedArtParent [out] A buffer in which to return the parent - art object of the isolated art tree. - @param parentChain [out] Optional. A buffer in which to return an array of - 0 or more art objects (\c #AIArtHandle) for the ancestors of the - parent art object. - */ - AIAPI void (*GetIsolatedArtAndParents)(AIArtHandle *isolatedArtParent, ai::AutoBuffer *parentChain); - - - /** Reports whether isolation mode is in effect. - (Note that this function returns a boolean value, not an error code.) - @return True if isolation mode is on, false if it is off. - */ - AIAPI ASBoolean (*IsInIsolationMode)(void); - - /** Reports whether artwork is in the isolated layer. - (Note that this function returns a boolean value, not an error code.) - @param art The parent art object of the art tree. - @return True if the artwork is in the isolated layer, false otherwise. - */ - AIAPI ASBoolean (*IsIsolatedLayer)(AIArtHandle art); - - /** Reports whether artwork is in a non-isolated layer. Non-isolated art layers - hold the artwork that is not being edited in isolation mode. Non-isolated artwork - can be shown in a 50% opacity state in isolation mode, or can be hidden entirely - when in symbol editing mode or pattern editing mode. The Layers panel uses this - function to exclude non-isolated layers from the panel list. - (Note that this function returns a boolean value, not an error code.) - @param art The parent art object of the art tree. - @return True if the artwork is in a non-isolated layer, false otherwise. - */ - AIAPI ASBoolean (*IsNonIsolatedLayer)(AIArtHandle art); - - /** Reports whether an art tree is a legal target for isolation mode. - Art that cannot be isolated includes, for example, art that is inside a - plug-in group or dictionary, text art or guides, art that is locked or hidden, - template layers, and the temporary isolation layer of an object already in - isolation mode. If art is null, returns whether it is legal to enter isolation - mode in general. (Under some conditions it is invalid to enter isolation mode - on anything, such as when already in mask editing mode.) - @param art The parent art object of the art tree, or null. - @return True if the artwork can be isolated or if it is - already isolated, false otherwise. - */ - AIAPI ASBoolean (*CanIsolateArt)(AIArtHandle art); - - /** Reports the type art in Isolation Mode. - @return The type of isolation Mode, an \c #AIIsolationModeType constant - */ - AIAPI AIIsolationModeType (*GetIsolationModeType)(); - - /** Identical to \c #ExitIsolationMode(), except that after restoring the parent chain, - a \c #kAIIsolationModeChangedNotifier message is sent with canceled as true. - For normal isolation mode, there is no difference in behavior, since even - when canceled, any changes made in isolation mode are not rolled back. - For Symbol editing mode and Pattern editing mode, the symbol or pattern is - ordinarily redefined during handling of the \c #kAIIsolationModeChangedNotifier. - Canceling causes the redefinition not to occur. - */ - AIAPI AIErr (*CancelIsolationMode)(void); - -} AI192IsolationModeSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Undo.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Undo.h deleted file mode 100644 index 5dc1952..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192Undo.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef __AI192Undo__ -#define __AI192Undo__ - -/* - * Name: AI192Undo.h - * Author: - * Date: - * Purpose: Adobe Illustrator Undo Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2015 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIUndo.h" - -#include "AIHeaderBegin.h" - -/** @file AI192Undo.h */ - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI192UndoSuite kAIUndoSuite -#define kAI192UndoSuiteVersion AIAPI_VERSION(7) -#define kAI192UndoVersion kAI192UndoSuiteVersion - - -/** For Undo context types, see AIUndo.h */ - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suites provides access to the Undo/Redo mechanism. Use these - functions to revert the artwork state to what it was when your - plug-in was called, or to set the text of the Undo/Redo menus. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI192UndoSuite and \c #kAIUndoVersion. - - @section UndoContext Undo API Contexts - - The \c AI192UndoSuite allows you to manipulate the undo \e context for your plug-in. - Generally, each time Illustrator sends a plug-in a selector, it creates - an undo context. The record is created before the plug-in is called and - closed when the plug-in finishes running. The changes made by the plug-in - are accumulated in this record and make up the undo context. When the user - chooses Undo from the Edit menu, the changes of the last complete context - are undone. Redo restores the context changes. - - You can use \c #UndoChanges() to programmatically undo the changes within - the context Illustrator has made for your plug-in. It cannot undo changes - outside of this context. - - For plug-in tools, Illustrator handles undo contexts a little differently. - Instead of generating a context for each selector, it bundles the mouse - selectors into a single context. This allows a plug-in to undo changes - it made last time and then modify the document in response to the - current mouse position. Illustrator then redraws the document when the plug-in - returns control. - - There are three types of undo context, defined by \c #AIUndoContextKind. - Illustrator normally establishes a \c #kAIStandardUndoContext, but notifications - are sent in a \c #kAISilentUndoContext. A plug-in can change the undo context - type with \c #SetSilent() and \c #SetKind(), but only if the plug-in is \e not - operating in a nested context (that is, a context created when another plug-in - is executing). This prevents a plug-in in a nested context from - modifying the behavior of the outer context. - - Undo entries can be tagged with a string and/or an integer. Only standard - contexts can be tagged. -*/ -typedef struct { - - /** Specifies the localizable text(Unicode String) for Undo and Redo menu items. Illustrator - uses these strings for the menus as needed. - @note Illustrator automatically handles the undo mechanism for - plug-in filters. Filters should not use this function. - @param undoText Unicode String text for the Undo menu. - @param redoText Unicode String text for the Redo menu. - */ - AIAPI AIErr (*SetUndoTextUS) ( const ai::UnicodeString& undoText, const ai::UnicodeString& redoText ); - - /** Undoes changes in the current undo context. Clears any changes made - to the artwork since the undo context of the plug-in was created. */ - AIAPI AIErr (*UndoChanges) ( void ); - - /** Undoes changes in the Action palette. Clears any changes made - to the Action palette since the undo context of the plug-in was created. */ - AIAPI AIErr (*SetActionPaletteUndo) ( void ); - - /** @deprecated Obsolete, do not use. */ - AIAPI AIErr (*PurgeAllUndos) ( void ); - - /** Marks or unmarks the current API context as being silent for undo purposes. - See @ref UndoContext. - @param silent True to set the context to \c #kAISilentUndoContext, - false to set it to \c #kAIStandardUndoContext. - */ - AIAPI AIErr (*SetSilent) ( AIBoolean silent ); - - /** Sets the type of the current undo context, but only if the plug-in is \e not - operating in a nested context (that is, a context created when another plug-in - is executing). See @ref UndoContext. - @param kind The new context type, an \c #AIUndoContextKind constant. - */ - AIAPI AIErr (*SetKind) ( ai::int32 kind ); - - /** - @deprecated Use Unicode version \c #SetTagUS() instead. - - Sets a tag string and integer for the undo transaction that is generated - by the current API context. Affects only standard undo contexts; see @ref UndoContext. - @param tagString A descriptive string. - @param tagInteger An identifying number. - */ - AIAPI AIErr (*SetTag) ( char* tagString, ai::int32 tagInteger ); - - /** Counts the number of undo and redo transactions that a user can - perform. Does not count silent or appended transactions. Use with - \c #GetNthTransactionTag() to iterate through transactions in the - current undo context. - @param past [out] A buffer in which to return the number of undo transactions. - @param future [out] A buffer in which to return the number of redo transactions. - - */ - AIAPI AIErr (*CountTransactions) ( ai::int32* past, ai::int32* future ); - - /** - @deprecated Use Unicode version \c #GetNthTransactionTagUS() instead. - - Retrieves a transaction tag by position index from the current undo/redo context. - Use with \c #CountTransactions() to iterate through transactions in the - current standard undo context. - @param n The position index. Positive values indicate undo transactions, - negative values indicate redo transactions. No transaction is at index 0. - @param tagString [out] A buffer in which to return the descriptive string. - @param tagInteger [out] A buffer in which to return the identifying number. - */ - AIAPI AIErr (*GetNthTransactionTag) ( ai::int32 n, char** tagString, ai::int32* tagInteger ); - - /** Reports whether the current API context is marked as silent for undo purposes. - If the current context is nested, this can return true while the outer - context is not silent. See @ref UndoContext. - @param silent [out] A buffer in which to return true if the current undo context - is silent. - */ - AIAPI AIErr (*IsSilent) ( AIBoolean* silent ); - - /** Sets a Unicode tag string and integer for the undo transaction that is generated - by the current API context. Affects only standard undo contexts; see @ref UndoContext. - @param tagString A descriptive Unicode string. - @param tagInteger An identifying number. - */ - AIAPI AIErr (*SetTagUS) ( const ai::UnicodeString& tagString, ai::int32 tagInteger ); - - /** Retrieves a transaction tag (a Unicode string) by position index from the current undo/redo context. - Use with \c #CountTransactions() to iterate through transactions in the - current standard undo context. - @param n The position index. Positive values indicate undo transactions, - negative values indicate redo transactions. No transaction is at index 0. - @param tagString [out] A buffer in which to return the descriptive Unicode string. - @param tagInteger [out] A buffer in which to return the identifying number. - */ - - AIAPI AIErr (*GetNthTransactionTagUS) ( ai::int32 n, ai::UnicodeString& tagString, ai::int32* tagInteger ); - -} AI192UndoSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192User.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192User.h deleted file mode 100644 index b202fb2..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI192User.h +++ /dev/null @@ -1,503 +0,0 @@ -#ifndef __AI192User__ -#define __AI192User__ - -/* - * Name: AIUser.h - * $Revision: 15 $ - * Author: - * Date: - * Purpose: Adobe Illustrator User Utilities Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2016 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ -#include "AIUser.h" - -#include "AIHeaderBegin.h" - -/** @file AIUser.h */ - - -/************************************************************************s******* - ** - ** Constants - ** - **/ - -// v.14.0 -#define kAI192UserSuite kAIUserSuite -#define kAI192UserSuiteVersion12 AIAPI_VERSION(12) -#define kAI192UserSuiteVersion kAI192UserSuiteVersion12 -#define kAI192UserVersion kAI192UserSuiteVersion - -#if Macintosh || MSWindows -#define kAI192MacUserSuite kAIMacUserSuite -#define kAI192MacUserSuiteVersion6 AIAPI_VERSION(6) -#define kAI192MacUserSuiteVersion kAI192MacUserSuiteVersion5 -#define kAI192MacUserVersion kAI192MacUserSuiteVersion -#endif - -/** @ingroup Suites - This suite provides utility functions for working with Illustrator, - including unit conversion utilities and a progress bar. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAI192UserSuite and \c #kAI192UserSuiteVersion. - */ -struct AI192UserSuite { - - /** Reports whether a user has canceled the current operation. - (Note that this function returns a boolean value, not an error code.) - @return True if the user has canceled an operation - by pressing Command-dot or clicking Cancel or Stop in the - progress bar. - */ - AIAPI AIBoolean (*Cancel) ( void ); - - /** Updates the progress bar. - (Note that this function does not return an error code.) - @param current A number between 0 and \c max that represents - how far the operation has progressed. - @param max The maximum value, representing 100% progress. - */ - AIAPI void (*UpdateProgress) ( ai::int32 current, ai::int32 max ); - - /** Sets the text message displayed in the progress bar. If not provided, - the text line is blank. - (Note that this function does not return an error code.) - @param text The text message. - */ - AIAPI void (*SetProgressText) ( const ai::UnicodeString& text ); - - /** Explicitly close the progress bar if one is currently shown. - (Note that this function does not return an error code.) - */ - AIAPI void (*CloseProgress) ( void ); - - /** Converts a number of document points to a Unicode string, using - the period as a decimal separator. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI void (*AIRealToString) ( AIReal value, short precision, ai::UnicodeString& string ); - - /** Converts a Unicode string containing a number to an \c #AIReal value, - using the period as a decimal separator. - (Note that this function does not return an error code.) - @param string The string to convert. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*StringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - /** Converts a number of document points to a Unicode string, using the localized - international utilities (IU) decimal separator. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI void (*IUAIRealToString) ( AIReal value, short precision, ai::UnicodeString& string ); - - /** Converts a Unicode string containing a number to an \c #AIReal value, - using the localized international utilities (IU) decimal separator. - (Note that this function does not return an error code.) - @param string The string to convert. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*IUStringToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Converts a number of document points to a formatted Unicode string containing - a number and ruler units, using the localized international utilities (IU) - decimal separator, and the passed preference for precision. If passed precision value is -1 - then user preference for precision is used. - Uses the currently set ruler units, which can be inches, points, or centimeters. - (Note that this function does not return an error code.) - @param value The value to convert. - @param precision The number of digits to the right of the decimal, - in the range [0..4]. Pass -1 if user preference for precision should be used. - @param string [out] A buffer in which to return the converted value, at - least 12 characters. - */ - AIAPI AIErr (*IUAIRealToStringUnits) ( AIReal value, ai::int32 precision, ai::UnicodeString& string ); - - /** Converts a formatted Unicode string containing a number expressed in ruler units - to an \c #AIReal value in points. The current ruler units for the artwork - are used as the original units to scale the result, and the user's - preferences for precision are applied. - (Note that this function does not return an error code.) - @param string The string to convert, which uses the localized international utilities (IU) - decimal separator. It can contain a unit specifier, one of "in", "pt", or "cm". - If no unit specifier is included, uses the current ruler units. - @param value [out] A buffer in which to return the converted value. - If the string is not a number, this is set to \c #kAIRealUnknown. - */ - AIAPI void (*IUStringUnitsToAIReal) ( const ai::UnicodeString& string, AIReal *value ); - - /** Retrieves a string representing the current ruler units. - @param format The format for the result, one of: -
\c #kShortUnits -
\c #kLongSingularUnits -
\c #kLongPluralUnits -
If, for instance, the current unit is inches, the returned string - would be "in", "inch", or "inches". - @param string [out] A buffer in which to return the units string, at least 20 characters. - */ - AIAPI AIErr (*GetUnitsString) ( short format, ai::UnicodeString& string ); - - /** Retrieves the base name of a global object, stripping off any additional - token that was added to make the name unique (by a function such as - \c #AICustomColorSuite::NewCustomColorName(), for example). - @param name [in, out] A string in which to pass a unique name and - return the base name. The string is modified in place. - */ - AIAPI AIErr (*GetGlobalObjectDisplayName)( ai::UnicodeString& name ); - - /** Opens the appropriate application to edit a placed or raster object. - This is equivalent to an option-double-click on the object with the selection tool. - @param art The placed or raster art object. - @return \c #kApplicationNotFoundErr error if the application is not found. -
\c #kObjectNotLinkedErr error if the object is not a placed or raster object. - */ - AIAPI AIErr (*EditInOriginalApp) ( AIArtHandle art ); - - /** Runs an "Idle Event" that allows the application to do various idle-time things like update its selection view and state. Can be useful if - you have code that has its own message processing. */ - AIAPI AIErr (*AppIdle) ( void ); - - /** Builds a directory menu. Available only in Mac OS. Builds a menu consisting of the specified path as well as all parent directories of that path. - @param menu The platform-specific menu object. - @param fileSpec The file object for the directory. - */ - AIAPI AIErr (*BuildDirectoryMenu) ( AIPlatformMenuHandle menu, const ai::FilePath &fileSpec); - - /** Retrieves a directory. Available only in Mac OS. Returns a filespec pertaining to the 'index' item inside of the menu returned by BuildDirectoryMenu. - @param fileSpec The file object for the directory. - @param index The 0-based index of the directory. - */ - AIAPI AIErr (*GetIndexedDirectorySpec) ( ai::FilePath &fileSpec, ai::int32 index); - - /** Reveals a file in the Finder. Available only in Mac OS. - @param fileSpec The file object for the file. - */ - AIAPI AIErr (*RevealTheFile) ( const ai::FilePath &fileSpec); - - /** Disables (dims) the cancel or stop button in the progress bar. - (Note that this function does not return an error code.) - */ - AIAPI void (*DisableProgressCancel) ( void ); - - /** Reports whether it is safe to allocate memory. Call when a timer - or other asynchronous event triggers an action that allocates memory. - Not needed when handling notifications or user events; the plug-in does not receive - these when it is not ok to allocate memory. - (Note that this function returns a boolean value, not an error code.) - @param True if it is safe to allocate memory. False if it is not safe; in this case, - reschedule the action and try again later. - */ - AIAPI AIBoolean (*OKToAllocateMemory) ( void ); - - // New for AI 11 - /** Retrieves the current date and time. - @param outValue [out] A buffer in which to return the current date-time value. - */ - AIAPI AIErr (*GetDateAndTime)(AIUserDateTime *outValue); - - /* Formats a date into a Unicode string. - @param inValue The date to format, or \c NULL to format the current date-time value. - @param formatFlag The format to use, one of: -
\c #kAIShortDateFormat -
\c #kAILongDateFormat -
\c #kAIAbbrevDateFormat - @param dateStringUS [out] A buffer in which to return the formatted date string. - */ - AIAPI AIErr (*GetDateString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS); - - /* Formats a time into a Unicode string. - @param inValue The time to format, or \c NULL to format the current date-time value. - @param formatFlag The format to use, one of: -
\c #kAIShortTimeFormat -
\c #kAILongTimeFormat - @param dateStringUS [out] A buffer in which to return the formatted time string. - */ - AIAPI AIErr (*GetTimeString)(const AIUserDateTime *inValue, const ai::int32 formatFlag, ai::UnicodeString& dateStringUS); - - /** Retrieves the year value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetYear)(const AIUserDateTime *inValue, int *year); - - /** Retrieves the month value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetMonth)(const AIUserDateTime *inValue, int *month); - - /** Retrieves the day value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDay)(const AIUserDateTime *inValue, int *day); - - /** Retrieves the hour value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetHour)(const AIUserDateTime *inValue, int *hour); - - /** Retrieves the minute value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetMinute)(const AIUserDateTime *inValue, int *minute); - - /** Retrieves the second value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetSecond)(const AIUserDateTime *inValue, int *second); - - /** Retrieves the day-of-week value from a date-time. - @param inValue The date-time value, or \c NULL to get the current date-time. - @param year [out] A buffer in which to return the value. - */ - AIAPI AIErr (*GetDayOfWeek)(const AIUserDateTime *inValue, int *dayOfWeek); - - /** Launches an application, and optionally opens the current document in it. - @param spFileSpec The file specification for the application's executable. - @param openDoc True to open the current document in the new application. - */ - AIAPI AIErr (*LaunchApp)(const ai::FilePath &spFileSpec, ASBoolean openDoc); - - /** Generates an appropriate name for a named object, such as - a layer, swatch, or style, according to the naming rules for that - collection. - @param set The naming rules. - @param name [out] An ai::UnicodeString in which to return the generated name. - */ - AIAPI AIErr (*NextName) (AIAutoNameGenerator &set, ai::UnicodeString &name); - - /** Generates an appropriate name for a copy of a named object, such as - a layer, swatch, or style, according to the naming rules for that - collection. - @param set The naming rules. - @param original Original name to copy (may be an empty string). - @param copy [out] An ai::UnicodeString in which to return the generated name. - */ - AIAPI AIErr (*CopyOfName) (AIAutoNameGenerator &set, const ai::UnicodeString &original, ai::UnicodeString ©); - - /** Tests for equality of names within a collection of named objects. - Use in the \c #AIAutoNameGenerator::HasName() callback function - to test whether an automatically generated name matches a name - already in the collection. - @param name1 The first name. - @param name2 The second name. - @param same [out] An AIBoolean reference in which to return true if the names - are the same. - */ - AIAPI AIErr (*SameName) (const ai::UnicodeString &name1, const ai::UnicodeString &name2, AIBoolean &same); - - - /** Opens a platform-specific dialog for saving a file. - @param title Dialog title. - @param AIFileDialogFilters File types to save. Can be \c NULL. - @param defaultName Default file name to appear in dialog. Can be \c NULL. - @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and - return the full path of the file chosen by the user. - */ - AIAPI AIErr (*PutFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, const ai::UnicodeString &defaultName, ai::FilePath &ioFilePath); - - /** Opens a platform-specific dialog for opening a file. - @param title Dialog title. - @param AIFileDialogFilters File types to open. Can be \c NULL. - @param ioFilePath [in, out] A buffer in which to pass the directory to browse or \c NULL, and - return the full path of the file chosen by the user. - */ - AIAPI AIErr (*GetFileDialog)(const ai::UnicodeString &title, const AIFileDialogFilters*, ai::FilePath &ioFilePath); - - /** Opens a platform-specific dialog for choosing a folder. - @param title Dialog title. - @param ioFilePath [in, out] A buffer in which to pass the folder to browse or \c NULL, and - return the full path of the folder chosen by the user. - */ - AIAPI AIErr (*GetDirectoryDialog)(const ai::UnicodeString &title, ai::FilePath &ioFilePath); - - /** Displays an alert dialog with a warning icon and OK and Cancel buttons. - @param msg The message to display. - @param defaultOk True to make the OK button the default, false to make Cancel the default. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return True if the dialog was dismissed with the OK button, - false if it was canceled. - */ - AIAPI AIBoolean (*OKCancelAlert) (const ai::UnicodeString& msg, AIBoolean defaultOk, const char* dontShowKey); - - /** Displays an alert dialog with a warning icon and an OK button. - @param msg The message to display. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return Nothing. It does not return AIErr - */ - AIAPI void (*WarningAlert) (const ai::UnicodeString& msg, const char* dontShowKey); - - /** Displays an modal alert dialog with a warning icon and an OK button which doesnot get dismissed on ESC key. - @param msg The message to display. - @param dontShowKey A preference key to use with the "Do not show again" checkbox, - in which to store the user's choice and save it in the application preferences file. - When \c NULL, the dialog does not include the checkbox. - @return Nothing. It does not return AIErr - */ - AIAPI void (*MessageAlertEx) (const ai::UnicodeString& msg, const char* dontShowKey); - - /** Displays a predefined dialog with a yes/no question. - The dialog displays text specified with a unicodeString, and - buttons with default labels Yes, No, and Cancel. - @param msg The text string. - @return The \c #AIAnswer constant for the button pressed to dismiss the dialog, - or \c #kAIAnswer_Invalid in case of error. - @see \c #ErrorAlert(), \c #MessageAlert(), \c #YesNoAlert() - */ - AIAPI AIAnswer (*QuestionAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog with a yes/no question. - The dialog displays text specified with a unicodeString, and - buttons with default labels Yes and No. - @param msg The text string. - @return The \c #AIAnswer constant for the button pressed to dismiss the dialog, - or \c #kAIAnswer_Invalid in case of error. - @see \c #ErrorAlert(), \c #MessageAlert(), \c #QuestionAlert() - */ - AIAPI AIAnswer (*YesNoAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog that informs the user that an error occurred. - The dialog displays text specified with a unicodeString, with the platform-specific - error icon at the left, and an OK button. - @param msg The text string. - @return Nothing.It doesnot return an AIErr - @see \c #MessageAlert(), \c #QuestionAlert(), \c #YesNoAlert() - */ - AIAPI void (*ErrorAlert)(const ai::UnicodeString &msg); - - /** Displays a predefined dialog with an informational message. - The dialog displays text specified with a unicodeString, with the - platform-specific message icon at the left, and an OK button. - @param msg The text string. - @return Nothing.It doesnot return an AIErr - @see \c #ErrorAlert(), \c #QuestionAlert(), \c #YesNoAlert() - */ - AIAPI void (*MessageAlert)(const ai::UnicodeString &msg); - - /** Invokes the platform-specific color picker dialog. - @param inLocation[int] The position of the dialog. (-1, -1) centers the dialog on the screen. - @param inColor[in] The initially selected color value. - @param outColor [out] A buffer in which to return the selected color. - @return True if the user selected a color, false otherwise. - */ - AIAPI AIBoolean (*ChooseFromOSColorPicker) (const AIPoint &inLocation, - const AIRGBColor& inColor, AIRGBColor* outColor); - - /** Evaluates a numeric expression to create a formatted string suitable for display. - Call, for example, when a numeric edit control loses focus or the user presses "=". - If the result of evaluation is not a valid numeric value as per options specified, it is recommended that - the associated control display the last known-good value, or a blank string - accompanied by a beep or other error indicator. - - @param expr [in] The expression to be evaluated (typically entered by the user - in the control). - @param options [in] An \c #AIExpressionOptions structure that determines how - a numeric result is obtained. Specifies the units for the - result, a range to which the result is clipped, and the precision. - @param evaluatedExpr [out] A buffer in which to return the formatted display string. - @param isChanged [out] A buffer in which to return true if the result of evaluation - is different from result of user input. Example in case of non numeric input or out of bounds input. - @param numericValue [out] A buffer in which to return the numeric value, according to the specified options. - */ - AIAPI AIErr (*EvaluateExpression)(const ai::UnicodeString& expr, const AIExpressionOptions& options, ai::UnicodeString& evaluatedExpr, - AIBoolean & isChanged , AIDouble& numericValue); - - /** Invokes a modal dialog in which the user must input text. The dialog cannot be dismissed - until text is entered. If default text is provided, however, the user can dismiss the - dialog without changing that text. - - @param title The title for the dialog - @param messageText A text message to display above the input field, or NULL to display no message. - @param label The label for the text field. - @param ioName [in/out] On input, a default string for the text field. This is replaced by text that - the user enters, if any. - @param IsValidInputProc A function pointer to a validation callback that validates the input as typed by the user. - The first parameter to this call is a \c #AIValidationStage constant that reports whether the call is - made upon text entry, or upon dismissal of the dialog. - @param userdata Developer-defined user data to be passed to the validation callback. - @param maxInputChars The maximum number of characters that user can enter in the text field. - */ - AIAPI AIErr (*GetInputFromUser) ( const ai::UnicodeString &title, const ai::UnicodeString* messageText, const ai::UnicodeString &label, ai::UnicodeString& ioField, IsValidInputProc validator, void *userdata, ai::int32 maxInputChars); - - /** Creates a singleton resource manager instance to be used for cursors. - Call once for a plugin, after startup is completed. Destroy the instance on - application shutdown (not plug-in shutdown). - @param inRscMgr [out] A buffer in which to return the resource-manager handle. - @see DisposeCursorResourceMgr() - */ - AIAPI AIErr (*CreateCursorResourceMgr)(SPPluginRef, AIResourceManagerHandle* inRscMgr); - - /** Sets the image to be used for the plug-in's cursor. - @param cursorID The resource ID of the cursor, or a \c #AIPredefinedCursor - constant value to use one of the predefined cursors. Cursor images must be - in PNG format. - @param inRscMgr The resource manager, as returned by \c #CreateCursorResourceMgr(). - */ - AIAPI AIErr (*SetCursor)(ai::int32 cursorID, AIResourceManagerHandle inRscMgr); - - /** Disposes of the plug-in's singleton resource manager. Call once when - \c #kAIApplicationShutdownNotifier is received. Do not call as part of plug-in shutdown. - @param The resource manager handle, as returned on creation. - */ - AIAPI AIErr (*DisposeCursorResourceMgr)(AIResourceManagerHandle); - - /** Reports the current language in use. - @param lang [out] A buffer in which to return the language code. - */ - AIAPI AIErr (*GetAILanguageCode)(ai::UnicodeString& lang); - - /** Reports the maximum scale factor for all the screens in a Mac OS system, - or the application's UI scale factor in a Windows system. - @return The scale factor. - */ - - AIAPI AIReal (*GetMaximumScaleFactorOnSystem)(); - - - /** Reports the ratio of Art Scale factor and View Scale Factor. - (ArtScaleFactor/ ViewScaleFactor) - */ - AIAPI AIReal(*GetArtToViewScaleFactor)(AIDocumentViewHandle view); -}; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI5xAPISupport.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI5xAPISupport.h deleted file mode 100644 index 7de688a..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI5xAPISupport.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Name: AI5xAPISupport.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 6.0 Artwork Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AI5xAPISupport__ -#define __AI5xAPISupport__ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#include "AIHeaderBegin.h" - - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI5xAPISupportSuite "AI 5x API Support Suite" -#define kAI5xAPISupportSuiteVersion AIAPI_VERSION(2) - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*Get5xFunctions) ( ISAType architecture, const void **AI5xFunctions); - -} AI5xAPISupportSuite; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Basic.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Basic.h deleted file mode 100644 index c722749..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Basic.h +++ /dev/null @@ -1,68 +0,0 @@ -#ifndef __AI60Basic__ -#define __AI60Basic__ - -/* - * Name: AIBasic.h - * $Revision: 2 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 6.0 Basic Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI60BasicSuite "AI Basic Suite" -#define kAI60BasicSuiteVersion AIAPI_VERSION(2) -#define kAI60BasicVersion kAI60BasicSuiteVersion - -#define kSuiteNotFoundErr 'STE?' - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*AcquireSuite) ( char *name, long version, void **suiteProcs ); - AIAPI AIErr (*ReleaseSuite) ( void *suiteProcs ); - -} AIBasicSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Plugin.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Plugin.h deleted file mode 100644 index 0b1d76c..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Plugin.h +++ /dev/null @@ -1,153 +0,0 @@ -#ifndef __AI60Plugin__ -#define __AI60Plugin__ - -/* - * Name: AIPlugin.h - * $Revision: 4 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 6.0 Plug-in Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AI60Basic__ -#include "AI60Basic.h" -#endif - -#ifndef __SPPlugins__ -#include "SPPlugs.h" -#endif - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI60PluginSuite "AI Plugin Suite" -#define kAI60PluginSuiteVersion AIAPI_VERSION(2) -#define kAI60PluginVersion kAI60PluginSuiteVersion -#if Macintosh -#define kAI60MacPluginSuite "AI Mac Plugin Suite" -#define kAI60MacPluginSuiteVersion AIAPI_VERSION(2) -#define kAI60MacPluginVersion kAI60MacPluginSuiteVersion -#endif - - -// These are a plug-in's messages: -#define kSelectorAI60StartupPlugin "AI Startup Plug-in" -#define kSelectorAI60UnloadPlugin "AI Unload Plug-in" -#define kSelectorAI60ReloadPlugin "AI Reload Plug-in" -#define kSelectorAI60ShutdownPlugin "AI Shutdown Plug-in" -#define kSelectorAI60AboutPlugin "AI About Plug-in" - - -// These are the options available to a plug-in. -#define kPluginWantsResultsAutoSelectedOption (1L<<1) - - -// These are a plug-in's possible states. -#define kPluginIsBuiltinState (1L<<0) -#define kPluginIsResidentState (1L<<1) -#define kPluginIsBrokenState (1L<<2) -#define kPluginIsStartedState (1L<<3) - -#define kCantGetPluginCodePropertyErr 'PLCP' -#define kCantGetPluginCodeErr 'PLCO' -#define kPluginIsBrokenErr 'PLBR' -#define kPluginInternalErr 'PLIN' -#define kCantGetPiPLErr 'PLPI' -#define kCorruptPiPLErr 'PLP?' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -// This is a reference to a plug-in. It is never dereferenced. -//typedef struct _t_AIPluginOpaque *AIPluginHandle; -typedef SPPluginRef AIPluginHandle; - -// The contents of a plug-in message. -typedef struct { - AIPluginHandle self; - void *globals; - AIBasicSuite *basic; -} AIPluginData; - -typedef struct { - AIPluginData d; -} AIPluginMessage; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*GetPluginOptions) ( AIPluginHandle plugin, long *options ); - AIAPI AIErr (*SetPluginOptions) ( AIPluginHandle plugin, long options ); - - AIAPI AIErr (*GetPluginInterfaceVersion) ( AIPluginHandle plugin, long *interfaceVersion ); - AIAPI AIErr (*GetPluginGlobals) ( AIPluginHandle plugin, void **globals ); - AIAPI AIErr (*SetPluginGlobals) ( AIPluginHandle plugin, void *globals ); - AIAPI AIErr (*GetPluginState) ( AIPluginHandle plugin, long *state ); - - AIAPI AIErr (*CountPlugins) ( long *count ); - AIAPI AIErr (*GetNthPlugin) ( long n, AIPluginHandle *plugin ); - AIAPI AIErr (*GetRunningPlugin) ( AIPluginHandle *plugin ); - - AIAPI AIErr (*SetupPluginData) ( AIPluginHandle plugin, AIPluginData *data ); - AIAPI AIErr (*CallPlugin) ( AIPluginHandle plugin, const char *selector, void *message ); - AIAPI AIErr (*EmptyPluginData) ( AIPluginHandle plugin, AIPluginData *data ); - -} AI60PluginSuite; - - -#if Macintosh - -typedef char AIISAType; - -typedef struct { - - AIAPI AIErr (*MacXGetPluginFSSpec) ( AIPluginHandle plugin, SPPlatformFileSpecification *file ); - AIAPI AIErr (*MacXGetPluginArchitecture) ( AIPluginHandle plugin, AIISAType *architecture ); - -} AIMacPluginSuite; -#endif - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Property.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Property.h deleted file mode 100644 index 1f94492..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Property.h +++ /dev/null @@ -1,76 +0,0 @@ -#ifndef __AI60Property__ -#define __AI60Property__ - -/* - * Name: AIProperty.h - * $Revision: 2 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 6.0 Plug-in Property Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AI60Plugin__ -#include "AI60Plugin.h" -#endif - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kSelectorAI60AcquireProperty "AI Acquire Property" -#define kSelectorAI60ReleaseProperty "AI Release Property" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -typedef struct { - - AIPluginData d; - - long vendorID; - long propertyKey; - long propertyID; - - void *property; - long refCon; - AIBoolean cacheable; - -} AIPropertyMessage; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Suite.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Suite.h deleted file mode 100644 index 43d6da7..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI60Suite.h +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef __AI60Suite__ -#define __AI60Suite__ - -/* - * Name: AISuite.h - * $Revision: 3 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 6.0 Function Suites. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AI60Plugin__ -#include "AI60Plugin.h" -#endif - -#ifndef __AI60Basic__ -#include "AI60Basic.h" -#endif - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI60SuiteSuite "AI Suite Suite" -#define kAI60SuiteSuiteVersion AIAPI_VERSION(3) -#define kAI60SuiteVersion kAI60SuiteSuiteVersion - -#define kLatestInternalVersion 0 - -#define kSuiteAlreadyExistsErr 'STE=' -#define kBadSuiteNameErr 'STNM' -#define kBadSuiteAPIVersionErr 'STAP' -#define kBadSuiteInternalVersionErr 'STIN' - - -/******************************************************************************* - ** - ** Types - ** - **/ - -typedef struct _t_AISuiteOpaque *AISuiteHandle; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*AcquireSuite) ( char *name, long apiVersion, - long internalVersion, void **suiteProcs ); - AIAPI AIErr (*ReleaseSuite) ( void *suiteProcs ); - - AIAPI AIErr (*AddSuite) ( AIPluginHandle self, char *name, long apiVersion, - long internalVersion, void *suiteProcs, AISuiteHandle *suite ); - AIAPI AIErr (*GetSuite) ( char *name, long apiVersion, - long internalVersion, AISuiteHandle *suite ); - AIAPI AIErr (*GetSuiteName) ( AISuiteHandle suite, char **name ); - AIAPI AIErr (*GetSuiteAPIVersion) ( AISuiteHandle suite, long *apiVersion ); - AIAPI AIErr (*GetSuiteInternalVersion) ( AISuiteHandle suite, long *internalVersion ); - AIAPI AIErr (*GetSuiteProcs) ( AISuiteHandle suite, void **suiteProcs ); - AIAPI AIErr (*GetSuiteAcquireCount) ( AISuiteHandle suite, long *acquireCount ); - AIAPI AIErr (*GetSuitePlugin) ( AISuiteHandle suite, AIPluginHandle *plugin ); - - AIAPI AIErr (*CountSuites) ( long *count ); - AIAPI AIErr (*GetNthSuite) ( long n, AISuiteHandle *suite ); - - AIAPI AIErr (*Undefined) ( void ); - -} AISuiteSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI70Color.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI70Color.h deleted file mode 100644 index 1675b03..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI70Color.h +++ /dev/null @@ -1,131 +0,0 @@ -#ifndef __AI70Color__ -#define __AI70Color__ - -/* - * Name: AI70Color.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 7.0 Color Types. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIColor__ -#include "AIColor.h" -#endif - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIFixedMath__ -#include "AIFixedMath.h" -#endif - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -typedef struct { - AIFixed gray; -} AI70GrayColorStyle; - -typedef struct { - AIFixed cyan, magenta, yellow, black; -} AI70FourColorStyle; - -typedef struct { - AIFixed red, green, blue; -} AI70ThreeColorStyle; - - -typedef union { - AI70FourColorStyle f; - AI70ThreeColorStyle rgb; -} AI70CustomColorUnion; - -typedef struct { - AICustomColorTag kind; - AI70CustomColorUnion c; - unsigned char name[32]; -} AI70CustomColor; - -typedef struct { - AICustomColorHandle color; - AIFixed tint; -} AI70CustomColorStyle; - - -typedef struct { - AIPatternHandle pattern; /* reference to the AIPattern */ - AIFixed shiftDist; /* distance to translate the [unscaled] prototype before filling */ - AIFixed shiftAngle; /* angle to translate the [unscaled] prototype before filling */ - AIFixedPoint scale; /* fraction to scale the prototype before filling */ - AIFixed rotate; /* angle to rotate the prototype before filling */ - AIBoolean reflect; /* whether or not the prototype is reflected before filling */ - AIFixed reflectAngle; /* axis around which to reflect */ - AIFixed shearAngle; /* angle to slant the shear by */ - AIFixed shearAxis; /* axis to shear with respect to */ - AIFixedMatrix transform; /* additional transformation arising from manipulating the path */ -} AI70PatternStyle; - -typedef struct { - AIGradientHandle gradient; /* reference to the AIGradient */ - AIFixedPoint gradientOrigin; /* gradient vector origin */ - AIFixed gradientAngle; /* gradient vector angle */ - AIFixed gradientLength; /* gradient vector length */ - AIFixedMatrix matrix; /* transformation applied by xform tools */ - AIFixed hiliteAngle; /* gradient hilite vector angle */ - AIFixed hiliteLength; /* length of hiliteVector measured as a fraction - of the length of the gradient vector (gradientLength) */ -} AI70GradientStyle; - -typedef union { - AI70GrayColorStyle g; - AI70FourColorStyle f; - AI70ThreeColorStyle rgb; - AI70CustomColorStyle c; - AI70PatternStyle p; - AI70GradientStyle b; -} AI70ColorUnion; - -typedef struct { - AIColorTag kind; /* Used to determine the color variant */ - AI70ColorUnion c; -} AI70Color; - - -typedef struct { - AIFixed midPoint; /* midpoint skew value in percent */ - AIFixed rampPoint; /* location of color in the blend in percent */ - AI70Color color; -} AI70GradientStop; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Art.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Art.h deleted file mode 100644 index 09d28fe..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Art.h +++ /dev/null @@ -1,137 +0,0 @@ -#ifndef __AI90Art__ -#define __AI90Art__ - -/* - * Name: AI90Art.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 9.0 Artwork Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIArt.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90ArtSuite kAIArtSuite -#define kAIArtSuiteVersion8 AIAPI_VERSION(8) -#define kAI90ArtSuiteVersion kAIArtSuiteVersion8 - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/* Illustrator 9.0 Art suite */ -typedef struct _AI90ArtSuite { - - AIAPI AIErr (*NewArt) ( short type, short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - AIAPI AIErr (*DisposeArt) ( AIArtHandle art ); - AIAPI AIErr (*ReorderArt) ( AIArtHandle thisArt, short paintOrder, AIArtHandle prep ); - AIAPI AIErr (*DuplicateArt) ( AIArtHandle thisArt, short paintOrder, AIArtHandle prep, AIArtHandle *newArt ); - - AIAPI AIErr (*GetFirstArtOfLayer) ( AILayerHandle layer, AIArtHandle *art ); - AIAPI AIErr (*GetLayerOfArt) ( AIArtHandle art, AILayerHandle *layer ); - AIAPI AIErr (*GetArtType) ( AIArtHandle art, short *type ); - AIAPI AIErr (*GetArtUserAttr) ( AIArtHandle art, long whichAttr, long *attr ); - AIAPI AIErr (*SetArtUserAttr) ( AIArtHandle art, long whichAttr, long attr ); - AIAPI AIErr (*GetArtParent) ( AIArtHandle art, AIArtHandle *parent ); - AIAPI AIErr (*GetArtFirstChild) ( AIArtHandle art, AIArtHandle *child ); - AIAPI AIErr (*GetArtSibling) ( AIArtHandle art, AIArtHandle *sibling ); - AIAPI AIErr (*GetArtPriorSibling) ( AIArtHandle art, AIArtHandle *sibling ); - - AIAPI AIErr (*GetArtBounds) ( AIArtHandle art, AIRealRect *bounds ); - AIAPI AIErr (*SetArtBounds) ( AIArtHandle art ); - - AIAPI AIErr (*GetArtCenterPointVisible) ( AIArtHandle art, AIBoolean *visible ); - AIAPI AIErr (*SetArtCenterPointVisible) ( AIArtHandle art, AIBoolean visible ); - - /* New with Illustrator 7.0 */ - AIAPI AIErr (*GetArtTransformBounds) ( AIArtHandle art, AIRealMatrix *transform, long flags, AIRealRect *bounds ); - AIAPI AIErr (*UpdateArtworkLink) ( AIArtHandle art, AIBoolean *updated ); - - /* New in Illustrator 8.0 */ - AIAPI AIBoolean (*ValidArt) ( AIArtHandle art ); - AIAPI AIErr (*GetArtOrder) ( AIArtHandle art1, AIArtHandle art2, short *order ); - AIAPI AIErr (*SelectNamedArtOfLayer) ( AILayerHandle layer, char *name, AIBoolean matchWholeWord, AIBoolean caseSensitive ); - AIAPI AIErr (*GetArtRotatedBounds) ( AIArtHandle art, AIReal angle, long flags, AIRealRect *bounds ); - - AIAPI AIBoolean (*ArtHasFill) ( AIArtHandle art ); - AIAPI AIBoolean (*ArtHasStroke) ( AIArtHandle art ); - AIAPI AIBoolean (*ArtsHaveEqualPaths) ( AIArtHandle art1, AIArtHandle art2 ); - AIAPI AIErr (*ArtCopyFillStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt ); - AIAPI AIErr (*ArtCopyStrokeStyleIfEqualPaths) ( AIArtHandle dstArt, AIArtHandle srcArt ); - - /* New in Illustrator 9.0 */ - - /* Any of these parameters may be NULL if not needed. */ - AIAPI AIErr (*GetInsertionPoint) ( AIArtHandle *art, short *paintorder, ASBoolean *editable ); - AIAPI AIErr (*SetInsertionPoint) ( AIArtHandle art ); - - AIAPI AIErr (*GetKeyArt) ( AIArtHandle *art ); - AIAPI AIErr (*CancelKeyArt) (void); - - /* Returns the dictionary associated with the art object. The same dictionary - is accessed by the AITag suite but that suite is only capable of - setting and getting string values. Note that dictionaries are reference - counted. You must call sAIDictionary->Release() when you're done with - it. */ - AIAPI AIErr (*GetDictionary) ( AIArtHandle art, struct _AIDictionary** dictionary ); - AIAPI AIErr (*SetArtName) (AIArtHandle art, char const *name); - - /* If there is no user assigned name, a default descriptive name will be - returned. *isDefaultName will be set to reflect this. isDefaultName - may be null. */ - AIAPI AIErr (*GetArtName) (AIArtHandle art, char name[], int bufferSize, ASBoolean *isDefaultName); - - /* True if art is a group and it corresponds to a layer. */ - AIAPI AIErr (*IsArtLayerGroup) (AIArtHandle art, ASBoolean *isLayerGroup); - AIAPI AIErr (*ReleaseToLayers) (const AIArtHandle art, ASBoolean build); - - /* More efficient than doing one art at a time */ - AIAPI AIErr (*ModifyTargetedArtSet) (AIArtHandle *list, long count, long action); - - /* Return true if art is part of the styled art of another object */ - AIAPI AIBoolean (*IsArtStyledArt) (AIArtHandle art); - - /* Return true if 'art' adds to clipping. Should only be called on - descendents of a clipGroup or a maskObject. A return of TRUE indicates - 'art' is either an appropriate art object with the isClip flag on or a - non-clip group with a clipping descendent that isn't bounded by another - clipGroup. */ - AIAPI AIBoolean (*IsArtClipping) (AIArtHandle art); - -} AI90ArtSuite; - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90ArtStyleParser.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90ArtStyleParser.h deleted file mode 100644 index 8bdca62..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90ArtStyleParser.h +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Name: AI90ArtStyleParser.h - * Purpose: Adobe Illustrator 9.0 Art Style Parser Suite. - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AI90ArtStyleParser__ -#define __AI90ArtStyleParser__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIArtStyleParser.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90ArtStyleParserSuite kAIArtStyleParserSuite -#define kAIArtStyleParserSuiteVersion2 AIAPI_VERSION(2) -#define kAI90ArtStyleParserSuiteVersion kAIArtStyleParserSuiteVersion2 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/* Suite for parsing and editing styles on art objects */ -typedef struct { - - // Allocate and delete a parser - AIAPI AIErr (*NewParser) ( AIStyleParser* parser ); - AIAPI AIErr (*DisposeParser) ( AIStyleParser parser ); - - // Initialize a style parser - AIAPI AIErr (*ParseStyle) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - AIAPI AIErr (*MergeStyleIntoParser) ( AIStyleParser parser, AIArtStyleHandle artStyle ); - AIAPI AIBoolean (*IsStyleParseable) ( AIStyleParser parser ); - // Calls to IsStyleParseable make sense only immediately after ParseStyle - - // Count the number of elements inside the parser - AIAPI ASInt32 (*CountPreEffects) ( AIStyleParser parser ); - AIAPI ASInt32 (*CountPostEffects) ( AIStyleParser parser ); - AIAPI ASInt32 (*CountPaintFields) ( AIStyleParser parser ); - AIAPI ASInt32 (*CountEffectsOfPaintField) ( AIParserPaintField paintField ); - - // Retrieve elements from the parser - AIAPI AIErr (*GetNthPreEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect* effect ); - AIAPI AIErr (*GetNthPostEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect* effect ); - AIAPI AIErr (*GetNthPaintField) ( AIStyleParser parser, ASInt32 n, AIParserPaintField* paintField ); - AIAPI AIErr (*GetNthEffectOfPaintField) ( AIParserPaintField paintField, ASInt32 n, - AIParserLiveEffect* effect ); - AIAPI AIErr (*GetStyleBlendField) ( AIStyleParser parser, AIParserBlendField* blendField ); - - // Insert elements into the parser at specified places and indices. Use index -1 to insert element - // at the end. - AIAPI AIErr (*InsertNthPreEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect effect ); - AIAPI AIErr (*InsertNthPostEffect) ( AIStyleParser parser, ASInt32 n, AIParserLiveEffect effect ); - AIAPI AIErr (*InsertNthPaintField) ( AIStyleParser parser, ASInt32 n, AIParserPaintField paintField ); - AIAPI AIErr (*InsertNthEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, ASInt32 n, - AIParserLiveEffect effect ); - - // Remove elements from the parser. The doDelete boolean lets the parser know whether it can - // dispose of the memory associated with the element. Plugins may not want to have the - // memory disposed if they are moving the elements from one position to another. - AIAPI AIErr (*RemovePreEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); - AIAPI AIErr (*RemovePostEffect) ( AIStyleParser parser, AIParserLiveEffect effect, AIBoolean doDelete ); - AIAPI AIErr (*RemovePaintField) ( AIStyleParser parser, AIParserPaintField paintField, AIBoolean doDelete ); - AIAPI AIErr (*RemoveEffectOfPaintField) ( AIStyleParser parser, AIParserPaintField paintField, - AIParserLiveEffect effect, AIBoolean doDelete ); - - // Simplify the style. - // RemoveAllEffects removes all the effects in the parser. - // Simplify removes all the effects and all the paint fields except for the focus fill - // and focus stroke. Simplify also sets all blends back to normal 100% opaque and places - // the focus stroke on top of the focus fill. - AIAPI AIErr (*RemoveAllEffects) ( AIStyleParser parser ); - AIAPI AIErr (*Simplify) ( AIStyleParser parser ); - - // Miscellaneous utility functions - AIAPI AIErr (*GetFocusFill) ( AIStyleParser parser, AIParserPaintField* paintField ); - AIAPI AIErr (*GetFocusStroke) ( AIStyleParser parser, AIParserPaintField* paintField ); - AIAPI AIErr (*SetParserFocus) ( AIStyleParser parser, AIParserPaintField paintField ); - AIAPI AIErr (*SetFocus) ( AIArtStyleHandle artStyle, AIStyleParser parser, AIParserPaintField paintField ); - // SetFocus should be called when the given style parser hasn't yet been modified - // since the call to ParseStyle. The artStyle passed in should be the same one - // previously passed into ParseStyle. The parser remains linked to the artStyle - // after this call. - AIAPI ASInt32 (*GetGroupContentsPosition) ( AIStyleParser parser ); - AIAPI AIErr (*MoveGroupContentsPosition) ( AIStyleParser parser, ASInt32 position ); - - // CreateNewStyle constructs and returns a new art style handle based on the elements - // in the given parser. ParseStyle would still need to be called on the new style if - // a plugin wanted to call SetFocus or EditEffectParameters afterward. - AIAPI AIErr (*CreateNewStyle) ( AIStyleParser parser, AIArtStyleHandle* artStyle ); - - // Basic information about the elements in the parser - AIAPI AIBoolean (*IsStyleVisible) ( AIStyleParser parser ); - // A style is "invisible" if there are no effects, all the paint fields have - // a none color, and the overall style transparency contains default values. - AIAPI AIBoolean (*ContainsPaint) ( AIStyleParser parser ); - AIAPI AIBoolean (*ContainsEffects) ( AIStyleParser parser ); - AIAPI AIBoolean (*ContainsTransparency) ( AIStyleParser parser ); - - // Effect-specific calls - AIAPI AIErr (*GetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle* liveEffectHandle ); - AIAPI AIErr (*GetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters* params ); - AIAPI AIErr (*SetLiveEffectHandle) ( AIParserLiveEffect effect, AILiveEffectHandle liveEffectHandle ); - AIAPI AIErr (*SetLiveEffectParams) ( AIParserLiveEffect effect, AILiveEffectParameters params ); - AIAPI AIErr (*CloneLiveEffect) ( AIParserLiveEffect effect, AIParserLiveEffect* clonedEffect ); - AIAPI AIErr (*EditEffectParameters) ( AIArtStyleHandle artStyle, AIParserLiveEffect effect ); - // EditEffectParameters should be called when the given effect was retrieved from a style - // parser which hasn't yet been modified since the call to ParseStyle. The artStyle - // passed in should be the same one previously passed into ParseStyle. The parser remains - // linked to the artStyle after this call. However, a new style will have been created if - // the user modifies the parameters, and this new style is neither linked to the parser - // nor the same one as the original artStyle. - - // PaintField-specific calls - // AIArtStylePaintData currently ignored in GetStroke and SetStroke - AIAPI AIBoolean (*IsFill) ( AIParserPaintField paintField ); - AIAPI AIBoolean (*IsStroke) ( AIParserPaintField paintField ); - AIAPI AIErr (*GetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); - AIAPI AIErr (*GetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); - AIAPI AIErr (*SetFill) ( AIParserPaintField paintField, AIFillStyle* fill, AIArtStylePaintData* paintData ); - AIAPI AIErr (*SetStroke) ( AIParserPaintField paintField, AIStrokeStyle* stroke, AIArtStylePaintData* paintData ); - AIAPI AIErr (*GetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); - AIAPI AIErr (*SetPaintBlendDictionary) ( AIParserPaintField paintField, AIDictionaryRef blendDict ); - AIAPI ASInt32 (*GetColorPosn) ( AIParserPaintField paintField ); - AIAPI AIErr (*SetColorPosn) ( AIParserPaintField paintField, ASInt32 colorPosn ); - AIAPI AIErr (*ClonePaintField) ( AIParserPaintField paintField, AIParserPaintField* clonedPaintField ); - // PaintFields can contain live effects which substitute for the built-in fill and stroke behaviors - AIAPI AIErr (*GetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle* liveEffectHandle, - AILiveEffectParameters* params ); - AIAPI AIErr (*SetPaintLiveEffectInfo) ( AIParserPaintField paintField, AILiveEffectHandle liveEffectHandle, - AILiveEffectParameters params ); - - // Transparency-specific calls - AIAPI AIErr (*GetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); - AIAPI AIErr (*SetBlendDictionary) ( AIParserBlendField blendField, AIDictionaryRef blendDict ); - -} AI90ArtStyleParserSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Context.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Context.h deleted file mode 100644 index 224c697..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Context.h +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef __AI90Context__ -#define __AI90Context__ - -/* - * Name: AI90Context.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 6.0-9.0 Runtime Context Environment. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AIContext__ -#include "AIContext.h" -#endif - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90AppContextSuite "AI Context Suite" -#define kAIAppContextSuiteVersion2 AIAPI_VERSION(2) -#define kAI90AppContextVersion kAIAppContextSuiteVersion2 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*GetPlatformAppWindow) ( AIWindowRef *appWindow ); - - AIAPI AIErr (*PushAppContext) ( SPPluginRef plugin, AIAppContextHandle *appContext ); - AIAPI AIErr (*PopAppContext) ( AIAppContextHandle appContext ); - - AIAPI AIErr (*MacGetAppQDGlobal) ( void **appQD ); - -} AI90AppContextSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90DataFilter.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90DataFilter.h deleted file mode 100644 index b33c9f0..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90DataFilter.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef __AI90DataFilter__ -#define __AI90DataFilter__ - -/* - * Name: AI90DataFilter.h - * $Revision: 6 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 9.0 Data Filter Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIDataFilter.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90DataFilterSuite "AI Data Filter Suite" -#define kAIDataFilterSuiteVersion3 AIAPI_VERSION(3) -#define kAI90DataFilterVersion kAIDataFilterSuiteVersion3 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/* Illustrator 9.0 Data Filter Suite */ -typedef struct _AI90DataFilterSuite { - - AIAPI AIErr (*LinkDataFilter) ( AIDataFilter *prev, AIDataFilter *next ); - AIAPI AIErr (*UnlinkDataFilter) ( AIDataFilter *next, AIDataFilter **prev ); - AIAPI AIErr (*ReadDataFilter) ( AIDataFilter *filter, char *store, long *count ); - AIAPI AIErr (*WriteDataFilter) ( AIDataFilter *filter, char *store, long *count ); - AIAPI AIErr (*SeekDataFilter) ( AIDataFilter *filter, long *count ); - AIAPI AIErr (*MarkDataFilter) ( AIDataFilter *filter, long *count ); - AIAPI AIErr (*NewBufferDataFilter) ( long size, AIDataFilter **filter ); - AIAPI AIErr (*NewHexdecDataFilter) ( char *state, long shift, AIDataFilter **filter ); - AIAPI AIErr (*NewBlockDataFilter) ( void *address, long size, AIDataFilter **filter ); - - // creates a random access data filter that reads and writes to Illustrator's - // VM. this can be used to create a temporary file that is paged to and from - // memory as needed. if initialsize is given then the initial VM stream is - // created with that size causing the end of the stream to be set to that size. - AIAPI AIErr (*NewVMDataFilter) ( long initialsize, AIDataFilter **filter ); - - // creates an ASCII85 encode/decode data filter. statestr indicates - // whether the filter is encoding or decoding according to whether - // it is "write" or "read". - AIAPI AIErr (*NewA85DataFilter) ( char *statestr, char* prefix, AIDataFilter **filter ); - - // creates a ZLib compression/decompression data filter. statestr indicates - // whether the filter is compressing or decompressing according to whether - // it is "write" or "read". - AIAPI AIErr (*NewZDataFilter) ( char *statestr, AIDataFilter **filter ); - -} AI90DataFilterSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Document.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Document.h deleted file mode 100644 index e65bb51..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Document.h +++ /dev/null @@ -1,127 +0,0 @@ -#ifndef __AI90Document__ -#define __AI90Document__ - -/* - * Name: AI90Document.h - * $Revision: 25 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 9.0 Document Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AI120Document.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90DocumentSuite kAIDocumentSuite -#define kAIDocumentSuiteVersion6 AIAPI_VERSION(6) -#define kAI90DocumentSuiteVersion kAIDocumentSuiteVersion6 - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -typedef struct { - - AIAPI AIErr (*GetDocumentPageOrigin) ( AIRealPoint *origin ); - AIAPI AIErr (*SetDocumentPageOrigin) ( AIRealPoint *origin ); - AIAPI AIErr (*SetDocumentRulerOrigin) ( AIRealPoint *origin ); - AIAPI AIErr (*GetDocumentRulerUnits) ( short *units ); - AIAPI AIErr (*SetDocumentRulerUnits) ( short units ); - AIAPI AIErr (*GetDocumentCropBoxGroupHandle) ( AIArtHandle *cropHandle ); - AIAPI AIErr (*GetDocumentCropBox) ( AIRealRect *cropBox ); - AIAPI AIErr (*SetDocumentCropBox) ( AIRealRect *cropBox ); - AIAPI AIErr (*GetDocumentCropStyle) ( AICropMarkStyle *cropStyle ); - AIAPI AIErr (*SetDocumentCropStyle) ( AICropMarkStyle cropStyle ); - AIAPI AIErr (*GetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord *print ); - AIAPI AIErr (*SetDocumentPrintRecord) ( AIDocumentPlatformPrintRecord print ); - AIAPI AIErr (*GetDocumentSetup) ( AI120DocumentSetup *setup ); - AIAPI AIErr (*SetDocumentSetup) ( AI120DocumentSetup *setup ); - AIAPI AIErr (*GetDocumentModified) ( AIBoolean *modified ); - AIAPI AIErr (*SetDocumentModified) ( AIBoolean modified ); - AIAPI AIErr (*GetDocumentFileFormat) ( AIFileFormatHandle *fileFormat ); - AIAPI AIErr (*SetDocumentFileFormat) ( AIFileFormatHandle fileFormat ); - AIAPI AIErr (*GetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters *parameters ); - AIAPI AIErr (*SetDocumentFileFormatParameters) ( AIDocumentFileFormatParameters parameters ); - - AIAPI AIErr (*RedrawDocument) ( void ); - - AIAPI AIErr (*GetDocument) ( AIDocumentHandle *document ); - - - AIAPI AIErr (*GetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - AIAPI AIErr (*SetDocumentMiPrintRecord) ( AIDocumentMiPrintRecordPtr print ); - - AIAPI AIErr (*GetDocumentRulerOrigin) ( AIRealPoint *origin ); - - AIAPI AIErr (*UpdateLinks) ( AIBoolean *updatedSomething ); - - AIAPI AIErr (*GetDocumentZoomLimit) ( AIReal *min, AIReal *max ); - AIAPI AIErr (*GetDocumentMaxArtboardBounds)( AIRealRect *bounds ); - AIAPI AIErr (*DocumentExists) ( AIDocumentHandle document, AIBoolean *exists ); - - /* Returns the recorded dictionary associated with the document. Note that dictionaries - are reference counted. You must call sAIDictionary->Release() when you're - done with it. */ - AIAPI AIErr (*GetDictionary) ( struct _AIDictionary** dictionary ); - AIAPI AIErr (*GetDocumentColorModel) ( short *colorModel); - AIAPI AIErr (*SetDocumentColorModel) ( short colorModel); - AIAPI AIErr (*GetDocumentProfiles) ( AIColorProfile *rgbProfile, AIColorProfile *cmykProfile, AIColorProfile *grayProfile ); - AIAPI AIErr (*SetDocumentProfiles) ( AIColorProfile rgbProfile, AIColorProfile cmykProfile, AIColorProfile grayProfile ); - AIAPI AIErr (*Copy) (); - AIAPI AIErr (*Cut) (); - AIAPI AIErr (*Paste) (); - - AIAPI AIErr (*SyncDocument) ( void ); - - AIAPI AIErr (*GetDocumentTargeting) ( short *paintTarget, short *transparencyTarget, short *effectsTarget ); - AIAPI AIErr (*SetDocumentTargeting) ( short paintTarget, short transparencyTarget, short effectsTarget ); - - /* Returns the dictionary associated with the document for which changes to the - dictionary and its contents will not be recorded for undo/redo purposes. You - must call sAIDictionary->Release() when you're done with it.*/ - AIAPI AIErr (*GetNonRecordedDictionary) ( struct _AIDictionary** dictionary ); - - // Returns AI version of the current document. If unknown, or not an AI file, returns 0. - // Version 2 is Illustrator 88. - AIAPI int (*GetAIVersion) (); - - AIAPI AIErr (*DocumentHasTransparency) ( AIBoolean *hasTransparency, AIBoolean detectOverprint ); - AIAPI AIErr (*DocumentHasSpotColorArt) ( AIBoolean *hasSpotColorArt ); - -} AI90DocumentSuite; - - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Geometry.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Geometry.h deleted file mode 100644 index 288420f..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Geometry.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef __AI90Geometry__ -#define __AI90Geometry__ - -/* - * Name: AI90Geometry.h - * Purpose: Adobe Illustrator 9.0 Geometry Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIGeometry.h" - - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90GeometrySuite kAIGeometrySuite -#define kAIGeometryVersion2 AIAPI_VERSION(2) -#define kAI90GeometrySuiteVersion kAIGeometryVersion2 - - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -typedef struct { - - AIGeometryBeginProc beginPath; - AIGeometryEndProc endPath; - AIGeometryBeginProc beginGroup; - AIGeometryEndProc endGroup; - AIGeometryBeginProc beginCompoundPath; - AIGeometryEndProc endCompoundPath; - AIGeometryBeginProc beginPlacedImage; - AIGeometryEndProc endPlacedImage; - AIGeometryBeginProc beginRaster; - AIGeometryEndProc endRaster; - AIGeometryBeginProc beginText; - AIGeometryEndProc endText; - AIGeometryBeginProc beginTextPath; - AIGeometryEndProc endTextPath; - AIGeometryBeginProc beginTextLine; - AIGeometryEndProc endTextLine; - AIGeometryBeginProc beginClipGroup; - AIGeometryEndProc endClipGroup; - AIGeometryBeginProc beginMask; - AIGeometryEndProc endMask; - AIGeometryBeginProc beginMesh; - AIGeometryEndProc endMesh; - -} AI90GeometryOrganizationProcs; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - ASAPI AIErr (*GeometryIterate) ( AIArtHandle art, - AI90GeometryOrganizationProcs *organizationProcs, - AIGeometryConstructionProcs *constructionProcs, - AIGeometryPaintingProcs *paintingProcs, - AIGeometryStateProcs *stateProcs, - AIGeometryUserData userData ); - -} AI90GeometrySuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mask.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mask.h deleted file mode 100644 index bee93ef..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mask.h +++ /dev/null @@ -1,185 +0,0 @@ -#ifndef __AI90Mask__ -#define __AI90Mask__ - -/* - * Name: AI90Mask.h - * $Revision: 2 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 9.0 Mask Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIMask.h" - - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Suite name and version - ** - **/ - -#define kAI90BlendStyleSuite "AI Blend Style Suite" -#define kAIBlendStyleSuiteVersion1 AIAPI_VERSION(1) -#define kAI90BlendStyleVersion kAIBlendStyleSuiteVersion1 - -#define kAI90MaskSuite "AI Mask Suite" -#define kAIMaskSuiteVersion1 AIAPI_VERSION(2) -#define kAI90MaskVersion kAIMaskSuiteVersion1 - - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/* The blend style suite allows manipulation of the compositing attributes - of object styles. */ -typedef struct { - - /* The following methods are a short hand for getting the object's style - and then modifying the opacity applied by the style to the object as - a whole. */ - AIAPI AIBlendingMode (*GetBlendingMode) (AIArtHandle art); - AIAPI AIErr (*SetBlendingMode) (AIArtHandle art, AIBlendingMode mode); - - AIAPI AIReal (*GetOpacity) (AIArtHandle art); - AIAPI AIErr (*SetOpacity) (AIArtHandle art, AIReal opacity); - - AIAPI AIBoolean (*GetIsolated) (AIArtHandle art); - AIAPI AIErr (*SetIsolated) (AIArtHandle art, AIBoolean isolated); - - AIAPI AIKnockout (*GetKnockout) (AIArtHandle art); - AIAPI AIKnockout (*GetInheritedKnockout) (AIArtHandle art); // always explicitly on or off. - AIAPI AIErr (*SetKnockout) (AIArtHandle art, AIKnockout knockout); - - AIAPI AIBoolean (*GetAlphaIsShape) (AIArtHandle art); - AIAPI AIErr (*SetAlphaIsShape) (AIArtHandle art, AIBoolean alphaIsShape); - - /* Copy the compositing attributes applied globally by the style applied - to the source object to the destination object.*/ - AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination); - - /* Manipulate the attributes applied to the object via a dictionary. See - the definitions above for the names of the appropriate keys. These - methods are a short hand for first getting the object's style and - then using the Get/SetStyleAttrs methods. */ - AIAPI AIErr (*GetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs); - AIAPI AIErr (*SetArtAttrs) (AIArtHandle art, AIDictionaryRef attrs); - - /* Manipulate the attributes applied by the style via a dictionary. See - the definitions above for the names of the appropriate keys. */ - AIAPI AIErr (*GetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs); - AIAPI AIErr (*SetStyleAttrs) (AIArtStyleHandle style, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle); - - /* Manipulate the attributes applied by a specific filter element of an - active style via a dictionary. See the definitions above for the names - of the appropriate keys. * / - AIAPI AIErr (*GetFilterAttrs) (AIStyleFilterExecHandle filter, AIDictionaryRef style); - AIAPI AIErr (*SetFilterAttrs) (AIStyleFilterExecHandle filter, AIDictionaryRef attrs);*/ - - /* Get and set the transparency attributes for the current selection in the document */ - AIAPI AIErr (*GetCurrentTransparency) (AIDictionaryRef styleAttrs, - AIDictionaryRef fillAttrs, - AIDictionaryRef strokeAttrs); - AIAPI AIErr (*SetCurrentTransparency) (AIDictionaryRef styleAttrs, - AIDictionaryRef fillAttrs, - AIDictionaryRef strokeAttrs); - - AIAPI AIErr (*GetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs); - AIAPI AIErr (*GetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs); - AIAPI AIErr (*SetFocalFillAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle); - AIAPI AIErr (*SetFocalStrokeAttrs) (AIArtStyleHandle artStyle, AIDictionaryRef attrs, - AIArtStyleHandle* newStyle ); - -} AI90BlendStyleSuite; - - -typedef struct { - - /* Masks are reference counted. Call Release once you are done with - a mask to free its memory. */ - AIAPI ASInt32 (*AddRef) (AIMaskRef mask); - AIAPI ASInt32 (*Release) (AIMaskRef mask); - - /* GetMask obtains the mask associated with an object if any. */ - AIAPI AIErr (*GetMask) (AIArtHandle object, AIMaskRef* mask); - - /* Create a mask for an object if it doesn't already have one. The - art of the newly created mask is an empty group object. */ - AIAPI AIErr (*CreateMask) (AIArtHandle object); - - /* Delete the mask associated with an object. */ - AIAPI AIErr (*DeleteMask) (AIArtHandle object); - - /* The link state controls whether the mask is linked to the object. - When the mask is linked certain actions on the object automatically - apply to the mask. For example, rotating the object will also - rotate the mask. */ - AIAPI AIBoolean (*GetLinked) (AIMaskRef mask); - AIAPI AIErr (*SetLinked) (AIMaskRef mask, AIBoolean linked); - - /* The disabled state controls whether the mask is ignored for rendering - purposes. */ - AIAPI AIBoolean (*GetDisabled) (AIMaskRef mask); - AIAPI AIErr (*SetDisabled) (AIMaskRef mask, AIBoolean disabled); - - /* The inverted state controls whether the opacity of the mask is - inverted before being applied. */ - AIAPI AIBoolean (*GetInverted) (AIMaskRef mask); - AIAPI AIErr (*SetInverted) (AIMaskRef mask, AIBoolean inverted); - - /* Copy the mask and the link status. */ - AIAPI AIErr (*Copy) (const AIArtHandle source, AIArtHandle destination); - - /* GetArt returns the handle to the mask art which will be NULL if there - is none. */ - AIAPI AIArtHandle (*GetArt) (AIMaskRef mask); - - /* Methods to query and manipulate whether the mask art is being edited. */ - AIAPI AIBoolean (*IsEditingArt) (AIMaskRef mask); - AIAPI AIErr (*SetEditingArt) (AIMaskRef mask, AIBoolean isedit); - - /* If "mask" is a group object which is the mask art for some other object - then on return "masked" will be the masked object. If not then - "masked" will be nil on return. */ - AIAPI AIErr (*GetMaskedArt) (AIArtHandle mask, AIArtHandle* masked); - -} AI90MaskSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90MatchingArt.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90MatchingArt.h deleted file mode 100644 index 5a9f7f7..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90MatchingArt.h +++ /dev/null @@ -1,71 +0,0 @@ -#ifndef __AI90MatchingArt__ -#define __AI90MatchingArt__ - -/* - * Name: AI90MatchingArt.h - * $Revision: 4 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 9.0 Matching Art Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIMatchingArt.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90MatchingArtSuite kAIMatchingArtSuite -#define kAIMatchingArtSuiteVersion3 AIAPI_VERSION(3) -#define kAI90MatchingArtVersion kAIMatchingArtSuiteVersion3 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - /* Get the art matching the given criteria and on the current layer list. */ - AIAPI AIErr (*GetSelectedArt) ( AIArtHandle ***matches, long *numMatches ); - AIAPI AIErr (*GetMatchingArt) ( AIMatchingArtSpec *specs, short numSpecs, - AIArtHandle ***matches, long *numMatches ); - - //new to Illustrator 9.0 - /* Get the art matching the given criteria and on the given layer list. */ - AIAPI AIErr (*GetSelectedArtFromLayerList) ( AILayerList list, AIArtHandle ***matches, - long *numMatches ); - AIAPI AIErr (*GetMatchingArtFromLayerList) ( AILayerList list, AIMatchingArtSpec *specs, - short numSpecs, AIArtHandle ***matches, long *numMatches ); - -} AI90MatchingArtSuite; - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Menu.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Menu.h deleted file mode 100644 index 036f6cd..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Menu.h +++ /dev/null @@ -1,207 +0,0 @@ -#ifndef __AI90Menu__ -#define __AI90Menu__ - -/* - * Name: AI90Menu.h - * $Revision: 10 $ - * Author: - * Date: - * Purpose: Adobe Illustrator Menu Suites from before AI 10 - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#ifndef __AITypes__ -#include "AITypes.h" -#endif - -#ifndef __AIPlugin__ -#include "AIPlugin.h" -#endif - -#ifndef __ASHelp__ -#include "ASHelp.h" -#endif - -#ifndef __AIMenu__ -#include "AIMenu.h" -#endif - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90MenuSuite "AI Menu Suite" -#define kAIMenuVersion5 AIAPI_VERSION(5) // For AI7 -#define kAIMenuVersion6 AIAPI_VERSION(6) // For AI9 - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -// version 5 -typedef struct { - - AIAPI AIErr (*AddMenuItem) ( SPPluginRef self, const char *name, - AIPlatformAddMenuItemData *data, AIMenuItemOption options, - AIMenuItemHandle *menuItem ); - - AIAPI AIErr (*GetMenuItemName) ( AIMenuItemHandle menuItem, const char** name ); - AIAPI AIErr (*GetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption *options ); - AIAPI AIErr (*SetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption options ); - AIAPI AIErr (*GetMenuItemPlugin) ( AIMenuItemHandle menuItem, - SPPluginRef *plugin ); - - AIAPI AIErr (*CountMenuItems) ( long *count ); - AIAPI AIErr (*GetNthMenuItem) ( long n, AIMenuItemHandle *menuItem ); - - AIAPI AIErr (*GetPlatformMenuItem) ( AIMenuItemHandle menuItem, - AIPlatformMenuItem *platformMenuItem ); - - AIAPI AIErr (*UpdateMenuItemAutomatically) ( AIMenuItemHandle menuItem, - long action, - long ifObjectIsInArtwork, long ifObjectIsNotInArtwork, - long ifObjectIsSelected, long ifObjectIsNotSelected, - long ifIsTrue, long ifIsNotTrue ); - AIAPI AIErr (*GetUpdateFlags)( long *inArtwork, long *isSelected, long *isTrue ); - /*-------------------------------------------------------------------------------------------*/ - - AIAPI AIErr (*EnableItem) ( AIMenuItemHandle menuItem); - AIAPI AIErr (*DisableItem) ( AIMenuItemHandle menuItem); - AIAPI AIErr (*GetItemText) ( AIMenuItemHandle menuItem, char* itemCString ); // Get menuItem text. Different from GetMenuItemName() where the itemName doesn't got localized. - // where the length of itemCString is 256. - - AIAPI AIErr (*SetItemText) ( AIMenuItemHandle menuItem, const char* itemCString ); // Set menuItem text. - AIAPI AIErr (*CheckItem) ( AIMenuItemHandle menuItem, AIBoolean bCheckIt ); - - /* NOTE: SetItemIcon: On MSWindows: MAKEINTRESOURCE(iconSelector + 256) is the - the bitmap resource ID for the menuItem. - NOTE (2): SetItemIcon() will pass in the hInstance for the bitmap. - */ - AIAPI AIErr (*SetItemIcon) ( AIMenuItemHandle menuItem, short iconSelector ); - - AIAPI AIErr (*GetItemMenuGroup) ( AIMenuItemHandle menuItem, AIMenuGroup *group ); - AIAPI AIErr (*AddMenuGroup) ( const char *name, AIMenuGroupOption options, const char *nearGroup, - AIMenuGroup *group ); - AIAPI AIErr (*AddMenuGroupAsSubMenu) ( const char *name, AIMenuGroupOption options, AIMenuItemHandle menuItem, AIMenuGroup *group); - AIAPI AIErr (*GetMenuGroupName) ( AIMenuGroup group, const char **name ); - AIAPI AIErr (*GetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption *options ); - AIAPI AIErr (*SetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption options ); - AIAPI AIErr (*GetMenuGroupRange) ( AIMenuGroup group, AIPlatformMenuHandle *theMenu, - short *firstItem, short *numItems ); - AIAPI AIErr (*CountMenuGroups) ( long *count ); - AIAPI AIErr (*GetNthMenuGroup) ( long n, AIMenuGroup *group ); - - AIAPI AIErr (*GetItemCmd) ( AIMenuItemHandle menuItem, short *cmdChar, short *modifiers ); - AIAPI AIErr (*SetItemCmd) ( AIMenuItemHandle menuItem, char cmdChar, short modifiers ); - - // Currently supports function keys 1-15 (note: 1-based) - AIAPI AIErr (*GetItemFunctionKey) ( AIMenuItemHandle menuItem, short *fkey, short *modifiers ); - AIAPI AIErr (*SetItemFunctionKey) ( AIMenuItemHandle menuItem, short fkey, short modifiers ); - - AIAPI AIErr (*GetItemHelpID) ( AIMenuItemHandle menuItem, ASHelpID *helpID ); - AIAPI AIErr (*SetItemHelpID) ( AIMenuItemHandle menuItem, ASHelpID helpID ); - -} AIMenuSuite5; - - -// version 6 -typedef struct { - - AIAPI AIErr (*AddMenuItem) ( SPPluginRef self, const char *name, - AIPlatformAddMenuItemData *data, AIMenuItemOption options, - AIMenuItemHandle *menuItem ); - - AIAPI AIErr (*GetMenuItemName) ( AIMenuItemHandle menuItem, const char **name ); - AIAPI AIErr (*GetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption *options ); - AIAPI AIErr (*SetMenuItemOptions) ( AIMenuItemHandle menuItem, AIMenuItemOption options ); - AIAPI AIErr (*GetMenuItemPlugin) ( AIMenuItemHandle menuItem, - SPPluginRef *plugin ); - - AIAPI AIErr (*CountMenuItems) ( long *count ); - AIAPI AIErr (*GetNthMenuItem) ( long n, AIMenuItemHandle *menuItem ); - - AIAPI AIErr (*GetPlatformMenuItem) ( AIMenuItemHandle menuItem, - AIPlatformMenuItem *platformMenuItem ); - - AIAPI AIErr (*UpdateMenuItemAutomatically) ( AIMenuItemHandle menuItem, - long action, - long ifObjectIsInArtwork, long ifObjectIsNotInArtwork, - long ifObjectIsSelected, long ifObjectIsNotSelected, - long ifIsTrue, long ifIsNotTrue ); - AIAPI AIErr (*GetUpdateFlags)( long *inArtwork, long *isSelected, long *isTrue ); - /*-------------------------------------------------------------------------------------------*/ - - AIAPI AIErr (*EnableItem) ( AIMenuItemHandle menuItem); - AIAPI AIErr (*DisableItem) ( AIMenuItemHandle menuItem); - AIAPI AIErr (*GetItemText) ( AIMenuItemHandle menuItem, char* itemCString ); // Get menuItem text. Different from GetMenuItemName() where the itemName doesn't got localized. - // where the length of itemCString is 256. - - AIAPI AIErr (*SetItemText) ( AIMenuItemHandle menuItem, const char* itemCString ); // Set menuItem text. - AIAPI AIErr (*CheckItem) ( AIMenuItemHandle menuItem, AIBoolean bCheckIt ); - - /* NOTE: SetItemIcon: On MSWindows: MAKEINTRESOURCE(iconSelector + 256) is the - the bitmap resource ID for the menuItem. - NOTE (2): SetItemIcon() will pass in the hInstance for the bitmap. - */ - AIAPI AIErr (*SetItemIcon) ( AIMenuItemHandle menuItem, short iconSelector ); - - AIAPI AIErr (*GetItemMenuGroup) ( AIMenuItemHandle menuItem, AIMenuGroup *group ); - AIAPI AIErr (*AddMenuGroup) ( const char *name, AIMenuGroupOption options, const char *nearGroup, - AIMenuGroup *group ); - AIAPI AIErr (*AddMenuGroupAsSubMenu) ( const char *name, AIMenuGroupOption options, AIMenuItemHandle menuItem, AIMenuGroup *group); - AIAPI AIErr (*GetMenuGroupName) ( AIMenuGroup group, const char **name ); - AIAPI AIErr (*GetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption *options ); - AIAPI AIErr (*SetMenuGroupOptions) ( AIMenuGroup group, AIMenuGroupOption options ); - AIAPI AIErr (*GetMenuGroupRange) ( AIMenuGroup group, AIPlatformMenuHandle *theMenu, - short *firstItem, short *numItems ); - AIAPI AIErr (*CountMenuGroups) ( long *count ); - AIAPI AIErr (*GetNthMenuGroup) ( long n, AIMenuGroup *group ); - - AIAPI AIErr (*GetItemCmd) ( AIMenuItemHandle menuItem, short *cmdChar, short *modifiers ); - AIAPI AIErr (*SetItemCmd) ( AIMenuItemHandle menuItem, char cmdChar, short modifiers ); - - // Currently supports function keys 1-15 (note: 1-based) - AIAPI AIErr (*GetItemFunctionKey) ( AIMenuItemHandle menuItem, short *fkey, short *modifiers ); - AIAPI AIErr (*SetItemFunctionKey) ( AIMenuItemHandle menuItem, short fkey, short modifiers ); - - AIAPI AIErr (*GetItemHelpID) ( AIMenuItemHandle menuItem, ASHelpID *helpID ); - AIAPI AIErr (*SetItemHelpID) ( AIMenuItemHandle menuItem, ASHelpID helpID ); - - // new for version 6 - - AIAPI AIErr (*IsItemEnabled) ( AIMenuItemHandle menuItem, ASBoolean *bEnabled); - AIAPI AIErr (*IsItemChecked) ( AIMenuItemHandle menuItem, AIBoolean *bCheckIt ); - -} AIMenuSuite6; - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mesh.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mesh.h deleted file mode 100644 index c273305..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Mesh.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef __AI90Mesh__ -#define __AI90Mesh__ - -/* - * Name: AI90Mesh.h - * $Revision: 26 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 9.0 Mesh Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIMesh.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90MeshSuite kAIMeshSuite -#define kAIMeshSuiteVersion2 AIAPI_VERSION(2) -#define kAI90MeshSuiteVersion kAIMeshSuiteVersion2 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -typedef struct { - - AIAPI AIErr (*InitCartesian) (AIArtHandle mesh, long i, long j); - AIAPI AIErr (*InitPolar) (AIArtHandle mesh, long i, long j); - AIAPI AIErr (*GetKind) (AIArtHandle mesh, long *kind); - AIAPI AIErr (*GetSize) (AIArtHandle mesh, long *i, long *j); - - AIAPI AIErr (*NewSelection) (AIArtHandle mesh, AIBoolean all, AIMeshSelection* selection); - AIAPI AIErr (*GetSelection) (AIArtHandle mesh, AIMeshSelection* selection); - - AIAPI AIErr (*GetPatch) (AIArtHandle mesh, long i, long j, AIMeshPatchIterator* patch); - AIAPI AIErr (*GetStartPatch) (AIArtHandle mesh, AIMeshPatchIterator* patch); - - AIAPI AIErr (*GetNode) (AIArtHandle mesh, long i, long j, AIMeshVertexIterator* vertex); - AIAPI AIErr (*GetStartVertex) (AIArtHandle mesh, AIMeshVertexIterator* vertex); - - AIAPI AIErr (*GetStartSegment) (AIArtHandle mesh, AIMeshSegmentIterator* segment); - - AIAPI void (*GetColorSpace) (AIArtHandle mesh, AIColorTag* kind, AICustomColorHandle* custom); - AIAPI AIBoolean (*InvertPoint) (AIArtHandle mesh, AIRealPoint* point, AIReal* u, AIReal* v); - AIAPI void (*EvalPoint) (AIArtHandle mesh, AIReal u, AIReal v, AIRealPoint* point); - AIAPI void (*EvalColor) (AIArtHandle mesh, AIReal u, AIReal v, AIColor* color); - - AIAPI AIErr (*Transform) (AIArtHandle mesh, AIRealMatrix* matrix); - AIAPI AIErr (*MapPoints) (AIArtHandle mesh, AIMeshPointMap f, void* userData); - AIAPI AIErr (*MapColors) (AIArtHandle mesh, AIMeshColorMap f, void* userData); - AIAPI void (*QueryColors) (AIArtHandle mesh, AIMeshColorQuery f, void* userData); - - AIAPI AIErr (*InsertU) (AIArtHandle mesh, AIReal u, long* i); - AIAPI AIErr (*InsertV) (AIArtHandle mesh, AIReal v, long* j); - AIAPI AIErr (*DeleteGridLines) (AIArtHandle mesh, AIReal u, AIReal v); - - AIAPI void (*TrackBegin) (AIArtHandle mesh); - AIAPI void (*TrackEnd) (AIArtHandle mesh); - - AIAPI AIErr (*EndSelectionChanges) (void); - - AIAPI AIErr (*DropColor) (AIHitRef hit, const AIColor* color); - -} AI90MeshSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Pathfinder.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Pathfinder.h deleted file mode 100644 index c939ae9..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Pathfinder.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Name: AI90Pathfinder.h - * Purpose: Adobe Illustrator 9.0 Pathfinder Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#ifndef __AI90Pathfinder__ -#define __AI90Pathfinder__ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPathfinder.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90PathfinderSuite kAIPathfinderSuite -#define kAIPathfinderSuiteVersion3 AIAPI_VERSION(3) -#define kAI90PathfinderSuiteVersion kAIPathfinderSuiteVersion3 -#define kAI90PathfinderVersion kAI90PathfinderSuiteVersion - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*DoUniteEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoIntersectEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoExcludeEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoBackMinusFrontEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoFrontMinusBackEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoDivideEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoOutlineEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoTrimEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoMergeEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoCropEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoHardEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoSoftEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*DoTrapEffect) ( AIPathfinderData *data, AIFilterMessage *message ); - - AIAPI AIErr (*GetHardEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*GetSoftEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*GetTrapEffectParameters) ( AIPathfinderData *data, AIFilterMessage *message ); - AIAPI AIErr (*GetGlobalOptions) ( AIPathfinderData *data, AIFilterMessage *message ); - -} AI90PathfinderSuite; - - -#include "AIHeaderEnd.h" - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Placed.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Placed.h deleted file mode 100644 index 7fb233d..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Placed.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef __AI90Placed__ -#define __AI90Placed__ - -/* - * Name: AI90Placed.h - * $Revision: 24 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 9.0 Placed Object Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AI110Placed.h" - -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90PlacedSuite "AI Placed Suite" -#define kAIPlacedSuiteVersion4 AIAPI_VERSION(4) -#define kAI90PlacedSuiteVersion kAIPlacedSuiteVersion4 -#define kAI90PlacedVersion kAI90PlacedSuiteVersion - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct AI90PlacedSuite { - - AIAPI AIErr (*GetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix ); - AIAPI AIErr (*SetPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *matrix ); - AIAPI AIErr (*GetPlacedBoundingBox) ( AIArtHandle placed, AIRealRect *bbox ); - AIAPI AIErr (*SetPlacedObject) ( AIArtHandle placed, AIArtHandle *group ); - AIAPI AIErr (*CountPlacedCustomColors) ( AIArtHandle art, long *count ); - AIAPI AIErr (*GetNthPlacedCustomColorName) ( AIArtHandle art, long num, char *name, int maxlen ); - AIAPI AIErr (*MakePlacedObjectNative) ( AIArtHandle placed, AIArtHandle *native ); - AIAPI AIErr (*GetPlacedType) ( AIArtHandle placed, short *pPlacedType ); - AIAPI AIErr (*GetPlacedChild) ( AIArtHandle placed, AIArtHandle *group ); - AIAPI AIErr (*ExecPlaceRequest)( AI110PlaceRequestData *pPlaceRequestData ); - AIAPI AIErr (*GetPlacedFilePathFromArt)( AIArtHandle placed, char *pszPath, int iMaxLen ); - AIAPI AIErr (*ConcatPlacedMatrix) ( AIArtHandle placed, AIRealMatrix *concat ); - -} AI90PlacedSuite; - - -#include "AIHeaderEnd.h" - - -#endif - diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90PluginGroup.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90PluginGroup.h deleted file mode 100644 index 75b85f3..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90PluginGroup.h +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef __AI90PluginGroup__ -#define __AI90PluginGroup__ - -/* - * Name: AI90PluginGroup.h - * Purpose: Adobe Illustrator 9.0 Plugin Group Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1995-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AIPluginGroup.h" - - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90PluginGroupSuite "AI Plugin Group Suite" -#define kAI90PluginGroupSuiteVersion AIAPI_VERSION(2) -#define kAI90PluginGroupVersion kAI90PluginGroupSuiteVersion - - - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*AddAIPluginGroup) ( SPPluginRef self, char *name, AIAddPluginGroupData *data, long options, AIPluginGroupHandle *entry ); - AIAPI AIErr (*UseAIPluginGroup) ( AIArtHandle art, AIPluginGroupHandle entry ); - - AIAPI AIErr (*GetAIPluginGroupName) ( AIPluginGroupHandle entry, char **name ); - AIAPI AIErr (*GetAIPluginGroupVersion) ( AIPluginGroupHandle entry, long *major, long *minor ); - AIAPI AIErr (*GetAIPluginGroupDescription) ( AIPluginGroupHandle entry, char **desc ); - AIAPI AIErr (*GetAIPluginGroupOptions) ( AIPluginGroupHandle entry, long *options ); - AIAPI AIErr (*GetAIPluginGroupPlugin) ( AIPluginGroupHandle entry, SPPluginRef *plugin ); - - AIAPI AIErr (*CountAIPluginGroups) ( long *count ); - AIAPI AIErr (*GetNthAIPluginGroup) ( long index, AIPluginGroupHandle *entry ); - - AIAPI AIErr (*GetPluginArtName) ( AIArtHandle art, char **name ); - AIAPI AIErr (*SetPluginArtName) ( AIArtHandle art, char *name ); - AIAPI AIErr (*GetPluginArtVersion) ( AIArtHandle art, long *major, long *minor ); - AIAPI AIErr (*SetPluginArtVersion) ( AIArtHandle art, long major, long minor ); - AIAPI AIErr (*GetPluginArtPluginGroup) ( AIArtHandle art, AIPluginGroupHandle *entry ); - AIAPI AIErr (*SetPluginArtPluginGroup) ( AIArtHandle art ); - AIAPI AIErr (*GetPluginArtEditArt) ( AIArtHandle art, AIArtHandle *editArt ); - AIAPI AIErr (*SetPluginArtEditArt) ( AIArtHandle art, AIArtHandle editArt ); - AIAPI AIErr (*GetPluginArtResultArt) ( AIArtHandle art, AIArtHandle *resultArt ); - AIAPI AIErr (*SetPluginArtResultArt) ( AIArtHandle art, AIArtHandle resultArt ); - - AIAPI AIErr (*GetPluginArtDataCount) ( AIArtHandle art, unsigned long *count ); - AIAPI AIErr (*SetPluginArtDataCount) ( AIArtHandle art, unsigned long count ); - AIAPI AIErr (*GetPluginArtDataRange) ( AIArtHandle art, void *data, unsigned long index, unsigned long count ); - AIAPI AIErr (*SetPluginArtDataRange) ( AIArtHandle art, void *data, unsigned long index, unsigned long count ); - - AIAPI AIErr (*MarkPluginArtDirty) ( AIArtHandle art ); // say that an AIUpdateArt notification is needed - AIAPI AIErr (*MarkPluginArtClean) ( AIArtHandle art ); // say that one isn't - -} AI90PluginGroupSuite; - -/* Note on MarkPluginArtDirty and MarkPluginArtClean: - - Ordinarily, AIPluginGroup takes care of detecting when a PluginGroup object needs - to have the resultArt rebuilt. (An AI Update message is sent once when the object - is first created, and thereafter whenever the group's data or any object in the - editGroup has been edited outside of the AI Update message handling itself.) - But occasionally the default rules are inadequate. - - Some objects may have external dependencies not detectable by the suite support, - such as referencing a pattern or other global object, an artwork attribute such - as the page size, etc. Such plugins will usually detect relevant changes via other - notifications, and for ease of implementation, may wish to trigger the update by - calling MarkPluginArtDirty. - - Conversely, it is often the case that in processing a menu command, tool action, - etc., a PluginGroup object will first modify the editArt contents and/or the - object's data, and then rebuild the resultArt. The modifications to the editArt - or data will mark the plugin object dirty, causing a redundant update if the - resultArt has already been synced. Calling MarkPluginArtClean will prevent this. -*/ - -#include "AIHeaderEnd.h" - -#endif - diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Tool.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Tool.h deleted file mode 100644 index 6dd3269..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AI90Tool.h +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Name: AI90Tool.h - * $Revision: #5 $ - * Author: - * Date: - * Purpose: Adobe Illustrator 9.0 Tool Suite. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ -#ifndef __AI90Tool__ -#define __AI90Tool__ - - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "AITool.h" - -#include "AIHeaderBegin.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAI90ToolSuite kAIToolSuite -#define kAIToolSuiteVersion8 AIAPI_VERSION(8) -#define kAI90ToolSuiteVersion kAIToolSuiteVersion8 - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - AIAPI AIErr (*AddTool) ( SPPluginRef self, char *name, - AIAddToolData *data, long options, - AIToolHandle *tool ); - - AIAPI AIErr (*GetToolName) ( AIToolHandle tool, char **name ); - AIAPI AIErr (*GetToolOptions) ( AIToolHandle tool, long *options ); - AIAPI AIErr (*SetToolOptions) ( AIToolHandle tool, long options ); - AIAPI AIErr (*GetToolPlugin) ( AIToolHandle tool, SPPluginRef *plugin ); - - AIAPI AIErr (*GetSelectedTool) ( AIToolHandle *tool ); - AIAPI AIErr (*SetSelectedTool) ( AIToolHandle tool ); - - AIAPI AIErr (*CountTools) ( long *count ); - AIAPI AIErr (*GetNthTool) ( long n, AIToolHandle *tool ); - - AIAPI AIErr (*GetToolHandleFromNumber) ( AIToolType toolNum, AIToolHandle *tool ); - AIAPI AIErr (*GetToolNumberFromName) ( char *name, AIToolType *toolNum ); - AIAPI AIErr (*GetToolNumberFromHandle) ( AIToolHandle tool, AIToolType *toolNum ); - AIAPI AIErr (*GetToolNameFromNumber) (AIToolType toolNum, char **name); // Caller must copy result immediately - - AIAPI AIErr (*GetToolTitle) ( AIToolHandle tool, char **title ); - AIAPI AIErr (*SetToolTitle) ( AIToolHandle tool, char *title ); - AIAPI AIErr (*GetToolIcon) ( AIToolHandle tool, ADMIconRef *icon ); - AIAPI AIErr (*SetToolIcon) ( AIToolHandle tool, ADMIconRef icon ); - AIAPI AIErr (*GetTooltip) ( AIToolHandle tool, char **tooltip ); - AIAPI AIErr (*SetTooltip) ( AIToolHandle tool, char *tooltip ); - AIAPI AIErr (*GetToolHelpID) ( AIToolHandle tool, ASHelpID *helpID ); - AIAPI AIErr (*SetToolHelpID) ( AIToolHandle tool, ASHelpID helpID ); - - AIAPI AIErr (*SetToolInfoVars) ( AIToolHandle tool, const long * infoVars ); - AIAPI AIErr (*SetToolInfoVarValues) ( const long *infoVars, void **values ); - - AIAPI AIErr (*SystemHasPressure) ( ASBoolean *hasPressure ); - -} AI90ToolSuite; - - -#include "AIHeaderEnd.h" - - -#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropArea.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropArea.h deleted file mode 100644 index 8eb5f05..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropArea.h +++ /dev/null @@ -1,183 +0,0 @@ -#ifndef _AI_CROP_AREA_H_ -#define _AI_CROP_AREA_H_ - -/* - * Name: AICropArea.h - * $Revision: 1 $ - * Author: Dimcho Balev - * Date: June, 2006 - * Purpose: Adobe Illustrator Crop Area Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2006-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -/******************************************************************************* -** -** Imports -** -**/ - -#include "ASTypes.h" -#include "AIPlugin.h" - -#include "AIHeaderBegin.h" - -#define kAICropAreaSuite "AI Crop Area Suite" -#define kAICropAreaSuiteVersion2 AIAPI_VERSION(2) - -/* Latest version */ -#define kAICropAreaSuiteVersion kAICropAreaSuiteVersion2 -#define kAICropAreaVersion kAICropAreaSuiteVersion - - -/** @file AICropArea.h */ - -/******************************************************************************* -** -** Constants -** -**/ -#define kAIMAX_CROPAREA_LIMIT 100 -#define kAIExceededMaxCropAreaLimitErr 'EMxL' -#define kAICantDeleteLastCropAreaErr 'CDLC' - -/** Properties of a crop area. See \c #kAICropAreaSuite */ -struct AICropArea -{ - /** The size of the crop area in points in document coordinate system */ - AIRealRect m_CropAreaRect; - /** Pixel aspect ratio, used in ruler visualization if the units are pixels */ - AIReal m_fPAR; - /** Show center mark */ - AIBoolean m_bShowCenter; - /** Show cross hairs */ - AIBoolean m_bShowCrossHairs; - /** Show title and action safe areas (for video) */ - AIBoolean m_bShowSafeAreas; - - AICropArea() - { - m_fPAR = 1.0f; - m_bShowCenter = false; - m_bShowCrossHairs = false; - m_bShowSafeAreas = false; - } -}; -/** This structure defines a crop area in a document. See \c #kAICropAreaSuite */ -typedef AICropArea *AICropAreaPtr; - -enum Source{ - kSetActive, - kUpdate, - kUndoRedo -}; - -typedef struct -{ - Source msgSrc; -} AIArtboardMessage; - -/******************************************************************************* - ** - ** Suite - ** - **/ - - -/** @ingroup Suites - This suite allows you to activate, access, and modify crop areas in Illustrator documents. - Illustrator maintains a list of crop areas in a document, and these functions allow - you to iterate through the list. The active crop area is the one returned by - \c #AIDocumentSuite::GetDocumentCropBox(), which is displayed with crop marks, - and which is used when saving or exporting to a file. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kAICropAreaSuite and \c #kAICropAreaSuiteVersion. -*/ - -typedef struct -{ - - /** Retrieves the index position of the active crop area in the document's list. - @note In some cases this function can mark the document as changed and in need of saving. - @param index [out] A buffer in which to return the 0-based index, or - -1 if there are no crop areas in the current document. - */ - AIAPI AIErr (* GetActive ) (ASInt32 *index); - - /** Makes a specific crop area active, and makes it current in the iteration order. - See \c #Next(), and \c #Previous(). - @param index The 0-based index position of the crop area in the document list. - */ - AIAPI AIErr (* SetActive ) (ASInt32 index); - - /** Retrieves the properties of a crop area Use with \c #GetCount() and \c #Update() - to modify crop areas without changing which crop area is active in the document. - @param index The 0-based index position of the crop area in the document list. - @param properties [out] A buffer in which to return the crop-area properties. - */ - AIAPI AIErr (* Get ) (ASInt32 index, AICropAreaPtr *properties); - - /** Finds the next crop area in the list after the currently active area, makes it - active, and retrieves its properties. - The list is circular; that is, the next one after the last crop area - is the first one in the list. - @param properties [out] A buffer in which to return the crop-area properties, or - \c NULL if there are no crop areas in the current document. - */ - AIAPI AIErr (* Next ) (AICropAreaPtr *properties); - - /** Finds the previous crop area in the list before the currently active area, makes it - active, and retrieves its properties. - The list is circular; that is, the previous one before the first crop area - is the last one in the list. - @param properties [out] A buffer in which to return the crop-area properties, or - \c NULL if there are no crop areas in the current document. - */ - AIAPI AIErr (* Previous ) (AICropAreaPtr *properties); - - /** Retrieves the number of crop areas defined in the current document. - @param count [out] A buffer in which to return the number of crop areas. - */ - AIAPI AIErr (* GetCount ) (ASInt32 *count); - - /** Deletes a crop area from the document list, makes the next one in the list active, - and retrieves the properties of the newly active area. - Last crop area can not be deleted, throws error kAICantDeleteLastCropAreaErr in such case. - @param index The 0-based index position of the crop area to delete. - @param properties [out] A buffer in which to return the crop-area properties of the - newly active area, or \c NULL if there are no remaining crop areas in the current document. - */ - AIAPI AIErr (* Delete ) (int index, AICropAreaPtr *properties); - - /** Not Implemented returns kNotImplementedErr*/ - AIAPI AIErr (* DeleteAll ) (); - - /** Adds new crop area to the document and returns its index position in the crop-area list. - Maximum limit MAX_CROPAREA_LIMIT,throws error kAIExceededMaxCropAreaLimitErr after this limit. - @param properties The new crop area. - @param index [out] A buffer in which to return the 0-based index position of the new crop area. - */ - AIAPI AIErr (* AddNew ) (AICropAreaPtr properties, ASInt32 *index); - - /** Updates the properties of a crop area. Use with \c #GetCount() and \c #Get() - to modify crop areas without changing which crop area is active in the document. - @param index The 0-based index position of the crop area in the document list. - @param properties The new crop-area definition. - */ - AIAPI AIErr (* Update ) (ASInt32 index, AICropAreaPtr properties); - -} AICropAreaSuite; - -#include "AIHeaderEnd.h" - -#endif // _AI_CROP_AREA_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropAreaRange.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropAreaRange.h deleted file mode 100644 index 4fea87a..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AICropAreaRange.h +++ /dev/null @@ -1,53 +0,0 @@ -/************************************************************************* -* -*ADOBE SYSTEMS INCORPORATED -* Copyright 2007 Adobe Systems Incorporated -* All Rights Reserved. -* -*NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the -*terms of the Adobe license agreement accompanying it. If you have received this file from a -*source other than Adobe, then your use, modification, or distribution of it requires the prior -*written permission of Adobe. -* -**************************************************************************/ - -#ifndef _AI_CROP_AREA_RANGE_H_ -#define _AI_CROP_AREA_RANGE_H_ - -/******************************************************************************* -** -** Imports -** -**/ -#include "ASTypes.h" -#include "AIPlugin.h" -#include "AIArtboardRange.h" - -#include "AIHeaderBegin.h" - -#define kAICropAreaRangeSuite "AI Crop Area Range Suite" -#define kAICropAreaRangeSuiteVersion1 AIAPI_VERSION(1) - -/* Latest version */ -#define kAICropAreaRangeSuiteVersion kAICropAreaRangeSuiteVersion1 -#define kAICropAreaRangeVersion kAICropAreaRangeSuiteVersion - - -/** @file AICropAreaRange.h */ -/** @ingroup Suites -This legacy suite allows you to validate and iterate over a crop area range string for Illustrator documents. - -DEPRECATED: Don't use this suite in new code. Replacement is AIArtboardRangeSuite. - -\li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants -\c #kAICropAreaRangeSuite and \c #kAICropAreaRangeSuiteVersion. -*/ - -typedef AIArtboardRangeHandle AICropAreaRangeHandle; -typedef AIArtboardRangeIterator AICropAreaRangeIterator; - -typedef AIArtboardRangeSuite AICropAreaRangeSuite; - -#include "AIHeaderEnd.h" - -#endif // _AI_CROP_AREA_RANGE_H_ \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AS120UserInteraction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AS120UserInteraction.h deleted file mode 100644 index 86bc063..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/AS120UserInteraction.h +++ /dev/null @@ -1,78 +0,0 @@ -#ifndef __AS120UserInteraction__ -#define __AS120UserInteraction__ - -/* - * Name: AS120UserInteraction.h - * $Revision: 1 $ - * Author: Andy Bachorski - * Date: - * Purpose: Adobe Standard User Interaction Suite - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 2001-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "ASUserInteraction.h" -#include "AIHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kAS120UserInteractionSuite "AS User Interaction Suite" -#define kASUserInteractionSuiteVersion1 1 -#define kAS120UserInteractionSuiteVersion kASUserInteractionSuiteVersion1 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -typedef struct { - - // The allowable level of interaction for the application (server). - // This property is the maximum level of interaction allowed with regard - // to displaying modal dialogs & alerts. Value is persistent until - // explicitly changed. - // - // Will be exposed in application's scripting interface as a property of - // the application. Could be exposed in application preference dialog. - // - // Default value - kASInteractWithAll - // - ASAPI ASInteractionAllowed (*GetInteractionAllowed) ( void ); - ASAPI ASErr (*SetInteractionAllowed) ( ASInteractionAllowed allowed ); - - - // Check to see if it is allowable to interact with the user in the current - // application context. Value returned is determined by the settings of - // InteractionAllowed and by the current script execution context. - // - ASAPI ASBoolean (*InteractWithUser) ( void ); - -} AS120UserInteractionSuite; - - -#include "AIHeaderEnd.h" - -#endif // __AS120UserInteraction__ - diff --git a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/actions/AI11PDFFormatAction.h b/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/actions/AI11PDFFormatAction.h deleted file mode 100644 index e234f64..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/illustrator/legacy/actions/AI11PDFFormatAction.h +++ /dev/null @@ -1,261 +0,0 @@ -#ifndef _AIPDFFORMATACTION_H_ -#define _AIPDFFORMATACTION_H_ - -/* - * Name: AIPDFFormatAction.h - * $Revision: 1 $ - * Author: Hiromi M. Watanabe - * Date: 7/24/2002 - * Purpose: Adobe Illustrator 11.0 PDF Action Parameters. - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2007 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - - -// ----------------------------------------------------------------------------- -// Types. -// ----------------------------------------------------------------------------- - -// option set -typedef enum _AIPDFOptionSet -{ - kAIPDFOptionSetCustom = 0 - -} AIPDFOptionSet; - - -typedef enum _AIPDFFlattenStyle -{ - kAIPDFFlattenStyleCustom = 0 - -} AIPDFFlattenStyle; - - - -// compatibility -typedef enum _AIPDFCompatibility -{ - kAIPDFCompatibility13 = 0x0013, // Acrobat 4, PDF 1.3 - kAIPDFCompatibility14 = 0x0014, // Acrobat 5, PDF 1.4 - kAIPDFCompatibility15 = 0x0015 // Acrobat 6, PDF 1.5 - -} AIPDFCompatibility; - - -// color image compression -typedef enum _AIPDFImageCompression -{ - kAIPDFImageNoCompression = 0, - kAIPDFImageCompressionAutomaticJPEGMinimum, - kAIPDFImageCompressionAutomaticJPEGLow, - kAIPDFImageCompressionAutomaticJPEGMedium, - kAIPDFImageCompressionAutomaticJPEGHigh, - kAIPDFImageCompressionAutomaticJPEGMaximum, - kAIPDFImageCompressionJPEGMinimum, - kAIPDFImageCompressionJPEGLow, - kAIPDFImageCompressionJPEGMedium, - kAIPDFImageCompressionJPEGHigh, - kAIPDFImageCompressionJPEGMaximum, - kAIPDFImageCompressionAutomaticJPEG2000Minimum, - kAIPDFImageCompressionAutomaticJPEG2000Low, - kAIPDFImageCompressionAutomaticJPEG2000Medium, - kAIPDFImageCompressionAutomaticJPEG2000High, - kAIPDFImageCompressionAutomaticJPEG2000Maximum, - kAIPDFImageCompressionAutomaticJPEG2000Lossless, - kAIPDFImageCompressionJPEG2000Minimum, - kAIPDFImageCompressionJPEG2000Low, - kAIPDFImageCompressionJPEG2000Medium, - kAIPDFImageCompressionJPEG2000High, - kAIPDFImageCompressionJPEG2000Maximum, - kAIPDFImageCompressionJPEG2000Lossless, - kAIPDFImageCompressionZIP8bit, - kAIPDFImageCompressionZIP4bit - -} AIPDFImageCompression; - - - -// monochrome image compression -typedef enum _AIPDFMonochromeImageCompression -{ - kAIPDFMonochromeImageNoCompression = 0, - kAIPDFMonochromeImageCompressionCCITTG3, - kAIPDFMonochromeImageCompressionCCITTG4, - kAIPDFMonochromeImageCompressionZIP, - kAIPDFMonochromeImageCompressionRunLength - -} AIPDFMonochromeImageCompression; - - - -// downsampling kind -typedef enum _AIPDFDownsampling -{ - kAIPDFNoDownsampling = 1, - kAIPDFAverageDownsampling, - kAIPDFSubsampling, - kAIPDFBicubicsampling - -} AIPDFDownsampling; - - -typedef enum _AIPDFEncryptionLevel -{ - kAIPDF40bitEncryption = 1, - kAIPDF128bitEncryption - -} AIPDFEncryptionLevel; - -typedef enum _AIPDFOverprintOptions -{ - kAIPDFOPPreserve = 1, - kAIPDFOPDiscard - -} AIPDFOverprintOptions; - - -typedef enum _AIPDFPrinterType -{ - kAIPDFPrintMarksStandard = 1, - kAIPDFPrintMarksJapanese - -} AIPDFPrinterType; - -typedef enum _AIPDFPrinterMarkWeight -{ - kAIPDFPrintMarksWeight0125 = 1, - kAIPDFPrintMarksWeight025, - kAIPDFPrintMarksWeight05 - -} AIPDFPrinterMarkWeight; - - -typedef enum _AIPDFPrintingPermit -{ - kAIPDFPrint128NoneIndex = 1, - kAIPDFPrint128LowResIndex, - kAIPDFPrint128HighResIndex, - kAIPDFPrint40NoneIndex, - kAIPDFPrint40HighResIndex - -} AIPDFPrintingPermit; - -typedef enum _AIPDFChangesPermit -{ - kAIPDFChanges128NoneIndex = 1, - kAIPDFChanges128EditPageIndex, - kAIPDFChanges128FillFormIndex, - kAIPDFChanges128CommentIndex, - kAIPDFChanges128AnyIndex, - kAIPDFChanges40NoneIndex, - kAIPDFChanges40CommentIndex, - kAIPDFChanges40PageLayoutIndex, - kAIPDFChanges40AnyIndex - -} AIPDFChangesPermit; - - -// ----------------------------------------------------------------------------- -// Action: kAIExportDocumentAction -// Purpose: These are additional parameters for export to PDF -// Parameters: -// The following parameters are standard to the export action -// - kAIExportDocumentNameKey, string: the file name to export as. -// - kAIExportDocumentFormatKey, string: -// kAIPDFFileFormat to export PDF -// - kAIExportDocumentExtensionKey, string: -// kAIPDFFileFormatExtension -// file format and extensions for saving as an uncompressed SVG file. -#define kAIPDFFileFormat "PDF File Format" -#define kAIPDFFileFormatExtension "pdf" - - -const ActionParamKeyID kAIPDFPageIndexKey = 'page'; // integer, page index -const ActionParamKeyID kAIPDFCropToKey = 'crop'; // enum, AIPDFCropTo -const ActionParamKeyID kAIPDFPageCountKey = 'pgct'; // integer, page count - -const ActionParamKeyID kAIPDFOptionSetKey = 'optn'; // integer, option set index. -const ActionParamKeyID kAIPDFOptionSetNameKey = 'opnm'; // string, option set entry name - -const ActionParamKeyID kAIPDFCompatibilityKey = 'comp'; // enum AIPDFCompatibility, compatibility -const ActionParamKeyID kAIPDFRoundTripKey = 'rdtr'; // bool, include round trip information, aka PGF -const ActionParamKeyID kAIPDFGenerateThumbnailsKey = 'thum'; // bool, generate thumbnails -const ActionParamKeyID kAIPDFViewPDFFileKey = 'vpdf'; // bool, view PDF file after saving -const ActionParamKeyID kAIPDFFastWebViewKey = 'fwev'; // bool, optimize for fast web view - -const ActionParamKeyID kAIPDFColorImageCompressionKindKey = 'cknd'; // enum AIPDFImageCompression, color image compression kind -const ActionParamKeyID kAIPDFColorImageTileKey = 'ctil'; // int, color image tile size -const ActionParamKeyID kAIPDFColorImageResampleKindKey = 'crsl'; // enum, color image resample kind -const ActionParamKeyID kAIPDFColorImageResolutionKey = 'cres'; // int, color image resolution (dpi) -const ActionParamKeyID kAIPDFColorImageResampleAboveKey = 'crab'; // int, resample color image above resolution (dpi) - -const ActionParamKeyID kAIPDFGrayscaleImageCompressionKindKey = 'gknd'; // enum AIPDFImageCompression, gray scale image compression kind -const ActionParamKeyID kAIPDFGrayscaleImageTileKey = 'gtil'; // int, grayscale image tile size -const ActionParamKeyID kAIPDFGrayscaleImageResampleKindKey = 'grsl'; // enum, grayscale image resample -const ActionParamKeyID kAIPDFGrayscaleImageResolutionKey = 'gres'; // int, grayscale image resolution -const ActionParamKeyID kAIPDFGrayImageResampleAboveKey = 'grab'; // int, resample grayscale image above resolution (dpi) - -const ActionParamKeyID kAIPDFMonochromeImageCompressionKindKey = 'mknd'; // enum AIPDFMonochromeImageCompression, monochrome image kind -const ActionParamKeyID kAIPDFMonochromeImageResampleKindKey = 'mrsl'; // enum, monochrome image resample -const ActionParamKeyID kAIPDFMonochromeImageResolutionKey = 'mres'; // int, monochrome image resolution -const ActionParamKeyID kAIPDFMonochromeImageResampleAboveKey= 'mrab'; // int, resample monochrome image above resolution (dpi) - -const ActionParamKeyID kAIPDFCompressArtKey = 'cart'; // bool, compress art - -const ActionParamKeyID kAIPDFTrimMarksKey = 'ptrm'; // bool, Trim Marks -const ActionParamKeyID kAIPDFRegMarksKey = 'preg'; // bool, Registration Marks -const ActionParamKeyID kAIPDFColorBarsKey = 'pclb'; // bool, Color Bars -const ActionParamKeyID kAIPDFPageInfoKey = 'ppgi'; // bool, Page Info -const ActionParamKeyID kAIPDFPrinterMarkTypeKey = 'pmtp'; // enum, printer mark type -const ActionParamKeyID kAIPDFTrimMarkWeightKey = 'ptmw'; // enum, Trim Marks weight -const ActionParamKeyID kAIPDFOffsetFromArtworkKey = 'post'; // int, offset from artwork -const ActionParamKeyID kAIPDFBleedTopKey = 'btop'; // int, bleed top -const ActionParamKeyID kAIPDFBleedBottomKey = 'bbtm'; // int, bleed bottom -const ActionParamKeyID kAIPDFBleedLeftKey = 'blft'; // int, bleed left -const ActionParamKeyID kAIPDFBleedRightKey = 'brht'; // int, bleed right -const ActionParamKeyID kAIPDFBleedLinkKey = 'brht'; // bool, bleed link - -const ActionParamKeyID kAIPDFEmbedICCProfilesKey = 'emic'; // bool, embed ICC profiles -const ActionParamKeyID kAIPDFEmbedFontsKey = 'embd'; // bool, embed fonts **TO BE REMOVED** -const ActionParamKeyID kAIPDFSubsetFontsKey = 'sbst'; // bool, subset fonts **TO BE REMOVED** -const ActionParamKeyID kAIPDFSubsetFontsRatioKey = 'rato'; // real, subset fonts ratio - -const ActionParamKeyID kAIPDFGenerateAcrobatLayersKey = 'aclr'; // bool, generate Acrobat layers -const ActionParamKeyID kAIPDFOverprintKey = 'pvop'; // enum, overprint -const ActionParamKeyID kAIPDFFlatteningStyleKey = 'flsy'; // enum, AIPDFFlatteningStyle -const ActionParamKeyID kAIPDFFlatteningStyleNameKey = 'flsn'; // string, AIPDFFlatteningStyle - -const ActionParamKeyID kAIPDFFlattenMaxResolutionKey = 'fmax'; // real, flattening style max resolution -const ActionParamKeyID kAIPDFFlattenMinResolutionKey = 'fmin'; // real, flattening style min resolution -const ActionParamKeyID kAIPDFFlattenVectorBalanceKey = 'fvba'; // int, flattening style vector balance -const ActionParamKeyID kAIPDFFlattenClipComplexRegionsKey = 'fccr'; // bool, flattening style clip complex regions -const ActionParamKeyID kAIPDFFlattenOutlineStrokesKey = 'fosk'; // bool, flattening style outline strokes -const ActionParamKeyID kAIPDFFlattenOutlineTextKey = 'fotx'; // bool, flattening style outline text -const ActionParamKeyID kAIPDFFlattenPrinterResolutionKey = 'fprs'; // real, flattening style printer resolution - -const ActionParamKeyID kAIPDFUserPasswordRequiredKey = 'usrq'; // bool, user password -const ActionParamKeyID kAIPDFUserPasswordKey = 'usps'; // string, user password -const ActionParamKeyID kAIPDFMasterPasswordRequiredKey = 'msrq'; // bool, master password -const ActionParamKeyID kAIPDFMasterPasswordKey = 'msps'; // string, master password - -const ActionParamKeyID kAIPDFPrintingPermKey = 'pmpr'; // enum, Printing Allowed -const ActionParamKeyID kAIPDFChangesPermKey = 'pmch'; // enum, Changes Allowed - -const ActionParamKeyID kAIPDFEnableCopyKey = 'ebcp'; // bool, Enable copying (128-bit) -const ActionParamKeyID kAIPDFEnableAccessKey = 'ebac'; // bool, Enable access (128-bit) -const ActionParamKeyID kAIPDFEnableCopyAccessKey = 'ebca'; // bool, Enable copying and access (40-bit) -const ActionParamKeyID kAIPDFEnablePlaintextMetaKey = 'ebpt'; // bool, Enable Plaintext Metadata - -const ActionParamKeyID kAIPDFIncludeLinkedFilesKey = 'link'; // bool, include linked files - - -#endif //_AIPDFFORMATACTION_H_ diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAccess.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAccess.h index 9d64d5e..57e1ee7 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAccess.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAccess.h @@ -1,439 +1,444 @@ -/***********************************************************************/ -/* */ -/* SPAccess.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPAccess__ -#define __SPAccess__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPPlugs.h" -#include "SPMData.h" - -#if defined(MAC_ENV) && !defined(IOS_ENV) - #import -#endif - -#ifdef WIN_ENV - #include "AIWinDef.h" -#endif - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/* - * The name and version number of the PICA Plug-in Access suite. - */ - -/** Plug-in Access suite name */ -#define kSPAccessSuite "SP Access Suite" -/** Plug-in Access suite name */ -#define kSPAccessSuiteVersion 3 - -/** @ingroup Callers - The \c #SPAccessSuite sends a reload message (\c #kSPAccessReloadSelector) - to a plug-in when it has just been loaded, and an unload message - (\c #kSPAccessUnloadSelector) when it is about to be unloaded. - A plug-in is automatically loaded when the application or another - plug-in calls it or acquires as suite that it exports. - A plug-in can be unloaded at any time if it is not being used. - - A plug-in that exports a suite should unload the suite's procedure pointers - when it is unloaded, and restore them when the plug-in is reloaded. - \li On unload, replace the suite's procedure pointers - with the address of the \c #SPBasicSuite::Undefined() function - (which is always available). This is a protective measure - against other plug-ins that may mistakenly use the suite after they have - released it. - \li On reload, restore the suite's procedure - pointers with the updated addresses of their functions. - - For example: - @code - SPErr UnloadSuite( MySuite *mySuite, SPAccessMessage *message ) { - mySuite->functionA = (void *) message->d.basic->Undefined; - mySuite->functionB = (void *) message->d.basic->Undefined; - } - - SPErr ReloadSuite( MySuite *mySuite, SPAccessMessage *message ) { - mySuite->functionA = functionA; - mySuite->functionB = functionB; - } - @endcode - */ -#define kSPAccessCaller "SP Access" -/** @ingroup Selectors - The first message a plug-in receives on startup (whether - loaded or reloaded). Allows you to restore saved state information, - before startup initialization. - See \c #kSPAccessCaller, \c #SPAccessSuite */ -#define kSPAccessReloadSelector "Reload" -/** @ingroup Selectors - The first message a plug-in receives before being unloaded. - Allows you to save state information - See \c #kSPAccessCaller, \c #SPAccessSuite */ -#define kSPAccessUnloadSelector "Unload" - -/** The name of the object that the \c #SPAccessSuite caches, - which can be purged when caches are flushed. During a cache flush, - if this is the type sent to the \c #SPFlushCachesProc, it can - make calls to the Access suite to collect information about - the access object before deciding to purge it or not. - - For example, this purges filter plug-ins before window plug-ins: -@code -long myFlushCachesProc( const char *type, void *data, SPErr *error ) { -long flush = TRUE; -if ( strcmp( type, kSPFlushAccessType ) == 0 ) { - SPAccessRef access = data; - SPPluginRef plugin = sAccess->GetAccessPlugin( access, error ); - fail( error ); - switch ( myPluginType( plugin ) ) { - case kMyFilterPlugin: - if ( gPurgeLevel < kFilterPurgeLevel ) - flush = FALSE; - break; - case kMyWindowPlugin: - if ( gPurgeLevel < kWindowPurgeLevel ) - flush = FALSE; - break; - } - } - return flush; -} -@endcode -*/ -#define kSPFlushAccessType "SP Flush Access" - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Prototype for a plug-in entry point, which receives messages from - the application or other plug-ins. - @param caller The caller, which identifies what suite or subsystem - made the call. See @ref Callers. - @param selector The specific event that triggered the call. See @ref Selectors. - @param message The message data, whose type depends on the specific event. - */ -typedef SPAPI SPErr (*SPEntry)( const char *caller, const char *selector, void *message ); - - -/** A plug-in access object, used with the \c #SPAccessSuite to make calls - to a plug-in. These objects are reference counted. The count is - incremented when you acquire the object using \c #SPAccessSuite::AcquirePlugin() - and decremented when you release it with \c #SPAccessSuite::ReleasePlugin(), - so you must be careful to balance these calls. The object is automatically - created and the plug-in loaded if necessary, and the object is destroyed - and the plug-in unloaded when the reference count is 0.*/ -typedef struct SPAccess *SPAccessRef; - - - - - -#ifdef MAC_ENV -#if defined(IOS_ENV) -typedef struct _SPMacResChain SPMacResChain; -typedef SPMacResChain* SPPlatformAccessRef; -#else -#ifndef __FILES__ -#if __LP64__ - typedef int FSIORefNum; -#else - typedef short FSIORefNum; -#endif /* __LP64__ */ -#endif -/** Resource chain access information on Mac OS */ -typedef struct { - /** File reference number */ - FSIORefNum fileRefNum; - /** CF bundle */ - CFBundleRef bundleRef; -} SPMacResChain; - -/** Resource chain access information on Mac OS */ -typedef SPMacResChain *SPPlatformAccessRef; -#endif // !defined(IOS_ENV) - -#endif - -#ifdef WIN_ENV - -/** Plug-in library handle on Windows. */ -typedef HINSTANCE SPPlatformAccessRef; - -#endif - -#if !defined(IOS_ENV) -/** Access information for the resource chain on Mac OS, or library information on Windows. - See \c #SPAccessSuite::GetAccessInfo(). */ -typedef struct { - /** File access for entry and resources, when resource-access has not been set. */ - SPPlatformAccessRef defaultAccess; /* */ - /** File access for entry and resources, when resource-access - has been set using \c #SPAccessSuite::SetPluginResourceAccess(). - Otherwise \c NULL. */ - SPPlatformAccessRef resourceAccess; - /** The time since the last access operation, in clock-ticks (1/60th second). */ - ai::uint32 lastAccessTicks; -} SPPlatformAccessInfo; -#endif // !defined(IOS_ENV) - - - -/** Sent in the \c #SPAccessMessage to identify when an access call was made. - Use to distinguish a start-up load from a run-time load or reload, - and a run-time unload from a shut-down unload. */ -typedef enum { - /** The receiving plug-in has been loaded at application startup, and not yet initialized. - Sent with the \c #kSPAccessReloadSelector.*/ - kStartup = 0, - /** The receiving plug-in has been loaded programmatically while the application - is running, and has already been initialized. - Sent with the \c #kSPAccessReloadSelector and the \c #kSPAccessUnloadSelector.*/ - kRuntime, - /** The receiving plug-in is about to be unloaded after being shut down. - Sent with the \c #kSPAccessUnloadSelector. */ - kShutdown, - /** The receiving plug-in has a non-zero access count and the application is shutting down. - Sent with the \c #kSPAccessUnloadSelector. - If the plug-in has acquired itself in order to remain in memory, - it should not free any resources and not acquire others when this - call is received.*/ - kTerminal -} SPAccessPoint; - -/** Message sent with the \c #kSPAccessCaller. */ -typedef struct SPAccessMessage { - /** The message data. */ - SPMessageData d; - /** When the access occurred. */ - SPAccessPoint when; -} SPAccessMessage; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite is used to load and unload plug-ins. The functions allow - you to send messages directly to another plug-in. For example: -@code - SPErr SendMessage( SPPluginRef plugin, const char *caller, const char *selector, void *message, SPErr *error ) { - - SPErr result; - SPAccessRef access; - - access = sAccess->AcquirePlugin( plugin, error ); - fail( error ); - - result = sAccess->CallPlugin( access, caller, selector, message, error ); - fail( error ); - - sAccess->ReleasePlugin( access, error ); - fail( error ); - - return result; - } -@endcode - Standard PICA plug-ins rarely call one another directly. Usually program - control flows from plug-in to plug-in through higher-level suites. - Plug-in adapters, which provide protocol conversion to non-PICA plug-ins, - can add their own access suites to provide access to their foreign plug-ins. - - @see \c #SPInterfaceSuite - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPAccessSuite and \c #kSPAccessSuiteVersion. -*/ -typedef struct SPAccessSuite { - - /** Loads a plug-in if necessary, and prepares it to be called. Creates - an accessor object if necessary, or increments the reference count - of the existing accessor. Use \c #ReleasePlugin() to decrement - the count when you not longer need the accessor. - - A plug-in can acquire itself in order to remain in memory, even if - not referenced by any other plug-in. - @param plugin The plug-in object. - @param access [out] A buffer in which to return the new access object. - */ - SPAPI SPErr (*AcquirePlugin)( SPPluginRef plugin, SPAccessRef *access ); - - /** Decrements the reference count of an accessor object. - When the reference count reaches 0, frees the accessor object - and allows the associated plug-in to be unloaded. - @param access The access object. - */ - SPAPI SPErr (*ReleasePlugin)( SPAccessRef access ); - - /** Retrieves the accessor object for a plug-in. - You can use this to get the accessor for your own plug-in, in order - to access the resource chain or library information. - - Used by plug-ins that export suites to manually establish a - resource context within any of the suite procedures, so that - they can access resources. Not needed when a plug-in is called - through its entry point. \c #SPAccessSuite::CallPlugin() - sets up the resource context for you. - - @param plugin The plug-in object. - @param access [out] A buffer in which to return the access object, - or \c NULL if the plug-in is not loaded. - */ - SPAPI SPErr (*GetPluginAccess)( SPPluginRef plugin, SPAccessRef *access ); - /** Retrieves the plug-in for an accessor. - @param access The access object. - @param plugin [out] A buffer in which to return the plug-in object, - regardless of whether the plug-in is actually loaded into memory. - */ - SPAPI SPErr (*GetAccessPlugin)( SPAccessRef access, SPPluginRef *plugin ); - /** Retrieves the entry point of a plug-in accessor. This is the point to - which \c #CallPlugin() jumps. Before accessing the entry point directly, - use \c #SetCurrentPlugin() to make the plug-in current. - @param access The access object. - @param entry [out] A buffer in which to return the entry point structure. - */ - SPAPI SPErr (*GetAccessEntry)( SPAccessRef access, SPEntry *entry ); - /** Retrieves the current reference count of an accessor object. - @param access The access object. - @param count [out] A buffer in which to return the count. - */ - SPAPI SPErr (*GetAccessCount)( SPAccessRef access, ai::int32 *count ); -#if !defined(IOS_ENV) - /** Retrieves the platform-specific resource access information of a plug-in accessor. - This is for the resource-chain in Mac OS, or the plug-in library in Windows. - @param access The access object. - @param info [out] A buffer in which to return the information structure. - */ - SPAPI SPErr (*GetAccessInfo)( SPAccessRef access, SPPlatformAccessInfo *info ); - - /** Retrieves the platform-specific resource access information of a plug-in accessor. - This is for the resource-chain in Mac OS, or the plug-in library in Windows. - @param access The access object. - @param info [out] A buffer in which to return the information structure. - This differs from \c #SPAccessSuite::GetAccessInfo(), which takes an \c #SPAccessRef - and returns the \c #SPPlatformAccessInfo. - */ - SPAPI SPErr (*GetPluginResourceAccess)( SPPluginRef plugin, SPPlatformAccessRef *resourceAccess ); - /** Sets the the platform-specific resource access information for a plug-in. - @param plugin The plug-in object. - @param resourceAccess The new resource-access information. - */ - SPAPI SPErr (*SetPluginResourceAccess)( SPPluginRef plugin, SPPlatformAccessRef resourceAccess ); -#endif // !defined(IOS_ENV) - - /** Sends a message to a plug-in, using an accessor object. - @param access The access object. - @param caller The caller. - @param slector The selector. - @param message The message, as required for the selector. - @param result [out] A buffer in which to return the result of the call, - returned by the called plug-in. - */ - SPAPI SPErr (*CallPlugin)( SPAccessRef access, const char *caller, const char *selector, - void *message, SPErr *result ); - - /** Retrieves the current plug-in, whose access information is the current - resource context. This is typically the last plug-in to - receive a call, but can be set by a plug-in adapter, or by - \c #SetCurrentPlugin(). - @param plugin [out] A buffer in which to return the plug-in object, - */ - SPAPI SPErr (*GetCurrentPlugin)( SPPluginRef *plugin ); - /** Makes a plug-in and its resource context current. An adapter can use - this to set the resource context before making a call to a plug-in. - Before making this call, you should save the reference for the current - plug-in, and restore it when this plug-in no longer needs to be current. - @param plugin The plug-in object, - */ - SPAPI SPErr (*SetCurrentPlugin)( SPPluginRef plugin ); - -} SPAccessSuite; - -/** Internal */ -SPAPI SPErr SPAcquirePlugin( SPPluginRef plugin, SPAccessRef *access ); -/** Internal */ -SPAPI SPErr SPReleasePlugin( SPAccessRef access ); - -/** Internal */ -SPAPI SPErr SPGetPluginAccess( SPPluginRef plugin, SPAccessRef *access ); -/** Internal */ -SPAPI SPErr SPGetAccessPlugin( SPAccessRef access, SPPluginRef *plugin ); -/** Internal */ -SPAPI SPErr SPGetAccessEntry( SPAccessRef access, SPEntry *entry ); -/** Internal */ -SPAPI SPErr SPGetAccessCount( SPAccessRef access, ai::int32 *count ); -#if !defined(IOS_ENV) -/** Internal */ -SPAPI SPErr SPGetAccessInfo( SPAccessRef access, SPPlatformAccessInfo *info ); - -/** Internal */ -SPAPI SPErr SPGetPluginResourceAccess( SPPluginRef plugin, SPPlatformAccessRef *resourceAccess ); -/** Internal */ -SPAPI SPErr SPSetPluginResourceAccess( SPPluginRef plugin, SPPlatformAccessRef resourceAccess ); -#endif // !defined(IOS_ENV) - -/** Internal */ -SPAPI SPErr SPCallPlugin( SPAccessRef access, const char *caller, const char *selector, - void *message, SPErr *result ); - -/** Internal */ -SPAPI SPErr SPGetCurrentPlugin( SPPluginRef *plugin ); -/** Internal */ -SPAPI SPErr SPSetCurrentPlugin( SPPluginRef plugin ); - - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPAccess.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPAccess__ +#define __SPAccess__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPPlugs.h" +#include "SPMData.h" + +#if defined(MAC_ENV) && !defined(IOS_ENV) + #import +#endif + +#ifdef WIN_ENV + #include "AIWinDef.h" +#endif + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/* + * The name and version number of the PICA Plug-in Access suite. + */ + +/** Plug-in Access suite name */ +#define kSPAccessSuite "SP Access Suite" +/** Plug-in Access suite name */ +#define kSPAccessSuiteVersion 3 + +/** @ingroup Callers + The \c #SPAccessSuite sends a reload message (\c #kSPAccessReloadSelector) + to a plug-in when it has just been loaded, and an unload message + (\c #kSPAccessUnloadSelector) when it is about to be unloaded. + A plug-in is automatically loaded when the application or another + plug-in calls it or acquires as suite that it exports. + A plug-in can be unloaded at any time if it is not being used. + + A plug-in that exports a suite should unload the suite's procedure pointers + when it is unloaded, and restore them when the plug-in is reloaded. + \li On unload, replace the suite's procedure pointers + with the address of the \c #SPBasicSuite::Undefined() function + (which is always available). This is a protective measure + against other plug-ins that may mistakenly use the suite after they have + released it. + \li On reload, restore the suite's procedure + pointers with the updated addresses of their functions. + + For example: + @code + SPErr UnloadSuite( MySuite *mySuite, SPAccessMessage *message ) { + mySuite->functionA = (void *) message->d.basic->Undefined; + mySuite->functionB = (void *) message->d.basic->Undefined; + } + + SPErr ReloadSuite( MySuite *mySuite, SPAccessMessage *message ) { + mySuite->functionA = functionA; + mySuite->functionB = functionB; + } + @endcode + */ +#define kSPAccessCaller "SP Access" +/** @ingroup Selectors + The first message a plug-in receives on startup (whether + loaded or reloaded). Allows you to restore saved state information, + before startup initialization. + See \c #kSPAccessCaller, \c #SPAccessSuite */ +#define kSPAccessReloadSelector "Reload" +/** @ingroup Selectors + The first message a plug-in receives before being unloaded. + Allows you to save state information + See \c #kSPAccessCaller, \c #SPAccessSuite */ +#define kSPAccessUnloadSelector "Unload" + +/** The name of the object that the \c #SPAccessSuite caches, + which can be purged when caches are flushed. During a cache flush, + if this is the type sent to the \c #SPFlushCachesProc, it can + make calls to the Access suite to collect information about + the access object before deciding to purge it or not. + + For example, this purges filter plug-ins before window plug-ins: +@code +long myFlushCachesProc( const char *type, void *data, SPErr *error ) { +long flush = TRUE; +if ( strcmp( type, kSPFlushAccessType ) == 0 ) { + SPAccessRef access = data; + SPPluginRef plugin = sAccess->GetAccessPlugin( access, error ); + fail( error ); + switch ( myPluginType( plugin ) ) { + case kMyFilterPlugin: + if ( gPurgeLevel < kFilterPurgeLevel ) + flush = FALSE; + break; + case kMyWindowPlugin: + if ( gPurgeLevel < kWindowPurgeLevel ) + flush = FALSE; + break; + } + } + return flush; +} +@endcode +*/ +#define kSPFlushAccessType "SP Flush Access" + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Prototype for a plug-in entry point, which receives messages from + the application or other plug-ins. + @param caller The caller, which identifies what suite or subsystem + made the call. See @ref Callers. + @param selector The specific event that triggered the call. See @ref Selectors. + @param message The message data, whose type depends on the specific event. + */ +typedef SPAPI SPErr (*SPEntry)( const char *caller, const char *selector, void *message ); + + +/** A plug-in access object, used with the \c #SPAccessSuite to make calls + to a plug-in. These objects are reference counted. The count is + incremented when you acquire the object using \c #SPAccessSuite::AcquirePlugin() + and decremented when you release it with \c #SPAccessSuite::ReleasePlugin(), + so you must be careful to balance these calls. The object is automatically + created and the plug-in loaded if necessary, and the object is destroyed + and the plug-in unloaded when the reference count is 0.*/ +typedef struct SPAccess *SPAccessRef; + + +#ifdef LINUX_ENV +typedef void* SPMacResChain; +#endif + + + + +#ifdef MAC_ENV +#if defined(IOS_ENV) +typedef struct _SPMacResChain SPMacResChain; +typedef SPMacResChain* SPPlatformAccessRef; +#else +#ifndef __FILES__ +#if __LP64__ + typedef int FSIORefNum; +#else + typedef short FSIORefNum; +#endif /* __LP64__ */ +#endif +/** Resource chain access information on Mac OS */ +typedef struct { + /** File reference number */ + FSIORefNum fileRefNum; + /** CF bundle */ + CFBundleRef bundleRef; +} SPMacResChain; + +/** Resource chain access information on Mac OS */ +typedef SPMacResChain *SPPlatformAccessRef; +#endif // !defined(IOS_ENV) + +#endif + +#if defined(WIN_ENV) +/** Plug-in library handle on Windows. */ +typedef HINSTANCE SPPlatformAccessRef; +#elif defined(LINUX_ENV) +/** Plug-in library handle on Unix. */ +typedef void* SPPlatformAccessRef; +#endif + +#if !defined(IOS_ENV) +/** Access information for the resource chain on Mac OS, or library information on Windows. + See \c #SPAccessSuite::GetAccessInfo(). */ +typedef struct { + /** File access for entry and resources, when resource-access has not been set. */ + SPPlatformAccessRef defaultAccess; /* */ + /** File access for entry and resources, when resource-access + has been set using \c #SPAccessSuite::SetPluginResourceAccess(). + Otherwise \c NULL. */ + SPPlatformAccessRef resourceAccess; + /** The time since the last access operation, in clock-ticks (1/60th second). */ + ai::uint32 lastAccessTicks; +} SPPlatformAccessInfo; +#endif // !defined(IOS_ENV) + + + +/** Sent in the \c #SPAccessMessage to identify when an access call was made. + Use to distinguish a start-up load from a run-time load or reload, + and a run-time unload from a shut-down unload. */ +typedef enum { + /** The receiving plug-in has been loaded at application startup, and not yet initialized. + Sent with the \c #kSPAccessReloadSelector.*/ + kStartup = 0, + /** The receiving plug-in has been loaded programmatically while the application + is running, and has already been initialized. + Sent with the \c #kSPAccessReloadSelector and the \c #kSPAccessUnloadSelector.*/ + kRuntime, + /** The receiving plug-in is about to be unloaded after being shut down. + Sent with the \c #kSPAccessUnloadSelector. */ + kShutdown, + /** The receiving plug-in has a non-zero access count and the application is shutting down. + Sent with the \c #kSPAccessUnloadSelector. + If the plug-in has acquired itself in order to remain in memory, + it should not free any resources and not acquire others when this + call is received.*/ + kTerminal +} SPAccessPoint; + +/** Message sent with the \c #kSPAccessCaller. */ +typedef struct SPAccessMessage { + /** The message data. */ + SPMessageData d; + /** When the access occurred. */ + SPAccessPoint when; +} SPAccessMessage; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite is used to load and unload plug-ins. The functions allow + you to send messages directly to another plug-in. For example: +@code + SPErr SendMessage( SPPluginRef plugin, const char *caller, const char *selector, void *message, SPErr *error ) { + + SPErr result; + SPAccessRef access; + + access = sAccess->AcquirePlugin( plugin, error ); + fail( error ); + + result = sAccess->CallPlugin( access, caller, selector, message, error ); + fail( error ); + + sAccess->ReleasePlugin( access, error ); + fail( error ); + + return result; + } +@endcode + Standard PICA plug-ins rarely call one another directly. Usually program + control flows from plug-in to plug-in through higher-level suites. + Plug-in adapters, which provide protocol conversion to non-PICA plug-ins, + can add their own access suites to provide access to their foreign plug-ins. + + @see \c #SPInterfaceSuite + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPAccessSuite and \c #kSPAccessSuiteVersion. +*/ +typedef struct SPAccessSuite { + + /** Loads a plug-in if necessary, and prepares it to be called. Creates + an accessor object if necessary, or increments the reference count + of the existing accessor. Use \c #ReleasePlugin() to decrement + the count when you not longer need the accessor. + + A plug-in can acquire itself in order to remain in memory, even if + not referenced by any other plug-in. + @param plugin The plug-in object. + @param access [out] A buffer in which to return the new access object. + */ + SPAPI SPErr (*AcquirePlugin)( SPPluginRef plugin, SPAccessRef *access ); + + /** Decrements the reference count of an accessor object. + When the reference count reaches 0, frees the accessor object + and allows the associated plug-in to be unloaded. + @param access The access object. + */ + SPAPI SPErr (*ReleasePlugin)( SPAccessRef access ); + + /** Retrieves the accessor object for a plug-in. + You can use this to get the accessor for your own plug-in, in order + to access the resource chain or library information. + + Used by plug-ins that export suites to manually establish a + resource context within any of the suite procedures, so that + they can access resources. Not needed when a plug-in is called + through its entry point. \c #SPAccessSuite::CallPlugin() + sets up the resource context for you. + + @param plugin The plug-in object. + @param access [out] A buffer in which to return the access object, + or \c NULL if the plug-in is not loaded. + */ + SPAPI SPErr (*GetPluginAccess)( SPPluginRef plugin, SPAccessRef *access ); + /** Retrieves the plug-in for an accessor. + @param access The access object. + @param plugin [out] A buffer in which to return the plug-in object, + regardless of whether the plug-in is actually loaded into memory. + */ + SPAPI SPErr (*GetAccessPlugin)( SPAccessRef access, SPPluginRef *plugin ); + /** Retrieves the entry point of a plug-in accessor. This is the point to + which \c #CallPlugin() jumps. Before accessing the entry point directly, + use \c #SetCurrentPlugin() to make the plug-in current. + @param access The access object. + @param entry [out] A buffer in which to return the entry point structure. + */ + SPAPI SPErr (*GetAccessEntry)( SPAccessRef access, SPEntry *entry ); + /** Retrieves the current reference count of an accessor object. + @param access The access object. + @param count [out] A buffer in which to return the count. + */ + SPAPI SPErr (*GetAccessCount)( SPAccessRef access, ai::int32 *count ); +#if !defined(ILLUSTRATOR_MINIMAL) + /** Retrieves the platform-specific resource access information of a plug-in accessor. + This is for the resource-chain in Mac OS, or the plug-in library in Windows. + @param access The access object. + @param info [out] A buffer in which to return the information structure. + */ + SPAPI SPErr (*GetAccessInfo)( SPAccessRef access, SPPlatformAccessInfo *info ); + + /** Retrieves the platform-specific resource access information of a plug-in accessor. + This is for the resource-chain in Mac OS, or the plug-in library in Windows. + @param access The access object. + @param info [out] A buffer in which to return the information structure. + This differs from \c #SPAccessSuite::GetAccessInfo(), which takes an \c #SPAccessRef + and returns the \c #SPPlatformAccessInfo. + */ + SPAPI SPErr (*GetPluginResourceAccess)( SPPluginRef plugin, SPPlatformAccessRef *resourceAccess ); + /** Sets the the platform-specific resource access information for a plug-in. + @param plugin The plug-in object. + @param resourceAccess The new resource-access information. + */ + SPAPI SPErr (*SetPluginResourceAccess)( SPPluginRef plugin, SPPlatformAccessRef resourceAccess ); +#endif // !defined(ILLUSTRATOR_MINIMAL) + + /** Sends a message to a plug-in, using an accessor object. + @param access The access object. + @param caller The caller. + @param slector The selector. + @param message The message, as required for the selector. + @param result [out] A buffer in which to return the result of the call, + returned by the called plug-in. + */ + SPAPI SPErr (*CallPlugin)( SPAccessRef access, const char *caller, const char *selector, + void *message, SPErr *result ); + + /** Retrieves the current plug-in, whose access information is the current + resource context. This is typically the last plug-in to + receive a call, but can be set by a plug-in adapter, or by + \c #SetCurrentPlugin(). + @param plugin [out] A buffer in which to return the plug-in object, + */ + SPAPI SPErr (*GetCurrentPlugin)( SPPluginRef *plugin ); + /** Makes a plug-in and its resource context current. An adapter can use + this to set the resource context before making a call to a plug-in. + Before making this call, you should save the reference for the current + plug-in, and restore it when this plug-in no longer needs to be current. + @param plugin The plug-in object, + */ + SPAPI SPErr (*SetCurrentPlugin)( SPPluginRef plugin ); + +} SPAccessSuite; + +/** Internal */ +SPAPI SPErr SPAcquirePlugin( SPPluginRef plugin, SPAccessRef *access ); +/** Internal */ +SPAPI SPErr SPReleasePlugin( SPAccessRef access ); + +/** Internal */ +SPAPI SPErr SPGetPluginAccess( SPPluginRef plugin, SPAccessRef *access ); +/** Internal */ +SPAPI SPErr SPGetAccessPlugin( SPAccessRef access, SPPluginRef *plugin ); +/** Internal */ +SPAPI SPErr SPGetAccessEntry( SPAccessRef access, SPEntry *entry ); +/** Internal */ +SPAPI SPErr SPGetAccessCount( SPAccessRef access, ai::int32 *count ); +#if !defined(ILLUSTRATOR_MINIMAL) +/** Internal */ +SPAPI SPErr SPGetAccessInfo( SPAccessRef access, SPPlatformAccessInfo *info ); + +/** Internal */ +SPAPI SPErr SPGetPluginResourceAccess( SPPluginRef plugin, SPPlatformAccessRef *resourceAccess ); +/** Internal */ +SPAPI SPErr SPSetPluginResourceAccess( SPPluginRef plugin, SPPlatformAccessRef resourceAccess ); +#endif // !defined(ILLUSTRATOR_MINIMAL) + +/** Internal */ +SPAPI SPErr SPCallPlugin( SPAccessRef access, const char *caller, const char *selector, + void *message, SPErr *result ); + +/** Internal */ +SPAPI SPErr SPGetCurrentPlugin( SPPluginRef *plugin ); +/** Internal */ +SPAPI SPErr SPSetCurrentPlugin( SPPluginRef plugin ); + + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAdapts.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAdapts.h index c948eff..fc748c9 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAdapts.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPAdapts.h @@ -1,410 +1,410 @@ -/***********************************************************************/ -/* */ -/* SPAdapts.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPAdapters__ -#define __SPAdapters__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPCaches.h" -#include "SPMData.h" -#include "SPProps.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** SPAdapters suite name */ -#define kSPAdaptersSuite "SP Adapters Suite" -/** SPAdapters suite version */ -#define kSPAdaptersSuiteVersion 3 - -/** @ingroup Callers - Caller for a plug-in adapter. Sent to plug-ins - with adapters to allow the adapter to load or unload - files of managed types, or to make translations for - compatibility with legacy versions of PICA, the application, - or earlier versions of the plug-in. - See \c #SPAdaptersSuite. */ -#define kSPAdaptersCaller "SP Adapters" - -/** @ingroup Selectors - Received by a plug-in with an adapter on application startup, after - PICA completes its plug-in startup process. Use for initialization - related to the adapter. - See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ -#define kSPAdaptersStartupSelector "Start up" -/** @ingroup Selectors - Received by a plug-in with an adapter on application shutdown, after - PICA completes its plug-in shutdown process. Use for termination cleanup - related to the adapter. - See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ -#define kSPAdaptersShutdownSelector "Shut down" -/** @ingroup Selectors - Received by a plug-in with an adapter after a call to - \c #SPCachesSuite::SPFlushCaches(), for a final flush of - any memory used for private data, including PICA lists and - string pools. - See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ -#define kSPAdaptersDisposeInfoSelector "Dispose info" -/** @ingroup Selectors - Received by a plug-in with an adapter when the application - frees memory, to allow garbage collection. - See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ -#define kSPAdaptersFlushSelector "Flush" - -// Second generation adapters (has property 'adpt'/2) -//--------------------------------------------------- -/** @ingroup Selectors - Received by a plug-in after its initialization, to allow it to - register its own adapter. Get the adapter list from PICA and - use \c #SPAdaptersSuite::AddAdapter( ) to register your adapter. - For example: - @code -SPAdapterRef oldAPI; -SPAdapterListRef adapterList; -SPErr error; -error = sSPRuntime->GetRuntimeAdapterList( &adapterList); -error = sSPAdapters->AddAdapter( adapterList, message->d.self, "old API adapter", &oldAPI ); - @endcode - - See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ -#define kSPAdaptersRegisterPluginsSelector "Register plugins" - -/** @ingroup Selectors - Received by a plug-in with an adapter before it is loaded, to allow the - adapter to perform needed translations before the load occurs. The - handler does not need to call the load operation. - See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ -#define kSPAdaptersLoadPluginSelector "Load plugin" -/** @ingroup Selectors - Received by a plug-in with an adapter before it is unloaded, to allow the - adapter to perform needed translations before the unload occurs. The - handler does not need to call the unload operation. - See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ -#define kSPAdaptersReleasePluginSelector "Release plugin" - -/** @ingroup Selectors - Received by a plug-in with an adapter when the application needs to - communicate with it. The adapter should relay the message, performing - any required translation. - See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ -#define kSPAdaptersSendMessageSelector "Send message" - -// First generation adapters (no 'adpt' property, or 'adpt'/1 ) -//------------------------------------------------------------- -// These messages are only for the "SP2 Adapter" that is built into -// Sweet Pea and maybe legacy adapters (i.e., AI6Adapter for AI7). -// For newer adapters, all of these methods are now deprecated. -// New adapters should do the vast majority of their processing via -// the message kSPAdaptersSendMessageSelector. -/** @deprecated Used internally. */ -#define kSPAdaptersFindPropertySelector "Find property" -/** @deprecated Used internally. */ -#define kSPAdaptersAboutSelector "About" -/** @deprecated Used internally. */ -#define kSPAdaptersAcquireSuiteHostSelector "Acquire Suite" -/** @deprecated Used internally. */ -#define kSPAdaptersReleaseSuiteHostSelector "Release Suite" - -/** PICA global list of registered plug-in adapters. - @see \c #SPAdaptersSuite::AddAdapter(), \c #SPRuntimeSuite::GetRuntimeAdapterList(). */ -#define kSPRuntimeAdapterList ((SPAdapterListRef)NULL) - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** An opaque reference to an adapter object. Access using the \c #SPAdaptersSuite. */ -typedef struct SPAdapter *SPAdapterRef; -/** A list of adapter objects. Create with - \c #SPAdaptersSuite::AllocateAdapterList(), or use - the global list, \c #kSPRuntimeAdapterList. */ -typedef struct SPAdapterList *SPAdapterListRef; -/** An iterator object for examining an adapter list. - See \c #SPAdaptersSuite::NewAdapterListIterator(). */ -typedef struct SPAdapterListIterator *SPAdapterListIteratorRef; - -/** The message passed with all \c #kSPAdaptersCaller calls. - Fields are used by specific selectors as indicated. */ -typedef struct SPAdaptersMessage { - /** The message data. All selectors. */ - SPMessageData d; - /** The adapter object. All selectors. If you add more than - one adapter for a plug-in, use this to determine which handler to use. */ - SPAdapterRef adapter; - - /** For \c #kSPAdaptersAboutSelector, \c #kSPAdaptersLoadPluginSelector, \c #kSPAdaptersReleasePluginSelector, - \c #kSPAdaptersSendMessageSelector, \c #kSPAdaptersFindPropertySelector, the plug-in object which to - act upon (display information, load, release, send a message to, or find properties for). */ - struct SPPlugin *targetPlugin; - /** For all selectors, the target result of the handler, if any. */ - SPErr targetResult; - - /** For \c #kSPAdaptersFindPropertySelector. - No longer used. */ - PIType vendorID; - /** For \c #kSPAdaptersFindPropertySelector. - No longer used. */ - PIType propertyKey; - /** For \c #kSPAdaptersFindPropertySelector. - No longer used. */ - ai::int32 propertyID; - /** For \c #kSPAdaptersFindPropertySelector. - No longer used. */ - void *property; - - /** For \c #kSPAdaptersFlushSelector. The procedure with which to flush caches, - passed from the call to \c #SPCachesSuite::SPFlushCaches(). - The adapter should call this to determine which plug-ins are being removed from - memory, and unload them. */ - SPFlushCachesProc flushProc; - /** For \c #kSPAdaptersFlushSelector. Return the result of the flush procedure, - the number of plug-ins removed.*/ - ai::int32 flushed; - - /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. - No longer used.*/ - struct SPSuiteList *suiteList; /* use these if you need name, apiVersion, internalVersion */ - /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. - No longer used.*/ - struct SPSuite *suite; - /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. - No longer used.*/ - struct SPPlugin *host; /* plug-in hosting the suite, to be aquired/released by adapter */ - /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. - No longer used.*/ - const void *suiteProcs; /* returned here if reallocated */ - /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. - No longer used.*/ - ai::int32 acquired; /* returned here */ - - /** For \c #kSPAdaptersSendMessageSelector. - The caller to pass to the adapted plug-in. */ - const char *plugin_caller; - /** For \c #kSPAdaptersSendMessageSelector. - The selector to pass to the adapted plug-in. */ - const char *plugin_selector; - /** For \c #kSPAdaptersSendMessageSelector. - The message to pass to the adapted plug-in. */ - void *plugin_message; -} SPAdaptersMessage; - -/** A string pool structure. See \c #SPStringsSuite. */ -struct SPStringPool; - -/******************************************************************************* - ** - ** Suite - ** - **/ -/** @ingroup Suites - An adapter is an interface between the PICA plug-in manager and - an individual plug-in. PICA and application plug-ins are hosted by - internal PICA adapters. Plug-ins can add other adapters to PICA's - \e adapter \e list, allowing non-PICA plug-ins to run under the PICA API. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPAdaptersSuite and \c #kSPAdaptersSuiteVersion. - - An adapter searches the PICA \e file \e list (\c #kSPRuntimeFileList) - for plug-ins types that it supports, and adds them to the \e plug-in \e list - (\c #kSPRuntimePluginList). When notified by PICA to do so, the adapter is - responsible for loading and calling the plug-ins it adds, and must - do any conversion of messages, data structures or other API elements. - An adapter can be used to update - - There are always at least two adapters, the internal adapters for PICA - and for the application, in the global adapter list (\c #kSPRuntimeAdapterList). - The internal adapters translate any legacy function calls into those - currently supported by PICA and the application. - - You can provide an adapter for backward compatibility with older - versions of your own plug-ins, or to interpret your own file types. - To make an adapter available for your plug-in, add it in response to the - \c #kSPAdaptersRegisterPluginsSelector when your plug-in is loaded. - - You can also use this suite to create and maintain your own adapter list, - in addition to the global list. - - Use the adapter to load and call the adapted plug-in. For example, to - verify that a message could be sent to a plug-in: -@code -SPErr error; -SPPluginRef pluginToCall; -SPAdapterRef pluginsAdapter; -char *adapterName; -long adapterVersion; - -error = sSPPlugins->GetPluginAdapter( pluginToCall, &pluginsAdapter ); -error = sSPAdapters->GetAdapterName( pluginsAdapter, &adapterName ); -if ( strcmp( adapterName, kSPSweetPea2Adapter ) == 0 ) { - // it is a PICA plug-in, call it as such with sSPInterface. - } else if ( strcmp( adapterName, "MYAPP Legacy Plug-in Adapter" ) == 0 ) { - // it is an adapted plug-in, call it with the adapterÕs - // interface suite - error = sSPAdapters->GetAdapterVersion( pluginsAdapter, &adapterVersion ); - if ( adapterVersion == 1 ) { - // use one hypothetical interface suite - } else if ( adapterVersion == 2) { - // use another hypothetical interface suite - } - } -@endcode -*/ -typedef struct SPAdaptersSuite { - - /** Allocates a new list of adapters. You can keep your own list, - or obtain the global list with \c #SPRuntimeSuite::GetRuntimeAdapterList(). - @param stringPool The string pool in which to keep adapter names. - @param adapterList [out] A buffer in which to return the new list object. - */ - SPAPI SPErr (*AllocateAdapterList)( struct SPStringPool *stringPool, SPAdapterListRef *adapterList ); - /** Frees a list of adapters allocated with \c #AllocateAdapterList(), and - also frees any entries in the list. Do not free the global list (\c #kSPRuntimeAdapterList). - @param adapterList The adapter list object. - */ - SPAPI SPErr (*FreeAdapterList)( SPAdapterListRef adapterList ); - /** Creates a new adapter object and adds it to an adapter list. Do this in - response to the \c #kSPAdaptersRegisterPluginsSelector message. - @param adapterList The adapter list object, or \c NULL to use the - global list. - @param host This plug-in object, for which the adapter is responsible. - @param name The unique, identifying name of the adapter. - @param version The version number of the adapter. Only the latest version - of any adapter is used to start up plug-ins. - @param adapter [out] A buffer in which to return the new adapter object, or - \c NULL if you add only one adapter. If you add more than one adapter, - compare this to \c #SPAdaptersMessage::adapter to determine which handler to use. - @see \c #AllocateAdapterList() - */ - SPAPI SPErr (*AddAdapter)( SPAdapterListRef adapterList, struct SPPlugin *host, const char *name, - ai::int32 version, SPAdapterRef *adapter ); - - /** Retrieves an adapter by name. - @param adapterList The adapter list object, or \c NULL to use the - global list. - @param name The unique, identifying name of the adapter. - @param adapter [out] A buffer in which to return the adapter object. - */ - SPAPI SPErr (*SPFindAdapter)( SPAdapterListRef adapterList, const char *name, SPAdapterRef *adapter ); - - /** Creates an iterator object with which to traverse an adapter list. - The iterator is initially set to the first adapter in the list. - @param adapterList The adapter list object, or \c NULL to use the - global list. - @param iter [out] A buffer in which to return the new iterator object. - @see \c #NextAdapter(), \c #DeleteAdapterListIterator() - */ - SPAPI SPErr (*NewAdapterListIterator)( SPAdapterListRef adapterList, SPAdapterListIteratorRef *iter ); - /** Retrieves the current adapter and advances an adapter-list iterator to the - next adapter in the list. - @param iter The adapter-list iterator object. - @param adapter [out] A buffer in which to return the current adapter object, \c NULL - if the end of the list has been reached. - @see \c #NewAdapterListIterator(), - */ - SPAPI SPErr (*NextAdapter)( SPAdapterListIteratorRef iter, SPAdapterRef *adapter ); - /** Frees an adapter-list iterator that is no longer needed. - @param iter The adapter-list iterator object. - @see \c #NewAdapterListIterator(), - */ - SPAPI SPErr (*DeleteAdapterListIterator)( SPAdapterListIteratorRef iter ); - - /** Retrieves the plug-in that an adapter manages. - @param adapter The adapter object. - @param plug-in [out] A buffer in which to return the plug-in object. - */ - SPAPI SPErr (*GetAdapterHost)( SPAdapterRef adapter, struct SPPlugin **plugin ); - /** Retrieves the unique, identifying name of an adapter. - @param adapter The adapter object. - @param name [out] A buffer in which to return the name string. - */ - SPAPI SPErr (*GetAdapterName)( SPAdapterRef adapter, const char **name ); - /** Retrieves the version of an adapter. - @param adapter The adapter object. - @param version [out] A buffer in which to return the version number. - */ - SPAPI SPErr (*GetAdapterVersion)( SPAdapterRef adapter, ai::int32 *version ); - -} SPAdaptersSuite; - - -/** Internal */ -SPAPI SPErr SPAllocateAdapterList( struct SPStringPool *stringPool, SPAdapterListRef *adapterList ); -/** Internal */ -SPAPI SPErr SPFreeAdapterList( SPAdapterListRef adapterList ); - -/** Internal */ -SPAPI SPErr SPAddAdapter( SPAdapterListRef adapterList, struct SPPlugin *host, const char *name, - ai::int32 version, SPAdapterRef *adapter ); - -/** Internal */ -SPAPI SPErr SPFindAdapter( SPAdapterListRef adapterList, const char *name, SPAdapterRef *adapter ); - -/** Internal */ -SPAPI SPErr SPNewAdapterListIterator( SPAdapterListRef adapterList, SPAdapterListIteratorRef *iter ); -/** Internal */ -SPAPI SPErr SPNextAdapter( SPAdapterListIteratorRef iter, SPAdapterRef *adapter ); -/** Internal */ -SPAPI SPErr SPDeleteAdapterListIterator( SPAdapterListIteratorRef iter ); - -/** Internal */ -SPAPI SPErr SPGetAdapterHost( SPAdapterRef adapter, struct SPPlugin **plugin ); -/** Internal */ -SPAPI SPErr SPGetAdapterName( SPAdapterRef adapter, const char **name ); -/** Internal */ -SPAPI SPErr SPGetAdapterVersion( SPAdapterRef adapter, ai::int32 *version ); - - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPAdapts.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPAdapters__ +#define __SPAdapters__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPCaches.h" +#include "SPMData.h" +#include "SPProps.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** SPAdapters suite name */ +#define kSPAdaptersSuite "SP Adapters Suite" +/** SPAdapters suite version */ +#define kSPAdaptersSuiteVersion 3 + +/** @ingroup Callers + Caller for a plug-in adapter. Sent to plug-ins + with adapters to allow the adapter to load or unload + files of managed types, or to make translations for + compatibility with legacy versions of PICA, the application, + or earlier versions of the plug-in. + See \c #SPAdaptersSuite. */ +#define kSPAdaptersCaller "SP Adapters" + +/** @ingroup Selectors + Received by a plug-in with an adapter on application startup, after + PICA completes its plug-in startup process. Use for initialization + related to the adapter. + See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ +#define kSPAdaptersStartupSelector "Start up" +/** @ingroup Selectors + Received by a plug-in with an adapter on application shutdown, after + PICA completes its plug-in shutdown process. Use for termination cleanup + related to the adapter. + See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ +#define kSPAdaptersShutdownSelector "Shut down" +/** @ingroup Selectors + Received by a plug-in with an adapter after a call to + \c #SPCachesSuite::SPFlushCaches(), for a final flush of + any memory used for private data, including PICA lists and + string pools. + See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ +#define kSPAdaptersDisposeInfoSelector "Dispose info" +/** @ingroup Selectors + Received by a plug-in with an adapter when the application + frees memory, to allow garbage collection. + See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ +#define kSPAdaptersFlushSelector "Flush" + +// Second generation adapters (has property 'adpt'/2) +//--------------------------------------------------- +/** @ingroup Selectors + Received by a plug-in after its initialization, to allow it to + register its own adapter. Get the adapter list from PICA and + use \c #SPAdaptersSuite::AddAdapter( ) to register your adapter. + For example: + @code +SPAdapterRef oldAPI; +SPAdapterListRef adapterList; +SPErr error; +error = sSPRuntime->GetRuntimeAdapterList( &adapterList); +error = sSPAdapters->AddAdapter( adapterList, message->d.self, "old API adapter", &oldAPI ); + @endcode + + See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ +#define kSPAdaptersRegisterPluginsSelector "Register plugins" + +/** @ingroup Selectors + Received by a plug-in with an adapter before it is loaded, to allow the + adapter to perform needed translations before the load occurs. The + handler does not need to call the load operation. + See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ +#define kSPAdaptersLoadPluginSelector "Load plugin" +/** @ingroup Selectors + Received by a plug-in with an adapter before it is unloaded, to allow the + adapter to perform needed translations before the unload occurs. The + handler does not need to call the unload operation. + See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ +#define kSPAdaptersReleasePluginSelector "Release plugin" + +/** @ingroup Selectors + Received by a plug-in with an adapter when the application needs to + communicate with it. The adapter should relay the message, performing + any required translation. + See \c #kSPAdaptersCaller, \c #SPAdaptersMessage, \c #SPAdaptersSuite. */ +#define kSPAdaptersSendMessageSelector "Send message" + +// First generation adapters (no 'adpt' property, or 'adpt'/1 ) +//------------------------------------------------------------- +// These messages are only for the "SP2 Adapter" that is built into +// Sweet Pea and maybe legacy adapters (i.e., AI6Adapter for AI7). +// For newer adapters, all of these methods are now deprecated. +// New adapters should do the vast majority of their processing via +// the message kSPAdaptersSendMessageSelector. +/** @deprecated Used internally. */ +#define kSPAdaptersFindPropertySelector "Find property" +/** @deprecated Used internally. */ +#define kSPAdaptersAboutSelector "About" +/** @deprecated Used internally. */ +#define kSPAdaptersAcquireSuiteHostSelector "Acquire Suite" +/** @deprecated Used internally. */ +#define kSPAdaptersReleaseSuiteHostSelector "Release Suite" + +/** PICA global list of registered plug-in adapters. + @see \c #SPAdaptersSuite::AddAdapter(), \c #SPRuntimeSuite::GetRuntimeAdapterList(). */ +#define kSPRuntimeAdapterList ((SPAdapterListRef)NULL) + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** An opaque reference to an adapter object. Access using the \c #SPAdaptersSuite. */ +typedef struct SPAdapter *SPAdapterRef; +/** A list of adapter objects. Create with + \c #SPAdaptersSuite::AllocateAdapterList(), or use + the global list, \c #kSPRuntimeAdapterList. */ +typedef struct SPAdapterList *SPAdapterListRef; +/** An iterator object for examining an adapter list. + See \c #SPAdaptersSuite::NewAdapterListIterator(). */ +typedef struct SPAdapterListIterator *SPAdapterListIteratorRef; + +/** The message passed with all \c #kSPAdaptersCaller calls. + Fields are used by specific selectors as indicated. */ +typedef struct SPAdaptersMessage { + /** The message data. All selectors. */ + SPMessageData d; + /** The adapter object. All selectors. If you add more than + one adapter for a plug-in, use this to determine which handler to use. */ + SPAdapterRef adapter; + + /** For \c #kSPAdaptersAboutSelector, \c #kSPAdaptersLoadPluginSelector, \c #kSPAdaptersReleasePluginSelector, + \c #kSPAdaptersSendMessageSelector, \c #kSPAdaptersFindPropertySelector, the plug-in object which to + act upon (display information, load, release, send a message to, or find properties for). */ + struct SPPlugin *targetPlugin; + /** For all selectors, the target result of the handler, if any. */ + SPErr targetResult; + + /** For \c #kSPAdaptersFindPropertySelector. + No longer used. */ + PIType vendorID; + /** For \c #kSPAdaptersFindPropertySelector. + No longer used. */ + PIType propertyKey; + /** For \c #kSPAdaptersFindPropertySelector. + No longer used. */ + ai::int32 propertyID; + /** For \c #kSPAdaptersFindPropertySelector. + No longer used. */ + void *property; + + /** For \c #kSPAdaptersFlushSelector. The procedure with which to flush caches, + passed from the call to \c #SPCachesSuite::SPFlushCaches(). + The adapter should call this to determine which plug-ins are being removed from + memory, and unload them. */ + SPFlushCachesProc flushProc; + /** For \c #kSPAdaptersFlushSelector. Return the result of the flush procedure, + the number of plug-ins removed.*/ + ai::int32 flushed; + + /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. + No longer used.*/ + struct SPSuiteList *suiteList; /* use these if you need name, apiVersion, internalVersion */ + /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. + No longer used.*/ + struct SPSuite *suite; + /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. + No longer used.*/ + struct SPPlugin *host; /* plug-in hosting the suite, to be aquired/released by adapter */ + /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. + No longer used.*/ + const void *suiteProcs; /* returned here if reallocated */ + /** For \c #kSPAdaptersAcquireSuiteHostSelector and \c #kSPAdaptersReleaseSuiteHostSelector. + No longer used.*/ + ai::int32 acquired; /* returned here */ + + /** For \c #kSPAdaptersSendMessageSelector. + The caller to pass to the adapted plug-in. */ + const char *plugin_caller; + /** For \c #kSPAdaptersSendMessageSelector. + The selector to pass to the adapted plug-in. */ + const char *plugin_selector; + /** For \c #kSPAdaptersSendMessageSelector. + The message to pass to the adapted plug-in. */ + void *plugin_message; +} SPAdaptersMessage; + +/** A string pool structure. See \c #SPStringsSuite. */ +struct SPStringPool; + +/******************************************************************************* + ** + ** Suite + ** + **/ +/** @ingroup Suites + An adapter is an interface between the PICA plug-in manager and + an individual plug-in. PICA and application plug-ins are hosted by + internal PICA adapters. Plug-ins can add other adapters to PICA's + \e adapter \e list, allowing non-PICA plug-ins to run under the PICA API. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPAdaptersSuite and \c #kSPAdaptersSuiteVersion. + + An adapter searches the PICA \e file \e list (\c #kSPRuntimeFileList) + for plug-ins types that it supports, and adds them to the \e plug-in \e list + (\c #kSPRuntimePluginList). When notified by PICA to do so, the adapter is + responsible for loading and calling the plug-ins it adds, and must + do any conversion of messages, data structures or other API elements. + An adapter can be used to update + + There are always at least two adapters, the internal adapters for PICA + and for the application, in the global adapter list (\c #kSPRuntimeAdapterList). + The internal adapters translate any legacy function calls into those + currently supported by PICA and the application. + + You can provide an adapter for backward compatibility with older + versions of your own plug-ins, or to interpret your own file types. + To make an adapter available for your plug-in, add it in response to the + \c #kSPAdaptersRegisterPluginsSelector when your plug-in is loaded. + + You can also use this suite to create and maintain your own adapter list, + in addition to the global list. + + Use the adapter to load and call the adapted plug-in. For example, to + verify that a message could be sent to a plug-in: +@code +SPErr error; +SPPluginRef pluginToCall; +SPAdapterRef pluginsAdapter; +char *adapterName; +long adapterVersion; + +error = sSPPlugins->GetPluginAdapter( pluginToCall, &pluginsAdapter ); +error = sSPAdapters->GetAdapterName( pluginsAdapter, &adapterName ); +if ( strcmp( adapterName, kSPSweetPea2Adapter ) == 0 ) { + // it is a PICA plug-in, call it as such with sSPInterface. + } else if ( strcmp( adapterName, "MYAPP Legacy Plug-in Adapter" ) == 0 ) { + // it is an adapted plug-in, call it with the adapterÕs + // interface suite + error = sSPAdapters->GetAdapterVersion( pluginsAdapter, &adapterVersion ); + if ( adapterVersion == 1 ) { + // use one hypothetical interface suite + } else if ( adapterVersion == 2) { + // use another hypothetical interface suite + } + } +@endcode +*/ +typedef struct SPAdaptersSuite { + + /** Allocates a new list of adapters. You can keep your own list, + or obtain the global list with \c #SPRuntimeSuite::GetRuntimeAdapterList(). + @param stringPool The string pool in which to keep adapter names. + @param adapterList [out] A buffer in which to return the new list object. + */ + SPAPI SPErr (*AllocateAdapterList)( struct SPStringPool *stringPool, SPAdapterListRef *adapterList ); + /** Frees a list of adapters allocated with \c #AllocateAdapterList(), and + also frees any entries in the list. Do not free the global list (\c #kSPRuntimeAdapterList). + @param adapterList The adapter list object. + */ + SPAPI SPErr (*FreeAdapterList)( SPAdapterListRef adapterList ); + /** Creates a new adapter object and adds it to an adapter list. Do this in + response to the \c #kSPAdaptersRegisterPluginsSelector message. + @param adapterList The adapter list object, or \c NULL to use the + global list. + @param host This plug-in object, for which the adapter is responsible. + @param name The unique, identifying name of the adapter. + @param version The version number of the adapter. Only the latest version + of any adapter is used to start up plug-ins. + @param adapter [out] A buffer in which to return the new adapter object, or + \c NULL if you add only one adapter. If you add more than one adapter, + compare this to \c #SPAdaptersMessage::adapter to determine which handler to use. + @see \c #AllocateAdapterList() + */ + SPAPI SPErr (*AddAdapter)( SPAdapterListRef adapterList, struct SPPlugin *host, const char *name, + ai::int32 version, SPAdapterRef *adapter ); + + /** Retrieves an adapter by name. + @param adapterList The adapter list object, or \c NULL to use the + global list. + @param name The unique, identifying name of the adapter. + @param adapter [out] A buffer in which to return the adapter object. + */ + SPAPI SPErr (*SPFindAdapter)( SPAdapterListRef adapterList, const char *name, SPAdapterRef *adapter ); + + /** Creates an iterator object with which to traverse an adapter list. + The iterator is initially set to the first adapter in the list. + @param adapterList The adapter list object, or \c NULL to use the + global list. + @param iter [out] A buffer in which to return the new iterator object. + @see \c #NextAdapter(), \c #DeleteAdapterListIterator() + */ + SPAPI SPErr (*NewAdapterListIterator)( SPAdapterListRef adapterList, SPAdapterListIteratorRef *iter ); + /** Retrieves the current adapter and advances an adapter-list iterator to the + next adapter in the list. + @param iter The adapter-list iterator object. + @param adapter [out] A buffer in which to return the current adapter object, \c NULL + if the end of the list has been reached. + @see \c #NewAdapterListIterator(), + */ + SPAPI SPErr (*NextAdapter)( SPAdapterListIteratorRef iter, SPAdapterRef *adapter ); + /** Frees an adapter-list iterator that is no longer needed. + @param iter The adapter-list iterator object. + @see \c #NewAdapterListIterator(), + */ + SPAPI SPErr (*DeleteAdapterListIterator)( SPAdapterListIteratorRef iter ); + + /** Retrieves the plug-in that an adapter manages. + @param adapter The adapter object. + @param plug-in [out] A buffer in which to return the plug-in object. + */ + SPAPI SPErr (*GetAdapterHost)( SPAdapterRef adapter, struct SPPlugin **plugin ); + /** Retrieves the unique, identifying name of an adapter. + @param adapter The adapter object. + @param name [out] A buffer in which to return the name string. + */ + SPAPI SPErr (*GetAdapterName)( SPAdapterRef adapter, const char **name ); + /** Retrieves the version of an adapter. + @param adapter The adapter object. + @param version [out] A buffer in which to return the version number. + */ + SPAPI SPErr (*GetAdapterVersion)( SPAdapterRef adapter, ai::int32 *version ); + +} SPAdaptersSuite; + + +/** Internal */ +SPAPI SPErr SPAllocateAdapterList( struct SPStringPool *stringPool, SPAdapterListRef *adapterList ); +/** Internal */ +SPAPI SPErr SPFreeAdapterList( SPAdapterListRef adapterList ); + +/** Internal */ +SPAPI SPErr SPAddAdapter( SPAdapterListRef adapterList, struct SPPlugin *host, const char *name, + ai::int32 version, SPAdapterRef *adapter ); + +/** Internal */ +SPAPI SPErr SPFindAdapter( SPAdapterListRef adapterList, const char *name, SPAdapterRef *adapter ); + +/** Internal */ +SPAPI SPErr SPNewAdapterListIterator( SPAdapterListRef adapterList, SPAdapterListIteratorRef *iter ); +/** Internal */ +SPAPI SPErr SPNextAdapter( SPAdapterListIteratorRef iter, SPAdapterRef *adapter ); +/** Internal */ +SPAPI SPErr SPDeleteAdapterListIterator( SPAdapterListIteratorRef iter ); + +/** Internal */ +SPAPI SPErr SPGetAdapterHost( SPAdapterRef adapter, struct SPPlugin **plugin ); +/** Internal */ +SPAPI SPErr SPGetAdapterName( SPAdapterRef adapter, const char **name ); +/** Internal */ +SPAPI SPErr SPGetAdapterVersion( SPAdapterRef adapter, ai::int32 *version ); + + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBasic.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBasic.h index f0bbf1b..4fdb448 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBasic.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBasic.h @@ -1,195 +1,204 @@ -/***********************************************************************/ -/* */ -/* SPBasic.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPBasic__ -#define __SPBasic__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "AIBasicTypes.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** PICA basic suite name */ -#define kSPBasicSuite "SP Basic Suite" -/** PICA basic suite version */ -#define kSPBasicSuiteVersion 4 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides basic memory management for PICA (the Adobe plug-in manager) - and defines the basic functions for acquiring and releasing other suites. - - A suite consists of a list of function pointers. The application, or a - plug-in that loads a suite, provides valid pointers when the suite is - acquired. When a suite is not available, the pointers are set to the - address of the \c #Undefined() function. - - Do not attempt to acquire a suite (other than the \c #SPBlocksSuite) - in response to a PICA access (\c #kSPAccessCaller) or property - (\c #kSPPropertiesCaller) message. Most suites are unavailable - during these load and unload operations. - - You can acquire all the suites you will need when your plug-in is first - loaded, as long as you release them before your plug-in is unloaded. - At shutdown, however, it is most efficient to acquire only those - suites explicitly needed to shut down; for example, to free memory - and save preferences. - - The \c SPBasicSuite itself is a part of the message data passed - to your plug-in with any call. To access it from the message data structure: - @code - SPBasicSuite sBasic = message->d.basic; - sBasic->function( ) - @endcode - */ -typedef struct SPBasicSuite { - /** Acquires a function suite. Loads the suite if necessary, - and increments its reference count. For example: - @code -SPErr error; -SPBasicSuite *sBasic = message->d.basic; -AIRandomSuite *sRandom; -sBasic->AcquireSuite( kAIRandomSuite, kAIRandomVersion, &sRandom ); - @endcode - @param name The suite name. - @param version The suite version number. - @param suite [out] A buffer in which to return the suite pointer. - @see \c #SPSuitesSuite::AcquireSuite() - */ - SPAPI SPErr (*AcquireSuite)( const char *name, ai::int32 version, const void **suite ); - /** Decrements the reference count of a suite and unloads it when the - reference count reaches 0. - @param name The suite name. - @param version The suite version number. - */ - SPAPI SPErr (*ReleaseSuite)( const char *name, ai::int32 version ); - /** Compares two strings for equality. - @param token1 The first null-terminated string. - @param token2 The second null-terminated string. - @return True if the strings are the same, false otherwise. - */ - SPAPI SPBoolean (*IsEqual)( const char *token1, const char *token2 ); - /** Allocates a block of memory. - @param size The number of bytes. - @param block [out] A buffer in which to return the block pointer. - @see \c #SPBlocksSuite::AllocateBlock() - */ - SPAPI SPErr (*AllocateBlock)( size_t size, void **block ); - /** Frees a block of memory allocated with \c #AllocateBlock(). - @param block The block pointer. - @see \c #SPBlocksSuite::FreeBlock() - */ - SPAPI SPErr (*FreeBlock)( void *block ); - /** Reallocates a block previously allocated with \c #AllocateBlock(). - Increases the size without changing the location, if possible. - @param block The block pointer. - @param newSize The new number of bytes. - @param newblock [out] A buffer in which to return the new block pointer. - @see \c #SPBlocksSuite::ReallocateBlock() - */ - SPAPI SPErr (*ReallocateBlock)( void *block, size_t newSize, void **newblock ); - /** A function pointer for unloaded suites. This is a protective measure - against other plug-ins that may mistakenly use the suite after they have - released it. - - A plug-in that exports a suite should unload the suite's procedure pointers - when it is unloaded, and restore them when the plug-in is reloaded. - \li On unload, replace the suite's procedure pointers - with the address of this function. - \li On reload, restore the suite's procedure - pointers with the updated addresses of their functions. - - For example: - @code - SPErr UnloadSuite( MySuite *mySuite, SPAccessMessage *message ) { - mySuite->functionA = (void *) message->d.basic->Undefined; - mySuite->functionB = (void *) message->d.basic->Undefined; - } - - SPErr ReloadSuite( MySuite *mySuite, SPAccessMessage *message ) { - mySuite->functionA = functionA; - mySuite->functionB = functionB; - } - @endcode - */ - SPAPI SPErr (*Undefined)( void ); - -} SPBasicSuite; - - -/** Internal */ -SPAPI SPErr SPBasicAcquireSuite( const char *name, ai::int32 version, const void **suite ); -/** Internal */ -SPAPI SPErr SPBasicReleaseSuite( const char *name, ai::int32 version ); -/** Internal */ -SPAPI SPBoolean SPBasicIsEqual( const char *token1, const char *token2 ); -/** Internal */ -SPAPI SPErr SPBasicAllocateBlock( size_t size, void **block ); -/** Internal */ -SPAPI SPErr SPBasicFreeBlock( void *block ); -/** Internal */ -SPAPI SPErr SPBasicReallocateBlock( void *block, size_t newSize, void **newblock ); -/** Internal */ -SPAPI SPErr SPBasicUndefined( void ); -/** Internal */ -SPAPI SPErr SPSubAllocateBlock( size_t size, void **block ); -/** Internal */ -SPAPI SPErr SPSubFreeBlock( void *block ); -/** Internal */ -SPAPI SPErr SPSubReallocateBlock( void *block, size_t newSize, void **newblock ); - - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPBasic.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPBasic__ +#define __SPBasic__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "AIBasicTypes.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** PICA basic suite name */ +#define kSPBasicSuite "SP Basic Suite" +/** PICA basic suite version */ +#define kSPBasicSuiteVersion 4 + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides basic memory management for PICA (the Adobe plug-in manager) + and defines the basic functions for acquiring and releasing other suites. + + A suite consists of a list of function pointers. The application, or a + plug-in that loads a suite, provides valid pointers when the suite is + acquired. When a suite is not available, the pointers are set to the + address of the \c #Undefined() function. + + Do not attempt to acquire a suite (other than the \c #SPBlocksSuite) + in response to a PICA access (\c #kSPAccessCaller) or property + (\c #kSPPropertiesCaller) message. Most suites are unavailable + during these load and unload operations. + + You can acquire all the suites you will need when your plug-in is first + loaded, as long as you release them before your plug-in is unloaded. + At shutdown, however, it is most efficient to acquire only those + suites explicitly needed to shut down; for example, to free memory + and save preferences. + + The \c SPBasicSuite itself is a part of the message data passed + to your plug-in with any call. To access it from the message data structure: + @code + SPBasicSuite sBasic = message->d.basic; + sBasic->function( ) + @endcode + */ +typedef struct SPBasicSuite { + /** Acquires a function suite. Loads the suite if necessary, + and increments its reference count. For example: + @code +SPErr error; +SPBasicSuite *sBasic = message->d.basic; +AIRandomSuite *sRandom; +sBasic->AcquireSuite( kAIRandomSuite, kAIRandomVersion, &sRandom ); + @endcode + @param name The suite name. + @param version The suite version number. + @param suite [out] A buffer in which to return the suite pointer. + @see \c #SPSuitesSuite::AcquireSuite() + */ + SPAPI SPErr (*AcquireSuite)( const char *name, ai::int32 version, const void **suite ); + /** Decrements the reference count of a suite and unloads it when the + reference count reaches 0. + @param name The suite name. + @param version The suite version number. + */ + SPAPI SPErr (*ReleaseSuite)( const char *name, ai::int32 version ); + /** Compares two strings for equality. + @param token1 The first null-terminated string. + @param token2 The second null-terminated string. + @return True if the strings are the same, false otherwise. + */ + SPAPI SPBoolean (*IsEqual)( const char *token1, const char *token2 ); + /** Allocates a block of memory. + @param size The number of bytes. + @param block [out] A buffer in which to return the block pointer. + @see \c #SPBlocksSuite::AllocateBlock() + */ + SPAPI SPErr (*AllocateBlock)( size_t size, void **block ); + /** Frees a block of memory allocated with \c #AllocateBlock(). + @param block The block pointer. + @see \c #SPBlocksSuite::FreeBlock() + */ + SPAPI SPErr (*FreeBlock)( void *block ); + /** Reallocates a block previously allocated with \c #AllocateBlock(). + Increases the size without changing the location, if possible. + @param block The block pointer. + @param newSize The new number of bytes. + @param newblock [out] A buffer in which to return the new block pointer. + @see \c #SPBlocksSuite::ReallocateBlock() + */ + SPAPI SPErr (*ReallocateBlock)( void *block, size_t newSize, void **newblock ); + /** A function pointer for unloaded suites. This is a protective measure + against other plug-ins that may mistakenly use the suite after they have + released it. + + A plug-in that exports a suite should unload the suite's procedure pointers + when it is unloaded, and restore them when the plug-in is reloaded. + \li On unload, replace the suite's procedure pointers + with the address of this function. + \li On reload, restore the suite's procedure + pointers with the updated addresses of their functions. + + For example: + @code + SPErr UnloadSuite( MySuite *mySuite, SPAccessMessage *message ) { + mySuite->functionA = (void *) message->d.basic->Undefined; + mySuite->functionB = (void *) message->d.basic->Undefined; + } + + SPErr ReloadSuite( MySuite *mySuite, SPAccessMessage *message ) { + mySuite->functionA = functionA; + mySuite->functionB = functionB; + } + @endcode + */ + SPAPI SPErr (*Undefined)( void ); + +} SPBasicSuite; + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +#include "SPHeaderEnd.h" + + +#ifdef __cplusplus + +namespace ai +{ + +/** Internal */ +SPAPI SPErr SPBasicAcquireSuite( const char *name, ai::int32 version, const void **suite ); +/** Internal */ +SPAPI SPErr SPBasicReleaseSuite( const char *name, ai::int32 version ); +/** Internal */ +SPAPI SPBoolean SPBasicIsEqual( const char *token1, const char *token2 ); +/** Internal */ +SPAPI SPErr SPBasicAllocateBlock( size_t size, void **block ); +/** Internal */ +SPAPI SPErr SPBasicFreeBlock( void *block ); +/** Internal */ +SPAPI SPErr SPBasicReallocateBlock( void *block, size_t newSize, void **newblock ); +/** Internal */ +SPAPI SPErr SPBasicUndefined( void ); +/** Internal */ +SPAPI SPErr SPSubAllocateBlock( size_t size, void **block ); +/** Internal */ +SPAPI SPErr SPSubFreeBlock( void *block ); +/** Internal */ +SPAPI SPErr SPSubReallocateBlock( void *block, size_t newSize, void **newblock ); + +} // namespace ai + +#endif // __cplusplus + +#endif // __SPBasic__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBckDbg.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBckDbg.h index c09ede7..1dcaa12 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBckDbg.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBckDbg.h @@ -1,123 +1,123 @@ -/***********************************************************************/ -/* */ -/* SPBckDbg.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPBlockDebug__ -#define __SPBlockDebug__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "AIBasicTypes.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** SPBlockDebug suite name */ -#define kSPBlockDebugSuite "SP Block Debug Suite" -/** SPBlockDebug suite version */ -#define kSPBlockDebugSuiteVersion 2 - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite provides basic debugging capability for blocks of memory - allocated with the \c #SPBlocksSuite. Debugging can only be enabled - in the development environment. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPBlockDebugSuite and \c #kSPBlockDebugSuiteVersion. - */ -typedef struct SPBlockDebugSuite { - /** Reports whether block debugging is enabled. - @param enabled [out] A buffer in which to return 1 if debugging - is enabled, 0 otherwise. - */ - SPAPI SPErr (*GetBlockDebugEnabled)( ai::int32 *enabled ); - /** Turns debugging on or off. - @param debug 1 to turn debugging on, 0 to turn it off. - */ - SPAPI SPErr (*SetBlockDebugEnabled)( ai::int32 debug ); - /** Retrieves the first block of memory allocated. Use with \c #GetNextBlock() - to iterate through all allocated blocks. - @param block [out] A buffer in which to return the block pointer. - */ - SPAPI SPErr (*GetFirstBlock)( void **block ); - /** Retrieves the block of memory allocated immediately after a given block. - Use with \c #GetFirstBlock() to iterate through all allocated blocks. - @param block The current block pointer - @param nextblock [out] A buffer in which to return the next block pointer. - */ - SPAPI SPErr (*GetNextBlock)( void *block, void **nextblock ); - /** Retrieves the debugging tag assigned to a block of memory when it - was allocated or reallocated. - @param block The block pointer. - @param debug [out] A buffer in which to return the tag string. - @see \c #SPBlocksSuite::AllocateBlock(), \c #SPBlocksSuite::ReallocateBlock() - */ - SPAPI SPErr (*GetBlockDebug)( void *block, const char **debug ); - -} SPBlockDebugSuite; - - -/** Internal */ -SPAPI SPErr SPGetBlockDebugEnabled( ai::int32 *enabled ); -/** Internal */ -SPAPI SPErr SPSetBlockDebugEnabled( ai::int32 debug ); -/** Internal */ -SPAPI SPErr SPGetFirstBlock( void **block ); -/** Internal */ -SPAPI SPErr SPGetNextBlock( void *block, void **nextblock ); -/** Internal */ -SPAPI SPErr SPGetBlockDebug( void *block, const char **debug ); - - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPBckDbg.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPBlockDebug__ +#define __SPBlockDebug__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "AIBasicTypes.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** SPBlockDebug suite name */ +#define kSPBlockDebugSuite "SP Block Debug Suite" +/** SPBlockDebug suite version */ +#define kSPBlockDebugSuiteVersion 2 + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite provides basic debugging capability for blocks of memory + allocated with the \c #SPBlocksSuite. Debugging can only be enabled + in the development environment. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPBlockDebugSuite and \c #kSPBlockDebugSuiteVersion. + */ +typedef struct SPBlockDebugSuite { + /** Reports whether block debugging is enabled. + @param enabled [out] A buffer in which to return 1 if debugging + is enabled, 0 otherwise. + */ + SPAPI SPErr (*GetBlockDebugEnabled)( ai::int32 *enabled ); + /** Turns debugging on or off. + @param debug 1 to turn debugging on, 0 to turn it off. + */ + SPAPI SPErr (*SetBlockDebugEnabled)( ai::int32 debug ); + /** Retrieves the first block of memory allocated. Use with \c #GetNextBlock() + to iterate through all allocated blocks. + @param block [out] A buffer in which to return the block pointer. + */ + SPAPI SPErr (*GetFirstBlock)( void **block ); + /** Retrieves the block of memory allocated immediately after a given block. + Use with \c #GetFirstBlock() to iterate through all allocated blocks. + @param block The current block pointer + @param nextblock [out] A buffer in which to return the next block pointer. + */ + SPAPI SPErr (*GetNextBlock)( void *block, void **nextblock ); + /** Retrieves the debugging tag assigned to a block of memory when it + was allocated or reallocated. + @param block The block pointer. + @param debug [out] A buffer in which to return the tag string. + @see \c #SPBlocksSuite::AllocateBlock(), \c #SPBlocksSuite::ReallocateBlock() + */ + SPAPI SPErr (*GetBlockDebug)( void *block, const char **debug ); + +} SPBlockDebugSuite; + + +/** Internal */ +SPAPI SPErr SPGetBlockDebugEnabled( ai::int32 *enabled ); +/** Internal */ +SPAPI SPErr SPSetBlockDebugEnabled( ai::int32 debug ); +/** Internal */ +SPAPI SPErr SPGetFirstBlock( void **block ); +/** Internal */ +SPAPI SPErr SPGetNextBlock( void *block, void **nextblock ); +/** Internal */ +SPAPI SPErr SPGetBlockDebug( void *block, const char **debug ); + + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBlocks.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBlocks.h index 48315a4..cf8cdfe 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBlocks.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPBlocks.h @@ -1,119 +1,119 @@ -/***********************************************************************/ -/* */ -/* SPBlocks.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPBlocks__ -#define __SPBlocks__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** SPBlocks suite name */ -#define kSPBlocksSuite "SP Blocks Suite" -/** SPBlocks suite version */ -#define kSPBlocksSuiteVersion 2 - - -/******************************************************************************* - ** - ** Suite - ** - **/ -/** @ingroup Suites - This suite provides basic memory management for PICA (the Adobe plug-in manager), - with debugging capability for the development version of the application. - - Unlike other suites, this suite is available during plug-in load and unload operations. - You can acquire it in response to a PICA access (\c #kSPAccessCaller) or property - (\c #kSPPropertiesCaller) message, and use it to allocate and free memory - for the plug-in you are loading or unloading. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPBlocksSuite and \c #kSPBlocksSuiteVersion. - */ -typedef struct SPBlocksSuite { - - /** Allocates a block of memory. - @param size The number of bytes. - @param debug Optional. A tag for the block, available in the - development version of the application. Otherwise ignored. - See \c #SPBlockDebugSuite::GetBlockDebug(). - @param block [out] A buffer in which to return the block pointer. - @see \c #SPBasicSuite::AllocateBlock() - */ - SPAPI SPErr (*AllocateBlock)( size_t size, const char *debug, void **block ); - /** Frees a block of memory allocated with \c #AllocateBlock(). - @param block The block pointer. - @see \c #SPBasicSuite::FreeBlock() - */ - SPAPI SPErr (*FreeBlock)( void *block ); - /** Reallocates a block previously allocated with \c #AllocateBlock(). - Increases the size without changing the location, if possible. - @param block The block pointer. - @param newSize The new number of bytes. - @param debug Optional. A tag for the block, available in the - development version of the application. Otherwise ignored. - See \c #SPBlockDebugSuite::GetBlockDebug(). - @param newblock [out] A buffer in which to return the new block pointer. - @see \c #SPBasicSuite::ReallocateBlock() - */ - SPAPI SPErr (*ReallocateBlock)( void *block, size_t newSize, const char *debug, void **rblock ); - -} SPBlocksSuite; - -/** Internal */ -SPAPI SPErr SPAllocateBlock( size_t size, const char *debug, void **block ); -/** Internal */ -SPAPI SPErr SPFreeBlock( void *block ); -/** Internal */ -SPAPI SPErr SPReallocateBlock( void *block, size_t newSize, const char *debug, void **rblock ); - - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPBlocks.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPBlocks__ +#define __SPBlocks__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** SPBlocks suite name */ +#define kSPBlocksSuite "SP Blocks Suite" +/** SPBlocks suite version */ +#define kSPBlocksSuiteVersion 2 + + +/******************************************************************************* + ** + ** Suite + ** + **/ +/** @ingroup Suites + This suite provides basic memory management for PICA (the Adobe plug-in manager), + with debugging capability for the development version of the application. + + Unlike other suites, this suite is available during plug-in load and unload operations. + You can acquire it in response to a PICA access (\c #kSPAccessCaller) or property + (\c #kSPPropertiesCaller) message, and use it to allocate and free memory + for the plug-in you are loading or unloading. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPBlocksSuite and \c #kSPBlocksSuiteVersion. + */ +typedef struct SPBlocksSuite { + + /** Allocates a block of memory. + @param size The number of bytes. + @param debug Optional. A tag for the block, available in the + development version of the application. Otherwise ignored. + See \c #SPBlockDebugSuite::GetBlockDebug(). + @param block [out] A buffer in which to return the block pointer. + @see \c #SPBasicSuite::AllocateBlock() + */ + SPAPI SPErr (*AllocateBlock)( size_t size, const char *debug, void **block ); + /** Frees a block of memory allocated with \c #AllocateBlock(). + @param block The block pointer. + @see \c #SPBasicSuite::FreeBlock() + */ + SPAPI SPErr (*FreeBlock)( void *block ); + /** Reallocates a block previously allocated with \c #AllocateBlock(). + Increases the size without changing the location, if possible. + @param block The block pointer. + @param newSize The new number of bytes. + @param debug Optional. A tag for the block, available in the + development version of the application. Otherwise ignored. + See \c #SPBlockDebugSuite::GetBlockDebug(). + @param newblock [out] A buffer in which to return the new block pointer. + @see \c #SPBasicSuite::ReallocateBlock() + */ + SPAPI SPErr (*ReallocateBlock)( void *block, size_t newSize, const char *debug, void **rblock ); + +} SPBlocksSuite; + +/** Internal */ +SPAPI SPErr SPAllocateBlock( size_t size, const char *debug, void **block ); +/** Internal */ +SPAPI SPErr SPFreeBlock( void *block ); +/** Internal */ +SPAPI SPErr SPReallocateBlock( void *block, size_t newSize, const char *debug, void **rblock ); + + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPCaches.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPCaches.h index e9f5652..7f6b8a7 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPCaches.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPCaches.h @@ -1,134 +1,134 @@ -/***********************************************************************/ -/* */ -/* SPCaches.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPCaches__ -#define __SPCaches__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPMData.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** Cache suite name */ -#define kSPCachesSuite "SP Caches Suite" -/** Cache suite version */ -#define kSPCachesSuiteVersion 2 - -/* To receive these, an PIConditionalMessages property must be present - * with the PIAcceptsPurgeCachesMessage flag set. */ -/** @ingroup Callers - The cache management caller. See \c #SPCachesSuite */ -#define kSPCacheCaller "SP Cache" -/** @ingroup Selectors - Received by plug-in adapters with the \c #PIAcceptsPurgeCachesMessage flag set - in the \c #PIConditionalMessages property, when a call has - been made to \c #SPCachesSuite::SPFlushCaches(). Accompanied by - the \c #SPPurgeCachesMessage. - @see \c #SPAdaptersSuite, \c #kSPAdaptersDisposeInfoSelector - */ -#define kSPPluginPurgeCachesSelector "Plug-in Purge" - -// The plug-in should return one of these two responses when it receives the kSPPluginPurgeCachesSelector -// <> -//#define kSPPluginCachesFlushResponse 'pFls' -//#define kSPPluginCouldntFlushResponse kSPNoError; -#include "SPErrorCodes.h" - -/******************************************************************************* - ** - ** Types - ** - **/ -/** Prototype for the cache-flushing procedure an adapter calls in response to the - \c #kSPAdaptersDisposeInfoSelector, to determine which plug-ins to unload, - and inform the caller of whether its managed plug-in have been unloaded. - @param type The plug-in type, as set by the adapter. For PICA plug-ins, this type - is \c #kSPFlushAccessType. - @param data A pointer to the adapter-defined plug-in data. For PICA plug-ins, this - data is an \c #SPAccessRef. - @param flushed [out] A buffer in which to return the result, - the number of plug-ins actually unloaded. - */ -typedef SPErr (*SPFlushCachesProc)( const char *type, void *data, ai::int32 *flushed ); - -/** Message passed with the \c #kSPPluginPurgeCachesSelector. */ -typedef struct SPPurgeCachesMessage { - /** The message data. */ - SPMessageData d; -} SPPurgeCachesMessage; - - -/******************************************************************************* - ** - ** Suite - ** - **/ -/** @ingroup Suites - This suite allows you to manage PICA cache memory. - - PICA plug-ins are intended to move in and out of memory (cache) as necessary, - to allow a small memory footprint. By default, PICA keeps loaded plug-ins in - cache until the application heap has been filled, and then unloads them. - Beyond this simple strategy, the application and plug-ins can use this - function to unload plug-ins when needed. Plug-ins do not typically need - to do this. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPCachesSuite and \c #kSPCachesSuiteVersion. -*/ -typedef struct SPCachesSuite { - /** Sends a message to all plug-in adapters telling them to unload any - unused plug-ins from memory. - @param flushProc The procedure the adapter uses to determine which - plug-ins to unload. - @param flushed [out] A buffer in which to return the result of the - procedure calls, the total number of plug-ins actually unloaded. - */ - SPAPI SPErr (*SPFlushCaches)( SPFlushCachesProc flushProc, ai::int32 *flushed ); - -} SPCachesSuite; - -/** Internal */ -SPAPI SPErr SPFlushCaches( SPFlushCachesProc flushProc, ai::int32 *flushed ); - - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPCaches.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPCaches__ +#define __SPCaches__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPMData.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** Cache suite name */ +#define kSPCachesSuite "SP Caches Suite" +/** Cache suite version */ +#define kSPCachesSuiteVersion 2 + +/* To receive these, an PIConditionalMessages property must be present + * with the PIAcceptsPurgeCachesMessage flag set. */ +/** @ingroup Callers + The cache management caller. See \c #SPCachesSuite */ +#define kSPCacheCaller "SP Cache" +/** @ingroup Selectors + Received by plug-in adapters with the \c #PIAcceptsPurgeCachesMessage flag set + in the \c #PIConditionalMessages property, when a call has + been made to \c #SPCachesSuite::SPFlushCaches(). Accompanied by + the \c #SPPurgeCachesMessage. + @see \c #SPAdaptersSuite, \c #kSPAdaptersDisposeInfoSelector + */ +#define kSPPluginPurgeCachesSelector "Plug-in Purge" + +// The plug-in should return one of these two responses when it receives the kSPPluginPurgeCachesSelector +// <> +//#define kSPPluginCachesFlushResponse 'pFls' +//#define kSPPluginCouldntFlushResponse kSPNoError; +#include "SPErrorCodes.h" + +/******************************************************************************* + ** + ** Types + ** + **/ +/** Prototype for the cache-flushing procedure an adapter calls in response to the + \c #kSPAdaptersDisposeInfoSelector, to determine which plug-ins to unload, + and inform the caller of whether its managed plug-in have been unloaded. + @param type The plug-in type, as set by the adapter. For PICA plug-ins, this type + is \c #kSPFlushAccessType. + @param data A pointer to the adapter-defined plug-in data. For PICA plug-ins, this + data is an \c #SPAccessRef. + @param flushed [out] A buffer in which to return the result, + the number of plug-ins actually unloaded. + */ +typedef SPErr (*SPFlushCachesProc)( const char *type, void *data, ai::int32 *flushed ); + +/** Message passed with the \c #kSPPluginPurgeCachesSelector. */ +typedef struct SPPurgeCachesMessage { + /** The message data. */ + SPMessageData d; +} SPPurgeCachesMessage; + + +/******************************************************************************* + ** + ** Suite + ** + **/ +/** @ingroup Suites + This suite allows you to manage PICA cache memory. + + PICA plug-ins are intended to move in and out of memory (cache) as necessary, + to allow a small memory footprint. By default, PICA keeps loaded plug-ins in + cache until the application heap has been filled, and then unloads them. + Beyond this simple strategy, the application and plug-ins can use this + function to unload plug-ins when needed. Plug-ins do not typically need + to do this. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPCachesSuite and \c #kSPCachesSuiteVersion. +*/ +typedef struct SPCachesSuite { + /** Sends a message to all plug-in adapters telling them to unload any + unused plug-ins from memory. + @param flushProc The procedure the adapter uses to determine which + plug-ins to unload. + @param flushed [out] A buffer in which to return the result of the + procedure calls, the total number of plug-ins actually unloaded. + */ + SPAPI SPErr (*SPFlushCaches)( SPFlushCachesProc flushProc, ai::int32 *flushed ); + +} SPCachesSuite; + +/** Internal */ +SPAPI SPErr SPFlushCaches( SPFlushCachesProc flushProc, ai::int32 *flushed ); + + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPConfig.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPConfig.h index 393f221..c87c149 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPConfig.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPConfig.h @@ -1,84 +1,92 @@ -/***********************************************************************/ -/* */ -/* SPConfig.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -/** - - SPConfig.h is the environment configuration file for Sweet Pea. It - defines MAC_ENV or WIN_ENV. These are used to control platform-specific - sections of code. - - **/ - -#ifndef __SPCnfig__ -#define __SPCnfig__ - -/* - * Defines for Metrowerks - */ -#if defined (__MWERKS__) - #if defined (__POWERPC__) - #ifndef MAC_ENV - #define MAC_ENV 1 - #endif - #endif - #if defined (__INTEL__) - #ifndef WIN_ENV - #define WIN_ENV 1 - #endif - #endif -#endif - -/* - * Defines for GNU - */ -#if defined(__GNUC__) - #if ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) ) - #ifndef MAC_ENV - #define MAC_ENV 1 - #endif - #endif - #if defined (__INTEL__) - #ifndef WIN_ENV - #define WIN_ENV 1 - #endif - #endif -#endif - -/* - * Defines for Visual C++ on Windows. - */ -#ifdef _MSC_VER - #ifndef WIN_ENV - #define WIN_ENV 1 - #endif -#endif - -/* - * Make certain that one and only one of the platform constants is defined. - */ - -#if !defined(WIN_ENV) && !defined(MAC_ENV) - #error -#endif - -#if defined(WIN_ENV) && defined(MAC_ENV) - #error -#endif - -#endif +/***********************************************************************/ +/* */ +/* SPConfig.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +/** + + SPConfig.h is the environment configuration file for Sweet Pea. It + defines MAC_ENV/WIN_ENV/IOS_ENV/LINUX_ENV. These are used to control platform-specific + sections of code. + + **/ + +#ifndef __SPCnfig__ +#define __SPCnfig__ + +/* + * Defines for Metrowerks + */ +#if defined (__MWERKS__) + #if defined (__POWERPC__) + #ifndef MAC_ENV + #define MAC_ENV 1 + #endif + #endif + #if defined (__INTEL__) + #ifndef WIN_ENV + #define WIN_ENV 1 + #endif + #endif +#endif + +/* + * Defines for GNU + */ +#if defined(__GNUC__) + #if ( defined(__APPLE_CPP__) || defined(__APPLE_CC__) ) + #ifndef MAC_ENV + #define MAC_ENV 1 + #endif + #endif + #if defined (__INTEL__) + #ifndef WIN_ENV + #define WIN_ENV 1 + #endif + #endif +#endif + +/* + * Defines for Visual C++ on Windows. + */ +#ifdef _MSC_VER + #ifndef WIN_ENV + #define WIN_ENV 1 + #endif +#endif + +/* + * Make certain that one and only one of the platform constants is defined. + */ + +#if !defined(WIN_ENV) && !defined(MAC_ENV) && !defined(IOS_ENV) && !defined(LINUX_ENV) + #error +#endif + +#if defined(WIN_ENV) && defined(MAC_ENV) + #error +#endif + +#if defined(WIN_ENV) && defined(LINUX_ENV) + #error +#endif + +#if defined(LINUX_ENV) && defined(MAC_ENV) + #error +#endif + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrorCodes.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrorCodes.h index d25e1bc..c213efd 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrorCodes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrorCodes.h @@ -1,165 +1,168 @@ -/***********************************************************************/ -/* */ -/* SPErrorCodes.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - - -/******************************************************************************* - ** - ** General Errors - ** - **/ - -// General errors -#define kASNoError 0x00000000L -#define kASUnimplementedError '!IMP' -#define kASUserCanceledError 'stop' - - -/******************************************************************************* - ** - ** SP Errors - ** - **/ - -// General errors -/** @ingroup Errors - PICA no-error code is \c NULL. All other - PICA errors are strings, except \c #kSPOutOfMemoryError. See \c SPTypes.h. */ -#define kSPNoError 0x00000000 -/** @ingroup Errors - PICA error, applies to all PICA suites. See \c SPTypes.h. */ -#define kSPUnimplementedError '!IMP' -/** @ingroup Errors - PICA error. */ -#define kSPUserCanceledError 'stop' - -// SPAccessSuite errors -/** @ingroup Errors - PICA access error. See \c #SPAccessSuite. */ -#define kSPCantAcquirePluginError '!Acq' -/** @ingroup Errors - PICA access error. See \c #SPAccessSuite. */ -#define kSPCantReleasePluginError '!Rel' -/** @ingroup Errors - PICA access error. See \c #SPAccessSuite. */ -#define kSPPluginAlreadyReleasedError 'AlRl' - -// SPAdaptsSuite errors -/** @ingroup Errors - PICA adapter error. See \c #SPAdaptersSuite */ -#define kSPAdapterAlreadyExistsError 'AdEx' -/** @ingroup Errors - PICA adapter error. See \c #SPAdaptersSuite */ -#define kSPBadAdapterListIteratorError 'BdAL' - -// SPBasicSuite errors -/** @ingroup Errors - Basic PICA error. See \c #SPBasicSuite */ -#define kSPBadParameterError 'Parm' - -// Block debugging errors -/** @ingroup Errors - PICA debugging error. See \c #SPBlockDebugSuite */ -#define kSPCantChangeBlockDebugNowError '!Now' -/** @ingroup Errors - PICA debugging error. See \c #SPBlockDebugSuite */ -#define kSPBlockDebugNotEnabledError '!Nbl' - -// SPBlocks errors -/** @ingroup Errors - PICA memory management error. See \c #SPBlocksSuite */ -#define kSPOutOfMemoryError -108 /* -108, same as Mac memFullErr */ -/** @ingroup Errors - PICA memory management error. See \c #SPBlocksSuite */ -#define kSPBlockSizeOutOfRangeError 'BkRg' - -// SPCaches errors -/** @ingroup Errors - One of two possible responses a plug-in should return when it receives the \c #kSPPluginPurgeCachesSelector. - See \c #SPCachesSuite */ -#define kSPPluginCachesFlushResponse 'pFls' -/** @ingroup Errors - One of two possible responses a plug-in should return when it receives the \c #kSPPluginPurgeCachesSelector. - See \c #SPCachesSuite */ -#define kSPPluginCouldntFlushResponse kSPNoError; - -// SPFiles errors -/** @ingroup Errors - PICA file-access error. See \c #SPFilesSuite */ -#define kSPTroubleAddingFilesError 'TAdd' -/** @ingroup Errors - PICA file-access error. See \c #SPFilesSuite */ -#define kSPBadFileListIteratorError 'BFIt' - -// SPHost errors -/** @ingroup Errors - PICA plug-in start-up error. */ -#define kSPTroubleInitializingError 'TIni' // Some non-descript problem encountered while starting up. -/** @ingroup Errors - PICA plug-in start-up error. */ -#define kHostCanceledStartupPluginsError 'H!St' - -// SPInterface errors -/** @ingroup Errors - PICA interface error. See \c #SPInterfaceSuite */ -#define kSPNotASweetPeaPluginError 'NSPP' -/** @ingroup Errors - PICA interface error. See \c #SPInterfaceSuite */ -#define kSPAlreadyInSPCallerError 'AISC' - -// SPPlugins errors -/** @ingroup Errors - PICA plug-in error. See \c #SPPluginsSuite */ -#define kSPUnknownAdapterError '?Adp' -/** @ingroup Errors - PICA plug-in error. See \c #SPPluginsSuite */ -#define kSPBadPluginListIteratorError 'PiLI' -/** @ingroup Errors - PICA plug-in error. See \c #SPPluginsSuite */ -#define kSPBadPluginHost 'PiH0' -/** @ingroup Errors - PICA plug-in error. See \c #SPPluginsSuite */ -#define kSPCantAddHostPluginError 'AdHo' -/** @ingroup Errors - PICA plug-in error. See \c #SPPluginsSuite */ -#define kSPPluginNotFound 'P!Fd' - -// SPProperties errors -/** @ingroup Errors - PICA properties error. See \c #SPPropertiesSuite */ -#define kSPCorruptPiPLError 'CPPL' -/** @ingroup Errors - PICA properties error. See \c #SPPropertiesSuite */ -#define kSPBadPropertyListIteratorError 'BPrI' - -// SPSuites errors -/** @ingroup Errors - PICA suite access error. See \c #SPSuitesSuite */ -#define kSPSuiteNotFoundError 'S!Fd' -/** @ingroup Errors - PICA suite access error. See \c #SPSuitesSuite */ -#define kSPSuiteAlreadyExistsError 'SExi' -/** @ingroup Errors - PICA suite access error. See \c #SPSuitesSuite */ -#define kSPSuiteAlreadyReleasedError 'SRel' -/** @ingroup Errors - PICA suite access error. See \c #SPSuitesSuite */ -#define kSPBadSuiteListIteratorError 'SLIt' -/** @ingroup Errors - PICA suite access error. See \c #SPSuitesSuite */ -#define kSPBadSuiteInternalVersionError 'SIVs' +/***********************************************************************/ +/* */ +/* SPErrorCodes.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + + +/******************************************************************************* + ** + ** General Errors + ** + **/ + +// General errors +#define kASNoError 0x00000000L +#define kASUnimplementedError '!IMP' +#define kASUserCanceledError 'stop' + + +/******************************************************************************* + ** + ** SP Errors + ** + **/ + +// General errors +/** @ingroup Errors + PICA no-error code is \c NULL. All other + PICA errors are strings, except \c #kSPOutOfMemoryError. See \c SPTypes.h. */ +#define kSPNoError 0x00000000 +/** @ingroup Errors + PICA error, applies to all PICA suites. See \c SPTypes.h. */ +#define kSPUnimplementedError '!IMP' +/** @ingroup Errors + PICA error. */ +#define kSPUserCanceledError 'stop' + +// SPAccessSuite errors +/** @ingroup Errors + PICA access error. See \c #SPAccessSuite. */ +#define kSPCantAcquirePluginError '!Acq' +/** @ingroup Errors + PICA access error. See \c #SPAccessSuite. */ +#define kSPCantReleasePluginError '!Rel' +/** @ingroup Errors + PICA access error. See \c #SPAccessSuite. */ +#define kSPPluginAlreadyReleasedError 'AlRl' +/** @ingroup Errors + PICA access error. See \c #SPAccessSuite */ +#define kSPWrongArchitectureError 'WrAr' + +// SPAdaptsSuite errors +/** @ingroup Errors + PICA adapter error. See \c #SPAdaptersSuite */ +#define kSPAdapterAlreadyExistsError 'AdEx' +/** @ingroup Errors + PICA adapter error. See \c #SPAdaptersSuite */ +#define kSPBadAdapterListIteratorError 'BdAL' + +// SPBasicSuite errors +/** @ingroup Errors + Basic PICA error. See \c #SPBasicSuite */ +#define kSPBadParameterError 'Parm' + +// Block debugging errors +/** @ingroup Errors + PICA debugging error. See \c #SPBlockDebugSuite */ +#define kSPCantChangeBlockDebugNowError '!Now' +/** @ingroup Errors + PICA debugging error. See \c #SPBlockDebugSuite */ +#define kSPBlockDebugNotEnabledError '!Nbl' + +// SPBlocks errors +/** @ingroup Errors + PICA memory management error. See \c #SPBlocksSuite */ +#define kSPOutOfMemoryError -108 /* -108, same as Mac memFullErr */ +/** @ingroup Errors + PICA memory management error. See \c #SPBlocksSuite */ +#define kSPBlockSizeOutOfRangeError 'BkRg' + +// SPCaches errors +/** @ingroup Errors + One of two possible responses a plug-in should return when it receives the \c #kSPPluginPurgeCachesSelector. + See \c #SPCachesSuite */ +#define kSPPluginCachesFlushResponse 'pFls' +/** @ingroup Errors + One of two possible responses a plug-in should return when it receives the \c #kSPPluginPurgeCachesSelector. + See \c #SPCachesSuite */ +#define kSPPluginCouldntFlushResponse kSPNoError; + +// SPFiles errors +/** @ingroup Errors + PICA file-access error. See \c #SPFilesSuite */ +#define kSPTroubleAddingFilesError 'TAdd' +/** @ingroup Errors + PICA file-access error. See \c #SPFilesSuite */ +#define kSPBadFileListIteratorError 'BFIt' + +// SPHost errors +/** @ingroup Errors + PICA plug-in start-up error. */ +#define kSPTroubleInitializingError 'TIni' // Some non-descript problem encountered while starting up. +/** @ingroup Errors + PICA plug-in start-up error. */ +#define kHostCanceledStartupPluginsError 'H!St' + +// SPInterface errors +/** @ingroup Errors + PICA interface error. See \c #SPInterfaceSuite */ +#define kSPNotASweetPeaPluginError 'NSPP' +/** @ingroup Errors + PICA interface error. See \c #SPInterfaceSuite */ +#define kSPAlreadyInSPCallerError 'AISC' + +// SPPlugins errors +/** @ingroup Errors + PICA plug-in error. See \c #SPPluginsSuite */ +#define kSPUnknownAdapterError '?Adp' +/** @ingroup Errors + PICA plug-in error. See \c #SPPluginsSuite */ +#define kSPBadPluginListIteratorError 'PiLI' +/** @ingroup Errors + PICA plug-in error. See \c #SPPluginsSuite */ +#define kSPBadPluginHost 'PiH0' +/** @ingroup Errors + PICA plug-in error. See \c #SPPluginsSuite */ +#define kSPCantAddHostPluginError 'AdHo' +/** @ingroup Errors + PICA plug-in error. See \c #SPPluginsSuite */ +#define kSPPluginNotFound 'P!Fd' + +// SPProperties errors +/** @ingroup Errors + PICA properties error. See \c #SPPropertiesSuite */ +#define kSPCorruptPiPLError 'CPPL' +/** @ingroup Errors + PICA properties error. See \c #SPPropertiesSuite */ +#define kSPBadPropertyListIteratorError 'BPrI' + +// SPSuites errors +/** @ingroup Errors + PICA suite access error. See \c #SPSuitesSuite */ +#define kSPSuiteNotFoundError 'S!Fd' +/** @ingroup Errors + PICA suite access error. See \c #SPSuitesSuite */ +#define kSPSuiteAlreadyExistsError 'SExi' +/** @ingroup Errors + PICA suite access error. See \c #SPSuitesSuite */ +#define kSPSuiteAlreadyReleasedError 'SRel' +/** @ingroup Errors + PICA suite access error. See \c #SPSuitesSuite */ +#define kSPBadSuiteListIteratorError 'SLIt' +/** @ingroup Errors + PICA suite access error. See \c #SPSuitesSuite */ +#define kSPBadSuiteInternalVersionError 'SIVs' diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrors.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrors.h index 14b670a..25c8e5f 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrors.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPErrors.h @@ -1,34 +1,34 @@ -/***********************************************************************/ -/* */ -/* SPErrors.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - - -/******************************************************************************* - ** - ** Errors - ** - **/ -/** @ingroup Errors - PICA access error. See \c #SPAccessSuite. */ -#define kSPCantAcquirePluginError '!Acq' -/** @ingroup Errors - PICA access error. See \c #SPAccessSuite. */ -#define kSPCantReleasePluginError '!Rel' -/** @ingroup Errors - PICA access error. See \c #SPAccessSuite. */ -#define kSPPluginAlreadyReleasedError 'AlRl' +/***********************************************************************/ +/* */ +/* SPErrors.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + + +/******************************************************************************* + ** + ** Errors + ** + **/ +/** @ingroup Errors + PICA access error. See \c #SPAccessSuite. */ +#define kSPCantAcquirePluginError '!Acq' +/** @ingroup Errors + PICA access error. See \c #SPAccessSuite. */ +#define kSPCantReleasePluginError '!Rel' +/** @ingroup Errors + PICA access error. See \c #SPAccessSuite. */ +#define kSPPluginAlreadyReleasedError 'AlRl' diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPFiles.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPFiles.h index 88f4610..883cbdf 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPFiles.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPFiles.h @@ -1,335 +1,335 @@ -/***********************************************************************/ -/* */ -/* SPFiles.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPFiles__ -#define __SPFiles__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPProps.h" - -#include "SPHeaderBegin.h" - -#ifdef WIN_ENV -#include -#endif - -#ifdef __cplusplus -extern "C" { -#endif - - - /******************************************************************************* - ** - ** Constants - ** - **/ - /** Files suite name */ -#define kSPFilesSuite "SP Files Suite" - - -#define kSPFilesSuiteVersion3 3 - -#define kSPFilesSuiteVersion 4 - /** PICA global list of potential plug-in files. - @see \c #SPRuntimeSuite::GetRuntimeFileList() */ -#define kSPRuntimeFileList ((SPFileListRef)NULL) - - - /** Return value for \c #SPFilesSuite::GetFilePropertyList(), - indicating that the file has no property list. */ -#define kFileDoesNotHavePiPL (SPPropertyListRef)(~((size_t)NULL)) - /** Return value for \c #SPFilesSuite::GetFilePropertyList(), - indicating that the file has multiple property lists. - Use \c #SPPluginsSuite::GetPluginPropertyList() to access the - PiPL for each \c #SPPluginRef exported by the file. */ -#define kFileHasMulitplePiPLs NULL - - /******************************************************************************* - ** - ** Types - ** - **/ - - /** The maximum number of characters allowed in a file path specification. */ - - - /** Opaque reference to a file. Access with the \c #SPFilesSuite. */ - typedef struct SPFile *SPFileRef; - /** Opaque reference to a file list. Access with the \c #SPFilesSuite. */ - typedef struct SPFileList *SPFileListRef; - /** Opaque reference to a file-list iterator. Access with the \c #SPFilesSuite. */ - typedef struct SPFileListIterator *SPFileListIteratorRef; - /** Opaque reference to a platform-specific file specification. Access with the \c #SPFilesSuite. */ - typedef struct OpaqueSPPlatformFileRef SPPlatformFileRef; - - -#ifdef MAC_ENV -#define kMaxPathLength 1024 -#pragma options align=power - - - /** A file specification In Mac OS.It is the same as \c FSSpec. */ - typedef struct SPPlatformFileSpecification { - /** The version number (Mac OS). */ - short vRefNum; - /** The unique identifier (Mac OS). */ - ai::int32 parID; - /** The file name string (Mac OS). */ - unsigned char name[64]; - } SPPlatformFileSpecification; - - /** A file reference in terms of a string. This path should be POSIX style path with UTF-8 encoding. - FSRefMakePath can be used to make a path from FSRef and FSPathMakeRef can be used to make FSRef from a POSIX style path.*/ - typedef struct SPPlatformFileReference { - unsigned char path[kMaxPathLength]; //1024 has been taken up from /usr/include/sys/syslimits.h - } SPPlatformFileReference; - -#pragma options align=reset - - /** Platform-specific file metadata. */ - typedef struct SPPlatformFileInfo { /* On Mac OS*/ - /** Not used. */ - ai::uint32 attributes; //Unused, but still required to maintain binary compatibility - /** Date file was created (Mac OS). */ - ai::uint32 creationDate; - /** Data file was last modified (Mac OS). */ - ai::uint32 modificationDate; - /** Type of file for Finder (Mac OS). */ - ai::uint32 finderType; - /** File creator (Mac OS). */ - ai::uint32 finderCreator; - /** File flags for Finder (Mac OS); see Mac OS documentation. */ - ai::uint16 finderFlags; - } SPPlatformFileInfo; - - SPErr FileSpectoFileRef(const SPPlatformFileSpecification *fileSpec, const SPPlatformFileReference *fileRef); // temporary functions used while transition from SPPlatformFileSpecification to SPPlatformFileReference - SPErr FileReftoFileSpec(const SPPlatformFileReference *fileRef, const SPPlatformFileSpecification *fileSpec); -#endif - -#ifdef WIN_ENV -#define kMaxPathLength 300 - /** A file specification in Windows. */ - typedef struct SPPlatformFileSpecification { - /** The file path string (Windows).*/ - char path[kMaxPathLength]; - } SPPlatformFileSpecification; - - //Keeping the structure's type similar to PSinterface, added some additional helper methods. - struct SPPlatformFileSpecificationW { - private: - /** path could be as long as 64K but MUST be NULL terminated. */ - wchar_t path[kMaxPathLength]; - public: - SPPlatformFileSpecificationW() - { - memset (path,0,sizeof(path)); - } - const wchar_t* c_str() const { return path; } - - wchar_t* GetBuffer() {return path;} - }; - - /** Same as SPPlatformFileSpecification on Windows. */ - /** VS_TODO: This is just the initial definition in order to reduce the impact. - We need to get rid of SPPlatformFileSpecification one day. - Also, SPPlatformFileRef is already defined above and it does - not seem to be used anywhere. I think we should remove it. */ - typedef SPPlatformFileSpecificationW SPPlatformFileReference; - - /**Platform-specific file metadata. */ - typedef struct SPPlatformFileInfo { - /** File attribute flags (Windows); see Windows documentation. */ - ai::uint32 attributes; - /** Least-significant byte of the file creation date-time (Windows).*/ - ai::uint32 lowCreationTime; - /** Most-significant byte of the file creation date-time (Windows).*/ - ai::uint32 highCreationTime; - /** Least-significant byte of the file modification date-time (Windows).*/ - ai::uint32 lowModificationTime; - /** Most-significant byte of the file modification date-time (Windows).*/ - ai::uint32 highModificationTime; - /** The file-name extension indicating the file type (Windows). */ - const wchar_t* extension; - } SPPlatformFileInfo; -#endif - - /** Internal */ - typedef SPBoolean (*SPAddPiPLFilterProc)( SPPlatformFileInfo *info ); - - - /******************************************************************************* - ** - ** Suite - ** - **/ - /** @ingroup Suites - This suite allows you to access the PICA files list. This list, created at startup, - contains references to every file in the application's plug-in folder, including - any resolved file and folder aliases. PICA maintains this list, and uses it to find plug-ins. - - Use this suite to access the plug-in file list, in order to avoid redundant directory - scans. Adapters looking for their own plug-ins and PICA plug-ins looking for - support files should scan the list to locate relevant files rather than walking - platform directory structures on their own. - - Similarly, you can use this suite to create, maintain, and access your own lists - of files in a platform-independent and efficient manner. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPFilesSuite and \c #kSPFilesSuiteVersion. - */ - typedef struct SPFilesSuite { - /** Creates a new file list. Typically, you use the main PICA file list to access - plug-in files, available through \c #SPRuntimeSuite::GetRuntimeFileList(). - You can use this to track other file collections. If you create a new list, you - must free it when it is no longer needed, using \c #FreeFileList(). - @param fileList [out] A buffer in which to return the new file list object. - */ - SPAPI SPErr (*AllocateFileList)( SPFileListRef *fileList ); - /** Frees a file list created with \c #AllocateFileList(), and any entries in the list. - @param fileList The file list object. - */ - SPAPI SPErr (*FreeFileList)( SPFileListRef fileList ); - - /** Adds a file or all files in a directory to a file list. Searches a directory - recursively for contained files. - @param fileList The file list object. - @param file The file or directory specification. - */ - SPAPI SPErr (*AddFiles)( SPFileListRef fileList, const SPPlatformFileReference *file ); - - - /** Creates a file-list iterator object to use with \c #NextFile() for iterating - through a file list. The iterator is initially set to the first file in the list. - When the iterator is no longer needed, free it with \c #DeleteFileListIterator(). - @param fileList The file list object. - @param iter [out] A buffer in which to return the new iterator object. - */ - SPAPI SPErr (*NewFileListIterator)( SPFileListRef fileList, SPFileListIteratorRef *iter ); - /** Retrieves the current file from a file list iterator, and advances the iterator. - @param iter The iterator object. - @param file [out] A buffer in which to return the current file object, or \c NULL - if the end of the list has been reached. - */ - SPAPI SPErr (*NextFile)( SPFileListIteratorRef iter, SPFileRef *file ); - /** Frees a file-list iterator created with /c #NewFileListIterator(). - @param iter The iterator object. - */ - SPAPI SPErr (*DeleteFileListIterator)( SPFileListIteratorRef iter ); - /** Retrieves the platform-specific file specification for a file. - @param file The file object. - @param fileSpec [out] A buffer in which to return the file specification. - */ - -#ifdef WIN_ENV - - SPAPI SPErr (*GetFileSpecification) ( SPFileRef file, SPPlatformFileSpecification *fileSpec ); -#endif - SPAPI SPErr (*GetFileReference)( SPFileRef file, SPPlatformFileReference *fileSpec ); - /** Retrieves the metadata for a file. - @param file The file object. - @param info [out] A buffer in which to return the file information. - */ - SPAPI SPErr (*GetFileInfo)( SPFileRef file, SPPlatformFileInfo *info ); - - /** Reports whether a file in a file list is a plug-in. - @param file The file object. - @param isAPlugin [out] A buffer in which to return true if the file is a plug-in. - */ - SPAPI SPErr (*GetIsAPlugin)( SPFileRef file, SPBoolean *isAPlugin ); - /** Sets whether a file in a file list is a plug-in. - @param file The file object. - @param isAPlugin True to mark the file as a plug-in, false to mark it as not a plug-in. - */ - SPAPI SPErr (*SetIsAPlugin)( SPFileRef file, SPBoolean isAPlugin ); - - /** Retrieves the property list for a file. - @param file The file object. - @param propertList [out] A buffer in which to return the property list, - or \c #kFileDoesNotHavePiPL if the file does not have a property list, - or \c #kFileHasMulitplePiPLs if the file has multiple property lists. - @see \c SPPiPL.h - */ - SPAPI SPErr (*GetFilePropertyList)( SPFileRef file, SPPropertyListRef *propertList ); - /** Sets the property list for a file. - @param file The file object. - @param propertList The new property list. - */ - SPAPI SPErr (*SetFilePropertyList)( SPFileRef file, SPPropertyListRef propertList ); - - } SPFilesSuite; - - - /** Internal */ - SPAPI SPErr SPAllocateFileList( SPFileListRef *fileList ); - /** Internal */ - SPAPI SPErr SPFreeFileList( SPFileListRef fileList ); - SPAPI SPErr SPAddFiles( SPFileListRef fileList, const SPPlatformFileReference *file ); - - /** Internal */ - SPAPI SPErr SPNewFileListIterator( SPFileListRef fileList, SPFileListIteratorRef *iter ); - /** Internal */ - SPAPI SPErr SPNextFile( SPFileListIteratorRef iter, SPFileRef *file ); - /** Internal */ - SPAPI SPErr SPDeleteFileListIterator( SPFileListIteratorRef iter ); - - /** Internal */ -#ifdef WIN_ENV - - SPAPI SPErr SPGetFileSpecification( SPFileRef file, SPPlatformFileSpecification *fileSpec ); -#endif - - SPAPI SPErr SPGetFileReference( SPFileRef file, SPPlatformFileReference *fileSpec ); // This function will replace all the instances of SPGetFileSpecification - /** Internal */ - SPAPI SPErr SPGetFileInfo( SPFileRef file, SPPlatformFileInfo *info ); - /** Internal */ - SPAPI SPErr SPGetIsAPlugin( SPFileRef file, SPBoolean *isAPlugin ); - /** Internal */ - SPAPI SPErr SPSetIsAPlugin( SPFileRef file, SPBoolean isAPlugin ); - - /** Internal */ - SPAPI SPErr SPGetFilePropertyList( SPFileRef file, SPPropertyListRef *propertList ); - /** Internal */ - SPAPI SPErr SPSetFilePropertyList( SPFileRef file, SPPropertyListRef propertList ); - - /** Internal */ - SPAPI SPErr SPAddFilePiPLs( SPFileListRef fileList, SPAddPiPLFilterProc filter ); - - /******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPFiles.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPFiles__ +#define __SPFiles__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPProps.h" + +#include "SPHeaderBegin.h" + +#ifdef WIN_ENV +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + + + /******************************************************************************* + ** + ** Constants + ** + **/ + /** Files suite name */ +#define kSPFilesSuite "SP Files Suite" + + +#define kSPFilesSuiteVersion3 3 + +#define kSPFilesSuiteVersion 4 + /** PICA global list of potential plug-in files. + @see \c #SPRuntimeSuite::GetRuntimeFileList() */ +#define kSPRuntimeFileList ((SPFileListRef)NULL) + + + /** Return value for \c #SPFilesSuite::GetFilePropertyList(), + indicating that the file has no property list. */ +#define kFileDoesNotHavePiPL (SPPropertyListRef)(~((size_t)NULL)) + /** Return value for \c #SPFilesSuite::GetFilePropertyList(), + indicating that the file has multiple property lists. + Use \c #SPPluginsSuite::GetPluginPropertyList() to access the + PiPL for each \c #SPPluginRef exported by the file. */ +#define kFileHasMulitplePiPLs NULL + + /******************************************************************************* + ** + ** Types + ** + **/ + + /** The maximum number of characters allowed in a file path specification. */ + + + /** Opaque reference to a file. Access with the \c #SPFilesSuite. */ + typedef struct SPFile *SPFileRef; + /** Opaque reference to a file list. Access with the \c #SPFilesSuite. */ + typedef struct SPFileList *SPFileListRef; + /** Opaque reference to a file-list iterator. Access with the \c #SPFilesSuite. */ + typedef struct SPFileListIterator *SPFileListIteratorRef; + /** Opaque reference to a platform-specific file specification. Access with the \c #SPFilesSuite. */ + typedef struct OpaqueSPPlatformFileRef SPPlatformFileRef; + + +#if defined(MAC_ENV) || defined(LINUX_ENV) +#define kMaxPathLength 1024 +#pragma options align=power + + + /** A file specification In Mac OS.It is the same as \c FSSpec. */ + typedef struct SPPlatformFileSpecification { + /** The version number (Mac OS). */ + short vRefNum; + /** The unique identifier (Mac OS). */ + ai::int32 parID; + /** The file name string (Mac OS). */ + unsigned char name[64]; + } SPPlatformFileSpecification; + + /** A file reference in terms of a string. This path should be POSIX style path with UTF-8 encoding. + FSRefMakePath can be used to make a path from FSRef and FSPathMakeRef can be used to make FSRef from a POSIX style path.*/ + typedef struct SPPlatformFileReference { + unsigned char path[kMaxPathLength]; //1024 has been taken up from /usr/include/sys/syslimits.h + } SPPlatformFileReference; + +#pragma options align=reset + + /** Platform-specific file metadata. */ + typedef struct SPPlatformFileInfo { /* On Mac OS*/ + /** Not used. */ + ai::uint32 attributes; //Unused, but still required to maintain binary compatibility + /** Date file was created (Mac OS). */ + ai::uint32 creationDate; + /** Data file was last modified (Mac OS). */ + ai::uint32 modificationDate; + /** Type of file for Finder (Mac OS). */ + ai::uint32 finderType; + /** File creator (Mac OS). */ + ai::uint32 finderCreator; + /** File flags for Finder (Mac OS); see Mac OS documentation. */ + ai::uint16 finderFlags; + } SPPlatformFileInfo; + + SPErr FileSpectoFileRef(const SPPlatformFileSpecification *fileSpec, const SPPlatformFileReference *fileRef); // temporary functions used while transition from SPPlatformFileSpecification to SPPlatformFileReference + SPErr FileReftoFileSpec(const SPPlatformFileReference *fileRef, const SPPlatformFileSpecification *fileSpec); +#endif + +#if defined(WIN_ENV) +#define kMaxPathLength 300 + /** A file specification in Windows. */ + typedef struct SPPlatformFileSpecification { + /** The file path string (Windows).*/ + char path[kMaxPathLength]; + } SPPlatformFileSpecification; + + //Keeping the structure's type similar to PSinterface, added some additional helper methods. + struct SPPlatformFileSpecificationW { + private: + /** path could be as long as 64K but MUST be NULL terminated. */ + wchar_t path[kMaxPathLength]; + public: + SPPlatformFileSpecificationW() + { + memset (path,0,sizeof(path)); + } + const wchar_t* c_str() const { return path; } + + wchar_t* GetBuffer() {return path;} + }; + + /** Same as SPPlatformFileSpecification on Windows. */ + /** VS_TODO: This is just the initial definition in order to reduce the impact. + We need to get rid of SPPlatformFileSpecification one day. + Also, SPPlatformFileRef is already defined above and it does + not seem to be used anywhere. I think we should remove it. */ + typedef SPPlatformFileSpecificationW SPPlatformFileReference; + + /**Platform-specific file metadata. */ + typedef struct SPPlatformFileInfo { + /** File attribute flags (Windows); see Windows documentation. */ + ai::uint32 attributes; + /** Least-significant byte of the file creation date-time (Windows).*/ + ai::uint32 lowCreationTime; + /** Most-significant byte of the file creation date-time (Windows).*/ + ai::uint32 highCreationTime; + /** Least-significant byte of the file modification date-time (Windows).*/ + ai::uint32 lowModificationTime; + /** Most-significant byte of the file modification date-time (Windows).*/ + ai::uint32 highModificationTime; + /** The file-name extension indicating the file type (Windows). */ + const wchar_t* extension; + } SPPlatformFileInfo; +#endif + + /** Internal */ + typedef SPBoolean (*SPAddPiPLFilterProc)( SPPlatformFileInfo *info ); + + + /******************************************************************************* + ** + ** Suite + ** + **/ + /** @ingroup Suites + This suite allows you to access the PICA files list. This list, created at startup, + contains references to every file in the application's plug-in folder, including + any resolved file and folder aliases. PICA maintains this list, and uses it to find plug-ins. + + Use this suite to access the plug-in file list, in order to avoid redundant directory + scans. Adapters looking for their own plug-ins and PICA plug-ins looking for + support files should scan the list to locate relevant files rather than walking + platform directory structures on their own. + + Similarly, you can use this suite to create, maintain, and access your own lists + of files in a platform-independent and efficient manner. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPFilesSuite and \c #kSPFilesSuiteVersion. + */ + typedef struct SPFilesSuite { + /** Creates a new file list. Typically, you use the main PICA file list to access + plug-in files, available through \c #SPRuntimeSuite::GetRuntimeFileList(). + You can use this to track other file collections. If you create a new list, you + must free it when it is no longer needed, using \c #FreeFileList(). + @param fileList [out] A buffer in which to return the new file list object. + */ + SPAPI SPErr (*AllocateFileList)( SPFileListRef *fileList ); + /** Frees a file list created with \c #AllocateFileList(), and any entries in the list. + @param fileList The file list object. + */ + SPAPI SPErr (*FreeFileList)( SPFileListRef fileList ); + + /** Adds a file or all files in a directory to a file list. Searches a directory + recursively for contained files. + @param fileList The file list object. + @param file The file or directory specification. + */ + SPAPI SPErr (*AddFiles)( SPFileListRef fileList, const SPPlatformFileReference *file ); + + + /** Creates a file-list iterator object to use with \c #NextFile() for iterating + through a file list. The iterator is initially set to the first file in the list. + When the iterator is no longer needed, free it with \c #DeleteFileListIterator(). + @param fileList The file list object. + @param iter [out] A buffer in which to return the new iterator object. + */ + SPAPI SPErr (*NewFileListIterator)( SPFileListRef fileList, SPFileListIteratorRef *iter ); + /** Retrieves the current file from a file list iterator, and advances the iterator. + @param iter The iterator object. + @param file [out] A buffer in which to return the current file object, or \c NULL + if the end of the list has been reached. + */ + SPAPI SPErr (*NextFile)( SPFileListIteratorRef iter, SPFileRef *file ); + /** Frees a file-list iterator created with /c #NewFileListIterator(). + @param iter The iterator object. + */ + SPAPI SPErr (*DeleteFileListIterator)( SPFileListIteratorRef iter ); + /** Retrieves the platform-specific file specification for a file. + @param file The file object. + @param fileSpec [out] A buffer in which to return the file specification. + */ + +#ifdef WIN_ENV + + SPAPI SPErr (*GetFileSpecification) ( SPFileRef file, SPPlatformFileSpecification *fileSpec ); +#endif + SPAPI SPErr (*GetFileReference)( SPFileRef file, SPPlatformFileReference *fileSpec ); + /** Retrieves the metadata for a file. + @param file The file object. + @param info [out] A buffer in which to return the file information. + */ + SPAPI SPErr (*GetFileInfo)( SPFileRef file, SPPlatformFileInfo *info ); + + /** Reports whether a file in a file list is a plug-in. + @param file The file object. + @param isAPlugin [out] A buffer in which to return true if the file is a plug-in. + */ + SPAPI SPErr (*GetIsAPlugin)( SPFileRef file, SPBoolean *isAPlugin ); + /** Sets whether a file in a file list is a plug-in. + @param file The file object. + @param isAPlugin True to mark the file as a plug-in, false to mark it as not a plug-in. + */ + SPAPI SPErr (*SetIsAPlugin)( SPFileRef file, SPBoolean isAPlugin ); + + /** Retrieves the property list for a file. + @param file The file object. + @param propertList [out] A buffer in which to return the property list, + or \c #kFileDoesNotHavePiPL if the file does not have a property list, + or \c #kFileHasMulitplePiPLs if the file has multiple property lists. + @see \c SPPiPL.h + */ + SPAPI SPErr (*GetFilePropertyList)( SPFileRef file, SPPropertyListRef *propertList ); + /** Sets the property list for a file. + @param file The file object. + @param propertList The new property list. + */ + SPAPI SPErr (*SetFilePropertyList)( SPFileRef file, SPPropertyListRef propertList ); + + } SPFilesSuite; + + + /** Internal */ + SPAPI SPErr SPAllocateFileList( SPFileListRef *fileList ); + /** Internal */ + SPAPI SPErr SPFreeFileList( SPFileListRef fileList ); + SPAPI SPErr SPAddFiles( SPFileListRef fileList, const SPPlatformFileReference *file ); + + /** Internal */ + SPAPI SPErr SPNewFileListIterator( SPFileListRef fileList, SPFileListIteratorRef *iter ); + /** Internal */ + SPAPI SPErr SPNextFile( SPFileListIteratorRef iter, SPFileRef *file ); + /** Internal */ + SPAPI SPErr SPDeleteFileListIterator( SPFileListIteratorRef iter ); + + /** Internal */ +#ifdef WIN_ENV + + SPAPI SPErr SPGetFileSpecification( SPFileRef file, SPPlatformFileSpecification *fileSpec ); +#endif + + SPAPI SPErr SPGetFileReference( SPFileRef file, SPPlatformFileReference *fileSpec ); // This function will replace all the instances of SPGetFileSpecification + /** Internal */ + SPAPI SPErr SPGetFileInfo( SPFileRef file, SPPlatformFileInfo *info ); + /** Internal */ + SPAPI SPErr SPGetIsAPlugin( SPFileRef file, SPBoolean *isAPlugin ); + /** Internal */ + SPAPI SPErr SPSetIsAPlugin( SPFileRef file, SPBoolean isAPlugin ); + + /** Internal */ + SPAPI SPErr SPGetFilePropertyList( SPFileRef file, SPPropertyListRef *propertList ); + /** Internal */ + SPAPI SPErr SPSetFilePropertyList( SPFileRef file, SPPropertyListRef propertList ); + + /** Internal */ + SPAPI SPErr SPAddFilePiPLs( SPFileListRef fileList, SPAddPiPLFilterProc filter ); + + /******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPFilesV3.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPFilesV3.h deleted file mode 100644 index d236170..0000000 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPFilesV3.h +++ /dev/null @@ -1,200 +0,0 @@ -/***********************************************************************/ -/* */ -/* SPFilesV3.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPFilesV3__ -#define __SPFilesV3__ - -/******************************************************************************* - ** - ** Imports - ** - **/ -#include "SPFiles.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define kSPRuntimeFileListV3 ((SPFileListRefV3)NULL) - -#ifdef WIN_ENV - /**Platform-specific file metadata. */ - typedef struct SPPlatformFileInfoV3 { - /** File attribute flags (Windows); see Windows documentation. */ - ai::uint32 attributes; - /** Least-significant byte of the file creation date-time (Windows).*/ - ai::uint32 lowCreationTime; - /** Most-significant byte of the file creation date-time (Windows).*/ - ai::uint32 highCreationTime; - /** Least-significant byte of the file modification date-time (Windows).*/ - ai::uint32 lowModificationTime; - /** Most-significant byte of the file modification date-time (Windows).*/ - ai::uint32 highModificationTime; - /** The file-name extension indicating the file type (Windows). */ - const char* extension; - } SPPlatformFileInfoV3; - - typedef SPPlatformFileSpecification SPPlatformFileReferenceV3; - - typedef SPFileRef SPFileRefV3; - - typedef SPFileListRef SPFileListRefV3; - - typedef SPFileListIteratorRef SPFileListIteratorRefV3; -#else - typedef SPPlatformFileInfo SPPlatformFileInfoV3; - - typedef SPPlatformFileReference SPPlatformFileReferenceV3; - - typedef struct SPFileV3 * SPFileRefV3; - - typedef struct SPFileListV3 *SPFileListRefV3; - - typedef struct SPFileListIteratorV3 *SPFileListIteratorRefV3; -#endif - - - - /******************************************************************************* - ** - ** Suite - ** - **/ - /** @ingroup Suites - This suite allows you to access the PICA files list. This list, created at startup, - contains references to every file in the application's plug-in folder, including - any resolved file and folder aliases. PICA maintains this list, and uses it to find plug-ins. - - Use this suite to access the plug-in file list, in order to avoid redundant directory - scans. Adapters looking for their own plug-ins and PICA plug-ins looking for - support files should scan the list to locate relevant files rather than walking - platform directory structures on their own. - - Similarly, you can use this suite to create, maintain, and access your own lists - of files in a platform-independent and efficient manner. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPFilesSuite and \c #kSPFilesSuiteVersion. - */ - typedef struct SPFilesSuiteV3 { - /** Creates a new file list. Typically, you use the main PICA file list to access - plug-in files, available through \c #SPRuntimeSuite::GetRuntimeFileList(). - You can use this to track other file collections. If you create a new list, you - must free it when it is no longer needed, using \c #FreeFileList(). - @param fileList [out] A buffer in which to return the new file list object. - */ - SPAPI SPErr (*AllocateFileList)( SPFileListRefV3 *fileList ); - /** Frees a file list created with \c #AllocateFileList(), and any entries in the list. - @param fileList The file list object. - */ - SPAPI SPErr (*FreeFileList)( SPFileListRefV3 fileList ); - - /** Adds a file or all files in a directory to a file list. Searches a directory - recursively for contained files. - @param fileList The file list object. - @param file The file or directory specification. - */ - - SPAPI SPErr (*AddFiles)( SPFileListRefV3 fileList, const SPPlatformFileReferenceV3 *file ); - - - /** Creates a file-list iterator object to use with \c #NextFile() for iterating - through a file list. The iterator is initially set to the first file in the list. - When the iterator is no longer needed, free it with \c #DeleteFileListIterator(). - @param fileList The file list object. - @param iter [out] A buffer in which to return the new iterator object. - */ - SPAPI SPErr (*NewFileListIterator)( SPFileListRefV3 fileList, SPFileListIteratorRefV3 *iter ); - /** Retrieves the current file from a file list iterator, and advances the iterator. - @param iter The iterator object. - @param file [out] A buffer in which to return the current file object, or \c NULL - if the end of the list has been reached. - */ - SPAPI SPErr (*NextFile)( SPFileListIteratorRefV3 iter, SPFileRefV3 *file ); - /** Frees a file-list iterator created with /c #NewFileListIterator(). - @param iter The iterator object. - */ - SPAPI SPErr (*DeleteFileListIterator)( SPFileListIteratorRefV3 iter ); - - /** Retrieves the platform-specific file specification for a file. - @param file The file object. - @param fileSpec [out] A buffer in which to return the file specification. - */ - SPAPI SPErr (*GetFileSpecification)( SPFileRefV3 file, SPPlatformFileSpecification *fileSpec ); //SW_TODO: This function is to be removed completely after changes in photoshop adapter plugin - - SPAPI SPErr (*GetFileReference)( SPFileRefV3 file, SPPlatformFileReferenceV3 *fileSpec ); - - /** Retrieves the metadata for a file. - @param file The file object. - @param info [out] A buffer in which to return the file information. - */ - SPAPI SPErr (*GetFileInfo)( SPFileRefV3 file, SPPlatformFileInfoV3 *info ); - - /** Reports whether a file in a file list is a plug-in. - @param file The file object. - @param isAPlugin [out] A buffer in which to return true if the file is a plug-in. - */ - SPAPI SPErr (*GetIsAPlugin)( SPFileRefV3 file, SPBoolean *isAPlugin ); - /** Sets whether a file in a file list is a plug-in. - @param file The file object. - @param isAPlugin True to mark the file as a plug-in, false to mark it as not a plug-in. - */ - SPAPI SPErr (*SetIsAPlugin)( SPFileRefV3 file, SPBoolean isAPlugin ); - - /** Retrieves the property list for a file. - @param file The file object. - @param propertList [out] A buffer in which to return the property list, - or \c #kFileDoesNotHavePiPL if the file does not have a property list, - or \c #kFileHasMulitplePiPLs if the file has multiple property lists. - @see \c SPPiPL.h - */ - SPAPI SPErr (*GetFilePropertyList)( SPFileRefV3 file, SPPropertyListRef *propertList ); - /** Sets the property list for a file. - @param file The file object. - @param propertList The new property list. - */ - SPAPI SPErr (*SetFilePropertyList)( SPFileRefV3 file, SPPropertyListRef propertList ); - - } SPFilesSuiteV3; - - - SPAPI SPErr SPAllocateFileListV3( SPFileListRefV3 *fileList ); - SPAPI SPErr SPFreeFileListV3( SPFileListRefV3 fileList ); - SPAPI SPErr SPNewFileListIteratorV3( SPFileListRefV3 fileList, SPFileListIteratorRefV3 *iter ); - SPAPI SPErr SPDeleteFileListIteratorV3( SPFileListIteratorRefV3 iter ); - SPAPI SPErr SPGetFileInfoV3( SPFileRefV3 file, SPPlatformFileInfoV3 *info ); - SPAPI SPErr SPAddFilesV3( SPFileListRefV3 fileList, const SPPlatformFileReferenceV3 *file ); - SPAPI SPErr SPGetFileReferenceV3( SPFileRefV3 file, SPPlatformFileReferenceV3 *fileSpec ); // This function will replace all the instances of SPGetFileSpecification - - SPAPI SPErr SPGetFileSpecificationV3( SPFileRefV3 file, SPPlatformFileSpecification *fileSpec ); - SPAPI SPErr SPNextFileV3( SPFileListIteratorRefV3 iter, SPFileRefV3 *file ); - - SPAPI SPErr SPGetIsAPluginV3( SPFileRefV3 file, SPBoolean *isAPlugin ); - SPAPI SPErr SPSetIsAPluginV3( SPFileRefV3 file, SPBoolean isAPlugin ); - SPAPI SPErr SPGetFilePropertyListV3( SPFileRefV3 file, SPPropertyListRef *propertyList ); - SPAPI SPErr SPSetFilePropertyListV3( SPFileRefV3 file, SPPropertyListRef propertyList ); -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif //SPFilesV3 diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderBegin.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderBegin.h index 27e4700..c228dd4 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderBegin.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderBegin.h @@ -1,49 +1,49 @@ -/* - * Name: SPHeaderBegin.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2012 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#if defined(__SPHeaderBegin_H__) -#error __SPHeaderBegin_H__ included multiple times in a single file -#endif - -#define __SPHeaderBegin_H__ 1 - -#ifndef __ASConfig__ -#include "ASConfig.h" -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef MAC_ENV - //power_gcc on MWERKS is basically equivalent to power on GCC - #if defined (__MWERKS__) - #pragma options align=power_gcc - #pragma enumsalwaysint on - #elif defined (__GNUC__) - //GCC doesn't allow non int enums without using an attribute decl directly on - //the enum, so no need to set it - #pragma options align=power - #endif -#endif - -#if defined(WIN_ENV) - #pragma warning(disable: 4103) // Gets rid of the unbalanced alignment warning. - #pragma pack(push, 8) -#endif +/* + * Name: SPHeaderBegin.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2012 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#if defined(__SPHeaderBegin_H__) +#error __SPHeaderBegin_H__ included multiple times in a single file +#endif + +#define __SPHeaderBegin_H__ 1 + +#ifndef __ASConfig__ +#include "ASConfig.h" +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +#ifdef MAC_ENV + //power_gcc on MWERKS is basically equivalent to power on GCC + #if defined (__MWERKS__) + #pragma options align=power_gcc + #pragma enumsalwaysint on + #elif defined (__GNUC__) + //GCC doesn't allow non int enums without using an attribute decl directly on + //the enum, so no need to set it + #pragma options align=power + #endif +#endif + +#if defined(WIN_ENV) + #pragma warning(disable: 4103) // Gets rid of the unbalanced alignment warning. + #pragma pack(push, 8) +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderEnd.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderEnd.h index 7e17c43..938e2b9 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderEnd.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHeaderEnd.h @@ -1,41 +1,41 @@ -/* - * Name: SPHeaderEnd.h - * $Revision: 1 $ - * Author: - * Date: - * Purpose: - * - * ADOBE SYSTEMS INCORPORATED - * Copyright 1986-2012 Adobe Systems Incorporated. - * All rights reserved. - * - * NOTICE: Adobe permits you to use, modify, and distribute this file - * in accordance with the terms of the Adobe license agreement - * accompanying it. If you have received this file from a source other - * than Adobe, then your use, modification, or distribution of it - * requires the prior written permission of Adobe. - * - */ - -#if !defined(__SPHeaderBegin_H__) -#error You need to include SPHeaderBegin before this file -#endif - -#undef __SPHeaderBegin_H__ - -#ifdef MAC_ENV - #pragma options align=reset - #if defined (__MWERKS__) - //GCC doesn't allow non int enums without using an attribute decl directly on - //the enum, so no need to set it - #pragma enumsalwaysint reset - #endif -#endif - -#ifdef WIN_ENV - #pragma pack(pop) -#endif - -#ifdef __cplusplus -} +/* + * Name: SPHeaderEnd.h + * $Revision: 1 $ + * Author: + * Date: + * Purpose: + * + * ADOBE SYSTEMS INCORPORATED + * Copyright 1986-2012 Adobe Systems Incorporated. + * All rights reserved. + * + * NOTICE: Adobe permits you to use, modify, and distribute this file + * in accordance with the terms of the Adobe license agreement + * accompanying it. If you have received this file from a source other + * than Adobe, then your use, modification, or distribution of it + * requires the prior written permission of Adobe. + * + */ + +#if !defined(__SPHeaderBegin_H__) +#error You need to include SPHeaderBegin before this file +#endif + +#undef __SPHeaderBegin_H__ + +#ifdef MAC_ENV + #pragma options align=reset + #if defined (__MWERKS__) + //GCC doesn't allow non int enums without using an attribute decl directly on + //the enum, so no need to set it + #pragma enumsalwaysint reset + #endif +#endif + +#ifdef WIN_ENV + #pragma pack(pop) +#endif + +#ifdef __cplusplus +} #endif \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHost.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHost.h index d6831b7..b603f20 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHost.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPHost.h @@ -1,179 +1,179 @@ -/***********************************************************************/ -/* */ -/* SPHost.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPHost__ -#define __SPHost__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPAccess.h" -#include "SPAdapts.h" -#include "SPBasic.h" -#include "SPBckDbg.h" -#include "SPBlocks.h" -#include "SPCaches.h" -#include "SPFiles.h" -#include "SPInterf.h" -#include "SPPlugs.h" -#include "SPProps.h" -#include "SPRuntme.h" -#include "SPStrngs.h" -#include "SPSuites.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ - - -// AJL 08/21/00 - Defining "RELEASE_PLUGINS_EARLY" causes the plugin system to detect -// which plugins were flushed at the end of launch time, then flush those plugins -// earlier in the launch process the next time around. This prevents Illustrator -// from allocating gobs of memory on startup, then releasing it. Bad on a 64MB machine. -#define RELEASE_PLUGINS_EARLY - - -/* - * The version number of the Sweet Pea host interface. You can compare it to the - * version number that Sweet Pea was compiled with to determine that you are - * running the version you think you are. See SPVersion() below. - * - * This number consists of a hi word which is the major version number reflecting - * changes to the SP inteface, and a low word which is the minor revision number, - * for instance indicating bug fixes. - */ - -#define kSPVersion 0x000B0002 // version 11.2 - - -/* - * Options available to the host at init time. They are: - * - * kSPHostBlockDebugOption - block allocation debugging is enabled. See - * SPBckDbg.h for details. - * - * Examples: - * - * SPInit( hostProcs, pluginsFolder, kSPHostNoOptions, error ); - * // No debugging. - * - * SPInit( hostProcs, pluginsFolder, kSPHostBlockDebugOption, error ); - * // Enable block debugging. - */ - -#define kSPHostNoOptions 0 -#define kSPHostBlockDebugOption (1<<0) - - -/******************************************************************************* - ** - ** Functions - ** - **/ - -/* - * SPInit() initializes Sweet Pea. It is the first call made to Sweet Pea. It - * initializes its suites and builds the list of application files. - * - * HostProcs points to a filled-in structure of host callbacks, as described - * in SPRuntme.h. It may be NULL, in which case Sweet Pea uses its default - * versions for all of the host callbacks. PluginFolder is the file spec of the - * plug-ins folder. The contents of this folder are collected into the application - * files list (see SPFiles.h). Options may be any of the host options described - * above. - */ -SPErr SPInit( SPHostProcs *hostProcs, const SPPlatformFileReference *pluginFolder, ai::int32 options ); -SPBoolean SPInited( void ); - -/* - * SPTerm() terminates Sweet Pea. Call this when your application quits. - */ -SPErr SPTerm( void ); - -/* - * SPStartupPlugins() scans the list of application files and builds the list - * of plug-ins. It then starts them up, calling each in turn with a start up - * message (see SPPlugs.h). Call this sometime after SPInit(). - */ -SPErr SPStartupPlugins( void ); - -/* - * SPShutdownPlugins() shuts down the plug-ins. It calls each in turn with a - * shut down message (see SPPlugs.h). Call this when your application quits - * before calling SPTerm(). - */ -SPErr SPShutdownPlugins( void ); - - -#ifdef MAC_ENV -/* - * SPSetPPCLoadHeap() sets the destination heap of plug-in accesses on PowerPPC - * Macintoshes. Plug-ins can load into the system heap or the application heap. - */ -typedef enum { - kAppHeap = 0, - kSysHeap -} SPTargetHeap; - -SPErr SPSetPPCLoadHeap( SPTargetHeap target ); - -/* - * SPSetHostBundleRef() lets sweet pea know the bundle ref of the host. - */ -SPErr SPSetHostBundleRef(CFBundleRef hostBundle); -#endif - - -/* - * SPVersion() returns the version number of the Sweet Pea host interface (this - * file) for which Sweet Pea was built. You can compare this to the constant - * kSPVersion to make sure you're using the version you think you are. - */ -ai::uint32 SPVersion( void ); - - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPHost.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPHost__ +#define __SPHost__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPAccess.h" +#include "SPAdapts.h" +#include "SPBasic.h" +#include "SPBckDbg.h" +#include "SPBlocks.h" +#include "SPCaches.h" +#include "SPFiles.h" +#include "SPInterf.h" +#include "SPPlugs.h" +#include "SPProps.h" +#include "SPRuntme.h" +#include "SPStrngs.h" +#include "SPSuites.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ + + +// AJL 08/21/00 - Defining "RELEASE_PLUGINS_EARLY" causes the plugin system to detect +// which plugins were flushed at the end of launch time, then flush those plugins +// earlier in the launch process the next time around. This prevents Illustrator +// from allocating gobs of memory on startup, then releasing it. Bad on a 64MB machine. +#define RELEASE_PLUGINS_EARLY + + +/* + * The version number of the Sweet Pea host interface. You can compare it to the + * version number that Sweet Pea was compiled with to determine that you are + * running the version you think you are. See SPVersion() below. + * + * This number consists of a hi word which is the major version number reflecting + * changes to the SP inteface, and a low word which is the minor revision number, + * for instance indicating bug fixes. + */ + +#define kSPVersion 0x000B0002 // version 11.2 + + +/* + * Options available to the host at init time. They are: + * + * kSPHostBlockDebugOption - block allocation debugging is enabled. See + * SPBckDbg.h for details. + * + * Examples: + * + * SPInit( hostProcs, pluginsFolder, kSPHostNoOptions, error ); + * // No debugging. + * + * SPInit( hostProcs, pluginsFolder, kSPHostBlockDebugOption, error ); + * // Enable block debugging. + */ + +#define kSPHostNoOptions 0 +#define kSPHostBlockDebugOption (1<<0) + + +/******************************************************************************* + ** + ** Functions + ** + **/ + +/* + * SPInit() initializes Sweet Pea. It is the first call made to Sweet Pea. It + * initializes its suites and builds the list of application files. + * + * HostProcs points to a filled-in structure of host callbacks, as described + * in SPRuntme.h. It may be NULL, in which case Sweet Pea uses its default + * versions for all of the host callbacks. PluginFolder is the file spec of the + * plug-ins folder. The contents of this folder are collected into the application + * files list (see SPFiles.h). Options may be any of the host options described + * above. + */ +SPErr SPInit( SPHostProcs *hostProcs, const SPPlatformFileReference *pluginFolder, ai::int32 options ); +SPBoolean SPInited( void ); + +/* + * SPTerm() terminates Sweet Pea. Call this when your application quits. + */ +SPErr SPTerm( bool fastExit = false ); + +/* + * SPStartupPlugins() scans the list of application files and builds the list + * of plug-ins. It then starts them up, calling each in turn with a start up + * message (see SPPlugs.h). Call this sometime after SPInit(). + */ +SPErr SPStartupPlugins( void ); + +/* + * SPShutdownPlugins() shuts down the plug-ins. It calls each in turn with a + * shut down message (see SPPlugs.h). Call this when your application quits + * before calling SPTerm(). + */ +SPErr SPShutdownPlugins( void ); + + +#ifdef MAC_ENV +/* + * SPSetPPCLoadHeap() sets the destination heap of plug-in accesses on PowerPPC + * Macintoshes. Plug-ins can load into the system heap or the application heap. + */ +typedef enum { + kAppHeap = 0, + kSysHeap +} SPTargetHeap; + +SPErr SPSetPPCLoadHeap( SPTargetHeap target ); + +/* + * SPSetHostBundleRef() lets sweet pea know the bundle ref of the host. + */ +SPErr SPSetHostBundleRef(CFBundleRef hostBundle); +#endif + + +/* + * SPVersion() returns the version number of the Sweet Pea host interface (this + * file) for which Sweet Pea was built. You can compare this to the constant + * kSPVersion to make sure you're using the version you think you are. + */ +ai::uint32 SPVersion( void ); + + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPInterf.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPInterf.h index dfe814d..82c0e3b 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPInterf.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPInterf.h @@ -1,184 +1,184 @@ -/***********************************************************************/ -/* */ -/* SPInterf.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPInterface__ -#define __SPInterface__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPBasic.h" -#include "SPFiles.h" -#include "SPMData.h" -#include "SPPlugs.h" -#include "SPProps.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** PICA Interface suite name. */ -#define kSPInterfaceSuite "SP Interface Suite" -/** PICA Interface suite version. */ -#define kSPInterfaceSuiteVersion 2 - -/** PICA messaging system caller; see \c #SPInterfaceSuite. */ -#define kSPInterfaceCaller "SP Interface" -/** PICA messaging system startup; see \c #SPInterfaceSuite. */ -#define kSPInterfaceStartupSelector "Startup" -/** PICA messaging system shutdown; see \c #SPInterfaceSuite. */ -#define kSPInterfaceShutdownSelector "Shutdown" -/** PICA messaging system request for information; see \c #SPInterfaceSuite. - Illustrator sends this call to all plug-ins to implement - the "About Plug-ins" feature.*/ -#define kSPInterfaceAboutSelector "About" - -/** Adapter name for PICA version 2. */ -#define kSPSweetPea2Adapter "Sweet Pea 2 Adapter" -/** Adapter version for PICA version 2.*/ -#define kSPSweetPea2AdapterVersion 1 - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** A basic message, sent with \c #kSPInterfaceCaller. */ -typedef struct SPInterfaceMessage { - - /** The message data. */ - SPMessageData d; - -} SPInterfaceMessage; - - -/******************************************************************************* - ** - ** Suite - ** - **/ -/** @ingroup Suites - This suite provides is the ability for a plug-in to call - other plug-ins, by sending a message to the main entry point. - This is how the application communicates with plug-ins. - - Use \c #SetupMessageData() to prepare the message for a call, - \c #SendMessage() to send the call with the message, and - \c #EmptyMessageData() to terminate the operation, allowing - PICA to release the basic suite and store global variables. - - These calls work only with PICA plug-ins. Before making the calls, - use \c #SPAdaptersSuite::GetAdapterName() to determine that - the target is a PICA plug-in. For non-PICA plug-ins, use the - interface suite provided by the adapter. See \c #SPAdaptersSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPInterfaceSuite and \c #kSPInterfaceSuiteVersion. -*/ -typedef struct SPInterfaceSuite { - - /** Sends a message to a PICA plug-in, loading it if needed and - passing the caller, selector, and message to the main entry point. - @param plug-in The target plug-in object. - @param caller The caller constant. See @ref Callers. - @param selector The selector constant. See @ref Selectors. - @param message The message, initialized by \c #SetupMessageData(). - @param result [out] A buffer in which to return the result of the call, - as returned by the target plug-in. - */ - SPAPI SPErr (*SendMessage)( SPPluginRef plugin, const char *caller, const char *selector, - void *message, SPErr *result ); - - /** Initializes a message to be sent with \c #SendMessage(). - The function fills in the basic suite, the plug-in reference, - and the globals pointer that PICA keeps for that plug-in. - You must provide any additional data needed. - @param plugin The target plug-in object. - @param data The message structure, initialized with data required - for the intended call. - */ - SPAPI SPErr (*SetupMessageData)( SPPluginRef plugin, SPMessageData *data ); - /** Terminates a call to another plug-in, releasing the basic suite and - updating the target plug-in's globals pointer, in case it has changed. - Use after a call to \c #SendMessage(). - @param plugin The target plug-in object. - @param data The message structure, updated during the call. - */ - SPAPI SPErr (*EmptyMessageData)( SPPluginRef plugin, SPMessageData *data ); - - /** Starts up the plug-in in a plug-in list that exports a given suite. - Searches in the given plug-in list for the plug-in that exports the named - suite, and, if found, sends it the startup message. - @param pluginList The plug-in list object. Access PICA's global plug-in - list using \c #SPRuntimeSuite::GetRuntimePluginList(), - or create your own lists with \c #SPPluginsSuite::AllocatePluginList(). - @param name The suite name constant. - @param version The suite version number constant. - @param started [out] A buffer in which to return true (non-zero) if a - plug-in that exports the suite was found, false (0) if not. - */ - SPAPI SPErr (*StartupExport)( SPPluginListRef pluginList, const char *name, ai::int32 version, - ai::int32 *started ); - -} SPInterfaceSuite; - - -/** Internal */ -SPAPI SPErr SPSendMessage( SPPluginRef plugin, const char *caller, const char *selector, - void *message, SPErr *result ); - -/** Internal */ -SPAPI SPErr SPSetupMessageData( SPPluginRef plugin, SPMessageData *data ); -/** Internal */ -SPAPI SPErr SPEmptyMessageData( SPPluginRef plugin, SPMessageData *data ); - -/** Internal */ -SPAPI SPErr SPStartupExport( SPPluginListRef pluginList, const char *name, ai::int32 version, - ai::int32 *started ); - - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPInterf.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPInterface__ +#define __SPInterface__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPBasic.h" +#include "SPFiles.h" +#include "SPMData.h" +#include "SPPlugs.h" +#include "SPProps.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** PICA Interface suite name. */ +#define kSPInterfaceSuite "SP Interface Suite" +/** PICA Interface suite version. */ +#define kSPInterfaceSuiteVersion 2 + +/** PICA messaging system caller; see \c #SPInterfaceSuite. */ +#define kSPInterfaceCaller "SP Interface" +/** PICA messaging system startup; see \c #SPInterfaceSuite. */ +#define kSPInterfaceStartupSelector "Startup" +/** PICA messaging system shutdown; see \c #SPInterfaceSuite. */ +#define kSPInterfaceShutdownSelector "Shutdown" +/** PICA messaging system request for information; see \c #SPInterfaceSuite. + Illustrator sends this call to all plug-ins to implement + the "About Plug-ins" feature.*/ +#define kSPInterfaceAboutSelector "About" + +/** Adapter name for PICA version 2. */ +#define kSPSweetPea2Adapter "Sweet Pea 2 Adapter" +/** Adapter version for PICA version 2.*/ +#define kSPSweetPea2AdapterVersion 1 + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** A basic message, sent with \c #kSPInterfaceCaller. */ +typedef struct SPInterfaceMessage { + + /** The message data. */ + SPMessageData d; + +} SPInterfaceMessage; + + +/******************************************************************************* + ** + ** Suite + ** + **/ +/** @ingroup Suites + This suite provides is the ability for a plug-in to call + other plug-ins, by sending a message to the main entry point. + This is how the application communicates with plug-ins. + + Use \c #SetupMessageData() to prepare the message for a call, + \c #SendMessage() to send the call with the message, and + \c #EmptyMessageData() to terminate the operation, allowing + PICA to release the basic suite and store global variables. + + These calls work only with PICA plug-ins. Before making the calls, + use \c #SPAdaptersSuite::GetAdapterName() to determine that + the target is a PICA plug-in. For non-PICA plug-ins, use the + interface suite provided by the adapter. See \c #SPAdaptersSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPInterfaceSuite and \c #kSPInterfaceSuiteVersion. +*/ +typedef struct SPInterfaceSuite { + + /** Sends a message to a PICA plug-in, loading it if needed and + passing the caller, selector, and message to the main entry point. + @param plug-in The target plug-in object. + @param caller The caller constant. See @ref Callers. + @param selector The selector constant. See @ref Selectors. + @param message The message, initialized by \c #SetupMessageData(). + @param result [out] A buffer in which to return the result of the call, + as returned by the target plug-in. + */ + SPAPI SPErr (*SendMessage)( SPPluginRef plugin, const char *caller, const char *selector, + void *message, SPErr *result ); + + /** Initializes a message to be sent with \c #SendMessage(). + The function fills in the basic suite, the plug-in reference, + and the globals pointer that PICA keeps for that plug-in. + You must provide any additional data needed. + @param plugin The target plug-in object. + @param data The message structure, initialized with data required + for the intended call. + */ + SPAPI SPErr (*SetupMessageData)( SPPluginRef plugin, SPMessageData *data ); + /** Terminates a call to another plug-in, releasing the basic suite and + updating the target plug-in's globals pointer, in case it has changed. + Use after a call to \c #SendMessage(). + @param plugin The target plug-in object. + @param data The message structure, updated during the call. + */ + SPAPI SPErr (*EmptyMessageData)( SPPluginRef plugin, SPMessageData *data ); + + /** Starts up the plug-in in a plug-in list that exports a given suite. + Searches in the given plug-in list for the plug-in that exports the named + suite, and, if found, sends it the startup message. + @param pluginList The plug-in list object. Access PICA's global plug-in + list using \c #SPRuntimeSuite::GetRuntimePluginList(), + or create your own lists with \c #SPPluginsSuite::AllocatePluginList(). + @param name The suite name constant. + @param version The suite version number constant. + @param started [out] A buffer in which to return true (non-zero) if a + plug-in that exports the suite was found, false (0) if not. + */ + SPAPI SPErr (*StartupExport)( SPPluginListRef pluginList, const char *name, ai::int32 version, + ai::int32 *started ); + +} SPInterfaceSuite; + + +/** Internal */ +SPAPI SPErr SPSendMessage( SPPluginRef plugin, const char *caller, const char *selector, + void *message, SPErr *result ); + +/** Internal */ +SPAPI SPErr SPSetupMessageData( SPPluginRef plugin, SPMessageData *data ); +/** Internal */ +SPAPI SPErr SPEmptyMessageData( SPPluginRef plugin, SPMessageData *data ); + +/** Internal */ +SPAPI SPErr SPStartupExport( SPPluginListRef pluginList, const char *name, ai::int32 version, + ai::int32 *started ); + + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPMData.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPMData.h index 210a8aa..3e4033d 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPMData.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPMData.h @@ -1,76 +1,76 @@ -/***********************************************************************/ -/* */ -/* SPMData.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPMessageData__ -#define __SPMessageData__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "AiBasicTypes.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** The value of \c #SPMessageData::SPCheck, if the message data associated - with a call to a plug-in has come from \c #SPInterfaceSuite::SendMessage(), - or is prepared using \c #SPInterfaceSuite::SetupMessageData(). */ -#define kSPValidSPMessageData 'SPCk' - -/** Basic suite-access information provided with every call. */ -struct SPMessageData { -#ifdef __cplusplus - SPMessageData(ai::int32 SPCheck_ = 0, struct SPPlugin *self_ = 0, void *globals_ = 0, struct SPBasicSuite *basic_ = 0) - : SPCheck(SPCheck_), self(self_), globals(globals_), basic(basic_) {} -#endif - - /** \c #kSPValidSPMessageData if this is a valid PICA message. */ - ai::int32 SPCheck; - /** This plug-in, an \c #SPPluginRef. */ - struct SPPlugin *self; - /** An array of application-wide global variables. */ - void *globals; - /** A pointer to the basic PICA suite, which you use to obtain all other suites. */ - struct SPBasicSuite *basic; - -}; - - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPMData.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPMessageData__ +#define __SPMessageData__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "AIBasicTypes.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** The value of \c #SPMessageData::SPCheck, if the message data associated + with a call to a plug-in has come from \c #SPInterfaceSuite::SendMessage(), + or is prepared using \c #SPInterfaceSuite::SetupMessageData(). */ +#define kSPValidSPMessageData 'SPCk' + +/** Basic suite-access information provided with every call. */ +struct SPMessageData { +#ifdef __cplusplus + SPMessageData(ai::int32 SPCheck_ = 0, struct SPPlugin *self_ = 0, void *globals_ = 0, struct SPBasicSuite *basic_ = 0) + : SPCheck(SPCheck_), self(self_), globals(globals_), basic(basic_) {} +#endif + + /** \c #kSPValidSPMessageData if this is a valid PICA message. */ + ai::int32 SPCheck; + /** This plug-in, an \c #SPPluginRef. */ + struct SPPlugin *self; + /** An array of application-wide global variables. */ + void *globals; + /** A pointer to the basic PICA suite, which you use to obtain all other suites. */ + struct SPBasicSuite *basic; + +}; + + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPiPL.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPiPL.h index 8bc6ff5..a4c5e02 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPiPL.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPiPL.h @@ -1,341 +1,341 @@ -/***********************************************************************/ -/* */ -/* SPPiPL.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPPiPL__ -#define __SPPiPL__ - - -/******************************************************************************* - ** - ** Imports and alignment - ** - **/ - -#include "SPTypes.h" -#include "AiBasicTypes.h" - -#if PRAGMA_STRUCT_ALIGN -#pragma options align=mac68k -#endif - -#include "SPHeaderBegin.h" - -/******************************************************************************* - ** - ** Constants - ** - ** Note: 4-character long IDs must be defined in hexadecimal, not long - ** literal ('long'), due to Windows RC compilers not understanding what - ** to do with them. - ** - **/ - -/** Vendor identifier for a plug-in resource, \c #PIProperty::vendorID value. -
'ADBE' Vendor identifier for PICA-generic applications. */ -#define PIAdobeVendorID 0x41444245 - -/** Property mechanism version property, \c #PIProperty::propertyKey value -
'ivrs' PICA plug-in version. */ -#define PISPVersionProperty 0x69767273 - -/** Plug-in resource type, \c #PIProperty::propertyKey value. -
'impt' Suite import information. */ -#define PIImportsProperty 0x696D7074 - -/** Plug-in resource type, \c #PIProperty::propertyKey value. -
'expt' Suite export information. */ -#define PIExportsProperty 0x65787074 - -/** Plug-in resource type, \c #PIProperty::propertyKey value. -
'ppcR' Power PC resource information. */ -#define PIPowerPCCodeResProperty 0x70706352 - -/** Plug-in resource type, \c #PIProperty::propertyKey value. -
'heap' Mac OS PPC-only. -
If not defined, loads application default heap. -
If 0, loads system heap */ -#define PIDestinationHeapProperty 0x68656170 -/** Value of \c #PIDestinationHeapProperty, loads system heap */ -#define PILoadInAppHeap (1<<0) - -/** Plug-in resource type, \c #PIProperty::propertyKey value. -
'adpt' Adapter version property (a long value) */ -#define PIAdapterProperty 0x61647074 - -/** Plug-in resource type, \c #PIProperty::propertyKey value. -
'pinm' Internal plug-in name */ -#define PIPluginNameProperty 0x70696E6D - -/** Plug-in resource type, \c #PIProperty::propertyKey value. -
'AcpM' Message flags */ -#define PIConditionalMessages 0x4163704D -/** Flag bit for \c #PIConditionalMessages: plug-in allows external code to add to its - PiPL properties at runtime. */ -#define PIAcceptsPropertyMessage (1<<0) -/** Flag bit for \c #PIConditionalMessages: plug-in allows application to skip sending - it \c #kSPInterfaceShutdownSelector when application shuts down. */ -#define PISkipShutDownMessage (1<<1) -/** Flag bit for \c #PIConditionalMessages: plug-in accepts purge-cache messages. */ -#define PIAcceptsPurgeCachesMessage (1<<2) -/** Flag bit for \c #PIConditionalMessages: skip startup message. No longer used. */ -#define PISkipStartupMessage (1<<3) - -/** Internal. Plug-in resource type, \c #PIProperty::propertyKey value. -
'RelP' generated by Illustrator to optimize program launch */ -#define PIReleasePluginEarly 0x52656c50 - -/******************************************************************************* - ** - ** General PiPL properties and structures - ** - ** Many hosts multiply define these properties, so we bracket them - ** so they are only defined once. - ** - **/ - -#ifndef kGeneralPiPLPropertiesDefined // Already defined? -/** Internal: Defines the general properties only if the application has - not already done so. */ -#define kGeneralPiPLPropertiesDefined // Only define once. - -/** Data type for plug-in property key and vendor ID. See \c #PIProperty. */ -typedef ai::uint32 PIType; - -/** Plug-in properties version number. */ -#define kCurrentPiPLVersion 0 - -/** Plug-in property type, \c #PIProperty::propertyKey value. -
'kind' The plug-in type. */ -#define PIKindProperty 0x6b696e64 - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'm68k' 68k code file. - See \c #PI68KCodeDesc. */ -#define PI68KCodeProperty 0x6d36386bL - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'pwpc' PowerPC code file. - See \c #PICFMCodeDesc. */ -#define PIPowerPCCodeProperty 0x70777063 - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'ppcb' PowerPC Carbon code file. - See \c #PICFMCodeDesc. */ -#define PIPowerPCCarbonCodeProperty 0x70706362 - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'mach' PowerPC Mach-O code file. - See \c #PIMachCodeDesc. */ -#define PIPowerPCMachOCodeProperty 'mach' - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'mi32' Intel 32 bit Mach-O code descriptor. - See \c #PIMacIntelCodeDesc. */ -#define PICodeMacIntel32Property 'mi32' - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'mi64' Intel 64 bit Mach-O code descriptor. - See \c #PIMacIntelCodeDesc. */ -#define PICodeMacIntel64Property 'mi64' - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'frag' PowerPC fragment descriptor. - See \c #PIFragmentCodeDesc. */ -#define PICodeFragmentProperty 'frag' - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'frgc' PowerPC Carbon fragment descriptor. - See \c #PIFragmentCodeDesc. */ -#define PICarbonCodeFragmentProperty 'frgc' - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'wx86' Win32 Intel code file. - See \c #PIWin32X86CodeDesc */ -#define PIWin32X86CodeProperty 0x77783836 - -/** Plug-in resource file type, \c #PIProperty::propertyKey value. -
'fx86' Win16 Intel code file. - See \c #PIWin16X86CodeDesc */ -#define PIWin16X86CodeProperty 0x66783836 - -/** Plug-in property. Properties contain information about - plug-in resource files, such as their type and location. */ -typedef struct PIProperty { - /** Vendor-specific identifier. */ - PIType vendorID; - /** Identification key for this resource type. */ - PIType propertyKey; - /** 0-based index of this resource within its type. - Must be unique for properties of a given type within - a property list. */ - ai::int32 propertyID; - /** Number of characters in the data array. Rounded to a multiple of 4. */ - ai::int32 propertyLength; - /** The property data array that contains the property value, a string of 4 characters. */ - char propertyData[1]; -} PIProperty; - -/** Plug-in property list. Provides the version number of the plug-in - property mechanism itself, and properties for the associated plug-in. - */ -typedef struct PIPropertyList { - /** Version number for the \c #PIProperty structure. */ - ai::int32 version; - /** Number of properties in the list. */ - ai::int32 count; - /** The properties array. */ - PIProperty properties[1]; -} PIPropertyList; - -/* Following structures describe resource file types used in plug-in property lists. - * These structures obey Macintosh 68k alignment and padding rules though - * generally they are laid out so fields have natural alignment and any - * needed padding is explicit in the structure. - */ - -/** 68k code descriptor. No longer used. PICA only loads Mach-O code descriptor (ppc or intel) */ -typedef struct PI68KCodeDesc { - /** Property type key code. */ - PIType fType; - /** Property type unique identifier. */ - short fID; -} PI68KCodeDesc; - -/** PowerPC code descriptor. No longer used. PICA only loads Mach-O code descriptor (ppc or intel) plug-ins on mac. */ -typedef struct PICFMCodeDesc { - /** The offset within the data fork for the start of this plug-in’s - code fragment. This allows more than one code-fragment-based - plug-in per file. */ - ai::int32 fContainerOffset; - /** The length of this plug-in's code fragment. If this - is the only fragment in the file, the length is 0. */ - ai::int32 fContainerLength; - /** The entry-point name, used to look up the address of - the function to call within the fragment; allows a single code - fragment to export more than one plug-in. - - If the name is an empty string, the default entry point - for the code fragment is used. The entry-point name - must be an exported symbol of the code fragment. */ - unsigned char fEntryName[1]; -} PICFMCodeDesc; - -/** PowerPC Mach-O code descriptor. */ -typedef struct PIMachCodeDesc -{ - /** The entry point name, used to lookup the function which is - called to invoke the plug-in. */ - unsigned char fEntryName[1]; -} PIMachCodeDesc; - -/** PowerPC Mach-O code descriptor, as defined in Photoshop plug-ins. */ -typedef struct PIPSMachOCodeDesc -{ - /** Offset from beginning of container. */ - ai::int32 fContainerOffset; - - /** Length of data. */ - ai::int32 fContainerLength; - - /** Name of entrypoint ("main", "ENTRYPOINT", "", for example). */ - unsigned char fEntryName[1]; - -} PIPSMachOCodeDesc; - -/** For 'mi32' \c #PICodeMacIntel32Property - and 'mi64' \c #PICodeMacIntel64Property */ -typedef struct PIMacIntelCodeDesc -{ - - /** Name of entrypoint ("main", "ENTRYPOINT", "", for example). */ - unsigned char fEntryName[1]; - -} PIMacIntelCodeDesc; - -/** For 'frag' \c #PICodeFragmentProperty. - Takes precendence over \c #PIPowerPCCodeProperty */ -typedef struct PIFragmentCodeDesc -{ - /** Resource identifier. */ - ai::int32 fFragmentResource; - - /** Number of the fragment within the resource. */ - ai::int32 fFragmentNumber; - - /** Name of entrypoint ("main", "ENTRYPOINT", "", for example). - When an empty string, the first entrypoint in the fragment is used. */ - unsigned char fEntryName[1]; - -} PIFragmentCodeDesc; - -/** Win32 Intel code descriptor. */ -typedef struct PIWin32X86CodeDesc { - /** The entry point name, used to lookup the function which is - called to invoke the plug-in. A \c NULL terminated string, - padded with additional \c NULL characters if needed to - satisfy the 4-byte alignment requirement. */ - char fEntryName[1]; -} PIWin32X86CodeDesc; - -/** Win16 Intel code descriptor. No longer used. PICA only loads Win32 code descriptor plug-ins on windows. */ -typedef struct PIWin16X86CodeDesc { - /** The entry point name, used to lookup the function which is - called to invoke the plug-in. */ - char fEntryName[1]; -} PIWin16X86CodeDesc; - -#endif // kGeneralPiPLPropertiesDefined - - -/******************************************************************************* - ** - ** Additional Types - ** - **/ - -/** CFM code descriptor. No longer used. */ -typedef struct PICFMCodeResourceDesc { - /** Not used. */ - ai::int32 fContainerOffset; /* Currently unused, reserved. */ - /** The length of this plug-in's code fragment. If this - is the only fragment in the file, the length is 0. */ - ai::int32 fContainerLength; - /** Resource type key code. */ - PIType fType; - /** Unique identifier for the resource within the type. */ - short fID; - /** The entry-point name, used to look up the address of - the function to call within the fragment; allows a single code - fragment to export more than one plug-in. - - If the name is an empty string, the default entry point - for the code fragment is used. The entry-point name - must be an exported symbol of the code fragment. */ - unsigned char fEntryName[1]; -} PICFMCodeResourceDesc; - -/*******************************************************************************/ - -#if PRAGMA_STRUCT_ALIGN -#pragma options align=reset -#endif - -#include "SPHeaderEnd.h" - -#endif // SPPiPL +/***********************************************************************/ +/* */ +/* SPPiPL.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPPiPL__ +#define __SPPiPL__ + + +/******************************************************************************* + ** + ** Imports and alignment + ** + **/ + +#include "SPTypes.h" +#include "AIBasicTypes.h" + +#if PRAGMA_STRUCT_ALIGN +#pragma options align=mac68k +#endif + +#include "SPHeaderBegin.h" + +/******************************************************************************* + ** + ** Constants + ** + ** Note: 4-character long IDs must be defined in hexadecimal, not long + ** literal ('long'), due to Windows RC compilers not understanding what + ** to do with them. + ** + **/ + +/** Vendor identifier for a plug-in resource, \c #PIProperty::vendorID value. +
'ADBE' Vendor identifier for PICA-generic applications. */ +#define PIAdobeVendorID 0x41444245 + +/** Property mechanism version property, \c #PIProperty::propertyKey value +
'ivrs' PICA plug-in version. */ +#define PISPVersionProperty 0x69767273 + +/** Plug-in resource type, \c #PIProperty::propertyKey value. +
'impt' Suite import information. */ +#define PIImportsProperty 0x696D7074 + +/** Plug-in resource type, \c #PIProperty::propertyKey value. +
'expt' Suite export information. */ +#define PIExportsProperty 0x65787074 + +/** Plug-in resource type, \c #PIProperty::propertyKey value. +
'ppcR' Power PC resource information. */ +#define PIPowerPCCodeResProperty 0x70706352 + +/** Plug-in resource type, \c #PIProperty::propertyKey value. +
'heap' Mac OS PPC-only. +
If not defined, loads application default heap. +
If 0, loads system heap */ +#define PIDestinationHeapProperty 0x68656170 +/** Value of \c #PIDestinationHeapProperty, loads system heap */ +#define PILoadInAppHeap (1<<0) + +/** Plug-in resource type, \c #PIProperty::propertyKey value. +
'adpt' Adapter version property (a long value) */ +#define PIAdapterProperty 0x61647074 + +/** Plug-in resource type, \c #PIProperty::propertyKey value. +
'pinm' Internal plug-in name */ +#define PIPluginNameProperty 0x70696E6D + +/** Plug-in resource type, \c #PIProperty::propertyKey value. +
'AcpM' Message flags */ +#define PIConditionalMessages 0x4163704D +/** Flag bit for \c #PIConditionalMessages: plug-in allows external code to add to its + PiPL properties at runtime. */ +#define PIAcceptsPropertyMessage (1<<0) +/** Flag bit for \c #PIConditionalMessages: plug-in allows application to skip sending + it \c #kSPInterfaceShutdownSelector when application shuts down. */ +#define PISkipShutDownMessage (1<<1) +/** Flag bit for \c #PIConditionalMessages: plug-in accepts purge-cache messages. */ +#define PIAcceptsPurgeCachesMessage (1<<2) +/** Flag bit for \c #PIConditionalMessages: skip startup message. No longer used. */ +#define PISkipStartupMessage (1<<3) + +/** Internal. Plug-in resource type, \c #PIProperty::propertyKey value. +
'RelP' generated by Illustrator to optimize program launch */ +#define PIReleasePluginEarly 0x52656c50 + +/******************************************************************************* + ** + ** General PiPL properties and structures + ** + ** Many hosts multiply define these properties, so we bracket them + ** so they are only defined once. + ** + **/ + +#ifndef kGeneralPiPLPropertiesDefined // Already defined? +/** Internal: Defines the general properties only if the application has + not already done so. */ +#define kGeneralPiPLPropertiesDefined // Only define once. + +/** Data type for plug-in property key and vendor ID. See \c #PIProperty. */ +typedef ai::uint32 PIType; + +/** Plug-in properties version number. */ +#define kCurrentPiPLVersion 0 + +/** Plug-in property type, \c #PIProperty::propertyKey value. +
'kind' The plug-in type. */ +#define PIKindProperty 0x6b696e64 + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'm68k' 68k code file. + See \c #PI68KCodeDesc. */ +#define PI68KCodeProperty 0x6d36386bL + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'pwpc' PowerPC code file. + See \c #PICFMCodeDesc. */ +#define PIPowerPCCodeProperty 0x70777063 + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'ppcb' PowerPC Carbon code file. + See \c #PICFMCodeDesc. */ +#define PIPowerPCCarbonCodeProperty 0x70706362 + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'mach' PowerPC Mach-O code file. + See \c #PIMachCodeDesc. */ +#define PIPowerPCMachOCodeProperty 'mach' + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'mi32' Intel 32 bit Mach-O code descriptor. + See \c #PIMacIntelCodeDesc. */ +#define PICodeMacIntel32Property 'mi32' + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'mi64' Intel 64 bit Mach-O code descriptor. + See \c #PIMacIntelCodeDesc. */ +#define PICodeMacIntel64Property 'mi64' + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'frag' PowerPC fragment descriptor. + See \c #PIFragmentCodeDesc. */ +#define PICodeFragmentProperty 'frag' + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'frgc' PowerPC Carbon fragment descriptor. + See \c #PIFragmentCodeDesc. */ +#define PICarbonCodeFragmentProperty 'frgc' + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'wx86' Win32 Intel code file. + See \c #PIWin32X86CodeDesc */ +#define PIWin32X86CodeProperty 0x77783836 + +/** Plug-in resource file type, \c #PIProperty::propertyKey value. +
'fx86' Win16 Intel code file. + See \c #PIWin16X86CodeDesc */ +#define PIWin16X86CodeProperty 0x66783836 + +/** Plug-in property. Properties contain information about + plug-in resource files, such as their type and location. */ +typedef struct PIProperty { + /** Vendor-specific identifier. */ + PIType vendorID; + /** Identification key for this resource type. */ + PIType propertyKey; + /** 0-based index of this resource within its type. + Must be unique for properties of a given type within + a property list. */ + ai::int32 propertyID; + /** Number of characters in the data array. Rounded to a multiple of 4. */ + ai::int32 propertyLength; + /** The property data array that contains the property value, a string of 4 characters. */ + char propertyData[1]; +} PIProperty; + +/** Plug-in property list. Provides the version number of the plug-in + property mechanism itself, and properties for the associated plug-in. + */ +typedef struct PIPropertyList { + /** Version number for the \c #PIProperty structure. */ + ai::int32 version; + /** Number of properties in the list. */ + ai::int32 count; + /** The properties array. */ + PIProperty properties[1]; +} PIPropertyList; + +/* Following structures describe resource file types used in plug-in property lists. + * These structures obey Macintosh 68k alignment and padding rules though + * generally they are laid out so fields have natural alignment and any + * needed padding is explicit in the structure. + */ + +/** 68k code descriptor. No longer used. PICA only loads Mach-O code descriptor (ppc or intel) */ +typedef struct PI68KCodeDesc { + /** Property type key code. */ + PIType fType; + /** Property type unique identifier. */ + short fID; +} PI68KCodeDesc; + +/** PowerPC code descriptor. No longer used. PICA only loads Mach-O code descriptor (ppc or intel) plug-ins on mac. */ +typedef struct PICFMCodeDesc { + /** The offset within the data fork for the start of this plug-in’s + code fragment. This allows more than one code-fragment-based + plug-in per file. */ + ai::int32 fContainerOffset; + /** The length of this plug-in's code fragment. If this + is the only fragment in the file, the length is 0. */ + ai::int32 fContainerLength; + /** The entry-point name, used to look up the address of + the function to call within the fragment; allows a single code + fragment to export more than one plug-in. + + If the name is an empty string, the default entry point + for the code fragment is used. The entry-point name + must be an exported symbol of the code fragment. */ + unsigned char fEntryName[1]; +} PICFMCodeDesc; + +/** PowerPC Mach-O code descriptor. */ +typedef struct PIMachCodeDesc +{ + /** The entry point name, used to lookup the function which is + called to invoke the plug-in. */ + unsigned char fEntryName[1]; +} PIMachCodeDesc; + +/** PowerPC Mach-O code descriptor, as defined in Photoshop plug-ins. */ +typedef struct PIPSMachOCodeDesc +{ + /** Offset from beginning of container. */ + ai::int32 fContainerOffset; + + /** Length of data. */ + ai::int32 fContainerLength; + + /** Name of entrypoint ("main", "ENTRYPOINT", "", for example). */ + unsigned char fEntryName[1]; + +} PIPSMachOCodeDesc; + +/** For 'mi32' \c #PICodeMacIntel32Property + and 'mi64' \c #PICodeMacIntel64Property */ +typedef struct PIMacIntelCodeDesc +{ + + /** Name of entrypoint ("main", "ENTRYPOINT", "", for example). */ + unsigned char fEntryName[1]; + +} PIMacIntelCodeDesc; + +/** For 'frag' \c #PICodeFragmentProperty. + Takes precendence over \c #PIPowerPCCodeProperty */ +typedef struct PIFragmentCodeDesc +{ + /** Resource identifier. */ + ai::int32 fFragmentResource; + + /** Number of the fragment within the resource. */ + ai::int32 fFragmentNumber; + + /** Name of entrypoint ("main", "ENTRYPOINT", "", for example). + When an empty string, the first entrypoint in the fragment is used. */ + unsigned char fEntryName[1]; + +} PIFragmentCodeDesc; + +/** Win32 Intel code descriptor. */ +typedef struct PIWin32X86CodeDesc { + /** The entry point name, used to lookup the function which is + called to invoke the plug-in. A \c NULL terminated string, + padded with additional \c NULL characters if needed to + satisfy the 4-byte alignment requirement. */ + char fEntryName[1]; +} PIWin32X86CodeDesc; + +/** Win16 Intel code descriptor. No longer used. PICA only loads Win32 code descriptor plug-ins on windows. */ +typedef struct PIWin16X86CodeDesc { + /** The entry point name, used to lookup the function which is + called to invoke the plug-in. */ + char fEntryName[1]; +} PIWin16X86CodeDesc; + +#endif // kGeneralPiPLPropertiesDefined + + +/******************************************************************************* + ** + ** Additional Types + ** + **/ + +/** CFM code descriptor. No longer used. */ +typedef struct PICFMCodeResourceDesc { + /** Not used. */ + ai::int32 fContainerOffset; /* Currently unused, reserved. */ + /** The length of this plug-in's code fragment. If this + is the only fragment in the file, the length is 0. */ + ai::int32 fContainerLength; + /** Resource type key code. */ + PIType fType; + /** Unique identifier for the resource within the type. */ + short fID; + /** The entry-point name, used to look up the address of + the function to call within the fragment; allows a single code + fragment to export more than one plug-in. + + If the name is an empty string, the default entry point + for the code fragment is used. The entry-point name + must be an exported symbol of the code fragment. */ + unsigned char fEntryName[1]; +} PICFMCodeResourceDesc; + +/*******************************************************************************/ + +#if PRAGMA_STRUCT_ALIGN +#pragma options align=reset +#endif + +#include "SPHeaderEnd.h" + +#endif // SPPiPL diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPlugs.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPlugs.h index 705358f..638440e 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPlugs.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPPlugs.h @@ -1,414 +1,420 @@ -/***********************************************************************/ -/* */ -/* SPPlugs.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPPlugins__ -#define __SPPlugins__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPFiles.h" -#include "SPAdapts.h" -#include "SPProps.h" -#include "SPStrngs.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** PICA plug-ins suite name */ -#define kSPPluginsSuite "SP Plug-ins Suite" -/** PICA plug-ins suite version */ -#define kSPPluginsSuiteVersion4 4 -/** PICA plug-ins suite version */ -#define kSPPluginsSuiteVersion5 5 - -#ifdef WIN_ENV - /** PICA plug-ins suite version */ - #define kSPPluginsSuiteVersion6 6 - /** PICA plug-ins suite version */ - #define kSPPluginsSuiteVersion kSPPluginsSuiteVersion6 -#elif MAC_ENV - #define kSPPluginsSuiteVersion kSPPluginsSuiteVersion4 -#endif - -/** PICA global list of available plug-ins. - @see \c #SPRuntimeSuite::GetRuntimePluginList() */ -#define kSPRuntimePluginList ((SPPluginListRef)NULL) - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a plug-in object. Access with the \c #SPPluginsSuite. */ -typedef struct SPPlugin *SPPluginRef; -/** A list of plug-in objects. Create with - \c #SPPluginsSuite::AllocatePluginList(), or use - the global list, \c #kSPRuntimePluginList. */ -typedef struct SPPluginList *SPPluginListRef; -/** An iterator object for examining a plug-in list. - See \c #SPPluginsSuite::NewPluginListIterator(). */ -typedef struct SPPluginListIterator *SPPluginListIteratorRef; - -/** PICA file-access error */ -typedef struct _SPErrorData -{ - /** The file for which the error occurred. */ - SPPlatformFileReference mErrorFile; - /** Error code, see @ref Errors. */ - SPErr mErrorCode; -} SPErrorData, *SPErrorDataPtr; - -/** */ -typedef SPAPI SPErr (*SPPluginEntryFunc)( const char *caller, const char *selector, void *message ); - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** This suite allows you to access and manipulate the plug-in object for your own - and those of other plug-ins managed by the Adobe plug-in manager (PICA). - You can access both plug-ins provided with the application (\e host plug-ins), - and external plug-ins.You can query and set plug-in states, - including the "broken" state, which indicates that a plug-in has - become unavailable due to an error condition. - - You can also use this suite to create and use your own lists of plug-ins, - in addition to the global list kept by the application. - - For higher-level access to plug-ins, see \c #AIPluginSuite. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPPluginsSuite and \c #kSPPluginsSuiteVersion. - */ -typedef struct SPPluginsSuite { - - /** Creates a new plug-in list. You can also access PICA's global plug-in list, - using \c #SPRuntimeSuite::GetRuntimePluginList(). - @param stringPool The string pool in which to keep plug-in names. - @param pluginList [out] A buffer in which to return the new list object. - */ - SPAPI SPErr (*AllocatePluginList)( SPStringPoolRef strings, SPPluginListRef *pluginList ); - /** Frees a list of plug-ins allocated with \c #AllocatePluginList(), and - also frees any entries in the list. Do not free the global list (\c #kSPRuntimePluginList). - @param pluginList The plug-in list object. - */ - SPAPI SPErr (*FreePluginList)( SPPluginListRef pluginList ); - - /** Creates a new plug-in object and adds it to a plug-in list. - @param pluginList The plug-in list object, or \c NULL to use the - global list. - @param fileSpec The file specification for the plug-in code and resources. - @param PiPL The structure containing the plug-in properties. - @param adapterName The unique identifying name of the adapter for the new plug-in. - @param adapterInfo A pointer to the adapter-defined structure that stores needed - information about this plug-in. - @param plugin [out] A buffer in which to return the new plug-in object. - @see \c #AllocatePluginList(), \c #SPAdaptersSuite - */ - - SPAPI SPErr (*AddPlugin)( SPPluginListRef pluginList, const SPPlatformFileReference *fileSpec, - PIPropertyList *PiPL, const char *adapterName, void *adapterInfo, SPPluginRef *plugin ); - - /** Creates an iterator object with which to traverse a plug-in list. - The iterator is initially set to the first plug-in in the list. - @param pluginList The plug-in list object, or \c NULL to use the - global list. - @param iter [out] A buffer in which to return the new iterator object. - @see \c #NextPlugin(), \c #DeletePluginListIterator() - */ - SPAPI SPErr (*NewPluginListIterator)( SPPluginListRef pluginList, SPPluginListIteratorRef *iter ); - /** Retrieves the current plug-in and advances a plug-in-list iterator to the next plug-in in the list. - @param iter The plug-in-list iterator object. - @param plugin [out] A buffer in which to return the current plug-in object, \c NULL - if the end of the list has been reached. - @see \c #NewPluginListIterator(), - */ - SPAPI SPErr (*NextPlugin)( SPPluginListIteratorRef iter, SPPluginRef *plugin ); - /** Frees a plug-in-list iterator that is no longer needed. - @param iter The plug-in-list iterator object. - @see \c #NewPluginListIterator(), - */ - SPAPI SPErr (*DeletePluginListIterator)( SPPluginListIteratorRef iter ); - /** Reports whether a plug-in that is needed is available in a plug-in list. - @param pluginList The plug-in list object, or \c NULL to use the global list. - @param available [out] A buffer in which to return true if the plug-in - is found in the list. - @see \c #SPInterfaceSuite::StartupExport() - */ - SPAPI SPErr (*GetPluginListNeededSuiteAvailable)( SPPluginListRef pluginList, SPBoolean *available ); - - /** Retrieves the callback structure provided by the host application for a plug-in. - @param plugin The plug-in object. - @param host A buffer in which to return the callback procedure. - */ - SPAPI SPErr (*GetPluginHostEntry)( SPPluginRef plugin, SPPluginEntryFunc *host ); - /** Retrieves the code and resources file of a plug-in. - @param plugin The plug-in object. - @param fileSpec [out] A buffer in which to return the file specification. - @see \c #SPFilesSuite - */ - SPAPI SPErr (*GetPluginFileReference)( SPPluginRef plugin, SPPlatformFileReference *fileSpec ); - /** Retrieves the property list of a plug-in. - @param plugin The plug-in object. - @param propertList [out] A buffer in which to return the property list object. - @see \c #SPPropertiesSuite - */ - SPAPI SPErr (*GetPluginPropertyList)( SPPluginRef plugin, SPPropertyListRef *propertList ); - /** Retrieves the global variables of a plug-in. This is the same value passed in messages - to the plug-in, which PICA stores when the plug-in is unloaded. - @param plugin The plug-in object. - @param globals [out] A buffer in which to return a pointer to the global variable array. - */ - SPAPI SPErr (*GetPluginGlobals)( SPPluginRef plugin, void **globals ); - /** Sets the global variables for a plug-in. This is the same value passed in messages - to the plug-in, which PICA stores when the plug-in is unloaded. - @param plugin The plug-in object. - @param globals The new global variable array. - */ - SPAPI SPErr (*SetPluginGlobals)( SPPluginRef plugin, void *globals ); - /** Reports whether a plug-in has received and returned from the interface start-up message. - @param plugin The plug-in object. - @param started [out] A buffer in which to return true (non-zero) if the plug-in has been started, - false (0) otherwise. - */ - SPAPI SPErr (*GetPluginStarted)( SPPluginRef plugin, ai::int32 *started ); - /** Sets whether a plug-in has received and returned from the interface start-up message. - @param plugin The plug-in object. - @param started True (non-zero) if the plug-in has been started, false (0) otherwise. - */ - SPAPI SPErr (*SetPluginStarted)( SPPluginRef plugin, ai::int32 started ); - /** Reports whether a plug-in is instructed to skip the start-up message. - @param plugin The plug-in object. - @param skipShutdown [out] A buffer in which to return true (non-zero) if the plug-in skips - the start-up message, false (0) otherwise. - */ - SPAPI SPErr (*GetPluginSkipShutdown)( SPPluginRef plugin, ai::int32 *skipShutdown ); - /** Instructs a plug-in to respond or not to respond to the start-up message. - @param plugin The plug-in object. - @param skipShutdown True (non-zero) to skip the start-up message, false (0) - to respond normally to the start-up message. - */ - SPAPI SPErr (*SetPluginSkipShutdown)( SPPluginRef plugin, ai::int32 skipShutdown ); - /** Reports whether a plug-in has reported an error condition that makes it unavailable. - @param plugin The plug-in object. - @param broken [out] A buffer in which to return true (non-zero) if - the plug-in is marked as broken, false (0) otherwise. - */ - SPAPI SPErr (*GetPluginBroken)( SPPluginRef plugin, ai::int32 *broken ); - /** Sets or clears the broken flag that marks a plug-in as unavailable due to an - error condition. - @param plugin The plug-in object. - @param broken True (non-zero) to mark the plug-in as broken, false (0) - to clear the broken flag. - */ - SPAPI SPErr (*SetPluginBroken)( SPPluginRef plugin, ai::int32 broken ); - /** Retrieves the adapter for a plug-in. - @param plugin The plug-in object. - @param adapter [out] A buffer in which to return the adapter object. - @see \c #SPAdaptersSuite - */ - SPAPI SPErr (*GetPluginAdapter)( SPPluginRef plugin, SPAdapterRef *adapter ); - /** Retrieves the adapter-specific information for a plug-in. Typically - used only by the adapter that defined the information. Other plug-ins - should use \c #AIPluginSuite::GetPluginOptions(). - @param plugin The plug-in object. - @param adapterInfo [out] A buffer in which to return a pointer to the adapter-defined - information structure. - @see \c #SPAdaptersSuite - */ - SPAPI SPErr (*GetPluginAdapterInfo)( SPPluginRef plugin, void **adapterInfo ); - /** Sets the adapter-specific information for a plug-in. Typically - used only by the adapter that defined the information. Other plug-ins - should use \c #AIPluginSuite::SetPluginOptions(). - @param plugin The plug-in object. - @param adapterInfo The adapter-defined information structure. - @see \c #SPAdaptersSuite - */ - SPAPI SPErr (*SetPluginAdapterInfo)( SPPluginRef plugin, void *adapterInfo ); - - /** Retrieves a specific property from the property list for a plug-in. If - the property is not found in the list, sends the plug-in the - \c #kSPPropertiesAcquireSelector message. The plug-in can ignore the - message, or it can create and return the requested property. In either - case, this function adds the (possibly \c NULL) property to the list - and returns it. - @param plugin The plug-in object. - @param vendorID The property vendor ID code. - @param propetyKey The property type key code. - @param propertyID The specific property identifier. - @param p [out] A buffer in which to return a pointer to the property object. - @see \c #SPPropertiesSuite - */ - SPAPI SPErr (*FindPluginProperty)( SPPluginRef plugin, PIType vendorID, PIType propertyKey, ai::int32 propertyID, PIProperty **p ); - - /** Retrieves the name of a plug-in. - @param plugin The plug-in object. - @param name [out] A buffer in which to return the name string. - */ - SPAPI SPErr (*GetPluginName)( SPPluginRef plugin, const char **name ); - /** Sets the name of a plug-in. - @param plugin The plug-in object. - @param name The new name string. - */ - SPAPI SPErr (*SetPluginName)( SPPluginRef plugin, const char *name ); - /** Retrieves a plug-in by name. - @param name The name string. - @param plugin [out] A buffer in which to return the plug-in object. - */ - SPAPI SPErr (*GetNamedPlugin)( const char *name, SPPluginRef *plugin); - - /** Sets the property list for a plug-in. - @param plugin The plug-in object. - @param file The file containing the property list. - */ - SPAPI SPErr (*SetPluginPropertyList)( SPPluginRef plugin, SPFileRef file ); - - // Plug-ins suite version 5 - /* This attribute frees the adapterInfo field for private data for adapters. */ - /** Retrieves host information for a plug-in. - @param plugin The plug-in object. - @param hostInfo [out] A buffer in which to return a pointer to the - host information structure. - */ - SPAPI SPErr (*GetPluginHostInfo)( SPPluginRef plugin, void **hostInfo ); - /** Sets host information for a plug-in. - @param plugin The plug-in object. - @param hostInfo The new host information structure. - */ - SPAPI SPErr (*SetPluginHostInfo)( SPPluginRef plugin, void *hostInfo ); - -} SPPluginsSuite; - - -/** Internal */ -SPAPI SPErr SPAllocatePluginList( SPStringPoolRef strings, SPPluginListRef *pluginList ); -/** Internal */ -SPAPI SPErr SPFreePluginList( SPPluginListRef pluginList ); -/** Internal */ -SPAPI SPErr SPGetPluginListNeededSuiteAvailable( SPPluginListRef pluginList, SPBoolean *available ); - -/** Internal */ -SPAPI SPErr SPAddPlugin( SPPluginListRef pluginList, const SPPlatformFileReference *fileSpec, - PIPropertyList *PiPL, const char *adapterName, void *adapterInfo, SPPluginRef *plugin ); - -/** Internal */ -SPAPI SPErr SPNewPluginListIterator( SPPluginListRef pluginList, SPPluginListIteratorRef *iter ); -/** Internal */ -SPAPI SPErr SPNextPlugin( SPPluginListIteratorRef iter, SPPluginRef *plugin ); -/** Internal */ -SPAPI SPErr SPDeletePluginListIterator( SPPluginListIteratorRef iter ); - -/** Internal */ -SPAPI SPErr SPGetHostPluginEntry( SPPluginRef plugin, SPPluginEntryFunc *host ); -/** Internal */ -SPAPI SPErr SPGetPluginFileReference( SPPluginRef plugin, SPPlatformFileReference *fileSpec ); -/** Internal */ -SPAPI SPErr SPGetPluginPropertyList( SPPluginRef plugin, SPPropertyListRef *propertyList ); -/** Internal */ -SPAPI SPErr SPGetPluginGlobals( SPPluginRef plugin, void **globals ); -/** Internal */ -SPAPI SPErr SPSetPluginGlobals( SPPluginRef plugin, void *globals ); -/** Internal */ -SPAPI SPErr SPGetPluginStarted( SPPluginRef plugin, ai::int32 *started ); -/** Internal */ -SPAPI SPErr SPSetPluginStarted( SPPluginRef plugin, ai::int32 started ); -/** Internal */ -SPAPI SPErr SPGetPluginSkipShutdown( SPPluginRef plugin, ai::int32 *skipShutdown ); -/** Internal */ -SPAPI SPErr SPSetPluginSkipShutdown( SPPluginRef plugin, ai::int32 skipShutdown ); -/** Internal */ -SPAPI SPErr SPGetPluginBroken( SPPluginRef plugin, ai::int32 *broken ); -/** Internal */ -SPAPI SPErr SPSetPluginBroken( SPPluginRef plugin, ai::int32 broken ); -/** Internal */ -SPAPI SPErr SPGetPluginAdapter( SPPluginRef plugin, SPAdapterRef *adapter ); -/** Internal */ -SPAPI SPErr SPGetPluginAdapterInfo( SPPluginRef plugin, void **adapterInfo ); -/** Internal */ -SPAPI SPErr SPSetPluginAdapterInfo( SPPluginRef plugin, void *adapterInfo ); - -/** Internal */ -SPAPI SPErr SPFindPluginProperty( SPPluginRef plugin, PIType vendorID, PIType propertyKey, - ai::int32 propertyID, PIProperty **p ); - -/** Internal */ -SPAPI SPErr SPGetPluginName( SPPluginRef plugin, const char **name ); -/** Internal */ -SPAPI SPErr SPSetPluginName( SPPluginRef plugin, const char *name ); -/** Internal */ -SPAPI SPErr SPGetNamedPlugin( const char *name, SPPluginRef *plugin); - -/** Internal */ -SPAPI SPErr SPSetPluginPropertyList( SPPluginRef plugin, SPFileRef file ); - -/** Internal */ -SPErr SPAddHostPlugin( SPPluginListRef pluginList, SPPluginEntryFunc entry, void *access, const char *adapterName, - void *adapterInfo, SPPluginRef *plugin, const char *name); - /* access is SPPlatformAccessRef */ - - -// Plug-ins suite version 5 -/* This attribute frees the adapterInfo field for private data for adapters. */ -/** Internal */ -SPAPI SPErr SPGetPluginHostInfo( SPPluginRef plugin, void **hostInfo ); -/** Internal */ -SPAPI SPErr SPSetPluginHostInfo( SPPluginRef plugin, void *hostInfo ); - -#ifdef WIN_ENV - /** Internal */ - SPAPI SPErr SPAddPlugin_v4_v5( SPPluginListRef pluginList, const SPPlatformFileSpecification *fileSpec, - PIPropertyList *PiPL, const char *adapterName, void *adapterInfo, SPPluginRef *plugin ); - - /** Internal */ - SPAPI SPErr SPGetPluginFileReference_v4_v5( SPPluginRef plugin, SPPlatformFileSpecification *fileSpec ); -#endif -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPPlugs.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPPlugins__ +#define __SPPlugins__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPFiles.h" +#include "SPAdapts.h" +#include "SPProps.h" +#include "SPStrngs.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** PICA plug-ins suite name */ +#define kSPPluginsSuite "SP Plug-ins Suite" +/** PICA plug-ins suite version */ +#define kSPPluginsSuiteVersion4 4 +/** PICA plug-ins suite version */ +#define kSPPluginsSuiteVersion5 5 + +#ifdef WIN_ENV + /** PICA plug-ins suite version */ + #define kSPPluginsSuiteVersion6 6 + /** PICA plug-ins suite version */ + #define kSPPluginsSuiteVersion kSPPluginsSuiteVersion6 +#elif defined(MAC_ENV) + #define kSPPluginsSuiteVersion kSPPluginsSuiteVersion4 +#elif defined(LINUX_ENV) + #define kSPPluginsSuiteVersion kSPPluginsSuiteVersion4 +#endif + +/** PICA global list of available plug-ins. + @see \c #SPRuntimeSuite::GetRuntimePluginList() */ +#define kSPRuntimePluginList ((SPPluginListRef)NULL) + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a plug-in object. Access with the \c #SPPluginsSuite. */ +typedef struct SPPlugin *SPPluginRef; +/** A list of plug-in objects. Create with + \c #SPPluginsSuite::AllocatePluginList(), or use + the global list, \c #kSPRuntimePluginList. */ +typedef struct SPPluginList *SPPluginListRef; +/** An iterator object for examining a plug-in list. + See \c #SPPluginsSuite::NewPluginListIterator(). */ +typedef struct SPPluginListIterator *SPPluginListIteratorRef; + +/** PICA file-access error */ +typedef struct _SPErrorData +{ + /** The file for which the error occurred. */ + SPPlatformFileReference mErrorFile; + /** Error code, see @ref Errors. */ + SPErr mErrorCode; + SPPluginRef mPluginRef; +} SPErrorData, *SPErrorDataPtr; + +/** */ +typedef SPAPI SPErr (*SPPluginEntryFunc)( const char *caller, const char *selector, void *message ); + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** This suite allows you to access and manipulate the plug-in object for your own + and those of other plug-ins managed by the Adobe plug-in manager (PICA). + You can access both plug-ins provided with the application (\e host plug-ins), + and external plug-ins.You can query and set plug-in states, + including the "broken" state, which indicates that a plug-in has + become unavailable due to an error condition. + + You can also use this suite to create and use your own lists of plug-ins, + in addition to the global list kept by the application. + + For higher-level access to plug-ins, see \c #AIPluginSuite. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPPluginsSuite and \c #kSPPluginsSuiteVersion. + */ +typedef struct SPPluginsSuite { + + /** Creates a new plug-in list. You can also access PICA's global plug-in list, + using \c #SPRuntimeSuite::GetRuntimePluginList(). + @param stringPool The string pool in which to keep plug-in names. + @param pluginList [out] A buffer in which to return the new list object. + */ + SPAPI SPErr (*AllocatePluginList)( SPStringPoolRef strings, SPPluginListRef *pluginList ); + /** Frees a list of plug-ins allocated with \c #AllocatePluginList(), and + also frees any entries in the list. Do not free the global list (\c #kSPRuntimePluginList). + @param pluginList The plug-in list object. + */ + SPAPI SPErr (*FreePluginList)( SPPluginListRef pluginList ); + + /** Creates a new plug-in object and adds it to a plug-in list. + @param pluginList The plug-in list object, or \c NULL to use the + global list. + @param fileSpec The file specification for the plug-in code and resources. + @param PiPL The structure containing the plug-in properties. + @param adapterName The unique identifying name of the adapter for the new plug-in. + @param adapterInfo A pointer to the adapter-defined structure that stores needed + information about this plug-in. + @param plugin [out] A buffer in which to return the new plug-in object. + @see \c #AllocatePluginList(), \c #SPAdaptersSuite + */ + + SPAPI SPErr (*AddPlugin)( SPPluginListRef pluginList, const SPPlatformFileReference *fileSpec, + PIPropertyList *PiPL, const char *adapterName, void *adapterInfo, SPPluginRef *plugin ); + + /** Creates an iterator object with which to traverse a plug-in list. + The iterator is initially set to the first plug-in in the list. + @param pluginList The plug-in list object, or \c NULL to use the + global list. + @param iter [out] A buffer in which to return the new iterator object. + @see \c #NextPlugin(), \c #DeletePluginListIterator() + */ + SPAPI SPErr (*NewPluginListIterator)( SPPluginListRef pluginList, SPPluginListIteratorRef *iter ); + /** Retrieves the current plug-in and advances a plug-in-list iterator to the next plug-in in the list. + @param iter The plug-in-list iterator object. + @param plugin [out] A buffer in which to return the current plug-in object, \c NULL + if the end of the list has been reached. + @see \c #NewPluginListIterator(), + */ + SPAPI SPErr (*NextPlugin)( SPPluginListIteratorRef iter, SPPluginRef *plugin ); + /** Frees a plug-in-list iterator that is no longer needed. + @param iter The plug-in-list iterator object. + @see \c #NewPluginListIterator(), + */ + SPAPI SPErr (*DeletePluginListIterator)( SPPluginListIteratorRef iter ); + /** Reports whether a plug-in that is needed is available in a plug-in list. + @param pluginList The plug-in list object, or \c NULL to use the global list. + @param available [out] A buffer in which to return true if the plug-in + is found in the list. + @see \c #SPInterfaceSuite::StartupExport() + */ + SPAPI SPErr (*GetPluginListNeededSuiteAvailable)( SPPluginListRef pluginList, SPBoolean *available ); + + /** Retrieves the callback structure provided by the host application for a plug-in. + @param plugin The plug-in object. + @param host A buffer in which to return the callback procedure. + */ + SPAPI SPErr (*GetPluginHostEntry)( SPPluginRef plugin, SPPluginEntryFunc *host ); + /** Retrieves the code and resources file of a plug-in. + @param plugin The plug-in object. + @param fileSpec [out] A buffer in which to return the file specification. + @see \c #SPFilesSuite + */ + SPAPI SPErr (*GetPluginFileReference)( SPPluginRef plugin, SPPlatformFileReference *fileSpec ); + /** Retrieves the property list of a plug-in. + @param plugin The plug-in object. + @param propertList [out] A buffer in which to return the property list object. + @see \c #SPPropertiesSuite + */ + SPAPI SPErr (*GetPluginPropertyList)( SPPluginRef plugin, SPPropertyListRef *propertList ); + /** Retrieves the global variables of a plug-in. This is the same value passed in messages + to the plug-in, which PICA stores when the plug-in is unloaded. + @param plugin The plug-in object. + @param globals [out] A buffer in which to return a pointer to the global variable array. + */ + SPAPI SPErr (*GetPluginGlobals)( SPPluginRef plugin, void **globals ); + /** Sets the global variables for a plug-in. This is the same value passed in messages + to the plug-in, which PICA stores when the plug-in is unloaded. + @param plugin The plug-in object. + @param globals The new global variable array. + */ + SPAPI SPErr (*SetPluginGlobals)( SPPluginRef plugin, void *globals ); + /** Reports whether a plug-in has received and returned from the interface start-up message. + @param plugin The plug-in object. + @param started [out] A buffer in which to return true (non-zero) if the plug-in has been started, + false (0) otherwise. + */ + SPAPI SPErr (*GetPluginStarted)( SPPluginRef plugin, ai::int32 *started ); + /** Sets whether a plug-in has received and returned from the interface start-up message. + @param plugin The plug-in object. + @param started True (non-zero) if the plug-in has been started, false (0) otherwise. + */ + SPAPI SPErr (*SetPluginStarted)( SPPluginRef plugin, ai::int32 started ); + /** Reports whether a plug-in is instructed to skip the start-up message. + @param plugin The plug-in object. + @param skipShutdown [out] A buffer in which to return true (non-zero) if the plug-in skips + the start-up message, false (0) otherwise. + */ + SPAPI SPErr (*GetPluginSkipShutdown)( SPPluginRef plugin, ai::int32 *skipShutdown ); + /** Instructs a plug-in to respond or not to respond to the start-up message. + @param plugin The plug-in object. + @param skipShutdown True (non-zero) to skip the start-up message, false (0) + to respond normally to the start-up message. + */ + SPAPI SPErr (*SetPluginSkipShutdown)( SPPluginRef plugin, ai::int32 skipShutdown ); + /** Reports whether a plug-in has reported an error condition that makes it unavailable. + @param plugin The plug-in object. + @param broken [out] A buffer in which to return true (non-zero) if + the plug-in is marked as broken, false (0) otherwise. + */ + SPAPI SPErr (*GetPluginBroken)( SPPluginRef plugin, ai::int32 *broken ); + /** Sets or clears the broken flag that marks a plug-in as unavailable due to an + error condition. + @param plugin The plug-in object. + @param broken True (non-zero) to mark the plug-in as broken, false (0) + to clear the broken flag. + */ + SPAPI SPErr (*SetPluginBroken)( SPPluginRef plugin, ai::int32 broken ); + /** Retrieves the adapter for a plug-in. + @param plugin The plug-in object. + @param adapter [out] A buffer in which to return the adapter object. + @see \c #SPAdaptersSuite + */ + SPAPI SPErr (*GetPluginAdapter)( SPPluginRef plugin, SPAdapterRef *adapter ); + /** Retrieves the adapter-specific information for a plug-in. Typically + used only by the adapter that defined the information. Other plug-ins + should use \c #AIPluginSuite::GetPluginOptions(). + @param plugin The plug-in object. + @param adapterInfo [out] A buffer in which to return a pointer to the adapter-defined + information structure. + @see \c #SPAdaptersSuite + */ + SPAPI SPErr (*GetPluginAdapterInfo)( SPPluginRef plugin, void **adapterInfo ); + /** Sets the adapter-specific information for a plug-in. Typically + used only by the adapter that defined the information. Other plug-ins + should use \c #AIPluginSuite::SetPluginOptions(). + @param plugin The plug-in object. + @param adapterInfo The adapter-defined information structure. + @see \c #SPAdaptersSuite + */ + SPAPI SPErr (*SetPluginAdapterInfo)( SPPluginRef plugin, void *adapterInfo ); + + /** Retrieves a specific property from the property list for a plug-in. If + the property is not found in the list, sends the plug-in the + \c #kSPPropertiesAcquireSelector message. The plug-in can ignore the + message, or it can create and return the requested property. In either + case, this function adds the (possibly \c NULL) property to the list + and returns it. + @param plugin The plug-in object. + @param vendorID The property vendor ID code. + @param propetyKey The property type key code. + @param propertyID The specific property identifier. + @param p [out] A buffer in which to return a pointer to the property object. + @see \c #SPPropertiesSuite + */ + SPAPI SPErr (*FindPluginProperty)( SPPluginRef plugin, PIType vendorID, PIType propertyKey, ai::int32 propertyID, PIProperty **p ); + + /** Retrieves the name of a plug-in. + @param plugin The plug-in object. + @param name [out] A buffer in which to return the name string. + */ + SPAPI SPErr (*GetPluginName)( SPPluginRef plugin, const char **name ); + /** Sets the name of a plug-in. + @param plugin The plug-in object. + @param name The new name string. + */ + SPAPI SPErr (*SetPluginName)( SPPluginRef plugin, const char *name ); + /** Retrieves a plug-in by name. + @param name The name string. + @param plugin [out] A buffer in which to return the plug-in object. + */ + SPAPI SPErr (*GetNamedPlugin)( const char *name, SPPluginRef *plugin); + + /** Sets the property list for a plug-in. + @param plugin The plug-in object. + @param file The file containing the property list. + */ + SPAPI SPErr (*SetPluginPropertyList)( SPPluginRef plugin, SPFileRef file ); + + // Plug-ins suite version 5 + /* This attribute frees the adapterInfo field for private data for adapters. */ + /** Retrieves host information for a plug-in. + @param plugin The plug-in object. + @param hostInfo [out] A buffer in which to return a pointer to the + host information structure. + */ + SPAPI SPErr (*GetPluginHostInfo)( SPPluginRef plugin, void **hostInfo ); + /** Sets host information for a plug-in. + @param plugin The plug-in object. + @param hostInfo The new host information structure. + */ + SPAPI SPErr (*SetPluginHostInfo)( SPPluginRef plugin, void *hostInfo ); + +} SPPluginsSuite; + + +/** Internal */ +SPAPI SPErr SPAllocatePluginList( SPStringPoolRef strings, SPPluginListRef *pluginList ); +/** Internal */ +SPAPI SPErr SPFreePluginList( SPPluginListRef pluginList ); +/** Internal */ +SPAPI SPErr SPGetPluginListNeededSuiteAvailable( SPPluginListRef pluginList, SPBoolean *available ); + +/** Internal */ +SPAPI SPErr SPAddPlugin( SPPluginListRef pluginList, const SPPlatformFileReference *fileSpec, + PIPropertyList *PiPL, const char *adapterName, void *adapterInfo, SPPluginRef *plugin ); + +/** Internal */ +SPAPI SPErr SPNewPluginListIterator( SPPluginListRef pluginList, SPPluginListIteratorRef *iter ); +/** Internal */ +SPAPI SPErr SPNextPlugin( SPPluginListIteratorRef iter, SPPluginRef *plugin ); +/** Internal */ +SPAPI SPErr SPDeletePluginListIterator( SPPluginListIteratorRef iter ); + +/** Internal */ +SPAPI SPErr SPGetHostPluginEntry( SPPluginRef plugin, SPPluginEntryFunc *host ); +/** Internal */ +SPAPI SPErr SPGetPluginFileReference( SPPluginRef plugin, SPPlatformFileReference *fileSpec ); +/** Internal */ +SPAPI SPErr SPGetPluginPropertyList( SPPluginRef plugin, SPPropertyListRef *propertyList ); +/** Internal */ +SPAPI SPErr SPGetPluginGlobals( SPPluginRef plugin, void **globals ); +/** Internal */ +SPAPI SPErr SPSetPluginGlobals( SPPluginRef plugin, void *globals ); +/** Internal */ +SPAPI SPErr SPGetPluginStarted( SPPluginRef plugin, ai::int32 *started ); +/** Internal */ +SPAPI SPErr SPSetPluginStarted( SPPluginRef plugin, ai::int32 started ); +/** Internal */ +SPAPI SPErr SPGetPluginSkipShutdown( SPPluginRef plugin, ai::int32 *skipShutdown ); +/** Internal */ +SPAPI SPErr SPSetPluginSkipShutdown( SPPluginRef plugin, ai::int32 skipShutdown ); +/** Internal */ +SPAPI SPErr SPGetPluginBroken( SPPluginRef plugin, ai::int32 *broken ); +/** Internal */ +SPAPI SPErr SPSetPluginBroken( SPPluginRef plugin, ai::int32 broken ); +/** Internal */ +SPAPI SPErr SPGetPluginAdapter( SPPluginRef plugin, SPAdapterRef *adapter ); +/** Internal */ +SPAPI SPErr SPGetPluginAdapterInfo( SPPluginRef plugin, void **adapterInfo ); +/** Internal */ +SPAPI SPErr SPSetPluginAdapterInfo( SPPluginRef plugin, void *adapterInfo ); + +/** Internal */ +SPAPI SPErr SPFindPluginProperty( SPPluginRef plugin, PIType vendorID, PIType propertyKey, + ai::int32 propertyID, PIProperty **p ); + +/** Internal */ +SPAPI SPErr SPGetPluginName( SPPluginRef plugin, const char **name ); +/** Internal */ +SPAPI SPErr SPSetPluginName( SPPluginRef plugin, const char *name ); +/** Internal */ +SPAPI SPErr SPGetNamedPlugin( const char *name, SPPluginRef *plugin); + +/** Internal */ +SPAPI SPErr SPSetPluginPropertyList( SPPluginRef plugin, SPFileRef file ); + +/** Internal */ +SPErr SPAddHostPlugin( SPPluginListRef pluginList, SPPluginEntryFunc entry, void *access, const char *adapterName, + void *adapterInfo, SPPluginRef *plugin, const char *name); + /* access is SPPlatformAccessRef */ +#if defined(STATIC_LINKED_PLUGIN) +SPErr SPAddHostPluginStatic( SPPluginListRef pluginList, SPPluginEntryFunc entry, void *access, const char *adapterName, + void *adapterInfo, SPPluginRef *plugin, const char *name); +#endif + +// Plug-ins suite version 5 +/* This attribute frees the adapterInfo field for private data for adapters. */ +/** Internal */ +SPAPI SPErr SPGetPluginHostInfo( SPPluginRef plugin, void **hostInfo ); +/** Internal */ +SPAPI SPErr SPSetPluginHostInfo( SPPluginRef plugin, void *hostInfo ); + +#ifdef WIN_ENV + /** Internal */ + SPAPI SPErr SPAddPlugin_v4_v5( SPPluginListRef pluginList, const SPPlatformFileSpecification *fileSpec, + PIPropertyList *PiPL, const char *adapterName, void *adapterInfo, SPPluginRef *plugin ); + + /** Internal */ + SPAPI SPErr SPGetPluginFileReference_v4_v5( SPPluginRef plugin, SPPlatformFileSpecification *fileSpec ); +#endif +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPProps.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPProps.h index 29cc896..e980b51 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPProps.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPProps.h @@ -1,320 +1,320 @@ -/***********************************************************************/ -/* */ -/* SPProps.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPProperties__ -#define __SPProperties__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPMdata.h" -#include "SPPiPL.h" -#include "AiBasicTypes.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** PICA properties suite name */ -#define kSPPropertiesSuite "SP Properties Suite" -/** PICA properties suite version */ -#define kSPPropertiesSuiteVersion2 2 -/** PICA properties suite version */ -#define kSPPropertiesSuiteVersion kSPPropertiesSuiteVersion2 // minimal is default -/** PICA properties suite version */ -#define kSPPropertiesSuiteVersion3 3 - -/** @ingroup Callers - PICA plug-in property operation; sent with \c #SPPropertiesMessage. - See \c #SPPropertiesSuite. */ -#define kSPPropertiesCaller "SP Properties" -/** @ingroup Selectors - Acquire PICA plug-in properties; sent with \c #SPPropertiesMessage. - See \c #SPPropertiesSuite.*/ -#define kSPPropertiesAcquireSelector "Acquire" -/** @ingroup Selectors - Release PICA plug-in properties; sent with \c #SPPropertiesMessage. - See \c #SPPropertiesSuite.*/ -#define kSPPropertiesReleaseSelector "Release" - - -/******************************************************************************* - ** - ** Types - ** - **/ -/** An opaque reference to a plug-in property. Access with the \c #SPPropertiesSuite. */ -typedef struct SPProperty *SPPropertyRef; -/** An opaque reference to a plug-in property list. Create and access with the \c #SPPropertiesSuite. */ -typedef struct SPPropertyList *SPPropertyListRef; -/** An opaque reference to an iterator for a plug-in property list. Create and access with the \c #SPPropertiesSuite. */ -typedef struct SPPropertyListIterator *SPPropertyListIteratorRef; - -/** Message passed with the \c #kSPPropertiesCaller. */ -typedef struct SPPropertiesMessage { - /** The message data. */ - SPMessageData d; - - /** Unique identifier for the vendor defining this property type. This allows - you to define your own properties in a way that - does not conflict with either Adobe or other vendors. - Use a registered application creator code to ensure uniqueness. - All PICA properties use \c #PIAdobeVendorID.*/ - PIType vendorID; - /** The property type key code, typically identifies a resource type. */ - PIType propertyKey; - /** The unique property identifier, for multiple resources of a given - type. Normally, there is only one, and the ID value is 0. */ - ai::int32 propertyID; - - /** A structure containing the property data, or value. */ - void *property; - /** Reference count. Increment when a property is acquired, decrement - when it is released. */ - ai::int32 refCon; - /** True (non-zero) if this property does not change between sessions - and can be cached by the application in the start-up preferences - file, false (0) otherwise. Typically true. */ - ai::int32 cacheable; - -} SPPropertiesMessage; - - -/******************************************************************************* - ** - ** Suite - ** - **/ -/** @ingroup Suites - Use these functions to create, access, and manage plug-in property lists - associated with a specific plug-in. Plug-in properties provide the - application with resource information for the plug-in, such as the types - and locations of code files, and the plug-in version. - - A plug-in can be associated with multiple properties lists. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPPropertiesSuite and \c #kSPPropertiesSuiteVersion. - */ -typedef struct SPPropertiesSuite { - - /** Creates a new plug-in property list. - @param stringPool The string pool in which to keep plug-in names. - @param propertyList [out] A buffer in which to return the new list object. - */ - SPAPI SPErr (*AllocatePropertyList)( SPPropertyListRef *propertyList ); - /** Frees a list of plug-in properties allocated with \c #AllocatePropertyList(), and - also frees any entries in the list. If the list is one of a chain, frees the - entire chain. - @param propertyList The plug-in properties list object. - @see \c #SPHasMultiplePropertyLists() - */ - SPAPI SPErr (*FreePropertyList)( SPPropertyListRef propertyList ); - - /** Adds a set of properties to a plug-in properties list. This set is typically - read from a resource file.Creates an \c #SPPropertyRef for each property, - but does not return these objects. - @param propertyList The plug-in properties list object. - @param pList A pointer to the low-level structure for the set of properties to add. - @param refCon The initial reference count for properties in the set. - @param cacheable True (non-zero) if these properties do not change between sessions - and can be cached by the application in the start-up preferences - file, false (0) otherwise. Typically true. - @see \c #AddProperty() - */ - SPAPI SPErr (*AddProperties)( SPPropertyListRef propertyList, PIPropertyList *pList, ai::int32 refCon, ai::int32 cacheable ); - - /** Creates a new individual property and adds it to a plug-in properties list. - Typically called to install a property returned from an \c #kSPPropertiesAcquireSelector message. - @param propertyList The plug-in properties list object. - @param vendorID The vendor identifier for the new property. - @param propertyKey The type key code for the new property. - @param propertyID The unique identifier for the individual property (normally 0). - @param p A pointer to the property value structure. - @param refCon The initial reference count for property. - @param cacheable True (non-zero) if this property does not change between sessions - and can be cached by the application in the start-up preferences - file, false (0) otherwise. Typically true. - @param property [out] A buffer in which to return the new property object. - @see \c #AllocatePropertyList(), \c #AddProperties() - */ - SPAPI SPErr (*AddProperty)( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, ai::int32 propertyID, PIProperty *p, - ai::int32 refCon, ai::int32 cacheable, SPPropertyRef *property ); - - /** Retrieves a property from a plug-in properties list, or from any list in its chain. - @param propertyList The plug-in properties list object. - @param vendorID The vendor identifier for the new property. - @param propertyKey The type key code for the new property. - @param propertyID The unique identifier for the individual property (normally 0). - @param property [out] A buffer in which to return the property object, or \c NULL if a - matching property is not found. - @param \c #FindPropertyLocal() - */ - SPAPI SPErr (*FindProperty)( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, ai::int32 propertyID, SPPropertyRef *property ); - - /** Creates an iterator object with which to traverse a plug-in properties list. - The iterator is initially set to the first property in the list. - @param propertyList The plug-in properties list object. - @param iter [out] A buffer in which to return the new iterator object. - @see \c #NextProperty(), \c #DeletePropertyListIterator() - */ - SPAPI SPErr (*NewPropertyListIterator)( SPPropertyListRef propertyList, SPPropertyListIteratorRef *iter ); - /** Retrieves the current property and advances a plug-in properties list iterator - to the next property in the list. - @param iter The plug-in properties list iterator object. - @param property [out] A buffer in which to return the current property object, \c NULL - if the end of the list has been reached. - @see \c #NewPropertyListIterator(), - */ - SPAPI SPErr (*NextProperty)( SPPropertyListIteratorRef iter, SPPropertyRef *property ); - /** Frees a plug-in properties list iterator that is no longer needed. - @param iter The plug-in properties list iterator object. - @see \c #NewPropertyListIterator(), - */ - SPAPI SPErr (*DeletePropertyListIterator)( SPPropertyListIteratorRef iter ); - - /** Retrieves the low-level property structure of a property object. - @param property The property object. - @param p [out] A buffer in which to return a pointer to the property structure. - */ - SPAPI SPErr (*GetPropertyPIProperty)( SPPropertyRef property, PIProperty **p ); - /** Retrieves the current reference count of a property. - @param property The property object. - @param refCon [out] A buffer in which to return the reference count. - */ - SPAPI SPErr (*GetPropertyRefCon)( SPPropertyRef property, ai::int32 *refCon ); - /** Reports whether a property is cacheable. - @param property The property object. - @param cacheable [out] A buffer in which to return true (non-zero) - if this property does not change between sessions - and can be cached by the application in the start-up preferences - file, false (0) otherwise. - */ - SPAPI SPErr (*GetPropertyCacheable)( SPPropertyRef property, ai::int32 *cacheable ); - /** Reports whether a property was allocated by the plug-in that contains it. - @param property The property object. - @param allocatedByPlugin [out] A buffer in which to return true (non-zero) - if this property was created after being acquired from a - \c #kSPPropertiesAcquireSelector message, false (0) if the - property was read from a resource file. - @see \c #AddProperty(), \c #AddProperties() - */ - SPAPI SPErr (*GetPropertyAllocatedByPlugin)( SPPropertyRef property, ai::int32 *allocatedByPlugin ); - - // kSPPropertiesSuiteVersion3 - /** Reports whether a plug-in properties list is one of a chain of properties lists for its plug-in. - (Note that this function returns a boolean value, not an error code.) - @param propertyList The plug-in properties list object. - @return True (non-zero) if the list is one of a chain, false (0) otherwise. - @see \c #GetNextPropertyList() - */ - SPAPI SPBoolean (*SPHasMultiplePropertyLists)(SPPropertyListRef propertyList); - /** Retrieves the next plug-in properties list in a properties-list chain. - @param propertyList The current plug-in properties list object. - @param nextPropertyList [out] A buffer in which to return the next properties list object, - or \c NULL if the end of the chain has been reached. - */ - SPAPI SPErr (*GetNextPropertyList)(SPPropertyListRef propertyList, SPPropertyListRef *nextPropertyList); - /** Retrieves a property from a plug-in properties list, but does not search in other - lists in the chain. - @param propertyList The plug-in properties list object. - @param vendorID The vendor identifier for the new property. - @param propertyKey The type key code for the new property. - @param propertyID The unique identifier for the individual property (normally 0). - @param property [out] A buffer in which to return the property object, or \c NULL if a - matching property is not found. - @see \c #FindProperty() - */ - SPAPI SPErr (*FindPropertyLocal)( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, - ai::int32 propertyID, SPPropertyRef *property ); - -} SPPropertiesSuite; - - -/** Internal */ -SPAPI SPErr SPAllocatePropertyList( SPPropertyListRef *propertyList ); -/** Internal */ -SPAPI SPErr SPFreePropertyList( SPPropertyListRef propertyList ); - -/** Internal */ -SPAPI SPErr SPAddProperties( SPPropertyListRef propertyList, PIPropertyList *pList, ai::int32 refCon, - ai::int32 cacheable ); - -/** Internal */ -SPAPI SPErr SPAddProperty( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, - ai::int32 propertyID, PIProperty *p, ai::int32 refCon, ai::int32 cacheable, SPPropertyRef *property ); - -/** Internal */ -SPAPI SPErr SPFindProperty( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, - ai::int32 propertyID, SPPropertyRef *property ); - -/** Internal */ -SPAPI SPErr SPNewPropertyListIterator( SPPropertyListRef propertyList, SPPropertyListIteratorRef *iter ); -/** Internal */ -SPAPI SPErr SPNextProperty( SPPropertyListIteratorRef iter, SPPropertyRef *property ); -/** Internal */ -SPAPI SPErr SPDeletePropertyListIterator( SPPropertyListIteratorRef iter ); - -/** Internal */ -SPAPI SPErr SPGetPropertyPIProperty( SPPropertyRef property, PIProperty **p ); -/** Internal */ -SPAPI SPErr SPGetPropertyRefCon( SPPropertyRef property, ai::int32 *refCon ); -/** Internal */ -SPAPI SPErr SPGetPropertyCacheable( SPPropertyRef property, ai::int32 *cacheable ); -/** Internal */ -SPAPI SPErr SPGetPropertyAllocatedByPlugin( SPPropertyRef property, ai::int32 *allocatedByPlugin ); - -/** Internal */ -SPAPI SPBoolean SPHasMultiplePropertyLists(SPPropertyListRef propertyList); -/** Internal */ -SPAPI SPErr SPGetNextPropertyList(SPPropertyListRef propertyList, SPPropertyListRef *nextPropertyList); - -/** Internal */ -SPAPI SPErr SPFindPropertyLocal( SPPropertyListRef propertyList, PIType vendorID, - PIType propertyKey, ai::int32 propertyID, SPPropertyRef *property ); - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPProps.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPProperties__ +#define __SPProperties__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPMData.h" +#include "SPPiPL.h" +#include "AIBasicTypes.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** PICA properties suite name */ +#define kSPPropertiesSuite "SP Properties Suite" +/** PICA properties suite version */ +#define kSPPropertiesSuiteVersion2 2 +/** PICA properties suite version */ +#define kSPPropertiesSuiteVersion kSPPropertiesSuiteVersion2 // minimal is default +/** PICA properties suite version */ +#define kSPPropertiesSuiteVersion3 3 + +/** @ingroup Callers + PICA plug-in property operation; sent with \c #SPPropertiesMessage. + See \c #SPPropertiesSuite. */ +#define kSPPropertiesCaller "SP Properties" +/** @ingroup Selectors + Acquire PICA plug-in properties; sent with \c #SPPropertiesMessage. + See \c #SPPropertiesSuite.*/ +#define kSPPropertiesAcquireSelector "Acquire" +/** @ingroup Selectors + Release PICA plug-in properties; sent with \c #SPPropertiesMessage. + See \c #SPPropertiesSuite.*/ +#define kSPPropertiesReleaseSelector "Release" + + +/******************************************************************************* + ** + ** Types + ** + **/ +/** An opaque reference to a plug-in property. Access with the \c #SPPropertiesSuite. */ +typedef struct SPProperty *SPPropertyRef; +/** An opaque reference to a plug-in property list. Create and access with the \c #SPPropertiesSuite. */ +typedef struct SPPropertyList *SPPropertyListRef; +/** An opaque reference to an iterator for a plug-in property list. Create and access with the \c #SPPropertiesSuite. */ +typedef struct SPPropertyListIterator *SPPropertyListIteratorRef; + +/** Message passed with the \c #kSPPropertiesCaller. */ +typedef struct SPPropertiesMessage { + /** The message data. */ + SPMessageData d; + + /** Unique identifier for the vendor defining this property type. This allows + you to define your own properties in a way that + does not conflict with either Adobe or other vendors. + Use a registered application creator code to ensure uniqueness. + All PICA properties use \c #PIAdobeVendorID.*/ + PIType vendorID; + /** The property type key code, typically identifies a resource type. */ + PIType propertyKey; + /** The unique property identifier, for multiple resources of a given + type. Normally, there is only one, and the ID value is 0. */ + ai::int32 propertyID; + + /** A structure containing the property data, or value. */ + void *property; + /** Reference count. Increment when a property is acquired, decrement + when it is released. */ + ai::int32 refCon; + /** True (non-zero) if this property does not change between sessions + and can be cached by the application in the start-up preferences + file, false (0) otherwise. Typically true. */ + ai::int32 cacheable; + +} SPPropertiesMessage; + + +/******************************************************************************* + ** + ** Suite + ** + **/ +/** @ingroup Suites + Use these functions to create, access, and manage plug-in property lists + associated with a specific plug-in. Plug-in properties provide the + application with resource information for the plug-in, such as the types + and locations of code files, and the plug-in version. + + A plug-in can be associated with multiple properties lists. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPPropertiesSuite and \c #kSPPropertiesSuiteVersion. + */ +typedef struct SPPropertiesSuite { + + /** Creates a new plug-in property list. + @param stringPool The string pool in which to keep plug-in names. + @param propertyList [out] A buffer in which to return the new list object. + */ + SPAPI SPErr (*AllocatePropertyList)( SPPropertyListRef *propertyList ); + /** Frees a list of plug-in properties allocated with \c #AllocatePropertyList(), and + also frees any entries in the list. If the list is one of a chain, frees the + entire chain. + @param propertyList The plug-in properties list object. + @see \c #SPHasMultiplePropertyLists() + */ + SPAPI SPErr (*FreePropertyList)( SPPropertyListRef propertyList ); + + /** Adds a set of properties to a plug-in properties list. This set is typically + read from a resource file.Creates an \c #SPPropertyRef for each property, + but does not return these objects. + @param propertyList The plug-in properties list object. + @param pList A pointer to the low-level structure for the set of properties to add. + @param refCon The initial reference count for properties in the set. + @param cacheable True (non-zero) if these properties do not change between sessions + and can be cached by the application in the start-up preferences + file, false (0) otherwise. Typically true. + @see \c #AddProperty() + */ + SPAPI SPErr (*AddProperties)( SPPropertyListRef propertyList, PIPropertyList *pList, ai::int32 refCon, ai::int32 cacheable ); + + /** Creates a new individual property and adds it to a plug-in properties list. + Typically called to install a property returned from an \c #kSPPropertiesAcquireSelector message. + @param propertyList The plug-in properties list object. + @param vendorID The vendor identifier for the new property. + @param propertyKey The type key code for the new property. + @param propertyID The unique identifier for the individual property (normally 0). + @param p A pointer to the property value structure. + @param refCon The initial reference count for property. + @param cacheable True (non-zero) if this property does not change between sessions + and can be cached by the application in the start-up preferences + file, false (0) otherwise. Typically true. + @param property [out] A buffer in which to return the new property object. + @see \c #AllocatePropertyList(), \c #AddProperties() + */ + SPAPI SPErr (*AddProperty)( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, ai::int32 propertyID, PIProperty *p, + ai::int32 refCon, ai::int32 cacheable, SPPropertyRef *property ); + + /** Retrieves a property from a plug-in properties list, or from any list in its chain. + @param propertyList The plug-in properties list object. + @param vendorID The vendor identifier for the new property. + @param propertyKey The type key code for the new property. + @param propertyID The unique identifier for the individual property (normally 0). + @param property [out] A buffer in which to return the property object, or \c NULL if a + matching property is not found. + @param \c #FindPropertyLocal() + */ + SPAPI SPErr (*FindProperty)( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, ai::int32 propertyID, SPPropertyRef *property ); + + /** Creates an iterator object with which to traverse a plug-in properties list. + The iterator is initially set to the first property in the list. + @param propertyList The plug-in properties list object. + @param iter [out] A buffer in which to return the new iterator object. + @see \c #NextProperty(), \c #DeletePropertyListIterator() + */ + SPAPI SPErr (*NewPropertyListIterator)( SPPropertyListRef propertyList, SPPropertyListIteratorRef *iter ); + /** Retrieves the current property and advances a plug-in properties list iterator + to the next property in the list. + @param iter The plug-in properties list iterator object. + @param property [out] A buffer in which to return the current property object, \c NULL + if the end of the list has been reached. + @see \c #NewPropertyListIterator(), + */ + SPAPI SPErr (*NextProperty)( SPPropertyListIteratorRef iter, SPPropertyRef *property ); + /** Frees a plug-in properties list iterator that is no longer needed. + @param iter The plug-in properties list iterator object. + @see \c #NewPropertyListIterator(), + */ + SPAPI SPErr (*DeletePropertyListIterator)( SPPropertyListIteratorRef iter ); + + /** Retrieves the low-level property structure of a property object. + @param property The property object. + @param p [out] A buffer in which to return a pointer to the property structure. + */ + SPAPI SPErr (*GetPropertyPIProperty)( SPPropertyRef property, PIProperty **p ); + /** Retrieves the current reference count of a property. + @param property The property object. + @param refCon [out] A buffer in which to return the reference count. + */ + SPAPI SPErr (*GetPropertyRefCon)( SPPropertyRef property, ai::int32 *refCon ); + /** Reports whether a property is cacheable. + @param property The property object. + @param cacheable [out] A buffer in which to return true (non-zero) + if this property does not change between sessions + and can be cached by the application in the start-up preferences + file, false (0) otherwise. + */ + SPAPI SPErr (*GetPropertyCacheable)( SPPropertyRef property, ai::int32 *cacheable ); + /** Reports whether a property was allocated by the plug-in that contains it. + @param property The property object. + @param allocatedByPlugin [out] A buffer in which to return true (non-zero) + if this property was created after being acquired from a + \c #kSPPropertiesAcquireSelector message, false (0) if the + property was read from a resource file. + @see \c #AddProperty(), \c #AddProperties() + */ + SPAPI SPErr (*GetPropertyAllocatedByPlugin)( SPPropertyRef property, ai::int32 *allocatedByPlugin ); + + // kSPPropertiesSuiteVersion3 + /** Reports whether a plug-in properties list is one of a chain of properties lists for its plug-in. + (Note that this function returns a boolean value, not an error code.) + @param propertyList The plug-in properties list object. + @return True (non-zero) if the list is one of a chain, false (0) otherwise. + @see \c #GetNextPropertyList() + */ + SPAPI SPBoolean (*SPHasMultiplePropertyLists)(SPPropertyListRef propertyList); + /** Retrieves the next plug-in properties list in a properties-list chain. + @param propertyList The current plug-in properties list object. + @param nextPropertyList [out] A buffer in which to return the next properties list object, + or \c NULL if the end of the chain has been reached. + */ + SPAPI SPErr (*GetNextPropertyList)(SPPropertyListRef propertyList, SPPropertyListRef *nextPropertyList); + /** Retrieves a property from a plug-in properties list, but does not search in other + lists in the chain. + @param propertyList The plug-in properties list object. + @param vendorID The vendor identifier for the new property. + @param propertyKey The type key code for the new property. + @param propertyID The unique identifier for the individual property (normally 0). + @param property [out] A buffer in which to return the property object, or \c NULL if a + matching property is not found. + @see \c #FindProperty() + */ + SPAPI SPErr (*FindPropertyLocal)( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, + ai::int32 propertyID, SPPropertyRef *property ); + +} SPPropertiesSuite; + + +/** Internal */ +SPAPI SPErr SPAllocatePropertyList( SPPropertyListRef *propertyList ); +/** Internal */ +SPAPI SPErr SPFreePropertyList( SPPropertyListRef propertyList ); + +/** Internal */ +SPAPI SPErr SPAddProperties( SPPropertyListRef propertyList, PIPropertyList *pList, ai::int32 refCon, + ai::int32 cacheable ); + +/** Internal */ +SPAPI SPErr SPAddProperty( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, + ai::int32 propertyID, PIProperty *p, ai::int32 refCon, ai::int32 cacheable, SPPropertyRef *property ); + +/** Internal */ +SPAPI SPErr SPFindProperty( SPPropertyListRef propertyList, PIType vendorID, PIType propertyKey, + ai::int32 propertyID, SPPropertyRef *property ); + +/** Internal */ +SPAPI SPErr SPNewPropertyListIterator( SPPropertyListRef propertyList, SPPropertyListIteratorRef *iter ); +/** Internal */ +SPAPI SPErr SPNextProperty( SPPropertyListIteratorRef iter, SPPropertyRef *property ); +/** Internal */ +SPAPI SPErr SPDeletePropertyListIterator( SPPropertyListIteratorRef iter ); + +/** Internal */ +SPAPI SPErr SPGetPropertyPIProperty( SPPropertyRef property, PIProperty **p ); +/** Internal */ +SPAPI SPErr SPGetPropertyRefCon( SPPropertyRef property, ai::int32 *refCon ); +/** Internal */ +SPAPI SPErr SPGetPropertyCacheable( SPPropertyRef property, ai::int32 *cacheable ); +/** Internal */ +SPAPI SPErr SPGetPropertyAllocatedByPlugin( SPPropertyRef property, ai::int32 *allocatedByPlugin ); + +/** Internal */ +SPAPI SPBoolean SPHasMultiplePropertyLists(SPPropertyListRef propertyList); +/** Internal */ +SPAPI SPErr SPGetNextPropertyList(SPPropertyListRef propertyList, SPPropertyListRef *nextPropertyList); + +/** Internal */ +SPAPI SPErr SPFindPropertyLocal( SPPropertyListRef propertyList, PIType vendorID, + PIType propertyKey, ai::int32 propertyID, SPPropertyRef *property ); + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPRuntme.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPRuntme.h index 8850981..f3f41de 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPRuntme.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPRuntme.h @@ -1,454 +1,504 @@ -/***********************************************************************/ -/* */ -/* SPRuntme.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPRuntime__ -#define __SPRuntime__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPAdapts.h" -#include "SPFiles.h" -#include "SPPlugs.h" -#include "SPStrngs.h" -#include "SPSuites.h" -#include "SPStrngs.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#define kSPRuntimeSuite "SP Runtime Suite" -#define kSPRuntimeSuiteVersion5 5 -#ifdef WIN_ENV - #define kSPRuntimeSuiteVersion6 6 - #define kSPRuntimeSuiteVersion kSPRuntimeSuiteVersion6 -#elif MAC_ENV - #define kSPRuntimeSuiteVersion kSPRuntimeSuiteVersion5 -#endif - -/******************************************************************************* - ** - ** Types - ** - **/ - -/* INTERNAL DOCS - * PICA makes callbacks into the host through the host procs. The host - * procs are filled in by the host and passed to Sweet Pea at SPInit(). - * - * hostData - data that is given back to each host proc when Sweet Pea - * calls it. Sweet Pea does nothing with it itself. - * - * extAllocate - implementation of the Block Suite's AllocateBlock() routine. - * It is identical to ANSI C malloc(). It returns a pointer to the - * beginning of the allocated block or NULL. - * - * extFree - implementation of the Block Suite's FreeBlock() routine. It is - * identical to ANSI C free(). Note that you can pass it NULL. - * - * extReallocate - implementation of the Block Suite's ReallocateBlock() - * routine. It is identical to ANSI C realloc(). It returns a pointer - * to the resized block or NULL. Note that you can pass it NULL or a - * newSize of 0. - * extSubAllocate, extSubFree, extSubReallocate- alternate memory allocation routines - * intAllocate, intFree, intReallocate - routines used by Sweet Pea for - * its own memory needs. You may want to allocate blocks differently - * with plug-ins and Sweet Pea. Plug-ins are unbounded in their memory - * needs, while Sweet Pea's memory usage can be approximated. - * - * startupNotify - called as each plug-in is started up. This is intended - * as a way to tell the user what's happening during start up. - * Note that plug-ins may start up at any time, not just during - * SPStartupPlugins(). - * - * shutdownNotify - called as each plug-in is shut down. Also intended as - * a way to let users know what's going on. - * - * assertTrap - called when a fatal assert is triggered. Sweet Pea does - * not expect execution to continue after an assert. - * - * throwTrap - called when an internal error is thrown. This can be used - * during debugging to catch errors as they happen. It should return - * to allow Sweet Pea to handle the error. - * - * - * To aid in getting Sweet Pea up and running quickly, you can set any of - * these to NULL and Sweet Pea will use a default implementation. However: - * you cannot mix your implementations of the memory routines with - * Sweet Pea's defaults. - * - * - * The string pool functions replace the default routines used internally - * and exported by the Strings suite. Because they are exported, the behaviors - * listed below should be followed. - * - * allocateStringPool - creates a new string pool instance. The host app and - * Sweet Pea have a string pool which can be used by a plug-in, or a plug-in - * can create its own. See the notes in SPStrngs.h on how the pool is - * implemented. - * The function should return kSPNoError if the pool is allocated successfully - * or kSPOutOfMemoryError if allocation fails. - * - * freeStringPool - disposes of the string pool and any associated memory. The - * function should return kSPNoError - * - * makeWString - the string pool keeps a list of added strings. When a new string is - * added with MakeWString(), the routine checks to see if it is already in the - * pool. If so, the address of the string instance in the pool is returned. If - * not, it will add it to the pool and return the address of the newly - * created string instance. The behavior is: - * - * if ( string == NULL ) - * *wString = NULL; - * returns kSPNoError; - * else if ( string in string pool ) - * *wString = found string; - * returns kSPNoError; - * else add string - * if successful - * *wString = new string; - * returns kSPNoError; - * else - * *wString = nil - * returns kSPOutOfMemoryError - * - * appStringPool - if the host application has already allocated a string pool to use, - * it's reference should be passed here. If this value is NULL, Sweet Pea will - * allocate the pool when initialized and dispose of it at termination. - * - * filterEvent - a function called for each event allowing the host to cancel it. - * The event type is indicative of what the filter is to do. A file validation - * is called before a directory entry is added to the file list (kAddFile). - * A plug-in validation before a file is checked for PiPL information (kAddPlugin); - * the host might examine the file name/type to determine whether it should be added. - * For these 'add' events the return value is TRUE if the item should be skipped - * or FALSE if should be should be added. The default filter proc, used (if NULL) - * is passed, will skip files/folders in ( ). - * The other event is kSuitesAvailable. It is called when the last suite adding - * plug-in (as determined by available PiPL information) has been added. This is - * a point at which the host can cancel the startup process; for instance, if the host - * requires a suite from a plug-in, this is the time to check for it. If the - * host returns TRUE, the startup process continues. If it returns FALSE, the - * plug-in startup is canceled and the host would likely terminate or startup in - * an alternate manner. - * - * overrideAddPlugins - if supplied, SP will call the host to create the runtime - * plug-in list. This occurs at SPStartupPlugins(). The function takes no parameters - * as it is up to the host to determine how to do this. For instance, the host can do - * this from cached data or, as SP would, from the file list. A returned error will - * stop the plug-in startup process. - * - * overrideStartup - a function called for each SP2 plug-in before it is sent the - * startup message. If the host returns FALSE, SP will startup the plug-in normal. - * If the host returns true, it is assumed that the host has handled the startup - * for the plug-in, so SP will not do anything for the plug-in. This is intended - * to be used with a plug-in caching scheme. - * The host would be responsible, for instance, for defining the cacheable - * information in the PiPL, adding it when the callback is made, and later issuing - * a startup message when the plug-in is actually needed (e.g. when a menu item - * is selected.) Two notes: don't forget to SetPluginStarted(), and make sure - * to use a string pooled char* to kSPInterfaceCaller and kSPInterfaceStartupSelector. - * - * resolveLink - Windows only. If the search for plug-ins is to recurse sub-folders, - * the host needs to supply this routine. When a .lnk file is encountered, the - * resolveLink host callback function will be called and should return a resolved path. - * This is a host callback due to OLE issues such as initialization, which the SP - * library does not currently handle. If it returns an error code, the result will - * be ignored. - * - * getPluginAccess - Allows the host to set the plug-in access information. This would - * be used if, for instance, the host kept its own plug-in list (ala, Photoshop), but - * still needed these to be compatible with SPPlugins (e.g. whose accesses are used by ADM) - * - * memoryIsCritical - Mac only. Allows the host to indicate that memory is in a critical state - * (really low, but can't be purged because you are, say, shutdown.) - * If so and the plug-in load target heap is the app heap, when a plug-in fails to load - * SP will then try to load the plug-in into the system heap - */ - -/* These are passed in startup and shutdown host notify procs and the filter file proc. */ -/** A notification event type, that an adapter passes to the \c #SPStartupNotifyProc - and \c #SPShutdownNotifyProc when the associated plug-in is loaded or unloaded. - */ -typedef enum { - /** Sent to the \c #SPStartupNotifyProc after a file has been added as a plug-in. - The \c notifyData value is the plug-in object, an \c #SPPluginRef. */ - kAddFile, /* Internal: for filter file, received before a file is added to a file list, notifyData is a pointer to the SPPlatformFileSpecification */ - /** Sent to the \c #SPStartupNotifyProc after a plug-in has been added. - The \c notifyData value is the plug-in object, an \c #SPPluginRef. */ - kAddPlugin, /* Internal: for filter file, received before a file is checked to see if it is a plugin, notifyData is the files SPFileRef */ - /** Sent to the \c #SPStartupNotifyProc to specify a general message for the application splash screen. - The \c notifyData value is a pointer to a C string, char**. */ - kSetMessage, - /** Internal */ - kSuitesAvailable, /* Internal: used only by event filter to allow host to check for suites it requires, notifyDatais NULL */ - /** Internal */ - kError, /* Internal: notifyData is SPErrorDataPtr*/ - /** Sent to the \c #SPStartupNotifyProc after the plug-in is started. - The \c notifyData value is the plug-in object, an \c #SPPluginRef. */ - kStartingupPlugin, /* Internal: for filter file, received before a file is checked to see if it is a plugin, notifyData is the files SPFileRef */ - /** Internal */ - kNoEvent = 0xffffffff - } NotifyEvent; - -/** Internal */ -typedef void *(*SPAllocateProc)( size_t size, void *hostData ); -/** Internal */ -typedef void (*SPFreeProc)( void *block, void *hostData ); -/** Internal */ -typedef void *(*SPReallocateProc)( void *block, size_t newSize, void *hostData ); -/** Called by an adapter to inform the application that a plug-in is being started up. - The application uses this information to track the start-up process; for example, - to display a list of plug-ins being loaded. - @param event The notification event constant that identifies which event occurred. - @param notifyData A pointer to plug-in-defined initialization data. - @param hostData A pointer to application-defined initialization data. - @return Nothing. - */ -typedef void (*SPStartupNotifyProc)( NotifyEvent event, void *notifyData, void *hostData ); -/** Called by an adapter to inform the application that a plug-in is being shut down. - The application uses this information to track the shut-down process. - @param event The notification event. - @param notifyData A pointer to plug-in-defined termination data. - @param hostData A pointer to application-defined termination data. - @return Nothing. - */ -typedef void (*SPShutdownNotifyProc)( NotifyEvent event, void *notifyData, void *hostData ); -/** Internal */ -typedef void (*SPAssertTrapProc)( const char *failMessage, void *hostData ); -/** Internal */ -typedef void (*SPThrowTrapProc)( SPErr error, void *hostData ); -/** Internal */ -typedef void (*SPDebugTrapProc)( const char *debugMessage, void *hostData ); - -/** Internal */ -typedef SPAPI SPErr (*SPAllocateStringPoolProc)( SPStringPoolRef *pool ); -/** Internal */ -typedef SPAPI SPErr (*SPFreeStringPoolProc)( SPStringPoolRef stringPool ); -/** Internal */ -typedef SPAPI SPErr (*SPMakeWStringProc)( SPStringPoolRef stringPool, const char *string, - const char **wString ); - -#if !defined(IOS_ENV) -/** Internal */ -typedef SPAPI SPErr (*SPGetHostAccessInfoProc)( SPPlatformAccessInfo *spHostAccessInfo ); -#endif // !defined(IOS_ENV) - -/** Internal */ -typedef SPAPI SPBoolean (*SPFilterEventProc)( NotifyEvent event, const void *eventData ); -/** Internal */ -typedef SPAPI SPErr (*SPAddPluginsProc)( void ); -/** Internal */ -typedef SPAPI SPBoolean (*SPOverrideStartupProc)( SPPluginRef currentPlugin ); - -#ifdef WIN_ENV -/** Internal */ -typedef SPAPI SPErr (*SPResolveLinkProc)(const char *shortcutFile, char *resolvedPath); -typedef SPAPI SPErr (*SPResolveLinkProcW)(const wchar_t*shortcutFile, wchar_t *resolvedPath); -#endif - -typedef SPAPI SPErr (*SPWideCharToPlatform)(char* destination, size_t dstSizeBytes, const ai::uint16* src, size_t srcWcharCount); -typedef SPAPI SPErr (*SPPlatformToWideChar)(ai::uint16* destination, size_t dstCharCount, const char* src, size_t srcSizeBytes); - -/** Internal */ -typedef SPAPI SPErr (*GetNativePluginAccessProc)(SPPluginRef plugin, SPAccessRef *access); - -/** Internal */ -typedef SPAPI SPBoolean (*MemoryIsCriticalProc)( void ); - -/** Callback procedures provided to PICA by the application. - Plug-ins do not use these, except for adapters, which - call the initialization and termination procedures. - @see \c #SPRuntimeSuite::GetRuntimeHostFileSpec() */ -typedef struct SPHostProcs { - - void *hostData; - - SPAllocateProc extAllocate; - SPFreeProc extFree; - SPReallocateProc extReallocate; - - SPAllocateProc intAllocate; - SPFreeProc intFree; - SPReallocateProc intReallocate; - /** Plug-in initialization procedure */ - SPStartupNotifyProc startupNotify; - /** Plug-in termination procedure */ - SPShutdownNotifyProc shutdownNotify; - - SPAssertTrapProc assertTrap; - SPThrowTrapProc throwTrap; - SPDebugTrapProc debugTrap; - - SPAllocateStringPoolProc allocateStringPool; - SPFreeStringPoolProc freeStringPool; - SPMakeWStringProc makeWString; - SPStringPoolRef appStringPool; - - SPFilterEventProc filterEvent; - SPAddPluginsProc overrideAddPlugins; - SPOverrideStartupProc overridePluginStartup; - -#ifdef WIN_ENV - SPResolveLinkProc resolveLink; -#endif - - GetNativePluginAccessProc getPluginAccess; - -#ifdef MAC_ENV - // enable second-chance plugin loading for success-critical situations - MemoryIsCriticalProc memoryIsCritical; -#endif - - SPAllocateProc extSubAllocate; //alternate allocation mechanism: Suballocation - SPFreeProc extSubFree; - SPReallocateProc extSubReallocate; - - //Do not insert in the middle as Photoshop Adapter's SPRuntime interface's order will become different -#ifdef WIN_ENV - SPResolveLinkProcW resolveLinkW; -#endif - SPWideCharToPlatform wideCharToPlatform; - SPPlatformToWideChar platformToWideChar; - -} SPHostProcs; - - -/******************************************************************************* - ** - ** Suite - ** - **/ -/** @ingroup Suites - This suite allows you to obtain specific references to the - PICA global lists and string pool. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPRuntimeSuite and \c #kSPRuntimeSuiteVersion. - */ -typedef struct SPRuntimeSuite { - /** Retrieves the PICA global string pool. - @param stringPool [out] A buffer in which to return the string-pool object. - @see \c #SPStringsSuite - */ - SPAPI SPErr (*GetRuntimeStringPool)( SPStringPoolRef *stringPool ); - /** Retrieves the PICA global suite list. - @param suiteList [out] A buffer in which to return the list object. - @see \c #SPSuitesSuite - */ - SPAPI SPErr (*GetRuntimeSuiteList)( SPSuiteListRef *suiteList ); - /** Retrieves the PICA global file list. - @param fileList [out] A buffer in which to return the list object. - @see \c #SPFilesSuite - */ - SPAPI SPErr (*GetRuntimeFileList)( SPFileListRef *fileList ); - /** Retrieves the PICA global plug-in list. - @param pluginList [out] A buffer in which to return the list object. - @see \c #SPPluginsSuite - */ - SPAPI SPErr (*GetRuntimePluginList)( SPPluginListRef *pluginList ); - /** Retrieves the PICA global adapter list. - @param adapterList [out] A buffer in which to return the list object. - @see \c #SPAdaptersSuite - */ - SPAPI SPErr (*GetRuntimeAdapterList)( SPAdapterListRef *adapterList ); - /** Retrieves the block of function pointers supplied to PICA by the - application, which contains memory management routines, notification routines, - exception handling, and string pool routines. - - A plug-in does not normally call the host functions directly; you - can use the PICA suite functions for most operations. An adapter, however, - uses the host functions for start-up and shut-down notification. - @param hostProcs [out] A buffer in which to return a pointer to the - block of function pointers. - */ - SPAPI SPErr (*GetRuntimeHostProcs)( SPHostProcs **hostProcs ); - /** Retrieves the location of the application's plug-in folder. - @param pluginFolder [out] A buffer in which to return the - file specification for the directory that contains plug-ins. - */ - SPAPI SPErr (*GetRuntimePluginsFolder)( SPPlatformFileReference *pluginFolder ); - /** Retrieves the location of the application's executable file. - @param hostFileSpec [out] A buffer in which to return the - file specification for the application's executable file. - */ - SPAPI SPErr (*GetRuntimeHostFileRef)( SPPlatformFileReference *hostFileSpec ); -} SPRuntimeSuite; - - -/** Internal */ -SPAPI SPErr SPGetRuntimeStringPool( SPStringPoolRef *stringPool ); -/** Internal */ -SPAPI SPErr SPGetRuntimeSuiteList( SPSuiteListRef *suiteList ); -/** Internal */ -SPAPI SPErr SPGetRuntimeFileList( SPFileListRef *fileList ); -/** Internal */ -SPAPI SPErr SPGetRuntimePluginList( SPPluginListRef *pluginList ); -/** Internal */ -SPAPI SPErr SPGetRuntimeAdapterList( SPAdapterListRef *adapterList ); -/** Internal */ -SPAPI SPErr SPGetRuntimeHostProcs( SPHostProcs **hostProcs ); -/** Internal */ -SPAPI SPErr SPGetRuntimePluginsFolder( SPPlatformFileReference *pluginFolder ); -/** Internal */ -SPAPI SPErr SPSetRuntimePluginsFolder( SPPlatformFileReference *pluginFolder ); -/** Internal */ -SPAPI SPErr SPGetRuntimeHostFileRef( SPPlatformFileReference *hostFileSpec ); -#ifdef WIN_ENV - /** Internal */ - SPAPI SPErr SPGetRuntimePluginsFolder_v5( SPPlatformFileSpecification *pluginFolder ); - /** Internal */ - SPAPI SPErr SPGetRuntimeHostFileRef_v5( SPPlatformFileSpecification *hostFileSpec ); -#endif -/** Internal */ -typedef struct -{ - SPAPI SPErr (*SPAcquireSuiteFunc)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, ai::int32 internalVersion, const void **suiteProcs ); - SPAPI SPErr (*SPReleaseSuiteFunc)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, ai::int32 internalVersion ); - SPErr (*spAllocateBlockFunc)( SPAllocateProc allocateProc, size_t size, const char *debug, void **block ); - SPErr (*spFreeBlockFunc)( SPFreeProc freeProc, void *block ); - SPErr (*spReallocateBlockFunc)( SPReallocateProc reallocateProc, void *block, size_t newSize, const char *debug, void **newblock ); - SPHostProcs *gProcs; -} SPBasicFuncStruct; - -/** Internal */ -void SetUpBasicFuncs(SPBasicFuncStruct *inStruct); - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPRuntme.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPRuntime__ +#define __SPRuntime__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPAdapts.h" +#include "SPFiles.h" +#include "SPPlugs.h" +#include "SPStrngs.h" +#include "SPSuites.h" +#include "SPStrngs.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" +{ +#endif // __cplusplus + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#define kSPRuntimeSuite "SP Runtime Suite" +#define kSPRuntimeSuiteVersion6 6 +#ifdef WIN_ENV +#define kSPRuntimeSuiteVersion7 7 +#define kSPRuntimeSuiteVersion kSPRuntimeSuiteVersion7 +#elif defined(MAC_ENV) +#define kSPRuntimeSuiteVersion kSPRuntimeSuiteVersion6 +#elif defined(LINUX_ENV) +#define kSPRuntimeSuiteVersion kSPRuntimeSuiteVersion6 +#endif + +#define SPPerfLoggingEnabled 1 + +/******************************************************************************* + ** + ** Types + ** + **/ + +/* INTERNAL DOCS + * PICA makes callbacks into the host through the host procs. The host + * procs are filled in by the host and passed to Sweet Pea at SPInit(). + * + * hostData - data that is given back to each host proc when Sweet Pea + * calls it. Sweet Pea does nothing with it itself. + * + * extAllocate - implementation of the Block Suite's AllocateBlock() routine. + * It is identical to ANSI C malloc(). It returns a pointer to the + * beginning of the allocated block or NULL. + * + * extFree - implementation of the Block Suite's FreeBlock() routine. It is + * identical to ANSI C free(). Note that you can pass it NULL. + * + * extReallocate - implementation of the Block Suite's ReallocateBlock() + * routine. It is identical to ANSI C realloc(). It returns a pointer + * to the resized block or NULL. Note that you can pass it NULL or a + * newSize of 0. + * extSubAllocate, extSubFree, extSubReallocate- alternate memory allocation routines + * intAllocate, intFree, intReallocate - routines used by Sweet Pea for + * its own memory needs. You may want to allocate blocks differently + * with plug-ins and Sweet Pea. Plug-ins are unbounded in their memory + * needs, while Sweet Pea's memory usage can be approximated. + * + * startupNotify - called as each plug-in is started up. This is intended + * as a way to tell the user what's happening during start up. + * Note that plug-ins may start up at any time, not just during + * SPStartupPlugins(). + * + * shutdownNotify - called just before and after each plug-in is shut down. + * Also intended as a way to let users know what's going on. + * + * assertTrap - called when a fatal assert is triggered. Sweet Pea does + * not expect execution to continue after an assert. + * + * throwTrap - called when an internal error is thrown. This can be used + * during debugging to catch errors as they happen. It should return + * to allow Sweet Pea to handle the error. + * + * + * To aid in getting Sweet Pea up and running quickly, you can set any of + * these to NULL and Sweet Pea will use a default implementation. However: + * you cannot mix your implementations of the memory routines with + * Sweet Pea's defaults. + * + * + * The string pool functions replace the default routines used internally + * and exported by the Strings suite. Because they are exported, the behaviors + * listed below should be followed. + * + * allocateStringPool - creates a new string pool instance. The host app and + * Sweet Pea have a string pool which can be used by a plug-in, or a plug-in + * can create its own. See the notes in SPStrngs.h on how the pool is + * implemented. + * The function should return kSPNoError if the pool is allocated successfully + * or kSPOutOfMemoryError if allocation fails. + * + * freeStringPool - disposes of the string pool and any associated memory. The + * function should return kSPNoError + * + * makeWString - the string pool keeps a list of added strings. When a new string is + * added with MakeWString(), the routine checks to see if it is already in the + * pool. If so, the address of the string instance in the pool is returned. If + * not, it will add it to the pool and return the address of the newly + * created string instance. The behavior is: + * + * if ( string == NULL ) + * *wString = NULL; + * returns kSPNoError; + * else if ( string in string pool ) + * *wString = found string; + * returns kSPNoError; + * else add string + * if successful + * *wString = new string; + * returns kSPNoError; + * else + * *wString = nil + * returns kSPOutOfMemoryError + * + * appStringPool - if the host application has already allocated a string pool to use, + * it's reference should be passed here. If this value is NULL, Sweet Pea will + * allocate the pool when initialized and dispose of it at termination. + * + * filterEvent - a function called for each event allowing the host to cancel it. + * The event type is indicative of what the filter is to do. A file validation + * is called before a directory entry is added to the file list (kAddFile). + * A plug-in validation before a file is checked for PiPL information (kAddPlugin); + * the host might examine the file name/type to determine whether it should be added. + * For these 'add' events the return value is TRUE if the item should be skipped + * or FALSE if should be should be added. The default filter proc, used (if NULL) + * is passed, will skip files/folders in ( ). + * The other event is kSuitesAvailable. It is called when the last suite adding + * plug-in (as determined by available PiPL information) has been added. This is + * a point at which the host can cancel the startup process; for instance, if the host + * requires a suite from a plug-in, this is the time to check for it. If the + * host returns TRUE, the startup process continues. If it returns FALSE, the + * plug-in startup is canceled and the host would likely terminate or startup in + * an alternate manner. + * + * overrideAddPlugins - if supplied, SP will call the host to create the runtime + * plug-in list. This occurs at SPStartupPlugins(). The function takes no parameters + * as it is up to the host to determine how to do this. For instance, the host can do + * this from cached data or, as SP would, from the file list. A returned error will + * stop the plug-in startup process. + * + * overrideStartup - a function called for each SP2 plug-in before it is sent the + * startup message. If the host returns FALSE, SP will startup the plug-in normal. + * If the host returns true, it is assumed that the host has handled the startup + * for the plug-in, so SP will not do anything for the plug-in. This is intended + * to be used with a plug-in caching scheme. + * The host would be responsible, for instance, for defining the cacheable + * information in the PiPL, adding it when the callback is made, and later issuing + * a startup message when the plug-in is actually needed (e.g. when a menu item + * is selected.) Two notes: don't forget to SetPluginStarted(), and make sure + * to use a string pooled char* to kSPInterfaceCaller and kSPInterfaceStartupSelector. + * + * resolveLink - Windows only. If the search for plug-ins is to recurse sub-folders, + * the host needs to supply this routine. When a .lnk file is encountered, the + * resolveLink host callback function will be called and should return a resolved path. + * This is a host callback due to OLE issues such as initialization, which the SP + * library does not currently handle. If it returns an error code, the result will + * be ignored. + * + * getPluginAccess - Allows the host to set the plug-in access information. This would + * be used if, for instance, the host kept its own plug-in list (ala, Photoshop), but + * still needed these to be compatible with SPPlugins (e.g. whose accesses are used by ADM) + * + * memoryIsCritical - Mac only. Allows the host to indicate that memory is in a critical state + * (really low, but can't be purged because you are, say, shutdown.) + * If so and the plug-in load target heap is the app heap, when a plug-in fails to load + * SP will then try to load the plug-in into the system heap + */ + +/* These are passed in startup and shutdown host notify procs and the filter file proc. */ +/** A notification event type, that an adapter passes to the \c #SPStartupNotifyProc + and \c #SPShutdownNotifyProc when the associated plug-in is loaded or unloaded. + */ +typedef enum { + /** Sent to the \c #SPStartupNotifyProc after a file has been added as a plug-in. + The \c notifyData value is the plug-in object, an \c #SPPluginRef. */ + kAddFile, /* Internal: for filter file, received before a file is added to a file list, notifyData is a pointer to the SPPlatformFileSpecification */ + /** Sent to the \c #SPStartupNotifyProc after a plug-in has been added. + The \c notifyData value is the plug-in object, an \c #SPPluginRef. */ + kAddPlugin, /* Internal: for filter file, received before a file is checked to see if it is a plugin, notifyData is the files SPFileRef */ + /** Sent to the \c #SPStartupNotifyProc to specify a general message for the application splash screen. + The \c notifyData value is a pointer to a C string, char**. */ + kSetMessage, + /** Internal */ + kSuitesAvailable, /* Internal: used only by event filter to allow host to check for suites it requires, notifyDatais NULL */ + /** Internal */ + kError, /* Internal: notifyData is SPErrorDataPtr*/ + /** Sent to the \c #SPStartupNotifyProc after the plug-in is started. + The \c notifyData value is the plug-in object, an \c #SPPluginRef. */ + kStartingupPlugin, /* Internal: for filter file, received before a file is checked to see if it is a plugin, notifyData is the files SPFileRef */ + /** Sent to the \c #SPShutdownNotifyProc just before a plug-in is shutdown. + The \c notifyData value is the plug-in object, an \c #SPPluginRef. */ + kPreShutdownPlugin, + /** Sent to the \c #SPShutdownNotifyProc after the plug-in is shutdown. + The \c notifyData value is the plug-in object, an \c #SPPluginRef. */ + kPostShutdownPlugin, + /** Internal */ + kNoEvent = 0xffffffff + } NotifyEvent; + +/** Internal */ +typedef void *(*SPAllocateProc)( size_t size, void *hostData ); +/** Internal */ +typedef void (*SPFreeProc)( void *block, void *hostData ); +/** Internal */ +typedef void *(*SPReallocateProc)( void *block, size_t newSize, void *hostData ); +/** Called by an adapter to inform the application that a plug-in is being started up. + The application uses this information to track the start-up process; for example, + to display a list of plug-ins being loaded. + @param event The notification event constant that identifies which event occurred. + @param notifyData A pointer to plug-in-defined initialization data. + @param hostData A pointer to application-defined initialization data. + @return Nothing. + */ +typedef void (*SPStartupNotifyProc)( NotifyEvent event, void *notifyData, void *hostData ); +/** Called by an adapter to inform the application that a plug-in is being shut down. + The application uses this information to track the shut-down process. + @param event The notification event. + @param notifyData A pointer to plug-in-defined termination data. + @param hostData A pointer to application-defined termination data. + @return Nothing. + */ +typedef void (*SPShutdownNotifyProc)( NotifyEvent event, void *notifyData, void *hostData ); +/** Internal */ +typedef void (*SPAssertTrapProc)( const char *failMessage, void *hostData ); +/** Internal */ +typedef void (*SPThrowTrapProc)( SPErr error, void *hostData ); +/** Internal */ +typedef void (*SPDebugTrapProc)( const char *debugMessage, void *hostData ); + +typedef void (*SPWarningProc)(const char *warningMessage, void *hostData); + +/** Internal */ +typedef SPAPI SPErr (*SPAllocateStringPoolProc)( SPStringPoolRef *pool ); +/** Internal */ +typedef SPAPI SPErr (*SPFreeStringPoolProc)( SPStringPoolRef stringPool ); +/** Internal */ +typedef SPAPI SPErr (*SPMakeWStringProc)( SPStringPoolRef stringPool, const char *string, + const char **wString ); + +#if !defined(IOS_ENV) +/** Internal */ +typedef SPAPI SPErr (*SPGetHostAccessInfoProc)( SPPlatformAccessInfo *spHostAccessInfo ); +#endif // !defined(IOS_ENV) + +/** Internal */ +typedef SPAPI SPBoolean (*SPFilterEventProc)( NotifyEvent event, const void *eventData ); +/** Internal */ +typedef SPAPI SPErr (*SPAddPluginsProc)( void ); +/** Internal */ +typedef SPAPI SPBoolean (*SPOverrideStartupProc)( SPPluginRef currentPlugin ); + + + +#ifdef WIN_ENV +/** Internal */ +typedef SPAPI SPErr (*SPResolveLinkProc)(const char *shortcutFile, char *resolvedPath); +typedef SPAPI SPErr (*SPResolveLinkProcW)(const wchar_t*shortcutFile, wchar_t *resolvedPath); +#endif // WIN_ENV + +typedef SPAPI SPErr (*SPWideCharToPlatform)(char* destination, size_t dstSizeBytes, const ai::uint16* src, size_t srcWcharCount); +typedef SPAPI SPErr (*SPPlatformToWideChar)(ai::uint16* destination, size_t dstCharCount, const char* src, size_t srcSizeBytes); + +/** Internal */ +typedef SPAPI SPErr (*GetNativePluginAccessProc)(SPPluginRef plugin, SPAccessRef *access); + +/** Internal */ +typedef SPAPI SPBoolean (*MemoryIsCriticalProc)( void ); + +#if SPPerfLoggingEnabled +//Host should start timer at their end, can choose to send its data in hostLogData +typedef SPAPI void (*SPPerfLogTimerStart)(void **hostLogData, SPBoolean pauseAtStart); +typedef SPAPI void(*SPPerfLogTimerPause)(void *hostLogData); +typedef SPAPI void(*SPPerfLogTimerPlay)(void *hostLogData); +//Host should log time with given strings +typedef SPAPI void (*SPPerfLogPut)(void *hostLogData, const char* logString1, const char* logString2); +typedef SPAPI void(*SPPerfLogPutWithGivenTime)(ai::int64 givenTime, const char* logString1, const char* logString2); +typedef SPAPI ai::int64(*SPGetElapsedMicroSeconds)(void *hostLogData); +//Give opportunity to host to clear its data +typedef SPAPI void(*SPPerfLogTimerDestroy)(void *hostLogData); +#endif // SPPerfLoggingEnabled + +/** Callback procedures provided to PICA by the application. + Plug-ins do not use these, except for adapters, which + call the initialization and termination procedures. + @see \c #SPRuntimeSuite::GetRuntimeHostFileSpec() */ +typedef struct SPHostProcs { + + void *hostData; + + SPAllocateProc extAllocate; + SPFreeProc extFree; + SPReallocateProc extReallocate; + + SPAllocateProc intAllocate; + SPFreeProc intFree; + SPReallocateProc intReallocate; + /** Plug-in initialization procedure */ + SPStartupNotifyProc startupNotify; + /** Plug-in termination procedure */ + SPShutdownNotifyProc shutdownNotify; + + SPAssertTrapProc assertTrap; + SPThrowTrapProc throwTrap; + SPDebugTrapProc debugTrap; + SPWarningProc warningProc; + + SPAllocateStringPoolProc allocateStringPool; + SPFreeStringPoolProc freeStringPool; + SPMakeWStringProc makeWString; + SPStringPoolRef appStringPool; + + SPFilterEventProc filterEvent; + SPAddPluginsProc overrideAddPlugins; + SPOverrideStartupProc overridePluginStartup; + +#ifdef WIN_ENV + SPResolveLinkProc resolveLink; +#endif // WIN_ENV + + GetNativePluginAccessProc getPluginAccess; + +#ifdef MAC_ENV + // enable second-chance plugin loading for success-critical situations + MemoryIsCriticalProc memoryIsCritical; +#endif // MAC_ENV + + SPAllocateProc extSubAllocate; //alternate allocation mechanism: Suballocation + SPFreeProc extSubFree; + SPReallocateProc extSubReallocate; + + //Do not insert in the middle as Photoshop Adapter's SPRuntime interface's order will become different +#ifdef WIN_ENV + SPResolveLinkProcW resolveLinkW; +#endif // WIN_ENV + + SPWideCharToPlatform wideCharToPlatform; + SPPlatformToWideChar platformToWideChar; + +#if SPPerfLoggingEnabled + SPPerfLogTimerStart startPerflog; + SPPerfLogTimerPause pausePerfLogTimer; + SPPerfLogTimerPlay playPerfLogTimer; + SPPerfLogPut putPerfLog; + SPPerfLogPutWithGivenTime putPerfLogWithGivenTime; + SPGetElapsedMicroSeconds getElapsedMicroSeconds; + SPPerfLogTimerDestroy clearHostLogData; +#endif // SPPerfLoggingEnabled +} SPHostProcs; + + +/******************************************************************************* + ** + ** Suite + ** + **/ +/** @ingroup Suites + This suite allows you to obtain specific references to the + PICA global lists and string pool. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPRuntimeSuite and \c #kSPRuntimeSuiteVersion. + */ +typedef struct SPRuntimeSuite { + /** Retrieves the PICA global string pool. + @param stringPool [out] A buffer in which to return the string-pool object. + @see \c #SPStringsSuite + */ + SPAPI SPErr (*GetRuntimeStringPool)( SPStringPoolRef *stringPool ); + /** Retrieves the PICA global suite list. + @param suiteList [out] A buffer in which to return the list object. + @see \c #SPSuitesSuite + */ + SPAPI SPErr (*GetRuntimeSuiteList)( SPSuiteListRef *suiteList ); + /** Retrieves the PICA global file list. + @param fileList [out] A buffer in which to return the list object. + @see \c #SPFilesSuite + */ + SPAPI SPErr (*GetRuntimeFileList)( SPFileListRef *fileList ); + /** Retrieves the PICA global plug-in list. + @param pluginList [out] A buffer in which to return the list object. + @see \c #SPPluginsSuite + */ + SPAPI SPErr (*GetRuntimePluginList)( SPPluginListRef *pluginList ); + /** Retrieves the PICA global adapter list. + @param adapterList [out] A buffer in which to return the list object. + @see \c #SPAdaptersSuite + */ + SPAPI SPErr (*GetRuntimeAdapterList)( SPAdapterListRef *adapterList ); + /** Retrieves the block of function pointers supplied to PICA by the + application, which contains memory management routines, notification routines, + exception handling, and string pool routines. + + A plug-in does not normally call the host functions directly; you + can use the PICA suite functions for most operations. An adapter, however, + uses the host functions for start-up and shut-down notification. + @param hostProcs [out] A buffer in which to return a pointer to the + block of function pointers. + */ + SPAPI SPErr (*GetRuntimeHostProcs)( SPHostProcs **hostProcs ); + /** Retrieves the location of the application's plug-in folder. + @param pluginFolder [out] A buffer in which to return the + file specification for the directory that contains plug-ins. + */ + SPAPI SPErr (*GetRuntimePluginsFolder)( SPPlatformFileReference *pluginFolder ); + /** Retrieves the location of the application's executable file. + @param hostFileSpec [out] A buffer in which to return the + file specification for the application's executable file. + */ + SPAPI SPErr (*GetRuntimeHostFileRef)( SPPlatformFileReference *hostFileSpec ); +} SPRuntimeSuite; + + +/** Internal */ +SPAPI SPErr SPGetRuntimeStringPool( SPStringPoolRef *stringPool ); +/** Internal */ +SPAPI SPErr SPGetRuntimeSuiteList( SPSuiteListRef *suiteList ); +/** Internal */ +SPAPI SPErr SPGetRuntimeFileList( SPFileListRef *fileList ); +/** Internal */ +SPAPI SPErr SPGetRuntimePluginList( SPPluginListRef *pluginList ); +/** Internal */ +SPAPI SPErr SPGetRuntimeAdapterList( SPAdapterListRef *adapterList ); +/** Internal */ +SPAPI SPErr SPGetRuntimeHostProcs( SPHostProcs **hostProcs ); +/** Internal */ +SPAPI SPErr SPGetRuntimePluginsFolder( SPPlatformFileReference *pluginFolder ); +/** Internal */ +SPAPI SPErr SPSetRuntimePluginsFolder( SPPlatformFileReference *pluginFolder ); +/** Internal */ +SPAPI SPErr SPGetRuntimeHostFileRef( SPPlatformFileReference *hostFileSpec ); + +#ifdef WIN_ENV +/** Internal */ +SPAPI SPErr SPGetRuntimePluginsFolder_v5( SPPlatformFileSpecification *pluginFolder ); +/** Internal */ +SPAPI SPErr SPGetRuntimeHostFileRef_v5( SPPlatformFileSpecification *hostFileSpec ); +#endif // WIN_ENV + +/** Internal */ +typedef struct +{ + SPAPI SPErr (*SPAcquireSuiteFunc)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, ai::int32 internalVersion, const void **suiteProcs ); + SPAPI SPErr (*SPReleaseSuiteFunc)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, ai::int32 internalVersion ); + SPErr (*spAllocateBlockFunc)( SPAllocateProc allocateProc, size_t size, const char *debug, void **block ); + SPErr (*spFreeBlockFunc)( SPFreeProc freeProc, void *block ); + SPErr (*spReallocateBlockFunc)( SPReallocateProc reallocateProc, void *block, size_t newSize, const char *debug, void **newblock ); + SPHostProcs *gProcs; +} SPBasicFuncStruct; + +#ifdef __cplusplus +} // extern "C" +#endif // __cplusplus + +#include "SPHeaderEnd.h" + +#ifdef __cplusplus + +namespace ai +{ + +/** Internal */ +void SetUpBasicFuncs(SPBasicFuncStruct *inStruct); + +} // namespace ai + +#endif // __cplusplus + +#endif // __SPRuntime__ diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPRuntmeV6.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPRuntmeV6.h new file mode 100644 index 0000000..e3f23ef --- /dev/null +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPRuntmeV6.h @@ -0,0 +1,188 @@ +/***********************************************************************/ +/* */ +/* SPRuntmeV6.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#pragma once + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPRuntme.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + + /******************************************************************************* + ** + ** Constants + ** + **/ + +#define kSPRuntimeSuiteV6 kSPRuntimeSuite +#define kSPRuntimeSuiteVersion5 5 + + /******************************************************************************* + ** + ** Types + ** + **/ + + + /** Callback procedures provided to PICA by the application. + Plug-ins do not use these, except for adapters, which + call the initialization and termination procedures. + @see \c #SPRuntimeSuite::GetRuntimeHostFileSpec() */ + typedef struct SPHostProcsV5 { + + void *hostData; + + SPAllocateProc extAllocate; + SPFreeProc extFree; + SPReallocateProc extReallocate; + + SPAllocateProc intAllocate; + SPFreeProc intFree; + SPReallocateProc intReallocate; + /** Plug-in initialization procedure */ + SPStartupNotifyProc startupNotify; + /** Plug-in termination procedure */ + SPShutdownNotifyProc shutdownNotify; + + SPAssertTrapProc assertTrap; + SPThrowTrapProc throwTrap; + SPDebugTrapProc debugTrap; + + SPAllocateStringPoolProc allocateStringPool; + SPFreeStringPoolProc freeStringPool; + SPMakeWStringProc makeWString; + SPStringPoolRef appStringPool; + + SPFilterEventProc filterEvent; + SPAddPluginsProc overrideAddPlugins; + SPOverrideStartupProc overridePluginStartup; + +#ifdef WIN_ENV + SPResolveLinkProc resolveLink; +#endif + + GetNativePluginAccessProc getPluginAccess; + +#ifdef MAC_ENV + // enable second-chance plugin loading for success-critical situations + MemoryIsCriticalProc memoryIsCritical; +#endif + + SPAllocateProc extSubAllocate; //alternate allocation mechanism: Suballocation + SPFreeProc extSubFree; + SPReallocateProc extSubReallocate; + + //Do not insert in the middle as Photoshop Adapter's SPRuntime interface's order will become different +#ifdef WIN_ENV + SPResolveLinkProcW resolveLinkW; +#endif + SPWideCharToPlatform wideCharToPlatform; + SPPlatformToWideChar platformToWideChar; +#if SPPerfLoggingEnabled + SPPerfLogTimerStart startPerflog; + SPPerfLogTimerPause pausePerfLogTimer; + SPPerfLogTimerPlay playPerfLogTimer; + SPPerfLogPut putPerfLog; + SPPerfLogPutWithGivenTime putPerfLogWithGivenTime; + SPGetElapsedMicroSeconds getElapsedMicroSeconds; + SPPerfLogTimerDestroy clearHostLogData; +#endif + } SPHostProcsV5; + + /******************************************************************************* + ** + ** Suite + ** + **/ + /** @ingroup Suites + This suite allows you to obtain specific references to the + PICA global lists and string pool. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPRuntimeSuite and \c #kSPRuntimeSuiteVersion. + */ + typedef struct SPRuntimeSuiteV6 { + /** Retrieves the PICA global string pool. + @param stringPool [out] A buffer in which to return the string-pool object. + @see \c #SPStringsSuite + */ + SPAPI SPErr (*GetRuntimeStringPool)( SPStringPoolRef *stringPool ); + /** Retrieves the PICA global suite list. + @param suiteList [out] A buffer in which to return the list object. + @see \c #SPSuitesSuite + */ + SPAPI SPErr (*GetRuntimeSuiteList)( SPSuiteListRef *suiteList ); + /** Retrieves the PICA global file list. + @param fileList [out] A buffer in which to return the list object. + @see \c #SPFilesSuite + */ + SPAPI SPErr (*GetRuntimeFileList)( SPFileListRef *fileList ); + /** Retrieves the PICA global plug-in list. + @param pluginList [out] A buffer in which to return the list object. + @see \c #SPPluginsSuite + */ + SPAPI SPErr (*GetRuntimePluginList)( SPPluginListRef *pluginList ); + /** Retrieves the PICA global adapter list. + @param adapterList [out] A buffer in which to return the list object. + @see \c #SPAdaptersSuite + */ + SPAPI SPErr (*GetRuntimeAdapterList)( SPAdapterListRef *adapterList ); + /** Retrieves the block of function pointers supplied to PICA by the + application, which contains memory management routines, notification routines, + exception handling, and string pool routines. + + A plug-in does not normally call the host functions directly; you + can use the PICA suite functions for most operations. An adapter, however, + uses the host functions for start-up and shut-down notification. + @param hostProcs [out] A buffer in which to return a pointer to the + block of function pointers. + */ + SPAPI SPErr (*GetRuntimeHostProcs)( SPHostProcsV5 **hostProcs ); + /** Retrieves the location of the application's plug-in folder. + @param pluginFolder [out] A buffer in which to return the + file specification for the directory that contains plug-ins. + */ + SPAPI SPErr (*GetRuntimePluginsFolder)( SPPlatformFileReference *pluginFolder ); + /** Retrieves the location of the application's executable file. + @param hostFileSpec [out] A buffer in which to return the + file specification for the application's executable file. + */ + SPAPI SPErr (*GetRuntimeHostFileRef)( SPPlatformFileReference *hostFileSpec ); + } SPRuntimeSuiteV6; + + /** Internal */ + SPAPI SPErr SPGetRuntimeHostProcs_v5(SPHostProcsV5 **hostProcs ); +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + + diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSTSPrp.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSTSPrp.h index 12a0157..55be6f6 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSTSPrp.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSTSPrp.h @@ -1,52 +1,52 @@ -/***********************************************************************/ -/* */ -/* SPSTSPrp.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPSTSPrp__ -#define __SPSTSPrp__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPPiPL.h" - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -/** Internal */ -#define PISuperTopSecretProperty 'StsP' -/** Internal */ -#define PISuperTopSecretValue 'clEn' - - -/******************************************************************************* - ** - ** Types - ** - **/ - - -#endif +/***********************************************************************/ +/* */ +/* SPSTSPrp.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPSTSPrp__ +#define __SPSTSPrp__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPPiPL.h" + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +/** Internal */ +#define PISuperTopSecretProperty 'StsP' +/** Internal */ +#define PISuperTopSecretValue 'clEn' + + +/******************************************************************************* + ** + ** Types + ** + **/ + + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPStrngs.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPStrngs.h index fbae9dc..b9c3f93 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPStrngs.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPStrngs.h @@ -1,136 +1,136 @@ -/***********************************************************************/ -/* */ -/* SPStrngs.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPStrings__ -#define __SPStrings__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** PICA strings suite name */ -#define kSPStringsSuite "SP Strings Suite" -/** PICA strings suite version */ -#define kSPStringsSuiteVersion 2 - -/** Globally available PICA strings resources. - @see \c #SPRuntimeSuite::GetRuntimeStringPool(). */ -#define kSPRuntimeStringPool ((SPStringPoolRef)NULL) - - -/******************************************************************************* - ** - ** Types - ** - **/ - -/* If you override the default string pool handler by defining host proc routines, - * how the string pool memory allocation and searching is done is up to you. As an example, - * the structure below is similar to what Sweet Pea uses for its default string pool - * routines. The pool is a sorted list of strings of number count, kept in memory referenced - * by the heap field. - * - * typedef struct SPStringPool { - * - * SPPoolHeapRef heap; - * long count; - * - * } SPStringPool; - */ - -/** Opaque reference to a string pool. Access with the \c #SPStringsSuite. */ -typedef struct SPStringPool *SPStringPoolRef; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to work with the PICA string pool. - - PICA manages a string pool, which provides an efficient central - storage space for C strings. When a string is placed in the pool, PICA - checks whether it already exists in the pool, and if so, returns a - pointer to the existing string. If not, it copies the string into the pool, - and returns a pointer to the copy. - - This mechanisms atomizes the strings. Because each string exists in - only one place, strings can be compared by address, rather than character - by character, and string searches are made much more efficient. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPStringsSuite and \c #kSPStringsSuiteVersion. - */ -typedef struct SPStringsSuite { - - /** Creates a new string pool and allocates an initial block of memory for - its strings. You can also access PICA's global string pool, - using \c #SPRuntimeSuite::GetRuntimeStringPool(). - @param stringPool [out] A buffer in which to return the new string pool reference. - */ - SPAPI SPErr (*AllocateStringPool)( SPStringPoolRef *stringPool ); - /** Frees the memory used for a string pool created with \c #AllocateStringPool(). - Do not free the global string pool (\c #kSPRuntimeStringPool). - @param stringPool The string pool reference. - */ - SPAPI SPErr (*FreeStringPool)( SPStringPoolRef stringPool ); - /** Adds a string to a string pool, or, if the string has already been added - to the pool, retrieves a reference to the pooled string. - @param stringPool The string pool reference. - @param string The string. - @param wString [out] A buffer in which to return the address of - the atomized string in the pool. - */ - SPAPI SPErr (*MakeWString)( SPStringPoolRef stringPool, const char *string, const char **wString ); - -} SPStringsSuite; - - -SPAPI SPErr SPAllocateStringPool( SPStringPoolRef *stringPool ); -SPAPI SPErr SPFreeStringPool( SPStringPoolRef stringPool ); -SPAPI SPErr SPMakeWString( SPStringPoolRef stringPool, const char *string, const char **wString ); - - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPStrngs.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPStrings__ +#define __SPStrings__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** PICA strings suite name */ +#define kSPStringsSuite "SP Strings Suite" +/** PICA strings suite version */ +#define kSPStringsSuiteVersion 2 + +/** Globally available PICA strings resources. + @see \c #SPRuntimeSuite::GetRuntimeStringPool(). */ +#define kSPRuntimeStringPool ((SPStringPoolRef)NULL) + + +/******************************************************************************* + ** + ** Types + ** + **/ + +/* If you override the default string pool handler by defining host proc routines, + * how the string pool memory allocation and searching is done is up to you. As an example, + * the structure below is similar to what Sweet Pea uses for its default string pool + * routines. The pool is a sorted list of strings of number count, kept in memory referenced + * by the heap field. + * + * typedef struct SPStringPool { + * + * SPPoolHeapRef heap; + * long count; + * + * } SPStringPool; + */ + +/** Opaque reference to a string pool. Access with the \c #SPStringsSuite. */ +typedef struct SPStringPool *SPStringPoolRef; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite allows you to work with the PICA string pool. + + PICA manages a string pool, which provides an efficient central + storage space for C strings. When a string is placed in the pool, PICA + checks whether it already exists in the pool, and if so, returns a + pointer to the existing string. If not, it copies the string into the pool, + and returns a pointer to the copy. + + This mechanisms atomizes the strings. Because each string exists in + only one place, strings can be compared by address, rather than character + by character, and string searches are made much more efficient. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPStringsSuite and \c #kSPStringsSuiteVersion. + */ +typedef struct SPStringsSuite { + + /** Creates a new string pool and allocates an initial block of memory for + its strings. You can also access PICA's global string pool, + using \c #SPRuntimeSuite::GetRuntimeStringPool(). + @param stringPool [out] A buffer in which to return the new string pool reference. + */ + SPAPI SPErr (*AllocateStringPool)( SPStringPoolRef *stringPool ); + /** Frees the memory used for a string pool created with \c #AllocateStringPool(). + Do not free the global string pool (\c #kSPRuntimeStringPool). + @param stringPool The string pool reference. + */ + SPAPI SPErr (*FreeStringPool)( SPStringPoolRef stringPool ); + /** Adds a string to a string pool, or, if the string has already been added + to the pool, retrieves a reference to the pooled string. + @param stringPool The string pool reference. + @param string The string. + @param wString [out] A buffer in which to return the address of + the atomized string in the pool. + */ + SPAPI SPErr (*MakeWString)( SPStringPoolRef stringPool, const char *string, const char **wString ); + +} SPStringsSuite; + + +SPAPI SPErr SPAllocateStringPool( SPStringPoolRef *stringPool ); +SPAPI SPErr SPFreeStringPool( SPStringPoolRef stringPool ); +SPAPI SPErr SPMakeWString( SPStringPoolRef stringPool, const char *string, const char **wString ); + + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSuites.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSuites.h index f11b7db..4bb7390 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSuites.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPSuites.h @@ -1,296 +1,296 @@ -/***********************************************************************/ -/* */ -/* SPSuites.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - -#ifndef __SPSuites__ -#define __SPSuites__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPTypes.h" -#include "SPAccess.h" -#include "SPPlugs.h" -#include "SPStrngs.h" - -#include "SPHeaderBegin.h" - -#ifdef __cplusplus -extern "C" { -#endif - - -/******************************************************************************* - ** - ** Constants - ** - **/ -/** PICA suite-management suite name */ -#define kSPSuitesSuite "SP Suites Suite" -/** PICA suite-management suite version */ -#define kSPSuitesSuiteVersion 2 - -/** Internal */ -#define kSPLatestInternalVersion 0 - -/** PICA global list of available suites. - @see \c #SPRuntimeSuite::GetRuntimeSuiteList(). */ -#define kSPRuntimeSuiteList ((SPSuiteListRef)NULL) - -#define kAIAboutToLoadSuite "About To Load SPSuite" - -/******************************************************************************* - ** - ** Types - ** - **/ - -/** Opaque reference to a suite object. Access with the \c #SPSuitesSuite. */ -typedef struct SPSuite *SPSuiteRef; -/** A list of suite objects. Create with - \c #SPSuitesSuite::AllocateSuiteList(), or use - the global list, \c #kSPRuntimeSuiteList. */ -typedef struct SPSuiteList *SPSuiteListRef; -/** An iterator object for examining a suite list. - See \c #SPSuitesSuite::NewSuiteListIterator(). */ -typedef struct SPSuiteListIterator *SPSuiteListIteratorRef; - - -/******************************************************************************* - ** - ** Suite - ** - **/ - -/** @ingroup Suites - This suite allows you to create, manage, and access PICA function suites. - - A suite associates a name and version number with a pointer to an array of - function pointers. The functions generally haves some common purpose, such as - accessing a data type, and are used by plug-ins to interact with PICA, with - the application, and with each other. - - In order to use a function in a suite, you must first \e acquire it. - This suite provides the low-level function \c #AcquireSuite(), - but a plug-in more typically uses the \c #SPBasicSuite, which is provided - with every message to a plug-in. - - PICA creates a global suite list at application startup, which contains - references to every suite added by PICA, the application, or other plug-ins. - You can use this suite to create and manage additional suite lists. - - \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants - \c #kSPSuitesSuite and \c #kSPSuitesSuiteVersion. - */ -typedef struct SPSuitesSuite { - - /** Creates a new suite list. You can also access PICA's global suite list, - using \c #SPRuntimeSuite::GetRuntimeSuiteList(). - @param stringPool The string pool in which to keep suite names. - @param plugins A set of plug-in objects. - @param suiteList [out] A buffer in which to return the new list object. - */ - SPAPI SPErr (*AllocateSuiteList)( SPStringPoolRef stringPool, SPPluginListRef plugins, - SPSuiteListRef *suiteList ); - - /** Frees a list of suites allocated with \c #AllocateSuiteList(), and - also frees any entries in the list. Do not free the global list (\c #kSPRuntimeSuiteList). - @param suiteList The suite list object. - */ - SPAPI SPErr (*FreeSuiteList)( SPSuiteListRef suiteList ); - - /** Creates a new plug-in function suite and adds it to a suite list. - Identifying constants for the suite name and version must be made - available in a public header file. - @param suiteList The suite list object, or \c NULL to use the - global list. - @param host The plug-in object providing the suite. - @param name The unique name of the suite. - @param apiVersion The public version number of the suite. - @param internalVersion The internal version number of the suite. - @param suiteProcs A pointer to a structure containing the function pointers - for the suite. - @param suite [out] A buffer in which to return the new suite object. - */ - SPAPI SPErr (*AddSuite)( SPSuiteListRef suiteList, SPPluginRef host, const char *name, - ai::int32 apiVersion, ai::int32 internalVersion, const void *suiteProcs, SPSuiteRef *suite ); - - /** Acquires a function suite from a suite list. Loads the suite if necessary, - and increments its reference count. This function differs from - \c #SPBasicSuite::AcquireSuite() in that you can specify a suite list - and internal version number. - @param suiteList The suite list object, or \c NULL to use the - global list. - @param name The suite name. - @param version The public suite version number. - @param internalVersion The internal suite version number. - @param suiteProcs [out] A buffer in which to return a pointer to the - suite function pointer array. - */ - SPAPI SPErr (*AcquireSuite)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, - ai::int32 internalVersion, const void **suiteProcs ); - - /** Decrements the reference count of a suite in a suite list and unloads it when the - reference count reaches 0. - @param suiteList The suite list object, or \c NULL to use the - global list. - @param name The suite name. - @param version The public suite version number. - @param internalVersion The internal suite version number. - */ - SPAPI SPErr (*ReleaseSuite)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, - ai::int32 internalVersion ); - - /** Retrieves a suite from a suite list. - @param suiteList The suite list object, or \c NULL to use the - global list. - @param name The suite name. - @param version The public suite version number. - @param internalVersion The internal suite version number. - @param suiteProcs [out] A buffer in which to return the suite object, or - \c NULL if no matching suite is found in the list. - */ - SPAPI SPErr (*FindSuite)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, - ai::int32 internalVersion, SPSuiteRef *suite ); - - /** Creates an iterator object with which to traverse a suite list. - The iterator is initially set to the first suite in the list. - @param suiteList The suite list object, or \c NULL to use the - global list. - @param iter [out] A buffer in which to return the new iterator object. - @see \c #NextSuite(), \c #DeleteSuiteListIterator() - */ - SPAPI SPErr (*NewSuiteListIterator)( SPSuiteListRef suiteList, SPSuiteListIteratorRef *iter ); - /** Retrieves the current suite and advances a suite-list iterator to the next suite in the list. - @param iter The suite-list iterator object. - @param suite [out] A buffer in which to return the current suite object, \c NULL - if the end of the list has been reached. - @see \c #NewSuiteListIterator(), - */ - SPAPI SPErr (*NextSuite)( SPSuiteListIteratorRef iter, SPSuiteRef *suite ); - /** Frees a suite-list iterator that is no longer needed. - @param iter The suite-list iterator object. - @see \c #NewSuiteListIterator(), - */ - SPAPI SPErr (*DeleteSuiteListIterator)( SPSuiteListIteratorRef iter ); - - /** Retrieves the plug-in that provides a suite. - @param suite The suite object. - @param plugin [out] A buffer in which to return the plug-in object. - */ - SPAPI SPErr (*GetSuiteHost)( SPSuiteRef suite, SPPluginRef *plugin ); - /** Retrieves the unique name of a suite. - @param suite The suite object. - @param name [out] A buffer in which to return the name string. - */ - SPAPI SPErr (*GetSuiteName)( SPSuiteRef suite, const char **name ); - /** Retrieves the public version number of a suite. - @param suite The suite object. - @param version [out] A buffer in which to return the public version number. - */ - SPAPI SPErr (*GetSuiteAPIVersion)( SPSuiteRef suite, ai::int32 *version ); - /** Retrieves the internal version number of a suite. - @param suite The suite object. - @param version [out] A buffer in which to return the internal version number. - */ - SPAPI SPErr (*GetSuiteInternalVersion)( SPSuiteRef suite, ai::int32 *version ); - /** Retrieves the function pointer array of a suite. - @param suite The suite object. - @param suiteProcs [out] A buffer in which to return a pointer - to the function pointer array. - */ - SPAPI SPErr (*GetSuiteProcs)( SPSuiteRef suite, const void **suiteProcs ); - /** Retrieves the current reference count of a suite. - @param suite The suite object. - @param count [out] A buffer in which to return the reference count. - */ - SPAPI SPErr (*GetSuiteAcquireCount)( SPSuiteRef suite, ai::int32 *count ); - -} SPSuitesSuite; - - -/** Internal */ -SPAPI SPErr SPAllocateSuiteList( SPStringPoolRef stringPool, SPPluginListRef plugins, - SPSuiteListRef *suiteList ); - -/** Internal */ -SPAPI SPErr SPFreeSuiteList( SPSuiteListRef suiteList ); - -/** Internal */ -SPAPI SPErr SPAddSuite( SPSuiteListRef suiteList, SPPluginRef host, const char *name, - ai::int32 apiVersion, ai::int32 internalVersion, const void *suiteProcs, SPSuiteRef *suite ); - -/** Internal */ -SPAPI SPErr SPRemoveSuite( SPSuiteListRef suiteList, SPSuiteRef suite); - -/** Internal */ -SPAPI SPErr SPRemoveSuiteEx( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, ai::int32 internalVersion); - - -/** Internal */ -SPAPI SPErr SPAcquireSuite( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, - ai::int32 internalVersion, const void **suiteProcs ); - -/** Internal */ -SPAPI SPErr SPReleaseSuite( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, - ai::int32 internalVersion ); - -/** Internal */ -SPAPI SPErr SPFindSuite( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, - ai::int32 internalVersion, SPSuiteRef *suite ); - -/** Internal */ -SPAPI SPErr SPNewSuiteListIterator( SPSuiteListRef suiteList, SPSuiteListIteratorRef *iter ); -/** Internal */ -SPAPI SPErr SPNextSuite( SPSuiteListIteratorRef iter, SPSuiteRef *suite ); -/** Internal */ -SPAPI SPErr SPDeleteSuiteListIterator( SPSuiteListIteratorRef iter ); - -/** Internal */ -SPAPI SPErr SPGetSuiteHost( SPSuiteRef suite, SPPluginRef *plugin ); -/** Internal */ -SPAPI SPErr SPGetSuiteName( SPSuiteRef suite, const char **name ); -/** Internal */ -SPAPI SPErr SPGetSuiteAPIVersion( SPSuiteRef suite, ai::int32 *version ); -/** Internal */ -SPAPI SPErr SPGetSuiteInternalVersion( SPSuiteRef suite, ai::int32 *version ); -/** Internal */ -SPAPI SPErr SPGetSuiteProcs( SPSuiteRef suite, const void **suiteProcs ); -/** Internal */ -SPAPI SPErr SPGetSuiteAcquireCount( SPSuiteRef suite, ai::int32 *count ); - - -/******************************************************************************* - ** - ** Errors - ** - **/ - -#include "SPErrorCodes.h" - -#ifdef __cplusplus -} -#endif - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPSuites.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + +#ifndef __SPSuites__ +#define __SPSuites__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPTypes.h" +#include "SPAccess.h" +#include "SPPlugs.h" +#include "SPStrngs.h" + +#include "SPHeaderBegin.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/******************************************************************************* + ** + ** Constants + ** + **/ +/** PICA suite-management suite name */ +#define kSPSuitesSuite "SP Suites Suite" +/** PICA suite-management suite version */ +#define kSPSuitesSuiteVersion 2 + +/** Internal */ +#define kSPLatestInternalVersion 0 + +/** PICA global list of available suites. + @see \c #SPRuntimeSuite::GetRuntimeSuiteList(). */ +#define kSPRuntimeSuiteList ((SPSuiteListRef)NULL) + +#define kAIAboutToLoadSuite "About To Load SPSuite" + +/******************************************************************************* + ** + ** Types + ** + **/ + +/** Opaque reference to a suite object. Access with the \c #SPSuitesSuite. */ +typedef struct SPSuite *SPSuiteRef; +/** A list of suite objects. Create with + \c #SPSuitesSuite::AllocateSuiteList(), or use + the global list, \c #kSPRuntimeSuiteList. */ +typedef struct SPSuiteList *SPSuiteListRef; +/** An iterator object for examining a suite list. + See \c #SPSuitesSuite::NewSuiteListIterator(). */ +typedef struct SPSuiteListIterator *SPSuiteListIteratorRef; + + +/******************************************************************************* + ** + ** Suite + ** + **/ + +/** @ingroup Suites + This suite allows you to create, manage, and access PICA function suites. + + A suite associates a name and version number with a pointer to an array of + function pointers. The functions generally haves some common purpose, such as + accessing a data type, and are used by plug-ins to interact with PICA, with + the application, and with each other. + + In order to use a function in a suite, you must first \e acquire it. + This suite provides the low-level function \c #AcquireSuite(), + but a plug-in more typically uses the \c #SPBasicSuite, which is provided + with every message to a plug-in. + + PICA creates a global suite list at application startup, which contains + references to every suite added by PICA, the application, or other plug-ins. + You can use this suite to create and manage additional suite lists. + + \li Acquire this suite using \c #SPBasicSuite::AcquireSuite() with the constants + \c #kSPSuitesSuite and \c #kSPSuitesSuiteVersion. + */ +typedef struct SPSuitesSuite { + + /** Creates a new suite list. You can also access PICA's global suite list, + using \c #SPRuntimeSuite::GetRuntimeSuiteList(). + @param stringPool The string pool in which to keep suite names. + @param plugins A set of plug-in objects. + @param suiteList [out] A buffer in which to return the new list object. + */ + SPAPI SPErr (*AllocateSuiteList)( SPStringPoolRef stringPool, SPPluginListRef plugins, + SPSuiteListRef *suiteList ); + + /** Frees a list of suites allocated with \c #AllocateSuiteList(), and + also frees any entries in the list. Do not free the global list (\c #kSPRuntimeSuiteList). + @param suiteList The suite list object. + */ + SPAPI SPErr (*FreeSuiteList)( SPSuiteListRef suiteList ); + + /** Creates a new plug-in function suite and adds it to a suite list. + Identifying constants for the suite name and version must be made + available in a public header file. + @param suiteList The suite list object, or \c NULL to use the + global list. + @param host The plug-in object providing the suite. + @param name The unique name of the suite. + @param apiVersion The public version number of the suite. + @param internalVersion The internal version number of the suite. + @param suiteProcs A pointer to a structure containing the function pointers + for the suite. + @param suite [out] A buffer in which to return the new suite object. + */ + SPAPI SPErr (*AddSuite)( SPSuiteListRef suiteList, SPPluginRef host, const char *name, + ai::int32 apiVersion, ai::int32 internalVersion, const void *suiteProcs, SPSuiteRef *suite ); + + /** Acquires a function suite from a suite list. Loads the suite if necessary, + and increments its reference count. This function differs from + \c #SPBasicSuite::AcquireSuite() in that you can specify a suite list + and internal version number. + @param suiteList The suite list object, or \c NULL to use the + global list. + @param name The suite name. + @param version The public suite version number. + @param internalVersion The internal suite version number. + @param suiteProcs [out] A buffer in which to return a pointer to the + suite function pointer array. + */ + SPAPI SPErr (*AcquireSuite)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, + ai::int32 internalVersion, const void **suiteProcs ); + + /** Decrements the reference count of a suite in a suite list and unloads it when the + reference count reaches 0. + @param suiteList The suite list object, or \c NULL to use the + global list. + @param name The suite name. + @param version The public suite version number. + @param internalVersion The internal suite version number. + */ + SPAPI SPErr (*ReleaseSuite)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, + ai::int32 internalVersion ); + + /** Retrieves a suite from a suite list. + @param suiteList The suite list object, or \c NULL to use the + global list. + @param name The suite name. + @param version The public suite version number. + @param internalVersion The internal suite version number. + @param suiteProcs [out] A buffer in which to return the suite object, or + \c NULL if no matching suite is found in the list. + */ + SPAPI SPErr (*FindSuite)( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, + ai::int32 internalVersion, SPSuiteRef *suite ); + + /** Creates an iterator object with which to traverse a suite list. + The iterator is initially set to the first suite in the list. + @param suiteList The suite list object, or \c NULL to use the + global list. + @param iter [out] A buffer in which to return the new iterator object. + @see \c #NextSuite(), \c #DeleteSuiteListIterator() + */ + SPAPI SPErr (*NewSuiteListIterator)( SPSuiteListRef suiteList, SPSuiteListIteratorRef *iter ); + /** Retrieves the current suite and advances a suite-list iterator to the next suite in the list. + @param iter The suite-list iterator object. + @param suite [out] A buffer in which to return the current suite object, \c NULL + if the end of the list has been reached. + @see \c #NewSuiteListIterator(), + */ + SPAPI SPErr (*NextSuite)( SPSuiteListIteratorRef iter, SPSuiteRef *suite ); + /** Frees a suite-list iterator that is no longer needed. + @param iter The suite-list iterator object. + @see \c #NewSuiteListIterator(), + */ + SPAPI SPErr (*DeleteSuiteListIterator)( SPSuiteListIteratorRef iter ); + + /** Retrieves the plug-in that provides a suite. + @param suite The suite object. + @param plugin [out] A buffer in which to return the plug-in object. + */ + SPAPI SPErr (*GetSuiteHost)( SPSuiteRef suite, SPPluginRef *plugin ); + /** Retrieves the unique name of a suite. + @param suite The suite object. + @param name [out] A buffer in which to return the name string. + */ + SPAPI SPErr (*GetSuiteName)( SPSuiteRef suite, const char **name ); + /** Retrieves the public version number of a suite. + @param suite The suite object. + @param version [out] A buffer in which to return the public version number. + */ + SPAPI SPErr (*GetSuiteAPIVersion)( SPSuiteRef suite, ai::int32 *version ); + /** Retrieves the internal version number of a suite. + @param suite The suite object. + @param version [out] A buffer in which to return the internal version number. + */ + SPAPI SPErr (*GetSuiteInternalVersion)( SPSuiteRef suite, ai::int32 *version ); + /** Retrieves the function pointer array of a suite. + @param suite The suite object. + @param suiteProcs [out] A buffer in which to return a pointer + to the function pointer array. + */ + SPAPI SPErr (*GetSuiteProcs)( SPSuiteRef suite, const void **suiteProcs ); + /** Retrieves the current reference count of a suite. + @param suite The suite object. + @param count [out] A buffer in which to return the reference count. + */ + SPAPI SPErr (*GetSuiteAcquireCount)( SPSuiteRef suite, ai::int32 *count ); + +} SPSuitesSuite; + + +/** Internal */ +SPAPI SPErr SPAllocateSuiteList( SPStringPoolRef stringPool, SPPluginListRef plugins, + SPSuiteListRef *suiteList ); + +/** Internal */ +SPAPI SPErr SPFreeSuiteList( SPSuiteListRef suiteList ); + +/** Internal */ +SPAPI SPErr SPAddSuite( SPSuiteListRef suiteList, SPPluginRef host, const char *name, + ai::int32 apiVersion, ai::int32 internalVersion, const void *suiteProcs, SPSuiteRef *suite ); + +/** Internal */ +SPAPI SPErr SPRemoveSuite( SPSuiteListRef suiteList, SPSuiteRef suite); + +/** Internal */ +SPAPI SPErr SPRemoveSuiteEx( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, ai::int32 internalVersion); + + +/** Internal */ +SPAPI SPErr SPAcquireSuite( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, + ai::int32 internalVersion, const void **suiteProcs ); + +/** Internal */ +SPAPI SPErr SPReleaseSuite( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, + ai::int32 internalVersion ); + +/** Internal */ +SPAPI SPErr SPFindSuite( SPSuiteListRef suiteList, const char *name, ai::int32 apiVersion, + ai::int32 internalVersion, SPSuiteRef *suite ); + +/** Internal */ +SPAPI SPErr SPNewSuiteListIterator( SPSuiteListRef suiteList, SPSuiteListIteratorRef *iter ); +/** Internal */ +SPAPI SPErr SPNextSuite( SPSuiteListIteratorRef iter, SPSuiteRef *suite ); +/** Internal */ +SPAPI SPErr SPDeleteSuiteListIterator( SPSuiteListIteratorRef iter ); + +/** Internal */ +SPAPI SPErr SPGetSuiteHost( SPSuiteRef suite, SPPluginRef *plugin ); +/** Internal */ +SPAPI SPErr SPGetSuiteName( SPSuiteRef suite, const char **name ); +/** Internal */ +SPAPI SPErr SPGetSuiteAPIVersion( SPSuiteRef suite, ai::int32 *version ); +/** Internal */ +SPAPI SPErr SPGetSuiteInternalVersion( SPSuiteRef suite, ai::int32 *version ); +/** Internal */ +SPAPI SPErr SPGetSuiteProcs( SPSuiteRef suite, const void **suiteProcs ); +/** Internal */ +SPAPI SPErr SPGetSuiteAcquireCount( SPSuiteRef suite, ai::int32 *count ); + + +/******************************************************************************* + ** + ** Errors + ** + **/ + +#include "SPErrorCodes.h" + +#ifdef __cplusplus +} +#endif + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPTypes.h b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPTypes.h index 386b689..c1ea2fb 100644 --- a/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPTypes.h +++ b/BloksAIPlugin/Vendor/illustratorapi/pica_sp/SPTypes.h @@ -1,169 +1,177 @@ -/***********************************************************************/ -/* */ -/* SPTypes.h */ -/* */ -/* ADOBE SYSTEMS INCORPORATED */ -/* Copyright 1995-2007 Adobe Systems Incorporated. */ -/* All Rights Reserved. */ -/* */ -/* NOTICE: Adobe permits you to use, modify, and distribute this file */ -/* in accordance with the terms of the Adobe license agreement */ -/* accompanying it. If you have received this file from a source other */ -/* than Adobe, then your use, modification, or distribution of it */ -/* requires the prior written permission of Adobe. */ -/* */ -/* Patents Pending */ -/* */ -/* */ -/***********************************************************************/ - - -/** The basic declarations used by the PICA - plug-in management suites. **/ - - -#ifndef __SPTypes__ -#define __SPTypes__ - - -/******************************************************************************* - ** - ** Imports - ** - **/ - -#include "SPConfig.h" -#include "AIBasicTypes.h" - -#include "SPHeaderBegin.h" - -/* - * You can replace SPTypes.h with your own. Define OTHER_SP_TYPES_H on the - * command line or in SPConfig.h to be the name of the replacement file. - * - * Example: - * - * #define OTHER_SP_TYPES_H "MySPTypes.h" - * #include "SPBasic.h" // for example - * - * Sweet Pea depends on TRUE, FALSE, SPErr, etc. Your replacement must - * define them. - */ - -#ifdef OTHER_SP_TYPES_H -#include OTHER_SP_TYPES_H -#else - - -/******************************************************************************* - ** - ** Constants - ** - **/ - -#ifdef __cplusplus - #undef TRUE - #define TRUE true - - #undef FALSE - #define FALSE false -#else - #ifndef TRUE - #define TRUE 1 - #endif - - #ifndef FALSE - #define FALSE 0 - #endif -#endif - -#ifndef NULL - -#ifdef MAC_ENV -#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C)) -#define NULL ((void *) 0) -#else -#define NULL 0 -#endif -#endif - -#ifdef WIN_ENV -#ifdef __cplusplus -#define NULL 0 -#else -#define NULL ((void *)0) -#endif -#endif - -#endif - - -/* - * SPAPI is placed in front of procedure declarations in the API. On the Mac - * it used to be 'pascal', which forced consistent calling conventions across different - * compilers. No longer needed. On Windows it's nothing. - * - * Example: - * - * SPAPI void *SPAllocateBlock( long size, const char *debug, SPErr *error ); - * - */ - -#ifdef MAC_ENV -#define SPAPI -#endif - -#ifdef WIN_ENV -#define SPAPI -#endif - - -#ifdef MAC_ENV - -/** On Mac OS, \c SPBoolean is \c Boolean. */ -typedef unsigned char SPBoolean; - -#endif - - -#ifdef WIN_ENV - -/** On Windows, \c SPBoolean is \c BOOL. */ -typedef int SPBoolean; - -#endif - -typedef signed long SPInt32; - -/******************************************************************************* - ** - ** Error Handling - ** - **/ - -/** PICA error codes are C strings, except for the no-error code, which - is \c NULL (and \c #kSPOutOfMemoryError). Compare errors first with - \c #kSPNoError, to text for success. On failure, compare with - predefined error constants in \c SPErrorCodes.h. - - For example: -@code - SPErr error = kSPNoError; - block = SPAllocateBlock( size, debug, &error ); - if ( error != kSPNoError ) { - if ( strcmp( error, kSPOutOfMemoryError ) == 0 ) - FailOutOfMemory(); - ... - } -@endcode -*/ -typedef ai::int32 SPErr; - - -#include "SPErrorCodes.h" - -#endif /* OTHER_SP_TYPES_H */ - -#include "SPHeaderEnd.h" - -#endif +/***********************************************************************/ +/* */ +/* SPTypes.h */ +/* */ +/* ADOBE SYSTEMS INCORPORATED */ +/* Copyright 1995-2007 Adobe Systems Incorporated. */ +/* All Rights Reserved. */ +/* */ +/* NOTICE: Adobe permits you to use, modify, and distribute this file */ +/* in accordance with the terms of the Adobe license agreement */ +/* accompanying it. If you have received this file from a source other */ +/* than Adobe, then your use, modification, or distribution of it */ +/* requires the prior written permission of Adobe. */ +/* */ +/* Patents Pending */ +/* */ +/* */ +/***********************************************************************/ + + +/** The basic declarations used by the PICA + plug-in management suites. **/ + + +#ifndef __SPTypes__ +#define __SPTypes__ + + +/******************************************************************************* + ** + ** Imports + ** + **/ + +#include "SPConfig.h" +#include "AIBasicTypes.h" + +#include "SPHeaderBegin.h" + +/* + * You can replace SPTypes.h with your own. Define OTHER_SP_TYPES_H on the + * command line or in SPConfig.h to be the name of the replacement file. + * + * Example: + * + * #define OTHER_SP_TYPES_H "MySPTypes.h" + * #include "SPBasic.h" // for example + * + * Sweet Pea depends on TRUE, FALSE, SPErr, etc. Your replacement must + * define them. + */ + +#ifdef OTHER_SP_TYPES_H +#include OTHER_SP_TYPES_H +#else + + +/******************************************************************************* + ** + ** Constants + ** + **/ + +#ifdef __cplusplus + #undef TRUE + #define TRUE true + + #undef FALSE + #define FALSE false +#else + #ifndef TRUE + #define TRUE 1 + #endif + + #ifndef FALSE + #define FALSE 0 + #endif +#endif + +#ifndef NULL + +#ifdef MAC_ENV +#if !defined(__cplusplus) && (defined(__SC__) || defined(THINK_C)) +#define NULL ((void *) 0) +#else +#define NULL 0 +#endif +#endif + +#ifdef WIN_ENV +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +#endif + + +/* + * SPAPI is placed in front of procedure declarations in the API. On the Mac + * it used to be 'pascal', which forced consistent calling conventions across different + * compilers. No longer needed. On Windows it's nothing. + * + * Example: + * + * SPAPI void *SPAllocateBlock( long size, const char *debug, SPErr *error ); + * + */ + +#ifdef MAC_ENV +#define SPAPI +#endif + +#ifdef LINUX_ENV +#define SPAPI +#endif + +#ifdef WIN_ENV +#define SPAPI +#endif + + +#ifdef MAC_ENV + +/** On Mac OS, \c SPBoolean is \c Boolean. */ +typedef unsigned char SPBoolean; + +#endif + + +#ifdef WIN_ENV + +/** On Windows, \c SPBoolean is \c BOOL. */ +typedef int SPBoolean; + +#endif + +#ifdef LINUX_ENV +typedef unsigned char SPBoolean; +#endif + +typedef signed long SPInt32; + +/******************************************************************************* + ** + ** Error Handling + ** + **/ + +/** PICA error codes are C strings, except for the no-error code, which + is \c NULL (and \c #kSPOutOfMemoryError). Compare errors first with + \c #kSPNoError, to text for success. On failure, compare with + predefined error constants in \c SPErrorCodes.h. + + For example: +@code + SPErr error = kSPNoError; + block = SPAllocateBlock( size, debug, &error ); + if ( error != kSPNoError ) { + if ( strcmp( error, kSPOutOfMemoryError ) == 0 ) + FailOutOfMemory(); + ... + } +@endcode +*/ +typedef ai::int32 SPErr; + + +#include "SPErrorCodes.h" + +#endif /* OTHER_SP_TYPES_H */ + +#include "SPHeaderEnd.h" + +#endif diff --git a/BloksAIPlugin/Vendor/tools/pipl/create_pipl.py b/BloksAIPlugin/Vendor/tools/pipl/create_pipl.py new file mode 100644 index 0000000..69197b3 --- /dev/null +++ b/BloksAIPlugin/Vendor/tools/pipl/create_pipl.py @@ -0,0 +1,60 @@ +# +# Copyright (c) 2018 Adobe Systems, Inc. +# All rights reserved. +# +# FILENAME: create_pipl.py +# +# FUNCTION: create pipl file for given plugin pipl info. +# +# SYNTAX: python create_pipl.py -input '[{"name" : "plugin_name1", "entry_point" : "entry_point1"}, {"name" : "plugin_name2", "entry_point" : "entry_point2"}, ...] -output "pipl_name.pipl" +# +# PARAMETERS: N/A +# +# EXAMPLE: see Help for more detailed info +# +# AUTHOR : amisriva +# +################################################################################## + +import sys +import os +import json +import argparse + +from pipl_gen import pipl +from pipl_gen import generate_multi_pipl_bin + +def parse_argument(): + parser = argparse.ArgumentParser(description='Creates a PIPL file from given pipl info at given path') + parser.add_argument('-input', help='Input json list of pipl dictionaries, with keys having name and entry_point', nargs = '?', default = [], dest = 'input_list') + parser.add_argument('-output', help='file path of output pipl', dest = "output_file", nargs = 1) + return parser.parse_args() + +def main(args): + args = parse_argument() + pipl_obj_list = [] + if len(args.input_list): + list_pipl = json.loads(args.input_list) + for pipl_data in list_pipl: + obj = pipl() + if 'name' in pipl_data and len(pipl_data['name']): + obj.add_plugin_name(str(pipl_data['name'])) + if 'entry_point' in pipl_data and len(pipl_data['entry_point']): + obj.add_plugin_entry(str(pipl_data['entry_point'])) + if 'stsp' in pipl_data and pipl_data['stsp'] is True: + obj.add_plugin_stsp(1) + + pipl_obj_list += [obj] + else: + obj = pipl() + pipl_obj_list += [obj] + generate_multi_pipl_bin(pipl_obj_list, "plugin.pipl") + + +if __name__ == "__main__": + main(sys.argv[1:]) + + + + + \ No newline at end of file diff --git a/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.py b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.py new file mode 100644 index 0000000..a53b783 --- /dev/null +++ b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.py @@ -0,0 +1,19 @@ +# +# Copyright (c) 2018 Adobe Systems, Inc. +# All rights reserved. +# +# FILENAME: pipl_gen.py +# +# FUNCTION: pipl generator +# +# SYNTAX: N/A +# +# PARAMETERS: N/A +# +# EXAMPLE: N/A +# +# AUTHOR : amisriva +# +################################################################################## +from .pipl_gen import pipl +from .pipl_gen import generate_multi_pipl_bin diff --git a/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.pyc b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__init__.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d400a2781cc7004bd90af066d9165d0af7ffa9f0 GIT binary patch literal 272 zcmX|+u?oU46h&WJ2T=rZaqZyHNu;BQsB{sSIR7_rx~2Z@L5!zt{bQ8AQ|#1U4i(q9@Q z-DN53)Jah^+9^SgB2(od^vU1-`32gJIK#2cqAC1~-QyU~`MFL@dy_TaX!EdqotsPs xTdf=Gu))+pG>f9(6z{k*Mq5r@tx!4_LY2x1F|D3$?V>Pwqvdjh;g&u=WFH8SJU{>d literal 0 HcmV?d00001 diff --git a/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/__init__.cpython-310.pyc b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9a4555420629359605c1d058e3c5bf3118233c0d GIT binary patch literal 252 zcmd1j<>g`kf_vfINu7)g439w^WWWUEH~?|643J1+NMX!j$YqRTWCXF9fNZ8HCLo(R zm_d`}B~U+uCgUxZg3N*(AT6GrnwMIXSdto_Tbfgn84nVUPs+^m(`3HI0pW>Oi6xzPH_y#NH7r(G&d$bJ~J<~BtBlRpz;=nO>TZlX-=vg$c4o$K!Qh5fDr(0 CX+Ycn literal 0 HcmV?d00001 diff --git a/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/pipl_gen.cpython-310.pyc b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/__pycache__/pipl_gen.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ef8519c22498dc873e6c8d04a78d3a0d4d62c54 GIT binary patch literal 4541 zcmai1&u<&Y72cWMC6^RM$@EVpJ+MI&XB$UR6*X~F)o~I9Mw*mOVIu(+3KkS+C9k~X zQnO3RQb{0<{73Xi9ST&}{tZ3$FPKAsq9>mX^k5Wlzc)itA}zNhW_D)w&CGlAzW2S^ zbbh{U;rHXWb6fXbx2%6r=lst`=PpWigi2U~C01abEMU6N1FoNTVC$z7ID!lNi50lQ z5iXvEdzL7O;uA|0k9klOo+x3|6J;@nXGv7VJf3Ay6$^OIiA8Y<&x)vt%XrQUcHi=^ zJjMQ2qs8bk`Z;(OP(DM+9-zvtzIDuoOt2F+U^(xzV>aM@F8CuyUe0Y{AG05raE8!J z6rNbQD~f%719LV|PFSB^w=l0TEcR&yyKiG>uMzN-$4_aqqc``PNiV8r57Sr7`JFq!@qJ@4YmaLKxne7gQ|pu~ zzPzGXEXgumJ^yOsqs<4h*~zvex%p|5KFT&f5h-^5B1w8#E}MBO>#HlPtM&UEUvB1U znq-^ZxSQxI+=)7q#&Y*imDVv5J?_doKP838F8+PZI`Z4iM^U&Ik_q9%=y8aZGViH}IliZCNU1_Xa$RL7QAd?Nf82_?d7O5Xvzx{pvsn4G?t6|I`1!fGBa~OMv#w)0fZfP@(H^Mf62iHbnx*e`v;2YnT zi!`%F)n!yT=<;YTz#Ek5WKBP)P8M4WF&r#z!%NBNZ3yWZz0}exHF+C5WdsY4Ral)) zdkLKu%G8gJ<}OP1DXPdK1_668!4c=SSkR};z#j{mFBlkPL9+!53L~~Cj@ZHzRmA3^ zatP>Cr|n{C+UK+JKDo8ahCH`5Cs5m==-%W5KCp8a?4W&p%mFvaw<=qT0XVNb#o@P*_nLkv;=2oT~UKno2a8szV(z@_HzXZ?cB z;!d20;TqXYu~A`*tO{3D*wH+l(DGP95`nhpe8xX&)0ye>`YRf_HDo7X`kp1<1>UV) z@aGbu0L59ia+_EcTZ^ksf5qK8QPkbMW}~2a3l+6%53m-!O!oA9hEqEr_xIxH34RIJA_j z-z&S_Yz0m`et*?3D383noys;=In3a7`7;uAXc2jdngx2>%uj9k7P@koDjlyA&Nc+K z*c4)fmN4q%^6(BMGYZWLtHDDx_8O~k^E|q${WLq{m9Bb5A*2r!uEJq*xCTcL*Dy+R zaLtXJBh}faKXwh=V&q-p62H(05JR1|G2j-N@-9_m)TyIQm#Z{Dmdp34B9zTSaN(Td zgw)?b<{1$}Rohu(M^|R;Be7SSCqKYkt=#=Q``Rc+&^=R5en{Q_r%RS+-ET)Oh}pBQQ36NS2NR7~ zZ(>Ewzhz`R9roAtalb4%Wi44w@vp6=yg?aohhPNTi1|)g!)NOHWEq_?%(h7BJ~sjI zF=oyxd1*37D+%dcNM*F+B0IWvfp!qVW}2YB?;zH!hH9>F zw5@L=6;Xi0T=^Bf`h==8SZmV=>VHNV-M*^4#;Z&Rz?9m=X%n^A(K+KaaF|gQ$Qdb5 zI4^?ffH4>VmG>4Q<&K#S$}4`b34P4HBI( zXai$^LDBb^GV-IRJtJv+>Y_)Um{9dTIx#-pbcn7^LUd^oeir3J6QalZg1>Ig=?y&!Vb zjR`rO%W9OW|ABRMf}qbv!xnVJ@&U&Es!rsRe4(6H+C7w4&@{f*@vE7O@{HyVlZptt u=A^X^w9q*(>i{6{C~w_lx;x}J?Qidr`G!SZ@G8|g?_=*RZyx_z#rrRFb<|M+ literal 0 HcmV?d00001 diff --git a/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.py b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.py new file mode 100644 index 0000000..11ca7ba --- /dev/null +++ b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.py @@ -0,0 +1,216 @@ +# +# Copyright (c) 2018 Adobe Systems, Inc. +# All rights reserved. +# +# FILENAME: pipl_gen.py +# +# FUNCTION: pipl generator +# +# SYNTAX: N/A +# +# PARAMETERS: N/A +# +# EXAMPLE: N/A +# +# AUTHOR : amisriva +# +################################################################################## +import json +import os +import copy +import binascii +import platform + + +############################################ +#Converts any number to a 4 byte hex string +############################################ +def make_4_byte_hex_string(number_string): + hex_number = hex(number_string).lstrip("0x") + len_hex = len(hex_number) + if(len_hex > 4): + raise Exception("value shoult not be more than 4 bytes") + hex_number = "".join('0' for i in range(8 - len_hex)) + hex_number + hexed_string = binascii.a2b_hex(hex_number) + return hexed_string + +############################################## +#Converts any string to a multiple of 4 bytes +############################################## +def make_string_multiple_of_4(string_val): + len_string = len(string_val) + multiple_4_len = (len_string + 3) & ~3 + final_string_val = string_val + "".join('\0' for i in range(multiple_4_len - len_string)) + return final_string_val + + +################################################# +#Supports adding field to pipl property +#Supports dumping a pipl object to a bin or json +################################################# +class pipl: + def __init__(self): + abs_path = os.path.abspath(__file__) + (dir_path, file_name) = os.path.split(abs_path) + fileO = open(dir_path + '/template_plugin.json', 'r') + self.data = json.load(fileO) + fileO.close() + +############################################## +#Add entry point function +############################################## + def add_plugin_entry(self, value, id = 0): + if platform.system() is 'Windows': + self.data['win']['wx86']['id'] = id + if type(value) is not type("string"): + raise Exception('value type should be {0}'.format(type("string"))) + self.data['win']['wx86']['value'] = value + '\0\0\0\0' + else: + self.data['mac']['mi32']['id'] = id + if type(value) is not type("string"): + raise Exception('value type should be {0}'.format(type("string"))) + self.data['mac']['mi32']['value'] = value + '\0\0\0\0' + +############################################## +#Add Plugin name +############################################## + def add_plugin_name(self, value, id = 0): + self.data['pinm']['id'] = id + if type(value) is not type("string"): + raise Exception('value type should be {0}'.format(type("string"))) + self.data['pinm']['value'] = value + +############################################## +#Add Super top secret property +############################################## + def add_plugin_stsp(self, value, id = 0): + self.data['StsP']['id'] = id + if type(value) is not type(0): + raise Exception('value type should be {0}'.format(type(0))) + self.data['StsP']['value'] = value + + + +############################################## +#Dump Pipl object to json +############################################## + def generate_pipl_json(self, pipl_path): + f_out_json = open(pipl_path, 'w') + output_data = clean_pipl_json(self) + json.dump(output_data, f_out_json) + f_out_json.close() + +############################################## +#Dump Pipl object to bin +############################################## + def generate_pipl_bin(self, pipl_path): + generate_multi_pipl_bin([self], pipl_path) + + +################################################################ +#Dump Pipl from dict object recursively +################################################################ + +def generate_pipl_bin_recursively_from_dict(pipl_dict, file_obj): + for key in pipl_dict: + if key == 'win': + if platform.system() is 'Windows': + generate_pipl_bin_recursively_from_dict(pipl_dict['win'], file_obj) + continue + elif key == 'mac': + if platform.system() is not 'Windows': + generate_pipl_bin_recursively_from_dict(pipl_dict['mac'], file_obj) + continue + else: + #write vendor ID + file_obj.write(pipl_dict[key]['vendor']) + #write property key + file_obj.write(key) + #write property ID + prop_id = 0 + if 'id' in pipl_dict[key]: + prop_id = pipl_dict[key]['id'] + file_obj.write(make_4_byte_hex_string(prop_id)) + + #determine property value + out_prop_value = "" + if type(pipl_dict[key]['value']) == type(0): + out_prop_value = make_4_byte_hex_string(pipl_dict[key]['value']) + else: + out_prop_value = make_string_multiple_of_4(pipl_dict[key]['value']) + + + #write property length + file_obj.write(make_4_byte_hex_string(len(out_prop_value))) + #write property value + file_obj.write(out_prop_value) + + +############################################## +#Dump given Pipl object to file_obj as binary +############################################## +def generate_pipl_bin(pipl_obj, file_obj): + output_data = clean_pipl_json(pipl_obj) + #write version + file_obj.write(make_4_byte_hex_string(0)) + #write count + file_obj.write(make_4_byte_hex_string(len(output_data))) + generate_pipl_bin_recursively_from_dict(output_data, file_obj) + + + +############################################## +#Dump given Pipl objects to file_obj as bin +############################################## +def generate_multi_pipl_bin(pipl_obj_list, pipl_path): + f_out_bin = open(pipl_path, 'wb') + #write pipl count + f_out_bin.write(make_4_byte_hex_string(len(pipl_obj_list))) + #write pipl objects in list + for pipl_obj in pipl_obj_list: + generate_pipl_bin(pipl_obj, f_out_bin) + f_out_bin.close() + + +################################################## +#clean given Pipl object by removing unused props +################################################## +def clean_pipl_json_recursively(pipl_dict): + output_data = {} + for key in pipl_dict: + if key == 'win': + if platform.system() is 'Windows': + output_data['win'] = clean_pipl_json_recursively(pipl_dict['win']) + continue + elif key == 'mac': + if platform.system() is not 'Windows': + output_data['mac'] = clean_pipl_json_recursively(pipl_dict['mac']) + continue + elif 'value' in pipl_dict[key]: + output_data[key] = pipl_dict[key] + return output_data + +################################################## +#clean given Pipl object by removing unused props +################################################## +def clean_pipl_json(pipl_obj): + return clean_pipl_json_recursively(pipl_obj.data) + + + +############################################## +#Dump given Pipl objects to file_obj as json +############################################## +def generate_multi_pipl_json(pipl_obj_list, pipl_path): + f_out_json = open(file_name, 'w') + list_pipl = [] + for pipl_data in pipl_obj: + output_data = clean_pipl_json(pipl_data) + list_pipl += [output_data] + json.dump(list_pipl, f_out_json) + f_out_json.close() + + + + + diff --git a/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.pyc b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/pipl_gen.pyc new file mode 100644 index 0000000000000000000000000000000000000000..49c22f6d916ac7b35a5d60da604313e031d6fbca GIT binary patch literal 6499 zcmdT|-EJGl6`oyElqiXjE!mOP7zvXivHEALirciQ>NvLC)M?8!;~;7U35z9nC9kyH zUGI!63AJvj-1H3!6ury~^cjL)^%)BE8G2iw{k}6xijsi<0n7#=Im4OR`90@5-#N3j zf48RpxiQo2sp?b1|6L^W7i1BBo=TP49F{$`=?&U_wdoJaHMLnAltbFvlWiYpA`+!GtyStcGn(V(AW+QEKHV;ik-+$exDjLEJWv z^Mlm3v)s13al43aMX(no8+0Lp!V`4gRqst4tHbA3A#xZnqHDvN;O>V2AFJ_eJ!=0 z9rU|#8F1cg*G{7aj|0~#Bd`uf*je`|j;g+6l!|>BYxTqZIJg~9sa(HW^*WxImyjv% zsyB=8oOc6B6wWhINP^x6C=AgHoda!9_aZ=f_XMy7JbeMR*cA~ipdNwe;zX$J^Pt3Dhy#&g*vZh_FKb~)Tmz7yQ$!e$DY0y16#GQ=imeLXhv zL-V?aWIjL^gIk3TK0^UahB62j>@3_s&P5pGxx|2#fz7kvzE0pbh zuCR>^5CnDZ`84BG$DXdGUQynbuYgBj4OUAsB}RR9il+L28tcNAN(EEu8922`-uEH} z?&4A%;kH{g?iXnYTPf0m-6XrYXTS)AUb#%23Yq4{$s@Fn9T{{@!7?Ql1Um_o8VGrq zB2BFH%?s$5Se5x$Nb@j~mMFBL^zNm(iI;hFX*Y4YBU6T56Ab5%lG0TOI9VzS`>~8? z?W1vG#+@(85*q}!vAm%~lsE5P^A?aNto0~MCZ6#=lKB@hr@mA1;QLdmJQkjSG{o&K z0U=93#u}9CJR%AJ2o$~FROL410hsJfh-;K~Ji^a8NK(?IS_Bu3PB*32vS?(PCYG4~ zvSq&bO3MtU!!iP)8Jw~sXxK=yC_gmfTn^zyD2T(OpZr*$lSJZwoY9$Uc;vjXJuWJj z9MK*BVdcbd96zF4=_OP4!=6mpPu^Z#CQS=Qh}oUI?7P{I4PdNa=R?lI$u*THPuVTB zj=H{$Mtzgn_mPbgJLI=8iYl`TU=8K*9kiKwWW>-_py*Zay6^sJ};&5__W!w@7+T|jmDGL2_ zWaB*I<V-V0d5hhR{LD0{m14a#+yVE~n_6{=wNZ)04582t) zrS!sYQJPXDgBe~@8eVgHc5b#gJJW26QW%*q-Di*ALHI`>dr->y_Ct?X0SUVHeN{df zard~>!rf2GUDwez`5Fp*GO65;<7$fIPR@@5kq^fqK6q{%!a*31I0Xg|OJH~po!AI- zLIn{7jEwhX*J;0@%D)dPXkNlo+^^jjm=CVZ&P#X*Cm1#&lB}kmlIhVZp0MaRDiJ zB(ul>t|hT&-rbX+WIsNZ*rzD-B0!A83l2F(>Jq!0VfV$u_7_;KL^70^@><}LdGCtX z82s0+`Ypc!Zn^9&)EZvfTlBBgmwW*=S%%ChpniygV;bm&n3fkd3??Mp94Jg)-Qe5~ zXHJ=d1{pzgixx>@9nqDe@1LQrd0ld1rf@a4E>VJu;>e1SspdxXdwhoEvKKElQp%r^ z1~)x_!C!LpOMwi9@(C&w3L+^nU1#gKjX^FHf_Sq^2uH85zP`O6H!(3O3W@f9OKqTt z82!(z`8y8P4m zp`gp*P|#&Hw5HC6f+QpJrcNHSe> zjv<)!hsegMmya<&MQ*-@Oo0F#6)aX%!2e6QXo#MuD`HO!pKtJ-;RDwY-5|DL2hCX} zx|dL6?BF6ze1Rk{nv^q0-c2Za*=+Sbgjbt^LGA)$HFb1@*je9xO}rOOQ{2i4+!)Fe zjGo>>uP4{l23!{`kUXiAyh3(%`4*~jcr8T6m{YGYdxQPBL;Vpm23eX{ zJ26U{sDxr?aVP`Lag&?n)q3dvMgl^{%m2VLLl>p+%F}`5GJxTb$#w~-HD8fIP(XNI z9BW3(4*B9F#XmA$5(<~_Op_KIT0}x5&NH-2>4lTHxQ#UzKHizff&zWM(3NkaIoq6B Oc(3_ZvxV<`bLxL;X-Fsl literal 0 HcmV?d00001 diff --git a/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/template_plugin.json b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/template_plugin.json new file mode 100644 index 0000000..c433057 --- /dev/null +++ b/BloksAIPlugin/Vendor/tools/pipl/pipl_gen/template_plugin.json @@ -0,0 +1,34 @@ +{ + "kind" : { + "vendor": "ADBE", + "value":"SPEA", + "comment":"Only change vendor property, do not change value property" + }, + "ivrs" : { + "vendor": "ADBE", + "value": 2, + "comment":"Only change vendor property, do not change value property" + }, + "mac" : { + "mi32" : { + "vendor": "ADBE", + "value": "", + "comment": "MacOnly, Change Vendor, set value to your plugin's entry point name, or pass name in API" + } + }, + "win" : { + "wx86" : { + "vendor": "ADBE", + "value": "", + "comment": "WinOnly, Change Vendor, set value to your plugin's entry point name, or pass name in API" + } + }, + "pinm" : { + "vendor": "ADBE", + "value":"Sample Plugin", + "comment":"Change Vendor, change Sample Plugin to your plugin name, or pass name in API" + }, + "StsP" : { + "vendor": "ADBE" + } +} diff --git a/BloksAIPlugin/x64/Release/BloksAIPlugin.aip b/BloksAIPlugin/x64/Release/BloksAIPlugin.aip index 682060d7b07c23db725bea0ef85a473ab44847ba..7569d8e5958124cb9ba8c9a656c967e1e2c26a84 100644 GIT binary patch literal 29696 zcmeHw3w%`7wfCN6CJc`-17m)vTvCk1QlZ850reE+rgIhm6L z?frh=y|?{-x97(`Ywxw!UTf{OUu*AuG8Es@%2F9)W`sn7u}(mGoc#UiFRO{Msk4ty zWj~tu;+#&C=fyc?wRIsW5cKZ|RyIggm5q)5u(aJL1tX18U87XEzEo=PSNj&Fr%%e# zSkGFRKX0?Abf+F}TiUg=1nHZXZrbJL(7WqS4ma*v&tb`~ZGfKnB^DO<# zW7lmQmhQTp!^d_K-0XRV!`E-PjpIw|s%lBr*qV8Z7_0t#8k_Zn)!X&FAvRZXfjzJs(9Yw{sJ@7&FqXzqNyxf@Afw_*VG>A1AsviQ3(Sz8F)zwE1B~@j;Wo4h z__J2VzNqmdG&{-|DR8ucF_3=Z6DS8SuBb-h1wUhYOvy!IUsD)3>rHss5vcA)xkyTk zRV)ftSB5JYE13@jc(QDS6$pmM3DJuL8SA$qqZxsCRU;T4Cu3cU0)mj&u@#wQ&{_i# zqE6x$3QUZT-&o3+CqD0W4`VG|ww6O^5|{Ea3iwgL_Jnz= zoH%iF;iQDEB@0<{^nx`qC@XucpoqH|dolp5dM7%Xtn@=k+rIN?DmiXxUk$#or>J|o zIvEv>rJ~G2a0OZ>M0_puzSoMR9m#~_VYIpHNun)`J(UUIQeHu(gqSC8vE9n?*+@~z zo@fqY_{Vyp3ji#LfjAFQPwXnhygc^QW&tV$s0BzkmO_vm+iI7UU&ua#Y>N;s=RR_@EHMPuZ+%3a%BTe^Q* zTvR;g>?^3{au*eUN&RdtSvBI7Ti&qkJ1KZ`p^%uP3sHt4F=2NrXGmB}BK#GQhad1L zmw1$yik0W6fhFZNsN+hMSO+7CM1lxjg`5!NxFKhTkmGXmma7BSHoI_C^F`*N=_W+p zg>=})iTZ&bV$=|@SHh9Gma((5Jj-}nge5NhMUV2FTX|JTu2qKf*OV5|v9;U|4O~jk z;JbfHB&ZvXJWn$=5~m2dfeDj2@2fl=E6ajK3$rpkF;A9Mx{>!&S^1?L=jObiJ`dI& z9W$RzIzFk7(Saq!;afkZb?Kg z`3ZFs4WT?YXa!&8CO+-g#4KOK{N8dtjA8$>y3m1@Ku^4YhW@kAQI31Ea@2d#VxG7{mBWY<__C}Vjln!(U`Ky# z(h5E^QgD?h$a_oN@^g+)7CaZy3a-?LQxmu>k(Enm3_a8gRT5De&{00DO%aD2|B{5X ztgN+q6w4P;-j%TDcFD>Yg`IO>P}k3){713^M7Q@D(z$%w){(v>`V;0q>O&H5l_$wI zFmZSe+3P)6KWV)=#4Tw(=$U((l=B8i>K51l-J*OH_mTdjyspGZ`BG8Zs12_L?_tqFQ%s>^k+~pyl*kl?DxL6JAv?wm0O6cC_q1}N<)lr1S}@nq zR7u05&G+FfyH@GnxiEReZ?_jIsKn1O<0Kqj_&{<`7mb`&InmX;B9%oxke3gK%+Hx` zf(lesOkQ~xt8Z@CXakTuOwskUw1l&yP1?#L6)W$%l_8Jvp{!i^Cz=y5A`-3S7@)VE zfun(WNd4R*>WGo5+&3_u5merHh*0yC%SJg zoQdV5!imc~?0* z_%LzcI^G8+1|4lJ_i&lC1@(9X`h!UEBX;% zo<~Y}2Y<{;240GhZK@IFg?@SG#ET6XGWm!(Qvd)T5+UizTOY-tB(8!BS zh8ny+(%I?2(L@lLq2sa@mE04)JVdf!kW%Q!*FP>TGA&t$)&mf%sF3*}oN1CdQC2)z zPV#F8CktKYp)|FnQ5?2JO!L)%2Z(=7Yt<6{Fg{I_g&7x zdhgymzJEn7gYD2C3{2aJ=}r<9cRYZOw3 z6(!$aCMxviwW30;gdXW>t$jp#k08BL6Y_nH^i||R(90T!uXA+7SgC$0y@HocZw8rR z{OSGmBK97jQfWfwagBNYc;+gRoiTGAzO9kX7*94tWSxTS?L1N0_pT9@{WhVKl^rJ1 zILFaUwGB)$WfWpfGV~u?ODp<3??WnxT$L=TnaF-9$Zpceesi@L z1m7fdauDn%QhI^o0+5nPf67TCxtKGbyaC?SsL5#?(bAl0oSa&T%PPU;JWeTy%Wh3z z2Zk9q`N7FHyBP`NWOtGI-~jPD&kH$@gBQ)e3x!6;$)=6SUKV8E*2vPvleH6ByCD0b zMs{YNFvXV$oixQ!BHbfMKciLRN1QZL59{pIN*@#`twa@SPsCLpP9`6Wi{vVDOG$9v~TOZ|Hb|{IBD0a7T$LFqREWUP%ddsE2VH1=yvI$bt z$hQ611i{-FDKkrpck;auYMDnBbPA_b$t627?1q#bXrS}qT)1cIY=iEn)Z4H(l6$^D zI?#h%@)#zvaw+*M4>eyjS2)#4`xWJ$gfCm9oInSC4(+1+vU6ow@#^K>VcRODaIe{& z=yD}aV3vH>U3DV5VlRt0b5AB5sX2@-|5i4Xh|G%qG>4Q4Um{mMNCy&f>VtU%mY=vU zL-|>ZQ^~O}5KhI`1V$OR>!92c~C&L!?qX|%}OJu@?o#gu)whT#oVh_H9%=jU;;Cyd(nI8SD;E1mQsgysiNg458#?zNVLv%ujH3t3WymB`+FEwdLKTag@x+VH zO*KpL-I`|Hs;5VGnxc&$P2^K*aS4{Lu86r(QH}S zu#z|EvXRDAis#E1KU$m4qV_~%56jn`kfU9^O?OU6IQ||E{0r)rrjd)~x7-WY^51Ru z7u{47i;%?kL}h+d1u2@r-Xnv_icM}gX{`R=qeI{zRImQ$3?+n#_tDskJ8q+{?RX0Q zp&VOd1ydsv&uAw3O!I$YfG`&^CBb%Iak z7(V})HmXub#_@Sv@OeS!^A9L*a0XxcDuPIcDuEP#^8exU_17aC!T*8*}8vptOut$@hQ$?rSN5YF-Am& zODTKViaEgz32tS|%L%*E*K#_twI4-`<@#rE%UCA zU|(-`yQ3?fV_}JynOjGfHyg@(xOYHvJSvMiyrc$bXkyt%Yi!e(Am;{g^&#cH>-s5O znAQ}U^4H*!4Q*j-xsFQEfrstbKU0&))F56o$PK8EIBz=EO)`~d-O7D0VUQ=nm&?m0 zglE9$FOlJXzKt9GB^-{(vBlJEKV@X6?i!p+1y9J!7Cx|%`uGh|07wbng2Q=P*=>g> z2WFYX>=NZRVif}`ew`yYMRw~J%5b}vEqK)(pYm$tS(prH^jEUlt5$9`Z_TnsYxq`8 zUzijHlqs)bdJNwHwO`d_T}ra1Ly!bP(En9B(cwx*rot+pwUXB06nTo;6^#qKkdeJ) zP!}DvLT5dycW|ff2HK9f%{9x`Tf>#MV{6iQH>VTAyxjB9$BA{~>l;wL_^iH~zsbF@3NCh=U&@?GZOi()y4K6#{s?(b^n z`*Z^TG~AY=`LOb)E*ycQW|QT(Y_&~GNjSaa$2?(J+1c~ zK|~eN&XePocdjNj7vR9)ej<9pnsDTU@%e63IQ@7gnw`#=Pfa4ok5qe%ifS?;YYt>V zN82Y^98+9|keL)C9ZK@gNeTQ~wr0VY(`I<^MTP;u@rMwhWLP75t(?j)zi zn!K&#_d#=rLyrq?A8~?F;+CIiQk4@UhS2R7Jtxz}g`_@B7d3Im4_A>Igm?>k7yZ6R z?+-VC(M9^h-(5w8EStC(-1ccVK#(z}Km7rfyh!z#U<~OF4tRoXLz*>+EVPZ8~ev9j!Gm*X4SaRG%!xa$t6 z)+!;xqZGFnyCbi*C`UUY$br+|UX7eswpWhBx$$a|S#A1J2++GMV~$R6|y_s<>4i;uodgB*nm7 zjwY-gc%c2zP-xjx)W_>gnqtb`bs5aiE2qApX*w~f=@i_DsP}Q@z!loM0VFcG~4mQ8IBq)@OFML{_ju zbjz;{((YopI*#CaxE9yYz4G!t*|w_RSbVKXUfyf_!Yi<|oO)8;dx3937hvBxA6s?X z=Q}9__8?!J50kGGBHo1U$vXqEz%cGVu+~me{}*q#;j^i3S3d8hDTSG}m(hHOFVnkQ%#%JRGq;!#*AbCZUOUvsjs3 z+qQKl94lv2xBSdUxQka$eK_hye&jy?lKSte$PbCrhY<8UdDRue4sQd7d`BD89 zGRWWI#!xIDVR^?rvX_r9T;awod$YkT?)W+YU(&!WZDmt}zTu@ac zslFko9?+?>K@}5JwMnXP2`V~BCUe{=Cve0-SNq!H0pL;I#GJby4Vc^Ij<4-<#|kL) zBJ?5jBMcy@>d)Roy`%V=19hn8Rg7}cZ#^pX`EHf)9?P>Zn?;D>5x&)0L`1qM@aZ688E0{U64ihzkr z?p1Gua`8Rz9SSi-FabDlHULx4#*n~Tkqu1}eaf)%hn9rX_At5&)X=2Aa5*;kiO4d; zG2j){F@OGhTn>+XSdfMuDaZbSPI)}qwYUrS;>xpUQ^c`a1)V_F(g9rn7WV4im{{Me z8)U=Ewo1ZwXZc?07?E4CK%iEbpkrH6v#qGvR@4j=eQfKHTJc-@(xZ4FUSQ(O(tH#V z6<2=pJAB}mMHkEtEoQ4N6}2n!2_5#1qLft`t86B(gFjP z)a4>;K2^)(?{bz8CRyePma!zu)xexx2Y%E!BRfBp-(7;=$|OI#;I}NvZxLZ)MQxp6 z$6`h8s7sf;Y^#dzzv9Jhi48+oI(jh}AMVzg`PVbyO=HG+B#V}GZ4pU+DUrPYmY1hL z>V}SX`NRo(%?BqEiHNCNK5^1Mcnb=?@WNn~g-_ul5!chwxI_rcdX})_A$71R0JeXk~B@NM&^Y9_s4aJDZ zDIV>zBK<4~Fx0Okbj>-AEDc($(@Ko*?xN=QQOO=N z-J-B0UP(V910VC4B^`+|mENW!QSh0|pkac#U-X$gj8~`lLdl6SnsB@fr(afnI1Hw_ z3Eor7=o2t}a&d%mP}gO0v^pyf8hB{5AlCyQ3}(r}XHzL0*=JQ-Anw-xk@%@N;3n{M8=Q^$O`dJ$t zlRi6{HwS%?qy7|e()S(SesG6BN`%wY2UBSsiD7EsI^biMWzpZ5!rAni5&h5KMd4ug?ocke}iFV@qD%v1o+M`bt`7sGTO@!l{ zds6)YnCyc;+KYnfGAv3D^zX-1=R9VL=1*G>q^;#yyn8GrB&gNZeIVM`6<)7?39YU^ z2gTK2-BH*H^W~IxCwgO+w~?XF zMh&@Tq-g$!K%_)&Qgcx=^;Kx2J`2XtdA|alp&Bnk*WA<22VPbO5j)?1`5V!T|rGTW%79!&7ydgyYNb|8dS@i6&Ab@Rl@* ziwqKRJ`X#Cj8vW&-)zEA%sHE((H(b*3_8_6FAEY1;~DC$)Pg~zjhsB%ey0CIqJ(qk>bpR zV+O8+WTgo1b&);c$VLiZja^Ui$Ka?U9xs+e`a6^^l7PTUF(Apgi02mB<=hkUlTZW? zI9-KAZc>zND?EXj+D$5;*0THo)_ltd)I;+&8A?O)IwZOu~u4Z0wb0vXzUmHH1L#^g4~ zCoAT8IS?c(vh}P5UVk_vw`)kYeLwvfFpB(kiI}&Jn$CW}+u~fd>KA1vs6W6^IXhF` zgfxc!V*+hn(sg!%`duWB;y?ugsZN-{^3gXjfjunv>Ab!QI$YUMq3P-aA~8YTi^$n? zhVopddRLMul}EqBf~bGjt#z^sG$7H>2Gw2+YV_Y3(T_}#X}tT(3N}PN3CBaQ8!bJX z;RW)oLJs+En1b}n)xlq)Ea|OAIg_v*Mt%lP0aa-57r?3KUn5^1J^4jWnylxuT6*vw z5fN*V?Fq~MDBN=LDH{5=!tVVRKhkOtla=}~$TSONsQX1?BJ8yX(X+pK0Or%&b-}AS ze<_MG<@Lyp=mpcRyVQS0BcLU-amS30%F?eS#tTsv%8}MrQ~C;?4ljb0bLmDYMh1xX zCUC1{d6zHkmh%9VB#17V0C>)F5^oc42J9G~1QVuyh!-DonBq@#7Tgm26@jfOy2iKWPiltqS8JOYr+Ho zy~5PT;+6*3pgTJ64@BL~`y6gaAIoxLD~WAW7mT93u6c7`$EpsIX64k2*E|UYnEDJx z9=}faHOmA07>QkWXpci^Eot-tcVg=kSefD zc`^Oa#;uI{EapY<#A-&KDEPtikmE%|wlBjXg;_EQ{qa;G&6#lg08wUyShf7 zyHGi$4CS75VgFS$xzBdUwfFrszQ#z*oK-aW73gnPF2Lwke6c?za;F?k|7t#LHE(ET z!iLWT?ni<(GnU_#W@6#&{0i(L!*lWj1TM22z3?&I18G;5{GGAXUQ=Pr@;OA$P5^E}n^cHi6`*`!#$4eDsGwa4-hBGlDmmR7`E=ewnFUbI*0vFt|D!ZUUu)(NV< z!mIiVm-k09Ij5|F6$6pU4I%8L?1E2=ZCciGszcja(ck^WrYkY3kGD{&SuzYkU z=B1>Qm0y@b?|%f8WgM7x4G19Fxi8llc2%j`=Nr5AgSCykB_X zs0n>^^jU-)YtsC3w{knyi{BM1*k=yn{1Q};wrECgMLryD{@t@=c-rSRo%BL8Fm@hNLb1Ntmg|&skZQB+Y^A%fgw+7uP66; zw{r5%!I|$v?z|9oIEi^a{$9_kj2TaVlKbJrfQ~alL;k!~qY67WVC6(_`3)9=R^(tK zE~!03s3?Xmjr;fmPMB!05P!x(9F6o9f<8z6>L_}N=reu;7I8Z7!Y8Y6X-3K^Mb7Ae z2@^(o)aU#YX2LvG9UKvdc?N$^GolkZqIfiIFvlwoa0dvNKZ8R!!87ocM)*p^ceC1u zd{JVaY>#|$=KKz$5oNo@qCRg*K4A&6i8KqrRpfj^fqDVUNlkJCWImrZSGAdgZM zP&QzXTwI~rK~9`393Y$MCUNP1TqmGcgU;%U1D`;r^T$*?>e2B!EcHrm zxFo@v$|@h>O2d`Ga3sJ=Ya`)m|1L*Vrc+kRUu``Fs)`^mbKM`9jo9OYo=6mDP-GXcW-3-5=4r1Lz7W zt7>`Oh(Fb3A^z6h8wu_pB=WsMf4~j7Q*K=$q*vF~qX9TI&tKyUOWsQS zLVyoweHemHG=sDz=tuh?&Gp(X6;;=TLzD&|pS0Q^Y^X%#kuIq9Ro$(zP0E#A?(3K4 zP`b?TuO~M8!wLc)a~?1MKv{C21K_Op4Oqx_pb%&dX0sDY5hcNGe)2A7nQCqDJfg+D)hKEmaSi3ESHv)tu2xZ z%G`3n+A>cW{b6SH>N%yKsdCNnmV~N{0(Xas)~zq}t}iRCqt1bcCO-=6chxVduCE_S zdoc4CHHCeRA-)`r;Kf>y%+brcs;i53`WnNYx)2H_$BUj{;%o5l^o=Lc^J$P&hO25h z1@sDN{r9NWUq;p?t%uY4B9@%cNS~+rU>xY{%2+(+2>OwcQD~y)^Sie)Tx-lByuZF0 z3xyF&YvJ9En6V{aQ?)ph50u1cQ~krAFT_sovMPBV0@6 zL*Zau;|?k8_e=Hu#vN=`z5niz%T0CUE&})$lx{BNl_n%s1Gp2IcNzlqSkEwD>>$er zC2l}%4HJ5~FfS(8Vk}>kjXR7khLA-{;2}Bwh6YT7BX+!5TIH*uxoAUUH7&LL`82xH zTK}%aa$U7gDv8u_Y>GWc$MbFoah4$e~EihHWe4no0h}@u0Gg=_%i;(#~ zU9LCiBjb_nG}ED62$))6f+NO+a8>h9ol8VN8#})@YxuGAS6{B6|F53k+m;GBy8OTN zyg63BuGd&NmhQhhjd=}2zv^y%+QB&6&{$W6U$27i&!-5n!UM0Rg=Z>l2-nr?h4jt| zNN11qIJNm+r2Z4%&7z&ha_qcK;CnSVHlH7zjzj*}A*y{B*RxC0uTO*h8XVA|szK6B z|BWuXBHx101xE|z`J?CID2!zw%&I{s8J&lNOZFWU&Ou(zm^>W5|F=HI?x5~vti6)4 zW`s|Ah`!5^-)D$Z8RDTov@xc*6M^_%>@fjp-=55o4ROL!zW!K0$Jj9V(BJ8deJD?V zjB<(I_!#+Rqs#&Df{*cu578er5q{g z(Hoymr0rvHly8(HgV%o0zy}%kT&ye+r6A;8gr4{|8Sungmu1wGfE6(3jK<;C91rI0B%PbnSx4hIoqZI}%jq&l z<2ao(3RlMIvPa`M9jzB$+>PqLe@Jun+o^gwD@dwgjpOT*pvl_luMam+SEF?*Gf8{T zJ@-^^r!%I0>^yi~g5jzxw~Naj7=^oo%T|rJGC?;q3Mc4>forosrzY{6iU-g_n@xH; z3k?A~V+VoeV2gZ$hJJ7IN0b(AvxI1V4;-zb8ZMV`*3XP;!=;3yJA{YKBXsDgc$(3N zNv2?rn``IGt+Eh=2fr*#+J1XKWLebSIX7QbmbIwWjLK(Sq)e=nO(Vb61%eG zvZ2g@8C|9sW;UZ_dSF_GJ;#K5=(Hs%IWy->V78@;n9Y>Utbqv?X)x**jL{0PTLQhZ z>ktVen5WWkxbZy6yMwJtX*Q#kFxLn^-f5G}Y|_#+Hfc#(fOL8UMY6w(*FPYnOr>Jx zyc7>J+0vM;nq&elnH-pwISKRoWR_V5xO5`RT#_*~eZbCn3=oe&y#9b-o!2QahE3d3PjQ*c5}*fHjT@)LMG%wCh50==!)?2BABOkjnplNZA^K{ zT+i!fsFO*v_snZ2vRUDoY*uw9o3->(Hp`U3?3&HK3|0@JVD>iIBQ{J{ROLzju_aN^a< zdHYbCV9d?Tva%UVGue#aO&OXrAbK(N;ViV`J=7ix5y?X^Pj!O#A}?NPGgHjPmXt3O zAERz%Agj0?uapJMG&PM)T{@XfT{3CNI*?W|=h8HG=`)kqbh1ww?25+y4Z;?X&tYkd zArF7$z}UDvw3mU_MD;RFW79IMETeiV%P31{8B3?IjE6+O?*~6VcK#KSw7b|h(T7cT zGqW$9&g{RV5h~Vr(?k=SxE*n;nOTG8KxzfXvteG48Zk$68mfnQ;c0)d;=_k7M{E3&PvCEd)*k!>P0~vu!Du^$pA@()U+>f6uI}Sbs zdH*X(@tV@jEPd%jmX3Zhk?KB|F}=*aEAbJE6LTcW5HzKjSPHCX;&zAa%O=3?X)I%j zJz#QJQ2*o1Vd`XLVKGl(j#_GAw&{}tqys$!O*1F4nXuW+YAc%w9y7sX<`TyM=byvL z_=|p=jh;^JZce1co9x?$H7sZ3BrJ(nK|dBxxwHn+qx*Fd;uV?eBQ4~pk(V7Y@~i1F($Nq5jeT^zH;=K&SUR20 z+7nx8G;``PDPsmCt+nj z0G#o+mj{3w2JWbV?)Sj81J_DCwC7sfweP$SqXt|(aP7e57;s+%E*m(z z0oMVX6}XE%fBOzXSmpn>?;uX4(hZ5HZhNpYxO)@kiWFQg5qLOt*p4=t;l7;Ac;w*;}-#(0K>`%%pTF#^3h8ek?D6htud(gid>ztrX=2Y=3 zODl0M4+VTx_}-wZ9EaPu|3u$4F%no-8}#oo+-uC!CE}vCysojvuk$aj$L$0CSbc-9 zA>>1BV?oJ=b!G12BGjS$dQl4_PGBCSdymE{+?}Qi&UOBBoRBy88_Rcw0yypr*T54i z590>*#-&)+AaiGBeO+~VK)=T?Z}f9L8gW4pjs!6?wCX&|L)hJv1&bpw#u>rRmn9oL0;BvUBE?ge2++Gh!Xfa=tuPPGum5<7p z0eM8nSY@DYVMA!)uDZsBRl)E=7z|e*3+u06c>O}HcZ{Q`uJaoS#^jSVjoD)*;D1dR zOEQK-t*5BW75H(SW`L>8JxZ8{Gb?7^f#wyeTR=_}*GoHJDpMtSCq;+rxR|`Me;}10I}-uq8FpXU3EF1GXEoVbf;a8iMCuUYkHB3@eS*%2Nb+m zzPR)z?JutXrUKbjQW_3AMHN3$|4|;KV8?0y_WCQZfE_+R0-YI>&;RY|@R{rIJuu*+ zOK@I|IKEwCjR<*&2LLl1j5!gNQXI@_J)d(OwSI2~<0kI;TM^uwNx_J1EEPH-y%@u9umH?(*g z;13YUK3#x`#gJc*vN<@PM<_&G0{kHY$?5{s&sYdvwS+OaQ5;^2_@Aw$_X2ACm%ndke2Aq%w`yq~Rh}m)kqF({nq{RvLB2e84{tM1hoS+{7tj77q zeTWl$80Q;(h|~Yo^a}*)hxC6FNeJAwfG;4>{~JW`Jp|&Jf%})m2o%o&tkdH4fNffw z;E%O+^e0<|^4oK+%D@XZ3q2MwL&y@3!${7pc73(mfXIKCNY+YxFJ z$9LoG^9TXN>7e>?gl5R4gWWS)oX%da#90vG>5%ajgg4Pw={%6mxCl>>&aNmhl!nnp1g&c@&p__qp1-UG=a zhb5$WgqTNgzG@zaM2^6>BG%Q0e#vRYEAJpm~o)wM)0sS{@%dWAiYk{Ca6=J zU4^TP>UNHNQVz*1g>bu?@-XZ0$1Z#tadt%*%Dee3 zSFCJmsF(1qGkuqtKmYngIrAl7Bfby9rZ9j0hO*TQ^X5yTFt+iP_>Rz*KYzC`G=JqS z>62DehC;rE?e)7QFlY?r&&Ou@<`BN%Z>S6{Y^bXW`a}Mj@IvgqZ>|hAEZTYfdX#b(ML+yu-9;!H8dpK~o>2UMm{fAo*A2{50xc%_a!<~n_4)-4J zJKTSG;IMjl=!Qor1MDEk=`SHNBWNp98r%99T`5tI;)9O!84Xzw`M(b>_}(c972(cdx9 zp>_;)40o`{t&iIu?|ppWarJT7xFF#BN6LFYmFVC})ygPpLl^-wl!jG}+h=l=k*1heM= literal 34304 zcmeHw3wTu3wf~tU6NX2a;Smk^8ZeYt1Oq`024sdLa0VtYCPAr!Nk}FnB_!iKARuaR zh%%gxMyoBiwQVG6OKn5b+FK&FIst0}A|P4?pQ(@D6Jy&*Er!}U|KHkspP7>f_WSPl zzqkGF*Q00F-fOSD_S$Q&z4zLW6AEr^k`g6JO2QkBN>T?PJvR3H#XlBCx^-;A zcuC3whF(08T>MyAumNh|;RH!aW~exndVnD1;z^K7LCP~}V0fHkY(YtKAx{(FFDP?F zlA6I^YL=uP!4EM>Iw?t2;97czBzYKO5eJvK(?uBihd>5_CR z5&cfQy2mC-OLWoy6G1unQMTNbmu~$$8jZ?|@oT%#e2o$RSXmh@2cOH9qoo#thmY|` z4y{c$$)TEbiyZQ&r^%u1=~nyA;F9T3Y-zG`)}gGi$l=sS3c)92OaVKGqB@n2v!d$s z#gfz*F*p7hn#(!@qI*DO{$oHNOLO33zX-nN>=4HmeaWd`q;$#3+H{+&)TGO@;!k(U z%J%d%P)er#_QQ~|^CsebT+O|asuxHj#xF2AAPq#xPzHMINxQ&533@{@>EyUNiPL8@ zRSXnC6<65w>Ihs8Rg4P!K@J<2-bO_bJ2{jXO|3(;?=m^~G>yQL-|AE*Ih7Zk%JUB8 zRnXX@g{8{CqGd$|)69(%P;yqJcL4yk;2}v8Eh*YFY&>$GBx%iiOb!*NTb!Z1^fYJ4 znQkq*`4(zhS$SO!`_oHh<-B?noSYB12H70a#$t}n&jXSLo{{CD%RTa zVbWB|?YHqFY(?N_MU`4yRHZX=$Z+nE!GGDgLrH=0>RyZ@GS~#4v)*?2ppDvn1!+!0 z9Xn=Q4T*MqL`iY84Lz3bA%tR_eHTF1b8={BdM3ksNM$GnS$Qeys)F*rb`K0{9Hdnb zVx*E$(F`*86f!B>Wa2RZlZwhArdzo&8W{Bq*+O52a(xFlN|hnwnnu*@oIgWWPN+Xg z#c+0z7*g!rF9UW3S+fA8Jm0&UQo=onTOF`CX6HT(PlslZ^TYl+qb0Ymiy4Bj5*u&-*a(5{Z(}NbiYf{H z_@`0DzYo>L)$qnuNQ$cg5@(%aU7?CZAP!^_tSDg*%9+Mf{#nr-tP)T0O56&4{T9=o z9Daz`#bIJ~V8#*r5ht1sqIM!uLPQjGnb4g=3WZS?BUKpJtRp#{W@l%J=}AjE2771Y znLph^6}4gjvnvB~_$!ut1)^f4IUY@Ia)N)bJ4*dijz$_5CQ5-%<(vUu((_5zqvW;J zO8)e0DvsAG-o>&agEeZq#eTDWxK7v5_)|)Ks;WTw*rD`0mA|61{hInP%s1M^2C{JK zZ_ue6(D!Q#m<3g5y@8$>PCW#4rTL1yLBna_VljRwqu97`BI?TQJ#Qj~ri73|qrY5^ z9=;)O3WndeDKYrjC>nlad9r(d!}6qdLJd^*ZM^JTMA<8;Y!uEXOWklDNJ06@fj=mH zy^X|yN%}P~(b1S2zsky_As=+>cuAu~EkDj?wY&y3Oah7q*|!gm0NbNFB-m-VNdLz$5EZJ>3fGYy$A!p3WB>wRq$)6mmIdIeF(_45oR z1wUicQ%pZ{@Ap}b)Q3cwIYPu;=;bustfd*ln6(3W*+>&EPIoz!l_uC~6KZy3zT2@5`{U|n$2hu@lLjk0N*RN-4nGhGdi99MrMKQ-3crl}8#hLDkx-3n- zCNADYA>Ly=_bf0p3x*+vLi@wn(lOlwroG+33GMYmQaco47V~wWg3Z+*!Jghi(olN} zOogt{{yL7$#Bno~5>EX&vQTZtiNebU7ru{3S8&pAG8LUre|H_L_*ano5s~{iM@`lh zLf&BS1eP-;pXAav;b%saN@D3uoQ=o5?@&rOwMdi|;EW4_a*49m4=*c1WqqIL{2dJw zs89|gGdDI7I%Zi--9);Lla3dKSOn>-NJBx-3J&M5W%bloid@p(g)Dc9hx$;wziIY4 zg1%2vu4G>36N33;!=#%*hf3S=(?j6Or{N zvg&>$>T%z2GMeCek8rZz3bK;nWHb-;?&W092(s+qWHcl7-pR>+D99!ZC(9tRVoug1 z$Ue*(rjSe`o6X6#3bMn)$+C$onUj50kUhr8%#9yog`;aR8f*$skh+;FlrM7D~PA9o~v0e(Nlz@}@iUxEN{a`o3 zc+f<=&VdYdd;+{^xcVC770?ehdx-1=C;Pe}a}OtLCbE5;Y`Y-4QAqZ6LdR9Hk4WL0 zQ^94T5|cQ`8lWmgZi%DxGg~`y_ALcXp`dv)lNo}Zrh{mvgJ!9q=@?EE0ga+6zae*R z4Xx!$$!Dt~Pt;ywzg_d&F6i&V2Wwz;iutm#qOB3Q5B&IOy$}4_<*01j2Oj45Uf92u z$qj_dpj)?ym0o}*?W1081v793iogoSMt%h*{BHGbO!ZB2h%G?k;%Q5miSZ@OqxDcC zEn(om!{IogzHibCKXtJ1ePGU))%92@LxD112gkhlxWCK%Y352}9Rm+GU+ILY-MxIhEvYw zVoqv;IOFZn2s|3Qk`#h8e{_^b>`WXi@fTHW0o%YzI99m`k)D@eakdKKgDF&CIHhly zSeRV}@@t9Qe?{1pf|Qq#f{bH;gR3WZ87EUJ9!MD9PYHg6b!5mw)oMKAH>xk7A=vUH zgDo67Xa%5KLd5lpHS`te_s}uc&{&@bJ5B2680ya*HuzHxW>7h3SJ$Nk*$&1K&G0sp zmFHH=%12mIH&BkQ{0Q3!3Sko`RFC}};~SfRrWJL5KNY21wrw+`+Xr$9ZJZyrn_-oo zECn`Pun#$^K|o7Y|5daUD>#YwG}JMMgbfvRhw^(sUs1~FyVal0B9raPZw5Qb8P0Fc zIt4SBq?`tWxpMHXX2}o!1f3>SiIvQHG}` z8!X4Y)GRSM-YgMv%!C}roZ*6YGLlogMB{yoN7c@V`O(PENZ`7si&xrn2MJ{?XCy;~ za%(~@;X-u~L)Am*Ttte9apfor*B3ksSwZ5faHncWT1)-i^Kwthqw7fyBNgDUm&94c*@ z3EGOW%8#?UXGB&zG*)cd3a3s1D~J3sA*@dpkKzW&Du2TC6A>ypk5B;wls%wr`4gn7u&bd_EYTW zyJzI!fXQ1$JGmI)4q_vXo_pk+Lz_oMQ}2Z)j>(A;c@gdJdl#PTyuuIkMut}G0~lq! zh~LKIv%1Mm_aVN5#e?T(5|0}>akttzg^gNWxoM+F;UVm61@Gi$eMw~~k;Y`c0XSs8 z1v?#(bLT1ZPKEMOS1{j8b(56^1?akC3m_o&VSk75OjdH!@Gr8D3e2nsiZ39%AuX19C9RYO;gHgHcu!KPMibG4m7XSdLZ2r>ja_Yl&)WBU-FQhXf67$+j1tc*L(b}cuOP}o`Wo{$$Ts;8_6-tp&yO%1~ELSy?!PQ`9fx`>Zi zxrx}kP)7u#8J8JM3s_K2cE}4BzKXiN8aNISyFgPJ?W_!?{F+gJ!G;|6kJmhmz8=8 z3IN}!#5Yxe=YSn`#dx@ujdOx&;2x$5-t-HuKJEx79S@L&08P@tK#p?*xw&#dt;z3- z?H34hK^}h&s{=1>a4l{|VS{TC7!O6=ZK7&`UjS1Ow4)rNu3&SrLlJawJ8dAt#nysw zF_=GXMNcpva3obOSY`5;nGY;WCM9Q*pPQX^4$W!9jJK^4x({D^vNGpmUzStJWybVn zM=)E$HXZ5@KSU{lCdM*TfR$sq3LZ|Yj6PqPvn9#<;>f*H8xP@3AHqI7&XiIfx}F+& zEIB7*jh@>mq( zjWx)@PZQB-aqpM(hw~;n6LQgUP6j`Pd_60IWsMbO)42osB+ix&(Gi02FB{Pdnwo*Z z2r-A6(20F_{J?@z_AMg0aE^k^GG=P&W)hdqRhCbqDT1}GOB_UrCPvAaz>fq*37=c; zh)pm#-88!dv)Jr%MBZ_p&6C-3*gg|8&laR@U}^B>jk!=1CaNfm+pZMSc5omWED1E$y`N) z+-0}Yl#6Z@x+4t}sMX|6mKD3H4@1A*R2j;Y`F=CzXehEt{U$MD_^i94-InB!0c+Qk_enZN; zoGVZBF>XAUm!8SyW+T^J%**)8JW^TQ%b?vJsE~UZr&$DQzHI{40CHEc(#k|>E>T)L zqZ{VY{0Gk-D=Wm}@v^qExG1ZJ6L+hBvaqtyQJv`?^1R+1Pc8CTI%}C7&ow|bBb}F# zEob7qlq?q{$np|SKGeyuY;J&=gA8!w{_-XA5_o?>o9g=u8&5sdIGKE*_E>roE5$gk z6nVI*l+t-EI#za8l+Nent|h`P+Xi1|8{9IZtR(bd$#JMMl&y6!n(ts(#rRQ--^a8Z zZDOvtLKsYAJKLxnvX@p0Aln*l9^2DhmB@=}AVL;mQ|oCK1tS|({M$@A5VIz$5lv^n%N16t>6~g~Sn#3W9A+wKsWv!Y zEt8d-P?Nv1_BRl(PC2LFyPTmA!!8erCWaKa~z7|q5&P| z(byk9_w1cW+sqwglz8rO=0rA+$C$h@8-|p6-5fNob3tyJ&q_195I@t19Po7R;%fy5 z=Jvj27?A=WVla*^A*KLbiRp`1Q&%Ds0ihuWtG_;hu;4q+8BSU(E3c|8v&E_TLiG4~OUzm4bIv8Oq^!O|BvG=-b!4^BHEX z4z%%k*2bdga!#7>ZDDpl2(92&LO2P7=kwM3fEK^hIUP9>rok&%T@6%M$E=7m zr<+tv<51&cXdn3a+42Irg^_*&4X)fOLUvfTwuzK=t}-;=E-QCh961A9rpX~~ z{W_MJS!Qn^GZJ*3tll03nFsJ1;n;#5qYQ5_$E*SWcY=um7%$Pb42e>5yEX&pQH7T+VCJnN7@1;YjO>WHSU1@}R+YuyEGF*Jz|qV@h`=vla$#hhmHbWOOQ#Y`%` z$IW+CWLzH!o*3nLN*j+IIp;S+n7{VTMLS^E2t#?V-0|Zl_#=P%U-C;I!qPTRbYN1L z)rs!CJiO4bIT2hHrb(OQ0V;-MvA6|Md1WgI0~WA-zN2G^GfM+5M6 zbk%M8#i%6>fP6!WoW!xirqPcxNYTUGx7QguK8+q_@%S`KTir2Nv5gaB{)ca(4Ye1V zMV+B6s2Q$xWv2HjUXn?y+MzFH|PTmANF&Cz2! zUh)3VjV#2LlRsdsZonGl7wGKp>dD}LM(&oqL!$l>?6gEv(@+`vQxp#!NF!|6xCkaG zhYrx1$gaE;IzZIiq?}Q96VC78?ePD{d!A6jp$OTW4Y8RtSX}J`BK??0)!_ zGdLA1pHnHEYM(|$XD!inj29D+Q$5P5?$xL=Ky`*wk@PaB`X;AZO8{NwHaQBb)OH?u ze|IWx;;dsAWX_5>!Yd+z`N{ zi$deK1l|VEn3_exksRD%YqS{a2e_d!^9!P>-%1Cs9nX;n7=v*BLWWT)ciGqwDu>o! zvF*V~37b&fMlgc68!vW~Jg4#Y;8n3_5m9XwuQaE3juP=iz(UU+M zpC(bLd^qv&OQNY$QGVkafd#ViJu*0P4fX}~-H)PC?F!!uY8p+gp#wzWR7TO-`-B}g zD3#~?68NBmI#JILK36*2U(%l_DNC%_3C-C-h7rIyZUO4Dj$YJf9qO|V^;xIl?N>b? zPJgC_tW$AQ8%Img)&080hK_k#&zX)*Gt41k-NRR{v9kiP z1p*MizbEIU^xh;%X9E-E&Q43^r=8L0*+9bC!*b^lOD{IT==N~$%MbuCwzo#-wtt=m znQ#>~^(+F>)HhkQ`{3v#DI)sfj0oXq)}lr4Q<|e&(6`J|m#Xz$i z30QVEu8`lm8o9z04n|CfPo%hF+(;l~e6xsRbOs(W_8@DQ@t43*sa?i)gbd)@WjrWC z9VSHOjS(<^NGv^4-qMiBcpges@v#hs2fi}5@mtb1 zOb^l2v8>`x4uESG?((8f7Snu*YoxtaFh(makb@QJ*$}~reGIIwOP!dFY1@iiV<0^g z$)HJVEk=*jCy*`L6^tfq{}~FjiJR1e_6^kKD6I+imPyt8Xu0; zgR~#1&ZDlS&0oiQuN^Q=cC`U}%^)Iw^wCZh zWk>!{0$LsG+4!dhR(Q?yMZpm@IT;^mV9yN~+*PX2eGqE*>0K}f+W|vx(U)!k(m&=Y z+NV%&A5E5E0g7Z%UjXUOh<}6nz!*ptPI(zX9RvGN|9~GL&QbV0vZ@ktVrV^MW%#22 z>Xq0|fKIMbU7U>-=|AG>-=g%tkE6m`umMTtWt$h>4NZZUZ6~hTu0+$QT~vy4TE_mi zA3N#YY9XtOAA6~nkk%iBJTQoZlpiis^yR401$JDK@ufFy!$Vojp^f<(Y0THK?fzIX zUWz`!xuV@6;}~Gnby%$1b`L;P*}+9obfpAMP1jSkzlvIgE>nS5A4Jf$ z`-Hj*;$@w(?LMwnGeOOd9_AB4CQSr3l7S`y%x9Rwtj>@vE#yL*$tK~U+OXQ8JIxTRyk3|Z>Fcv8j{F3mEMiN#akT^I;Oe0%(nikYVePKD_U#OJ2$jn|zMNWkfL4ON zn2iI*aIT?mBH4g~w!n&kKI(Weio57+!=(lzVO-;}HjnN1V1GjS7@aO)REyBZC_i0e z7r8aRuD1wXKR!Odv8D5olmKMG*$ADK&;S%WA5lMKeZaVhrNh714oWcO(DE~EEN3Zp z6M`}eV%Y4A`Og~v)C=+7&G}z@LH@Ji{4F~ED6aD|l9`=v^ezIM!Dlipl&U+EQKy1r z@R7{b=V=rid?bT$OlIzzI+b};sfTI5o%}iV?`Rb)IJERzd3xd^E&VN#o}qpZAqG62Ii=q7w_am5$2#1LQS{v6^fhok zT_YK9?|aCs$>?K@{4k}I1~?!jfA8;rQx6`ebq1{Y9mMo?eM`i9UqOKTBIaKjeaPH+ zgn7N@yu-VU<%p}xA(Yw%GNFaZYBP_FhRz;Eu_MC-IIuml9hEt%gA8qFOnJRxN(AgR{{<=EC8 zehPJ!R1fA2sFrLg&8c*D6x@n4=mo|U9B&1-%jHHJ0+_S@et^I@%Z>%~;cH-h$5`a6 zTwqTN+=6`y^8x#0IgCBy#FGfpb%X|Ic-&DrG&$Xo^O8SJSw7B*TOwnWC8k8$GVsE) zJCxD)4n|vy@}!cBKV6azaT=I@#=yRlflOfLo_3hG+3qvy7Kog63R)by^NqkL`To?+ zt5{QG1da-Nku%CsIV&{_8H2xD zEWdmd8`{yp7&f;eS0BzLUq*vXLb~cD0gg0cOEVAq$>eDrX^_m2Z)=I<;#rV0hjE{Pv3%UrJl2j}_DUcxa5jKVy4UHA6j<$vf}5!MJ0p3af`L56xNikatUI*s zlhEqF`3vP>%5oGNwFkSCX7n$Pn)5=&`#`ZMl5CLt8H-Aj6D0q%MIHiEjqT_E2EWs~ z0CeJ$YerV4h+uMUG&%smr(u0obT?E?>2Vj1I*7 zlY-sWF5`6w!lI;*aXv!u(=a?>4NZdr<^`s31hOIvj2TGB1y@2Ji_SPW5el5~EB5<5 z`|W1GbjKk&;~4ur&VF~XUoZQ8h5f$GeowOBd6S5K9Q*y8VfxwcyX^OG?DrY=8)3hP z*zYIo_kjsC4z(LF*0S{kR)AF&?0aDlt>>ScTOG<*;0K>&XDGc6I%Gc%zXV^@CaG&s z>pbPQBs;5Qp0Ya0t{k>siEG{OCD^xQDWAJHS^@NT#dQtv0v zA`AMrK5Zy}7w2zNKl_7@|F%I{z%PUNrN0A`@NO%GRqRE8_e~%KSk6H%2MY;=cV`n_ z|J#i2DxNZ(gG)G=%s~nV$s9z@jN3)?oy_tg!mgWvbq$S6CfgB>PT;2kC1VzihRX=!f#7`%kepM5(x% zUWKm_)N)cCbVAIjklBj6tQMG=Q_1%ztFey- zDNg>G3dctw7-7JX<;Xg+BO9Yo#QaF7(g{3t_3!6jNCO%7abdCrTrObyZjS$kfZGJD z6tGah`2wa1m?YqbA)fzL0pAq(a{^9Oc>41qo+08Kixq>AW3Paf0&3~q_w!`-Q{c{zR0;=yv9_Vc)H7Kc^=dj$O}d4uum%POp8 zHTY9KW&Y~AT9oVK=_As4y=7aiweBs}8h7mme-+76$2k84m8^jbd8khq2)3L6BU zp?Hn&zX}{GpBDdT%cr#~eS(-@w6w6Wc&R&iNR zb!D~NE7=`{uc_vCIy@bAXfH2!`+VS4h(A45Rv}5NYdN&9uM7BDDa>AT%gU>mt!m}Y z#@|wN1-u&w2|g}woyYC^Pl7EgCr3$RL~e9P*H-eFx$f1*nh2=S%WHRw=`nx!vu`>n1r`~^5S&?FN* zpyMjDF7wu*zah@#+G@?OsP_9P4nA({(mL;^GE^S%+$wkZMxI+&uGQ|CJ3o`si|guY z2oeM9Dh~e02Io=;JE85%(+z>xg8b+wyeYu4PlnmVtw$RkG4 zVe;53z8dfeGG+op_{e3o6)32{&8?W_FRtDcGb7SpZcVjkeO;LsJ%gp^merzM54T*F zURSGCgXr_BeV#g)JbP}b^KSH!cyZI_cyBdS6iY=v@%ih#dJNB>=dLUZ)cAFj9FKBV z``oB{0DOQVqo#M&mYO*gH8rug6FoY=-tVsUv1uxX=Y2e$qUE<&ROD~QZilnlhfHxj zXz7LSO?8{y!%4Jss(hKhyoymku2M07wTpQpHr@!yY21L=7)pGxx=;;KKW)4iibvbi z9|atQCVJLyU1k0%eG1|0YAP@Q=&{&13-I}{X~=xPx^`nNdZ^W1U+!jInS{aP^Lwjn zH(333b=I1?+6_{5?dGzY>I$pCqrt1$XtkuKZlllcpgPg8%It5kV9qhU-C$kft|XgU zU0XpzCVRe!uBfVR%QbR!h1*&fs1ZYEdEKTtTgWzR{Z(aK-QGFtse*IdWFx*gF6d;n zM{8?`v#3}rXXJeNJC4W^@UZNRbYwa`e;P2g5+v!1>G_ZeOBc#QyRjh?m~yVZFP1M> zuGcM;=JC1%q`ogM*X4DS@QbO|8^YX7rJ5jMs0XO|5{yJU5>vl3tx*38GM8WUc|X) zVO{O7uF*2VE@=It*`@~BdI{5vRUnLj+BzrWPK}DMYqAm7=qMl25nQ`1PDk6b1BhD% zN~5E7Q@f6i)=iNS=tkmKH3A*+OVaTpxzk3V!y%8fM^}#w#9iAlHUrY5$w$z7H$$-> z;-7&y(bJ>R@mTzq@Fvh%1xnK&)$i(i_@1{D(1dt1phova{02tgNA%r8C!S&Gd(f*b&$?+gw=VrXOa|$gD_l2a% zc;7_Yn?ur4fd3jY_am);NZNSLCieSCEcE|5(8R~7p|jqA@-VvJ(Q+BdVWN&fA&#)2#(VAiH4?^-SF^tIxqV1^46cO zUHH&Vm$%ZGpL@evS~L09GKY38_C@mWH^bK!)|G97SGv|-QMcZ`HaFk37OM-sVDhaU z+3#CB$jx6{f8G4GVxwbl3jT`tdR_~ftF-y*3WS&C7CR-J9yKqPB=$GX(>Jj_zvflY z71A|adS<2+0j?bt=eT+pF2)WhZB8})jq>zsK`vqZBX-i9%*^siY$)_2PV?HF+(O)Z z%C!^Cz+l|1gp(j&oX)}MOoMTZ&N2w+VsvSPag5G72v^MLG6v%qT_$kZ5Lo-W?KB3z zk3omW(-GtI)BHGY+qP{L>uIl~0X`9v+3PP)ci34Oy9VKIWo0z!amAc&&mbJ9YX;5* zhI8uq-+b@ifw)17r$gcBOF`fO=eRjd6XMMj=WQ?#K`C=5{G2#0i*PbiVr)XApOhvezMgH>vBG;`)Y{*vr@uXaHQ4aKN1u)w z;fcU*0NCH2PtTl7sCMA`i7)*<`t(dDH{t)$GbP0!C85nOT?tBBOjh6T2;w~s5c}sWd=Ktb(eol8$@eZG(F~Q#1s?QZUB}Xw(V&3GCE^pNBui7E)5-Hk z$Lf+H%C(Ae7Xvm3`rnBBFN=7Rm6x9aNaY*GBuQgXw=wgQJqFR1h9tD<5=okJb+UB1 ze=^!`k~IEol8f4;A7yzV59M{C9D3FYSS8A@6YE9Lc?~C|P zMEpq+KPcjzBHk_HCq(>J5vPwJNUrxqyidf>iZ~N?I;Xi0ke&wsNw)6-CIJ2d5JQV} z6p(nG0HpM+EBU#R1Cade5R0+OHokVyZANdE=kc;Jr!ngQPt>Fx>CJJ-v&rsp$QNsEd4;>4WpB!(esS`)JvyLOqM3TKSoON zkCu$+Tm2c}brtg5B}vneM;{mc&@+wf4gJXon=AdYByGXlE$H=e{kUTD!2U6ak=zp| zB}ii)PR^u0oCZAMq?=&xBK;eH^h}wRj4|aRY3x}(qLA(OfL^oROyr@*CSU`un-Q;f z0qN-nB>nt+4vR|kWfP^ddK6;J(v5qjJ5atzpYo+7>EihlrQ}ly9xAf~Wv&Mc%IiW| z?Sk$MAU#utj7v?RXU|+wUaCn-_2Y%kQlYcdc@ui3OfyPp>nHc{QIwCpRhll4naUy_ zBtJbG0DdbgZSb`hS+G>kS#qt^qPk|dLt*}3LDaPl&j_UR2Hm){dhGwc{MrnaX*?hPvA&=}$s86WE+% zip@D1UBVJcvf@oHq!N*LvPqg;fwy=R^pq@3o@eolo|=sD+AK}=Ueq($GpSU|+lYLt zbFu$}yaa_EyVzKNFMW}QF@HMde<9OJBc?x8n0-2}GOYLF2Gl_~nkvtA9 zkZb6Z07M4xX~DrM7DQ>yOOMu;X%rE>D5yOef6oZ~$tIhCAE^v2Kdou$(U(&?LOHZ1 z($iTfBE}~QYEREB5gJk_!cu)ZMyM~PWe(v__3goUI`q-@aJ=BJ*)_o`#B1<+@Mc1R zI|1=e2|a0H37%`I3+8`!6lAde83o%dfje8A+5+ST$%68n#T@BB_&~T$r@bU zDPdQ4Y(9U5&Gr@hnl-md4^j%QJCxK_mU!u)EtcrYUy^6Tdh!9H;1_sG++J^;cNj%M z(apIoTngZ2T`856pnwt_?qPd@ZYoR{nAq83Nd->UymedQMRD4AN;x}VULHKE1T+SOE&vFI4tp3V$Zz9kMsBI z=1U7CstX;mmUy&V93{1Ntjt;*Yf>dJhHE@ad{}!|qUFgCFDXX@Y7Xi8c(}wZEtX1r?y8bXc7LRVPS4Z8p{};FdPBhLE~za;Yi}tj^KQVtQx?xz z4Y{_(lH9eMtG#u#n{Xy7N%IF$;A%j9wZFt)w!Q|EEtE>U;=s2=q*MlK`8^j{hr8Zg z9`L)hB%bMV$l~>vz<|I=x(G2AkjgyOvp4x>Z>g@Gjr7@2EjF=c*UX(gceb#=VH6eB zb$Ws!>7;jk^3W3SuO|*A8N#8;UFI3YVSiGgzb3cLgSK*uV|(d83FoY<+ZgaH6?Mt65!(id9I`!^YLM+$3?0K^)0z7kvtiI847_vYAE(+`jRmRcL^q z!NFrJ)_S9cl01nHpNQ0Xm%7VHR-EVhs4+8>ZVI@)TV1%PNB4nh%TWtx0o}tgoV%k! znyka3=eWx%fRx@MY|&O6^KYWNC3YX(RG^S_u>tob$TT>y7_@R>u|BCd(E)SihE_z^ zF=Vilz6xpc-0K6>xiu*lQlF!4CEZ88p?s6)LbKz)E?)a??ZtK0QcMCl2CD0QQ_#T1R>W2@+SbaIw@L$jR z!Rd1r+i&)3W46sEjg&rQVq{D&NJn>COEAQi@F|f`hVU^*D3@P`L7{j?O1~vnwig!p zy|%JyPILjfd^YQHqLKK-W=~C+3-B4_`Nm2l>Hhuv(=>o}34L%wd-1eJ`Dg;x5(rx+ zO43HWClU4l?#KHk!n7|u0UKBEBTRd`+wscV(7ypc$4fM{p;d^t0eIS<9diZz1%zqO zHGsE==mD2lfx|rn7vO2Ur3m)`Zk>j86T%IEkKy$rjC*Vn{bd=VfkP)9nSrtqJ_%U! zC0?!vFmEO=*9Dl2{W7Ar0KSKp$%6UKSppJ-VTKI`((6#_6pvUz!Q8O zuZl3O124k5lIn}Q>rxOem4$n4(#s-DYtdDB2~YcLTksAbFYTrM1+N8n3nc7=-HDg# zNPA><>|136?*a_qZ9z55ly+^;sq$<(&(;@b(}~FcqFD)zJ#rCc^E2H($%~ zrGS5>Q;&P_VqfXUcu6+eW4dAi_9KDE{V3^nyi~7Jz-c$|ytp4F{T?sj`vLFH0R%nm z7v*D*XaHf{Ws?4~2;Ol6>UJZ5*%1h9`7&zeb0RIzj9>TQW^IN=?fr@F^GI$|aKY3BvS^+QwYi@($PqApJYdmm*B??|4Z+ zQl2C&#>?sm_&pKEHw4l}`CKPyfY}sAUV>{xnBYTrNrp!NyG5AbTO!;8Xj;l?2wo<_ zR=^#2NuHg6zYutW-6BkI!ZJ~Jz_;)=fxZWDyNoqC!UUV~lKcc;5aDBhmpC~7Qot;{ zBb$6st54PP9B~Q_?H5-6=-Ph^_o@C zJ;IrQ3f}h-#&;&t&+&F6OlL}To@4_bIy<3r6ADW=Nz#|_QkeE^H;XXsY0}m2IUg;;N6Arzn?GGz$7HokN~rg(7Y0wm7TW| z#4?}7*8z^j`|s!fwg%`E_-1ri=WYL7_LCP3}6c1qG+1}#Qsf-cymi`gb&c@i>9*dDT1)K+gKEXD2lt|G$uyql{v z97#pE>$2;&5N;e^?iKUhR!ZAci!E4@HpoLIq_l8x{iYf#zImW~{EKGJos&7!>aN8- zQ!M%y&0Jl)bawVktIvsvGv+a@>o z@FmZtGT-b?)#ctgUtOhtHuhm|DD!Qavw7}JD;B!dmDriOSzj7hS*;8GUVKjBz_yRz zHvJ!P%bL#eA*T;p8~Em7tB3>Rb>9&{DeelFw|X;H#2ehcSfV~TpY4jE+D=>>ufaET z_+2!!%;#V`UEZ12KsEn_Y0=EevKpUzruCW_pM}?4xRiz043cT#HL=Pe`@(B9y&=L{ z;NL(0qZ%m1c>p?9&*SRjnR~PMR_*odZP>eOZ`0mAdz<&}+Z);2z4zqav=(biMoVT( zc8je=ZgI7&X(?@~YVowxw=}fuYH4cO)6(3sucf`Eqb1VP-Ey+!bW2Z*+S1=L&?2>( zS}m<S|rnTH0FG>S?WSZD`%q+SIzIwYha)YkO-)YoxWi^u(!qllGhTTlS~zx9-o_pSeGKziq#~ z-?e|u{?h$b`#t;X_c!d{wZCcqp8d`H_w8@rFJVluK=B!SZF}Xt2w Date: Thu, 31 Mar 2022 22:16:47 -0700 Subject: [PATCH 2/6] Update README.md --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 501bbe2..8b80e9f 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,24 @@ +A humble fork of the [Bloks project](https://github.com/WestonThayer/Bloks) by [Weston Thayer](https://github.com/WestonThayer) + +# Bloks + A UX for flexbox layout within Illustrator. [Read the blog post](http://westonthayer.com/writing/2016/07/27/layout-experiments-in-adobe-illustrator/). ![Feature img](https://raw.githubusercontent.com/WestonThayer/Bloks/master/feature.png) ## Installation -Requires **Illustrator 2015.3** (latest Creative Cloud version). +v0.2.0+ Requires **Illustrator 2022** -1. [Download bloks.zip](https://github.com/WestonThayer/Bloks/releases/download/v0.1.1/bloks.zip) +1. [Download latest bloks.zip](https://github.com/wcork/Bloks/releases/download/v0.2.0/bloks-v0.2.0.zip) 2. Unzip 3. Copy the `com.westonthayer.bloks` folder to 1. Windows: `C:\Program Files (x86)\Common Files\Adobe\CEP\extensions\` - 2. Mac: `/Library/Application Support/Adobe/CEP/extensions/` + 2. Mac(**NOT YET SUPPORTED**): `/Library/Application Support/Adobe/CEP/extensions/` 4. Copy the native plugin to 1. Windows (x86): copy `WIN_32\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator CC 2015.3\Plug-ins\` 2. Windows (x64): copy `WIN_64\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator CC 2015.3\Plug-ins\` - 3. Mac: copy `MAC/BloksAIPlugin.aip` to `/Applications/Adobe Illustrator CC 2015.3/Plug-ins/` + 3. Mac(**NOT YET SUPPORTED**): copy `MAC/BloksAIPlugin.aip` to `/Applications/Adobe Illustrator CC 2015.3/Plug-ins/` Finder/File Explorer may ask you for adminsitrator permission to copy to those folders. To uninstall, simply delete the files you copied. From c4a0a2dd5e21c35dedaca6131df96ec41c085693 Mon Sep 17 00:00:00 2001 From: William Cork Date: Fri, 1 Apr 2022 09:49:29 -0700 Subject: [PATCH 3/6] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8b80e9f..1c5dbdc 100644 --- a/README.md +++ b/README.md @@ -16,9 +16,9 @@ v0.2.0+ Requires **Illustrator 2022** 1. Windows: `C:\Program Files (x86)\Common Files\Adobe\CEP\extensions\` 2. Mac(**NOT YET SUPPORTED**): `/Library/Application Support/Adobe/CEP/extensions/` 4. Copy the native plugin to - 1. Windows (x86): copy `WIN_32\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator CC 2015.3\Plug-ins\` - 2. Windows (x64): copy `WIN_64\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator CC 2015.3\Plug-ins\` - 3. Mac(**NOT YET SUPPORTED**): copy `MAC/BloksAIPlugin.aip` to `/Applications/Adobe Illustrator CC 2015.3/Plug-ins/` + 1. Windows (x86): copy `WIN_32\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator 2022\Plug-ins\` + 2. Windows (x64): copy `WIN_64\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator 2022\Plug-ins\` + 3. Mac(**NOT YET SUPPORTED**): copy `MAC/BloksAIPlugin.aip` to `/Applications/Adobe Illustrator 2022/Plug-ins/` Finder/File Explorer may ask you for adminsitrator permission to copy to those folders. To uninstall, simply delete the files you copied. From 9aa6dcdca10d50eacfd0f2ce497d68b96d097382 Mon Sep 17 00:00:00 2001 From: willfcork Date: Fri, 1 Apr 2022 13:47:26 -0700 Subject: [PATCH 4/6] Add Mac support --- .../BloksAIPlugin.xcodeproj/project.pbxproj | 99 ++++++++-- BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h | 1 - BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.r | 1 - .../BloksAIPlugin.aip/Contents/Info.plist | 28 +-- .../Contents/MacOS/BloksAIPlugin | Bin 43524 -> 95328 bytes .../Resources/AIPluginCommon.xcconfig | 38 ++++ .../Contents/Resources/AIPluginDebug.xcconfig | 10 + .../Resources/AIPluginRelease.xcconfig | 10 + .../Contents/Resources/BloksAIPlugin.rsrc | Bin 477 -> 286 bytes .../Contents/_CodeSignature/CodeResources | 177 ++++++++++++++++++ BloksAIPlugin/Vendor/common/mac/Info.plist | 68 +++---- 11 files changed, 372 insertions(+), 60 deletions(-) mode change 100755 => 100644 BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/MacOS/BloksAIPlugin create mode 100644 BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginCommon.xcconfig create mode 100644 BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginDebug.xcconfig create mode 100644 BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginRelease.xcconfig create mode 100644 BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/_CodeSignature/CodeResources diff --git a/BloksAIPlugin/BloksAIPlugin.xcodeproj/project.pbxproj b/BloksAIPlugin/BloksAIPlugin.xcodeproj/project.pbxproj index b3ee0a4..ef28c1d 100644 --- a/BloksAIPlugin/BloksAIPlugin.xcodeproj/project.pbxproj +++ b/BloksAIPlugin/BloksAIPlugin.xcodeproj/project.pbxproj @@ -7,6 +7,9 @@ objects = { /* Begin PBXBuildFile section */ + 27E74DA827F7930C0083D233 /* AIPluginDebug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 27E74DA527F7930C0083D233 /* AIPluginDebug.xcconfig */; }; + 27E74DA927F7930C0083D233 /* AIPluginRelease.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 27E74DA627F7930C0083D233 /* AIPluginRelease.xcconfig */; }; + 27E74DAA27F7930C0083D233 /* AIPluginCommon.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 27E74DA727F7930C0083D233 /* AIPluginCommon.xcconfig */; }; 2AF5F7490CF5EF100091D961 /* AppContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AF5F7430CF5EF100091D961 /* AppContext.cpp */; }; 2AF5F74A0CF5EF100091D961 /* IllustratorSDK.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AF5F7440CF5EF100091D961 /* IllustratorSDK.cpp */; }; 2AF5F74B0CF5EF100091D961 /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2AF5F7450CF5EF100091D961 /* Main.cpp */; }; @@ -26,6 +29,9 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 27E74DA527F7930C0083D233 /* AIPluginDebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = AIPluginDebug.xcconfig; path = Vendor/common/mac/AIPluginDebug.xcconfig; sourceTree = SOURCE_ROOT; }; + 27E74DA627F7930C0083D233 /* AIPluginRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = AIPluginRelease.xcconfig; path = Vendor/common/mac/AIPluginRelease.xcconfig; sourceTree = SOURCE_ROOT; }; + 27E74DA727F7930C0083D233 /* AIPluginCommon.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = AIPluginCommon.xcconfig; path = Vendor/common/mac/AIPluginCommon.xcconfig; sourceTree = SOURCE_ROOT; }; 2AF5F7430CF5EF100091D961 /* AppContext.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = AppContext.cpp; path = Vendor/common/source/AppContext.cpp; sourceTree = SOURCE_ROOT; }; 2AF5F7440CF5EF100091D961 /* IllustratorSDK.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = IllustratorSDK.cpp; path = Vendor/common/source/IllustratorSDK.cpp; sourceTree = SOURCE_ROOT; }; 2AF5F7450CF5EF100091D961 /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = Vendor/common/source/Main.cpp; sourceTree = SOURCE_ROOT; }; @@ -58,9 +64,20 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 27E74DA427F792DA0083D233 /* xcconfigs */ = { + isa = PBXGroup; + children = ( + 27E74DA727F7930C0083D233 /* AIPluginCommon.xcconfig */, + 27E74DA527F7930C0083D233 /* AIPluginDebug.xcconfig */, + 27E74DA627F7930C0083D233 /* AIPluginRelease.xcconfig */, + ); + path = xcconfigs; + sourceTree = ""; + }; 508817C209F0C9740071BF1A = { isa = PBXGroup; children = ( + 27E74DA427F792DA0083D233 /* xcconfigs */, 508817F509F0CAB50071BF1A /* Sources */, 5088180609F0CDD00071BF1A /* Libraries */, 6EE2BA590A40BDD300CC7CE2 /* Resources */, @@ -163,17 +180,18 @@ 508817C409F0C9740071BF1A /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0720; + LastUpgradeCheck = 1320; }; buildConfigurationList = 508817C509F0C9740071BF1A /* Build configuration list for PBXProject "BloksAIPlugin" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( - English, - Japanese, - French, - German, + Base, + fr, + de, + ja, + en, ); mainGroup = 508817C209F0C9740071BF1A; productRefGroup = 508817D509F0C9AD0071BF1A /* Products */; @@ -190,6 +208,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 27E74DA827F7930C0083D233 /* AIPluginDebug.xcconfig in Resources */, + 27E74DAA27F7930C0083D233 /* AIPluginCommon.xcconfig in Resources */, + 27E74DA927F7930C0083D233 /* AIPluginRelease.xcconfig in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -230,29 +251,55 @@ /* Begin XCBuildConfiguration section */ 508817C609F0C9740071BF1A /* debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 27E74DA727F7930C0083D233 /* AIPluginCommon.xcconfig */; buildSettings = { AI_CONFIGURATION = debug; AI_LOCALE = en_US; AI_PLATFORM = xcode; ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CONFIGURATION_BUILD_DIR = "output/mac/$(AI_CONFIGURATION)"; CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/Default"; COPY_PHASE_STRIP = YES; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; DSTROOT = "/tmp/$(PROJECT_NAME).dst"; + ENABLE_STRICT_OBJC_MSGSEND = YES; EXPORTED_SYMBOLS_FILE = ""; FRAMEWORK_SEARCH_PATHS = "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)"; GCC_DEBUGGING_SYMBOLS = used; GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; GCC_INPUT_FILETYPE = sourcecode.cpp.cpp; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Vendor/common/includes/IllustratorSDK$(AI_CONFIGURATION).pch"; GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ( @@ -269,7 +316,6 @@ OBJROOT = .; ONLY_LINK_ESSENTIAL_SYMBOLS = YES; OTHER_LDFLAGS = ""; - PREBINDING = NO; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO; PRODUCT_NAME = BloksAIPlugin; @@ -291,29 +337,55 @@ }; 508817C709F0C9740071BF1A /* release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 27E74DA727F7930C0083D233 /* AIPluginCommon.xcconfig */; buildSettings = { AI_CONFIGURATION = release; AI_LOCALE = en_US; AI_PLATFORM = xcode; ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CONFIGURATION_BUILD_DIR = "output/mac/$(AI_CONFIGURATION)"; CONFIGURATION_TEMP_DIR = "$(PROJECT_TEMP_DIR)/Default"; COPY_PHASE_STRIP = YES; DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; DSTROOT = "/tmp/$(PROJECT_NAME).dst"; + ENABLE_STRICT_OBJC_MSGSEND = YES; EXPORTED_SYMBOLS_FILE = ""; FRAMEWORK_SEARCH_PATHS = "$(FRAMEWORK_SEARCH_PATHS_QUOTED_1)"; GCC_DEBUGGING_SYMBOLS = used; GCC_INCREASE_PRECOMPILED_HEADER_SHARING = YES; GCC_INPUT_FILETYPE = sourcecode.cpp.cpp; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 3; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "Vendor/common/includes/IllustratorSDK$(AI_CONFIGURATION).pch"; GCC_SYMBOLS_PRIVATE_EXTERN = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES; GCC_WARN_UNKNOWN_PRAGMAS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; GENERATE_PKGINFO_FILE = YES; HEADER_SEARCH_PATHS = ( @@ -330,7 +402,6 @@ OBJROOT = .; ONLY_LINK_ESSENTIAL_SYMBOLS = YES; OTHER_LDFLAGS = ""; - PREBINDING = NO; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRESERVE_DEAD_CODE_INITS_AND_TERMS = NO; PRODUCT_NAME = BloksAIPlugin; @@ -352,10 +423,12 @@ }; 508817D809F0C9AE0071BF1A /* debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 27E74DA527F7930C0083D233 /* AIPluginDebug.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + PRODUCT_BUNDLE_IDENTIFIER = "kSDKDefAIBundlePrefix.plugins.$(PRODUCT_NAME)"; SDKROOT = macosx; STRIP_STYLE = "non-global"; }; @@ -363,10 +436,12 @@ }; 508817D909F0C9AE0071BF1A /* release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = 27E74DA627F7930C0083D233 /* AIPluginRelease.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO; + PRODUCT_BUNDLE_IDENTIFIER = "kSDKDefAIBundlePrefix.plugins.$(PRODUCT_NAME)"; SDKROOT = macosx; STRIP_STYLE = "non-global"; }; diff --git a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h index b417aef..1828b02 100644 --- a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h +++ b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.h @@ -1,7 +1,6 @@ #ifndef __BloksAIPlugin_h__ #define __BloksAIPlugin_h__ -#include "IllustratorSDK.h" #include "Plugin.hpp" #include "BloksAIPluginID.h" diff --git a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.r b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.r index cf7495a..e5c9e25 100644 --- a/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.r +++ b/BloksAIPlugin/BloksAIPlugin/BloksAIPlugin.r @@ -1,4 +1,3 @@ #define PIPL_PLUGIN_NAME "BloksAIPlugin" -#include "Plugin.r" #include "BloksAIPluginID.h" #include diff --git a/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Info.plist b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Info.plist index 91890ee..c6436c2 100644 --- a/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Info.plist +++ b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 15G31 + 21E258 CFBundleDevelopmentRegion English CFBundleDisplayName @@ -11,11 +11,11 @@ CFBundleExecutable BloksAIPlugin CFBundleGetInfoHTML - BloksAIPlugin version 18 . 0 . 0 . 0, "Copyright 1987-2014 Adobe Systems Incorporated. All rights reserved." + BloksAIPlugin version 25 . 3 . 0 . 0, "Copyright © 1987-2021 by Adobe Inc. All rights reserved." CFBundleGetInfoString - BloksAIPlugin version 18 . 0 . 0 . 0, "Copyright 1987-2014 Adobe Systems Incorporated. All rights reserved." + BloksAIPlugin version 25 . 3 . 0 . 0, "Copyright © 1987-2021 by Adobe Inc. All rights reserved." CFBundleIdentifier - com.adobe.illustrator.plugins.BloksAIPlugin + kSDKDefAIBundlePrefix.plugins.BloksAIPlugin CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -23,7 +23,7 @@ CFBundlePackageType ARPI CFBundleShortVersionString - BloksAIPlugin version 18 . 0 . 0 . 0 + BloksAIPlugin version 25 . 3 . 0 . 0 CFBundleSignature ART5 CFBundleSupportedPlatforms @@ -31,23 +31,27 @@ MacOSX
CFBundleVersion - 18 . 0 . 0 . 0 + 25 . 3 . 0 . 0 CSResourcesFileMapped DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 7D1014 + 13C100 + DTPlatformName + macosx DTPlatformVersion - GM + 12.1 DTSDKBuild - 15E60 + 21C46 DTSDKName - macosx10.11 + macosx12.1 DTXcode - 0731 + 1321 DTXcodeBuild - 7D1014 + 13C100 + LSMinimumSystemVersion + 10.9 LSRequiresCarbon diff --git a/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/MacOS/BloksAIPlugin b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/MacOS/BloksAIPlugin old mode 100755 new mode 100644 index d21188fecd50285eef02b625376ca92031fbd15d..422b399321bb9e3d2b0c39217c2a6523c9018801 GIT binary patch literal 95328 zcmeIb33yaR);C_AjS!ZEEk-s2MhJU45cVx39l9kzBmoh{5JEx%*+@DVT$n%rY1&{^ zU=Yz^97Y)iF(Lw@Vgv<5MMOpx6&VJ#LtJnfL}cjy?^K=JTe^XndEf8(f8Wy$sk-OX zsZ*y;ovK?^_uf+RL2wq zs~RapDDw;9bj2?-FQ=d+rxZ9(e(UEc!nVwWV5r6UYb0NGaZ#DG!k+wUsSx}gQIR0n zt-g%cqRh$gm zUV>k)tD$(-w|1$@v4JxZd~JTSvdmdbjL4H;+A@_E!SyBh+WjKCxUjIeNaN_qZ^pwa zWrjw8*i}9*#*s>PXT)D-W~ynzI76~Y8}sUz#3P=uUEzt3E3d9XRK`(Koe+Z&4Muzk z1aW(XI0HChAIgCsQ}+w8Hd^(CDBy)nhN+UdeS{Y4n5sJT_3hgzF z{!Ivzmy`~`Q8^v+mb@2KH|*EPKe#Ef-<0GRVt|Vv`lewhsJY}VVZ!0p9DjNEqr9@; z=8uNytr7jw7nGTE3j3wz&n(R)>`E_g!EMK# zUWwRu3}*qg5Z&-c^}FyDV(60kkgPBCPrpw1BY1SIPDG~?#{ctcz^?(n2K*ZEYrwAo zzXtpo@N2-Y0lxfm+w9L!`ffav>F%U8B+NYYRaR(rrI)$)sNq~sR9z3A)uQ6G*{PwiLmVFG`(?U&EvtlB|(oe&eZbkNn@usRbYj^!8=F49OL>mb8eE)=BCUf_>fs?m=s!)hTu!z8ps%w%lK^J9`cE5Xnye4T zgxVJ2OEOaFSd--)lO;I@TH*TG)1sHwg)g~$)oyPrS3^gZ!g5-%9&b5=7HMey+IYkG zE|$}_Pw=_0<%F^7?a;du?@64VcyD6n^nI#bWSdW~?}(46Wa~^xxBO(XT!q5QkO^uI zzB}>W>HG9{TR4PG9P$i4v=Zf=5-ax%#)UAqFkb@5%PP9lWlVus9 zET@S>{UorX64KL*mfx%oMo&(vWSM8k;5o+yhhY$Dr423=t}78WPQ1w4y!XR`i8#AlZN*% zWPWc96^CLBM~v1cM$1)uT7}V?unOoo%`sDa zsmT_;G|Cmf9QZl9d(la4-~Y>QH|Xv4mmsliWjyJ1KQ!Mykwp8#mI@5@+m?vQZuE6( zeA42?Dd{kzRO?Ps?f9h^%~3?X5$!{9D00CPq}q+vKrqx_M9b>yq&2gpBR|^QUQ+|1 zT!>PwFT3$fW1idfPM*w2_93z@8qKac49H}ChBz3Pep=oQRT?{58IzS5z?f3lm~vWC zr6s8{rtM=jV`@z*INloch=(Cx!!0Ij2x?}pAr(Sz4Uwj*=Vbjfdr}aYkL>8OlPjI> zAEg*wic{LzjhJ+>i-sufA+Fb2jV_Xgs`kN3j?23Q4KFqw)dEueM9hXT4N&}^20t3()=TqB_?6Mi7`<1a ze_?bnqtCdbr!u-DK7Ix7t4y89Xp=(!i_tw9y;z~`jBdl|jS4L=@KJ@Y^iu*x<9lH6 z4rcV1jHb_ofo{p@!;G#}=vx@QlhHcdpFq8l(Hj{3PlaBIyAl;?Vf1VGSQgZkj4oyL z1%+P2=(~Y_jhYl{Tsl_?Pd8EAH*KRh%bpO)X(^*)8U3|FQvpQXN}-o_0~3=qD8^{5 zJOV}6zoeRMBE|$FJKtAn|=CG*OEFr*-dSDQU7Uu3yD~WyG_ms8e%_7LM70(n;5Ih zPtb(Hni6dqwj_qe+wdjpz*;JVP-%o(`V3H{7AbpN{bE&k85jOo9~TY&kx9`An{Zj* zTMnqyD5KNrZvlYHsL|4Hn~IEbqM-NY_$?<~OYlohcrd|#bix$`Kjwr- z6THX?FDH1O6E+f@1(+s-G>ZQD0$pS6(4E)J+DzA1Y_z^fjbOyuBiPm=l$Ja^m-Ecw zI=B0O>DsfN8vK8I9kF(;Zt*I7pBSqyC7YWK86Ij5Ggj3FHGHqHYX|`@e05#;4z0DZ z+&O?*z>>Q1JB?K%?iz-US3Vwdl2}~PoFvg$Jz@>+;8^#K0BX+_4Au4sEE{7%-jm49 zok9MqT>OnF0Hq?Kwe)Ral+HUtFtm{A_0Pu;Lauz|S{{2ZJLJT<2{vTHTRlvMZM58n z%+Hf~q7DZlFgm@2Tj_2Agslz?c>S&|)~o&$OQid&s8{KX2dbzyVscAsIO<4hdBLSl zudhUPX_dipSrfj*JZF0SEnw`B>nD`?bS#Q901GVyL3M3`TL&CE3EfQkhhd&7Hx2`h*6|Qv0f-C-^%t?-rGJ+TFK-6n zz;FC6qeX`qt?ge;v0`07tNX_x0Jx**ZZN>$I^0oBmXu4fj$hdxZcV9%gQluz)Xz}@ z6tO{n(a9c~8Nb$8)kV=vKB#sO>@~E4gnDSfZ$*jNg$ZBMk|xAZgSmr?!iJ$(sW7=g zbgSHBse0S!vcb|2&;V`j1FMEmzWUlW5KPHdR&-G|;M$t8Cd(%#%gLlvpjg$E7#i^;>vk3EEquB6ap+0OQwgCGT6FTxqEXqW2p zU21*}Y&&3JG+)^kLI#*aSfYJ@!)vH?LldgsexXwf{#ci~ICdql%c@r19~vzmW6LYG zdUgbCEdu5MiH~3hh}u60m8?$ajd=jwhkzL`F-XT+#@4Nc!rOY_4nqW~maCxY;Yt&r z(FB7=PIAHBUPHG;D#!L6d{8yq30n#h|zW-8X#a55~C{ql{ISZ$Pq@BGv__ot}atA-E6-Yd~90iB(8oX^RvEtFIO-VIO6 zlI6}+_|CCGxkJW=qL(^1X)yAH@0=K7ock`?q}|g}f{v}Q*%Jj*%}pF~pzJ8@F@o+N z?;5KHi}F?w#gHZaN-zbt)>+@=mhFrfTWf=gv)hQ-?w3wpWokv3jgMd}p0;?gdg|H>v8cY~xj}-a>^M zK1aD@7CqQ4R5tfZRKZYcw&!tmz?pAts_rXWJC)Cph>_ENFgMX6b<%J|y9ZhCg*HAl zca+0XBy_Td8@Q8hebkr%?p%J1{n*WpA?OheZ1^%K>fQroIyj(g1#PvEc^FrYB#Pk5Et!3JTv5 zd2z1}6DsQzC}Ms@Lx|D7-}uparN-CL0J8n2*Y9=Z49ZaC1Sz#jIjB5ZMb=&au5FrI z66sW>9JO8anKBh6IoUb#ILidz0Pnfy=%(48c1zN%5ABb%fB8sr@}8r+%l2n1Vx0oG z_e9)5jPg<4Kjmy?dM)e$J3yB4?^_Pp`eKL=-+@8*E#pV^n{-BNI-VzfVhm6I!C19F z08^YzsYAXBUsgkAhEbUw-_51Ff;IS*Tz_IeyHc9qK2z1(SB>`fFjqK&Sx8Oz4nyrG z9X(t$?82b_kio?#ht?9*(czy)>!hStgN+n!haYjJO~jaMnQZ{Z^n3>#jN zw*xAbcp9yfF-ak5G4FWEWGxBT+c)XT!%}hE81i9hSVKElrE$pdvKA{k4oh5q&j|3q zsF0gjHEV>dL#=HUF}4~uVVrTBLE!1pzJ``^@*s<(6)-MpZP}Cox1uD(s&$}KJnj4q z6J}$z;Y@fBB>zJFVXy6L%7pQzD`sal>UqF*k_A3wvt5>|qMf#=yYWm8^VUm&W<1x8 z*#{}>8ZOYi&kDMulI{!J(J0lI)sx@g+1S;k2b&lzj$tRk#m<6LDM>yE!CV z9Nfb&e}Kpro9N6<@q8}A_Gd81EgM5hQbb~SL`Zn6KxnBOo?78~A@Md=jS}W?H1+q` zub?^w+S8)cc>np|xtF1DR8PNPth$v<;sDWEPTFf|F#tLGksO#6(p^g%`>+N<&kbG$ zQjDRB+bBq48;zjhdm76s!JNvUUN5)@Bg0%|m~P)t3C*aqX`JRdr}J&+Ddv<)#?%R`rEgy_gz zj+m_DLznBMiPlAu>dCUMY0|gJ@?g?6lKu-@31ZTxV|4!}nnnq^U>J#=iSQ+Bq%Hnr z8wyI3uiru z_Nup|9XAuL+t%6UQ4)$=4TiF}%G%(5+Zt^fgH+I9#wgm(2{T$MLZ{a!A;nn&>2>MFid$%W zLbhaN$4Uz8v=C!;&{SMv_Z>ZtSe|Li{oXn;6p8bUx{Law#vz}Wo8?x;v_i%A2GC&P zT*K<@)9b%RCRyL<^ hrq@TK!Daj6X{&sOcM)xc8J6s?H_;pdPmyb)(O-?${&IBQ zYfAPl@5&L*Zcw7o!lKL8=u`Gh+itr#246wto7sbQ+1EZ|XR zZjZS_@D(g_@XiKCqd6dQ4yGiNoDV?e6OtwtG$}r5wo95g&~)`iV-0=+1ZWbhLr>Y$ zMuYA$9>#c#nbzP!P))bbFv_}eUsV7x|bs_$RF9QmuJFf2jDY{)^oMjPx2ek14xmAJ*Vk zkeeQJ!DL)D_YBbXw5h0VbJW(mcJG%oGeBee*^>qpyjyY3b8?0fm06FbBvNMyGXE8s z9qMEm9F&n7Wd$e~d7-2i41zCoCzGR{El}OrfHR@f8n*zaj4 z(^`4P9eYw?ZSL58z}jmr07?C`&rjSxp~k-;1$XdENTPNC=J$$&a2ZoD63cfM=uNla z`y{VWrTDWyN-J<3f$zkqLc`@>!?k%C%#>PeBxOvaUbjW%;wgwM7sDV(I#AiwldquD zVP@0vfB{cVgxEzvL!i}gg$6)v&SDMz7ON$DO%x-3+ z+~nWF7+sAU8tt4}TWkgk%x>(D$-x#AJ$mx<6qJ!_&8fp(GbJ1_npZdPfT`x8<;JTG(W%uB;ElGgu?c6l{YyT9Fq|+|eTbbqY(810AAuZ0 z-ZQtvinncQuBEM!MEMqXj;SK?VhE;xcn>JT_FPL+0PP}<#j71D5#bR{@HSq^{wB1+ z5+H1t-eUy8)XwE5OY}AqGKM$fJvO|lLn7jK*bQjXFD97f0hrfWe-|;mJ`qU1S3v94 zlP?*ox>C!oj-kR6?3hT%ooq}A4M-!E)1o()WV5#Tf)=l8(R*NYD7|!rh3{TMR<{fP zfz086E!~h$Dw-EU zy-YJSykdn&%9aYMSDaKc6xBWtD!eBY{HT*EPf?~kU z2nkq)o@hopu5T07UAQ!0_7*ZnmzdcQN*!s|DZ5>5N5*OQ2dPDxJ4`j=l?daohe=E3 zp12@InCIex>KeY}L$ZTm4^u_Lmn0#?TNWP^Kx?Gw8{8#b+Eqzf-W0KQTom4C4PSDV zI8=`amSQKoOe~JtKSDQIy|4Zp(j=#cz-cV%JQj7v4r;LBy4k{0`(lMh<<)qm%!z(ZY7;2W@d zXMvwKDsa8RP=RaIB^7v5U1|l&nKf;+$^xmYzf6<)4YoH?o%-MV62L?P40jV?c_RTj zI0b0u6rjdc0CRT~rV4MkWsdG{S#&arZfLJTw13{vT!Uf(;T77|`@(nZgK191nhtyI zAq_!l@BM)7R@fbNI%zIm+r2uP8sZDvLrq-u*Q}BF_q1^|*c5e1`fK43|AA;huj)wg zrQDA|A1o6|AeXyW->g9U+n)TAMv8qHENB*wIzWOG@-`wzCOMn4eRmE-)xqs(aKVbD z`hf^)-d0s)?TENL8z6vu2Bvyu{SI)GqfGra4B2!gbE!vYc;3{3xHWMdi7-km!iF~P zgQ4I|IcUbr^9AP>y#q+Mz!n)Gmap#Zx8EUW(hy%X+9bS0wYRo-k%kS|O~N&5IQd6| z8Y}++GFj*8^=nvOdWRe(rCNi}ca|ktKCv9a{z@WVwv>w`rkh@W*gXdcWo_{aWwKf- zrBdk~bXg;oUQ#@9U5a^%V!3Y~6R%6rM^V)H=F!Y61?_OqcEq>XK6PwI)WSGzFCkFd z5kDMptT7I<4%7;uYNRL+k$b~8fyHLpsFmAWa?NAAla|_!O&F;cYw%K8P83ffwAo`Z zu()MKYjCEdiuIr}0gC}K%@eP8!LP#9Q{!^8B~W4qdtkqX-D4)?hD9r4-&uAD z`oO?`2YL`5-C_lt zjrJy$5B(y-R|iTlR2Os9W*kW6jDC9kzc5u}JA>WE6A#*bbFGu0PlPnTPOr_^IjOieJkBnxnzvHtlRHDmoXhHnF0@oZeG(gUd5pPy8K}(_t-;fg7h~iRWTKXK(^8`1E45UoxHjN5 zArDOtW3G?7aBV_4t(C5;8#m5h%Y9z070)Q%k2dE0#d%fl{u*yLE`L;9qvz@rHA~ z7m?Ie-$cu&ICzaAVK+Yo#?#?uUqPYOlh4p}ea?VPynEk9eihRRH`_C|x2QVUm$Q9R z&o7Q*9}ZhrlqjD$zfP@;^<5P7Epg+&$LjzXyYgPkn2?x+uTpj*xq_4JHB<|9)9_Xl z4MG33Z32dN#;`Vf1fmtvjw8(H_Y$2FDi=>B7>!NVkw`8=vh4wtMvpwhmt;87N+~T< zrD2|lw84(F`IJU;RV;v_Wm-o^+WnN)U8TihMYXg}${ubwS^o=$c5T1$jO}Gwfsr;2 zVvRwQn~umtZNmFRa!0VKjhdDA-5d`LxoyW%W$>KD@(Xqd=pn0ym(Om!;HeVk=5m0= z6Nf{{wF?FE9Kx|TMDOaW*Bflu^2D+gk1?%DR7pH`rWdN|dnav@Z$C3fH&p}FKAv@y zTmib>5vqQNX&3f3FG*o%#B#az+j6l0x8Ig0!#Of6kYSMwOJrCoL$eI$%dkR*_sj4> z87`Dzr3@F#aET0;$#A(0SIF=Y8LpIJjSL@`;VK!fk>Oeyu9M+<89pP!4KjRIh8q#4 zR(G0?Rb*ni{kGM#n#_Z~L_KOZ5aQFKLnk$G8kMKgiCQo7nhS8M2MJ6*j@ zSDWeTW4fZJn|VQKA35X78%I}<5bg=OT1;18(^Ums^~YFHUqn|E>1q~TVJR-^r_t4N zx=N#~XXz@1u6EPaaJu@IN{gqf!-R{atFP&*GhO{cS8eI43C67YFuIDQD|*6`cN<;N z)6KjDy7~rJqcX;)7}8TFP0C0~OioRlk}+}Ocw_pcjBy5IQijQxG%h1GgWlDjmC_}B zUUp)av`J;N3?*~R3=<|Mr%lXA&qt-`H!!WBe0F}3h}Wklk4v0cTy9o~GNU>H62;5k zg!rud1Vd?Qaj8M*`;RFoo?Dh^;=J~!TIhn>1V-tYr`@h=Nr%T7LpKGAv>#D5Sf5?j zLJSdNNazNgNL)ZD!nGEE4iWf!L-%}Zakj}xEKnpqR?t@}>viF;1&R~87Ow`1^#RRZ z3KY8o!d?s%rvjS45GcM1fFXcKjKE9V`qo!;BB=%5M!u`%H##x9#d)1rqzkj@gjKf` ztfY)V!OdJ`j24qI4m95xAo7~N5+I(`wcHaRp4YW}JwUvoqt7D1J2bM(Jz@~#miZ$C zJ2>(`)lSzuBCwsV4Mgq~9OJ;-b*z_<9h8% z?;YP(^b(@if_(vEi|%)C1&F@}BnXk7S8kqFd|#2cGpn=+$8!#io?MidRWz$0XI6BH zG}-9FoU*d4**Qa_v$F~ca!RAS-d5H%x-6$4C)-@CpfHi17M+-#4MH)wsGvA&mY9?y zBj8O%=A6>ptn3_-Zq6z-mzNN6QdV|ejv%}4lV22_R$e+A$!XDPrNuZ7)tsMGCK9vf zmFJh{5Tl%|vK*0Uik?tx&d<%qajDw%0#MOef6?Q!iXdUBNG^sLgdvjgIYs3Zk1eKf zatY1_lx$M+3m}n9$uUQ#Wzji-K%hudwCZWmV@r!6Ctz9Rf@s66e6vhP-kj)^;?lw_ zGbJbGPq|lXH~n>3WjOb#hL2DJd#CIbYR>2uwv@kg56ebD|BoxoAJ4 zaRHUM?iz7T9$PG_J#)zxE-5a6em&Ibn%PuTQf`jUSWqGx!8IivhIOr+NySC;VHMFy z#RV|9^b)cq55W^>%_%Qq3aMyU{zhrfum`d-WX#AfRPCQskY6&hIIDCPVUx0oP(lf8 z3fBe2MUpf*zpSJf)^{hJFi8bFOzqCnd{ozghn<$8JGf$!b8@rF3(PJwx0OXFmXt)x zet`bvYR|wI16s6Jd}C3{!{A${#v3JuR`Ipg4Qz zP#M9TaQ{R9!ilSW?<4gVne(z1wmIrDRh%w>JkFltc;G7xwjTGfqEToT5( z**UX>DK$OAM;@X28Hlr)_&Rcw=1eY{RV+$Mb8rS}u@9~esY`Rx^NQ~?=FiHRRE|-# zjPjKMlLt(x!d$03)O&J?s&xsj%S)s}V2HExaYSlqv`pd=Od56i)O6Xd)V9&-IT(sz z@P#D>82yBtX%JN+I+}AB#t0`BlrFQPDjl;GNj^O=)~gwk6DDkCX761 z7gIM0ry`bdJ%z9UN)NHljuSHkVUP$7ncY8D7T zFF}AG!H*EW41Xgqr$@XNbM_gCw~xky3X1Wb=p%^xrr|*!;v7?p(1; zr?iy{(NOK?4+6hTh>*5G#{`JLWdTBWB|wDk!FJ5yAQ3n2J>v(X;@uIYcz6 z#d>E_YoR;XT8Q(AyR`wnjR+mnPK12dPBgh1DRdP#iNGIk5>01fj#v{Vf;L8pkfNJ~ z?%A7#*n;>VVjJQZY^U^XFLbvfo{4y2dl7sL*QarP8S&r_Lf5yW2wl-hgk8qAW82O` zH@ve5Ea@zQR^j?>#22tF8+nTey(d~U8QevPX)u5dh+ppl84wTeDgy8CinhL0=q}xg z^O$2q@I5giq&7x~y)i-;hNr3>Zxgz;h|hHs0bRQbT}pSz-CZc3vn6o$o^=v{vu!<{!ZgMZGZ@+tVs~ZddnEDFw;1m#qoZQX)K`M z)sZR=p>;fdEjgaRF^v`Un>1QR;$DvDaJ+?M8cXPR!KC6#9E;l(9LjM7$2~cY=XfZ` zDI8DY_+F0Za6F&m#T>8Xcpb;jalDP=Jscn6_!ExLa{L{~mpKj@r{rzTaeI!ta@>>S zfgF$Fcml`MIL_s`l;edQui$tM$Io)SmE+wU@8|d^$EP`tP~wS89_>DZ+r4PKA~18T z(F=^@u0O4x&B{>NB92#ZtmTXL$fxmGyHs77vsHXQ$DVe!gz=tsHj-{q`2BC&8Qpv6 z=eIMZhkw`3dUN}0 z)`#0qOJCwq{^|vaERd=59#$8BW;~_<@>jz6os9p6GgL7CUB>^&_)5l~Vmy6oO26fd zw=w<#<7*iI8{@xa{94AV+}Ofm`L&zjCQk3e_#Zf5E#nQ0Z(#f`4}Kb7f9%(QUju#( z_%-0yfL{ZC4fr+S*MMIGehv6F;Mag(1AYzoHQ?8PUju#(_%-0yfL{ZC4fr+S*MMIG zehv6F;Mag(1AYzoHQ?8PUju#(_%-0yfL{ZC4fr+S*MMIGehv6F;Mag(1AYzoHQ?8P zUju#(_%-0yfL{ZC4g9AXXw@ZRl3_-8%H4@Gh9{PUrsFRou_OY(q%oC2Q6-@zp_3Aw z|1|iHR--dBGm}!_a;D6jRb*D~KavWv%E~6?jLw{!l)^4# zic8rIkEpD~i3Reft7#2x)6&g@ii*v7rN#G&N^)bzX_S;K|%-Izcneg0I zR$P=-kZ)d)IX_NR*1~YgTDgq?j-ISI9n6;o_7QphE znKSc?fE1OXHSlpFTf@~W-W~HIHk=7jicNP-sEl?|-deckRE2xfQllEqf>zKT`qGb zJep;~4^m-qktubi-e90K*=I8gB-cz>4}2xgC+=%K*yuAUe||QssuT{AZkW#o=A)$1 z$Gb8yWlu=Y)a&6Asx;GFngzFTrfh=&xFK+kR}2SU#ifKW49vuMkZ(4mjms`1**5(T z@Jx$rzm|p~YlDfGd@ffXx0WUcTX2OG1Q6}n= zEgP*efLcdp%|Wv{@XMWeHHv~uO@K#N&&|p&kZnT=xg}@^b1uOf2rhHNni@Hpv-BaH#uv{FB+c(Z<_~ovrUC1#ieHH zl&nl_9aSc_j}n0s#1OrBs$Yg!H9`dG#rT2Z16{nh961i&H^r~FioiJdV`KMb;z18L zoDF@*ho|NeN~{|y0+PfsU9zaviGX-R+TipwC4zWPr*{SastXi#X1Fo>3eJ&0IbZAn z!F;g~_(#ftf1QH;@N^Ww4F0ZT!JoQWG)orm1n9*-0urRVMC3c!bddO>=@5AG8e332 zGpoRmmYylLhQ*5)nh#Wt3k_-dL5U{K&)j(B$Whd`94vOUoCW&%qBb%~?1(J7&rm3A zks^@9IT;X#@U#^0ES#ertAJFeDuigN7b^ne#G^s|#ovPlrHL1V2Z$eo<3&xA1o1@Z z5V1XMpr~plf+yvW%9Rt-{Iu-!xJ(qZB8Yqep} z(c}O%xp%cwt{a)N*cfTT-JkqSjxU>SkOhhFAn-ZJ8kh>taY~DZJn>o3*kW>gXENs$ zs1ht%mKv+g!5A$S1&z=UYL580siWq} z;&>}G^ZnpfT!u-E^oPj|=L=gfIfYaHI337ugQYnukCZQk2a2l?p*fZ7}Af4iN-*`f4(sK^{RO#?^T1&WmOOOGAT#A*8~na zzm7=G5r2TD4Jn@~<%I1eBZ|Dra<5N}|aLYo)x}N;>}}k(K{X5PEcik6HzZ zqm?=Vzp^qsFT*X1bg&m@qs$!rX;awPV(G{dYzCk&kxxslsBP#dMXFOc1|xLDeDQN+ zkk}4(LE-}WT@KLvEV@_emoS=gNH3{QU!W)^K~@X*6|I~Q1|`rgTwR5|Zm>AhCOm)zG<`zIHxYpv8L!j+YHvyH#PHnz!vcFS-U)s~3Fjrhi;|x*TJD9e%JbeI{~m!Gr_%u4GBm2` zJLs8_bDW1jit;PKM9PaGMPG$nX$C5kQ_z z8x0f>w}y}4#^~zSLE;mc_pA)Rli_8_=UM~iiPq9nt-7x|=P&tUGscT$Ye>k)5sCoz zG3>irzSKrJ%)MT(JcOROPBMO0hMQ%$Ll)xVP8b~rZSPd4N^mYurHvqQV4X*r%lL5F3vPRZ~q8U854 zt1?`HQyhZC8W}z-!>uyhEyMi?MF6`MMq5L^MmO8Fk-WR%BmEh)-%-i!v<%P7aP3+u zxAIBi?>1lkB+_lZ`WbRR4k`?q>!c0HaIFkC%kV3NBEW}B`*k;AGQF;Y2ucqqKWLLD4J;>j0zIpNtu6^G869gD4Oo>Maor~vgRqOfup#1!j!EKdM}2%s zX>nm1e2T-fa3QwUx(+79NIJb*mTQ$Q5Rb{N4y^^0<*>X zPG(UPtB;#D$&dnTEr*NsbFrAv(w)MwiDD>%OJi(Ehz~n?$L~dv%jx77D&{;D^HKDC zv7d@LDvPP=Y!-iTFXp`OVs>=)Ud%xhv-U64PS474j|^9Brn<_Fn8sTldT)Clde6-d zgLw9qOnqE7ZPsR{K@SFTxl53EhByaK@Vc!cPTfMyx4T=~IND-OBJGiiR-jtga=F2B zz1Q=-Xmeu@X4L0pIp61%S@XjK;y^u6vLf^PjE5cKCR|AwF!A?SAy6jN~7 zVr09Ic9pifu`Ai`+OFc6uF(2liDnnV|GHH#b@gb~tKffB^8ZHiCmEi&Rm$+>t(a(T z`5!3s+gm*f{Ry16fOC*IDEWI1FHgoehm^_zB2+Ivh)EDXV66D4d%W1!V-WTeOR`FH z4B}#s0l8Qx8N}vZgR`^5kzV-~*avy8j|kC=jkgV$O%sH4^DMsYcsH)?;QLw6{$gG4 zLBuOFH@_4{j~)2T;#@T*6&8y3d&i5Ty+t56W)zPp$Jq<$65rmIRpu~s++Ot9`*eA3 zA-2b6WA_uj)TOY6v;`lR31*-4#6Xo@=v|zx-AMbH17xrBL9>J`M=J2pi=@Wg*to*n zt`wyi!2fu+Y#g~!ib4HCk05bOCerP)p&JeKSGxy^+Lx#!qcVwQ2CrgFqD|7c#BwuN z)|6ccj5g|1H+!dh4lNeJaAU7h)d)Z1__Sl-4F21QzuMph#ij1$=G;vEK*OZ8ab~eQ zwyb<+8O9Wdx~>nT2XT;iUxuH^aQ!P(pF;6utT=(HUfQ9+O|jxMKpReL3KBoc@QMs~ zze<=RGCU>2b241EoA5O<+%CgCGW<-2U&(OYYs5TDtn2~z{d9A|7`?oY2q-DRUMb&` zw)7|~%b#7u&>K+d#@BQ@h`$q;2f+Y07{$g6^E=-oE<3BJ7=G`w3X)t5K;7TgLP<5R zQ|@(K4S&4$IyoZnZKzflvg@ zDHOYVDQgyWsLutNwyX~FibH_c*AZ1&P73u+MOP@k>xJVt@MsA#t_1IGk_McX^kz;g zdZXsRV)I0DS_SxLN#)WnUHaty-g#MN>E(EQFdLiXv{2pxzAN4$4jT}P0B7Y~vR&zo zUYnTCGg9Q*hFm*juJ>hlR)$w(xNZfLjh(SAW<$pK=%=OBf<-=!i3XjN33dd?N5IMPp_l3!6? zqPB6S zm|33Ii$I8?$Bgf1J?4Hj{ZT`r0QNh=?uZ9=8?YNBmS!Tg@!loA6z{v_CE&2x!Qn?A z9Ijr2!wPU%@e%2Ml?-2(;eHv~5Mov6I*r@XAJ58@QYKGI6~`#&(MA-9ofM})u>}-Z zKg;lfq$b<_u0P#^en$G^A5(gr3=bg`VT17alNj}i)~y-A116ZGQqgn_)$o0;ZCqiHk6(ZPeq(mfBgFw7KJh719Oy$BpT1ECfV zjgOb9jau6<$#+96ABu(eF{;WM89pb&*JXH2hTk9*O@_!$T1F3QF*f8E;`kmKtzR8D zNW3{vk8)GQ#lZt9hTVxZLr4^{e@K5siDlYk8W~m&jbjv50?Rg(zxZ#|7>1%*joAM{ z9OXml;?l&TS!$zX4ra~b;t(tyC|@9!^kVZMwtLyan94XB`vPgqRpRqQL;y``aJ~}M z=C!wp3xga-rud-PkDjwtimgs-5zh{GNWil-kLmgO!LH?E%{JIs#(eQU_#Fm6+&g4= zS%xbMhLjf+&^i{jQ3v%Lmg$r@p%`UB+1rP> zmbn`=t4f)Im&g3qUL$HjvM+!QEk)UaTCZR`#C_ zrQUWHCi0o&c7eFb$ATAS$`zz6`J75yA;TIOUibo3ctmI$mf&$J4sD@`&BF(Z+TlaI zoU%j7X({v5#!VQIT~<++kV6MLCCKx3a1%7756Tpav8b1o&<@&>EH@5!JIMz)FC4_m z5zzM;l6DJ1?1Ffl<#PkYUm2cXMz=8fBQbJt8jx5HzHdvu=M?w9QyFy#@yJj-J7S7h zHqs>C9w~yfyPIu&Kw7m%JN>P97+#1%Y~A0tkV;xhy1g0&~yV%un!2lu;1PZoPdr-)BSt1&@6pOa@riIw1UNph%slqA8dSp03YI&4Z& zi{&6$E)%s4stco4w-FadV-}7iw15mZ$Z(SkYh}0#A^qyi-MYmz4_g@+5;k-G-oVh% z(YNo`HE%v9^!3)E__YrWZQkeyyeF=2UhDZ`A+3jphJ-~$g&YptqN@qG|NfGgu(pSE z1Hw8+4-f0uGOXj2u#N-5y0vfLKBi;GZl48|w2vJS6W2Seb=dxZ&vac=Iu49&85TA& zGAyiXSWH;wumNE)F)^_b85yl(Vp{j?85ts}x>!@9~}->`v^5s^`pH9DeWL|kM{=gyr|l9N+XS|>-QB)4zfx^3H# zkTU@>QBl#xwnCihg|m#HmobK{VA2nr&kzp7-9MBdA?O?ug3ryCpycIHE5ipFKF07j3}0gS>_#_)p-N8l_r`fXs?$neJu_hxutsN(-DpW|~k!{4N<{EHZ_;QGJ9aA$^Z zZmROva`|Zt-^2B(V7M*QZ)SKcm-jit1DO6Y!+H0p@}t5O|02$BVR#+Wf5~tu(}y=x z^l^8o{Cyb?Vfxz{KE?Do43FgWYKHf)d~Y%w%J7d2M=*VOb5&ji&a$IlABKmryw5P4 z%k-BSrZe#97t=!JAIkQU#PB(mFO%UT4ByXiD%Wo{!*tdj{c0JW$@cOg!}n&Z^zRwI zGE>13Emiqj=P1~~@M(tcXE?S{r9Z`R?OX-F!|-9IuV?r&!!5!U|HqkrB*Q^@Dt|V^ zW=^Nm#Hl}}G5jIJLm58La3u3@5~1jO=PQ0a7%pLWEWDih8Hs&$?)$Pu48^%7?x)rqDpTue2CLeF|3_` z7TB80AFk@(iDB)0vJ{5Tk5lPc3~T3!)iB(1yh?wOVeMS5j~Ld@J^PK}s8mJYrHv|I zI|nV5VeOo?hZxq*KdWU}J16c8!>w7qW^ENe?VPV+49^*@%A3Zpb{?ITVeOo@oeXQ| zwf%!(?HsFi?G%6Q+`6$0Yv;(B8P?8Idye5rT>dGB*WIqn63~T4)En`?af9-jOwe$WCGOV4~*TArL{@yJ&EB@NKeaQ@K=h;~p*3Q8@%y22o z*RH+Fubq!~7sJ~5eXAMP&g=VtVeOo~HaPf;^rfArcQ?b@IeX7DyoKB6HHLd~d;UYq z&;22!qvEHX!`GYP?VR7puy$@>5yRT~acdaX&L!N#uy*d@35G+tydM~TocmW;Csn?7 zE@OL!weuQ#GTfT;4`sNL^N(XViqr3A_}NLyewQ%3HC@3kFudyy1s`Jg9MgYIFvj=| z53BT`&Pu*`PVdF=eujrJJd*j1WB4qWcQ?ayhAjQ&GW_5@3VxR1+j)NR5yN!WEd9c7 zQRUOwvhzADv-KzcJAYz9&gnHi2}_-Tfh zae1#Ye0z~9|0Kh7<}dv&GfZdw(yv2|Dv!?mrQZmK>Fi(nWimXN`7LIc&J3pCCWh%O zVfr0rcrDK-{>kt{<`;dNDsM5Tn;7oQ{8uvEjniLXIE>{#&9LC~%M8;Q#q_(Wo8nJr z71J+);o(d_k>LV{^BK-yxQgIrIHP%~%DF& zHiotHKZCogbnX1m))KB1+Bu)M5{&X|t5p8M43B1bGQ-A2Dt#uwEpYv?g69#8@uZUB zN`|%b5UUy1&Ov;V;R>dIj$!Rw!`B(s&ObcNuy*d^afb6AR^^{%cm~7YFsz-c_zS}& zoE{h}giiif`P+EF13lnL9`JMz_yG_2aSwQl2mGdj16Aole5l|64G!-ig>%4Z9`Ms1 z@L3P|7Y{hNr#rt$4>;BXp6CHDkZ`3#o<$z8#RL9>2fW<_e$4|uB4KJ0_4`r5j`EuK za+m)W4>-;P9^nC}E7+m$91pm{1FrIbA5pMFzCU`TZ}xz8h>r@*A{>6@OKmbI^eG({yO2WGyZPDUo`%@;_p`c z#o+HY{B_4)PyF@9UmyJS#a}=C#o-UX(UFLMR?Sh_4cD>w>w&*s_|xO>{|7Qk=`z(W zvHa2tpNZ5dOiiYzC5@2u*is^0KN{2bzmX>v zUa~cQ_|cfi>tmP3WCQ<$2OwU!czGhynCd@#+|!7WuP0cI2%QhK8YQ8Ly|hS@*LHF? zscY-WZ!INX_b&tWH}oonw~ROTa)pz-U_~<5-8t)`8u-qa`;Vg?}-W8OOQU29j{AzPal}& z`Uc<)(BO4IUsSGd5Bi{SzI^DNV36~@KOY3p9I=Fg5C+7@8|or9Vg8V8-sh6 z{}nqJ;`~m)x9ILfz8cGg>V|9Rk>`J>ir4%4!F!w1?E>%PyL`=X4Z3WvuLAq9YRNg< z$9ECeD8zg%er8|Ig3|u`QRLsOp05J`jaU4A>S5A2kJp>7K}qko`Ao*!%0AQ7ZNBlH zf~E*JWE4dA?-_;6@$VT0W$|egGSR0|#Q&c*3f~3(_eMdyZ_Fr&@)|}FPp`21Fbdz( z2ggjgvAsBFfQ{x7jyH3;Jnahsz2_Uyp6QKVnq~sWmmm6gEN`y&qM_GJ&Uf_G2=4JN zu%;T9l005GF1DBgzEzTAWjEM;~++$23kcz0o*I^!_$vqk;$GMQG2r znHv)^*Bg7g*)#h!U$6Egc6l+|Gs*20ZqG!%VYz%j=9R+neyW$$YrV1UmE6nA!gyia zE2&Gjb2KPKZrp-A#$Kx)G`9J!2X%7auN^lMPK`|7UVQgT>a`v&gM*`TuET;8>5bBD zDB!mk^>Np7+d`5#2;JPhxTRdnw~H$wc8?0^t!n8{Dqpsr#$A7X-!yKV8oQ-&OZMs? z$Bn|_Fvgp!99PPC?fY*jwR7d}Ed*>KC_#XFB%y0hOq9Isr%QIA{J>-+0*BX`)2HhOvY zZs9!-W-9nT0vyIu zt&*!-l^b!n;)4xz=J4loT}LmjJm~J=>=kYr_v-n_EiX-$9d}ZZ^BAn6)!5tJ4`&+0ChpD`9_Ej`Y>FTcRr$&%{RFZ(MR-%d?IP znPaUrP}R@zyoF)Maz%qRg^^=WkFSFD`fIyypklpd^X}EbC;4m_pAkOYKHN}lxu0=O z&k(-Y#Cv@6?vu{zC-c6j`+NT|-zT}}_xipFZ_IIruiOKDI6Lr3@2s*@IffO>u70?-5_l8sE^du7wL`D<>&3r@2q_gI6uB_Oh8}5yM9>hox=5F>&6s~ zKBaF=qJ4kwxiw1-<*cqo<@#lKV_t*2eUI;j3^numfqr9BA1(wM5&kD`3>qC?$9XB)hR=xL^mG|jZz(MAsVGPTthTUarlowN`}evTWX2)@%9Cckr^hQ zdnv&6V`@rG_r@>%TKv*o`MI5kK>Vh7<2U76{H8egxw}r!EK4*w-;)yr((*<+?vnt2 z8co-Z&#?(;{OvVi-8?!MA;ZMZv*aQcR zKH=lQ1P6(iqY{wDvrmCbCAB(`!Q*%YM=JF_=cx(a(R3t&Yf7p*3&Hac1hmzEb^3v8 z{{QIM17hIoEgNq>|2$p(xt(|L-!gMNF?2nJMMJtA+k$f34>|zC}9oiyM>c|$yaSmRO+i@K3K&NlesSXs=aSjyA za~#wG4vmg|Db1QyI<#NEgn{}22?OHQYsk*<^6BPvaQJ{f={kTCdgBl8iwEQ>?*Rd3 z^)`9%F3=KwxCp=p5|T#LA*L^H=zZ`uLKiz4?@u?!^$q+g9W--s`~!9_6HRLPNh{6C z&9CTNA|Gdz^~Fdv7XzFcrNrc2JKKk)d^9+E%t?@jW!#*qW)UNPx?g|S{e>U& z`sog9z>$3eUl`IMDW^los#AR{&3_+p_MOv~#UE502#j21iTl3kA3pqbTE=I^tH-`} z>2FoZy4uZmRt);A%>yH2etC87_i-KHe(m+~^;heY|5@_NwA()#zpbvxnswvOZHv2{ zzyH*XmFqitljTNnzc!f>T^l+3-d`r}o@g7q|9Ev-$_vNOh`+7qvN!IXe{Fke-r&1V z-f!6U=8uy(za7l}{Jm|q+8NnZJ6_ZqAM26ve5d8-PCmV9)OSxL1(vt2`Pc3V%Mad~qz`!U zdBggfKkWS4tgTBve+jmOH{F$OC_4&FcCn*#NOQBJ=z#xSJNjuxeXli^=!4^;M#K4c z^cQ01wx6ct_T2E7O*?0N7Q3}(?Skl<34hILSzhr-@a-FFCry}B`R0N4f9iAT=%D9r zO8Rx#vajNIF6jJ3)1+ftM)gWPyKmH)R?9bzTUa}0)1j%8AMJPa3)9PiC%1m^TGndo z^zJ{sdgAs!9sK>@!tbo=y8CyxUwv@qKVSIWmTgmu_t)pv1s(tBqqzYSrv}>}-2UMG zOHaLFHClQ92m6^y_5z_^W5N|!A-`?%%rdv~o} znfU9dcTWB7+td3ZH+9(9t!YN|Jx3?KI`i&;r@ya%-n73;d|CD0dw&W_pF1?~y^3WO zRh##I+w$$#+KbrZDP3CF#vS?k(9|mj2MzoA-G_$%xHjs(tH)11UHs;_vpZ%i>2qu8 zC1d|r59*7rG~D{-D`P*|@Nz|X^|WbEukRlIUc{-tp1@1`++e}cS~x2x%_tp zk3F#YvkzXWc=ti`u)^OS?{H}3_3HQEroSVy+tdY|5BhcHUsf(Sb9ei>^EQ9`?f$W= zAH3(`v)`YY_U!FnZJGDZuBVlVz2YX8NsZwIaV-adEm zgn^5d^-t zZy52@fk7b&|M+Fi$;%J5=ss4Q`00VIMN^xn?@r$Fa`u*gezia3=;1Uc{_(@T>VLh|W_!`))ATiq2z3mi{tLeb{2K6Uz^?(n2K*ZEYrwAozXtpo z@N2-Y0lx3KU=oOwrZnV1A_ydq0JaPU6Y`L-Wu(O>!Zw5^5LwtVb}*7+N#Ha* z~P>H{$P#$hgG0`eNtEw9N}-NO*FVoj^rf|B{=WX+Mg#4YL8TBFK0SYUHIl4jgdbc$cOHXDh_0ukr@TH;;uB*6Yy6z20bGS9_qv+a72QBEhI{GwbW%N+5iC`}}R* z)=u9Jzs$v`@92$^Udcuf=AtttH=uUhg$%vkYDc3(muBawx4sR&ZIl;aKcFCyBBdjkc>AOU-h+nU_!*@D; zm5`@nKn5CNy*?`EY)+$KVmrz8-?&{er&tN$oa*IK}WbJ1O!g~8M zia6r+w)i5xEY+wl=9Fn3Zg+&wU|(>@j$lA(H0m3!ktt1z0ioVL&L)#e?aqbM>#cRK zTkEWLH*%7P!=_w3`4)+(9`w5AYFey}k|0NIzLMn8o-6A$?Es>~2xAcNK>sY6B*GD3 zYWIuwXxi~bnszSIRMs0or<3xz8Q~m+r#hN;YZ`ZfIV{xnD8JV4{?${PPp;bD|Gn_N zC0A~IWFBZ1;+%$#{M>W2s}&|1j_Ekta4K6h(|@5_9?(h~?hHr#J4$QYw|4qE?<}pM zE?`%%b9=b7D%k0-2}T2`@b+L}iRc_CrF5geGYm?&)M4P^e9Ch2=>jrorO|L_X-E53 zI-9S#W{GV{%bkb{yDD}3rgNT!UAg?y#3id)1l*c-B~B`D8~GdILdN9(v&UHvob^C{ z4{UJ7f9;CD>lzZtuH=kcuS18KnC9v|7MbBnxJz8|cU&;wjA!mLFta09UC1R9E}aG{jbh)$A9XI|K1hfGhCP0J3(~+fMEp^4W9CatA z*2dGd@!zC9Wsdj{Busls+(Xs#MAv5W9aAr>EU ze7DY7HwTI4o|nK_7Z)~W6kDO#+51}L!im~P9|gZFv1iy7|7Gf5(Mk0TMlL41U{uOU z+OziA$L3QC%y932+Cu$(WS>lSC8EQw#0CicD(z`QZUZJq_n+1@)Xj;`cO{D7LZ9zS zRKgACqWF-v4T2jIbw^WwLZ3HQ2^tw#hTJceDy!qKE1tUeNZMm@#$O+U<56lPr9OE+ z6vbb!j*q+cADMNlW3yw6<2Hv^R-dT929GO#!j&v;T1J&oy8<>=7<1sr>3en6hQ`(0olpk~nhsIsHqgOixtwmP2;*Q{c!WpKZV0ua>|_ zcl;f9{A6unz86w;iFxyCr=>{b{@ad&1k>wElhDtN{JOG)x!ZJmu;>LT=JECA5!z zc%nA>*zn18+BR4lf5R1jDYYI}L-F_u&U9aiD>?ICFxrmQ#$Qicpm}t0I-O2kO2vym z1K0i>g9j?`$Q5MTJE`{&QVK{zOd3Uq#*=L?qW#)?-cE={8Ci&e#}ia;6#8c5-z4*Q zCGIM5bswfeQ`szItKx^!$0TRO(mS~Cnry2cyBu;0l-yG!gPum$)^S~OGoIKU9UB{P zLDeR{LG@bK`*!3KD#=5$WQjDG4@IiZU5O&w+bAAdmTmA>$8B20@js^CV6k5zbgvu=7gs$q`36lGD=+(r_Sy!iug~@8 z?@^`2sFl=x(1TuovTbne!=RlY>rolI1=)Q6p!o^qiOlsZt|xIfu(;ztcE|q>Hw1V5 zJ$GXAymVh5S`_sB1M68P_4Is>Y9(3m4j`$Y&Ey|Q^4~J|6ej;Vm;A;YveDf0p-DnX zKXV^v@+wLGB9jj>`9Vqk5|bZg@^>ZqAtv9)l<;J2tOX6K>N>tyQRbLu&I z{g<)++W2qNo+jI|p24TW9W^0y^^2oL*{mx^H^{8_vW{mim;U&nCNd5(`JX|~n0^?Q zAxm%fjLw9-JFye})}G_3!MD?C^qdP|^0P1|)s+>CUcw>^$fDu+;qDVujL78Pm!rgg z5$EI-21IAFdk?@42v8pk8Ief>nT*~j8^n9ag>H7?zNuzYa!_k1+XZkTd1|3ECu^GeG+0N)=ya-uqa^RFhC~7n67ERrF<543dgh zr1=Tv^{|TPq>3Auyi%{CE~{dgRD3R5%0~$QwN&{Lmi-gfOsHTVl~?7j;UIFr6>_RhOx$Ko)pPh;})lKeQ6-@H`1f(!QulV4`?RB7PnnS6xF z7fSM{nfw@&FP7v!CO-gj#ubmE`q&jNL`VMsI~X4&S8xwWR|VC@Ev)h(S?e(-S26ji zT=F6&ACcsHnR_OaUz22I?nx|zQ1x4+D;{L--!j=M$qzGmn8{_5{1}tJ1#+fvKSBw( zFrPqPqnBn2cbp10UCQo89Z=!+=w&~ZmF*+h5&W>O5t1FwVvW)V@q??ejCI-AycfX> zvYpMln8}kQcLkG+m^@dKuVV767$~a3^ejeN{5bCU78;|8!9LrQB75veW?X{kXjv9} z2wSswocJwSOwmy)1j}zCOiYYv)HOPi#Z83ig68xCga@5rmRQ%v$&0LUl#Wh zj%D#6@K~6YFCfs$po_pq89YLumH`!a>_!G50_6+_2+U_tNnjR(7=d#c*a2j(t#@&H zgeC%XpEx?6PSfq(j>Skp;Fs?E1d5^?0UF1Q0X!a}vEUD9fh{{` z%pEBHGbJLs=MiS+<1{`znVGY=6Jkn&X$9^^iHcqG)%>Mb$cp*PM$&OT)+;mfmsJ=8 zZ(fv{zoa8`GxL&vogwpF3VGcGW^A#39)j8U*rmEu$I~?T))A_)5J978ZlZFSKXRcg z^CVI&<^)IQ$;^JpDJg^of6@T+WcP{chMM}l*VDbXzH#rZ-6w9U54V`_*$*dopYTw; z=er^<#tJ=O6LDu~d)VCbcZiSDPxpxix2tMjW%r5ojWv#ao4Zf6qq@yKJtFOnX2+b! z?y-GPeN$t@K2P@vC$fy(-hHB_W==z7>zKd$#0`ygHTzuMCmNwALLBREs*bqE)^?w8 z!K}y)FtgUNF|vGYW%r4Cyz|Dcf|<}8xfqnj+Q!I-#%6Y(xDomyCD3=% zO?A;?F-5SYQ#0TM$I35In~%VKj4)~6URhLgPZ$$7X|B0v z8{(sn3FZb^xi2hBZSGkon5YEip4G%e4ZizCC&p^~+N2}QJqx8KQ9rX0A8VBkG5457 z3OUl;Q$#7X(lO?qw=mC?4mJ0TB0g3w9c1o#S)@?4n0ub1lv&*;WPKl!DWbj~N8FX1 z?We`2{i`%{?^i&mO;#)d0c{uyUFM!o37+d`qHF!$TXbWLzm(cIfb35g=X)PXn& zB(HxBm%HE-Gez*DMXf_BO}KK_D{%dHpX8=`QZ&`A-6v&J{VciXq-?57sJ2c@)2X-b zJ}H~(M-U%WM39(*BOG@X^T2$&m42QSa1~Ea7p`>EHO3zO`MtqQl z{xqeomi$I+tPouxig#SPFA1%-Kc~bvm!Bll0egw{}*Ecrcj_DYxnM|#^ z6%h|zwg0*o zwdkwK$VW{3zdxzf5#Kq*{NxL+#Z*`<=O7#7&BRzyAvsuVy2xs91;qk!`=%&P@+H8V%|Kr6|UCy4O`#YN$4f^n&0Y($q% z>n`rZ4OlEie|l{z=6tou>yMEHs??ome8xg*&T}Wsjzr{{lJxngvrElSVi-Lg$=Cfj zd8-MM(dS#!#Xo@*FS_zNW~P7T^+syXvIVU}3mRVee593HkT27MX1rmgoHGr{PKNvi z+Rv8J2j0VNKi58bK1O45+hA*Y#uVgi?%g+u@}GStrf@W{E~PtRWFdU|Fxe@5T8Fem z#ZCCl-sNZnQY}R{P7v+Lh+Zv37fleICPkM{5Vd7QrwY+&6GVS(5(Zl)h`vn}Veo%q zQ72LH8~o-Pe4iA34GFnreJUe*NQfSuAi7D4K085_mK0>JUl5}G6GUfA(T699(mI?J zy-SGhnIQV_8m1x1>%W5pcj88Bzqg_9nE^T5%ewI#8uG1miH;#l9UjVE;oiRogK#{T zn?4T>dZ;A59#1Eo&?J^CdhbD)K8*hE7wCI_L855nL)5|#juqQp#$y_yIl6Zbm59#M z+lmHVLXCKXBmDzpe-Es2nxA}aZL)R;%)0J5vTLO~vH3Y%NH1f4MlA^0Pp0gjE74a$ z^ux%rrUZIg(??-KO-b}|bvd#xZ^=6q=zh+csGHS4n(On za@3QJx>Ph-u?2H>`Jl8#Sa4j7O8FU99kQbd{d|!$l-lxcp7{YR_yGpDuK3g~hv|N_ zW%OsTD_cIfevmpu#>QVE^`mbg&RP5yqLjt=aYGkgdqIdKN4RP zg>?20IUgYdK&b+y)nyJ0B3{n%qpju+ocrnqK>SZBg7iH{UCC&FDlE%!H1(_~^q!-s z^_27eBb)GST^fEgbpspz1Tn+#*WZ%OEw?>1xVm2zb)KlPx>kLhqPVbEeVl4JvJ(-i zOmmNT0GYnXsE-=h zEb8NE>Rd#7UpD^@Eu9@rB_T1IhHfZ5K<>OwD*X{%k+PCM28wiN%)GESgjE5!=Q*rf zx#9v1^>%><70^*U2Dg!3d_OvG<<|WiS8h#`3Yh#hb@1_CdLaPTiM*4Klcv-`7%5C9 zV(J{7$$}6^Cgvv&<1GVfiMrMt0vuZ++xCIfRzg;RWKq`>!7K?vksSmoFXczAfBemK zn)*|he361?=<@w0b${_HdZY=jsSn%(@w+pc6C-tK6lTkO=>o_93! z-xT!>n*U~yGs~5S=-)}vE$My>3N2=O@<*0;4c$_4_gZ7+5LGWQ-HM5hdj*B)-{dz#%o2IO+4X5 z)9f9loWO!!ES37aXdQb-@S@WT=oelGe5!GsqY8!Xd6*efbgj4&Gk%2|t1Gb*Z>Oa` zjY7IHPo-75m|&~8>jI?0y?aDbO$oiK)`qzU?292O<(G7flLjLmN&f`V>m+>^(JLjr zkLVSWZY8=^(hm@whLrAj%>vsoqzGHh&KE_IzlK2*xgq6(6V&4u`96n8{}j^4FsPuO zE|t21JcY)23G|WO4dZlA5$#dFkCj+OgS+XegH*mDG@8u($5f@l4}nZTw9&RAVg)X08`p4g0&S z8eRpAzk|Wp0?sQveG_+)?=9kYv-rJD{5FZ-t>U*u{I-hUHt|aXfb{$h@f#4o zA@SQOek0;{r}*s>zaJC7yT$Kb@f*W$ZF2T8+-@8V>G|J6*w;pW8~qJhP#Z20ZS?09 zyOClqP|QcMqZI3;*!L)wq}Vqp_7#dfO0geMte;}9Q0xJU{hnffO|f%Ohok?CVpmX% z?mulyDHfnu6~$U8R!^~8C`LDtQ4huLpjZuJ4IZmI5b<}m`kMV(L&Vn^iH5X>wrHd! zxGSLD?CT8R>y~S+8v<>%VJpMiFR&75j<8;XAocaMB4pf&Cz^Ew7t_$3jDsXpR&|v zFXDHCi(WOi*7*V`QKwcNM7~5J_BwwcO5vIy{cZ^1wREATro97R6Dj_P)#IZV*g-&+ zZmTS}bxmgwz66%pSe-5H5s?mAzqKaVxx*KsE1Z#DBI21(dyO}<4po}w3?dHyQ6gNXhI}PLV z(Nn7Zt-feSM8^Zo8^XBa8lsS;_AW1yET-m%3nI)E@T)eTrNA5XrCydG+N8%9Y15H{ z9W7|lOjz9!+#Ytg`I@fxZ)?XF9GzC@PJbZ6EnF13VN-*+0Ep4r;74}?hwKP-;OfwX z4&rj4BC?k$t^i+Po1trf&z(9jm#RqASQ@muSo=$gV> zb8yF!UF6w7q|JAyzjMh}D$5c-nI2x^K?g_Ijws0)c;yv@>yRzh+_epjr;yR)B?jhZ zS-ey5W$ftmi=u@({rLJNcxG-YCl!-R3Ar#RZJ=}(TJ8-YS?Umc5Df{3P>Vu6HE&lH zPwg$x-W-HK8^pJc*%rcBc4gKLk@gNHr2nFaS^}Ln?dr&W&Lg^QqSm5kcXmbm0s6Qn zLzP|qM7pD;MOa)*tuKHJP${qX?+EVn=TD>S&lhQKlVwdm_(UwG718ieTT4H5P=rRK zpTvDpdyv6b2z(jmhbclw`oYg>MHka8otUeLgk>o4sTReN?k;jrM0{zhBC8O2j|6C1 zc^K0?ail@P5LUC`$5etJF)F4cnOpk7g++KasfmxOC=?M=Q%e9ZgKLW^LWjOgl$$sx zLhL^#)Xd;10^4z7$xt5Y2fxGKz(hkH6gd}X7s0!5l9~ig(|-I+u#@C5?b4`Zm*CXQ zd{SIEh~$^xG+l|G3G(c-g-89F8bQWS3@1FL(YsHkIDSs03k#<5pvX3y z4-mW?Cq~oq_*(>|>rtGhhww8&*8x+}y`nB?%qk9wkY!)N%oQI`%MZX1Xc|p+qd31# zDKs7+VH3TJ0$u+yp8 zmge3HAf;g;Pvl@nNVpm&tfs?c!v8tir1j^YJDEb0&s1c3ep4~g*CW2Z#EyDJ^Z6#2 zH{<*TwQL-O`!KeqZ=6TaqFfZhzBYs!R(rmQunFM^!q`ICaGj>vuZ9kUWoR*33{r{JwVQy;myNIQ3UvSw;3)+P-WYsD6{)Wm?ey!ja41 zlFPM8{b-7V2sNuVdBCcbc;;wREpxT0+I;ZN*G$6*?N@^DD#UT&k6)z~(Kkz&G*5=_ z*28D(k)=3HAFJ0)T^5sN`qYv>IQ&vj>HGv%Vd*$mvY|1Ym#I-jdOu-kspS3`hdmtL z!{GrAAL6i3-Ct$?CpaAB@L3Lj%Hc0LOmX-ohwpJXWtq&;!l5z$;nk92MLVLSj6)CV zi4G6-R5+-e(SiCA2emhGpncIn?Tn5QP9Nvc&fe|gklH65!<-)CFvejYhy5I)Er`Ry zp_Rij4(%LzIBeoD#9@rXJ`Vdi9N=(}!(k3bI2`9t^*EL}nmDW+mT_q35N%Z)O&o?e zjB(hF+W9RTfAw{k%%a_y*I*nf^oOr}qWvc$evyGyiKU<25q9+(0j3x=hUu z1MKW?MOR@N>-XTkOGguj5@GPeewf6BS*-s$rjN5dR;D*HeT?Y~4E89!XT!4|IO~D4 z9ysfPvmQ9>fwLYs>w&^NaQ>Xijm}$FH?4AnO7K&^IyQM$$Py~4cVzzoTN;o~l=ZCk ze7o1{t*XJ(f^ftah{*Ncst#W`T<>r7clra(er^37$EOWWp4DgfZm+6wbYSV&hi4f4 z+(L^D;^iN4nEE~hZMUpj+YnhPceulX@3LKOzKC-t*rr2)_m+mpia;>Z)*0NT#rl4q zk))(Xw_Z?-9h4G{8`s&&u-{l$mv3wPPMd87;$)yVf`>$6pE{=&`vl&CkVZ6FL_P+o za%c#*=MhX5^`|BYi58y+W)A#!Mv>P4F2~a*$-S@z66I4EQ?QBX@dtmT9qf@mhm8OnnznJ)#Pmw|kr0wtKfl>2Vbq4I&;FbcO)1 zGggb(Zqd6HJN#j3Jywz}`1(8A@|A2tSz6$OGZp5~EG{+8J1WsKt7=x`K}m*&Q@keT+0r4Ey6KtnP+;~i}4o@|S(WPT_hn-#i<|uYs?C{gW2tPcd-Qf`& z>bWrpn`GTlO62=7$eAiCZeNd`n-5XPM3wBw|1l_9gsVaW!Q@6 zX#p=-n%gL)Kbs;i2GAZcQ7vwe`!C`_VN@1nK#+Bn+v;oYARPxOp*4ivDI=|f2MLF> z_^7~<&gLDceeI56h8=!k+i`}0W<1P9@(AGwo_PY`FnQ(5aGejU!{#DwSkAa(Gs~=l zMKP1bVznaDXKM0T?EN2V8aE9Tk596IjI-dQf6@R{SO$tMF_YC|?T1?XfT`a!Xc{lJ zSexutyJcijnbjlLnp?;&K2{^tW9rXZi%i<0Uw`IiVlm;Q58c#$r1Xeno(@y`Je*}X z=^(rgKYC2^1Lufj?NtOMuQ2hGJgv#nL73$AxP^#(&^%dhuL)^-Os{(6vwxWL??yW1 zuW%Ca9;F;1ps6M%+pXd{Fx7?E4lN^!6PA&SziWbgA%q6p-vwnDo!X z8I#Ewd-Rz6YvFZS+P{$G6;|>VgS;M-yju5dWqE}Ql~?P~C2uw4ug8?XhwZ0_ zJ7mAYh02Fm{xdAEaG~;jEKkpqg#Q^I2hP_%21zjv3aEYPu_zC(i__bLqCAY1J$*tt zE3d~Suh!LXV0nd=e3L<5k4avww})6>VI}V|$m=o5t9AN&Szci!Z!yU0G0FEc;ma(q zu#&eMsTpXI-=%FkHITj?)Sn15h-g$tEe&u@;hyuyXbtLHu`mRDHGTSe)!<=11fe~_OW z&A_8}^1s4LUSHmIAnGy653~FdmRGn?`4N_PvAn{C%8#@BZkAWLPwPiUz{BP@Rl%PU-{{5Z>hg5?!1R9>5-iQ}6ruW+IA7M34jd4&s=x3c^> zxKES+6fRW0jOCZIyuyXb+gbiLmRGn?c@N9SSzh5n<(pXkAj>OUsCsHSbmh{6)seMkmW1zf{(cWGcHtqnECgx zyuyXbkFfj^mRGn?`Eiz?hIt{`uW+IA>ivOImRGn?dG(&jZ7i>Fq4L(bvj6!s%PU-{ zyn3(Y2+J#6sJxx?f0yMIE>zyb@>gRXNd8y2Q28d7r!Q+rUSTDVW+4v3H2&0M8h?hA z|5#q(Gs!;+{wpzNQ-A;DJB;a_KsugdEZz+S{&&XojvyUxF{XC~=_ol5eYc3opP2?c z*MP~s7W(0162cY*5SD^pkFN#Jw;mGX@_z&A%^F zp8@w9@K+6(?A5oYV@TJxpO2s*dVCEqwWq~~^~(YF2ko{)^`YJ))H?udtH03h8Y7 zR(LJ=Rh(Eh8}JSTCVhJU??t-a-%lFwG2pz{GyCh74@rN~d&qQj0q667zevs6ug6q= z>(!EBko767%6}&RsrMdVWO;=Pl~?ae{*L7pR`Pa({d!FH$JqX97qCAVEBOI~ydIOh zdJl6o%PXwp`wjAXO!D-;HyyiKUSTCaC{nZj*JF}b?`J;B@(L^Yaq9SS5MGBLgPFLDzfQ|VZ`?C$;*XQpC*5^<11^s;v@P~#;bwzUC&JheR@p#EM=160P9m&*<&}z z>oLiDSpFExE3D*EOmPrihaWxGw+G{RWfc1K_3;PbeDx9H{C8a_{h_eR-!8My_*0LC zKUqG>@&k;Oyu~1|$0R?<{9k5yg_V30MQ~6+<=119x0Z`!jrMS*`c#R;$v z7dnVv-yWVu`eh)h=byh|te#)K$yhzFJNF{VZ^1a4j!PJ;=V{k4F5~o7j6IBN8HX5e zX57a(srb!O|HF*c^Pv|R+buHvT_w+WI-ZMAdHNY&!L(%`cm#ulr9T03Ja<4-d#WBfE@JLBIo_AtI=w$$ImxSnx{ah!3C@edgHF@BqI zKjW+6H?nttv7hlEY-!L9#ycqLBQGUjq zjK>)tV5}jeV~DYZ@d?IO#)~meBzA?l%FyEy_L&MvCMq^0(6#? zuI8&(Fjn(VJ7YDU+{ReV4|g$E^S%3(JkMXg!dT5;e#ThMKYk~0EHl3-nlJ5B^MjcJ z!#*B=FJ-L8&$W!zc({eJ8sF|#@;qLBT=DaG@(tkgP<}O@oPDMAhZ-N&F;?T1tty?z z54#wv@x@meTgqg8{(`ZGG5ygk^0&I*UT~Gf>i)TqvAQ4DGgkMv9gNle>KlyJ{pUR; z&-a(5sE6~4v+FBP#%g_K6Jxc$vYoM7U)jr8t*?BFu^JD5nXwuVKh9W&5zqUr^KZCLQuID1g7EWKzSbdk{V648!X<)3r!)XULQ~N(h z>W=~g;=eq44fqiQK4QSnNnE7lUy*o{!tWaJ3|xoEER%kT0WUJ(8w}WQ!1oFq%jo-z z0e{heA2;A<4fqv-v;HtGGT3XtOAL6G0k4-h;@!Rg0I?_h1i*^cveoZE5UigO3f5YA4VVVn`1 zQJnP7)onOCa0YM&ao&M*7fu}Zzf_)9t(5jx3759CM0N#(rPwQHdn6bt6<@u}U$qSi z{w6JU>gX)R1|#@m!lmJ0w6ob?s$o|n-d|-&b13va)a86wzhrB)y`u%$iw$6MGv>6L zw%(5YcfyMUw3kpvX;V?T%aW>WPETcnhrjDLrdHeVMk~G3`GFWN zGKR^zS4(pp+#YD|h_?8{rIKSw8@%fcH+WY2!tKpsE07P!a<)ghn>S6UDmQwX6U1x7 z3Uq2i(5LJc(Gi^5ZLA1p~tqRym6N_!|Ac1hBLc*)ybW@-bXV$h111`Lt*Lk zto63CT5J}>Ik)AQwM^|Jc3Qi11+y*1TicSE-qdz_ns3)DtPop#Ga~oRXcx8_E#RwLvScsJc6}La zEBUJmzo>ymdQm-W@InRlZ|XR8@^a^nP~^^2rkC4zqcpk6m``dl=CQ&P4C50Ju|*vF zAg5Wb#BNV(I)Yn$Xs-=9wP34Y{k-SXooJ#f(FtWXYEx}g-xezP<@@&`vs~`92JI^x zZnf!E9^I8|f^vs9a8^`vJP)6(Y)z0hfOF$-m4kJu!%Zk3<1)E-TVc#A>DvUce_VE# zG_u6umef2Mz+#zp20q&gSuP;)Ab6w@CVyzGrOG9 ztQ4i;lzds1iy|=tigiYT3b9dMHoHP(mS@>B#e$z@Je!uszVfAL&RLF}vYoEYRMKvJ zv~wTKLxZ7M9__XYv56n0%66)ePGzUntmDNVfT!1M%jm^UV5ikuCbvE# z{?jv-tGxvaU{zZWo|$#I+L=&oOn7=Dma9Dr3t}%{Ms-G;{mBgt^>tld>2POLh)<;E zt5P&*9j6DKs!ozR60u{ZzGpADWd(HmA38ltam5;wPL*$Yd6pBGqu3#lHb}$;oMU?? zA)g^DvO0L9M6pkz*d`I??-+wB$o5`lkZ1nS!PR0u|uV_D?`g$mP{(|Vfnsf)G$c+ETbu#4}F;#*oN=p zIy$_WkL`qrYV`0(5;r@Y{p78HP?W&5iy8`B+@FcdeAcBsca_RHWbefgQ zq|6NteO-o_xi<7fTRC(!JTrDf}>_q*4q-bf* zw$)IPrxTpeIW3b#et!%8)L-*W;(ywrwa&D&3(ew>bYv$*nM$*rU1;X!dv>8&T>r`& zXBV2WtB&pLLUZ$WT46oA&|JW}{Mm)((AkCNvkT1u+u4QY>_W2`h04kA|CsevS~N4v zJWsdkM@5(@k(o^)sY1MjkcYx+L8n=|g7ULVPN#h7KtE^COltK+z0Wht4+X6>P_5=n z@&DX40aBPVpUoJYL(N#6Lp?hSkNhPbMExa~EseUx`a$kvuL%qI4aUVwG@4U991|(| z*e5K2f^)(XBii#-|7<{L%OT`hmlUr8(i5itw-1}dYl!b}O;rD$qj59S45k-s@^53B zVacAQwsMMovsNa_U0MP1Y{Uy{IJ5Px*qt?pA~)j| mB)JuDX4BTZ8!BhEaD`H_cPoXoX)A>R+O1V?(>h^0-~SC!7g|05 diff --git a/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginCommon.xcconfig b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginCommon.xcconfig new file mode 100644 index 0000000..619a862 --- /dev/null +++ b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginCommon.xcconfig @@ -0,0 +1,38 @@ +ALWAYS_SEARCH_USER_PATHS = NO +ARCHS = $(ARCHS_STANDARD) +CLANG_CXX_LANGUAGE_STANDARD = c++14 +CLANG_CXX_LIBRARY = libc++ +CONFIGURATION_BUILD_DIR = ./../output/mac/$(AI_CONFIGURATION) +CONFIGURATION_TEMP_DIR = $(PROJECT_TEMP_DIR)/Default +DSTROOT = /tmp/$(PRODUCT_NAME).dst +EXPORTED_SYMBOLS_FILE = +FRAMEWORK_SEARCH_PATHS = +LIBRARY_SEARCH_PATHS = +GCC_DEBUGGING_SYMBOLS = full +GCC_GENERATE_DEBUGGING_SYMBOLS = YES +GCC_INPUT_FILETYPE = sourcecode.cpp.objcpp +GCC_PRECOMPILE_PREFIX_HEADER = YES +GCC_PREFIX_HEADER = ../common/includes/IllustratorSDK$(AI_CONFIGURATION).pch +GCC_VERSION=com.apple.compilers.llvm.clang.1_0 +GCC_WARN_ABOUT_MISSING_PROTOTYPES = NO +GCC_WARN_UNKNOWN_PRAGMAS = YES +GCC_WARN_UNUSED_VARIABLE = YES +GENERATE_PKGINFO_FILE = YES +HEADER_SEARCH_PATHS = ../../illustratorapi/ate ../../illustratorapi/illustrator ../../illustratorapi/illustrator/actions ../../illustratorapi/pica_sp /Developer/Headers/FlatCarbon ../common/includes Source +INFOPLIST_FILE = ../common/mac/Info.plist +INFOPLIST_PREFIX_HEADER = ../common/includes/SDKDef.h +INFOPLIST_PREPROCESS = YES +MACOSX_DEPLOYMENT_TARGET[arch=arm64] = 11.0 +MACOSX_DEPLOYMENT_TARGET[arch=x86_64] = 10.15 +OBJROOT = $(PROJECT_DIR)/build +ONLY_LINK_ESSENTIAL_SYMBOLS = YES +PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO +PRESERVE_DEAD_CODE_INITS_AND_TERMS = YES +PRODUCT_BUNDLE_IDENTIFIER = com.adobe.illustrator.plugins.$(PRODUCT_NAME) +PRODUCT_NAME = $(PROJECT_NAME) +REZ_SEARCH_PATHS = Resources/raw Resources/Mac ../common/mac +SCAN_ALL_SOURCE_FILES_FOR_INCLUDES = YES +SDKROOT = macosx +SHARED_PRECOMPS_DIR = ./../output/mac/sharedprecompiledheaders/$(AI_CONFIGURATION) +SYMROOT = ../output/mac/$(AI_CONFIGURATION) +WRAPPER_EXTENSION = aip diff --git a/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginDebug.xcconfig b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginDebug.xcconfig new file mode 100644 index 0000000..402e7bb --- /dev/null +++ b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginDebug.xcconfig @@ -0,0 +1,10 @@ +AI_CONFIGURATION = debug +DEAD_CODE_STRIPPING = NO +DEBUG_INFORMATION_FORMAT = dwarf +DEPLOYMENT_POSTPROCESSING = NO +GCC_ENABLE_FIX_AND_CONTINUE = YES +GCC_OPTIMIZATION_LEVEL = 0 +GCC_SYMBOLS_PRIVATE_EXTERN = YES +LLVM_LTO = NO +SEPARATE_STRIP = NO +STRIP_INSTALLED_PRODUCT = NO diff --git a/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginRelease.xcconfig b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginRelease.xcconfig new file mode 100644 index 0000000..c581e19 --- /dev/null +++ b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/AIPluginRelease.xcconfig @@ -0,0 +1,10 @@ +AI_CONFIGURATION = release +DEAD_CODE_STRIPPING = YES +DEBUG_INFORMATION_FORMAT = dwarf-with-dsym +DEPLOYMENT_POSTPROCESSING = YES +GCC_ENABLE_FIX_AND_CONTINUE = NO +GCC_OPTIMIZATION_LEVEL = z +GCC_SYMBOLS_PRIVATE_EXTERN = NO +LLVM_LTO = YES +SEPARATE_STRIP = YES +STRIP_INSTALLED_PRODUCT = YES diff --git a/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/BloksAIPlugin.rsrc b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/Resources/BloksAIPlugin.rsrc index 8966b0fe78f5f199e5091c69ae4c314247b314d9..7c9986b9e0bcfb616df3c616ba39e2f18aa1a8a6 100644 GIT binary patch literal 286 ecmZQzU}RtbV<5%AAO|K#6oJG4G7NJ6{{sLh?E-lK literal 477 zcmZQzU}RumV4MLYK-d+CM;e#{^)Q>Gi<4`1W?l-E&k`Kq>If3cEGsI8i2-RQkXS)M zauQUG6H0?AkX&wJat2fk6u1mvu}otlbg_cWyj-XlpHohLcCn*pKu&3TW*%4&GhVnr f;xY_Ca{@90e1L2&y9NdZ1t0?igiwr704V_g2;(BS diff --git a/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/_CodeSignature/CodeResources b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/_CodeSignature/CodeResources new file mode 100644 index 0000000..54ce601 --- /dev/null +++ b/BloksAIPlugin/Mac/release/BloksAIPlugin.aip/Contents/_CodeSignature/CodeResources @@ -0,0 +1,177 @@ + + + + + files + + Resources/AIPluginCommon.xcconfig + + yMSnAAlqngxRTb1JBgrpsWczXYw= + + Resources/AIPluginDebug.xcconfig + + yLVil7o1isjV8FUv/h+VDf2OuoE= + + Resources/AIPluginRelease.xcconfig + + bqZ5Q2iXZ0g8jvgsRnnu46noPBU= + + Resources/BloksAIPlugin.rsrc + + 8TXKEazb4n9vpRKfFblc4eEsEOc= + + + files2 + + Resources/AIPluginCommon.xcconfig + + hash + + yMSnAAlqngxRTb1JBgrpsWczXYw= + + hash2 + + +hK6mfW0hfgV4URrpZ+SZEk6T1OYoH5BDXIW0p5RW2U= + + + Resources/AIPluginDebug.xcconfig + + hash + + yLVil7o1isjV8FUv/h+VDf2OuoE= + + hash2 + + M+mY4S0qXq0wSahcJeD2hz9UcqMtm27ykdtcDl+sfZg= + + + Resources/AIPluginRelease.xcconfig + + hash + + bqZ5Q2iXZ0g8jvgsRnnu46noPBU= + + hash2 + + ah2HAj0H2ZZ5w07yWznRLGQEqfJzx3DMPaLopp5mDQc= + + + Resources/BloksAIPlugin.rsrc + + hash + + 8TXKEazb4n9vpRKfFblc4eEsEOc= + + hash2 + + QNyBYV4MMbLk/mU6PBpB5QUw3PZKSyQo/4rmtXcIY7Y= + + + + rules + + ^Resources/ + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ + + nested + + weight + 10 + + ^.* + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^Resources/ + + weight + 20 + + ^Resources/.*\.lproj/ + + optional + + weight + 1000 + + ^Resources/.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Resources/Base\.lproj/ + + weight + 1010 + + ^[^/]+$ + + nested + + weight + 10 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/BloksAIPlugin/Vendor/common/mac/Info.plist b/BloksAIPlugin/Vendor/common/mac/Info.plist index 03537db..fa13004 100644 --- a/BloksAIPlugin/Vendor/common/mac/Info.plist +++ b/BloksAIPlugin/Vendor/common/mac/Info.plist @@ -1,34 +1,34 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleDisplayName - $(PRODUCT_NAME) - CFBundleExecutable - $(PRODUCT_NAME) - CFBundleGetInfoHTML - $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString - CFBundleGetInfoString - $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString - CFBundleIdentifier - kSDKDefAIBundlePrefix.plugins.$(PRODUCT_NAME) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - ARPI - CFBundleShortVersionString - $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber - CFBundleSignature - ART5 - CFBundleVersion - kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber - CSResourcesFileMapped - - LSRequiresCarbon - - - + + + + + CFBundleDevelopmentRegion + English + CFBundleDisplayName + $(PRODUCT_NAME) + CFBundleExecutable + $(PRODUCT_NAME) + CFBundleGetInfoHTML + $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString + CFBundleGetInfoString + $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber, kSDKDefCopyrightString + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + ARPI + CFBundleShortVersionString + $(PRODUCT_NAME) version kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber + CFBundleSignature + ART5 + CFBundleVersion + kSDKDefAIMajorVersionNum.kSDKDefAIMinorVersionNum.kSDKDefAIRevisionVersionNum.kSDKDefBuildNumber + CSResourcesFileMapped + + LSRequiresCarbon + + + From 5463afd6d1308e3f77d2a2feadde0a98be8145a5 Mon Sep 17 00:00:00 2001 From: William Cork Date: Fri, 1 Apr 2022 13:48:28 -0700 Subject: [PATCH 5/6] Update README.md --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 1c5dbdc..c72d9e2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,3 @@ -A humble fork of the [Bloks project](https://github.com/WestonThayer/Bloks) by [Weston Thayer](https://github.com/WestonThayer) - # Bloks A UX for flexbox layout within Illustrator. [Read the blog post](http://westonthayer.com/writing/2016/07/27/layout-experiments-in-adobe-illustrator/). From a98629cc526507728f7c023444b5abda96124fd9 Mon Sep 17 00:00:00 2001 From: William Cork Date: Fri, 1 Apr 2022 13:51:45 -0700 Subject: [PATCH 6/6] Update README.md --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c72d9e2..8be27f6 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,15 @@ A UX for flexbox layout within Illustrator. [Read the blog post](http://westonth v0.2.0+ Requires **Illustrator 2022** -1. [Download latest bloks.zip](https://github.com/wcork/Bloks/releases/download/v0.2.0/bloks-v0.2.0.zip) +1. [Download latest bloks.zip](https://github.com/wcork/Bloks/releases/download/v0.2.1/bloks-v0.2.1.zip) 2. Unzip 3. Copy the `com.westonthayer.bloks` folder to 1. Windows: `C:\Program Files (x86)\Common Files\Adobe\CEP\extensions\` - 2. Mac(**NOT YET SUPPORTED**): `/Library/Application Support/Adobe/CEP/extensions/` + 2. Mac: `/Library/Application Support/Adobe/CEP/extensions/` 4. Copy the native plugin to 1. Windows (x86): copy `WIN_32\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator 2022\Plug-ins\` 2. Windows (x64): copy `WIN_64\BloksAIPlugin.aip` to `C:\Program Files\Adobe\Adobe Illustrator 2022\Plug-ins\` - 3. Mac(**NOT YET SUPPORTED**): copy `MAC/BloksAIPlugin.aip` to `/Applications/Adobe Illustrator 2022/Plug-ins/` + 3. Mac: copy `Mac/BloksAIPlugin.aip` to `/Applications/Adobe Illustrator 2022/Plug-ins/` Finder/File Explorer may ask you for adminsitrator permission to copy to those folders. To uninstall, simply delete the files you copied.